Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to set up a server with two IP addresses on different connections. The first NIC works fine (since I removed the gateway from the second), but I can't ping out or to the second NIC.

Anybody know what the next step is to get this thing working?


# The primary network interface
auto eth0
iface eth0 inet static
address x.30.254.201
gateway x.30.254.195

auto eth1
iface eth1 inet static
address x.167.210.200

route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
x.167.210.192 U     0      0        0 eth1
x.30.254.192 U     0      0        0 eth0         x.30.254.195         UG    100    0        0 eth0


eth0      Link encap:Ethernet  HWaddr 00:0c:29:3d:da:a8
      inet addr:x.30.254.201  Bcast:x.30.254.223  Mask:
      inet6 addr: x::20c:29ff:fe3d:daa8/64 Scope:Link
      RX packets:168959 errors:2 dropped:0 overruns:0 frame:0
      TX packets:146167 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:139568273 (139.5 MB)  TX bytes:102699057 (102.6 MB)
      Interrupt:18 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:0c:29:3d:da:b2
      inet addr:x.167.210.200  Bcast:x.167.210.207  Mask:
      inet6 addr: x::20c:29ff:fe3d:dab2/64 Scope:Link
      RX packets:1688 errors:0 dropped:0 overruns:0 frame:0
      TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:111390 (111.3 KB)  TX bytes:4996 (4.9 KB)
      Interrupt:19 Base address:0x2080
share|improve this question
This line in the routing table x.30.254.195 ... eth0is telling your system to send all traffic (due to the first out of eth0. How you want to fix this depends on what outcome you have in mind. This seems like an XY problem (perlmonks.org/index.pl?node_id=542341) so consider what problem you're trying to solve here and rephrase the question :) –  jackweirdy Dec 4 '12 at 19:29
I can't ping eth1... I would assume that I should be able to, right? –  Luke Dec 4 '12 at 19:34
I'm not very knowledgeable about the internals of ping, but I'd suspect that when trying to reply, the server would decide that since it's replying to y.y.y.y, and that's within the subnet, the response would be sent over eth0. –  jackweirdy Dec 4 '12 at 20:44
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.