1、背景介紹:網絡
R1模擬總部,內部網絡使用OSPF。與模擬ISP的R2之間經過默認路由鏈接,R1上進行NAT地址轉換。R1下接一臺C2(VPCS)模擬總部內部地址。ide
R2模擬ISPspa
R3模擬分部,內部網絡使用OSPF。與模擬ISP的R2之間經過默認路由鏈接,R3上進行NAT地址轉換。C1與本地物理機網卡橋接。3d
2、基本配置orm
R1:router
interface FastEthernet0/0
ip address 1.1.1.1 255.255.255.0
ip nat outsideblog
interface FastEthernet0/1
ip address 10.5.2.1 255.255.255.0
ip nat insideip
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網絡注入一條默認路由.ci
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
3、配置PPTP
R1:
R1(config)#username cisco password cisco
R1(config)#ip local pool ***gp 10.5.100.100 10.5.100.200
R1(config)#vpdn enable
R1(config)#vpdn-group ***gp
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 ***gp
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
4、客戶端設置