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 two training courses, one about BGP and one about IPv6. The BGP course is half theory and half hands-on practice, and so is the new IPv6 routing course. Previously, we did an IPv6 course without a hands-on part.

The courses 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 (in groups of two participants per router).

Dates for upcoming courses in 2015 are:

  • June 1: BGP (English)
  • June 2: IPv6 routing (English)
  • October 5: BGP (probably in Dutch)
  • October 6: IPv6 routing (probably in Dutch)
Go to the NL-ix website to find more information and sign up. The location will be The Hague, Netherlands.

Interdomain Routing & IPv6 News

  • Search for: in news only
  • RPKI is ready for real-world deployment (posted 2015-04-30) article 164

    For some years now, the Regional Internet Registries have been rolling out RPKI. The Resource Public Key Infrastructure allows holders of IP addresses to authorize an autonomous system to inject those addresses in BGP. (See here for an overview of how RPKI works and more links.)

    I've always thought it would be hard to deploy RPKI in the real world, because it's just way too easy for a certificate or ROA (route origination authorization) to expire. If that then leads to routes becoming invalid and the addresses in question being unreachable, that would be a good example of the cure being worse than the disease.

    Fortunately, that's not the case: RPKI is ready for real-world deployment today.

    The way to deploy RPKI that's suggested in RFC 6483 as well as the relevant Cisco and Juniper documentation is to assign different local preference values to the three possible RPKI states, such as:

    • Valid (RPKI checks out): local preference of 200 (highest)
    • Unknown (no RPKI for this prefix): local preference of 100 (normal)
    • Invalid (RPKI present but doesn't check out): local preference of 50 (lowest)

    So packets will follow a path that is RPKI-validated if available. If not, they follow a path that isn't covered by RPKI if that's available. Only if there's no "valid" or "unknown" paths, the packets will be sent over an "invalid" path that is covered by RPKI, but validation failed. The trouble with this approach is that it still allows for invalid more specific prefixes to hijack traffic. For instance:

    RIPE has a ROA for prefix 193.0.0.0/21 that allows AS 3333 to originate that prefix, with a maximum prefix length of /21. So if AS 4444 originates 193.0.0.0/21, that will result in the following BGP table:

        Network       Next Hop       Metric LocPrf Weight Path
    >*  193.0.0.0/21  19.11.111.244      10    200      0 3333 i
     *                29.249.178.10      10     50      0 4444 i
    

    So effectively, the path through AS 4444 is ignored. However, AS 4444 could also do this:

        Network       Next Hop       Metric LocPrf Weight Path
    >*  193.0.0.0/21  19.11.111.244      10    200      0 3333 i
    >*  193.0.0.0/24  29.249.178.10      10     50      0 4444 i
    >*  193.0.1.0/24  29.249.178.10      10     50      0 4444 i
    >*  193.0.2.0/24  29.249.178.10      10     50      0 4444 i
    >*  193.0.3.0/24  29.249.178.10      10     50      0 4444 i
    >*  193.0.4.0/24  29.249.178.10      10     50      0 4444 i
    >*  193.0.5.0/24  29.249.178.10      10     50      0 4444 i
    >*  193.0.6.0/24  29.249.178.10      10     50      0 4444 i
    >*  193.0.7.0/24  29.249.178.10      10     50      0 4444 i
    

    So even though the path towards the /21 is still routed to AS 3333, the packets flow to AS 4444 because of the longest match first rule. Solution: filter out "invalid" prefixes completely.

    But then, what happens when RIPE forgets to renew their certificate or ROA in time? If their prefix would then revert to "invalid", it would disappear from routing tables everywhere, and RIPE would be unreachable:

        Network       Next Hop       Metric LocPrf Weight Path
    

    In this scenario, it would be very dangerous to filter "invalid" prefixes, as RPKI is still relatively immature and mistakes will happen.

    However, it turns out that the results of expired certificates and ROAs aren't actually problematic. In a post to the NANOG list, Alex Band points out:

    ❝If ARIN (or another other RIR) went offline or signed broken data, all signed prefixes that previously has the RPKI status "Valid", would fall back to the state "Unknown", as if they were never signed in the first place. The state would NOT be "Invalid".❞

    So what would happen is this:

        Network       Next Hop       Metric LocPrf Weight Path
    >*  193.0.0.0/21  19.11.111.244      10    100      0 3333 i
    

    Obviously, in this case the protection against unauthorized origination of the prefixes in question would go away, but in the normal situation where nobody tries to hijack those prefixes, they would still be reachable and a mistake with certificate or ROA expiration wouldn't immediately lead to a network disappearing off of the internet.

    In other words: deploy RPKI today. It doesn't protect against all forms of malicious address hijacking, but it does offer very robust protection against accidental unauthorized route origination, such as the infamous Youtube/Pakistan incident. Also, you can run an RPKI validator locally without the need for your upstream ISPs or peers to do the same.

  • Documentation ASNs and IP prefixes (posted 2015-04-24) article 163

    As you may have noticed, I write about BGP from time to time. When coming up with example configurations, there's always the challenge of which AS numbers and IP addresses/prefixes to use. Although it's unlikely people will simply copy numbers and addresses from examples into their own BGP configurations, experience with NTP has shown that this can be a real problem, so it's a good idea to avoid "real" addresses and numbers in examples.

    One obvious choice for IPv4 addresses in examples is the RFC 1918 space: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0. For IPv6, you could use the unique (site) local addresses (ULA, RFC 4193: fc00::/7, or, more precisely, the ones you get to generate yourself in fd00::/8. I wouldn't recommend using the original site local IPv6 addresses (fec0::/10), as these are "deprecated" in RFC 3879.

    For AS numbers, there's the private range 64512 - 65534 (16 bit) and 4200000000 - 4294967294 (32 bit) in the IANA registry.

    However, there are also address and AS number ranges specifically set aside for example and documentation use. These have the advantage that they can easily be recognized as being intended for documentation, and won't clash with ranges used in private networks. They are:

    • 16-bit AS numbers: 64496 - 64511 (RFC 5398)
    • 32-bit AS numbers: 65536 - 65551 (RFC 5398)
    • IPv4 addresses: 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 (RFC 5737)
    • IPv6 addresses:2001:db8::/32 (as in "debate") (RFC 3849)

    I actually didn't know about the documentation AS number ranges and the second and third IPv4 documentation ranges. The extra IPv4 ranges will be very useful, as just 192.0.2.0/24 often isn't enough in more complex BGP examples, especially as I don't want to give the impression that it's possible to deaggregate a /24 into smaller parts. The 16-bit documentation AS numbers will also be useful. Unfortunately, the 32-bit ones aren't really useful as they look too much like 16-bit numbers. However, the 65552 - 131071 range is "reserved" so I guess I'll continue to use AS numbers in the 9xxxx range as examples of 32-bit ASNs.

  • "Get Your Hands Dirty with BGP" tutorial at next month's RIPE meeting (posted 2015-04-15) article 162

    At the RIPE-70 meeting next month in Amsterdam I'll be doing a tutorial on BGP: "Get Your Hands Dirty with BGP".

    This is the "light" version of the regular BGP training that I do several times a year: the theory part will be around 30 minutes and then about two hours of hands-on BGP using the Quagga routing software running in a virtual machine on the participant's laptops.

    If you're attending the RIPE meeting and you're interested in participating, please go to this page and send me an email so I know how many people to expect.

  • "no synchronization" in Cisco configurations (posted 2015-02-04) article 161

    This text used to be on the BGPexpert.com home page, but Cisco now includes "no syncronization" in the default configuration, so it's unlikely anyone is still going to run into trouble because of this, so I've moved this to a separate page out of the way.

    When you run BGP on two or more routers, you need to configure internal BGP (iBGP) between all of them. If those routers are Cisco routers, they won't work very well unless you configure them with no synchronization.

    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 54.87.77.15.