一、背景介绍:
R1模拟总部,内部网络使用OSPF。与模拟ISP的R2之间通过默认路由连接,R1上进行NAT地址转换。R1下接一台C2(VPCS)模拟总部内部地址。
R2模拟ISP
R3模拟分部,内部网络使用OSPF。与模拟ISP的R2之间通过默认路由连接,R3上进行NAT地址转换。C1与本地物理机网卡桥接。
二、基本配置
R1:
interface FastEthernet0/0
ip address 1.1.1.1 255.255.255.0
ip nat outside
interface FastEthernet0/1
ip address 10.5.2.1 255.255.255.0
ip nat inside
router ospf 10
network 1.1.1.0 0.0.0.255 area 0
network 10.5.0.0 0.0.255.255 area 0
default-information originate //命令向ospf网络注入一条默认路由.
ip nat inside source list 101 interface FastEthernet0/0 overload
ip route 0.0.0.0 0.0.0.0 1.1.1.2
access-list 101 permit ip 10.5.0.0 0.0.255.255 any
R2:
interface FastEthernet0/0
ip address 1.1.1.2 255.255.255.0
!
interface FastEthernet0/1
ip address 2.2.2.2 255.255.255.0
R3:
interface FastEthernet0/0
ip address 2.2.2.1 255.255.255.0
ip nat outside
!
interface FastEthernet0/1
ip address 3.3.3.1 255.255.255.0
ip nat inside
!
router ospf 10
network 2.2.2.0 0.0.0.255 area 0
network 3.3.3.0 0.0.0.255 area 0
default-information originate //命令向ospf网络注入一条默认路由.
!
ip nat inside source list 101 interface FastEthernet0/0 overload
!
ip route 0.0.0.0 0.0.0.0 2.2.2.2
!
access-list 101 permit ip 3.3.3.0 0.0.0.255 any
三、配置PPTP
R1:
R1(config)#username cisco password cisco
R1(config)#ip local pool vpngp 10.5.100.100 10.5.100.200
R1(config)#vpdn enable
R1(config)#vpdn-group vpngp
R1(config-vpdn)#accept-dialin
R1(config-vpdn-acc-in)#protocol pptp
R1(config-vpdn-acc-in)#virtual-template 1
R1(config-vpdn-acc-in)#exit
R1(config-vpdn)#exit
R1(config)#int virtual-template 1
R1(config-if)# ip unnumbered FastEthernet0/0
R1(config-if)#peer default ip add pool vpngp
R1(config-if)#ppp encrypt mppe 128
R1(config-if)#ppp authentication ms-chap-v2 //记住此处的认证协议,在客户端上要选择相应的协议,win7和2008建议选v2
R1(config-if)#exit
R1(config)#exit
四、客户端设置