HowTo: Linux Send a Gratuitous ARPs Requests [ Networking ]

ht‮‬tps://www.lautturi.com
HowTo: Linux Send a Gratuitous ARPs Requests [ Networking ]

A gratuitous ARP (Address Resolution Protocol) request is a special type of ARP request that is used to update the ARP cache of other devices on the network. It is typically used when the IP address or the MAC (Media Access Control) address of a device has changed, to ensure that other devices on the network are aware of the change.

To send a gratuitous ARP request in Linux, you can use the arping command. The arping command is part of the iputils-arping package, which provides tools for sending and receiving ARP packets in Linux.

To send a gratuitous ARP request, use the arping command with the -U option and the IP address of the device. For example, to send a gratuitous ARP request for the IP address 192.168.0.1, you can use the following command:

$ arping -U 192.168.0.1

This will send a gratuitous ARP request for the IP address 192.168.0.1.

You can also use the arp command to send a gratuitous ARP request. To send a gratuitous ARP request using the arp command, use the -s option to specify the IP address and the MAC address of the device, and the -d option to specify the IP address of the device. For example, to send a gratuitous ARP request for the IP address 192.168.0.1 with the MAC address 00:11:22:33:44:55, you can use the following command:

$ arp -s 192.168.0.1 00:11:22:33:44:55 -d 192.168.0.1

This will send a gratuitous ARP request for the IP address 192.168.0.1 with the MAC address 00:11:22:33:44:55.

Note that you may need to have root privileges to use the arping and arp commands. You can use the sudo command to execute these commands with root privileges.

Created Time:2017-10-29 22:08:44  Author:lautturi