Jean,
The internet is a network like any other (I’m lying, but fundamentally it is).
If you advertise your own subnet via two paths then the network can use those two paths to reach your subnet. In the internet that is not so usual as you’d need to pay to own that subnet and an AS. 

Usually you’ll use a subnet from your ISP, and with one exit only, just use default routing (so you don’t need to learn 900k+ routes that all go via the same next hop).

With two ISPs, operating in failover, you can also use just the default from both. You will then use some policy to select which default to use. If you want to customize it (say YouTube goes out of ISP A, while the rest uses B), then you will need to learn more routes than the default.

Other than routing, you need to understand how those links will be used. Users browsing need to use addresses from the ISP so if they are egressing A, they need to be using A’s addresses. This is usually done with NAT and the device doing it has to be aware of the egress. Often, it’s the router itself doing NAT based on the exit interface. But there are multiple possibilities…

HTH,

/Pedro

On 24 Dec 2024, at 10:21, Jean Franco <jfra...@maila.inf.br> wrote:


Thanks Bill for the well explanation!
I'll probably will have to go into the communities then, some of tests I've done got me nowhere!
I'm using VyOS (quagga) and prepending didn't help.

Best regards,


On Tue, Dec 24, 2024 at 12:42 AM William Herrin <b...@herrin.us> wrote:
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