LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Ping from port A to port B on same NIC (https://www.linuxquestions.org/questions/linux-networking-3/ping-from-port-a-to-port-b-on-same-nic-749395/)

allooshy 08-21-2009 04:34 PM

Ping from port A to port B on same NIC
 
Hi,
I have a dual port NIC, and I would like to run ping from port A (eth2) to port B (eth3) on same NIC card, using Linux RH5.3 I run:
ping -I eth2 <eth3-ip>
and I don't receive and pong.
It appears that when an ARP request received on eth3 (I used tcpdump) the system decides not to answer the ARP request, apparently because it's sent from a local IP and it doesn't allow you to "query yourself".

Any ideas how can I make this work? I want to test connectivity between port A and port B (not necessarily ping), how can I do that?

Thanks for your help,
Ali.

kbp 08-22-2009 10:06 AM

Hi Ali,

Thats some wierd behavior, just tested it myself... the only thing I noticed was that it was being logged as a martian, maybe there was no response because it thought the packet was spoofed ?

cheers,

kbp

allooshy 08-23-2009 01:17 AM

Thanks kbp,
Yeah it's odd, I also think it's kind of IP layer security that prevents the ARP modules from answering the ARP request. I tried to disable all security services (firewall, iptables, selinux, sysctl) but didn't succeed to make it work. I even tried to trick the ARP table and set a manual entry for port B so the ping will not initiate ARP request (and will send ICMP echo directly) but the arp table won't let me set an entry of an IP that I own.

Any other ideas?

kbp 08-23-2009 08:31 AM

You could try mucking about with kernel/network tuning stuff in /etc/sysctl.conf, I thought it might have been source routing related. I had a little play but didnt have that much time available, good luck

kbp

TimothyEBaldwin 08-26-2009 02:06 PM

I would suggest using arping and tcpdump/wireshark for this test.

allooshy 08-28-2009 05:42 AM

kbp, already tried playing with sysctl, it didn't help.
TimothyEBaldwin, that would work, but I wanted to show a real connection like ping-pong (or other application) rather than sniffing packets on port B.

Thanks guys.
Ali;

TimothyEBaldwin 08-30-2009 02:33 PM

Why?

I think network namespaces can be used to do this.

archtoad6 12-02-2009 10:51 AM

Well?


All times are GMT -5. The time now is 11:12 AM.