Anthology 02Layer 314 CapturesFrameAssembly v3.2.2
Raw .mdllms-full.txt

ICMPv4/v6, Dual-Stack Flows, Fragmentation & DiffServ QoS

Reusable IPv4 and IPv6 flow(src, dst) reachability checks, Path MTU Discovery (df), manual IPv4 fragment offsets (ipid, mf, fragoffset), IPv6 Neighbor Discovery (ndp), and IGMP/MLD group joins.

Key Takeaways
  • Define one flow name(a, b) block and invoke it over IPv4 and IPv6 host pairs so icmp morphs cleanly between IPv4 Proto 1 and IPv6 Next Header 58.
  • igmp validates IPv4 endpoints exclusively, whereas ndp and mld validate IPv6 endpoints and RFC multicast MACs (33:33:xx:xx:xx:xx).
  • Unified ttl, dscp, and ecn modifiers work identically across IPv4 TOS and IPv6 Traffic Class headers.
Companion walkthrough:VLANs, QinQ, VPNs & IPv6
Example 02.012 Ethernet framesFilter: icmp || icmpv6

Dual-Stack IPv4 & IPv6 Reachability via Parameterized flow(a, b)

Reuses a single flow(src, dst) definition across both IPv4 and IPv6 host pairs so protocol builders automatically morph from IPv4 ICMP (Proto 1) to IPv6 ICMPv6 (Next Header 58).

Wire details: flowlabel 0x12345 applies to the IPv6 header and is cleanly ignored when the same flow runs over IPv4 endpoints.

dual_stack_icmp_flow.frasm14 lines
Open in Playground
host probe_v4 { ip 10.20.1.10 }
host core_v4 { ip 10.20.1.1 }
host probe_v6 { ip 2001:db8:20::10 }
host core_v6 { ip 2001:db8:20::1 }
flow reachability_check(src, dst) {
src -> dst icmp echorequest id 0x4200 seq 1 dscp 46 ecn 2 flowlabel 0x12345 wait 2ms
src <- dst icmp echoreply id 0x4200 seq 1 dscp 46 ecn 2 flowlabel 0x12345 wait 5ms
}
compile {
reachability_check(probe_v4, core_v4)
reachability_check(probe_v6, core_v6)
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly dual_stack_icmp_flow.frasm
Protocol references:icmp(ICMP / ICMPv6)
Example 02.022 Ethernet framesFilter: ip.id == 0x7788

IPv4 Multi-Fragment Reassembly Test (ipid, mf & fragoffset)

Emits two correlated IPv4 UDP fragments sharing ipid 0x7788 to verify firewall fragment-reassembly engines and Suricata defrag thresholds.

Wire details: Fragment 1 sets More-Fragments (mf) with fragoffset 0; Fragment 2 clears mf and sets fragoffset 2 (16-byte offset in 8-byte units).

ipv4_fragment_reassembly.frasm7 lines
Open in Playground
host sender_box { ip 172.16.30.10 }
host dpi_sensor { ip 172.16.30.50 }
compile {
sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 mf fragoffset 0 payload "FRAGMENT-PART-01" wait 1ms
sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 fragoffset 2 payload "FRAGMENT-PART-02"
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly ipv4_fragment_reassembly.frasm
Protocol references:udp(UDP)
Example 02.034 Ethernet framesFilter: udp.port >= 33434 || icmp

UDP Traceroute Hop Expiration (TTL=1 Time Exceeded + Port Unreachable)

Reproduces a classic Unix UDP traceroute across an intermediate router hop (TTL=1 -> ICMP Time Exceeded) followed by arrival at the target host (TTL=2 -> ICMP Port Unreachable).

Wire details: ICMP Type 11 Code 0 marks transit TTL expiry; ICMP Type 3 Code 3 signals the final destination port 33435.

traceroute_ttl_hops.frasm10 lines
Open in Playground
host workstation { ip 10.10.0.25 }
host hop1_router { ip 10.10.0.1 }
host dest_server { ip 10.90.0.40 }
compile {
workstation -> dest_server udp srcport 51200 dstport 33434 ttl 1 payload "probe-hop-1" wait 2ms
hop1_router -> workstation icmp timeexceeded type 11 code 0 wait 5ms
workstation -> dest_server udp srcport 51200 dstport 33435 ttl 2 payload "probe-hop-2" wait 3ms
dest_server -> workstation icmp destunreach type 3 code 3
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly traceroute_ttl_hops.frasm
Protocol references:udp(UDP)icmp(ICMP / ICMPv6)
Example 02.044 Ethernet framesFilter: icmpv6

IPv6 Router Discovery & Neighbor Solicitation / Advertisement (NDP)

Captures IPv6 Router Solicitation, Router Advertisement, and link-layer Neighbor Solicitation / Advertisement with Hop Limit 255.

Wire details: ndp automatically sets IPv6 Hop Limit to 255 per RFC 4861 so router anti-spoofing checks pass.

ipv6_ndp_slaac_resolution.frasm9 lines
Open in Playground
host host_v6 { ip fe80::21a:2bff:fe3c:4d5e mac 00:1a:2b:3c:4d:5e }
host router_v6 { ip fe80::1 mac 00:1c:73:00:00:01 }
compile {
host_v6 -> router_v6 ndp routersolicit slla 00:1a:2b:3c:4d:5e wait 3ms
host_v6 <- router_v6 ndp routeradvert routerlifetime 1800 slla 00:1c:73:00:00:01 wait 5ms
host_v6 -> router_v6 ndp neighborsolicit target fe80::1 slla 00:1a:2b:3c:4d:5e wait 1ms
host_v6 <- router_v6 ndp neighboradvert target fe80::1 tlla 00:1c:73:00:00:01
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly ipv6_ndp_slaac_resolution.frasm
Protocol references:ndp(IPv6 NDP)
Example 02.055 Ethernet framesFilter: ip.flags.df == 1 || (icmp.type == 3 && icmp.code == 4)

Path MTU Discovery Check (IPv4 DF Bit + ICMP Fragmentation Needed)

Checks that an edge firewall permits ICMP Type 3 Code 4 (Fragmentation Needed) when a Don't-Fragment (df) HTTPS segment hits a lower-MTU IPSec or GRE tunnel.

Wire details: Blocking ICMP Type 3 Code 4 causes classic "pings work, but HTTPS hangs" tickets. Use df on IPv4 packets to set the Don't-Fragment bit cleanly.

fw_pmtud_df_check.frasm17 lines
Open in Playground
// Branch client, VPN tunnel router (1400-byte MTU), and remote web server
host branch_client { ip 10.25.1.15 }
host vpn_router { ip 10.25.1.1 }
host remote_web { ip 10.90.5.80 }
compile {
// 1. Normal TCP 3-way handshake succeeds (small 60-byte packets pass any MTU)
branch_client -> remote_web tcp syn srcport 54210 dstport 80 win 65535 mss 1460 df wait 2ms
branch_client <- remote_web tcp syn ack win 65535 mss 1460 df wait 2ms
branch_client -> remote_web tcp ack df wait 1ms
// 2. Client sends HTTP request with Don't-Fragment (df) flag set
branch_client -> remote_web http post uri "/upload" hosthdr "files.corp.internal" body "large-unfragmentable-payload-block" df wait 2ms
// 3. Tunnel router notifies client to lower its packet size (ICMP Type 3, Code 4)
vpn_router -> branch_client icmp destunreach type 3 code 4
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly fw_pmtud_df_check.frasm
Example 02.066 Ethernet framesFilter: icmp

ICMP Ping Sweep (Live Replies vs. Host Unreachable)

Pings three subnet targets in sequence: two active servers answer with Echo Reply, while the router reports Host Unreachable (Type 3, Code 1) for a dead address.

Wire details: Use this capture in Wireshark training to compare fast sub-millisecond LAN replies against router-generated ICMP Destination Unreachable responses.

scan_icmp_ping_sweep.frasm20 lines
Open in Playground
// Admin workstation, branch router, and three target IPs
host admin_pc { ip 10.12.0.50 }
host branch_rtr { ip 10.12.10.1 }
host dns_01 { ip 10.12.10.10 }
host print_01 { ip 10.12.10.20 }
host offline_pc { ip 10.12.10.99 }
compile {
// Target 1 (.10): Online DNS server replies in 1ms
admin_pc -> dns_01 icmp echorequest id 300 seq 1 wait 1ms
admin_pc <- dns_01 icmp echoreply id 300 seq 1 wait 3ms
// Target 2 (.20): Online printer replies in 2ms
admin_pc -> print_01 icmp echorequest id 300 seq 2 wait 2ms
admin_pc <- print_01 icmp echoreply id 300 seq 2 wait 3ms
// Target 3 (.99): Offline host -> Router returns ICMP Host Unreachable (Type 3, Code 1)
admin_pc -> offline_pc icmp echorequest id 300 seq 3 wait 15ms
branch_rtr -> admin_pc icmp destunreach type 3 code 1
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly scan_icmp_ping_sweep.frasm
Protocol references:icmp(ICMP / ICMPv6)
Example 02.072 Ethernet framesFilter: icmp || icmpv6

Minimal Two-Block ICMP / ICMPv6 (icmp) Quickstart

Smallest zero-boilerplate host + compile capture for Internet Control Message Protocol v4 & Dual-Stack ICMPv6 (IP Proto 1 (v4) / NextHdr 58 (v6), Dual-Stack Morphing (v4/v6)).

Wire details: Automatically selects IPv4 Protocol 1 (0x0800) over IPv4 endpoints or ICMPv6 Next Header 58 (0x86dd) over IPv6 endpoints.

icmp_quickstart.frasm7 lines
Open in Playground
host client { ip 10.0.0.10 }
host router { ip 10.0.0.1 }
compile {
client -> router icmp echorequest wait 2ms
client <- router icmp echoreply
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly icmp_quickstart.frasm
Protocol references:icmp(ICMP / ICMPv6)
Example 02.082 Ethernet framesFilter: icmpv6.type >= 133 && icmpv6.type <= 137

Minimal Two-Block IPv6 NDP (ndp) Quickstart

Smallest zero-boilerplate host + compile capture for IPv6 Neighbor Discovery Protocol (ICMPv6 NextHdr 58 (Hop Limit 255), IPv6-Only).

Wire details: Enforces IPv6 Hop Limit 255 (ttl 255) by default in accordance with RFC 4861 §6.1.2 / §7.1.1.

ndp_quickstart.frasm7 lines
Open in Playground
host host_v6 { ip 2001:db8:cafe::25 mac 00:1b:21:aa:00:25 }
host router_v6 { ip 2001:db8:cafe::1 mac 00:1c:73:bb:00:01 }
compile {
host_v6 -> router_v6 ndp neighborsolicit target 2001:db8:cafe::1 slla 00:1b:21:aa:00:25 wait 1ms
host_v6 <- router_v6 ndp neighboradvert target 2001:db8:cafe::1 tlla 00:1c:73:bb:00:01
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly ndp_quickstart.frasm
Protocol references:ndp(IPv6 NDP)
Example 02.092 Ethernet framesFilter: igmp

Minimal Two-Block IGMPv1/v2/v3 (igmp) Quickstart

Smallest zero-boilerplate host + compile capture for Internet Group Management Protocol v1, v2 & v3 (IPv4 Proto 2 (TTL 1), IPv4-Only).

Wire details: Encapsulates inside IPv4 Protocol 2 with link-local ttl 1 by default.

igmp_quickstart.frasm7 lines
Open in Playground
host querier { ip 10.20.1.1 }
host receiver { ip 10.20.1.55 }
compile {
querier -> receiver igmp v2 query group 224.0.0.1 maxresp 100 wait 5ms
receiver -> querier igmp v2 report group 239.1.1.10
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly igmp_quickstart.frasm
Protocol references:igmp(IGMPv1/v2/v3)
Example 02.102 Ethernet framesFilter: icmpv6.type >= 130 && icmpv6.type <= 132

Minimal Two-Block IPv6 MLD (mld) Quickstart

Smallest zero-boilerplate host + compile capture for Multicast Listener Discovery v1 & v2 (IPv6) (ICMPv6 NextHdr 58 (Hop Limit 1), IPv6-Only).

Wire details: Sets IPv6 Next Header to 58 (ICMPv6) and defaults Hop Limit (ttl) to 1 per RFC 2710.

mld_quickstart.frasm7 lines
Open in Playground
host rtr_v6 { ip fe80::1 }
host node_v6 { ip fe80::25 }
compile {
rtr_v6 -> node_v6 mld query maxrespdelay 10000 wait 3ms
node_v6 -> rtr_v6 mld report multicastaddr ff02::1:ff00:25
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly mld_quickstart.frasm
Protocol references:mld(IPv6 MLD)
Example 02.115 Ethernet framesFilter: icmp || icmpv6

ICMP / ICMPv6 (icmp): Dual-Stack Echo Flow Plus IPv4 Fragmentation-Needed & Traceroute TTL Expiry

Reuses a ping_test(src, dst) flow across IPv4 and IPv6 hosts, then sends a router Time Exceeded (ttl 1) and Fragmentation Needed (destunreach code 4) reply.

Wire details: Automatically selects IPv4 Protocol 1 (0x0800) over IPv4 endpoints or ICMPv6 Next Header 58 (0x86dd) over IPv6 endpoints. Translates echorequest (8 v4 / 128 v6), echoreply (0 v4 / 129 v6), destunreach (3 v4 / 1 v6), timeexceeded (11 v4 / 3 v6), and redirect (5 v4 / 137 v6).

icmp_dualstack_pmtud.frasm18 lines
Open in Playground
host app_v4 { ip 10.10.0.25 }
host edge_v4 { ip 10.10.0.1 }
host app_v6 { ip 2001:db8:10::25 }
host edge_v6 { ip 2001:db8:10::1 }
flow ping_test(src, dst) {
src -> dst icmp echorequest id 0x2026 seq 1 payload "healthcheck-probe" wait 1ms
src <- dst icmp echoreply id 0x2026 seq 1 payload "healthcheck-probe" wait 2ms
}
compile {
ping_test(app_v4, edge_v4)
ping_test(app_v6, edge_v6)
// Traceroute hop 1 expiry + PMTUD Fragmentation Needed (Type 3, Code 4)
app_v4 -> edge_v4 icmp echorequest id 0x2026 seq 2 ttl 1 df wait 1ms
app_v4 <- edge_v4 icmp timeexceeded code 0 wait 2ms
app_v4 <- edge_v4 icmp destunreach code 4
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly show icmp_dualstack_pmtud.frasm
Protocol references:icmp(ICMP / ICMPv6)
Example 02.124 Ethernet framesFilter: icmpv6.type >= 133 && icmpv6.type <= 137

IPv6 NDP (ndp): IPv6 SLAAC Router Discovery Followed by Neighbor Solicitation & Advertisement

Models a dual-interface IPv6 leaf node soliciting an upstream router (routersolicit -> routeradvert) before resolving next-hop MAC reachability (neighborsolicit -> neighboradvert).

Wire details: Enforces IPv6 Hop Limit 255 (ttl 255) by default in accordance with RFC 4861 §6.1.2 / §7.1.1. Encodes exact ICMPv6 message bodies for routersolicit (133), routeradvert (134, routerlifetime 1800), neighborsolicit (135), neighboradvert (136, Solicited + Override flags set), and redirect (137).

ndp_slaac_discovery.frasm12 lines
Open in Playground
host leaf_node { ip fe80::1b21:ff:feaa:10 mac 00:1b:21:aa:00:10 }
host core_rtr { ip fe80::1c73:ff:febb:01 mac 00:1c:73:bb:00:01 }
compile {
// 1. Host sends Router Solicitation with Source Link-Layer Address (SLLA)
leaf_node -> core_rtr ndp routersolicit slla 00:1b:21:aa:00:10 vlan 100 wait 2ms
// 2. Router replies with Router Advertisement (30-minute router lifetime)
core_rtr -> leaf_node ndp routeradvert routerlifetime 1800 slla 00:1c:73:bb:00:01 vlan 100 wait 5ms
// 3. Neighbor Solicitation & Solicited+Override Neighbor Advertisement
leaf_node -> core_rtr ndp neighborsolicit target fe80::1c73:ff:febb:01 slla 00:1b:21:aa:00:10 vlan 100 wait 1ms
leaf_node <- core_rtr ndp neighboradvert target fe80::1c73:ff:febb:01 tlla 00:1c:73:bb:00:01 vlan 100
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly show ndp_slaac_discovery.frasm
Protocol references:ndp(IPv6 NDP)vlan(802.1Q VLAN)
Example 02.134 Ethernet framesFilter: igmp

IGMPv1/v2/v3 (igmp): VLAN-Tagged IGMPv2 Query,IGMPv3 Receiver Join, and IGMPv2 Fast Leave

Demonstrates a multicast router polling VLAN 50, one receiver joining 239.255.10.1 via IGMPv3, and a second receiver joining and leaving via IGMPv2.

Wire details: Encapsulates inside IPv4 Protocol 2 with link-local ttl 1 by default. Maps version + operation cleanly onto wire Type codes: 0x11 (query, 8B in v1/v2 or 12B in v3), 0x12 (v1 report), 0x16 (v2 report), 0x17 (v2 leave), and 0x22 (v3 report with MODE_IS_EXCLUDE Group Record).

igmp_snooping_vlan.frasm14 lines
Open in Playground
host mcast_rtr { ip 10.50.0.1 }
host all_hosts { ip 224.0.0.1 }
host decoder_1 { ip 10.50.0.21 }
host decoder_2 { ip 10.50.0.22 }
compile {
// 1. General Query to 224.0.0.1 (auto-derives MAC 01:00:5e:00:00:01)
mcast_rtr -> all_hosts igmp v2 query group 0.0.0.0 maxresp 100 vlan 50 wait 4ms
// 2. Receiver 1 sends IGMPv3 Membership Report for 239.255.10.1
decoder_1 -> mcast_rtr igmp v3 report group 239.255.10.1 vlan 50 wait 3ms
// 3. Receiver 2 joins and then leaves 239.255.10.2 via IGMPv2
decoder_2 -> mcast_rtr igmp v2 report group 239.255.10.2 vlan 50 wait 20ms
decoder_2 -> mcast_rtr igmp v2 leave group 239.255.10.2 vlan 50
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly show igmp_snooping_vlan.frasm
Example 02.143 Ethernet framesFilter: icmpv6.type >= 130 && icmpv6.type <= 132

IPv6 MLD (mld): Link-Local MLD General Query, Solicited-Node Join, and Listener Done

Simulates an IPv6 multicast router querying all link-local nodes (ff02::1), a subscriber reporting membership in ff05::100, and cleanly departing with mld done.

Wire details: Sets IPv6 Next Header to 58 (ICMPv6) and defaults Hop Limit (ttl) to 1 per RFC 2710. Encodes ICMPv6 Type 130 (query), 131 (report), or 132 (done), 16-bit Maximum Response Delay (milliseconds), and 128-bit Multicast Address.

mld_snooping_ipv6.frasm13 lines
Open in Playground
host querier_v6 { ip fe80::1c73:1 }
host all_nodes { ip ff02::1 }
host all_rtrs { ip ff02::2 }
host listener { ip fe80::1b21:50 }
compile {
// 1. General MLD Query to ff02::1 (multicastaddr :: = all groups, 10000ms max delay)
querier_v6 -> all_nodes mld query multicastaddr :: maxrespdelay 10000 vlan 200 wait 4ms
// 2. Host joins site-local multicast stream ff05::100
listener -> querier_v6 mld report multicastaddr ff05::100 maxrespdelay 0 vlan 200 wait 25ms
// 3. Host sends MLD Done to all-routers multicast ff02::2 upon leaving
listener -> all_rtrs mld done multicastaddr ff05::100 vlan 200
}
Terminal Commands (FrameAssembly CLI v3.2.2)
frameassembly show mld_snooping_ipv6.frasm
Protocol references:mld(IPv6 MLD)vlan(802.1Q VLAN)