拓扑

CEA配置
# 感兴趣流
acl advanced 3001
rule 15 permit gre source 12.1.1.2 0 destination 34.1.1.2 0
# ipsec提议
ipsec transform-set cea
encapsulation-mode transport
esp encryption-algorithm aes-cbc-192
esp authentication-algorithm sha1
# ike提议 prf算法需要ike2版本
ike proposal 1
dh group14
encryption-algorithm aes-cbc-256
authentication-algorithm sha256
authentication-method pre-share
sa duration 86400
# 配置协商双方的密钥信息
ike keychain key
pre-shared-key address 34.1.1.2 key simple 123456
# ike对等体
ike profile 1
keychain key
exchange-mode aggressive
local-identity address 12.1.1.2
match remote identity address 34.1.1.2 24
proposal 1
# ike策略
ipsec policy P2 10 isakmp
transform-set cea
security acl 3001
remote-address 34.1.1.2
ike-profile 1
# 应用ipsec
interface GigabitEthernet0/2
ipsec apply policy P2
CEB配置
# 感兴趣流
acl advanced 3001
rule 15 permit gre source 34.1.1.2 0 destination 12.1.1.2 0
# ipsec提议
ipsec transform-set ceb
encapsulation-mode transport
esp encryption-algorithm aes-cbc-192
esp authentication-algorithm sha1
# ike提议 prf算法需要ike2版本
ike proposal 1
dh group14
encryption-algorithm aes-cbc-256
authentication-algorithm sha256
authentication-method pre-share
sa duration 86400
# 配置协商双方的密钥信息
ike keychain key
pre-shared-key address 12.1.1.2 key simple 123456
# ike对等体
ike profile 1
keychain key
exchange-mode aggressive
local-identity address 34.1.1.2
match remote identity address 12.1.1.2 24
proposal 1
# ike策略
ipsec policy P2 10 isakmp
transform-set cea
security acl 3001
remote-address 12.1.1.2
ike-profile 1
# 应用ipsec
interface GigabitEthernet0/2
ipsec apply policy P2
验证
[CEA]display ike proposal
Priority Authentication Authentication Encryption Diffie-Hellman Duration
method algorithm algorithm group (seconds)
----------------------------------------------------------------------------
1 PRE-SHARED-KEY SHA256 AES-CBC-256 Group 14 86400
default PRE-SHARED-KEY SHA1 DES-CBC Group 1 86400
[CEA]
[CEA]ping 192.168.2.2
Ping 192.168.2.2 (192.168.2.2): 56 data bytes, press CTRL+C to break
56 bytes from 192.168.2.2: icmp_seq=0 ttl=254 time=2.252 ms
56 bytes from 192.168.2.2: icmp_seq=1 ttl=254 time=1.939 ms
56 bytes from 192.168.2.2: icmp_seq=2 ttl=254 time=1.431 ms
56 bytes from 192.168.2.2: icmp_seq=3 ttl=254 time=1.561 ms
56 bytes from 192.168.2.2: icmp_seq=4 ttl=254 time=1.568 ms
--- Ping statistics for 192.168.2.2 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.431/1.750/2.252/0.303 ms
[CEA]%Oct 6 14:16:42:840 2024 CEA PING/6/PING_STATISTICS: Ping statistics for 192.168.2.2: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.431/1.750/2.252/0.303 ms.
[CEA]ping 2.2.2.2
Ping 2.2.2.2 (2.2.2.2): 56 data bytes, press CTRL+C to break
56 bytes from 2.2.2.2: icmp_seq=0 ttl=254 time=0.815 ms
56 bytes from 2.2.2.2: icmp_seq=1 ttl=254 time=0.758 ms
56 bytes from 2.2.2.2: icmp_seq=2 ttl=254 time=0.794 ms
56 bytes from 2.2.2.2: icmp_seq=3 ttl=254 time=0.716 ms
56 bytes from 2.2.2.2: icmp_seq=4 ttl=254 time=0.976 ms
--- Ping statistics for 2.2.2.2 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.716/0.812/0.976/0.089 ms
[CEA]%Oct 6 14:20:16:460 2024 CEA PING/6/PING_STATISTICS: Ping statistics for 2.2.2.2: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.716/0.812/0.976/0.089 ms.
