This section provides an example for configuring L2TP VPN (local authentication) in the call-LNS scenario. In the scenario, the LAC and LNS establish a permanent L2TP VPN tunnel. Employees in the branch can access headquarters servers through the L2TP VPN tunnel.
As shown in Figure 1, the egress gateway of the branch is the LAC, and the egress gateway of the headquarters is the LNS. Employees in the branch need to access headquarters servers across the Internet. The enterprise needs to establish an L2TP VPN tunnel between the LAC and LNS so that employees in the branch can access headquarters servers through the L2TP VPN tunnel.
Item |
Data |
|
|---|---|---|
LAC |
Interface |
Interface ID: GigabitEthernet 0/0/1 IP address: 1.1.1.1/24 Security zone: Untrust Interface ID: GigabitEthernet 0/0/3 IP address: 192.168.1.1/24 Security zone: Trust |
L2TP configuration |
Server address configuration mode: IP address Server address: 1.2.1.1/24 LAC automatic dialup: enabled User name: user0001 Password: Password123 Local tunnel name: LAC Tunnel authentication password: Hello123 |
|
LNS |
Interface |
Interface ID: GigabitEthernet 0/0/1 IP address: 1.2.1.1/24 Security zone: Untrust Interface ID: GigabitEthernet 0/0/3 IP address: 10.1.1.1/24 Security zone: Trust |
L2TP configuration |
Peer tunnel name: LAC Tunnel authentication password: Hello123 User authentication name: user0001 Password: Password123 Server address: 10.2.1.1/24 User address pool: 10.2.1.2/24 to 10.2.1.100/24 NOTE:
If the intranet server IP address and address pool addresses are on different network segments, configure a route on the intranet server to an address in the address pool. |
|
Check L2TP tunnel establishment information on the LNS and LAC. The command output on the LNS is used as an example.
[LNS] display l2tp tunnel
L2TP::Total Tunnel: 1
LocalTID RemoteTID RemoteAddress Port Sessions RemoteName VpnInstance
------------------------------------------------------------------------------
2 1 1.1.1.1 61535 1 LAC
------------------------------------------------------------------------------
Total 1, 1 printed
Run the display l2tp session command to check L2TP session information. According to the command output, an L2TP session is established successfully.
[LNS] display l2tp session
L2TP::Total Session: 1
LocalSID RemoteSID LocalTID RemoteTID UserID UserName VpnInstance
------------------------------------------------------------------------------
119 32 2 1 9689 user0001
------------------------------------------------------------------------------
Total 1, 1 printed
Configuration script of the LAC
#
l2tp enable
l2tp domain suffix-separator @
#
l2tp-group 1
tunnel password cipher %$%$Sd2\*,\eT=XIuj1J`j36~K)_%$%$
tunnel name LAC
start l2tp ip 1.2.1.1 fullusername user0001
#
interface Virtual-Template1
ppp authentication-mode chap
ppp chap user user0001
ppp chap password cipher %$%$>x{UJZIoJ>`<}u"b0!#%\pg^%$%$
ip address ppp-negotiate
call-lns local-user user0001
#
interface GigabitEthernet0/0/1
ip address 1.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/3
ip address 192.168.1.1 255.255.255.0
#
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/3
#
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/1
#
firewall zone dmz
set priority 50
add interface Virtual-Template1
#
ip route-static 10.1.1.0 255.255.255.0 Virtual-Template1
ip route-static 0.0.0.0 0.0.0.0 1.1.1.2
#
nat-policy
rule name p1
source-zone trust
egress-interface Virtual-Template1
source-address 192.168.1.0 24
action source-nat easy-ip
#
security-policy
rule name service_td
source-zone trust
destination-zone dmz
source-address 192.168.1.0 24
destination-address 10.1.1.0 24
action permit
rule name service_dt
source-zone dmz
destination-zone trust
source-address 10.1.1.0 24
destination-address 192.168.1.0 24
action permit
rule name l2tp_lu
source-zone local
destination-zone untrust
source-address 1.1.1.0 24
destination-address 1.2.1.0 24
action permit
Configuration script of the LNS
# l2tp enable l2tp domain suffix-separator @ # ip pool pool section 1 10.2.1.2 10.2.1.100 # aaa authentication-scheme default # authorization-scheme default # accounting-scheme default # service-scheme l2tp ip-pool pool # domain default service-type l2tp # l2tp-group 2 allow l2tp virtual-template 1 remote LAC tunnel password cipher %$%$cgc'GPcWL#hp3EC;K[nM[QH~%$%$ # interface Virtual-Template1 ppp authentication-mode chap remote service-scheme l2tp ip address 10.2.1.1 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 1.2.1.1 255.255.255.0 # interface GigabitEthernet0/0/3 ip address 10.1.1.1 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/3 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 # firewall zone dmz set priority 50 add interface Virtual-Template1 # ip route-static 0.0.0.0 0.0.0.0 1.2.1.2 # security-policy rule name service_td source-zone trust destination-zone dmz source-address 10.1.1.0 24 destination-address 10.2.1.0 24 action permit rule name service_dt source-zone dmz destination-zone trust source-address 10.2.1.0 24 destination-address 10.1.1.0 24 action permit rule name l2tp_ul source-zone untrust destination-zone local source-address 1.1.1.0 24 destination-address 1.2.1.0 24 action permit # The following configurations for creating users are stored in the database, not described in the configuration file. user-manage user user0001 parent-group /default password ********** undo multi-ip online enable