Misplaced Pages

Border Gateway Protocol

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

Early research and development:

#4995

38-647: Merging the networks and creating the Internet: Commercialization, privatization, broader access leads to the modern Internet: Examples of Internet services: Border Gateway Protocol ( BGP ) is a standardized exterior gateway protocol designed to exchange routing and reachability information among autonomous systems (AS) on the Internet . BGP is classified as a path-vector routing protocol , and it makes routing decisions based on paths, network policies, or rule-sets configured by

76-446: A TCP session on port 179. A BGP speaker sends 19-byte keep-alive messages every 30 seconds (protocol default value, tunable) to maintain the connection. Among routing protocols, BGP is unique in using TCP as its transport protocol. When BGP runs between two peers in the same autonomous system (AS), it is referred to as Internal BGP ( iBGP or Interior Border Gateway Protocol ). When it runs between different autonomous systems, it

114-463: A VPN tunnel, allowing two remote sites to exchange routing information in a secure and isolated manner. The main difference between iBGP and eBGP peering is in the way routes that were received from one peer are typically propagated by default to other peers: These route-propagation rules effectively require that all iBGP peers inside an AS are interconnected in a full mesh with iBGP sessions. How routes are propagated can be controlled in detail via

152-498: A network administrator . BGP used for routing within an autonomous system is called Interior Border Gateway Protocol ( iBGP ). In contrast, the Internet application of the protocol is called Exterior Border Gateway Protocol ( EBGP ). The genesis of BGP was in 1989 when Kirk Lougheed , Len Bosack and Yakov Rekhter were sharing a meal at an IETF conference. They famously sketched the outline of their new routing protocol on

190-519: A MED with the highest possible value. The current standard specifies that missing MEDs are treated as the lowest possible value. Since the current rule may cause different behavior than the vendor interpretations, BGP implementations that used the nonstandard default value have a configuration feature that allows the old or standard rule to be selected. The local preference, weight, and other criteria can be manipulated by local configuration and software capabilities. Such manipulation, although commonly used,

228-508: A local preference value from local policy rules and then compares the local preference of all routes from the neighbor. BGP communities are attribute tags that can be applied to incoming or outgoing prefixes to achieve some common goal. While it is common to say that BGP allows an administrator to set policies on how prefixes are handled by ISPs, this is generally not possible, strictly speaking. For instance, BGP natively has no concept to allow one AS to tell another AS to restrict advertisement of

266-472: A number of decision factors, more than the ones that are used by any other common routing process, for selecting NLRI to go into the Loc-RIB. The first decision point for evaluating NLRI is that its next-hop attribute must be reachable (or resolvable). Another way of saying the next-hop must be reachable is that there must be an active route, already in the main routing table of the router, to the prefix in which

304-492: A peer to every other router. This causes scaling problems, since the number of required connections grows quadratically with the number of routers involved. To alleviate the problem, BGP implements two options: route reflectors (RFC 4456) and BGP confederations (RFC 5065). The following discussion of basic update processing assumes a full iBGP mesh. A given BGP router may accept network-layer reachability information (NLRI) updates from multiple neighbors and advertise NLRI to

342-430: A prefix to only North American peering customers. Instead, an ISP generally publishes a list of well-known or proprietary communities with a description for each one, which essentially becomes an agreement of how prefixes are to be treated. Examples of common communities include: An ISP might state that any routes received from customers with following examples: The customer simply adjusts their configuration to include

380-523: A state variable that tracks which of these six states the session is in. The BGP defines the messages that each peer should exchange in order to change the session from one state to another. The first state is the Idle state. In the Idle state, BGP initializes all resources, refuses all inbound BGP connection attempts and initiates a TCP connection to the peer. The second state is Connect. In the Connect state,

418-451: A type field. The extended format consists of one or two octets for the type field followed by seven or six octets for the respective community attribute content. The definition of this Extended Community Attribute is documented in RFC 4360. The IANA administers the registry for BGP Extended Communities Types. The Extended Communities Attribute itself is a transitive optional BGP attribute. A bit in

SECTION 10

#1732766099005

456-657: Is a stub . You can help Misplaced Pages by expanding it . Multiprotocol BGP Multiprotocol Extensions for BGP ( MBGP or MP-BGP ), sometimes referred to as Multiprotocol BGP or Multicast BGP and defined in IETF RFC 4760, is an extension to Border Gateway Protocol (BGP) that allows different types of addresses (known as address families) to be distributed in parallel. Whereas standard BGP supports only IPv4 unicast addresses, Multiprotocol BGP supports IPv4 and IPv6 addresses and it supports unicast and multicast variants of each. Multiprotocol BGP allows information about

494-504: Is an error it is because one of the fields in the OPEN or UPDATE message does not match between the peers, e.g., BGP version mismatch, the peering router expects a different My AS, etc. The router then sends a Notification message to the peer indicating why the error occurred. Example of NOTIFICATION Message KeepAlive messages are sent periodically, to verify that remote peer is still alive. keepalives should be sent at intervals of one third

532-408: Is called External BGP ( eBGP or Exterior Border Gateway Protocol ). Routers on the boundary of one AS exchanging information with another AS are called border or edge routers or simply eBGP peers and are typically connected directly, while iBGP peers can be interconnected through other intermediate routers. Other deployment topologies are also possible, such as running eBGP peering inside

570-549: Is crucial for communications across the Internet . Notable exterior gateway protocols include Exterior Gateway Protocol (EGP), now obsolete, and Border Gateway Protocol (BGP). By contrast, an interior gateway protocol is a type of protocol used for exchanging routing information between gateways (commonly routers ) within an autonomous system (for example, a system of corporate local area networks ). This routing information can then be used to route network-level protocols like IP . This computer networking article

608-477: Is outside the scope of the standard. For example, the community attribute (see below) is not directly used by the BGP selection process. The BGP neighbor process can have a rule to set local preference or another factor based on a manually programmed rule to set the attribute if the community value matches some pattern-matching criterion. If the route was learned from an external peer the per-neighbor BGP process computes

646-576: Is to advertise the value, typically based on delay, of multiple ASs that have a presence at an IXP , that they impose to send traffic to some destination. Some routers (like Juniper) will use the Metric from OSPF to set MED. Examples of MED used with BGP when exported to BGP on Juniper SRX note: "Marker" and "Length" is omitted from the examples. Example of Open Message Only changes are sent, after initial exchange, only difference (add/change/removed) are sent. Example of UPDATE Message If there

684-403: Is used as a generalized signaling protocol to carry information about routes that may not be part of the global Internet, such as VPNs. In order to make decisions in its operations with peers, a BGP peer uses a simple finite state machine (FSM) that consists of six states: Idle; Connect; Active; OpenSent; OpenConfirm; and Established. For each peer-to-peer session, a BGP implementation maintains

722-668: The Adj-RIB-In , Adj-RIB-Out and the Loc-RIB together in the same data structure, with additional information attached to the RIB entries. The additional information tells the BGP process such things as whether individual entries belong in the Adj-RIBs for specific neighbors, whether the peer-neighbor route selection process made received policies eligible for the Loc-RIB , and whether Loc-RIB entries are eligible to be submitted to

760-427: The holdtime . Example of KEEPALIVE Message Defined in RFC 7313 . Allows for soft updating of Adj-RIB-in , without resetting connection. Example of ROUTE-REFRESH Message BGP is "the most scalable of all routing protocols." Exterior gateway protocol An exterior gateway protocol is an IP routing protocol used to exchange routing information between autonomous systems . This exchange

798-414: The route-maps mechanism. This mechanism consists of a set of rules. Each rule describes, for routes matching some given criteria, what action should be taken. The action could be to drop the route, or it could be to modify some attributes of the route before inserting it in the routing table. During the peering handshake, when OPEN messages are exchanged, BGP speakers can negotiate optional capabilities of

SECTION 20

#1732766099005

836-516: The "Opaque Extended Community", the "Route Target Community", and the "Route Origin Community". A number of BGP QoS drafts also use this Extended Community Attribute structure for inter-domain QoS signalling. With the introduction of 32-bit AS numbers, some issues were immediately obvious with the community attribute that only defines a 16-bit ASN field, which prevents the matching between this field and

874-464: The Adj-RIB-In, any routes that are withdrawn by the neighbor. Whenever a conceptual Adj-RIB-In changes, the main BGP process decides if any of the neighbor's new routes are preferred to routes already in the Loc-RIB. If so, it replaces them. If a given route is withdrawn by a neighbor, and there is no other route to that destination, the route is removed from the Loc-RIB and no longer sent by BGP to

912-433: The BGP route to the destination will not be put into the routing table. Once the interface goes down, and there are no more preferred routes, the Loc-RIB route would be installed in the main routing table. BGP carries the information with which rules inside BGP-speaking routers can make policy decisions. Some of the information carried that is explicitly intended to be used in policy decisions are: The BGP standard specifies

950-480: The ISP assigns to advertised routes instead of using MED (the effect is similar). The community attribute is transitive, but communities applied by the customer very rarely propagated outside the next-hop AS. Not all ISPs give out their communities to the public. The BGP Extended Community Attribute was added in 2006, in order to extend the range of such attributes and to provide a community attribute structuring by means of

988-544: The OpenConfirm state. Keepalive messages are exchanged and, upon successful receipt, the router is placed into the Established state. In the Established state, the router can send and receive: Keepalive; Update; and Notification messages to and from its peer. In the simplest arrangement, all routers within a single AS and participating in BGP routing must be configured in a full mesh: each router must be configured as

1026-640: The back of some napkins, hence often referenced to as the “Two Napkin Protocol”. It was first described in 1989 in RFC 1105, and has been in use on the Internet since 1994. IPv6 BGP was first defined in RFC   1654 in 1994, and it was improved to RFC  2283 in 1998. The current version of BGP is version 4 (BGP4), which was first published as RFC  1654 in 1994, subsequently updated by RFC  1771 in 1995 and RFC  4271 in 2006. RFC 4271 corrected errors, clarified ambiguities and updated

1064-405: The correct community or communities for each route, and the ISP is responsible for controlling who the prefix is advertised to. The end user has no technical ability to enforce correct actions being taken by the ISP, though problems in this area are generally rare and accidental. It is a common tactic for end customers to use BGP communities (usually ASN:70,80,90,100) to control the local preference

1102-400: The local router's routing table management process. BGP submits the routes that it considers best to the main routing table process. Depending on the implementation of that process, the BGP route is not necessarily selected. For example, a directly connected prefix, learned from the router's own hardware, is usually most preferred. As long as that directly connected route's interface is active,

1140-449: The main routing table manager. If the router does not have a route to that destination from any non-BGP source, the withdrawn route will be removed from the main routing table. As long as there is tiebreaker the route selection process moves to the next step. By default Internal IGP is not added. Can be set to add IGP metric. Before the most recent edition of the BGP standard, if an update had no MED value, several implementations created

1178-452: The next-hop address is reachable. Next, for each neighbor, the BGP process applies various standard and implementation-dependent criteria to decide which routes conceptually should go into the Adj-RIB-In. The neighbor could send several possible routes to a destination, but the first level of preference is at the neighbor level. Only one route to each destination will be installed in the conceptual Adj-RIB-In. This process will also delete, from

Border Gateway Protocol - Misplaced Pages Continue

1216-448: The real ASN value. Since RFC 7153, extended communities are compatible with 32-bit ASNs. RFC 8092 and RFC 8195 introduce a Large Community attribute of 12 bytes, divided in three field of 4 bytes each (AS:function:parameter). MEDs, defined in the main BGP standard, were originally intended to show to another neighbor AS the advertising AS's preference as to which of several links are preferred for inbound traffic. Another application of MEDs

1254-640: The router waits for the TCP connection to complete and transitions to the OpenSent state if successful. If unsuccessful, it starts the ConnectRetry timer and transitions to the Active state upon expiration. In the Active state, the router resets the ConnectRetry timer to zero and returns to the Connect state. In the OpenSent state, the router sends an Open message and waits for one in return in order to transition to

1292-401: The same, or a different set, of neighbors. The BGP process maintains several routing information bases : The physical storage and structure of these conceptual tables are decided by the implementer of the BGP code. Their structure is not visible to other BGP routers, although they usually can be interrogated with management commands on the local router. It is quite common, for example, to store

1330-546: The session, including multiprotocol extensions and various recovery modes. If the multiprotocol extensions to BGP are negotiated at the time of creation, the BGP speaker can prefix the Network Layer Reachability Information (NLRI) it advertises with an address family prefix. These families include the IPv4 (default), IPv6, IPv4/IPv6 Virtual Private Networks and multicast BGP. Increasingly, BGP

1368-619: The specification with common industry practices. The major enhancement of BGP4 was the support for Classless Inter-Domain Routing (CIDR) and use of route aggregation to decrease the size of routing tables . RFC  4271 allows BGP4 to carry a wide range of IPv4 and IPv6 "address families". It is also called the Multiprotocol Extensions which is Multiprotocol BGP (MP-BGP). BGP neighbors, called peers, are established by manual configuration among routers to create

1406-652: The topology of IP multicast -capable routers to be exchanged separately from the topology of normal IPv4 unicast routers. Thus, it allows a multicast routing topology different from the unicast routing topology. Although MBGP enables the exchange of inter-domain multicast routing information, other protocols such as the Protocol Independent Multicast family are needed to build trees and forward multicast traffic. As an enhancement of BGP-4, MP-BGP provides routing information for various protocols, such as IPv6 (BGP4+) and multicast: Multiprotocol BGP

1444-402: The type field within the attribute decides whether the encoded extended community is of a transitive or non-transitive nature. The IANA registry therefore provides different number ranges for the attribute types. Due to the extended attribute range, its usage can be manifold. RFC 4360 exemplarily defines the "Two-Octet AS Specific Extended Community", the "IPv4 Address Specific Extended Community",

#4995