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"