BGP neighbor establishing method and device, equipment and medium

By configured the BPG network neighbors of the IP address of the end physical interface and create a peer -to -peer group, the BGP neighbor has a complex and error -prone problem, and the establishment of flexible and efficient BGP neighbors.

CN119383126AActive Publication Date: 2025-01-28INSPUR NETWORK TECH (SHANDONG) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411520951.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-01-28
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

In a network using BGP as a dynamic routing protocol, network engineers need to pre-plan the configuration of BGP neighbors, resulting in complex manual configuration and error-prone when network IP addresses are changed or when there are many devices and complex networking.

Method used

Configure the BPG network neighbors through the IP address of the end physical interface, create a peering group, add the configuration to the elevator group, and create a BGP neighbor through the peering group, add it to the peer group of the peer group Essence

Benefits of technology

The BPG network segment can be configured without the need to plan a detailed IP address for BGP in advance, simplifying the configuration process, and improved the support of flexibility and batch built BGP neighbors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383126A_ABST
    Figure CN119383126A_ABST
Patent Text Reader

Abstract

The invention discloses a BGP neighbor establishing method, device and equipment and a medium, and the method comprises the steps: configuring a BPG network segment neighbor through an IP address of an opposite-end physical interface; creating a peer group under the instance of the BPG network segment neighbor; adding the configuration of the BPG network segment neighbors to a peer group; and creating a BGP neighbor for the IP address belonging to the neighbor of the BPG network segment through the peer group, and adding the newly created BGP neighbor into a peer list of the peer group. According to the method provided by the invention, a detailed neighbor IP address does not need to be planned for the BGP in advance, after the network segment is configured, only the IP address of the equipment interface is required to be in the network segment, meanwhile, the BPG neighbor is established through the method provided by the invention, the configuration is simple, the flexibility is high, and the BGP neighbors can be established in batches.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of dynamic routing, and in particular to a method, device, equipment and medium for establishing a BGP neighbor. Background Art

[0002] In a network that uses BGP as a dynamic routing protocol, network engineers need to plan in advance how to establish BGP neighbors, such as using IBGP or EBGP neighbors. However, due to the complexity of actual deployment and the use environment, the network IP address may change at any time, or there are many network devices and the networking is complex. A network device needs to establish multiple BGP neighbors to meet actual network needs. At this time, the method of manually configuring each neighbor is more complicated and prone to errors. When the network IP address changes, the neighbor configuration also needs to be modified. Summary of the invention

[0003] In order to solve the above problems, the present application proposes a method, apparatus, device and medium for establishing a BGP neighbor, wherein the method includes:

[0004] Configure the BPG network segment neighbor through the IP address of the physical interface of the opposite end; create a peer group under the instance of the BPG network segment neighbor; add the configuration of the BPG network segment neighbor to the peer group; create a BGP neighbor for the IP address belonging to the BPG network segment neighbor through the peer group, and add the newly created BGP neighbor to the peer list of the peer group.

[0005] In one example, creating a BGP neighbor for the IP address belonging to the BPG network segment neighbor through the peer group includes at least one of actively creating a BGP neighbor and passively creating a BGP neighbor.

[0006] In one example, the active creation of a BGP neighbor specifically includes: checking the ARP table learned by the device from a remote end; if the ARP IP address in the ARP table belongs to the BPG network segment neighbor, using TCP to connect to the ARP IP address; if the connection is successful, creating a BGP neighbor for the ARP IP address, and adding the newly created BGP neighbor to the peer list of the peer group; if the connection is not successful, starting a timer, and trying to connect again after a preset time period, until the connection number reaches the preset number of connections and then stops the connection.

[0007] In one example, after checking the ARP table learned by the device from a remote end, the method also includes: configuring a default-started scheduled task in the BPG network segment neighbor; through the scheduled task, checking whether there is an ARP update in the ARP table at every preset time interval; if there is an ARP update, repeating the connection process.

[0008] In an example, the passive creation of a BGP neighbor specifically includes: receiving a BGP open message; parsing the BGP open message to obtain a peer IP address; and creating a BGP neighbor based on the peer IP address.

[0009] In one example, creating a BGP neighbor based on the peer IP address specifically includes: determining whether the peer IP address is within the BPG network segment neighbor; if the peer IP address is within the BPG network segment neighbor, creating a BGP neighbor based on the peer IP address, and adding the newly created BGP neighbor to the peer list of the peer group.

[0010] In one example, the peer group is used to provide a unified configuration template for subsequent BPG neighbors in the BPG network segment.

[0011] The present application also provides a device for establishing a BGP neighbor, including: a configuration module, which configures a BPG network segment neighbor through the IP address of the physical interface of the opposite end; a peer group module, which creates a peer group under the instance of the BPG network segment neighbor; an adding module, which adds the configuration of the BPG network segment neighbor to the peer group; a creating module, which creates a BGP neighbor for the IP address belonging to the BPG network segment neighbor through the peer group, and adds the newly created BGP neighbor to the peer list of the peer group.

[0012] The present application also provides a BGP neighbor establishment device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute: configuring a BPG network segment neighbor through the IP address of the opposite physical interface; creating a peer group under the instance of the BPG network segment neighbor; adding the configuration of the BPG network segment neighbor to the peer group; creating a BGP neighbor for the IP address belonging to the BPG network segment neighbor through the peer group, and adding the newly created BGP neighbor to the peer list of the peer group.

[0013] The present application also provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to: configure a BPG network segment neighbor through the IP address of the physical interface of the opposite end; create a peer group under the instance of the BPG network segment neighbor; add the configuration of the BPG network segment neighbor to the peer group; create a BGP neighbor for the IP address belonging to the BPG network segment neighbor through the peer group, and add the newly created BGP neighbor to the peer list of the peer group.

[0014] The method proposed in this application can bring the following beneficial effects: there is no need to plan detailed neighbor IP addresses for BGP in advance. After the network segment is configured, only the device interface IP address needs to be within the network segment. At the same time, the method provided in this application is used to establish BGP neighbors, which is simple to configure and highly flexible, and also supports batch establishment of BGP neighbors. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0016] Figure 1 A flowchart of a method for establishing a BGP neighbor in an embodiment of the present application;

[0017] Figure 2 This is a schematic diagram of a process of actively creating a BGP neighbor in an embodiment of the present application;

[0018] Figure 3 This is a schematic diagram of a process of passively creating a BGP neighbor in an embodiment of the present application;

[0019] Figure 4 A schematic diagram of the structure of a device for establishing a BGP neighbor in an embodiment of the present application;

[0020] Figure 5 This is a structural diagram of a BGP neighbor establishment device in an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0022] Generally speaking, the establishment of BGP neighbors depends on TCP messages, and network devices need to establish TCP connections first before they can directly exchange TCP messages. The establishment of a TCP connection depends on the connection of the program's socket. A socket connection requires knowing the IP address of the other end and the network must be reachable. Here, reachable refers to layer 2 or layer 3 reachability. Therefore, when configuring BGP, you need to know the IP addresses of both the other end and the local end to establish neighbors. Generally, the neighborA.BCD command is used to configure BGP neighbors, where ABCD is the IP address of the other end device. This configuration method uses clear IP address information, that is, the IP address must exist on the other end, otherwise the neighbor cannot be established.

[0023] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0024] Figure 1 A flowchart of a method for establishing a BGP neighbor provided in one or more embodiments of this specification. The process can be executed by a computing device in the corresponding field, and some input parameters or intermediate results in the process allow manual intervention and adjustment to help improve accuracy.

[0025] The analysis method involved in the embodiments of the present application can be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For the convenience of understanding and description, the following embodiments are described in detail by taking a server as an example.

[0026] It should be noted that the server can be a single device or a system composed of multiple devices, that is, a distributed server, and this application does not make any specific limitations on this.

[0027] like Figure 1 As shown, the embodiment of the present application provides a method for establishing a BGP neighbor, including:

[0028] S101: Configure the BPG network segment neighbor using the IP address of the peer physical interface.

[0029] Configure the BGP network segment neighbor neighbor ABCD / Mremote-asAS using the IP address of the peer physical interface.

[0030] S102: Create a peer group under the instance of the BPG network segment neighbor.

[0031] By default, a Peer Group named ABCD / M is created under this BGP instance.

[0032] S103: Add the configuration of the BPG network segment neighbor to the peer group.

[0033] All subsequent configurations under the neighbor are automatically added to the Peer Group, providing a unified configuration template for subsequent neighbors on the network segment.

[0034] S104: Create a BGP neighbor for the IP address of the neighbor in the BPG network segment through the peer group, and add the newly created BGP neighbor to the peer list of the peer group.

[0035] In one embodiment, when creating a BGP neighbor, the detailed neighbor establishment process is divided into active establishment and passive establishment.

[0036] like Figure 2 As shown, when actively establishing a BGP neighbor, it is necessary to check the ARP table learned by this device from the remote end; if the ARP IP address in the ARP table belongs to the BPG network segment neighbor, TCP is used to connect to the ARP IP address; if the connection is successful, a BGP neighbor is created for the ARP IP address, and the newly created BGP neighbor is added to the peer list of the peer group; if the connection is not successful, the timer is started, and the connection is tried again after a preset time period, until the connection number reaches the preset number of connections and the connection is stopped.

[0037] Specifically, after configuring the network segment neighbor, BGP will check the ARP table learned by this device from the remote end. If there is an ARP IP address in the ARP table belonging to the ABCD / M network segment, it will try to connect to the IP address using TCP. If the connection is successful, a BGP neighbor will be created for the IP and added to the peer list of the Peer Group. The subsequent process is the normal BGP message processing process. If the connection is not successful, it will delay for a period of time and try to connect again until the connection is stopped after three times. At the same time, BGP will start a scheduled task by default, checking whether there is an ARP update at regular intervals and repeating the connection process.

[0038] like Figure 3 As shown, when passively establishing a BGP neighbor, after receiving the BGP open message, parse the message content to obtain the peer IP address, and determine whether the IP address is in the ABCD network segment. If so, add the neighbor to the peer list of the PeerGroup and start the BGP message processing state machine. If not, ignore the message.

[0039] like Figure 4 As shown, the embodiment of the present application also provides a device for establishing a BGP neighbor, including:

[0040] Configuration module 401 configures the BPG network segment neighbor through the IP address of the opposite physical interface.

[0041] The peer group module 402 creates a peer group under the instance of the BPG network segment neighbor.

[0042] The adding module 403 adds the configuration of the BPG network segment neighbor to the peer group.

[0043] The creation module 404 creates a BGP neighbor for the IP address of the neighbor in the BPG network segment through the peer group, and adds the newly created BGP neighbor to the peer list of the peer group.

[0044] like Figure 5 As shown, the embodiment of the present application also provides a BGP neighbor establishment device, including:

[0045] at least one processor; and,

[0046] a memory communicatively connected to the at least one processor; wherein,

[0047] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0048] Configure the BPG network segment neighbor through the IP address of the physical interface of the opposite end; create a peer group under the instance of the BPG network segment neighbor; add the configuration of the BPG network segment neighbor to the peer group; create a BGP neighbor for the IP address belonging to the BPG network segment neighbor through the peer group, and add the newly created BGP neighbor to the peer list of the peer group.

[0049] The embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as follows:

[0050] Configure the BPG network segment neighbor through the IP address of the physical interface of the opposite end; create a peer group under the instance of the BPG network segment neighbor; add the configuration of the BPG network segment neighbor to the peer group; create a BGP neighbor for the IP address belonging to the BPG network segment neighbor through the peer group, and add the newly created BGP neighbor to the peer list of the peer group.

[0051] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0052] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0053] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0054] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0055] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0056] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0057] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0058] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0059] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory media such as modulated data signals and carrier waves.

[0060] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0061] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for establishing a BGP neighbor, characterized in that: include: Configure the BPG network segment neighbor using the IP address of the peer physical interface; Under the instance of the BPG network segment neighbor, create a peer group; Adding the configuration of the BPG network segment neighbor to the peer group; Through the peer group, a BGP neighbor is created for the IP address of the neighbor in the BPG network segment, and the newly created BGP neighbor is added to the peer list of the peer group.

2. The method according to claim 1, characterized in that The creating of BGP neighbors for the IP addresses belonging to the BPG network segment neighbors through the peer group includes at least one of actively creating BGP neighbors and passively creating BGP neighbors.

3. The method according to claim 2, characterized in that The actively creating a BGP neighbor specifically includes: Check the ARP table learned by the device from the remote end; If the ARP IP address in the ARP table belongs to the BPG network segment neighbor, use TCP to connect to the ARP IP address; If the connection is successful, a BGP neighbor is created for the IP address of the ARP, and the newly created BGP neighbor is added to the peer list of the peer group; If the connection is not successful, the timer is started and the connection is attempted again after a preset time period, until the connection times reach the preset number of times and then the connection is stopped.

4. The method according to claim 3, characterized in that After checking the ARP table learned by the device from the remote end, the method further includes: Configure a scheduled task that is started by default in the BPG network segment neighbor; By means of the timed task, checking whether there is an ARP update in the ARP table at a preset interval; If there is an ARP update, the connection process is repeated.

5. The method according to claim 2, characterized in that: The passive creation of a BGP neighbor specifically includes: Receive BGP open messages; Parsing the BGP open message to obtain the peer IP address; A BGP neighbor is created based on the peer IP address.

6. The method according to claim 5, characterized in that The step of creating a BGP neighbor based on the peer IP address specifically includes: Determine whether the peer IP address is within the BPG network segment neighbor; If the peer IP address is within the BGP network segment neighbor, a BGP neighbor is created according to the peer IP address, and the newly created BGP neighbor is added to the peer list of the peer group.

7. The method according to claim 1, characterized in that The peer group is used to provide a unified configuration template for subsequent BPG neighbors in the BPG network segment.

8. A device for establishing a BGP neighbor, characterized in that: include: Configuration module, configure BPG network segment neighbors through the IP address of the peer physical interface; A peer group module, creating a peer group under the instance of the BPG network segment neighbor; An adding module, adding the configuration of the BPG network segment neighbor to the peer group; A creation module creates a BGP neighbor for the IP address of the neighbor in the BPG network segment through the peer group, and adds the newly created BGP neighbor to the peer list of the peer group.

9. A BGP neighbor establishment device, characterized in that: include: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute: Configure the BPG network segment neighbor using the IP address of the peer physical interface; Under the instance of the BPG network segment neighbor, create a peer group; Adding the configuration of the BPG network segment neighbor to the peer group; Through the peer group, a BGP neighbor is created for the IP address of the neighbor in the BPG network segment, and the newly created BGP neighbor is added to the peer list of the peer group.

10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured to: Configure the BPG network segment neighbor using the IP address of the peer physical interface; Under the instance of the BPG network segment neighbor, create a peer group; Adding the configuration of the BPG network segment neighbor to the peer group; Through the peer group, a BGP neighbor is created for the IP address of the neighbor in the BPG network segment, and the newly created BGP neighbor is added to the peer list of the peer group.

Citation Information

Patent Citations

  • Establishment method and device of BGP (Border Gateway Protocol) neighbor

    CN109525512A

  • Routing information updating method and equipment between BGP peers, and medium

    CN113852560A

  • BGP neighbor establishing method and device

    CN116436843A

  • Method and apparatus for dynamic exchange of capabilities between adjacent / neighboring network nodes

    US6553423B1