Professional Documents
Culture Documents
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 Configure a router for trunking Routing between Vlans Verify VLAN connectivity
VLAN introduction
VLAN Overview
Segmentation
Flexibility Security
Benefits of VLANs
Easily move workstations on the LAN. Easily add workstations to the LAN. Easily change the LAN configuration. Easily control network traffic. Improve security.
VLAN Operations
Switch A
Trunk
Fast Ethernet
Switch B
Red VLAN
Black VLAN
Green VLAN
Red VLAN
Black VLAN
Green VLAN
Each logical VLAN is like a separate physical bridge VLANs can span across multiple switches Trunks carries traffic for multiple VLANs Trunks use special encapsulation to distinguish between different VLANs
Static VLAN
Trunk
Dynamic VLAN
Port e0/4
VLAN5
Port e0/9
VLAN10
VLAN CONFIGURATION
TRUNKING
Trunking concept
A trunk is a single communications line that carries data of multiple Vlans.
VLAN1
VLAN1
VLAN1
VLAN2
VLAN2
VLAN2
VLAN1
TRUNK VLAN2 VLAN1 and VLAN2
VLAN1
VLAN2
Frames Tagging
ISL Tagging
ISL trunks enable VLANs across a backbone
Not intrusive to client stations, client does not see the ISL header Effective between switches, routers and switches, switches and servers with ISL network interface cards
ISL Encapsulation
ISL Header 26 bytes CRC 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
IEEE 802.1q
Dest Src Len/Type Data FCS
Dest
Src
Type
Tag
Len/Type
Data
FCS
Priority
VLAN ID
802.1q does not actually encapsulate the original frameinstead, it adds an extra 4-byte header to the middle of the original Ethernet header. 802.1q encapsulation forces a recalculation of the original FCS field in the Ethernet trailer
Both ISL and 802.1q provide trunking. Both allow the use of a 12-bit-long VLAN ID field. So, either works fine and supports the same number of VLANs. Both support a separate instance of spanning tree for each VLAN. The header used by each varies, and only ISL actually encapsulates the original frame.
Trunking implementation
R1 F0/0.10:192.168.1.254 F0/0.12:192.168.2.254 F0/0.13:192.168.3.254 SW2 .1.20 .2.20 .3.20 .1. 10 Vlan3 SW1
.2.10
.3.10
Vlan1 Vlan2
Configuring router
Router(config)#Interface fastethernet 0/0 Router(config-if)#no shutdown Router(config-if)#exit
SW2 .1.20 .2.20 .3.20 .1. 10 Vlan3 Vlan1 Vlan2
Router(config)#interface fastethernet 0/0.10 Router(config-subif)#ip address 192.168.1.254 255.255.255.0 Router(config-subif)#encapsulation dot1q 1 Router(config)#interface fastethernet 0/0.12 Router(config-subif)#ip address 192.168.2.254 255.255.255.0 Router(config-subif)#encapsulation dot1q 2 Router(config)#interface fastethernet 0/0.300 Router(config-subif)#ip address 192.168.3.254 255.255.255.0 Router(config-subif)#encapsulation dot1q 3
Switch(config)#interface fastethernet 0/1 Switch(config-if)#switchport mode trunk Switch(config-if)#switchport trunk encapsulation dot1q
VTP
VTP Modes
Create vlans Modify vlans Delete vlans Sends/forwards advertisements Synchronize Saved in NVRAM
Transparent
Create vlans Modify vlans Delete vlans Forwards advertisements Does not synchronize Saved in NVRAM
VTP advertisement are sent every five minutes or when there is a change
Server
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
Port 1
Switch 6
Switch 3
Switch 1
Maximum number of VLANs is switch-dependent 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 Must be in VTP server or transparent mode to create, add, or delete VLANs
Create VLANs
Assign VLAN to ports
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
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: 10.1.1.40 at 00-00-0000 00:00:00