Protocol 1 of 81Layer 2FrameAssembly v3.1.2
llms-full.txt
arpAddress Resolution Protocol & Gratuitous ARP

Who Has 10.0.10.1? Broadcast ARP, Unicast Replies & GARP Takeovers

Default Port / Protocol
EtherType 0x0806
Host Endpoint Rule
MAC-Only or IP
Wireshark Display Filter
arp
Standards & Specs
RFC 826, RFC 5227
Wire Stack:Ethernet IIARP / GARP (EtherType 0x0806)

What It Does on the Wire

Every network outage eventually gets blamed on DNS or ARP — with a -> b arp you can script broadcast Who-Has queries, a <- b arp reply answers, and arp gratuitous VIP takeovers in three lines flat.

Address Resolution Protocol (arp) maps IPv4 layer-3 addresses to 48-bit Ethernet MAC addresses inside a 28-byte ARP payload carried directly over Ethernet II (0x0806). FrameAssembly synthesizes standard broadcast Who-Has requests (request), unicast is-at replies (reply), and broadcast Gratuitous ARP announcements (gratuitous / garp) used during VRRP/HSRP failovers and duplicate-IP detection.

Because arp is a native Layer 2 protocol, endpoints may declare both ip and mac or operate as pure MAC-only hosts with explicit senderip/targetip (spa/tpa) fields—making it straightforward to craft Dynamic ARP Inspection (DAI) positive and negative test cases.

Dynamic ARP Inspection (DAI) & Spoofing Detection

Craft mismatched Ethernet source MAC (srcmac) and ARP Sender Hardware Address (sha/sendermac) frames inside an 802.1Q vlan to verify switch DAI drop counters and Suricata Layer 2 alerts.

FHRP VIP Failover & Gratuitous ARP Validation

Emit arp gratuitous frames advertising a shared virtual IP (10.0.10.254) and virtual MAC (00:00:5e:00:01:0a) to test L2 MAC-table updates across leaf switches.

Wireshark Duplicate-IP & Probe Capture Fixtures

Build RFC 5227 ARP Probe (senderip 0.0.0.0) and ARP Announcement sequences to validate embedded TCP/IP stack conflict resolution.

Minimal Quickstart (arp_quickstart.frasm)

Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.

arp_quickstart.frasm6 lines
Open in Playground
host client { ip 10.0.10.25 mac 00:1b:21:aa:00:25 }
host gateway { ip 10.0.10.1 mac 00:1b:21:aa:00:01 }
compile {
client -> gateway arp
}

What the Compiler Calculates So You Don't Have To

  • Sets Ethernet II EtherType to 0x0806 and broadcasts request frames to destination MAC ff:ff:ff:ff:ff:ff unless dstmac is overridden.
  • Populates Hardware Type 1 (Ethernet), Protocol Type 0x0800 (IPv4), hlen=6, plen=4, and opcode=1 (request).
  • Fills sendermac (sha) and senderip (spa) from the source host, sets targetmac (tha) to 00:00:00:00:00:00 on requests, and sets targetip (tpa) from the destination host.
  • Pads the Ethernet frame cleanly when needed and switches reply frames to unicast peer MACs automatically.
Multi-Frame Lab · Ready to Compile

VLAN-Tagged ARP Resolution Followed by Gratuitous ARP VIP Takeover

Simulates a workstation resolving its default gateway on VLAN 10, followed by a standby router broadcasting an RFC 5227 Gratuitous ARP announcement during a virtual IP takeover.

arp_garp_failover.frasm12 lines
Open in Playground
host workstation { ip 10.10.10.50 mac 00:1b:21:10:00:50 }
host rtr_active { ip 10.10.10.1 mac 00:00:5e:00:01:01 }
host rtr_standby { ip 10.10.10.2 mac 00:1b:21:10:00:02 }
compile {
// 1. Broadcast ARP Who-Has on VLAN 10
workstation -> rtr_active arp request vlan 10 pcp 3 wait 1ms
// 2. Unicast ARP Is-At reply from active gateway
workstation <- rtr_active arp reply vlan 10 wait 5ms
// 3. Standby router takes over VIP 10.10.10.1 and broadcasts GARP
rtr_standby -> workstation arp gratuitous sendermac 00:00:5e:00:01:01 senderip 10.10.10.1 vlan 10
}
Terminal Commands (FrameAssembly CLI v3.1.2)
# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show arp_garp_failover.frasm

# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly arp_garp_failover.frasm arp_garp_failover.pcap
frameassembly arp_garp_failover.frasm arp_garp_failover.pcapng

# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse arp_garp_failover.pcap arp_garp_failover_edited.frasm

All arp Keywords & Header Options

Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after arp:

src_host -> dst_host arp [request | reply | gratuitous | garp] [sendermac|sha <mac>] [senderip|spa <ipv4>] [targetmac|tha <mac>] [targetip|tpa <ipv4>]
Keyword / OptionAccepted ValueDefaultEffect on Packet
request | reply | gratuitous | garpOperation mode flagrequestSelects Opcode 1 broadcast Who-Has (request), Opcode 2 unicast Is-At (reply), or broadcast Gratuitous ARP (gratuitous/garp with tpa = spa and ff:ff:ff:ff:ff:ff).
sendermac <mac> | sha <mac>48-bit MAC (colon, hyphen, or Cisco dot)Source host MACSets the 6-byte ARP Sender Hardware Address (sha) independently of the outer Ethernet II srcmac.
senderip <ipv4> | spa <ipv4>IPv4 literalSource host IPv4 (or 0.0.0.0 on MAC-only host)Sets the 4-byte ARP Sender Protocol Address (spa).
targetmac <mac> | tha <mac>48-bit MAC (colon, hyphen, or Cisco dot)00:00:00:00:00:00 on request; peer MAC on replySets the 6-byte ARP Target Hardware Address (tha).
targetip <ipv4> | tpa <ipv4>IPv4 literalDestination host IPv4 (or senderip on garp)Sets the 4-byte ARP Target Protocol Address (tpa).

Cross-Layer Wrappers Valid with arp

802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol

6 options
OptionRange / FormatDefaultEffect on Packet
wait <number><ns|us|ms|s|m>Time gap (ns, us, ms, s, m)10msAdvances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back).
payload "<text>" | hexpayload "<hex>"Quoted text or hex bytes (choose one)OmittedAppends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums.
srcmac <mac> | dstmac <mac>Colon, hyphen, or Cisco dot MACHost MAC / RFC multicast MACOverrides the 14-byte Ethernet II source or destination MAC address for this single packet.
vlan <0..4095> [pcp <0..7>] [dei <0|1>]VLAN ID 0..4095, PCP 0..7, DEI 0..1UntaggedWraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority.
qinq <0..4095> [innervlan <0..4095>]Outer S-VLAN 0..4095, Inner C-VLAN 0..4095Untagged (innervlan 1 when qinq is set)Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100).
mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>]Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255Unlabeled (at most 1 mpls tag per packet)Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header.

Gotchas & Quick Fixes

Use ndp for Native IPv6 Neighbor Solicitation

Avoid
host6_a -> host6_b arp senderip 2001:db8::1
Valid v3.1.2 Syntax
host6_a -> host6_b ndp neighborsolicit target 2001:db8::2

ARP senderip/targetip (spa/tpa) are 32-bit IPv4 fields per RFC 826. For IPv6 link-layer address resolution with SLLA/TLLA options and Hop Limit 255, use ndp.

Zero Underscores in Sub-Keywords

Avoid
a -> b arp sender_ip 10.0.0.1 target_ip 10.0.0.2
Valid v3.1.2 Syntax
a -> b arp senderip 10.0.0.1 targetip 10.0.0.2

All FrameAssembly v3.1.2 built-in modifiers are lowercase alphanumeric (senderip/spa, sendermac/sha, targetip/tpa, targetmac/tha).

Field Guide 07
Physical Hardware Labs: Blasting .pcap Captures onto Real Copper & Fiber (tcpreplay)