The multi-VLAN port feature on Catalyst 2900XL/3500XL Switches allows you to configure a single port in two or more VLANs. This feature allows users from different VLANs to access a server or router without the implementation of inter-VLAN routing capability. A multi-VLAN port performs normal switching functions in all of its assigned VLANs. VLAN traffic on the multi-VLAN port is not encapsulated as it is in trunking.
Note: These are the limitations to the implementation of multi-VLAN port features:
- You cannot configure a multi-VLAN port when a trunk is configured on the switch. You can connect the multi-VLAN port only to a router or server. The switch automatically transitions to VTP transparent mode when the multi-VLAN port feature is enabled, which disables the VTP. No VTP configuration is necessary.
- The multi-VLAN port feature is supported only on Catalyst 2900XL/3500XL Series Switches. This feature is not supported on Catalyst 4500/4000, 5500/5000, or 6500/6000 Series Switches or any other Catalyst switches.
- Determine which port to configure as a multi-VLAN port.
Here, three VLANs are created on a Catalyst 3512XL Switch, and one port of the switch is connected to an external router. This example configures the port that is connected to the router as a multi-VLAN port.
6-3512xl#show vlan VLAN Name Status Ports ---- -------------------------------- --------- ----------------------------- 1 default active Fa0/1, Fa0/3, Fa0/6, Fa0/7, Fa0/8, Fa0/9, Fa0/10, Fa0/11, Fa0/12, Gi0/1, Gi0/2 2 VLAN0002 active Fa0/2, Fa0/4 3 VLAN0003 active Fa0/5 4 VLAN0004 active 5 VLAN0005 active 6 VLAN0006 active
- Configure the Fast Ethernet 0/1 port in multi-VLAN mode, and add assigned VLANs to the multi-VLAN port.
6-3512xl#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 6-3512xl(config)#interface fastethernet 0/1 6-3512xl(config-if)#switchport mode multi !--- This command changes the port Fast Ethernet 0/1 mode to multi. 6-3512xl(config-if)#switchport multi vlan ? LINE VLAN IDs of VLANs to be used in multi-VLAN mode add add VLANs to the current list remove remove VLANs from the current list 6-3512xl(config-if)#switchport multi vlan 1,2,3 !--- This command assigns VLANs 1, 2, and 3 to multi-VLAN port Fast Ethernet 0/1. 6-3512xl(config-if)#^Z 6-3512xl#
- Issue the show interface interface_id switchport command and the show vlan command in order to verify the configuration.
6-3512xl#show interface fastethernet 0/1 switchport Name: Fa0/1 Operational Mode: multi !--- The port is in multi-VLAN mode. Administrative Trunking Encapsulation: isl Operational Trunking Encapsulation: isl Negotiation of Trunking: Disabled Access Mode VLAN: 0 ((Inactive)) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: NONE Pruning VLANs Enabled: NONE Priority for untagged frames: 0 Override vlan tag priority: FALSE Voice VLAN: none Appliance trust: none 6-3512xl#show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ---------------------------- 1 default active Fa0/1, Fa0/3, Fa0/6, Fa0/7, Fa0/8, Fa0/9, Fa0/10, Fa0/1 Fa0/12, Gi0/1, Gi0/2 2 VLAN0002 active Fa0/1, Fa0/2, Fa0/4 !--- Note: Previously, port Fast Ethernet 0/1 was only in VLAN 1. !--- Now the port is assigned to multiple VLANs 1, 2, and 3. 3 VLAN0003 active Fa0/1, Fa0/5 4 VLAN0004 active 5 VLAN0005 active
- Issue the ping command from the switch to the router in order to verify the multi-VLAN operation.
The ping command receives a reply from the router each time the management IP address is assigned to any of the VLANs 1, 2, or 3.
6-3512xl#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 6-3512xl(config)#interface vlan 1 6-3512xl(config-if)#ip address 192.168.1.1 255.255.255.0 !--- The management IP address is assigned to VLAN 1. 6-3512xl(config-if)#^Z 6-3512xl# 23:56:54: %SYS-5-CONFIG_I: Configured from console by console 6-3512xl#ping 192.168.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/3 ms 6-3512xl#ping 192.168.1.2 !--- You can ping the router from VLAN 1. Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/3 ms 6-3512xl#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 6-3512xl(config)#interface vlan 1 6-3512xl(config-if)#no ip address !--- The management IP address is removed from VLAN 1. 6-3512xl(config-if)#shutdown 6-3512xl(config-if)#exit 6-3512xl(config)#interface vlan 2 6-3512xl(config-subif)#ip address 192.168.1.1 255.255.255.0 6-3512xl(config-subif)#no shutdown !--- The management IP address is assigned to VLAN 2. 6-3512xl(config-subif)#exit 6-3512xl(config)#exit 6-3512xl#ping 192.168.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/3 ms 6-3512xl#ping 192.168.1.2 !--- You can ping the router from VLAN 2. Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/202/1004 ms 6-3512xl#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 6-3512xl(config)#interface vlan 2 6-3512xl(config-subif)#no ip address !--- The management IP address is removed from VLAN 2. 6-3512xl(config-subif)#shutdown 6-3512xl(config-subif)#exit 6-3512xl(config)#interface vlan 3 6-3512xl(config-subif)#ip address 192.168.1.1 255.255.255.0 6-3512xl(config-subif)#no shut !--- The management IP address is assigned to VLAN 3. 6-3512xl(config-subif)#exit 6-3512xl(config)#exit 6-3512xl#ping 192.168.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/3 ms 6-3512xl#ping 192.168.1.2 !--- You can ping the router from VLAN 3. Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/205/1004 ms