13.1. Packet forwarding: a closer look

Before we jump into the management of routing tables, let’s take a more detailed look at how the tables are used. Consider the network shown in Exhibit A.

Figure A. Example network

image

Router R1 connects the two networks, and router R2 connects one of the nets to the outside world. (For now, we assume that R1 and R2 are Linux computers rather than dedicated routers.) Let’s look at some routing tables and some specific packet forwarding scenarios. First, host A’s routing table:

A$ netstat -rnKernel IP routing tableDestination    Gateway         Genmask        Flags MSS  Window  irtt  Iface199.165.145.0  0.0.0.0         255.255.255.0  U       0  0          0  eth0 ...

Get Linux Administration Handbook, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.