例:仮想ルーターで st0 インターフェイスを構成する
この例は、仮想ルーターで st0 インターフェイスを設定する方法を示しています。
要件
開始する前に、インターフェイスを構成し、インターフェイスをセキュリティゾーンに割り当てます。「Security Zones Overview」を参照してください。
概要
この例では、以下の操作を実行します。
インターフェイスを構成します。
IKE フェーズ1の提案を構成します。
IKE ポリシーを設定し、提案を参照します。
IKE ゲートウェイを構成し、ポリシーを参照します。
フェーズ2の提案を構成します。
ポリシーを設定し、提案を参照します。
AutoKey IKE を構成し、ポリシーとゲートウェイを参照します。
セキュリティーポリシーを設定します。
ルーティングインスタンスを構成します。
VPN バインドをトンネルインターフェイスに設定します。
ルーティングオプションを構成します。
構成
CLI 簡単構成
この例を簡単に構成するには、以下のコマンドをコピーしてテキストファイルに貼り付け、改行を削除し、ネットワーク設定に一致する必要がある詳細を変更し、コマンドを[edit]階層レベルで CLI にコピー & ペーストしてから設定commitモードから開始します。
ステップごとの手順
次の例では、構成階層のさまざまなレベルを移動する必要があります。その方法の詳細については、 CLI ユーザーガイド『』の「Using the CLI Editor in Configuration Mode」を参照してください。
VR で st0 を設定するには、次のようにします。
- インターフェイスを構成します。[edit]user@host# set interfaces ge-0/0/0 unit 0 family inet address 10.1.1.2/30user@host# set interfaces ge-0/0/1 unit 0 family inet address 10.2.2.2/30user@host# set interfaces st0 unit 0 family inet address 10.3.3.2/30
- IPsec トンネルのフェーズ1を構成します。[edit security ike]user@host# set proposal first_ikeprop authentication-method pre-shared-keysuser@host# set proposal first_ikeprop dh-group group2user@host# set proposal first_ikeprop authentication-algorithm md5user@host# set proposal first_ikeprop encryption-algorithm 3des-cbc
- IKE ポリシーを設定し、提案を参照します。[edit security ike]user@host# set policy first_ikepol mode mainuser@host# set policy first_ikepol proposals first_ikepropuser@host# set policy first_ikepol pre-shared-key ascii-text "$ABC123"
- IKE ゲートウェイを構成し、ポリシーを参照します。[edit security ike]user@host# set gateway first ike-policy first_ikepoluser@host# set gateway first address 10.4.4.2user@host# set gateway first external-interface ge-0/0/0.0
- IPsec トンネルのフェーズ2を構成します。[edit security ipsec]user@host# set proposal first_ipsecprop protocol espuser@host# set proposal first_ipsecprop authentication-algorithm hmac-md5-96user@host# set proposal first_ipsecprop encryption-algorithm 3des-cbc
- ポリシーを設定し、提案を参照します。[edit security ipsec]user@host# set policy first_ipsecpol perfect-forward-secrecy keys group1user@host# set policy first_ipsecpol proposals first_ipsecprop
- AutoKey IKE を構成し、ポリシーとゲートウェイを参照します。[edit security ipsec]user@host# set vpn first_vpn ike gateway firstuser@host# set vpn first_vpn ike ipsec-policy first_ipsecpoluser@host# set vpn first_vpn establish-tunnels immediately
- VPN バインドをトンネルインターフェイスに設定します。[edit security ipsec]user@host# set vpn first_vpn bind-interface st0.0
- セキュリティーポリシーを設定します。[edit security policies]user@host# set default-policy permit-all
- ルーティングインスタンスで st0 を構成します。[edit routing-instances]user@host# set VR1 instance-type virtual-routeruser@host# set VR1 interface ge-0/0/1.0user@host# set VR1 interface st0.0
- ルーティングオプションを構成します。[edit routing-instances VR1 routing-options]user@host# set static route 10.6.6.0/24 next-hop st0.0
結果
設定モードから、 show securityshow routing-instancesコマンドを入力して設定を確認します。出力に意図した構成が表示されない場合は、この例の設定手順を繰り返して修正してください。
デバイスの設定が完了したら、 commit設定モードから開始します。
検証
構成が正常に機能していることを確認するには、以下のタスクを実行します。
仮想ルーターの st0 インターフェイスの検証
目的
仮想ルーターの st0 インターフェイスを確認します。
アクション
動作モードから、 show interfaces st0.0 detail コマンドを入力します。ルーティングテーブルに表示される番号は、 show route allコマンド内のルーティングテーブルの順序に対応します。