You are here: Home > Publications > RIPE Labs > Pier Carlo Chiodi > The BGP Large Communities Playground

The BGP Large Communities Playground

Pier Carlo Chiodi — 11 Jan 2017
Contributors: Job Snijders
This article describes the BGP Large Communities Playground, and encourages people to utilise automated regression testing and compliance checking when developing new protocol features.

BGP Large Communities represent a significant effort coordinated by the network operator community to extend the functionality described in the RFC1997. This effort is meant to provide a type of BGP Communities in a post-16-bit ASN world. The important difference between the RFC1997 (or Classic Communities) and Large Communities is that Large Communities were explicitly designed to accommodate all ASNs, including 32-bit ASNs. The trouble with Classic Communities is that one cannot fit a 32-bit integer in the 16-bit field available to store the ASN. BGP Large Communities solve the issue with a 96-bit construct, in which one can store an ASN followed by 64 bits of locally significant data. Perhaps the new canonical format will be ASN:function:parameter?

Aside from measurements to verify deployability, big changes like these involve writing new software. Especially when infrastructure equipment from a multitude of vendors and core functions like BGP routing are involved, interoperability tests must be run in order to verify that everything works according to standards.

Since the beginning, the main goal of the BGP Large Communities Playground was to facilitate regression testing and compliance checking by bringing open source implementations together in a single context and to quickly have instances of each open source project up and running on top of the latest available code (the so-called "master" or "HEAD" branch).

The main benefits of the BGP Large Communities Playground are:

  • Run instances of different BGP implementations simultaneously
  • Have all implementations interoperate with each other in an isolated virtual environment
  • Allow for quick turnaround on code changes by making it easy to rebuild and retest the test scenario after even a single line code change
  • Reduce the time between writing code and performing a test, specifically for people working on open source software they are less familiar with (the playground automates requirements, dependencies and building itself)

Docker is a very interesting platform to establish a construct such as the BGP Large Communities Playground on. A single small virtual machine can run all the open source BGP daemons, whose setup files could be hosted on GitHub and could be accessed within DockerHub to dynamically rebuild containers' images and daemons' binaries. New containers were added to the Playground as soon as OSS developers merged BGP Large Communities patches into their master branches, up to the five implementations currently covered by the Playground itself: ExaBGP, GoBGP, BIRD, pmacct and Quagga.

While BGP Large Communities support was added to each software, compliance with the Internet Draft's requirements was tested using the Playground. The following topics were addressed:

  • The ability to correctly send and receive Large Communities
  • The ability to correctly display them to a network operator (through so-called "show" commands)
  • The ability to use them in routing policies (match, add, delete)
  • The way in which corner cases and protocol errors are treated

In particular, to prevent a repetition of flaws like those made in the past (caused by buggy AS4_PATH implementations), special attention was dedicated to the behaviour regarding malformed BGP Path Attribute handling in the context of Large Communities and compliance with the treat-as-withdraw approach that is put forward in the specification.

The results obtained from these tests highlighted some issues and some areas that needed improvement. They were promptly taken care of by developers. Not only cosmetic bugs were found, but also issues that could have impaired the stability of BGP sessions.

During these tests it was also discovered that the whole BGP ecosystem necessary for network operations could perhaps use some improvement: patches for tcpdump, zebra-dump-parser and mrtparse were developed and released to support the new BGP Large Communities Attribute.

The Internet Draft on BGP Large Communities has advanced through the IETF standardisation process to the point where it will be published as an RFC. However, that does not mean the end for the BGP Playground project! The Playground continues to be updated as new open source projects add BGP Large Communities support to their code. Please feel free to join, to propose new testing scenarios or to run your own tests to improve and facilitate the adoption of Large Communities.

0 Comments

Add comment

You can add a comment by filling out the form below. Comments are moderated so they won't appear immediately. If you have a RIPE NCC Access account, we would like you to log in.