Chapter 7
Extending Switched
Networks with Virtual
LANs
© 1999, Cisco Systems, Inc. 71
Objectives
Upon completion of this chapter, you will
be able to perform the following tasks:
• Configure a VLAN
• Configure VLAN Trunking Protocol (VTP)
• Configure a switch for trunking
• Verify VLAN connectivity
• Verify spanningtree operations
© 1999, Cisco Systems, Inc. [Link] ICND—72
VLAN Overview
• Segmentation
3rd floor
• Flexibility
2nd floor
• Security
1st floor
SALES HR ENG
A VLAN = A broadcast domain = Logical network (subnet)
© 1999, Cisco Systems, Inc. [Link] ICND—73
VLAN Operations
Switch A
Red Black Green
VLAN VLAN VLAN
• Each logical VLAN is like a separate physical bridge
© 1999, Cisco Systems, Inc. [Link] ICND—74
VLAN Operations
Switch A Switch B
Red Black Green Red Black Green
VLAN VLAN VLAN VLAN VLAN VLAN
• Each logical VLAN is like a separate physical bridge
• VLANs can span across multiple switches
© 1999, Cisco Systems, Inc. [Link] ICND—75
VLAN Operations
Switch A Switch B
Trunk
Fast Ethernet
Red Black Green Red Black Green
VLAN VLAN VLAN VLAN VLAN VLAN
• Each logical VLAN is like a separate physical bridge
• VLANs can span across multiple switches
• Trunks carries traffic for multiple VLANs
© 1999, Cisco Systems, Inc. [Link] ICND—76
VLAN Membership Modes
Static VLAN Dynamic VLAN
Trunk
Port e0/4 Port e0/9
VLAN5 VLAN10
VMPS
1111.1111.1111 = vlan 10
MAC = 1111.1111.1111
© 1999, Cisco Systems, Inc. [Link] ICND—77
ISL Tagging
ISL trunks enable VLANs across a backbone
• Performed with ASIC
• Not intrusive to client
stations, client does not see
VLAN Tag the ISL header
added by
incoming port InterSwitch
Link carries
• Effective between switches,
VLAN identifier routers and switches,
switches and servers with
ISL network interface cards
VLAN Tag
stripped by
forwarding port
© 1999, Cisco Systems, Inc. [Link] ICND—78
ISL Encapsulation
ISL Header CRC
Encapsulated Ethernet frame
26 bytes 4 bytes
DA Type User SA LEN AAAA03 HSA VLAN BPDU
BPDU INDEX RES
VLAN BPDU
• Frames encapsulated with ISL header and CRC
• Support for many VLANs (1024)
• VLAN field
• BPDU bit
© 1999, Cisco Systems, Inc. [Link] ICND—79
VLAN Trunking Protocol (VTP)
• A messaging system that advertises VLAN configuration information
• Maintains VLAN configuration consistency throughout a common
administrative domain
• VTP sends advertisements on trunk ports only
• Support mixed media trunks (Fast Ethernet, FDDI, ATM)
VTP Domain “ICND”
[Link] to the latest vlan information
2
1.“new vlan added”
© 1999, Cisco Systems, Inc. [Link] ICND—710
VTP Modes
• Create vlans
• Modify vlans
• Delete vlans
• Sends/forwards
Server advertisements
• Synchronize
• Saved in NVRAM
• Sends/forwards
advertisements • Create vlans
• Synchronize • Modify vlans
Client Transparent • Delete vlans
• Not saved in
NVRAM • Forwards
advertisements
• Does not
synchronize
• Saved in NVRAM
© 1999, Cisco Systems, Inc. [Link] ICND—711
How VTP Works
• VTP advertisements are sent as multicast frames
• VTP servers and clients synchronized to latest revision number
• VTP advertisement are sent every five minutes or when there is a change
© 1999, Cisco Systems, Inc. [Link] ICND—712
How VTP Works
• VTP advertisements are sent as multicast frames
• VTP servers and clients synchronized to latest revision number
• VTP advertisement are sent every five minutes or when there is a change
[Link] new VLAN
[Link] 3 > Rev 4
Server
3 3
[Link] 3 > Rev 4 [Link] 3 > Rev 4
[Link] new vlan info [Link] new vlan info
Client Client
© 1999, Cisco Systems, Inc. [Link] ICND—713
VTP Pruning
• Increases available bandwidth by reducing unnecessary flooded traffic
• Example: Station A sends broadcast, broadcast is only flooded toward any
switch with ports assigned to the red VLAN
Port 2 B
Switch 4
Flooded
traffic is
pruned
Switch 2
Red
Switch 5 VLAN
Port 1 A
Switch 6 Switch 3 Switch 1
© 1999, Cisco Systems, Inc. [Link] ICND—714
VLAN Configuration Guidelines
• Maximum number of VLANs is switchdependent
• Catalyst 1900 supports 64 VLANs with a separate
spanning tree per VLAN
• VLAN1 is One of the factory default VLANs
• CDP and VTP advertisements are sent on VLAN1
• Catalyst 1900 IP address is in the VLAN1 broadcast
domain
• Must be in VTP server or transparent mode to create,
add, or delete VLANs
© 1999, Cisco Systems, Inc. [Link] ICND—715
VLAN Configuration Steps
• Enable VTP (optional)
• Enable trunking
• Create VLANs
• Assign VLAN to ports
© 1999, Cisco Systems, Inc. [Link] ICND—716
VTP Configuration Guidelines
• VTP domain name
• VTP mode (server/client/transparent)—VTP server
mode is the default
• VTP pruning
• VTP password
• VTP trap
Use caution when adding a new switch into an existing domain. A
new switch should be added in client mode to prevent the new switch
from propagating incorrect VLANs information
Use the delete vtp command to reset the VTP revision number
© 1999, Cisco Systems, Inc. [Link] ICND—717
Creating a VTP Domain
wg_sw_a(config)#
vtp [server | transparent] [domain domainname] [trap {enable | disable}]
[password password] [pruning {enable | disable}
© 1999, Cisco Systems, Inc. [Link] ICND—718
Creating a VTP Domain
wg_sw_a(config)#
vtp [server | transparent] [domain domainname] [trap {enable | disable}]
[password password] [pruning {enable | disable}
wg_sw_a#conf terminal
Enter configuration commands, one per line. End with CNTL/Z
wg_sw_a(config)#vtp transparent
wg_sw_a(config)#vtp domain switchlab
© 1999, Cisco Systems, Inc. [Link] ICND—719
Verifying VTP Configurations
wg_sw_a#show vtp
© 1999, Cisco Systems, Inc. [Link] ICND—720
Verifying VTP Configurations
wg_sw_a#show vtp
wg_sw_a#show vtp
VTP version: 1
Configuration revision: 4
Maximum VLANs supported locally: 1005
Number of existing VLANs: 6
VTP domain name : switchlab
VTP password :
VTP operating mode : Transparent
VTP pruning mode : Enabled
VTP traps generation : Enabled
Configuration last modified by: [Link] at 00000000 [Link]
© 1999, Cisco Systems, Inc. [Link] ICND—721
Defining a Trunk
wg_sw_a(configif)#
trunk [on | off | desirable | auto | nonegotiate]
• On = Set trunk on and negotiate with other side
• Off = Set trunk off and negotiate with other side
• Desirable = Negotiate with other side.
Trunk on if other side is on, desirable, or auto
• Auto = Will be a trunk only if the other side is on or desirable
• Nonnegotiate = Set trunk on and will not negotiate
© 1999, Cisco Systems, Inc. [Link] ICND—722
Defining a Trunk
wg_sw_a(configif)#
trunk [on | off | desirable | auto | nonegotiate]
• On = Set trunk on and negotiate with other side
• Off = Set trunk off and negotiate with other side
• Desirable = Negotiate with other side.
Trunk on if other side is on, desirable, or auto
• Auto = Will be a trunk only if the other side is on or desirable
• Nonnegotiate = Set trunk on and will not negotiate
wg_sw_a#conf terminal
Enter configuration commands, one per line. End with CNTL/Z
wg_sw_a(config)#interface f0/26
wg_sw_a(configif)#trunk on
First trunk port(Port A)
© 1999, Cisco Systems, Inc. [Link] ICND—723
Verifying a Trunk
wg_sw_a#show trunk [A | B]
© 1999, Cisco Systems, Inc. [Link] ICND—724
Verifying a Trunk
wg_sw_a#show trunk [A | B]
wg_sw_a#show trunk a
DISL state: On, Trunking: On, Encapsulation type: ISL
© 1999, Cisco Systems, Inc. [Link] ICND—725
Adding a VLAN
wg_sw_a(config)#
vlan vlan# [name vlanname]
© 1999, Cisco Systems, Inc. [Link] ICND—726
Adding a VLAN
wg_sw_a(config)#
vlan vlan# [name vlanname]
wg_sw_a#conf terminal
Enter configuration commands, one per line. End with CNTL/Z
wg_sw_a(config)#vlan 9 name switchlab2
© 1999, Cisco Systems, Inc. [Link] ICND—727
Verifying a VLAN
wg_sw_a#show vlan [vlan#]
© 1999, Cisco Systems, Inc. [Link] ICND—728
Verifying a VLAN
wg_sw_a#show vlan [vlan#]
wg_sw_a#sh vlan 9
VLAN Name Status Ports
9 switchlab2 Enabled
VLAN Type SAID MTU Parent RingNo BridgeNo Stp Trans1 Trans2
9 Ethernet 100009 1500 0 1 1 Unkn 0 0
© 1999, Cisco Systems, Inc. [Link] ICND—729
Modifying a VLAN Name
wg_sw_a(config)#
vlan vlan# name vlanname
wg_sw_a#conf terminal
Enter configuration commands, one per line. End with CNTL/Z
wg_sw_a(config)#vlan 9 name switchlab90
wg_sw_a#show vlan 9
VLAN Name Status Ports
9 switchlab90 Enabled
© 1999, Cisco Systems, Inc. [Link] ICND—730
Assigning Switch Ports to a
VLAN
wg_sw_a(configif)#
vlanmembership {static {vlan#} | dynamic}
© 1999, Cisco Systems, Inc. [Link] ICND—731
Assigning Switch Ports to a
VLAN
wg_sw_a(configif)#
vlanmembership {static {vlan#} | dynamic}
wg_sw_a#conf terminal
Enter configuration commands, one per line. End with CNTL/Z
wg_sw_a(config)#interface ethernet 0/8
wg_sw_a(configif)#vlanmembership static 9
© 1999, Cisco Systems, Inc. [Link] ICND—732
Verifying VLAN Membership
wg_sw_a#show vlanmembership
© 1999, Cisco Systems, Inc. [Link] ICND—733
Verifying VLAN Membership
wg_sw_a#show vlanmembership
wg_sw_a#show vlanmembership
Port VLAN Membership Type Port VLAN Membership Type
1 5 Static 13 1 Static
2 1 Static 14 1 Static
3 1 Static 15 1 Static
4 1 Static 16 1 Static
5 1 Static 17 1 Static
6 1 Static 18 1 Static
7 1 Static 19 1 Static
8 9 Static 20 1 Static
Note: port 1=e0/1, port 2=e0/2 .....
© 1999, Cisco Systems, Inc. [Link] ICND—734
Verifying Spanning Tree
wg_sw_a#show spantree {vlan number}
© 1999, Cisco Systems, Inc. [Link] ICND—735
Verifying Spanning Tree
wg_sw_a#show spantree {vlan number}
wg_sw_a#show spantree 1
VLAN1 is executing the IEEE compatible Spanning Tree Protocol
Bridge Identifier has priority 32768, address 0050.F037.DA00
Configured hello time 2, max age 20, forward delay 15
Current root has priority 0, address 00D0.588F.B600
Root port is FastEthernet 0/26, cost of root path is 10
Topology change flag not set, detected flag not set
Topology changes 53, last topology change occured 0d00h17m14s ago
Times: hold 1, topology change 8960
hello 2, max age 20, forward delay 15
Timers: hello 2, topology change 35, notification 2
Port Ethernet 0/1 of VLAN1 is Forwarding
Port path cost 100, Port priority 128
Designated root has priority 0, address 00D0.588F.B600
Designated bridge has priority 32768, address 0050.F037.DA00
Designated port is Ethernet 0/1, path cost 10
Timers: message age 20, forward delay 15, hold 1
© 1999, Cisco Systems, Inc. [Link] ICND—736
Visual Objective
SUBNET VLAN POD wg_pc_a
[Link] 1 wg_ro_x, wg_sw_x, core_sw_a VLAN2 [Link]
[Link] 2 wg_pc_a, core_server
[Link] 3 wg_pc_b, core_server fa0/26 e0/1
[Link] 4 wg_pc_c, core_server (port A) e0/2 e0
[Link] 5 wg_pc_d, core_server
[Link] 6 wg_pc_e, core_server wg_sw_a
[Link] 7 wg_pc_f, core_server [Link] wg_ro_a
[Link] 8 wg_pc_g, core_server [Link]
[Link] 9 wg_pc_h, core_server wg_pc_l
[Link] 10 wg_pc_i, core_server VLAN13 [Link]
[Link] 11 wg_pc_j, core_server
[Link] 12 wg_pc_k, core_server fa0/26 e0/1
[Link] 13 wg_pc_l, core_server (port A) e0/2 e0
wg_sw_l wg_ro_l
...
ISL ISL [Link] [Link]
fa0/1 fa0/12
fa0/24
core_ server ISL
10.x.x.1 core_sw_a
[Link]
© 1999, Cisco Systems, Inc. [Link] ICND—737
Visual Objective
wg_pc_a
SUBNET VLAN POD VLAN2 [Link]
[Link] 1 wg_ro_x, wg_sw_x, core_sw_a, core_sw_b
[Link] 2 wg_pc_a, core_server
fa0/26 fa0/27
[Link] 3 wg_pc_b, core_server e0/1
(port A) (port B)
[Link] 4 wg_pc_c, core_server
[Link] 5 wg_pc_d, core_server wg_sw_a
[Link] 6 wg_pc_e, core_server [Link]
[Link] 7 wg_pc_f, core_server
[Link] 8 wg_pc_g, core_server wg_pc_l
[Link] 9 wg_pc_h, core_server VLAN13 [Link]
[Link] 10 wg_pc_i, core_server
[Link] 11 wg_pc_j, core_server fa0/26 fa0/27
[Link] 12 wg_pc_k, core_server (port A) e0/1 (port B)
[Link] 13 wg_pc_l, core_server
wg_sw_l
...
[Link]
ISL
... ISL
fa0/12
ISL
fa0/12
ISL
fa0/1 fa0/1
fa0/24 fa0/13 fa0/13
ISL
core_ server fa0/14 ISL fa0/14
core_sw_a core_sw_b
10.x.x.1 [Link] [Link]
© 1999, Cisco Systems, Inc. [Link] ICND—738
Summary
After completing this chapter, you should
be able to perform the following tasks:
• Configuring VLAN
• Configuring VTP
• Configuring a trunk
• Verifing Spanning Tree Operations
© 1999, Cisco Systems, Inc. [Link] ICND—739
Review Questions
1. What are the three VTP modes?
2. Over what type of port can VTP
advertisements be sent?
3. VLAN ID is carried in the ________
header.
4. How do we assign a VLAN to a port?
© 1999, Cisco Systems, Inc. [Link] ICND—740