[HCIE] IPSec-VPN (手工模式)

概念:

A. IPSec:是对IP的安全性补充,工作在IP层,为IP网络通信提供安全服务。

B.安全联盟SA:是通信对等体之间对某些要素的协定。

C. IPSec安全联盟简称 IPSec SA.通常成对建立(inbound和outbound)。

D.建立 IPSec SA两种方式:手工模式和IKE自动建立。可分成5步。

   1.选择安全提议

   2.选择封装模式

   3.选择加密算法

   4.选择验证算法

   5.进行密钥交换

实验目标:pc1与pc2互通

步骤1:R1与R3配置默认路由

R1:

ip route-static 0.0.0.0 0.0.0.0 12.1.1.2

R2:

ip route-static 0.0.0.0 0.0.0.0 23.1.1.2

步骤2:配ACL,定义需要IPSec保护的数据流

R1:

acl number 3000  
 rule 5 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.3.0 0.0.0.255 

R3:

acl number 3000  
 rule 5 permit ip source 192.168.3.0 0.0.0.255 destination 192.168.1.0 0.0.0.255 

步骤3:配置IPSec安全提议,定义保护方法

R1/R3:

ipsec proposal p1    \\创建安全提议,名称P1

 encapsulation-mode tunnel    \\选择隧道模式(封装新Ip头实现VPN功能)
 esp authentication-algorithm sha2-512    \\认证算法
 esp encryption-algorithm aes-256    \\加密算法

步骤4:配置安全策略,调用ACL和IPSec安全提议

R1:

ipsec policy s1 10 manual    \\创建安全策略名称s1,序号10,手工配置
 security acl 3000    \\引用acl3000
 proposal p1    \\应用安全提议                           
 tunnel local 12.1.1.1    \\本端ip地址
 tunnel remote 23.1.1.3    \\对端ip地址
 sa spi inbound esp 54321    \\入向spi
 sa string-key inbound esp cipher huawei    \\入向密钥
 sa spi outbound esp 12345    \\出向spi
 sa string-key outbound esp cipher huawei    \\出向密钥

R3:

ipsec policy s1 10 manual
 security acl 3000
 proposal p1                              
 tunnel local 23.1.1.3
 tunnel remote 12.1.1.1
 sa spi inbound esp 12345
 sa string-key inbound esp cipher huawei
 sa spi outbound esp 54321
 sa string-key outbound esp cipher huawei

步骤5:在接口调用策略

R1:

interface GigabitEthernet0/0/1
 ip address 12.1.1.1 255.255.255.0 
 ipsec policy s1

R3:

interface GigabitEthernet0/0/0
 ip address 23.1.1.3 255.255.255.0 
 ipsec policy s1

测试:

补充:

dis ipsec sa brief     \\查看ipsec sa 隧道建立情况

dis ipsec statistics esp    \\查看加密解密情况

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值