TTL, Protocol & IPv4 Checksum MCQs: 12 Solved Questions with Explanations

Solve 12 published IPv4 questions covering TTL, Protocol, IHL, checksum position, CRC, NAT and hop counting. Each answer includes a fresh, step-by-step explanation.

KnowledgeGate Team

Exam prep & CS education

Updated 20 Sep 20268 min read

TTL, Protocol and Header Checksum occupy neighbouring bytes in an IPv4 header, so recall questions can become byte-position, hexadecimal or hop-count traps. Nine items are MCQs, one is an MSQ and two are NAT questions. Answer before opening each explanation, then verify both key and reason. Use the set with the wider GATE CS Exam Preparation plan before revising the full network layer.

TTL, Protocol and Header Checksum: the 90-second map

In the IPv4 header, using 1-based byte positions, byte 9 is TTL, byte 10 is Protocol, and bytes 11-12 are Header Checksum. A router reduces TTL before forwarding and discards the datagram when the value expires. Protocol identifies the encapsulated next-layer payload. The IPv4 checksum protects the header, while Ethernet uses a Frame Check Sequence based on CRC.

Decode 45 00 00 54 00 03 00 00 20 06 by position. Byte 9 is 0x20, so TTL is 2 x 16 + 0 = 32. Byte 10 is 0x06, which identifies TCP. Do not read the nearby Protocol byte as the hop budget.

For a small one's-complement example, add three 16-bit words:

  1. 0x4500 + 0x003C = 0x453C

  2. 0x453C + 0x1C46 = 0x6182

  3. Complement all 16 bits of 0x6182 to get 0x9E7D

  4. At the receiver, 0x6182 + 0x9E7D = 0xFFFF

A real IPv4 header checksum covers every 16-bit word in the header, not only three selected words. The order matters: position the field, decode its value, and only then calculate before accepting any option confidently. For more IPv4 byte and address practice, continue with Subnetting MCQs: 12 Solved IP Addressing Questions.

An IPv4 header decoded into bytes and 16-bit words, with TTL 0x20 (32), Protocol 0x06 (TCP), and the header-checksum word marked.

TTL MCQs 1-3: why the field exists

Question 1 (IBPS 2025)

To prevent infinite looping of packets in a network, which field in the IPv4 header is decremented at each router?

  • A. TTL

  • B. Hop Limit

  • C. Fragment Offset

  • D. Sequence Number

  • E. None of the above

Correct answer: A. TTL.

B, Hop Limit, is tempting because it decrements once per hop in IPv6, but the stem asks about the IPv4 header, where the field is called TTL. Fragment Offset and Sequence Number do not name this IPv4 hop-limit field.

Question 2 (TPSC 2024, Computer Science, Senior Computer Assistant)

For which one of the following reasons does Internet Protocol (IP) use the Time-to-Live (TTL) field in the IP datagram header?

  • A. Ensure packets reach destination within that time.

  • B. Discard packets that reach later than that time.

  • C. Prevent packets from looping indefinitely.

  • D. Limit the time for which a packet gets queued in intermediate routers.

Correct answer: C. Prevent packets from looping indefinitely.

The name Time-to-Live invites you to read TTL as a clock, but it counts hops, not seconds. So neither a within-that-time delivery deadline nor a queued-time limit describes what TTL does.

Question 3 (GATE 2010)

One of the header fields in an IP datagram is the Time to Live (TTL) field. Which of the following statements best explains the need for this field?

  • A. It can be used to prioritize packets

  • B. It can be used to reduce delays

  • C. It can be used to optimize throughput

  • D. It can be used to prevent packet looping

Correct answer: D. It can be used to prevent packet looping.

TTL is a correctness bound that caps how far a datagram travels when routing fails to converge. It is not a quality-of-service lever, so it does nothing for priority, delay or throughput.

Questions 4-6: TTL statements, IHL validity and CRC versus checksum

Question 4

Consider the following statements about the Time to Live (TTL) field in an IP datagram:
(i) TTL is used to prioritize packets.
(ii) TTL is used to prevent packet looping.
Which statement is not true?

  • A. Only (i)

  • B. Only (ii)

  • C. Both (i) and (ii)

  • D. None of the above

Correct answer: A. Only (i).

Statement (i) is false because TTL is not a priority field. Statement (ii) is true because the decreasing count terminates looping packets. Only (i) is not true.

Question 5 (ISRO 2014, Computer Science)

An IP packet has arrived with the first 8 bits as 0100 0010. Which of the following is correct?

  • A. The number of hops this packet can travel is 2.

  • B. The total number of bytes in header is 16 bytes

  • C. The upper layer protocol is ICMP

  • D. The receiver rejects the packet

Correct answer: D. The receiver rejects the packet.

0100 is version 4 and 0010 is IHL 2. Since IHL counts 32-bit words, 2 x 4 = 8 bytes, below IPv4's minimum IHL 5 or 20 bytes, so the malformed packet is rejected; this nibble is neither TTL nor Protocol.

Question 6 (GATE 2006, Information Technology)

Which of the following statements is TRUE?

  • A. Both Ethernet frame and IP packet include checksum fields

  • B. Ethernet frame includes a checksum field and IP packet includes a CRC field

  • C. Ethernet frame includes a CRC field and IP packet includes a checksum field

  • D. Both Ethernet frame and IP packet include CRC fields

Correct answer: C. Ethernet frame includes a CRC field and IP packet includes a checksum field.

Ethernet carries a CRC-based Frame Check Sequence in its trailer. IPv4 uses a 16-bit one's-complement checksum covering only its header; IPv6 has no equivalent header checksum.

Questions 7-9: locate the checksum, decode TTL and recognise a repeated PYQ

Question 7

Consider the following IP header (hexadecimal format) from a packet received at the destination:
“4500 003C IC46 4000 4006 B1E6 AC10 0A63 AD10 0A0C”
Which value is in the Header Checksum field?

  • A. 4006

  • B. B1E6

  • C. AC10

  • D. AD10

Correct answer: B. B1E6.

The Header Checksum occupies bytes 11-12, the sixth 16-bit word, so the field contains B1E6. The token IC46 contains a non-hexadecimal character, which prevents an end-to-end checksum calculation from the printed header.

Question 8 (UGC NET 2023, Computer Science)

An IP datagram has arrived with the following partial header in hexadecimal:
45000054000300002006……
How many more routers can the packet travel to?

  • A. 22

  • B. 26

  • C. 30

  • D. 32

Correct answer: D. 32.

Group the prefix as 45 | 00 | 00 54 | 00 03 | 00 00 | 20 | 06. Byte 9 is TTL, and 0x20 = 2 x 16 + 0 = 32; byte 10 is Protocol 06. Therefore, the packet can travel 32 more router hops.

Question 9 (GATE 2006, Computer Science)

For which one of the following reasons does Internet Protocol (IP) use the time-to-live (TTL) field in the IP datagram header?

  • A. Ensure packets reach destination within that time

  • B. Discard packets that reach later than that time

  • C. Prevent packets from looping indefinitely

  • D. Limit the time for which a packet gets queued in intermediate routers.

Correct answer: C. Prevent packets from looping indefinitely.

Questions 2 and 9 are separate records from TPSC 2024 and GATE 2006 with the same stem and options. Both keys are C: TTL prevents indefinite looping; it is not a delivery deadline or queue timer. To separate TTL from transport-layer timers, revise TCP and UDP MCQs: 12 Solved Transport Layer Questions.

Questions 10-12: topology counting, NAT changes and a local-network boundary

Question 10 (GATE 2014, Computer Science, Set 2, NAT)

In the diagram shown below, L1 is an Ethernet LAN and L2 is a Token-Ring LAN. An IP packet originates from sender S and traverses to R, as shown. The links within each ISP and across the two ISPs, are all point-to-point optical links. The initial value of the TTL field is 32. The maximum possible value of the TTL field when R receives the datagram is _______.

Question 10 topology: sender S on Ethernet LAN L1 reaching receiver R on Token-Ring LAN L2 through two ISPs, with each router along the path decrementing TTL by one before forwarding.

Correct answer: 26.

Count only the routers. The shortest path from S to R crosses six routers, and each router decrements TTL by one before forwarding, so R receives the datagram with 32 - 6 = 26. The destination host R and the lower-layer LAN devices never decrement TTL.

Question 11 (GATE 2024, Computer Science, Set 1, MSQ)

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?

  • A. Source IP

  • B. Destination IP

  • C. Header Checksum

  • D. Total Length

Correct answer: A and C, Source IP and Header Checksum.

Outbound NAT replaces the private source IP with its mapped public source IP. That header change requires a new Header Checksum; Destination IP and Total Length remain unchanged, while any port translation occurs in the transport header.

Question 12 (NAT)

If Host A broadcasts a message to its local network of 10 hosts, what is the minimum TTL value that allows local delivery but prevents the packet from leaving that network?

Correct answer: 1.

With TTL 1, the datagram reaches every host on the local link, but any router attempting to forward it off-network decrements TTL to 0 and discards it, making 1 the smallest value that permits local delivery while preventing the packet from leaving the local network. The number of hosts is irrelevant to the TTL value.

IPv4 field-location checklist before you submit

Field or clue

Decisive rule

Questions

TTL, byte 9

Decrement once per router; zero stops forwarding

1-4, 8-10, 12

IHL, low nibble

Count 32-bit words; valid IPv4 starts at 5

5

Ethernet trailer

FCS uses CRC; IPv4 uses a one's-complement header checksum

6

Header Checksum, bytes 11-12

Use the sixth 16-bit word; recalculate after NAT rewrites the source

7, 11

Response type

MCQ takes one label, MSQ every valid label, NAT a number

1-9, 11; 10, 12

For Question 7, IC46 is not valid hexadecimal, so the printed header supports field location but not a complete checksum sum. Question 11 needs A and C; Questions 10 and 12 need numeric values.

IPv4 header reconstruction: the next practice step

Draw twelve byte boxes. Label 9 as TTL, 10 as Protocol and 11-12 as Header Checksum, then add IHL in the first byte. Use that map for Questions 5, 7 and 8; on a separate route sketch, count only routers for Questions 10 and 12.

For structured GATE subject preparation, use GATE Guidance by Sanchit Sir. For Computer Networks alongside other placement-focused core CS subjects, use CS Fundamentals for Placements by Sanchit Sir. Then write the IPv4 byte positions 9, 10, 11-12 from memory and attempt the set again.