Path switching method, device, equipment, storage medium and computer program product

By monitoring the data forwarding path of BGP peer sets in the data center network, and using pre-configured backup paths to quickly locate and repair faults, the problem of excessively long fault diagnosis time caused by unclear BGP peer routing path planning is solved, and fault recovery efficiency is improved.

CN119629112BActive Publication Date: 2025-10-28NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411749637.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-10-28
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

In data center networking, due to unclear routing path planning between BGP peers, network fault diagnosis requires a lot of time and cannot meet the requirements for rapid fault recovery.

Method used

By monitoring the data forwarding paths of BGP peer sets, the fault location can be quickly located when a fault occurs using pre-configured backup paths, and the fault can be switched to the backup path for repair.

Benefits of technology

It enables rapid location of faults in the event of network failure, shortens fault repair time, and improves network fault recovery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629112B_ABST
    Figure CN119629112B_ABST
Patent Text Reader

Abstract

This application proposes a path switching method, apparatus, device, storage medium, and computer program product. The method includes: determining a set of Border Gateway Protocol (BGP) peers for a target task and multiple data forwarding paths corresponding to the set; controlling each BGP peer in the set to execute the target task according to a first data forwarding path; and controlling each BGP peer in the set to execute the target task according to a second data forwarding path when the number of unavailable data forwarding subpaths in the first data forwarding path reaches a preset threshold. This application's embodiments, by utilizing other pre-configured data forwarding paths to execute the target task when the number of unavailable data forwarding subpaths in the first data forwarding path is large, enable rapid location of the fault and completion of fault repair in the event of a network failure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and more specifically, to a path switching method, apparatus, device, storage medium, and computer program product. Background Technology

[0002] Currently, internet tasks can be undertaken through data center interconnect (DCI).

[0003] During the operation of a data center network, changes to the network and tasks are almost always involved, which in turn lead to changes in the configuration of network devices and table entries, and further cause network failures.

[0004] Since Internet tasks are performed by multiple Border Gateway Protocol (BGP) peers, faults can be troubleshooted by inspecting the routing paths between multiple BGP peers.

[0005] In general, the routing paths between multiple BGP peers are planned in advance. However, there are multiple backup routes between every two BGP peers. If the path between two peers becomes unavailable, the task will randomly switch to other backup routes. As data center networks are becoming increasingly large, hundreds or thousands of BGP peers are typically needed to complete Internet tasks. Therefore, troubleshooting currently requires a lot of time and cannot meet the current network fault recovery time requirements. Summary of the Invention

[0006] Based on the aforementioned technical deficiencies, this application proposes a path switching method, apparatus, device, storage medium, and computer program product. By utilizing other pre-configured data forwarding paths to execute target tasks when a large number of targets are unavailable in the first data forwarding path, the fault location can be quickly located and repaired through the data forwarding path in the event of a network failure.

[0007] The first aspect of this application provides a path switching method, including:

[0008] A set of Border Gateway Protocol (BGP) peers for the target task and multiple data forwarding paths corresponding to the set are determined; the multiple BGP peers included in the set are all used to execute the target task, and the data forwarding paths are optional paths for the BGP peers to execute the target task.

[0009] The system controls each BGP peer in the set to execute the target task according to a first data forwarding path; the first data forwarding path is any one of the plurality of data forwarding paths.

[0010] If the number of unavailable data forwarding sub-paths in the first data forwarding path reaches a preset threshold, control each BGP peer in the set to execute the target task according to the second data forwarding path. The data forwarding sub-path is the data forwarding path between two adjacent BGP peers among the plurality of BGP peers, and the second data forwarding path is any path among the plurality of data forwarding paths other than the first data forwarding path.

[0011] A second aspect of this application provides a path switching device, comprising:

[0012] The determination module is used to determine the set of Border Gateway Protocol (BGP) peers for the target task and the multiple data forwarding paths corresponding to the set; the multiple BGP peers included in the set are all used to execute the target task, and the data forwarding paths are optional paths for the BGP peers to execute the target task;

[0013] The control module is used to control each BGP peer in the set to execute the target task according to the first data forwarding path; the first data forwarding path is any one of the plurality of data forwarding paths;

[0014] The control module is used to control each BGP peer in the set to execute the target task according to the second data forwarding path when the number of unavailable data forwarding sub-paths in the first data forwarding path reaches a preset threshold. The data forwarding sub-path is the data forwarding path of two adjacent BGP peers among the plurality of BGP peers, and the second data forwarding path is any path among the plurality of data forwarding paths other than the first data forwarding path.

[0015] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor running the computer program to implement the method described in the first aspect above.

[0016] The fourth aspect of this application provides an electronic device having a computer program stored thereon, the program being executed by a processor to implement the method described in the first aspect.

[0017] The fifth aspect of this application provides an electronic device including a computer program that, when executed by a processor, implements the method described in the first aspect.

[0018] The beneficial effects of this application include at least the following:

[0019] In this embodiment of the application, when there are a large number of targets in the unavailable data forwarding sub-paths of the first data forwarding path, the target task is executed by other pre-set data forwarding paths. This allows for rapid location of the fault in the event of a network failure through the data forwarding path, so that the fault can be repaired in a short time. Attached Figure Description

[0020] The accompanying drawings, which form part of this specification, illustrate embodiments of this application and, together with the description, serve to explain the principles of this application.

[0021] This application can be more clearly understood with reference to the accompanying drawings and the following detailed description, wherein:

[0022] Figure 1 This application illustrates a mainstream network architecture diagram of an intelligent computing center provided by an exemplary embodiment.

[0023] Figure 2 This illustration shows a schematic diagram of an EVPN hybrid overlay scenario provided by an exemplary embodiment of this application;

[0024] Figure 3 This invention provides a schematic flowchart of a path switching method according to an exemplary embodiment of the present application.

[0025] Figure 4 This illustration shows an interaction diagram between an intelligent configuration analysis module and an intelligent computing center, provided by an exemplary embodiment of this application.

[0026] Figure 5 The illustration shows a scenario diagram of a path switching method provided by an exemplary embodiment of this application;

[0027] Figure 6 This invention provides a schematic diagram of the structure of a path switching device according to an exemplary embodiment of the present application.

[0028] Figure 7 This invention provides a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present application.

[0029] Figure 8 A schematic diagram of a storage medium provided in an exemplary embodiment of this application is shown. Detailed Implementation

[0030] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application. It will be apparent to those skilled in the art that this application can be implemented without one or more of these details. In other instances, some technical features well-known in the art have not been described to avoid confusion with this application.

[0031] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of the stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or combinations thereof.

[0032] Exemplary embodiments according to this application will now be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments may be implemented in many different forms and should not be construed as being limited to the embodiments set forth herein. The drawings are not drawn to scale, and some details may be enlarged and omitted for clarity. The shapes of the various regions and layers shown in the figures, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.

[0033] Exemplary embodiments according to this application are described below. It should be noted that the following embodiments are shown only to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way. Rather, the embodiments of this application can be applied to any applicable scenario.

[0034] Building upon the aforementioned background technologies, with the development of the Internet, cloud computing, big data, and artificial intelligence technologies, and the evolution of data centers (DCs) from the Internet era to the cloud era and now to AI computing centers, the traffic of DC networks has grown rapidly, increasing at a rate of 50% to 100% in recent years. This has placed enormous pressure on DC network equipment. The field of artificial intelligence has recently witnessed an explosive development led by generative AI large-scale models. On November 30, 2022, OpenAI launched ChatGPT, an AI chatbot whose outstanding natural language generation capabilities attracted widespread attention worldwide, surpassing 100 million users within two months. This sparked a wave of large-scale models both domestically and internationally, with various models such as Gemini, Wenxin Yiyan, Copilot, LLaMA, SAM, and SORA emerging rapidly. The current information age is accelerating into the development stage of intelligent computing, with breakthroughs in AI technology emerging one after another, gradually empowering various industries and driving AI and data elements to become typical representatives. In particular, the development and application of Artificial Intelligence and Big Data, Integrated and Collaborative Computing (AIGC) technology has led to a surge in computational demands. From the generation of text and images to the production of audio and video, the amount of computation and traffic has grown exponentially.

[0035] To address the exponential growth in computational load and network traffic, the current mainstream network architecture for intelligent computing centers is as follows:

[0036] This architecture comprises spine switches, leaf switches, and compute servers. Multiple leaf switches form a switch group, and each switch group includes multiple compute servers. Each compute server includes multiple processing nodes, and each processing node is connected to an NVIDIA NVLink switch. Processing nodes can be Graphics Processing Units (GPUs). They access the compute servers through leaf switches and then connect to the individual leaf switches via the aggregated spine switches for data exchange between groups. These leaves and spines achieve network overlay through an Ethernet Virtual Private Network (EVPN)-based scheme, enabling interconnection between servers and GPUs. The EVPN network overlay scheme uses the standard Request for Comments (RFC) protocol to implement the EVPN network protocol control plane. It employs all-hardware switches for spine-leaf networking, with leaf and border switches acting as VXLAN Tunnel Endpoints (VTEPs) to forward and process overlay traffic. In large-scale public cloud and intelligent computing center scenarios, there is a need to support massive tenant access to the SDN network. In such cases, using a full hardware network overlay is limited by the hardware chip limitations of the switch devices, and the forwarding capacity of the hardware leaf devices cannot be fully utilized during large-scale horizontal scaling. In this scenario, virtual machines are connected to the SDN network via host overlay. The S1020V virtual switch installed in the virtualization software directly acts as a VTEP, forwarding and processing overlay traffic, thereby enabling the intelligent computing center to provide services to a larger number of tenants.

[0037] EVPN hybrid overlay scenarios, such as Figure 2 As shown,

[0038] In an EVPN hybrid overlay scenario, virtual machines can be deployed simultaneously on both the network overlay and the host overlay, enabling traffic communication between the network overlay and the host overlay. Both sides can share border devices to complete the north-south outbound network traffic of the software-defined networking (SDN) data center.

[0039] The SDN SeerEngine and Virtual Border Gateway Protocol (vBGP) are containerized and deployed in an Application-Driven Network (AD-NET) architecture. They communicate via Google Remote Procedure Call (gRPC) and Network Configuration Protocol (NETCONF). vBGP establishes EVPN neighbors with the Fabric Route Reflector (Fabric RR), collects EVPN routing information from the entire network, and reports it to the SeerEngine. The SeerEngine then performs mutual conversion between the network flow table and EVPN routes on the control side. Using OpenFlow, it distributes the EVPN information to the S1020V virtual switches on the host overlay side, guiding traffic forwarding from the host overlay side to the network overlay side. Similarly, the SeerEngine converts the flow table information into EVPN routes and advertises them to the RR, completing traffic forwarding from the network overlay side to the host overlay side.

[0040] In summary, completing a computing task requires the cooperation of multiple switches. Any two switches running Border Gateway Protocol (BGP) and connected to each other can be called BGP peers. Since each BGP peer pair has multiple interfaces, there may be multiple routing paths. If the link between BGP peers is lost, a new routing path will be randomly selected between the two peers. As computing tasks become increasingly complex, the number of BGP peers required to complete a single task is now quite large. Before executing a computing task, a routing path between each BGP peer is planned, thus creating a planned path that includes ports of multiple BGP peers. This allows for rapid location of the fault in the event of a network failure, enabling targeted repairs.

[0041] If there are frequent link drops between BGP peers, multiple peers will switch to a new routing path. This makes the previously planned paths unclear, causing trouble for operations and maintenance, requiring a lot of time for troubleshooting, and preventing timely repair of network faults.

[0042] To address the aforementioned technical problems, this application proposes a path switching method, apparatus, device, storage medium, and computer program product. The method includes: determining a set of Border Gateway Protocol (BGP) peers for a target task and multiple data forwarding paths corresponding to the set; controlling each BGP peer in the set to execute the target task according to a first data forwarding path; and, when the number of unavailable data forwarding sub-paths in the first data forwarding path reaches a preset threshold, controlling each BGP peer in the set to execute the target task according to a second data forwarding path. This application's embodiment, by utilizing other pre-set data forwarding paths to execute the target task when the number of unavailable data forwarding sub-paths in the first data forwarding path is large, can quickly locate the fault location and complete fault repair in the event of a network failure through data forwarding paths.

[0043] This application first describes the path switching method using any switch in the intelligent computing center as the execution subject. The switch can be an NVLink switch, a Leaf switch, or a Spine switch, etc.

[0044] See Figure 3 The method includes the following steps.

[0045] S301. Determine the set of Border Gateway Protocol (BGP) peers for the target task and the multiple data forwarding paths corresponding to the set.

[0046] The set includes multiple BGP peers that are used to execute the target task, and the data forwarding path is an optional path for the BGP peers to execute the target task.

[0047] Among them, BGP peers can be BGP peers formed between Spine switches, BGP peers formed between Leaf switches, or BGP peers formed between other switches in the intelligent computing center.

[0048] Before executing the target task, multiple BGP peers can be pre-configured to execute the target task. In general, multiple GPUs will be used to execute the target task, and multiple GPUs will correspond to multiple switches connected to the GPUs, multiple Leaf switches, and multiple Spine switches. Therefore, executing the target task will involve multiple BGP peers.

[0049] Similarly, before executing the target task, multiple optional paths between BGP peer interfaces will be planned.

[0050] For example, suppose that executing the target task requires 8 BGP peers, and each BGP peer has 8 ports, then the planned optional paths can be the first port of the 8 BGP peers, the second port of the 8 BGP peers, the third port of the 8 BGP peers, and so on.

[0051] S302. Each BGP peer in the control set executes the target task according to the first data forwarding path.

[0052] The first data forwarding path is any one of multiple data forwarding paths.

[0053] During the execution of the target task, data can be forwarded according to any of the multiple data forwarding paths.

[0054] In some embodiments, in order to improve the efficiency of executing the target task, the priority of multiple data forwarding paths can be determined, and when the target task is started, the target task is executed according to the data forwarding path with the highest priority.

[0055] S303. When the number of unavailable data forwarding sub-paths in the first data forwarding path reaches a preset threshold, each BGP peer in the control set executes the target task according to the second data forwarding path.

[0056] The data forwarding sub-path is the data forwarding path between two adjacent BGP peers in multiple BGP peers.

[0057] The second data forwarding path is any path other than the first data forwarding path among multiple data forwarding paths.

[0058] It is understandable that there are multiple data forwarding sub-paths in the first data forwarding path. During the execution of the target task, some data forwarding sub-paths may become unavailable. The unavailability of a data forwarding sub-path indicates that there is a problem with the link between the two BGP peers corresponding to that data forwarding sub-path. It may be that a port of a certain BGP peer is unavailable. At this time, a new path will be randomly switched. For example, if the previous data forwarding sub-path was port 1 of two BGP peers, then the data forwarding sub-path after the switch may be port 2 of two BGP peers.

[0059] The following methods can be used to determine whether a BGP peer connection has been lost:

[0060] Check BGP neighbor status:

[0061] Use the `display bgp peer` command to check the status of BGP neighbors, paying particular attention to the `State` field. If the status is not `Established`, it indicates a problem with the BGP neighbor relationships.

[0062] Check TCP connections:

[0063] Since BGP is based on TCP session connections, first confirm whether the TCP connection is normal. Use the `display tcpstate` command to check the TCP connection status. If the TCP connection is not established or is inactive, this may be the cause of the BGP peer disconnection.

[0064] Check network connectivity:

[0065] Use the ping command to test network connectivity between two BGP peers. If the ping fails, it may be due to a network-level issue preventing the BGP peers from establishing a connection.

[0066] Check BGP configuration:

[0067] Check the BGP peer configuration, including the AS number, peer IP address, and authentication information, to ensure they are correct. Incorrect configuration may prevent the BGP peer from establishing a connection.

[0068] View the BGP state machine:

[0069] Enable debugging using the `debugging bgp all` command and view the BGP state machine logs. If the state machine is looping through the CONNECT state, it may indicate that the TCP connection establishment has failed.

[0070] Check route reachability:

[0071] If the BGP peers are in an Idle state, it is necessary to check if there is a route to the peer. If there is no route, the BGP peers will be unable to establish a connection.

[0072] Check the error log:

[0073] Examine the BGP Notification messages to understand the specific reason for the BGP connection interruption. Notification messages are sent when BGP detects an error state, informing the peer of the error and terminating the BGP connection.

[0074] Check ACLs and firewall rules:

[0075] Check if any ACL (Access Control List) or firewall rules are blocking BGP traffic, which could cause connection interruptions between BGP peers.

[0076] If a network failure occurs when a small number of data forwarding subpaths are unavailable, the problem can be troubleshooted by traversing multiple ports between peers that have switched routes. However, if a network failure occurs when a large number of data forwarding subpaths are unavailable, troubleshooting in this way will waste a lot of time and make it difficult to repair the network failure within the required recovery time.

[0077] The preset threshold can be flexibly set based on the actual situation. It can be assumed that if the number of unavailable data forwarding sub-paths exceeds the preset threshold, it will be difficult to locate the fault location within the required time in the event of a network failure.

[0078] At this point, each BGP peer in the control set can execute the target task according to the second data forwarding path.

[0079] Of course, the second data forwarding path can also be a data forwarding path with a priority lower than the first data forwarding path among multiple data forwarding paths.

[0080] If the number of unavailable data forwarding subpaths in the second data forwarding path reaches a preset threshold, each BGP peer in the set can be controlled to execute the target task according to the third data forwarding path until a regular data forwarding path is selected and the number of unavailable data forwarding subpaths is less than the preset threshold.

[0081] The third data forwarding path can be any path other than the first and second data forwarding paths among multiple data forwarding paths, or a data forwarding path whose priority is only lower than the first and second data forwarding paths among multiple data forwarding paths.

[0082] In this way, each BGP peer in the set can be controlled to execute the target task according to one of the planned multiple data forwarding paths. Thus, in the event of a network failure, troubleshooting can be carried out according to the planned data forwarding path, thereby improving the efficiency of troubleshooting.

[0083] This application proposes a path switching method, which includes: determining a set of Border Gateway Protocol (BGP) peers for a target task and multiple data forwarding paths corresponding to the set; controlling each BGP peer in the set to execute the target task according to a first data forwarding path; and controlling each BGP peer in the set to execute the target task according to a second data forwarding path when the number of unavailable data forwarding subpaths in the first data forwarding path reaches a preset threshold. This embodiment of the application, by utilizing other pre-configured data forwarding paths to execute the target task when the number of unavailable data forwarding subpaths in the first data forwarding path is large, can quickly locate the fault location and complete fault repair in the event of a network failure by using data forwarding paths.

[0084] In some embodiments, the method further includes: in response to a session interruption event, determining the session path corresponding to the session interruption event, wherein the session path is a data forwarding path of two BGP peers; if the session path belongs to a first data forwarding path, determining that the data forwarding sub-path corresponding to the session path is unavailable; and determining the number of unavailable data forwarding sub-paths in the current first data forwarding path based on the number of session interruption events received for the first data forwarding path.

[0085] In order to ensure that multiple BGP peers performing the target task follow a pre-planned unified path, corresponding interfaces need to be developed for the intelligent configuration analysis module cluster to call by monitoring the link status between each BGP peer in the BGP peer set, thereby achieving the purpose of managing network devices.

[0086] In some embodiments, the interaction diagram between the intelligent configuration analysis module and the intelligent computing center is as follows: Figure 4 As shown, in the intelligent computing center, Leaf switches, Spine switches, NVLink switches, Leaf switches and Spine switches, and Leaf switches and NVLink switches are connected via TCP and are called BGP peers. The intelligent configuration analysis module configures and monitors multiple BGP peers that execute target tasks by configuring the Pine and Leaf switches.

[0087] The configuration interfaces include: command-line interface and Netconf interface.

[0088] The command line entry is as follows:

[0089] 1) monitor-group: Create monitoring groups. Different monitoring groups can be created according to business needs.

[0090] 2) Peer monitor-group: In the monitoring group, add neighbor peers that have the same service. These peers have the same planned forwarding path. Their optimal operation mode is to forward according to the planned path. If a BGP neighbor goes down in the middle, after reaching a certain threshold, the backup path will be switched over in a unified manner.

[0091] 3) reset monitor-group: Initializes the monitoring group and completes the switchback function of the monitoring group. After the fault is recovered, it is completed by the administrator or the intelligent configuration analysis module cluster.

[0092] 4) Display BGP Monitor-Group: Statistics and viewing of the status of the monitoring group.

[0093] Netconf interface: The netconf interface mainly provides an interface for the intelligent configuration analysis module cluster to control devices.

[0094] Add to BGP / Instances table <monitorgroup>The attributes are shown in Table 1.

[0095]

[0096] Table 1

[0097] The commands in Table 1 are primarily used to add new BGP peer sets corresponding to different monitoring target tasks. Netconf supports the following operations: GET, POST, PUT, and DELETE.

[0098] Added BGP / CfgSessions table <monitorgroup>The attributes are shown in Table 2.

[0099]

[0100] Table 2

[0101] The commands in Table 2 are mainly used to configure the BGP peers in the BGP peer set and the session paths between BGP peers, that is, the data forwarding sub-paths in the data forwarding path.

[0102] Add to BGP / Resets table <monitorgroup>Each attribute such as Figure 3 As shown,

[0103]

[0104] Table 3

[0105] Table 3 is mainly used for the initialization of the monitoring group and to complete the switchback function of the monitoring group. After the fault is recovered, it is completed by the administrator or the intelligent configuration analysis module cluster.

[0106] After configuring the command-line interface and Netconf interface, the set of BGP peers for the target task and the corresponding multiple data forwarding paths will be determined. At this point, each BGP peer in the set will execute the target task according to the first data forwarding path, and the intelligent configuration analysis module cluster will monitor the link status between each BGP peer in real time.

[0107] At this point, a first data forwarding path will be added to the routing table so that network faults can be located by querying the routing information table in case of network failure.

[0108] When a session down event is received, the session path corresponding to the session down event is determined. The session path is the data forwarding path of two BGP peers. If the session path belongs to the first data forwarding path, it is determined that the data forwarding sub-path corresponding to the session path is unavailable. The number of session down events corresponding to the current first data forwarding path is determined, that is, the cumulative number of unavailable data forwarding sub-paths in the current first data forwarding path.

[0109] In some embodiments, each BGP peer in the control set performs a target task according to the second data forwarding path, including: setting a session closure flag for the first data forwarding path, the session closure flag being used to indicate that the session connection of the first data forwarding path between each BGP peer is disconnected; deleting the first data forwarding path in the routing table; and setting a session connection flag for the second data forwarding path, the session connection flag being used to indicate that each BGP peer establishes a session connection according to the second data forwarding path.

[0110] When the number of session downs corresponding to the current first data forwarding path reaches a threshold, the session connections between all BGP peers in the BGP peer set will be actively disconnected. This is equivalent to setting a session shutdown flag for the first data forwarding path. This flag can be a monitor shutdown flag. Sessions marked with monitor shutdown cannot be recovered via the Connection Retry (CR) mechanism, which refers to the connection recovery mechanism in BGP. When a connection between BGP peers is broken for some reason, BGP will attempt to re-establish the connection; this process is the CR retry mechanism. Recovery is only allowed via command. Sessions that are actively disconnected will have a new monitor-shutdown disconnection reason description added, and the first data forwarding path will be removed from the BGP peer set.

[0111] Furthermore, when there are multiple equivalent BGP peer sets, if the number of session downs corresponding to the current first data forwarding path reaches a threshold, fast switching is achieved by setting a backup flag, that is, setting a session connection identifier for the second data forwarding path.

[0112] The session connection identifier can be set for any one of the multiple data forwarding paths, or it can be set for the highest priority path of any path other than the first data forwarding path.

[0113] Furthermore, the first data forwarding path in the routing table will be deleted.

[0114] In some embodiments, the method further includes:

[0115] Add a second data forwarding path to the routing table.

[0116] Since there are multiple paths in the BGP peer set, and the first data forwarding path has been deleted from the BGP peer set, each BGP peer will execute the target task according to the second data forwarding path. Therefore, the second data forwarding path can be added to the routing table.

[0117] In some embodiments, determining the BGP peer set for the target task includes: in response to a set creation event for the target task, establishing an initial set for the target task; obtaining the set capacity corresponding to the set creation event; and in response to a BGP peer addition event, adding BGP peers for executing the target task to the initial set until the number of BGP peers in the initial set reaches the set capacity, thereby obtaining the BGP peer set for the target task.

[0118] In some embodiments, during the configuration of the command-line interface and the Netconf interface, a collection creation event for the target task can be triggered through monitor-group configuration. The number of BGP peers required in the collection is specified in the configuration. In response to the collection creation event, a global linked list of monitor-group nodes is created to attach / detach the monitor-group node, that is, a collection of BGP peers for the target task is created. At this time, the newly created collection of BGP peers is an empty collection, and there are no BGP peers in the empty collection.

[0119] In response to the session up event and to configure the peer monitor-group, the session structure corresponding to the session up event is added as a node to the linked list of the corresponding monitor-group node. That is, the corresponding BGP peer is added to the BGP peer used to execute the target task. When the number of added peers meets the number of BGP peers required in the set, the BGP peer set for the target task is obtained.

[0120] Before executing a target task using multiple BGP peers in a BGP peer set, multiple optional paths for executing the target task are planned.

[0121] In addition, a BGP peer set can also receive the following commands:

[0122] Neighbor leaves monitoring group:

[0123] Respond to the session destroy event, or configure the undo peer monitor-group to remove the session from the linked list of the corresponding monitor-group node.

[0124] Response switching:

[0125] The linked list information needs to be backed up. If the neighbor is in a down state before the swap, the linked list information cannot be smoothly recovered after the swap, so a backup is necessary.

[0126] Connection restored:

[0127] The response configuration reset monitor-group clears the monitor shutdown flag and re-establishes the session connection.

[0128] Maintenance Display:

[0129] Add the command `display bgp monitor-group` to display the sessions within the monitoring group, as well as the status of each session.

[0130] In some embodiments, the method further includes:

[0131] If the number of unavailable data forwarding sub-paths in the first data forwarding path does not reach a preset threshold, the unavailable data forwarding sub-paths are switched to the first target data forwarding sub-path; each BGP peer is controlled to execute the target task according to the first target data forwarding sub-path and the second target data forwarding sub-path in the first target data forwarding path, where the second target data forwarding sub-path is the data forwarding sub-path in the first data forwarding path excluding the unavailable data forwarding sub-paths.

[0132] If the number of unavailable data forwarding sub-paths in the first data forwarding path does not reach a preset threshold, the BGP peer corresponding to the unavailable data forwarding sub-path will randomly switch from the unavailable data forwarding sub-path to the first target data forwarding path and use the first target data forwarding path to forward data. During this process, the BGP peer uses a series of steps to select the optimal path, including comparing weights, local preferences, whether the path originates locally, AS path length, origin source, multiple exit discriminator (MED), and neighbor type. When a BGP peer disconnects, BGP will re-evaluate the available paths based on these criteria and select a new optimal path. The first target data forwarding path can be determined based on the attributes in the above steps, or routing monitoring tools can be used to monitor the announcement and withdrawal of BGP routes in real time, thereby promptly detecting route changes and understanding the routing situation after the switch.

[0133] In summary, if the number of unavailable data forwarding sub-paths in the first data forwarding path does not reach the preset threshold, it is assumed that if a network failure occurs at this time, the fault location can be located within the required time. Therefore, it is not necessary to disconnect the first data forwarding path, and data can be forwarded according to the switched first target data forwarding path.

[0134] In some embodiments, determining multiple data forwarding paths corresponding to a set includes: obtaining the planned number of data forwarding paths corresponding to the set; determining the optimal port of each BGP peer based on the routing attribute parameters of the remaining ports of each BGP peer in the set, wherein the available port is the port marked as available among all ports of the BGP peer; connecting each optimal port to obtain a data forwarding path until the number of data forwarding paths reaches the planned number, and the optimal port is marked as unavailable after being planned to a data forwarding path.

[0135] Before planning data forwarding paths, the number of planned data forwarding paths is determined. Then, based on the routing attribute parameters of the remaining ports of each BGP peer in the set, the optimal port for each BGP peer is determined.

[0136] Routing attribute parameters include at least one of the following: preferred value, local priority, shortest autonomous system (AS) path, minimum multi-exit identifier, and router identifier.

[0137] The optimal port between two adjacent BGP peers can be determined in the following way:

[0138] Preferred Value:

[0139] The Preferred Value is the attribute that is compared first during the BGP path selection process. Its value ranges from 0 to 65535, with higher values ​​indicating higher priority. By default, the Preferred Value is 0, but this value can be modified through configuration to control path selection. This attribute is only used by the local router to select the best BGP path and is not sent to any BGP neighbors.

[0140] Local Preference:

[0141] Local priority is used to select the best route for traffic leaving the AS. It is only passed between IBGP peers, not to EBGP peers. The value ranges from 0 to 4294967295, with higher values ​​indicating higher priority. By default, local priority is 100.

[0142] Shortest Autonomous System (AS) Path (AS_Path):

[0143] When a BGP router advertises a route to its EBGP peer, it appends the AS number of the local autonomous system to the leftmost end of the AS_Path attribute of that route. After comparing the AS_Path attributes, BGP prioritizes the route with the shortest AS_Path length. If the AS_Path lengths are equal, BGP then compares the next attribute, Origin.

[0144] Minimum Multiple Exit Identifier (MED):

[0145] MED (Mean Adjustment Decision) helps external ASs choose a better entry path; the smaller the MED value, the higher its priority. MED comparison is only performed if the first (adjacent) AS is identical in both paths. If bgp always-compare-med is enabled, MED is compared for all paths.

[0146] Router ID:

[0147] In BGP path selection, if all other attributes are equal, the router uses the Router ID to determine the best path. The Router ID is the IP address with the largest value among all available interface IP addresses on the router.

[0148] Following the above method, the optimal ports of all adjacent BGP peers in the set are obtained, and the optimal data forwarding paths are obtained by connecting each optimal port. After the optimal port is planned to the data forwarding path, it is marked as unavailable.

[0149] Next, following the process of determining the optimal data forwarding path described above, the optimal port is determined from the available ports of all adjacent BGP peers in the set, and the optimal port is connected to obtain the data forwarding path. This process continues until the number of data forwarding paths reaches the planned number, so as to obtain multiple data forwarding paths with different priorities.

[0150] In some embodiments, the routing attribute parameters of each interface of each BGP peer can be obtained by configuring, collecting, analyzing, optimizing, and adjusting various data stored in the entire network.

[0151] The data can exist at three levels: network element level, network level, and application service level.

[0152] Network element level: Diagnose the physical resource utilization, logical resource utilization, and health status of individual network element devices.

[0153] Network level: Diagnose overall network utilization, network capacity, and network health.

[0154] Application-level business: Business quality diagnosis, business metrics: latency, jitter, packet loss trends and anomalies.

[0155] The above steps can be used to plan multiple data forwarding paths between peers, and each data forwarding path has a corresponding priority.

[0156] like Figure 5 As shown, there are 8 BGP peers in the BGP peer set, and each BGP peer includes N ports. Based on the attributes of each port, N data forwarding paths are determined: the first data forwarding path, the second data forwarding path, the third data forwarding path, ... the Nth data forwarding path.

[0157] First, each BGP peer in the control set executes the target task according to the first data forwarding path. If the number of unavailable data forwarding subpaths in the first data forwarding path reaches a preset threshold, then each BGP peer in the control set executes the target task according to the second data forwarding path. The data forwarding subpath is the data forwarding path between two adjacent BGP peers. If the number of unavailable data forwarding subpaths in the second data forwarding path reaches a preset threshold, then each BGP peer in the control set executes the target task according to the third data forwarding path…

[0158] This application also provides a path switching device for performing the above-described actions. Figure 3 The path switching method in the embodiment, such as Figure 6 As shown, the device includes:

[0159] The determining unit 601 is used to determine a set of Border Gateway Protocol (BGP) peers for a target task and multiple data forwarding paths corresponding to the set; the multiple BGP peers included in the set are all used to execute the target task, and the data forwarding paths are optional paths for the BGP peers to execute the target task.

[0160] The control unit 602 is used to control each BGP peer in the set to execute the target task according to the first data forwarding path; the first data forwarding path is any one of the plurality of data forwarding paths.

[0161] The control unit 602 is configured to control each BGP peer in the set to execute the target task according to the second data forwarding path when the number of unavailable data forwarding sub-paths in the first data forwarding path reaches a preset threshold. The data forwarding sub-path is the data forwarding path of two adjacent BGP peers among the plurality of BGP peers, and the second data forwarding path is any path among the plurality of data forwarding paths other than the first data forwarding path.

[0162] This application proposes a path switching method, apparatus, device, storage medium, and computer program product. The method includes: determining a set of Border Gateway Protocol (BGP) peers for a target task and multiple data forwarding paths corresponding to the set; controlling each BGP peer in the set to execute the target task according to a first data forwarding path; and controlling each BGP peer in the set to execute the target task according to a second data forwarding path when the number of unavailable data forwarding subpaths in the first data forwarding path reaches a preset threshold. This application's embodiments, by utilizing other pre-configured data forwarding paths to execute the target task when the number of unavailable data forwarding subpaths in the first data forwarding path is large, enable rapid location of the fault and completion of fault repair in the event of a network failure.

[0163] In some embodiments, the determining unit 601 is further configured to:

[0164] In response to a session interruption event, determine the session path corresponding to the session interruption event;

[0165] If the session path belongs to the first data forwarding path, it is determined that the data forwarding sub-path corresponding to the session path is unavailable;

[0166] The total number of unavailable data forwarding sub-paths in the current first data forwarding path.

[0167] In some embodiments, the control unit 602 is specifically used for:

[0168] Set a session close flag for the first data forwarding path. The session close flag is used to indicate that the session connection of the first data forwarding path between each BGP peer is disconnected.

[0169] Delete the first data forwarding path from the routing table;

[0170] A session connection identifier is set for the second data forwarding path. The session connection identifier is used to indicate that each BGP peer establishes a session connection according to the second data forwarding path.

[0171] In some embodiments, the above-described apparatus further includes: an adding unit, used for...

[0172] Add the second data forwarding path to the routing table.

[0173] In some embodiments, the determining unit 601 is specifically used for:

[0174] In response to a set creation event for a target task, a set of BGP peers for the target task is created;

[0175] In response to the BGP peer add event, a BGP peer for performing the target task is added to the BGP peer set.

[0176] In some embodiments, the determining unit 601 is further configured to:

[0177] If the number of unavailable data forwarding sub-paths in the first data forwarding path does not reach the preset threshold, then the first target data forwarding sub-path to which the unavailable data forwarding sub-paths are switched is determined;

[0178] The system controls each BGP peer to execute the target task according to the first target data forwarding sub-path and the second target data forwarding word path in the first target data forwarding path, wherein the second target data forwarding word path is a data forwarding sub-path in the first target data forwarding path other than the unavailable data forwarding sub-path.

[0179] In some embodiments, the determining unit 601 is further configured to:

[0180] The multiple data forwarding paths are determined based on the routing attribute parameters of each interface of each BGP peer in the set. The routing attribute parameters include at least one of the following: preferred value, local priority, shortest autonomous system (AS) path, minimum multiple exit identifier, and router identifier.

[0181] Please refer to the following. Figure 7 This illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 7 As shown, the electronic device 7 includes: a processor 700, a memory 701, a bus 707, and a communication interface 703. The processor 700, the communication interface 703, and the memory 701 are connected via the bus 707. The memory 701 stores a computer program that can run on the processor 700. When the processor 700 runs the computer program, it executes the path switching method provided in any of the foregoing embodiments of this application.

[0182] The memory 701 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 703 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.

[0183] Bus 707 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory 701 is used to store programs. After receiving an execution instruction, the processor 700 executes the program. The path switching method disclosed in any of the foregoing embodiments of this application can be applied to the processor 700, or implemented by the processor 700.

[0184] The processor 700 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 700 or by instructions in software form. The processor 700 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 701. Processor 700 reads the information in memory 701 and, in conjunction with its hardware, completes the steps of the above method.

[0185] The electronic device provided in this application embodiment and the path switching method provided in this application embodiment are based on the same application concept and have the same beneficial effects as the methods they adopt, operate or implement.

[0186] This application also provides a computer-readable storage medium corresponding to the path switching method provided in the foregoing embodiments. Please refer to... Figure 8 , Figure 8 The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the path switching method provided in any of the foregoing embodiments.

[0187] In addition, examples of the computer-readable storage medium may 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 optical and magnetic storage media, which will not be described in detail here.

[0188] The computer-readable storage medium provided in the above embodiments of this application and the path switching method provided in the embodiments of this application are based on the same application concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0189] It should be noted that the algorithms and displays provided herein are not inherently related to any particular computer, virtual device, or other equipment. Various general-purpose devices can also be used in conjunction with the teachings herein. The required structure for constructing such devices is obvious from the above description. Furthermore, this application is not directed to any particular programming language. It should be understood that the content of this application described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of this application.

[0190] Similarly, it should be understood that, in order to simplify this application and aid in understanding one or more of the various aspects of the application, in the above description of exemplary embodiments of the application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof. However, this disclosure should not be construed as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, the application aspect lies in fewer than all features of the single embodiment disclosed above. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the application.

[0191] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the virtual machine creation apparatus according to embodiments of this application. This application can also be implemented as a device or apparatus program for performing part or all of the methods described herein. The program implementing this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0192] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.< / monitorgroup> < / monitorgroup> < / monitorgroup>

Claims

1. A path switching method, characterized in that, The method comprises: A set of Border Gateway Protocol (BGP) peers for the target task and multiple data forwarding paths corresponding to the set are determined; the multiple BGP peers included in the set are all used to execute the target task, and the data forwarding paths are optional paths for the BGP peers to execute the target task; The system controls each BGP peer in the set to execute the target task according to a first data forwarding path; the first data forwarding path is any one of the plurality of data forwarding paths. When the number of unavailable data forwarding sub-paths in the first data forwarding path reaches a preset threshold, each BGP peer in the set is controlled to execute the target task according to the second data forwarding path. The data forwarding sub-path is the data forwarding path of two adjacent BGP peers among the plurality of BGP peers, and the second data forwarding path is any path among the plurality of data forwarding paths other than the first data forwarding path. If a network failure occurs when the number of unavailable data forwarding subpaths is below a threshold, troubleshoot the problem by traversing multiple ports between peers that have switched routes.

2. The method according to claim 1, characterized in that, The method further includes: In response to a session interruption event, the session path corresponding to the session interruption event is determined, wherein the session path is the data forwarding path between two BGP peers; If the session path belongs to the first data forwarding path, it is determined that the data forwarding sub-path corresponding to the session path is unavailable; Based on the number of session interruption events received for the first data forwarding path, determine the number of unavailable data forwarding subpaths in the current first data forwarding path.

3. The method according to claim 1, characterized in that, The control of each BGP peer in the set to execute the target task according to the second data forwarding path includes: Set a session close flag for the first data forwarding path. The session close flag is used to indicate that the session connection of the first data forwarding path between each BGP peer is disconnected. Delete the first data forwarding path from the routing table; Set a session connection identifier for the second data forwarding path. The session connection identifier is used to indicate that each BGP peer establishes a session connection according to the second data forwarding path. Add the second data forwarding path to the routing table.

4. The method according to claim 1, characterized in that, The determination of the BGP peer set for the target task includes: In response to a set creation event for a target task, an initial set for the target task is created; Obtain the collection capacity corresponding to the collection creation event; In response to a BGP peer addition event, BGP peers for performing the target task are added to the initial set until the number of BGP peers in the initial set reaches the set capacity, thus obtaining a BGP peer set for the target task.

5. The method according to claim 1, characterized in that, The method further includes: If the number of unavailable data forwarding sub-paths in the first data forwarding path does not reach the preset threshold, then the first target data forwarding sub-path to which the unavailable data forwarding sub-paths are switched is determined; The system controls each BGP peer to execute the target task according to the first target data forwarding sub-path and the second target data forwarding sub-path in the first data forwarding path, wherein the second target data forwarding sub-path is a data forwarding sub-path in the first data forwarding path other than the unavailable data forwarding sub-path.

6. The method according to claim 1, characterized in that, Determining the multiple data forwarding paths corresponding to the set includes: Obtain the planned number of data forwarding paths corresponding to the set; Based on the routing attribute parameters of the remaining ports of each BGP peer in the set, the optimal port of each BGP peer is determined, and the available port is the port marked as available among all ports of the BGP peer; Data forwarding paths are obtained by connecting each of the optimal ports until the number of data forwarding paths reaches the planned number. After being planned to the data forwarding path, the optimal port is marked as unavailable.

7. A path switching device, characterized in that, The device comprises: The determining unit is used to determine a set of Border Gateway Protocol (BGP) peers for a target task and multiple data forwarding paths corresponding to the set; the multiple BGP peers included in the set are all used to execute the target task, and the data forwarding paths are optional paths for the BGP peers to execute the target task; A control unit is configured to control each BGP peer in the set to execute the target task according to a first data forwarding path; the first data forwarding path is any one of the plurality of data forwarding paths. The control unit is configured to control each BGP peer in the set to execute the target task according to the second data forwarding path when the number of unavailable data forwarding sub-paths in the first data forwarding path reaches a preset threshold. The data forwarding sub-path is the data forwarding path of two adjacent BGP peers among the plurality of BGP peers, and the second data forwarding path is any path among the plurality of data forwarding paths other than the first data forwarding path. If a network failure occurs when the number of unavailable data forwarding subpaths is below a threshold, troubleshoot the problem by traversing multiple ports between peers that have switched routes.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by a processor to implement the method as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Method and device for realizing virtual private network fast reroute by network processor

    CN101697527A

  • Backup BGP paths for non-multipath BGP fast convergence

    US20070214280A1