iTranslated by AI
Routing Control in Direct Connect
I have summarized my notes on Direct Connect routing while studying for the ANS exam.
Routing for Private VIFs and Transit VIFs
BGP Path Attributes
Basically, the following three path attributes are used to control routing:
- Local Pref
- Used for both inbound and outbound; higher values are preferred.
- AS_Path
- Used for both inbound and outbound control; shorter AS_Path is preferred.
- MED
- Used for inbound control; lower values are preferred.
Priority is given in the order of Local Pref > AS_Path > MED, so there are many patterns where traffic paths are controlled via Local Pref. Also, aside from BGP path attributes, the most specific prefix is generally given the highest priority.
Outbound Paths

For outbound traffic control, the three path attributes—Local Pref, AS_Path, and MED—can be used.
When you have multiple VIFs in a single region, you can set the AS_PATH attribute to prioritize them. However, when setting the priority for multiple VIFs across multiple regions, AS_Path does not work, so Local Pref is used instead.
If there are multiple virtual interfaces for a region, you can set the AS_PATH attribute to prioritize which interface AWS uses to route traffic. However, AS_PATH prepending does not work if the Direct Connect connection is in a different AWS region than the VPC.
https://docs.aws.amazon.com/directconnect/latest/UserGuide/routing-and-bgp.html#private-routing-policies
Inbound Paths

For inbound traffic control, the three path attributes—Local Pref, AS_Path, and MED—can be used. However, to use Local Pref for inbound traffic path control, you must use BGP community tags.
BGP Community Tags
- 7224:7100 – Low priority
- 7224:7200 – Medium priority
- 7224:7300 – High priority
BGP community tags for Local Pref are also evaluated with higher priority than AS_PATH.
Public VIF Routing Policy
BGP Path Attributes
The following path attributes are used to control routing:
- AS_Path
- AS-Path prepending is available only when using a public ASN.
Again, aside from BGP path attributes, the most specific prefix is generally given the highest priority.
Reference Articles
Discussion