target IP address is same as source IP address in ping ARP request

7,730

Solution 1

It's not necessarily related to your ping command. The operating system might simply be checking whether any other hosts in the same network (or the same Ethernet broadcast domain) have the same IP address as you. If the system receives any replies to such an ARP request, it immediately warns the user about duplicate addresses.

Solution 2

ARP packets with same source and dest IP are called Gratuitous ARP packets. You can read the uses of this here

These packets are expected for a variety of uses as mentioned in above link. but strangely the dest MAC should be FF:FF:FF:FF:FF:FF which is not the case in your setup.

Share:
7,730

Related videos on Youtube

Cathy
Author by

Cathy

Updated on September 18, 2022

Comments

  • Cathy
    Cathy over 1 year

    I am working on wireless driver. But I feel this question is just a general network question. I saw strange content of the first ping packt, which is an arp request, where the target IP address is same as source IP address. I am kind of newbie here. Is this normal? What could be wrong?

    I manually configured my wireless card IP as 192.168.0.10. And trying to ping 192.168.0.1. In the ARP packet, I saw the content like:

    Address Resolution Protocol (request)
        Hardware type: Ethernet (0x0001)
        Protocol type: IP (0x0800)
        Hardware size: 6
        Protocol size: 4
        Opcode: request (0x0001)
        Sender MAC address: 00:21:e8:71:70:f4 (00:21:e8:71:70:f4)
        Sender IP address: 192.168.0.10(192.168.0.10)
        Target MAC address: 00:00:00:00:00:00 (00:00:00:00:00:00)
        Target IP address: 192.168.0.10(192.168.0.10)
    

    Here is the dump of my setup.

    # ifconfig mlan0
    mlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
            ssid hwteam
            bssid 00:1b:11:4f:42:5f chan 11
            address: 00:21:e8:71:70:f4
            media: IEEE802.11 autoselect
            status: active
    # ifconfig mlan0 192.168.0.10 netmask 255.255.255.0
    # ifconfig mlan0
    mlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
            ssid hwteam
            bssid 00:1b:11:4f:42:5f chan 11
            address: 00:21:e8:71:70:f4
            media: IEEE802.11 autoselect
            status: active
            inet 192.168.0.10 netmask 0xffffff00 broadcast 192.168.0.255
    # ping 192.168.0.1
    PING 192.168.0.1 (192.168.0.1): 56 data bytes
    
    ----192.168.0.1 PING Statistics----
    3 packets transmitted, 0 packets received, 100% packet loss
    
    # netstat -rn
    Routing tables
    
    Internet:
    Destination        Gateway            Flags    Refs      Use    Mtu  Interface
    127.0.0.1          127.0.0.1          UH          0        4  33192  lo0
    192.168.0/24       link#2             UC          1        0      -  mlan0
    192.168.0.1        link#2             UHLc        0        3      -  mlan0
    # arp -a
    #