LoginSignup
3
2

More than 1 year has passed since last update.

Azure Route Server による ExpressRoute と VPN のトランジット接続

Last updated at Posted at 2021-11-24

ExpressRoute と VPN のトランジット接続 (2 つの Gateway を経由した接続) は Azure Virtual WAN で利用可能でしたが、Route Server を利用する構成でもサポートされているため、実際に動作を確認してみました。

ExpressRoute/VPN を共存環境で構成済みの場合に、VPN を経由して ExpressRoute で接続されたオンプレ環境や仮想ネットワークに接続したい (逆のパターンも含む) といった要望はあるかと思います。
例えば以下のような構成の場合、左側の OnpreVM1 から VPN/ER を経由し、右側の oci-vm2 に接続することはできません。同様に自宅等から P2S で VPNGW に接続したユーザーについても oci-vm2 に接続することはできません。
これは VPN/ER 用のそれぞれの仮想ネットワークゲートウェイで経路が交換されていないためとなります。
image.png
そのような構成において、Azure Route Server (ARS) をデプロイし、ブランチ間のトラフィックを許可することで、ER, VPN それぞれの仮想ネットワークゲートウェイと ARS で BGP のネイバーを張り、お互いの経路を広報できるようになります。この構成の場合、独自の NVA の構成は不要です。
image.png

以下に検証手順と検証結果を記載していきます。

1. Azure ExpressRoute と Oracle Cloud Infrastructure の接続

以下等を参照しながら、ER と OCI を閉域網で接続します。その他、いくつか参考となるブログ等もあります。
https://docs.microsoft.com/ja-jp/azure/virtual-machines/workloads/oracle/configure-azure-oci-networking
※ ER/OCI で接続できるリージョンは限られているので注意が必要です。
https://docs.oracle.com/ja-jp/iaas/Content/Network/Concepts/azure.htm

2. VPN Gateway を ExpressRoute 用の VNet にデプロイ

VPN Gateway デプロイ時の必須要件

  • アクティブ/アクティブの構成
  • BGP 有効
  • ASN: 65515
  • Route Server より先にデプロイ
  • GatewaySubnet は /27 またはそれより広いアドレス空間

アクティブ/アクティブは Route Server の要件で、ASN: 65515 は ER/VPN 共存環境の要件です。

以下のような設定でデプロイします。

image.png

デプロイ後、OnpreVM1 から接続可能か確認してみましたが、以下の通り接続はできませんでした。(想定通り)

[user@OnpreVM1 ~]$ ping 10.100.0.221
PING 10.100.0.221 (10.100.0.221) 56(84) bytes of data.
^C
--- 10.100.0.221 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms

念のため、P2S の接続も確認してみましたが、以下の通り接続はできません。※トランジット接続する場合、クライアント側で経路を手動で追加する必要があります。

C:\WINDOWS\system32>route add 10.0.0.0 mask 255.0.0.0 10.1.0.129
 OK!

C:\WINDOWS\system32>ping 10.100.0.221

Pinging 10.100.0.221 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 10.100.0.221:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Azure ポータルから OnpreVM1 の有効なルートを確認。OCI 側のレンジ (10.100.0.0/24) が広報されていないことがわかります。
image.png

3. Route Server を構成

Route Server の要件

  • Standard SKU のパブリック IP アドレス 1 つ
  • RouteServerSubnet という名前のサブネットが必要 (/27 またはそれより広いアドレス空間)
  • VPN Gateway を先にデプロイ

3-1. パブリック IP を作成

Azure CLI にてリソースを作成します。

az network public-ip create  --name RouteServerPIP   --resource-group EREastUS --version IPv4   --sku Standard

3-2. Route Server をデプロイ

約 20 分ほどかかります。ASN は既定で 65515 となります。

サブネットのリソース ID を取得します。(VNet/Subnet は事前に作成)
subnet_id=$(az network vnet subnet show --name RouteServerSubnet --resource-group EREastUS --vnet-name ERVNet --query id -o tsv) 

Route Server をデプロイします。
az network routeserver create  --name RouteServer --resource-group EREastUS --hosted-subnet $subnet_id --public-ip-address RouteServerPIP

4. ブランチ間のトラフィックを許可

az network routeserver update  --name RouteServer --resource-group EREastUS --allow-b2b-traffic true

5. 疎通確認

Azure ポータルから OnpreVM1 の有効なルートとして OCI 側のレンジ (10.100.0.0/24) が広報されていることを確認できます。
image.png

OnpreVM1 から接続可能となってました。SSH でログインできることも確認できました。

[user@OnpreVM1 ~]$ ping 10.100.0.221
PING 10.100.0.221 (10.100.0.221) 56(84) bytes of data.
64 bytes from 10.100.0.221: icmp_seq=1 ttl=61 time=7.58 ms
64 bytes from 10.100.0.221: icmp_seq=2 ttl=61 time=5.27 ms
64 bytes from 10.100.0.221: icmp_seq=3 ttl=61 time=6.50 ms
64 bytes from 10.100.0.221: icmp_seq=4 ttl=61 time=5.52 ms
^C
--- 10.100.0.221 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 5.272/6.221/7.581/0.915 ms

[user@OnpreVM1 ~]$ ssh opc@10.100.0.221
Last login: Wed Nov 24 01:46:52 2021 from 10.10.1.4
[opc@oci-vm2 ~]$

P2S の接続も確認してみましたが、以下の通り接続可能でした。

C:\WINDOWS\system32>ping 10.100.0.221

Pinging 10.100.0.221 with 32 bytes of data:
Reply from 10.100.0.221: bytes=32 time=159ms TTL=60
Reply from 10.100.0.221: bytes=32 time=159ms TTL=60
Reply from 10.100.0.221: bytes=32 time=159ms TTL=60
Reply from 10.100.0.221: bytes=32 time=159ms TTL=60

Ping statistics for 10.100.0.221:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 159ms, Maximum = 159ms, Average = 159ms
3
2
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
3
2