Chapter 2. Host Routing

“Seems like an awful lot just to get a packet from one side of the room to the other.”

An anonymous networking student

Chapter 1 discussed several of the issues associated with forwarding traffic across a network. Communication flows from one host to another (usually a server of some kind) and then back again. Switch source address and router routing tables are critical to this process. But, no matter what the purpose of the transmission, several operations must take place before packets can enter the network, beginning with the host routing table. Integrated ideas include masking, address resolution, and default gateways.

The Decision Process

From the moment a source host generates a chunk of data for transmission, work begins that will eventually result in an Ethernet frame being transmitted. From the application layer on down, the data is encapsulated in a series of headers until it reaches the bottom of the protocol stack. For example, accessing a web page uses the hypertext transfer protocol (HTTP) to move information between the web server and the host. HTTP uses the transmission control protocol (TCP) at Layer 4 followed by IP and then Ethernet or 802.11. If we assume Ethernet, the encapsulated data would look like that seen in Figure 2-1.

Figure 2-1. Encapsulation

As the encapsulation nears completion, the source and destination MAC addresses have to be filled ...

Get Packet Guide to Routing and Switching now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.