I've discovered a problem with my Debian setup. I have a server with two interfaces connected to my router, both interfaces have ips on the same subnet, and when they are both up I can't get pings or ssh back from either IP.. to illustrate.
y.z.149.121 - Router, routing y.z.149.120/nm255.255.255.248
|
|--y.z.149.123 sparkplug - eth0
|
|--y.z.149.122 ts1 - eth1
|--y.z.149.124 ts1 - eth0
After setting all this up and getting back home from the datacenter I noticed I couldn't ssh into either IP. I couldn't get a ping back either.. I was able to ssh into sparkplug, and from there I could ssh into either ts1 IP, and could ping as well. I also noticed if I shut down a single interface on ts1, then everything started working normally for the other interface.
So since I don't know a whole lot about routing I figured that's where the problem probably is. Here is some background info.
/etc/network/interfaces:
Code:
auto lo
iface lo inet loopback
# The primary network interface
auto eth1
iface eth1 inet static
address y.z.149.122
netmask 255.255.255.248
gateway y.z.149.121
network y.z.149.120
broadcast y.z.149.127
auto eth0
iface eth0 inet static
address y.z.149.124
netmask 255.255.255.248
gateway y.z.149.121
network y.z.149.120
broadcast y.z.149.127
and ifconfig:
Code:
eth0 Link encap:Ethernet HWaddr 00:D0:B7:48:D9:20
inet addr:y.z.149.124 Bcast:y.z.149.127 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1080 (1.0 KiB) TX bytes:0 (0.0 b)
Interrupt:9 Base address:0xecc0 Memory:fdfff000-fdfff038
eth1 Link encap:Ethernet HWaddr 00:B0:D0:46:40:30
inet addr:y.z.149.122 Bcast:y.z.149.127 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3493 errors:0 dropped:0 overruns:1 frame:0
TX packets:689 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:238519 (232.9 KiB) TX bytes:93726 (91.5 KiB)
Interrupt:5 Base address:0xec00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
and the output of route:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
y.z.149.120 * 255.255.255.248 U 0 0 0 eth1
y.z.149.120 * 255.255.255.248 U 0 0 0 eth0
default y.z.149.121 0.0.0.0 UG 0 0 0 eth0
default y.z.149.121 0.0.0.0 UG 0 0 0 eth1
I don't understand, I'm sure there's just something I'm missing. Any help is very appreciated.
Thanks.