Page 1 of 1

Route subnet to specific upstream provider

Posted: Mon Jun 27, 2022 4:51 am
by honeyfairy
I have two upstream providers, Orange and Telia. Half of my users should go through Orange, and the other half through Telia.
Depending on what I request, both providers can give me a full table or a default route.
Here is a diagram:
For my smaller network, I would have created a mangle rule to mark routing for then in IP>Routes I would set the default gateway for that routing mark. However, I don't think this is a feasible solution for a full routing table :)
If this can be accomplished with BGP, please guide me in the right direction.

Re: Route subnet to specific upstream provider

Posted: Wed Jun 29, 2022 4:11 pm
by netzwerghh

what are you announcing to the two providers? Do you have more than one public /24? The only way to control ingress traffic via BGP over two providers in your case is to have at least 2 /24 prefixes. You would announce one to Orange and the other to Telia. You can for redundancy also announce the other prefix to each provider but do multipe path prependings to make this a worse route.
For egress traffic if you want to split traffic by your two internal subnets you won't need the full tables. This is overkill (ca. 900.000 routes per full table). As you want to route all traffic from network A over Orange and all from B over Telia you should stick to the mangle way you outlined in your post. But be sure to also control ingress traffic. Just because you sent the initial packet over Telia won't make the internet send the response back over Telia.
If you do not have a public routeable prefix you won't at all benefit from getting the full table. As you are ony allowed to announce PA adress space to the corresponding provider you got those adresses from. That way all replies will of course reach you via that provider the prefix belongs to. And there will be no redundancy for those IP adresses.