IT141 · SESSION 2 · FIELD NOTES

VLANs: Breaking Up the Sprawl

In CCNA 1, every switch sat in VLAN 1, and every broadcast reached every desk on the floor. You were told that was on purpose. Here's the payoff. This session, Local Dispatch draws walls that aren't really walls: VLANs split one switch into several separate networks, and a trunk carries all of them down a single cable. Almost everything in the next four sessions is built on it.

New material Module 3 — VLANs Network change S2 moves to HQ; S3 joins at R2 Next session Module 4 — Inter-VLAN Routing

Module 3

What Session 2 covers

One module, five topics, in NetAcad's order: what VLANs are and why they exist; how VLANs work across several switches (tagging, the native VLAN, the voice VLAN); creating VLANs and assigning ports; trunks; and DTP, the protocol that can build a trunk on its own whether you meant it to or not.

Cold open · Local Dispatch, Monday morning

The Rookie arrives to find S2 sitting on a cart outside the elevator. "Promoted," says the crew chief. "It's moving upstairs to HQ. The new switch, S3, takes its old desk at Shipping." By lunch, both HQ switches are cabled together, and the Rookie notices something on the monitoring screen: every time anyone on the floor asks "who has this address?", every single desk hears it. Front Desk hears Logistics' questions. Logistics hears Front Desk's. "That," says the Surveyor, "is The Sprawl. You met it in the Zoning Office. It never left. Today we finally put up walls."

Topology used on this page S2 has moved upstairs to HQ, connected to S1 by F0/23 ↔ F0/23. A new switch, S3, took S2's old desk at R2, keeping the old address 192.168.20.2. Two new PCs sit on S2: PC-C on F0/1 (192.168.10.11/24) and PC-D on F0/11 (192.168.30.9/26). By the end of the session, HQ has five VLANs.
VLANNameSubnetUsed for
10FRONT-DESK192.168.10.0/24CCNA 1's LAN-A: PC-A, PC-C, and R1's LAN interface
30LOGISTICS192.168.30.0/26CCNA 1 Session 12's "LAN-C, 50 users" block, now built: PC-D
99MGMT192.168.99.0/24Switch management: S1 .11, S2 .12
900NATIVEnoneThe native VLAN on every trunk. No hosts.
999PARKINGnoneUnused ports, shut down

The numbering rule from the lab network page: VLAN N uses 192.168.N.0.

Module 3.1

The Sprawl: one broadcast domain

Before any VLAN work, every port on S1 and S2 is in VLAN 1. Here is why that's a problem.

CCNA 1 callback CCNA 1's final review promised this: "why the lab switches only use VLAN 1." And in The Zoning Office, The Sprawl was the villain: one giant broadcast domain. In CCNA 1 the only way to split a broadcast domain was a router. Session 1 reminded you why: switches flood broadcasts out every port.

With S1 F0/23 and S2 F0/23 both at their factory default, the link between them is an ordinary access link in VLAN 1, so the two switches form one big broadcast domain. When PC-A sends a broadcast, S2 hears it:

PC-A · force an ARP broadcast
C:\> arp -d C:\> ping 192.168.10.1
S2 · who has S2 heard from?
S2# show mac address-table Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1 0060.5c3b.a801 DYNAMIC Fa0/23

PC-D is in a different subnet (192.168.30.0/26), but it's in the same broadcast domain, so it still has to receive PC-A's broadcast and throw it away. Multiply that by every host and every broadcast: that's The Sprawl.

BACK FROM CCNA 1

CASE FILE D-01

The Sprawl

One broadcast domain that grows with every switch and every desk. Every ARP request reaches every host on the floor, whether it's for them or not. It breaks nothing on day one. It just makes the whole floor noisier, slower, and easier to snoop on.

Tell: a switch learns the MAC address of a host it never talks to (S2 learning PC-A on Fa0/23), and Simulation mode shows one ARP request reaching hosts in other subnets.

See also: What a VLAN is · D-02, The Native

Debrief CCNA 1's Zoning Office split The Sprawl with a router. Why is a VLAN the cheaper fix? (a router needs a port, and a cable, for every broadcast domain. VLANs split one switch into many broadcast domains at no cost; a router is needed only for the traffic that has to cross between them)

Module 3.1

What a VLAN is

A VLAN (virtual LAN) is a group of switch ports that behaves as its own separate LAN. Each VLAN is its own broadcast domain and, by convention, its own IP subnet. Hosts in different VLANs can't talk to each other unless something routes between them, exactly as if they were plugged into different switches.

Why bother

Types of VLANs

TypeWhat it isIn our network
Default VLANVLAN 1. Every port starts there. It can't be deleted or renamed.Empty by the end of today
Data VLANCarries user traffic10, 30
Native VLANOn a trunk, the VLAN whose frames travel untagged. VLAN 1 by default.900
Management VLANCarries management traffic: SSH, the switch's SVI. VLAN 1 by default.99
Voice VLANCarries IP phone traffic, which needs priority and low delay (NetAcad: under 150 ms end to end)None (no phones); shown as an example
VLAN 1 wears three hats by default Out of the box, VLAN 1 is the default VLAN, the native VLAN, and the management VLAN. Best practice is to move all three jobs off VLAN 1. By the end of today, ours are 10/30 for data, 900 for native, and 99 for management.

VLAN ranges

RangeDetails
Normal: 1–1005Used in small and medium networks. Stored in vlan.dat in flash, not in the running configuration. VLANs 1002–1005 are reserved for old Token Ring and FDDI, are created automatically, and can't be deleted.
Extended: 1006–4094Used by service providers. Stored in the running configuration. On a 2960 they need a VTP setting that's beyond this course. NetAcad writes this range as "1006–4095", but VLAN 4095 is reserved, so 4094 is the highest you can use.

Module 3.2

VLANs across switches: tags and trunks

PC-A is in VLAN 10 on S1. PC-C is in VLAN 10 on S2. The frames between them cross one cable that also carries VLANs 30 and 99. How does S2 know which VLAN a frame belongs to?

The link between the switches is a trunk: a point-to-point link that carries more than one VLAN. On a trunk, the sending switch adds an IEEE 802.1Q tag to each frame that says which VLAN it belongs to. The receiving switch reads the tag and forwards the frame only to ports in that VLAN, removing the tag when the frame leaves an access port. Hosts never see tags; access ports send and receive ordinary, untagged frames.

PC-A · VLAN 10 untagged frame into F0/1, an access port S1 tag added: VID 10 trunk F0/23 ↔ F0/23 carries 10, 30, 99 and 900 S2 tag removed out F0/1, VLAN 10 only PC-C · VLAN 10
Figure 1. One VLAN 10 frame from PC-A to PC-C. Hosts never see a tag; only the trunk carries one. A frame in VLAN 900, the native VLAN, would cross the trunk untagged.
802.1Q tag fieldSizeWhat it holds
Type (TPID)2 bytes0x8100: "this frame is tagged"
User priority3 bitsClass of service (CoS), used for voice priority
CFI1 bitCanonical format identifier (legacy)
VLAN ID (VID)12 bitsThe VLAN number, which is why VLAN IDs top out near 4,096

The whole tag is 4 bytes, inserted after the source MAC address. Because the frame changed, the switch recalculates the FCS.

Tagged Ethernet frame DestMAC 6 SourceMAC 6 802.1Qtag 4 Type2 Data FCS4 TPID 0x810016 bits: "this is tagged" PRI3 bits CFI1 bit VLAN ID12 bits: 1–4094 Numbers in the frame are bytes. The tag goes in after the source MAC, and the switch recalculates the FCS.
Figure 2. The 802.1Q tag. A tagged frame is 4 bytes longer than the same frame untagged.
CCNA 1 callback The Ethernet II frame from CCNA 1 Session 5: preamble, destination MAC, source MAC, type, data, FCS. The 802.1Q tag slides in right after the source MAC, so a tagged frame is 4 bytes longer.

The native VLAN

One VLAN on each trunk crosses untagged: the native VLAN. Any untagged frame that arrives on a trunk is put in the native VLAN. It exists for compatibility with devices that don't tag. Both ends of a trunk must use the same native VLAN, and best practice is a native VLAN with no hosts in it, which is why ours is VLAN 900.

The voice VLAN

An IP phone is really a tiny three-port switch: one port to the wall, one to the PC, one internal. The switch port it plugs into carries two VLANs at once: the PC's data VLAN (untagged) and the voice VLAN (tagged, with a CoS priority). The switch tells the phone which voice VLAN to use with CDP.

Module 3.3

Create VLANs and assign ports

Two steps: create the VLAN (and name it), then put access ports in it. Both happen on every switch that uses the VLAN. This course doesn't use VTP, so nothing copies VLANs between switches for you.

S1 · what a new switch looks like
S1# show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/15, Fa0/16 Fa0/17, Fa0/18, Fa0/19, Fa0/20 Fa0/21, Fa0/22, Fa0/23, Fa0/24 Gig0/1, Gig0/2 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active

Every port is in VLAN 1, plus the four reserved VLANs. (A real 2960 writes Gi0/1 and shows the reserved VLANs as act/unsup; Packet Tracer writes it as shown.)

Create and name the VLANs

S1 · HQ's VLANs (S2 has the same)
S1# configure terminal S1(config)# vlan 10 S1(config-vlan)# name FRONT-DESK S1(config-vlan)# vlan 30 S1(config-vlan)# name LOGISTICS S1(config-vlan)# vlan 99 S1(config-vlan)# name MGMT S1(config-vlan)# vlan 900 S1(config-vlan)# name NATIVE S1(config-vlan)# vlan 999 S1(config-vlan)# name PARKING S1(config-vlan)# end

Assign access ports

S1 · access ports
S1# configure terminal S1(config)# interface range f0/1 - 10 S1(config-if-range)# switchport mode access S1(config-if-range)# switchport access vlan 10 S1(config-if-range)# interface range f0/11 - 20 S1(config-if-range)# switchport mode access S1(config-if-range)# switchport access vlan 30 S1(config-if-range)# exit ! ! The link to R1 stays in VLAN 10, so PC-A keeps its gateway. S1(config)# interface g0/1 S1(config-if)# switchport mode access S1(config-if)# switchport access vlan 10 S1(config-if)# end

Example: a voice VLAN

HQ has no IP phones, so this shows the syntax only, on a spare port.

S1 · voice VLAN (illustration only)
S1(config)# vlan 150 S1(config-vlan)# name VOICE S1(config-vlan)# exit S1(config)# interface f0/9 S1(config-if)# switchport mode access S1(config-if)# switchport access vlan 10 S1(config-if)# mls qos trust cos S1(config-if)# switchport voice vlan 150 S1(config-if)# end ! ! Now undo it. S1# configure terminal S1(config)# interface f0/9 S1(config-if)# no switchport voice vlan S1(config-if)# no mls qos trust cos S1(config-if)# exit S1(config)# no vlan 150 S1(config)# end
Beyond this course mls qos trust cos tells the switch to trust the phone's priority marking. That's QoS, which NetAcad lists as beyond this course: recognize it, don't worry about it.

Module 3.3

Move management to VLAN 99

Session 1 left S1's management address on VLAN 1, with a promise. Here it moves.

Session 1 callback Remember the SVI rule from Session 1: an SVI comes up only when a port carrying its VLAN is up. That rule is about to matter.
S1 · management moves from VLAN 1 to VLAN 99 (S2 uses .12)
S1# configure terminal ! ! Retire the VLAN 1 management address. S1(config)# interface vlan 1 S1(config-if)# no ip address S1(config-if)# shutdown S1(config-if)# exit ! ! The new management SVI. S1(config)# interface vlan 99 S1(config-if)# ip address 192.168.99.11 255.255.255.0 S1(config-if)# no shutdown S1(config-if)# exit ! ! A new ip default-gateway replaces the old one. 192.168.99.1 won't exist until Session 3. S1(config)# ip default-gateway 192.168.99.1 S1(config)# end S1# show ip interface brief | include Vlan Vlan1 unassigned YES manual administratively down down Vlan99 192.168.99.11 YES manual up down
Up / down until the trunk exists Vlan99 … up down: the SVI is enabled, but no port that carries VLAN 99 is up. No access port is in VLAN 99, and until the trunk is built, nothing carries it. When the trunk comes up, IOS logs %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up.
Notice S3 S3 at R2's site manages itself on VLAN 20, and R2 has never heard of "VLAN 20": R2's port is just a router port. VLAN numbers mean something only inside the switches that have them.
PC-A loses SSH to the switches, and that's expected PC-A is in VLAN 10. S1's management address is now in VLAN 99. Nothing routes between VLANs yet, so PC-A can't reach S1 or S2 over the network until Session 3. The console still works.

Module 3.3

Verify VLANs

Three commands answer almost every VLAN question, and two more fill in the details.

CommandAnswers
show vlan briefWhich VLANs exist, and which access ports are in each
show vlan id n / show vlan name nameDetails of one VLAN
show interfaces id switchportEverything about one port: its mode, its access VLAN, its native VLAN, and whether it negotiates
show vlan summaryHow many VLANs exist on the switch, normal and extended range
show interfaces vlan nOne SVI: whether it's up, its address, and its counters
S1 · show vlan brief (end of session)
S1# show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active 10 FRONT-DESK active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Gig0/1 30 LOGISTICS active Fa0/11, Fa0/12, Fa0/13, Fa0/14 Fa0/15, Fa0/16, Fa0/17, Fa0/18 Fa0/19, Fa0/20 99 MGMT active 900 NATIVE active 999 PARKING active Fa0/21, Fa0/22, Fa0/24, Gig0/2 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active
S1 · show vlan id 10 (trimmed)
S1# show vlan id 10 VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 10 FRONT-DESK active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Gig0/1 ...

show vlan name FRONT-DESK gives the same output (names are case-sensitive).

S1 · show interfaces f0/1 switchport (trimmed)
S1# show interfaces f0/1 switchport Name: Fa0/1 Switchport: Enabled Administrative Mode: static access Operational Mode: static access Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: native Negotiation of Trunking: Off Access Mode VLAN: 10 (FRONT-DESK) Trunking Native Mode VLAN: 1 (default) Voice VLAN: none ...
LineTells you
Administrative ModeWhat you configured
Operational ModeWhat the port is actually doing. When these two disagree, DTP decided something.
Negotiation of TrunkingOff because of switchport mode access: no DTP
Access Mode VLANThe port's data VLAN
Trunking Native Mode VLANOnly used if the port were a trunk

Module 3.3

Change, delete, and reset VLANs

The rule NetAcad wants you to remember: move the ports out before you delete a VLAN.

Move a port back to VLAN 1

S1
S1(config)# interface f0/10 S1(config-if)# no switchport access vlan S1(config-if)# end

F0/10 now shows under VLAN 1. switchport access vlan 10 puts it back.

Delete a VLAN that still has ports

S2
S2(config)# no vlan 30 S2(config)# end S2# show interfaces f0/11 switchport | include Access Mode Access Mode VLAN: 30 (Inactive)

Ports F0/11–F0/20 vanish from show vlan brief, and PC-D is cut off. The ports don't fall back to VLAN 1. Fix: vlan 30, name LOGISTICS, and they come back.

Reset every VLAN on a switch

Scratch switch only, not the course file
Switch# delete flash:vlan.dat Delete filename [vlan.dat]? Delete flash:/vlan.dat? [confirm] Switch# erase startup-config Erasing the nvram filesystem will remove all configuration files! Continue? [confirm] [OK] Erase of nvram: complete Switch# reload Proceed with reload? [confirm]
Why both? VLANs live in vlan.dat, not the startup config. Erasing only the startup config leaves the VLANs behind after the reload, which surprises everyone the first time. NetAcad's full reset: unplug the data cables, erase the startup config, delete vlan.dat, reload.

Module 3.4

Configure an 802.1Q trunk

HQ's switch-to-switch link, S1 F0/23 to S2 F0/23, is a trunk carrying VLANs 10, 30, 99, and 900, with 900 as the native VLAN.

S1 · F0/23, the trunk to S2 (S2 F0/23 is identical)
S1# configure terminal S1(config)# interface f0/23 S1(config-if)# switchport mode trunk S1(config-if)# switchport trunk native vlan 900 S1(config-if)# switchport trunk allowed vlan 10,30,99,900 S1(config-if)# switchport nonegotiate S1(config-if)# end
S1 · show interfaces trunk
S1# show interfaces trunk Port Mode Encapsulation Status Native vlan Fa0/23 on 802.1q trunking 900 Port Vlans allowed on trunk Fa0/23 10,30,99,900 Port Vlans allowed and active in management domain Fa0/23 10,30,99,900 Port Vlans in spanning tree forwarding state and not pruned Fa0/23 10,30,99,900
  1. Mode, encapsulation, status, native VLAN. on means a static trunk.
  2. Allowed: what you permitted.
  3. Allowed and active: permitted and the VLAN exists on this switch. A VLAN you forgot to create drops out here.
  4. Forwarding: what Spanning Tree is actually forwarding. This gets interesting in Session 4.

Reset a trunk to its defaults

S1
S1(config)# interface f0/23 S1(config-if)# no switchport trunk allowed vlan S1(config-if)# no switchport trunk native vlan S1(config-if)# end

That leaves every VLAN allowed and the native VLAN at 1. switchport mode access makes the port an access port again.

Module 3.4

Native VLAN mismatch

The most common trunk mistake, and the one CDP warns you about.

Suppose S2 F0/23 goes back to native VLAN 1 (no switchport trunk native vlan) while S1 keeps 900. Within a minute:

S1 · console message
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/23 (900), with S2 FastEthernet0/23 (1).
THREAT LEVEL: TRUNK

CASE FILE D-02

The Native

Rides the one VLAN on a trunk that crosses untagged. When the two ends disagree about which VLAN that is, The Native carries frames from one VLAN into another, and no tag looks wrong, because there is no tag. Its accomplice is DTP: a port left in a dynamic mode becomes a trunk for whoever asks.

Tell: %CDP-4-NATIVE_VLAN_MISMATCH, repeating on both switches, and different native VLANs at each end in show interfaces trunk. For DTP: a port nobody configured as a trunk shows Operational Mode: trunk in show interfaces switchport.

See also: The native VLAN · DTP

Debrief Why does HQ use an empty VLAN, 900, as its native VLAN, and not VLAN 1 or a user VLAN? (untagged frames land in the native VLAN. If no host is assigned to it, no attacker can sit in it to start a double-tagging attack, and a mismatch has no user traffic to leak. Session 8 shows the attack)
Coming up in Session 4 On real switches, Spanning Tree also notices the mismatch and blocks the affected VLANs on that port. Packet Tracer may only show the CDP message.

Module 3.5

DTP: trunks that build themselves

Dynamic Trunking Protocol is Cisco's protocol for two switch ports to negotiate whether their link becomes a trunk. It's on by default. That's convenient when it works, and a security problem when someone plugs in a device that asks for a trunk. Best practice: set every port's mode yourself, and turn DTP off with switchport nonegotiate.

ModeWhat it does
switchport mode accessAlways an access port. Tells the neighbor to be an access link, too.
switchport mode trunkAlways a trunk. Tells the neighbor to become a trunk.
switchport mode dynamic desirableAsks the neighbor to trunk
switchport mode dynamic autoTrunks only if asked. The 2960's default.
switchport nonegotiateSends no DTP at all. Only allowed with access or trunk. On a trunk, the far end must also be set to trunk by hand.

Which pairs form a trunk

Dynamic autoDynamic desirableTrunkAccess
Dynamic autoAccessTrunkTrunkAccess
Dynamic desirableTrunkTrunkTrunkAccess
TrunkTrunkTrunkTrunkLimited connectivity
AccessAccessAccessLimited connectivityAccess

The trap is the top-left cell. Auto plus auto gives an access link: both ends are willing, but neither one asks. That's exactly how S1 and S2 were connected before the trunk was configured.

Drill · Will it trunk?

Two switch ports are cabled together. Predict what the link becomes.

The trap on HQ's original link

S1 · before the trunk was built
S1# show interfaces f0/23 switchport Name: Fa0/23 Switchport: Enabled Administrative Mode: dynamic auto Operational Mode: static access Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: native Negotiation of Trunking: On Access Mode VLAN: 1 (default) ...

Configured as dynamic auto, operating as an access port. Once PC-A and PC-C move to VLAN 10, this link carries only VLAN 1, so they can't reach each other. That's why the trunk is set by hand.

S1 · if a port is still dynamic
S1(config-if)# switchport nonegotiate Command rejected: Conflict between 'nonegotiate' and 'dynamic' status.

Set switchport mode trunk (or access) first, then nonegotiate. For the curious: show dtp interface f0/23 shows DTP's own view of the port. show interfaces switchport is the one to know.

Preview · Modules 10–11

Park the unused ports

One last tidy-up. Ports outside the plan go into VLAN 999, a VLAN with no gateway and no hosts, and get shut down. Session 9 explains why in full; this session builds the habit.

S1 · park the ports outside the plan
S1# configure terminal S1(config)# interface range f0/21 - 22 , f0/24 , g0/2 S1(config-if-range)# switchport mode access S1(config-if-range)# switchport access vlan 999 S1(config-if-range)# shutdown S1(config-if-range)# end

On S2 the range is f0/21 - 22 , f0/24 , g0/1 - 2. F0/24 and the Gigabit uplinks are waiting for Sessions 4 and 5.

A parked port is doubly safe: it's shut, and even if someone turns it on, they land in a VLAN with no gateway and no other hosts. In Session 9 you'll also park the unused ports inside the VLAN 10 and 30 ranges.

End of session

What works now, and what doesn't

HQ at the end of the session. The failures are expected, and they're next session's story.

From → ToResultWhy
PC-A ↔ PC-C (192.168.10.11)WorksSame VLAN (10), carried across the trunk
PC-A or PC-C → R1 (192.168.10.1)WorksR1 is plugged into a VLAN 10 access port on S1
PC-A or PC-C → PC-B, SRV1, www.it141.exampleWorksThrough R1 and R2, using the provided routes
PC-A → S3 (192.168.20.2, SSH)WorksRouted through R1 and R2; S3 has a default gateway
S1 (.99.11) ↔ S2 (.99.12)WorksSame VLAN (99), across the trunk
PC-A → PC-D (192.168.30.9)FailsDifferent VLAN and subnet, and nothing routes between VLANs yet
PC-D → its gateway 192.168.30.1FailsThat address doesn't exist yet
PC-A → S1 or S2 (SSH)FailsVLAN 10 to VLAN 99 needs routing. Use the console.
Coming up in Session 3: R1 can only wear one hat R1's LAN port is plugged into a VLAN 10 access port, so R1 is the gateway for VLAN 10 and nothing else. VLANs 30 and 99 are cut off. Module 4 gives R1 a way to be the gateway for every VLAN over one cable (router-on-a-stick), and then hands the job to a smarter switch.

Watch for this

Common Module 3 mistakes

Most Module 3 faults are one of two kinds: access-port VLAN membership, or trunk and DTP settings.

1 · A host in the wrong VLAN

PC-C's port was left in VLAN 1, or put in VLAN 30. From PC-A, ping 192.168.10.11 times out, even though both PCs are on 192.168.10.0/24, so the IP settings look fine. show vlan brief on S2 shows Fa0/1 under the wrong VLAN. Fix: switchport access vlan 10.

2 · The VLAN doesn't exist on the far switch

The VLAN appears in "allowed on trunk" but is missing from "allowed and active" in show interfaces trunk. Watch for this with VLAN 99: interface vlan 99 creates the SVI, but it does not create VLAN 99 itself.

3 · A VLAN left off the allowed list

S1 · allowed list typed as 10,30,900
S1# show ip interface brief | include Vlan99 Vlan99 192.168.99.11 YES manual up down

VLAN 99 isn't carried, so both management SVIs go up/down and the switches can't ping each other. Fix: switchport trunk allowed vlan add 99 on both ends. Don't retype the list without add: that replaces it.

4 · Native VLAN mismatch

The CDP NATIVE_VLAN_MISMATCH message, repeating. Set the same native VLAN at both ends. (See Native mismatch.)

5 · Auto + auto, so no trunk

show interfaces trunk prints nothing, and show interfaces f0/23 switchport shows Administrative Mode: dynamic auto, Operational Mode: static access. Fix: switchport mode trunk on both ends.

6 · Deleting a VLAN with ports in it

The ports disappear from show vlan brief and show Access Mode VLAN: 30 (Inactive). Recreate the VLAN, or reassign the ports first next time.

7 · nonegotiate on a dynamic port

Command rejected: Conflict between 'nonegotiate' and 'dynamic' status. Set the mode by hand first.

8 · Reading up/down as "forgot no shutdown"

administratively down means you forgot no shutdown. up down on an SVI means no up port carries that VLAN: check the trunk and the allowed list.

Recurring segment

The Ticket

Turn it into steps before you open the answer.

Ticket #141-02 · Priority: high · From: Logistics

We hired a new Logistics person and put them at the empty desk upstairs, by S2's port 14. They can't reach PC-D, who sits on the same team. Front Desk says they can see our traffic, which is not OK. Please fix by tomorrow.

One way to break it down
  1. "Can't reach PC-D, same team": both should be in VLAN 30. Check show vlan brief on S2: is F0/14 in VLAN 30, or still in VLAN 1? If it's in VLAN 999 and shut (parked), it needs to be un-parked: switchport access vlan 30, no shutdown.
  2. Check the new PC's address: it must be inside 192.168.30.0/26 (usable .1–.62; pick an unused static address in .2–.8, because .1 is the future gateway, .9 is PC-D, and .10–.62 becomes the DHCP pool in Session 6), with a /26 mask, not /24, and gateway 192.168.30.1.
  3. "Front Desk can see our traffic": a port is in the wrong VLAN. If the new PC landed in VLAN 10, or VLAN 1 still spans both switches, the broadcast domains are mixed. show interfaces f0/14 switchport: Access Mode VLAN should be 30.
  4. Verify: ping PC-D from the new PC. Then confirm in Simulation mode that its ARP broadcasts don't reach PC-A or PC-C.

Before Session 3

Checkpoint: Module 3

If you can do these cold, you're ready for inter-VLAN routing.

Study

Flashcards

Click to flip. Double-click to mark as known.

Check yourself

Sample questions

Pick an answer to see if you're right. Same style as the module-group exam.

Applied

Worked examples

Think it through before you expand the answer.

Trunks

Same VLAN, different switches, no ping

PC-A (S1, VLAN 10) can't ping PC-C (S2, VLAN 10). Both ports show the right VLAN in show vlan brief. On S1, show interfaces trunk prints nothing at all. What's wrong?

Show answer

The link between the switches isn't a trunk. An empty show interfaces trunk means no port is trunking. Most likely both ends are still dynamic auto, which forms an access link in VLAN 1, so VLAN 10 frames can't cross. Fix: switchport mode trunk on F0/23 at both ends, then the native and allowed VLAN settings.

Allowed VLANs

The one-word mistake

The trunk allows 10,30,99,900. You want to add VLAN 40 later, so you type switchport trunk allowed vlan 40. What happens?

Show answer

The allowed list becomes only VLAN 40. VLANs 10, 30, 99 and 900 stop crossing the trunk: PC-A loses PC-C, and the management SVIs drop to up/down. The right command is switchport trunk allowed vlan add 40. (There's also remove, except, and all.)

Deleting VLANs

Where did ten ports go?

After no vlan 30 on S2, ports F0/11–F0/20 don't appear anywhere in show vlan brief, and PC-D can't reach anything. Did they move to VLAN 1?

Show answer

No. They're still assigned to VLAN 30, which no longer exists, so they're inactive. show interfaces f0/11 switchport shows Access Mode VLAN: 30 (Inactive). They don't move to VLAN 1 by themselves. Fix: recreate VLAN 30 (vlan 30, name LOGISTICS) and the ports come back, or reassign them first if you really meant to delete it.

Resetting

The VLANs that came back from the dead

A classmate runs erase startup-config and reload to "wipe" S2. When it boots, the hostname is gone, but show vlan brief still lists VLANs 10, 30, 99, 900 and 999. Why?

Show answer

Normal-range VLANs live in vlan.dat in flash, not in the startup configuration. Erasing the startup config doesn't touch them. A full reset is: delete flash:vlan.dat, erase startup-config, then reload.

Broadcast domains

Count them again

At the end of today, how many broadcast domains does HQ (S1, S2, and R1's LAN interface) have, counting only VLANs that contain hosts or a switch SVI?

Show answer

Three: VLAN 10 (PC-A, PC-C, R1), VLAN 30 (PC-D), and VLAN 99 (the two switch SVIs, carried by the trunk). VLAN 900 has no hosts or SVIs (it only labels untagged frames on the trunk), VLAN 999's ports are shut, and VLAN 1 is empty. Before today, the same HQ was one broadcast domain. That's The Sprawl, beaten, at least at HQ.

Reference

Glossary & index

Every term from this session. Search, or jump by letter.