Single Ethernet card testing on Linux
Hi,
I am trying to write a tester for an ethernet card on linux. This testor requires that I disconnect from the network to test it. So I am using a physical loopback device (RJ45 connector looped back) to mock a network path.
To test the card I am using a raw socket based application which I am developing. So I construct the ethernet frame myself and send it.
The problem is that whenever I send this packet (which I create) to a static IP address (which I have configured to be 162.181.4.20), it just gets looped back and does not appear on the wire. I have written a sniffer which displays whatever packets the device driver receives and this shows a packet received. But when I remove the loopback I still see that the sniffer is getting the packet.
Some one suggested that I use multicast for this. I see the same problem with that. I have set up a route as follows:
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
and enabled IP multicasting as well. But to no avail.
please help.
Thanks
Sumeet
|