.\" @(#) $Id: arpwatch.8.in 1539 2023-12-03 00:48:53Z leres $ (LBL) .\" .\" 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. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions are met: .\" * Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" * Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" * Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .Dd 2 December 2023 .Dt ARPWATCH 8 .Sh NAME .Nm arpwatch .Nd keep track of ethernet/ip address pairings .Sh SYNOPSIS .Nm .Op Fl CdFNpqsvzZ .Op Fl D Ar arpdir .Op Fl f Ar datafile .Op Fl i Ar interface .Op Fl P Ar pidfile .Op Fl w Ar watcher@email .Op Fl W Ar watchee@email .Op Fl n Ar net[/width] .Op Fl x Ar net[/width] .Op Fl r Ar file .Sh DESCRIPTION .Nm keeps track of ethernet/ip address pairings. It syslogs activity and reports certain changes via email. .Nm uses .Xr pcap 3 to listen for arp packets on a local ethernet interface. .Pp .Ar arp.dat contains three or four fields. First is the ethernet mac address, second is the IPv4 address, and third is the time expressed in seconds since midnight, January 1, 1970. The optional forth field is the short hostname derived from PTR record of the ip address when a mac/ip pair is first seen; it is never updated and was intended to be a breadcrumb to determine the origin of a mac/ip pair. .Pp The .Fl C flag uses compact padded ethernet addresses in .Ar arp.dat , e.g. 0:8:e1:1:2:d6. .Pp The .Fl d flag is used enable debugging. This also inhibits forking into the background and emailing the reports. Instead, they are sent to .Ar stderr . .Pp The .Fl D flag is used to specify the .Nm working directory. This defaults to .Ar /usr/local/arpwatch . .Pp The .Fl f flag is used to set the ethernet/ip address database filename. The default is .Ar arp.dat . .Pp The .Fl F flag is prevents .Nm from forking causing it to run in the foreground. .Pp The .Fl i flag is used to override the default interface. .Pp The .Fl n flag 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 .Ar width is not specified, the default netmask for the network's class is used. .Pp The .Fl N flag disables reporting any bogons. .Pp The .Fl p flag disables promiscuous mode. .Pp The .Fl P flag specifies the .Ar pidfile . .Pp The .Fl q flag suppresses reports being logged or printed to .Ar stderr . .Pp The .Fl r flag is used to specify a savefile (perhaps created by .Xr tcpdump 1 or .Xr pcapture 1 ) to read from instead of reading from the network. In this case .Nm does not fork. .Pp Note that an empty .Ar arp.dat file must be created before the first time you run .Fl arpwatch . .Pp The .Fl s flag suppresses reports sent by email. .Pp The .Fl v flag disables the reporting of VRRP/CARP ethernet prefixes as described in RFC5798 (0:0:5e:0:1:xx). .Pp The .Fl w flag is used to specify the target address for email reports. The default is .Ar root . .Pp The .Fl W flag is used specifies the from address for email reports. The default is .Ar root . .Pp The .Fl z flag disables reporting 0.0.0.0 changes, helpful in busy DHCP-served networks. .Pp The .Fl Z flag uses zero padded ethernet addresses in .Ar arp.dat , e.g. 00:08:e1:01:02:d6. .Pp .Sh "REPORT MESSAGES" Here's a quick list of the report messages generated by .Xr arpwatch 1 (and .Xr arpsnmp 1 ) : .Pp .Bl -tag -width xxx .It Ic "new activity" This ethernet/ip address pair has been used for the first time six months or more. .TP .It Ic "new station" The ethernet address has not been seen before. .TP .It Ic "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.) .TP .It Ic "changed ethernet address" The host switched to a new ethernet address. .Sh "SYSLOG MESSAGES" Here are some of the syslog messages; note that messages that are reported are also syslog'ed. .Bl -tag -width xxx .It Ic "ethernet broadcast" The mac ethernet address of the host is a broadcast address. .It Ic "ip broadcast" The ip address of the host is a broadcast address. .It Ic "bogon" The source ip address is not local to the local subnet. .It Ic "ethernet broadcast" The source mac or arp ethernet address was all ones or all zeros. .It Ic "ethernet mismatch" The source mac ethernet address didn't match the address inside the arp packet. .It Ic "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.) .It Ic "suppressed DECnet flip flop" A "flip flop" report was suppressed because one of the two addresses was a DECnet address. .Sh SIGNALS Normally .Nm updates .Ar arp.dat once every 15 minutes. The SIGHUP signal causes it to update immediately. .Sh FILES .Bl -tag -width ".Pa /usr/local/arpwatch" -compact .It Pa /usr/local/arpwatch default directory .It Pa arp.dat default ethernet/ip address database .It Pa ethercodes.dat vendor ethernet block list .Sh "SEE ALSO" .Xr arpsnmp 8 , .Xr arp 8 , .Xr bpf 4 , .Xr tcpdump 1 , .Xr pcapture 1 , .Xr pcap 3 .Sh AUTHORS .An Craig Leres of the Lawrence Berkeley National Laboratory Network Research Group, University of California, Berkeley, CA. .Pp The current version is available via anonymous ftp: .Pp .Dl Ar ftp://ftp.ee.lbl.gov/arpwatch.tar.gz .Sh BUGS Please send bug reports to .Aq arpwatch@ee.lbl.gov . .Pp Attempts are made to suppress DECnet flip flops but they aren't always successful. .Pp Most error messages are posted using syslog.