Find the answer to your Linux question:
Results 1 to 2 of 2
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2009
    Posts
    1

    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 ARP request your own IP (maybe to avoid packet spoofing).

    I tried to disable all security services I know about (firewall, iptables, selinux, sysctl) but didn't succeed to make it work. I also 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/MAC that I own.

    Any ideas how can I make this work? I want to show connectivity between port A and port B using standard application (not necessarily ping).

    Thanks,
    Ali.

  2. #2
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    477
    welcome to the forum

    looks like the "-I" option you use is OK--from "man
    ping"

    -I interface address
    Set source address to specified interface
    address. Argument may be numeric IP address or name
    of device.

    but "ping -I eth0 eth1" didn't work for me: what did
    work was to use the ip-addrs thus

    "ping -I 192.168.2.106 192.168.2.101"

    maybe you could assign an ip-addr with ifconfig.
    the sun is new every day (heraclitus)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •