Details of the burble.dn42 routing policy.

Routing Policy

With a global network and multiple peers, the burble.dn42 network typically has many alternative route paths for reaching a particular destination. The routing policy aims to keep route selection sane, and avoid sending traffic outside of a region where possible.

Policy Rules

  1. Direct routes for prefixes belonging to a peer should be given the highest priority.
    So that traffic to peer networks is routed over the burble.dn42 network directly to the peer and not via an external 3rd party
  2. Routes to the anycast prefixes should be prioritised through stable, low latency peers.
    To ensure stability within the network and provide good routes for well known destinations (e.g. DNS and the DN42 wiki)
  3. Where prefixes are tagged with a DN42 region, they should be routed locally or within the burble.dn42 network.
    To avoid sending traffic across regions when this could have been avoided.
    The AS path length is also increased between regions to pursuade external routers to also prefer local hosts.
  4. Prioritise by shortest path, then lowest latency

Policy Implementation

bgp local_pref

The local_pref for routes is set on entry, and then propogated across the whole network. This forces the network to prefer routes that, where possible, send traffic through the burble.dn42 network to a local peer, rather than sending cross regional traffic through external peers (aka Cold Potato Routing).

Local Pref   Route Class
3000   burble.dn42 dynamic / anycast routes
2000   burble.dn42 internal networks
1000   Peer networks (AS path len = 1)
500   Route received in same DN42 region as it originated
100   Default

bgp med

The med attribute is used to implement a latency based metric across the network. Scripts are used to gather the latency between nodes (using ping) and this is then incorporated in to the ansible scripting that generates the peer configuration for the internal mesh. The peer configuration sets the med to be the latency in ms between nodes (in milliseconds * 10). A penalty of 500 is added for each hop to encourange direct routing between nodes.

med = (latency between nodes in ms * 10) + (500 per hop)

The med metric is exported to external peers to help them decide how to route traffic to the burble.dn42 network.