※この記事は以下の記事の日本語訳です。
CLI Commands to Status, Clear, Restore, and Monitor an IPSEC VPN Tunnel
このドキュメントのCLIコマンドを使用することによりIPSEC tunnelのステータスの確認、Tunnelのモニタリング、Tunnelの切断と再接続ができます。
詳細
VPN Tunnelのモニタリングと接続状況の確認:
show vpn flow
Note: monitor status がdownの場合は 宛先IP Addressへの接続ができていないことを示します。
例:
> show vpn flow
total tunnels configured: 1
filter - type IPSec, state any
total IPSec tunnel configured: 1
total IPSec tunnel shown: 1
id name state monitor local-ip peer-ip tunnel-i/f
--------------------------------------------------
4 tunnel active up 172.17.128.135 172.17.128.1
VPN Tunnel内でデータ通信が行われてる事の確認:
show vpn flow tunnel-id x << VPN TunnelのID番号(上の例だと4)
例:
データ通信が行われていればpacketsとbytesのカウンターは上がります。
> show vpn flow tunnel-id 2
encap packets: 500
decap packets: 500
encap bytes: 54312
decap bytes: 54312
key acquire requests: 35
接続しているIKE phase 1 SAの詳細の表示:
show vpn ike-sa gateway <gateway name>
例:
> show vpn ike-sa gateway GW-to-Lab1
phase-1 SAs
GwID Peer-Address Gateway Name Role Mode Algorithm
---- ------------- --------------- ---------------------------
1 57.1.1.1 gw-to-Lab1 Init Main PSK/DH2/A128/SHA1
Show IKEv1 IKE SA: Total 1 gateways found.
接続しているIKE phase 2 SAの詳細の表示:
show vpn ipsec-sa tunnel <tunnel name>
Example:
> show vpn ipsec-sa tunnel IPVPN-tunnel1.1-to-LAB1
GwID TnID Peer-Address Tunnel(Gateway) Algorithm
---- ----- ------------ ----------------------- ------------
1 2 57.1.1.1 IPVPN-tunnel1.1-to-LAB1 ESP/A128/SHA1
Show IPSec SA: Total 1 tunnels found.
これらのコマンドはVPN Tunnelを切断する時に使用します:
> clear vpn ike-sa gateway GW-to-Lab1
Delete IKEv1 IKE SA: Total 1 gateways found.
> clear vpn ipsec-sa tunnel IPVPN-tunnel1.1-to-LAB1
Delete IKEv1 IPSec SA: Total 1 tunnels found.
これらのコマンドはVPN Tunnelを再接続する時に使用します:
> test vpn ike-sa gateway GW-to-Lab1
Initiate IKE SA: Total 1 gateways found. 1 ike sa found.
> test vpn ipsec-sa tunnel IPVPN-tunnel1.1-to-LAB1
Initiate IPSec SA: Total 1 tunnels found. 1 ipsec sa found.
注意: GW-to-Lab1 と IPVPN-tunnel1.1-to-LAB1 はgateway と tunnel 名前の例です。
Phase 1
Phase 2