0
0

More than 1 year has passed since last update.

[Oracle Cloud] IPSec VPN トンネル停止の通知アラームの設定をしてみてみた

Posted at

Oracle Cloud Infrastructure(OCI)の IPSec VPN トンネルの状態は、Tunnel Stateメトリックで稼働中(1)か停止中(0) の数値で確認することができます。
アラームイメージ.jpg
ということで、IPSec の Tunnel がダウンした時に、メールでアラーム通知されることを確認します。

■ 構成

以前に構成した Cisco 841M ルーターで OCI と IPSec VPN接続した構成へ、IPSec VPN トンネルへアラーム設定をします。

■ アラーム設定

1) サイト間VPN画面

対象のIPSec VPN接続を選択し、設定トンネルをクリック
01_IPSec-アラーム作成01.png

2) VPN Tunnel画面

メトリックの IPSecトンネルの状態にある [オプション] から [この問い合わせにアラームを作成]をクリック
01_IPSec-アラーム作成02.jpg

3) アラームの作成画面

以下項目を入力し、[アラームの保存]をクリック
以下項目以外はデフォルトを使用、必要に応じて変更して入力

フィールド 項目
アラーム名 アラームの名前。この名前は、このアラームに関連する通知のタイトルとして送信されます
アラームの重大度 アラームが起動状態にあるときに必要となるレスポンスの認識
メトリック・ネームスペース oci_vpnを選択
メトリック名 TunnelStateを選択
時間隔 集計頻度の単位「分」または「時間」を選択
統計 集計関数 mean(指定した期間中のCountで、Sumの値を割った値)を選択
トリガー・ルール演算子と値 条件しきい値で使用する演算子、停止中の数値である 0と等しい もしくは 1より小さい条件を選択
トリガー遅延分数 アラームが起動状態になるまでに条件が維持される分数
宛先 通知(トピックにアラーム通知を送信)を選択
トピック 事前に作成したトピックを選択
通知の繰り返し アラームが起動状態になっている間、通知は指定した間隔で再送信されます。
通知の抑制 評価および通知を一時停止する抑制時間ウィンドウを設定

01_IPSec-アラーム作成03.jpg

4) アラーム定義画面

アラーム作成完了です。
01_IPSec-アラーム作成05.jpg

■ Tunnelダウン 検証

● CPE IPSec Tunnel 停止

1) IPSec SA確立確認

Router# show crypto session
Crypto session current status

Interface: Tunnel1
Profile: oracle-vpn-140.204.100.101
Session status: UP-ACTIVE
Peer: 140.204.100.101 port 500
  Session ID: 1125
  IKEv2 SA: local 100.100.100.101/500 remote 140.204.100.101/500 Active
  IPSEC FLOW: permit ip 0.0.0.0/0.0.0.0 0.0.0.0/0.0.0.0
        Active SAs: 2, origin: crypto map

2) tunnel シャットダウン

Router#configure terminal
Router(config)#interface Tunnel1
Router(config-if)#shutdown
Router(config-if)#
*Jan 30 08:29:05.579: %BGP-5-NBR_RESET: Neighbor 192.168.254.114 reset (Interface flap)
*Jan 30 08:29:05.579: %BGP-5-ADJCHANGE: neighbor 192.168.254.114 Down Interface flap
*Jan 30 08:29:05.579: %BGP_SESSION-5-ADJCHANGE: neighbor 192.168.254.114 IPv4 Unicast topology base removed from session  Interface flap
*Jan 30 08:29:07.579: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to down
*Jan 30 08:29:07.579: %LINK-5-CHANGED: Interface Tunnel1, changed state to administratively down

3) Tunnel シャットダウン設定確認

Router(config-if)# do show running-config | section interface Tunnel1
interface Tunnel1
 ip address 192.168.254.113 255.255.255.252
 ip virtual-reassembly in
 ip tcp adjust-mss 1350
 shutdown
 tunnel source 100.100.100.101
 tunnel mode ipsec ipv4
 tunnel destination 140.204.100.101
 tunnel protection ipsec profile oracle_ipsec_profile_Tunnel1

4) IPSec SA確立していないこと確認

対象のトンネル Tunnel1 の statusが DOWNであることを確認

Router#show crypto session
Crypto session current status

Interface: Tunnel2
Profile: oracle-vpn-140.204.100.102
Session status: UP-ACTIVE
Peer: 140.204.100.102 port 500
  Session ID: 1138
  IKEv2 SA: local 100.100.100.101/500 remote 140.204.100.102/500 Active
  IPSEC FLOW: permit ip 0.0.0.0/0.0.0.0 0.0.0.0/0.0.0.0
        Active SAs: 2, origin: crypto map

Interface: Tunnel1
Session status: DOWN
Peer: 140.204.100.101 port 500
  IPSEC FLOW: permit ip 0.0.0.0/0.0.0.0 0.0.0.0/0.0.0.0
        Active SAs: 0, origin: crypto map

● OCI IPSec画面確認

1) サイト間VPN画面

ダウンさせた Tunnnel01 の IPSec と IPv4 BGPステータスが 「停止」になっていることを確認
11_Tunnel稼働確認01.jpg

2) Tunnnel画面

ダウンさせたトンネルをクリックし、Metric が停止ステータス(0) になっていることを確認
11_Tunnel稼働確認02.jpg

● OCI アラーム発生確認

1) OCI コンソール

[監視及び管理] → モニタリング項目にある[アラームのステータス]をクリック
02_アラーム発生01.jpg

2) アラームが起動しました画面

作成したアラームをクリック
02_アラーム発生02.jpg

3)アラーム定義画面(グラフ)

アラームの履歴から、値が1から0になりグラフが赤くなっていることを確認
02_アラーム発生03.jpg

4)アラーム定義画面(データ表)

アラームの履歴の[データ表を表示]をクリックし、Time Stanpで日時を確認
02_アラーム発生04.jpg

● アラームメール確認

設定したメールアドレスに、アラーム作成時に設定したアラーム名の題名(Subject)でメール受信を確認
03_アラームメール確認.jpg

■ Tunnel回復

● CPE IPSec Tunnel1 起動

1) Tunnel 起動

Router(config)#interface Tunnel1
Router(config-if)#no shutdown
Router(config-if)#
*Jan 30 14:04:39.514: %LINK-3-UPDOWN: Interface Tunnel1, changed state to up
*Jan 30 14:04:49.586: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to up
*Jan 30 14:04:55.118: %BGP-5-ADJCHANGE: neighbor 192.168.254.114 Up

2) 設定確認

shutdown 設定がないことを確認

Router# do show running-config | section interface Tunnel1
interface Tunnel1
 ip address 192.168.254.113 255.255.255.252
 ip virtual-reassembly in
 ip tcp adjust-mss 1350
 tunnel source 100.100.100.101
 tunnel mode ipsec ipv4
 tunnel destination 140.204.100.101
 tunnel protection ipsec profile oracle_ipsec_profile_Tunnel1

3) IPSec SA確立確認

Down した Tunnel1 の Status が UP-ACTIVE になっていることを確認

Router# show crypto session
Crypto session current status

Interface: Tunnel2
Profile: oracle-vpn-140.204.100.102
Session status: UP-ACTIVE
Peer: 140.204.100.102 port 500
  Session ID: 1439
  IKEv2 SA: local 100.100.100.101/500 remote 140.204.100.102/500 Active
  IPSEC FLOW: permit ip 0.0.0.0/0.0.0.0 0.0.0.0/0.0.0.0
        Active SAs: 2, origin: crypto map

Interface: Tunnel1
Profile: oracle-vpn-140.204.100.101
Session status: UP-ACTIVE
Peer: 140.204.100.101 port 500
  Session ID: 1433
  IKEv2 SA: local 100.100.100.101/500 remote 140.204.100.101/500 Active
  Session ID: 1431
  IKEv2 SA: local 100.100.100.101/500 remote 140.204.100.101/500 Active
  IPSEC FLOW: permit ip 0.0.0.0/0.0.0.0 0.0.0.0/0.0.0.0
        Active SAs: 2, origin: crypto map

● OCI IPSec画面確認

1) サイト間VPN画面

起動させた Tunnnel01 の IPSec と IPv4 BGPステータスが 「稼働中」になっていることを確認

11_Tunnel稼働確認01.jpg

2) Tunnnel画面

ダウンさせたトンネルをクリックし、Metric が起動ステータス(1) になっていることを確認

11_Tunnel稼働確認02.jpg

● OCI アラーム停止確認

3)アラーム定義画面(グラフ)

アラームの履歴から、値が0から1になり、グラフが青くなっていることを確認
12_アラーム停止確認01.jpg

■ 参考

・OCI Documents
 - サイト間VPNのメトリック
 - アラームの管理
 - アラームの作成

・Cisco Documents
 - IP Security VPN Monitoring

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0