Loopback Cert Guide

Lab 2.1VLANs and trunks

Two switches, a router, five PCs and an IP phone. Build the VLANs, access ports and the trunk between the switches, predict what breaks when a setting is wrong, then drill the show output.

  • 2.1.a Access ports (data and voice)
  • 2.1.b Default VLAN
  • 2.1.c InterVLAN connectivity
  • 2.2.a Trunk ports
  • 2.2.b 802.1Q
  • 2.2.c Native VLAN
Live network · VLANs · simulated
  • Access port, VLAN 10
  • Trunk
  • With a voice VLAN
  • Inactive or blocked
  • Down
  • Shut down

Simulated: the switches, router, addresses (10.1.x.x, documentation-style private space) and console output are Loopback's simulation of Catalyst switches and an IOS router, not real devices.

02Recall sheet

The whole topic on one sheet.

The numbers, orders and commands the network runs on. Cover a column and say it before you look.

The 802.1Q tag

TPID 0x810016 bits PCP3 bits DEI1 bit VLAN ID12 bits
  • A trunk inserts 4 bytes after the source MAC, in every frame except the native VLAN's.
  • 12 bits of VLAN ID: 4096 values, of which 0 and 4095 are reserved.
  • PCP is the 3-bit priority used for QoS marking (CoS).

VLAN numbers

1
Default VLAN. Every port starts here. Can't be deleted or renamed.
2-1001
Normal range, free to use
1002-1005
Reserved for legacy FDDI and Token Ring, can't be deleted
1006-4094
Extended range

A VLAN has to exist on each switch to be forwarded there. Assigning a port to a missing VLAN creates it; deleting a VLAN leaves its ports inactive.

Access, voice, trunk

PortCarriesOn the wire
AccessOne data VLANUntagged
VoiceData VLAN + voice VLANPC untagged, phone tags voice
TrunkMany VLANs802.1Q tagged, native untagged

Check the port with show interfaces gi1/0/1 switchport: Administrative Mode is what you set, Operational Mode is what it's doing.

Native VLAN

  • Default 1. Frames in it cross the trunk untagged.
  • Must match on both ends. A mismatch makes CDP log NATIVE_VLAN_MISMATCH, and Cisco spanning tree blocks both native VLANs on that trunk.
  • Good practice: a dedicated, unused native VLAN on every trunk.
  • Router side: encapsulation dot1Q 99 native.

Allowed list

allowed vlan 10,20Replaces the list
allowed vlan add 30Appends
allowed vlan remove 20Takes one out
allowed vlan except 99All but these
allowed vlan all / noneEverything / nothing

show interfaces trunk lists allowed, then allowed and existing, then actually forwarding.

Trunk modes

This endFar endResult
trunktrunkTrunk
trunkdynamic autoTrunk
dynamic autodynamic autoAccess
trunkaccessBroken: the access side blocks

Set both ends to switchport mode trunk and you never depend on negotiation.

Routing between VLANs

OptionGateway lives onSwitch sideWatch out for
Router, one port per VLANEach physical interfaceOne access port per VLANRuns out of ports fast
Router on a stickSubinterfaces: encapsulation dot1Q 10, then the IPOne trunkPhysical port left shutdown; wrong tag; access port toward the router
Layer 3 switchSVIs: interface vlan 10, IP, no shutdownNothing extraNeeds ip routing; an SVI is down until its VLAN has an up port

Commands

Switch

vlan 10
 name USERS
interface gi1/0/1
 switchport mode access
 switchport access vlan 10
 switchport voice vlan 30
interface gi1/0/24
 switchport mode trunk
 switchport trunk native vlan 99
 switchport trunk allowed vlan 10,20,30
ip routing
interface vlan 10
 ip address 10.1.10.1 255.255.255.0
 no shutdown

Router on a stick

interface gi0/0
 no shutdown
interface gi0/0.10
 encapsulation dot1Q 10
 ip address 10.1.10.1 255.255.255.0
interface gi0/0.20
 encapsulation dot1Q 20
 ip address 10.1.20.1 255.255.255.0
interface gi0/0.99
 encapsulation dot1Q 99 native

Verify

show vlan brief
show vlan id 10
show interfaces trunk
show interfaces gi1/0/1 switchport
show interfaces status
show ip interface brief
show running-config interface gi1/0/24

All of these work in the network's consoles, along with interface range gi1/0/1 - 2 and do from config mode.

Jump to a page

  1. Gi0/1HomeconnectedHow the exam works and a sample of every station
  2. Gi0/2Practice Testsconnected18 tests by domain, every answer explained
  3. Gi0/3Flashcardsconnected401 cards on every objective, plus your own
  4. Gi0/4CLI LabconnectedCommand drills and config tasks, checked like IOS
  5. Gi0/5Concept LabsconnectedYou're in Lab 2.1 VLANs and trunks. All labs.
  6. Gi0/6Study PlanconnectedAll 53 objectives, graded from your progress