My book: 'Running IPv6' by Iljitsch van Beijnum BGPexpert My book: 'BGP' by Iljitsch van Beijnum

Home · BGP Expert Test · What is BGP? · BGP Vendors · Links · Archives · Books · My BGP Book

BGP (advertisement)

Table of contents (for this page):

BGP and IPv6 routing courses

Several times a year I teach a training course about BGP in association with NL-ix. The course consists of a theory part in the morning and a practical part in the afternoon where the participants implement several assignments on a Cisco router or a VM running the Quagga routing software.

The next dates are:

  • Friday, July 5, 2019
  • Friday, October 4, 2019
Go to the NL-ix website for more information and to sign up. The location will be The Hague, Netherlands.

If you have several people who can benefit from the BGP training course or an IPv6 training course, I can teach a course at your location, in Dutch or English. Please email me to discuss the details.

Interdomain Routing & IPv6 News

  • Search for: in news only
  • Be gone, AS_SETs! (posted 2019-06-24) article 182

    As I was writing my RPKI path validation draft last week, I considered the issue of filtering BGP AS paths with AS_SETs in them.

    For those of you who haven't read the BGP specification recently, the idea is that if a BGP router takes a bunch of prefixes and aggregates these into a single prefix, it then adds the AS numbers in the AS paths of the original prefixes to the AS path of the new prefix in the form of an AS_SET. The AS_SET has all the AS numbers in it so loops can be detected, but for the purposes of comparing the AS path length, the AS_SET counts as a single AS hop, regardless of the number of ASes in the AS_SET. (Or the router can leave out one or more ASes and then set the ATOMIC_AGGREGATE attribute instead.)

    I think aggregation was added to BGP-4 as a way to start shrinking the BGP table while BGP-3 was still in use. BGP-4 added Classless Inter-Domain Routing (CIDR), allowing it to advertise (for instance) 16 class C networks to be advertised as a /20 prefix.

    However, aggregation is the easy part, you also need to get rid of those original unaggregated prefixes (the 16 class C /24s in the above example). As these may also be advertised over other paths, that's very difficult. As such, there's really not much point to this type of aggregation, and thus, no point to using AS_SETs. In fact, I didn't even mention them in my book.

    Turns out that I'm not the only one who feels AS_SETs are unnecessary: there's an RFC saying the exact same thing: RFC 6472.

    Of course this being the internet, the fact that AS_SETs are of no use doesn't mean people don't use them. This is what I got from RouteViews just now:

    >route-views>sh ip bgp | incl {
     *   5.28.128.0/20    203.181.248.168    0 7660 2516 3356 1299 12849 {12849} i
     *   5.28.144.0/22    203.181.248.168    0 7660 2516 3356 1299 12849 {12849} i
     *   5.39.176.0/21    203.181.248.168    0 7660 2516 3356 8530 {198753} i
    ...
    

    There's currently 377 out of 803582 prefixes with AS_SETs in them in the global IPv4 routing table (0.046%), and 31 of 73138 in the IPv6 BGP table (0.042%).

    Note that you can filter on an AS in an AS_SET with a Cisco BGP AS path regular expression like _8111_. The _ also matches the { and } that surround an AS_SET as well as the commas separating AS numbers in an AS_SET. However, if you filter a customer's AS path like this, as I always recommend:

    ^(65537_)+$

    it won't work, as there is nothing to match the { in this regular expression. Which is fine, there's really no good reason to use AS_SETs.

  • Path validation with RPKI draft (posted 2019-06-20) article 181

    Last week, I suggested it's time fix those BGP route leaks. I live by the words everybody complains about the weather, but nobody does anything about it, so as such I wrote an Internet-Draft with the protocol changes necessary:

    draft-van-beijnum-sidrops-pathrpki-00

    I think we can stop these route leaks with a relatively modest change to RPKI: by combining the ASes the origin trusts and the ASes the operator of an RPKI relying party server trusts, we have a list of all the ASes that may legitimately appear in the AS path as seen from this particular vantage point.

    I believe deployment will be relatively easy, as it works for the two ASes at both ends even if ASes in the middle don't participate.

    There is path filter example code in the appendix to show that this part is easy. πŸ˜€

    You can see that filter code in action here:

    http://bgpexpert.com/pathrpki/

    I'm looking forward to hearing feedback. I've started discussions on the RIPE routing-wg mailinglist and the IETF sidrops working group mailinglist. Also feel free to mail me directly or talk to me on Twitter.

    Read the whole article

  • Let's fix those BGP route leaks (posted 2019-06-13) article 180

    Last week, there was a large route leak that involved Swiss hosting company Safe Host and China Telecom. The route leak made internet traffic for European telecoms operators KPN, Swisscom and Bouygues Telecom, among others, flow through Safe Host and China Telecom against the wishes of the telecom operators involved. See this Ars Technica story for more details.

    In this post, I'm going to explain how the interaction between the technical and business aspects of internet routing have made this issue so difficult to fix. At the end I'll briefly describe a proposal that I think can actually make that happen.

    Read the whole article

  • β†’ Happy Birthday BGP (posted 2019-06-10) article 179

    Geoff Huston has written a post on the APNIC blog congratulating BGP with its 30th birthday. BGP version 1 was published as RFC 1105 in June of 1989. Five years later, the BGP version 4 was published as RFC 1654. And we're still using BGP-4 today, 25 years later! Lots of things, including IPv6 support, were added later in backward compatible ways.

    As usual, Geoff's story is comprehensive with lots of interesting details. For instance:

    ❝From time to time we see proposals to use geo-based addressing schemes and gain aggregation efficiencies through routing these geo-summaries rather than fine-grained prefixes.❞

    Sorry about that. πŸ˜€ I still think it could work, though.

    Well worth a read.

    Read the whole article Archives of all articles - RSS feed

My Books: "BGP" and "Running IPv6"

On this page you can find more information about my book "BGP". Or you can jump immediately to chapter 6, "Traffic Engineering", (approx. 150kB) that O'Reilly has put online as a sample chapter. Information about the Japanese translation can be found here.

More information about my second book, "Running IPv6", is available here.

BGP Security

BGP has some security holes. This sounds very bad, and of course it isn't good, but don't be overly alarmed. There are basically two problems: sessions can be hijacked, and it is possible to inject incorrect information into the BGP tables for someone who can either hijack a session or someone who has a legitimate BGP session.

Session hijacking is hard to do for someone who can't see the TCP sequence number for the TCP session the BGP protocol runs over, and if there are good anti-spoofing filters it is even impossible. And of course using the TCP MD5 password option (RFC 2385) makes all of this nearly impossible even for someone who can sniff the BGP traffic.

Nearly all ISPs filter BGP information from customers, so in most cases it isn't possible to successfully inject false information. However, filtering on peering sessions between ISPs isn't as widespread, although some networks do this. A rogue ISP could do some real damage here.

There are now two efforts underway to better secure BGP:

  • Secure BGP (S-BGP) is developed by Bolt, Beranek and Newman (BBN). It has been around for several years and there is a proof-of-concept implementation. S-BGP tries to secure all aspects of the BGP protocol, and subsequently needs several signature checks for each BGP update, making the protocol relatively heavy-weight. You can see my earlier rants on S-BGP at the top of this page. Note that I'm not as anti-S-BGP as I used to be any more, although I still think implementing the protocol will be expensive because routers will need lots of extra memory (up to four times as much) and CPU power (possibly dedicated crypto hardware) and this aspect deserves some serious attention.

    Secure BGP (S-BGP) index at BBN.

  • Secure Origin BGP (soBGP) has surfaced fairly recently and hails from Cisco. There are no implementations so far. soBGP mainly focusses on securing the relationship between prefixes and the source AS number, and doesn't need as many computationally expensive checks as S-BGP. However, the protocol can easily be expanded to perform more checks.

    draft-ng-sobgp-bgp-extensions-00.txt (main soBGP draft)
    draft-white-sobgp-bgp-extensions-00.txt (deployment considerations)

    (If the links don't work, the drafts have expired; you'll have to use a search engine to find them.)

There is now also a different approach to increasing BGP security using an "Interdomain Routing Validation" service that works independent from the BGP protocol itself. See what I wrote about this in interdomain routing news on this site, or jump immediately to the Working Around BGP: An Incremental Approach to Improving Security and Accuracy of Interdomain Routing paper.

The IETF RPSEC (routing protocol security) working group is active in this area.

What is BGPexpert.com?

BGPexpert.com is a website dedicated to Internet routing issues. What we want is for packets to find their way from one end of the globe to another, and make the jobs of the people that make this happen a little easier.

Your host is Iljitsch van Beijnum. Feedback, comments, link requests... everything is welcome. You can read more about me here or email me at iljitsch@bgpexpert. or follow iljitsch on Twitter.

Ok, but what is BGP?

Have a look at the "what is BGP" page. There is also a list of BGP and interdomain routing terms on this page.

BGP and Multihoming

If you are not an ISP, your main reason to be interested in BGP will probably be to multihome. By connecting to two or more ISPs at the same time, you are "multihomed" and you no longer have to depend on a single ISP for your network connectivity.

This sounds simple enough, but as always, there is a catch. For regular customers, it's the Internet Service Provider who makes sure the rest of the Internet knows where packets have to be sent to reach their customer. If you are multihomed, you can't let your ISP do this, because then you would have to depend on a single ISP again. This is where the BGP protocol comes in: this is the protocol used to carry this information from ISP to ISP. By announcing reachability information for your network to two ISPs, you can make sure everybody still knows how to reach you if one of those ISPs has an outage.

Want to know more? Read A Look at Multihoming and BGP, an article about multihoming I wrote for the O'Reilly Network.

For those of you interested in multihoming in IPv6 (which is pretty much impossible at the moment), have a look at the "IPv6 multihoming solutions" page.

Are you a BGP expert? Take the test to find out!

These questions are somewhat Cisco-centric. We now also have another set of questions and answers for self-study purposes.

You are visiting bgpexpert.com over IPv4. Your address is 34.229.113.106.