@@ -8,11 +8,13 @@ between parties as their traffic traverses the Internet. But the
88Internet itself consists of infrastructure, such as routers, that must
99also be defended against attacks. Two areas of particular concern are
1010the interdomain routing system and the domain name system (DNS). Both
11- systems routinely come under attack. There are efforts underway to
12- make them more resistant to attacks, as we discuss in the following
13- sections.
11+ systems routinely come under attack. They are also complex distributed
12+ systems. While distributing the routing and naming functions helps
13+ make these systems resilient to failure, many opportunities for attack
14+ exist. In this chapter we discuss some of the ongoing
15+ efforts to improve their resistance to attacks.
1416
15- This following discussion builds on some of the concepts introduced in previous
17+ The following discussion builds on some of the concepts introduced in previous
1618chapters. Notably, the concept of public key infrastructure (PKI),
1719which we introduced in Chapter 4 and which underpins the operation of TLS,
1820plays an important role in securing infrastructure as well. While the
@@ -55,23 +57,27 @@ mistakes on occasions) and the secure connection protects it from
5557modification by an attacker. A secure, encrypted connection to the
5658website of the New York Times, however, doesn't mean you should
5759believe every word published by the New York Times. Similarly, a
58- secure connection to a BGP speaker doesn't imply that every route
59- advertisement provided by that speaker is reliable. We need to look a
60- bit more closely at how BGP works to see where the challenges lie.
60+ secure connection to a BGP speaker (a router running BGP) doesn't
61+ imply that every route advertisement provided by that speaker is
62+ reliable. We need to look a bit more closely at how BGP works to see
63+ where the challenges lie.
6164
6265BGP speakers advertise *paths * to reach *prefixes *. When a BGP speaker
6366receives a set of path advertisements from its peers, it runs a route
64- selection process to determine the "best" path to any prefix, using a
65- fairly large and flexible set of criteria to decide what is
66- "best". For example, a path to a given prefix that is shorter (as
67- measured by the number of autonomous systems it contains) may be
68- preferred to one that is longer. However, there are many other
69- criteria, notably the business relationship between the peers, which
70- are used to determine the ultimate choice of path. When a BGP speaker
71- has chosen a path to reach a particular prefix, it may choose to
72- re-advertise that path to other BGP speakers, either in the same AS or
73- in another AS. For a more full discussion of how BGP works, refer to
74- the section on Inter-domain routing in our main textbook.
67+ selection process to determine its preferred path to any prefix, using
68+ a large and flexible set of criteria to decide which path to
69+ select. The business relationships among providers play a central role
70+ in path selection. While a router might prefer a path to a given
71+ prefix that is shorter (as measured by the number of autonomous
72+ systems it contains) to one that is longer, that is not a hard rule
73+ (unlike intra-domain routing). The business relationships among the
74+ different service providers and customers play a central role in the
75+ ultimate choice of path. When a BGP speaker has chosen a path to reach
76+ a particular prefix, it may choose to re-advertise that path to other
77+ BGP speakers, either in the same AS or in another AS. Again, this
78+ depends on customer-provider relationships. For a more full discussion
79+ of how BGP works, refer to the section on inter-domain routing in our
80+ main textbook.
7581
7682A BGP speaker needs to trust that the paths that it is receiving from
7783its peers are correct, and this turns out to be a multi-faceted
@@ -105,6 +111,9 @@ more difficult to address.
105111 <https://labs.apnic.net/index.php/2021/08/03/a-survey-on-securing-inter-domain-routing-part-1-bgp-design-threats-and-security-requirements/> `__.
106112 APNIC Blog, August 2021.
107113
114+ S. Murphy. `BGP Security Vulnerabilities Analysis
115+ <https://www.rfc-editor.org/info/rfc4272> `__. RFC 4272, 2006.
116+
108117 L. Peterson and B. Davie. `Computer Networks: A Systems Approach. Interdomain
109118 Routing <https://book.systemsapproach.org/scaling/global.html#interdomain-routing-bgp> `__.
110119
@@ -175,14 +184,16 @@ certain prefix, how do we know that they really have this path?
175184~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176185
177186When a BGP speaker announces a path to a particular prefix, how do we
178- know that they really have such a path? And do we know that they will
179- use the path if asked to do so? The short answer to both questions is that we
180- don't, but there has been a multi-decade quest to build mechanisms that
187+ know that they really have such a path? Do we know that they will
188+ use the path if asked to do so? Are they even authorized to use the
189+ path? The short answer to all these questions is that we don't know,
190+ but there has been a multi-decade quest to build mechanisms that
181191enable greater confidence in the correctness of such
182192announcements. This quest, and the slowness of its progress, was well
183- documented by Sharon Goldberg in 2014. While progress continues
184- today, a more recent study by Testart and Clark from 2021 indicated
185- that progress had remained slow.
193+ documented by Sharon Goldberg in 2014. While progress continues today,
194+ a more recent study by Testart and Clark from 2021 indicated that
195+ progress had remained slow. There are a number of reasons for the
196+ lack of progress, as we discuss below.
186197
187198Let's start with a simple and well-studied example. In 2008, ISPs in
188199Pakistan were ordered by the government to block access to YouTube for
@@ -193,7 +204,10 @@ so that it could then redirect traffic that would try to follow that
193204path. The problem was that not only was this path not a viable way to
194205reach YouTube, it was also a *more specific * path, that is, it was for
195206a longer prefix than the true path to YouTube that was being
196- advertised by other ASes. This turned into a problem well beyond the
207+ advertised by other ASes. Since IP forwarding is based on the
208+ longest matching prefix in the routing table ("longest-prefix match") the
209+ more specific path overrides the less specific path when packets
210+ match the longer prefix. This turned into a problem well beyond the
197211boundaries of Pakistan when the ISP advertised the route upstream to a
198212larger ISP. The upstream ISP now saw the more specific route as a
199213distinct piece of routing information from the true, less specific
@@ -210,10 +224,10 @@ There are many other forms of attack possible on BGP, but they mostly
210224take the form of a route being advertised and then propagated when it
211225should not be. There is a relatively simple measure that should have
212226prevented the incident described above: the provider AS immediately
213- upstream from Pakistan Telecom should not have accepted the
227+ upstream from Pakistan Telecom should not have accepted the
214228advertisement that said "I have a route to YouTube". How would it know
215229not to accept this? After all, BGP needs to be dynamic, so a newly
216- advertised prefix is sometimes going to be correct. One solution to
230+ advertised prefix is often going to be correct. One solution to
217231this problem is the use of Internet Routing Registries (IRRs), which serve as
218232databases mapping address prefixes to the ASes that are authorized to
219233advertise them. In the prior example, since YouTube is not a customer
@@ -234,9 +248,13 @@ incorrect that could be advertised. The set of rules that need to be
234248configured on a BGP router for an ISP that carries hundreds of
235249thousands of routes can also get very large.
236250
251+ There is also a question of whether all the information provided by an
252+ IRR can be trusted. We discuss approaches to building trust in the
253+ information provided by an IRR below.
254+
237255Furthermore, as noted by in the article "*Why Is It
238256Taking So Long to Secure Internet Routing? *", the incentives for
239- prefix filtering are somewhat misaligned . The cost of filtering falls
257+ prefix filtering are not well aligned . The cost of filtering falls
240258on the AS that is immediately upstream of the misbehaving ISP, while
241259the benefit accrues to some distant entity (YouTube in our example)
242260who avoids the impact to their traffic thanks to the work of a
@@ -353,6 +371,16 @@ that we should trust advertisements of this prefix if they originate
353371from the stated AS. An ROA may also limit the maximum length of the prefix to
354372protect against bogus advertisements of more specific routes to a sub-prefix.
355373
374+ The chain of trust established in the RPKI allows the recipient of an
375+ ROA to validate that the AS number in the ROA is authorized to
376+ orginate advertisements for the prefix or prefixes listed in the ROA.
377+
378+ .. _fig-roa :
379+ .. figure :: figures/ROA-trust.png
380+ :width: 600px
381+ :align: center
382+
383+ An ROA has a chain of trust back to the RPKI root
356384
357385Rather than being passed around in real time like certificates in TLS,
358386the RPKI certificates are stored in repositories, which are typically
0 commit comments