L2TP Tunneling

From Baranoski.ca
Jump to: navigation, search

If you need to run a Layer 2 circuit over a Layer 3 network, you can set up an L2TP tunnel. It can be applied to a variety of interfaces:

  • VLAN interfaces on L3 switches, allowing it to provide access to all ports on a VLAN
  • subinterfaces on routed interfaces on routers, allowing you to constrain it to a particular VLAN
  • an entire routed interface on a router, allowing you to trunk VLANs through it.

Configuration

This needs to be applied to both ends of the connection. The xconnect statement must point to the loopback interface on the remote router.

l2tp-class L2TP-TUNNEL
 hello 5
 password 7 110A1016141D
 cookie size 8
!
pseudowire-class L2TP-TUNNEL
 encapsulation l2tpv3
 ip local interface Loopback0
!
interface Loopback0
 ip address 172.16.5.2 255.255.255.255
!
interface Vlan1
 no ip address
 xconnect 172.16.5.1 1 encapsulation l2tpv3 pw-class L2TP-TUNNEL