雏鹰部落

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 1922|回复: 2

[讨论/求助] [转贴]DY SITE-SITE VPN

[复制链接]
发表于 2005-6-2 11:41:46 | 显示全部楼层 |阅读模式
<TABLE width="92%" border=0><TBODY><TR><TD colSpan=3><TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0><TBODY><TR><TD align=middle>&nbsp; </TD></TR><TR><TD>&nbsp;</TD></TR><TR><TD style="FONT-WEIGHT: normal; FONT-SIZE: 16pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal" height=20><B><FONT color=#003399>动态地址Site-to-Site VPN</FONT></B></TD></TR><TR><TD height=20><SPAN class=hui>来源:<FONT color=blue>ChinaITLab 收集整理</FONT></SPAN></TD></TR><TR><TD width="100%" height=20><SPAN class=hui>2004-10-29 16:11:00</SPAN></TD></TR><TR><TD align=left width="100%">&nbsp;</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><TABLE cellSpacing=0 cellPadding=0 width="98%" align=center border=0><TBODY><TR><TD class=content style="WORD-BREAK: break-all"><P><BR>  利用Internet 出口线路建立VPN通道实现总、分公司之间的互联,是目前许多公司热衷的方案。以往要建立这样的VPN,需要至少一端使用静态的IP地址。当前很多公司都通过ADSL方式上网,如果要求电信提供静态地址,费用将会大大增加(如深圳512K固定IP的ADSL月租是RMB5000)。现在Cisco IOS 12.3(4)T中新增了根据DNS名称来建立VPN peer 的命令,借助希网(3322.org)、88ip等动态域名解释系统的配合,可以在VPN两端都使用动态地址的ADSL线路,节省大笔费用。<BR>  <BR>  关键命令:<BR>  set peer {host-name [dynamic] | ip-address}<BR>  说明:<BR>  host-name 指定IPSec peer的DNS主机名称,如:myhost.example.com。<BR>  dynamic (可选参数) 指定 IPSec peer 的主机名在需要建立IPSec通道的时候才通过DNS服务器解释为IP地址。<BR>  ip-address 直接给出IPSec peer的IP地址(传统的配置方式)。<BR>  <BR>  示例拓扑图:<BR>   <IMG src="http://www.chinaitlab.com/www/imgfiles/2004.10.29.16.11.55.1.jpg"><BR>  <BR>  为简单起见实验中使用的是静态地址,实际环境中局域网内应在一台机器上运行动态域名解释客户端程序,以将主机名nbo.3322.org注册到服务器,注册地址是路由器的外网端口地址。<BR>  <BR>  配置:<BR>  VPN-1(省略了部分无关配置):<BR>  <BR>  version 12.3<BR>  !<BR>  hostname vpn-1<BR>  !<BR>  aaa new-model<BR>  !<BR>  aaa authentication login authen group radius local<BR>  aaa authorization network author local<BR>  aaa session-id common<BR>  ip subnet-zero<BR>  !<BR>  ip cef<BR>  ip name-server 202.96.134.133<BR>  !<BR>  crypto isakmp policy 10<BR>  authentication pre-share<BR>  group 2<BR>  crypto isakmp key cisco address 0.0.0.0 0.0.0.0<BR>  !<BR>  crypto ipsec transform-set s2s esp-des esp-sha-hmac<BR>  !<BR>  crypto dynamic-map dymap 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set peer 对端IP<BR>  set transform-set s2s<BR>  match address 110<BR>  !<BR>  crypto map mymap 1 ipsec-isakmp dynamic dymap<BR>  !<BR>  interface FastEthernet0/0<BR>  description VPN<BR>  ip address 202.11.22.11 255.255.255.248<BR>  ip nat outside<BR>  crypto map mymap<BR>  !<BR>  interface FastEthernet0/1<BR>  description INSIDE_GATEWAY<BR>  ip address 172.16.10.110 255.255.0.0<BR>  ip nat inside<BR>  !<BR>  ip nat inside source route-map nonat interface FastEthernet0/0 overload<BR>  ip classless<BR>  ip route 0.0.0.0 0.0.0.0 FastEthernet0/0<BR>  no ip http server<BR>  !<BR>  access-list 110 permit ip 172.16.0.0 0.0.255.255 172.30.1.0 0.0.0.255<BR>  access-list 120 deny  ip 172.16.0.0 0.0.255.255 172.30.1.0 0.0.0.255<BR>  access-list 120 permit ip 172.16.0.0 0.0.255.255 any<BR>  route-map nonat permit 10<BR>  match ip address 120<BR>  !<BR>  end<BR>  <BR>  VPN-2(省略了部分无关配置):<BR>  <BR>  version 12.3<BR>  !<BR>  hostname vpn-2<BR>  !<BR>  username mize password 0 http://mize.netbuddy.org<BR>  no aaa new-model<BR>  ip subnet-zero<BR>  !<BR>  ip cef<BR>  ip name-server 202.96.134.133<BR>  !<BR>  crypto isakmp policy 1<BR>  authentication pre-share<BR>  group 2<BR>  crypto isakmp key cisco hostname nbo.3322.org<BR>  !<BR>  crypto ipsec transform-set s2s esp-des esp-sha-hmac<BR>  !<BR>  crypto map mymap 10 ipsec-isakmp<BR>  set peer <FONT color=#f70997>nbo.3322.org</FONT> dynamic&nbsp; 既然是动态IP那 外接口还配置公网IP<BR>  set transform-set s2s<BR>  match address 110<BR>  !<BR>  interface FastEthernet0/0<BR>  ip address 202.11.22.43 255.255.255.248<BR>  ip nat outside<BR>  crypto map mymap<BR>  !<BR>  interface FastEthernet0/1<BR>  ip address 172.30.1.1 255.255.255.0<BR>  ip nat inside<BR>  !<BR>  ip nat inside source route-map nonat interface FastEthernet0/0 overload<BR>  ip classless<BR>  ip route 0.0.0.0 0.0.0.0 FastEthernet0/0<BR>  !<BR>  access-list 110 permit ip 172.30.1.0 0.0.0.255 172.16.0.0 0.0.255.255<BR>  access-list 120 deny  ip 172.30.1.0 0.0.0.255 172.16.0.0 0.0.255.255<BR>  access-list 120 permit ip 172.30.1.0 0.0.0.255 any<BR>  route-map nonat permit 10<BR>  match ip address 120<BR>  !<BR>  end<BR>  <BR>  相关调试命令:<BR>  show cry isa sa<BR>  show cry ipsec sa </P></TD></TR></TBODY></TABLE><FONT color=#44bb74>有点不明白?????</FONT>
发表于 2005-6-7 13:15:01 | 显示全部楼层
请说得具体点,好么
发表于 2005-6-7 13:16:27 | 显示全部楼层
没错,你可以设置一下试试。动态IP和外网不冲突。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-4-28 18:23 , Processed in 0.072644 second(s), 18 queries , Gzip On.

快速回复 返回顶部 返回列表