Linux arpwatch Command
The Linux arpwatch command is used to monitor ARP records on a network.
ARP (Address Resolution Protocol) is the protocol used to resolve IP addresses to the hardware addresses of network devices.
arpwatch monitors and logs ARP packets on a local network, and reports detected changes via email.
Syntax
arpwatch [-d][-f<记录文件>][-i<接口>][-r<记录文件>]
Parameters:
- -d Enable debug mode.
- -f
Set the file that stores ARP records; the default is /var/arpwatch/arp.dat. - -i
Specify the interface to monitor ARP on; the default is eth0. - -r
Read ARP records from the specified file instead of listening on the network. - -n Specify additional local networks
- -u Specify the user and group
- -e Send mail to a specified user instead of the default root user
- -s Specify a username as the return address instead of the default root user
Example
Monitor ARP information on the eth0 network card
arpwatch -i eth0
Monitor ARP information and log it to the corresponding file
# arpwatch -i eth0 -f a.log //Log information to a.log
Linux Command Reference