I have been helping an exchange member get their routing registry and RPKI stuff setup. Over the course of this, I did a once over of their BGP configuration. Their setup brought about this article.

Not everyone on the Internet needs full feeds from their provider. In this case, how does learning routes from an Internet Exchange such as FD-IX benefit you if all you are doing is default routes?

So let’s take a scenario. You are a local hosting company. You don’t provide Internet to customers, you just do hosting of websites and data. You have a couple of providers you are buying Internet from, mainly for redundancy. One of these is primary and the other is a backup. You are doing BGP just because. All you are receiving from these providers is a default route and that is it. Why would you want to receive all these routes from an IX?

The simple answer is traffic to those routes will be quicker. Let’s say you have a customer who accesses a database or application you host for them. If that customer’s ISP, or even the customer, is on the exchange their traffic will be one hop from their edge router to your edge router. This cuts down on latency, jitter, and bottlenecks. When you are talking about applications, the difference between 30 milliseconds and 3 milliseconds can be noticeable to the application. It can be noticeable to a voice call if you host that customer’s voice switch. So why not have your traffic take the fastest path it can? How do you know it’s faster? Physics. The fewer hops and equipment a packet goes through the less latent that packet is. Depending on your provider and the customer’s provider that packet may go clear to another city before coming back to go next door to them.

So how do you deal with these routes? This is where local-pref comes into play. What you will do is you will tag your incoming routes with a local pref. Your two backbone providers will get their routes, which is just the default route, tagged with a local-pref of 100. Your Internet exchange routes will get tagged with a local-pref of 200. The higher number wins when BGP has to make a decision.

So what will happen to your traffic in this scenario? Local pref influences the traffic leaving your router. If your router sends traffic to any of the routes from the IX it will honor the local pref of 200 being the winner and sending them across the IX fabric. Anything else not in the routing table will get sent out the default route(s).

One final note about the default routes. If you have an active and a primary you can also influence your outbound traffic with the local-pref attribute. Set the primary ISP to 101 and the secondary to 100. When the router has to make the decision where to send traffic it will pick the one of local-pref 101 first. Inbound traffic can be influenced as well, but that’s another article.

If you want to learn a little more about local-pref Justin has an article over on his personal blog
https://blog.j2sw.com/networking/bgp-local-pref-and-how-it-can-influence-traffic/