Edge Gateway Protocol (BGP)

Source: Internet
Author: User
Tags unsupported
I. background
A route consists of two basic actions: determining the optimal path and transmitting information groups through the network. The Network Transmission Group is relatively simple, and the determination of the path can be complicated. BGP is a protocol for Path Selection in today's networks. This document briefly describes the basic operations of BGP and describes its Protocol components.
BGP implements Inter-Domain Routing in TCP/IP networks. BGP is an external Gateway Protocol (EGP), that is, it performs routing between multiple autonomous systems or domains, and exchanges routing and accessibility information with other BGP systems.>
BGP is designed to replace its predecessor (no longer used) External Gateway Protocol (EGP) as the standard external Gateway Routing Protocol for the global Internet. BGP solves serious problems of EGP and can adapt to the rapid development of the Internet more effectively.
Note: EGP is an external Gateway Protocol (also called EGP). Do not confuse the two.
The following describes the data that the core router uses BGP to route between.

BGP rules in multiple RFC:
Rfc1771-describe bgp4, that is, the current BGP version.
Rfc1654-describes the first bgp4 specification.
Rfc1105, rfc1163, and rfc1267-Describe the BGP version before bgp4.
Ii. BGP operations
BGP performs three types of routes: As route, as internal route, and as route.
As routes occur between two or more BGP routers of different as. Peer routers of these systems use BGP to maintain a consistent network topology view, the BGP peers for as communication must be in the same physical network. The Internet is an instance that uses this route, because it consists of multiple as (or management domain), many of which constitute the Internet's research institutions, companies, and entities. BGP is often used for routing selection to provide the optimal path for the Internet. As routes occur between two or more BGP routers in the same as. Peer routers in the same as use BGP to maintain a consistent system topology view. BGP is also used to determine which router acts as the external as connection point. I reiterate that the Internet provides as-based routing instances. An organization, such as a university, can use BGP to provide optimal routing in its own management domain (or. The BGP protocol can provide both as and as internal routes.
The pass-through (AS) Route occurs between two or more BGP peer routers that exchange data through the as without running BGP. In the as environment, BGP communication does not come from nodes in the AS and the target nodes are not in the, BGP must interact with the routing protocol used in the as to successfully transmit BGP communication through the as, as shown in the as environment:

Iii. BGP routing
Like other routing protocols, BGP maintains the route table, sends route update information, and determines the route based on the routing metric. The main function of the BGP system is to exchange network accessibility information of other BGP systems, including the list of as paths. This information can be used to establish an as system connection diagram to eliminate routing loops, and execute the as-level policy.
Each BGP router maintains a route table consisting of all available paths of a specific network, but it does not clear the route table. It maintains the route information received from the peer router until it receives value-added (incremental) updates.
BGP devices exchange route information after initial data exchange and value-added update. When the router is connected to the network for the first time, the BGP router switches their entire BGP Route table. Similarly, when the route table changes, the router sends the changed part in the route table. The BGP Router does not send route updates cyclically, And the BGP Route update only contains the optimal path to a network.
BGP uses a single routing metric to determine the optimal path to a given network. This metric contains any unit value that specifies the link priority. The BGP metric is usually assigned to each link by the network administrator. The value assigned to a link can be based on any number of scales, including the number of as passing through, stability, speed, latency, or cost.
Iv. BGP Message Types
Rfc1771 specifies four BGP message types: initial (open) messages, update messages, notification messages, and keep-alive messages.
An initial message opens a BGP communication session between the peer router. It is the first message sent after the transmission protocol is established. The initial message is confirmed by the keep-alive message sent by the peer device, updates, notifications, and keep-alive messages can only be exchanged after confirmation.
Update messages are used to provide route updates to other BGP systems so that the router can establish a consistent view of the network topology. Updates are sent over TCP to ensure transmission reliability. Update messages can clear one or more invalid routes from the routing table and publish several routes at the same time.
A notification message is sent when an error is detected. The notification message is used to close an Active session and notify other routers of the reason for closing the session.
The keep-alive message notifies the peer-to-peer BGP router that the device is still alive. Keep-alive messages are frequently published to prevent session expiration.
5. BGP grouping format
This section describes the BGP initial, update, notification, and keep-alive message types and basic BGP header formats.
1. Header Format
All BGP message types use the basic grouping header. The initial, update, and notification messages have additional domains, while the keep-alive messages only use the basic grouping header.
The domain used for the BGP header:

Each BGP group contains a header, which is used to identify the group. The following describes each domain in the header.
Tag-contains the authentication value.
Length-indicates the total length of a message, in bytes.
Type-the message type is one of the following:
Initial
Update
Notification
Keep-alive
Data: it is an optional field that contains upper-layer information.
2. Initial Message format
The BGP Initial Message consists of a BGP header and an additional domain, which is the additional domain of the BGP initial message:

The BGP group identified as the BGP initial message in the type domain in the header contains the following domains, which provide an exchange solution for establishing a peering relationship between the two BGP routers:
Version-provides the BGP version number so that the receiver can confirm whether it is running the same version protocol as the sender.
Autonomous System-provides the as number of the sender.
Hold-time-the maximum number of seconds before the sender is considered invalid.
Bgp id-provides the sender's ID (IP address). It is determined at startup that it is the same for all local interfaces and all peer BGP routers.
Optional parameter length-the length of the optional parameter field (if any ).
Optional parameter-contains a set of optional parameters. Currently, only one optional parameter type is defined: authentication information. The authentication information contains the following two domains:
Authentication code: indicates the authentication type used.
Authentication data: contains data used by the authentication mechanism.
3. Update message format
A bgp update message consists of a BGP header and an additional domain. It is an additional domain for bgp update messages:

After receiving the UPDATE message group, the router can add or delete specified table items from its route table to ensure the accuracy of the route. The update message contains the following fields:
Invalid route length-indicates the total length of the failed route domain or the domain does not exist.
Invalid route-contains the IP address prefix of a group of invalid routes.
Total path property length-indicates the total length of the path property field or the domain does not exist.
Path property-describes the attributes of the publishing path. The possible values are as follows:
Source: required. It defines the source of path information.
As path: A required attribute, which consists of a series of as path segments.
Next Hop: required. It defines the IP address of the edge router from the application listed in the network-level accessible information domain to the next hop of the destination.
Multiple egress differentiation: an optional attribute used to differentiate between multiple egress of an adjacent.
Local priority: an optional attribute used to specify the priority level of the published route.
Atomic aggregation: an optional attribute used to publish route selection information.
Aggregation: an optional attribute that contains aggregated route information.
Network-layer accessibility information-contains the IP address prefix of a group of published routes.
4. Notification Message format:
Additional domains used for BGP notification messages:

A notification message group is used to notify a peer router of an error.
Error code: identifies the type of error. The following error types are defined:
Message Header error: indicates a message header error, such as unacceptable message length, tag value, or message type.
Initial Message error: indicates an error in the initial message, such as unsupported version number, unacceptable as number, IP address, or unsupported authentication code.
Update message error: Indicates An error occurred while updating the message, such as incomplete attribute list, incorrect attribute list, or invalid next hop attribute.
Retention Time expired: indicates that the retention time has expired, and then the BGP node is considered invalid.
Finite state machine error: Indicates events not expected.
Terminate: when a serious error occurs, the BGP connection is closed according to the request of the BGP device.
Error subcode-provides more detailed information about reported errors.
Error Data-contains data based on error codes and error subcode domains, used to detect the cause of sending notification messages.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.