I have two NIC Ethernet card (eth1 and eth2) on the same computer (linux) connected by a cross cable.
The two interfaces are on the same subnet :
eth1 : 192.168.200.1 255.255.255.0
eth2 : 192.168.200.2 255.255.255.0
Then i add a route for each interface :
route add -net 192.168.200.0 netmask 255.255.255.0 eth1
route add -net 192.168.200.0 netmask 255.255.255.0 eth2
Finally,i'm trying to ping :
ping 192.168.200.1 -I eth2 or ping 192.168.200.2 -I eth1
Ping command reaches error : Destination Host Unreachable
Can anyone help me to fix this issue?
Thank you.
-r
to the ping command?ping 192.168.200.1 -I eth2
, then you ranping 192.168.200.2 -I eth1
, notping 192.168.200.1 -I eth2 or ping 192.168.200.2 -I eth1
? Try running ping like thisping -I eth1 192.168.200.2
.