I have a set-up of two AS's, each AS with two routers (BGP turned up with neighbouring between AS) communicating with each other.

I also have specific networks inside the AS's in which I want to use a specific route/link to the other AS, say VOIP traffic goes through link1( AS-A-router1 through AS-B-router1) and other traffic goes through another link2( AS-A-router2 through AS-B-router2), whats the best way to achieve this?

  • Did any answer help you? if so, you should accept the answer so that the question does not keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer.
    – Ron Maupin
    Dec 23, 2021 at 16:03

2 Answers 2


Load balancing with BGP is very tricky and the mechanisms available are quite crude. With BGP you can only route based on the destination IP address. There's no way to distinguish payload traffic and make routing decisions based on that.

So what you can do, is prefer to route the IP addresses used for VOIP via one link, and the rest via the other.

To do so, you can set a local preference on the IP ranges received on both links, and set the local preference for the VOIP IP range higher on one link and for the rest of the ranges on the other.

This would only affect outbound traffic (as inbound traffic is even harder to control), and would have to be done on all routers. Keep in mind though that any type of traffic would be preferred on a specific link this way, not just VOIP traffic.


Another way to accomplish this inter-domain class-based routing is to map traffic classes to L3VPNs and leak the BGP-learnt routes from the neighboring AS into the L3VPN routing tables, applying your desired routing policy so for example, the voip L3VPN chooses link1 even though the default/best-effort routing table chooses link2.

Conceptually, what you've described is generally not easy to scale and has limited upside. You might benefit more from learning about your CoS/QoS options than from devoting specific links for certain types of traffic. MPLS RSVP may also interest you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.