思科GRE over IPSEC解决方案

GRE over IPSEC
在IPsec构建的VPN网络上传输这些数据就必须借助于GRE协议,对路由协议报文等进行封装,使其成为IPsec可以处理的IP报文,这样就可以在IPsec VPN网络中实现不同的网络的路由
使用场合
总部与分支机构跨越Internet互联。
总部与分支机构之间的路由协议为动态路由协议。

Site1(config)#interface tunnel 0
Site1(config-if)#ip address 172.16.1.2 255.255.255.0
Site1(config-if)#tunnel source fastEthernet 1/0
<tunnel source 配置 IP 地址与配置接口效果相同>
Site1(config-if)#tunnel destination 202.100.1.1
Site1(config)#router ospf 1
Site1(config-router)#network 172.16.1.0 0.0.0.255 area 0
<宣告 Tunnel 隧道接口网络>
Site1(config-router)#network 1.1.1.0 0.0.0.255 area 0
<宣告 Site1 身后网络>
Site1(config)#crypto isakmp policy 10
Site1(config-isakmp)#authentication pre-share
Site1(config)#crypto isakmp key 0 cisco address 61.128.1.1
Site1(config)#ip access-list ex vpn
Site1(config-ext-nacl)#permit gre host 202.100.1.1 host 61.128.1.1
Site1(config)#crypto ipsec transform-set cisco esp-des esp-md5-hmac
Site1(cfg-crypto-trans)#mode transport
<GRE over IPSec 推荐配置为传输模式>
Site1(config)#crypto map cisco 10 ipsec-isakmp
Site1(config-crypto-map)#match address vpn
Site1(config-crypto-map)#set transform-set cisco
Site1(config-crypto-map)#set peer 61.128.1.1
Site1(config-crypto-map)#inter fa0/0
Site1(config-if)#crypto map cisco
其他 GRE over IPSec 配置方式
Site1(config)#crypto isakmp policy 10
Site1(config-isakmp)#authentication pre-share
Site1(config)#crypto isakmp key 0 cisco address 61.128.1.1
Site1(config)#crypto ipsec transform-set cisco esp-des esp-md5-hmac
Site1(cfg-crypto-trans)#mode transport
Site1(config)#crypto ipsec profile ipsecprof
<创建 IPSec profile 名字为“ipsecprof”>
Site1(ipsec-profile)#set transform-set cisco
Site1(config)#inter tunnel 0
Site1(config-if)#tunnel protection ipsec profile ipsecprof

  • 1
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
当然可以!下面是gre over ipsec vpn实验文档的基本步骤: 1.准备工作 在进行实验之前,你需要具备以下知识和技能: •网络基础知识(TCP/IP协议、子网掩码、IP地址、路由等) •GRE协议和IPSec协议的基本概念 •使用telnet工具访问路由器的基本操作 •使用Wireshark抓包分析的基本操作 •使用VPCS模拟本地主机的基本操作 此外,你还需要准备以下设备: •两台路由器(建议使用Cisco路由器) •一台计算机(用来运行Wireshark抓包工具) •两个VPCS(用来模拟本地主机) 2.配置GRE隧道 首先,你需要在两台路由器上配置GRE隧道。 具体步骤如下: (1)在Router1上创建一个隧道接口,并将Tunnel0接口的IP地址设置为192.168.100.1/24。 # configure terminal # interface tunnel 0 # ip address 192.168.100.1 255.255.255.0 # tunnel source fa0/0 # tunnel destination 10.0.0.2 # exit (2)在Router2上创建一个隧道接口,并将Tunnel0接口的IP地址设置为192.168.100.2/24。 # configure terminal # interface tunnel 0 # ip address 192.168.100.2 255.255.255.0 # tunnel source fa0/0 # tunnel destination 10.0.0.1 # exit 3.配置IPSec协议 接下来,你需要在两台路由器上配置IPSec协议,以加密隧道内的数据流。 具体步骤如下: (1)在Router1上创建IPSec策略,启用AH(认证头)协议,并将其应用到Tunnel0接口上。 # configure terminal # crypto isakmp policy 1 # encr aes # authentication pre-share # group 2 # exit # crypto isakmp key cisco123 address 10.0.0.2 # exit # crypto ipsec transform-set GRE-AH esp-aes esp-sha256-hmac # crypto map GRE 10 ipsec-isakmp # set peer 10.0.0.2 # set transform-set GRE-AH # match address VPN-TRAFFIC # exit (2)在Router2上创建IPSec策略,启用AH协议,并将其应用到Tunnel0接口上。 # configure terminal # crypto isakmp policy 1 # encr aes # authentication pre-share # group 2 # exit # crypto isakmp key cisco123 address 10.0.0.1 # exit # crypto ipsec transform-set GRE-AH esp-aes esp-sha256-hmac # crypto map GRE 10 ipsec-isakmp # set peer 10.0.0.1 # set transform-set GRE-AH # match address VPN-TRAFFIC # exit 4.测试GRE over IPSec VPN隧道 最后,你可以通过ping命令测试GRE over IPSec VPN隧道是否正常。 具体步骤如下: (1)在VPCS1上ping VPCS2的IP地址。 C:\> ping 192.168.1.2 如果VPN隧道正常工作,你会得到一个回复。 (2)在Wireshark中查看VPN隧道内的通信内容。 选择Tunnel0接口,启动抓包功能,并在VPCS1上执行ping命令。你可以看到通过VPN隧道传输的所有数据包。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值