Introduction
Beginning with Cisco NX-OS Release 6.2(2), you can map a VLAN on the local site to a VLAN with a different VLAN ID on the remote site. When you map two VLANs with different VLAN IDs across sites, they get mapped to a common VLAN called the transport VLAN. For example, when you map VLAN 1 on Site A to VLAN 2 on Site B, both VLANs are mapped to a transport VLAN. All traffic originating from VLAN 1 on Site A is translated as going from the transport VLAN. All traffic arriving at Site B from the transport VLAN is translated to VLAN 2.
This document provides a configuratione example for accomplishing Vlan mapping across OTV.
There are 2 methods to configure vlan translation across OTV:
1. Vlan translation on trunk port (OTV Internal Interface).
2. Vlan translation configured on Overlay (currently not supported on F3 modules).
This document will discuss the 1st method - VLAN translation on trunk port(OTV Internal Interface).
The second method is covered in a separate document.
Prerequisites
Requirements
Cisco recommends that you have knowledge of these topics:
- OTV
- Virtual port channel (vPC)
Components Used
The information in this document is based on the following
- Cisco Nexus 7000 Series Switches with Supervisor 2 Module.
- F3 linecards
- SW version:7.3(0)DX(1)
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Configure
Network Diagram
Configurations
You can configure VLAN translation between the ingress VLAN and a local VLAN on a port. The traffic arriving on the ingress VLAN maps to the local VLAN at the ingress of the trunk port and the traffic that is internally tagged with the translated VLAN ID is mapped back to the original VLAN ID before leaving the switch port. This configuration method does not have OTV dependency.
SITE-1:
AGG VDC:
interface port-channel43
switchport
switchport mode trunk
switchport trunk allowed vlan 10
mtu 9216
interface Vlan10
no shutdown
ip address 10.10.10.1/24
OTV VDC:
N7K-Site-1-OTV# sh port-channel summary interface po43
Flags: D - Down P - Up in port-channel (members)
I - Individual H - Hot-standby (LACP only)
s - Suspended r - Module-removed
b - BFD Session Wait
S - Switched R - Routed
U - Up (port-channel)
M - Not in use. Min-links not met
--------------------------------------------------------------------------------
Group Port- Type Protocol Member Ports
Channel
--------------------------------------------------------------------------------
43 Po43(SU) Eth LACP Eth1/23(P) Eth2/23(P)
//vlan 10 is the local vlan and it will be mapped to vlan 30(transport vlan).
//Transport vlan is only defined in the OTV VDC.
interface port-channel43
switchport
switchport mode trunk
switchport vlan mapping enable >> This command shows up only under member ports config all
switchport vlan mapping 10 30 >> Mapping vlan 10 to vlan 30
switchport trunk allowed vlan 30
mtu 9216
interface Overlay0
description Overlay trunk to DCI
otv join-interface port-channelXX
otv control-group X.X.X.X
otv data-group X.X.X.X
otv extend-vlan 30
SITE-2:
AGG VDC:
interface port-channel43
switchport
switchport mode trunk
switchport trunk allowed vlan 20
mtu 9216
interface Vlan20
no shutdown
ip address 10.10.10.2/24
OTV VDC:
N7K-Site-2-OTV# sh port-channel summary interface po43
Flags: D - Down P - Up in port-channel (members)
I - Individual H - Hot-standby (LACP only)
s - Suspended r - Module-removed
b - BFD Session Wait
S - Switched R - Routed
U - Up (port-channel)
M - Not in use. Min-links not met
--------------------------------------------------------------------------------
Group Port- Type Protocol Member Ports
Channel
--------------------------------------------------------------------------------
43 Po43(SU) Eth LACP Eth1/23(P) Eth2/23(P)
//Vlan 20 is the local vlan and it will be mapped to vlan 30(transport vlan)
//Transport vlan is only defined in the OTV VDC
interface port-channel43
switchport
switchport mode trunk
switchport vlan mapping enable >> This command shows up only under member port config all
switchport vlan mapping 20 30 >> Mapping vlan 20 to vlan 30
switchport trunk allowed vlan 30
mtu 9216
interface Overlay0
description Overlay trunk to DCI
otv join-interface port-channelXX
otv control-group X.X.X.X
otv data-group X.X.X.X
otv extend-vlan 30
Verify
N7K-Site1-OTV# show interface port-channel 43 vlan mapping
Interface Po43:
Original VLAN Translated VLAN
--------------- -----------------
10 30
N7K-Site1-otv# show vlan internal info mapping | inc Po43 next 6
ifindex Po43(0x1600002a)
vlan mapping enabled: TRUE
vlan translation mapping information (count=1):
Original Vlan Translated Vlan
------------- ---------------
10 30
N7K-Site1-AGG# sh mac address-table vlan 10
Note: MAC table entries displayed are getting read from software.
Use the 'hardware-age' keyword to get information related to 'Age'
Legend:
* - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC
age - seconds since last seen,+ - primary entry using vPC Peer-Link, E -
EVPN entry
(T) - True, (F) - False , ~~~ - use 'hardware-age' keyword to retrieve
age info
VLAN/BD MAC Address Type age Secure NTFY Ports/SWID.SSID.LID
---------+-----------------+--------+---------+------+----+------------------
G 10 8c60.4fac.b9c2 static - F F sup-eth1(R)
* 10 8c60.4f89.71c2 dynamic ~~~ F F Po43 <------- Remote Vlan 20 mac address learned in vlan 10 in AGG VDC
N7k-Site1-OTV# sh otv route vlan 10
OTV Unicast MAC Routing Table For Overlay0
VLAN MAC-Address Metric Uptime Owner Next-hop(s)
---- -------------- ------ -------- --------- -----------
30 8c60.4f89.71c2 42 2d20h overlay F340.22.11-N77-C7706-1-otv <------ Remote Vlan 20 MAC showing up as Vlan 30 MAC in OTV VDC
30 8c60.4fac.b9c2 1 2d20h site port-channel43 <------ Local Vlan 10 MAC showing up as Vlan 30 MAC in OTV VDC
Reference
OTV Configuration Guide
General VLAN Translation Configuration Guide