RFC 1772
Application of the Border Gateway Protocol in the Internet
Application of the Border Gateway Protocol in the Internet ๐ฆ
okay bestie, so this is RFC 1772 โจ It's a Standards Track doc from the Network Working Group, dated March 1995. It obsoletes RFC 1655, so that one's retired now ๐ซก The title block doesn't list any RFCs it updates. The editors are Y. Rekhter (T.J. Watson Research Center, IBM Corp.) and P. Gross (MCI) ๐
Status of this Memo ๐
this doc specifies an Internet standards track protocol for the Internet community, and it's asking for discussion and suggestions for improvements ๐ฌ For the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1). Distribution of this memo is unlimited ๐
Abstract โจ
this doc, together with its companion doc, "A Border Gateway Protocol 4 (BGP-4)", defines an inter-autonomous system routing protocol for the Internet ๐ฃ๏ธ "A Border Gateway Protocol 4 (BGP-4)" is where the BGP protocol specification lives, and this doc is all about how BGP gets used on the Internet ๐
Info about how BGP is progressing can be monitored and/or reported on the BGP mailing list (bgp@ans.net) ๐ฌ
Acknowledgements ๐ซถ
this doc was originally published as RFC 1164 in June 1990 ๐ฐ๏ธ It was jointly authored by Jeffrey C. Honig (Cornell University), Dave Katz (MERIT), Matt Mathis (PSC), Yakov Rekhter (IBM), and Jessica Yu (MERIT) ๐ธ
The following folks also made key contributions to RFC 1164: Guy Almes (ANS, then at Rice University), Kirk Lougheed (cisco Systems), Hans-Werner Braun (SDSC, then at MERIT), and Sue Hares (MERIT) ๐
We'd like to explicitly thank Bob Braden (ISI) for reviewing the previous version of this doc ๐
This updated version is the product of the IETF BGP Working Group, with Phill Gross (MCI) and Yakov Rekhter (IBM) as editors ๐
John Moy (Proteon) contributed Section 7 "Required set of supported routing policies" ๐
Scott Brim (Cornell University) contributed the basis for Section 8 "Interaction with other exterior routing protocols" ๐ง
Most of the text in Section 9 was contributed by Gerry Meyer (Spider) ๐ฆ
Parts of the Introduction were taken almost verbatim from [3] ๐
We'd also like to acknowledge Dan Long (NEARNET) and Tony Li (cisco Systems) for their review and comments on the current version of the doc ๐ซถ
The work of Yakov Rekhter was supported in part by the National Science Foundation under Grant Number NCR-9219216 ๐
1. Introduction โจ
okay so this memo describes how the Border Gateway Protocol (BGP) [1] gets used in the Internet environment ๐ BGP is an inter-Autonomous System routing protocol ๐ The network reachability info exchanged via BGP is enough to detect routing loops and enforce routing decisions based on performance preference and policy constraints, as outlined in RFC 1104 [2] ๐ฅ In particular, BGP exchanges routing information containing full AS paths and enforces routing policies based on configuration information ๐ซถ
As the Internet has evolved and grown over recent years, it's become painfully evident that it's soon going to face several serious scaling problems ๐ญ These include:
- Exhaustion of the class-B network address space. One fundamental cause of this problem is the lack of a network class of a size which is appropriate for mid-sized organization: class-C, with a maximum of 254 host addresses, is too small, while class-B, which allows up to 65534 addresses, is too large to be densely populated. ๐
- Growth of routing tables in Internet routers is beyond the ability of current software (and people) to effectively manage. ๐
- Eventual exhaustion of the 32-bit IP address space. ๐
It's become clear that the first two of these problems are likely to become critical within the next one to three years โฐ Classless inter-domain routing (CIDR) tries to tackle these problems by proposing a mechanism to slow the growth of the routing table and the need for allocating new IP network numbers ๐ง It does not attempt to solve the third problem, which is more long-term in nature. Instead it endeavors to ease enough of the short to mid-term difficulties to let the Internet keep functioning efficiently while progress is made on a longer-term solution โจ
BGP-4 is an extension of BGP-3 that provides support for routing information aggregation and reduction based on the Classless inter-domain routing architecture (CIDR) [3] ๐ This memo describes the usage of BGP-4 in the Internet ๐ฆ
All of the discussions here are based on the assumption that the Internet is a collection of arbitrarily connected Autonomous Systems. That is, the Internet will be modeled as a general graph whose nodes are AS's and whose edges are connections between pairs of AS's ๐ธ๏ธ
The classic definition of an Autonomous System is a set of routers under a single technical administration, using an interior gateway protocol and common metrics to route packets within the AS, and using an exterior gateway protocol to route packets to other AS's ๐ Since this classic definition was developed, it's become common for a single AS to use several interior gateway protocols and sometimes several sets of metrics within an AS. So the use of the term Autonomous System here stresses the fact that, even when multiple IGPs and metrics are used, the administration of an AS appears to other AS's to have a single coherent interior routing plan, and it presents a consistent picture of which destinations are reachable through it ๐
AS's are assumed to be administered by a single administrative entity, at least for the purposes of representing routing information to systems outside of the AS ๐
2. BGP Topological Model ๐ธ
when we say that a connection exists between two AS's, we mean two things:
- Physical connection: There is a shared Data Link subnetwork between the two AS's, and on this shared subnetwork each AS has at least one border gateway belonging to that AS. Thus the border gateway of each AS can forward packets to the border gateway of the other AS without resorting to Inter-AS or Intra-AS routing. ๐ง
- BGP connection: There is a BGP session between BGP speakers in each of the AS's, and this session communicates those routes that can be used for specific destinations via the advertising AS. ๐ฆ
Throughout this document we place an additional restriction on the BGP speakers that form the BGP connection: they must themselves share the same Data Link subnetwork that their border gateways share. Thus, a BGP session between adjacent AS's requires no support from either Inter-AS or Intra-AS routing. Cases that do not conform to this restriction fall outside the scope of this document ๐ซ
So at each connection, each AS has one or more BGP speakers and one or more border gateways, and all of these BGP speakers and border gateways are located on a shared Data Link subnetwork ๐ซถ Note that BGP speakers do not need to be a border gateway, and vice versa ๐ Paths announced by a BGP speaker of one AS on a given connection are taken to be feasible for each of the border gateways of the other AS on the same shared subnetwork, i.e. indirect neighbors are allowed ๐
Much of the traffic carried within an AS either originates or terminates at that AS (i.e., either the source IP address or the destination IP address of the IP packet identifies a host internal to that AS) ๐ก Traffic that fits this description is called "local traffic". Traffic that does not fit this description is called "transit traffic". A major goal of BGP usage is to control the flow of transit traffic ๐ฏ
Based on how a particular AS deals with transit traffic, the AS may now be placed into one of the following categories:
- stub AS: an AS that has only a single connection to one other AS. Naturally, a stub AS only carries local traffic. ๐ฑ
- multihomed AS: an AS that has connections to more than one other AS, but refuses to carry transit traffic. ๐ โโ๏ธ
- transit AS: an AS that has connections to more than one other AS, and is designed (under certain policy restrictions) to carry both transit and local traffic. ๐
Since a full AS path provides an efficient and straightforward way of suppressing routing loops, and it eliminates the "count-to-infinity" problem associated with some distance vector algorithms, BGP imposes no topological restrictions on the interconnection of AS's ๐ง ๐ฅ
3. BGP in the Internet ๐
3.1 Topology Considerations
the overall Internet topology may be viewed as an arbitrary interconnection of transit, multihomed, and stub AS's ๐ธ๏ธ To minimize the impact on the current Internet infrastructure, stub and multihomed AS's need not use BGP. These AS's may run other protocols (e.g., EGP) to exchange reachability information with transit AS's. Transit AS's using BGP will tag this information as having been learned by some method other than BGP ๐ท๏ธ The fact that BGP need not run on stub or multihomed AS's has no negative impact on the overall quality of inter-AS routing for traffic that is either destined to or originated from the stub or multihomed AS's in question ๐
However, it is recommended that BGP be used for stub and multihomed AS's as well ๐ In these situations, BGP will provide an advantage in bandwidth and performance over some of the currently used protocols (such as EGP). On top of that, this would reduce the need for default routes, and it leads to better choices of Inter-AS routes for multihomed AS's ๐
3.2 Global Nature of BGP
at a global level, BGP is used to distribute routing information among multiple Autonomous Systems ๐ The information flows can be represented like this:
+-------+ +-------+
BGP | BGP | BGP | BGP | BGP
---------+ +---------+ +---------
| IGP | | IGP |
+-------+ +-------+
<-AS A--> <--AS B->
This diagram points out that, while BGP alone carries information between AS's, both BGP and an IGP may carry information across an AS ๐ซง Making sure routing information stays consistent between BGP and an IGP within an AS is a big deal, and it's discussed at length later in Appendix A ๐
3.3 BGP Neighbor Relationships โจ
okay so the internet is basically a giant web of arbitrarily connected AS's ๐. Routers that talk to each other directly over BGP are called BGP speakers ๐ฃ๏ธ. Speakers can live in the same AS or in totally different AS's, and the speakers in each AS chat with each other to swap network reachability info based on policies that AS has set up for itself ๐ . From one speaker's point of view, another speaker it talks to is an external peer if it's in a different AS, and an internal peer if it's in the same AS. iconic ๐
There can be as many BGP speakers as deemed necessary within an AS ๐ธ. Usually, if an AS has multiple connections to other AS's, you'll need multiple BGP speakers. All the speakers representing the same AS must give a consistent image of that AS to the outside world, which basically means they need consistent routing information among themselves ๐ซถ. Those gateways can chat over BGP or by other means ๐ก. The policy constraints for every BGP speaker inside an AS must be consistent ๐งฉ. Techniques like using a tagged IGP (see A.2.2) may be employed to sniff out possible inconsistencies ๐ต๏ธโโ๏ธ.
For external peers, the two peers must belong to different AS's but share a common Data Link subnetwork ๐. That common subnetwork should be used to carry the BGP messages between them ๐ฌ. Running BGP across an intervening AS invalidates the AS path information ๐. An Autonomous System number must be used with BGP to say which Autonomous System the BGP speaker belongs to ๐ข.
4. Requirements for Route Aggregation ๐
okay this part is a big deal ๐. A conformant BGP-4 implementation is required to have the ability to specify when an aggregated route may be generated out of partial routing information. For example, a BGP speaker at the border of an autonomous system (or group of autonomous systems) must be able to generate an aggregated route for a whole set of destination IP addresses (in BGP-4 terminology, such a set is called the Network Layer Reachability Information or NLRI) over which it has administrative control, including the addresses it has delegated, even when not all of them are reachable at the same time.
A conformant implementation may provide the capability to specify when an aggregated NLRI may be generated.
A conformant implementation is required to have the ability to specify how NLRI may be de-aggregated.
A conformant implementation is required to support the following options when dealing with overlapping routes:
- Install both the less and the more specific routes
- Install the more specific route only
- Install the less specific route only
- Install neither route
Certain routing policies may depend on the NLRI (e.g. "research" versus "commercial"). Therefore, a BGP speaker that performs route aggregation should be cognizant, if possible, of potential implications on routing policies when aggregating NLRI ๐ง .
5. Policy Making with BGP ๐
BGP gives you the ability to enforce policies based on various routing preferences and constraints ๐. Policies aren't directly encoded in the protocol. Instead, they're handed to BGP as configuration information โ๏ธ.
BGP enforces policies by affecting which paths get picked from multiple alternatives, and by controlling how routing information gets redistributed ๐. The AS administration is the one who decides what the policies are ๐ฉโ๐ผ.
Routing policies are tied to political, security, or economic considerations. For example, if an AS doesn't want to carry traffic to another AS, it can enforce a policy that prohibits this ๐ซ. Here are some examples of routing policies you can enforce with BGP:
- A multihomed AS can refuse to act as a transit AS for other AS's. (It does this by only advertising routes to destinations internal to the AS.)
- A multihomed AS can become a transit AS for a restricted set of adjacent AS's, i.e., some, but not all, AS's can use the multihomed AS as a transit AS. (It does this by advertising its routing information to that set of AS's.)
- An AS can favor or disfavor the use of certain AS's for carrying transit traffic from itself.
A number of performance-related criteria can also be controlled with BGP โก:
- An AS can minimize the number of transit AS's. (Shorter AS paths can be preferred over longer ones.)
- The quality of transit AS's. If an AS determines that two or more AS paths can be used to reach a given destination, that AS can use a variety of means to decide which of the candidate AS paths it will use. The quality of an AS can be measured by things like diameter, link speed, capacity, tendency to become congested, and quality of operation. Information about these qualities might be determined by means other than BGP.
- Preference of internal routes over external routes.
For consistency within an AS, equal cost paths, which come from combinations of policies and/or normal route selection procedures, must be resolved in a consistent fashion ๐ฏ.
Fundamental to BGP is the rule that an AS advertises to its neighboring AS's only those routes that it uses. This rule reflects the "hop-by-hop" routing paradigm generally used by the current Internet ๐.
6. Path Selection with BGP ๐
One of the major jobs of a BGP speaker is to evaluate the different paths from itself to a set of destinations covered by an address prefix, pick the best one, apply the appropriate policy constraints, and then advertise it to all of its BGP neighbors ๐ฃ. The key question is how the different paths get evaluated and compared. In traditional distance vector protocols (e.g., RIP), a path has only one metric (e.g., hop count) attached to it, so comparing paths just means comparing two numbers ๐ข. Inter-AS routing gets complicated because there's no universally agreed-upon metric among AS's that can be used to evaluate external paths. Instead, each AS may have its own set of criteria for path evaluation ๐คทโโ๏ธ.
A BGP speaker builds a routing database made up of the set of all feasible paths and the list of destinations (expressed as address prefixes) reachable through each path ๐๏ธ. For the sake of precise discussion, it's useful to think about the set of feasible paths for a set of destinations associated with a given address prefix. In most cases, you'd expect to find only one feasible path. But when that isn't the case, all feasible paths should be maintained, because keeping them around speeds up adaptation to the loss of the primary path โก. Only the primary path at any given time will ever be advertised ๐ข.
The path selection process can be formalized by defining a complete order over the set of all feasible paths to a set of destinations associated with a given address prefix ๐. One way to define this complete order is to define a function that maps each full AS path to a non-negative integer, which denotes that path's degree of preference. Path selection then just means applying this function to all feasible paths and choosing the one with the highest degree of preference ๐.
In actual BGP implementations, the criteria for assigning degrees of preference to a path are specified as configuration information ๐ ๏ธ.
The process of assigning a degree of preference to a path can be based on several sources of information:
- Information explicitly present in the full AS path.
- A combination of information that can be derived from the full AS path and information outside the scope of BGP (e.g., policy routing constraints provided as configuration information).
Possible criteria for assigning a degree of preference to a path are:
- AS count. Paths with a smaller AS count are generally better.
- Policy considerations. BGP supports policy-based routing based on the controlled distribution of routing information. A BGP speaker may be aware of some policy constraints (both within and outside of its own AS) and do appropriate path selection. Paths that do not comply with policy requirements are not considered further ๐ โโ๏ธ.
- Presence or absence of a certain AS or AS's in the path. By means of information outside the scope of BGP, an AS may know some performance characteristics (e.g., bandwidth, MTU, intra-AS diameter) of certain AS's and may try to avoid or prefer them ๐๏ธ.
- Path origin. A path learned entirely from BGP (i.e., whose endpoint is internal to the last AS on the path) is generally better than one for which part of the path was learned via EGP or some other means ๐ .
- AS path subsets. An AS path that is a subset of a longer AS path to the same destination should be preferred over the longer path. Any problem in the shorter path (such as an outage) will also be a problem in the longer path ๐งฉ.
- Link dynamics. Stable paths should be preferred over unstable ones. Note that this criterion must be used in a very careful way to avoid causing unnecessary route fluctuation ๐. Generally, any criteria that depend on dynamic information might cause routing instability, so they should be treated very carefully ๐ฅน.
7. Required set of supported routing policies ๐ธ
okay so policies get handed to BGP as configuration information ๐. That info isn't directly encoded in the protocol, which is why BGP can support super complex routing policies ๐ง . However, it is not required that all BGP implementations support such policies.
Real talk, we're not trying to standardize the routing policies that must be supported in every BGP implementation ๐ โโ๏ธ. We're just really, really encouraging all
implementors to support this set of routing policies, bestie ๐:
- okay so BGP implementations SHOULD let an AS control the announcements of BGP-learned routes to its adjacent AS's ๐. That control SHOULD work at least at the granularity of a single address prefix โจ, and implementations SHOULD also support it at the granularity of an autonomous system ๐ซถ. That autonomous system can be either the one that originated the route or the one that advertised the route to the local system (the adjacent AS) ๐ .
this next part is the big one ๐ญ Care MUST be taken when a BGP speaker picks a new route that can't be announced to a particular external peer, while the route it picked before was announced to that peer. Specifically, the local system MUST explicitly tell the peer that the previous route is now infeasible ๐.
- BGP implementations SHOULD let an AS prefer a particular path to a destination when more than one path is available ๐. At the very minimum, an implementation SHALL support this by letting someone administratively assign a degree of preference to a route, based solely on the IP address of the neighbor the route came from โจ. The allowed range for that degree of preference SHALL be between 0 and
2^(31) - 1๐ฅ. - BGP implementations SHOULD let an AS ignore routes that have certain AS's in the
AS_PATHpath attribute ๐. This can be done with the technique from [2], by assigning "infinity" as "weights" for those AS's ๐. The route selection process MUST ignore routes that have a "weight" equal to "infinity" ๐ง.
8. Interaction with other exterior routing protocols โจ
The guidelines in this section are consistent with the ones in [3] ๐.
An AS SHOULD advertise a minimal aggregate for its internal destinations, based on how much address space it's actually using ๐. Admins of non-BGP 4 AS's can use that to figure out how many routes to explode from a single aggregate ๐งฉ.
A route that carries the ATOMIC_AGGREGATE path attribute SHALL NOT be exported into either BGP-3 or EGP2, unless the export can happen without exploding the NLRI of the route ๐ซ.
8.1 Exchanging information with EGP2 ๐
This doc suggests the following guidelines for swapping routing information between BGP-4 and EGP2 โจ.
For graceful migration, a BGP speaker MAY participate in EGP2 as well as in BGP-4 ๐ฆ. So a BGP speaker MAY receive IP reachability information through EGP2 as well as through BGP-4 ๐ธ. Info received by EGP2 can be injected into BGP-4 with the ORIGIN path attribute set to 1 โจ. And the reverse works too: info received via BGP-4 can be injected into EGP2 ๐. In that case, though, you have to watch out for the potential information explosion when a given IP prefix received from BGP-4 denotes a set of consecutive A/B/C class networks ๐. Injecting BGP-4 received NLRI that denotes IP subnets requires the BGP speaker to inject the corresponding network into EGP2 ๐งฉ. The local system SHALL provide mechanisms to control the exchange of reachability information between EGP2 and BGP-4 ๐. Specifically, a conformant implementation is REQUIRED to support all of the following options when injecting BGP-4 received reachability information into EGP2 ๐:
- inject default only (
0.0.0.0); no export of any other NLRI ๐ฏ - allow controlled deaggregation, but only of specific routes; allow export of non-aggregated NLRI ๐ง
- allow export of only non-aggregated NLRI ๐ท
The exchange of routing information via EGP2 between a BGP speaker participating in BGP-4 and a pure EGP2 speaker MAY occur only at the domain (autonomous system) boundaries ๐ง.
8.2 Exchanging information with BGP-3 ๐
This doc suggests the following guidelines for swapping routing information between BGP-4 and BGP-3 ๐ .
For graceful migration, a BGP speaker MAY participate in BGP-3 as well as in BGP-4 ๐ฆ. So a BGP speaker MAY receive IP reachability information through BGP-3 as well as through BGP-4 ๐ธ.
A BGP speaker MAY inject the information received by BGP-4 into BGP-3 as follows ๐.
If an AS_PATH attribute of a BGP-4 route carries AS_SET path segments, then the AS_PATH attribute of the BGP-3 route SHALL be constructed by treating the AS_SET segments as AS_SEQUENCE segments, with the resulting AS_PATH being a single AS_SEQUENCE โจ. Yes, this loses the set/sequence info, but it doesn't mess with the protection against routing loops ๐. It may affect policies, though, if they're based on the content or ordering of the AS_PATH attribute ๐ค.
While injecting BGP-4 derived NLRI into BGP-3, you have to watch out for the potential information explosion when a given IP prefix denotes a set of consecutive A/B/C class networks ๐ฅ. Injecting BGP-4 derived NLRI that denotes IP subnets requires the BGP speaker to inject the corresponding network into BGP-3 ๐งฉ. The local system SHALL provide mechanisms to control the exchange of routing information between BGP-3 and BGP-4 ๐. Specifically, a conformant implementation is REQUIRED to support all of the following options when injecting BGP-4 received routing information into BGP-3 ๐:
- inject default only (
0.0.0.0), no export of any other NLRI ๐ฏ - allow controlled deaggregation, but only of specific routes; allow export of non-aggregated NLRI ๐ง
- allow export of only non-aggregated NLRI ๐ท
The exchange of routing information via BGP-3 between a BGP speaker participating in BGP-4 and a pure BGP-3 speaker MAY occur only at the autonomous system boundaries ๐ง. Within a single autonomous system, BGP conversations between all the BGP speakers of that autonomous system have to be either BGP-3 or BGP-4, but not a mixture ๐ .
9. Operations over Switched Virtual Circuits ๐ง
When BGP runs over Switched Virtual Circuit (SVC) subnetworks, it may be desirable to minimize the traffic BGP generates ๐ธ. In particular, it may be desirable to get rid of the traffic from periodic KEEPALIVE messages ๐. BGP has a mechanism for operating over SVC services that avoids keeping SVCs permanently open, and it lets BGP stop sending periodic KEEPALIVE messages ๐ฆ.
This section describes how to operate without periodic KEEPALIVE messages, to keep SVC usage low when you're using an intelligent SVC circuit manager ๐ง . The proposed scheme MAY also be used on "permanent" circuits that support a feature like link quality monitoring or echo request to determine the status of link connectivity โจ.
The mechanism described in this section is only suitable between BGP speakers that are directly connected over a common virtual circuit ๐.
9.1 Establishing a BGP Connection ๐
The feature gets selected by setting a zero Hold Time in the OPEN message ๐.
9.2 Circuit Manager Properties ๐ ๏ธ
The circuit manager MUST have sufficient functionality to be able to compensate for the lack of periodic KEEPALIVE messages ๐ช:
- It MUST be able to determine link layer unreachability within a predictable, finite period after a failure occurs ๐งญ.
- On determining unreachability, it SHOULD:
- start a configurable dead timer (comparable to a typical Hold timer value) โฑ๏ธ
- attempt to re-establish the Link Layer connection ๐
- If the dead timer expires, it SHOULD:
- send an internal circuit
DEADindication to TCP ๐
- send an internal circuit
- If the connection is re-established, it SHOULD:
- cancel the dead timer ๐
- send an internal circuit
UPindication to TCP ๐ฆ
9.3 TCP Properties ๐ธ
A small modification MUST be made to TCP so it can process internal notifications from the circuit manager ๐ง:
DEAD: flush the transmit queue and abort the TCP connection ๐๏ธUP: transmit any queued data, or allow an outgoing TCP call to proceed ๐
9.4 Combined Properties ๐ซถ
Some implementations may not be able to guarantee that the BGP process and the circuit manager operate as a single entity ๐คท. In other words, they can have a separate existence, so one can be stopped or crash while the other keeps going ๐.
If this is the case, a periodic two-way poll between the BGP process and the circuit manager SHOULD be implemented ๐. If the BGP process finds out the circuit manager has gone away, it SHOULD close all relevant TCP connections ๐ช. If the circuit manager finds out the BGP process has gone away, it SHOULD close all of its connections associated with the BGP process and reject any further incoming connections ๐ .
10. Conclusion ๐
BGP gives you a high degree of control and flexibility for interdomain routing ๐. It enforces policy and performance constraints and avoids routing loops while doing it ๐. The guidelines presented here are a starting point for using BGP to build more sophisticated and manageable routing as the Internet grows ๐.
Appendix A. The Interaction of BGP and an IGP โจ
This section outlines ways BGP can exchange routing information with an IGP ๐ท. The methods here are not proposed as part of standard BGP usage at this time. They're outlined for information purposes only ๐ก. Implementors may want to consider these methods when importing IGP information ๐ค.
This is general information that applies to any generic IGP ๐ง.
Interaction between BGP and any specific IGP is outside the scope of this section ๐ซ. Methods for specific IGP's SHOULD be proposed in separate documents ๐. Methods for specific IGP's could be proposed for standard usage in the future ๐ฎ.
Overview
By definition, all transit AS's MUST be able to carry traffic that originates from and/or is destined to locations outside of that AS ๐. That requires a certain amount of interaction and coordination between BGP and the Interior Gateway Protocol (IGP) used by that particular AS ๐ค. In general, traffic originating outside a given AS is going to pass through both interior gateways (gateways that support the IGP only) and border gateways (gateways that support both the IGP and BGP) ๐ฆ. All interior gateways receive information about external routes from one or more of the border gateways of the AS via the IGP ๐ก.
Depending on the mechanism used to propagate BGP information within a given AS, special care MUST be taken to ensure consistency between BGP and the IGP, since changes in state are likely to propagate at different rates across the AS โ ๏ธ. There may be a time window between the moment when some border gateway (A) receives new BGP routing information originated from another border gateway (B) within the same AS, and the moment the IGP within that AS is capable of routing transit traffic to border gateway (B). During that time window, either incorrect routing or "black holes" can occur ๐ณ๏ธ.
To minimize such routing problems, border gateway (A) SHOULD NOT advertise to any of its external peers a route to some set of exterior destinations associated with a given address prefix X via border gateway (B) until all the interior gateways within the AS are ready to route traffic destined to these destinations via the correct exit border gateway (B) ๐ . In other words, interior routing SHOULD converge on the proper exit gateway before advertising routes via that exit gateway to external peers ๐ซถ.
A.2 Methods for Achieving Stable Interactions โจ
okay so this bit is all about the ways BGP and the IGP can get along inside one Autonomous System without drama ๐ . The following techniques are the ones that can get them to play nice ๐ซถ.
A.2.1 Propagation of BGP Information via the IGP
ngl, BGP can totally carry its own BGP info around inside an AS ๐. BUT you can also have the IGP transport it instead ๐, as long as the IGP does complete flooding of routing info (that's the part that spreads the BGP info around) AND does one pass convergence (which makes the whole thing effectively atomic โจ).
So if the IGP is carrying the BGP info, the desynchronization period we talked about earlier just... doesn't happen at all ๐. BGP info moves through the AS in sync with the IGP, and the IGP converges more or less at the same time the new routing info shows up. Main character energy ๐.
Bestie, the one thing to remember is that the IGP only carries BGP information. It should not interpret or process this information.
A.2.2 Tagged Interior Gateway Protocol
Some IGPs can tag routes that are exterior to an AS with the identity of their exit points while they propagate them inside the AS ๐ท๏ธ. Each border gateway should use identical tags for announcing exterior routing information (received via BGP), both into the IGP and when it's passing that info along to other internal peers (peers within the same AS) ๐. Tags generated by a border gateway must uniquely identify that particular border gateway--different border gateways must use different tags. Unique tags only, no copycats ๐ .
All Border Gateways within a single AS must observe the following two rules:
- Information received from an internal peer by a border gateway A declaring a set of destination associated with a given address prefix to be unreachable must immediately be propagated to all of the external peers of A. ๐จ
- Information received from an internal peer by a border gateway A about a set of reachable destinations associated with a given address prefix X cannot be propagated to any of the external peers of A unless/until A has an IGP route to the set of destinations covered by X and both the IGP and the BGP routing information have identical tags. ๐ซ
These rules guarantee that no routing information is announced externally unless the IGP is actually capable of correctly supporting it ๐ง. They also avoid some causes of "black holes" ๐ณ๏ธ. Iconic, honestly.
One possible method for tagging BGP and IGP routes within an AS is to use the IP address of the exit border gateway that announces the exterior route into the AS ๐ธ. In this case, the "gateway" field in the BGP UPDATE message is used as the tag.
An alternate method is to have BGP and the IGP agree on a router ID ๐. In this case, the router ID is available to all BGP (version 3 or higher) speakers. Since this ID is already unique, it can be used directly as the tag in the IGP. Simple and slay โจ.
A.2.3 Encapsulation
Encapsulation is the simplest mechanism (in terms of the interaction between the IGP and BGP) for carrying transit traffic across the AS ๐. In this approach, transit traffic is encapsulated within an IP datagram addressed to the exit gateway. The only requirement this puts on the IGP is that it should be capable of supporting routing between border gateways within the same AS ๐ฆ.
The address of the exit gateway A for some exterior destination X is specified in the BGP identifier field of the BGP OPEN message that gateway A sends (via BGP), and every other border gateway within the same AS receives it ๐ฌ. To route traffic to destination X, each border gateway within the AS encapsulates it in datagrams addressed to gateway A. Gateway A then performs decapsulation and forwards the original packet to the proper gateway in another AS. Packet inception, but make it networking ๐.
Since encapsulation doesn't rely on the IGP to carry exterior routing information, no synchronization between BGP and the IGP is required ๐.
Some means of identifying datagrams containing encapsulated IP, such as an IP protocol type code, must be defined if this method is going to be used ๐ท๏ธ.
Note that if a packet to be encapsulated has a length that is very close to the MTU, that packet would be fragmented at the gateway that performs the encapsulation ๐.
A.2.4 Pervasive BGP
If all routers in an AS are BGP speakers, then there is no need for any interaction between BGP and an IGP at all ๐. In that case, all routers in the AS already have full information about all BGP routes. The IGP is then only used for routing within the AS, and no BGP routes get imported into the IGP. Clean and minimal, iykyk ๐.
For routers to operate this way, they must be able to perform a recursive lookup in their routing table ๐. The first lookup will use a BGP route to establish the exit router, while the second lookup will determine the IGP path to the exit router.
Since the IGP carries no external information in this scenario, all routers in the AS will have converged as soon as all BGP speakers have new information about the route โก. There's no need to wait on the IGP to converge, so an implementation may advertise these routes without any further delay due to the IGP. Zero waiting, full vibes ๐ .
A.2.5 Other Cases
Some ASes might have IGPs that can neither carry BGP information nor tag exterior routes (e.g., RIP) ๐ฌ. On top of that, encapsulation may be either infeasible or undesirable. In situations like these, the following two rules must be observed:
- Information received from an internal peer by a border gateway A declaring a destination to be unreachable must immediately be propagated to all of the external peers of A. ๐จ
- Information received from an internal peer by a border gateway A about a reachable destination X cannot be propagated to any of the external peers of A unless A has an IGP route to X and sufficient time has passed for the IGP routes to have converged. โณ
The above rules present necessary (but not sufficient) conditions for propagating BGP routing information to other AS's. Unlike tagged IGPs, these rules cannot ensure that interior routes to the proper exit gateways are in place before the routes are propagated to other AS's ๐ซฃ.
If the convergence time of an IGP is less than some small value X, then the time window during which the IGP and BGP are unsynchronized is less than X as well. In that case the whole issue can be ignored, at the cost of transient periods (of less than length X) of routing instability ๐. A reasonable value for X is a matter for further study, but X should probably be less than one second โฑ๏ธ.
If the convergence time of an IGP cannot be ignored, a different approach is needed. Mechanisms and techniques that might be appropriate in this situation are subjects for further study ๐ฎ.
References
- [1] Rekhter Y., and T. Li, "A Border Gateway Protocol 4 (BGP-4), RFC 1771, T.J. Watson Research Center, IBM Corp., cisco Systems, March 1995.
- [2] Braun, H-W., "Models of Policy Based Routing", RFC 1104, Merit/NSFNET, June 1989.
- [3] Fuller, V., Li, T., Yu, J., and K. Varadhan, "Supernetting: an Address Assignment and Aggregation Strategy", RFC1519, BARRNet, cisco, MERIT, OARnet, September 1993.
Security Considerations
Security issues are not discussed in this memo. ๐จ
Authors' Addresses
Yakov Rekhter
T.J. Watson Research Center IBM Corporation
P.O. Box 704, Office H3-D40
Yorktown Heights, NY 10598
Phone: +1 914 784 7361
EMail: yakov@watson.ibm.com
Phill Gross
MCI Data Services Division
2100 Reston Parkway, Room 6001,
Reston, VA 22091
Phone: +1 703 715 7432
EMail: 0006423401@mcimail.com
IETF IDR WG mailing list: bgp@ans.net
To be added: bgp-request@ans.net
๐ฆ where this page comes from
- ietf: rfc1772 1995-03
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms