Tuesday, June 12, 2007

[Cisco] Config Q-in-Q (dot1q-tunneling)

Network diagram
Physical connections:
[R1 f0/1]<--->[ g1/0/1 SW1 g1/0/23 -24 ]<--trunk-->[ g1/0/21 -22 SW2 g1/0/23 -24 ] <--trunk-->[ g1/0/23-24 SW3 g1/0/1 ] <--> [ f0/1 R2]

[R1]:
interface f0/1
ip add 192.168.10.1 255.255.255.0
no sh
interface f0/1.100
encap dot1q 100
ip add 192.168.100.1 255.255.255.0

>> R1 verify
sh ip rou
C 192.168.10.0/24 is directly connected, FastEthernet0/1
C 192.168.100.0/24 is directly connected, FastEthernet0/1.100


[R2]:
interface f0/1
ip add 192.168.10.2 255.255.255.0
no sh
interface f0/1.100
encap dot1q 100
ip add 192.168.100.1 255.255.255.0
>> R2 verify
sh ip rou
C 192.168.10.0/24 is directly connected, FastEthernet0/1
C 192.168.100.0/24 is directly connected, FastEthernet0/1.100


[SW1]
system mtu 1504 <------ reload
vlan 100
interface g1/0/1
switchport mo dot1q-tunnel
l2protocol-tunnel point-to-point pagp <--- l2protocol-tunnel this command enable for allow protocols pass throught dot1q-tunnelling
l2protocol-tunnel point-to-point lacp
l2protocol-tunnel point-to-point udld
l2protocol-tunnel cdp
l2protocol-tunnel vtp
l2protocol-tunnel stp
swi access vl 100
no sh
interface rang f0/23 -24
swi tru en dot1q
swi mo tru
no sh
>> SW1 verify
sh int g1/0/1 switchport
sh l2protocol-tunnel
sh int trunk


[SW2]
system mtu 1504 <------ reload
vlan 100
interface rang f0/21 -24
swi tru en dot1q
swi mo tru
no sh

[SW3]
system mtu 1504 <------ reload
vlan 100
interface g1/0/1
switchport mo dot1q-tunnel
l2protocol-tunnel point-to-point pagp
l2protocol-tunnel point-to-point lacp
l2protocol-tunnel point-to-point udld
l2protocol-tunnel cdp
l2protocol-tunnel vtp
l2protocol-tunnel stp
swi access vl 100
no sh
interface rang f0/21 -24
swi tru en dot1q
swi mo tru
no sh


R1:
sh cdp nei <-- can see R2 direct connect
ping 192.168.100.2 <-- can reachable