arpwatch

term

networkingsecurity

Kept in this browser · My desk

A program from the Lawrence Berkeley National Laboratory that listens to ARP traffic on a segment, keeps a database of Ethernet and IP address pairings, and reports new stations and changed pairings by syslog and email.

Written by Craig Leres of the laboratory's Network Research Group, it names its findings in a way that reads like a description of ARP poisoning: flip flop, when an address changes back to the second most recently seen one; changed ethernet address; and ethernet mismatch, when the frame's source MAC does not match the address inside the ARP packet.

What it is. arpwatch is a program from the Lawrence Berkeley National Laboratory (LBNL) that listens to ARP (Address Resolution Protocol) traffic on one network segment, keeps a database of Ethernet and IP address pairings, and reports new stations and changed pairings by syslog and email. Its manual describes it in one line, keeping track of ethernet/ip address pairings, and its value is exactly that memory: it knows which hardware address an IP address had yesterday, so it can say when that changes.

Who made it. arpwatch was written by Craig Leres of the laboratory's Network Research Group, the group that also produced tcpdump, libpcap and traceroute and lists arpwatch among its network tools as the ethernet monitor program. It uses pcap, the packet capture library, to listen for ARP packets on a local Ethernet interface. The laboratory's download directory shows two lives: release 2.1a15, dated 28 July 2006, which Debian's bookworm still packages, and a modernized line from 3.0 (1 December 2019) through 3.1 (5 April 2020) to 3.9 (23 October 2025).

How it works. arpwatch reads ARP (and RARP, Reverse Address Resolution Protocol) frames, compares each sender pairing with its database, arp.dat by default (an empty one must exist before the first run), and writes events. The manual's report messages are the vocabulary of change: new activity (a pair used for the first time in six months or more), new station (an Ethernet address never seen), flip flop (the address changed from the most recently seen one to the second most recently seen one), changed ethernet address (the host switched to a new address) and reused old ethernet address (a change back to the third or older address seen). Syslog messages flag oddities in single packets: ethernet broadcast and ip broadcast for broadcast addresses used as a host's, bogon for a source IP address outside the local subnet, and ethernet mismatch when the frame's source MAC (media access control) address does not match the address inside the ARP packet. A vendor list, ethercodes.db, lets reports name the manufacturer behind an address. Options choose the interface (-i), the database (-f), extra local networks (-n), a savefile to read instead of the network (-r, for captures made with tcpdump), a recipient (-m) and, in Debian's build, a range to ignore such as a DHCP (Dynamic Host Configuration Protocol) pool, with -z.

What poisoning looks like in its output. A gateway 192.0.2.1 is known at 00-00-5E-00-53-01 (documentation addresses). A poisoner broadcasts that 192.0.2.1 is at 00-00-5E-00-53-66: arpwatch reports changed ethernet address. The real gateway answers its next request: flip flop. As the two keep overwriting each other, the flip flops repeat, a pattern no normal host produces. A careless forger whose frame source differs from the ARP sender address also triggers ethernet mismatch; in H D Moore's 2008 capture most of the 29 forged replies carried the sender's own hardware address in both places, which a mismatch check would not flag, but the flip flops would.

Where it fits. Cisco's 2002 and 2006 layer 2 presentations both recommend it as a detector where switches cannot inspect ARP, with the operational catch that it sees only the segment it listens on, so a network needs one per VLAN (virtual local area network); Bhaiji's 2006 slides put it bluntly, an arpwatch server on every VLAN. Debian's build makes the point concrete: when a filter is given, the program applies (arp or rarp) and not vlan, so tagged ARP is not counted and each VLAN needs its own interface. It detects rather than prevents; Dynamic ARP Inspection on the switch, Wireshark's duplicate-address warning in a capture and arpwatch on a host are three views of the same evidence.

Limits and misreadings. arpwatch hears only what reaches its interface: a unicast reply aimed at one victim, the kind Moore captured, never reaches a monitor on another switch port unless that port mirrors traffic. Normal life also produces its messages: a replaced network card, a virtual machine moved between hosts, a DHCP address reused by another laptop, or a high-availability pair that moves an address on failover all report changes, so alerts need a person who knows the network. A DECnet flip flop is suppressed by design, and the manual admits the suppression is not always successful. Neighbours: ARP, ARP poisoning, the ARP cache, dynamic ARP inspection, syslog and Wireshark.

Also known as: arpwatch, arpsnmp, flip flop

Sources

← Back to A Back to the glossary