Configuring VLAN Trunks: Catalyst 2900 Series XL ATM Modules Installation and Configuration Guide
Configuring VLAN Trunks: Catalyst 2900 Series XL ATM Modules Installation and Configuration Guide
Configuring VLAN Trunks: Catalyst 2900 Series XL ATM Modules Installation and Configuration Guide
Note For complete syntax and usage information for the commands used in this chapter,
refer to the Cisco IOS Desktop Switching Command Reference.
The trunking described in this chapter is not supported on all switches and modules. See
the Cisco IOS Desktop Switching Software Configuration Guide for the list of products that
support trunking.
This chapter consists of these sections:
• “Understanding How VLAN Trunks Work” section on page 3-2
• “Configuring a Trunk Port” section on page 3-4
• “Load Sharing Using STP” section on page 3-8
3-2 Cisco IOS Desktop Switching Enterprise Edition Software Configuration Guide
IEEE 802.1Q Configuration Considerations
Figure 3-1 Catalyst 2900 series XL and Catalyst 3500 series XL Switches in an ISL Trunking
Environment
15929
Task Command
Step 1 Enter global configuration mode. configure terminal
Step 2 Enter the interface configuration command interface interface_id
mode and the port to be added to the VLAN.
Step 3 Configure the port with a VLAN switchport mode trunk
membership mode of trunk.
1Configure
Step 4 the port to support ISL trunking. switchport trunk encapsulation isl
Step 5 Return to privileged EXEC mode. end
Step 6 Verify your entries. show interface interface-id switchport
Step 7 Save the configuration. copy running-config startup-config
1 To configure IEEE 802.1 Q, enter this command: switchport trunk encapsulation dotlq
Note The Enterprise Edition Software, Cisco IOS Release 11.2(8)SA6, does not support
trunk negotiation via the Dynamic Trunk Protocol (DTP), formerly known as Dynamic ISL
(DISL). If you are connecting a trunk port to a Catalyst 5000 switch or other DTP device,
use the non-negotiate option on the DTP-capable device to configure the switch port to not
generate DTP frames.
3-4 Cisco IOS Desktop Switching Enterprise Edition Software Configuration Guide
Configuring a Trunk Port
This example shows how to configure a port as a trunk, verify the trunk configuration, and
save the change to the startup configuration file:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface fa0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk encapsulation isl
Switch(config-if)# end
Note VLANs 1 and 1002 to 1005 are reserved and cannot be removed.
To modify the allowed list of a trunk, perform this task from privileged EXEC mode:
Task Command
Step 1 Enter global configuration mode. configure terminal
Step 2 Enter the interface configuration command interface interface_id
mode and the port to be added to the
VLAN.
Step 3 Configure the VLAN membership mode switchport mode trunk
for trunks.
Step 4 Define the VLANs that are not allowed to switchport trunk allowed vlan remove
transmit and receive on the port. The vlan-list
vlan-list parameter is a range of VLAN IDs
separated by a hyphen or specific VLAN
IDs separated by commas.
Step 5 Return to privileged EXEC. end
Step 6 Verify your entries. show interface interface-id switchport
allowed-vlan
Step 7 Save the configuration. copy running-config startup-config
3-6 Cisco IOS Desktop Switching Enterprise Edition Software Configuration Guide
Disabling a Trunk Port
This example shows how to define the allowed VLANs list for trunk port Fa0/1 to allow
VLANs 1 to 100, VLAN 250, and VLANs 500 to 1005, and how to verify the allowed
VLAN list for the trunk:
Switch(config)# interface fa0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan remove 101-499
Switch(config-if)# switchport trunk allowed vlan add 250
Switch(config-if)# end
Switch# show interface fa0/1 switchport allowed-vlan
"1-100,250,500-1005"
Switch#
Task Command
Step 1 Enter global configuration mode. configure terminal
Step 2 Enter the interface configuration command interface interface_id
mode and the port to be added to the VLAN.
Step 3 Return the port to its default static-access no switchport mode
mode.
Step 4 Return to privileged EXEC. end
Step 5 Verify your entries. show interface interface-id switchport
3-8 Cisco IOS Desktop Switching Enterprise Edition Software Configuration Guide
Load Sharing Using STP Port Priorities
Switch 1
Trunk 1 Trunk 2
Ns 8 – 10 (priority 10) VLANs 3 – 6 (priority 10)
Ns 3 – 6 (priority 128) VLANs 8 – 10 (priority 128)
15932
Switch 2
Step 2 Verify the VTP information by exiting to privileged EXEC mode and displaying
the VTP information for both switches.
Switch_1(vlan)# exit
APPLY completed.
Exiting....
Switch_1# show vtp status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 68
Number of existing VLANs : 59
VTP Operating Mode : Server
VTP Domain Name : milano
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x53 0x97 0x06 0x02 0xF8 0x6F
0x45 0x85
Configuration last modified by 172.20.128.151 at 3-5-93 01:05:21
3-10 Cisco IOS Desktop Switching Enterprise Edition Software Configuration Guide
Load Sharing Using STP Port Priorities
Step 3 From privileged EXEC mode, verify that the VLANs exist in the database on
Switch 1.
Switch_1# show vlan
VLAN Name Status Ports
---- -------------------------------- --------- ---------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5,
Fa0/10, Fa0/11, Fa0/12
2 VLAN0002 active
3 VLAN0003 active
4 VLAN0004 active
5 VLAN0005 active
6 VLAN0006 active
7 VLAN0007 active
8 VLAN0008 active
9 VLAN0009 active
10 VLAN0010 active
Step 4 Beginning from privileged EXEC mode, configure the trunks on Switch 1 ports.
The trunks default to ISL trunking.
Switch_1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch_1(config)# interface fa0/1
Switch_1(config-if)# switchport mode trunk
Switch_1(config-if)# end
Repeat this procedure to define the trunk ports on Switch 1 and Switch 2.
Step 5 When the trunk links come up, VTP passes the VTP and VLAN information to
Switch 2. Verify that switch 2 has learned the VLAN configuration.
Switch_2# show vlan
VLAN Name Status Ports
---- -------------------------------- --------- ---------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5,
Fa0/10, Fa0/11, Fa0/12
2 VLAN0002 active
3 VLAN0003 active
4 VLAN0004 active
5 VLAN0005 active
6 VLAN0006 active
7 VLAN0007 active
8 VLAN0008 active
9 VLAN0009 active
10 VLAN0010 active
Step 6 Use the spanning-tree command to assign the different port priorities on the
different VLANs.
Switch_1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z
Switch_1(config-if)# interface fa0/1
Switch_1(config-if)# spanning-tree vlan 8 9 10 port-priority 10
Switch_1(config-if)# end
Switch_1(config)# interface fa0/2
Switch_1(config-if)# spanning-tree vlan 3 4 5 6 port-priority 10
Switch_1(config-if)# end
3-12 Cisco IOS Desktop Switching Enterprise Edition Software Configuration Guide
Load Sharing Using STP Path Cost
Step 7 Verify the entries by entering the privileged EXEC show running-config
command:
Switch_1# show running-config
.
interface FastEthernet0/1
switchport mode trunk
spanning-tree vlan 8 priority 10
spanning-tree vlan 9 priority 10
spanning-tree vlan 10 priority 10
!
interface FastEthernet0/2
switchport mode trunk
spanning-tree vlan 3 priority 10
spanning-tree vlan 4 priority 10
spanning-tree vlan 5 priority 10
spanning-tree vlan 6 priority 10
!
interface FastEthernet0/3
!
interface FastEthernet0/4
port group 11
.
.
Switch 1
16591
Switch 2
In this example, trunk ports 1 and 2 are 100BaseT ports. The path costs for the VLANs are
assigned as follows:
• VLANs 2 through 4 are assigned a path cost of 30 on trunk port 1.
• VLANs 8 through 10 retain the default 100BaseT path cost on trunk port 1 of 19.
• VLANs 8 through 10 are assigned a path cost of 30 on trunk port 2.
• VLANs 2 through 4 retain the default 100BaseT path cost on trunk port 2 of 19.
Follow these steps to configure two parallel trunks to load share based on the STP path cost
parameter:
Step 1 From privileged EXEC mode, configure the two ports as trunk ports. The trunk
defaults to ISL trunking.
Switch_1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch_1(config)# interface fa0/1
Switch_1(config-if)# switchport mode trunk
Switch_1(config-if)# end
3-14 Cisco IOS Desktop Switching Enterprise Edition Software Configuration Guide
Load Sharing Using STP Path Cost
Step 2 Verify the entries by entering the privileged EXEC show running-config
command:
Switch# show running-config
Building configuration...
Current configuration:
!
version 11.2
no service pad
no service udp-small-servers
no service tcp-small-servers
!
hostname Switch
!
enable password grandkey
!
interface VLAN1
ip address 172.20.128.178 255.255.255.0
no ip route-cache
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport mode trunk
Step 3 When the trunk links come up, Switch 1 receives the VTP information from the
other switches. Verify that Switch 1 has learned the VLAN configuration.
Switch_1# show vlan
VLAN Name Status Ports
---- -------------------------------- --------- ---------------------------
1 default active
2 VLAN0002 active
3 VLAN0003 active
4 VLAN0004 active
5 VLAN0005 active
6 VLAN0006 active
7 VLAN0007 active
8 VLAN0008 active
9 VLAN0009 active
10 VLAN0010 active
Step 4 Use the spanning-tree command to assign the cost parameter to the VLANs that
use the trunk on Switch 1.
Switch_1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch_1(config)# interface fa0/1
Switch_1(config-if)# spanning-tree vlan 2 3 4 cost 30
Switch_1(config-if)# end
3-16 Cisco IOS Desktop Switching Enterprise Edition Software Configuration Guide
Load Sharing Using STP Path Cost
Step 5 Verify the entry by entering the privileged EXEC show running-config
command:
Switch# show running-config
Building configuration...
Current configuration:
!
version 11.2
no service pad
no service udp-small-servers
no service tcp-small-servers
!
hostname Switch
!
enable password grandkey
!
interface VLAN1
ip address 172.20.128.179 255.255.255.0
no ip route-cache
!
interface FastEthernet0/1
switchport mode trunk
spanning-tree vlan 2 cost 30
spanning-tree vlan 3 cost 30
spanning-tree vlan 4 cost 30
!
interface FastEthernet0/2
spanning-tree vlan 8 cost 30
spanning-tree vlan 9 cost 30
spanning-tree vlan 10 cost 30
!
interface FastEthernet0/3
!
interface FastEthernet0/4
Note When UplinkFast is enabled, the bridge priority of all VLANs is set to 49152, and
the path cost of all ports and VLAN trunks is increased by 3000. This change reduces the
chance that the switch will become the root port. When UplinkFast is disabled, the bridge
priorities of all VLANs and path costs of all ports are set to default values.
3-18 Cisco IOS Desktop Switching Enterprise Edition Software Configuration Guide
Enabling STP UplinkFast
Backbone switches
Root bridge
3500 XL 3500 XL
Distribution switches
22037
Active link Access switches
Blocked link
Port grouping ISL and 802.1Q trunks can be grouped into EtherChannel
port groups, but all trunks in the group must have the same
configuration. ATM ports are always trunks but cannot be
part of an EtherChannel port group.
When a group is first created, all ports follow the parameters
set for the first port to be added to the group. If you change
the configuration of one of the following parameters, the
switch propagates the setting you entered to all ports in the
group:
• Allowed-VLAN list
• STP path cost for each VLAN
• STP port priority for each VLAN
• STP Port Fast setting
• Trunk status: if one port in a port group ceases to be a
trunk, all port cease to be trunks.
Blocking unicast and The port block command can be used to block the
multicast packets on a trunk forwarding of unknown unicast and multicast packets to
VLANs on a trunk. However, if the trunk is acting as a
network port, unknown unicast packets cannot be blocked.
3-20 Cisco IOS Desktop Switching Enterprise Edition Software Configuration Guide