VLANs - QinQ and CDP

When implementing 802.1Q tunneling, also known as QinQ, it is important to understand how Cisco Discovery Protocol (CDP) messages are exchanged between connected devices.

Consider the following scenario:


Fa0/1 of SW1 is configured like so:

SW1(config)#interface fastEthernet 0/1 SW1(config-if)#switchport access vlan 123 SW1(config-if)#switchport mode dot1q-tunnel

If R1 sends a CDP message to SW1, the message will be received and processed by SW1. However, one of the advantages of a QinQ tunnel is that R1 "thinks" that it is directly connected at Layer 2 to the remote device, which is R2. It shouldn't be able to perceive all of the intermediary devices. So really, any CDP messages sent should not be responded to by SW1, but by R1.

To achieve this, we must add the following command on the Fa0/1 interface of SW1:

SW1(config-if)#l2protocol-tunnel cdp

This will cause SW1 to tunnel the CDP messages just as it would any other frames that arrive on the interface. This feature is called protocol tunneling.