Introduction to IPSec Configuration

Experimental topology:

 Purpose:

PC1 pings PC2

AR1 configure static route IP route-static 0.0.0.0 0 100.1.12.2 

AR3 configure static route IP route-static 0.0.0.0 0 100.1.13.2 

AR1 :

一.配置网络密钥交换提议 

ike proposal  1    

设置身份认证算法为:sha1 

authentication-algorithm  sha1

设置身份认证方式为(预共享密钥)pre-share

authentication-method  pre-share 

设置加密算法为:aes-cbs -128

encryption-algorithm aes-cbc-128

dh group2

二.配置ike对等体

ike peer jjj

配置传输模式为主模式(默认)

exchange-mode  main

应用之前配置的ike 提议 

ike proposal1

配置预共享密钥

pre-shared-key cipher 123

配置远程地址 

emote-address 100.1.13.1

三.配置IPSec proposal 

ipsec proposal jjj

配置安全协议的报文封装模式

encapsulation-mode tunnel (隧道模式)(默认)

指定ESP 协议参数  

    指定IPSec安全协议的认证算法

    esp authentication-algorithm  sha1 

    指定IPsec安全协议的加密算法 

    esp encryption-algorithm aes-128

四.使用高级acl抓取要使用IPSec加密的流量

acl 3000

rule 5 permit ip source 192.168.1.2 0 destination 192.168.2.2 0 

五.配置IPSec安全策略 

(配置名为jjj 策略号为 1 的 采用ike方式建立安全联盟的策略)

ipsec policy jjj  1 isakmp 


security acl 3000 (指定受此策略保护的报文)
pfs dh-group2(在IKE阶段2协商中使用PFS (perfect forward security))
ike-peer jjj (指定ike peer )
proposal jjj (配置IPSec安全提议)

六.应用安全策略组

进入指定接口


iinterface g/0/0/1 

ipsec policy jjj(应用jjj 策略)

 AR3:

一.配置网络密钥交换提议 

ike proposal  1    

设置身份认证算法为:sha1 

authentication-algorithm  sha1

设置身份认证方式为(预共享密钥)pre-share

authentication-method  pre-share 

设置加密算法为:aes-cbs -128

encryption-algorithm aes-cbc-128

dh group2

二.配置ike对等体

ike peer jjj

配置传输模式为主模式(默认)

exchange-mode  main

应用之前配置的ike 提议 

ike proposal1

配置预共享密钥

pre-shared-key cipher 123

配置远程地址 

emote-address 100.1.12.1

三.配置IPSec proposal 

ipsec proposal jjj

配置安全协议的报文封装模式

encapsulation-mode tunnel (隧道模式)(默认)

指定ESP 协议参数  

    指定IPSec安全协议的认证算法

    esp authentication-algorithm  sha1 

    指定IPsec安全协议的加密算法 

    esp encryption-algorithm aes-128

四.使用高级acl抓取要使用IPSec加密的流量

acl 3000

rule 5 permit ip source 192.168.2.2 0 destination 192.168.1.2 0 

五.配置IPSec安全策略 

(配置名为jjj 策略号为 1 的 采用ike方式建立安全联盟的策略)

ipsec policy jjj  1 isakmp 


security acl 3000 (指定受此策略保护的报文)
pfs dh-group2(在IKE阶段2协商中使用PFS (perfect forward security))
ike-peer jjj (指定ike peer )
proposal jjj (配置IPSec安全提议)

六.应用安全策略组

进入指定接口


iinterface g/0/0/0 

ipsec policy jjj(应用jjj 策略)

Finally, pc1 and pc2 can ping each other

Packet traffic in two phases of IKE

 It can be seen that the communication between pc1 and pc2 has been encrypted by ESP

Guess you like

Origin blog.csdn.net/bbq1234564/article/details/132022925