跳转到内容

IPsec

CE 会向 F5 区域边缘节点建立 IPsec 隧道。如果隧道断开,无论本地状态看起来多么健康,该站点都将与全球网络隔离。

Terminal window
{"command":["ipsec-status"]}
Security Associations (2 up, 0 connecting):
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io[8]: ESTABLISHED 70 minutes ago, 10.0.1.4[ver.mcn-ce-ha-eastus01.<tenant>.<uuid>.tenant.int.ves.io]...<public-ip>[ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io]
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io{9}: INSTALLED, TUNNEL, reqid 65542, ESP in UDP SPIs: ffff1700_i ffffce10_o
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io{9}: 10.0.1.4/32 === <public-ip>/32
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io[7]: ESTABLISHED 70 minutes ago, 10.0.1.4[ver.mcn-ce-ha-eastus01.<tenant>.<uuid>.tenant.int.ves.io]...<public-ip>[ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io]
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io{8}: INSTALLED, TUNNEL, reqid 65541, ESP in UDP SPIs: ffff1160_i ffff1e70_o
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io{8}: 10.0.1.4/32 === <public-ip>/32

第一行即为答案:Security Associations (2 up, 0 connecting)。出现在 connecting 中的任何条目均表示隧道正在尝试建立但未能成功。

每个 SA 均标注了其所终止的区域边缘节点名称——ny8-nycdc12-ash 均为 F5 POP 代码——因此也可由此得知该站点归属的边缘节点。

ESTABLISHED 后跟一个存活时间,再跟 INSTALLED, TUNNEL,表示这是一个健康的组合:前者为 IKE 会话,后者为实际承载流量的子 SA。IKE 会话已建立但无已安装子 SA,是一种值得关注的故障状态。

在相同信息的基础上,额外提供每个 SA 的字节数与数据包计数器、重新协商计时器以及已协商的算法。

Terminal window
{"command":["ipsec-statusall"]}
Status of IKE charon daemon (strongSwan 5.9.13, Linux 5.14.0-687.20.1.el9_8.x86_64, x86_64):
uptime: 78 minutes, since Aug 03 15:12:39 2026
malloc: sbrk 3428352, mmap 0, used 2019536, free 1408816
worker threads: 11 of 16 idle, 5/0/0/0 working, job queue: 0/0/0/0, scheduled: 20
loaded plugins: charon aes des rc2 sha2 sha1 mgf1 random nonce x509 revocation constraints pubkey pkcs1 pkcs7 pkcs12 pgp dnskey sshkey pem openssl pkcs8 fips-prf gmp curve25519 xcbc cmac hmac kdf gcm drbg attr kernel-pb kernel-netlink resolve socket-default stroke vici updown xauth-generic error-notify counters
Listening IP addresses:
10.0.2.4
10.0.3.4
100.64.255.1
10.0.1.4
169.254.100.1
169.254.10.13
169.254.254.103
Connections:
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io: 10.0.1.4[4500]...<public-ip>[4500] IKEv1/2, dpddelay=3s
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io: local: [ver.mcn-ce-ha-eastus01.<tenant>.<uuid>.tenant.int.ves.io] uses any authentication
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io: cert: "O=Volterra, OU=ves-system, CN=ike"
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io: remote: [ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io] uses any authentication
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io: child: dynamic === 0.0.0.0/0 TUNNEL, dpdaction=start
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io: 10.0.1.4[4500]...<public-ip>[4500] IKEv1/2, dpddelay=3s
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io: local: [ver.mcn-ce-ha-eastus01.<tenant>.<uuid>.tenant.int.ves.io] uses any authentication
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io: cert: "O=Volterra, OU=ves-system, CN=ike"
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io: remote: [ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io] uses any authentication
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io: child: dynamic === 0.0.0.0/0 TUNNEL, dpdaction=start
Security Associations (2 up, 0 connecting):
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io[8]: ESTABLISHED 70 minutes ago, 10.0.1.4[ver.mcn-ce-ha-eastus01.<tenant>.<uuid>.tenant.int.ves.io]...<public-ip>[ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io]
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io[8]: IKEv2 SPIs: 82b18316b81c76c1_i* 4a79a978d19b3304_r, any reauthentication in 2 hours
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io[8]: IKE proposal: AES_GCM_16_128/PRF_HMAC_SHA2_256/MODP_3072
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io{9}: INSTALLED, TUNNEL, reqid 65542, ESP in UDP SPIs: ffff1700_i ffffce10_o
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io{9}: AES_GCM_16_128, 0 bytes_i, 0 bytes_o, rekeying disabled
ver.ny8-nyc.ves-io.<uuid>.tenant.int.ves.io{9}: 10.0.1.4/32 === <public-ip>/32
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io[7]: ESTABLISHED 70 minutes ago, 10.0.1.4[ver.mcn-ce-ha-eastus01.<tenant>.<uuid>.tenant.int.ves.io]...<public-ip>[ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io]
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io[7]: IKEv2 SPIs: 7ec7d8a8178881fb_i* e683f63a81425ff5_r, any reauthentication in 2 hours
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io[7]: IKE proposal: AES_GCM_16_128/PRF_HMAC_SHA2_256/MODP_3072
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io{8}: INSTALLED, TUNNEL, reqid 65541, ESP in UDP SPIs: ffff1160_i ffff1e70_o
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io{8}: AES_GCM_16_128, 0 bytes_i, 0 bytes_o, rekeying disabled
ver.dc12-ash.ves-io.<uuid>.tenant.int.ves.io{8}: 10.0.1.4/32 === <public-ip>/32

使用此命令可区分”隧道已建立”与”隧道正在承载流量”这两种状态。一条已建立数小时但字节数接近零的隧道处于已建立但未使用的状态,这通常意味着问题出在路由层面,而非隧道本身。