第一范文网 - 专业文章范例文档资料分享平台

[网络安全]使用路由器构建GRE over IPsec VPN

来源:用户分享 时间:2025/10/1 16:01:38 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

IV size: 8 bytes

Replay detection support:Y

Outbound esp sas:

spi:0x6e729d63 (1853005155) transform: esp-3des esp-sha-hmac in use settings={Transport,} !传输模式

crypto map to_r1 1

sa timing: remaining key lifetime (k/sec): (4607984/896) IV size: 8 bytes

Replay detection support:Y

通过以上状态信息可以看出,R1 与 R2 成功协商了一个 IKE SA 和两个 IPsec SA(每 个方向各一个)。

【注意事项】 ? GRE 隧道两端的密

钥要一致。

? 隧道两端的源和目的相互对应,即 R1 的源地址为 R2 的目的地址,R2 的源地址

为 R1 的目的地址。 ? 需要在 Tunnel 接口启用路由,而非连接 Internet 的接口。 ? 确保 IPsec 隧道两端之间的连通性正常。

? 双方的 IKE 策略和 IPsec 转换集要一致,且双方的预共享密钥要一致。 ? 当配

置了多个 IKE 策略和 IPsec 转换集时,请确保双方能够协商出一个相同的策略和转换集。

? 双方的加密访问列表要互为镜像。

【参考配置】

R1#show running-config

Building configuration...

Current configuration : 1268 bytes !

hostname R1 ! !

access-list 100 permit 47 host 1.1.1.1 host 2.2.2.1 !

no service password-encryption ! !

crypto isakmp policy 1

encryption 3des authentication pre-share

18

hash sha group 2 ! !

crypto isakmp key 7 076f517c41477152 address 2.2.2.1

crypto ipsec transform-set 3des_sha esp-3des esp-sha-hmac mode transport crypto map to_r2 1 ipsec-isakmp set peer 2.2.2.1 set transform-set 3des_sha match address 100 ! !

interface serial 1/2 clock rate 64000 !

interface serial 1/3 clock rate 64000 !

interface FastEthernet 1/0

ip address 1.1.1.1 255.255.255.252 crypto map to_r2 duplex auto speed auto !

interface FastEthernet 1/1

ip address 192.168.1.1 255.255.255.0 duplex auto speed auto !

interface Tunnel 1 no ip route-cache no ip route-cache policy ip address 10.1.1.1 255.255.255.0 tunnel source FastEthernet 1/0 tunnel destination 2.2.2.1 tunnel key 1234567 no keepalive !

interface Null 0 ! !

router rip

no auto-summary version 2 network 10.0.0.0 network 192.168.1.0 !

ip route 0.0.0.0 0.0.0.0 1.1.1.2 !

19 !

line con 0 line aux 0 line vty 0 4 login ! ! end

R2#show running-config

Building configuration...

Current configuration : 1268 bytes !

hostname R2 ! !

access-list 100 permit 47 host 2.2.2.1 host 1.1.1.1 ! ! !

no service password-encryption ! !

crypto isakmp policy 1 encryption 3des

authentication pre-share hash sha group 2 ! !

crypto isakmp key 7 076f517c41477152 address 1.1.1.1

crypto ipsec transform-set 3des_sha esp-3des esp-sha-hmac mode transport crypto map to_r1 1 ipsec-isakmp set peer 1.1.1.1 set transform-set 3des_sha match address 100 ! !

interface serial 1/2 clock rate 64000 !

interface serial 1/3 clock rate 64000 !

interface FastEthernet 1/0

ip address 192.168.2.1 255.255.255.0

20

duplex auto speed auto !

interface FastEthernet 1/1

ip address 2.2.2.1 255.255.255.252 crypto map to_r1 duplex auto speed auto !

interface Tunnel 1 no ip route-cache no ip route-cache policy ip address 10.1.1.2 255.255.255.0 tunnel source FastEthernet 1/1 tunnel destination 1.1.1.1 tunnel key 1234567 no keepalive !

interface Null 0 ! !

router rip

no auto-summary version 2 network 10.0.0.0 network 192.168.2.0 !

ip route 0.0.0.0 0.0.0.0 2.2.2.2 ! !

line con 0 line aux 0 line vty 0 4 login ! ! end

R3#show running-config

Building configuration...

Current configuration : 489 bytes !

hostname R3 ! !

no service password-encryption !

21

interface serial 1/2 clock rate 64000 !

interface serial 1/3 clock rate 64000 !

interface FastEthernet 1/0 ip

address 1.1.1.2 255.255.255.252 duplex auto speed auto !

interface FastEthernet 1/1 ip

address 2.2.2.2 255.255.255.252 duplex auto speed auto !

interface Null 0 !

line con 0 line aux 0 line vty 0 4 login ! ! end

22

[网络安全]使用路由器构建GRE over IPsec VPN.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c0s6yx5ckjg4ddq3430jm4g4gh0kzl900yjp_3.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top