Basic L2TPv3 configuration
Posted on April 12, 2010
L2TPv3 in a L2VPN technology, we’re going to have quick look on how to configure it.
For this example I’ll be using the CsC topology to interconnected R1 and R8
To manage this interconnection we’ll be using the interface G1/0 of R2 and G2/0 of R7.
Let’s go, first step configure a pw-class where we’ll set out L2TPv3 options
pseudowire-class L2TPv3 encapsulation l2tpv3 ip local interface Loopback0
The commands are pretty much self explanatory,
ip local interface is the interface that will source the connection.
Once this is done we’re going to indicate at the interface level how to interconnect the 2 devices using the xconnect command
R2-PE(config-if)#xconnect ? A.B.C.D IP address of peer R2-PE(config-if)#xconnect 184.108.40.206 ? <1-4294967295> Enter VC ID value R2-PE(config-if)#xconnect 220.127.116.11 18 ? encapsulation Data encapsulation method pw-class Pseudowire-class to use for encapsulation and protocol configuration
Note that the VC ID needs to match on both side.
This gives us
interface GigabitEthernet1/0 ip vrf forwarding CustA no ip address negotiation auto xconnect 18.104.22.168 18 pw-class L2TPv3 end
That’s all. Once this is configured on both sides the tunnel will come up.
R7-PE#sh xconnect all Legend: XC ST=Xconnect State S1=Segment1 State S2=Segment2 State UP=Up DN=Down AD=Admin Down IA=Inactive SB=Standby RV=Recovering NH=No Hardware XC ST Segment 1 S1 Segment 2 S2 ------+---------------------------------+--+---------------------------------+-- UP ac Gi2/0(Ethernet) UP l2tp 22.214.171.124:18 UP
And your devices are seen as directly connected.
R1-CE(config-router)#do sh cdp neig Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone Device ID Local Intrfce Holdtme Capability Platform Port ID R8-CE Gig 1/0 156 R 7206VXR Gig 1/0
You have more information on the L2TP session with the command
sh l2tp session all
R2-PE#sh l2tp session all L2TP Session Information Total tunnels 1 sessions 1 Session id 1036085548 is up, tunnel id 1799040119 Remote session id is 4283795721, remote tunnel id 3157821979 Remotely initiated session Unique ID is 5 Session Layer 2 circuit, type is Ethernet, name is GigabitEthernet1/0 Session vcid is 18 Circuit state is UP Local circuit state is UP Remote circuit state is UP Call serial number is 2244100008 Remote tunnel name is R7-PE Internet address is 126.96.36.199 Local tunnel name is R2-PE Internet address is 188.8.131.52 IP protocol 115 Session is L2TP signaled Session state is established, time since change 00:02:43 61 Packets sent, 64 received 6633 Bytes sent, 7078 received Last clearing of counters never Counters, ignoring last clear: 61 Packets sent, 64 received 6633 Bytes sent, 7078 received Receive packets dropped: out-of-order: 0 total: 0 Send packets dropped: exceeded session MTU: 0 total: 0 DF bit off, ToS reflect disabled, ToS value 0, TTL value 255 Sending UDP checksums are disabled Received UDP checksums are verified No session cookie information available FS cached header information: encap size = 24 bytes 45000014 00000000 FF7357A8 17630202 43630707 FF558909 Sequencing is off Conditional debugging is disabled