Network Layer Protocol · Computer Networks
74 questions · asked in 23 of 27 years (2000–2026)
MCQ 54 · MSQ 7 · NAT 131-mark 44 · 2-mark 30
2000Questions per year2026
Questions 6–10 of 74
A machine receives an IPv4 datagram. The protocol field of the IPv4 header has the protocol number of a protocol X.
Which ONE of the following is NOT a possible candidate for X?
Which ONE of the following is NOT a possible candidate for X?
Answer: (D)
The protocol field in the IPv4 header tells which higher-layer protocol the datagram carries. It uses standard registered numbers. These are: ICMP , IGMP , OSPF . All three work directly on top of IP, and each has its own protocol number.
RIP is different. It is not carried directly by IP. It is an application-layer protocol that works over UDP (UDP port ). So an IP datagram with RIP traffic has the protocol field set to the UDP number (). It never has a separate "RIP" protocol number.
Answer: Routing Information Protocol (RIP)
RIP is different. It is not carried directly by IP. It is an application-layer protocol that works over UDP (UDP port ). So an IP datagram with RIP traffic has the protocol field set to the UDP number (). It never has a separate "RIP" protocol number.
Answer: Routing Information Protocol (RIP)
Consider a network that uses Ethernet and IPv4. Assume that IPv4 headers do not use any options field. Each Ethernet frame can carry a maximum of 1500 bytes in its data field. A UDP segment is transmitted. The payload (data) in the UDP segment is 7488 bytes.
Which ONE of the following choices has the CORRECT total number of fragments transmitted and the size of the last fragment including IPv4 header?
Which ONE of the following choices has the CORRECT total number of fragments transmitted and the size of the last fragment including IPv4 header?
Answer: (D)
An Ethernet frame can carry at most bytes in its data field. The IPv4 header bytes (no options). So each fragment can hold at most this much IP data: bytes. This is already a multiple of , so no more rounding is needed.
The UDP segment has a header of bytes payload of bytes, giving bytes. This becomes the data of the IP datagram, and it has to be fragmented:
. So there are full fragments of bytes each ( bytes in all), and one last fragment with bytes of data.
Total number of fragments: . The last fragment's total size, with its own -byte IP header, bytes.
Answer: 6 fragments, 116 bytes
The UDP segment has a header of bytes payload of bytes, giving bytes. This becomes the data of the IP datagram, and it has to be fragmented:
. So there are full fragments of bytes each ( bytes in all), and one last fragment with bytes of data.
Total number of fragments: . The last fragment's total size, with its own -byte IP header, bytes.
Answer: 6 fragments, 116 bytes
Which of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal network to an external network?
One or more options are correct.
Answer: (A), (C)
When a packet goes out, NAT swaps the private source IP (and the port) for its own public IP.
One header field has changed, so the header checksum has to be calculated again.
The destination IP stays the same, because it is the outside server. The total length also stays the same, because the payload size has not changed.
Answer: Source IP, Header Checksum
One header field has changed, so the header checksum has to be calculated again.
The destination IP stays the same, because it is the outside server. The total length also stays the same, because the payload size has not changed.
Answer: Source IP, Header Checksum
Consider the entries shown below in the forwarding table of an IP router. Each entry consists of an IP prefix and the corresponding next hop router for packets whose destination IP address matches the prefix. The notation "" in a prefix indicates a subnet mask with the most significant bits set to 1.
This router forwards 20 packets each to 5 hosts. The IP addresses of the hosts are 10.1.1.16, 10.1.1.72, 10.1.1.132, 10.1.1.191, and 10.1.1.205. The number of packets forwarded via the next hop router is
This router forwards 20 packets each to 5 hosts. The IP addresses of the hosts are 10.1.1.16, 10.1.1.72, 10.1.1.132, 10.1.1.191, and 10.1.1.205. The number of packets forwarded via the next hop router is
Answer: 40
Apply the longest prefix match rule. The last byte range of each prefix is:
/24 0-255 (R1), .128/25 128-255 (R2), .64/26 64-127 (R3), .192/26 192-255 (R4).
- 10.1.1.16 matches only /24 R1
- 10.1.1.72 matches /26 (64-127) R3
- 10.1.1.132 matches /25 R2
- 10.1.1.191 matches /25 (it is not in 192-255) R2
- 10.1.1.205 matches /26 (192-255) R4
R2 gets 2 hosts 20 packets each .
Answer: 40
/24 0-255 (R1), .128/25 128-255 (R2), .64/26 64-127 (R3), .192/26 192-255 (R4).
- 10.1.1.16 matches only /24 R1
- 10.1.1.72 matches /26 (64-127) R3
- 10.1.1.132 matches /25 R2
- 10.1.1.191 matches /25 (it is not in 192-255) R2
- 10.1.1.205 matches /26 (192-255) R4
R2 gets 2 hosts 20 packets each .
Answer: 40
Consider sending an IP datagram of size 1420 bytes (including 20 bytes of IP header) from a sender to a receiver over a path of two links with a router between them. The first link (sender to router) has an MTU (Maximum Transmission Unit) size of 542 bytes, while the second link (router to receiver) has an MTU size of 360 bytes. The number of fragments that would be delivered at the receiver is _____
Answer: 6
The datagram carries bytes of data. Every fragment except the last must carry data in a multiple of 8.
Link 1 (MTU 542): Largest data size take 520. The fragments are 520, 520, 360.
Link 2 (MTU 360): Largest data size take 336.
- 520 336 + 184
- 520 336 + 184
- 360 336 + 24
The fragments are put back together only at the receiver. So the receiver gets fragments.
Answer: 6
Link 1 (MTU 542): Largest data size take 520. The fragments are 520, 520, 360.
Link 2 (MTU 360): Largest data size take 336.
- 520 336 + 184
- 520 336 + 184
- 360 336 + 24
The fragments are put back together only at the receiver. So the receiver gets fragments.
Answer: 6
Keep practising
Topics in Computer Networks
OSI LayerPhysical LayerData Link Layer
Network Layer ProtocolYou are here
Transport Layer ProtocolApplication Layer ProtocolsNetwork Security