Data Communication
Data Communication
Solution
There is an error in this packet. The 4 leftmost bits (0100)
show the version, which is correct. The next 4 bits (0010)
show an invalid header length (2 × 4 = 8). The minimum
number of bytes in the header must be 20. The packet has
been corrupted in transmission.
Example 20.2
Solution
The HLEN value is 8, which means the total number of
bytes in the header is 8 × 4, or 32 bytes. The first 20 bytes
are the base header, the next 12 bytes are the options.
Example 20.3
Solution
The HLEN value is 5, which means the total number of
bytes in the header is 5 × 4, or 20 bytes (no options). The
total length is 40 bytes, which means the packet is
carrying 20 bytes of data (40 − 20).
Example 20.4
Solution
To find the time-to-live field, we skip 8 bytes. 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.
Figure 20.9 Maximum transfer unit (MTU)
Table 20.5 MTUs for some networks
Figure 20.10 Flags used in fragmentation
Figure 20.11 Fragmentation example
Figure 20.12 Detailed fragmentation example
Example 20.5
Solution
If the M bit is 0, it means that there are no more
fragments; the fragment is the last one. However, we
cannot say if the original packet was fragmented or not. A
non-fragmented packet is considered the last fragment.
Example 20.6
Solution
If the M bit is 1, it means that there is at least one more
fragment. This fragment can be the first one or a middle
one, but not the last one. We don’t know if it is the first
one or a middle one; we need more information (the
value of the fragmentation offset).
Example 20.7
Solution
Because the M bit is 1, it is either the first fragment or a
middle one. Because the offset value is 0, it is the first
fragment.
Example 20.8
Solution
To find the number of the first byte, we multiply the offset
value by 8. This means that the first byte number is 800.
We cannot determine the number of the last byte unless
we know the length.
Example 20.9
20.33
Figure 20.16 Format of an IPv6 datagram
20.34
Note
19.35
Figure 19.14 IPv6 address in binary and hexadecimal colon notation
19.36
Figure 19.15 Abbreviated IPv6 addresses
19.37
Example 19.11
Solution
We first need to align the left side of the double colon to the
left of the original pattern and the right side of the double
colon to the right of the original pattern to find how many
0s we need to replace the double colon.
19.38
Table 20.6 Next header codes for IPv6
20.39
Table 20.7 Priorities for congestion-controlled traffic
20.40
Table 20.8 Priorities for noncongestion-controlled traffic
20.41
20.42
Table 20.9 Comparison between IPv4 and IPv6 packet headers
20.43