Wednesday, March 23

Computer Network Questions and Answers

1. The IP datagram for a TCP ACK message is 40 bytes long: It contains 20 bytes of TCP header and 20 bytes of IP header. Assume that this ACK is traversing an ATM network that uses AAL5 to encapsulate IP packets. How many ATM layer packets will it take to carry the ACK for each of AAL layer?
a. AAL5
b. AAL3/4
a)) The length of the AAL5 CS-PDU into which the ACK is encapsulated is exactly 48 bytes, and this fits into a single ATM cell.
b)) When AAL3/4 is used the CS-PDU is again 48 bytes, but now the per-cell payload is only 44 bytes and two cells are necessary.

2. Suppose there are N stations on a LAN that has capacity (transmission rate) C. All packets have a fixed length L and the end-to-end propagation delay of the channel is P. If only one station ever has a message to send (i.e., the other N-1 stations generate no traffic). What is the maximum possible throughput seen by this single node under each of the protocols:
Assuming that the station senses the channel immediately after finishing its transmission, and finding it idle, sends another packet, the throughput is C. Note that this ignores the overhead time needed to do channel sensing.

b. Slotted Aloha
Assuming the station always has data to send, it will always to do under slotted Aloha, so the throughput would be C.

c. Token Passing
After sending a message, a station gives up the token. The token circulates around the ring (taking time P). Assuming that L is the amount of time needed to transmit a message, the throughput is thus (L/(L+PC))*C.

3. Consider sending a 1500-byte datagram into a link that has an MTU of 500 bytes. Suppose the original datagram is stamped with the identification number 1. Assume that IPv4 is used.
a. Where does fragmentation happen? Where are the fragments reassembled?
Fragmentation happens in the router preceding the link with the small MTU. The fragments are reassembled in the end system.

b. How many fragments are generated?
The maximum size of the data field in each fragment = 480 (because there are 20 bytes IP header). Thus the number of required fragments= 1500-20/480 = 4

c. What are the values of the fragmentation-related fields in the generated IP datagram(s)?
Each fragment will have an identical identification number. Each fragment except the last one will be of size 500 bytes (including the IP header). The last datagram will be of size 60 bytes (including the IP header). The offsets of the 4 fragments will be 0, 60, 120, 180. Each of the first 3 fragments will have flag=1; the last fragment will have flag=0.

d. What changes if IPv6 were used?
The router preceding the link with the small MTU will drop the packet and send an ICMP error message “Packet Too Big” back to the source. The source is responsible for adjusting the packet size.

4. Consider building a CSMA/CD network running at 1 Gbps over a 1-km cable with no repeaters. The signal speed in the cable is 200,000 km/sec. What is the minimum frame size?
For a 1-km cable, the one-way propagation time is 5 μsec, so 2τ = 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

5. In the CSMA/CD protocol, what condition on the transmission delay Ttrans and the propagation delay Tprop has to be satisfied to guarantee that a node always detects a collision?
ANS Ttrans>2Tprop

6. At low load, consider the delay of pure ALOHA versus slotted ALOHA. Which one is less? Explain your answer.
ANSWith pure ALOHA, transmission can start instantly. At low load, no collisions are expected so the transmission is likely to be successful. With slotted ALOHA, it has to wait for the next slot. This introduces half a slot time of delay.

No comments: