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 36–40 of 74
Every host in an IPv4 network has a 1-second resolution real-time clock with battery backup. Each host needs to generate up to 1000 unique identifiers per second. Assume that each host has a globally unique IPv4 address. Design a 50-bit globally unique ID for this purpose. After what period (in seconds) will the identifiers generated by a host wrap around?
Answer: 256
Go through the parts of the ID:
- IPv4 address (for global uniqueness): 32 bits
- Up to 1000 IDs in each second: 10 bits needed ()
- Bits left for the clock: 50 32 10 = 8 bits
The clock part wraps around after seconds.
Answer: 256
- IPv4 address (for global uniqueness): 32 bits
- Up to 1000 IDs in each second: 10 bits needed ()
- Bits left for the clock: 50 32 10 = 8 bits
The clock part wraps around after seconds.
Answer: 256
An IP router with a Maximum Transmission Unit (MTU) of 1500 bytes has received an IP packet of size 4404 bytes with an IP header of length 20 bytes. The values of the relevant fields in the header of the third IP fragment generated by the router for this packet are
Answer: (A)
Find the data size: 4404 20 = 4384 B. Each fragment can carry at most 1480 B of data (a multiple of 8).
- Fragment 1: carries 1480 B, offset 0
- Fragment 2: carries 1480 B, offset 185
- Fragment 3: carries 4384 2960 = 1424 B, offset is 2960 / 8 = 370. It is the last fragment, so MF = 0
Datagram length = 1424 + 20 = 1444
Answer: MF bit: 0, Datagram Length: 1444, Offset: 370
- Fragment 1: carries 1480 B, offset 0
- Fragment 2: carries 1480 B, offset 185
- Fragment 3: carries 4384 2960 = 1424 B, offset is 2960 / 8 = 370. It is the last fragment, so MF = 0
Datagram length = 1424 + 20 = 1444
Answer: MF bit: 0, Datagram Length: 1444, Offset: 370
In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is 300. The position of the datagram, the sequence numbers of the first and the last bytes of the payload, respectively are
Answer: (C)
Let us go through each point:
- The M bit is 0 and the offset is 0 so it is the last fragment.
- The first byte is 300 8 = 2400.
- The header is 10 4 = 40 B. The data is 400 40 = 360 B.
- The last byte is 2400 + 360 1 = 2759.
Answer: Last fragment, 2400 and 2759
- The M bit is 0 and the offset is 0 so it is the last fragment.
- The first byte is 300 8 = 2400.
- The header is 10 4 = 40 B. The data is 400 40 = 360 B.
- The last byte is 2400 + 360 1 = 2759.
Answer: Last fragment, 2400 and 2759
Assume that source S and destination D are connected through two intermediate routers labeled R. Determine how many times each packet has to visit the network layer and the data link layer during a transmission from S to D.
Answer: (C)
Let us check each layer:
- Network layer: S, both routers and D each use it once, so 4 times
- Data link layer: S sends (1), each router receives and sends (2 each, so 4), D receives (1). Total = 1 + 4 + 1 = 6 times
Answer: Network layer 4 times and Data link layer 6 times
- Network layer: S, both routers and D each use it once, so 4 times
- Data link layer: S sends (1), each router receives and sends (2 each, so 4), D receives (1). Total = 1 + 4 + 1 = 6 times
Answer: Network layer 4 times and Data link layer 6 times
An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: 245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?
Answer: (A)
The block 245.248.128.0/20 spans third octet values 128 to 143 (4096 addresses).
- Half of it is 2048 addresses, a /21 block. A /21 is 8 wide and must start at a multiple of 8: 128 to 135 or 136 to 143.
- A quarter is 1024 addresses, a /22 block. A /22 is 4 wide and starts at a multiple of 4: 128, 132, 136 or 140.
- The two blocks must not overlap.
- (A) A = 245.248.136.0/21 (136 to 143), B = 245.248.128.0/22 (128 to 131). Sizes are right, both are aligned, and they do not overlap. Valid.
- (B) A = 128.0/21 (128 to 135) already contains B = 128.0/22 (128 to 131). They overlap.
- (C) A is given a /22, not a /21, and B = 132.0/21 does not start at a multiple of 8, so it is not a valid block.
- (D) A is given a /24, not a /21, and B = 132.0/21 again does not start at a multiple of 8.
Answer: (A)
- Half of it is 2048 addresses, a /21 block. A /21 is 8 wide and must start at a multiple of 8: 128 to 135 or 136 to 143.
- A quarter is 1024 addresses, a /22 block. A /22 is 4 wide and starts at a multiple of 4: 128, 132, 136 or 140.
- The two blocks must not overlap.
- (A) A = 245.248.136.0/21 (136 to 143), B = 245.248.128.0/22 (128 to 131). Sizes are right, both are aligned, and they do not overlap. Valid.
- (B) A = 128.0/21 (128 to 135) already contains B = 128.0/22 (128 to 131). They overlap.
- (C) A is given a /22, not a /21, and B = 132.0/21 does not start at a multiple of 8, so it is not a valid block.
- (D) A is given a /24, not a /21, and B = 132.0/21 again does not start at a multiple of 8.
Answer: (A)
Keep practising
Topics in Computer Networks
OSI LayerPhysical LayerData Link Layer
Network Layer ProtocolYou are here
Transport Layer ProtocolApplication Layer ProtocolsNetwork Security