Independent pings on NIC interfaces
I have two Ethernet interfaces on the target Linux machine, eth0 and eth1. I can ping "out of" both fine. I can ping "to" both fine.
This is the ipconfig for both.
eth0 Link encap:Ethernet HWaddr 5A:75:AB:C6:16:1E
inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0
eth1 Link encap:Ethernet HWaddr E6:04:E6:8B:32:0A
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
This is the routing table.
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
When I had setup the host machine with the following:
IP address of host machine = 192.168.0.100
netmask 255.255.0.0 (I had meant 255.255.255.0 but mistakenly put 255.255.0.0)
I had only an Ethernet cable connected between the host Linux machine and eth0 of the target Linux machine. Why is it from my host machine I can ping both IP addresses 192.168.0.10 (eth0 of the target Linux machine) and 192.168.1.10 (eth1 of the target Linux machine) successfully when only eth0 of the target Linux machine was connected. The target Linux machine was responding to the ping for 192.168.1.10 even though I was connected to only eth0 which has an IP address of 192.168.0.10. Is this due to some Linux bonding? How do I configure it so eth0 would only respond to its own IP address and eth1 would only respond to its own IP address. Is that through ip or route command? Any help would be much appreciated.
|