I have a Ubuntu 10.04 LTS Server which has two Ethernet ports eth0
and eth1
.
eth0
is connected to ISP1 with network 192.168.3.0/24 with server static address 192.168.3. 5eth1
is connected to ISP2 with network 192.168.5.0/24 with server static address 192.168.5.10
When eth1
is connected, there is no internet connection from eth0
. The internal network is accessible, eg, ssh , ping from other computers in 192.168.3.0/24 network.
When eth1
is disabled or disconnected, eth0
works just fine.
How can I ensure that both the Ethernet ports get internet connections?
netstat configs eth1 disabled
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.3.1 0.0.0.0 UG 0 0 0 eth0
Netstat config eth1 enabled
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.5.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 192.168.5.254 0.0.0.0 UG 0 0 0 eth1
0.0.0.0 192.168.3.1 0.0.0.0 UG 0 0 0 eth0
Edit
I have also checked /etc/resolv.conf
There, I have manually added the nameserver for both the gateways.
ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether 11:bb:3e:15:3e:0e brd ff:ff:ff:ff:ff:ff
inet 192.168.3.100/24 brd 192.168.3.255 scope global eth0
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 100
link/ether aa:2a:ae:5f:59:e8 brd ff:ff:ff:ff:ff:ff
inet 192.168.5.100/24 brd 192.168.5.255 scope global eth1
valid_lft forever preferred_lft forever