Linux how to force an external ping from eth0 to eth1 without a router.

Posted by Elie on Server Fault See other posts from Server Fault or by Elie
Published on 2010-10-30T23:22:52Z Indexed on 2010/12/24 5:55 UTC
Read the original article Hit count: 402

Filed under:

Hello, i am trying to have eth0 connected to eth1 on the same machine with a loopback cable. I have eth0 as 2.2.2.1 and eth1 as 2.2.2.2 with netmask 255.255.255.0 and the right Bcast 2.2.2.255 . I tried to ping -I eth0 2.2.2.2 and ping -I eth1 2.2.2.1. My issue is that even when the loopback cable is not plugged the ping still succeed( as if it is an internal ping). How can I force an external ping where I make sure the packets are going through the connected cable? ( I know I can have a router and both ethernets connected to it, but I am avoiding to use anything besides a simple cat 5 cable). Thanks.

© Server Fault or respective owner

Related posts about command-line