Test the network by sending ARP protocol packets
arping command is a tool used to send arp requests to a neighboring host. arping uses arp packets to check the hardware address on the device through the ping command. Ability to test whether an IP address is already in use on the network and obtain more device information. The function is similar to ping.
arping(options)(parameters)
-b: Used to send Ethernet broadcast frames (FFFFFFFFFFFF). arping uses the broadcast address initially and the unicast address after receiving the response.
-q: quiet output does not display any information;
-f: Indicates to exit after receiving the first response message;
-w timeout: Set a timeout in seconds. If the specified time is reached and arping has not fully received the response, it will exit;
-c count: Indicates that it will stop after sending the specified number of ARP request packets. If the deadline option is specified, arping will wait for the same number of arp response packets until timeout;
-s source: Set the value of the SPA field in the arp packet sent by arping. If it is empty, proceed as follows. If it is DAD mode (conflict address detection), it is set to 0.0.0.0. If it is Unsolicited ARP mode (Gratuitous ARP), it is set to the target address. Otherwise, it is derived from the routing table;
-I interface: Set the network interface used by ping.
Destination host: Specify the destination host for sending ARP messages.
[root@localhost ~]# arping www.baidu.com
ARPING 220.181.111.147 from 173.231.43.132 eth0
Unicast reply from 220.181.111.147 00:D0:03:[bc:48:00] 1.666ms
Unicast reply from 220.181.111.147 [00:D0:03:BC:48:00] 1.677ms
Unicast reply from 220.181.111.147 [00:D0:03:BC:48:00] 1.691ms
Unicast reply from 220.181.111.147 [00:D0:03:BC:48:00] 1.728ms
Unicast reply from 220.181.111.147 [00:D0:03:BC:48:00] 1.626ms
Unicast reply from 220.181.111.147 [00:D0:03:BC:48:00] 1.292ms
Unicast reply from 220.181.111.147 [00:D0:03:BC:48:00] 1.429ms
Unicast reply from 220.181.111.147 [00:D0:03:BC:48:00] 2.042ms
Sent 8 probes (1 broadcast(s))
Received 8 responses(s)