Coder Social home page Coder Social logo

adamvallee / peeringv1.0 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neptune-networks/peering

0.0 0.0 0.0 75 KB

A YAML to BIRD configuration generator for transit networks.

Home Page: https://neptunenetworks.org/

Shell 0.60% Ruby 31.48% HTML 67.44% Dockerfile 0.48%

peeringv1.0's Introduction

Neptune Networks Peering Config

This used to be the pipeline to build Neptune Networks' BGP peering configuration. At the time when this was in use, Neptune used BIRD 2.0.7 for its core customer routers and border routers. We relied on this pipeline to take templates and YAML and turn them into a BIRD configuration.

This BGP configuration has been built to be agnostic to Neptune Networks and should work for you as well. An example configuration file can be seen in config/router.fqdn.example.yml. Simply create a similar file with the relevant options to your network and execute the generation steps at the bottom of this README.

The YAML files in config/ go through a transformation step in which they turn into bird.conf, peers.conf, and static.conf files in the out/ directory.

BGP Community Support

The BIRD configuration in this repostiory uses BGP large communities inspired by RFC8195.

Informational

Informational BGP communities offer insight into Neptune's routing policies.

Origin

Community Description
YOUR_ASN:101:1 Originated by you
YOUR_ASN:101:2 Learned from IX
YOUR_ASN:101:3 Learned from private peer
YOUR_ASN:101:4 Learned from transit provider
YOUR_ASN:101:5 Learned from customer

Region

Octets in the function field are the numeric country identifier defined by ISO 3166-1.

Community Description
YOUR_ASN:102:840 Learned in U.S.

Site

Community Description
YOUR_ASN:103:1 Learned at NY1

Actionable

BGP communities which manipulate the routing policy.

Prepends

Community Description
YOUR_ASN:900:1 Prepend YOUR_ASN once on export to all AS's
YOUR_ASN:900:2 Prepend YOUR_ASN twice on export to all AS's
YOUR_ASN:900:3 Prepend YOUR_ASN thrice on export to all AS's
YOUR_ASN:991:xxxxx Prepend YOUR_ASN once on export to AS xxxxx
YOUR_ASN:992:xxxxx Prepend YOUR_ASN once on export to AS xxxxx
YOUR_ASN:993:xxxxx Prepend YOUR_ASN once on export to AS xxxxx

NO_EXPORT

Community Description
YOUR_ASN:600:xxxxx Do not export to AS xxxxx
YOUR_ASN:601:2 Do not export to IX peers
YOUR_ASN:601:3 Do not export to private peers
YOUR_ASN:601:4 Do not export to transit providers
YOUR_ASN:601:5 Do not export to customers
YOUR_ASN:602:840 Do not export in U.S.
YOUR_ASN:603:1 Do not export in NY1

Usage

Start by creating a new .yml file in config/ with all of the configurations you'll need. You can use config/router.fqdn.example.yml as a reference.

Once you've tuned your configuration file to your liking, build the docker image locally:

script/build

And then generate the configuration:

script/generate

This will create a file for each of the templates defined in /templates without the .erb suffix in the out/ directory.

If you find that you need to make any adjustments to the templates, simply do so and then re-run the generator.

Staying up to date

If you use this as a GitHub Repository template, you will occassionally want to sync your version of the repository with the master one located at neptune-networks/peering. To do this, you can run the following commands:

git remote add upstream https://github.com/neptune-networks/peering.git
git fetch upstream
git merge upstream/master --allow-unrelated-histories

Roadmap

  • Community-based local pref
  • PeeringDB max prefix support
  • Blackhole support

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.