Cisco IOS

このトピックでは、Cisco IOSデバイスのルートベースの構成について説明します。この構成は、IOSバージョン15.4(3)M3を実行しているCisco 2921を使用して検証されました。

重要

Oracleには、テスト済の一連のベンダーおよびデバイスの構成手順が用意されています。ベンダーおよびソフトウェアのバージョンに正しい構成を使用してください。

構成の検証にOracleで使用されたデバイスまたはソフトウェアのバージョンが、使用しているデバイスまたはソフトウェアと完全に一致しない場合でも、必要な構成をデバイスに作成できます。ベンダーのドキュメントを参照し、必要な調整を行ってください。

デバイスが、検証済のベンダーおよびデバイスのリストに含まれないベンダーのものである場合、またはIPSecのデバイスの構成をよく理解している場合は、サポートされているIPSecパラメータのリストを確認し、ベンダーのドキュメントを参照してください。

Oracle Cloud Infrastructureは、オンプレミス・ネットワークと仮想クラウド・ネットワーク(VCN)間のセキュアなIPSec接続であるサイト間VPNを提供します。

次の図は、冗長トンネルを使用した、Oracle Cloud Infrastructureへの基本的なIPSec接続を示しています。この図で使用されているIPアドレスは、単なる例です。

この図は、オンプレミス・ネットワーク、サイト間VPN IPSecトンネルおよびVCNの一般的なレイアウトを示しています。

ベスト・プラクティス

この項では、サイト間VPNの使用に関する一般的なベスト・プラクティスと考慮事項について説明します。

すべてのIPSec接続に対してすべてのトンネルを構成します

Oracleは、接続ごとに2つのIPSecヘッドエンドをデプロイし、ミッションクリティカルなワークロードに高可用性を提供します。Oracle側では、これらの2つのヘッドエンドが別々のルーターに配置されて冗長性が確保されます。最大の冗長性のために使用可能なすべてのトンネルを構成することをお薦めします。これは「障害を前提とした設計」原理の重要な要素です。

オンプレミス・ネットワークの場所に冗長CPEを配置します

IPSecでOracle Cloud Infrastructureに接続する各サイトでは、冗長エッジ・デバイス(顧客構内機器(CPE)とも呼ばれる)を使用する必要があります。Oracle Consoleに各CPEを追加し、動的ルーティング・ゲートウェイ(DRG)と各CPE間に個別のIPSec接続を作成します。各IPSec接続に対して、Oracleは、地理的に冗長なIPSecヘッドエンド上に2つのトンネルをプロビジョニングします。詳細は、接続性冗長性ガイド(PDF)を参照してください。

ルーティング・プロトコルの考慮事項

サイト間VPN IPSec接続を作成する場合、2つの冗長IPSecトンネルがあります。両方のトンネルを使用するようにCPEを構成することをお薦めします(CPEでサポートされている場合)。以前は、Oracleによって、最大4つのIPSecトンネルを持つIPSec接続が作成されていました。

次の3つのルーティング・タイプを使用でき、サイト間VPNの各トンネルに対して個別にルーティング・タイプを選択します:

  • BGP動的ルーティング: 使用可能なルートは、BGPによって動的に学習されます。DRGは、オンプレミス・ネットワークからルートを動的に学習します。Oracle側では、DRGはVCNのサブネットを通知します。
  • 静的ルーティング: DRGへのIPSec接続を設定する場合は、VCNに通知する必要のあるオンプレミス・ネットワークへの特定のルートを指定します。VCNのサブネットへの静的ルートを使用して、CPEデバイスを構成する必要もあります。これらのルートは、動的には学習されません。
  • ポリシーベースのルーティング: DRGへのIPSec接続を設定する場合は、VCNに通知する必要のあるオンプレミス・ネットワークへの特定のルートを指定します。VCNのサブネットへの静的ルートを使用して、CPEデバイスを構成する必要もあります。これらのルートは、動的には学習されません。

BGP最適パス選択アルゴリズムの操作方法に関するOracle推奨など、サイト間VPNによるルーティングの詳細は、サイト間VPNのルーティングを参照してください。

その他の重要なCPE構成

CPEのアクセス・リストが、Oracle Cloud Infrastructureとの間で必要なトラフィックをブロックしないように正しく構成されていることを確認します。

複数のトンネルを同時に稼働させると、非対称ルーティングが発生する可能性があります。非対称ルーティングを許可するには、VCNからのトラフィックをどのトンネルでも処理できるようにCPEが構成されていることを確認します。たとえば、ICMP検査を無効にしたり、TCP状態バイパスを構成したりする必要があります。適切な構成の詳細は、CPEベンダーのサポートに問い合せてください。ルーティングを対称的に構成するには、サイト間VPNのルーティングを参照してください。

注意事項および制限事項

この項では、注意する必要のあるサイト間VPNの重要な一般的特性と制限について説明します。適用可能な制限のリストと制限の引上げをリクエストする手順は、サービス制限を参照してください。

非対称ルーティング

Oracleでは、IPSec接続を構成する複数のトンネル間で非対称ルーティングが使用されます。適切にファイアウォールを構成してください。そうしないと、接続を介したpingテストやアプリケーション・トラフィックが確実に機能しません。

複数のトンネルをOracle Cloud Infrastructureに使用する場合は、優先トンネルを通じてトラフィックを決定論的にルーティングするようにルーティングを構成することをお薦めします。1つのIPSecトンネルをプライマリとして使用し、別のトンネルをバックアップとして使用する場合は、プライマリ・トンネル(BGP)用として特定性の高いルートを構成し、バックアップ・トンネル(BGP/静的)用として特定性の低いルート(サマリーまたはデフォルト・ルート)を構成します。そうしないと、すべてのトンネルを通じて同じルート(デフォルト・ルートなど)を通知した場合、VCNからオンプレミス・ネットワークへの戻りトラフィックは、使用可能なトンネルのいずれかにルーティングされます。これは、Oracleが非対称ルーティングを使用するためです。

Oracleルーティングの対称ルーティングの強制方法に関する具体的な推奨事項は、サイト間VPNのルーティングを参照してください。

ルートベースまたはポリシーベースのサイト間VPN

IPSecプロトコルは、セキュリティ・アソシエーション(SA)を使用してパケットの暗号化方法を判断します。各SA内で、パケットのソースIPアドレスと宛先IPアドレスおよびプロトコル・タイプをSAデータベースのエントリにマップする暗号化ドメインを定義して、パケットを暗号化または復号化する方法を定義します。

ノート

他のベンダーまたは業界のドキュメントでは、SAまたは暗号化ドメインを参照するときに、プロキシID、セキュリティ・パラメータ・インデックス(SPI)またはトラフィック・セレクタという用語が使用される場合があります。

IPSecトンネルを実装するには、一般的に2つの方法があります:

  • ルートベース・トンネル: ネクスト・ホップベース・トンネルとも呼ばれます。ルート表検索は、パケットの宛先IPアドレス上で実行されます。そのルートのエグレス・インタフェースがIPSecトンネルである場合、パケットは暗号化され、トンネルの他方の側に送信されます。
  • ポリシーベース・トンネル: パケットのソースと宛先のIPアドレスおよびプロトコルがポリシー・ステートメントのリストと照合されます。一致が検出されると、そのポリシー・ステートメント内のルールに基づいてパケットが暗号化されます。

Oracleサイト間VPNヘッドエンドではルートベース・トンネルが使用されますが、次の各項に示す注意事項を考慮しながら、ポリシーベース・トンネルとともに使用できます。

ルートベース・トンネル用の暗号化ドメイン

CPEでルートベース・トンネルがサポートされている場合は、この方法を使用してトンネルを構成します。これは最も単純な構成で、Oracle VPNヘッドエンドとの相互運用性が最も高くなっています。

ルートベースのIPSecでは、次の値を持つ暗号化ドメインが使用されます:

  • ソースIPアドレス: 任意(0.0.0.0/0)
  • 宛先IPアドレス: 任意(0.0.0.0/0)
  • プロトコル: IPv4

より特定的にする必要がある場合は、デフォルト・ルートではなく、暗号化ドメイン値に単一のサマリー・ルートを使用できます。

ポリシーベース・トンネル用の暗号化ドメイン

ポリシーベースのトンネルを使用する場合、定義するすべてのポリシー・エントリ(IPSec接続の片側にあるCIDRブロック)によって、トンネルのもう一方の端にあるすべての適格なエントリでIPSecセキュリティ・アソシエーション(SA)が生成されます。このペアは暗号化ドメインと呼ばれます。

この図では、IPSecトンネルのOracle DRG側に、3つのIPv4 CIDRブロックと1つのIPv6 CIDRブロックのポリシー・エントリがあります。トンネルのオンプレミスCPE側には、2つのIPv4 CIDRブロックと2つのIPv6 CIDRブロックのポリシー・エントリがあります。各エントリによって、トンネルのもう一方の端にあるすべての使用可能なエントリで暗号化ドメインが生成されます。SAペアの両側では、同じバージョンのIPを使用する必要があります。その結果、合計8つの暗号化ドメインが生成されます。

複数の暗号化ドメインおよびその番号を決定する方法を示す図。
重要

CPEでポリシーベース・トンネルのみがサポートされている場合は、次の制限に注意してください。

  • サイト間VPNは、複数の暗号化ドメインをサポートしていますが、暗号化ドメインの上限は50です。
  • 前述の例に似た状況で、CPE側で使用可能な6つのIPv4暗号化ドメインのうち3つのみを構成した場合、使用可能なすべての暗号化ドメインが常にDRG側に作成されるため、リンクは「一部稼働中」状態でリストされます。
  • ポリシーベースのルーティングは、サイト間VPN v2によって決まります。サイト間VPN v2の詳細は、更新されたサイト間VPNサービスを参照してください。
  • トンネルが作成された時期によっては、ポリシーベースのルーティングを使用するために既存のトンネルを編集できず、トンネルを新しいIPSecトンネルに置き換える必要がある場合があります。
  • トンネルのOracle DRG側で使用されるCIDRブロックは、トンネルのオンプレミスCPE側で使用されるCIDRブロックと重複できません。
  • 暗号化ドメインは常に、同じIPバージョンの2つのCIDRブロック間に存在する必要があります。

CPEがNATデバイスの背後にある場合

一般的に、接続の終端で構成されたCPE IKE識別子は、Oracleが使用しているCPE IKE識別子と一致する必要があります。デフォルトでは、OracleではCPEのパブリックIPアドレスが使用されます。これは、Oracle ConsoleでCPEオブジェクトを作成したときに指定したものです。ただし、CPEがNATデバイスの背後にある場合、次の図に示すように、終端で構成されたCPE IKE識別子がCPEのプライベートIPアドレスになる可能性があります。

この図は、NATデバイスの背後にあるCPE、パブリックIPアドレスとプライベートIPアドレス、およびCPE IKE識別子を示しています。
ノート

一部のCPEプラットフォームでは、ローカルIKE識別子を変更できません。実行できない場合は、Oracle ConsoleでリモートIKE IDを変更し、CPEのローカルIKE IDと一致させる必要があります。IPSec接続を設定するときに、または設定後に、IPSec接続を編集して値を指定できます。Oracleでは、値がIPアドレスまたはcpe.example.comなどの完全修飾ドメイン名(FQDN)であることが必要です。手順については、Oracleで使用されるCPE IKE識別子の変更を参照してください。

サポートされているIPSecパラメータ

すべてのリージョンでサポートされているIPSecパラメータのベンダー非依存のリストについては、サポートされているIPSecパラメータを参照してください。

商用クラウド・レルムのOracle BGP ASNは31898です。US Government Cloud用のサイト間VPNを構成する場合は、Government Cloudに必要なサイト間VPNパラメータおよびOracleのBGP ASNを参照してください。United Kingdom Government Cloudについては、OracleのBGP ASNを参照してください。

CPE構成

重要

この項の構成手順は、使用しているCPE用のOracle Cloud Infrastructureで提供されています。サポートが必要な場合は、CPEベンダーのサポートに直接問い合せてください。

次の図は、IPSec接続の基本的なレイアウトを示しています。

この図は、IPSec接続とトンネルの一般的なレイアウトを示しています。

この構成テンプレートは、IOSバージョン15.4(3)M3を実行しているCisco 2921を使用して検証されました。テンプレートは、構成する必要がある各トンネルに情報を提供します。最大の冗長性のために、構成されたすべてのトンネルを設定することをお薦めします。

構成テンプレートでは、次の項目を指定する必要があります:

  • CPEパブリックIPアドレス: CPE上の外部インタフェースに割り当てられたインターネット・ルーティング可能なIPアドレス。ユーザーまたはOracle管理者は、Oracle ConsoleでCPEオブジェクトを作成するときに、この値をOracleに提供します。
  • 内部トンネル・インタフェース(BGPを使用する場合に必要): 内部トンネル・インタフェースのCPE終端とOracle終端のIPアドレス。これらの値は、Oracle ConsoleでIPSec接続を作成するときに指定します。
  • BGP ASN (BGPを使用する場合は必須): BGP ASN。

さらに、次が必要です:

  • CPEとローカル・ネットワーク間のトラフィックをルーティングする内部ルーティングを構成します。
  • 必ずCPEとOracle VCN間のトラフィックを許可します。
  • 使用されるIPSecプロファイルを識別します(次の構成テンプレートは、このグループ・ポリシーをoracle-vpnとして参照します)。
  • 暗号化マップに使用される変換セットを識別します(次の構成テンプレートは、この変換セットをoracle-vpn-transformとして参照します)。
重要

Oracle Cloud Infrastructureの次の構成テンプレートは、CPEに適用する必要がある操作の開始点となります。テンプレートで参照されているパラメータの一部は、CPE上で一意である必要があります。また、一意性はCPEにアクセスすることでのみ判別可能です。CPE上のパラメータが有効であり、以前に構成した値が上書きされないことを確認してください。特に、次の値が一意であることを確認してください:

  • ポリシー名または番号
  • インタフェース名
  • キーリング

  • アクセス・リスト番号(該当する場合)

Oracleは、Internet Key Exchangeバージョン1 (IKEv1)およびバージョン2 (IKEv2)をサポートしています。コンソールでIKEv2を使用するようにIPSec接続を構成する場合、CPEでサポートされているIKEv2および関連するIKEv2暗号化パラメータのみを使用するようにCPEを構成する必要があります。OracleでIKEv1またはIKEv2用にサポートされているパラメータのリストについては、サポートされているIPSecパラメータを参照してください。

IKEv1とIKEv2には別個の構成テンプレートがあります。

IKEv1構成テンプレート

IKEv1構成テンプレートを読みやすいように全画面表示します。

!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! IKEv1 Configuration Template
! The configuration consists of two IPSec tunnels. Oracle highly recommends that you configure both tunnels for maximum redundancy.
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! The configuration template involves setting up the following:
! Keyring (Pre-Shared Key)
! Basic ISAKMP Options
! ISAKMP and IPSec Policy Configuration
! IPSec Peers
! Virtual Tunnel Interfaces
! IP Routing (BGP or Static)
! Update Any Internet Facing Access List to Allow IPSec and ISAKMP Packets
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! The configuration template has various parameters that you must define before applying the configuration.
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! PARAMETERS REFERENCED:
! ${OracleInsideTunnelIpAddress1} = Inside tunnel IP address of Oracle-side for the first tunnel. You provide these values when creating the IPSec connection in the Oracle Console.
! ${OracleInsideTunnelIpAddress2} = Inside tunnel IP address of Oracle-side for the second tunnel. You provide these values when creating the IPSec connection in the Oracle Console.
! ${bgpASN} = Your BGP ASN
! ${cpePublicIpAddress} = The public IP address for the CPE. This is the IP address of your outside interface
! ${oracleHeadend1} = Oracle public IP endpoint obtained from the Oracle Console.
! ${oracleHeadend2} = Oracle public IP endpoint obtained from the Oracle Console.
! ${sharedSecret1} = You provide when you set up the IPSec connection in the Oracle Console, or you can use the default Oracle-provided value.
! ${sharedSecret2} = You provide when you set up the IPSec connection in the Oracle Console, or you can use the default Oracle-provided value.
! ${outsideInterface} = The public interface or outside of tunnel interface which is configured with the CPE public IP address.
! ${vcnCidrNetwork} = VCN IP range
! ${vcnCidrNetmask} = Subnet mask for VCN
! ${onPremCidrNetwork} = On-premises IP range
! ${onPremCidrNetmask} = ON-premises subnet mask
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
 
! Keyring (Pre-Shared Key)
 
! For authentication during IKE a separate keyring is defined for each Oracle VPN Headend peer.
! Add the pre-shared key for each Oracle VPN headend under the corresponding keyring.
 
crypto keyring oracle-vpn-${oracleHeadend1} 
  local-address ${cpePublicIpAddress}
  pre-shared-key address ${oracleHeadend1} key ${sharedSecret1}
crypto keyring oracle-vpn-${oracleHeadend2} 
  local-address ${cpePublicIpAddress}
  pre-shared-key address ${oracleHeadend2} key ${sharedSecret2}
 
! Basic ISAKMP Options
 
! Optional IPSec settings are included here.
! All optional settings included are recommended by Oracle. Remove or comment out any unneeded commands prior to applying this configuration.
! WARNING: These settings are global and may impact other IPSec connections
 
! Enables fragmentation of IKE packets prior to encryption.
crypto isakmp fragmentation
 
! Enables Dead Peer Detection (DPD)
crypto isakmp keepalive 10 10
 
! The Router will clear the DF-bit in the IP header. Allows the packet to be fragmented and sen to the end host in Oracle Cloud Infrastructure for reassembly.
crypto ipsec df-bit clear
 
! Increases security association anti-replay window. An increased window size is helpful for scenarios where packets are regularly being dropped due to delays.
crypto ipsec security-association replay window-size 128
 
! ISAKMP and IPSec Policy Configuration
 
! An ISAKMP policy is created for Phase 1 which specifies to use a Pre-Shared Key, AES256, SHA384, Diffie-Hellman Group 5, and a Phase 1 lifetime of 28800 seconds (8 hours).
! If different parameters are required, modify this template before applying the configuration.
! WARNING: The ISAKMP group policy is created with a priority of 10. Make sure this doesn't conflict with any pre-existing configuration before applying.
 
crypto isakmp policy 10
 encr aes 256
 hash sha384
 authentication pre-share
 group 5
 lifetime 28800
 
! Create an IPSec transform set named 'oracle-vpn-transform' which defines a combination of IPSec (Phase 2) policy options. Specifically, AES256 for encryption and SHA1 for authentication. This is also where tunnel mode is set for IPSec.
! If different parameters are required, modify this template before applying the configuration.
 
crypto ipsec transform-set oracle-vpn-transform esp-aes 256 esp-sha-hmac
 mode tunnel
 
! A IPSec profile named 'oracle-vpn' is created.
! The previously created transform set is added to this policy along with settings for enabling PFS Group 5 and the security association lifetime to 3600 seconds (1 hour).
! If different parameters are required, modify this template before applying the configuration.
 
crypto ipsec profile oracle-vpn
 set pfs group5
 set security-association lifetime seconds 3600
 set transform-set oracle-vpn-transform
 
! IPSec Peers
 
! Two ISAKMP profiles are created for each Oracle VPN Headend.
! An ISAKMP profile is used as a repository for various Phase 1 commands tied to a specific IPSec peer. In this case, we match the previously created keyrings to an Oracle VPN headend.
 
crypto isakmp profile oracle-vpn-${oracleHeadend1}
   keyring oracle-vpn-${oracleHeadend1}
   self-identity address
   match identity address ${oracleHeadend1} 255.255.255.255
crypto isakmp profile oracle-vpn-${oracleHeadend2}
   keyring oracle-vpn-${oracleHeadend2}
   self-identity address
   match identity address ${oracleHeadend2} 255.255.255.255
 
! Virtual Tunnel Interfaces
 
! Each tunnel interface is a logical interface representing the local end of a VPN tunnel to a remote VPN peer. Each tunnel interface represents a single tunnel to a different Oracle VPN Headend. The IP address of each VPN headend is provided when you create your IPSec connection in Oracle Console.
! All traffic routed to a tunnel interface will be encrypted and sent across the tunnel towards Oracle Cloud Infrastructure.
! Each tunnel interface configuration also references the previously created IPSec profile 'oracle-vpn' for its IPSec parameters.
 
interface Tunnel${tunnelNumber1}
 ip address ${cpeInsideTunnelIpAddress1} ${cpeInsideTunnelNetmask1}
 tunnel source ${cpePublicIpAddress}
 tunnel mode ipsec ipv4
 tunnel destination ${oracleHeadend1}
 tunnel protection ipsec profile oracle-vpn
 
interface Tunnel${tunnelNumber2}
 ip address ${cpeInsideTunnelIpAddress2} ${cpeInsideTunnelNetmask2}
 tunnel source ${cpePublicIpAddress}
 tunnel mode ipsec ipv4
 tunnel destination ${oracleHeadend2}
 tunnel protection ipsec profile oracle-vpn
 
! IP Routing
! Pick either dynamic (BGP) or static routing. Uncomment the corresponding commands prior to applying configuration.
  
! Border Gateway Protocol (BGP) Configuration
! Uncomment below lines if you want to use BGP.
 
! router bgp ${bgpASN}
!  neighbor ${OracleInsideTunnelIpAddress1} remote-as 31898
!  neighbor ${OracleInsideTunnelIpAddress2} remote-as 31898
!  network ${onPremCidrNetwork} mask ${onPremCidrNetmask}
 
! Static Route Configuration
! Uncomment below lines if you want to use static routing.
! ip route ${vcnCidrNetwork} ${vcnCidrNetmask} Tunnel${tunnelNumber1}
! ip route ${vcnCidrNetwork} ${vcnCidrNetmask} Tunnel${tunnelNumber2}
 
! Update Any Internet Facing Access List to Allow IPSec and ISAKMP Packets
 
! You may need to allow IPSec and ISAKMP packets out your internet facing interface.
! Uncomment below lines to create a new ACL allowing IPSec and ISAKMP traffic and apply it to the outside interface.
 
! ip access-list extended INTERNET-INGRESS
!  permit udp host ${oracleHeadend1} host ${cpePublicIpAddress} eq isakmp
!  permit esp host ${oracleHeadend1} host ${cpePublicIpAddress}
!  permit udp host ${oracleHeadend2} host ${cpePublicIpAddress} eq isakmp
!  permit esp host ${oracleHeadend2} host ${cpePublicIpAddress}
!  permit icmp any any echo
!  permit icmp any any echo-reply
!  permit icmp any any unreachable
 
! interface ${outsideInterface}
!  ip address ${cpePublicIpAddress} $(netmask}
!  ip access-group INTERNET-INGRESS in
IKEv2構成テンプレート

IKEv2構成テンプレートを読みやすいように全画面表示します。

!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! IKEv2 Configuration Template
! The configuration consists of two IPSec tunnels. Oracle highly recommends that you configure both tunnels for maximum redundancy.
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! The configuration template involves setting up the following:
! Keyring (Pre-Shared Key)
! IKEv2 and IPSec Policy Configuration
! IPSec Peers
! Virtual Tunnel Interfaces
! IP Routing (BGP or Static)
! Update Any Internet Facing Access List to Allow IPSec and ISAKMP Packets
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! The configuration template has various parameters that you must define before applying the configuration.
!-------------------------------------------------------------------------------------------------------------------------------------------------------------
! PARAMETERS REFERENCED:
! ${OracleInsideTunnelIpAddress1} = Inside tunnel IP address of Oracle-side for the first tunnel. You provide these values when creating the IPSec connection in the Oracle Console.
! ${OracleInsideTunnelIpAddress2} = Inside tunnel IP address of Oracle-side for the second tunnel. You provide these values when creating the IPSec connection in the Oracle Console.
! ${bgpASN} = Your BGP ASN
! ${cpePublicIpAddress} = The public IP address for the CPE. This is the IP address of your outside interface
! ${oracleHeadend1} = Oracle public IP endpoint obtained from the Oracle Console.
! ${oracleHeadend2} = Oracle public IP endpoint obtained from the Oracle Console.
! ${sharedSecret1} = You provide when you set up the IPSec connection in the Oracle Console, or you can use the default Oracle-provided value.
! ${sharedSecret2} = You provide when you set up the IPSec connection in the Oracle Console, or you can use the default Oracle-provided value.
! ${outsideInterface} = The public interface or outside of tunnel interface which is configured with the CPE public IP address.
! ${vcnCidrNetwork} = VCN IP range
! ${vcnCidrNetmask} = Subnet mask for VCN
! ${onPremCidrNetwork} = On-premises IP range
! ${onPremCidrNetmask} = ON-premises subnet mask
!-------------------------------------------------------------------------------------------------------------------------------------------------------------

! Keyring (Pre-Shared Key)

! For authentication during IKE a separate keyring is defined for each Oracle VPN Headend peer.
! Add the pre-shared key for each Oracle VPN headend under the corresponding keyring.

crypto ikev2 keyring oracle-vpn-${oracleHeadend1}
peer oracle_vpn
 address ${oracleHeadend1}
 pre-shared-key local ${sharedSecret1}
 pre-shared-key remote ${sharedSecret1}

crypto ikev2 keyring oracle-vpn-${oracleHeadend2}
peer oracle_vpn
 address ${oracleHeadend2}
 pre-shared-key local ${sharedSecret2}
 pre-shared-key remote ${sharedSecret2}


! Optional IPSec settings are included here.
! All optional settings included are recommended by Oracle. Remove or comment out any unneeded commands prior to applying this configuration.
! WARNING: These settings are global and may impact other IPSec connections

! The Router will clear the DF-bit in the IP header. Allows the packet to be fragmented and sen to the end host in Oracle Cloud Infrastructure for reassembly.
crypto ipsec df-bit clear

! Increases security association anti-replay window. An increased window size is helpful for scenarios where packets are regularly being dropped due to delays.
crypto ipsec security-association replay window-size 128

! IKEv2 and IPSec Policy Configuration

! An IKEv2 proposal is created and specifies use of a Pre-Shared Key, AES256, SHA384, and Diffie-Hellman Group 5.
! If different parameters are required, modify this template before applying the configuration.

crypto ikev2 proposal oracle_v2_proposal
 encryption aes-cbc-256
 integrity sha384
 group 5

crypto ikev2 policy oracle_v2_policy
 proposal oracle_v2_proposal

! Create an IPSec transform set named 'oracle-vpn-transform' which defines a combination of IPSec (Phase 2) policy options. Specifically, AES256 for encryption and SHA1 for authentication. This is also where tunnel mode is set for IPSec.
! If different parameters are required, modify this template before applying the configuration.

crypto ipsec transform-set oracle-vpn-transform esp-aes 256 esp-sha-hmac
 mode tunnel

! An IPSec profile named 'oracle_v2_ipsec_profile_tunnel#' is created for each tunnel.
! The previously created transform set is added to this policy along with settings for enabling PFS Group 5 and the security association lifetime to 3600 seconds (1 hour).
! If different parameters are required, modify this template before applying the configuration.


crypto ipsec profile oracle_v2_ipsec_profile_tunnel1
 set ikev2-profile oracle_v2_profile_tunnel1
 set pfs group5
 set security-association lifetime seconds 3600
 set transform-set oracle-vpn-transform

crypto ipsec profile oracle_v2_ipsec_profile_tunnel2
 set ikev2-profile oracle_v2_profile_tunnel2
 set pfs group5
 set security-association lifetime seconds 3600
 set transform-set oracle-vpn-transform

! IPSec Peers

! Two IKEv2 profiles are created for each Oracle VPN Headend.

crypto ikev2 profile oracle-vpn-${oracleHeadend1}
 keyring oracle-vpn-${oracleHeadend1}
 identity local address ${cpePublicIpAddress}
 match identity remote address ${oracleHeadend1} 255.255.255.255
 authentication remote pre-share
 authentication local pre-share 

crypto ikev2 profile oracle-vpn-${oracleHeadend2}
 keyring oracle-vpn-${oracleHeadend2}
 identity local address ${cpePublicIpAddress}
 match identity remote address ${oracleHeadend2} 255.255.255.255
 authentication remote pre-share
 authentication local pre-share

! Virtual Tunnel Interfaces

! Each tunnel interface is a logical interface representing the local end of a VPN tunnel to a remote VPN peer. Each tunnel interface represents a single tunnel to a different Oracle VPN Headend. The IP address of each VPN headend is provided when you create your IPSec connection in Oracle Console.
! All traffic routed to a tunnel interface will be encrypted and sent across the tunnel towards Oracle Cloud Infrastructure.
! Each tunnel interface configuration also references the previously created IPSec profile 'oracle-vpn' for its IPSec parameters.

interface Tunnel${tunnelNumber1}
 ip address ${cpeInsideTunnelIpAddress1} ${cpeInsideTunnelNetmask1}
 tunnel source ${cpePublicIpAddress}
 tunnel mode ipsec ipv4
 tunnel destination ${oracleHeadend1}
 tunnel protection ipsec profile oracle_v2_ipsec_profile_tunnel1

interface Tunnel${tunnelNumber2}
 ip address ${cpeInsideTunnelIpAddress2} ${cpeInsideTunnelNetmask2}
 tunnel source ${cpePublicIpAddress}
 tunnel mode ipsec ipv4
 tunnel destination ${oracleHeadend2}
 tunnel protection ipsec profile oracle_v2_ipsec_profile_tunnel2

! IP Routing
! Pick either dynamic (BGP) or static routing. Uncomment the corresponding commands prior to applying configuration.

! Border Gateway Protocol (BGP) Configuration
! Uncomment below lines if you want to use BGP.

! router bgp ${bgpASN}
!  neighbor ${OracleInsideTunnelIpAddress1} remote-as 31898
!  neighbor ${OracleInsideTunnelIpAddress2} remote-as 31898
!  network ${onPremCidrNetwork} mask ${onPremCidrNetmask}

! Static Route Configuration
! Uncomment below lines if you want to use static routing.
! ip route ${vcnCidrNetwork} ${vcnCidrNetmask} Tunnel${tunnelNumber1}
! ip route ${vcnCidrNetwork} ${vcnCidrNetmask} Tunnel${tunnelNumber2}

! Update Any Internet Facing Access List to Allow IPSec and ISAKMP Packets

! You may need to allow IPSec and ISAKMP packets out your internet facing interface.
! Uncomment below lines to create a new ACL allowing IPSec and ISAKMP traffic and apply it to the outside interface.

! ip access-list extended INTERNET-INGRESS
!  permit udp host ${oracleHeadend1} host ${cpePublicIpAddress} eq isakmp
!  permit esp host ${oracleHeadend1} host ${cpePublicIpAddress}
!  permit udp host ${oracleHeadend2} host ${cpePublicIpAddress} eq isakmp
!  permit esp host ${oracleHeadend2} host ${cpePublicIpAddress}
!  permit icmp any any echo
!  permit icmp any any echo-reply
!  permit icmp any any unreachable

! interface ${outsideInterface}
!  ip address ${cpePublicIpAddress} $(netmask}
!  ip access-group INTERNET-INGRESS in

検証

基本的なトラブルシューティングのために、次のIOSコマンドが用意されています。

次のコマンドを使用して、ISAKMPセキュリティ・アソシエーションが2つのピア間で構築されていることを確認します。

show crypto isakmp sa

次のコマンドを使用して、すべてのBGP接続または近隣のステータスを確認します。

show ip bgp summary
show ip bgp neighbors

次のコマンドを使用して、ルート表を確認します。

show ip route

モニタリング・サービスは、クラウド・リソースをアクティブおよびパッシブにモニターするためにOracle Cloud Infrastructureから使用できます。サイト間VPNのモニタリングの詳細は、サイト間VPNのメトリックを参照してください。

問題がある場合は、サイト間VPNのトラブルシューティングを参照してください。