Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

BGP is an inter-autonomous system routing protocol based on the distance-vector algorithm. It is used to exchange routing information across the Internet and is the only protocol that is designed to deal with a network of the Internet's size and the only protocol that can deal well with having multiple connections to unrelated routing domains.

BGP is designed to allow for sophisticated administrative routing policies to be implemented. It does not exchange information about network topology but rather a reachability information. As such, BGP is better suited to inter-AS environments and special cases like informational feeds. If you just need to enable dynamic routing in your network, consider OSPF instead.


Standards and Technologies:

...

  • AS - Autonomous System
  • ASN - Autonomous System Number
  • NLRI - Network Layer Reachability Information is what is being exchanged between BGP peers and represents how to reach the prefixes.
  • IGP - Interior Gateway Protocol
  • EGP - Exterior Gateway protocol
  • RR - Route reflector is the router in the BGP network that reflects advertisements to all the neighbors, avoiding the requirement for full BGP mesh. 
  • Route server - is the BGP router that does not participate in traffic forwarding. Routes are typically not even installed in the FIB.

Session

BGP routers exchange reachability information by means of a transport protocol, which in the case of BGP is TCP (port 179). Upon forming a TCP connection these routers exchange

...

OPEN messages to negotiate and confirm supported capabilities.

After agreeing on capabilities to use, the session is considered to be established and peers can start to exchange NLRIs via UPDATE messages. This information contains an indication of what sequence of full paths (BGP AS numbers) the route should take in order to reach the destination network (NLRI prefix).

The peers initially exchange their full routing tables and after the initial exchange, incremental updates are sent as the routing tables change. Thus, BGP does not require a periodic refresh of the entire BGP routing table.

BGP maintains the routing table version number which must be the same between any two given peers for the duration of the connection.

Keepalive messages are sent periodically to ensure that the connection is up and running, if keepalive messages are not received within the Hold Time interval, the connection will be closed.

To respond to errors or special conditions, notification messages can be generated and sent to the remote peer, notification message type also indicates whether the connection should be immediately closed.

Connection Types

There can be two types of BGP connections:

  • iBGP - is an "internal" link connecting peers from the same AS
  • eBGP - is an "external" link connecting peers belonging to two different AS-es

A particular AS might have multiple BGP speakers and provide transit service to other AS-es. This implies that BGP speakers must maintain a consistent view of routing within the AS.  A consistent view of the routes exterior to the AS is provided by having all BGP routers within the AS establish direct iBGP connections with each other (full mesh) or by utilizing a Router Reflector setup.

Using a set of administrative policies BGP speakers within the AS come to an agreement as to which entry/exit point to use for a particular destination. This information is communicated to the interior routers of the AS using the interior routing protocol (IGP), for example, OSPF, RIP, or static routing. In certain setups, iBGP can take the IGP protocol role as well.

Let's look at a very basic eBGP configuration example assuming, that Router1 IP is 192.168.1.1, AS 65531 and Router2 IP 192.168.1.2, AS 65532:

...