On Mon, Dec 23, 2024 at 4:53 PM Christopher Hawker <ch...@thesysadmin.au> wrote:
> You can establish an iBGP session between the two routers that exchange
> either default & own routes, or they can send their own routes with fulls and
> use local pref to preference the directly-connected transit session before 
> routes
> learnt from the iBGP session, depending on how you want engineer your traffic.

That's the easy part. If you want the ISPs to be equal with the
shortest path getting the traffic then you're done. Congratulations.

> I would like to do a failover model, where if one ISP goes down the other 
> would take over.

If you want to weigh one ISP to be "primary" and the other to be
"backup," you've a long hard road ahead of you. Localprefs can make
you prefer one ISP over the other for _outbound_ traffic but the
levers for controlling _inbound_ traffic are more complicated.

You can get part of the way there by "prepending" your AS number
several times on the backup path. That makes the AS path longer from
the backup ISP which tends to cause BGP selection to pick the shorter
path via the primary ISP.  That's basically BGP's default: shorter AS
path wins.

Except for all the jackals out there who use a local mechanism to pick
the best path without regard to the AS path length. For those, you'll
have to learn about "communities." Communities are basically tags: you
tag a route and if your ISP understands the tag it does something
different than normal with that route. Your ISPs publish a list of
communities they understand along with what they will do differently
if you tag a route with that community. Typically you'll want to find
the community that tells your ISP to set their own localpref
differently than the default. You may even need to find the
communities that tell your ISP's ISPs to set their localprefs
differently than their defaults. It gets complicated fast.

Regards,
Bill Herrin




-- 
William Herrin
b...@herrin.us
https://bill.herrin.us/

Reply via email to