To get a thorough understanding of BGP, we'll start by answering the seemingly simple question of why BGP is needed, that is, how BGP is generated, and what it solves. With these questions, we will briefly review the trajectory of a routing protocol development.
The essence of the first route is to describe the expression of a network structure, and the routing table is actually a collection of results. In the early Arpanet network era, the network size is limited, the number of routes is not small, so all the routers can maintain the entire network topology, the routing protocol used at that time is called GGP (Gateway-to-gateway Protocol). GGP naturally becomes the first internal Gateway Protocol (IGP). In about 1980 years. The network manager was confronted with a similar problem today: the increasing number of routes caused by the expansion of network size. In order to solve the increasing problem of network scale, the concept of autonomous system (AS) is proposed, and it can be called the routing management domain. Use a routing protocol within as, and then use a different routing protocol between as. The benefits of this are obvious, and different networks can choose the IGP protocol themselves, and then interconnect through a unified as-between protocol.
In the area of IGP development, first RIP became the mainstream of IP routing, followed by more advanced IGP protocols including OSP and ISIS, which are more automated, smarter, and more reliable. There is mutual trust between the routers of the same as, and these routers are often maintained by the same managers, so the automatic discovery of IGP and the flood of routing computing information are completely open, and the behavior of manual intervention is relatively small.
The need for interconnection of different as to facilitate the creation of an external Gateway Protocol (EGP), the main purpose of the EGP is to pass the routing protocol between different as. The design of the EGP is very simple, as the different as is often connected directly, and most as interconnects involve only a small number of border routers (ASBR). The RFC827 of the EGP, released in 1982, appears to be earlier than the first standard FRC1058 of RIP, but before RFC1058, RIP has been widely used. At the time, RIP+EGP became a standard routing combination.
The EGP was designed so simple that it soon failed to meet the requirements of network management. EGP Simple Release Network can reach information, do not do any optimization, nor consider the loop to avoid. Some people even think that the EGP is not a routing protocol, the many shortcomings of the EGP, eventually led to be replaced by BGP. BGP's first FRC1105 was released in 1989, and compared to the EGP, BGP is more like a routing protocol with many routing protocols, such as solving loop problems, convergence problems, triggering updates, and so on.
It is like different enterprises have their own corporate culture and standards, but the interaction between enterprises should follow the same norms and standards of behavior. There must also be a uniform standard for routing interactions between as. Compared to the many advantages of the EGP, BGP makes BGP the only external gateway protocol, and is widely used on the interconnect network.
In summary, BGP is an external gateway protocol that appears to replace the EGP, which must be able to route optimization, avoid routing loops, be able to deliver routes more efficiently, and maintain a large number of routes. Because BGP is deployed between as in a non-full trust relationship, BGP is required to have rich routing control capabilities, and BGP can be extended with some simple and uniform methods.
--------------------------------------------------------------------------------------
What is BGP
BGP(Border Gateway Protocol) is the border Gateway Protocol , which is a core de-centralized autonomous routing protocol on the Internet. It implements the accessibility of the Autonomous System (as) by maintaining the IP routing table or the ' prefix ' table, which is a vector routing protocol. BGP does not use the traditional internal Gateway Protocol (IGP) metric, but uses a path-based, network policy, or rule set to determine the route. Therefore, it is more appropriate to be called a vector protocol than a routing protocol.
BGP is created to replace the External Gateway Protocol (EGP) protocol, allowing a fully dispersed routing system to be run from the core routing system of the ARPANET model to a decentralized system that includes the NSFNet backbone and its associated regional networks. This has made the Internet a truly decentralized system. Since 1994, BGP has four versions available on the Internet, and all previous versions are now obsolete. The main enhancements in version 4th are to reduce the size of the routing table by supporting Classless Inter-domain Routing and routing aggregation. The 4th edition was compiled on the basis of the early RFC 1771 4th edition, revised through more than 20 drafts, culminating in the formation of RFC 4271 in January 2006. The RFC 4271 version corrects some errors and clarifies ambiguities, leading to RFC industry practices that are closer to industrial-grade application standards.
Most Internet service providers (ISPs) must use BGP to establish routing connections with other ISPs, especially when they are taking multihomed connections. Therefore, even though most Internet users do not use it directly, BGP is still one of the most important protocols for the Internet, as compared to the 7th signaling System (SS7), which is set up through the PSTN's cross-vendor core response protocol. A large private IP network can also use BGP. For example, when a number of large open Shortest Path First (OSPF) networks need to be merged, while the Open Shortest path precedence protocol itself does not provide this kind of extensibility. Another reason for using BGP is that it can provide a better redundant network for a single, multi-homed ISP (RFC 1998) or multiple ISP networks.
Edit BGP usage Principles
When ① multiple paths, Bgpspeaker only select the optimal path to use for itself.
②bgpspeaker only advertises the routes that it uses to the neighbors.
③bgpspeaker routes obtained from EBGP are advertised to all of its BGP neighbors (including EBGP and IBGP).
④bgpspeaker the route obtained from IBGP is not advertised to its IBGP neighbor.
⑤bgpspeaker whether the route obtained from IBGP is advertised to its EBGP neighbor depends on the IGP and BGP synchronization.
Once the ⑥ connection is established, Bgpspeaker will advertise all of its BGP routes to the new neighbor.
Edit BGP properties
[1]BGP is an external routing protocol that differs from the internal routing protocols of OSPF, RIP, and so on, and does not focus on discovering and computing routes, but on controlling the propagation of routes and choosing the best routes.
To control the propagation and routing of Routes, BGP comes with attribute information for routing. BGP can attach many attributes on a given route, so the routing update package used by IGP is smaller than the route update packet used by BGP, which is the largest difference between IGP and BGP.
The BGP routing attribute is a set of parameters that further describes a particular route, enabling BGP to filter and select routes. Routing properties are widely used when configuring routing policies, but not all route properties are used. Routing attributes are categorized into the following categories.
- Compliance attribute: The routing attribute that must exist in the routing update Data Packet, which has an irreplaceable role in BGP routing information, and the routing information will be faulted if the required property is missing. As As-path is a mandatory attribute, BGP uses it to avoid routing loops, which can be problematic without routing.
- Optional attribute: It is optional and does not necessarily exist in the routing update Data message, which is set exactly as needed. such as the Med attribute, it is used to control the routing.
- Transition Properties: Properties that have transitive properties as inter-as are transition attributes, and the domain values of the transition properties can be passed to other as and continue to work. such as the Origin attribute, once the origins of the routing information are determined, the domain value will persist regardless of the routing information being passed to the as.
- Non-transition attribute: only works locally, out of the autonomous system, the domain value reverts to the default value, such as local preference. The following is a list of several common properties, as shown in the table.
Table: Several common properties
Type code |
Property name |
Mandatory/optional |
Transition/Non-transition |
1 |
Origin |
Will comply |
Transition |
2 |
As-path |
Will comply |
Transition |
3 |
Next-hop |
Will comply |
Transition |
4 |
MED |
Options available |
Non-transition |
5 |
Local-preference |
Options available |
Non-transition |
8 |
Community |
Options available |
Transition |
Each attribute has a specific meaning and can be used flexibly, making BGP a powerful feature. The BGP attribute can be extended to 256 types. Some common properties of BGP are listed here.
- Origin Origin property: Defines the source of the path information, marking how a route becomes a BGP route. such as IGP, EGP and incomplete.
- As-pathas Path property: Is the sequence of as that the route passes through, which lists the as that passes before reaching the advertised network. The BGP speaker takes its own as forward to the header of the received as path, which prevents the routing loop and is used for routing filtering and selection.
- Next-hop Next Hop property: Contains the IP address of the next hop border router that reaches the network listed in the update message. The next hop of BGP differs from IGP, which can be the address of the peer that advertises this route, such as EBGP, which is the same as IGP. In other cases, BGP uses a third-party next hop, such as IBGP, for the next hop obtained from the EBGP peer to be passed unchanged within the autonomous system. On multiple access media, BGP takes the actual source of the route for the next hop, even if it is not a BGP peer.
- Med (multi-exit-discriminators) property: When an as has multiple portals, you can use the Med attribute to help its external neighbor router select a better population path. The smaller the Med value of a route, the higher its priority.
- Local-preference Local precedence attribute: Used to optimally route to a destination within an autonomous system. Reflects the degree of preference of the BGP spokesperson for each external route. The larger the value of the local precedence property, the higher the route is preferred.
Community Community Properties: Identifies a set of routing information that has the same characteristics, regardless of the IP subnet on which it resides and the autonomous system. Recognized community attribute values are No-export, N0, advertise, Localas, and the Internet.
----------------------------------------------------------------------------
BGP (routing between Autonomous Systems) protocol detailed1. The introduction of BGP is a routing protocol between autonomous systems. The network accessibility information for BGP switching provides enough information to detect routing loops and make decisions based on performance precedence and policy constraints. Specifically, the BGP interchange contains network accessibility information for all as paths and executes the routing policy according to the configuration information. With the progress and growth of the Internet in recent years, it has to face a
1. Introduction
BGP is the routing protocol between Autonomous systems. The network accessibility information for BGP Switching provides enough information to detect routing loops and make decisions based on performance precedence and policy constraints. Specifically, theBGP Interchange contains network accessibility information for all as paths and executes the routing policy according to the configuration information.
With the progress and growth of the Internet in recent years, it has to face some serious scale problems, including:
-Exhaustion of Class B network address space. One of the main reasons for this problem is the lack of medium-sized networks for medium-sized organizations, a Class C network with a maximum of 254 host addresses, too few, and a class B network that allows up to 65,534 addresses, but is too large to be fully used.
-The growth of the Internet routers in the middle of the table makes the current software (and people) unable to manage effectively.
-Exhaustion of 32-bit IP address space.
It is clear that the first two problems and the last one are likely to become urgent in the next year or two and three years respectively. Classless Inter-Domain Routing (CIDR) attempts to address these problems by designing mechanisms to reduce the growth rate of routing tables and allocation of new IP networks. It does not address a more permanent third problem, but instead strives to postpone recent problems so that the Internet can still function effectively while embarking on long-term solutions.
BGP-4 extends to BGP-3, which supports aggregation of routing information and routing reduction based on classless Inter-domain Routing (CIDR). This memo discusses the application of BGP-4 in the Internet.
All the discussions in this document are based on the assumption that the Internet is a collection of freely connected autonomous systems. In other words, the Internet can be modeled as a general Network diagram on which the nodes are as, and the edges are the connections between each of the AS.
The classic definition of an autonomous system is that a group of routers, under unified management, uses an internal gateway protocol and a uniform metric to route packets through the as, and routes packets to other as through the external Gateway protocol. The classic definition is still evolving, and some as within it use a variety of internal gateway protocols and metrics. Here, emphasize the meaning of the autonomous system in this document, even if it uses a variety of IGP and metric, its management is different from other as, its internal route is consistent, when the route through it, it is seen as a node on the diagram. Each as is managed by a management body, at least externally it represents the routing information of the system.
2. BGP topology model
When we say a connection between two as, two things are implied:
Physical connection: There is a shared data link subnet between two as, and on that subnet, each as has at least one of its own border gateway routers. Therefore, the border gateway router for each as can forward packets to other as's border gateway routers without resorting to the routing between as and to as.
BGP Connections: There is a BGP session process between BGP speakers for each as, routed through session communication, and declared as reaching a target network.
In this document, we impose additional restrictions on the BGP speakers that make up BGP connections: they must be their own direct shared data link network. Therefore, BGP sessions between adjacent as are not required to route between as or as. Cases beyond the scope of this article may not match this limitation.
Therefore, in each connection, each as has more than one BGP spokesperson and Border Gateway router, these BGP speakers and Border gateway routers are distributed across the shared data link network. Notice that the BGP spokesperson is not necessarily a border gateway router, and vice versa. The path of a BGP spokesperson that connects to the previous as can be used by a border gateway router on the same shared subnet as other as, that is, the non-direct neighbor is allowed.
The flow within an as is either derived from the as or finally the as (that is, the IP packet's source IP or destination IP is within that as). The traffic described above is called "local traffic", otherwise it is called "transition traffic". The primary purpose of BGP usage is to control the transition traffic.
As how to handle the transition traffic, as can be divided into the following categories:
End as: Connect to only one other as. Naturally, end as only transports local traffic.
Multihomed as: Connects to more than one other as, but does not transport transition traffic.
Transition as: Connect to more than one other as to transport both local and transition traffic.
A complete as path provides an efficient and straightforward way to avoid routing loops and eliminate the "count-to-infinity" problem of adjoint distance vector algorithms, soBGP does not have any restrictions on the connection topology between as.
3. BGP in the Internet
3.1 Topological considerations
The Internet topology can be seen as an arbitrary interconnection of transition as, multihomed as, and end as. To minimize the impact on the current structure of the Internet, terminal and multihomed as do not necessarily use BGP. These as can run other protocols (for example, EGP) to Exchange Network accessibility information with transition as. The transition as using BGP will mark this information to indicate that it is learning from a method other than BGP . BGP does not necessarily run at the end or multihomed as, which does not negatively affect the routing quality of the packets that originate from or finally end as or multihomed as.
However, it is still recommended to use BGPon end and multihomed as. In these cases,BGP provides better bandwidth and performance compared to other currently used protocols such as EGP. In addition, this will reduce the use of default routes and provide a better choice for inter-as routing for multihomed as.
3.2 BGP 's overall characteristics
On a global level,BGP is used to pass routing information between multiple autonomous systems. The information flow is as follows:
+-----------+ +------------+BGPbgp bgp for BGP bgp ------------------ -+ +--------------------------+ | IGP | | IGP | +------------+ +-----------+<-as a--> <--as b-> |
This chart illustrates that only BGP is used to transmit information between as, and BGP and IGP can transmit information within as. Ensuring the compatibility of routing information between BGP and IGP within as is a significant issue.
3.3 BGP neighbor Relationship
The internet is seen as a collection of arbitrarily connected as. Routers that are directly connected via BGP are the BGP speakers. A BGP spokesperson can be within the same as or within different as. Each as BGP spokesperson communicates with each other, following the strategy established by each as to Exchange network accessibility information. For a BGP spokesperson, if you communicate with other BGP speakers and that BGP spokesperson is in a different as, then that other BGP speaker is called an external peer, and if within the same as, is called an internal peer.
There can be many BGP speakers in an as and are considered needed. Typically, multiple BGP speakers are required if an as has multiple connections to other as. All BGP spokespersons represent the same as and maintain a unified image of the external. This requires consistent routing information between them. These routers can communicate with each other through BGP or other methods. The policy constraints of all BGP speakers within the same as must be consistent. Some techniques, such as the use of tagged IGP, can be used to detect possible contradictions.
For external peers, peers belong to different as, but share the same data link subnet. This common subnet is used to transport BGP information between peers. If BGP is used through an intervening as, then the as path information will be invalidated. The autonomous system number must be used in BGP to indicate the autonomous system in which the BGP spokesperson resides.
bgp--Border Gateway Protocol