Ultimate-Guide-to-BGP-Routing-Kentik
Ultimate-Guide-to-BGP-Routing-Kentik
GUIDE TO
BGP ROUTING
Table of Contents
Introduction 3 Part 3 – BGP configuration 12
What is BGP routing?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Configuring peering for neighbor autonomous systems. . . . . . . . . . . . . . . . . . . . . . . . . 12
BGP (Border Gateway Protocol): ● Peer networks, which are the ASes with which you’ve established a
The internet’s routing protocol direct reciprocal connection
● Upstream or transit networks, which are the providers that connect
you to other networks
Route advertisements
Specifically, your border routers advertise routes to the portions of the
IPv4 and IPv6 address space that you and your customers are responsible
for and know how to get to, either on or through your network. Advertising
routes that “cover” (include) your network is what enables other networks
to “hear” a route to the hosts within your network. In other words, every IP
address that you can get to on the internet is reachable because someone,
somewhere, has advertised a route that covers it. If there is not a generally
advertised route to cover an IP address, then at least some hosts on the
internet will not be able to reach it.
Advertising, homing, traffic to any other AS. As we already covered, the path traveled by traffic
is referred to as a route, and BGP is the protocol by which one “advertises”
and cardinal sins to the internet the routes available to get traffic to your AS.
One way of thinking about the BGP routes that you advertise to other
entities is as promises to carry data to the IP space represented by the
In this section of the guide, let’s delve further into the intricacies advertised route. For example, if you advertise 192.204.4.0/24 (in class C
of BGP — the system that directs traffic across the interconnected terms, the block starting at 192.204.4.0 and ending at 192.204.4.255), you
autonomous systems making up the internet. We’ll explore how routes promise that you know how to carry to its ultimate destination, data that is
are advertised and the critical distinction between single- and multi- destined for any address in 192.204.4.0/24.
homed networks. This illustrates the practical value of BGP, especially for
multi-homed networks or networks with multiple connections to a single
internet service provider (ISP). We will also stress the importance of proper Single-homed vs. multi-homed networks
BGP configuration, as mistakes can have wide-ranging and disruptive
Another important BGP-related concept is “single-homed” versus “multi-
impacts across the internet. Finally, a warning against the cardinal sins
homed,” which is a major determinant of who uses BGP and who doesn’t:
of BGP routing, namely “route hijacking” or “blackholing” and insufficient
filtering, while offering advice to avoid such pitfalls. ● Single-homed means that only one upstream provider gives your
network transit to the rest of the internet.
Earlier, we established that BGP is the protocol used to route traffic across ● Multi-homed means connecting to multiple providers to provide
the interconnected autonomous systems that make up the internet. We transit to the rest of the world.
also looked at why effective BGP configuration is an important part of
controlling your destiny on the internet, and we covered some of the basic When you’re single-homed, you usually
building-block concepts needed to understand what BGP does and how it won’t want to use BGP for your upstream
does it. We’ll continue on that path in this section, adding more concepts providers because you only have one path
and digging deeper into how BGP works and what makes it of value. out of your network. So filling your router
with 500,000+ BGP routes isn’t going to do
The major difference between eBGP and iBGP is that eBGP tries like All that’s required to bring up a peering session is that one neighbor
crazy to advertise every BGP route it knows to everyone, and you have line under the router bgp clause. In this example, this line specifies
to put “filters” in place to stop it from doing so. iBGP, on the other hand, 207.106.127.122 as the remote IP address (with respect to the customer’s
tries like crazy not to reconfigure routes. In fact, iBGP can actually be a route) of a router in the AS with ASN 701.
challenge to get working because to make it work, you have to peer all
of the iBGP “speakers” inside your network with all of the other iBGP The purpose of neighbor commands is to initiate peering sessions with
speakers. This is called a “routing mesh,” and, as you can imagine, it can neighbors. It’s possible to have BGP peering sessions that go over multiple
get to be quite a mess when you have 20 routers that each have to peer hops, but eBGP multi-hop is a more advanced topic and has many
with every other router.
on advertising your waste their time unless you have a good reason.
routes with BGP If you’re single-homed, you also don’t really need to “run defaultless”
by accepting all routes. Since every packet destined for the internet (as
opposed to your internal network) will go out the same router interface,
it doesn’t matter whether it does so via one default route or via searching
a list of 45,000 or more routes heard via BGP.
That leaves only one valid reason for single-homed networks to use BGP:
to have more control over advertising routes. To make a compelling case
to your provider, you’ll have to understand two concepts that they will
likely ask you about. One is “flaps,” which require a bit of explanation and
is covered in the following section. The other is routing-table space. If
you’re in your service provider’s IP space or “aggregate announcement,”
they will likely ask why it makes sense to pollute the routing tables with
an extra few routes by announcing your routes more specifically. You’re on
your own for the answer to that one, but if you think you have a good case,
talk to your current or potential provider.
The AS-PATH attribute is a crucial concept to understand when you decide To sum up, here are the most important questions to remember for each
to advertise and receive routes via BGP. Every time a router advertises a peer when you’re either considering how to do BGP in general or explicitly
route via BGP, that route is stamped with the autonomous system number bringing up a new BGP session:
(ASN) of the autonomous system (AS) to which the router belongs (see
Routes and autonomous systems in Part 1). As a route moves from AS to
AS, it builds up an AS-PATH, which is useful for the following reasons: ▶ What routes do you want the peer to hear?
● AS-PATH provides a diagnostic trace of routing on the net. If you have The most important thing is to ensure that you do not
full routes in one of your routers or have query access to a router that reconfigure routes to which you are not providing internet
does (such as telnet://route-server.cerf.net), you can find the route connectivity.
that encompasses a particular IP address and see which ASNs have ▶ What do you want to do with the routes you hear via the
advertised it. If you do some poking around, you can even see how a session? Do you want to tune them? Only take some? Take
provider is actually connected. them all?
● AS-PATH is one of several metrics that determine how routes heard via
BGP are inserted into the IP routing table. We’ll be talking more about
metrics in the future.
● AS-PATH can be used for filtering that enables policy routing. You’d
want to filter based on the AS-PATH for many reasons, including
ensuring you only send routes that originate in your network. AS-PATH
filtering is the best first step that you can work with to get comfortable
with filtering routes. And if your network is relatively simple (as 90
percent of networks are), you won’t need anything fancier for quite
some time.
BGP used to be primarily of interest only to ISPs and hosting providers, If we’ve piqued your interest in how the routes used by your traffic
whose revenue depends on delivering traffic. It then became the business affect network performance and costs, you’ll find that Kentik’s Network
of web businesses to manage their internet connectivity more intelligently Observability Platform provides deep insights into BGP monitoring,
since their user experience and revenue streams depend on reliable, high- configuration, and peering.
performance internet traffic delivery. Now, with the adoption of cloud
solutions by many enterprises to meet their IT needs, as well as the overall Kentik provides powerful BGP analytics and monitoring features to help
trend to digital business models, BGP and internet routing is becoming your organization gain insights into BGP operations, identify potential
something with which all network engineers (including not just NetOps but peering opportunities, and optimize routing decisions.
DevOps professionals and SREs) should get familiar.
With Kentik, you can stay ahead of network challenges and ensure the
smooth performance of your BGP infrastructure. Discover the benefits
of Kentik’s network analytics and monitoring solutions for BGP by starting
a free 30-day trial or requesting a demo today.
Revised 20230720