Dec 21 2008
L2TPv3
L2TPv3 can be configured on either a physical port or on a subinterface. The first is known as Port tunneling and the second as vlan tunneling.
I have set up the topology below.
To configure port tunneling from R1 fast ethernet 1/1 to R3 fast ethernet 1/1 use the following configuration.
R1
pseudowire-class ZARAR
encapsulation l2tpv3
ip local interface Loopback0
interface FastEthernet1/1
xconnect 3.3.3.3 1 pw-class ZARAR
R3
pseudowire-class ZARAR
encapsulation l2tpv3
ip local interface Loopback0
interface FastEthernet1/1
xconnect 1.1.1.1 1 pw-class ZARAR
I’ve highlighted the vcid above, these have to match on both sides of the link. The vcid is a 32-bit virtual circuit identifier and acts as a unique per-peer-address identifier. During the L2TPv3 negotiation phase, R1 sends an ICRQ message which contains the local session ID to be used for associating the data packets to the psuedowire. R3 will then use this session ID when sending data packets to R1. Each pseudowire will have a unique session ID (more on session IDs in a later post).
If you try to use the same vcid on the same router on two interfaces you will get the following error message:-
R3(config)#interface FastEthernet0/0
R3(config-if)# xconnect 1.1.1.1 1 pw-class ZARAR
Cannot create pseudowire (vcid 1, PeerID 1.1.1.1) - already in use
To configure VLAN tunneling from R1 fa1/1.1 to R3 fa1/1.1 use the following configuration.
R1
pseudowire-class ZARAR
encapsulation l2tpv3
ip local interface Loopback0
interface FastEthernet1/1.1
encapsulation dot1Q 10
xconnect 3.3.3.3 1 pw-class ZARAR
R3
pseudowire-class ZARAR
encapsulation l2tpv3
ip local interface Loopback0
interface FastEthernet1/1.1
encapsulation dot1Q 10
xconnect 1.1.1.1 1 pw-class ZARAR
You CAN configure a pseudowire between two different vlans as they are not used to identify the end points of the circuit. You could configure dissimilar vlans as below, just remember to use the same vcid.
R1
pseudowire-class ZARAR
encapsulation l2tpv3
ip local interface Loopback0
interface FastEthernet1/1.4
encapsulation dot1Q 40
xconnect 3.3.3.3 4 pw-class ZARAR
R3
pseudowire-class ZARAR
encapsulation l2tpv3
ip local interface Loopback0
interface FastEthernet1/1.5
encapsulation dot1Q 50
xconnect 1.1.1.1 4 pw-class ZARAR
to confirm the vlan tunnel is up use the following command on R1.
R1#show xconnect all
Legend: XC ST=Xconnect State, S1=Segment1 State, S2=Segment2 State
UP=Up, DN=Down, AD=Admin Down, IA=Inactive, NH=No Hardware
XC ST Segment 1 S1 Segment 2 S2
------+---------------------------------+--+---------------------------------+--
UP ac Fa1/1.4:40(Eth VLAN) UP l2tp 3.3.3.3:4 UP
