Introduction to BGP, the difference between BGP and IGP, and what are the advantages of BGP?

Background of BGP

 In order to facilitate the management of a growing network, the network is divided into different AS (Autonomous System, autonomous system).

 In the early days, EGP ( Exterior Gateway Protocol , Exterior Gateway Protocol) was used to implement dynamic exchange of routing information between ASs. However, the design of EGP is relatively simple. It only publishes the routing information reachable by the network without optimizing the routing information. At the same time, it does not consider issues such as loop avoidance. It will soon fail to meet the requirements of network management.

 BGP ( Border Gateway Protocol , Border Gateway Protocol) is another exterior gateway protocol designed to replace the original EGP. Different from the original EGP, BGP can select routes , avoid routing loops , transfer routes more efficiently and maintain a large amount of routing information .

BGP is a Path- Vector Routing Protocol (Path-Vector Routing Protocol)  that realizes the reachability of routes between ASs and selects the best route .

insert image description here

Advantages of BGP

Compared with the traditional IGP protocol:

1. BGP uses TCP as its transport layer protocol (port number is 179), and uses triggered incremental routing updates instead of periodic routing updates.

 This point determines that BGP will have a higher status than IGP in operators and public network environments, because IGP protocol routing updates may cause network fluctuations and may even affect normal business forwarding.

2. Only the routing information is transmitted, and the topology information in the AS will not be exposed.

3. BGP can carry a large amount of routing information and support large-scale networks.

 Both IGP protocols share one IGP routing table, while BGP uses a single BGP routing table, and the two tables are not related to each other.

4. BGP provides rich routing policies, can flexibly select routes, and can guide peers to publish routes according to policies.

5. BGP can support the application of MPLS/VPN and transmit customer VPN routes.

6. BGP provides route aggregation and route attenuation functions to prevent route oscillation. These two functions effectively improve network stability.

Summary: BGP is more secure and reliable, incremental routing updates, support for super-large networks, more routing tools, etc.

IGP and BGP

What is the general process of BGP establishment and routing interaction? What is the difference between the neighbor establishment and exchange routing process of the IGP routing protocol?

1. BGP establishes neighbors and sends routing information through TCP packets. Because neighbors are established based on TCP, as long as the bottom-level routes of two routers are reachable, they can establish BGP neighbors and exchange routes.

2. BGP establishes priority to initiate TCP to establish a connection. After the connection is successful, it sends a relevant BGP message to request the establishment of a BGP neighbor, and then sends a BGP route after the establishment is successful.

The IGP protocol usually completes the exchange of routing information before completing the establishment of neighbors. For example, after the establishment of the adjacency state of OSPF, the routes are also converged.

And BGP is to establish a good relationship first, and then send the route. Because there are many BGP routing entries, if the routing is sent during the establishment process, it will consume a lot of time to establish the relationship.

If you want to establish neighbors across devices, it means that the underlying routes across devices have been established, so why establish a BGP neighbor on the network where the underlying IGP has already been established?

1. It depends on the application scenario. If IGP is deployed on the internal network of the enterprise, it is indeed sufficient.

2. However, if it is an operator or some large-scale network, there are many routing entries and the network topology is more complicated. Although the IGP protocol can be used, slight changes in the network topology will cause changes in the entire network topology, resulting in network turbulence. The more routing entries, the slower the convergence time.

3. If IGP is used as the basis to establish BGP neighbors, they can learn BGP routes from each other. When the network topology changes, the affected devices only need to send the changed routing entries to other BGP neighbors, and the stability is obvious.

Basic terms of BGP

AS autonomous system

 autonomous system, in the Internet, an autonomous system (AS) is a small unit that has the right to independently decide that various routing protocols should be used in the system. It can be understood as a small gang in the network.

 Different ASs are distinguished by the AS number, and the AS number has two representation modes: 16bit and 32bit.

在长度为16bit的AS号表示方式中:64512-65534为私有AS号。
在长度为32bit的AS号表示方式中:4200000000-4294967294为私有AS号。

 IANA is responsible for the distribution of AS numbers (it is also the organization that distributes public IP addresses).

IANA的所有任务可以大致分为三个类型:
一、域名。IANA管理DNS域名根和.int,.arpa域名以及IDN(国际化域名)资源。
二、数字资源。IANA协调全球IP和AS(自治系统)号并将它们提供给各区域Internet注册机构。
三、协议分配。IANA与各标准化组织一同管理协议编号系统。

 When communication between different ASs is required, the BGP routing protocol is used to transfer routes between ASs.

BGP Speaker (BGP Speaker)

 Routers running BGP are called BGP speakers or BGP routers

BGP peer (Peer)

 Two routers that have established a BGP session are peers, also known as BGP neighbors.

 There are two types of peer relationships in BGP: EBGP and IBGP peer relationships

 1. EBGP (External BGP): BGP peer relationship in different autonomous systems .

 2. IBGP (Internal BGP): BGP peer relationship in the same autonomous system .

BGP path attribute (Path attribute)

 Each BGP route carries a variety of path attributes. BGP can control path selection through these path attributes, unlike IS-IS and OSPF, which can only control path selection through Cost. Therefore, BGP has rich operability in path selection. , you can choose the most suitable path control method in different scenarios.
insert image description here

For more related notes, watch CSDN: HCIA~HCIE personal notes

Guess you like

Origin blog.csdn.net/qq_45443704/article/details/129892863