The internet standard Inter-Autonomous System Routing Protocol used for connecting Internet Service Providers (ISPs).

BGP thus routes Packets to Subnets or a collection of subnets. Their destination therefore takes the form (x,I), where x is a an IP prefix (e.g., 138.16.68/22), and I is an interface number of a Router in the subnet.

BGP in general provides each Router a way to:

  • Obtain information for paths to other subnets.
  • Determining the best (according to specific policy) routes to these subnets.

Obtaining information for paths

Each Subnet broadcast their prefix and other attributes used for route optimisation to neighbours, which in turn pass on the information to their neighbour, thus propagating the information through the network of subnets.

This is done by Routers connect via semi-permanent TCP connections using Port 179. The information is send through an AS using Internal BGP (iBGP) Connections and then sent further to other ASs using External BGP (eBGP) Connections.

The two most important attributes, that are broadcast along with prefixes are:

  • AS-PATH: list of ASs that the information has passed through. This list is generated by having an AS append its prefix in the list, when it receives a prefix, before sending it on.
  • NEXT-HOP: the IP Address of the router interface that begins the AS-PATH. In other words the next router outside the AS when following the AS-PATH.

A prefix along with its attributes is in BGP-jargon called a route.

Determining the best routes

If there are multiple routes to the same prefix, then the following elimination rules are used until one route remains:

  1. a route is assigned a local preferences value as one of its attributes (which depend on the particular policy). The route(s) with the highest local preference value is selected.
  2. the route(s) with the shortest AS-PATH is selected.
  3. Hot Potato Routing is used, i.e. the route(s) with the closest NEXT-HOP router is selected.
  4. If multiple routes remain then finally BGP identifiers are used to select the route (see Sterwart 1999).