Introduction to the Border Gateway Patrol
- Aug 27, 2004
When networks were small, there was no concept of interior and exterior gateway protocols; a network ran a routing protocol, and that was the end of it. The Internet, for instance, ran the Hello Protocol on devices called fuzzballs (before they were called routers), until some problems in the Hello Protocol led to the development of RIP (Routing Information Protocol). RIP was run as the only routing protocol on the Internet for many years. Over time, however, the Internet grew (and grew and grew), and it became apparent something more was needed in routing protocolsa single ubiquitous protocol couldn't do all the work that routing protocols were being required to do and scale in any reasonable manner.
In January 1989 at the 12th IETF meeting in Austin, Texas, Yakov Rekhter and Kirk Lougheed sat down at a table and in a short time a new exterior gateway routing protocol was born, the Border Gateway Protocol (BGP). The initial BGP design was recorded on a napkin rumored to have been heavily spattered with ketchup. The design on the napkin was expanded to three hand-written sheets of paper from which the first interoperable BGP implementation was quickly developed. A photocopy of these 3 sheets of paper now hangs on the wall of a routing protocol development area at Cisco System in Santa Clara, CA. **See Appendix N for more information NEED TO PROVIDE IMAGES OF 3 PAPERS**.
From this napkin came the basis for BGP as we know it today. Now, countless contributors, hundreds of pages in tens of documents, deployed in thousands of networks; inter-domain routing in the Internet today is defined as BGP.
This book is about BGP, from the basics of the BGP protocol itself to information on deploying BGP in networks stretching from small and simple to very large and extremely complex. We'll begin with an overview of the BGP protocol itself here in Chapter 1. We'll then move into various deployment situations, starting with small enterprise networks using BGP internally and to connect to the Internet. From there we'll continue to move through ever-larger scale deployments of BGP, discussing how BGP and its extensive policy mechanisms fit into network architectures. We continue by providing details about finely tuning BGP to perform optimally and scale effectively in an array of deployment scenarios. We finish with in-depth discussions on debugging and troubleshooting various problems within the protocol and BGP networks.
Exterior and Interior Gateway Protocols
In order to understand why BGP is designed the way it is, you first need to understand where it fits in the world of routing protocols. Routing protocols can be divided along several axes, the first being Interior Gateway Protocols (IGPs) verses Exterior Gateway Protocols (EGPs). The primary difference between EGPs and IGPs is the place in the network where they provide reachability information. That is, within an administrative routing domain (intra-domain) or between administrative routing domains (inter-domain).
Exactly what a routing domain is depends primarily on the context. In Intermediate System to Intermediate System (IS-IS) terminology, for instance, a routing domain is the area in which topology information is flooded. Open Shortest Path First (OSPF) simply refers to this as an area. Within the context of BGP, however, a routing domain is the set of routers under the same administrative control. In other words, there are routers your company, school, division, etc. can administer, configure, and manage, and there are routers beyond your control. Those routers under your control are typically said to be within your routing domain; those outside your control are outside your routing domain.
This definition isn't as precise as it sounds, since a particular router may be within the control of an entity, but not under the control of everyone who works for that entity, or is a part of that entity. For example, a limited set of people within an organization may be able to configure the router which connects that organization to the Internet, but that doesn't necessarily mean this router is in a separate routing domain from the rest of the routers in the organization.
Within the world of BGP, those routers under a single point of administrative control are referred to as an Autonomous System (AS). Exterior routing, then, concerns itself with providing routing information between routing domains, or autonomous system boundaries while interior routing concerns itself with providing routing information within a routing domain, or autonomous system.
Why Not Use A Single Protocol for Both Internal and External Routing?
If all routing protocols provide the same informationreachability and path informationwhy not use a single routing protocol for both interior and exterior routing? The simple answer is routing protocols may not just provide reachability informationthey may also provide policy information. There are several reasons protocols designed to route within an autonomous system don't carry policy information:
Within an autonomous system (AS), policy propagation generally isn't important. Since all the routers contained within the routing domain are under a single administrative control, policies can be implemented on all the routers administratively (through manual configuration). As such, the routing protocol doesn't need to propagate this information.
Speed of convergence is a very important factor for routing protocols within an autonomous system, while it is not as much of a factor as stability between autonomous systems. Routing protocols providing reachability information within an autonomous system need to be focused on one thing: providing accurate information about the topology of the network as quickly and efficiently as possible. Open Shortest Path First (OSPF), Intermediate System to Intermediate System (IS-IS), and Enhanced Interior Gateway Protocol (EIGRP) all provide this sort of routing, expressly designed for intra-domain routing.
Some policy propogation is creeping into interior gateway protocols in the form of information about the quality of service across various paths within a network; even here, the definitions of interior and exterior routing becomes blurred.
Why is it so important to split the routing information learned from within your domain from the routing information learned from outside your domain? There are many reasonsfor instance, in order to scope propagation of changes made within a routing domain so they don't impact external routing domains, or perhaps to provide the capability to hide specific information about your network from external entities. The reasoning behind these and many other possible responses will become more obvious as we proceed through the book.
Preventing Changes in Other Routing Domains from Impacting Network Operation
Let's examine the network illustrated in Figure 1-1 and consider how changes in one routing domain could have a serious negative impact on the operation of another routing domain.
Figure 1-1: Unintentional consequences of bringing up a new link when sharing routing information
In this network, the network administrators have decided to share routing information through an interior gateway protocol, including specific information about how to reach servers and hosts within each other's networks as needed. It's decided that 10.1.1.0/24 is one of the destinations which they need to share information about, so redistribution between the IGPs used in Partner A and Partner B's networks is set up to allow this information to leak between the two routing domains. In time, Partner B also partners with Partner C, and again uses IGP redistribution to share information about reachable destinations between the two routing domains.
However, in this case, the routing information provided by Partner C into Partner B's routing domain, and thus leaked into Partner A's routing domain, overlaps (or conflicts) with the internal routing information in Partner A's routing domain. The result is that some destinations within Partner A's network will become unreachable to sources within Partner A's networkthe actions of Partner B's network administrators has caused a fault in Partner A's network. This sort of problem is not only difficult to identify, it is also difficult to fix, since it will involve actions on the part of the network administrators from, possibly, all three routing domains.
Hiding Information About Your Network
The network illustrated in Figure 1-1 also uncovers another problem which can result when simple IGP redistribution is used to share information between autonomous systems; in this case, information about Partner C's internal network infrastructure is passed on to Partner A. If Partner A and Partner C are actually competitors, the information about Partner C's network could actually be used to compromise their competitive position. In general, it is always best to use policy-based rules to prevent information about your internal network from leaking beyond its intended bounds.
Policies Between Domains
Examining the issues illustrated through Figure 1-1, it is apparent that some sort of policy implemented by Partner A, in the first case, and by Partner C, in the second case, would prevent the problems described. For instance, in the first case, a policy of not accepting routing information from outside the network which would interfere with internal routing information would resolve this problem, and all such future problems, without manually configuring a list of filters on a regular basis. In this example, simply filtering the routing information learned by Partner A from Partner B so that no prefixes with a prefix length longer than 24 bits be accepted would resolve this issue permanently, if all the networks within Partner A's routing domain have a 24 bit length.
In the second case, if Partner C could somehow mark the routing information it is advertising to Partner B so that Partner B will not pass the information on to Partner A, this problem could also be resolved without resorting to manual lists maintained by Partner B. So, two possible policies we would want to implement between routing domains would be to mark routes so they cannot (or should not) be advertised beyond the adjacent routing domain (Partner B), and to prevent leaking information that would provide a better route to internal networks than the internal routing information provides. What other sorts of policies would we want to implement through an exterior gateway protocol (EGP)?
Always take the closest exit point. If you want to allow traffic from other networks to traverse your network, but you want to minimize the amount of bandwidth you need to provision in order to allow this, then you should be able to set up a policy of always taking the closest exit point out of your network, rather than the best path, towards the destination. This is typically referred to as closest-exit or hot potato routing.
Take the closest exit point to the final customer. In some cases, in order to provide better service to customers who are reaching your network through another autonomous system, you want to be able to always choose the best, or shortest, path to the final destination, rather than the shortest path out of your network. This is typically referred to as best-exit routing, though oddly, it's sometimes also referred to as cold potato routing.
Take the cheapest exit point. In some cases, you may have contracts requiring payment per a given amount of traffic sent on a particular link or set of links. If this is true, you may want to route traffic out of your autonomous system based on the cheapest exit point, rather than the closest.
Don't traverse certain networks. If you are running a network carrying secure or sensitive data, you might want to have some control over the physical forwarding path the traffic takes once it leaves your network. In reality, controlling the path your traffic takes is almost impossible, even with BGP, because IP packets are routed hop by hop, and thus anyone you send the packets to can decide to send them someplace you don't want them to go.
Avoid accepting redundant or unstable routing information from other networks. In order to scope resource consumption within your network, you may want to impose policies that discard redundant routing information or suppress unstable route advertisement.
In some cases, combining two or more of these different policies may be required. For instance, you may want to take the closest cheap exit point, from you network, and not traverse certain other networks. These policy definitions are rather high level; they state goals, rather than the implementation of goals. One of the more confusing aspects of deploying BGP is turning such goals into actual implemented policies within and at the borders of your network.