华为IPsec IKE自动协商配置

华为IPsec IKE自动协商配置

要点
1、大家使用ENSP模拟器AR2220进行操作;
2、配置的时候梳理好逻辑,有自己一套逻辑最好,我比较习惯先让设备能通讯,然后在配置协议;
3、验证的时候最好抓包看一下IPsec建立的过程、以及加密ESP报文;
4、理论就不过多的赘述了,有兴趣的可以去华为官网下载安全相关的教材,上面关于IPsec理论的解释比较全面;

在这里插入图片描述
PC1地址
在这里插入图片描述

PC2地址
在这里插入图片描述
AR1配置

acl number 3001
rule 5 permit ip source 192.168.10.0 0.0.0.255 destination 10.0.20.0 0.0.0.255

ipsec proposal tran
esp authentication-algorithm sha1

ike proposal 5
encryption-algorithm aes-cbc-128
dh group14

ike peer spub v1
pre-shared-key simple hanshu
ike-proposal 5
remote-address 2.2.2.2

ipsec policy mp 10 isakmp
security acl 3001
ike-peer spub
proposal tran

interface GigabitEthernet0/0/0
ip address 192.168.10.254 255.255.255.0

interface GigabitEthernet0/0/1
ip address 1.1.1.1 255.255.255.0
ipsec policy mp

ip route-static 2.2.2.0 255.255.255.0 GigabitEthernet0/0/1 1.1.1.2
ip route-static 10.0.20.0 255.255.255.0 GigabitEthernet0/0/1 1.1.1.2

AR2

interface GigabitEthernet0/0/0
ip address 1.1.1.2 255.255.255.0

interface GigabitEthernet0/0/1
ip address 2.2.2.1 255.255.255.0

AR3

acl number 3001
rule 5 permit ip source 10.0.20.0 0.0.0.255 destination 192.168.10.0 0.0.0.255

ipsec proposal tran
esp authentication-algorithm sha1

ike proposal 5
encryption-algorithm aes-cbc-128
dh group14

ike peer spua v1
pre-shared-key simple hanshu
ike-proposal 5
remote-address 1.1.1.1

ipsec policy us 10 isakmp
security acl 3001
ike-peer spua
proposal tran

interface GigabitEthernet0/0/0
ip address 2.2.2.2 255.255.255.0
ipsec policy us

interface GigabitEthernet0/0/1
ip address 10.0.20.254 255.255.255.0

ip route-static 1.1.1.0 255.255.255.0 GigabitEthernet0/0/0 2.2.2.1
ip route-static 192.168.10.0 255.255.255.0 GigabitEthernet0/0/0 2.2.2.1

验证
AR1 dis ike sa
在这里插入图片描述
AR2
在这里插入图片描述
在公网上随意找个端口进行抓包,查看IKE 建立过程的报文
在这里插入图片描述
PC1 ping PC2 抓包查看ESP加密数据流在这里插入图片描述
可以看到protocol 不是ICMP而是ESP ,说明数据已经被加密。
在这里插入图片描述

定位合肥 ,有工作或者兼职请联系我
联系方式QQ : 481715271

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值