CH 20
CH 20
examp
note
info
Internet
le
Protocol
INTERN
ETWOR
KING In this section, we discuss internetworking,
connecting networks together to make an
internetwork or an internet.
examp
note
info
le
note
info
le
note
info
le
note
info
le
note
info
le
note
info
Switching at the network layer in the Internet
le
note
info
Communication at the network layer in the
le
Internet is connectionless.
note
info
Communication at the network layer in the
le
Internet is connectionless.
Datagram
Fragmentation
Checksum
Options
examp
note
info
le
note
info
le
note
info
le
note
info
The precedence subfield was part of version 4,
le
note
info
le
Types of service
note
info
le
note
info
le
note
info
The total length field defines the total length of
le
note
info
le
note
info
le
note
info
le
Protocol values
examp
note
info
le
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.
In an IPv4 packet, the value of HLEN is 1000 in
binary. How many bytes of options are being carried
by this packet?
examp
note
info
le
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.
In an IPv4 packet, the value of HLEN is 5, and the
value of the total length field is 0x0028. How many
bytes of data are being carried by this packet?
examp
note
info
le
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).
An IPv4 packet has arrived with the first few
hexadecimal digits as shown.
0x45000028000100000102 . . .
How many hops can this packet travel before being
dropped? The data belong to what upper-layer
examp
note
protocol?
info
le
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.
An IPv4 packet has arrived with the first few
hexadecimal digits as shown.
0x45000028000100000102 . . .
How many hops can this packet travel before being
dropped? The data belong to what upper-layer
examp
note
protocol?
info
le
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 Maximum
can transfer unit (MTU)
travel only one hop. The
protocol field is the next byte (02), which means that
the upper-layer protocol is IGMP.
note
info
le
note
info
le
note
info
le
Fragmentation example
note
info
le
examp
note
info
le
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.
A packet has arrived with an M bit value of 1. Is this
the first fragment, the last fragment, or a middle
fragment? Do we know if the packet was
fragmented?
examp
note
info
le
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).
A packet has arrived with an M bit value of 1 and a
fragmentation offset value of 0. Is this the first
fragment, the last fragment, or a middle fragment?
examp
note
info
le
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.
A packet has arrived in which the offset value is 100.
What is the number of the first byte? Do we know
the number of the last byte?
examp
note
info
le
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.
A packet has arrived in which the offset value is 100,
the value of HLEN is 5, and the value of the total
length field is 100. What are the numbers of the first
byte and the last byte?
examp
note
info
le
Solution
The first byte number is 100 × 8 = 800. The total
length is 100 bytes, and the header length is 20
bytes (5 × 4), which means that there are 80 bytes
in this datagram. If the first byte number is 800, the
last byte number must be 879.
A packet has arrived in which the offset value is 100,
the value of HLEN is 5, and the value of the total
length field is 100. What are the numbers of the first
byte and the last byte?
examp
note
info
le
Solution
The first byte number is 100 × 8 = 800. The total
length is 100 bytes, and the header length is 20
bytes (5 × 4), which means that there are 80 bytes
in this datagram. If the first byte number is 800, the
last byte number must be 879.
note
info
le
note
info
unsuitable for the fast-growing Internet.
le
Advantages
Packet Format
Taxonomy of options in IPv4
Extension Headers
examp
note
info
le
note
info
le
note
info
le
note
info
le
note
info
le
note
info
le
note
info
le
note
info
transition must be smooth to prevent any
le
Dual Stack
Tunneling
Comparison between IPv4 options and IPv6 extension headers
Header Translation
examp
note
info
le
note
info
le
Dual stack
note
info
le
Tunneling strategy
note
info
le
note
info
le
Header translation