一、网络拓扑
IP地址分配:
R1: s1/0 202.200.200.1 f0/0 172.16.1.1
R2: s1/0 202.200.200.2 f0/0 192.168.1.1
VM8:172.16.1.00
VM9:192.168.1.100
实验目的:vm9能打开vm8虚拟机上的WWW服务网页。
二、基本配置
R1:
interface FastEthernet0/0
ip address 172.16.1.1 255.255.255.0
no shutdown
interface Serial1/0
ip address 202.200.200.1 255.255.255.0
no shutdown
R2:
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
ip nat inside (配置FastEthernet0/0口为内网)
no shutdown
interface Serial1/0
ip address 202.200.200.2 255.255.255.0
ip nat outside (配置Serial1/0口为外网)
no shutdown
ip route 0.0.0.0 0.0.0.0 Serial1/0 (添加一条默认路由)
ip nat inside source list 1 interface Serial1/0 overload (PAT 配置)
access-list 1 permit 192.168.1.0 0.0.0.255 (定义一个内网地址段)
三、L2TP Server端配置 (R1)
R1(config)#vpdn enable (开户虚拟网络拔号)
R1(config)#vpdn-group myl2tp (创建一个虚拟虚拟网络拔号组 myl2tp)
R1(config-vpdn)accept-dialin (接收远程用户的虚拟拔号)
R1(config-vpdn-acc-in)protocol l2tp (定义隧道封装协议)
R1(config-vpdn-acc-in)virtual-template 1 (关联虚拟接口模板 1)
R1(config-vpdn)no l2tp tunnel authentication (关闭隧道认证功能)
R1(config)interface Virtual-Template1 (创建虚拟接口模板 1)
R1(config-if)ip unnumbered FastEthernet0/0 (借用内网接口的IP地址)
R1(config-if)peer default ip address pool l2tp-pool (关联远程用户默认分配的IP地址池)
R1(config-if)ppp authentication chap (启用PPP封装协议)
R1(config-if)no shutdown
R1(config)ip local pool l2tp-pool 172.16.1.21 172.16.1.30 (定义远程用户访问的地址池)
R1(config)username user1 password 0 user1 (建立两个远程虚拟拔号的用户名)
R1(config)username user2 password 0 user2
四、L2TP Client端配置 (VM9)
Windows2000/xp/2003的L2TP缺省启动证书方式的IPSEC,因此必须向Windows添加 ProhibitIpSec 注册表值,以防止创建用于 L2TP/IPSec 通信的自动筛选器。ProhibitIpSec 注册表值设置为 1 时,基于 Windows 2000 的计算机不会创建使用 CA 身份验证的自动筛选器,而是检查本地 IPSec 策略或 Active Directory IPSec 策略。
要向Windows添加 ProhibitIpSec 注册表值,请按照下列步骤操作:
1. 单击“开始”,单击“运行”,键入 regedit,然后单击“确定”。
2. 找到下面的注册表子项,然后单击它:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rasman\Parameters
3. 在该项中新建一个“DWORD值”。
4. 将该值名称修改为“ProhibitIpSec”。
5. 双击该值,将Value data修改为“1”, 然后单击“确定”。
6. 退出注册表编辑器,然后重新启动计算机。
在VM9虚拟机中新建L2TP连接:
1、打开“网上邻居”|“创建一个新的连接”。
2、选“连接到我的工作场所的网络”。
3、选择“虚拟专用网络连接”。
4、输入一个L2TP的连接名称。
5、输入L2TP远程服务器的IP地址。
6、完成连接向导。
7、输入用户名和密码拔号。
8、拔号连接成功。
五、测试实验
1、查看本机IP。
2、测试本机到172.16.1.100的连通性。
3、打开172.16.1.100的WWW网页。
实验完毕!
转载于:https://blog.51cto.com/hnzhaocr/425704