multihoming routing question (FC 3)

From: Danny Yee (danny_at_anatomy.usyd.edu.au)
Date: 05/12/05

  • Next message: Leopoldo Olmos: "Latest lirc.86_64 conflicts"
    Date: Thu, 12 May 2005 16:21:40 +1000
    To: Fedora Core Users <fedora-list@redhat.com>
    
    

    I have a Fedora Core 3 machine with two ethernet cards, each connected
    to a network with a router that can be used as a default route.
    Trying to share traffic between the networks, but at the same time
    ensure that requests are responded to on the network they came in on,
    I'm running the following in rc.local

            # table 1 has rules for network 1
            ip route add XXX.YYY.151.0 dev eth0 src XXX.YYY.151.5 table 1
            ip route add default via XXX.YYY.151.254 table 1
            ip route add 127.0.0.0/8 dev lo table 1

            # table 2 has rules for network 2
            ip route add XXX.YYY.131.0 dev eth0 src XXX.YYY.131.5 table 2
            ip route add default via XXX.YYY.131.254 table 2
            ip route add 127.0.0.0/8 dev lo table 2

            # now use these rules
            ip rule add from XXX.YYY.151.5 table 1
            ip rule add from XXX.YYY.131.5 table 2

    I've also changed /etc/sysconfig/network-scripts/ifup,
    replacing
                ip route replace default via ${GATEWAY} ${WINDOW:+window $WINDOW} ${SRC} ${GATEWAYDEV:+dev $GATEWAYDEV}
    with
                ip route append default via ${GATEWAY} ${WINDOW:+window $WINDOW} ${SRC} ${GATEWAYDEV:+dev $GATEWAYDEV}
    -- otherwise bringing the second interface up replaces the first
    default route instead of appending it.

    My question is, is this the right way to do this? I suspect the
    routing tables should be set up through /etc/init.d/network and
    /etc/sysconfig/static-routes, but I'm not sure of the format of the
    latter file, or if it will allow me to set up tables and rules.

    I'd also like to avoid modifying ifup if that's possible.

    Danny.

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Leopoldo Olmos: "Latest lirc.86_64 conflicts"

    Relevant Pages

    • Re: [SLE] connection redundancy
      ... which is the router just this side of the ... >>because it's own gateway is still up. ... You'll also need three network cards to put into this Linux box. ... your internal LAN can route packets to the Internet. ...
      (SuSE)
    • Re: Problem with IP Masquerade + routed internal network (pretty newbie question)
      ... The network looks like this: ... > other way to define routes other than typing route add... ... If you have a proper router set up, each box on each subnet should only ... would route everything to our factory WAN over frame relay. ...
      (comp.os.linux.networking)
    • Re: please advise - problem with routing
      ... and a network is a very important distinction in IP address configuration. ... you show that the 192.168.1.0/24 subnet has two devices ... ROUTE PRINT on NT4 ... ROUTE PRINT on router ...
      (microsoft.public.windows.server.networking)
    • Re: Permanent Branch Office VPN
      ... > Many thanks for your comments - it seems that the 1 x NIC route is the one ... >> MUST use single network card setup on SBS2003. ... >>> router to router VPN connection. ... to the LAN side of the network at head office. ...
      (microsoft.public.windows.server.sbs)
    • Re: 1 server 2 nic 2 adsl lines, gateway problem
      ... A network can only have one default route. ... neither a 'windows' thing, nor an 'SBS' thing, it is pure networking) ... the .1.254 router. ...
      (microsoft.public.windows.server.sbs)