2 ISP's, no fancy routing - yet
Hello All
I have a simple question I think
I have two ADSL lines connected to two different interfaces. One is connected directly to the ADSL router(in bridge mode) on a 192.168.0 network, the other one through all kinds of router equipment on a 172.16 network.
Here are the device network files:
[root@abcd ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=172.16.1.101
NETMASK=255.255.0.0
GATEWAY=172.16.1.1
ONBOOT=yes
METRIC=5
MII_NOT_SUPPORTED=no
USERCTL=no
DNS1=172.16.1.10
RESOLV_MODS=no
IPV6INIT=no
IPV6TO4INIT=no
ACCOUNTING=no
and
[root@abcd ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
IPADDR=192.168.0.2
NETMASK=255.255.0.0
GATEWAY=192.168.0.1
ONBOOT=yes
METRIC=10
MII_NOT_SUPPORTED=no
USERCTL=no
RESOLV_MODS=no
IPV6INIT=no
IPV6TO4INIT=no
ACCOUNTING=no
Routing table
[root@abcd ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.0.0 0.0.0.0 255.255.0.0 U 5 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 5 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 10 0 0 eth1
192.168.0.0 0.0.0.0 255.255.0.0 U 10 0 0 eth1
0.0.0.0 172.16.1.1 0.0.0.0 UG 5 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 10 0 0 eth1
Now when I have both networks up I can do
ssh 80.90.100.200 <- invented ip to demonstrate problem without dns :-)
it works
I can do
ssh 80.90.100.200 -b 172.16.1.101
and it works
but this does not work (connection times out)
ssh 80.90.100.200 -b 192.168.0.2
If i do ifdown on eth0, then the above works.
Also incomming connections on eth1 only work when eth0 is down
If I do nothing it will use the lowest metric route through eth0 and that works and I am happy with that, but I would like to be able to connect specifically through the other connection...
Now for the question. What do I need to do to be able to make outgoing connections bound to either one of the external interfaces?(and thereby on the corresponding ADSL line)
Any help appreciated :-)
There is a shorewall in use, but it should be open for all outgoing connections, and the problem is the same when shorewall is off.
This is on Mandriva 2010.0 in i686 64bit
HC
|