ZZANN

// COMPUTER NETWORK DESIGN & MANAGEMENTEverything for the midterm. One console.

A complete offline study console for 261434, built from the course's own material — 16 lecture decks, 9 labs, 2 solved answer keys, 152 cards and 88 quiz questions.

16Lecture decks
9Labs
35%Midterm
152Cards
88Quiz Qs

Start here

three paths

Readiness

STANDBY
0%
LECTURES0/15
LABS0/9
CARDS0
BEST QUIZ
EXAM DATE

Not sure where to begin? Pick the one that matches where you are right now.

The short version of the syllabus: address the network (IPv6) → power the switch (ports, SSH, security) → split it (VLANs, trunks, VTP) → widen it (EtherChannel) → route it (L3 switch) → isolate it (Private VLAN) → and stop the loops (STP → RSTP → MST).

Lectures

click to open

Labs

2 keys solved

7-day plan

DayStudyTarget
D1Lec 01–03 · Lab 01EUI-64 by hand. SSH from memory.
D2Lec 04–05 · Lab 02–03DTP table + VLAN ranges cold.
D3Lec 06–08 · Lab 04–05Which mode pairs bundle.
D4Lec 09–10 · Lab 07Elect root + pick ports on paper.
D5Lec 11–12 · Lab 08–09Match each guard to its problem.
D6Lec 13–15 · Lab 10RSTP states. MST region rules.
D7Cheatsheet + drillsOnly redo cards marked AGAIN.

Daily: 20 min notes → 15 min cards → 20 min typing commands in Packet Tracer.

// SYSTEM VIEWThe whole course as one network

Every topic you have studied lives somewhere on this diagram. Click any numbered tag to open that lecture.

One campus, all 16 topics

click the tags
CORE · layer 3 backbone DISTRIBUTION · routing + policy ACCESS · layer 2 edge HOSTS · broadcast domains INTERNET CORE-SW DIST-1 L3 switch · SVIs · STP root DIST-2 L3 switch · secondary root blocked by STP ACC-1 ACC-2 ACC-3 VLAN10 VLAN10 VLAN20 VLAN20 ISOL ISOL COMM private VLAN 100 — guests cannot see each other 01 hierarchy 02 IPv6 07 L3 switch 08 inter-VLAN 06 EtherChannel 05 VTP 04 trunk 10 STP 11 guards 03 port security 04 access VLAN 09 private VLAN 12 UDLD 10+ BackboneFast 13 RSTP 15 MST every lecture is a layer of this same picture
VLAN 10 VLAN 20 · EtherChannel private VLAN blocked by STP

Why the topics come in this order

each fix creates the next problem

This is the real logic of the syllabus. If you can recite this chain you can rebuild the whole course from memory.

What must you know first

dependency ladder
TierTopicsYou cannot understand the next tier without this
0 · Foundation01 · 02 · 03Layers, addressing, and how a switch learns MACs
1 · Segmentation04 · 05 · 09VLANs, how they cross links, and how to isolate inside one
2 · Getting between segments07 · 08Requires VLANs (tier 1) and subnetting (tier 0)
3 · Redundancy06 · 10Requires trunking (tier 1); loops only exist once you have redundant L2 links
4 · Controlling STP11 · 12 · 10+Requires the STP algorithm (tier 3)
5 · Better STP13 · 14 · 15Requires everything above — RSTP and MST are refinements, not new ideas

Engineer's index

if you need X, use Y
RequirementToolLecture
Split one switch into separate networksVLAN04
Carry many VLANs on one cable802.1Q trunk04
Stop typing the same VLAN on 50 switchesVTP05
Let two VLANs talkRouter-on-a-stick or SVI07 · 08
Isolate hosts inside one VLANPrivate VLAN09
More bandwidth without new hardwareEtherChannel06
Survive a link failure without a loopSTP10
Choose which switch is the rootpriority / root primary11
Stop a PC reboot from costing 30 secondsPortFast11
Stop users plugging in their own switchBPDU Guard11
Stop an outsider stealing the rootRoot Guard11
Survive a link that goes silentLoop Guard + UDLD12
Skip the 20-second Max Age waitBackboneFast (RLQ)10+
Converge in under a secondRSTP / Rapid PVST+13 · 14
Run 1000 VLANs without 1000 treesMST15
Lock a port to known devicesPort security03
Manage a switch safelySSH + SVI03

Where the exam weight really is

inferred from the labs

The professor issued 4 separate labs on Spanning Tree and 1 on everything else. Study accordingly.

Read the signalLabs 07, 08, 09 and 10 walk the same topology four times — on paper, verified, configured, then deliberately broken. That is a professor telling you exactly what the exam is about without saying it.

The five sentences that hold the course together

  1. A switch floods what it does not know — which is why loops are fatal and why VLANs reduce risk.
  2. A VLAN is a broadcast domain, and a broadcast domain is a subnet — so crossing VLANs is always a layer 3 act.
  3. Redundant links are mandatory and dangerous, so STP blocks the minimum to keep exactly one path.
  4. In STP, lowest always wins: priority, then MAC, then cost, then sender BID, then sender port.
  5. Every convergence feature exists to remove one specific wait — PortFast, UplinkFast, BackboneFast, and finally RSTP removes them all.

// COURSE PIPELINEHow this class actually works

Every topic runs the same three stages. Miss one stage and the next stage costs you points.

[1]
Lecture slidestheory + commands
──▶
[2]
Lab instructionsbuild it in Packet Tracer
──▶
[3]
Quiz on Mango CMUgraded, in-class
How to win itThe quiz asks what the lab shows you, not what the slide says. So always run the show commands and read the real output — root bridge, port roles, priorities, MAC tables. That output IS the answer sheet.

Full map

lecture → lab → quiz
LabTopicFrom lectureQuiz
L01Basic Switch — SSH, port security03not saved
L02VLAN + trunk + 802.1Q frame04not saved
L03VTP server / client / transparent05not saved
L04EtherChannel with LACP06not saved
L05Inter-VLAN: router-stick + L3 switch02 · 07 · 08not saved
L06— not issued —
L07Determine STP on paper10not saved
L08Verify STP in Packet Tracer10SOLVED 100%
L09Configure STP priorities + root primary11SOLVED 100%
L10STP topology changes + PortFast10 · 11not saved

What the labs prove about the exam

  • Labs 07–10 are four passes over STP — paper, verify, configure, break. STP is clearly the heaviest exam topic.
  • Labs 01–05 each map to exactly one lecture. Expect one command-level question per lab topic.
  • Every lab ends with "answer the questions" — the quiz repeats the show output you were told to read.
  • Lab 05 mixes IPv6 + OSPFv3 + SVI + subinterfaces in one file. That combination is exam-favourite material.

// LECTURE NOTES16 decks, taught properly

Everything from the slides, reordered so it makes sense. The bar above tracks where you are — ‹ › or J / K to move.

01

Intro & Design Model

SLIDE01_Intro

Big networks are built in layers so they can grow and be fixed.

What this course actually is

It is a Layer 2 switching course wearing a design-course name. Everything — VLAN, inter-VLAN, VTP, Spanning Tree, port aggregation — lives at layer 2 or just above it. Later come campus design, basic QoS, HA, and wireless design.

The 3-layer hierarchical model

LayerJobTypical gearDesign instinct
CoreMove traffic between buildings as fast as possibleHigh-speed L3 switchesDo nothing slow here — no ACLs, no filtering
DistributionAggregate access switches, apply policy, route between VLANsMultilayer switchesThis is where intelligence lives (STP root, SVIs, ACLs)
AccessConnect end devicesL2 switchesCheap, many ports, PortFast + port security
Why layers at allEach layer has one job, so you can add a building without redesigning the campus, and when something breaks you know which layer to look at. A single PC problem = access. A whole building slow = distribution or core.

The slide also asks: "What about Spine and Leaf?" — the modern data-center answer. Every leaf switch connects to every spine, so any server is exactly two hops from any other. It exists because data-center traffic is now mostly east-west (server to server), while the 3-layer model was designed for north-south traffic (user to internet).

What you're expected to already know

  • The 7 OSI layers and the TCP/IP stack.
  • Basic router and switch configuration.
  • Subnetting, especially class C — the labs use /24, /25 and /30.

Tools

ToolLevelNotes
Packet Tracer 9.0CCNAFrom NetAcad (login + course token). Enable Always Show Port Labels; on macOS disable CLI Text to Speed.
GNS3 2.x + IOUCCNPNeeds the matching GNS3 VM in VirtualBox, host-only adapter, static IP, and a generated IOU licence. Only 2 labs use it.
Prof's ground rules
  • "The slides are a guideline. You have to study by yourself." — the exam can ask about lab output that never appears on a slide.
  • Labs are in-class with a deadline and no TA. Finish early, leave early. Miss the deadline, lose the score.
  • Grading: Assignment 20 · Design Project 15 · Midterm 35 · Final 30.
Get aheadBefore class, be able to name the layer for any device you see on a diagram. Half the design questions are just "which layer does this belong to".
02

IPv6

SLIDE02_IPv6 · review topic

128-bit addresses. Written as 8 hex groups, shortened by two rules.

The problem

IPv4 has 2³² addresses and ran out. IPv6 has 2¹²⁸ — enough that every device can have a public address again, which kills the need for NAT. Adoption is now roughly half of Google's traffic; the slide shows the IPv4→IPv6 overlap running through the 2020s and 2030s.

Writing an address

  1. 128 bits = 8 groups ("quartets") of 4 hex digits: 2001:DEAD:CAFE:0000:0000:0000:0007:0088
  2. Drop leading zeros in each group: 2001:DEAD:CAFE:0:0:0:7:88
  3. Replace one run of all-zero groups with ::2001:DEAD:CAFE::7:88

Only one :: per address, because with two you couldn't tell how many zero groups each one hides.

Address types — read the first digits

TypeStarts withIPv4 equivalent
Global unicast2000::/3 (any unreserved)Public address
Unique localFDPrivate (10.x, 192.168.x)
Link-localFE80169.254.x APIPA
MulticastFF224.x
FF02::1all nodes on the linksubnet broadcast
FF02::2all routers on the link(none)

Prefix structure — where the bits go

Global unicastUnique local
FrontGlobal routing prefix (P bits, from IANA→RIR→ISP)FD (8 bits) + random global ID (40 bits)
MiddleSubnet (S bits)Subnet (16 bits)
BackInterface ID (I bits)Interface ID (64 bits)

Typical: ISP gives you 2001:0DB8:1111::/48, you carve …:1::/64, …:2::/64 and so on. /64 is the normal subnet size — the last 64 bits are always the host part.

IPv4 vs IPv6 header — why v6 is faster to route

IPv4 headerIPv6 headerWhat changed
version, header length, ToSversion, priority (traffic class)Fixed 40-byte header — no length field needed
identifier, flags, fragment offset— removed —Routers no longer fragment; the sender handles it
header checksum— removed —L2 and L4 already checksum; saves work at every hop
TTLhop limitSame thing, honest name
protocolnext headerAlso chains optional extension headers
optionsflow labelMarks packets belonging to one flow

EUI-64 — build the host part from a MAC

  1. Split the 6-byte MAC in half.
  2. Insert FFFE between the halves.
  3. Flip the 7th bit from the left of the first byte (0↔1).

0013.1234.ABCD → 001312 | 34ABCD → 0013:12FF:FE34:ABCD → flip → 0213:12FF:FE34:ABCD

Shortcut for the flipThat bit means "locally administered". Flipping it changes the first byte by ±2 in hex: 00↔02, 12↔10, CC↔CE, AB↔A9. Practise on 0200.0101.0101 → link-local FE80::1FF:FE01:101.

How a device gets an address

MethodWho decidesGives youMissing
ManualYouEverything
EUI-64Router, from its MACInterface ID
SLAACHost itselfPrefix, interface ID, gatewayDNS
Stateful DHCPv6Server, remembers leasesEverything
Stateless DHCPv6Server, remembers nothingDNS and extras onlyaddress

SLAAC in 3 moves: ① learn the subnet prefix on the link using NDP ② pick your own interface ID (random or EUI-64) ③ run DAD to check nobody else has it. The gap is DNS — fill it with stateless DHCPv6 or RDNSS carried inside NDP.

Link-local addresses

  • Every IPv6 interface gets one automatically: FE80::/64, interface ID by EUI-64 on Cisco.
  • Used for talking to neighbours: NDP, routing protocol hellos, and next-hop addresses.
  • That's why routing tables show via FE80::CE01:AFF:FEAE:0 instead of a global address.

Routing protocols for IPv6

ProtocolSpecNotes
Staticipv6 route {prefix} {next-hop|interface}
RIPngRFC 2080Same as RIPv2 but UDP 521; next hop is a link-local address
OSPFv3RFC 2740OSPFv2 is IPv4-only. Needs a manual 32-bit router-id if the router has no IPv4 address
EIGRPv6 / MP-BGP4Mentioned only

From IOS 15.1(3) the OSPFv3 syntax changed to router ospfv3 + ospfv3 1 ipv6 area 0 with address families. Both styles appear in the slides.

▸ reading the routing table

C connected · L local (this interface's own /128) · LC local connected loopback · S static · O OSPF intra-area · OI inter-area · OE1/OE2 external · ON1/ON2 NSSA external · R RIP · B BGP.

You will always see L FE80::/10 via ::, Null0 and L FF00::/8 via ::, Null0 — those are the link-local and multicast catch-alls, not routes you configured.

▸ commands
ipv6 unicast-routing                ! nothing routes without this
interface Fa0/1
 ipv6 address 2001:DB8:1111:1::1/64
 ipv6 address FE80::1 link-local    ! optional manual LL
 ipv6 enable

ipv6 route 2001:DB8:2::/64 Fa0/1

! RIPng
ipv6 router rip MYRIP
interface Fa0/0
 ipv6 rip MYRIP enable

! OSPFv3 (classic syntax)
ipv6 router ospf 1
 router-id 1.1.1.1
interface Fa0/0
 ipv6 ospf 1 area 0

show ipv6 interface [brief]
show ipv6 route [rip|ospf]
show interface Fa0/0            ! find the burned-in MAC
ping ipv6 2001:DB8:1111:1::1
▸ what show ipv6 interface tells you

It prints the link-local first, then global addresses, then joined group addresses: FF02::1 (all nodes), FF02::2 (all routers, if routing is on), and the solicited-node multicast FF02::1:FFxx:xxxx used by NDP/DAD. It also confirms ND DAD is enabled.

Exam traps
  • :: once only. Leading zeros drop, trailing zeros do not.
  • SLAAC gives no DNS.
  • OSPFv3 with no IPv4 address = you must set router-id manually.
  • Prefix means all host bits are 0: 2001:1234:5678:9ABC::/64.
Get aheadBe able to do EUI-64 in under 30 seconds cold. It appears in the drills tab with an infinite generator — five reps and it is automatic.
03

Switch Basics & Security

SLIDE03_BasicSwitch

How a switch learns, and how to lock it down.

The three devices

DeviceLayerWhat it really isDomains
HubL1Multiport repeater — copies bits everywhereOne collision domain for everyone
SwitchL2Connects multiple collision domainsEach port = own collision domain; whole switch = one broadcast domain
RouterL3Connects multiple broadcast domainsEach interface = own broadcast domain

The five behaviours of a transparent bridge

  1. Listen — read the source MAC of every frame and record it against the port it arrived on.
  2. Update — if a MAC appears on a new port, move the entry.
  3. Flood broadcasts — out every port except the one it came in on.
  4. Flood unknown unicast — destination not in the table? Same treatment.
  5. Never modify the frame — which is exactly why it's called transparent.
Why this matters laterBehaviours 3 and 4 are what make bridging loops catastrophic. Hold this in your head — it is the entire motivation for Spanning Tree in lecture 10.

The MAC table

  • Cisco calls it CAM (Content-Addressable Memory). Entries age out after 300 s.
  • TCAM is a separate, ternary version used for ACL lookups — it can match "don't care" bits.

Cisco hardware families (worth recognising)

FamilyOSCapability
Catalyst 6500 / 4500 / 3750 / 3650 / 3560IOSLayer 2 + Layer 3
Catalyst 2960 / 2000 familyIOSLayer 2 with a few L3 features
Nexus 7000 / 5000 / 2000NX-OSData center

Your labs use 2960 (pure L2) and 3650 (multilayer). That difference is why Lab 05 puts SVIs on the 3650 and not the 2960.

Securing access — in the order you type it

  1. Hostname and enable secret (hashed) rather than enable password.
  2. Console line password with login.
  3. Local user for remote access, then line vty 0 4 + login local. "0 4" means five simultaneous sessions (n − m + 1).
  4. SSH prerequisites: a domain name → RSA key (2048 recommended) → ip ssh version 2. Without domain + key the crypto simply won't generate.
  5. transport input ssh to refuse Telnet entirely (options: all / none / ssh / telnet).
  6. service password-encryption to hide the plaintext ones. Removing it later does not decrypt what's already stored.
Why SSH not TelnetTelnet sends the password across the wire in clear text — anyone capturing frames reads it. This is the single most common real-world audit finding.

Management IP

A switch has no routable interface of its own, so the IP goes on an SVI: interface vlan 1 + address + no shutdown, plus ip default-gateway so it can reply to other subnets. Security note from the slide: don't use VLAN 1 for management in production.

Port security

OptionBehaviourUse when
staticYou type each allowed MACServers that never move
dynamicLearns as devices connect, lost on reloadTemporary control
stickyLearns and writes into running-configNormal desk ports — the practical choice
maximum nHow many MACs may use the port. Default 1Desk with a phone + PC → 2
▸ commands
hostname swA
enable secret netdes
line console 0
 password netdes
 login

username student secret netdes
ip domain-name cpe.eng.cmu.ac.th
crypto key generate rsa            ! choose 2048
ip ssh version 2
line vty 0 4
 login local
 transport input ssh
service password-encryption

interface vlan 1
 ip address 192.168.56.251 255.255.255.128
 no shutdown
ip default-gateway 192.168.56.1

interface range Fa0/1 - 2
 description USER PORTS
 duplex auto                       ! auto | full | half

interface Fa0/1
 switchport mode access
 switchport port-security
 switchport port-security mac-address sticky
 switchport port-security maximum 2

! from the switch, SSH out to another device
ssh -l student 192.168.56.252

show ip interface brief
show interface status
show mac address-table
show port-security interface Fa0/1
show ip ssh
▸ GNS3 / IOU differences

On IOU images you save with copy running-config unix:initial-config.cfg instead of copy running-config startup-config.

VPCS (the tiny virtual PC) uses ip {addr} {mask} {gateway}, show ip, and save.

Exam traps
  • CAM aging 300 s · port security default max 1.
  • Sticky writes to running-config — you still have to save.
  • Order matters for SSH: domain name before key generation.
  • Lab 01 uses /25 = 255.255.255.128.
04

VLANs & Trunking

SLIDE04_VLAN

One switch, many broadcast domains. One cable, many VLANs.

The problem

A LAN is "everyone in the same broadcast domain", and by default a whole switch is one LAN. To split it you'd need a second physical switch — expensive and inflexible. A VLAN does it in software.

Five benefits — know why, not just what

BenefitMechanism
Less CPU loadFewer devices receive each broadcast frame
Lower security riskFewer hosts see flooded (unknown unicast) traffic
IsolationGroups genuinely cannot reach each other at L2
Easier troubleshootingA failure domain equals a broadcast domain
Lighter Spanning TreeSmaller topology per VLAN to compute

Trunking

Connecting two switches that share 5 VLANs could mean 5 cables. Instead one trunk carries all of them, tagging each frame with its VLAN ID on the way out. The receiving switch reads the tag, strips it, and delivers into the right VLAN.

802.1Q fieldSizeValue / meaning
TPID (EtherType)2 bytesalways 0x8100 — "this frame is tagged"
PRI3 bitsPriority — used by QoS
CFI / DEI1 bit0 = Ethernet, 1 = Token Ring · or drop-eligible
VLAN ID12 bits1–4094 (2¹² = 4096 total)

The other protocol, Cisco's ISL, is legacy — it wrapped the whole frame instead of inserting a tag. The native VLAN is the one VLAN that crosses the trunk untagged.

VLAN ranges — the full table

RangeClassUseSent by VTP?
0, 4095ReservedSystem only — you can't see or use them
1NormalDefault VLAN — cannot be deletedYes
2–1001NormalEveryday Ethernet VLANsYes
1002–1005NormalLegacy FDDI / Token Ring — cannot be deletedYes
1006–1024ReservedSystem only
1025–4094ExtendedEthernet VLANsOnly VTP v3, or transparent mode

If you create a VLAN without naming it, the name defaults to VLAN + the 4-digit ID — VLAN 10 becomes VLAN0010.

Two design philosophies

ModelIdeaTraffic patternReality
End-to-endA user keeps their VLAN wherever they plug in80/20 — mostly localOld model; VLANs span the whole campus
LocalVLAN follows geography (per floor/building)20/80 — mostly leaves the subnetModern; servers and internet are elsewhere

DTP — how a link decides to become a trunk

switchport modeBehaviour
accessAlways an access port
trunkAlways a trunk
dynamic desirableActively proposes, and answers proposals
dynamic autoOnly answers — never proposes. This is the default
accessdyn autotrunkdyn desirable
accessAccessAccessDo not useAccess
dyn autoAccessAccess ⚠TrunkTrunk
trunkDo not useTrunkTrunkTrunk
dyn desirableAccessTrunkTrunkTrunk
The homework question the slide asks"What mode will it be if you connect two switches at default?" → both are dynamic auto, neither proposes, so you get an access link and cross-VLAN traffic silently fails. Note: GNS3 IOU doesn't support DTP at all.
▸ commands
vlan 261
 name staffs

interface Fa0/1
 switchport mode access
 switchport access vlan 261

interface range Fa0/1 - 4
 switchport access vlan 261

interface Gi0/1
 switchport trunk encapsulation dot1q   ! only if the switch also knows ISL
 switchport mode trunk
 switchport trunk allowed vlan 10,20
 switchport trunk allowed vlan add 30
 switchport trunk allowed vlan remove 20
 switchport trunk allowed vlan except 99

show vlan brief
show vlan id 261
show interface Fa0/1 switchport
show interface trunk
Exam traps
  • TPID 0x8100, VLAN ID 12 bits.
  • Two defaults back-to-back = no trunk.
  • VLAN 1 and 1002–1005 cannot be deleted.
  • Lab 02 asks you to read TPID + TCI from a captured frame — convert the VLAN ID to hex first (261 = 0x105).
05

VTP

Slide05_VTP

Create a VLAN once; the domain copies it everywhere.

The problem

With 50 switches you'd type vlan 30 fifty times, and one typo breaks connectivity in a way that's painful to find. VTP carries VLAN additions, deletions and renames in layer-2 frames along trunk links.

Domains

  • A domain is one switch or a group of interconnected switches sharing a domain name.
  • A switch belongs to exactly one domain. By default it has none until you set it or it learns one.
  • VTP advertisements cannot cross a router — it is a layer-2 protocol on trunks.

The three modes

ModeCreate / editAccepts updatesForwards updatesIn one line
Server (default)yesyesyesThe authority. Changes propagate domain-wide
ClientnoyesyesBehaves like a server but read-only
Transparentlocal onlynoyesMinds its own business, passes messages through
The subtlety students missTransparent still forwards other switches' advertisements — it just doesn't apply them to itself. So a transparent switch in the middle never breaks the domain behind it. That is exactly what Lab 03 makes you observe.

Pruning

By default a trunk carries traffic for every allowed VLAN. If the switch at the far end has no ports in VLAN 3, sending VLAN 3 broadcasts down that trunk is wasted bandwidth. VTP pruning stops broadcasts and unknown unicast for VLANs the neighbour doesn't need.

Versions

VersionWhat it adds
1Baseline
2Token Ring support · unrecognised TLV pass-through · version-independent transparent mode · consistency checks. Course focus
3Doesn't handle VLANs directly — distributes whole databases over the domain; supports extended VLANs

Authentication

  • Same domain name and password on every switch or nothing syncs.
  • Password is 8–64 characters, case sensitive, hashed to 128 bits with MD5.

Where VLANs actually live

WhatWhereHow to wipe it
VLAN databaseflash:/vlan.datdelete vlan.dat
Startup confignvram:/startup-configerase startup-config

On IOU they live in the VM's unix: folder instead. A full factory reset needs both commands — this catches people out constantly.

▸ commands, in configuration order
vtp mode {server | client | transparent}
vtp domain ENG
vtp version 2
vtp password 261434
vtp pruning

vlan 30
 name bachelor

show vtp status         ! mode, domain, version, revision, max VLANs
show vtp counters       ! how many ads sent/received
show vlan brief
▸ beyond the slide — the revision-number danger

Switches accept whichever advertisement carries the highest revision number. Plug in an old lab switch that happens to have a higher revision and it can overwrite the VLAN database of the entire domain, deleting production VLANs in seconds.

The standard defence: before connecting any used switch, set it to transparent mode or change its domain name — either resets the revision to 0.

Exam traps
  • Default mode is server — the slide asks this outright.
  • Clients cannot create VLANs; transparent still forwards ads.
  • Erasing startup-config does not remove VLANs.
  • Extended VLANs need v3 or transparent mode.
06

Link Aggregation / EtherChannel

Slide06_LinkAggregation

Several cables acting as one link — more bandwidth, no STP drama.

The problem

A link is saturated. Two options: buy faster ports (expensive), or bundle the links you already have. Cisco calls the bundle an EtherChannel; the port-channel interface is the logical link you then configure.

Why you can't just plug in two cablesTwo parallel links between switches form a loop, so Spanning Tree blocks all but one. You get redundancy but zero extra bandwidth. EtherChannel makes STP see a single logical link, so every member forwards.

Four benefits

  • No hardware upgrade needed — reuse existing ports.
  • Configure once, on the port-channel interface.
  • Redundancy without reconvergence: losing one member does not change the topology, so STP does not recalculate.
  • Load balancing across members of the same channel.

The two negotiation protocols

PAgPLACP
OwnerCisco proprietaryIEEE 802.3ad
Initiatesdesirableactive
Waits (default)autopassive
No protocolonon

Bundles: desirable+auto · desirable+desirable · active+passive · active+active · on+on
Fails: auto+auto · passive+passive (nobody starts) · on + any negotiating mode (on sends nothing to answer)

silent vs non-silent (PAgP only): with auto or desirable, silent is assumed — the port may join a channel even without hearing PAgP from the partner, which suits file servers and packet analysers. Use non-silent when you know the partner speaks PAgP.

Reading the verification output

FlagMeaning
Pbundled in port-channel — what you want
S / ULayer 2 / in use → Po10(SU) is healthy
RLayer 3 channel
ssuspended — the far end isn't answering
Istand-alone — negotiation failed, port acts alone
D / ddown / default port

The slide's own example log: %EC-5-L3DONTBNDL2: Et0/1 suspended: LACP currently not enabled on the remote port — that's the far side not configured yet.

Configuration order that avoids pain
  • Physical ports default to auto encapsulation / dynamic trunk mode. Set them to trunk explicitly first.
  • Then create the channel-group.
  • Then configure the port-channel interface with the same trunk settings. A mismatch suspends the bundle.
▸ commands
interface range Gi1/0/1 - 3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 channel-protocol lacp
 channel-group 3 mode active     ! active|passive|desirable|auto|on

interface port-channel 3
 switchport trunk encapsulation dot1q
 switchport mode trunk

show etherchannel summary
show etherchannel 3 port-channel
show interfaces Gi1/0/1 etherchannel
show interfaces etherchannel
Exam traps
  • Both defaults together (auto+auto, passive+passive) = no channel.
  • Channel-group numbers are local — SWA can use 3 while SWB uses 4.
  • PAgP = Cisco; LACP = 802.3ad. Never mix them on one bundle.
  • Packet Tracer supports only show etherchannel port-channel (no port number) and show etherchannel summary.
07

Multilayer Switch

CPE434Slide07

One box, three kinds of port.

The three port personalities

TypeConfigWhat it isUsed for
L2 switch portswitchportNormal access or trunk portConnecting hosts and switches
L3 routed portno switchport + ip addressBehaves exactly like a router interfacePoint-to-point links to other L3 devices
SVIinterface vlan X + ip addressA virtual router interface inside a VLANBeing the gateway for that VLAN

None of it routes until you enable ip routing. Verify a port's identity with show interface X switchport — "Switchport: Enabled" means L2, "Disabled" means routed.

How a real campus uses thisDistribution switches connect to each other with routed ports (fast, no STP involvement), and give users their gateway through SVIs. That's precisely the Lab 05 design: swB uses Gi1/0/24 as a routed port to the router and SVIs for VLAN 30/40.
▸ commands
ip routing

interface Gi1/0/24
 no switchport
 ip address 192.168.100.2 255.255.255.252

interface vlan 30
 ip address 192.168.30.1 255.255.255.0
 no shutdown

interface Gi1/0/3
 switchport
 switchport mode access
 switchport access vlan 30

show interface Gi1/0/24 switchport
show ip route
Exam traps
  • no switchport makes it routed — the double negative catches people.
  • The SVI only comes up when at least one access port in that VLAN is up.
  • Packet Tracer multilayer switches have ip routing off by default.
08

Inter-VLAN Routing

CPE434Slide08

Three ways to let VLANs talk. Pick by port count.

The rule that drives everything

  • Devices in the same VLAN must be in the same subnet.
  • Devices in different VLANs must be in different subnets.
  • So routing between VLANs is just routing between subnets — a Layer 3 job. A pure switch cannot do it.

The three methods

MethodHowCostWhen
One link per VLANA separate physical router interface for each VLANBurns a port per VLANTwo or three VLANs, ancient gear
Router-on-a-stickOne trunk to the router; a subinterface per VLANAll traffic shares one physical linkSmall sites, one router available
Layer 3 switchAn SVI per VLAN; routes internally in hardwareFastest, no extra deviceAnything modern

Router-on-a-stick, precisely

  1. On the switch: make the link to the router a trunk.
  2. On the router: bring the physical interface up with no shutdown — subinterfaces inherit its state.
  3. Create one subinterface per VLAN. encapsulation dot1q {vlan-id} first, then the IP address.
  4. That IP becomes the default gateway for every host in that VLAN.

The subinterface number (e.g. G0/0.1010) is only a label — the dot1q number is what actually matches the tag. Naming them after the VLAN just keeps you sane.

▸ commands — both methods side by side
! ===== ROUTER-ON-A-STICK =====
interface G0/0
 no shutdown
interface G0/0.1010
 encapsulation dot1q 10
 ip address 192.168.10.1 255.255.255.0
 ipv6 address CAFE:1::1/64
 ipv6 address FE80::FACE:10 link-local
 ipv6 enable
interface G0/0.2020
 encapsulation dot1q 20
 ip address 192.168.20.1 255.255.255.0

! on the switch side
interface Gi0/1
 switchport mode trunk

! ===== LAYER 3 SWITCH =====
ip routing
interface vlan 30
 ip address 192.168.30.1 255.255.255.0
 no shutdown

show ip route
show vlan brief
Trace one pingPC in VLAN 10 pings a PC in VLAN 20. The frame goes to its gateway (the .1010 subinterface or SVI 10) → the router/switch strips the tag, routes the packet into subnet 20 → re-tags it for VLAN 20 → out the access port. On an L3 switch that whole round trip happens inside the ASIC, which is why it's fast.
Exam traps
  • Encapsulation before IP address. Forgetting no shutdown on the physical interface kills every subinterface.
  • Gateway = the address for that host's own VLAN.
  • Packet Tracer MLS: ip routing is off by default.
09

Private VLANs

Slide_09PrivateVLAN

Isolation inside a single VLAN, without new subnets.

The problem

Normally every host in a VLAN receives every broadcast and can reach every other host. To separate, say, 200 customers you could give each their own VLAN — but that means:

  • A huge number of L3 interfaces and subnets, most of them nearly empty (wasted address space).
  • A far more complicated Spanning Tree.
  • Dozens of ACLs to maintain (management complexity).

The alternatives are a VACL (filter inside the VLAN) or a Private VLAN, which partitions the VLAN into subdomains.

The vocabulary

TermMeaning
Primary VLANThe parent — the "real" VLAN and its subnet
Secondary VLANA child mapped to exactly one primary. Two kinds: isolated or community
Promiscuous portTalks to everything. Normally the router, firewall, gateway, or shared server
Isolated portTalks only to promiscuous ports — not even to other isolated ports
Community portTalks within its own community, plus promiscuous ports
From ↓ / To →PromiscuousSame communityOther communityIsolated
Promiscuousyesyesyesyes
Communityyesyesnono
Isolatedyesnonono

Configuration order (it matters)

  1. Put the switch in VTP transparent mode — VTP does not carry private VLANs.
  2. Create every secondary VLAN and label it isolated or community.
  3. Create the primary VLAN and associate the secondaries to it.
  4. Host ports: private-vlan host + host-association primary secondary.
  5. Router/server port: private-vlan promiscuous + mapping primary secondary-list.
  6. For routing, map the secondaries onto the primary's SVI.

You only ever need one isolated secondary per primary (isolated hosts are separate from each other anyway), but one community VLAN per group.

▸ commands
vtp mode transparent

vlan 201
 private-vlan isolated
vlan 202
 private-vlan community
vlan 100
 private-vlan primary
 private-vlan association 201,202
 ! later: private-vlan association add|remove {list}

interface Fa0/1                      ! a customer/host port
 switchport mode private-vlan host
 switchport private-vlan host-association 100 201

interface Fa0/24                     ! router / shared server
 switchport mode private-vlan promiscuous
 switchport private-vlan mapping 100 201,202

interface vlan 100                   ! let the SVI route the secondaries
 private-vlan mapping 201,202

show vlan private-vlan
show interface Fa0/1 switchport
Exam traps
  • Isolated ↔ isolated is blocked. Community A ↔ community B is blocked.
  • host-association on host ports, mapping on promiscuous ports and SVIs.
  • VTP cannot carry PVLANs — configure them on every switch, transparent mode recommended.
  • Not supported on GNS3 IOU / vIOS-L2, so it's a Packet Tracer or theory-only topic.
10

Spanning Tree Protocol

CPE434Slide10 · the biggest topic

Redundant links create loops. STP blocks the minimum number of ports to break every loop.

Why a loop is fatal — walk it through

Two switches A and B both connect segment A to segment B. PC1 (segment A) sends one frame to PC4, and neither switch knows either MAC yet:

  1. A and B both receive it on gi1/0/1 and record PC1 → port 1/0/1.
  2. Both decide to flood it.
  3. Both flood it onto segment B. PC4 gets two copies — and A hears B's copy while B hears A's.
  4. Both now relearn PC1 → port 1/0/2. The MAC table has flipped.
  5. Still nobody knows PC4, so both flood again — back onto segment A.
  6. Relearn, reflood, forever. One frame becomes an infinite storm.
Three simultaneous failuresBroadcast storm eats all bandwidth · MAC tables thrash so unicast is unreliable · every host is interrupted by duplicate frames. A single loop can take down a building, which is why STP is on by default everywhere.

How switches recognise each other: the BID

Bridge ID = 8 bytes: a 2-byte priority field followed by the 6-byte system MAC. Lower is better, and priority is compared first — the MAC only breaks ties.

BPDUs — the messages

  • Sent to the multicast address 01-80-C2-00-00-00, source = the switch's own MAC, every 2 seconds by default.
  • Configuration BPDU — builds and maintains the tree.
  • TCN BPDU — announces that something changed.
FieldBytesWhat it's for
Protocol ID / Version2 / 1Always 0 for 802.1D
Message type1Configuration or TCN
Flags1bit 0 = TC, bit 7 = TCA (acknowledge)
Root Bridge ID8Who I think the root is
Root Path Cost4What it costs me to reach the root
Sender Bridge ID8Who is speaking
Port ID2Which port it left from (priority + number)
Message age / Max age2 / 2Ageing of this information
Hello / Forward delay2 / 2Timers dictated by the root

Those four highlighted fields are literally the tie-break sequence you use to solve any STP question.

The algorithm — three elections

  1. One root bridge per VLAN (with PVST+). Every port on the root becomes designated.
  2. One root port on each non-root switch — its best way back to the root.
  3. One designated port per network segment — the end closer to the root.

Anything that is neither a root port nor a designated port is blocked.

Election 1 — the root bridge

Every switch boots believing it is the root and advertises itself. As better BPDUs arrive they defer. Winner = lowest priority, tie → lowest MAC. A new switch with a lower BID can preempt an existing root at any time, which is why you set priorities manually (lecture 11).

Election 2 — root ports, and how cost accumulates

  1. The root sends BPDUs with root path cost 0.
  2. A neighbour receives it and adds the cost of the port it arrived on.
  3. It re-advertises with the new cumulative cost, and so on outward.
BandwidthCost (IEEE 1998, Cisco default)
4 Mbps250
10 Mbps100
16 Mbps62
45 Mbps39
100 Mbps19
155 Mbps14
622 Mbps6
1 Gbps4
10 Gbps2

IEEE 2004 defines larger "long" values for faster links; enable them with spanning-tree pathcost method long.

Decision sequence (identical for root and designated ports):

  1. Lowest root path cost.
  2. Lowest sender BID.
  3. Lowest sender port priority (default 128).
  4. Lowest sender port number.
The detail that decides your lab answersSteps 3 and 4 use the neighbour's port ID, not your own. With two cables to the same switch, the winner is whichever port the sender considers lower — that's why SW2's Fa0/4 beats Fa0/3 when it connects to SW1's Fa0/1.

Election 3 — designated ports

Each segment elects one designated port using the same sequence. A root port can never also be designated. Everything left over blocks.

Port states

StateCanCannotDuration
Disablednothingsend or receive data
Blockingreceive BPDUssend/receive data, learn MACsindefinite while a loop exists
Listeningsend + receive BPDUssend/receive data, learn MACsForward Delay — 15 s
LearningBPDUs + learn MACssend/receive dataForward Delay — 15 s
Forwardingeverythingindefinite while stable
Blocking
Max Age 20s
Listening
15s
Learning
15s
Forwarding
data flows

Timers

TimerDefaultFunction
Hello2 sInterval between configuration BPDUs
Forward Delay15 sTime spent in Listening, and again in Learning
Max Age20 sHow long a stored BPDU survives without an update. Expiry signals an indirect failure

Three kinds of topology change

1 · Direct — the switch physically sees a link go down.

  1. A and C both detect the link down.
  2. C removes its stored best BPDU and tries to send a TCN out its root port — but that was the failed link.
  3. A (the root) sends a BPDU with the TC flag set; every switch relays it.
  4. B and C shorten their MAC ageing from 300 s to 15 s so stale entries die fast.
  5. C's blocked port becomes its best path and walks blocking → listening → learning → forwarding.

Downtime = 2 × Forward Delay = 30 s

2 · Indirect — the link stays up but traffic silently stops (a one-way failure).

  1. Both ends still show "up", so no failure is detected and no TCN is sent.
  2. C keeps its stored BPDU until Max Age expires and flushes it.
  3. C waits to hear from the root again, and gets a configuration BPDU on its blocked port.
  4. That becomes the new best entry; the port walks blocking → listening → learning → forwarding.

Downtime = 20 + 2 + 15 + 15 = 52 s

3 · Insignificant — cosmetic, e.g. a user reboots their PC.

  1. C sees the access port go down and sends a TCN to the root.
  2. The root acknowledges and floods a TC-flagged BPDU to everyone.
  3. Every switch shortens MAC ageing and flushes idle entries — for no reason at all.
This is the argument for PortFastA cosmetic event just aged out the whole network's MAC tables. Lecture 11's PortFast stops host ports from generating topology changes, and Lab 10 makes you watch both behaviours back to back.

The family

NameStandardCisco config keyword
Classic STP802.1Dpvst (as PVST+)
Rapid STP802.1wrapid-pvst (as RPVST+/PVRST+)
Multiple STP802.1smst
▸ commands
show spanning-tree
show spanning-tree vlan 10
spanning-tree pathcost method long
Exam traps
  • Priority first, MAC only on ties.
  • Cost is added on the incoming port — draw arrows toward the root and sum.
  • Blocking ports still receive BPDUs; they are silent, not deaf.
  • 30 s vs 52 s, and where each number comes from.
  • PVST+ = one root per VLAN, so two VLANs can have different trees on the same wires.
10+

BackboneFast & RLQ

BackboneFast.pdf · extra deck under lecture 10

Kill the 20-second Max Age wait after an indirect failure — by asking upstream "can you still reach the root?"

What it is for

  • BackboneFast exists only for indirect failures — a link that dies somewhere you cannot see.
  • It removes the Max Age timeout (20 s).
  • It does not remove Listening and Learning, so you still pay 15 + 15.
  • Result: recovery drops from 52 s to about 30 s.

The inferior BPDU — where it comes from

When a switch loses its connection to the root, it does the only thing it can: it declares itself the new root and advertises that. Since its claim is worse than the information neighbours already hold, that message is called an inferior BPDU. It is not a lie — it is a cry for help, and BackboneFast is the mechanism that hears it.

Without BackboneFast — why it takes 20 extra seconds

  1. The A–B link fails indirectly. A never notices, so A sends no topology change.
  2. B notices it has lost the root, declares itself root, and sends an inferior BPDU out of e3 toward C's port e4.
  3. C's e4 is a blocked port. C ignores the inferior BPDU and simply keeps waiting — until the good BPDU it stored from A expires after 20 s (Max Age). Only then does e4 begin Listening and the tree rebuilds.
The wasteC had a perfectly good path to the root the whole time. It just had no way to ask, so it sat out the full Max Age timer doing nothing.

With BackboneFast — the RLQ conversation

  1. Same indirect failure at A–B; A still says nothing.
  2. B still declares itself root and sends the inferior BPDU to C.
  3. C receives an inferior BPDU on a blocked port — the trigger. C immediately sends a Root Link Query (RLQ) out of its other candidate ports.
  4. An RLQ Reply (RLQ R) comes back, confirming C can still reach the real root.
  5. C moves e4 straight to Listening. No 20-second wait.

RLQ rules — memorise these two lists

A switch that receives an RLQ…does this
is not the root bridgeforwards the RLQ onward toward the root
is the root bridgesends RLQ R back down the spanning-tree path
has also lost the rootsends the reply straight back to that port (bad news travels fast)
The switch that sent the RLQ gets the reply…does this
on its root portIts own tree is unchanged. It just moves the port that received the inferior BPDU to Listening.
on a blocked portThat blocked port may become the new root port. It moves both the blocked port and the inferior-BPDU port to Listening — and lets the normal election decide which one wins.

The worked example from the slides

StepWhat happens
1Indirect failure on B's port e2. B loses the root.
2B floods an inferior BPDU out every unblocked port except the failed one.
3C receives it on e4, which is blocked. C's current root port and blocked ports are all candidates, so C sends RLQ out e5 and e6.
4D relays the query to root A; the RLQ R returns via D to C's port e5 — its root port. C's root port therefore does not change; it simply moves e4 to Listening.

Where this sits in the timeline

ScenarioMax AgeNew BPDUListeningLearningTotal
Indirect, no BackboneFast202151552 s
Indirect, with BackboneFastskipped1515≈ 30 s
Direct failure (any config)n/a151530 s
How to remember the whole familyPortFast removes the wait for hosts. UplinkFast removes it for a local uplink failure. BackboneFast removes the Max Age portion for a remote failure. Only RSTP removes Listening and Learning as well — which is why 802.1w replaced all three.
▸ commands
spanning-tree backbonefast        ! global — enable on EVERY switch

show spanning-tree backbonefast   ! counters: inferior BPDUs, RLQ sent/received
show spanning-tree summary
Exam traps
  • Trigger is an inferior BPDU (Root Guard reacts to superior, Loop Guard to missing).
  • It saves the Max Age 20 s only — Listening and Learning still cost 30 s.
  • RLQ = Root Link Query, RLQ R = the reply. Know which device sends which.
  • Reply on the root port → only the inferior-BPDU port moves. Reply on a blocked port → both move.
  • Must be enabled on all switches in the network to work properly.
11

Implementing STP 1 — Tuning & Guards

Slide_11ImpSTP1

Put the root where you want it, converge faster, and stop users breaking the tree.

Verification first — you cannot tune what you cannot see

CommandShows
show spanning-tree [vlan X]Root ID, this bridge's ID, all port roles and states
show spanning-tree activeOnly active interfaces
show spanning-tree detailEverything, including counters
show spanning-tree interface XOne port's role, cost and port ID
show spanning-tree rootRoot bridge per VLAN in one table
show spanning-tree [vlan X] bridgeBID broken into its component parts

Why the automatic root is usually wrong

Left alone, the root is decided by MAC address — effectively random, and often the oldest, slowest switch. The slide's example shows the consequence: workstations on switch B must cross into the core (D), back down to access (A), and up to the core again (C) just to reach the server farm, while 1 Gbps links sit unused. Put the root on a distribution switch, and the secondary root on its pair.

Setting the root — two ways

MethodCommandBehaviour
Explicit priorityspanning-tree vlan 10 priority 20480You choose. Range 0–61440 in steps of 4096; default 32768
Cisco shortcutspanning-tree vlan 10 root primarySwitch picks for itself: if everyone else is above 24576 → take 24576; otherwise take lowest − 4096
spanning-tree vlan 10 root secondarySets a backup root value
Two things about root primary
  • It modifies the priority once, at the moment you type it. It does not keep watching, so a new switch can still steal the root later.
  • Running it twice does not keep subtracting — it recalculates the same answer. Lab 09 proves this: SW2 lands on 16384 both times.

Extended system ID

Enabled by default. The 16-bit priority field is split: 4 bits of configurable priority (hence the 4096 steps) and 12 bits carrying the VLAN ID. So the value you see is:

displayed priority = configured priority + VLAN ID

Configured 4096 → VLAN 1 shows 4097, VLAN 10 shows 4106, VLAN 50 shows 4146. In Lab 09, 20480 in VLAN 10 shows as 20490. Turn it off with no spanning-tree extend system-id.

Tuning the path — three levers

LeverCommandWhen to use
Bridge IDspanning-tree vlan X priority NTo choose the root
Port costspanning-tree [vlan X] cost NTo prefer one path over another of equal speed
Port IDspanning-tree [vlan X] port-priority NTo break a tie between two links to the same neighbour

Port ID = 16 bits: 8 bits of priority (0–255, default 128) + 8 bits of port number (starts at 1 and increases across modules). Shown as 128.4 in the Prio.Nbr column.

The three convergence accelerators

FeatureWhereProblem it fixes
PortFastAccess ports to hosts30 s wait every time a PC boots
UplinkFastAccess switches with two uplinksUp to 50 s to fail over to the backup uplink
BackboneFastAll switchesThe 20 s Max Age wait after an indirect failure

PortFast in detail. When a workstation powers on, the port normally crawls Blocking → Listening → Learning → Forwarding: at least 30 s, plus up to 20 s more if PAgP is negotiating. The PC has often given up on DHCP by then. PortFast shortens listening and learning to nothing, so the port forwards immediately. If a loop is ever detected on that port it still drops back to blocking, so it is safe as long as the port faces a host. The macro switchport host sets access mode + PortFast + disables PAgP in one line.

UplinkFast in detail. The access switch keeps a functioning root port plus one blocked backup, and swaps instantly when the primary dies. To guarantee it never becomes the root or a transit path it also raises the switch priority to 49152 and adds +3000 to every local port cost. Because of that it is not allowed on the root bridge.

BackboneFast in detail. It reacts to an inferior BPDU — one advertising a worse root, or a longer distance to it. Normally the switch would sit through Max Age before responding; BackboneFast checks immediately whether an alternate path exists.

Where the inferior BPDU arrivedConclusion
On a port in Blocking stateThe root port and other blocked ports are alternate paths to the root
On the root port itselfAll blocked ports become alternate paths
On the root port, and nothing is blockedThis switch has lost contact with the root — it becomes the new root

The edge guards

GuardTriggerActionProtects against
BPDU GuardAny BPDU on a PortFast porterr-disable the portSomeone plugging a switch into a desk port
BPDU FilterStop sending BPDUs thereLeaking topology info to edge devices
Root GuardSuperior BPDU (a better root claim)root-inconsistent stateA rogue or misconfigured switch stealing the root

Filter beats Guard: if both are on the same interface, BPDU filtering takes precedence and Guard never fires. Globally-enabled filtering is safer — the port simply loses PortFast if a BPDU appears; per-interface filtering ignores BPDUs completely, which is genuinely risky.

The log messages to recognise
SPANTREE-2-RX_PORTFAST: Received BPDU on PortFast enable port. Disabling 2/1 → BPDU Guard fired.
SPANTREE-2-ROOTGUARDBLOCK: Port 1/1 tried to become non-designated in VLAN 77. Move to root-inconsistent state. → Root Guard fired.
▸ commands
spanning-tree vlan 10 priority 20480
spanning-tree vlan 10 root primary
spanning-tree vlan 10 root secondary
spanning-tree extend system-id

interface Gi0/1
 spanning-tree cost 10
 spanning-tree port-priority 64

spanning-tree portfast default              ! all non-trunk ports
interface Fa0/11
 spanning-tree portfast
 switchport host                            ! macro

spanning-tree uplinkfast                    ! not on the root!
spanning-tree backbonefast

spanning-tree portfast edge bpduguard default
spanning-tree portfast bpdufilter default
interface Fa0/5
 spanning-tree bpdufilter enable
interface Gi0/2
 spanning-tree guard root

show spanning-tree summary [total]
show spanning-tree inconsistentports
show spanning-tree interface Fa0/11 portfast
show spanning-tree uplinkfast
show spanning-tree backbonefast
Exam traps
  • Priority must be a multiple of 4096 — 30000 is invalid.
  • Displayed priority includes the VLAN ID.
  • Triggers: superior → Root Guard · inferior → BackboneFast · any BPDU on PortFast → BPDU Guard.
  • BackboneFast has its own deck — see 10+ BackboneFast & RLQ for the full RLQ mechanism.
  • UplinkFast numbers: 49152 and +3000.
12

Implementing STP 2 — Loop Guard, UDLD, Flex Links

Slide_12ImpSTP2

The dangerous failure is not a broken link — it's a link that goes quiet.

First, the complete list of port roles

RoleDefinition
Root portThe one port on a switch closest to the root bridge
Designated portThe port on a segment that is closer to the root
Blocking portNeither root nor designated
Alternate portA candidate root port sitting in blocking — identified for fast reuse by UplinkFast
Forwarding portPorts where no STP activity is expected — normal end-user connections

The silent-failure problem

STP trusts BPDUs completely. A blocked port that stops receiving them assumes the topology changed: after Max Age it flushes the stored BPDU, transitions through the states, and starts forwarding. If the BPDUs stopped because of a fault rather than a real change, that port has just closed a loop. Worse, it now believes it is designated and starts sending BPDUs downstream when it should be listening upstream.

Loop Guard

  • Watches non-designated ports. If BPDUs stop arriving, the port goes to loop-inconsistent blocking instead of forwarding.
  • Recovers by itself the moment BPDUs return — no manual reset.
  • Safe to enable everywhere: the switch works out which ports are non-designated on its own.
  • Layer 2 only.

SPANTREE-2-LOOPGUARDBLOCK: No BPDUs were received on port 3/2 in vlan 3. Moved to loop-inconsistent state.
SPANTREE-2-LOOPGUARDUNBLOCK: port 3/2 restored in vlan 3.

UDLD — proving the link works both ways

Fibre uses two strands, and SFP/GBIC modules fail one direction at a time. Both switches still see "link up", but traffic only flows one way. UDLD sends layer-2 frames carrying the sender's port identity; the far end must echo them back with its own identity added. If that round trip completes, the link is genuinely bidirectional.

Normal modeAggressive mode
On detectionMarks the port undetermined + syslogSends 8 messages in 8 s, then err-disables
Interval15 s default (7 s on Catalyst 3550)
Detection time3 × interval ≈ 45 s
  • Enabled globally, it only actually runs on fibre ports.
  • Both ends must have it — one-sided UDLD disables nothing.
  • On an EtherChannel it monitors each member link independently.

Loop Guard vs UDLD — the comparison the slide draws

Loop GuardAggressive UDLD
Detects software faults (neighbour stops sending BPDUs)yesno — the link looks healthy
Detects hardware one-way linksyesyes, more robustly
On an EtherChannelblocks the entire bundle (loop-inconsistent)disables only the failed link
Depends on STPyes — L2 onlyno — also protects L3 links
Conclusion from the slideNeither covers everything, so enable both for the highest level of protection. Software faults are rarer than hardware ones, but Loop Guard is the only thing that catches them.

Flex Links — the no-STP alternative

  • Define an active/standby pair on an access switch; the standby carries nothing until the active dies.
  • Failover in under 50 ms — far faster than any STP mechanism.
  • STP is disabled on those ports; the pair replaces it.
  • Layer 2 ports and port-channels only — not VLANs, not L3 ports.
  • One backup per active interface. Members cannot be inside an EtherChannel, though two port-channels can be a Flex Links pair.
▸ commands
spanning-tree loopguard default        ! global
interface Gi0/1
 spanning-tree guard loop              ! per port

udld {enable | aggressive}             ! global, fibre ports
interface Gi0/1
 udld {enable | aggressive | disable}

interface Gi0/1
 switchport backup interface Gi0/2     ! Flex Links
 no spanning-tree vlan 1-4094

show spanning-tree interface Gi0/1 detail
show spanning-tree summary
show udld [interface]
show interface switchport backup
Exam traps
  • Three triggers, three features: missing → Loop Guard · superior → Root Guard · inferior → BackboneFast.
  • Normal UDLD only logs; aggressive err-disables.
  • The EtherChannel difference (whole bundle vs single link) is a favourite comparison question.
  • Flex Links turns STP off on that pair.
13

Rapid Spanning Tree — How It Works

Slide_13RapidSTP1

Same tree, built by handshakes rather than by waiting out timers.

Where it came from

802.1w evolved 802.1D for faster convergence. Cisco combined it with PVST+ to get Rapid PVST+ (also written RPVST+ or PVRST+), configured as rapid-pvst. RSTP is also the foundation of 802.1s MST. Root bridge election is unchanged from 802.1D — same BID, same lowest-wins rule.

Port roles — two new ones

RoleMeaning
RootBest path to the root — same as 802.1D
DesignatedThe segment's best port toward the root
AlternateAn alternate path to the root via another switch — blocked, but ready
BackupA redundant, less desirable connection to the same segment — blocked

Alternate = "if my root port dies I'll use this to reach a different switch". Backup = "my second cable onto the same wire". Backup only exists with hubs or shared segments, so it is rare in practice.

Port states — five become three

802.1DRSTPFramesLearns MACs
Disabled / Blocking / ListeningDiscardingdroppedno
LearningLearningdroppedyes
ForwardingForwardingforwardedyes

Port types

TypeDefinition
Edge portAt the edge of the network with a single host attached — i.e. PortFast. Loses edge status the instant a BPDU arrives
Root portThe port with the best cost to the root
Point-to-pointConnects to another switch and becomes designated. Full-duplex links are assumed point-to-point

RSTP treats convergence as a chain of handshakes across point-to-point links — which is exactly why the port type matters.

Faster failure detection

  • Every switch sends its own BPDUs every hello interval, rather than only relaying the root's.
  • Miss 3 in a row and the neighbour is presumed down; all information about that port is aged out immediately.
  • That is ≈ 6 seconds, versus Max Age 20 seconds in 802.1D.

Synchronisation — the proposal/agreement handshake

After BPDU exchange identifies the root, a switch receiving a superior BPDU makes that port its root port. For each non-edge port it then runs this sequence:

  1. The sender has a superior BPDU, so the local switch accepts it as the designated switch and makes its own port the new root port.
  2. It synchronises itself with the topology.
  3. All non-edge ports move to Discarding — the switch deliberately isolates itself.
  4. It sends an agreement back, confirming the designated-port choice.
  5. The root port moves to Forwarding; the sender's port can forward too.
  6. For each non-edge port still discarding, it sends a proposal to that neighbour.
  7. It expects and receives an agreement back.
  8. That port moves to Forwarding.
Why this is safe and fastBefore agreeing, a switch blocks everything downstream. At no instant does a path exist that could form a loop — so there is no need to wait 15 + 15 seconds "just in case". The blocking travels outward like a zipper, and each link comes up in milliseconds.

Topology changes in RSTP

802.1DRSTP
What counts as a changeAny port state changeOnly a non-edge port reaching Forwarding
Who announces itTell the root; the root tells everyoneThe detecting switch floods it directly
Effect on MAC tablesShorten ageing to 15 sFlush immediately, on all ports except the one that received the TC
▸ commands
spanning-tree mode rapid-pvst

interface Gi0/1
 spanning-tree link-type point-to-point   ! force; auto if full-duplex

interface Fa0/5
 spanning-tree portfast                   ! makes it an edge port

spanning-tree mode pvst                   ! back to classic
Exam traps
  • Which old states collapse into Discarding (Disabled, Blocking, Listening).
  • 6 s (3 hellos) vs 20 s (Max Age).
  • An edge port receiving a BPDU stops being an edge port.
  • Alternate (another switch) vs Backup (same segment).
14

RSTP 2 — Roles & Topology Changes in Practice

Slide_14RapidSTP2

The same event, told twice: 802.1D takes 30 seconds, RSTP takes a handshake.

Reading a port-role diagram

The slide labels every port R (root), D (designated), A (alternate) or B (backup). Practise until you can label a diagram without thinking:

  1. Mark the root bridge — every port on it is D.
  2. On each other switch mark exactly one R (best cost home).
  3. On each link, the end closer to the root is D.
  4. A leftover port facing another switch is A; a leftover second port onto the same segment is B.

The TC mechanism, step by step

When a bridge detects a change:

  1. It starts the TC While timer (2 × hello) on all non-edge designated ports and, if needed, its root port. That timer is how long it actively advertises the change.
  2. It flushes the MAC addresses associated with those non-edge ports.
  3. While the timer runs, every BPDU it sends carries the TC bit — including out of its root port.

When a bridge receives a TC BPDU:

  1. It clears MAC addresses on all its ports except the one the TC arrived on.
  2. It starts its own TC While timer and sends TC-flagged BPDUs out all designated ports and its root port.

The result: propagation is a one-step flood from whoever noticed, instead of 802.1D's two-step "notify the root, root notifies everyone". No waiting on the root at all.

Case study — adding a link between the root and switch A

802.1DRSTP
Initial state of the new portBlocking, then ListeningBlocked pending handshake
How the news travelsBPDUs flow during Listening; A forwards the superior BPDU to B and C; D eventually hears it and blocks P1Root proposes to A; A syncs (blocks its ports to B and C), agrees, and the link forwards immediately
ThenPort must still complete Listening + LearningA proposes to B and C; each syncs and agrees; links unblock one by one
RefusalsSwitch D refuses C's proposal because it knows a better path, so that link stays blocked
Time to forwarding≈ 30 s (15 + 15)handshake + BPDU travel
Say this out loud before the exam"In 802.1D the port waits out Listening and Learning while the news spreads. In RSTP the root proposes, the switch isolates its downstream ports, agrees, and forwards — then repeats the same handshake with its own neighbours, creating a wave of synchronisation." That single paragraph answers any RSTP-vs-STP question.
Exam traps
  • Be ready to narrate both protocols for the same picture — the slides deliberately show them side by side.
  • RSTP's delay is handshake + travel, not a fixed timer.
  • A neighbour that knows a better path can refuse a proposal, leaving that link blocked.
15

Multiple Spanning Tree (MST)

Slide_15MST

Hundreds of VLANs but only a couple of distinct topologies — so run only a couple of trees.

The three approaches compared

ApproachTreesLoad balancingCost
CSTOne for all VLANsnone — one link always idleCheapest
PVST+One per VLANfullWasteful: 1000 VLANs = 1000 instances
MST (802.1s)One per VLAN groupfullJust a few instances

The insight: with a given physical layout there are usually only two or three sensible topologies. Running a separate instance for every VLAN computes the same answers over and over.

Designing an MST deployment

  1. Decide how many instances you need — usually one per useful topology (often 2).
  2. Decide which VLANs map to each instance.
  3. Root a different switch for each instance, so every uplink carries traffic.

Example: instance 1 = VLANs 11, 21, 31 rooted on switch A · instance 2 = VLANs 12, 22, 32 rooted on switch B.

Priority in MST

system ID priority = configured priority + instance number

Default priority with instance 10 → 32768 + 10 = 32778. Same idea as the extended system ID in lecture 11, but keyed on the instance instead of the VLAN.

Regions — the part that breaks in practice

A switch running MST must work out which of its neighbours share its configuration. Two switches are in the same region only if all three of these match exactly:

AttributeRange
MST configuration nameup to 32 characters
MST configuration revision number0–65535
Instance-to-VLAN mapping table4096 entries

A port sits at a region boundary if the designated bridge on its segment belongs to a different region, or if it receives legacy 802.1D BPDUs. Normally a single region is enough for a whole campus.

The classic failureBPDUs carry a digest of the mapping table, not the table itself. One typo in one VLAN list and the two switches silently decide they are in different regions — everything still "works" but the load balancing quietly stops. First diagnostic step: run show spanning-tree mst configuration on both and compare name, revision and mapping.
▸ commands, in order
spanning-tree mode mst
spanning-tree mst configuration
 show current                    ! what is applied now
 name XYZ
 revision 1
 instance 1 vlan 11, 21, 31
 instance 2 vlan 12, 22, 32
 show pending                    ! preview before applying
 end                             ! this applies it

! root per instance, on different switches
A(config)# spanning-tree mst 1 root primary
B(config)# spanning-tree mst 2 root primary

show spanning-tree mst
show spanning-tree mst 1 [detail]
show spanning-tree mst interface Gi0/1
show spanning-tree mst configuration
show spanning-tree summary
Exam traps
  • The three region attributes — name, revision, mapping. One mismatch = separate regions.
  • Priority + instance number (32778), not the VLAN number.
  • show pending previews; end commits.
  • MST is built on RSTP, so it inherits the roles, states and handshake from lecture 13.

// LAB WORKBENCH12 labs, build order

Note on the worked answers These are my own revision records for labs I have already completed and submitted. They are published to show the reasoning method — how root election, path cost and tie-breaks resolve — not as a shortcut for anyone else's coursework. If you are taking 261434 now, work the topology out yourself first; the port-role solver in the Exam tab generates unlimited fresh scenarios for exactly that purpose.

Each lab: objective, addressing table, every step from the sheet, complete configs, what to read in the verification output, and the traps. Labs 07–11 carry full solved keys; Lab 12 carries worked predictions.

LabTopicKitLectureScore
00IPv4 Subnetting Reviewpaper01 · 0214 / 14
01Basic Switch — SSH, port security2 × 29600312 / 12
02VLAN + 802.1Q tag inspection2 × 29600413 / 13
03VTP server / client / transparent4 × 29600513 / 13
04EtherChannel with LACP2 × 36500610 / 10
05Inter-VLAN — stick + L3 switch1941 · 2960 · 365007 · 0815 / 15
07Determine STP by handpaper1011 / 11
08Verifying spanning tree4 × 29601030 / 30
09Configuring STP priorities4 × 296010 · 1131 / 31
10STP with topology changes4 × 296010 · 1114 / 14
11Rapid STP + backward compatibility4 × 296013 · 1417 / 17
12MST — regions and instances4 × IOU · GNS315in progress
LAB 00

IPv4 Subnetting Review

lectures 01 · 02 · no Packet Tracer

The entry check. Every lab after this one hands you a prefix and expects you to know instantly which addresses are legal.

Objective

Given any address and prefix, produce the network address, broadcast address, usable host range, and host count — without a calculator. Then do it backwards: given a host requirement, choose the prefix.

The only table you need to memorise

PrefixMask (last octet)Block sizeUsable hosts
/240256254
/25128128126
/261926462
/272243230
/282401614
/2924886
/3025242

Block size = 256 − mask octet. Usable = block − 2 (network + broadcast). A /30 giving exactly 2 hosts is why router-to-router links use it — see Lab 05.

The four-step method

  1. Find the interesting octet — the one the prefix cuts through. /25–/30 cuts octet 4, /17–/24 cuts octet 3.
  2. Block size = 256 − that octet's mask value.
  3. Count up in blocks from 0 until you pass the host address. The last multiple you did not pass is the network address.
  4. Broadcast = next network − 1. Usable = network + 1 through broadcast − 1.
▸ worked examples, taken from the later labs
192.168.56.130/25          ! Lab 01 — PC1
  mask 255.255.255.128 → block 128 → boundaries 0, 128
  130 sits in the 128 block
  network   192.168.56.128
  usable    192.168.56.129 – 192.168.56.254
  broadcast 192.168.56.255
  ! so PC1 .130, PC2 .131, swA .251, swB .252 are ALL one subnet — they can ping

192.168.100.1/30           ! Lab 05 — router-to-L3-switch link
  mask 255.255.255.252 → block 4 → boundaries 0, 4, 8 ...
  network   192.168.100.0
  usable    192.168.100.1 – 192.168.100.2      ! exactly two: rC and swB
  broadcast 192.168.100.3

192.168.10.5/24            ! Lab 08 — PCA
  network 192.168.10.0 · usable .1 – .254 · broadcast .255
Traps
  • The mask is written /25 but typed 255.255.255.128. Packet Tracer wants the dotted form on PCs and the dotted form on ip address lines.
  • A switch management IP lives on interface vlan 1, not on a physical port — see Lab 01.
  • Two addresses in the same /24 are not automatically in the same subnet if the mask is longer. Always compute the network address before assuming reachability.
  • Point-to-point links take /30 (or /31 on real gear). Using /24 there wastes 252 addresses.
Why it mattersEvery subsequent lab silently assumes this. Lab 01 fails to ping if you read /25 as /24. Lab 05's OSPF adjacency will not form if the /30 is wrong on either end. This lab is short because it is a gate, not a topic.
LAB 01

Basic Switch

lecture 03

Two switches, two PCs, and locking the switch down so only SSH gets in.

Objective

Configure a switch from bare metal with the commands you will type in every lab from here on: hostname, secrets, local users, SSH, password encryption, a management IP, and port security.

Topology & addressing

PC1 —straight— swA Gig0/1 ═cross═ Gig0/1 swB —straight— PC2

DevicePortAddressCable
PC1Fa0192.168.56.130/25straight
PC2Fa0192.168.56.131/25straight
swAvlan 1192.168.56.251/25
swBvlan 1192.168.56.252/25
swA↔swBGig0/1cross-over

/25 → mask 255.255.255.128 → subnet 192.168.56.128–255. All four devices sit inside it, so everything can ping everything.

Steps, as the sheet numbers them

  1. Download the Packet Tracer file, open with version 9.0 from NetAcad.
  2. Set both PC IPs from the figure. Check the real interface names in the file — they are not always Fa0/1.
  3. Hostnames swA and swB as shown.
  4. enable secret netdes.
  5. Console line password netdes, without a username — plain password + login.
  6. Create user student with secret netdes.
  7. vty 0–4: authenticate against that username (login local) and accept SSH only.
  8. Encrypt all remaining plaintext passwords.
  9. Management IPs: swA .251, swB .252, both /25, on interface vlan 1, and no shutdown it.
  10. Enable SSH properly: domain cpe.eng.cmu.ac.th, RSA key 2048, version 2.
  11. swA Fa0/1 and swB Fa0/2 → access mode.
  12. Port security on swA Fa0/1, then switch it to the sticky option.
  13. Ping PC1 → swA, swB, PC2. All four must succeed.
  14. Verify with show commands, then copy running-config startup-config on both.
▸ complete config — swA
enable
configure terminal
hostname swA
enable secret netdes
!
line console 0                       ! step 5 — no username here
 password netdes
 login
 exit
!
username student secret netdes       ! step 6
!
ip domain-name cpe.eng.cmu.ac.th     ! step 10 — must come BEFORE the key
crypto key generate rsa
  How many bits in the modulus [512]: 2048
ip ssh version 2
!
line vty 0 4                         ! step 7
 login local
 transport input ssh
 exit
!
service password-encryption          ! step 8
!
interface vlan 1                     ! step 9
 ip address 192.168.56.251 255.255.255.128
 no shutdown
 exit
!
interface FastEthernet0/1            ! steps 11–12
 switchport mode access
 switchport port-security
 switchport port-security mac-address sticky
 exit
!
end
copy running-config startup-config
▸ complete config — swB (differences only)
hostname swB
!
interface vlan 1
 ip address 192.168.56.252 255.255.255.128
 no shutdown
!
interface FastEthernet0/2            ! swB's access port is Fa0/2, not Fa0/1
 switchport mode access
!
! everything else — secret, console, user, SSH, encryption — is identical to swA

Verify — the exact line to read

CommandWhat proves it worked
show ip sshSSH Enabled - version 2.0. If it says disabled, the RSA key never generated — check the domain name.
show port-security interface Fa0/1Port Security : Enabled, Maximum MAC Addresses : 1, Sticky MAC Addresses : 1 once PC1 has sent a frame.
show run | include stickyThe learned MAC now sits inside the running config as a static line — that is what "sticky" means.
show mac address-tablePC MACs appear as DYNAMIC; the sticky one appears as STATIC.
show ip interface briefVlan1 … up up with the right address. Down means you forgot no shutdown.
Quiz will ask
  • The mask for /25 typed out: 255.255.255.128. Both PCs and both switches are inside one subnet.
  • SSH needs three ingredients before the key will generate: hostname (not "Switch"), ip domain-name, then crypto key generate rsa. Miss one and SSH silently stays off.
  • transport input ssh is what actually blocks Telnet. login local only chooses which credentials.
  • service password-encryption hides type-7 passwords (console, vty). It does not touch enable secret — that is already a type-5 hash.
  • Sticky learns the MAC once and writes it to the config; a different PC on that port triggers a violation.
  • Cable types: PC↔switch straight-through, switch↔switch cross-over.
In the real worldThis config is the first five minutes of every switch that ever gets racked. Console password for the person standing in front of it, SSH-only for everyone else, and port security on the access ports so a student cannot unplug a printer and hang a rogue AP off the wall socket.
LAB 02

VLAN + reading the 802.1Q tag

lecture 04

Split two rooms into two broadcast domains, then open a real frame in Simulation mode and find the tag with your own eyes.

Objective

Configure VLANs across a trunk between two switches — and then prove the tag exists by decoding TPID and TCI out of a captured frame. Part 1 is configuration; Part 2 is frame analysis.

Topology & addressing

Room 402 · swA  Gi0/1═ trunk ═Gi0/2  swB · Room 413

PCSwitch · portVLANIPv4IPv6
PC0swA Fa0/1261 staffs192.168.10.11/24CAFE:10::11/64
PC1swB Fa0/3261 staffs192.168.10.12/24CAFE:10::12/64
PC2swA Fa0/2434 students192.168.20.21/24
PC3swB Fa0/4434 students192.168.20.22/24

Part 1 — configure

  1. Build the topology. Think about cable types before you drag: PC↔switch straight, switch↔switch cross.
  2. Set all four PC addresses, including the two IPv6 addresses on PC0 and PC1.
  3. Create the VLAN database on both switches: 261 staffs, 434 students.
  4. Access ports: swA Fa0/1 → 261, swA Fa0/2 → 434, swB Fa0/3 → 261, swB Fa0/4 → 434.
  5. Trunk, in this order: switchport trunk encapsulation dot1q first, then switchport mode trunk. If the switch rejects the encapsulation command, that model only speaks dot1q anyway — skip it.
  6. Ping inside a VLAN: PC0→PC1 and PC2→PC3. Both must work.
  7. Ping across VLANs: PC0→PC2. This must fail — that is the point of the lab, not a mistake.
  8. Read the VLAN show commands, answer Part 1 of the sheet.
▸ complete config — both switches
! ---------- swA ----------
configure terminal
vlan 261
 name staffs
vlan 434
 name students
!
interface FastEthernet0/1
 switchport mode access
 switchport access vlan 261
!
interface FastEthernet0/2
 switchport mode access
 switchport access vlan 434
!
interface GigabitEthernet0/1
 switchport trunk encapsulation dot1q   ! must precede 'mode trunk'
 switchport mode trunk
!
end

! ---------- swB ---------- same VLANs, ports Fa0/3 and Fa0/4, trunk on Gi0/2
interface FastEthernet0/3
 switchport mode access
 switchport access vlan 261
interface FastEthernet0/4
 switchport mode access
 switchport access vlan 434
interface GigabitEthernet0/2
 switchport trunk encapsulation dot1q
 switchport mode trunk

Part 2 — open the frame

  1. Switch to Simulation mode.
  2. Press Show All/None so the packet list is populated.
  3. Edit Filters → untick everything, then tick only ICMP under IPv4.
  4. Choose Add Simple PDU, click PC0 (source) then PC1 (destination).
  5. Press Play. Wait until PC1 replies to PC0, then press Play again to stop.
  6. In the event list find the row where Last Device = PC0 and At Device = swA.
  7. Click the ICMP square to open the packet, then the Outbound PDU Details tab — this is the frame leaving swA on the trunk, so it carries the tag.
  8. Read TPID and TCI and answer Part 2.
Decoding the tag The 802.1Q tag is 4 bytes inserted after the source MAC. TPID is always 0x8100 — it is the flag that says "a tag follows". TCI is the next 16 bits, split PRI (3) · CFI/DEI (1) · VLAN ID (12). With default priority 0 and CFI 0, the TCI is just the VLAN number in hex:
VLAN 261 = 0x105 → TCI 0x0105  ·  VLAN 434 = 0x1B2 → TCI 0x01B2.
12 bits is why the VLAN range stops at 4094: 0 and 4095 are reserved.
Quiz will ask
  • TPID value — 0x8100, fixed, never changes.
  • Convert the VLAN ID to hex and back. Practise 261 ↔ 0x105 and 434 ↔ 0x1B2 until it is instant.
  • The tag exists only on the trunk. The frame arriving at PC1 has already been stripped — inspect at the switch, not the PC.
  • The native VLAN crosses the trunk untagged, and must match on both ends or traffic leaks between VLANs.
  • Cross-VLAN ping failing is correct behaviour. Fixing it needs a router — that is Lab 05.
  • Frame grows by 4 bytes, so the maximum tagged frame is 1522, not 1518.
LAB 03

VTP — who copies what

lecture 05

Four switches, three modes. Create one VLAN at a time and watch exactly where it does and does not appear.

Objective

Configure VTP server, client and transparent modes, and verify propagation with show commands. The lab is designed as five separate experiments — each one creates a VLAN on a different switch and asks you where it landed.

Topology — a 4-floor building

SwitchFloorVTP modeTrunk to
swA5thserverGi0/2 → swB Gi0/1 · Gi0/1 → swC Gi0/1
swB4thclientGi0/1 → swA Gi0/2
swC6thtransparentGi0/1 → swA · Gi0/2 → swD Gi0/1
swD7thserverGi0/1 → swC Gi0/2

Domain ENG · password 261434 · VTP version 2 on all four. Catalyst 2960.

Steps, as the sheet numbers them

  1. Configure the trunk interfaces shown in the figure.
  2. All switches: VTP version 2, the mode from the figure, domain ENG, password 261434.
  3. On swA: create VLAN 30 bachelor and VLAN 40 grad. Verify on all four.
  4. On swC: create VLAN 100 faculty. Verify on all four.
  5. Verify VTP with the show commands.
  6. Verify VLANs on all switches → answer Q1–4.
  7. On swD: create VLAN 50 guests → answer Q5–8.
  8. On swC: create VLAN 200 CMU → answer Q9–12.
  9. On swB: create VLAN 80 visitors → answer Q13.
▸ commands
! ---- every switch: trunk first, VTP second ----
interface GigabitEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
vtp version 2
vtp domain ENG
vtp password 261434
vtp mode server                ! swA and swD
! vtp mode client        ! swB
! vtp mode transparent   ! swC
!
! ---- swA (server) ----
vlan 30
 name bachelor
vlan 40
 name grad
!
! ---- swC (transparent) ----
vlan 100
 name faculty
!
! ---- verification ----
show vtp status              ! mode, domain, revision, version
show vtp password
show vlan brief              ! run this on ALL FOUR after each step
What actually happens — the whole lab in one table
Created onVLANswAswBswCswD
swA server30, 40yesyesnoyes
swC transparent100nonoyesno
swD server50yesyesnoyes
swC transparent200nonoyesno
swB client80rejected — cannot be created at all
The transparent switch is the trick: swC keeps its own VLANs private, but still forwards other switches' advertisements through itself. That is why swD receives VLAN 30/40 from swA even though swC — sitting between them — never installs them.
Quiz will ask
  • Client mode cannot create VLANs. swB answers with VTP VLAN configuration not allowed when device is in CLIENT mode. That is the whole of Q13.
  • Transparent = local VLAN database, revision stays 0 forever, but it relays advertisements for its domain.
  • Both servers can create, and each change increments the revision number. Highest revision in the domain wins — which is how a wrongly-configured switch can wipe a production VLAN database.
  • Domain name and password must match exactly, case-sensitive, or nothing propagates and no error appears.
  • VTP only carries the VLAN database. It never carries port assignments — switchport access vlan is always local.
  • show vtp status is where the mode, domain, revision and version all live. Learn to read it in one glance.
In the real worldMost networks now run VTP transparent or turn VTP off entirely. One switch with a high revision number and a stale database, plugged in by a well-meaning technician, can delete every VLAN in a campus. This lab is teaching you the failure mode as much as the feature.
LAB 04

EtherChannel with LACP

lecture 06

Three cables between two switches. Before bundling, STP throws two of them away. After bundling, all three carry traffic. Same wires, triple the bandwidth.

Objective

Configure an EtherChannel using LACP, verify it with show commands, and — the real lesson — observe what EtherChannel does to Spanning Tree.

Topology

LinkSWASWB
bundle member 1Gi1/0/1Gi1/0/11
bundle member 2Gi1/0/2Gi1/0/12
bundle member 3Gi1/0/3Gi1/0/13
host port · VLAN 100Gi1/0/21 → pcXGi1/0/21 → pcY

Catalyst 3650 — multilayer switches. VLAN 100 named Net. The PCs get no IP addresses; they exist purely to make VLAN 100 active.

Before you can configure anythingThe 3650 boots with an empty power slot. Open the switch's Physical tab and drag a power supply module into the empty bay, or the device never comes up. In production two modules go in, for redundancy.

Phase 1 — look at STP before bundling

  1. Configure the three inter-switch links as trunk ports, with dot1q encapsulation if the command exists.
  2. Create VLAN 100 named Net on both. Optionally use VTP (domain netdes, password 261434) to review Lab 03.
  3. Gi1/0/21 on both switches → access port in VLAN 100. No IPs on the PCs.
  4. On SWA: spanning-tree vlan 100 root primary, then press Fast Forward Time ×4.
  5. On SWB: show spanning-tree vlan 100 and read the Sts column.
  6. Answer Q1–2.
What you should seeThree parallel trunks form a loop, so STP leaves exactly one forwarding and blocks the other two. SWB shows one Root FWD and two Altn BLK. Two thirds of the cabling you paid for is doing nothing — which is the problem EtherChannel exists to solve.

Phase 2 — bundle them

  1. Build the EtherChannel across all three links with LACP: SWA active mode, channel-group 3; SWB passive mode, channel-group 4.
  2. Configure the new Port-Channel interfaces as trunks, dot1q if available.
  3. If Packet Tracer fails to bring the Port-Channel up — save, close, reopen. Known bug, not your config.
  4. Fast Forward Time ×4. STP still needs ~30 s to move the bundle to forwarding.
  5. Verify with the show commands.
  6. Answer Q3–10.
▸ complete config — both switches
! ---------- SWA ----------
vlan 100
 name Net
!
interface range GigabitEthernet1/0/1 - 3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 channel-group 3 mode active          ! LACP, actively asks
!
interface Port-channel 3
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface GigabitEthernet1/0/21
 switchport mode access
 switchport access vlan 100
!
spanning-tree vlan 100 root primary

! ---------- SWB ----------
interface range GigabitEthernet1/0/11 - 13
 switchport trunk encapsulation dot1q
 switchport mode trunk
 channel-group 4 mode passive         ! LACP, only answers
!
interface Port-channel 4
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface GigabitEthernet1/0/21
 switchport mode access
 switchport access vlan 100

Verify — Packet Tracer only supports two commands

SWB# show etherchannel summary
Flags:  D - down        P - in port-channel
        I - stand-alone s - suspended
        R - Layer3      S - Layer2
        U - in use      f - failed to allocate aggregator

Group  Port-channel  Protocol    Ports
------+-------------+-----------+---------------------------------------
4      Po4(SU)         LACP      Gi1/0/11(P) Gi1/0/12(P) Gi1/0/13(P)
                                ! S = Layer 2, U = in use, P = bundled. All three P = success.

SWB# show etherchannel port-channel        ! no port number, or PT rejects it
SWB# show spanning-tree vlan 100           ! now shows Po4 as ONE port, not three
The point of the lab, in one lineRun show spanning-tree vlan 100 before and after. Before: three physical ports, one forwarding, two blocked. After: one logical port Po4, forwarding, carrying all three links' bandwidth. STP cannot create a loop out of a bundle it sees as a single interface.
Quiz will ask
  • Channel-group numbers are locally significant. SWA uses 3, SWB uses 4, and the bundle still forms. Only the LACP modes have to be compatible.
  • LACP mode pairs: active+passive ✓, active+active ✓, passive+passive ✗ (nobody starts the conversation).
  • LACP is the IEEE standard 802.3ad; PAgP is the Cisco-only equivalent. on mode uses no protocol at all and will happily build a loop if you misconfigure one side.
  • Every member port must match on speed, duplex, mode (access/trunk) and allowed VLANs — a mismatch drops that port out of the bundle silently.
  • Configuration applied to the Port-channel interface propagates to members; changing a single member breaks it out of the bundle.
  • Sts flags to recognise: SU = Layer 2 and in use, P = bundled, D = down, s = suspended.
LAB 05

Inter-VLAN Routing — both methods at once

lectures 07 · 08

The left half routes with a router-on-a-stick. The right half routes with SVIs inside a Layer 3 switch. OSPF glues the two halves together. One lab, both techniques, side by side.

Objective

Configure inter-VLAN routing two different ways, add IPv6 and OSPFv3 to the router side, and verify end-to-end connectivity between all four VLANs.

Topology & addressing

PC1 PC2 — swA(2960) —trunk Gi0/1— rC(1941) G0/1 ═192.168.100.0/30═ G1/0/24 swB(3650) — PC3 PC4

PCVLANNamePortAddressGateway lives on
PC110year1swA Fa0/1192.168.10.11/24rC G0/0.1010 → .10.1
PC220year2swA Fa0/2192.168.20.11/24rC G0/0.2020 → .20.1
PC330year3swB Gi1/0/3192.168.30.11/24swB SVI vlan30 → .30.1
PC440year4swB Gi1/0/4192.168.40.11/24swB SVI vlan40 → .40.1

PC1 and PC2 also take IPv6 Automatic (SLAAC from the router). Router-to-switch link: rC 192.168.100.1/30 ↔ swB 192.168.100.2/30.

Steps, as the sheet numbers them

  1. Download the base file and open it in Packet Tracer 9.0.
  2. Set all four PC addresses and gateways. PC1 and PC2 also get IPv6 = Automatic.
  3. swA — pure Layer 2: create VLAN 10 and 20, Fa0/1 and Fa0/2 as access ports in them, Gi0/1 as trunk up to the router.
  4. rC — router-on-a-stick: address G0/1 (the /30), no shutdown both G0/0 and G0/1, then build the two subinterfaces, then OSPF and OSPFv3 in area 0.
  5. swB — Layer 3 switch: create VLAN 30 and 40, access ports, SVIs as the gateways, turn Gi1/0/24 into a routed port, enable ip routing, run OSPF.
  6. Answer the sheet. From Q6 onward, ping every PC from every PC within 300 seconds — some questions read the MAC address table, and entries age out after 300 s.
  7. Optional: add IPv6 to PC3/PC4 and OSPFv3 to swB with your own scheme.
▸ complete config — rC, the router-on-a-stick
ipv6 unicast-routing                    ! without this, IPv6 routing is off
!
interface GigabitEthernet0/1            ! link to swB
 ip address 192.168.100.1 255.255.255.252
 no shutdown
!
interface GigabitEthernet0/0            ! trunk down to swA — the "stick"
 no shutdown                            ! no IP on the physical port itself
!
interface GigabitEthernet0/0.1010       ! VLAN 10
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.0
 ipv6 enable
 ipv6 address CAFE:1::1/64
 ipv6 address FE80::FACE:10 link-local
 ipv6 ospf 1 area 0
!
interface GigabitEthernet0/0.2020       ! VLAN 20
 encapsulation dot1Q 20
 ip address 192.168.20.1 255.255.255.0
 ipv6 enable
 ipv6 address CAFE:2::1/64
 ipv6 address FE80::FACE:20 link-local
 ipv6 ospf 1 area 0
!
router ospf 1
 network 0.0.0.0 255.255.255.255 area 0
!
ipv6 router ospf 1
 router-id 192.168.100.1                ! OSPFv3 has no IPv4 to borrow an ID from
▸ complete config — swB, the Layer 3 switch
ip routing                              ! THE line people forget. Without it swB is a hub with SVIs.
!
vlan 30
 name year3
vlan 40
 name year4
!
interface GigabitEthernet1/0/3
 switchport mode access
 switchport access vlan 30
interface GigabitEthernet1/0/4
 switchport mode access
 switchport access vlan 40
!
interface Vlan30                        ! the SVI = the gateway PC3 points at
 ip address 192.168.30.1 255.255.255.0
 no shutdown
interface Vlan40
 ip address 192.168.40.1 255.255.255.0
 no shutdown
!
interface GigabitEthernet1/0/24
 no switchport                          ! turn the port into a routed port
 ip address 192.168.100.2 255.255.255.252
 no shutdown
!
router ospf 1
 network 0.0.0.0 255.255.255.255 area 0
▸ complete config — swA, Layer 2 only
vlan 10
 name year1
vlan 20
 name year2
!
interface FastEthernet0/1
 switchport mode access
 switchport access vlan 10
interface FastEthernet0/2
 switchport mode access
 switchport access vlan 20
!
interface GigabitEthernet0/1            ! the trunk carrying both VLANs to rC
 switchport mode trunk
! 2960 is dot1q-only, so no encapsulation command exists here

Verify — in this order

CommandWhereLook for
show ip ospf neighborrC and swBOne neighbour, state FULL. Nothing else works until this does.
show ip routerCO routes for 192.168.30.0 and .40.0 learned from swB.
show ip routeswBO routes for 192.168.10.0 and .20.0, plus C for its own SVIs.
show ip interface briefrCBoth subinterfaces up up. A down subinterface usually means G0/0 itself was never no shutdown.
show ipv6 interface briefrCThe link-local FE80::FACE:10 and the global CAFE:1::1 both present.
show mac address-tableswA, swBQ6 onward reads this — ping everything first, entries expire after 300 s.
Quiz will ask
  • Router-on-a-stick vs SVI. One physical port carrying tagged subinterfaces, versus virtual interfaces inside a switch that already has a routing ASIC. Same result, very different performance.
  • The subinterface number (.1010) is cosmetic. What matters is encapsulation dot1Q 10 — that number must match the VLAN.
  • ip routing on a Layer 3 switch is off by default. Without it, SVIs come up but nothing routes between them.
  • no switchport converts a switchport into a routed port so it can hold an IP directly.
  • OSPFv3 requires a manually configured router-id when there is no IPv4 address to borrow one from.
  • The /30 gives exactly two usable addresses — .1 and .2 — which is precisely a point-to-point link.
  • PC1/PC2 get their IPv6 by SLAAC, which only works because the router advertises the prefix. If the PC shows no address, save/close/reopen Packet Tracer — a known quirk the sheet warns about.
In the real worldRouter-on-a-stick is what you build when the budget bought a Layer 2 switch and a router you already own. Every packet between VLAN 10 and VLAN 20 goes up the trunk, into the router, and back down the same cable — so that one link carries the traffic twice. The Layer 3 switch on the right does the same job in silicon at line rate without leaving the box. This lab puts both in one topology so you can see exactly what you are paying for.
LAB 07

Determine STP on paper

lecture 10 · no Packet Tracer

Four switches, every value at default, no software. Work out the VLAN 1 tree with nothing but the MAC addresses — this is the method the midterm will test.

Objective

Determine the Spanning Tree Protocol topology by hand. Packet Tracer is not required and not allowed to help you.

What you are given

SwitchMACRankPorts
SW1000C.858B.5322lowest → rootFa0/1 → SW2 Fa0/4 · Fa0/2 → SW2 Fa0/3
SW4000C.CFA1.904D2nd lowestFa0/9 → SW2 Fa0/6 · Fa0/10 → SW3 Fa0/8
SW20040.0B0B.0AB73rdFa0/3 Fa0/4 → SW1 · Fa0/5 → SW3 · Fa0/6 → SW4
SW30090.21D7.0E24highestFa0/7 → SW2 Fa0/5 · Fa0/8 → SW4 Fa0/10

All priorities default → 32769 for VLAN 1 (32768 + sys-id-ext 1). All links Fast Ethernet → cost 19 each. Compare MACs left to right, byte by byte: 000C.85 < 000C.CF < 0040 < 0090.

The five-step method — use it every single time

  1. Count the blocked ports first. Blocked = switch-to-switch links − (switches − 1) = 5 − 3 = 2. Now you know when to stop.
  2. Elect the root: lowest priority, tie → lowest MAC. All of the root's ports are Designated.
  3. One Root port per non-root switch: lowest path cost to root → tie → lowest neighbour BID → tie → lowest neighbour port ID.
  4. One Designated end per link: whichever side is closer to the root; tie → lower BID.
  5. Leftovers block. Ports facing PCs are always Designated and never block.
Solved — VLAN 1
SwitchPortRoleWhy
SW1Fa0/1Designatedroot bridge — every port designated
SW1Fa0/2Designatedsame
SW2Fa0/4Rootcost 19 tie → sender port 128.1 beats 128.2
SW2Fa0/3Blockedthe losing half of that tie
SW2Fa0/5DesignatedSW2 cost 19 < SW3 cost 38
SW2Fa0/6DesignatedSW2 cost 19 < SW4 cost 38
SW3Fa0/7Rootcost 38 via SW2, beats 57 the long way
SW3Fa0/8Blockedtie at 38 on the SW3–SW4 link → SW4's MAC is lower
SW4Fa0/9Rootcost 38 via SW2
SW4Fa0/10Designatedwon the tie against SW3
Check: exactly 2 blocked, exactly 3 root ports, every link has exactly one designated end. ✓
Traps
  • The SW3–SW4 tie is decided by MAC, not port number, because both sides sit at cost 38. 000C.CFA1 (SW4) beats 0090.21D7 (SW3) — so SW3 is the one that blocks.
  • SW2's tie is decided by the sender's port ID, not its own. SW1 Fa0/1 sends 128.1, SW1 Fa0/2 sends 128.2 — so SW2's Fa0/4 (which faces Fa0/1) wins.
  • Path cost accumulates on ingress. SW3 reaching root the long way is 19+19+19 = 57, not 38.
  • Priority is 32769 for VLAN 1, not 32768 — the extended system ID adds the VLAN number.

STP Simulator

labs 07 · 08 · 09

One topology, four states. Click a scenario and watch the roles move.

◆ ROOT SW1 SW2 SW3 SW4 PCA pri 20490 pri 24586 pri 32778 pri 40970 000C.858B.5322 0040.0B0B.0AB7 0090.21D7.0E24 000C.CFA1.904D VLAN10 .5 Fa0/1 Fa0/2 Fa0/4 Fa0/3 Fa0/5 Fa0/6 Fa0/7 Fa0/9 Fa0/8 Fa0/10 Fa0/11 D D R X D D R R D X D
R root port D designated X blocked dashed = not forwarding
LAB 08

Verifying Spanning Tree

lecture 10 · key solved

Same topology as Lab 07, but now you open the file and read the truth off the switches. Two VLANs, two different trees — that is PVST+ in one screenshot.

Objective

Verify the STP topology with show spanning-tree, and understand why VLAN 1 and VLAN 10 produce different answers on identical cabling.

Steps

  1. Download 2026CPE434Lab08STP.pkt and open with Packet Tracer 9.0.
  2. Wait at least 1 minute, or press Fast Forward Time. STP has not converged before that.
  3. Run show spanning-tree on all four switches and answer.

Topology adds PCA 192.168.10.5 on SW3 Fa0/11, access port in VLAN 10. Everything else is Lab 07.

▸ how to read the output
SW3# show spanning-tree vlan 10

VLAN0010
  Spanning tree enabled protocol ieee
  ! ---- BLOCK 1: who the root is ----
  Root ID    Priority    32778
             Address     000C.CFA1.904D      ! that's SW4's MAC → SW4 is root
             Cost        19                  ! my distance to it
             Port        8(FastEthernet0/8)  ! my root port
  ! ---- BLOCK 2: who I am ----
  Bridge ID  Priority    32778  (priority 32768 sys-id-ext 10)
             Address     0090.21D7.0E24      ! my own MAC

Interface   Role Sts Cost   Prio.Nbr  Type
Fa0/7       Altn BLK 19     128.7     P2p   ! Prio.Nbr IS the port ID
Fa0/8       Root FWD 19     128.8     P2p
Fa0/11      Desg FWD 19     128.11    P2p

! If BLOCK 1 and BLOCK 2 show the same address, that switch IS the root —
! and IOS prints "This bridge is the root" between them.
Full solved key — 30 / 30

Q1 · MAC addresses (4 pts) — read from the Bridge ID → Address line; same base MAC in every VLAN block.

SW1 000C.858B.5322 · SW2 0040.0B0B.0AB7 · SW3 0090.21D7.0E24 · SW4 000C.CFA1.904D

Q2 · VLAN 1 priority (4 pts) — all four are 32769. Default 32768 + sys-id-ext 1. Type it without a comma.

Q3 · Interface ID of SW2 Fa0/4 (1 pt)128.4. Port priority (128) dot port number. It is the Prio.Nbr column.

Q4 · Root for VLAN 1 (1 pt)SW1. All priorities tie at 32769 → lowest MAC wins, 000C.858B.

Q5 · SW2 port roles, VLAN 1 (4 pts)

Fa0/3Fa0/4Fa0/5Fa0/6
BlockedRootDesignatedDesignated

Both uplinks cost 19 → tie broken by the sender's port ID: SW1 Fa0/1 = 128.1 beats Fa0/2 = 128.2, so SW2 Fa0/4 is Root and Fa0/3 blocks. Fa0/5 and Fa0/6 are Designated because SW2 (19) is closer to root than SW3/SW4 (38).

Q6 · VLAN 10 priority (4 pts)SW1 36874 · SW2, SW3, SW4 all 32778.

SW1 was deliberately configured to 36864 in the base file, so 36864 + 10 = 36874. It loses the VLAN 10 election on purpose. The others are default 32768 + 10.

Q7 · Root for VLAN 10 (1 pt)SW4. SW1 is out at 36874; the remaining three tie at 32778 → lowest MAC 000C.CFA1.904D.

Q8 · All port roles, VLAN 10 (11 pts)

PortSwitchRolePortSwitchRole
Fa0/1SW1BlockedFa0/7SW3Blocked
Fa0/2SW1RootFa0/8SW3Root
Fa0/3SW2DesignatedFa0/9SW4Designated
Fa0/4SW2DesignatedFa0/10SW4Designated
Fa0/5SW2DesignatedFa0/11SW3Designated
Fa0/6SW2Rootedge port to PCA — never blocks

Root is SW4, so Fa0/9 and Fa0/10 are Designated. SW2 and SW3 each reach SW4 directly (root ports Fa0/6 and Fa0/8). On the SW2–SW3 link both cost 19 → lower BID wins, SW2 takes Designated and SW3 Fa0/7 blocks. SW1 can only reach the root through SW2 at cost 38, so SW2 is Designated on both Fa0/3 and Fa0/4; SW1 picks Fa0/2 as its root port (sender 128.3 beats 128.4) and blocks Fa0/1.

The one idea to take away
  • Identical cables, identical costs — and yet VLAN 1 blocks SW2 Fa0/3 + SW3 Fa0/8 while VLAN 10 blocks SW1 Fa0/1 + SW3 Fa0/7. Different roots, different trees. That is PVST+: one independent spanning tree per VLAN, and you can steer each one separately.
  • Blocked count is 2 in both VLANs — 5 links − 3. The count never changes; only which ports lose does.
  • Priority always displays as configured + VLAN number. If a question gives you 36874 and asks the configured value, subtract the VLAN: 36864.
LAB 09

Configuring STP

lectures 10 · 11 · key solved

Stop letting MAC addresses decide your network. Set priorities on purpose, then watch what Cisco's root primary shortcut actually calculates.

Objective

Configure STP bridge priority, configure the root bridge with the Cisco shortcut, and verify the resulting tree.

Priorities to configure — VLAN 10 only

SwitchConfiguredDisplayed (+ VLAN 10)Result
SW12048020490root, before step 5
SW22457624586→ becomes 16384 after step 5
SW33276832778default
SW44096040970furthest from root

Steps, as the sheet numbers them

  1. Open the Lab 08 file.
  2. Wait 1 minute or Fast Forward Time.
  3. Configure the four VLAN 10 priorities above. Wait again.
  4. Answer Q1–4.
  5. On SW2: spanning-tree vlan 10 root primary. Wait again.
  6. Answer Q5–8.
▸ commands
SW1(config)# spanning-tree vlan 10 priority 20480
SW2(config)# spanning-tree vlan 10 priority 24576
SW3(config)# spanning-tree vlan 10 priority 32768
SW4(config)# spanning-tree vlan 10 priority 40960
! priority must be a multiple of 4096 — 4096, 8192, 12288, 16384, 20480 ...

SW2(config)# spanning-tree vlan 10 root primary
! not a stored setting — IOS computes a number NOW and writes a plain
! 'priority' line. Check with: show run | include spanning-tree

show spanning-tree vlan 10
show spanning-tree vlan 10 root      ! one-line summary
Full solved key — 31 / 31

Q1 · VLAN 10 priorities (4 pts) — SW1 20490 · SW2 24586 · SW3 32778 · SW4 40970. Configured + 10, no commas.

Q2 · Root per VLAN (2 pts) — VLAN 1 → SW1, VLAN 10 → SW1. Same winner, two different reasons: VLAN 1 is untouched so all tie at 32769 and the lowest MAC wins; VLAN 10 now has priorities and SW1 holds the lowest.

Q3 · Port roles, VLAN 10, before root primary (10 pts)

PortSwRolePortSwRole
Fa0/1SW1DesignatedFa0/6SW2Designated
Fa0/2SW1DesignatedFa0/7SW3Root
Fa0/3SW2BlockedFa0/8SW3Designated
Fa0/4SW2RootFa0/9SW4Root
Fa0/5SW2DesignatedFa0/10SW4Blocked

Root SW1 → all its ports Designated. SW2's two equal paths break on sender port ID (128.1 beats 128.2) → Fa0/4 Root, Fa0/3 blocks. SW3 and SW4 both reach root for 38. On SW3–SW4, lower BID wins: SW3 (32778) beats SW4 (40970), so Fa0/8 Designated and Fa0/10 blocks. Blocked = 5 − 3 = 2 ✓

Q4 · Are VLAN 1 and VLAN 10 the same shape? (1 pt)False. Both roots happen to be SW1, but the SW3–SW4 link flips: VLAN 1 breaks the tie on MAC (SW4 wins, SW3 Fa0/8 blocks); VLAN 10 breaks it on priority (SW3 wins, SW4 Fa0/10 blocks).

Q5 · Root after root primary on SW2 (2 pts) — VLAN 1 → SW1 (untouched), VLAN 10 → SW2.

Q6 · SW2's VLAN 10 priority now (1 pt)16394, i.e. configured 16384.

The rule: if the current lowest priority is above 24576, take 24576; otherwise go 4096 below it. SW1 held 20480, which is not above 24576, so SW2 takes 20480 − 4096 = 16384 → displayed 16394. This is the single most-missed question in the lab.

Q7 · Run root primary again — priority now? (1 pt)16394, unchanged. The command recalculates against the other switches every time; it is not cumulative. The lowest rival is still SW1 at 20480, so the answer is still 20480 − 4096.

Q8 · Port roles, VLAN 10, after root primary (10 pts)

PortSwRolePortSwRole
Fa0/1SW1BlockedFa0/6SW2Designated
Fa0/2SW1RootFa0/7SW3Root
Fa0/3SW2DesignatedFa0/8SW3Designated
Fa0/4SW2DesignatedFa0/9SW4Root
Fa0/5SW2DesignatedFa0/10SW4Blocked

Root is now SW2, so all four SW2 ports are Designated. SW1 picks between its two links — sender SW2 Fa0/3 (128.3) beats Fa0/4 (128.4), and that cable lands on SW1 Fa0/2, so Fa0/2 is Root and Fa0/1 blocks. Exact mirror image of Q3. SW3 and SW4 keep Fa0/7 and Fa0/9, now cost 19 straight to the root; the SW3–SW4 tie is unchanged.

Quiz will ask
  • Priority must be a multiple of 4096. 20000 is rejected; 20480 is accepted.
  • Displayed = configured + VLAN ID. Every priority question hides this. 16384 → 16394 for VLAN 10.
  • root primary = "current lowest above 24576 → take 24576, else lowest − 4096", computed once, never cumulative. root secondary always lands on 28672.
  • Changing priority for VLAN 10 leaves VLAN 1 completely alone. Always check which VLAN a question is about.
  • The tie-break order never changes: cost → sender BID → sender port priority → sender port number.
LAB 10

STP with Topology Changes

lectures 10 · 11 · key solved

Break things on purpose and time the recovery. Five experiments that turn the 15+15 second forward-delay from a number on a slide into something you watch happen.

Objective

Observe how STP responds to topology changes, verify port states during the transition, and explain why PortFast belongs on access ports.

Setup

Lab 09 file after step 5 · SW1 20480 · SW2 16384 (root) · SW3 32768 · SW4 40960

PCAttached toAddressVLAN
PCASW3 Fa0/11192.168.10.5/2410 access
PCB newSW4 Fa0/12192.168.10.6/2410 access

Add PCB first, wait a minute, then re-verify all four priorities against the figure before you start — the whole lab is meaningless if the tree is not the one you think it is.

Baseline — confirm this before experiment 1

SW1:  Fa0/1 Altn BLK    Fa0/2 Root FWD
SW2:  all Desg FWD                        ! root bridge
SW3:  Fa0/7 Root FWD    Fa0/8 Desg FWD    Fa0/11 Desg FWD
SW4:  Fa0/9 Root FWD    Fa0/10 Altn BLK   Fa0/12 Desg FWD

The five experiments

#Do thisRead within 29 sResult
1Power PCA offonSW3 vlan 10Fa0/11 crawls LIS → LRN → FWD, ~30 s of dead port
2spanning-tree portfast on Fa0/11, repeatSW3 vlan 10Fa0/11 is FWD instantly — the entire argument for PortFast
3just lookSW4 vlan 10Fa0/9 Root FWD · Fa0/10 Altn BLK
4shutdown SW4 Fa0/9SW4 vlan 10Fa0/10 promotes to Root, walks LIS → LRN ≈ 30 s
5no shutdown Fa0/9SW4 vlan 10Fa0/9 retakes Root while still LIS, Fa0/10 drops to Altn BLK immediately
Catching the 29-second window 1. Type the show command but do not press Enter — trigger the event, come back, hit Enter. 2. For the shut / no-shut pair, stay in config mode and use do show spanning-tree vlan 10 — zero navigation. 3. Never press Fast Forward Time inside the window; it jumps 30 s and you land on FWD. Do press it between sections. 4. After no shutdown, wait about 5 seconds before the show. The link needs a moment to come up and SW4 cannot know Fa0/9 is better until SW2's next hello arrives. Fire instantly and you will catch Fa0/9 Desg LIS / Fa0/10 Root FWD — a real snapshot, but not the one being asked for.
▸ commands
! --- setup: add PCB on SW4 ---
SW4(config)# interface FastEthernet0/12
SW4(config-if)# switchport mode access
SW4(config-if)# switchport access vlan 10

! --- section 2 ---
SW3(config)# interface FastEthernet0/11
SW3(config-if)# spanning-tree portfast

! --- sections 4 and 5: stay in config mode, use 'do show' ---
SW4(config)# interface FastEthernet0/9
SW4(config-if)# shutdown
SW4(config-if)# do show spanning-tree vlan 10      ! immediately
SW4(config-if)# no shutdown
SW4(config-if)# do show spanning-tree vlan 10      ! wait ~5 s first

! --- finish: all four switches ---
end
copy running-config startup-config
Full solved key — 14 / 14, verified against the grader
QBlankAnswer
1Fa0/11 role · stateDesg · LRN
2Fa0/11 role · stateDesg · FWD
3Fa0/9 role · Fa0/10 role · Fa0/9 state · Fa0/10 stateRoot · Altn · FWD · BLK
4Fa0/10 role · stateRoot · LRN
5Fa0/9 role · Fa0/10 role · Fa0/9 state · Fa0/10 stateRoot · Altn · LRN · BLK

The three transition blanks all take LRN, not LIS. Physically either is defensible inside 29 s — the port is Listening for the first 15 s and Learning for the next 15 — but the grader's key was captured after the 15-second mark in all three cases. Roles are computed independently of state, which is why Fa0/9 reads Root while it is still only Learning.

Quiz will ask
  • Status codes: LIS listening · LRN learning · FWD forwarding · BLK blocking. Role codes: Root · Desg · Altn. Type the abbreviations exactly as the output prints them.
  • Role and state are independent. A port becomes Root the instant the BPDU maths says so, and only then spends 30 s earning the right to forward.
  • Experiment 5 is the money shot: Fa0/9 Root LRN and Fa0/10 Altn BLK at the same moment means SW4 has no forwarding path to the root at all. PCB is cut off for 30 seconds.
  • PortFast belongs on host ports only. On a switch-to-switch link it skips the loop check and builds a loop — which is why you pair it with BPDU Guard.
  • Direct link failure (experiment 4) costs 30 s: no Max Age wait, just 15 + 15. An indirect failure adds the 20 s Max Age on top — that is the 50 s figure, and what BackboneFast removes.
And this is why RSTP existsThirty seconds of blackout every time a link flaps is unacceptable on a modern network. 802.1w replaces the timers with a proposal/agreement handshake and converges in under a second — and it turns PortFast into a first-class concept called an edge port. Lecture 13 picks up exactly here.
LAB 11

Configuring Rapid Spanning Tree

lectures 13 · 14 · key solved

Same link failure, four times over, changing only the protocol. Watch 30 seconds of outage collapse to nothing — and see what happens when only half the network has been upgraded.

Objective

Verify that RSTP is backward compatible with IEEE 802.1D, and compare the convergence time of the two. This is the lab that makes the case for 802.1w with a stopwatch instead of a slide.

Note on the lab sheetThe title slide reads "Lab 10 — Configure Rapid Spanning Tree". That is a typo carried over from the previous deck; Section 1 says "From Lab 10", so this is Lab 11.

Setup — carried straight from Lab 10

SW1 20480 · SW2 16384 (root) · SW3 32768 · SW4 40960 · PCA on SW3 Fa0/11 · PCB on SW4 Fa0/12

Open the file you saved at the end of Lab 10. Make sure no interface is left shut down — Lab 10 finished with a shut/no-shut cycle on SW4 Fa0/9. Wait a minute, then re-verify all four priorities against the figure.

Baseline on SW1 — this is what Section 1 asks about

SW1# show spanning-tree vlan 10

VLAN0010
  Spanning tree enabled protocol ieee          ! "ieee" = classic 802.1D / PVST+
  Root ID    Priority    16394
             Address     0040.0B0B.0AB7           ! SW2
             Cost        19
             Port        2(FastEthernet0/2)

Interface   Role Sts Cost   Prio.Nbr  Type
Fa0/1       Altn BLK 19     128.1     P2p       ! loser of the tie
Fa0/2       Root FWD 19     128.2     P2p       ! sender SW2 Fa0/3 = 128.3 beats Fa0/4 = 128.4

SW1 has two equal-cost links to the root, so the tie is settled by the sender's port ID. SW2's Fa0/3 (128.3) beats its Fa0/4 (128.4), and Fa0/3 lands on SW1's Fa0/2 — so Fa0/2 is the root port and Fa0/1 is the alternate. Every experiment below kills Fa0/2 and watches Fa0/1 take over.

The five sections

§Running RSTPEventRead onQ
1nobodybaseline, nothing changedSW11–3
2SW2 onlyshutdown SW1 Fa0/2SW14–5
3SW2 onlyno shutdown SW1 Fa0/2SW16
4all fourshutdown SW1 Fa0/2SW17
5all fourno shutdown SW1 Fa0/2SW18

Every reading is taken within the first 29 seconds of the event, on SW1, for VLAN 10. Wait a full minute between sections.

▸ commands
! --- section 2: only SW2 changes protocol ---
SW2(config)# spanning-tree mode rapid-pvst

! --- the event, run from SW1, stay in config mode ---
SW1(config)# interface FastEthernet0/2
SW1(config-if)# shutdown
SW1(config-if)# do show spanning-tree vlan 10
SW1(config-if)# no shutdown
SW1(config-if)# do show spanning-tree vlan 10     ! wait ~5 s after no shut

! --- section 4: bring the rest across ---
SW1(config)# spanning-tree mode rapid-pvst
SW3(config)# spanning-tree mode rapid-pvst
SW4(config)# spanning-tree mode rapid-pvst

! --- useful checks ---
show spanning-tree vlan 10          ! the "protocol" word tells you the mode
show spanning-tree summary          ! one line: which mode this switch is in
! spanning-tree mode pvst   <- returns a switch to classic 802.1D
Full solved key — 17 / 17, verified against the grader

Every question reads SW1, VLAN 10, inside the first 29 seconds.

Q§AsksAnswerpts
11protocol on SW1ieee1
21root bridge for VLAN 10SW21
31Fa0/1 role · stateAltn · BLK2
42protocol on SW1, after SW2 → RSTPieee1
52Fa0/1 role · stateRoot · LIS2
63Fa0/1 role · Fa0/2 role · Fa0/1 state · Fa0/2 stateAltn · Root · BLK · LIS4
74Fa0/1 role · stateRoot · FWD2
85Fa0/1 role · Fa0/2 role · Fa0/1 state · Fa0/2 stateAltn · Root · BLK · FWD4

Q4 is the trap. Only SW2 was switched to RSTP, so SW1 — which is what the question asks about — still reports ieee. Read the wrong switch's output and you lose the mark. Both protocol questions answer ieee.

Q5 vs Q7 is the entire lab. Identical event, identical topology. With SW1 still on 802.1D the promoted alternate crawls through LIS; with every switch on 802.1w it is already FWD. Thirty seconds of outage against none.

Q6 and Q8 show the asymmetry. Demotion to blocking is instant in both protocols — there is no timer on the way into blocking. It is the promotion that costs time, and only under 802.1D.

Timing — do not carry Lab 10's convention over Every transition blank in this lab graded as LIS. In Lab 10 the same kind of blank graded as LRN. Both are physically correct inside a 29-second window — the port is Listening for the first 15 s and Learning for the next 15 — the difference is purely when the reading was captured. Take your own reading quickly and report what you actually see.

Why RSTP is instant — the two mechanisms

Situation802.1D802.1w
Root port dies, alternate available (§2 vs §4)Alternate walks LIS 15 s + LRN 15 sAlternate is a pre-computed backup and switches to forwarding at once — the BPDU it already stored proves the path is loop-free
New link comes up (§3 vs §5)Every port serves the same 30 sProposal / agreement handshake across the point-to-point link: one exchange, then forward
Quiz will ask
  • The mode word in the output: ieee = 802.1D/PVST+, rstp = rapid-PVST. That single word answers "which protocol is this switch running".
  • The Cisco command is spanning-tree mode rapid-pvst — not "rstp".
  • Backward compatibility is per port, not per switch. An RSTP bridge that hears a legacy BPDU on one port drops to 802.1D on that port only. Cisco marks it in the Type column as P2p Peer(STP).
  • Which means a half-upgraded network is as slow as the old one on the mixed links. That is the entire point of sections 2 and 3.
  • RSTP has three states — Discarding, Learning, Forwarding — but Cisco still prints BLK for discarding in the Sts column, so the output looks familiar.
  • RSTP port roles add Backup (a second port onto the same segment) alongside Root, Designated and Alternate.
  • Rapid transition needs a point-to-point link, which Cisco infers from full duplex. A half-duplex or shared link falls back to timers even under RSTP.
In the real worldNobody runs 802.1D by choice any more — but plenty of campuses run a mix, because one forgotten access switch never got its mode changed. This lab shows you exactly what that costs: the upgrade buys nothing until the last switch on the path is converted.
LAB 12

Configuring MST

lecture 15 · GNS3, not Packet Tracer

Twenty VLANs. PVST+ would compute twenty separate spanning trees. MST collapses them into two — and lets you send each half of the network a different way.

Objective

Configure MST and verify it. Along the way: build a region, map VLANs to instances, elect a different root per instance, and steer one instance off a link with a per-instance cost.

This lab needs different tools GNS3 + the GNS3 VM + Cisco IOU Layer 2 switches. Packet Tracer is not used and its 2960 image does not support MST properly.

Add the switches in order, IOU1 through IOU4. If you added them correctly they will have these MAC addresses — check before you configure anything, because the root elections depend on them:
IOU1 aabb.cc00.0100 · IOU2 aabb.cc00.0200 · IOU3 aabb.cc00.0300 · IOU4 aabb.cc00.0400
If they do not match, delete the project and add them again in order. There is no way to fix it afterwards.

Topology — a square with one diagonal

IOU1 top · IOU2 left · IOU4 right · IOU3 bottom · plus a diagonal IOU2 ↔ IOU4

LinkEnd AEnd B
top-leftIOU1 e0/0IOU2 e0/1
top-rightIOU1 e1/3IOU4 e1/2
bottom-leftIOU2 e0/2IOU3 e0/3
bottom-rightIOU3 e1/0IOU4 e1/1
diagonal — the one step 6 cripplesIOU2 e2/0IOU4 e2/1

5 switch-to-switch links, 4 switches → 2 blocked ports per instance. Same arithmetic as every STP lab: links − (switches − 1).

Steps, as the sheet numbers them

  1. Create VLANs 51–70 on all four switches.
  2. Configure every inter-switch link as a trunk, with dot1q encapsulation if the command exists.
  3. Configure MST on all four with name netdes, revision 1, instance 1 = VLANs 51–60, instance 2 = VLANs 61–70.
  4. IOU2 becomes root for instance 1.
  5. IOU4 becomes root for instance 2.
  6. Set the instance 2 path cost of IOU2 e2/0 and IOU4 e2/1 to 10,000,000.
  7. Answer the questions.
▸ complete config
! ===== ALL FOUR SWITCHES — identical, character for character =====
vlan 51-70
!
interface range Ethernet0/0 - 3 , Ethernet1/0 - 3 , Ethernet2/0 - 1
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
spanning-tree mode mst
!
spanning-tree mst configuration
 name netdes                  ! case-sensitive
 revision 1
 instance 1 vlan 51-60
 instance 2 vlan 61-70
 exit                         ! config is staged until you exit — nothing applies before this

! ===== IOU2 only =====
spanning-tree mst 1 root primary
interface Ethernet2/0
 spanning-tree mst 2 cost 10000000

! ===== IOU4 only =====
spanning-tree mst 2 root primary
interface Ethernet2/1
 spanning-tree mst 2 cost 10000000

Verify — in this order

CommandWhat proves it worked
show spanning-tree mst configurationRun this first, on all four. Name, revision and the VLAN-to-instance map must be byte-identical. One character different and that switch is its own region.
show spanning-tree mstAll three instances at a glance — MST0 (the IST), MST1, MST2 — with the root and each port's role.
show spanning-tree mst 1Root should be IOU2. Look for This bridge is the root.
show spanning-tree mst 2Root should be IOU4, and the diagonal should not be carrying instance 2 after step 6.
show spanning-tree mst interface e2/0The same port, listed once per instance, with a different cost and possibly a different role in each. This one command is the whole idea of MST.
show spanning-tree mst 2 detailConfirms the 10,000,000 cost actually took.
What you should see, and why

Three instances exist, not twenty. MST0 is the IST — it always exists and carries every VLAN you did not map, including VLANs 1–50 and 71–4094. MST1 carries 51–60, MST2 carries 61–70. Twenty VLANs, two trees plus the IST, instead of twenty independent computations.

Two different roots on one physical topology. Instance 1 folds toward IOU2, instance 2 folds toward IOU4. VLANs 51–60 and VLANs 61–70 take genuinely different paths across the same cables — that is load sharing, and it is the reason anyone bothers with MST instead of a single common tree.

Step 6 is the demonstration. The IOU2–IOU4 diagonal is the shortest hop between the two roots. Setting its instance-2 cost to 10,000,000 — far above any default long-path cost — forces instance 2 to reroute through IOU1 or IOU3, while instance 1 keeps using the diagonal at its normal cost. One cable, two costs, two behaviours, decided per instance.

Cost is set on both ends because path cost is evaluated on the receiving side; leaving one end cheap makes the two switches disagree about the diagonal.

Quiz will ask
  • What makes a region. Three things must match exactly on every switch: name, revision number, and the VLAN-to-instance map. Not the priorities, not the costs. Mistype netdes as Netdes and you have two regions that talk to each other as if through plain 802.1D.
  • Instance 0 is the IST and cannot be deleted. Every unmapped VLAN rides it.
  • MST is built on RSTP, so it inherits the rapid transitions from Lab 11 — proposal/agreement, alternate ports promoted instantly.
  • The MST config is staged: your instance lines do nothing until you leave spanning-tree mst configuration mode. Then all of them apply at once and the tree re-converges.
  • Root election is per instance: spanning-tree mst 1 root primary touches instance 1 only.
  • Path cost is per instance too: spanning-tree mst 2 cost 10000000 leaves instance 1 alone on the same interface.
  • MST uses the long (32-bit) path cost method by default, which is why 10,000,000 is a plausible number here — under the old 16-bit short costs the maximum was 65,535.
  • Outside the region, the whole region looks like one single bridge to the rest of the network.
In the real worldA data-centre with 500 VLANs running PVST+ is running 500 spanning-tree processes, and the switch CPU feels every one. MST is how you get that down to two or three trees while still using both uplinks — half the VLANs left, half the VLANs right, nothing idle. The cost is that every switch in the region must be configured identically, which is exactly the failure this lab teaches you to check for first.

// TRAINING RANGEDrills

Cards, mock exam, and three generators that never run out of questions.

Flashcards

Click to flip · SPACE flip · ← → move · G got it · A again

question
answer

Mock exam

best

20 random questions from a bank of . Explanations on every answer.

Mode matcher

DTP · PAgP · LACP

Pick both ends. Instantly see the result.

×

EUI-64 generator

Work out the link-local on paper, then reveal.

Root election generator

Four switches boot. Click the root.

// INTENSIVE PREPExam conditions, not comfort

Drills build recall. This builds performance under time pressure — and shows you exactly where you are weak.

Weak point radar

no data yet

Built from every answer you give anywhere on this site. Red means study it now.

Timed exam simulator

no feedback until you submit

Real conditions: a running clock, no explanations mid-test, full report at the end.

LENGTH

Port role solver

the #1 exam skill

A fresh 4-switch scenario every round, same topology as Labs 07–10. Assign every port, then grade.

Rapid fire

60 seconds

Answer as many as you can. Wrong answers cost nothing but time — speed is the point.

60 0 correct

Gauntlet

one mistake ends it

Keep answering until you miss. This is how you find the gap you did not know you had.

streak 0

Command recall

type it from memory

Read the task, say the command out loud or type it, then reveal. Configuration questions are free marks if you drilled these.

Sprint programs

structured sessions

Pick one, start the clock, work the checklist. Progress is saved.

00:00

Resource slots

to be filled

Space reserved for material still to come. Send it and it gets built in here.

SlotStatusWhat it will add
Lab 10 quiz keyawaiting your attemptSolved answers + new quiz items on PortFast timing and port states
Labs 01–05 quiz keysnot capturedVerified answers for the earlier labs
Past midterm papersnot suppliedReal question patterns, weighted by frequency
Design project briefnot suppliedA project workspace with requirements checklist
Post-midterm decksnot issuedQoS, HA, wireless design — final exam scope

// QUICK REFERENCECheatsheet

Every number and table in one place. This is your last-hour page.

Numbers

memorize
ItemValue
Hello / Forward Delay / Max Age2 / 15 / 20 s
Direct failure downtime30 s (15+15)
Indirect failure downtime52 s (20+2+15+15)
Cost 10M / 100M / 1G / 10G100 / 19 / 4 / 2
Bridge priority default / step32768 / 4096 (0–61440)
root primary24576, or lowest − 4096
Port priority default128 (0–255)
UplinkFast side effectspriority 49152, cost +3000
RSTP neighbor dead3 hellos ≈ 6 s
UDLD message / detect15 s / ~45 s
Flex Links failover< 50 ms
CAM aging300 s → 15 s on change
BPDU interval / address2 s → 01-80-C2-00-00-00
Bridge ID2 B priority + 6 B MAC
802.1Q TPID / ID bits0x8100 / 12 bits
VLAN ranges1 · 2–1001 · 1002–1005 · 1025–4094
VTP password8–64 chars, MD5
MST regionname + revision + map
Extended system IDpriority + VLAN ID
Port security default max1 MAC
RIPng portUDP 521
IPv6 prefixesFE80 · FD · FF · FF02::1 · FF02::2

DTP — will it trunk?

accessdyn autotrunkdyn desirable
accessAccessAccessDO NOT USEAccess
dyn autoAccessAccess ⚠TrunkTrunk
trunkDO NOT USETrunkTrunkTrunk
dyn desirableAccessTrunkTrunkTrunk

Default = dynamic auto. Hook: Desirable Does, Auto Awaits.

EtherChannel — will it bundle?

ProtocolInitiatesWaitsNo protocol
PAgP (Cisco)desirableauto ← defaulton (only with on)
LACP (802.3ad)activepassive ← default

Works: desirable+auto · desirable+desirable · active+passive · active+active · on+on
Fails: auto+auto · passive+passive · on + anything else

STP vs RSTP

802.1DRSTPLearnsForwards
Disabled / Blocking / ListeningDiscardingnono
LearningLearningyesno
ForwardingForwardingyesyes
RSTP roleMeaning
Rootmy best path to the root
Designatedthis segment's best port toward root
Alternatespare path via another switch (blocked)
Backupsecond port to the same segment (blocked)

Guard family

FeatureTriggerAction
PortFasthost port upstraight to Forwarding
BPDU Guardany BPDU on PortFasterr-disable
BPDU Filterstop sending BPDUs (beats Guard)
Root Guardsuperior BPDUroot-inconsistent
Loop Guardmissing BPDUsloop-inconsistent
UDLDone-way linklog / err-disable
UplinkFastuplink diesinstant backup
BackboneFastinferior BPDUskip Max Age

Root Guard = too-good news · BackboneFast = bad news · Loop Guard = no news.

VTP modes & Private VLAN reach

VTP modeCreateSyncForward ads
Server (default)yesyesyes
Clientnoyesyes
Transparentlocalnoyes
PromiscuousSame communityOther communityIsolated
Promiscuousyesyesyesyes
Communityyesyesnono
Isolatedyesnonono

Command index

▸ VLAN & trunk
vlan 10
 name SALES
interface Fa0/5
 switchport mode access
 switchport access vlan 10
interface Gi0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk allowed vlan 10,20
▸ VTP
vtp mode {server|client|transparent}
vtp domain ENG
vtp version 2
vtp password 261434
vtp pruning
▸ EtherChannel
interface range Gi1/0/1 - 3
 channel-protocol lacp
 channel-group 3 mode active
interface port-channel 3
 switchport mode trunk
▸ Routing between VLANs
interface G0/0.1010
 encapsulation dot1q 10
 ip address 192.168.10.1 255.255.255.0
ip routing
interface vlan 30
 ip address 192.168.30.1 255.255.255.0
interface Gi1/0/24
 no switchport
 ip address 192.168.100.2 255.255.255.252
▸ STP control & protection
spanning-tree mode {pvst|rapid-pvst|mst}
spanning-tree vlan 10 priority 20480
spanning-tree vlan 10 root primary
spanning-tree portfast default
spanning-tree portfast edge bpduguard default
spanning-tree uplinkfast
spanning-tree backbonefast
spanning-tree loopguard default
udld aggressive
interface Gi0/1
 spanning-tree guard root
 spanning-tree guard loop
 switchport backup interface Gi0/2
▸ MST
spanning-tree mode mst
spanning-tree mst configuration
 name XYZ
 revision 1
 instance 1 vlan 11, 21, 31
 end
spanning-tree mst 1 root primary
▸ IPv6
ipv6 unicast-routing
interface Fa0/1
 ipv6 address 2001:DB8:1111:1::1/64
 ipv6 address FE80::FACE:10 link-local
 ipv6 enable
ipv6 router ospf 1
 router-id 1.1.1.1
▸ Every show command
show vlan brief
show interface trunk
show interface Fa0/5 switchport
show vtp status
show etherchannel summary
show vlan private-vlan
show spanning-tree vlan 10
show spanning-tree root
show spanning-tree summary
show spanning-tree inconsistentports
show spanning-tree mst configuration
show udld
show interface switchport backup
show mac address-table
show ipv6 interface brief
show ip route
show ip ospf neighbor
show ip ssh
show port-security interface Fa0/1

Exam-day method

  • Golden rule: in STP, LOWEST always wins — priority, MAC, cost, BID, port number.
  • Port roles, 5 steps: count blocked (links − switches + 1) → find root → one root port each → one designated per link → rest block.
  • Extended ID: priority + VLAN. MST: priority + instance.
  • Downtime: 30 s direct, 52 s indirect, ~0 with RSTP.
  • Hooks: "Bees Like Lavender Flowers" (Blocking Listening Learning Forwarding) · "100-19-4-2" · "Desirable Does, Auto Awaits".
  • Draw the topology, mark the root first, write the timers in the margin.

// GLOSSARYAcronyms

Short → long → what it actually means.

ShortLongMeaning
VLANVirtual LANOne switch cut into separate broadcast domains
VTPVLAN Trunking ProtocolCopies the VLAN list between switches
DTPDynamic Trunking ProtocolNegotiates whether a link becomes a trunk
ISLInter-Switch LinkOld Cisco tagging, replaced by 802.1Q
802.1QIEEE VLAN tagging4-byte tag inside the Ethernet frame
TPIDTag Protocol IdentifierAlways 0x8100
TCITag Control InformationPRI (3b) + CFI (1b) + VLAN ID (12b)
CFI / DEICanonical Format / Drop Eligible1 bit: Ethernet vs Token Ring / drop-first
STPSpanning Tree Protocol (802.1D)Blocks ports so loops can't form
RSTPRapid STP (802.1w)Same tree, fast handshakes
MSTMultiple Spanning Tree (802.1s)VLAN groups mapped to instances
CSTCommon Spanning TreeA single tree for all VLANs
PVST+Per-VLAN Spanning Tree PlusCisco: one 802.1D tree per VLAN
RPVST+Rapid PVST+Cisco: one RSTP tree per VLAN
BPDUBridge Protocol Data UnitThe STP message
TCNTopology Change NotificationBPDU that reports a change
BIDBridge IDPriority + MAC = a switch's STP identity
CAMContent-Addressable MemoryThe MAC address table
TCAMTernary CAMFast table for ACL lookups
SVISwitched Virtual Interfaceinterface vlan X — a VLAN's gateway
MLSMultilayer SwitchSwitch that also routes
PAgPPort Aggregation ProtocolCisco channel negotiation (auto/desirable)
LACPLink Aggregation Control ProtocolIEEE 802.3ad (active/passive)
UDLDUniDirectional Link DetectionEcho test catching one-way fiber
PVLANPrivate VLANVLAN split into isolated/community
VACLVLAN Access Control ListFilter inside a VLAN
SSHSecure ShellEncrypted remote login
VTYVirtual TeletypeThe remote login lines
RSARivest–Shamir–AdlemanKey pair for SSH (2048 bits)
MD5Message Digest 5Hash used for VTP passwords
SLAACStateless Address AutoconfigurationHost builds its own IPv6 address
NDPNeighbor Discovery ProtocolIPv6 find-routers-and-neighbors
DADDuplicate Address DetectionChecks nobody else has my address
EUI-64Extended Unique IdentifierMAC → interface ID: split, FFFE, flip
RDNSSRecursive DNS Server optionDNS delivered inside NDP
RIPngRIP next generationRIP for IPv6, UDP 521
OSPFv3OSPF version 3OSPF for IPv6
IOS / IOUInternetwork OS / IOS on UnixSwitch OS / virtual image for GNS3
QoS / HAQuality of Service / High AvailabilityPriority traffic / survive failures
err-disableerror-disabledPort shut by a protection feature

// AUTHORZann

Z

Zann

Computer Engineering · Chiang Mai University
NETWORKING SWITCHING CCNA/CCNP TRACK

Fields with a dotted underline are editable — click, type, and they save in this browser.

Chiang Mai University
Faculty of Engineering

Course

261434
FieldValue
Course261434 — Computer Network Design and Management
Also listed asCPE434
ScopeLayer 2 switching: VLAN · trunking · VTP · EtherChannel · inter-VLAN routing · Private VLAN · STP / RSTP / MST · plus campus design, QoS, HA and wireless design
AssessmentAssignment 20 · Project 15 · Midterm 35 · Final 30
Lab platformCisco Packet Tracer 9.0 · GNS3 2.x with IOU
WorkflowLecture slides → lab instructions → graded quiz on Mango CMU

Competency map

Filled bars are topics marked complete on this site. Portfolio-friendly: this is the actual syllabus coverage.

About this build

personal project

A single self-contained HTML study console for 261434, built from the course's own material: 16 lecture decks, 9 lab sheets and 2 solved quiz keys. No frameworks, no build step, no network calls — it runs offline from one file and stores progress locally.

16Lecture decks
9Labs mapped
152Flashcards
88Quiz items
1HTML file
0Dependencies

What it does

  • Full lecture notes rewritten for comprehension, with every table and sequence from the slides.
  • All 9 labs documented with topology, commands and predicted quiz answers.
  • Interactive STP simulator: one topology, four verified scenarios across Labs 07–09.
  • Drill engine — spaced flashcards, a 20-question mock exam with explanations, and three infinite generators (EUI-64, root election, mode matcher).
  • Progress tracking, readiness scoring and an exam countdown, persisted in the browser.
  • Canvas background engine with three switchable network-themed visualisations.

Built with

Vanilla HTML · CSS custom properties for theming · plain JavaScript · Canvas 2D · localStorage

Progress snapshot

Live from your own study data on this device.

0%Readiness
0Topics done
0Labs done
0Cards mastered
Best quiz