Apr 10

How to configure BGP with two providers while prefering to use one over the other.

There are many different ways to do this, here are two. They may or many not work in your environment.


A) On your back up router, prepend your AS about 4-5 times to make that link look like it’s farther away. Even when you do this, you may get some traffic coming in over that link.

B) Set your local preference for your outgoing traffic to prefer the active router over the standby.

Read more here:


2. If the factors fit your business, I would recommend making both of them being active with the following settings.

– Both routers learn that service providers routers, and their customers routes

– On the router you want the most traffic to go over, learn a default route from that provider.

– On the router you want the least traffic to go over, prepend your AS 1 or 2 times.

Option #2 can give you and your customers a better experience. If they are serviced by the same provider, they go directly to you instead of to your other provider to get to you. You employee’s will do the same if the resource is on that providers network, it will be a shorter path.