15.45.6 トンネルテンプレートの設定

[書式]


[設定値及び初期値]


[説明]

tunnel selectコマンドにて選択されたトンネルインターフェースを展開元として、当該インターフェースに設定されているコマンドの展開先となるトンネルインターフェースを設定する。

展開元のトンネルインターフェースに設定することで、展開先のトンネルインターフェースにも適用されるコマンドは以下のとおりである。なお、末尾に(*)が付加されているコマンドについては[ノート]を参照のこと。


上記コマンドのうち以下のコマンドについては、特定のパラメータの値が展開元のトンネルインターフェース番号に一致する場合のみ、コマンドが展開される。その場合、当該パラメータの値は展開先のトンネルインターフェース番号に置換される。

コマンド パラメータ
ipsec tunnel ポリシーID
ipsec sa policy ポリシーID
ipsec ikeで始まるコマンド セキュリティー・ゲートウェイの識別子
ipsec auto refresh セキュリティー・ゲートウェイの識別子
tunnel enable トンネルインターフェース番号

ipsec sa policyコマンドでは、セキュリティー・ゲートウェイの識別子が展開先のトンネルインターフェース番号に置換される。

ipsec ike remote nameコマンドでは、相手側セキュリティー・ゲートウェイの名前の末尾に展開先のトンネルインターフェース番号が付加される。

展開元のトンネルインターフェースに設定されているコマンドと同じコマンドが、展開先のトンネルインターフェースに既に設定されている場合、展開先のトンネルインターフェースに設定されているコマンドが優先される。

コマンド展開後の、ルーターの動作時に参照される設定はshow config tunnelコマンドにexpandキーワードを指定することで確認できる。

[ノート]

トンネルインターフェースが選択されている時にのみ使用できる。

展開対象となるコマンドのうち、末尾に(*)が付加されているコマンドについては、Rev.11.03.08 以降で使用可能。

[設定例]

展開先のトンネルインターフェースとして、番号の指定と範囲の指定を同時に記述することができる。

tunnel select 1
 tunnel template 8 10-20
tunnel select 2
 tunnel template 100 200-300 400

以下の2つの設定は同じ内容を示している。

tunnel select 1
 tunnel template 2
  ipsec tunnel 1
  ipsec sa policy 1 1 esp aes-cbc sha-hmac
  ipsec ike encryption 1 aes-cbc
  ipsec ike group 1 modp1024
  ipsec ike local address 1 192.168.0.1
  ipsec ike pre-shared-key 1 text himitsu1
  ipsec ike remote address 1 any
  ipsec ike remote name 1 pc
 tunnel enable 1
tunnel select 2
  ipsec ike pre-shared-key 2 text himitsu2
tunnel select 1
 ipsec tunnel 1
  ipsec sa policy 1 1 esp aes-cbc sha-hmac
  ipsec ike encryption 1 aes-cbc
  ipsec ike group 1 modp1024
  ipsec ike local address 1 192.168.0.1
  ipsec ike pre-shared-key 1 text himitsu1
  ipsec ike remote address 1 any
  ipsec ike remote name 1 pc
 tunnel enable 1
tunnel select 2
 ipsec tunnel 2
  ipsec sa policy 2 2 esp aes-cbc sha-hmac
  ipsec ike encryption 2 aes-cbc
  ipsec ike group 2 modp1024
  ipsec ike local address 2 192.168.0.1
  ipsec ike pre-shared-key 2 text himitsu2
  ipsec ike remote address 2 any
  ipsec ike remote name 2 pc2
 tunnel enable 2