The OSI model divides communication into layers. Each layer solves one task and uses the layer below for it. In class one usually works with five: in everyday networking layers 5 and 6 are part of the application (as in the TCP/IP model).
Every layer has a fixed colour in leyoNET – in the packet list, in single step mode and here in the wiki. The tags show the protocols leyoNET simulates on that layer, in the same colours as in the packet list.
When a browser requests a web page, an HTTP request is created (layer 7). TCP puts a header with the ports in front (layer 4), IP a header with source and destination address (layer 3), Ethernet a header with the MAC addresses and the checksum FCS at the end (layer 2). On the cable (layer 1) there are only bits in the end, led by preamble and SFD.
1bits
Preamble + SFD8 bytes
Frame · 158 bytes
Gap (IFG)12 bytes
2Frame
Ethernet II14 bytes
Payload: IPv4 · 140 bytes
FCS4 bytes
3Packet
IPv420 bytes
Payload: TCP · 120 bytes
4Segment
TCP20 bytes
Payload: HTTP · 100 bytes
7data
Data · 100 bytes
Real frame from the demo “DNS, TCP and HTTP” (no. 36, 158 bytes), exactly as the packet list in leyoNET shows it.
On the way, every device only unpacks as far as it needs to: a switch looks up to layer 2 (MAC address), a router up to layer 3 (IP address) and puts a new Ethernet header on for the next network. Only the destination unpacks everything.
Seeing it in leyoNET
The packet list shows every frame by layer, each in its colour. In single step mode frames travel across the cables as coloured dots, and every device visibly unpacks as far as its layer requires. The demo “Default gateway” shows it particularly clearly: the IP addresses stay the same from PC to PC, the MAC addresses change at the router.
How to do it in leyoNET
The same text as in the app’s help (F1 key).
OSI model
Each frame is encoded into real bytes and broken down by layer: application (7) at the top, wire (1) at the bottom. Each layer wraps the one above: HTTP inside TCP, TCP inside IP, IP inside Ethernet. Ethernet adds a header in front and the checksum FCS (CRC-32) at the end; preamble and SFD belong to layer 1.
Empty layers are greyed out (e.g. ARP has no layer 3 or 4)
Clicking a field highlights its bytes in the hex view
Structure per standard below a layer draws its header as in the RFC or IEEE standard, with the values of this frame; point at a field for an explanation
Nesting shows how the layers fit inside each other: header, payload and FCS with their lengths
Checksums are computed for real
The same with explanations of every field is in the wiki under «Aufbau von Rahmen und Paketen».
See an example
Slow motion This is how it looks in the simulation: every dot is a frame on the cable.Default gateway
Two subnets connected by a router.
PC 1 sees that the target is in another network and sends the packet to its router. The TTL drops by one.
“Watch live” opens the network in leyoNET, the simulation runs in a loop. In the app you find it under File → Demo networks, with a step-by-step tour.
Practise
★★★★☆Protocol analysis – Task 3: ARP, DNS and HTTP· 7 goals · Worksheet (German)
In leyoNET under Tools → Exercise catalogue. Every exercise checks itself.
Read on
Structure of frames and packetsHow Ethernet frames, IPv4 and IPv6 packets, TCP segments and UDP datagrams nest inside each other, field by field according to the standards, with real bytes from leyoNET.
Ethernet and MAC addressesHow frames are addressed in the local network, how a switch learns where to send them, and what happens when a MAC address appears twice.
IPv4Addresses, masks and the IPv4 header: how a packet finds its destination across many networks, with TTL, checksum and private addresses.
TCPReliable connections between programs: ports, three-way handshake, sequence and acknowledgement numbers, retransmission and teardown.