Network Layer
The data link layer makes the hop between two adjacent nodes reliable, but a network spans hundreds or thousands of devices. This chapter widens the view to the scale of the Internet as a whole: once a packet leaves the source host, which path should it take to reach the destination host?
The core mechanism is packet forwarding and routing. The IP address provides global identification, and a router forwards a packet hop by hop according to the destination address: each router only needs to know where the next hop is, not the whole map. This distributed decision is what allows the Internet to scale.
The chapter starts with IP addressing and subnetting. An address is not merely a number: a subnet mask separates the network part from the host part, and this is the basis for understanding every addressing problem. It then covers routing algorithms, from distance vector (RIP) to link state (OSPF), comparing their convergence speed and overhead characteristics. Next comes the structure of the IPv4 datagram and the fragmentation problem — why the IPv4 maximum transmission unit costs efficiency. Finally, IPv6 is introduced as the way to repair the historical shortcomings of IPv4 with a larger address space, a simpler header, and automatic configuration.
After this chapter you should be able to explain what really separates a router from a switch, and why IP fragmentation is a nuisance.
