3.14. Configuring Layer 2 Protocols Tunneling
Overview
Function Introduction
Customers at different sites connected across a service-provider network need to run various Layer 2 protocols to scale their topology to include all remote sites, as well as the local sites. STP must run properly, and every VLAN should build a proper spanning tree that includes the local site and all remote sites across the service-provider infrastructure.
When Layer 2 protocol tunneling is enabled, edge switches on the inbound side of the service-provider infrastructure encapsulate Layer 2 protocol packets with a new Layer 2 header and send them across the service-provider network. Core switches in the network do not process these packets but forward them as normal packets. Layer 2 protocol packets pass the service-provider infrastructure and reach customer switches on the outbound side of the service-provider network. The new Layer 2 header will be stripped when the Layer 2 protocol packets are sent to customer switches. Layer 2 protocol tunneling can be used independently or can enhance 802.1Q tunneling.
Principle Description
N/A
Configuration
Tunnel Designed Layer2 Protocol Packets
The designed Layer2 protocol packets include STP BPDU, LACP slow proto, DOT1X EAPOL, CFM.
In this example, one link is between Switch1 and Switch2. Switch1 eth-0-1 and Switch2 eth-0-1 are configured tunnel port. Switch1 eth-0-2 and Switch2 eth-0-2 are configured uplink port. If protocol packets are received on port eth-0-1 of Switch1, packets should be added new Layer 2 header and sent out from uplink port. The new Layer 2 header will be as follows: MAC da should be tunnel dmac; MAC sa should be switch route-mac; VLAN ID should be tunnel vid; VLAN priority (cos) should be Layer 2 Protocol cos; Ethertype should be 0xFFEE. When the packets with new Layer 2 header are received on port eth-0-2 of Switch2, new Layer 2 header will be stripped and the packets will be sent to port eth-0-1 of Switch2.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the vlan configure mode and create vlan
Switch(config)# vlan database
Switch(config-vlan)# vlan 2-4
Switch(config-vlan)# exit
step 3 Create evc and set dot1q mapped vlan
Switch(config)# ethernet evc evc_c1
Switch(config-evc)# dot1q mapped-vlan 2
Switch(config-evc)# exit
Switch(config)# ethernet evc evc_c2
Switch(config-evc)# dot1q mapped-vlan 3
Switch(config-evc)# exit
Switch(config)# ethernet evc evc_c3
Switch(config-evc)# dot1q mapped-vlan 4
Switch(config-evc)# exit
step 4 Enable l2 protocol set the tunnel destination mac and add l2 protocao mac address
Switch(config)# l2protocol enable
Switch(config)# l2protocol tunnel-dmac 0100.0CCD.CDD2
Switch(config)# l2protocol mac 3 0180.C200.0008
Switch(config)# l2protocol mac 4 0180.C200.0009
Switch(config)# l2protocol full-mac 0100.0CCC.CCCC
step 5 Enter the interface configure mode and set the attributes of the interfaces. Bind the l2 protocol mac and the evc
Switch(config)# interface eth-0-1
Switch(config-if)# no shutdown
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan add 2-4
Switch(config-if)# spanning-tree port disable
Switch(config-if)# l2protocol mac 3 tunnel evc evc_c1
Switch(config-if)# l2protocol mac 4 tunnel evc evc_c2
Switch(config-if)# l2protocol full-mac tunnel evc evc_c3
Switch(config)# interface eth-0-2
Switch(config-if)# no shutdown
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan add 2-4
Switch(config-if)# l2protocol uplink enable
step 6 Exit the configure mode
Switch(config-if)# end
step 7 Validation
Use the following command to display the information of tunnel interface:
Switch1# show l2protocol interface eth-0-1
Interface PDU Address MASK Status EVC
(u)-Untagged
(t)-Tagged
========= ================= ============== ======== ================
eth-0-1 0180.c200.0008(u) ffff.ffff.ffff Tunnel evc_c1
eth-0-1 0180.c200.0008(t) ffff.ffff.ffff Tunnel evc_c1
eth-0-1 0180.c200.0009(u) ffff.ffff.ffff Tunnel evc_c2
eth-0-1 0180.c200.0009(t) ffff.ffff.ffff Tunnel evc_c2
eth-0-1 0100.0ccc.cccc(u) ffff.ffff.ffff Tunnel evc_c3
eth-0-1 0100.0ccc.cccc(t) ffff.ffff.ffff Tunnel evc_c3
eth-0-1 stp(u) ffff.ffff.ffff Peer N/A
eth-0-1 stp(t) ffff.ffff.ffff Peer N/A
eth-0-1 slow-proto(u) ffff.ffff.ffff Peer N/A
eth-0-1 slow-proto(t) ffff.ffff.ffff Peer N/A
eth-0-1 dot1x(u) ffff.ffff.ffff Peer N/A
eth-0-1 dot1x(t) ffff.ffff.ffff Peer N/A
eth-0-1 cfm(u) ffff.ffff.ffff Peer N/A
eth-0-1 cfm(t) ffff.ffff.ffff Peer N/A
eth-0-1 lldp(u) ffff.ffff.ffff Peer N/A
eth-0-1 lldp(t) ffff.ffff.ffff Peer N/A
eth-0-1 cdp(u) ffff.ffff.ffff Peer N/A
eth-0-1 cdp(t) ffff.ffff.ffff Peer N/A
eth-0-1 vtp(u) ffff.ffff.ffff Peer N/A
eth-0-1 vtp(t) ffff.ffff.ffff Peer N/A
Use the following command to display the information of uplink interface:
Switch1# show l2protocol interface eth-0-2
Interface PDU Address MASK Status EVC
(u)-Untagged
(t)-Tagged
========= ================= ============== ======== ================
eth-0-2 0180.c200.0008(u) ffff.ffff.ffff Peer N/A
eth-0-2 0180.c200.0008(t) ffff.ffff.ffff Peer N/A
eth-0-2 0180.c200.0009(u) ffff.ffff.ffff Peer N/A
eth-0-2 0180.c200.0009(t) ffff.ffff.ffff Peer N/A
eth-0-2 0100.0ccc.cccc(u) ffff.ffff.ffff Peer N/A
eth-0-2 0100.0ccc.cccc(t) ffff.ffff.ffff Peer N/A
eth-0-2 stp(u) ffff.ffff.ffff Peer N/A
eth-0-2 stp(t) ffff.ffff.ffff Peer N/A
eth-0-2 slow-proto(u) ffff.ffff.ffff Peer N/A
eth-0-2 slow-proto(t) ffff.ffff.ffff Peer N/A
eth-0-2 dot1x(u) ffff.ffff.ffff Peer N/A
eth-0-2 dot1x(t) ffff.ffff.ffff Peer N/A
eth-0-2 cfm(u) ffff.ffff.ffff Peer N/A
eth-0-2 cfm(t) ffff.ffff.ffff Peer N/A
eth-0-2 lldp(u) ffff.ffff.ffff Peer N/A
eth-0-2 lldp(t) ffff.ffff.ffff Peer N/A
eth-0-2 cdp(u) ffff.ffff.ffff Peer N/A
eth-0-2 cdp(t) ffff.ffff.ffff Peer N/A
eth-0-2 vtp(u) ffff.ffff.ffff Peer N/A
eth-0-2 vtp(t) ffff.ffff.ffff Peer N/A
eth-0-2 N/A N/A Uplink N/A
Use the following command to display the information of tunnel destination mac:
Switch1# show l2protocol tunnel-dmac
Layer2 protocols tunnel destination MAC address is 0100.0ccd.cdd2
Application cases
N/A