IPSec 互联网协议安全(Internet Protocol Security)
虚拟专用网(Virtual Private Network),即用公网构架私有专用网
在总部与分部间架构IPSec隧道,一般用于企业总部与分部进行数据的安全交互(如下图所示)
IPSec作为一种开放标准的安全框架结构,可以用来保证IP数据报文在网络上传输的机密性、完整性和防重放。
IPSec的架构:
IPSec不是一个单独的协议,它通过AH和ESP这两个安全协议来实现IP数据报的安全传送
IKE协议提供秘钥协商,建立和维护安全联盟SA等服务
IKE无需配置密码
IPSec传输模式有三种,分别为AH、ESP(首选)、AH-ESP
三种模式的报文结构:
在传输模式下,AH或ESP报头位于IP报头和传输层报头之间
拓扑:
以下是 静态配置ESP传输模式过程:
PC1:
PC2:
AR1:
#
sysname AR1
#
acl number 3000
rule 5 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255
#
ipsec proposal ipsec
#
ipsec policy hcie 10 manual
security acl 3000
proposal ipsec
tunnel local 10.1.34.3
tunnel remote 10.1.45.5
sa spi inbound esp 12345
sa string-key inbound esp cipher Huawei@123
sa spi outbound esp 54321
sa string-key outbound esp cipher Huawei@123
#
interface GigabitEthernet0/0/0
ip address 10.1.34.3 255.255.255.0
ipsec policy hcie
#
interface GigabitEthernet0/0/1
ip address 192.168.1.254 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.1.34.4
ISP:
#
sysname ISP
#
interface GigabitEthernet0/0/0
ip address 10.1.34.4 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.1.45.4 255.255.255.0
AR3:
#
sysname AR3
#
acl number 3000
rule 5 permit ip source 192.168.2.0 0.0.0.255 destination 192.168.1.0 0.0.0.255
#
ipsec proposal ipsec
#
ipsec policy hcie 10 manual
security acl 3000
proposal ipsec
tunnel local 10.1.45.5
tunnel remote 10.1.34.3
sa spi inbound esp 54321
sa string-key inbound esp cipher Huawei@123
sa spi outbound esp 12345
sa string-key outbound esp cipher Huawei@123
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
ip address 10.1.45.5 255.255.255.0
ipsec policy hcie
#
interface GigabitEthernet0/0/2
ip address 192.168.2.254 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.1.45.4
测试总部PC与分部PC交互:
动态配置下篇更新