这里使用H3C模拟器。
H3C IPSec IKE野蛮模式,又称为IKE Main Mode,主要是在第一阶段(Phase 1)的过程中提供身份保护。它主要用于VPN隧道建立过程中的密钥交换。以下是配置步骤:
- system-view
- ike proposal { remote | local } index
- encryption-algorithm { des | 3des | aes }
- hash-algorithm { sha1 | md5 }
- authentication-method { pre-share | rsa-sig }
- dh-group { group1 | group2 }
- lifetime seconds
这里创建一个IKE提案描述了阶段1的加密、哈希算法等。分别可以定义远程和本地的IKE提案。
- system-view
- ike peer peer_name
- pre-shared-key plain-text plain_key
- remote-address ipv4-address
这里创建一个IKE对等体,并配置了预共享密钥与对端的远程地址。
- ipsec proposal proposal_name
- esp { authentication { sha1 | md5 } | encryption { des | 3des | aes } }
- saving-key { bidirectional | inbound | outbound }
- ah enable
- ipsec policy policy_name { isakmp | manual } template-number
- security acl acl_number
- ike-peer peer_name
- proposal proposal_name
这里创建了一个IPSec策略模板,引用了IPSec提案和IKE对等体,同时指定一个访问控制列表ACL。
- system-view
- int tunnel interface_number
- ipsec policy policy_name
在隧道接口上应用IPSec策略。
完成以上配置后,可以通过以下命令检查状态:
display ike peer :显示IKE对等体状态display ipsec sa type :显示IPsec安全关联(SA)的信息注意:实际配置过程可能因设备型号和版本而略有不同。这些步骤应根据您的实际需要进行调整。
这里基本配置就不展示了。

- ipsec transform-set 1
- esp encryption-algorithm 3des-cbc
- esp authentication-algorithm sha1
- ike identity fqdn ZB
- ike keychain 1
- pre-shared-key hostname FB key simple h3c123
- ike profile 1
- keychain 1
- exchange-mode aggressive #默认模式是主动模式,改成野蛮模式
- match remote identity fqdn FB
- ipsec policy-template 1 1
- transform-set 1
- ike-profile 1
- ipsec policy 1 1 isakmp template 1
- int g0/0
- ipsec apply policy 1
- acl advanced 3000
- rule 0 permit ip source 172.16.1.0 0.0.0.255 destination
- 192.168.1.0 0.0.0.255
-
- ipsec transform-set 1
- esp encryption-algorithm 3des-cbc
- esp authentication-algorithm sha1
- ike identity fqdn FB
- ike keychain 1
- pre-shared-key address 202.38.160.1 key simple h3c123
- ike profile 1
- keychain 1
- exchange-mode aggressive
- match remote identity address 202.38.160.1
- ipsec policy 1 1 isakmp
- security acl 3000
- transform-set 1
- ike-profile 1
- remote-address 202.38.160.1
- int g0/0
- ipsec apply policy 1