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.
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 queryanddns responsepackets with matchingtxidvalues.
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.On the
dns queryline, changewait 4mstowait 250ms. - 2.At the bottom of
compile, addbranch_pc <- erp_srv icmp echoreply id 200 seq 1. - 3.Click Check Exercise and inspect the
Time (ms)andSource -> Destinationcolumns.
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. waitalways goes at the end of a packet line — never putwait 250msalone on its own line.- Text values like
qname "erp.corp.local"always use double quotes"...", never single quotes.
Word-by-Word Syntax BreakdownColumn-aligned <- reply + post-packet wait timer:
<- 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 5msbranch_pc <- dns_wanReply ArrowSends from dns_wan (53) back to branch_pc (49152) without flipping columnsdns responseProtocolDNS standard query response over UDP port 53txid 0x2a10Transaction IDMatches the 16-bit ID from the query above itrdata "10.80.1.20"Answer RecordPacks the IPv4 A-record into the DNS answer sectionwait 5msPost-Packet GapAdvances the capture clock by 5 ms before the next lineQuick Formatting Reference (2 rules)
| Item | Valid .frasm | Avoid |
|---|---|---|
Where wait lives | branch_pc -> dns_wan dns query qname "erp.corp.local" wait 250ms | wait 250ms // standalone wait line is a syntax error |
| Quotes | qname "erp.corp.local" qtype "A" | qname 'erp.corp.local' qtype 'A' |
dns || icmp