Chapter 16. BGP

Table of Contents

16.1. What is BGP?
16.2. BGP Setup
16.2.1. Overview
16.2.2. Standards
16.2.3. Simple example setup
16.2.4. Peer type
16.2.5. Route filtering
16.2.5.1. Matching attributes
16.2.5.2. Action attributes
16.2.6. Well known community tags
16.2.7. Announcing black hole routes
16.2.8. Grey holes
16.2.9. Announcing dead end routes
16.2.10. Bad optional path attributes
16.2.11. <network> element
16.2.12. <route>, <subnet> and other elements
16.2.13. Route feasibility testing
16.2.14. Status
16.2.15. Diagnostics
16.2.16. Router startup and shutdown
16.2.17. TTL security

16.1. What is BGP?

BGP (Border Gateway Protocol) is the protocol used between ISPs to advise peers of routes that are available. Each ISP tells its peers the routes it can see, being the routes it knows itself and those that it has been advised by other peers.

In an ideal world everyone would tell everyone else the routes they can see; there would be almost no configuration needed; all packets would find the best route accross the Internet automatically. To some extent this is what happens between major transit providers in the Internet backbone.

In practice things are not that simple and you will have some specific relationships with peers when using BGP. For most people there will be transit providers with which you peer. You can receive a full table from each transit provider, containing routes to everywhere in the Internet via that provider. The FB9000 can then decide which provider has the best route to any destination. You can advise the transit provider of your own routes for your own network so that they can route to you, and they tell their peers that they can route to you via that provider. This only works if you have IP address space of your own that you can announce to the world - unless you are an ISP then this is not commonly the case.

Even though IPv4 address space has already run out, it is possible to obtain IPv6 PI address space and an AS number to announce your own IPv6 addresses to multiple providers for extra resilience.

You can use BGP purely as an internal routing protocol to ensure parts of your network know how to route to other parts of your network, and can dynamically reroute via other links when necessary.

In most cases, unless you are an ISP of some sort, you are not likely to need BGP.