Tuesday, December 3, 2013

Cisco Q-in-Q Configuration Example


  

Cisco Q-in-Q Configuration Example:

Cisco switches(not all of them) supports IEEE 802.1Q tunneling(Q-in-Q) and Layer 2 protocol tunneling features to carry customer’s multiple vlans across the service provider’s L2 backbone.

In this example, we will do Q-in-Q configuration.

Here is the topology for this example:

 



 

Q-in-Q configuration on PE Switch-1:

interface GigabitEthernet0/2

 port-type nni

 switchport access vlan 100

 switchport mode dot1q-tunnel

Q-in-Q configuration on PE Switch-2:

interface GigabitEthernet0/2

 port-type nni

 switchport access vlan 100

 switchport mode dot1q-tunnel

Uplink Port Configuration of CE Switch-1

interface FastEthernet3

 switchport mode trunk

interface Vlan10

 ip address 10.10.10.1 255.255.255.0

interface Vlan20

 ip address 20.20.20.1 255.255.255.0

Uplink Port Configuration of CE Switch-2

interface FastEthernet3

 switchport mode trunk

interface Vlan10

 ip address 10.10.10.2 255.255.255.0

interface Vlan20

 ip address 20.20.20.2 255.255.255.0

 

Lets test the L2TP(Layer2 Tunneling Protocol) configuration:

CE –Switch-1#ping 10.10.10.2               

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.10.10.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

We see that connection works.

Lets increase the size of the packet:

CE –Switch-1#ping 10.10.10.2 size 1496 df-bit

Type escape sequence to abort.

Sending 5, 1496-byte ICMP Echos to 10.10.10.2, timeout is 2 seconds:

Packet sent with the DF bit set

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

It’s ok again..

Lets increase the size 1-byte more..

CE –Switch-1#ping 10.10.10.2 size 1497 df-bit

Type escape sequence to abort.

Sending 5, 1497-byte ICMP Echos to 10.10.10.2, timeout is 2 seconds:

Packet sent with the DF bit set

.....

Success rate is 0 percent (0/5)

It doesn’t work.Because  PE switch adds a new 802.1q header.The size of this heades is 4-byte.So, the MTU must be increased at all switches of the Service Provider.New value must be 1504 or more.