Sub topic 1
Why Segment a Switched Network
Prerequisites
Assume you know Ethernet frames, MAC-address learning, IPv4 subnets, and basic switch commands.
Why segment a switched network
A switched network is one Layer 2 broadcast domain by default. A broadcast frame is delivered to every port in that domain. As the network grows, broadcasts consume bandwidth and reach devices that do not need them. A single domain also gives every connected device the same Layer 2 reachability.
Segmentation creates smaller failure and security boundaries. For example, user computers, servers, and management devices can use separate segments. Communication between segments must then pass through a router or Layer 3 switch, where policies can be applied.
VLANs as separate broadcast domains
A virtual LAN (VLAN) is a logical Layer 2 network inside a physical switch. Each VLAN is a separate broadcast domain. Devices in VLAN 10 do not receive broadcasts from VLAN 20, even when they connect to the same switch.
A VLAN does not automatically create a different IP subnet, but good designs normally map one VLAN to one IP subnet. Traffic between those subnets requires routing.
caption: VLANs divide one switch into separate broadcast domains
alt: A switch has user ports in VLAN 10 and server ports in VLAN 20; broadcasts stay within each VLAN.
flowchart LR
U[User devices<br/>VLAN 10] --> S[One physical switch]
V[Server devices<br/>VLAN 20] --> S
S --> R[Separate broadcast domains]VLAN IDs: usable and reserved values
An 802.1Q tag carries a 12-bit VLAN identifier (VID), so the field can represent values from 0 through 4095.
- VID 0 means priority information without VLAN membership.
- VIDs 1 through 4094 identify VLANs in normal switch configurations.
- VID 4095 is reserved.
- VLAN 1 is commonly the default VLAN. It is usable, but many designs avoid using it for user data.
- Values 1002 through 1005 have legacy Cisco associations and may be unavailable or special on some platforms.
Always check the switch platform's documented VLAN range before assigning an ID.
Access ports: assigning end devices to a VLAN
An access port belongs to one data VLAN and normally sends and receives untagged Ethernet frames. The switch assigns each arriving frame to the port's configured VLAN.
vlan 10
name USERS
!
interface GigabitEthernet0/1
switchport mode access
switchport access vlan 10The connected computer does not need to understand VLAN tags. The switch adds VLAN context internally and uses that context when forwarding frames.
Exercise
A broadcast enters an access port assigned to VLAN 10. Will an access port assigned to VLAN 20 receive it?
Show answer
No. The switch floods the broadcast only within VLAN 10.