Subchapter 94.2
references/choosing-static-or-dynamic-routing.mdMarkdown11 KBView on GitHub
Decision expertise for picking how routes are exchanged between an on-premises network and a VPC before creating an AWS Site-to-Site VPN connection. Covers the two routing types (static, where the customer enters on-premises prefixes by hand, and dynamic, where the customer gateway and the AWS gateway exchange routes over Border Gateway Protocol), the device capability that gates the choice, the failover difference, the deliberate use of static routing for route control, and the Autonomous System Number (ASN) that dynamic routing requires.
This reference makes and explains a recommendation. It does not create the connection. Once the routing type is settled, the creating-a-site-to-site-vpn-connection reference covers the build. It does not cover tunnel bandwidth sizing or the customer gateway device configuration; those are separate references.
To recommend a routing type, gather the customer’s device capability and route-control needs, match them against the decision table, and explain the recommendation. See the Procedure section below.
The procedure covers:
| Choice | Use when |
|---|---|
| Dynamic (BGP) | The on-premises device supports BGP and the customer wants automatic route exchange and BGP-assisted failover between tunnels |
| Static | The device does not support BGP, or the customer deliberately wants to control which on-premises routes enter the AWS network. On a BGP-capable device, dynamic routing with BGP prefix filtering is the other way to control which routes are admitted |
Constraints:
Dynamic routing requires a BGP-capable customer gateway device. Recommending it for a device that does not support BGP leaves the customer stuck at the customer gateway step.
Constraints:
Some customers choose static routing on a BGP-capable device on purpose. When connecting to a partner network, static routing lets the customer write only the specific partner prefixes they approve, rather than accepting everything the partner advertises over BGP. This is common in regulated industries such as banking and financial services.
On a BGP-capable device, static routing is not the only way to control which routes are admitted: dynamic routing with BGP prefix filtering lets the customer accept only approved partner prefixes while keeping the automatic route exchange and BGP-assisted failover that dynamic routing provides. Static routing gives the simplest, most explicit control; BGP prefix filtering gives route control without giving up dynamic failover.
Constraints:
BGP offers liveness detection that assists failover to the second tunnel when the first goes down. Static routing does not get that, so a customer on static routing gives up the automatic failover benefit without always realizing it.
Constraints:
Dynamic routing requires a BGP ASN for the customer gateway. When the customer has no public ASN, they can use a private ASN.
Constraints:
The device cannot run BGP. Recommend static routing and enter the on-premises prefixes by hand (Decision).
BGP advertised everything from the partner. On a BGP-capable device, present both route-control options: dynamic routing with BGP prefix filtering (accept only approved prefixes, keeping automatic failover) or static routing (enter approved prefixes by hand). Recommend BGP prefix filtering when the customer wants to keep dynamic failover (Static routing as deliberate route control).
Dynamic routing needs a BGP ASN. Supply a private ASN from the allowed range (ASN for dynamic routing).
This procedure gathers the customer’s device capability and route-control needs, matches them to a routing type, and explains the consequences. It is a decision procedure: there is no console-write step, because the output is a recommendation, not a deployed resource.
Constraints for parameter acquisition:
Constraints:
Constraints:
Constraints:
{
"device_supports_bgp": true,
"needs_route_control": true,
"has_public_asn": false
}The device supports BGP, so there are two ways to get the route control the customer wants:
- Dynamic routing with BGP prefix filtering: advertise and accept only the approved partner
prefixes (filter the rest at the customer gateway). This keeps BGP liveness detection and
automatic tunnel failover while still controlling which routes enter the AWS route table.
- Static routing: enter the approved prefixes by hand for the simplest, most explicit control.
Tradeoff: static routing does not get BGP liveness detection, so tunnel failover is not automatic.
Recommendation: prefer dynamic routing with BGP prefix filtering here, since the device is
BGP-capable and the customer keeps automatic failover; choose static routing only if they want the
simplest explicit control and accept manual failover. Next: build it with the
creating-a-site-to-site-vpn-connection reference.Recommend static routing and enter prefixes by hand (Step 2).
On a BGP-capable device, present both route-control options: dynamic routing with BGP prefix filtering (accept only approved prefixes, keeping automatic failover) or static routing (enter approved prefixes by hand). Recommend BGP prefix filtering when the customer wants to keep dynamic failover (Step 2).
Supply a private ASN range (Step 3).
The routing choice is also a security boundary: it decides which on-premises prefixes can enter the AWS network and which AWS prefixes are advertised back.
Constraints: