Documente Academic
Documente Profesional
Documente Cultură
Chapter 7
Extending Switched
Networks with Virtual
LANs
1999, Cisco Systems, Inc.
7-1
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 spanning-tree operations
www.cisco.com
ICND7-2
VLAN Overview
Segmentation
3rd floor
2nd floor
1st floor
Flexibility
SALES
HR
ENG
Security
www.cisco.com
ICND7-3
VLAN Operations
Switch A
Red
VLAN
Black
VLAN
Green
VLAN
www.cisco.com
ICND7-4
VLAN Operations
Switch A
Red
VLAN
Black
VLAN
Switch B
Green
VLAN
Red
VLAN
Black
VLAN
Green
VLAN
www.cisco.com
ICND7-5
VLAN Operations
Switch A
Switch B
Trunk
Fast Ethernet
Red
VLAN
Black
VLAN
Green
VLAN
Red
VLAN
Black
VLAN
Green
VLAN
www.cisco.com
ICND7-6
Dynamic VLAN
Trunk
Port e0/4
Port e0/9
VLAN5
VLAN10
VMPS
1111.1111.1111 = vlan 10
MAC = 1111.1111.1111
www.cisco.com
ICND7-7
ISL Tagging
ISL trunks enable VLANs across a backbone
Performed with ASIC
VLAN Tag
stripped by
forwarding port
1999, Cisco Systems, Inc.
www.cisco.com
ICND7-8
ISL Encapsulation
ISL Header
26 bytes
DA
Type User
CRC
4 bytes
BPDU
www.cisco.com
ICND7-9
www.cisco.com
VTP Modes
Create vlans
Modify vlans
Delete vlans
Sends/forwards
advertisements
Synchronize
Saved in NVRAM
Server
Sends/forwards
advertisements
Synchronize
Not saved in
NVRAM
Client
Transparent
www.cisco.com
Create vlans
Modify vlans
Delete vlans
Forwards
advertisements
Does not
synchronize
Saved in NVRAM
ICND7-11
www.cisco.com
ICND7-12
Server
Client
www.cisco.com
ICND7-13
VTP Pruning
Switch 4
Flooded
traffic is
pruned
Switch 2
Red
VLAN
Switch 5
Port 1
Switch 6
1999, Cisco Systems, Inc.
Switch 3
www.cisco.com
Switch 1
ICND7-14
VLAN Configuration
Guidelines
www.cisco.com
ICND7-15
www.cisco.com
ICND7-16
www.cisco.com
ICND7-17
www.cisco.com
ICND7-18
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
www.cisco.com
ICND7-19
www.cisco.com
ICND7-20
www.cisco.com
ICND7-21
Defining a Trunk
wg_sw_a(config-if)#
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
Non-negotiate = Set trunk on and will not negotiate
www.cisco.com
ICND7-22
Defining a Trunk
wg_sw_a(config-if)#
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
Non-negotiate = 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(config-if)#trunk on
www.cisco.com
ICND7-23
Verifying a Trunk
wg_sw_a#showtrunk[A|B]
www.cisco.com
ICND7-24
Verifying a Trunk
wg_sw_a#showtrunk[A|B]
wg_sw_a#show trunk a
DISL state: On, Trunking: On, Encapsulation type: ISL
www.cisco.com
ICND7-25
Adding a VLAN
wg_sw_a(config)#
vlanvlan#[namevlanname]
www.cisco.com
ICND7-26
Adding a VLAN
wg_sw_a(config)#
vlanvlan#[namevlanname]
wg_sw_a#conf terminal
Enter configuration commands, one per line. End with CNTL/Z
wg_sw_a(config)#vlan 9 name switchlab2
www.cisco.com
ICND7-27
Verifying a VLAN
wg_sw_a#showvlan[vlan#]
www.cisco.com
ICND7-28
Verifying a VLAN
wg_sw_a#showvlan[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
--------------------------------------------------------------------------------------------------------
www.cisco.com
ICND7-29
vlanvlan#namevlanname
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
------------------------------------------------
www.cisco.com
ICND7-30
www.cisco.com
ICND7-31
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(config-if)#vlan-membership static 9
www.cisco.com
ICND7-32
www.cisco.com
ICND7-33
wg_sw_a#show vlan-membership
Port VLAN Membership Type
-------------------------------------------1
5
Static
2
1
Static
3
1
Static
4
1
Static
5
1
Static
6
1
Static
7
1
Static
8
9
Static
Note:port1=e0/1,port2=e0/2.....
1999, Cisco Systems, Inc.
www.cisco.com
ICND7-34
www.cisco.com
ICND7-35
www.cisco.com
ICND7-36
Visual Objective
SUBNET
10.1.1.0
10.2.2.0
10.3.3.0
10.4.4.0
10.5.5.0
10.6.6.0
10.7.7.0
10.8.8.0
10.9.9.0
10.10.10.0
10.11.11.0
10.12.12.0
10.13.13.0
VLAN
1
2
3
4
5
6
7
8
9
10
11
12
13
POD
wg_ro_x, wg_sw_x, core_sw_a
wg_pc_a, core_server
wg_pc_b, core_server
wg_pc_c, core_server
wg_pc_d, core_server
wg_pc_e, core_server
wg_pc_f, core_server
wg_pc_g, core_server
wg_pc_h, core_server
wg_pc_i, core_server
wg_pc_j, core_server
wg_pc_k, core_server
wg_pc_l, core_server
ISL
VLAN2
wg_pc_a
10.2.2.12
fa0/26 e0/1
(port A)
e0/2
wg_sw_a
10.1.1.10
VLAN13
fa0/26 e0/1
(port A)
...
fa0/1
wg_sw_l
ISL 10.1.1.120
e0
wg_ro_a
10.1.1.11
wg_pc_l
10.13.13.12
e0/2
e0
wg_ro_l
10.1.1.121
fa0/12
fa0/24
core_ server ISL
10.x.x.1
1999, Cisco Systems, Inc.
core_sw_a
10.1.1.2
www.cisco.com
ICND7-37
Visual Objective
SUBNET
10.1.1.0
10.2.2.0
10.3.3.0
10.4.4.0
10.5.5.0
10.6.6.0
10.7.7.0
10.8.8.0
10.9.9.0
10.10.10.0
10.11.11.0
10.12.12.0
10.13.13.0
VLAN
1
2
3
4
5
6
7
8
9
10
11
12
13
POD
wg_ro_x, wg_sw_x, core_sw_a, core_sw_b
wg_pc_a, core_server
wg_pc_b, core_server
wg_pc_c, core_server
wg_pc_d, core_server
wg_pc_e, core_server
wg_pc_f, core_server
wg_pc_g, core_server
wg_pc_h, core_server
wg_pc_i, core_server
wg_pc_j, core_server
wg_pc_k, core_server
wg_pc_l, core_server
ISL
fa0/26
e0/1
(port A)
wg_pc_l
10.13.13.12
VLAN13
fa0/26
(port A) e0/1
...
fa0/24
ISL
fa0/27
(port B)
wg_sw_a
10.1.1.10
fa0/1
core_ server
10.x.x.1
wg_pc_a
10.2.2.12
VLAN2
core_sw_a
10.1.1.2
www.cisco.com
fa0/27
(port B)
wg_sw_l
10.1.1.120
ISL
fa0/12
fa0/13
fa0/14
ISL
fa0/12
fa0/13
ISL fa0/14
...
ISL
fa0/1
core_sw_b
10.1.1.4
ICND7-38
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
www.cisco.com
ICND7-39
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?
www.cisco.com
ICND7-40