Beginner

Two Hosts And A Switch

Two PCs on one switch and one subnet. See how they find each other with ARP and talk directly, with no router involved.

Open this lab

Free interactive lab. No signup. Runs in your browser.

The scenario

PC-A (192.168.10.10/24) and PC-B (192.168.10.20/24) are plugged into Switch-1. Both addresses fall inside the same network, 192.168.10.0/24, so each PC treats the other as a neighbour it can reach directly. No router or default gateway is needed, and this lab has none. The switch passes Ethernet frames between its ports by MAC address; it never looks at the IP addresses inside them.

What you will work out

Understand how two hosts on the same subnet reach each other through a switch.

Why this matters

Every office LAN, home network and data-centre rack starts here: devices on one subnet, joined by switches, finding each other with ARP. When two devices on the same switch cannot talk, the first checks are the ones in this lab: does each have an address, are both addresses in the same subnet, and does the destination answer ARP.

Running it

Two Hosts And A Switch opens on a canvas, already wired and addressed. Trace a packet through it hop by hop, or run the same topology live on real Linux network namespaces. How the two modes differ.

Open Two Hosts And A Switch

Runs in your browser. No install, no signup, and the simulation starts instantly.

Open the lab →