IPv6, DDI & Campus NAC · ipv6_ndp_dualstack.frasm · 18 framesFrameAssembly v3.2.2

Verify IPv6 First-Hop Security (RA Guard, NDP, DHCPv6) & Dual-Stack

Most test captures sitting in team wikis are IPv4-only from 2014—leaving IPv6 RA Guard, DHCPv6 Guard, ICMPv6 pseudo-header rules, and IPv6 application firewall policies completely untested until production turn-up.

Protocols in capture: vlanndpdhcpdnstcphttp2
Raw .md
Problem

The Catch

Crafting valid IPv6 packets by hand means recalculating 40-byte IPv6 pseudo-header checksums across ICMPv6/TCP/UDP, padding RFC 4861 SLLA/TLLA link-layer options to 8-byte boundaries, and remembering Hop Limit 255 on NDP so switches don’t drop frames as off-link spoofs.

In FrameAssembly, 78 of the 81 protocols morph between IPv4 and IPv6 automatically based solely on the host IP literal—so a single parameterized flow api_probe(c, s) emits both IPv4 (0x0800) and IPv6 (0x86dd) captures back-to-back.

Setup & Topology

Access VLAN 60 IPv6 SLAAC + DHCPv6 Guard Audit + Dual-Stack HTTP/2 Probe

Dual-Stack Client (10.60.1.25 / 2001:db8:60::25) <-> Leaf Switch & Gateway (10.60.1.1 / 2001:db8:60::1)

Eighteen frames validate both first-hop IPv6 security and dual-stack parity: (1) Hop-Limit-255 ndp routersolicit -> routeradvert + neighborsolicit -> neighboradvert with SLLA/TLLA MAC TLVs; (2) 4-packet dhcp v6 solicit -> advertise -> request -> reply on UDP 546/547; and (3) one dual_stack_http2(c, s) flow invoked first on IPv4 hosts and then on IPv6 hosts (flowlabel 0x60200).

Adapt It for Your Network

  1. Update client_v6 and gw_v6 to your 2001:db8:: or production /64 prefix and MACs.
  2. To test switch RA Guard drops, emit an unauthorized ndp routeradvert routerlifetime 1800 from an untrusted host port.
  3. Compile -> verify both ip and ipv6 protocol trees in Wireshark -> run against dual-stack firewall and IDS rules.

.frasm -> .pcap

Preview frames inline or open in Playground ->

Emits 18 frames: 4 RFC 4861 IPv6 NDP frames, 4 RFC 8415 DHCPv6 SARR frames, and a 5-frame DNS + TCP + HTTP/2 flow replayed across IPv4 and IPv6.

ipv6_ndp_dualstack.frasm
Open in Playground
host client_v4 { ip 10.60.1.25 mac 00:1b:21:60:00:25 }
host gw_v4 { ip 10.60.1.1 mac 00:1c:73:60:00:01 }
host client_v6 { ip 2001:db8:60::25 mac 00:1b:21:60:00:25 }
host gw_v6 { ip 2001:db8:60::1 mac 00:1c:73:60:00:01 }
flow ipv6_first_hop_onboarding(host6, rtr6) {
// 1. RFC 4861 Neighbor Discovery (Hop Limit 255 + SLLA / TLLA options)
host6 -> rtr6 vlan 60 ndp routersolicit slla 00:1b:21:60:00:25 wait 2ms
host6 <- rtr6 vlan 60 ndp routeradvert routerlifetime 1800 slla 00:1c:73:60:00:01 wait 3ms
host6 -> rtr6 vlan 60 ndp neighborsolicit target 2001:db8:60::1 slla 00:1b:21:60:00:25 wait 1ms
host6 <- rtr6 vlan 60 ndp neighboradvert target 2001:db8:60::1 tlla 00:1c:73:60:00:01 wait 2ms
// 2. RFC 8415 Stateful DHCPv6 SARR on UDP 546 <-> 547
host6 -> rtr6 vlan 60 dhcp solicit xid 0x006025 dnsserver 2001:db8:60::53 wait 2ms
host6 <- rtr6 vlan 60 dhcp advertise xid 0x006025 dnsserver 2001:db8:60::53 wait 1ms
host6 -> rtr6 vlan 60 dhcp request xid 0x006025 wait 1ms
host6 <- rtr6 vlan 60 dhcp reply xid 0x006025 dnsserver 2001:db8:60::53 wait 4ms
}
flow dual_stack_http2(c, s) {
// 3. Reusable flow: automatically emits IPv4 or IPv6 + pseudo-header checksums
c -> s vlan 60 flowlabel 0x60200 dns query txid 0x6001 qname "api.dualstack.internal" qtype "AAAA" wait 2ms
c -> s vlan 60 flowlabel 0x60200 tcp syn srcport 52443 dstport 443 win 65535 mss 1440 wait 1ms
c <- s vlan 60 flowlabel 0x60200 tcp syn ack win 65535 mss 1440 wait 1ms
c -> s vlan 60 flowlabel 0x60200 tcp ack wait 1ms
c -> s vlan 60 flowlabel 0x60200 http2 settings wait 2ms
}
compile {
ipv6_first_hop_onboarding(client_v6, gw_v6)
dual_stack_http2(client_v4, gw_v4)
dual_stack_http2(client_v6, gw_v6)
}
Local CLI Build, Inspect & Replay Commands
# 1. Preview all 18 IPv6 NDP, DHCPv6, and dual-stack IPv4/IPv6 packets
frameassembly show ipv6_ndp_dualstack.frasm

# 2. Compile to nanosecond .pcapng and inspect ICMPv6 NDP + DHCPv6 options in tshark
frameassembly ipv6_ndp_dualstack.frasm ipv6_ndp_dualstack.pcapng
tshark -r ipv6_ndp_dualstack.pcapng

# 3. Replay onto an access trunk to verify RA Guard, DHCPv6 Guard, and dual-stack ACLs
sudo tcpreplay -i eth0 ipv6_ndp_dualstack.pcapng
Browser Tab -> Local Terminal & VS Code

Keep ipv6_ndp_dualstack.frasm in Git and build .pcap in under 1ms

Single rootless binary + VS Code extension with live squiggles, quick-fixes, and side-by-side packet ladders ready for Wireshark.

Grab CLI + VS Code ->

Related Examples

All 81 Protocols ->