Switching & routing

VLAN segmentation on one switch

A single switch carries VLAN 10 and VLAN 20, each an isolated broadcast domain, joined only by a router-on-a-stick.

VLAN 10 — 192.0.2.0/24VLAN 20 — 198.51.100.0/24Access VLAN 10Access VLAN 10Access VLAN 10Access VLAN 10Access VLAN 10Access VLAN 10Access VLAN 20Access VLAN 20Access VLAN 20Access VLAN 20Access VLAN 20Access VLAN 20802.1Q trunk802.1Q trunkBroadcastRouter-on-a-stick192.0.2.1Router-on-a-stick — 192.0.2.1Access switch192.0.2.2Access switch — 192.0.2.2VLAN 10 PC 1192.0.2.11VLAN 10 PC 1 — 192.0.2.11VLAN 10 PC 2192.0.2.12VLAN 10 PC 2 — 192.0.2.12VLAN 10 PC 3192.0.2.13VLAN 10 PC 3 — 192.0.2.13VLAN 20 PC 4198.51.100.11VLAN 20 PC 4 — 198.51.100.11VLAN 20 PC 5198.51.100.12VLAN 20 PC 5 — 198.51.100.12VLAN 20 PC 6198.51.100.13VLAN 20 PC 6 — 198.51.100.13
Legend

Current step

VLAN 10 is its own broadcast domain

PC 1 sends a broadcast; the switch floods it to every VLAN 10 port but never to a VLAN 20 port.

VLAN 10 subnet
192.0.2.0/24
Broadcast domain
One per VLAN
A VLAN is a logical partition of one physical switch. Hosts in different VLANs cannot exchange frames at layer 2 even though they share the same hardware, so inter-VLAN traffic must be routed.

Documentation example: addresses use the RFC 5737 ranges and ASNs use the reserved private range. Nothing here connects to a real network.

Tags

  • switching
  • vlan
  • broadcast-domain
  • layer-2
  • router-on-a-stick

Lessons using this diagram