Pcornel
Networking · Switching › VLAN

VLAN Creation

Cheat sheet · https://pcornel.dk/topic.php?topic=582

Back to the Topic

Answer

Creating a VLAN adds it to the switch's VLAN database (vlan <id>, optionally name <name>). Only then does the switch forward traffic for it on access ports and trunks.

Remember

Assigning a port to a VLAN that does not exist leaves the port inactive (newer IOS versions create the VLAN automatically, older ones do not). The VLAN must exist on every switch it crosses, including transit switches with no access ports in it. With VTP, check the mode: in client mode you cannot create VLANs locally.

First checks

  • show vlan brief — VLANs that exist and their access ports.
  • show interfaces <if> switchport — administrative and operational mode, access VLAN, native VLAN.
  • show interfaces trunk — trunks, native VLAN, allowed and forwarding VLANs.
  • show mac address-table vlan <id> — MAC addresses learned in the VLAN and on which port.
  • show spanning-tree vlan <id> — whether the ports forward in that VLAN.

Commands

show vlan brief
Compact VLAN membership/status view.
vlan <id>
Create a VLAN or enter its configuration.
name <name>
Name a VLAN (inside VLAN configuration).
show vlan
Display VLANs and their ports.
show vlan id
show vlan name
show vlan id <n>
show interfaces trunk

Verify in this order

vlan <id> configured → VLAN active in the database → present on every switch on the path → trunks list it as allowed and active → ports in it come up

Where it usually breaks

physical link → switchport/bundle membership → VLAN/instance state → STP/LAG decision → MAC forwarding → end-to-end frame path

VLAN Creation · operational reference

ObjectPurposeSeparate verification
VLAN IDLayer-2 domain identityVLAN database/state
Access membershipAssign endpoint framesSwitchport state
Trunk allowanceCarry VLAN between switchesTrunk output
SVILayer-3 terminationInterface + routing state

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=582

Confirmation

Confirm action

Continue?