Campus & VLANs · qinq_mpls_trunk.fasmFrameAssembly v1.5.1

Craft 802.1Q VLAN, 802.1ad QinQ, MPLS & DiffServ DSCP QoS Captures

You are turning up a Metro Ethernet circuit or campus QoS policy and need a test capture with 802.1Q VLAN priority (PCP 5, DSCP 46) plus outer S-VLAN 2000, inner C-VLAN 150, and MPLS label 40960.

What This Capture Builds

Emits a voice VLAN RTP frame (VLAN 110, PCP 5, DSCP 46) followed by double-tagged qinq 2000 inner_vlan 150 and mpls 40960 frames.

How to Customize

  1. Define the branch CPE and HQ gateway.
  2. Add vlan, pcp, dscp, qinq, inner_vlan, and mpls tags before the protocol keyword.
qinq_mpls_trunk.fasm
host branch_cpe { ip 10.220.1.10 }
host hq_gateway { ip 10.220.1.200 }
flow metro_trunk(cpe, hq) {
cpe -> hq vlan 110 pcp 5 dei 0 dscp 46 rtp pt 0 seq 1 timestamp 160 payload "G711_VOICE_EF" wait 5ms
cpe -> hq qinq 2000 inner_vlan 150 mpls 40960 exp 5 tls client_hello sni "wan.example.com" wait 5ms
cpe <- hq qinq 2000 inner_vlan 150 mpls 40960 exp 5 tls server_hello wait 5ms
}
compile {
metro_trunk(branch_cpe, hq_gateway)
}
Local CLI Compile, Inspect & Replay Commands
# Compile the VLAN, QinQ, MPLS & DSCP QoS capture
frameassembly qinq_mpls_trunk.fasm -o qinq_mpls_trunk.pcap

# Verify VLAN IDs, 802.1p PCP priority, DSCP markings, and MPLS labels in tshark
tshark -r qinq_mpls_trunk.pcap -T fields -e frame.number -e vlan.id -e vlan.priority -e mpls.label -e ip.dsfield.dscp

# Replay onto your 802.1Q / 802.1ad trunk interface
sudo tcpreplay -i eth0 qinq_mpls_trunk.pcap
Step Up From Browser Sandbox to Local Workflow

Automate qinq_mpls_trunk.fasm locally with the CLI & VS Code Extension

Commit .fasm files to Git, get syntax highlighting in VS Code, and compile .pcap captures in milliseconds.

Install CLI + VS Code

More Packet & .pcap Use Cases

Browse 81-Protocol Docs