I have a linux box (2.6.9 kernel). problembox has 2 nics, A and B, with A's IP = 192.168.1.2 and B's IP = 10.1.1.1. I want 192.168.1.2 to be the default (for things such downloads via apt-get and 10.1.1.1 to be used for communications to other boxes on the 10.1.1.0/24 network.
The 10.1.1.0/24 network is used for backups and admin with backupbox that has the IP of 10.1.1.2 and webbox that has the IP of 10.1.1.3. The 10.1.1.x network is connected to a unmanaged switch. Backupbox is the backup manager and can connect to 10.1.1.3 and do its backup, but cannot connect to 10.1.1.1 at all. I have no firewall on 10.1.1.1.
For problembox, my interface config file looks like:
eth0
ip 192.168.1.2
sub 255.255.255.0
gw 192.168.1.1
eth1
ip 10.1.1.1
sub 255.255.255.0
gw 192.168.1.1
I've tried to put in:
ip route add default via 192.168.1.1 dev eth0 tab 1
ip route add default via 10.10.10.1 dev eth1 tab 2
ip rule add to 192.168.1.0/24 tab 1 priority 500
ip rule add to 10.10.10.0/24 tab 2 priority 600
ip route flush cache
but no go; I've even tried to put in two gateways (where eth1 gw=10.1.1.1).
What am I missing?