BGP Basics – Part 1

In this series of posts I will be taking you through what BGP is, how to configure a peering session, how to advertise your public address space and hopefully a other things like how to use community tags and route maps.

What is BGP?

BGP stands for border gateway protocol and is the exterior routing protocol used to exchange routes between autonomous systems (networks) which form the internet today.

With BGP one network will peer with another “upstream” network and announce the downstream networks public IP address space to the upstream network, which in turn will propogate these routes to their upstream provider and the internet (usually).

What do we need to bring up a BGP peer?

To bring up a bgp session we need the following three things:

  • Portable address space and ASN assigned by an RIR (regional internet registry)
  • A router capable of running the BGP process
  • Someone to peer with (establish a bgp session)

How do you get an AS number?

RIR’s are responsible for assigning public address space per region, there are five RIR’s:

When an organisation applies for and is granted portable address space, they are assigned an AS number (autonomous system number). The AS number identifies the public address space and the organisation responsible for originating these routes onto the internet.

Which routers support BGP?

Most non consumer routers will support BGP in some form, however to receive a full global routing table you will need a device with enough memory and CPU to both hold the downloaded routes and compute the best path for each and store in memeory (if receiving multiple feeds).

Most organisations that use BGP will be multi-homed, meaning they will have two separate internet connections each with a BGP session to its respective upstream provider, receiving a full global table from each peer, this is generally for redundancy should one of the internet connections fail. From both these BGP feeds a single BGP table is computed installing the routes with the best path to each destination. When one of the internet connections fails the failed sessions routes are removed from the local table and the less prefered paths installed.

In this series of articles I will using Vyatta to demonstrate how to configure BGP, running Vyatta in a VM has sufficient resources to run BGP to one or two upstream providers (or more).

Who do we peer with?

When you set out to purchase a connection to the internet (transit link) this is the time you would discuss with your ISP the possibility of talking to them via BGP. If they allow this they will generally give you the option of receiving a full global routing table or just a default route to the internet. With a default route all traffic will match this route and be sent to the ISP regardless of the destination.

If you choose a default route, this can greatly simplify the model of router needed as you will not need a powerful CPU and lots of memory because you will only be receiving a single route. Most of the time, however, if you want to use BGP you would be multi-homed (or be connected to multiple peering points in addition to transit links) and want to receive the full global routing table from each peer to determine the best path to a destination.

In the next article we will go into how to configure a bgp peering session.

Leave a Reply