This section provides an example for configuring L2TP VPN in cross-VPN instance scenarios.
Enterprise1 and Enterprise2 need to share one LNS to provide L2TP remote access services for mobile employees, as shown in Figure 1.
[LNS] ip route-static 192.168.2.0 24 vpn-instance vpn1 192.168.1.2 [LNS] ip route-static 172.16.2.0 24 vpn-instance vpn2 172.16.1.2
Run the display l2tp tunnel command on the LNS. A tunnel is established. In the following command output, only the data generated when mobile employees of Enterprise1 access the LNS.
[LNS] display l2tp tunnel
L2TP::Total Tunnel: 1
LocalTID RemoteTID RemoteAddress Port Sessions RemoteName VpnInstance
------------------------------------------------------------------------------
1 1 2.2.2.2 1701 1 vpn1
------------------------------------------------------------------------------
Total 1, 1 printed
Configuration script of the LNS
sysname LNS # l2tp enable # ip vpn-instance vpn1 route-distinguisher 100:1 ip vpn-instance vpn2 route-distinguisher 200:1 # ip pool enterprise1_pool section 1 10.1.1.2 10.1.1.100 ip pool enterprise2_pool section 1 10.1.2.2 10.1.2.100 # aaa service-scheme scheme1 ip-pool enterprise1_pool service-scheme scheme2 ip-pool enterprise2_pool domain domain1 service-type l2tp domain domain2 service-type l2tp # l2tp-group 1 allow l2tp virtual-template 1 remote client vpn-instance vpn1 tunnel password cipher %$%$Gg)[J=_EM).Y2g@Lr8b@+S7=%$%$ l2tp-group 2 allow l2tp virtual-template 2 remote client2 vpn-instance vpn2 tunnel password cipher %$%$Gg)[J=_EM).Y2g@Lr8b@+S7=%$%$ # interface Virtual-Template1 ppp authentication-mode chap pap remote service-scheme scheme1 ip binding vpn-instance vpn1 ip address 10.1.1.1 255.255.255.0 interface Virtual-Template2 ppp authentication-mode chap pap remote service-scheme scheme2 ip binding vpn-instance vpn2 ip address 10.1.2.1 255.255.255.0 # interface GigabitEthernet0/0/1 ip address 1.1.1.1 255.255.255.0 # interface GigabitEthernet0/0/2 ip binding vpn-instance vpn1 ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet0/0/3 ip binding vpn-instance vpn2 ip address 172.16.1.1 255.255.255.0 # firewall zone trust add interface GigabitEthernet0/0/2 add interface GigabitEthernet0/0/3 # firewall zone untrust add interface GigabitEthernet0/0/1 # firewall zone dmz add interface Virtual-Template1 add interface Virtual-Template2 # security-policy rule name rule name service_dt source-zone dmz destination-zone trust source-address 10.1.1.0 mask 255.255.255.0 source-address 10.1.2.0 mask 255.255.255.0 destination-address 192.168.2.0 mask 255.255.255.0 destination-address 172.16.2.0 mask 255.255.255.0 action permit rule name service_td source-zone trust destination-zone dmz source-address 192.168.2.0 mask 255.255.255.0 source-address 172.16.2.0 mask 255.255.255.0 destination-address 10.1.1.0 mask 255.255.255.0 destination-address 10.1.2.0 mask 255.255.255.0 action permit rule name l2tp_ul source-zone untrust destination-zone local destination-address 1.1.1.0 mask 255.255.255.0 action permit # The following configurations for creating users are stored in the database, not described in the configuration file. user-manage group /default/enterprise1 user-manage group /default/enterprise2 user-manage user user0001 parent-group /default/enterprise1 password ********* user-manage user user0002 parent-group /default/enterprise2 password ********* # return