6.14.3. 不匹配的配置


如果端点没有配置匹配的互联网密钥交换(IKE)版本、算法、IP 地址范围或预共享密钥(PSK),则 VPN 连接会失败。如果识别到不匹配,则您必须使两个端点上的设置保持一致,以解决这个问题。

远程对等点没有运行 IKE/IPsec

如果连接被拒绝,则会显示一个 ICMP 错误:

# ipsec up vpn.example.com
...
000 "vpn.example.com"[1] 192.0.2.2 #16: ERROR: asynchronous network error report on wlp2s0 (192.0.2.2:500), complainant 198.51.100.1: Connection refused [errno 111, origin ICMP type 3 code 3 (not authenticated)]
不匹配的 IKE 算法

在初始设置过程中,连接会失败并显示一个 NO_PROPOSAL_CHOSEN 通知:

# ipsec up vpn.example.com
...
003 "vpn.example.com"[1] 193.110.157.148 #3: dropping unexpected IKE_SA_INIT message containing NO_PROPOSAL_CHOSEN notification; message payloads: N; missing payloads: SA,KE,Ni
不匹配的 IPsec 算法

在初始交换后,连接会失败并显示一个 NO_PROPOSAL_CHOSEN 错误:

# ipsec up vpn.example.com
...
182 "vpn.example.com"[1] 193.110.157.148 #5: STATE_PARENT_I2: sent v2I2, expected v2R2 {auth=IKEv2 cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_256 group=MODP2048}
002 "vpn.example.com"[1] 193.110.157.148 #6: IKE_AUTH response contained the error notification NO_PROPOSAL_CHOSEN
不匹配的 IP 地址范围(IKEv2)

远程对等点响应一个 TS_UNACCEPTABLE 错误:

# ipsec up vpn.example.com
...
1v2 "vpn.example.com" #1: STATE_PARENT_I2: sent v2I2, expected v2R2 {auth=IKEv2 cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=MODP2048}
002 "vpn.example.com" #2: IKE_AUTH response contained the error notification TS_UNACCEPTABLE
不匹配的 IP 地址范围 (IKEv1)

在快速模式下连接超时,并显示一条表示 peer 不接受提议的消息:

# ipsec up vpn.example.com
...
031 "vpn.example.com" #2: STATE_QUICK_I1: 60 second timeout exceeded after 0 retransmits.  No acceptable response to our first Quick Mode message: perhaps peer likes no proposal
不匹配的 PSK (IKEv2)

对等点拒绝连接,并显示一个 AUTHENTICATION_FAILED 错误的:

# ipsec up vpn.example.com
...
003 "vpn.example.com" #1: received Hash Payload does not match computed value
223 "vpn.example.com" #1: sending notification INVALID_HASH_INFORMATION to 192.0.2.23:500
不匹配的 PSK (IKEv1)

哈希有效负载不匹配,使 IKE 消息不可读,并导致一个 INVALID_HASH_INFORMATION 错误:

# ipsec up vpn.example.com
...
002 "vpn.example.com" #1: IKE SA authentication request rejected by peer: AUTHENTICATION_FAILED
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部