ARPWATCH(8)
π ARPWATCH(8) β the arpwatch page, but make it make sense π
okay bestie, listen. this is the manual for arpwatch β yes it's section 8, yes it's a system admin tool, no it does not have to be boring. it keeps track of ethernet/ip address pairings, and honestly? it's giving watchful older sibling energy. let's get into it π«Ά
β¨ SYNOPSIS β¨
arpwatch [-CdFNpqsvzZ] [-D arpdir] [-f datafile] [-i interface]
[-P pidfile] [-w watcher@email] [-W watchee@email]
[-n net[/width]] [-x net[/width]] [-r file] [-u username]
like, that's the whole vibe in one block. every flag gets its moment below, don't worry π
πΈ DESCRIPTION πΈ
so what does arpwatch actually do? it keeps track of ethernet/ip address pairings. it syslogs activity and reports certain changes via email. and it does all of this using pcap(3) to listen for arp packets on a local ethernet interface. no cap, that's the whole premise.
arp.dat contains three or four fields. let's break it down:
- first is the ethernet mac address
- second is the IPv4 address
- third is the time expressed in seconds since midnight, January 1, 1970
and the optional fourth field? that's the short hostname derived from PTR record of the ip address when a mac/ip pair is first seen. important lore: it is never updated and was intended to be a breadcrumb to determine the origin of a mac/ip pair. so it's basically a little fossil of the first time that pairing showed up π¦
π OPTIONS π
okay this is the section everyone scrolls to. buckle up, there's a lot, and yes we're doing all of them.
-Cβ uses compact padded</> ethernet addresses inarp.dat, e.g.0:8:e1:1:2:d6.-dβ enables debugging. also lowkey inhibits forking into the background and emailing the reports. instead, they are sent tostderr. so it just yells directly at you, which is honestly kind of iconic.-Darpdirβ used to specify thearpwatchworking directory. this defaults to/var/lib/arpwatch.-fdatafileβ used to set the ethernet/ip address database filename. the default isarp.dat.-Fβ preventsarpwatchfrom forking, causing it to run in the foreground. main character energy, no backgrounding.-iinterfaceβ used to override the default interface.-nnet[/width]β specifies additional local networks. this can be useful to avoid "bogon" warnings when there is more than one network running on the same wire. if the optional width is not specified, the default netmask for the network's class is used.-Nβ disables reporting any bogons. bye bogon drama π-pβ disables promiscuous mode.-Ppidfileβ specifies the pidfile.-qβ suppresses reports being logged or printed tostderr. shhh π€«-rfileβ used to specify a savefile (perhaps created bytcpdump(8)orpcapture(8)) to read from instead of reading from the network. in this casearpwatchdoes not fork. note that too.-sβ suppresses reports sent by email.-uusernameβ causesarpwatchto drop root privileges and change user ID to username and group ID to that of the primary group of username. this is recommended for security reasons. fr fr, do this one.-vβ disables the reporting of VRRP/CARP ethernet prefixes as described in RFC5798 (0:0:5e:0:1:xx).-wwatcher@emailβ used to specify the target address for email reports. the default isroot.-Wwatchee@emailβ used to specify the from address for email reports. the default isroot.-zβ disables reporting0.0.0.0changes, helpful in busy DHCP-served networks. honestly a lifesaver in those environments π-Zβ uses zero padded</> ethernet addresses inarp.dat, e.g.00:08:e1:01:02:d6.
β οΈ okay important setup note bestie: an emptyarp.datfile must be created before the first time you runarpwatch. also, the default directory (wherearp.datis stored) must be owned by username if the-uflag is used. don't skip this, it will not work and you will be sad π
π REPORT MESSAGES π
here's a quick list of the report messages generated by arpwatch(8) (and arpsnmp(8)):
- new activity β this ethernet/ip address pair has been used for the first time six months or more.
- new station β the ethernet address has not been seen before.
- flip flop β the ethernet address has changed from the most recently seen address to the second most recently seen address. (if either the old or new ethernet address is a DECnet address and it is less than 24 hours, the email version of the report is suppressed.)
- changed ethernet address β the host switched to a new ethernet address.
π SYSLOG MESSAGES π
here are some of the syslog messages; note that messages that are reported are also syslog'ed.
- ethernet broadcast β the mac ethernet address of the host is a broadcast address.
- ip broadcast β the ip address of the host is a broadcast address.
- bogon β the source ip address is not local to the local subnet.
- ethernet broadcast β the source mac or arp ethernet address was all ones or all zeros. (yes, this one is listed twice in the original. we don't question it, we respect it.)
- ethernet mismatch β the source mac ethernet address didn't match the address inside the arp packet.
- reused old ethernet address β the ethernet address has changed from the most recently seen address to the third (or greater) least recently seen address. (this is similar to a flip flop.)
- suppressed DECnet flip flop β a "flip flop" report was suppressed because one of the two addresses was a DECnet address.
β SIGNALS β
normally arpwatch updates arp.dat once every 15 minutes. the SIGHUP signal causes it to update immediately. so if you're impatient, that's your moment π
π¦ FILES π¦
/var/lib/arpwatch default directory
arp.dat default ethernet/ip address database
ethercodes.dat vendor ethernet block list
π SEE ALSO π
arpsnmp(8), arp(8), bpf(2), tcpdump(8), pcapture(8), pcap(3)
π§ AUTHORS π§
Craig Leres of the Lawrence Berkeley National Laboratory Network Research Group, University of California, Berkeley, CA.
the current version is available via anonymous ftp:
ftp://ftp.ee.lbl.gov/arpwatch.tar.gz
π BUGS π
please send bug reports to β¨arpwatch@ee.lbl.govβ©.
attempts are made to suppress DECnet flip flops but they aren't always successful.
most error messages are posted using syslog.
and that's the whole page, bestie π this one's dated 2 December 2023, and it's the ARPWATCH(8) page β BSD-style source, section 8, all yours. go forth and watch those arps, you absolute legend ππβ¨
π¦ where this page comes from
- epel 10: arpwatch 14:3.9-11.el10_3 Β· BSD-3-Clause
- epel 9: arpwatch 14:3.9-11.el9 Β· BSD-3-Clause
- fedora 43: arpwatch 14:3.8-8.fc43 Β· BSD-3-Clause
- fedora 43: arpwatch 14:3.9-12.fc43 Β· BSD-3-Clause
- fedora 44: arpwatch 14:3.9-14.fc44 Β· BSD-3-Clause
- fedora 44: arpwatch 14:3.9-6.fc44 Β· BSD-3-Clause
- Copyright (c) 1992, 1994, 1996, 1997, 2000, 2009, 2012, 2013, 2016, 2019, 2020, 2021, 2023 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms