Re: Dual Default Gateway Routes



On Mon, 19 Dec 2005, in the Usenet newsgroup alt.linux, in article
<rdApf.1$Yf3.303@xxxxxxxxxxxx>, M_F_H wrote:

>I have a network where there are two gateways to the Internet;
>both are modems that have unpredictable down times. I'd like to
>set up one Linux computer to act as a gateway to both routes,
>similar to a High Availability Network for web servers.

-rw-rw-r-- 1 gferg ldp 297491 Sep 4 2003 Adv-Routing-HOWTO

>One way that occurs to me is use the route command on the Linux
>box as follows:
>
>route add default gw 192.168.0.1 eth1
>route add default gw 192.168.0.2 eth2
>
>where 192.168.9.[12] point to the two computers where the modems
>are hooked up.

Watch the typos

>Will this work?

If you make those host routes INSTEAD OF network routes, you'll only
run into the problem of two defaults. Meaning:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 4198 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 4198 eth2

Where is 192.168.0.0/24? Is it out eth1 or eth2? The kernel will use the
last one defined. Try

192.168.0.1 0.0.0.0 255.255.255.255 UH 0 0 4198 eth1
192.168.0.2 0.0.0.0 255.255.255.255 UH 0 0 4198 eth2

and then follow the Adv-Routing-HOWTO trying to get those two defaults.

Old guy
.



Relevant Pages

  • Dual Default Gateway Routes
    ... I have a network where there are two gateways to the Internet; both are modems that have unpredictable down times. ... I'd like to set up one Linux computer to act as a gateway to both routes, similar to a High Availability Network for web servers. ...
    (alt.linux)
  • Re: Routing problem
    ... linux box to other machines on the 192.168.0.0/24 network. ... You may need some routes. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Linking wireless and ethernet network adapters
    ... could you explain the reasoning behind that suggestion? ... I think it may actually be possible to set Linux up to work with the ... * If the network addresses on the two interfaces are the same you need to ... and that the kernel routing table has routes for both interfaces. ...
    (uk.comp.os.linux)
  • Re: Routing problem
    ... I attach 192.168.1.2 to another machine with 2 NICs. ... and it routes connections from the linux box to other machines on the 192.168.0.0/24 network. ...
    (Debian-User)
  • Re: Redist. OSPF into BGP -- matching and prepending
    ... St. Customer has its own OSPF network which connects the two. ... All CE routers in our MPLS network run using a private AS (same on all in a region, but we have ASN override configured at the PERs so that one CE can see the routes originated by another) and the core runs a public AS. ... So the idea is, we want the WAN link for 10 Main to be the preferred path for "10" routes and 20 Main to be the preferred route for "20" routes, but if either link goes down we want failover. ... match tag and set both community and local-pref (community is ...
    (comp.dcom.sys.cisco)