Module 4.2 45 minBeginner

VLANs and access ports

A VLAN is a separate broadcast domain inside one physical switch. Access ports belong to one VLAN and carry untagged traffic for the connected host. This chapter teaches access-port configuration and verification.

Course plan — preview

What you'll learn

  • Create and name VLANs in the VLAN database.
  • Assign an access port to a VLAN and verify with show vlan brief.
  • Explain the default behaviour of unassigned switch ports.

Why VLANs exist

By default every port on a switch belongs to VLAN 1. A broadcast frame received on any port floods to every other port. VLANs let you split that single broadcast domain into many — Sales in VLAN 10, Engineering in VLAN 20, Voice in VLAN 200 — even though they share the same physical switch.

Hosts in different VLANs cannot reach each other directly. Inter-VLAN traffic must pass through a router (or an L3 switch with SVIs).

Each VLAN is one broadcast domain, and in a working design each VLAN is also exactly one IP subnet. Keep that pairing in mind: most VLAN faults turn out to be a port in the wrong VLAN, a VLAN that does not exist, or a subnet that does not match its VLAN.

Configuring an access port

Two steps: create the VLAN in the switch's VLAN database and name it, then place each port in it. switchport mode access fixes the port's role; switchport access vlan 10 chooses its VLAN. show vlan brief confirms the result.

Switch> enable
Switch# configure terminal
Switch(config)# vlan 10
Switch(config-vlan)# name SALES
Switch(config-vlan)# exit
Switch(config)# interface Fa0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
Switch(config-if)# end
Switch# show vlan brief

10 more sections in this chapter, plus a 4-question quiz and a hands-on lab.

Course plan

Modules 2–8 are part of the Course & Lab Pass and All-Access Max — start with a free account

You can see the title, summary, learning objectives and the opening sections. The rest of this chapter, like all of modules 2–8, comes with the Course & Lab Pass and All-Access Max. A free account opens Module 1: How Networks Work end-to-end and saves your labs — start there, no card required.

  • Read every chapter in Module 1 — How Networks Work
  • Save labs of up to 5 devices
  • Save up to 3 topologies
  • See the full course syllabus + chapter titles

Free account · no card required · compare plans any time

Build it step by step