Can I implement network redundancy just with static routing tables?

I have a Windows 2003 server which is connected to a router at 192.168.15.1 via 192.168.15.10.
I also have a linux server connected to that same router via 192.168.15.90.
And I have a direct connection between those two machines via 192.168.15.11 and 192.168.15.91 respectivly.

I’m trying to set up the network configuration so that it uses the direct connection by preference but if that’s not working will automatically use the connection via the router instead.

I’ve set up static routes with different metrics for the connections but it doesn’t seem to work if the direct connection is down.

Is what I’m trying to achieve actually possible simply with static routing or do I need to use dynamic/rip routing?

=======

I’ve changed the direct link to a different subnet 192.168.18.0/24, just in case there were conflicts there.

Without static routing PINg followed the path via the router so I added the following persistent routes on W2003:

C:\Documents and Settings\Administrator>route print

IPv4 Route Table
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 04 5a 7c 39 06 ...... Linksys LNE100TX Fast Ethernet Adapter(LNE100TX
v4) - Deterministic Network Enhancer Miniport
0x30003 ...00 13 20 5c ca 9b ...... Broadcom NetXtreme 5751 Gigabit Controller -
 Deterministic Network Enhancer Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0     192.168.15.1    192.168.15.10     20
        127.0.0.0        255.0.0.0        127.0.0.1        127.0.0.1      1
     192.168.15.0    255.255.255.0    192.168.15.10    192.168.15.10     20
    192.168.15.10  255.255.255.255        127.0.0.1        127.0.0.1     20
    192.168.15.90  255.255.255.255    192.168.18.91    192.168.18.11      1
   192.168.15.255  255.255.255.255    192.168.15.10    192.168.15.10     20
     192.168.18.0    255.255.255.0    192.168.18.11    192.168.18.11     20
    192.168.18.11  255.255.255.255        127.0.0.1        127.0.0.1     20
    192.168.18.91  255.255.255.255    192.168.18.11    192.168.18.11      1
   192.168.18.255  255.255.255.255    192.168.18.11    192.168.18.11     20
        224.0.0.0        240.0.0.0    192.168.15.10    192.168.15.10     20
        224.0.0.0        240.0.0.0    192.168.18.11    192.168.18.11     20
  255.255.255.255  255.255.255.255    192.168.15.10    192.168.15.10      1
  255.255.255.255  255.255.255.255    192.168.18.11    192.168.18.11      1
Default Gateway:      192.168.15.1
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
    192.168.18.91  255.255.255.255    192.168.18.11       1
    192.168.15.90  255.255.255.255    192.168.18.91       1

And the following on Linux:

192.168.15.11/32 via 192.168.18.91 metric 1 dev eth1
192.168.15.10/32 via 192.168.18.11 metric 1 dev eth1

When the direct link is up, all is well, traffic flows as desired. When I take the link down though, although the persistent routes are removed from the active table, leaving me with:

IPv4 Route Table
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 04 5a 7c 39 06 ...... Linksys LNE100TX Fast Ethernet Adapter(LNE100TX
v4) - Deterministic Network Enhancer Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0     192.168.15.1    192.168.15.10     20
        127.0.0.0        255.0.0.0        127.0.0.1        127.0.0.1      1
     192.168.15.0    255.255.255.0    192.168.15.10    192.168.15.10     20
    192.168.15.10  255.255.255.255        127.0.0.1        127.0.0.1     20
   192.168.15.255  255.255.255.255    192.168.15.10    192.168.15.10     20
        224.0.0.0        240.0.0.0    192.168.15.10    192.168.15.10     20
  255.255.255.255  255.255.255.255    192.168.15.10    192.168.15.10      1
Default Gateway:      192.168.15.1
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
    192.168.18.91  255.255.255.255    192.168.18.11       1
    192.168.15.90  255.255.255.255    192.168.18.91       1

PINGs from 15.10 to 15.90 fail (I see ARP messages who has 15.90 tell 15.10)
and PINGs from 15.90 to 15.10 also fail with the response “from 18.91: host unavailable”

Answer

Where to begin …

You have not told us the netmask – I assume these all on the same /24? If so, routing has absolutely nothing to do with this. These machines are all on the same subnet so there will be no routing.

I assume you have two NICs in each server? And I also assume you are trying to connect by IP? If so, the IP that is associated with the down connection is down and you can’t contact it ever. If you disconnect the cable that links the .11 and .91 interfaces, those IP addresses are now unreachable.

If you’re trying to connect by DNS names, is resolution happening properly?

To properly troubleshoot these things, you need to better-explain what you’re actually doing, and it would really help you to understand the ISO model and troubleshoot up (or down) in sequence, so that you can zero in on where the problem is.

/edit – OK, I see your edit where you put the second interfaces on a different subnet. The point stands – if an interface (with an IP) is down, that IP is not reachable.

What are you trying to guard against? Sounds like “single NIC failure.” Well, there’s a standard measure to guard against that – NIC bonding. Make sure your NIC drivers support some form of it, team the NICs, and assign a single IP to the team (on each server.)

Attribution
Source : Link , Question Author : Ian , Answer Author : mfinni

Leave a Comment