PC-A (192.168.10.10/24, MAC AAAA.AAAA.AAAA, on switchport Fa0/1) runs ping 192.168.10.20 to reach PC-B (192.168.10.20/24, MAC BBBB.BBBB.BBBB, on Fa0/2). Both ports are access ports in VLAN 10 on the same switch.
PC-A's IP stack ANDs the destination (192.168.10.20) against its own subnet mask (/24). It lands inside 192.168.10.0/24 — same subnet as PC-A itself. Because of that, the gateway is never consulted: PC-A needs to resolve the destination's own MAC, not the gateway's. This single check is the entire reason this walkthrough looks nothing like the "PC to Internet" one.
L3 LogicPC-A checks its local ARP cache for an entry for 192.168.10.20. First contact ever, so it's empty. An ARP request has to go out.
ARPPC-A sends an Ethernet frame with destination MAC FFFF.FFFF.FFFF (broadcast), source MAC AAAA.AAAA.AAAA, payload "who has 192.168.10.20? tell 192.168.10.10." It goes out Fa0/1 onto the wire.
BroadcastTwo separate things happen inside the switch, in this order. First, source-address learning: it reads the source MAC (AAAA.AAAA.AAAA) off the frame and records "AAAA.AAAA.AAAA lives on Fa0/1" in its MAC/CAM table — this happens for every frame, not just ARP. Second, because the destination is a broadcast, the switch floods the frame out every other port in VLAN 10 — it has no choice, a broadcast has no single destination to look up.
L2 SwitchEvery device on VLAN 10 — including PC-B and any other host — gets a copy of the broadcast. Each one checks the ARP payload against its own IP. Everyone except PC-B discards it. PC-B recognizes 192.168.10.20 as its own address and prepares a reply.
FilterPC-B already learned PC-A's MAC from the request itself (it was right there in the source field), so it doesn't need to broadcast back. It sends a unicast ARP reply straight to AAAA.AAAA.AAAA: "192.168.10.20 is at BBBB.BBBB.BBBB."
UnicastSwitch MAC table: AAAA.AAAA.AAAA → Fa0/1, BBBB.BBBB.BBBB → Fa0/2 (learned from the reply's source field on its way in). PC-A's ARP cache: 192.168.10.20 → BBBB.BBBB.BBBB. No IP packet carrying real data has moved yet — this was purely address resolution.
CheckpointBecause the switch already had AAAA.AAAA.AAAA in its table from step 5, PC-B's reply is sent out Fa0/1 only — no flooding this time. This is the difference between an unknown unicast (destination not yet in the table → flooded) and a known unicast (destination in the table → forwarded to one port).
L2 ForwardPC-A now builds the actual ping: an ICMP Echo Request inside an IP packet inside an Ethernet frame addressed directly to BBBB.BBBB.BBBB — pulled straight from the ARP cache, no lookup delay this time.
ICMPThe switch reads the destination MAC, finds BBBB.BBBB.BBBB → Fa0/2 in its table, and forwards out that one port. PC-B's NIC receives it, processes the ICMP request, and generates an Echo Reply addressed back to AAAA.AAAA.AAAA.
L2 ForwardSwitch looks up AAAA.AAAA.AAAA → Fa0/1, forwards the Echo Reply straight there. ping on PC-A prints the round-trip time. No gateway, no routing table, no NAT, no firewall policy was ever involved — the entire exchange stayed inside one broadcast domain.
| Term | Meaning |
|---|---|
| Known Unicast | A destination MAC the switch already has in its table — forwarded to one port only |
| Unknown Unicast | A unicast destination the switch hasn't learned yet — flooded to all ports in the VLAN as a fallback |
| Flooding | Sending a frame out every port in the broadcast domain except the one it arrived on |
| Broadcast Domain | The set of ports (i.e. one VLAN) that all receive a given broadcast frame |
| MAC / CAM Table Aging | Learned entries expire after a period of inactivity (default 300s on most Cisco platforms) |
| ARP Cache Timeout | How long a host keeps a resolved IP→MAC mapping before re-resolving (commonly ~4 hours on Windows) |
| EtherType 0x0806 | The Ethernet frame type field value that identifies the payload as ARP |
| ICMP | Internet Control Message Protocol — carries ping's Echo Request/Reply |
| Gratuitous ARP | An unsolicited ARP a host sends about itself, e.g. on boot, to pre-populate others' caches and detect IP conflicts |
| Access Port | A switchport assigned to exactly one VLAN, used for end-host connections |