Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 2

P2P 2nd one

1)a. To exchange messages of arbitrary size, large messages must be segmented into parts of M-H bytes
each in length to be transmitted in multiple PDUs. Small messages must be placed in a single PDU.

b. The peer processes need to communicate information that allows for the reassembly of messages at
the receiver. For example, the first PDU may contain the message length. The last PDU may contain
and end-of-message marker. Sequence numbers may also be useful to detect loss in connection
oriented networks and to help in reconstruction of the messages in connectionless networks. Lastly,
since variable size PDUs are permitted, the size of the PDU must be transmitted in the PDU header.

c. n this case, in addition to all of the header information mentioned in b), each PDU must be labeled
with a stream ID, so that the receiver can treat each stream independently when reassembling
messages.
2) Sender sends every frame twice
5)
We must keep in mind that in CSMA/CD , for a station to get some surety of successful transmission the contention interval (time during which the station is
transmitting) should have at least 2ι slot width where ι is time for signal to propagate between two farthest stations ie there must be enough time for the front of the
frame to reach the end of the cable and then for an error message to be sent back to the start before the entire frame is transmitted. As a result for a 1 km cable the
one way propagation time = 1/200000 = 5 x 10-6 = 5 µsec so for both ways it would be = 2 x 5 µsec = 10 µsec To make CSMA/CD work, it must be impossible to
transmit an entire frame in this interval. At 1 Gbps, all frames shorter than 10,000 bits can be completely transmitted in under 10 µsec, so the minimum frame is
10,000 bits or 1250 bytes. ie 109 bps x 10 x 10-6 sec = 104 bits 104 bits / 8 = 1250 bytes

6)
The maximum efficiency achieved by the Slotted ALOHA is 0.368. The efficiency of CSMA-CD is given by 1/(1 + 6.4a), and is sensitive to a = tpropR/L, the ratio between
delay-bandwidth product and frame length. In a LAN environment, the end-to-end distance is around 100m and the transmission rates are typically 10Mbps, 100Mbps
and 1Gbps (See Table 6.1). An Ethernet frame has a maximum length of 1500 bytes = 12,000 bits. The table shows the efficiency of CSMA-CD at various transmission
rates. Assume L = 12,000 bits and propagation speed of 3 x 108 .
Note however that if shorter frame sizes predominate, e.g. 64 byte frames, then a increases by a factor of about 20. According to the above formula the efficiency of
CSMA-CD at 1 Gbps then drops to about 0.7. The situation however is worse in that the minimum frame size at 1 Gbps needs to be extended to 512 bytes, as
discussed in page 436 of the text. In a WAN environment d is larger. Assuming 100 Km, a is larger by a factor of 103 resulting in an efficiency of 0.36, 0.05, and 0.005
respectively for 10 Mbps, 100 Mbps, and 1 Gbps transmission rates. In the case of 10 Mbps transmission rate the efficiency of CSMA-CD is close to the efficiency of
ALOHA but in the other two cases it is much less than ALOHA.

3a) ] The delay is: 104km · 103m/km 2.5 · 108m/s = 0.04s. Therefore the bandwidth-delay product is: 1Mbps · 0.04s = 40, 000 bits.
b)When a new connection starts, the sequence number is set to a random
value, to help avoid interference between successive incarnations
of the same connection. As a result, the sequence number can wrap
around after only a few packets, if you happen to start with a
number close to ffff ffff.
If we were able to use all 32-bits of the timestamp, we would multiply the wraparound time by 4 billion. But since the timestamp clicks 1000 times per cycle,
c)
we only get a factor of 4 million, so the new wraparound time is about 92 million minutes, which is about 174 years.

You might also like