Encyclopedia  |   World Factbook  |   World Flags  |   Reference Tables  |   List of Lists     
   Academic Disciplines  |   Historical Timeline  |   Themed Timelines  |   Biographies  |   How-Tos     
Sponsor by The Tattoo Collection
Border Gateway Protocol
Main Page | See live article | Alphabetical index

Border Gateway Protocol

The border gateway protocol (BGP) is one of the core routing protocols in the Internet. It works by maintaining a table of IP networks or 'prefixes' which designate network reachability between autonomous systems (AS). It is described as a path vector protocol.

BGP supports classless interdomain routing and uses route aggregation to decrease the size of routing tables. Since 1994, version four of the protocol has been in use on the Internet; all previous versions are considered obsolete.

Very large private IP networks can make use of BGP also; an example would be the joining of a number of large OSPF networks where OSPF by itself would not scale to size. Another reason to use BGP would be multihoming a network for better redundancy.

Most Internet users do not use BGP directly. However, since all Internet service providers must use BGP to establish routing between one another, it is one of the most important protocols of the Internet. Compare and contrast this with Signalling System 7, which is the inter-provider core call setup protocol on the PSTN.

BGP operation

BGP neighbours, or peers, are established by manual configuration between routers to create a TCP session on port 179. Among routing protocols, BGP is unique in using TCP as its transport protocol.

BGP comprises two parts: Interior Border Gateway Protocol and Exterior Border Gateway Protocol. IBGP is used within a single autonomous system (AS) while EBGP is used between different autonomous systems. All routers within a single AS and participating in BGP routing must be configured in a full mesh: each router must be configured as peer to every other router. This causes obvious scaling problems, since the number of required connections grows quadratically with the number of routers involved. To get around this, two solutions are built into BGP: route reflectors and confederations.

Route reflectors reduce the number of connections required in an AS. A single or redundantly two routers are route reflectors: other routers in the AS need only be configured as peer to them.

Confederations are used in very large networks where a large AS can be configured to encompass smaller more manageable internal ASs. Confederations can be used in conjunction with route reflectors.

BGP problems and mitigation

A feature known as 'dampening' is built into BGP to mitigate the effects of route flapping. Flapping of routes can be caused by WAN links or physical interfaces mending and breaking or by misconfigured or mismanaged routers. Without dampening, routes can be injected and withdrawn rapidly from routing tables, possibly causing a heavy processing load on routers thus affecting overall routing stability.

With dampening, a route's flapping is exponentially decayed. At first instance when a route becomes unavailable but quickly reappears for whatever reason, then the dampening does not take effect, so as to maintain the normal fail-over times of BGP. At the second occurrence, BGP shuns that prefix for a certain length of time; subsequent occurrences are timed out exponentially. After the abnormalities have ceased and a suitable length of time has passed for the offending route, prefixes can be reinstated and its slate wiped clean. Dampening can prevent malicious denial of service attacks also; dampening timings are highly customisable.

One of the largest problems that BGP, and indeed the Internet infrastructure as a whole, faces comes from the fact of exponential growth of the Internet routing table. One of the many advantages of IP version 6's huge address space potentially is to solve this by better use of route aggregation.

BGP version four is specified in request for comment RFC 1771.

External links