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?
/etc/network/interfaces
# The primary network interface
auto eth0
iface eth0 inet static
address x.30.254.201
netmask 255.255.255.224
gateway x.30.254.195
auto eth1
iface eth1 inet static
address x.167.210.200
netmask 255.255.255.240
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
x.167.210.192 0.0.0.0 255.255.255.240 U 0 0 0 eth1
x.30.254.192 0.0.0.0 255.255.255.224 U 0 0 0 eth0
0.0.0.0 x.30.254.195 0.0.0.0 UG 100 0 0 eth0
ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:3d:da:a8
inet addr:x.30.254.201 Bcast:x.30.254.223 Mask:255.255.255.224
inet6 addr: x::20c:29ff:fe3d:daa8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
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:255.255.255.240
inet6 addr: x::20c:29ff:fe3d:dab2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
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
0.0.0.0 x.30.254.195 0.0.0.0 ... eth0is telling your system to send all traffic (due to the first0.0.0.0) 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:29y.y.y.y, and that's within the subnet0.0.0.0, the response would be sent over eth0. – jackweirdy Dec 4 '12 at 20:44