cisco路由器L2TP VPN实验
来源:互联网 发布:淘宝的vr眼镜有效果吗 编辑:程序博客网 时间:2024/05/16 10:45
VPN_Server路由器配置:
VPN_Server#shrun
Building configuration...
Currentconfiguration : 1513 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname VPN_Server
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
aaa new-model
!
aaa authentication ppp defaultlocal
!
aaa session-id common
ip cef
!
vpdn enable
!
vpdn-group 1
! Default L2TP VPDN group
!
username l2tp password 0 cisco
username cisco password 0 cisco
!
interface Loopback0
!
interface Serial1/2
!
interfaceVirtual-Template1
!
ip local pool default 192.168.67.8192.168.67.100
ip route 0.0.0.0 0.0.0.0 1.1.1.2
no ip http server
no ip http secure-server
!
line con 0
line aux 0
line vty 0 4
!
end
InterNet路由器配置:
InterNet#shrun
Building configuration...
Currentconfiguration : 620 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname InterNet
!
ip subnet-zero
!
interface FastEthernet0/0
!
interface Serial1/0
ip classless
no ip http server
!
line con 0
line aux 0
line vty 0 4
!
end
为了防止成功拨上L2TPVPN后PC无法同时访问Internet可以通过以下方法避免:
把“在远程网络上使用默认网关”前面的勾去掉。
拨上后L2TPVPN接口的状态:
查看l2tp
VPN_Server#shl2tp
L2TP Tunnel andSession Information Total tunnels 1 sessions 1
LocID RemID RemoteName
36200 23
LocID
24
测试如下:
VPN成功拨上后接口信息:
PPP adapterl2tp:
要访问VPN_ServerLoopback 0接口IP(192.168.2.254)需要增加路由:
route add 192.168.2.0 mask 255.255.255.0 192.168.67.9-p
注:如果ippool与远程LAN在同一网段,则不需要手工增加路由,可以直接访问。
C:\>ping 192.168.2.254
Pinging192.168.2.254 with 32 bytes of data:
Reply from192.168.2.254: bytes=32 time=168ms TTL=255
Reply from 192.168.2.254: bytes=32 time=35ms TTL=255
Reply from 192.168.2.254: bytes=32 time=22ms TTL=255
Reply from 192.168.2.254: bytes=32 time=24ms TTL=255
Ping statistics for192.168.2.254:
Approximate round trip times in milli-seconds:
C:\>tracert 192.168.2.254
Tracing route to192.168.2.254 over a maximum of 30 hops
Trace complete.
DEBUG信息:
VPN_Server#debug l2tp event
L2TP events debugging is on
VPN_Server#
*Oct 16 15:55:55.850: L2X
*Oct 16 15:55:55.850: L2TP tnl
*Oct 16 15:55:55.854: L2TP tnl
*Oct 16 15:55:55.858: L2TP tnl
*Oct 16 15:55:55.858: L2TP tnl
*Oct 16 15:55:55.866: L2TP tnl
*Oct 16 15:55:55.870: L2TP tnl
*Oct 16 15:55:55.874: L2TP tnl
*Oct 16 15:55:55.878:L2X
*Oct 16 15:55:55.918:L2X
*Oct 16 15:55:55.922: L2TP tnl
*Oct 16 15:55:55.926:L2X
*Oct 16 15:55:55.926:L2X
*Oct 16 15:55:55.930:L2X
*Oct 16 15:55:55.934:L2X
*Oct 16 15:55:55.934:L2X
*Oct 16 15:55:55.938:L2X
*Oct 16 15:55:55.942: L2TP tnl
*Oct 16 15:55:55.946:L2X
*Oct 16 15:55:55.946:L2X
*Oct 16 15:55:55.950: L2TP tnl
*Oct 16 15:55:55.954: L2TP tnl
*Oct 16 15:55:55.958: L2TP tnl
*Oct 16 15:55:55.958: L2TP tnl
*Oct 16 15:55:55.966: L2TP tnl
*Oct 16 15:55:55.966: L2TP tnl
*Oct 16 15:55:55.970: L2TP tnl
*Oct 16 15:55:55.970: L2TP tnl
*Oct 16 15:55:56.082: L2TP tnl
*Oct 16 15:55:56.082: L2TP tnl
*Oct 16 15:55:56.082: L2TP tnl
*Oct 16 15:55:56.082: L2TP tnl
*Oct 16 15:55:56.082: L2TP tnl
*Oct 16 15:55:56.082: L2TP tnl
*Oct 16 15:55:56.082: L2TP tnl
*Oct 16 15:55:56.082: L2TP tnl
*Oct 16 15:55:56.094: L2X
*Oct 16 15:55:56.094: L2TP _____:_____:_____: Createsession
*Oct 16 15:55:56.094: L2TP_____:_____:_____:
*Oct 16 15:55:56.094: L2TP_____:_____:_____:
*Oct 16 15:55:56.094: L2TP_____:_____:_____:
*Oct 16 15:55:56.094: L2TP tnl
*Oct 16 15:55:56.094: L2TP tnl
*Oct 16 15:55:56.094: L2TP tnl
*Oct 16 15:55:56.094: L2TP tnl
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP tnl
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.094: L2TP_____:102424:26
*Oct 16 15:55:56.110: L2TP_____:102424:26
*Oct 16 15:55:56.110: L2TP_____:102424:26
*Oct 16 15:55:56.114: L2TP_____:102424:26