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
相关推荐
领世达检测V133529092499 分钟前
【联网玩具】EN 18031欧盟网络安全认证
网络·en 18031
靡樊10 分钟前
Socket编程UDP\TCP
网络·c++·学习·tcp/ip·udp
秋水丶秋水2 小时前
IP证书与 域名证书有什么区别?
网络·网络协议·tcp/ip
不想头秃a2 小时前
JavaEE初阶-网络编程
java·运维·服务器·网络
白码低代码3 小时前
质检 LIMS 系统数据防护指南 三级等保认证与金融级加密方案设计
网络·金融·lims·实验室管理系统
jz_ddk4 小时前
[zynq] Zynq Linux 环境下 AXI BRAM 控制器驱动方法详解(代码示例)
linux·运维·c语言·网络·嵌入式硬件
深思慎考4 小时前
Linux网络——socket网络通信udp
linux·网络·udp
孤寂大仙v5 小时前
【计算机网络】NAT、代理服务器、内网穿透、内网打洞、局域网中交换机
网络·计算机网络·智能路由器
LuckyRich15 小时前
【websocket】安装与使用
网络·websocket·网络协议
KIDAKN5 小时前
理解网络协议
网络·网络协议