Tunnel label processing method and device and network equipment
By generating and saving network entries with tunnel labels in network devices, the interruption problem caused by tunnel label reallocation during network device reset is resolved, enabling fast tunnel label updates and improving network link convergence speed and user experience.
Patent Information
- Application Number
- CN202511384597.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-09-26
AI Technical Summary
In existing network systems, the dynamic reallocation of tunnel tags during network device resets causes network link interruptions, leading to communication anomalies. Furthermore, existing backup path configurations are complex and resource-constrained, making it impossible to effectively prevent excessively long interruption times.
By responding to label allocation operations in network devices, generating and saving network entries for tunnel labels, and then distributing them to the forwarding plane, the rapid updating and publication of tunnel labels is achieved, avoiding interruptions caused by the redistribution of tunnel labels.
When network devices are reset, tunnel tags can be quickly found and updated, reducing downtime, improving communication quality and user experience, and simplifying configuration and maintenance.
Smart Images

Figure CN120880835A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of network communication, and in particular to a method, apparatus, and network device for processing tunnel tags. Background Technology
[0002] Typically, a network system consists of multiple network devices, each configured with a preset network protocol. These devices can exchange routing information, and the network system's controller can further configure them to form network links and forward data.
[0003] Network systems or network links typically require regular maintenance and updates to adapt to evolving business needs.
[0004] Furthermore, in a network system, each network device can be viewed as a node or network element. During the operation and maintenance of a network system in the current network, it is sometimes necessary to reset nodes, or to reset processes due to certain faults. Reset operations often cause changes in the network device's control layer protocols, which in turn cause the original network link to be interrupted, resulting in network outages.
[0005] To avoid communication anomalies caused by network outages, network systems typically configure backup paths for established network links, such as forming hot standby (HSB) protection. However, this additional backup path approach may increase or limit the possibilities for operation and maintenance and applications. For example, the configuration becomes more complex; and each network link's corresponding path needs to be configured with BFD (Bidirectional Forwarding Detection) technology so that when the current network link switches to the backup link, BFD detection is performed first. This process generally lasts for tens or even hundreds of milliseconds of network interruption.
[0006] For businesses, this is a relatively long interruption period. Furthermore, considering the runtime limitations of businesses, some businesses may not be able to configure BFD detection technology for simplicity or due to limitations in device port resources. In such cases, HSB protection cannot be configured either.
[0007] Therefore, it is more likely to cause network link interruptions, resulting in network outages and a reduced user experience. Summary of the Invention
[0008] In view of this, the purpose of the present invention is to provide a method, apparatus and network device for processing tunnel tags to alleviate the above-mentioned technical problems.
[0009] In a first aspect, embodiments of the present invention provide a method for processing tunnel labels, applied to a network device. The method includes: responding to a label allocation operation performed on the network device, obtaining a tunnel label corresponding to the label allocation operation, wherein the tunnel label is used to characterize an adjacency label between two adjacent network devices in a network link; generating a network entry containing the tunnel label according to a pre-configured association group format; saving the network entry to a preset storage location; and distributing the allocated tunnel label to the forwarding plane of the network device to publish the tunnel label.
[0010] In conjunction with the first aspect, the present invention provides a first possible implementation of the first aspect, wherein the step of generating a network entry containing the tunnel tag according to a pre-configured association group format includes: obtaining pre-configured gateway protocol information of the network device, wherein the gateway protocol information includes at least the network interface of the network device and the IP address corresponding to the network interface; assembling the gateway protocol information and the tunnel tag according to the pre-configured association group format to obtain a network entry containing the tunnel tag.
[0011] In conjunction with the first possible implementation of the first aspect, this embodiment of the invention provides a second possible implementation of the first aspect, wherein the network entry includes the tunnel tag, the outgoing port identifier of the network interface, and the next-hop IP address adjacent to the network device, which are assembled sequentially according to the association group format.
[0012] In conjunction with the first aspect, this embodiment of the invention provides a third possible implementation of the first aspect, wherein the method further includes: responding to a configuration operation for a gateway protocol of the network device before responding to a label allocation operation performed on the network device; wherein the configuration operation is used to configure gateway protocol information of the gateway protocol; configuring the gateway protocol of the network device based on the gateway protocol information corresponding to the configuration operation; and activating the segment routing (SR) function of the network device.
[0013] In conjunction with the first possible implementation of the first aspect, this embodiment of the invention provides a fourth possible implementation of the first aspect, wherein the method further includes: in response to a reset operation performed on the network device, loading the gateway protocol information from a pre-built configuration database; wherein the configuration database is pre-configured with a protection mechanism; using the gateway protocol information as an index parameter, searching for a network entry containing the gateway protocol information from a preset storage location; extracting a tunnel label corresponding to the gateway protocol information from the found network entry; sending the extracted tunnel label to the forwarding plane of the network device so that the forwarding plane updates the tunnel label; and generating an update message for the tunnel label and broadcasting the update message in the network link.
[0014] In conjunction with the fourth possible implementation of the first aspect, this embodiment of the invention provides a fifth possible implementation of the first aspect, wherein the above method further includes: responding to receiving an update message of the tunnel label broadcast by a target network device; wherein the target network device is a network device whose tunnel label in the network link has been updated; extracting the tunnel label recorded in the update message; and sending the tunnel label to the forwarding plane of the network device so that the forwarding plane updates the tunnel label.
[0015] In conjunction with the fifth possible implementation of the first aspect, this embodiment of the invention provides a sixth possible implementation of the first aspect, wherein the step of sending the tunnel label to the forwarding plane of the network device so that the forwarding plane updates the tunnel label includes: searching through the forwarding plane for the network entry corresponding to the target network device recorded in the network entry stored in the preset storage location; determining whether the tunnel label recorded in the found network entry is consistent with the tunnel label recorded in the update message; if not, updating the tunnel label in the network entry to the tunnel label recorded in the update message.
[0016] Secondly, embodiments of the present invention also provide a tunnel label processing apparatus applied to a network device. The apparatus includes: a response module, configured to respond to a label allocation operation performed on the network device and obtain a tunnel label corresponding to the label allocation operation, wherein the tunnel label is used to characterize an adjacency label between two adjacent network devices in a network link; a generation module, configured to generate a network entry containing the tunnel label according to a pre-configured association group format; a storage module, configured to save the network entry to a preset storage location; and a publishing module, configured to distribute the allocated tunnel label to the forwarding plane of the network device to publish the tunnel label.
[0017] Thirdly, embodiments of the present invention also provide a network device, wherein the controller of the network device is configured with the tunnel tag processing device described in the second aspect.
[0018] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to perform the method described in the first aspect.
[0019] The embodiments of the present invention bring the following beneficial effects: This invention provides a method, apparatus, and network device for processing tunnel tags. In response to a tag allocation operation performed on the network device, the device obtains the tunnel tag corresponding to the tag allocation operation, generates a network entry containing the tunnel tag according to a pre-configured association group format, saves the network entry to a preset storage location, and distributes the allocated tunnel tag to the forwarding plane of the network device for publication. Since the network entry containing the tunnel tag is stored during the allocation process, the tunnel tag can be quickly retrieved from the preset storage location when the network device experiences a reset operation. This facilitates rapid network link convergence, effectively avoids poor communication quality caused by prolonged interruption time, and ultimately improves user experience.
[0020] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0022] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of a network system; Figure 2 A flowchart illustrating a method for processing tunnel tags according to an embodiment of the present invention; Figure 3 A schematic diagram of another network system provided in an embodiment of the present invention; Figure 4A schematic diagram of a tunnel tag processing device provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] Segment Routing (SR) is a network architecture designed based on source routing principles for forwarding data packets. SR-MPLS is a new type of MPLS (Multi-Protocol Label Switching) technology. Its control plane is implemented based on an extension of the IGP (Interior Gateway Protocol) routing protocol, while the forwarding plane is implemented based on an MPLS forwarding network. The corresponding segment routes (SR) are presented as labels in the forwarding plane. SR-MPLS technology includes two types: SR-MPLS BE (Best Effort) and SR-MPLS TE (Traffic Engineering). SR-MPLS BE distributes SIDs (Segment IDs) based on IGP and uses these SIDs to guide network devices to forward data based on the shortest path, without forcibly specifying a particular path; hence, it's also called a best-effort tunnel. SR-MPLS TE distributes SIDs based on IGP and uses multiple SIDs combined at the source node to guide data forwarding. This mechanism imposes certain constraints on data forwarding, thus meeting the needs of traffic engineering.
[0026] The tunnel tag processing method provided in this embodiment of the invention is specifically for SR-MPLS TE, and SR-TE tunnel will be used to refer to SR-MPLS TE in the following.
[0027] The following describes the concepts involved in the embodiments of the present invention, including: SID (Segment ID), also known as segment ID value, is based on the data plane forwarding perspective. There are currently two main types: one is to use MPLS Label as the SID value and guide data forwarding based on the MPLS forwarding plane; the other is to use the value in IPv6 address format as the SID value and guide data forwarding based on IPv6 routing, which is applied in SRv6 scenarios.
[0028] In this embodiment of the invention, the application background is based on MPLS Label as SID value.
[0029] Adjacency Segment ID (Adj SID), also known as an adjacency label, is a segment ID value between two sites. A site typically represents the layout of network devices and is a basic unit in the network system. It can be a physical location or device, such as a router or switch, used for connecting and forwarding data. For example, in a network system, network devices PE1 and PE2 can act as sites. A direct connection between PE1 and PE2 creates two unidirectional Adj SID values (Adj SID1 from PE1 to PE2 and Adj SID2 from PE2 to PE1). These Adj SID values can be statically specified or dynamically generated by IGP. Generally, Adj SID values are within a pre-configured range, such as 16 to 102400. Thus, the statically or dynamically assigned Adj SID values will fall within this range. SR-TE tunnels primarily use adjacency labels to guide traffic forwarding.
[0030] A label stack, also known as a SID list, is a sorted collection of labels used to represent a complete LSP (Label Switching Path). Each Adj SID in the label stack identifies a specific link, and the entire label stack, from top to bottom, identifies all links along the entire LSP path. During packet forwarding, the corresponding link is found based on the Adj SID at the top of the label stack, and the label is popped before forwarding. This process continues until all Adj SIDs in the label stack have been popped, at which point the entire LSP path is completed, ultimately reaching the destination of the SR-TE tunnel.
[0031] SR-TE tunnels can be configured in several ways, including via CLI (Command Line Interface) and controller configuration. Regardless of the method, the Adj SID used in the SR-TE tunnel must be pre-configured or dynamically assigned via IGP.
[0032] In this embodiment of the invention, the configuration process is mainly illustrated using the controller method as an example.
[0033] For ease of understanding, Figure 1 A schematic diagram of a network system is shown, including multiple network devices PE1, PE2, and P1~P4; wherein, Figure 1 In the diagram, red arrows indicate the propagation direction of the SR-TE tunnel path; blue dashed arrows indicate the reporting process, such as reporting tag information and topology information; and yellow arrows indicate the distribution process, such as distributing the tag stack to the source node.
[0034] based on Figure 1 The network system shown below illustrates the configuration process for the SR-TE tunnel, including: (1) IS-IS configuration. IS-IS (Intermediate System to Intermediate System) is a link-state routing protocol, mainly used for the exchange of routing information within large networks (especially the backbone networks of operators).
[0035] In this embodiment of the invention, each network device is configured to enable ISIS SR extension capabilities, mutually supporting the establishment of ISIS neighbors. For ISIS instances with SR capabilities, SR adjacency labels, i.e., the aforementioned Adj SID, are assigned to the enabled ISIS protocol outgoing interfaces. These adjacency labels are extended through the ISIS SR protocol and flooded throughout the entire network system. As described above. Figure 1 As shown, taking PE1 node as an example, the ISIS label allocation process is as follows: A. PE1's ISIS protocol applies for local dynamic labels for all its links. For example, the adjacency label assigned to PE1->P1 is 100, and the adjacency label assigned to PE1->P3 is 101. Other network devices are configured in a similar way. B. PE1 publishes adjacency labels via the ISIS protocol, flooding the entire network system so that other network devices in the network system can see the adjacency label information assigned by PE1; in the same principle, the Adj SIDs assigned by the ISIS protocol of other network devices will also be learned by PE1. C. Generate the tag forwarding table entry corresponding to the Adj SID on PE1: { Adj SID =100, outport=eth1 / 1, nexthop=P1}, { Adj SID =101, outport=eth1 / 2, nexthop=P3}, D. The ISIS protocol of other network devices in the network system will learn the Adj SID published by PE1, but it is not necessary to generate a forwarding table for the Adj SID on other network devices.
[0036] Figure 1 Other network devices in the system allocate and publish Adj SIDs in a similar manner to PE1, and generate forwarding entries corresponding to similar Adj SIDs locally.
[0037] (2) BGP-LS (Border Gateway Protocol Link-State) reports link status, which is the process shown by the blue dashed arrow. The network topology information collected by the ISIS protocol above is reported to the controller via BGP-LS. In this way, the controller obtains the entire network topology and the Adj SID information of each network device. Then, the user can configure the SR-TE tunnel through the controller.
[0038] (3) Figure 1 In the process described by the yellow arrow, NETCONF / PCEP sends the label stack to the source node. The user configures the SR-TE tunnel on the controller according to the specific path requirements and sends the tunnel's label stack to the source node PE1 via NETCONF. From this point on, user packets arriving at PE1 can be forwarded hop-by-hop according to the pre-configured SR-TE tunnel, as shown above. Figure 1 In the direction of the red arrow, the SR-TE tunnel path is: PE1->P1->P2 –>PE2. Packets are popped out of the tag stack as shown in Table 1 and forwarded to their destination. For example, a 100 packet is popped out on PE1 and forwarded to P1; a 200 packet is popped out on P1 and forwarded to P2; and a 400 packet is popped out on P2 and forwarded to the final destination PE2.
[0039] Table 1:
[0040] The above describes the controller configuration method for SR-TE tunnels. The general steps for CLI command-line configuration are as follows: Configure IS-IS related information, such as L3 interface and IP address, and configure IS-IS related attributes. Each network device needs to be configured. After configuration, network devices within the network system can form neighbors with each other.
[0041] Enable IS-IS's SR MPLS extension capability, so that the IS-IS protocol will dynamically assign an adjacency label to the IP address corresponding to each link interface. After the above configuration, once the ISIS neighbor is formed, an adjacency label value will be dynamically assigned to the eth1 / 1 (ip=1.1.1.1) link on the PE1 node. Other network devices are configured in a similar way.
[0042] After configuring the SR-TE tunnel for the source node PE1 via the controller or CLI command line, the data packet will pop adjacent labels (Adj SIDs) hop by hop along the label stack path, eventually reaching the destination site PE2. For example... Figure 1 The network links traversed by PE1->P1->P2->PE2 and the pop-up status of the corresponding adjacency labels.
[0043] During live network maintenance, it's sometimes necessary to reset the IGP process on nodes to upgrade the IGP software or due to some kind of fault. If the current method is still followed, it's highly likely that the forwarding plane of the SR-TE tunnel will be interrupted or route convergence will be slow.
[0044] The following explains the situation where the SR-TE tunnel forwarding path experiences service interruption under the existing configuration: based on Figure 1 The network system shown illustrates the reset of the downstream P2 node in the SR-TE tunnel (PE1->P1->P2->PE2). When the ISIS process of P2 node is reset, due to changes in the ISIS control plane protocol, when the ISIS process restarts, it will dynamically allocate an adjacency label for Eth1 / 1 of P2 node. Because it is dynamically allocated, the value of the newly allocated adjacency label may not be the previous 400. Here, we assume that the newly allocated value is 500, and the forwarding plane entry corresponding to P2 node will be updated from the original {Adj SID = 400, outport=eth1 / 1, nexthop=PE2} to {Adj SID = 500, outport=eth1 / 1, nexthop=PE2}. At this time, the service flow of the SR-TE tunnel path PE1->P1->P2->PE2 will be unable to forward packets from Eth1 / 1 of P2 node because the previously allocated sid=400 cannot be found, resulting in service interruption.
[0045] Since P2 node re-establishes a neighbor relationship with P1 node after its ISIS process starts, P2 node will advertise and propagate its local routing information (including ip=5.5.5.1 / 24 and the corresponding adjacency label Adj SID=500) to P1 node, and then further advertise and propagate it to PE1 and other nodes in the network system. Upon receiving the routing information from P2 node and detecting a change, PE1 will report it to the controller via BGP-LS, thus providing the controller with the updated routing information.
[0046] After the controller receives a change in routing information, it updates the existing SR-TE tunnels according to the configuration information. Figure 1 The SR-TE tunnel path in the process will receive tag stack information from the source node PE1, which will change from the original...
[0047] Updated to
[0048] At this point, after the packet format encapsulated and forwarded from the PE1 node changes, the packet can find the entry with sid label=500 at the P2 node, and the SR-TE tunnel path PE1->P1->P2->PE2 transmission failure will be restored.
[0049] In existing technologies, such faults are generally addressed by configuring backup paths for SR-TE tunnels to form HSB (HotStand By) protection. Each SR-TE tunnel path needs to be configured with BFD (Bidirectional Forwarding Detection) to detect path connectivity issues, thereby accelerating service switching. When the primary path BFD detects a fault, it triggers HSB protection to switch to the pre-backed SR-TE tunnel backup path, thus reducing fault interruption time.
[0050] However, this approach may increase or limit the possibilities of operation and maintenance and application. For example, the configuration may be more complex, requiring the configuration of primary and backup SR-TE tunnel paths, and each SR-TE tunnel must be configured with BFD detection. The shortest BFD detection cycle is 3.3ms, and the interruption time is at least 3*3.3ms. In addition, for customers, the requirement to configure protection to run a service is also a limitation. Customers may not be able to configure protection due to simplicity or limitations in device port resources. In such cases, HSB protection cannot be configured.
[0051] Based on the above analysis and the problems encountered, this invention proposes a method, apparatus, and network device for processing tunnel tags, which can solve the above-mentioned service interruption problem and thus simplify the configuration and maintenance for users.
[0052] To facilitate understanding of this embodiment, a method for processing tunnel tags disclosed in this embodiment of the invention will first be described in detail.
[0053] In one possible implementation, embodiments of the present invention provide a method for processing tunnel tags, applied to network devices, such as... Figure 1 The network device can be any one of PE1, PE2, and P1 to P4, and the network element can be a router, L3 switch, or any network device that supports SR-TE tunnels and SR routing. The specific implementation depends on the actual usage, and this embodiment of the invention does not impose any limitations on this.
[0054] further, Figure 2 A flowchart illustrating a method for processing tunnel tags is provided, including the following steps: Step S202: In response to the label allocation operation applied to the network device, obtain the tunnel label corresponding to the label allocation operation; In this embodiment of the invention, the tunnel label is used to characterize the adjacency label between two adjacent network devices in a network link; that is, the Adj SID mentioned above.
[0055] Furthermore, the tag allocation operation in this embodiment of the invention is actually a dynamic allocation process, such as the process of the ISIS process dynamically allocating the Adj SID corresponding to the link. It can respond and obtain the Adj SID dynamically allocated by the ISIS process.
[0056] Step S204: Generate network entries containing tunnel tags according to the pre-configured association group format; Step S206: Save the network entry to a preset storage location; and, Step S208: The allocated tunnel label is distributed to the forwarding plane of the network device to publish the tunnel label.
[0057] In practical use, considering that after the ISIS process dynamically allocates Adj SIDs, it will generate network entries such as {Adj SID = 100, outport = eth1 / 1, nexthop = 1.1.1.2}, that is, generate label forwarding entries corresponding to Adj SIDs. Therefore, in this embodiment of the invention, by storing network entries, when the process is reset or the node is restarted, the stored network entries can be quickly found, and the previously allocated Adj SIDs can be found. This can avoid the problem of service interruption caused by dynamically allocating new Adj SIDs.
[0058] Therefore, the tunnel tag processing method provided in this embodiment of the invention can respond to a tag allocation operation performed on a network device, obtain the tunnel tag corresponding to the tag allocation operation, generate a network entry containing the tunnel tag according to a pre-configured association group format, save the network entry to a preset storage location, and distribute the allocated tunnel tag to the forwarding plane of the network device to publish the tunnel tag. Since the network entry containing the tunnel tag is stored when the tunnel tag is allocated, the tunnel tag can be quickly found from the preset storage location when the network device undergoes a reset operation, which helps the network link to converge quickly, effectively avoids the problem of poor communication quality caused by excessively long interruption time, and thus improves the user experience.
[0059] In practical use, in this embodiment of the invention, by storing the dynamically allocated adjacency labels in combination with the network attributes of the relevant links, the SR-TE tunnel routing convergence speed is fast after resetting the network device, and even the SR-TE routing service is not interrupted when resetting the IGP process.
[0060] Furthermore, for ease of understanding, the following describes the hierarchical framework of network devices. Specifically, the hierarchical framework of network devices includes several main parts: the management and control layer, the upper application layer, the business logic and protocol control layer, the hardware adaptation layer, the driver layer, the system layer, and the physical hardware chip.
[0061] The management and control functions typically run on a dedicated server or PC, while other functions generally run on network devices. When users configure L3 interface-related content, ISIS protocol content, SR-TE tunnel content, and other configuration information, this configuration information is usually stored in a database to ensure that the configuration is preserved even after power failure or device reset. However, adjacency labels, which are dynamically assigned by the IGP routing protocol in the routing protocol stack, are not stored in the database. Once the IGP routing protocol successfully establishes a connection with a directly connected neighbor, it will distribute the SR route to the data plane, such as through the aforementioned hardware adaptation layer, driver layer, and then to the physical hardware chip. This means that current technology does not preserve dynamically assigned adjacency labels after power failure or network device reset.
[0062] In this embodiment of the invention, after the network device is assigned a tunnel tag, a network entry containing the tunnel tag can be generated according to a pre-configured association group format, and the network entry can be saved to a preset storage location, thus enabling the storage of the tunnel tag.
[0063] Furthermore, in this embodiment of the invention, the aforementioned preset storage location can be a database, a file, flash memory, or other storage methods that do not lose data when power is off or reset. The specific location can be set according to the actual usage, and this embodiment of the invention does not impose any restrictions on it.
[0064] Furthermore, for ease of understanding, the following example of the process of dynamically allocating and storing IGP adjacency labels will be used to further illustrate the tunnel label processing method provided in this embodiment of the invention. This processing flow applies to all network devices configured with IGP (such as the ISIS protocol) and with SR extension protocol enabled, such as the aforementioned... Figure 1 Each network device in the system is configured through the following process, which is for the initial configuration and includes the following parts: (1) Configure IGP-related content, including: L3 interface and interface IP address, IGP protocol instance and other basic configurations; (2) Configure SR extension enable for IGP. Only when SR is enabled for IGP will the corresponding tunnel label be assigned to the network link. In practical use, the processes (1) and (2) above are usually implemented before allocating tunnel labels. That is, before responding to the label allocation operation applied to the network device, the configuration operation for the gateway protocol of the network device is responded to first. Among them, the configuration operation is used to configure the gateway protocol information of the gateway protocol, that is, to execute the configuration of IGP related content in (1) above, and to configure the gateway protocol of the network device based on the gateway protocol information corresponding to the configuration operation; and to start the segment routing (SR) function of the network device, that is, the process of enabling the SR function in (2) above. After the above configuration process is completed, the IGP will dynamically allocate adjacency labels.
[0065] (3) IGP dynamically assigns adjacency labels, i.e., Adj SID, for use in subsequent SR route advertisements and local forwarding planes; (4) Store the adjacency label, i.e., the value of Adj SID, in the database according to the association group to ensure that the dynamically allocated adjacency label is not discarded when restarting the network device or restarting the IGP process.
[0066] Among them, (4) corresponds to the process of step S204 above, that is, generating a network entry containing a tunnel label according to the pre-configured association group format. Specifically, the gateway protocol information of the pre-configured network device can be obtained, where the gateway protocol information at this time includes at least the network interface of the network device and the IP address corresponding to the network interface; then the gateway protocol information and the tunnel label are assembled according to the pre-configured association group format to obtain a network entry containing a tunnel label.
[0067] Specifically, in this embodiment of the invention, the network entry includes a tunnel tag assembled sequentially according to the association group format, an outgoing port identifier of the network interface, and a next-hop IP address adjacent to the network device.
[0068] That is, the specific format of the associated group can be in the form of the following triples: {Adj SID field; OutPort field; Next-hop IP address}; The Adj SID field stores the tunnel label dynamically allocated by the IGP, i.e., the Adj SID value. The OutPort and the next-hop IP address of the adjacent interface are both user-configured values. They can be used as keys when managing the preset storage location later. For example, the corresponding Adj SID value can be retrieved from the database based on the key value.
[0069] (5) The assigned tunnel label is sent to the chip in the forwarding plane for subsequent packet forwarding based on the chip process.
[0070] In practical use, the aforementioned process of storing tunnel labels ensures that previously dynamically allocated adjacency labels are not discarded after a network device is reset or restarted. For ease of understanding, the following explanation uses the tunnel label processing procedure after a network device resets the entire network element or the IGP process as an example, including the following steps: (1) In response to a reset operation applied to a network device, load gateway protocol information from a pre-built configuration database; wherein the configuration database is pre-configured with a protection mechanism; In practical use, users can reset the entire network device or the IGP process as needed. Specifically, users can issue a reset command via CLI commands or the controller. The network device will then respond and load IGP-related configuration information from the configuration database, including basic configurations such as L3 interfaces, interface IP addresses, and IGP protocol instances. The configuration database saves settings upon reset or power failure; therefore, the configured gateway protocol information can be preserved during a reset or power outage.
[0071] (2) Using gateway protocol information as an index parameter, search for network entries containing gateway protocol information from a preset storage location; (3) Extract the tunnel tag corresponding to the gateway protocol information from the found network entries; Specifically, since network entries containing tunnel tags, generated according to the pre-configured association group format, have already been stored in the preset storage location during the aforementioned response tag allocation operation, the network entry can be searched using the gateway protocol information as the index parameter.
[0072] For example, using the OutPort and the next-hop IP address of the adjacent interface as two key values as index parameters, the Adj SID value is already stored in the preset storage location.
[0073] (4) The extracted tunnel label is sent to the forwarding plane of the network device so that the forwarding plane updates the tunnel label; and, (5) Generate an update message for the tunnel label and broadcast the update message in the network link.
[0074] Specifically, after the Adj SID value is sent to the forwarding plane, if the user resets the network device, the Adj SID value will be added back to the chip in the forwarding plane; however, if the user resets the IGP process, since the forwarding plane is not reset, it is not necessary to add or update it again. The specific implementation depends on the actual usage situation, and this embodiment of the invention does not impose any restrictions on this.
[0075] Furthermore, in addition to the scenario where restarting or resetting the network device itself ensures that previously dynamically allocated adjacency labels are not discarded, in this embodiment of the invention, for non-reset or restarted network devices, when the tunnel label transmission changes due to the restart or reset of other network devices, segment routing (SR) can also be quickly converged to avoid prolonged network interruption. Specifically, the following describes the processing procedure of a non-reset network device after receiving SR routing information from other reset network devices, including the following process: (1) Respond to the tunnel tag update message broadcast by the target network device and extract the tunnel tag recorded in the update message; In this embodiment of the invention, the target network device is a network device whose tunnel label in the network link has been updated. For example, after the target network device performs a reset or restart, it will eventually lead to the announcement of an IGP protocol message to inform other network devices in the network system that the segment route SR of the target network device has been updated. After receiving the IGP protocol message, other network devices can respond to extract the tunnel label.
[0076] (2) The tunnel label is sent to the forwarding plane of the network device so that the forwarding plane can update the tunnel label.
[0077] In actual use, after receiving the IGP protocol message, the network device calculates the optimal route using the Local Advertisement (SPF) algorithm. On the one hand, it can advertise the route to the controller via BGP-LS, and the controller can further update the changed routing information to the network device. On the other hand, the network device can directly update its local SR route. The process of updating the tunnel label in the forwarding plane actually updates the segment route SR, which is mainly the representation of the adjacency label Adj SID in the forwarding plane chip. Furthermore, the forwarding plane can determine whether the Adj SID has been issued. If it has been issued, there is no need to update it again.
[0078] Specifically, the network entry corresponding to the target network device can be found in the network entries stored in the preset storage location by the chip on the forwarding plane; it can be determined whether the tunnel label recorded in the found network entry is consistent with the tunnel label recorded in the update message; if not, the tunnel label in the network entry is updated to the tunnel label recorded in the update message.
[0079] In practical use, SR-TE-based segment routing and further SR-Policy segment routing, with SR network programming capabilities, demonstrate good service carrying capacity and network protection capabilities under the support of the IGP protocol.
[0080] Typically, SR-TE tunnels are generated primarily based on Adj SIDs, including static and dynamic methods. Static Adj SID configuration requires pre-planning and specifying a specific Adj SID value, increasing the user's configuration workload. Dynamic Adj SIDs, on the other hand, do not require users to specify a specific Adj SID value; instead, the IGP dynamically allocates the Adj SID value, providing some convenience for users. However, dynamic configuration can lead to Adj SID reallocation due to route changes, resulting in slower SR route convergence and even prolonged service interruptions for single tunnels. The tunnel label processing method provided in this embodiment can save dynamically allocated Adj SID values, ensuring that the Adj SID values do not change dynamically during power outages or resets. This significantly accelerates route convergence, and even in a single SR-TE tunnel scenario, resetting the IGP process can achieve the goal of uninterrupted SR-TE tunnel service.
[0081] Furthermore, for ease of understanding, Figure 3 A schematic diagram of another network system is shown to further illustrate the tunnel tag processing procedure in this embodiment of the invention. The red arrows indicate the SR-TE tunnel path propagation direction; the yellow arrows indicate the configuration distribution process.
[0082] In practical use, Figure 3 In the topology shown, all network devices will execute the tunnel tag processing procedure provided in this embodiment of the invention. For example, each network device will be configured with basic configuration content such as interface, interface IP, and ISIS, as shown by the yellow dashed arrows in the figure. Here, PE1, P1, and P2 are examples, and other devices P3, P4, and PE2 are similar. After configuration, each network device will store network entries containing tunnel tags in its own preset storage location. For example, in the preset database, the following triplet form of association groups is saved, taking PE1 as an example, and other network devices are similar: { Adj SID = 100, outport = eth1 / 1, nexthop = 1.1.1.2}, { Adj SID = 101, outport = eth1 / 2, nexthop = 2.2.2.2}.
[0083] As can be seen, because SR was enabled on the outgoing ports of the two network interfaces Eth1 / 1 and Eth1 / 2 on PE1, two network entries were generated and stored in the preset database.
[0084] After configuring the label stack of the Adj SID on the source node PE1 via controller or CLI commands, an SR-TE tunnel path is formed in the direction of PE1->P1->P2->PE2. When a packet iterates to this SR-TE tunnel, the outer Adj SID is popped hop by hop along the path stations, and finally the packet is delivered to the destination device PE2. The configured label stack of the Adj SID is represented as follows:
[0085] When a user needs to reset a network element (network device) or IGP process on a certain path for upgrades or maintenance, such as resetting the P2 site or its IGP process, the P2 site will respond to the reset operation. After P2 is reset, it can use the gateway protocol information as an index parameter to search for the network entry containing the gateway protocol information from a preset storage location. Then, it can extract the tunnel label corresponding to the gateway protocol information, that is, find the previously assigned adjacency label. This ensures that the specific Adj SID value of the adjacency label after P2 is reset is still the value previously saved in the preset database. Figure 3 The Adj SID in the code is {Adj SID = 400, outport = eth1 / 1, nexthop = 5.5.5.2}, so the Adj SID value is unchanged from the value before the reset. Therefore, in the scenario of resetting the IGP process, the Adj SID value sent to the forwarding plane will not change, thus preventing the service flow from being interrupted at the P2 node. However, in the scenario of resetting the entire P2 site, since the forwarding plane is also reset, the previously stored Adj SID value will be resent to the forwarding plane chip.
[0086] In addition to distributing the Adj SID value to its local forwarding plane, the P2 site also notifies remote network devices. For example, the P2 site broadcasts an update message for the tunnel label to the PE1 source node. When PE1 receives the update message containing the Adj SID value, it can respond. If the tunnel label advertised by P2, i.e., the Adj SID value, is consistent before and after the reset, then the Adj SID value received by PE1 will also remain unchanged. In this way, PE1 does not need to update the forwarding plane chip, thereby shortening the convergence speed of SR routes and not affecting the normal forwarding of existing services. This reduces the adjacency label update operations in the SR routes of the forwarding plane, thus accelerating the route convergence speed.
[0087] It should be understood that in this embodiment of the invention, the IGP protocol is used as the ISIS for description. In other embodiments, it can also be an internal gateway protocol such as OSPF (Open Shortest Path First), which can realize the transmission of Adj SID or SR routes. Furthermore, the chip of the data forwarding plane of the network device can be an ASIC (Application Specific Integrated Circuit) chip, or other hardware platform implementations that support SR-TE tunnel forwarding, including FPGA (Field-Programmable Gate Array), NP (Network Processor), and programmable switching chip P4 (Programming Protocol-independent Packet Processors), etc., depending on the actual use case. This embodiment of the invention does not limit this.
[0088] Furthermore, based on the above embodiments, this invention also provides a tunnel tag processing device, applied to network devices, such as... Figure 4 The diagram shows a structural schematic of a tunnel tag processing device, which includes: The response module 40 is used to respond to the label allocation operation performed on the network device and obtain the tunnel label corresponding to the label allocation operation, wherein the tunnel label is used to characterize the adjacency label between two adjacent network devices in the network link; The generation module 42 is used to generate network entries containing the tunnel tags according to a pre-configured association group format; The storage module 44 is used to save the network entry to a preset storage location; and, The publishing module 46 is used to distribute the allocated tunnel label to the forwarding plane of the network device to publish the tunnel label.
[0089] Furthermore, the step of generating a network entry containing the tunnel tag according to a pre-configured association group format includes: obtaining pre-configured gateway protocol information of the network device, wherein the gateway protocol information includes at least the network interface of the network device and the IP address corresponding to the network interface; assembling the gateway protocol information and the tunnel tag according to the pre-configured association group format to obtain a network entry containing the tunnel tag.
[0090] Furthermore, the aforementioned network entry includes the tunnel tag assembled sequentially according to the association group format, the outgoing port identifier of the network interface, and the next-hop IP address adjacent to the network device.
[0091] Furthermore, the above-mentioned device is also used for: Before responding to the label assignment operation applied to the network device, a configuration operation for the gateway protocol of the network device is responded to; wherein the configuration operation is used to configure the gateway protocol information of the gateway protocol; the gateway protocol of the network device is configured based on the gateway protocol information corresponding to the configuration operation; and the segment routing (SR) function of the network device is started.
[0092] Furthermore, the above-mentioned device is also used for: In response to a reset operation applied to the network device, the gateway protocol information is loaded from a pre-built configuration database, wherein the configuration database is pre-configured with a protection mechanism; using the gateway protocol information as an index parameter, a network entry containing the gateway protocol information is searched from a preset storage location; a tunnel label corresponding to the gateway protocol information is extracted from the searched network entry; the extracted tunnel label is sent to the forwarding plane of the network device so that the forwarding plane updates the tunnel label; and an update message for the tunnel label is generated and broadcast in the network link.
[0093] Furthermore, the above-mentioned device is also used for: The system responds to an update message for the tunnel label broadcast by a target network device; wherein the target network device is a network device whose tunnel label in the network link has been updated; the system extracts the tunnel label recorded in the update message; and distributes the tunnel label to the forwarding plane of the network device so that the forwarding plane updates the tunnel label.
[0094] Furthermore, the step of sending the tunnel label to the forwarding plane of the network device so that the forwarding plane updates the tunnel label includes: searching the network entry corresponding to the target network device in the network entries stored in the preset storage location through the forwarding plane; determining whether the tunnel label recorded in the found network entry is consistent with the tunnel label recorded in the update message; if not, updating the tunnel label in the network entry to the tunnel label recorded in the update message.
[0095] The tunnel tag processing device provided in this embodiment of the invention has the same technical features as the tunnel tag processing method provided in the above embodiments, so it can also solve the same technical problems and achieve the same technical effects.
[0096] Furthermore, embodiments of the present invention also provide a network device, the controller of which is configured with the aforementioned tunnel tag processing device.
[0097] Furthermore, embodiments of the present invention also provide an electronic device, including 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 steps of the above method.
[0098] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the above-described method.
[0099] Furthermore, embodiments of the present invention also provide a schematic diagram of the structure of an electronic device, such as... Figure 5 The diagram shows the structure of the electronic device, which includes a processor 51 and a memory 50. The memory 50 stores computer-executable instructions that can be executed by the processor 51, and the processor 51 executes the computer-executable instructions to implement the above-described method.
[0100] exist Figure 5 In the illustrated embodiment, the electronic device further includes a bus 52 and a communication interface 53, wherein the processor 51, the communication interface 53, and the memory 50 are connected via the bus 52.
[0101] The memory 50 may include high-speed random access memory (RAM) and may also include 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 53 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 52 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 52 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0102] Processor 51 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 processor 51 or by instructions in software form. Processor 51 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 Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can 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 the memory, and the processor 51 reads the information in the memory and uses its hardware to complete the aforementioned method.
[0103] The computer program product of the tunnel tag processing method, apparatus and network device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0104] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0105] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0106] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0107] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0108] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for processing tunnel tags, characterized in that, Applied to network devices, the method includes: In response to a label allocation operation performed on a network device, a tunnel label corresponding to the label allocation operation is obtained, wherein the tunnel label is used to characterize the adjacency label between two adjacent network devices in a network link; Generate network entries containing the tunnel tags according to the pre-configured association group format; Save the network entry to a preset storage location; and, The assigned tunnel label is distributed to the forwarding plane of the network device to publish the tunnel label.
2. The method according to claim 1, characterized in that, The step of generating network entries containing the tunnel tags according to a pre-configured association group format includes: Obtain the pre-configured gateway protocol information of the network device, wherein the gateway protocol information includes at least the network interface of the network device and the IP address corresponding to the network interface; The gateway protocol information and the tunnel label are assembled according to a pre-configured association group format to obtain a network entry containing the tunnel label.
3. The method according to claim 2, characterized in that, The network entry includes the tunnel tag assembled sequentially according to the association group format, the outgoing port identifier of the network interface, and the next-hop IP address adjacent to the network device.
4. The method according to claim 1, characterized in that, The method further includes: Before responding to a label assignment operation performed on a network device, a configuration operation for the gateway protocol of the network device is responded to; wherein the configuration operation is used to configure the gateway protocol information of the gateway protocol; Configure the gateway protocol of the network device based on the gateway protocol information corresponding to the configuration operation; and Enable the segment routing (SR) function on the network device.
5. The method according to claim 2, characterized in that, The method further includes: In response to a reset operation applied to the network device, the gateway protocol information is loaded from a pre-built configuration database; wherein the configuration database is pre-configured with a protection mechanism. Using the gateway protocol information as an index parameter, search for a network entry containing the gateway protocol information from the preset storage location; Extract the tunnel tag corresponding to the gateway protocol information from the found network entries; The extracted tunnel label is sent to the forwarding plane of the network device so that the forwarding plane updates the tunnel label; and, An update message for the tunnel label is generated and broadcast on the network link.
6. The method according to claim 5, characterized in that, The method further includes: The system responds to receiving an update message for the tunnel tag broadcast by the target network device; wherein the target network device is a network device whose tunnel tag in the network link has been updated. Extract the tunnel tag recorded in the update message; The tunnel label is sent to the forwarding plane of the network device so that the forwarding plane can update the tunnel label.
7. The method according to claim 6, characterized in that, The step of sending the tunnel label to the forwarding plane of the network device so that the forwarding plane updates the tunnel label includes: The forwarding plane is used to locate the network entry corresponding to the target network device recorded in the network entry stored at the preset storage location; Determine whether the tunnel tag recorded in the found network entry is consistent with the tunnel tag recorded in the update message; If not, update the tunnel label in the network entry to the tunnel label recorded in the update message.
8. A processing device for tunnel tags, characterized in that, Applied to network devices, the device includes: A response module is used to respond to a label allocation operation performed on a network device and obtain a tunnel label corresponding to the label allocation operation, wherein the tunnel label is used to characterize the adjacency label between two adjacent network devices in a network link; The generation module is used to generate network entries containing the tunnel tags according to a pre-configured association group format; A storage module is used to save the network entries to a preset storage location; and, The publishing module is used to distribute the allocated tunnel label to the forwarding plane of the network device to publish the tunnel label.
9. A network device, characterized in that, The controller of the network device is configured with the tunnel tag processing device as described in claim 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, performs the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Label distribution method and device
CN110191055A
Tunnel establishment method, device and system
CN110417651A
Transmission path fault processing method, device and system
CN110661700A
Link label distribution method and device, network equipment and readable storage medium
CN111935016A
Data forwarding method and device, electronic equipment and storage medium
CN119697102A