Prepending an AS path to influence route priority
In the situation where the same route prefixes are being advertised to IBM Cloud through the BGP session for Direct Link, you can prepend one or more Autonomous System Numbers (ASNs) to the route advertisement. AS prepend makes the AS path longer, and therefore, the route for the prefix is less preferred by the BGP protocol on the IBM Cloud router. If the duplicate route prefixes are received with the same AS path length from different origin routers, IBM Cloud gives preference to the oldest route received. In other words, the first BGP session that advertises a given route prefix receives path preference.
You can create AS prepends and manage your AS prepend configurations after direct link provisioning. You can also view prepended prefixes of other direct links.
Before you begin
- You must have two competing routes of equal priority before an AS prepend will take effect.
- Make sure to review known limitations.
Prepending an AS path by using the UI
To prepend an AS path by using the UI, follow these steps:
-
From your browser, open the IBM Cloud console and log in to your account.
-
Select the Menu icon from the upper left, then click Interconnectivity > Direct Link.
-
In the Direct Link table, click the Direct Link name of the gateway where you want to manage route priority.
-
On the Details page, click the BGP tab and scroll to the AS prepends section. Then, click Go to AS prepends.
Alternatively, you can use the AS prepends shortcut on the Overview tab.
-
From the AS prepends page, click Create to create an AS prepend, or use the Actions menu to Edit or Delete an existing AS prepend.
-
Select Prepend to all prefixes if you want the specified prepend added to all prefixes.
-
Enter the target prefixes to prepend with the BGP ASN. When you specify a comma after the prefix, a tag shows in the field.
-
Choose a policy:
- Import - Use to apply to routes from an on-prem network.
- Export - Use to apply to routes to an on-prem network.
-
Specify how many times that you want to repeat the AS number added to the beginning of the path.
-
Click Add to list.
-
-
When you are done adding AS prepends, click Save.