Path switching method and device, equipment, storage medium and computer program product
By monitoring the number of unavailable data forwarding subpaths in the data center network, and using pre-set data forwarding paths to quickly locate and repair network failures, the problem of too long troubleshooting and repair in the existing technology has been solved, and faster fault repair is achieved.
Patent Information
- Application Number
- CN202411749637.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-29
AI Technical Summary
In data center networking, since Internet tasks are completed by multiple BGP peers, network troubleshooting and repairing requires a lot of time, which cannot meet the current network failure recovery time requirements.
By monitoring the target number of unavailable data forwarding subpaths in the first data forwarding path, the target task is performed using other preset data forwarding paths, thereby quickly locateing the fault location and completing fault repair.
In the event of a network failure, the fault location is quickly located through the data forwarding path, which significantly shortens the fault repair time and meets the stricter network fault recovery time requirements.
Smart Images

Figure CN119629112A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and more specifically, to a path switching method, device, equipment, storage medium and computer program product. Background Art
[0002] At present, Internet tasks can be undertaken through Data Center Interconnect (DCI).
[0003] In the process of data center networking operation, network changes and task changes are basically involved, which in turn cause configuration changes and table changes of network devices, further causing network failures.
[0004] Since Internet tasks are completed by multiple Border Gateway Protocol (BGP) peers, faults can be detected by detecting the routing paths between multiple BGP peers.
[0005] Generally, the routing paths between multiple BGP peers are planned in advance, but there are multiple backup routes between every two BGP peers. When the path between two peers is unavailable, the task is randomly switched to other backup routes. However, the current data center networking scale is getting larger and larger, and generally hundreds or thousands of BGP peers are required to complete Internet tasks. Therefore, it currently takes a lot of time to troubleshoot faults, which cannot meet the current network fault recovery time requirements. Summary of the invention
[0006] Based on the above-mentioned technical defects, the present application proposes a path switching method, apparatus, device, storage medium and computer program product. By monitoring a large number of targets of unavailable data forwarding sub-paths in a first data forwarding path, other pre-set data forwarding paths are used to perform target tasks. In this way, in the event of a network failure, the fault location can be quickly located through the data forwarding path to complete the fault repair.
[0007] The first aspect of the present application provides a path switching method, including:
[0008] Determine a Border Gateway Protocol (BGP) peer set for a target task and a plurality of data forwarding paths corresponding to the set; the plurality of BGP peers included in the set are all used to perform the target task, and the data forwarding paths are optional paths for the BGP peers to perform the target task
[0009] Controlling each BGP peer in the set to perform the target task according to a first data forwarding path; the first data forwarding path is any one of the multiple data forwarding paths;
[0010] 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 perform the target task according to a second data forwarding path, where the data forwarding sub-path is a data forwarding path of two adjacent BGP peers among the multiple BGP peers, and the second data forwarding path is any path among the multiple data forwarding paths except the first data forwarding path.
[0011] A second aspect of the present application provides a path switching device, including:
[0012] A determination module, used to determine a Border Gateway Protocol BGP peer set for a target task and a plurality of data forwarding paths corresponding to the set; the plurality of BGP peers included in the set are all used to perform the target task, and the data forwarding path is an optional path for the BGP peer to perform the target task;
[0013] A control module, used to control each BGP peer in the set to perform the target task according to a first data forwarding path; the first data forwarding path is any path among the multiple data forwarding paths;
[0014] A control module, used to control each BGP peer in the set to perform the target task according to a second data forwarding path when the number of unavailable data forwarding sub-paths in the first data forwarding path reaches a preset threshold, wherein the data forwarding sub-path is a data forwarding path of two adjacent BGP peers among the multiple BGP peers, and the second data forwarding path is any path among the multiple data forwarding paths except the first data forwarding path.
[0015] A third aspect of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.
[0016] A fourth aspect of the present application provides an electronic device having a computer program stored thereon, wherein the program is executed by a processor to implement the method described in the first aspect.
[0017] In a fifth aspect, the present application provides an electronic device, including a computer program, which implements the method described in the first aspect when executed by a processor.
[0018] The beneficial effects of this application include at least:
[0019] In an embodiment of the present application, when there is a large number of targets in the unavailable data forwarding sub-paths in the monitored first data forwarding path, the embodiment of the present application utilizes other pre-set data forwarding paths to perform target tasks, thereby being able to quickly locate the fault location through the data forwarding path in the event of a network failure, so as to complete the fault repair in a shorter time. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present application and, together with the description, serve to explain the principles of the present application.
[0021] The present application can be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0022] Figure 1 A network mainstream architecture diagram of an intelligent computing center provided by an exemplary embodiment of the present application is shown;
[0023] Figure 2 A schematic diagram of an EVPN hybrid overlay scenario provided by an exemplary embodiment of the present application is shown;
[0024] Figure 3 A schematic diagram of a process of a path switching method provided by an exemplary embodiment of the present application is shown;
[0025] Figure 4 A schematic diagram showing the interaction between an intelligent configuration analysis module and an intelligent computing center provided by an exemplary embodiment of the present application is shown;
[0026] Figure 5 A schematic diagram of a scenario of a path switching method provided by an exemplary embodiment of the present application is shown;
[0027] Figure 6 A schematic structural diagram of a path switching device provided by an exemplary embodiment of the present application is shown;
[0028] Figure 7 A schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application is shown;
[0029] Figure 8 A schematic diagram of a storage medium provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0030] Hereinafter, embodiments of the present application will 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 the present application. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present application. It is obvious to those skilled in the art that the present application can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present application, some technical features known in the art are not described.
[0031] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should also be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of the features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0032] Now, exemplary embodiments according to the present application will be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments may be implemented in a variety of different forms and should not be construed as being limited to the embodiments described herein. The accompanying drawings are not drawn to scale, and certain details may be magnified and certain details may be omitted for the purpose of clear expression. The shapes of the various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are merely exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0033] The following describes an exemplary embodiment according to the present application. It should be noted that the following embodiments are only shown to facilitate understanding of the spirit and principle of the present application, and the embodiments of the present application are not limited in this regard. On the contrary, the embodiments of the present application can be applied to any applicable scenario.
[0034] Following the above background technology, with the development of the Internet and cloud tasks, big data and artificial intelligence technology, data centers (DCs) have grown from the Internet era to the cloud era to the current artificial intelligence computing center, and the traffic of DC networks has grown rapidly. In recent years, it has been growing rapidly at a rate of 50% to 100%, which has put tremendous pressure on the equipment of DC networks. In recent years, the field of artificial intelligence has ushered in an explosive development led by generative artificial intelligence large models. On November 30, 2022, OpenAI launched an artificial intelligence dialogue chatbot ChatGPT. Its outstanding natural language generation ability has attracted widespread attention from all over the world. It has exceeded 100 million users in 2 months. A wave of large models has been set off at home and abroad. Gemini, Wenxin Yiyan, Copilot, LLaMA, SAM, SORA and other large models have sprung up like mushrooms after rain. The current information age is accelerating into the development stage of intelligent computing. Breakthroughs in artificial intelligence technology are emerging in an endless stream, gradually empowering thousands of industries and promoting artificial intelligence 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. The development of AIGC is characterized by high computing volume. From the generation of text and pictures to the production of audio and video, the computing volume and traffic are growing exponentially.
[0035] In order to meet the above-mentioned exponential growth in computing volume and traffic, the current mainstream network architecture of the Intelligent Computing Center is as follows:
[0036] The architecture includes spine switches, leaf switches and computing servers. Multiple leaf switches form a switch group. Each switch group includes multiple computing servers. Each computing server includes multiple processing nodes. Each processing node is connected to an NVIDIA NVLink switch. The processing node can be a graphics processing unit (GPU). The computing server is connected through the leaf switch, and then the converged spine switch is used to connect each leaf switch for data interaction between groups. The network overlay solution is implemented between these leaves and spines based on the Ethernet Virtual Private Network (EVPN), and the interconnection between servers and GPUs has been completed. The EVPN network overlay solution implements the EVPN network protocol control plane based on the standard request for comments (RFC) protocol, and uses a full hardware switch for spine-leaf networking. The leaf and border switches serve as VXLAN tunnel endpoints (VTEP) to forward and process overlay traffic. In large-scale public cloud and intelligent computing center scenarios, it is required to support massive tenants to access the SDN network. At this time, the use of full hardware network Overlay will be limited by the hardware chip appearance of the switch hardware device. The forwarding capacity of the hardware Leaf device cannot be fully utilized during large-scale horizontal expansion. In this scenario, the virtual machine is connected to the SDN network through the host Overlay method. The S1020V virtual switch installed in the virtualization software directly acts as a VTEP to forward and process Overlay traffic, so that the intelligent computing center can provide services to more tenants.
[0037] EVPN hybrid overlay scenario Figure 2 As shown,
[0038] In the EVPN hybrid overlay scenario, virtual machines can be deployed on both the network overlay and the host overlay, supporting traffic intercommunication between the network overlay and the host overlay. At the same time, 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 Seer Engine (SeerEngine) and Virtual Border Gateway Protocol (vBGP) are containerized and deployed in the Application-Driven Network (AD-NET) architecture. They communicate with each other through Google Remote Procedure Call (gRPC) and Network Configuration Protocol (NETCONF). vBGP and Fabric Route Reflector (Fabric RR) establish EVPN neighbors, collect EVPN routing information of the entire network, and report it to SeerEngine. SeerEngine then realizes the mutual conversion between the flow table of the entire network and EVPN routing on the strong control side, and sends the EVPN side information to the S1020V virtual switch on the host Overlay side through the OpenFlow protocol (OpenFlow), guiding the traffic forwarding from the host Overlay side to the network Overlay side. Similarly, SeerEngine converts the flow table information into EVPN routing and announces it to RR, completing the traffic forwarding from the network Overlay side to the host Overlay side.
[0040] In short, the realization of a computing task requires the cooperation of multiple switches. Any two switches that run the Border Gateway Protocol (BGP) and establish a connection with each other can be called BGP peers. Because there are multiple interfaces between each pair of BGP peers, there may be multiple routing paths. If the link between the BGP peers is broken, a new routing path will be randomly switched between the two peers. As computing tasks become more and more complex, the number of BGP peers required to complete a computing task is now relatively large. Before executing a computing task, a routing path between each BGP peer will be planned, thereby planning a planned path including multiple BGP peer ports. In the event of a network failure, the fault location can be quickly located through the planned path, so that the fault can be repaired in a targeted manner.
[0041] If the links between BGP peers are frequently disconnected, a new routing path will be switched between multiple peers, which will make the previously planned path unclear, causing trouble for operation and maintenance, resulting in a lot of time required for troubleshooting and the inability to repair network faults in a timely manner.
[0042] In view of the above technical problems, the present application proposes a path switching method, device, equipment, storage medium and computer program product, the method comprising: determining a Border Gateway Protocol BGP peer set for a target task and a plurality of data forwarding paths corresponding to the set; controlling each BGP peer in the set to perform the target task according to a first data forwarding path; when the number of unavailable data forwarding subpaths in the first data forwarding path reaches a preset threshold, controlling each BGP peer in the set to perform the target task according to a second data forwarding path. The embodiment of the present application uses other pre-set data forwarding paths to perform the target task when the target number of unavailable data forwarding subpaths in the first data forwarding path is large, so that the fault location can be quickly located through the data forwarding path in the event of a network failure, and the fault repair can be completed.
[0043] The embodiment of the present application first describes the path switching method by taking any switch of the intelligent computing center as the execution subject, wherein any switch can be an NVLink switch, a Leaf switch, or a Spine switch, etc.
[0044] See also Figure 3 , the method comprises the following steps.
[0045] S301: Determine a Border Gateway Protocol (BGP) peer set for a target task and multiple data forwarding paths corresponding to the set.
[0046] The multiple BGP peers included in the set are all used to execute the target task, and the data forwarding path is an optional path for the BGP peer to execute the target task.
[0047] Among them, the BGP peers can be the BGP peers formed between Spine switches, the BGP peers formed between Leaf switches, or the BGP peers formed between other switches in the intelligent computing center.
[0048] Before executing the target task, you can pre-configure multiple BGP peers for executing the target task. Generally, multiple GPUs are used to execute the target task, and multiple GPUs correspond to multiple switches connected to the GPUs, multiple Leaf switches, and multiple Spine switches. Therefore, executing the target task involves multiple BGP peers.
[0049] Similarly, before executing the target task, optional paths between multiple BGP peer interfaces will be planned.
[0050] For example, assuming that 8 BGP peers are required to execute the target task, and each BGP peer has 8 ports, the planned optional paths can be the first ports of the 8 BGP peers, the second ports of the 8 BGP peers, the third ports of the 8 BGP peers, and so on.
[0051] S302: Control each BGP peer in the set to execute a target task according to the first data forwarding path.
[0052] The first data forwarding path is any one of a plurality of data forwarding paths.
[0053] In the process of executing the target task, data can be forwarded along any one of multiple data forwarding paths.
[0054] In some embodiments, in order to improve the efficiency of executing the target task, the priorities of multiple data forwarding paths may also be determined. When the target task starts to be executed, 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 subpath is a data forwarding path between two adjacent BGP peers among the multiple BGP peers.
[0057] The second data forwarding path is any one of the multiple data forwarding paths except the first data forwarding path.
[0058] It is understandable that there are multiple data forwarding sub-paths in the first data forwarding path. In the process of executing the target task, some data forwarding sub-paths may be unavailable. The unavailability of the data forwarding sub-path indicates that there is a problem with the link between the two BGP peers corresponding to the data forwarding sub-path. It may be that the port of a certain BGP peer is unavailable. At this time, it will randomly switch to a new path. For example, the previous data forwarding sub-path is port 1 of the two BGP peers, then the data forwarding sub-path after switching at any time may be port 2 of the two BGP peers.
[0059] The following methods can be used to determine whether BGP peers are disconnected:
[0060] Check the BGP neighbor status:
[0061] Run the display bgp peer command to check the status of the BGP neighbor, and pay attention to the State field. If the state is not Established, it means that there is a problem with the BGP neighbor relationship.
[0062] Check TCP connection:
[0063] Since BGP is based on TCP session connection, first confirm whether the TCP connection is normal. Use the display tcpstate command to view the TCP connection status. If the TCP connection is not established or is inactive, it may be the cause of the BGP peer disconnection.
[0064] Check network connectivity:
[0065] Use the ping command to test the network connectivity between two BGP peers. If the ping fails, it may be due to a network-level problem that prevents the BGP peers from establishing a connection.
[0066] Check the BGP configuration:
[0067] Check whether the BGP peer configuration, including the AS number, peer IP address, authentication information, etc., is correct. Incorrect configuration may result in the inability to establish a connection between BGP peers.
[0068] View the BGP state machine:
[0069] Enable debugging by using the debugging bgp all command and check the BGP state machine log. If the state machine loops in the CONNECT state, it may indicate that the TCP connection establishment failed.
[0070] Check route reachability:
[0071] If the state between BGP peers is Idle, you need to check whether there is a route to the peer. If there is no route, the BGP peers will not be able to establish a connection.
[0072] Check the error log:
[0073] Check the BGP Notification message to understand the specific reason for the BGP connection interruption. The Notification message is sent when BGP detects an error state to inform the other end of the error and interrupt the BGP connection.
[0074] Check ACL and firewall rules:
[0075] Check if there are any ACLs (Access Control Lists) or firewall rules blocking BGP traffic, which may cause connectivity disruption between BGP peers.
[0076] If a network failure occurs when the number of data forwarding sub-paths that are unavailable is small, the fault can be troubleshooted by traversing multiple ports between the peers that switch routes. If a network failure occurs when the number of data forwarding sub-paths that are unavailable is large, troubleshooting the fault in the above manner will waste a lot of time, and it will be difficult to repair the network failure within the network failure recovery time requirement.
[0077] The preset threshold value may be flexibly set based on actual conditions. It may be considered that when the number of unavailable data forwarding sub-paths exceeds the preset threshold value, it is difficult to locate the fault location within the required time when a network failure occurs.
[0078] At this time, each BGP peer in the control set may execute the target task according to the second data forwarding path.
[0079] Of course, the second data forwarding path may also be a data forwarding path whose priority is only lower than that of the first data forwarding path among the multiple data forwarding paths.
[0080] If the number of unavailable data forwarding sub-paths in the second data forwarding path reaches a preset threshold, each BGP peer in the set can be controlled to perform 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 sub-paths is less than the preset threshold.
[0081] The third data forwarding path may be any path among the multiple data forwarding paths except the first data forwarding path and the second data forwarding path, or a data forwarding path among the multiple data forwarding paths whose priority is only lower than the first data forwarding path and the second data forwarding path.
[0082] In this way, each BGP peer in the set can be controlled to perform the target task according to one of the planned multiple data forwarding paths, so that in the event of a network failure, troubleshooting can be performed according to the planned data forwarding path to improve the efficiency of troubleshooting.
[0083] The present application proposes a path switching method, which includes: determining a Border Gateway Protocol BGP peer set for a target task and a plurality of data forwarding paths corresponding to the set; controlling each BGP peer in the set to perform the target task according to a first data forwarding path; and controlling each BGP peer in the set to perform 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. The embodiment of the present application uses other pre-set data forwarding paths to perform the target task when the target number of unavailable data forwarding subpaths in the first data forwarding path is large, so that the fault location can be quickly located through the data forwarding path in the event of a network failure, and the fault repair can be completed.
[0084] In some embodiments, the method also includes: in response to a session interruption event, determining a session path corresponding to the session interruption event, the session path being a data forwarding path between two BGP peers; when 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] Among them, in order to make multiple BGP peers that execute target tasks follow a pre-planned unified path, by monitoring the link status between each BGP peer in the BGP peer set, it is necessary to develop corresponding interfaces for the intelligent configuration analysis module cluster to call, so as to achieve 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 figure, the Leaf switches, Spine switches, NVLink switches, Leaf switches and Spine switches, and Leaf switches and NVLink switches in the intelligent computing center are connected through TCP and are called BGP peers. The intelligent configuration analysis module configures and monitors multiple BGP peers that execute target tasks by configuring on 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: Establish a monitoring group and establish different monitoring groups according to business needs.
[0090] 2) peer monitor-group: In the monitoring group, neighbor peers of the same service are added. These peers have the same planned forwarding path. Their best operation mode is to forward according to the planned path. If a BGP neighbor is down and reaches a certain threshold, the backup path switching is completed uniformly.
[0091] 3) reset monitor-group: Initializes the monitoring group and completes the switchback function of the monitoring group. When the fault is restored, it is completed by the administrator or the intelligent configuration analysis module cluster.
[0092] 4) display bgp monitor-group: statistics and viewing of monitoring group status.
[0093] Netconf interface: The netconf interface mainly provides an interface for the intelligent configuration analysis module cluster to control devices.
[0094] BGP / Instances table added <monitorgroup>The attributes are shown in Table 1.
[0095]
[0096] Table 1
[0097] The commands in Table 1 are mainly used to add BGP peer sets corresponding to different monitoring target tasks. The operations supported by Netconf include: GET, POST, PUT, and DELETE.
[0098] BGP / CfgSessions table added <monitorgroup>The attributes are shown in Table 2.
[0099]
[0100] Table 2
[0101] The commands in Table 2 are mainly used to configure BGP peers in a BGP peer set and session paths between BGP peers, that is, data forwarding subpaths in a data forwarding path.
[0102] BGP / Resets table added <monitorgroup>Each attribute such as Figure 3 As shown,
[0103]
[0104] Table 3
[0105] Table 3 is mainly used for initialization of the monitoring group and completion of the switchback function of the monitoring group. After the failure is restored, it is completed by the administrator or the intelligent configuration analysis module cluster.
[0106] After configuring the command line interface and Netconf interface, the BGP peer set for the target task and the multiple data forwarding paths corresponding to the set will be determined. At this time, 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 time, the first data forwarding path will be added to the routing information table, so that the network failure can be located by querying the routing information table when the network failure occurs.
[0108] When a session down, that is, a session interruption event, is received, the session path corresponding to the session interruption event will be determined; wherein, the session path is the data forwarding path of two BGP peers, and when 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, and the number of session downs corresponding to the current first data forwarding path is determined, that is, the accumulated 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 closing flag for the first data forwarding path, the session closing flag is used to indicate the disconnection of the session connection of the first data forwarding path between each BGP peer; deleting the first data forwarding path in the routing table; setting a session connection flag for the second data forwarding path, the session connection flag is used to indicate that each BGP peer performs a session connection according to the second data forwarding path.
[0110] When it is determined that the number of session downs corresponding to the current first data forwarding path reaches the threshold, the session connection between each BGP peer in the BGP peer set will be actively disconnected, that is, the session closing flag will be set for the first data forwarding path. The session closing flag can be a monitor shutdown tag. For sessions marked with monitor shutdown, the session cannot be restored through the reconnection (Connection Retry, referred to as CR) mechanism, where the CR mechanism refers to the connection recovery mechanism in BGP. When the connection between BGP peers is disconnected for some reason, BGP will try to re-establish the connection. This process is the CR reconnection mechanism. Only recovery through commands is allowed. The monitor-shutdown disconnection reason description is added to the actively disconnected session, and the first data forwarding path will be deleted from the BGP peer set.
[0111] Furthermore, when there are multiple equal BGP peer sets, and the number of session downs corresponding to the current first data forwarding path reaches a threshold, fast switching is achieved by setting a backup mark, that is, setting a session connection identifier for the second data forwarding path.
[0112] The session connection identifier may be set for the first data forwarding path as any one of the multiple data forwarding paths, or may be set for the path with the highest priority among the multiple data forwarding paths except the first data forwarding path.
[0113] Furthermore, the first data forwarding path in the routing forwarding table will be deleted.
[0114] In some embodiments, the method further comprises:
[0115] Add a second data forwarding path in the routing forwarding 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 performs 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 a BGP peer set for a target task includes: establishing an initial set for the target task in response to a set establishment event for the target task; obtaining a set capacity corresponding to the set establishment event; and adding BGP peers for executing the target task to the initial set in response to a BGP peer addition event until the number of BGP peers in the initial set reaches the set capacity, thereby obtaining a BGP peer set for the target task.
[0118] In some embodiments, during the process of configuring the command line interface and the Netconf interface, the monitor-group configuration can be used to trigger a set establishment event for the target task, and the number of BGP peers required in the set is specified in the configuration. In response to the set establishment event, a monitor-group node attachment / detachment global linked list is established, that is, a BGP peer set for the target task is established. At this time, the BGP peer set just established is an empty set, and there is no BGP peer in the empty set.
[0119] In response to the session up event and configuring 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 for executing 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, the BGP peer set can also receive the following commands:
[0122] A neighbor exits the monitoring group:
[0123] In response to the session destroy event, or by configuring the undo peer monitor-group command, the session is removed 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 the down state before the switchover, the linked list information cannot be smoothly restored after the switchover, so a backup is required.
[0126] Connection recovery:
[0127] Respond to the configuration reset monitor-group, clear the monitor shutdown mark, and re-establish the session connection.
[0128] Display Maintenance:
[0129] Add the display command display bgp monitior-group to display the sessions in the monitoring group and the status of each session.
[0130] In some embodiments, the method further comprises:
[0131] If the number of unavailable data forwarding sub-paths in the first data forwarding path does not reach a preset threshold, the first target data forwarding sub-path to which the unavailable data forwarding sub-path is switched is determined; each BGP peer is controlled to perform 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, and the second target data forwarding sub-path is the data forwarding sub-path in the first data forwarding path except the unavailable data forwarding sub-path.
[0132] Among them, 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. In this process, the BGP peer uses a series of steps to select the best path, which include comparison weights, local preferences, whether the path originates locally, AS path length, origin code, multi-exit discriminator (MED), neighbor type, etc. When the BGP peer is disconnected, BGP will re-evaluate the available paths according to 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 a route monitoring tool can be used to monitor the announcement and withdrawal of BGP routes in real time, so as to timely discover route changes and understand the route situation after switching, etc.
[0133] In short, if the number of unavailable data forwarding sub-paths in the first data forwarding path does not reach the preset threshold, it is considered that if a network failure occurs at this time, the fault location can be located within the required time. Therefore, there is no need 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, multiple data forwarding paths corresponding to a set are determined, including: 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, where the available port is the port marked as an available port 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 the data forwarding path.
[0135] Before planning the data forwarding paths, the planned number of data forwarding paths is determined, and based on the collected routing attribute parameters of the remaining ports of each BGP peer, the optimal port of each BGP peer is determined.
[0136] The routing attribute parameters include at least one of the following: a preferred value, a local preference, a shortest autonomous system AS path, a minimum multi-exit identifier, and a router identifier.
[0137] The optimal port between two adjacent BGP peers can be determined in the following ways:
[0138] Preferred Value:
[0139] The preferred value is the first attribute compared in the BGP path selection process. The value range is 0 to 65535. The larger the value, the higher the priority. By default, the Preferred Value is 0. You can modify this value to control path selection. This attribute is only used by the local router to select the best BGP path and will not be sent to any BGP neighbor.
[0140] Local Preference:
[0141] The local preference is used to select the best route when traffic leaves the AS. It is only transmitted between IBGP peers and not to EBGP peers. The value range is 0 to 4294967295. The larger the value, the higher the priority. By default, the local preference is 100.
[0142] Shortest autonomous system AS path (AS_Path):
[0143] When a BGP router advertises a route to an EBGP peer, it adds the AS number of the local self-made system to the leftmost end of the AS_Path attribute of the route. After comparing the AS_Path attributes, BGP will give priority to the route with the shortest AS_Path length. If the AS_Path lengths are equal, BGP will compare the next attribute Origin.
[0144] Minimum Multi-Exit Descriptor (MED):
[0145] MED is used to help external ASs choose a better ingress path. The smaller the MED value, the higher its priority. MED comparison is performed only when the first (adjacent) AS is the same in two paths. If bgp always-compare-med is enabled, the MED of all paths is compared.
[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 highest numerical IP address among all available interface IP addresses on the router.
[0148] According to the above method, the optimal ports of all adjacent BGP peers in the set are obtained, and the optimal ports are connected to obtain the optimal data forwarding path. The optimal port is marked as unavailable after being planned to the data forwarding path.
[0149] Next, according to the above process of determining the optimal data forwarding path, the optimal port among the available ports of all adjacent BGP peers in the set is determined, and the optimal port is connected to obtain the data forwarding path 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 calculation.
[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 of a single network element device.
[0153] Network level: Diagnose overall network utilization, network capacity, and network health.
[0154] Application service level: service quality diagnosis, service indicators: latency, jitter, packet loss trends and anomalies.
[0155] Through the above steps, multiple data forwarding paths can be planned between peers, and the multiple data forwarding paths all have corresponding priorities.
[0156] like Figure 5 As shown, there are 8 BGP peers in the BGP peer set, and each BGP peer includes N ports. N data forwarding paths are determined based on the attributes of each port: a first data forwarding path, a second data forwarding path, a third data forwarding path, and so on, the Nth data forwarding path.
[0157] First, each BGP peer in the control set performs the target task according to the first data forwarding path. 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 performs the target task according to the second data forwarding path. The data forwarding sub-path is a data forwarding path of two adjacent BGP peers among the multiple BGP peers. When the number of unavailable data forwarding sub-paths in the second data forwarding path reaches a preset threshold, each BGP peer in the control set performs the target task according to the third data forwarding path.
[0158] The present application also provides a path switching device for performing the above Figure 3 The path switching method in the embodiment is as follows: Figure 6 As shown, the device comprises:
[0159] A determination unit 601 is used to determine a Border Gateway Protocol BGP peer set for a target task and a plurality of data forwarding paths corresponding to the set; the plurality of BGP peers included in the set are all used to perform the target task, and the data forwarding path is an optional path for the BGP peer to perform the target task;
[0160] A control unit 602 is used to control each BGP peer in the set to perform the target task according to a first data forwarding path; the first data forwarding path is any path among the multiple data forwarding paths;
[0161] The control unit 602 is used to control each BGP peer in the set to perform 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, wherein the data forwarding sub-path is the data forwarding path of two adjacent BGP peers among the multiple BGP peers, and the second data forwarding path is any path among the multiple data forwarding paths except the first data forwarding path.
[0162] The present application proposes a path switching method, apparatus, device, storage medium and computer program product, the method comprising: determining a Border Gateway Protocol BGP peer set for a target task and a plurality of data forwarding paths corresponding to the set; controlling each BGP peer in the set to perform the target task according to a first data forwarding path; when the number of unavailable data forwarding subpaths in the first data forwarding path reaches a preset threshold, controlling each BGP peer in the set to perform the target task according to a second data forwarding path. The embodiment of the present application uses other pre-set data forwarding paths to perform the target task when the target number of unavailable data forwarding subpaths in the first data forwarding path is large, so that the fault location can be quickly located through the data forwarding path in the event of a network failure, and the fault repair can be completed.
[0163] In some embodiments, the determining unit 601 is further configured to:
[0164] In response to a session interruption event, determining a session path corresponding to the session interruption event;
[0165] In a case where the session path belongs to the first data forwarding path, determining that the data forwarding sub-path corresponding to the session path is unavailable;
[0166] The number of unavailable data forwarding sub-paths in the current first data forwarding path is accumulated.
[0167] In some embodiments, the control unit 602 is specifically configured to:
[0168] Setting a session closing flag for the first data forwarding path, wherein the session closing flag is used to indicate disconnection of a session connection of the first data forwarding path between the BGP peers;
[0169] Deleting the first data forwarding path in the routing forwarding table;
[0170] A session connection identifier is set for the second data forwarding path, where the session connection identifier is used to indicate that each BGP peer performs a session connection according to the second data forwarding path.
[0171] In some embodiments, the above device further comprises: an adding unit for
[0172] Add the second data forwarding path in the routing forwarding table.
[0173] In some embodiments, the determining unit 601 is specifically configured to:
[0174] In response to a set establishment event for a target task, establish a BGP peer set for the target task;
[0175] In response to a BGP peer addition event, a BGP peer for executing 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, determining a first target data forwarding sub-path to which the unavailable data forwarding sub-path is switched;
[0178] Control each BGP peer to perform 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, wherein the second target data forwarding sub-path is a data forwarding sub-path in the first target data forwarding path except 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 routing attribute parameters of each interface of each BGP peer in the set, wherein the 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.
[0181] Please refer to the following Figure 7 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. Figure 7 As shown, the electronic device 7 includes: a processor 700, a memory 701, a bus 707 and a communication interface 703, and 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 be run on the processor 700, and the processor 700 executes the path switching method provided in any of the aforementioned embodiments of the present application when running the computer program.
[0182] The memory 701 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 703 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0183] The bus 707 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 701 is used to store programs, and the processor 700 executes the programs after receiving the execution instruction. The path switching method disclosed in any implementation of the aforementioned embodiment of the present application may 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 the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 700. The above processor 700 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 701, and the processor 700 reads the information in the memory 701 and completes the steps of the above method in combination with its hardware.
[0185] The electronic device provided in the embodiment of the present application and the path switching method provided in the embodiment of the present application are based on the same application concept and have the same beneficial effects as the methods adopted, operated or implemented therein.
[0186] The present application also provides a computer-readable storage medium corresponding to the path switching method provided in the above embodiment. Figure 8 , Figure 8 The computer-readable storage medium shown is an optical disc 30 on which a computer program (ie, a program product) is stored. When the computer program is executed by a processor, the path switching method provided by any of the aforementioned embodiments is executed.
[0187] In addition, examples of the computer-readable storage medium may also 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 or magnetic storage media, which are not listed here one by one.
[0188] The computer-readable storage medium provided in the above-mentioned embodiment of the present application and the path switching method provided in the embodiment of the present application are based on the same application concept and have the same beneficial effects as the method adopted, run or implemented by the application program 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 device. Various general-purpose devices may also be used in conjunction with the teachings herein. Based on the above description, it is apparent that the structures required to construct such devices are suitable. In addition, the present application is not directed to any particular programming language. It should be understood that the contents of the present application described herein may be implemented using various programming languages, and the description of the specific languages above is intended to disclose the best implementation of the present application.
[0190] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various application aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, the application aspects lie in less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present application.
[0191] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the creation device of the virtual machine according to the embodiment of the present application. The present application can also be implemented as a device or device program for executing part or all of the methods described herein. The program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0192] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.< / monitorgroup> < / monitorgroup> < / monitorgroup>
Claims
1. A path switching method, characterized in that: The method comprises: Determine a Border Gateway Protocol (BGP) peer set for a target task and a plurality of data forwarding paths corresponding to the set; the plurality of BGP peers included in the set are all used to execute the target task, and the data forwarding path is an optional path for the BGP peer to execute the target task; Controlling each BGP peer in the set to perform the target task according to a first data forwarding path; the first data forwarding path is any one of the multiple 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 perform the target task according to a second data forwarding path, where the data forwarding sub-path is a data forwarding path of two adjacent BGP peers among the multiple BGP peers, and the second data forwarding path is any path among the multiple data forwarding paths except the first data forwarding path.
2. The method according to claim 1, characterized in that The method further comprises: In response to a session interruption event, determining a session path corresponding to the session interruption event, where the session path is a data forwarding path between two BGP peers; In a case where the session path belongs to the first data forwarding path, determining that the data forwarding sub-path corresponding to the session path is unavailable; According to the number of received session interruption events for the first data forwarding path, the number of unavailable data forwarding sub-paths in the current first data forwarding path is determined.
3. The method according to claim 1, characterized in that The controlling each BGP peer in the set to perform the target task according to the second data forwarding path includes: Setting a session closing flag for the first data forwarding path, wherein the session closing flag is used to indicate disconnection of a session connection of the first data forwarding path between the BGP peers; Deleting the first data forwarding path in the routing forwarding table; Setting a session connection identifier for the second data forwarding path, wherein the session connection identifier is used to indicate that each BGP peer performs a session connection according to the second data forwarding path; Add the second data forwarding path in the routing forwarding table.
4. The method according to claim 1, characterized in that: Determining a BGP peer set for a target task includes: In response to a set establishment event for a target task, establish an initial set for the target task; Obtaining the collection capacity corresponding to the collection establishment event; In response to a BGP peer addition event, a BGP peer for executing the target task is added to the initial set until the number of BGP peers in the initial set reaches the set capacity, thereby obtaining a BGP peer set for the target task.
5. The method according to claim 1, characterized in that The method further comprises: If the number of unavailable data forwarding sub-paths in the first data forwarding path does not reach the preset threshold, determining a first target data forwarding sub-path to which the unavailable data forwarding sub-path is switched; Control each BGP peer to perform 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, where the second target data forwarding sub-path is a data forwarding sub-path in the first data forwarding path except the unavailable data forwarding sub-path.
6. The method according to claim 1, characterized in that The determining of the multiple data forwarding paths corresponding to the set includes: Obtaining the planned number of data forwarding paths corresponding to the set; Determine 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 a port marked as an available port among all ports of the BGP peer; The optimal ports are connected to obtain a data forwarding path until the number of the data forwarding paths reaches the planned number, and the optimal port is marked as unavailable after being planned to the data forwarding path.
7. A path switching device, characterized in that: The device comprises: A determination unit, used to determine a Border Gateway Protocol BGP peer set for a target task and a plurality of data forwarding paths corresponding to the set; the plurality of BGP peers included in the set are all used to perform the target task, and the data forwarding path is an optional path for the BGP peer to perform the target task; A control unit, configured to control each BGP peer in the set to perform the target task according to a first data forwarding path; the first data forwarding path is any one of the multiple data forwarding paths; The control unit is used to control each BGP peer in the set to perform 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, wherein the data forwarding sub-path is a data forwarding path of two adjacent BGP peers among the multiple BGP peers, and the second data forwarding path is any path among the multiple data forwarding paths except the first data forwarding path.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The processor executes the computer program to implement the method according to any one of claims 1 to 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 according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and device for realizing virtual private network fast reroute by network processor
CN101697527A
Network data transmission method and system based on optimal path, medium and equipment
CN115883444A
Path switching control method and device and computer readable storage medium
CN116866254A
Fault processing method, device and equipment and computer readable storage medium
CN118555237A
Inter processor communication path manage mathod ofexchanges and media thereof
KR1020080000863A