1 | 概要

本ドキュメントは、オンプレミスでFortiGateをActive-PassiveのHA構成で運用し、冗長化された回線でAzure VPN GatewayとBGP接続する際の経路制御について、その**実現可能性と限界**を解説するものである。特に、Azureからオンプレミスへの「帰り」のトラフィックを意図通りに制御できる構成と、できない構成の違いに焦点を当てる。

2 | 主な課題: BGP属性とNext-Hop解決時のECMP

この問題は、BGPの経路選択プロセスと、その手前で動作するAzureネットワーク基盤のECMP(Equal-Cost Multi-Path)の相互作用に起因する。

Azureにおける経路選択の順序:
  1. Next-Hopへの到達性解決: Azureのネットワーク基盤は、まずBGPで学習した経路のNext-Hop(この場合はFortiGateのBGPピアIP)への到達方法を解決する。
  2. ECMPの適用: この解決の段階で、Next-Hopへのパスが複数等コストで存在する場合、この時点でECMPが適用され、トラフィックの分散が決定される。
  3. BGPベストパス選定: BGPのパス属性(AS PATH長やConnection Weight)の比較は、この後段で行われる。しかし、ステップ2でECMPが適用された場合、BGP属性でパスに差をつけても、物理的な回線(トンネル)の選択には影響を与えられない。

つまり、「帰り」の制御が不能となるのは、BGP属性の比較が行われる前に、AzureのECMP動作が優先されてしまうためである。

3 | 制御不能な構成パターン: フルメッシュ

冗長性を最大化するためにVPNトンネルをフルメッシュで構成した場合、Azure側のECMP動作により「帰り」の経路制御は**不能**となる。

3-1 | 前提条件

コンポーネント 構成
FortiGate Active-Passive HA (単一の論理BGPピアとして動作)
オンプレミス物理回線 2本 (例: ISP-A, ISP-B)
Azure VPN Gateway Active-Active 冗長化 (2インスタンスで動作)
VPNトンネル フルメッシュ (合計4本のトンネル)

          [Azure VNet] <--> [VPN GW Inst-A] -- [VPN GW Inst-B]
                               |       \       /       |
                             (Tunnels via ISP-A & ISP-B)
                               |          \ /          |
                              [FortiGate HA Cluster]
                
なぜ制御不能なのか:

Azureの各GWインスタンス(GW-A, GW-B)から見て、FortiGate HAという単一BGPピアへの到達経路が、ISP-A経由とISP-B経経由の2つずつ存在する。これらがNext-Hop解決の段階で等コスト(ECMP)と判断されるため、BGPのAS PATHプリペンドやConnection Weightを操作しても、トラフィックが着信する回線を選択することはできない。

4 | 制御可能な構成パターン: 回線ごとに接続を分離

各オンプレミス回線が、それぞれ特定のAzure VPN GWインスタンスとのみピアを確立するよう意図的に構成することで、ECMPの前提を崩し、「帰り」の経路制御を可能にする。

4-1 | 前提条件

コンポーネント 構成
FortiGate Active-Passive HA (単一の論理BGPピアとして動作)
オンプレミス物理回線 2本 (例: ISP-A, ISP-B)
Azure VPN Gateway Active-Active 冗長化 (2インスタンスで動作)
VPNトンネル 回線ごとに1つのVPNゲートウェイにのみ接続 (合計2本のトンネル)

4-2 | 構成図


          [Azure VNet] ---> [VPN GW Inst-A]      [VPN GW Inst-B]
                               |                      |
                         (Tunnel-A via ISP-A)   (Tunnel-B via ISP-B)
                               |                      |
          [FortiGate HA Cluster] <--------------------
                

4-3 | なぜ制御可能になるのか

この構成では、Azure側から見たBGP Next-Hopへの到達経路がECMPとならないため、BGPのパス選択アルゴリズムが意図通りに機能する。

  1. Next-Hopへの経路が単一化される: Azure GW-Aから見るとFortiGateピアへの経路はTunnel-Aの1つだけ、Azure GW-Bから見るとTunnel-Bの1つだけになる。
  2. BGPのパス選択が有効になる: Next-Hop解決でECMPが発生しないため、Azure VNetはGW-A経由とGW-B経由の経路をBGPの属性(AS PATH長)で正しく比較・選択する。

5 | 各構成パターンのメリット・デメリット比較

比較項目 制御可能な構成(回線ごとに接続) 制御不能な構成(フルメッシュ)
「帰り」の経路制御 ◎ 可能 × 不可能
冗長性 △ 限定的(回線またはAzure GWインスタンス障害で片系がダウン) ◎ 最大(4本のトンネルで最大限の冗長性を確保)
パフォーマンス/帯域 △ 帯域は優先回線分に制限される ○ ECMPにより複数トンネルに分散し、帯域を有効活用できる
推奨ユースケース 「帰り」の経路を厳密に制御する必要がある場合(例: 特定のセキュリティ機器を経由させたい) 冗長性とスループットを最優先し、「帰り」の経路が分散しても許容できる場合

6 | アーキテクチャの変更による解決策

フルメッシュ構成の冗長性を維持しつつ「帰り」の経路を制御したい場合は、BGP属性の操作ではなく、AzureがECMPを適用する前提そのものを変える**アーキテクチャの変更**が必要となる。

構成 概要 なぜ解決できるのか
VRRP / VDOM構成 各FortiGateやVDOMを独立したBGPルータとして動作させる。 Azureからは**2つの異なるBGPピア**として認識される。これにより、Next-Hopが異なるためECMPの対象とならず、純粋なBGPパス選択アルゴリズムでピアごとに経路を決定するため、制御が可能になる。
Azure Virtual WAN / ハブNVA Azure側で経路制御を集中管理するアーキテクチャ。 Azureのルーティングポリシーを明示的に設定し、VPN GatewayのデフォルトECMP動作を上書きすることができる。これにより、オンプレミス側の構成に依存せず、Azure側で能動的に経路を制御できる。

7 | 経路制御の粒度について

本ドキュメントで解説する経路制御は、**回線単位**での主従制御と、**宛先単位**でのポリシー制御の2つの粒度で考える必要がある。

構成パターン 回線単位の制御 宛先単位の制御
フルメッシュ 不可能 不可能
回線ごとに接続を分離 可能
(AS PATHプリペンド等で実現)
可能
(FortiGateのルートマップとポリシールーティングの組み合わせで実現)
ポイント: フルメッシュ構成では、Azure側のECMP動作がBGP属性に優先するため、回線単位だけでなく、宛先単位での「帰り」の経路制御も不可能となる。

8 | まとめ

FortiGate HA構成とAzure VPN Gateway間の経路制御における要点は以下の通りである。

  • 「帰り」の経路制御の可否は、Azureのネットワーク基盤がBGPのNext-Hop解決時に**ECMPを適用するか否か**で決まる。
  • VPNトンネルを**フルメッシュ**で構成すると、ECMPが適用されるため、BGP属性による「帰り」の経路制御は**不可能**となる。
  • VPNトンネルを**回線ごとに1つのVPNゲートウェイにのみ接続**(パスを分離)する構成にすれば、ECMPを回避でき、AS PATHプリペンドによる経路制御が**可能**となる。
  • 構成の選択は、経路制御の厳密性冗長性・スループットのどちらを優先するかのトレードオフで決定されるべきである。
  • フルメッシュ構成で厳密な経路制御が必要な場合は、**アーキテクチャの変更**が唯一の解決策となる。

1 | Overview

This document explains the feasibility and limitations of route control when operating a FortiGate Active-Passive HA cluster on-premises and connecting to an Azure VPN Gateway with BGP over redundant links. It specifically focuses on the differences between configurations that can and cannot correctly control "return" traffic from Azure to the on-premises environment.

2 | Main Challenge: BGP Attributes vs. ECMP during Next-Hop Resolution

This issue stems from the interaction between the BGP path selection process and the ECMP (Equal-Cost Multi-Path) mechanism of the underlying Azure network infrastructure.

Azure's Route Selection Order:
  1. Next-Hop Reachability Resolution: The Azure network fabric first resolves how to reach the BGP next-hop (in this case, the FortiGate's BGP peer IP) learned via BGP.
  2. ECMP Application: If multiple equal-cost paths to the next-hop exist at this resolution stage, ECMP is applied at this point, and traffic distribution is determined.
  3. BGP Best Path Selection: The comparison of BGP path attributes (like AS PATH length or Connection Weight) occurs after this step. However, if ECMP was already applied in step 2, differentiating paths with BGP attributes cannot influence the selection of the physical link (tunnel).

In other words, the inability to control "return" traffic occurs because Azure's ECMP behavior takes precedence before the BGP attribute comparison is performed.

3 | Uncontrollable Pattern: Full Mesh

When VPN tunnels are configured in a full mesh to maximize redundancy, "return" path control becomes impossible due to Azure's ECMP behavior.

3-1 | Prerequisites

Component Configuration
FortiGate Active-Passive HA (Acts as a single logical BGP peer)
On-premises Physical Links 2 links (e.g., ISP-A, ISP-B)
Azure VPN Gateway Active-Active redundancy (2 instances)
VPN Tunnels Full Mesh (Total of 4 tunnels)

          [Azure VNet] <--> [VPN GW Inst-A] -- [VPN GW Inst-B]
                               |       \       /       |
                             (Tunnels via ISP-A & ISP-B)
                               |          \ /          |
                              [FortiGate HA Cluster]
                
Why It's Uncontrollable:

From the perspective of each Azure GW instance (GW-A, GW-B), there are two paths to reach the single FortiGate HA BGP peer: one via ISP-A and one via ISP-B. Because these are considered equal-cost paths (ECMP) during next-hop resolution, manipulating BGP attributes like AS PATH prepending or Connection Weight cannot select the line on which traffic is received.

4 | Controllable Pattern: Isolate Connections per Link

By intentionally configuring each on-premises link to peer with only one specific Azure VPN GW instance, you can break the ECMP condition and enable "return" path control.

4-1 | Prerequisites

Component Configuration
FortiGate Active-Passive HA (Acts as a single logical BGP peer)
On-premises Physical Links 2 links (e.g., ISP-A, ISP-B)
Azure VPN Gateway Active-Active redundancy (2 instances)
VPN Tunnels Connect to only one VPN gateway per link (Total of 2 tunnels)

4-2 | Architecture Diagram


          [Azure VNet] ---> [VPN GW Inst-A]      [VPN GW Inst-B]
                               |                      |
                         (Tunnel-A via ISP-A)   (Tunnel-B via ISP-B)
                               |                      |
          [FortiGate HA Cluster] <--------------------
                

4-3 | Why It Becomes Controllable

In this configuration, the BGP path selection algorithm functions as intended because the paths to the BGP next-hop from Azure's perspective are not subject to ECMP.

  1. Paths to Next-Hop are Singular: From Azure GW-A, there is only one path to the FortiGate peer (Tunnel-A). From Azure GW-B, there is only one path (Tunnel-B).
  2. BGP Path Selection Becomes Effective: Since ECMP does not occur during next-hop resolution, the Azure VNet correctly compares and selects the path via GW-A or GW-B based on BGP attributes (like AS PATH length).

5 | Comparison of Pros and Cons for Each Pattern

Comparison Point Controllable Configuration (Isolated Connections) Uncontrollable Configuration (Full Mesh)
"Return" Path Control ◎ Possible × Impossible
Redundancy △ Limited (An outage of a link or Azure GW instance takes down one path) ◎ Maximum (Ensures highest redundancy with 4 tunnels)
Performance/Bandwidth △ Bandwidth is limited to the capacity of the primary link ○ Can utilize bandwidth effectively by distributing across multiple tunnels via ECMP
Recommended Use Case When strict control over the "return" path is necessary (e.g., to route through a specific security appliance) When redundancy and throughput are the top priorities, and distributed "return" paths are acceptable

6 | Solutions Through Architectural Changes

If you need to control the "return" path while maintaining the redundancy of a full mesh configuration, an **architectural change** is required to alter the premise on which Azure applies ECMP, rather than just manipulating BGP attributes.

Configuration Overview Why It Solves the Problem
VRRP / VDOM Configuration Operate each FortiGate or VDOM as an independent BGP router. Azure recognizes them as **two different BGP peers**. This means the next-hops are different, making them ineligible for ECMP. Control becomes possible as the pure BGP path selection algorithm decides the route for each peer.
Azure Virtual WAN / Hub NVA An architecture where route control is centralized on the Azure side. Allows you to explicitly set routing policies in Azure, **overriding** the default ECMP behavior of the VPN Gateway. This enables proactive path control from the Azure side, independent of the on-premises configuration.

7 | Granularity of Route Control

The route control discussed in this document needs to be considered at two levels of granularity: **link-level** primary/secondary control and **destination-level** policy control.

Configuration Pattern Link-Level Control Destination-Level Control
Full Mesh Impossible Impossible
Isolate Connections per Link Possible
(Achieved with AS PATH prepending, etc.)
Possible
(Achieved with a combination of FortiGate route maps and policy routing)
Key Point: In a full mesh configuration, Azure's ECMP behavior overrides BGP attributes, making not only link-level but also destination-level "return" path control impossible.

8 | Summary

The key points regarding route control between a FortiGate HA configuration and Azure VPN Gateway are as follows:

  • The ability to control "return" paths is determined by **whether or not Azure's network fabric applies ECMP** during BGP next-hop resolution.
  • Configuring VPN tunnels in a **full mesh** causes ECMP to be applied, making "return" path control via BGP attributes **impossible**.
  • Configuring VPN tunnels to **connect to only one VPN gateway per link** (isolating paths) avoids ECMP, making route control via AS PATH prepending **possible**.
  • The choice of configuration should be based on a trade-off between the **strictness of route control** and **redundancy/throughput**.
  • If strict route control is required with a full mesh configuration, an **architectural change** is the only solution.