CS331 / lab-01 Wireshark Packet Capture and Display Filtering
Docs
LAB 01CS331Status: Operational

Wireshark Packet Capture
and Display Filtering

Reading real packets off a MacBook's Wi-Fi interface, from the Ethernet header to the round-trip time.

StudentShoug Fawaz Abdullah Alomran
InstructorMs. Nada ALALYANI
Term261 · 2026–2027 · PSU
SETUPmacOS · MacBook Air M2

Same lab, different OS

The lab sheet was written for Windows. I did it on macOS with the equivalent commands.

Lab sheet (Windows)Used on macOSWhy
ipconfig /allifconfig en0MAC and IPv4 of the Wi-Fi interface
ping -4ping -c 4Four echoes, then stop
—Private Wi-Fi Address: OffShow the real hardware MAC, not a random one
L2 · L3en0 active

Capturing on en0

IPv4 · Layer 3192.168.1.229
MAC · Layer 2 · redacteda8:8f:d9:xx:xx:xx
zsh · MacBook Air
% ifconfig en0en0: flags=8863<UP,BROADCAST,RUNNING> mtu 1500	ether a8:8f:d9:xx:xx:xx	inet 192.168.1.229 netmask 0xffffff00	status: active
DISPLAY FILTERS

Capture everything. Display what matters.

Apply a display filter …http
No.TimeSourceDestinationProtoInfo
10.000192.168.1.229local DNSDNSStandard query A neverssl.com
20.021local DNS192.168.1.229DNSStandard query response A neverssl.com
30.034192.168.1.229neverssl.comTCP→ 80 [SYN]
40.120neverssl.com192.168.1.229TCP80 → [SYN, ACK]
50.121192.168.1.229neverssl.comTCP[ACK]
60.122192.168.1.229neverssl.comHTTPHEAD / HTTP/1.1
70.208neverssl.com192.168.1.229HTTPHTTP/1.1 200 OK
80.209192.168.1.229neverssl.comTCP[ACK]

Illustrative rows. Names are shown in place of server addresses. The filter only hides rows, the capture is unchanged.

L3 · L76 filters · 1 capture

Six filters, one capture

http

Only HTTP: the request and the 200 OK.

ip.addr == 192.168.1.229

To or from my Mac.

ip.src == 192.168.1.229

Only what my Mac sent.

ip.dst == 192.168.1.229

Only what my Mac received.

ip.dst == 192.168.1.229 and http

Both conditions: HTTP coming in.

dns or http

Either one: each lookup next to its request.

L7 · HTTPfilter: http
Wireshark · en0 · http
Wireshark with the http display filter applied
The http filter leaves only the HEAD / request and the 200 OK response.
L4 · L7www.psu.edu.sa

PSU only speaks HTTPS

Port 80 does not answer, so curl timed out. HTTPS is encrypted, so the http filter has nothing to show.

For plain HTTP I used neverssl.com.

:80
HTTP53 SYNs, 0 replies · curl timed out
:443
HTTPSopen · TLS, unreadable to the http filter
zsh · curl
% curl -I http://neverssl.comHTTP/1.1 200 OK
L7 · DNSgoogle.com.sa

One name, two correct answers

Mac
nslookup
Local
192.168.1.1
172.217.17.35
answer
Mac
nslookup
8.8.8.8
anycast
142.250.203.3
answer
  • Many front ends. Google serves the same site from many addresses.
  • Answer depends on who asks. Each resolver gets a server near where it seems to be. The ping used the local answer, 172.217.17.35.
  • Anycast. 8.8.8.8 is one address announced from many sites. The nearest one answers.
L3 · ICMPping -c 4 google.com.sa → 172.217.17.35

10 ICMP packets, not 8

from me from Google from me, error report
6Source = 192.168.1.229
4Source = 172.217.17.35

The two port unreachables are not part of the ping. My Mac sent them for UDP that arrived on closed ports: a late DNS reply from 192.168.1.1 (frame 321) and a packet from a Cloudflare address (frame 419).

L3 · ICMPfilter: icmp
Wireshark · en0 · icmp
Wireshark with the icmp display filter applied, 10 packets
8 echo packets and 2 destination unreachable (port unreachable).
L2 vs L3frame 228 · first echo request

MAC is hop-by-hop. IP is end-to-end.

Mac
a8:8f:d9:…
GW
192.168.1.1
…
more hops
Google
172.217.17.35
new frame · TTL −1
dst MAC 24:5a:4c:81:24:16 · TTL 64dst MAC: next router · TTL 63dst IP: 172.217.17.35 (unchanged)
  • Frame 228's destination MAC is the router, not Google. Google isn't on my Wi-Fi, so my Mac can only hand the frame to the gateway.
  • Each router builds a new frame for the next link. The IP addresses stay the same the whole way.
L2 · ETHERNET IIframe 228

Reading the Ethernet header

Destination · 6 B24:5a:4c:81:24:16gateway · 192.168.1.1
Source · 6 Ba8:8f:d9:xx:xx:xxmy Mac
Type0x0800IPv4
PayloadIPv4 → ICMP echo request192.168.1.229 → 172.217.17.35

EtherType 0x0800 tells the receiver that the payload is IPv4 and should go up to the IP layer.

Wireshark · Frame 228 · Ethernet II
Frame 228 Ethernet II details in Wireshark
L3 · TIMINGsame echo, two clocks

78.52 ms on the wire, 121.913 ms in ping

No.TimeSourceDestinationProtoInfo
22810.013828192.168.1.229172.217.17.35ICMPEcho (ping) request
23010.092348172.217.17.35192.168.1.229ICMPEcho (ping) reply
Wireshark
78.52 ms
ping
121.913 ms

Wireshark stamps packets at the interface. ping times from inside the app, so it also counts the kernel, socket buffers and process scheduling. The extra 43 ms is spent inside the Mac, and only on the first echo: the next three differ by about 2 ms.

FINDINGSall objectives met

What the capture showed

HTTPS hides HTTP

PSU: 53 SYNs to port 80, no reply. neverssl.com gave a readable 200 OK.

DNS depends on who asks

172.217.17.35 locally, 142.250.203.3 via 8.8.8.8. Both are correct.

10 ICMP, not 8

4 + 4 echo, plus 2 port unreachable from my Mac.

Gateway MAC, Google IP

Frame 228 went to 24:5a:4c:81:24:16 but was addressed to 172.217.17.35. 0x0800 = IPv4.

EOFConnection closed gracefully

Thank you

Questions?

Shoug Fawaz Abdullah Alomran · CS331 · Ms. Nada ALALYANI

Read the full write-up →