15.7 Static Routes

     

Routing is important in order for our packets to reach and return from their destination. If we do not set it up correctly, we can run the risk of building inefficiencies into our network. Look at the example in Figure 15-2.

Figure 15-2. Basic routed network.

graphics/15fig02.jpg


The routing protocols themselves are relatively efficient. The client ( client1 ) has a default route to router2 . In turn , router2 has various static routes entered into its routing table, possibly including a route to Network3 via router1 . router2 also has a default route via the site-wide gateway , which has a direct connection between Network1 and Network4 . The routing protocols allow for the site-wide gateway to send an ICMP redirect message to client1 to add a new route to its routing table to Network4 via the site-wide gateway . Let's get one thing straight here. The ICMP redirect sent by the site-wide gateway updates the routing table on client1 ; this is known as a dynamic route, and it is signified by a D flag in the output from netstat “r . Frequently, when we are talking about dynamic routing, more often than not we will be referring to the routing daemon gated and not to dynamic updates via ICMP redirect . In the example in Figure 15-2, we are talking about having static routes configured into our routing table. In Chapter 16, we look at configuring the routing daemon gated to dynamically change entries in our routing table.

Let's look at a simple example where we have static routes configured into our routing table and a static route fails. What happens when a static route fails? In our simple example, we will have a network configured as depicted in Figure 15-3.

Figure 15-3. Simplified example of static routes.
graphics/15fig03.jpg

We can configure individual routes to individual networks as well as a default route that will be our exit point from our network, to all other networks not previously defined. In the example in Figure 15-3, we could configure the gateways listed as the default route for the respective nodes or list individual routes; however, with static routes this has limitations, as we see. The nodes hpeos003 and hpeos004 in Figure15-3 are said to be multi- homed hosts because they have at least two network interfaces that are configured on two separate subnets. These nodes will be acting as our routers. When routers are interconnected in a large network, they can also have static routes defined. In a complex network, this can become cumbersome to maintain and manage. Consequently, we commonly use the routing daemon gated in such a situation. We discuss gated and dynamic routing in the next chapter.

It is a good idea to have some form of plan in your new network design as in Figure 15-3. If we forget to perform one step, e.g., configure the static route for node hpeos002 , both nodes will be affected. Packets won't be able to find their way back from the distant machine because a routing table entry will be missing.

Before we proceed with this global configuration change on all affected machines in the network, you should also remember that such a change would probably require a re-cabling of major parts of your network infrastructure.

With our IP address, subnet mask, and static routes in place, we can now configure /etc/rc.config.d/ netconf to apply this new configuration.



HP-UX CSE(c) Official Study Guide and Desk Reference
HP-UX CSE(c) Official Study Guide and Desk Reference
ISBN: N/A
EAN: N/A
Year: 2006
Pages: 434

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net