Strange behavior weight on the ISP

Hello,

Someone recomanded for us to set weight on the bgp sessions so we do set weight 100 on all ISP sessions, the think i dont understand is if on one isp bgp session we set weight 101 the entire OUT Traffic drops on all ISP and it go true the session we set 101 not the input just the OUT, and we dont understand why all the OUT traffic and not just like X% of it.

One more think i dont understand is the way traffic is routed for example on mtr.

US > ISP 1 > TARGET ( 8 Hops ) 14ms. (We disable ISP 1)
US > ISP 2 > TARGET ( 4 Hops ) 6ms. (With ISP 1 Disabled)

When ISP 1 and ISP 2 is online i dont understand why he dosent chose ISP 2 ? It has only 4hops and 6ms direct pering with the target.

Thank you.

Nothing you have described is “strange behaviour”. Just because you don’t understand it doesn’t make it strange :slightly_smiling_face:

I would suggest reading a routing fundamentals book to learn how best to route your traffic as you want.

Your change is basically saying “this interface is the one I want to use” when you set weight higher than 100. When they are both 100 you probably have some load balancing going on, traffic is shared on egress.

Weight only influences outbound traffic. You need to change your bgp advertisements (more/less specifics), or use as-path pre-pending if you wish to influence inbound traffic.

2 Likes

Thank you, and regarding

One more think i dont understand is the way traffic is routed for example on mtr.

US > ISP 1 > TARGET ( 8 Hops ) 14ms. (We disable ISP 1)
US > ISP 2 > TARGET ( 4 Hops ) 6ms. (With ISP 1 Disabled)

When ISP 1 and ISP 2 is online i dont understand why he dosent chose ISP 2 ? It has only 4hops and 6ms direct pering with the target.

Its still the same ? I have to do it from bgp advertisements or is an vyos setings to chose the best isp ?

Thank you

Without access to your router, it’s hard to know why ISP1 is the default for traffic to TARGET when both are active.

However, you have the power here. You can apply BGP policy to say “If I learn this /24 from ISP2 then set localpref so it’s preferred to go via ISP2”

Again, I really recommend a routing fundamentals book that will explain all this to you. All the power lies within your hands (and Vyos configuration) to get traffic routed the way you want it. There’s also often more than one way to do something too, there’s not always a “right” way.
Note that it’s often much harder to influence ingress traffic than egress, but it is possible with as-prepend and, depending on the size of IP Space you have, advertising aggregates out one ISP and more specifics via another.

1 Like