2,004 views
0 votes
0 votes

An IPv4 packet has arrived with the first few hexadecimal digits as shown.
Ox45000028000100000102 ...
How many hops can this packet travel before being dropped? The data belong to what upper-layer
protocol?
Solution
To find the time-to-live field, we skip 8 bytes (16 hexadecimal digits). The time-to-live field is the
ninth byte, which is 01. This means the packet can travel only one hop. The protocol field is the
next byte (02), which means that the upper-layer protocol is IGMP

Why to skip 8 bytes????Please Explain
 

1 Answer

0 votes
0 votes

If you consider the IPV4 datagram header format, the time-to-live field comes after the following fields:

  1. version(4 bits)
  2. HLEN(4 bits)
  3. TOS(8 bits)
  4. Total length(16 bits)
  5. Identification(16 bits)
  6. Flags(3 bits)
  7. Fragmentation offset(13 bits)

If you calculate,this sums up t0 (4+4+8+16+16+3+13)bits = 8 bytes. Therefore, we skip the first 8 bytes of the IPV4 packet.

Related questions

0 votes
0 votes
1 answer
3