11-27-2024 10:58 PM
I have a 9500 switch connected to AWS with BGP.
I want to connect an additional BACKUP line to the switch.
What attributes do I need in BGP to prioritize BGP on the switch?
11-27-2024 11:03 PM
11-27-2024 11:04 PM
Hello @JustTakeTheFirstStep
To prioritize BGP routes on your Cisco Catalyst 9500 switch connected to AWS, you can use BGP attributes to influence the path selection process. Since you want one connection to serve as the primary and the other as the backup, the most suitable attributes include Local Preference, AS-Path Prepending, Multi-Exit Discriminator (MED), and optionally, Cisco-specific Weight.
The Local Preference attribute is ideal for prioritizing outbound traffic within your AS. A higher LocalPref value is preferred. You can configure a route-map on the switch to assign a higher LocalPref (e.g., 200) to routes received from the primary connection and a lower value (e.g., 100) for the backup connection. This ensures that outbound traffic prefers the primary link, falling back to the backup only if the primary is unavailable.
For inbound traffic prioritization, AS-Path Prepending is effective. By artificially lengthening the AS-Path on the routes advertised via the backup connection, you make it less desirable for AWS or other peers, encouraging them to use the primary connection instead. Similarly, the MED attribute can be set to signal AWS which path to prefer. A lower MED value on the primary connection and a higher one on the backup help AWS prioritize the primary path.
Lastly, the Weight attribute, which is Cisco-proprietary and local to the router, can also be used to influence outbound traffic. Higher weight values are preferred and override other attributes like LocalPref. Assigning a higher weight to the primary connection ensures it is always selected for outgoing traffic when available.
Ensure proper route-map application to inbound and outbound BGP updates for precise control.
11-27-2024 11:07 PM
The reason the BGP route won't install is because of distance, not priority. BGP has a distance of 20 or 200 (depending on i or e) and your static routes have a distance of 10, therefore the statics get installed.
If you want to prefer BGP, change the distance of your static routes to be higher than the BGP distance. You could also change the BGP distance but I would stay away from that.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide