← All tools
Network
Sim
? Help
Network
One LAN
Separate LANs
LANs + WAN
From
To
Data
Switches
Already know
Learn
Empty tables
◀ Back
Step ▶|
Send ▶
Speed
0.5x
1x
2x
How it works
Choose a network, who sends the data and who receives it, then press
Send
. Use
Step
and
Back
(or the arrow keys) to go one step at a time.
The data is put into a
packet
, whose header holds the destination and source
IP addresses
. The packet is then put inside a
frame
, whose header holds the destination and source
MAC addresses
(every network card has a unique one). A checksum at the end of the frame is used to check for errors.
The sender compares the network part of the IP addresses. Same network: the frame is addressed straight to the destination. Another network: the frame is addressed to the router (the
default gateway
). With no router, the data cannot be sent to another network at all.
A
switch
only reads MAC addresses; it never looks at the packet inside the frame. It reads the destination MAC address and uses its MAC address table to send the frame only to the right port. If the address is not in its table, it sends a copy to every other port (flooding). Choose
Learn
to see a switch fill its table from the source addresses of frames it receives.
A switch only connects devices on its own
LAN
. To reach another network, data must go through a
router
.
Each
router
removes the frame, reads the destination IP address in the packet, uses its
routing table
to choose the next hop, and puts the packet in a new frame. IP addresses stay the same from start to finish; MAC addresses change at every hop.
TTL
(time to live) goes down by 1 at each router, so a lost packet cannot loop round the network forever.
Simplified for GCSE
Data is sent as one packet; real data is usually split into many packets.
Devices and routers already know the MAC address they need. Real networks find it using a protocol called ARP.
This WAN is a private one (like a company linking its sites), so the LANs can keep their own addresses. Real WAN links between routers do not always use MAC addresses.
Got it