全面講述動(dòng)態(tài)IP地址實(shí)現(xiàn)VPN關(guān)鍵命令
全面講述動(dòng)態(tài)IP地址實(shí)現(xiàn)VPN關(guān)鍵命令,現(xiàn)在家家戶戶都有了自己的電腦,了解動(dòng)態(tài)IP地址實(shí)現(xiàn)VPN設(shè)置,動(dòng)態(tài)IP地址實(shí)現(xiàn)VPN設(shè)置,VPN設(shè)置會(huì)更方便的讓你體會(huì)到互聯(lián)網(wǎng)的精彩世界。
利用Internet出口線路建立動(dòng)態(tài)IP地址實(shí)現(xiàn)VPN通道實(shí)現(xiàn)總、分公司之間的互聯(lián),是目前許多公司熱衷的方案。以往要建立這樣的VPN,需要至少一端使用靜態(tài)的IP地址。當(dāng)前很多公司都通過ADSL方式上網(wǎng),如果要求電信提供靜態(tài)地址,費(fèi)用將會(huì)大大增加(如深圳512K固定IP的ADSL月租是RMB5000)。
現(xiàn)在CiscoIOS12.3(4)T中新增了根據(jù)DNS名稱來建立VPNpeer的命令,借助希網(wǎng)(3322.org)、88ip等動(dòng)態(tài)域名解釋系統(tǒng)的配合,可以在VPN兩端都使用動(dòng)態(tài)地址的ADSL線路,節(jié)省大筆費(fèi)用。
動(dòng)態(tài)IP地址實(shí)現(xiàn)VPN關(guān)鍵命令:
setpeer{host-name[dynamic]|ip-address}
動(dòng)態(tài)IP地址實(shí)現(xiàn)VPN說明:
host-name指定IPSecpeer的DNS主機(jī)名稱,如:myhost.example.com。
dynamic(可選參數(shù))指定IPSecpeer的主機(jī)名在需要建立IPSec通道的時(shí)候才通過DNS服務(wù)器解釋為IP地址。
ip-address直接給出IPSecpeer的IP地址(傳統(tǒng)的配置方式)。
實(shí)際環(huán)境中局域網(wǎng)內(nèi)應(yīng)在一臺(tái)機(jī)器上運(yùn)行動(dòng)態(tài)域名解釋客戶端程序,以將主機(jī)名nbo.3322.org注冊(cè)到服務(wù)器,注冊(cè)地址是路由器的外網(wǎng)端口地址。
動(dòng)態(tài)IP地址實(shí)現(xiàn)VPN配置:
VPN-1(省略了部分無關(guān)配置):
version12.3
!
hostnamevpn-1
!
aaanew-model
!
aaaauthenticationloginauthengroupradiuslocal
aaaauthorizationnetworkauthorlocal
aaasession-idcommon
ipsubnet-zero
!
ipcef
ipname-server202.96.134.133
!
cryptoisakmppolicy10
authenticationpre-share
group2
cryptoisakmpkeyciscoaddress0.0.0.00.0.0.0
!
cryptoipsectransform-sets2sesp-desesp-sha-hmac
!
cryptodynamic-mapdymap1
settransform-sets2s
matchaddress110
!
cryptomapmymap1ipsec-isakmpdynamicdymap
!
interfaceFastEthernet0/0
descriptionVPN
ipaddress202.11.22.11255.255.255.248
ipnatoutside
cryptomapmymap
!
interfaceFastEthernet0/1
descriptionINSIDE_GATEWAY
ipaddress172.16.10.110255.255.0.0
ipnatinside
!
ipnatinsidesourceroute-mapnonatinterfaceFastEthernet0/0overload
ipclassless
iproute0.0.0.00.0.0.0FastEthernet0/0
noiphttpserver
!
access-list110permitip172.16.0.00.0.255.255172.30.1.00.0.0.255
access-list120denyip172.16.0.00.0.255.255172.30.1.00.0.0.255
access-list120permitip172.16.0.00.0.255.255any
route-mapnonatpermit10
matchipaddress120
!
end
動(dòng)態(tài)IP地址實(shí)現(xiàn)VPNVPN-2(省略了部分無關(guān)配置):
version12.3
!
hostnamevpn-2
!
usernamemizepassword0http://mize.netbuddy.org
noaaanew-model
ipsubnet-zero
!
ipcef
ipname-server202.96.134.133
!
cryptoisakmppolicy1
authenticationpre-share
group2
cryptoisakmpkeyciscohostnamenbo.3322.org
!
cryptoipsectransform-sets2sesp-desesp-sha-hmac
!
cryptomapmymap10ipsec-isakmp
setpeernbo.3322.orgdynamic
settransform-sets2s
matchaddress110
!
interfaceFastEthernet0/0
ipaddress202.11.22.43255.255.255.248
ipnatoutside
cryptomapmymap
!
interfaceFastEthernet0/1
ipaddress172.30.1.1255.255.255.0
ipnatinside
!
ipnatinsidesourceroute-mapnonatinterfaceFastEthernet0/0overload
ipclassless
iproute0.0.0.00.0.0.0FastEthernet0/0
!
access-list110permitip172.30.1.00.0.0.255172.16.0.00.0.255.255
access-list120denyip172.30.1.00.0.0.255172.16.0.00.0.255.255
access-list120permitip172.30.1.00.0.0.255any
route-mapnonatpermit10
matchipaddress120
!
end
動(dòng)態(tài)IP地址實(shí)現(xiàn)VPN相關(guān)調(diào)試命令:
showcryisasa
showcryipsecsa