You are on page 1of 4

1. Ch.

6/9
Imagine that a two-way handshake rather than a three-way handshake were
used to set up connections. In other words, the third message was not required.
Are deadlocks now possible? Give an example or show that none exist.

3 – way 2 – way
A B A B

 Syn  Syn

 Ack Syn  Ack Syn

 Ack

Deadlock -> ngecje ne transmetim midis 2 hosteve per shkak se te 2 host-et presin nga njeri-tjetri.

Po, ka deadlock. ACK e fundirt qe duhet te nga A dhe ne rastin e 2-way handshake mungon, le hapesire
per deadlock sepse B nuk e kupton nese A e ka marre mesazhin e sinkronizimit ACK-SYN apo jo. Dhe te 2
hostet qendrojne ne pritje dhe nuk nis komunikimi – deadlock.

2. Ch.6/17
A client sends a 128-byte request to a server located 100 km away over a 1-gigabit optical fiber. What is
the efficiency of the line during the remote procedure call?

128B = 1024b = 10kb


L = 100km
Bw =1Gb

10 kb 104 −5
t= = =10 =10 µs
1Gb 109

V drites ne OF = 200 km/ms

l 100 km
t= = =0.5 ms -> 0.5ms vajtje + 0.5ms ardhje = 1 ms
v 200 km/ ms

1ms 1
Eficenca ¿ =1 Mbps= =1 %
10000b 10

3. Ch.6/15
Why does UDP exist? Would it not have been enough to just let user processes send raw IP packets?
Porta burim Porta destinacion Header i UDP-se
Madhesia Checksum
DATA

IP – adresa e hostit

Nuk do te mjaftonte vetem adresa e hostit sepse duhet edhe adrsa logjike brenda hostit, pra
nepermjet portes (info. te cilin e ka UDP) percaktohet sherbimi/procesi qe do i jepet hostit per
komunikim.

4. (Ch.6/18) D.SH.
Consider the situation of the previous problem again. Compute the minimum possible response time both
for the given 1-Gbps line and for a 1-Mbps line. What conclusion
can you draw?

5. Ch.6/22
What is the total size of the minimum TCP MTU, including TCP and IP overhead but not including data
link layer overhead?

MTU – Maximum Transmission Unit

Segmenti = 536 B

TCP overhead = 20 B
IP overhead = 20 B

total size of the minimum TCP MTU = 576 B

6. Ch.6/28
The maximum payload of a TCP segment is 65,495 bytes. Why was such a strange number chosen?

maximum payload of a TCP segment = DATA + TCP Header -> 20 B

DATA = 65,475 B

7. Ch.6/30
Consider the effect of using slow start on a line with a 10-msec round-trip time and no congestion. The
receive window is 24 KB and the maximum segment size is 2 KB. How long does it take before the first
full window can be sent?

2KB, 4KB, 8KB, 16KB, 24KB

RTT = 10ms

4 transmetime * 10ms = 40ms ne total perpara se te dergohet dritarja e plote

8. Ch.6/31
Suppose that the TCP congestion window is set to 18 KB and a timeout occurs. How big will the window
be if the next four transmission bursts are all successful? Assume that the maximum segment size is 1 KB.
1KB, 2KB, 4KB, 8KB – suksesshme

Dritarja minimale mund te ishte 8KB per 4 transmetime te suksesshme

9. D.SH Ch.6/38
A CPU executes instructions at the rate of 1000 MIPS. Data can be copied 64 bits at a time, with each word
copied costing 10 instructions. If an coming packet has to be copied four times, can this system handle a 1-
Gbps line? For simplicity, assume that all instructions, even those instructions that read or write memory,
run at the full 1000-MIPS rate.

10. Ch.6/42
Calculate the bandwidth-delay product for the following networks:
(1) T1 (1.5 Mbps),
(2) Ethernet (10 Mbps),
(3) T3 (45 Mbps), and
(4) STS-3 (155 Mbps).
Assume an RTT of 100 msec. Recall that a TCP header has 16 bits reserved for Window Size. What are
its implications in light of your calculations?

(1) T1 (1.5 Mbps)


1.5Mbps * 100 ms = 150 kb = 150kb/8b = 18.75 kB

(2) T1 (1.5 Mbps)


10Mbps * 100 ms = 1 Mb = 0.125 MB = 125 kB

(3) T3 (45 Mbps)


45Mbps * 100 ms = 4500 kb = 562.5 kB

(4) STS-3 (155 Mbps)


155Mbps * 100 ms = 15500 kb = 1.9375 MB

bandwidth-delay product < winows size (te dhenat do dergoheshin vetem me nje transmetim – 1 RTT)

SUBNETTING – ndarja e rrjetit ne rrjete me te vogla

Maksa -> madhesine e rrjetit – sa hoste mund te kete ne rrjet


/24
2^8 = 256 IP per rrjetin, 254 per hostet

S1 – S2 (ndarje – pra nuk komunikohe dot ne menyre te drejtperdrejte midis hosteve te S1 dhe hosteve te
S2)

#
SN0:10.10.10.0/24 te ndahet ne 2 rrjete me te vogla:
256 IP => 128 IP + 128 IP
SN1: 10.10.10.0 /25
SN2: 10.10.10.128 /25

64 IP -> 2^6

SN11: 10.10.10.0 /26


SN12: 10.10.10.64/26

SN21: 10.10.10.128 /26


SN22: 10.10.10.192 /26

255.255.255.255 /32
255.255.255.254 /31
255.255.255.252 /30
255.255.255.248 /29
255.255.255.240 /28
255.255.255.224 /27
255.255.255.192 /26
255.255.255.128 /25
255.255.255.0 /24

Ushtrim:
SN0: 192.168.1.0 /27, te ndahet ne 2 rrjete:

/27 - 255.255.255.224

32 – 27 = 5 -> 2^5 = 32 IP – 30 hoste

16 IP per secilin SN0 dhe SN1.

SN1: 192.168.1.0 /28 – 14 hoste

Rrjeti 192.168.1.0 /28

Broadcast: 192.168.1.15 /28

SN2: 192.168.1.16 /28 – 14 hoste

Rrjeti 192.168.1.16 /28

Broadcast: 192.168.1.31 /28

You might also like