| previous | contents | up | next |
Now that we understand subnets, let us explore how TCP/IP packets eventually get to their destination when the destination is not on the local subnet.
What are Gateways/Routers?
A gateways or a router is a device which connects two or more different subnets. While a simple Linux box with two ethernet interfaces can be used to route TCP/IP traffic, routers are generally specialized devices which are designed specifically to route packets.
Static vs. Dynamic Routing:
There are two ways routing is usually configured on a Unix box: statically or dynamically. Static routes are set using the route command by the initialization scripts during system boot. The most common configuration uses a default gateway to which all traffic not destined for hosts on the local subnet is directed. It is the function of the default gateway to figure out how to route the packets to their destination.
Dynamic routing under Unix means that the routed daemon is running on the system. routed uses the RIP routing protocol (described below) to do dynamic route discovery.
RIP, the Routing Information Protocol:
While there are a number of different routing protocols currently in use, TCP/IP routing inside a domain (i.e. across LANs) is usually handled by what is known as the "Routing Information Protocol" or RIP. RIP works by using the IP broadcast mechanism on the local subnet to get information on how best to route the traffic to its destination. Here is how RIP works in a typical situation (such as this lab):
| previous | contents | up | next |