昨天做的是基于PPTP的×××实验,今天要做的是基于L2TP的×××实验。其实这两个实验环境是相同的,只是服务器端和客户端的配置稍有不同而已。
实验环境为:Windows XP 和Cisco 3825路由器
在路由器上做×××服务器,用Windows自带的××× Client与×××服务器连接。
实验拓扑图大致如下:
实验步骤:
一、×××服务端的配置:
1、 在企业端配置L2TP准备工作。设置LNS路由器的接口IP地址
1:、设置×××登录时的用户名和密码信息,
在路由器上启用L2TP网络(虚拟专用拨号网络)以便×××客户端连接。
2、创建一个基于L2TP的VPDN网络组配置,配置如下:
3、ip unnumbered gi0/1创建虚拟模板并将其引用到gi0/1端口上,确保可以接受×××的访问连接。
peer default ip address pool l2tp-user 配置默认地址池名称
ppp authentication chap配置的PPP认证机制。
5、建立IP地址池,
到这里,×××客户端的所有配置已经完成了。再来看一下车完整的配置:
tro#show running-config
Building configuration...
Current configuration : 1255 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname tro
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip cef
no ip domain lookup
!
multilink bundle-name authenticated
!
vpdn enable
!
vpdn-group 1
! Default L2TP VPDN group
accept-dialin
protocol l2tp
virtual-template 1
no l2tp tunnel authentication
l2tp tunnel receive-window 1024
!
voice-card 0
no dspfarm
!
username linuxtro password 0 linuxtro
archive
log config
hidekeys
!
interface GigabitEthernet0/0
ip address 192.168.1.10 255.255.255.0
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/1
ip address 10.123.123.99 255.255.255.0
duplex auto
speed auto
media-type rj45
!
interface Virtual-Template1
ip unnumbered GigabitEthernet0/0
peer default ip address pool l2tp-user
ppp authentication chap
!
!
ip local pool l2tp-user 10.123.123.100 10.123.123.200
ip route 0.0.0.0 0.0.0.0 10.123.123.100
!
ip http server
no ip http secure-server
!
control-plane
!
line con 0
stopbits 1
line aux 0
stopbits 1
line vty 0 4
login
!
scheduler allocate 20000 1000
!
web*** cef
!
end
二、×××客户端的配置
Windows2000/xp/2003的L2TP缺省启动证书方式的IPSEC,因此必须向Windows添加 ProhibitIpSec 注册表值,以防止创建用于 L2TP/IPSec 通信的自动筛选器。
ProhibitIpSec 注册表值设置为 1 时,基于 Windows XP的计算机不会创建使用 CA 身份验证的自动筛选器,而是检查本地 IPSec 策略或 Active Directory IPSec 策略。
要向Windows添加 ProhibitIpSec 注册表值,请按照下列步骤操作:
1. 单击“开始”,单击“运行”,键入 regedit,然后单击“确定”。
2. 找到下面的注册表子项,然后单击它:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rasman\Parameters
3、在该项中新建一个“DWORD值”。 将该值名称修改为“ProhibitIpSec”。 双击该值,将Value data修改为“1”, 然后单击“确定”。
7、1. 配置L2TP 拨号连接:
1) 进入Windows XP 的“开始” “设置” “控制面板”,选择“切换到分类视图”。
2) 选择“网络和Internet 连接”。
3) 选择“创建一个新的连接”。
4) 选择“连接到我的工作场所的网络”,单击“下一步”。
5) 为连接输入一个名字为“linuxtro”,单击“下一步”。
6) 选择“不拨此初始连接”,单击“下一步”。
7) 输入准备连接的L2TP 服务器的IP 地址“192.168.1.10”,单击“下一步”。
8) 单击“完成”。
9) 双击“linuxtro”连接,在l2tp 连接窗口,单击“属性”。
10) 选择“安全”属性页,选择“高级(自定义设置)”,单击“设置”。
11) 在“数据加密”中选择“可选加密(没有加密也可以连接)”, 在“允许这些协议”选中“不加密的密码(PAP)”、“质询握手身份验证协议(CHAP)”、“Microsoft CHAP(MS-CHAP)”,单击“确定”。
12) 选择“网络”属性页面,在“××× 类型”选择“L2TP IPSec ×××”。
13) 单击“确定”,保存所做的修改。在连接窗口输入用户名和密码。
在命令行查看IP地址可以看到已经会的地址池中的IP地址
转载于:https://blog.51cto.com/linuxtro/342073