Multiple Default Routes

Team-Fly    

Solaris™ Operating Environment Boot Camp
By David Rhodes, Dominic Butler
Table of Contents
Chapter 13.  Connecting to the Internet


We can also define multiple default routes on the system if we wish. To do this on our system (xenon), we could provide multiple connections to our external facing network interface. While this won't achieve load balancing, the system will "round-robin" between the interfaces (i.e., use one then the other, go back to the first, and so on).

We have already used 172.35.63.50 as the interface to 172.35.63.1. Now let's add the second route as another default route.

The first thing we need to do is add another physical interfacewe will see this as "hme2." After that, we need to create /etc/hostname.hme2, add the hosts entry to the hosts file, and activate the interface. These tasks are exactly the same as those we carried out earlier.

Now we can update /etc/defaultrouter with the new entry:

 xenon# cat /etc/defaultrouter 172.35.63.1 195.10.132.1 xenon# 

If we also look at the routing table, we'll see that it now contains both default routes:

 xenon# netstat -rn Routing Table:   Destination        Gateway         Flags  Ref   Use   Interface ----------------- ------------------ ----- ----- ------ --------- 192.168.22.0      192.168.22.50      U        3      5  hme0 192.168.44.0      192.168.44.51      U        3      5  hme0 172.35.63.0       172.35.63.51       U        2      1  hme1 195.10.132.0      195.10.132.51      U        2      1  hme2 default           172.35.63.1        UG       3      5 default           195.10.132.1       UG       3      5 127.0.0.1         127.0.0.1          UH       0      2  lo0 xenon# 

This mechanism is advantageous in that should one of the routes fail or become invalid, we still have a route that can be used, as shown in Figure 13.3.

Figure 13.3. The multiple default routes on xenon.

graphics/13fig03.gif

We have now generated two main sets of files: one for the gateway and another for the remaining systems. Let's store these files under our standard distribution area, then they can be easily installed as required.


    Team-Fly    
    Top
     



    Solaris Operating Environment Boot Camp
    Solaris Operating Environment Boot Camp
    ISBN: 0130342874
    EAN: 2147483647
    Year: 2002
    Pages: 301

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