30-12
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
Chapter 30 Configuring 802.1Q Tunneling, VLAN Mapping, and Layer 2 Protocol Tunneling
Configuring VLAN Mapping
Selective Q-in-Q on a Trunk Port
To configure VLAN mapping for selective Q-in-Q on a trunk port, perform this task:
Note
You cannot configure one-to-one mapping and selective Q-in-Q on the same interface.
Use the
no switchport vlan mapping
vlan-id
dot1q-tunnel
outer vlan-id
command to remove the
VLAN mapping configuration. Entering
the
no switchport vlan mapping all
command deletes all
mapping configurations.
This example shows how to configure selective QinQ mapping on the port so that traffic with a C-VLAN
ID of 1 to 5 enters the switch with an S-VLAN ID of 100. The traffic of any other VLAN ID is dropped.
Switch(config)#
interface gigabiethernet0/1
Switch(config-if)#
switchport vlan mapping 1-5 dot1q-tunnel 100
Switch(config-if)#
switchport vlan mapping default drop
Switch(config-if)#
exit
This example shows how to configure selective QinQ mapping on the port so that traffic with a C-VLAN
ID of 1 to 5 enters the switch with an S-VLAN ID of 100. The traffic of any other VLAN ID is allowed.
Switch(config)#
interface gigabiethernet0/1
Switch(config-if)#
switchport vlan mapping 1-5 dot1q-tunnel 100
Switch(config-if)#
no switchport vlan mapping default drop
Switch(config-if)#
exit
Command
Purpose
Step 1
Switch#
configure terminal
Enters global configuration mode.
Step 2
Switch(config)#
interface
interface-id
Enters interface configuration mode for the interface connected to the
service provider network. You can enter a physical interface or an
EtherChannel port channel.
Step 3
Switch(config-if)#
switchport mode
trunk
Configure the interface as a trunk port.
Step 4
Switch(config-if)#
switchport vlan
mapping
vlan-id
dot1q-tunnel
outer
vlan-id
Enters the VLAN IDs to be mapped:
•
vlan-id
—The customer VLAN ID (C-VLAN) entering the switch
from the customer network. The range is from 1 to 4094. You can
enter a string of VLAN-IDs.
•
outer-vlan-id
—The outer VLAN ID (S-VLAN) of the service
provider network. The range is from 1 to 4094.
Step 5
Switch(config-if)#
switchport vlan
mapping default drop
Specifies that all packets on the port are dropped if they do not match the
mapped VLANs (Step 4).
By default, packets that do not match, are dropped.
If the packets (that do not match) should not be dropped, enter the
no
version of the command.
Step 6
Switch(config-if)#
end
Returns to privileged EXEC mode.
Step 7
Switch#
show interfaces
interface-id
vlan mapping
Verifies the configuration.
Step 8
Switch#
copy running-config
startup-config
(Optional) Saves your entries in the configuration file.
Содержание Catalyst 4500 Series
Страница 2: ......
Страница 4: ......
Страница 2086: ...Index IN 46 Software Configuration Guide Release IOS XE 3 9 0E and IOS 15 2 5 E ...