Chapter 20 - Network layer: internet protocol. This chapter is devoted to the main protocol at the network layer that supervises and controls the delivery of packets from the source to destination. This protocol is called the Internet Protocol or IP.
Trang 220-1 INTERNETWORKING
In this section, we discuss internetworking, connecting networks together to make an internetwork or an internet.
Need for Network Layer
Internet as a Datagram Network
Internet as a Connectionless Network
Topics discussed in this section:
Trang 320.3
Trang 420.4
Trang 520.5
Trang 620.6
Trang 8Communication at the network layer in
the Internet is connectionless.
Note
Trang 1020.10
Trang 1120.11
Trang 1220.12
Trang 13The precedence subfield was part of
version 4, but never used.
Note
Trang 1420.14
Trang 1520.15
Trang 1620.16
Trang 1820.18
Trang 1920.19
Trang 2020.20
Trang 21Example 20.1
Trang 22In an IPv4 packet, the value of HLEN is 1000 in binary. How many bytes of options are being carried by this packet?
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.2
Trang 23Example 20.3
Trang 24An IPv4 packet has arrived with the first few hexadecimal digits as shown.
time-to-is IGMP.
Example 20.4
Trang 2520.25
Trang 2620.26
Trang 2720.27
Trang 2820.28
Trang 2920.29
Trang 30A packet has arrived with an M bit value of 0. Is this the first fragment, the last fragment, or a middle fragment?
Do we know if the packet was fragmented?
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.5
Trang 31A 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?
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.6
Trang 32A 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?
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.7
Trang 33A 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?
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.8
Trang 34A 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?
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.
Example 20.9
Trang 35Figure 20.13 shows an example of a checksum calculation for an IPv4 header without options. The header is divided into 16bit sections. All the sections are added and the sum is complemented. The result is inserted in the checksum field.
Example 20.10
Trang 3620.36
Trang 3720.37
Trang 3820-3 IPv6
The network layer protocol in the TCP/IP protocol suite is currently IPv4. Although IPv4 is well designed, data communication has evolved since the inception of IPv4 in the 1970s. IPv4 has some deficiencies that make it unsuitable for the fastgrowing Internet.
Advantages
Packet Format
Extension Headers
Topics discussed in this section:
Trang 3920.39
Trang 4020.40
Trang 4120.41
Trang 4220.42
Trang 4320.43
Trang 4420.44
Trang 4520.45
Trang 4620.46
Trang 4720-4 TRANSITION FROM IPv4 TO IPv6
Because of the huge number of systems on the Internet, the transition from IPv4 to IPv6 cannot happen suddenly. It takes a considerable amount of time before every system in the Internet can move from IPv4 to IPv6. The transition must be smooth to prevent any problems between IPv4 and IPv6 systems.
Dual Stack
Tunneling
Header Translation
Topics discussed in this section:
Trang 4820.48
Trang 4920.49
Trang 5020.50
Trang 5120.51
Trang 5220.52