BGP

What

Exterior Gateway Protocol (EGP) for routing between ASes
Policy-based rather than metric based
Money makes the BGP go round

Why

Allows the use of policies, enabling ASes to make deals with one another on routing
Path vector algorithm: prevents loops
Flexible:
Complex policies
Traffic engineering
Multi-homing
Load balancing

Concepts

Autonomous System (AS)
An administrative domain with a unified routing policy, e.g. an ISP or large company
Each AS has a unique AS Number
BGP sessions are on port 179 using TCP

BGP types
External BGP (eBGP): used to route between ASes
Internal BGP (iBGP): within one AS

Communities
A way to communicate preferred treatment
The meaning of certain numbers has to be agreed upon beforehand between 2 or more parties
When a route is forwarded to a party that does not have an agreement on community meanings, the community field is emptied

Multi-Exit-Discriminator (MED)
- Used to tell peer which entry point to prefer
- Lower MED = better
- Influences incoming traffic
- Only a suggestion

Tables

Attributes

Neighbour States

Messages

(S)Election

All BGP speakers are equal, but there is path selection
The following attributes are used:

How

  1. Configure BGP on your router
    • Set AS number
    • Set router ID
    • Define peers
    • Advertise certain network(s)
  2. TCP connection is initiated to peers (3-way handshake)
  3. R1 send BGP OPEN message
  4. R2 receives, validates and if the params are acceptable sends an OPEN back to R1
  5. R1 receives and if the params are acceptable sends a KEEPALIVE (goes to OpenConfirm state)
  6. Once KEEPALIVEs have been exchanged, both routers go to Established state
  7. Send BGP UPDATE messages to exchange routes
  8. Receive updates and process them, if acceptable store them and populate the routing table