GRE_IPSEC_VPN_试验.docVIP

  • 11
  • 0
  • 约1.08万字
  • 约 7页
  • 2016-03-19 发布于浙江
  • 举报
GRE_IPSEC_VPN_试验

第一节 Gre VPN 一.按照以上拓扑先把网络配置好,但不要设置路由。PC1和 PC2不能相互ping通 路由器A上配置: 1.R-A(config)#interface tunnel 1 //创建序号为1的通道 2.R-A(config-if)#ip address 3.3.3.1 255.255.255.0 //为通道设置ip地址。 3.R-A(config-if)# tunnel source 2.2.2.1 //设置创建通道使用的真实源地址。 4.R-A(config-if)# tunnel destination 2.2.2.2 //设置创建通道使用的真实目的地址。 5.R-A(config-if)# tunnel mode gre //设置通道封装协议为gre 6.R-A(config)#ip route 0.0.0.0 0.0.0.0 3.3.3.2 //使用通道地址作为路由目标地址。 三.路由器B重复以上设置。 四.测试,PC1和 PC2可以相互ping通。 7.R-A(config-if)# tunnel key 123456 //给R-A设置通道key,PC1断开PC2。 8.R-B(config-if)# tunnel key 123456 //给R-B设置通道key,PC1连通PC2。 9.R-A#debug tunnel 1 //显示tunnel通信信息,刷新很快,不容易停止,断网后隔一段时间会停下来。 10.R-A#show ip interface brief //显示接口信息 R-A#show ip interface brief tunnel 1 *********************** Interface IP-Address OK? Method Status Protocol Tunnel1 3.3.3.1 YES manual up up ************************ 以上显示配置隧道成功。 第二节 IPSEC VPN 手工建立安全联盟的配置 路由器A配置 11.R-A(config)#acces-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255 //用访问列表定义要保护的通信 12.R-A(config)#crypto ipsec transform-set yqeic esp-des esp-sha-hmac //定义名为yqeic的变换集合 13.R-A(config)#crypto map mymap 10 ipsec-manual //加密映射将IPSec访问列表和变换集合连接起来,并指定受保护的通信将发往何处. 14.R-A(config-crypto-map)#match address 101 15.R-A(config-crypto-map)#set transform-set yqeic 16.R-A(config-crypto-map)#set security-association inbound esp 301 cipher 0123456789abcdef authenticator 0000111122223333444455556666777788889999 17.R-A(config-crypto-map)#set security-association outbound esp 300 cipher 0123456789abcdef authenticator 5555666677778888999900001111222233334444 18.R-A(config-crypto-map)#set peer 2.2.2.2 20.R-A(config-crypto-map)#exit 21.R-A(config)#interface fastethernet 1 22.R-A(config-if)#ip address 2.2.2.1 23.R-A(config-if)#crypto map yqedu //加密映射作用于接口 24.R-A(config)#ip router 0.0.0.0 0.0.0.0 2.2.2.2 路由器B配置 25.R-B(config)#acces-list 101 permit ip 192.168.2.0 0.0.0.255 1

文档评论(0)

1亿VIP精品文档

相关文档