gre over ipsec_[H3C]IPSec

83d3f0f6e6ea3822a49d17ebba5e0ef0.png

一:GRE-over-IPSec:

dc9f3b7ddb1d3e33d42d449992f5f000.png

【DeviceA】

1.配置IP地址

2.GRE

[DeviceA] interface tunnel 0 mode gre[DeviceA-Tunnel0] ip address 10.1.1.1 255.255.255.0[DeviceA-Tunnel0] source 202.115.22.48[DeviceA-Tunnel0] destination 202.115.24.50[DeviceA-Tunnel0] quit

3.路由

[DeviceA] ip route-static 192.168.2.1 255.255.255.0 tunnel 0

4.ACL

[DeviceA] acl number 3000[DeviceA-acl-adv-3000] rule 0 permit gre source 202.115.22.48 0 destination 202.115.24.500[DeviceA-acl-adv-3000] quit

5.IKE+IPSec:

[DeviceA] ike keychain keychain1[DeviceA-ike-keychain-keychain1] pre-shared-key address 202.115.24.50 255.255.255.0 keysimple 123[DeviceA-ike-keychain-keychain1] quit[DeviceA] ike profile profile1[DeviceA-ike-profile-profile1] keychain keychain1[DeviceA-ike-profile-profile1] local-identity address 202.115.22.48[DeviceA-ike-profile-profile1] match remote identity address 202.115.24.50 255.255.255.0[DeviceA-ike-profile-profile1] quit[DeviceA] ipsec transform-set tran1[DeviceA-ipsec-transform-set-tran1] encapsulation-mode tunnel[DeviceA-ipsec-transform-set-tran1] protocol esp[DeviceA-ipsec-transform-set-tran1] esp encryption-algorithm des[DeviceA-ipsec-transform-set-tran1] esp authentication-algorithm sha1[DeviceA-ipsec-transform-set-tran1] quit[DeviceA] ipsec policy policy1 1 isakmp[DeviceA-ipsec-policy-isakmp-policy1-1] security acl 3000[DeviceA-ipsec-policy-isakmp-policy1-1] remote-address 202.115.24.50[DeviceA-ipsec-policy-isakmp-policy1-1] transform-set tran1[DeviceA-ipsec-policy-isakmp-policy1-1] ike-profile profile1[DeviceA-ipsec-policy-isakmp-policy1-1] quit

6.接口应用

[DeviceA] interface gigabitethernet 2/0/2[DeviceA-GigabitEthernet2/0/2] ipsec apply policy policy1[DeviceA-GigabitEthernet2/0/2] quit

二:IPSec-over-GRE:

a50807e2da7e12b5ed2d0623488e0d2a.png

【DeviceA】

1.配置IP地址

2.GRE

[DeviceA] interface tunnel 0 mode gre[DeviceA-Tunnel0] ip address 10.1.1.1 255.255.255.0[DeviceA-Tunnel0] source 202.115.22.48[DeviceA-Tunnel0] destination 202.115.24.50[DeviceA-Tunnel0] quit

3.路由

[DeviceA] ip route-static 192.168.2.1 255.255.255.0 tunnel 0

4.ACL

[DeviceA] acl number 3000[DeviceA-acl-adv-3000] rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255[DeviceA-acl-adv-3000] quit

5.IKE+IPSec:

[DeviceA] ike keychain keychain1[DeviceA-ike-keychain-keychain1] pre-shared-key address 10.1.1.2 255.255.255.0 key simple123[DeviceA-ike-keychain-keychain1] quit[DeviceA] ike profile profile1[DeviceA-ike-profile-profile1] keychain keychain1[DeviceA-ike-profile-profile1] local-identity address 10.1.1.1[DeviceA-ike-profile-profile1] match remote identity address 10.1.1.2 255.255.255.0[DeviceA-ike-profile-profile1] quit[DeviceA] ipsec transform-set tran1[DeviceA-ipsec-transform-set-tran1] encapsulation-mode tunnel[DeviceA-ipsec-transform-set-tran1] protocol esp[DeviceA-ipsec-transform-set-tran1] esp encryption-algorithm des[DeviceA-ipsec-transform-set-tran1] esp authentication-algorithm sha1[DeviceA-ipsec-transform-set-tran1] quit[DeviceA] ipsec policy policy1 1 isakmp[DeviceA-ipsec-policy-isakmp-policy1-1] security acl 3000[DeviceA-ipsec-policy-isakmp-policy1-1] remote-address 10.1.1.2[DeviceA-ipsec-policy-isakmp-policy1-1] transform-set tran1[DeviceA-ipsec-policy-isakmp-policy1-1] ike-profile profile1[DeviceA-ipsec-policy-isakmp-policy1-1] quit

6.接口应用

[DeviceA] interface tunnel 0[DeviceA-Tunnel0] ipsec apply policy policy1[DeviceA-Tunnel0] quit

	
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值