Home > Articles > Networking > Routing & Switching

  • Print
  • + Share This
This chapter is from the book

3.4 Static Routing

Although dynamic routing protocols are widely used now, many networks still use static routing. It is effective when networks have stable topology and don't need real-time adaptation. In static routing, the administrator configures routers with all the information necessary for successful packet forwarding. The administrator constructs the routing table in every router by putting in the entries for every network that could be a destination.

In connecting a branch office to the central site, for example, static routing does everything needed for hosts on the central and remote networks to communicate (Figure 3-4). The administrator can just add static routes to the routers in the central and the remote offices, saying that respective networks are accessible via the corresponding routers. This arrangement doesn't demand a dynamic routing protocol, as neither site cares about the specific subnets behind the routers and there's no redundancy in the topology. Router R1 needs to know only that it must send packets to router R2 to reach any host in the remote office, no matter what IP subnet the host is in. R2, in turn, needs to know only that all hosts in the central office's network can be reached via router R1. Note, however, that if more routers were in the central or the remote network, they would also need to be configured with corresponding static routes.

Figure 3-4. Use of static routes—simple example

The next example, closer to real life, is a hub-and-spoke topology, with multiple remote branches connected to the central site, which is connected to another, newly acquired company's network (see Figure 3-5). The addressing scheme used in this example is a bit more realistic: Remote offices are assigned subnet numbers from major network 10.0.0.0. The central site also contains subnet 10.9.0.0, to which the global resources are connected.

Figure 3-5. Static routes—hub-and-spoke topology

As you see in Figure 3-5, every router is configured with static routes that define which router should be used as the next hop to move the packet to the destination network. The routers in the remote offices have information that their local subnets are reachable via the interfaces connected to them and that all other parts of network 10.0.0.0 can be accessed via router R1. This route is called a summary route. Use of a summary route means that it doesn't matter which specific subnets are there, and packets destined for any subnet of the major network can be sent through router R1. The same principle works for other major networks—in this case, network 30.0.0.0. Routers can have only summary routes for them.

Let's take a more careful look at the routes to network 30.0.0.0 in R2 and R1. Both routers have routes to it, illustrating the first and second routing rules given in Section 3.2. Every router along the path to a destination must have adequate routing information. Router R0 in network 30.0.0.0 demonstrates the third rule: Every router must have information about the return path. For this reason, a static route to major network 10.0.0.0 was added to R0's routing table. Without it, R0 would drop the packets going back from 30.0.0.0.

In general, when configuring a static route, the administrator explicitly or implicitly specifies the next-hop address and the outgoing interface to be used to reach a certain network. If a static route is configured specifying only the address of the next router, this is the next hop, configured explicitly, and the outgoing interface is determined by the recursive routing table lookup operation. If a static route points to a certain router's interface, the interface is explicitly specified, and another step is taken to find the next-hop address (see Chapter 4).

As you can see, the larger the network, the more difficult it is to control. The administrator must be very careful while configuring static routes, as it is easy to create a routing loop. This can happen because when a static route is configured, there is no way for the router to check and see whether the destination network is really behind the specified next hop. Dynamic routing is not a panacea for this problem—it can also experience temporary routing loops in transition periods—but dynamic routing protocols are based on the algorithms that guarantee convergence of the network within a finite period of time.

  • + Share This
  • 🔖 Save To Your Account