[quagga-users 6773] Source IP for routes

Filipe Brandenburger branden at terra.com.br
Sat Apr 22 15:56:06 IST 2006


Hello,

I'm trying to find a setup to solve my problem, but I still couldn't figure it out... My setup involves two
hosts with two redundant links between them. The simple setup would be the two hosts on the same network, being
network1=one switch and network2=other switch, but can be something more complex like having other routers
between the networks.

Let's suppose:

                                  +---------+
                                 /           \
                     +--link X1--+ network 1 +--link Y1--+
                     |           \           /           |
   +----------+-eth1-+            +---------+            +-eth1-+----------+
   |  host X  |                                                 |  host Y  |
   +----------+-eth2-+            +---------+            +-eth2-+----------+
                     |           /           \           |
                     +--link X2--+ network 2 +--link Y2--+
                                 \           /
                                  +---------+
   host X:
     eth1: 192.168.11.1/24
     eth2: 192.168.12.1/24
     dummy0? loop:1? ???: 192.168.100.1

   host Y:
     eth1: 192.168.21.1/24
     eth2: 192.168.22.1/24
     dummy0? loop:1? ???: 192.168.100.2

I'm running Quagga and OSPF in the network.

My goal is to have a setup that, upon failure of either link X1 or network 1 or link Y1 or link X2 or network 2
or link Y2, that means, simple failure of any one network component in the setup, any TCP connections that I
have between host X and host Y isn't lost, and begins to flow through the other way.

Suppose I have the setup above, and OSPF chooses eth1 in host X as the interface to reach 192.168.100.2, which
is the "internal" IP of host Y. If I open a TCP connection (e.g. a telnet) from host X to 192.168.100.2, host X
will bind it to 192.168.11.1, since that is the address on the outbound interface. It won't choose the
192.168.100.1 because, as far as I know, I only can setup this using a /32 mask for this interface (am I wrong?).

So if the connection is from 192.168.11.1 to 192.168.100.2, if I have a failure in link X1, interface eth1 of
host X will go down and host Y won't have how to send packets back to 192.168.11.1 anymore, so my TCP
connection will be lost.

One way I thought of to handle this problem would be using the "src" option of iproute2, like:

  # ip route add 192.168.100.2/32 via 192.168.11.2 dev eth1 src 192.168.100.1

That would work if I'm setting up static routes, but then I can't run OSPF to detect failures on the networks...

Is there a way for me to setup Quagga to set "src" addresses on the routes?

Is there a more intelligent way to solve this problem? Has anyone successfully made a setup like this that works?

Thanks a lot,
Filipe





More information about the Quagga-users mailing list