Cisco L2TPv3 – Layer 2 Tunneling Protocol (Version 3) Static Method and Hairpinning Method Configuration Example

Layer 2 Tunneling Protocol (Version 3) Static Method and Hairpinning Method Configuration Exampl

setup:

l2tp_v3_01.jpg

 

Configurations

This document uses these configurations:

  • Static pseudo-wire through an IP cloud. Relevant part of the configuration can be found in R2 and R3 where two unidirectional tunnels are configured.
  • Hairpin pseudo-wire or Local switching (from one port to another port in the same router). The configuration is done only on R2 and consists of configuring two unidirectional tunnels pointing to two loopbacks, which are both on router R2.
R2
R2# show running-config 
Building configuration...
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R2
!
!
clock timezone EST 10
ip subnet-zero
ip cef
no ip domain-lookup
l2tp-class R2signal
 hello 10
 password 0 cisco
 cookie size 8
!
pseudowire-class wireR5R4
 encapsulation l2tpv3
 protocol l2tpv3 R2signal
 ip local interface Loopback0
 ip dfbit set
!
pseudowire-class wireR6R1
 encapsulation l2tpv3
 protocol l2tpv3 R2signal
 ip local interface Loopback1
 ip dfbit set
!
pseudowire-class wireR1R6
 encapsulation l2tpv3
 protocol l2tpv3 R2signal
 ip local interface Loopback2
 ip dfbit set
!
interface Loopback0
description Used by wireR5R4 for Static Connection
 ip address 2.2.2.2 255.255.255.255
 no ip directed-broadcast
!
interface Loopback1
description Used by wireR6R1 for Hair Pinning Connection
 ip address 2.2.2.6 255.255.255.255
 no ip directed-broadcast
!
interface Loopback2
description Used by wireR1R6 for Hair Pinning Connection
 ip address 2.2.2.1 255.255.255.255
 no ip directed-broadcast
!
interface Ethernet0/0
description Connection to R1
 no ip address
 no ip directed-broadcast
 xconnect 2.2.2.6 16 encapsulation l2tpv3 pw-class wireR1R6
!
interface Ethernet1/0
description Connection to Pretend Cloud.
 ip address 20.20.20.2 255.255.255.0
 no ip directed-broadcast
 no cdp enable
!
interface Ethernet2/0
description Connection to R5
 no ip address
 no ip directed-broadcast
 no cdp enable
 xconnect 3.3.3.3 12 encapsulation l2tpv3 pw-class wireR5R4
!
interface Ethernet3/0
description Connection to R6
 no ip address
 no ip directed-broadcast
 xconnect 2.2.2.1 16 encapsulation l2tpv3 pw-class wireR6R1
!
ip classless
ip route 3.3.3.3 255.255.255.255 20.20.20.3
 !--- The other end of wireR5R4 loopback (3.3.3.3) must be  
 !--- reachable from this router. Hair Pinning loopbacks  
 !--- are reachable—there is no need for additional routes. 
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
end

 

R3
R3# show running-config 
Building configuration...
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R3
!
!
clock timezone EST 10
ip subnet-zero
ip cef
!
l2tp-class R3signal
 hello 10
 password 0 cisco
 cookie size 8
!
pseudowire-class wireR4R5
 encapsulation l2tpv3
 protocol l2tpv3 R3signal
 ip local interface Loopback0
 ip dfbit set
!
interface Loopback0
description Use by wireR4R5 for static connection
 ip address 3.3.3.3 255.255.255.255
 no ip directed-broadcast
!
interface Ethernet0/0
 ip address 20.20.20.3 255.255.255.0
 no ip directed-broadcast
!
interface Ethernet1/0
 no ip address
 no ip directed-broadcast
 no cdp enable
 xconnect 2.2.2.2 12 encapsulation l2tpv3 pw-class wireR4R5
!
ip classless
ip route 2.2.2.2 255.255.255.255 Ethernet0/0
 !--- The other end of wireR4R5 loopback (3.3.3.3) must be  
 !--- reachable from this router. 
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
end

 

Customer R1R6 tunnel (pseudo-wire) end router configuration:

R1
R1# show running-config 
Building configuration...
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R1
!
!
clock timezone EST 10
ip subnet-zero
no ip domain-lookup
!
interface Ethernet0/0
 ip address 10.10.10.1 255.255.255.0
 no ip directed-broadcast
!
ip classless
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
end

 

R6
R6# show running-config 
Building configuration...
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R6
!
!
clock timezone EST 10
ip subnet-zero
no ip domain-lookup
!
interface Ethernet0/0
 ip address 10.10.10.6 255.255.255.0
 no ip directed-broadcast
!
ip classless
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
end

 

Customer R4R5 tunnel (pseudo-wire) end router configuration:

R4
R4# show running-config 
Building configuration...
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R4
!
!
ip subnet-zero
!
interface Ethernet0/0
 ip address 30.30.30.4 255.255.255.0
 no ip directed-broadcast
!
router ospf 1
 log-adjacency-changes
 network 30.30.30.0 0.0.0.255 area 0
!
ip classless
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
end

 

R5
R5# show running-config 
Building configuration...
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R5
!
!
ip subnet-zero
!
interface Ethernet0/0
 ip address 30.30.30.5 255.255.255.0
 no ip directed-broadcast
!
router ospf 1
 log-adjacency-changes
 network 30.30.30.0 0.0.0.255 area 0
!
ip classless
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
end

 

This entry was posted in Cisco. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s