一、拓扑结构
拓扑文件下载:
https://wwk.lanzouq.com/ipA4G1zlxyyj
二、配置过程
1、配置接口IP地址、区域、安全策略
完成(3)、(4)步前请先修改 LAC 和 LNS 的密码,参考链接:https://www.19itmc.top/fw-tech/usg6000v-passwd.html
(1)配置PC1、PC2、PC3的IP地址、网关、掩码等
(2)在路由器(R1)接口上配置IP地址
<Huawei>system-view
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 1.1.1.2 24
[Huawei-GigabitEthernet0/0/1]quit
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]ip address 2.2.2.2 24
(3)配置LAC的接口IP地址、区域、安全策略
<USG6000V1>system-view
[USG6000V1]sysname LAC
[LAC]user-interface console 0
[LAC-ui-console0]idle-timeout 0
[LAC-ui-console0]quit
[LAC]interface GigabitEthernet 1/0/1
[LAC-GigabitEthernet1/0/1]ip address 192.168.1.254 24
[LAC-GigabitEthernet1/0/1]quit
[LAC]interface GigabitEthernet 1/0/2
[LAC-GigabitEthernet1/0/2]ip address 1.1.1.1 24
[LAC-GigabitEthernet1/0/2]quit
[LAC]firewall zone trust
[LAC-zone-trust]add interface GigabitEthernet 1/0/1
[LAC-zone-trust]quit
[LAC]firewall zone untrust
[LAC-zone-untrust]add interface GigabitEthernet 1/0/2
[LAC-zone-untrust]quit
[LAC]security-policy
[LAC-policy-security]default action permit (回车后输入Y)
[LAC-policy-security]quit
[LAC]ip route-static 2.2.2.0 24 1.1.1.2
(4)配置LNS的接口IP地址、区域、安全策略
<USG6000V1>system-view
[USG6000V1]sysname LNS
[LNS]user-interface console 0
[LNS-ui-console0]idle-timeout 0
[LNS-ui-console0]quit
[LNS]interface GigabitEthernet 1/0/1
[LNS-GigabitEthernet1/0/1]ip address 192.168.2.254 24
[LNS-GigabitEthernet1/0/1]quit
[LNS]interface GigabitEthernet 1/0/2
[LNS-GigabitEthernet1/0/2]ip address 2.2.2.1 24
[LNS-GigabitEthernet1/0/2]quit
[LNS]firewall zone trust
[LNS-zone-trust]add interface GigabitEthernet 1/0/1
[LNS-zone-trust]quit
[LNS]firewall zone untrust
[LNS-zone-untrust]add interface GigabitEthernet 1/0/2
[LNS-zone-untrust]quit
[LNS]security-policy
[LNS-policy-security]default action permit(回车后输入Y)
[LNS-policy-security]quit
[LNS]ip route-static 1.1.1.0 24 2.2.2.2
2、配置LAC端
(1)开启L2TP
[LAC]l2tp enable
(2)创建VT接口,并绑定物理接口。将VT接口加入安全区域。
[LAC] interface Virtual-Template 1
[LAC-Virtual-Template1] ppp authentication-mode chap(回车后输入Y)
# 此处xx为姓名拼音
[LAC-Virtual-Template1] ppp chap user xx
[LAC-Virtual-Template1] ppp chap password cipher Password1
[LAC-Virtual-Template1] ip address ppp-negotiate
[LAC-Virtual-Template1] quit
[LAC] firewall zone dmz
[LAC-zone-dmz] add interface Virtual-Template 1
[LAC-zone-dmz] quit
(3)添加到总部192.168.2.0/24网段的静态路由,下一跳出接口为虚拟接口模板Virtual-Template 1
[LAC] ip route-static 192.168.2.0 255.255.255.0 Virtual-Template1
(4)创建并配置L2TP组
[LAC] l2tp-group 1
[LAC-l2tp-1] tunnel name LAC
# # 此处xx为姓名拼音
[LAC-l2tp-1] start l2tp ip 2.2.2.1 fullusername xx
[LAC-l2tp-1] tunnel authentication
[LAC-l2tp-1] tunnel password cipher Hello123
(5)配置出接口方式的源NAT策略
[LAC] nat-policy
[LAC-policy-nat] rule name p1
[LAC-policy-nat-rule-p1] source-address 192.168.1.0 24
[LAC-policy-nat-rule-p1] source-zone trust
[LAC-policy-nat-rule-p1] destination-zone dmz
[LAC-policy-nat-rule-p1] action source-nat easy-ip
3、配置LNS端
(1)开启L2TP功能
[LNS] l2tp enable
(2)在LNS上配置地址池。
[LNS]ip pool pool1
[LNS-ip-pool-pool1] section 1 192.168.3.2 192.168.3.100
[LNS-ip-pool-pool1]quit
(3)配置接入用户使用的业务方案。
[LNS] aaa
[LNS-aaa] service-scheme l2tp
[LNS-aaa-service-l2tp]ip-pool pool1
[LNS-aaa-service-l2tp]quit
(4)配置认证域,应用业务方案。
[LNS-aaa]domain default
[LNS-aaa-domain-default] service-type l2tp
[LNS-aaa-domain-default] service-scheme l2tp
[LNS-aaa-domain-default]quit
[LNS-aaa]quit
(5)配置分支机构员工对应的用户
# 此处xx为姓名拼音
[LNS]user-manage user xx
[LNS-localuser-xx] password Password1
[LNS-localuser-xx]quit
(6)配置虚拟接口模板,并将虚拟接口模板加入安全区域。
[LNS]interface Virtual-Template 1
[LNS-Virtual-Template1] ip address 192.168.3.1 24
[LNS-Virtual-Template1] ppp authentication-mode chap(回车后输入Y)
[LNS-Virtual-Template1] remote service-scheme l2tp
[LNS-Virtual-Template1] quit
[LNS]firewall zone dmz
[LNS-zone-dmz] add interface Virtual-Template 1
[LNS-zone-dmz]quit
(7)配置L2TP组。
[LNS]l2tp-group 1
[LNS-l2tp-1] allow l2tp virtual-template 1 remote LAC
[LNS-l2tp-1] tunnel authentication
[LNS-l2tp-2] tunnel password cipher Hello123
三、结果验证
1、配置完成后,在LAC上执行call-lns local-user xx,触发建立L2TP隧道和L2TP会话。
此处xx为姓名拼音
[LAC]interface Virtual-Template 1
# 此处xx为姓名拼音
[LAC-Virtual-Template1] call-lns local-user xx
2、建立成功后,在LNS/LAC上查看L2TP隧道的建立情况。
[LNS] display l2tp tunnel
[LNS] display l2tp session
近期评论