Interactive Tutorial · Local Browser WebAssembly · 5 min

Chapter 1: Core Syntax & Basic Ping (host + compile)

Learn the two-block .frasm layout, the lowercase keyword rule, and how to build a 4-packet LAN ping capture from scratch.

Labs completed0/7
The Situation · 5 min

A user ticket claims "the LAN is down." Build a clean 4-packet ping capture (laptop -> gateway and laptop -> dns_srv) to test Wireshark display filters and baseline connectivity.

What You'll Pull Off Here

  • Declare network devices with host name { ip ... } using plain IPv4 or IPv6 addresses.
  • Send Ethernet frames top-to-bottom inside compile { ... } (1 line = 1 frame on the wire).
  • Apply the Golden Keyword Rule: built-in keywords are lowercase letters + digits with zero underscores (echorequest, never echo_request).
Interactive Lab Check

Lab 1: Declare dns_srv & Complete a 4-Packet Ping Check

Add a third device host dns_srv { ip 192.168.1.53 }, then send laptop -> dns_srv icmp echorequest and dns_srv -> laptop icmp echoreply so your capture contains 4 ICMP frames.

  1. 1.Add host dns_srv { ip 192.168.1.53 } right underneath host gateway.
  2. 2.Inside compile { ... }, add laptop -> dns_srv icmp echorequest id 101 seq 1.
  3. 3.Add dns_srv -> laptop icmp echoreply id 101 seq 1, then click Check Exercise.

1. host — Naming the Devices on Your Segment

Every .frasm file opens by listing the devices on the wire with host. Give each device a clear label (laptop, dns_srv, fw-dmz-01) and put ip <address> inside curly braces { ... }.

If you omit mac, FrameAssembly assigns clean, repeatable MAC addresses in order (00:00:00:00:00:01, 00:00:00:00:00:02, ...) so you only type Layer 2 MACs when testing ARP, STP, or port security.

  • Plain host IPs only (ip 192.168.1.10) — never include /24 CIDR masks, = signs, or commas.
  • Write notes for teammates using // comments (# and ; are rejected).
  • Built-in keywords never contain underscores or hyphens: write echorequest and echoreply, never echo_request.

2. compile — One Line Equals One Ethernet Frame

Place compile { ... } below your host declarations. Each line emits one complete Ethernet II + IP + ICMP frame into your .pcap, calculating total lengths and RFC 1071 checksums automatically.

Word-by-Word Syntax Breakdown
How one .frasm line maps directly to Wireshark columns:
laptop -> gateway icmp echorequest id 100 seq 1
laptopSenderSource host (192.168.1.10, auto-MAC 00:00:00:00:00:01)
->DirectionSends the frame from laptop toward gateway
gatewayReceiverDestination host (192.168.1.1, auto-MAC 00:00:00:00:00:02)
icmp echorequestProtocol & TypeICMPv4 Echo Request (Type 8, Code 0)
id 100 seq 1Optional FieldsSets ICMP identifier 100 and sequence number 1
Quick Formatting Reference (3 rules)
ItemValid .frasmAvoid
Host IP formathost laptop { ip 192.168.1.10 }host laptop { ip = "192.168.1.10/24" }
ICMP ping keywordslaptop -> gateway icmp echorequestlaptop -> gateway icmp echo_request
Comments// Ping default gateway# Ping default gateway
first_ping_check.frasmLoading WASM…
Wireshark filter: icmp
Open in Playground
0 B · 0.000 ms
Compiling capture in WebAssembly…
Learn FrameAssembly: Docs, Protocols & Labs — FrameAssembly