L2TP实验

放开安全策略机制,FW1不配IP

复制代码
[FW1]firewall zone  trust 	
[FW1-zone-trust]add interface GigabitEthernet 1/0/0
[FW1]security-policy 	
[FW1-policy-security]default action permit 

FW2 和FW3

复制代码
[FW2]interface g1/0/1
[FW2-GigabitEthernet1/0/1]ip address 20.1.1.1 24	
[FW2]firewall zone trust 	
[FW2-zone-trust]add interface GigabitEthernet 1/0/0
[FW2]firewall zone untrust 
[FW2-zone-untrust]add interface  GigabitEthernet 1/0/1

[FW3]in g1/0/0
[FW3-GigabitEthernet1/0/0]ip address 20.1.1.2 24
[FW3]interface g1/0/1
[FW3-GigabitEthernet1/0/1]ip address 192.168.1.254 24
[FW3]firewall zone untrust 
[FW3-zone-untrust]add interface GigabitEthernet 1/0/0
[FW3]firewall zone trust 
[FW3-zone-trust]add interface GigabitEthernet 1/0/1

建立pppoe连接,设定拨号接口

client

复制代码
[client]interface Dialer 1
[client-Dialer1]dialer user user1
[client-Dialer1]dialer-group 1	
[client-Dialer1]dialer bundle 1
[client-Dialer1]ip address ppp-negotiate 
[client-Dialer1]ppp chap user user1
[client-Dialer1]ppp chap password  cipher passwd123
[client]dialer-rule 1 ip permit
[client]interface g1/0/0
[client-GigabitEthernet1/0/0]pppoe-client dial-bundle-number 1]

server

复制代码
[server]interface Virtual-Template 1
[server-Virtual-Template1]ppp authentication-mode chap 
 The command is used to configure the PPP authentication mode on the local end. 
Confirm that the peer end adopts the corresponding PPP authentication. Continue[
Y/N]:y
[server-Virtual-Template1]ip address  2.2.2.2 24
[server]interface g1/0/0	
[server-GigabitEthernet1/0/0]pppoe-server bind  virtual-template  1
[server]interface g1/0/0	
[server-GigabitEthernet1/0/0]pppoe-server bind  virtual-template  1
[server]aaa
[server-aaa]domain default 
[server-aaa-domain-default]service-type l2tp	
[server]user-manage user user1 domain default 
[server-localuser-user1]password Passwd123

建立L2tp隧道

1.LAC配置

复制代码
[server]l2tp enable 
[server]l2tp-group 1
[server-l2tp-1]tunnel  authentication
[server-l2tp-1]tunnel  password cipher Hello123
[server-l2tp-1]tunnel name lac
[server-l2tp-1]start  l2tp ip 20.1.1.2 fullusername  user1

LNS配置

复制代码
[LNS]ip pool l2tp
[LNS-ip-pool-l2tp]section 0 172.16.0.2 172.16.0.100
[LNS]aaa 	
[LNS-aaa]service-scheme l2tp
[LNS-aaa-service-l2tp]ip-pool l2tp
[LNS-aaa-domain-default]service-type l2tp 
[LNS]user-manage user user1 domain  default 
[LNS-localuser-user1]password Passwd123
[LNS]interface Virtual-Template 1	
[LNS-Virtual-Template1]ppp authentication-mode chap 
 The command is used to configure the PPP authentication mode on the local end. 
Confirm that the peer end adopts the corresponding PPP authentication. Continue[
Y/N]:y
[LNS]interface Virtual-Template 1
[LNS-Virtual-Template1]ip address 172.16.0.1 24
[LNS-Virtual-Template1]remote service-scheme l2tp	
[LNS]firewall zone dmz 
[LNS-zone-dmz]add interface Virtual-Template 1	
[LNS]l2tp enable 	
[LNS]l2tp-group 1
[LNS-l2tp-1]allow l2tp  virtual-template  1 remote lac domain de	
[LNS-l2tp-1]tunnel  authentication
[LNS-l2tp-1]tunnel password cipher Hello123
[LNS]l2tp-group 1	
[LNS-l2tp-1]mandatory-chap
相关推荐
摸鱼仙人~37 分钟前
HTTP 响应状态码总结
网络·网络协议·http
liyi_hz200843 分钟前
O2OA(翱途)开发平台系统安全-用户登录IP限制
运维·服务器·网络·o2oa开发
Suckerbin44 分钟前
基于HTTP头部字段的SQL注入:SQLi-labs第17-20关
网络·笔记·网络协议·安全·http·网络安全
purrrew1 小时前
【Java ee初阶】初始网络
java·网络
pp-周子晗(努力赶上课程进度版)1 小时前
【计算机网络】NAT技术、内网穿透与代理服务器全解析:原理、应用及实践
网络·计算机网络·智能路由器
zm5 小时前
网络编程epoll和udp
服务器·网络·数据库
张一不吃豆芽5 小时前
TCPIP详解 卷1协议 八 ICMPv4和ICMPv6 Internet控制报文协议
网络·网络协议·tcp/ip
是垚不是土5 小时前
探秘高可用负载均衡集群:企业网络架构的稳固基石
运维·服务器·网络·云原生·容器·架构·负载均衡
向哆哆6 小时前
Netty在Java网络编程中的应用:实现高性能的异步通信
java·网络·php
@西瓜@7 小时前
(网络)应用层协议-HTTPS
网络·网络协议·https