Interactive Tutorial · Local Browser WebAssembly · 5 min

Chapter 2: Basic Examples — Reply Arrows (<-), Timing (wait) & DNS

Keep client <-> server columns aligned like a network sequence diagram and simulate realistic WAN latency down to the microsecond.

Labs completed0/7
The Situation · 5 min

Users at a remote branch complain logins take forever. Build a capture showing a sluggish 250ms WAN DNS lookup followed by a quick ping so junior techs can spot DNS lag in Wireshark.

What You'll Pull Off Here

  • Use <- so client and server stay pinned in consistent left/right columns while MACs, IPs, and UDP/TCP ports flip automatically.
  • Control exact inter-packet delays at the end of any line with wait (ns, us, ms, s, m).
  • Build real UDP port 53 dns query and dns response packets with matching txid values.
Interactive Lab Check

Lab 2: Simulate 250ms WAN DNS Latency & Add an Aligned <- Reply

Change wait 4ms to wait 250ms on the dns query line so Packet #2 arrives at 250.000 ms, then append branch_pc <- erp_srv icmp echoreply id 200 seq 1 at the end of compile.

  1. 1.On the dns query line, change wait 4ms to wait 250ms.
  2. 2.At the bottom of compile, add branch_pc <- erp_srv icmp echoreply id 200 seq 1.
  3. 3.Click Check Exercise and inspect the Time (ms) and Source -> Destination columns.

1. Keep Endpoints in Clean Columns with <-

In Chapter 1 we flipped gateway -> laptop for the reply. Across a 20-packet trace, constantly swapping left and right host names makes it hard to tell who initiated the session.

The reverse arrow <- fixes that: writing branch_pc <- dns_wan dns response ... keeps branch_pc on the left and dns_wan on the right while sending the frame from dns_wan back to branch_pc (flipping MACs, IPs, and ports automatically).

2. Controlling Packet Timestamps with wait

Packet #1 always starts at 0.000 ms. When you omit wait, FrameAssembly advances the capture clock by 10ms before the next packet.

Adding wait 250ms (or 500us, 2s, 0ns) at the end of Packet #1 makes Packet #2 arrive 250.000 ms later.

  • Attach lowercase units directly to the number: 0ns, 250us, 250ms, 2s, 1m.
  • wait always goes at the end of a packet line — never put wait 250ms alone on its own line.
  • Text values like qname "erp.corp.local" always use double quotes "...", never single quotes.
Word-by-Word Syntax Breakdown
Column-aligned <- reply + post-packet wait timer:
branch_pc <- dns_wan dns response txid 0x2a10 qname "erp.corp.local" qtype "A" rdata "10.80.1.20" wait 5ms
branch_pc <- dns_wanReply ArrowSends from dns_wan (53) back to branch_pc (49152) without flipping columns
dns responseProtocolDNS standard query response over UDP port 53
txid 0x2a10Transaction IDMatches the 16-bit ID from the query above it
rdata "10.80.1.20"Answer RecordPacks the IPv4 A-record into the DNS answer section
wait 5msPost-Packet GapAdvances the capture clock by 5 ms before the next line
Quick Formatting Reference (2 rules)
ItemValid .frasmAvoid
Where wait livesbranch_pc -> dns_wan dns query qname "erp.corp.local" wait 250mswait 250ms // standalone wait line is a syntax error
Quotesqname "erp.corp.local" qtype "A"qname 'erp.corp.local' qtype 'A'
wan_dns_latency.frasmLoading WASM…
Wireshark filter: dns || icmp
Open in Playground
0 B · 0.000 ms
Compiling capture in WebAssembly…
Learn FrameAssembly: Docs, Protocols & Labs — FrameAssembly