Lecture 12

The 5 takeaway messages on BGP

  1. Operation regulated by agreements (i.e. money)
  2. Routing is based on policies
  3. Outbound traffic is under your control: you decide which prefixes to accept
    Inbound traffic is dependent on what your peers do with your advertisements
  4. Based on Autonomous Systems, used to create AS paths

BGP Attributes

In order of path selection importance:

Not used for path selection:

Route Selection Criteria

Tiebreakers:

BGP Protocol

State Machine

Pasted image 20251010103125.png|400
Description of the above

Pasted image 20251010103444.png|400

The Messages

BGP > TCP > IP
Pasted image 20251010104300.png|400
Types:

BGP OPEN

Pasted image 20251010104714.png|400
Pasted image 20251010104727.png|400

Capability codes:

BGP UPDATE

Pasted image 20251010104847.png|400
Pasted image 20251010104859.png|400

BGP NOTIFICATION

Pasted image 20251010104918.png|400
Pasted image 20251010104931.png|400

BGP REFRESH

Table of prefixes per peer
Incoming routes are filtered on the current policy
If policy changes due to new agreements:

  1. Clean routing table, and reset the whole connection (hard reset), creates downtime
  2. Instead, do a soft reset. Leave current table intact and ask the neighbour to resend their prefixed, thereby running them through the new policy
    Pasted image 20251010105442.png|400

Traffic Engineering

Outbound

Outbound TE works by manipulating incoming routes

Relatively simple, as it is done through your own policies, you are in control

Examples:

(Prefer customer, so that routes advertised by both go directly to the actual destination, i.e. the customer)
Pasted image 20251010110027.png|400
Any routes advertised by both will go through main provider, routes only advertised by backup will use the backup
Pasted image 20251010110039.png|400
Always use backup link as long as it is up
Pasted image 20251010110050.png|400

Inbound Traffic Engineering

Inbound TE works by manipulating outgoing routes

More complex than outbound

Last ditch effort: advertise a more specific route, something with a longer prefix

Examples:

Advertise a longer path to a provider/router you do not want traffic from:
Pasted image 20251010111427.png|400
However, providers can "overrule" this and use your routes anyway
You can make the path as long as you want, in the end they make the choice
Pasted image 20251010111501.png|400
Through agreements on what community numbers mean, you can still accomplish less traffic from certain providers
Pasted image 20251010111553.png|400

Communities

An optional, transitive attribute

Certain communities have well-known semantics:

When receiving a community from an upstream you:

When sending communities outbound to your upstream

Hot Potato Routing

Hot potato: you want the traffic out of your network/AS ASAP

Choose egress with tiniest IGP distance (the closest router to your device)
Pasted image 20251010112353.png|400

But hot potato can also cause issues, e.g. for the other party/AS as it might cause the use of a bad route on their end
Pasted image 20251010113830.png|400

Pros:

Cold Potato Routing with MED

Inform provider through MED about your preference (lower wins)
Pasted image 20251010114325.png|400

iBGP Scaling

Meshes

Pasted image 20251010114402.png|400
Pasted image 20251010114412.png|400

BGP in Datacentres

Allows the network to carry both L2 and L3 addresses

BGP Security

For example, one can advertise bogus routes and:

IP prefix borrowing: look for unused prefixes and use them for malicious purposes

Stability versus Security

No authority to check which prefix belongs to which AS
What neighbours announce to you cannot be controlled
BGP routing depends on trust

BGPSec

Use BGPsec_PATH instead of AS_PATH
Include the intended recipient AS
Adds signatures of all information added to the path, to see who did what
Support incremental deployment: fall back to AS_PATH when needed

Is resource intensive, but not as much as sBGP
Updates are larger, due to signatures
Each update contains only a single prefix
Separate update sent to each peer

MANRS

Four actions that network operators should take:

RPKI and ROA

RPKI is based on X.509 certs
Route Origin Authorisation (ROA)

Validated through a separate protocol (RPKI-PRT)
When routes fail to validate (optionally) discard them

Currently for IPv4

Beyond BGP

BGP expresses policy -> Policy is messy -> BGP is messy

Alternatives:
Locator-Identifier Separation Protocol (LISP)
SCION
Named Data Networking (NDN)