Viewing OSI layers on Wireshark

Ann K. Hoang
The Cabin Coder
Published in
2 min readMar 2, 2015

Wireshark is a great tool to see the OSI layers in action. I use a VM to start my Window 7 OS, and test out Wireshark, since I have a mac. I start Wireshark, then go to my browser and navigate to the google site.

In my Wireshark log, I can see several DNS requests to google. My computer at IP address 10.0.0.2 is querying the Domain Name Server to locate the IP address of google.com site. The “A” code means the request is for IPv4:

ws

It may take several requests until the server finds the address. This is what a DNS response look like:

ws2

Once the server finds google.com, we get a HTTP response, which correspond to our OSI layer:

ws3

The HTTP is our Application layer, with its own headers. Let’s go through all the other layers:

Layer 4, the transport layer

transport layer

Layer 3, the network layer (or the internet layer in TCP/IP)

network layer

Layer 2, the DataLink Layer

datalink layer

Layer 1, the Physical Layer

physical layer

--

--

Ann K. Hoang
The Cabin Coder

Senior Software Engineer. Born in Saigon. Raised in the Silicon Valley. Currently in Seattle, WA.