H3C-V7-IpSec

一:目的:100.1.1.1与200.1.1.2建立ipsec隧道。

二:配置基本命令

1 配置acl :

[MSR_1]acl advanced 3400

[MSR_1]rule 5 deny ip source 192.168.0.0 0.0.0.255 destination 10.0.0.0 0.0.0.255

[MSR_1]rule 6 permit ip source 192.168.0.0 0.0.0.255

[MSR_1]acl advanced 3000

[MSR_1-acl-ipv4-adv-3000]rule permit ip source 192.168.0.1 0 destination 10.0.0.1 0

2创建IPsec安全提议

[MSR_1]ipsec transform-set tran

[MSR_1-ipsec-transform-set-tran]encapsulation-mode tunnel

[MSR_1-ipsec-transform-set-tran]protocol esp

[MSR_1-ipsec-transform-set-tran]esp encryption-algorithm aes-cbc-128

[MSR_1-ipsec-transform-set-tran]esp authentication-algorithm sha1

 

3创建IKE keychain

[MSR_1]ike keychain test

[MSR_1-ike-keychain-test]pre-shared-key address 200.1.1.2 255.255.255.0 key simple 123456

 

4创建IKE提议

[MSR_1]ike proposal 100

[MSR_1-ike-proposal-100]encryption-algorithm 3des-cbc

[MSR_1-ike-proposal-100]authentication-method pre-share

[MSR_1-ike-proposal-100]authentication-algorithm md5

[MSR_1-ike-proposal-100]dh group1

 

5创建IKE profile

[MSR_1]ike profile profile1

[MSR_1-ike-profile-profile1]keychain test

[MSR_1-ike-profile-profile1]local-identity address 100.1.1.1

[MSR_1-ike-profile-profile1]match remote identity address 200.1.1.2 255.255.255.0

[MSR_1-ike-profile-profile1]proposal 100

[MSR_1-ike-profile-profile1]exchange-mode main

 6创建一条IKE协商方式的IPsec安全策略

[MSR_1]ipsec policy test 10 isakmp

[MSR_1-ipsec-policy-isakmp-test-10]remote-address 200.1.1.2

[MSR_1-ipsec-policy-isakmp-test-10]security acl 3000

[MSR_1-ipsec-policy-isakmp-test-10]transform-set tran

[MSR_1-ipsec-policy-isakmp-test-10]ike-profile profile1

7接口应用:

[MSR_1]int g0/0

[MSR_1-GigabitEthernet0/0]ipsec apply policy test

[MSR_1-GigabitEthernet0/0]nat outbound 3400

8路由:

ip route-static 10.0.0.0 255.255.255.0 GigabitEthernet 0/0 200.1.1.2

 

转载于:https://www.cnblogs.com/chenmx/p/7708348.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值