Method, apparatus and network device for processing tunnel label
By generating and storing network entries with tunnel tags in network devices, the problem of interruption caused by tunnel tag changes when network devices are reset is solved, achieving fast network link convergence and improved communication quality.
Patent Information
- Application Number
- CN202511384597.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-09-26
AI Technical Summary
In existing network systems, dynamic changes in tunnel tags during network device resets can cause network link interruptions, leading to communication anomalies. Existing backup path configurations are complex and may increase downtime, impacting user experience.
In network devices, in response to label assignment operations, network entries for tunnel labels are generated and saved, and then distributed to the forwarding plane. Tunnel labels are stored and updated using a pre-configured association group format to ensure rapid lookup and updating of tunnel labels when the device is reset.
It effectively avoids network link interruptions, improves the rapid convergence speed of network links, reduces communication interruption time, and enhances user experience.
Smart Images

Figure CN120880835B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network communication, and in particular to a tunnel label processing method and device and network equipment. BACKGROUND
[0002] Generally, a network system is composed of multiple network devices, each of which is configured with a preset network protocol, and the network devices and the network devices can exchange routing information, and a controller of the network system can further configure the network devices to form network links and perform data forwarding.
[0003] Generally, the network system or the network link needs to be regularly maintained and updated to adapt to the development needs of the business.
[0004] Further, in the network system, each network device can be regarded as a node or a network element. During the operation of the network system, the node sometimes needs to be reset, or the reset process is required due to some faults, and the reset operation often causes the protocol of the network device at the control level to change, thereby causing the original network link to be interrupted and the network to be disconnected.
[0005] To avoid communication abnormalities caused by network disconnection, generally, the network system configures a backup path for the formed network link, such as constituting a hot standby (HSB), but this additional backup path may increase or limit the possibility of operation and application, such as: the configuration is more complex; and the path corresponding to each network link needs to be configured with BFD (Bidirectional Forwarding Detection) detection technology, so as to perform BFD detection when the current network link is switched to the backup link, which generally lasts for several tens or even several hundreds of milliseconds of network interruption.
[0006] For the business, this is a relatively long interruption time, and considering the running time limit of the business, some businesses cannot configure the BFD detection technology for simplicity or may be limited by the device port resources, and in this case, the HSB protection cannot be configured.
[0007] Therefore, it is more likely to cause the network link to be interrupted, thereby causing the network to be disconnected, and reducing the user experience. SUMMARY
[0008] Therefore, the present application provides a tunnel label processing method, device and network equipment to alleviate the above technical problems.
[0009] In a first aspect, an embodiment of the present application provides a tunnel label processing method applied to a network device, the method comprising: in response to a label allocation operation acting on the network device, obtaining a tunnel label corresponding to the label allocation operation, wherein the tunnel label is used to represent an adjacent 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 issuing the allocated tunnel label to a forwarding plane of the network device to publish the tunnel label.
[0010] With reference to the first aspect, in a first possible implementation manner of the first aspect, the step of generating the network entry containing the tunnel label according to the pre-configured association group format comprises: obtaining pre-configured gateway protocol information of the network device, wherein the gateway protocol information at least includes a network interface of the network device and an IP address corresponding to the network interface; and assembling the gateway protocol information and the tunnel label according to the pre-configured association group format to obtain the network entry containing the tunnel label.
[0011] With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the network entry comprises the tunnel label, an out port identifier of the network interface and a next hop IP address adjacent to the network device, which are sequentially assembled according to the association group format.
[0012] With reference to the first aspect, in a third possible implementation manner of the first aspect, the method further comprises: before the step of responding to the label allocation operation acting on the network device, responding to a configuration operation of a gateway protocol of 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 starting a segment routing (SR) function of the network device.
[0013] With reference to the first possible implementation manner of the first aspect, the present embodiment provides a fourth possible implementation manner of the first aspect, and the method further comprises: loading the gateway protocol information from a pre-constructed configuration database in response to a reset operation acting on the network device; wherein the configuration database is pre-configured with a protection mechanism; searching for a network entry containing the gateway protocol information from the preset storage location with the gateway protocol information as an index parameter; extracting a tunnel label corresponding to the gateway protocol information from the searched network entry; issuing the extracted tunnel label to a forwarding plane of the network device, so that the forwarding plane updates the tunnel label; and generating an update packet of the tunnel label, and broadcasting the update packet in the network link.
[0014] With reference to the fourth possible implementation manner of the first aspect, the present embodiment provides a fifth possible implementation manner of the first aspect, and the method further comprises: extracting the tunnel label recorded in the update packet in response to receiving the update packet of the tunnel label broadcast by a target network device; wherein the target network device is a network device with an updated tunnel label in the network link; issuing the tunnel label to a forwarding plane of the network device, so that the forwarding plane updates the tunnel label.
[0015] With reference to the fifth possible implementation manner of the first aspect, the present embodiment provides a sixth possible implementation manner of the first aspect, and the step of issuing the tunnel label to the forwarding plane of the network device, so that the forwarding plane updates the tunnel label, comprises: searching for the network entry corresponding to the target network device recorded in the network entry stored in the preset storage location through the forwarding plane; judging whether the tunnel label recorded in the searched network entry is consistent with the tunnel label recorded in the update packet; and if not, updating the tunnel label in the network entry to the tunnel label recorded in the update packet.
[0016] In the second aspect, the present embodiment further provides a tunnel label processing apparatus applied to a network device, and the apparatus comprises: a response module configured to acquire a tunnel label corresponding to a label allocation operation acting on the network device in response to the label allocation operation, wherein the tunnel label is used to represent an adjacent 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 saving module configured to save the network entry to a preset storage location; and a publishing module configured to issue the allocated tunnel label to a forwarding plane of the network device, so as to publish the tunnel label.
[0017] In a third aspect, the embodiments of the present application further provide a network device, a controller of the network device being configured with the tunnel label processing apparatus of the second aspect.
[0018] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed by a processor to perform the method of the first aspect.
[0019] The embodiments of the present application have the following beneficial effects:
[0020] The tunnel label processing method, apparatus and network device provided by the embodiments of the present application can respond to a label allocation operation acting on the network device, obtain a tunnel label corresponding to the label allocation operation, generate a network entry containing the tunnel label according to a preconfigured association group format, save the network entry to a preset storage location, and issue the allocated tunnel label to a forwarding plane of the network device to publish the tunnel label. Since the network entry containing the tunnel label is stored when the tunnel label is allocated, the tunnel label can be quickly found from the preset storage location when a reset operation occurs on the network device, which helps the network link converge quickly and effectively avoids the problem of poor communication quality caused by too long interruption time, thereby improving user experience.
[0021] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application will be realized and achieved by means of the structures particularly pointed out in the description and the appended claims.
[0022] In order to make the above objectives, characteristics and advantages of the present application more apparent and easy to understand, the following preferred embodiments are specifically described below, and the accompanying drawings are referred to for detailed description. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0024] Figure 1 is a schematic diagram of a network system;
[0025] Figure 2 is a flowchart of a tunnel label processing method provided by the embodiments of the present application;
[0026] Figure 3Another schematic diagram of a network system provided by an embodiment of the present application is shown in FIG. 2.
[0027] Figure 4 A structural schematic diagram of a tunnel label processing device provided by an embodiment of the present application is shown in FIG. 3.
[0028] Figure 5 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 4. DETAILED DESCRIPTION
[0029] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be described below in detail with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0030] Segment Routing (SR) is a technical architecture for forwarding data packets on a network based on the concept of source routing. SR-MPLS is a new MPLS (Multi-Protocol Label Switching) technology, in which the control plane is implemented based on IGP (Interior Gateway Protocol) routing protocol extension, and the forwarding plane is implemented based on MPLS forwarding network, and the corresponding segment routing SR is presented as a label in the forwarding plane. SR-MPLS technology includes SR-MPLS BE (Best Effort) and SR-MPLS TE (Traffic Engineering). Among them, SR-MPLS BE is to diffuse SID (Segment ID) according to IGP, and use SID to guide network equipment to perform data forwarding based on the shortest path, without specifying a specific path, so it is also called best effort tunnel, and SR-MPLS TE is to diffuse SID based on IGP, and use multiple SIDs at the source node to guide data forwarding. This working mechanism makes certain constraints on data forwarding, thereby meeting the needs of traffic engineering.
[0031] The tunnel label processing method provided by the embodiments of the present application is developed for SR-MPLS TE, and SR-TE tunnel is used to refer to SR-MPLS TE hereinafter.
[0032] Among them, the following describes the concepts involved in the embodiments of the present application, including:
[0033] SID (Segment ID), also known as segment ID value, based on the perspective of data plane forwarding, there are currently two types, one is to use MPLS Label (MPLS label) as SID value, and based on MPLS forwarding plane to guide data forwarding; the other is to use the value of IPv6 address format as SID value, and based on IPv6 routing to guide data forwarding, applied in the scene of SRv6.
[0034] Among them, in the embodiment of the application, the application background based on MPLS Label as SID value.
[0035] Adjacency label, also known as Adj SID (Adjacency Segment ID), is the segment ID value between two sites, wherein the site usually represents the layout of network equipment, which is a basic unit in the network system, and can be a physical location or equipment such as router, switch, etc., used for connecting and forwarding data. For example, in the network system, network devices PE1 and PE2 can be used as sites, and PE1 and PE2 are directly connected to form two unidirectional Adj SID values (Adj SID1 in the direction of PE1 to PE2 and Adj SID2 in the direction of PE2 to PE1). This Adj SID value can be statically assigned or dynamically generated by IGP. Generally, Adj SID value is in a certain configured range, such as 16 ~ 102400 interval, so that the value of Adj SID statically assigned or dynamically assigned falls within 16 to 102400. SR-TE tunnel mainly uses adjacency label to guide traffic forwarding.
[0036] Label stack, also known as or SID List, is a collection of label ordering, used to represent a complete LSP (Label Switching Path, LSP for short) path. Each Adj SID in the label stack identifies a specific link, and the entire label stack identifies all links of the entire LSP path from the top of the stack to the bottom of the stack. In the process of packet forwarding, the corresponding link is found according to the Adj SID at the top of the label stack, and the label is popped out and forwarded, until all Adj SIDs in the label stack are popped out, and the entire LSP path is completed, finally reaching the destination of SR-TE tunnel.
[0037] The configuration of SR-TE tunnel, the configuration mode of SR-TE tunnel generally includes: CLI (Command Line Interface, command line configuration, CLI for short) command line configuration and controller configuration. No matter which way to configure, the Adj SID used in SR-TE tunnel needs to be configured in advance or dynamically allocated by IGP.
[0038] Among them, the controller mode is mainly taken as an example to illustrate the configuration process in the embodiment of the application.
[0039] In order to facilitate understanding, Figure 1 A schematic diagram of a network system is shown, including a plurality of network devices PE1, PE2, and P1-P4; wherein, Figure 1 Among them, the red arrow represents the SR-TE tunnel path propagation direction; the blue dashed arrow represents the reporting process, such as reporting label information and topology information; the yellow arrow represents the issuing process, such as issuing a label stack to the source node and the like.
[0040] Based on Figure 1 The network system shown below is the configuration process of the SR-TE tunnel, including:
[0041] (1) IS-IS configuration, IS-IS (Intermediate System to Intermediate System) is a link state routing protocol, mainly used for exchange of routing information within a large network (especially the backbone network of an operator).
[0042] In the embodiment of the application, the ISIS SR extension capability is configured on each network device to support each other to establish an ISIS neighbor. For an ISIS instance with SR capability, the ISIS protocol interface enabled is assigned an SR adjacency label, that is, the Adj SID described above. The adjacency label is extended through the SR protocol of ISIS and flooded to the entire network system. As shown above Figure 1 Taking the PE1 node as an example, the ISIS label assignment process is as follows:
[0043] A. The ISIS protocol of PE1 applies a local dynamic label for all its links, for example: the adjacency label assigned to the link PE1->P1 of PE1 is 100, the adjacency label assigned to PE1->P3 is 101, and other network devices are set in a similar manner;
[0044] B. The ISIS protocol of PE1 publishes the adjacency label and floods it to the entire network system, so that other network devices in the network system can see the information of the adjacency label assigned by PE1. Similarly, the Adj SID assigned by the ISIS protocol of other network devices will also be learned by PE1;
[0045] C. The label forwarding table item corresponding to the Adj SID is generated on PE1:
[0046] { Adj SID =100, outport=eth1 / 1, nexthop=P1},
[0047] { Adj SID =101, outport=eth1 / 2, nexthop=P3},
[0048] 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.
[0049] 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.
[0050] (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.
[0051] (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.
[0052] Table 1:
[0053]
[0054] The above describes the controller configuration method for SR-TE tunnels. The general steps for CLI command-line configuration are as follows:
[0055] Configure IS-IS related information, such as L3 interface and IP address, configure IS-IS related attributes. Each network device needs to be configured, after the configuration is completed, the network devices in the network system can form neighbors with each other.
[0056] Enable the SR MPLS extension capability of IS-IS, so that the IS-IS protocol will dynamically allocate an adjacency label for each link interface corresponding IP address;
[0057] After the above configuration, the ISIS neighbor forms a link on the PE1 node for the interface eth1 / 1 (ip=1.1.1.1) and dynamically allocates a value of an adjacency label. Other network devices are also configured in a similar manner.
[0058] After configuring the SR-TE tunnel to the source node PE1 through the controller controller or CLI command line, the data packet will pop out the adjacency label Adj SID hop by hop along the label stack path, and finally reach the destination site PE2. For example Figure 1 The network link and the corresponding adjacency label pop-out situation of PE1->P1->P2->PE2.
[0059] When the network is in operation, sometimes it is necessary to reset the IGP process for the node to upgrade the IGP software or reset the IGP process due to some kind of fault. If it is still operated in the existing way, it is very likely to cause the forwarding interruption of SR-TE tunnel or slow route convergence.
[0060] The following will explain the existing configuration mode under the condition of SR-TE tunnel forwarding path interruption service:
[0061] Based on Figure 1The 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.
[0062] 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.
[0063] 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...
[0064]
[0065] Updated to
[0066]
[0067] 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.
[0068] In the prior art, for such a fault, a backup path of an SR-TE tunnel is generally configured to form an HSB (Hot Stand By) protection, and a BFD (Bidirectional Forwarding Detection) needs to be configured on each SR-TE tunnel path to detect the on-off of the path, so as to accelerate the switching of the service. When the main path BFD detects a fault, the HSB protection is triggered to switch to the backup SR-TE tunnel path in advance, so as to reduce the fault interruption time in this way.
[0069] However, such a way may increase or limit the operation and application possibilities, for example: the configuration is complex, the main and backup SR-TE tunnel paths must be configured, and the BFD detection must be configured on each SR-TE tunnel. The shortest period of the BFD detection is 3.3 ms, and the interruption time is at least 3*3.3 ms. In addition, for the customer, it is also a limitation to configure a protection for running a service. The customer may not be able to configure the protection due to the limitation of the device port resources, and in this case, the HSB protection cannot be configured.
[0070] Based on the above analysis and problems encountered, the embodiment of the present application proposes a tunnel label processing method, device and network equipment, which can solve the above service interruption problem, and further simplifies the configuration and operation and maintenance difficulty for the user.
[0071] In order to facilitate the understanding of the embodiment, first, a tunnel label processing method disclosed by the embodiment of the present application is introduced in detail.
[0072] In a possible implementation manner, the embodiment of the present application provides a tunnel label processing method, which is applied to a network equipment, such as Figure 1 PE1, PE2 in FIG. 1, and any one of P1-P4, and the network equipment element can be a router, an L3 switch or any network equipment supporting SR-TE tunnel and SR routing. The actual use is specific, and the embodiment of the present application does not limit this.
[0073] Further, Figure 2 A flowchart of a tunnel label processing method is shown, which includes the following steps:
[0074] Step S202, in response to a label allocation operation acting on the network equipment, acquiring a tunnel label corresponding to the label allocation operation;
[0075] In the embodiment of the present application, the tunnel label is used to represent the adjacency label between two adjacent network equipments in the network link, that is, the Adj SID.
[0076] Further, the label allocation operation in the embodiment of the present application is actually a dynamic allocation process, such as the process of dynamically allocating Adj SID corresponding to a link by an ISIS process, which can respond and obtain the Adj SID dynamically allocated by the ISIS process.
[0077] In step S204, a network entry containing the tunnel label is generated according to a pre-configured association group format.
[0078] In step S206, the network entry is saved to a preset storage location.
[0079] In step S208, the allocated tunnel label is issued to a forwarding plane of the network device to publish the tunnel label.
[0080] In actual use, after the ISIS process dynamically allocates Adj SID, a network entry similar to {Adj SID = 100, outport = eth1 / 1, nexthop = 1.1.1.2} is generated, that is, a label forwarding table entry corresponding to the Adj SID is generated. Therefore, in the embodiment of the present application, by storing the network entry, the stored network entry can be quickly found when the process is reset or the node is restarted, and the previously allocated Adj SID can be found, thereby avoiding the problem of service interruption caused by dynamically allocating a new Adj SID.
[0081] Therefore, the processing method for the tunnel label provided in the embodiment of the present application can respond to the label allocation operation acting on the network device, obtain the tunnel label corresponding to the label allocation operation, generate a network entry containing the tunnel label according to a pre-configured association group format, save the network entry to a preset storage location, and issue the allocated tunnel label to a forwarding plane of the network device to publish the tunnel label. Since the network entry containing the tunnel label is stored when the tunnel label is allocated, the tunnel label can be quickly found from the preset storage location when the network device is reset, which helps the network link converge quickly and effectively avoids the problem of poor communication quality caused by too long interruption time, thereby improving user experience.
[0082] In actual use, in the embodiment of the present application, the dynamically allocated adjacency label and the network attribute of the related link are stored, and then the SR-TE tunnel route converges quickly after the network device is reset, and even the SR-TE route service will not be interrupted when the IGP process is reset.
[0083] Further, in order to facilitate understanding, the following describes the hierarchical framework of the network device, specifically, the hierarchical framework of the network device includes the management and control layer, the upper application layer, the service logic and the protocol control layer, the hardware adaptation layer, the driver layer, the system layer and the physical hardware chip.
[0084] Among them, the function of the management and control layer is generally run on an independent server or PC computer, and the functions of other layers are generally run on the network device. When the user configures the L3 port related content, the ISIS protocol content, the SR-TE tunnel content and other configuration information, the configuration information is generally stored in the database to achieve the purpose of saving the configuration after power failure or resetting the device. The adjacency label is dynamically allocated by the IGP routing protocol of the routing protocol stack, and will not be stored in the database. When the IGP routing protocol successfully establishes a direct neighbor, the SR routing is issued to the data plane, such as the hardware adaptation layer, the driver layer, and the physical hardware chip. This means that the adjacency label dynamically allocated by the prior art will not be saved after power failure or resetting the network device.
[0085] In the embodiment of the present application, after the network device allocates the tunnel label, the network entry containing the tunnel label can be generated according to the preconfigured association group format, and the network entry can be saved to the preset storage location, so that the tunnel label can be stored.
[0086] In addition, in the embodiment of the present application, the above-mentioned preset storage location can be a database, a file, a flash memory or other storage methods that do not lose data after power failure or resetting. The specific setting can be made according to the actual use, and the embodiment of the present application does not limit this.
[0087] Further, in order to facilitate understanding, the following describes the process of dynamically allocating the adjacency label by IGP and completing the storage as an example to further describe the processing method of the tunnel label provided by the embodiment of the present application. The processing flow is for all network devices configured with IGP (such as ISIS protocol) and enabled with SR extended protocol, such as each network device in the above-mentioned Figure 1 The configuration process includes the following parts:
[0088] (1) Configure the IGP related content, including: L3 interface and interface IP address, IGP protocol instance and other basic configurations;
[0089] (2) Configure the SR extension of IGP. Only the SR of IGP is enabled, the corresponding tunnel label can be allocated for the network link;
[0090] In actual use, the processes of (1) and (2) above are usually implemented before the tunnel label is allocated, that is, before responding to the label allocation operation on the network device, the configuration operation on the gateway protocol of the network device is responded to first; wherein the configuration operation is used to configure the gateway protocol information of the gateway protocol, that is, the IGP related content in (1) above is configured, and 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, that is, the process of enabling the SR function in (2) above. After the above configuration process is completed, the IGP dynamically allocates the adjacency label.
[0091] (3) IGP dynamically allocates the adjacency label, that is, Adj SID, for subsequent SR route advertisement and local forwarding face;
[0092] (4) The value of the adjacency label, that is, Adj SID, is stored in the database according to the association group, to ensure that the dynamically allocated adjacency label is not discarded when the network device is restarted or the IGP process is restarted.
[0093] Among them, (4) corresponds to the process of step S204, that is, the network entry containing the tunnel label is generated according to the preconfigured association group format, specifically, the gateway protocol information of the network device can be obtained in advance, wherein the gateway protocol information at this time at least includes 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 preconfigured association group format, to obtain the network entry containing the tunnel label.
[0094] Specifically, in the embodiment of the application, the network entry includes the tunnel label, the out port identifier of the network interface and the next hop IP address adjacent to the network device, which are assembled in the association group format.
[0095] That is, the specific association group format can be in the form of a three-tuple as follows:
[0096] { Adj SID field; OutPort out port; adjacent next hop IP address};
[0097] Among them, the Adj SID field is used to store the tunnel label, that is, the Adj SID value, which is dynamically allocated by the IGP;
[0098] The OutPort out port and the adjacent interface next hop IP address are values configured and issued by the user, which can be used as key values when managing the preset storage location later, for example, the corresponding Adj SID value can be queried in the database according to the key value.
[0099] (5) The allocated tunnel label is sent to the chip of the forwarding plane, and is used for subsequent packet forwarding based on the chip process.
[0100] In actual use, the storage process of the tunnel label can ensure that the previously dynamically allocated adjacency label is not discarded after the network device is reset or restarted. In order to facilitate understanding, the processing process of the tunnel label after the network device is reset or the IGP process is reset is taken as an example for illustration, including the following processes:
[0101] (1) In response to the reset operation acting on the network device, the gateway protocol information is loaded from the pre-constructed configuration database; wherein the configuration database is pre-configured with a protection mechanism;
[0102] In actual use, the user can reset the entire network device or reset the IGP process according to the needs. Specifically, the user can issue a reset command through a CLI command or a controller, at this time, the network device can respond and load the IGP related configuration information from the configuration database, including: L3 interface and interface IP address, IGP protocol instance and other basic configurations. Wherein, the configurations of the configuration database are reset or power-off saved, so when reset or power-off, the gateway protocol information that has been configured can be saved.
[0103] (2) The network entry containing the gateway protocol information is found from the preset storage location with the gateway protocol information as an index parameter;
[0104] (3) The tunnel label corresponding to the gateway protocol information is extracted from the found network entry;
[0105] Specifically, since the network entry containing the tunnel label generated in the pre-configured association group format has been stored in the preset storage location in the foregoing response label allocation operation process, at this time, the network entry can be found with the gateway protocol information as an index parameter.
[0106] For example, the Adj SID value stored in the preset storage location is taken as an index parameter with the OutPort egress port and the adjacency interface next hop IP address two key values.
[0107] (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,
[0108] (5) An update packet of the tunnel label is generated, and the update packet is broadcasted in the network link.
[0109] Specifically, after the Adj SID value is distributed to the forwarding plane, if it is a scenario that a user resets the network device, then the Adj SID value will be added to the chip of the forwarding plane again; and if the user resets the IGP process, since the forwarding plane is not reset, it is not necessary to add or update again, and the actual use is subject to the actual use, and the embodiment of the application does not limit this.
[0110] Further, in addition to the above-mentioned scenario that the network device itself restarts or resets to ensure that the previously dynamically allocated adjacency label is not discarded, in the embodiment of the application, for a network device that is not reset or restarted, when the tunnel label sent by other network devices changes due to the restart or reset of other network devices, the segment routing SR can also be quickly converged to avoid long network interruption. Specifically, the following takes the processing process of a non-reset network device after receiving the SR routing information of a reset network device as an example for illustration, including the following processes:
[0111] (1) In response to receiving the update packet of the tunnel label broadcast by the target network device, the tunnel label recorded in the update packet is extracted.
[0112] Among them, the target network device in the embodiment of the application is a network device whose tunnel label is updated in the network link; for example, after the target network device performs reset or restart, it will eventually cause the IGP protocol packet to be announced to inform other network devices in the network system that the segment routing SR of the target network device has been updated; and after the other network devices receive the IGP protocol packet, they can respond to extract the tunnel label.
[0113] (2) The tunnel label is distributed to the forwarding plane of the network device to update the tunnel label for the forwarding plane.
[0114] In actual use, after the network device receives the IGP protocol packet, the local SPF (Shortest Path First) algorithm calculates the optimal route, which can be announced to the controller contoller through BGP-LS on one hand, and the controller contoller further updates the changed routing information to the network device, and on the other hand, the network device can directly update the local SR route.
[0115] Among them, the process of updating the tunnel label for the forwarding plane actually updates the segment routing SR, mainly the embodiment of the adjacency label Adj SID in the chip of the forwarding plane; and the forwarding plane can judge whether the Adj SID has been distributed, and if it has been distributed, it is not necessary to update again.
[0116] Specifically, the network entry corresponding to the target network device recorded in the network entry stored in the preset storage location can be found through the chip of the forwarding plane; it is judged 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.
[0117] In actual use, the segment routing based on SR-TE and further SR-Policy segment routing has network programming capability of SR, and exhibits good service carrying capacity and network protection capacity under the support of IGP protocol.
[0118] Generally, for SR-TE tunnels, most of them are generated based on the Adj SID mode, including static mode and dynamic mode. Among them, the static mode of configuring Adj SID needs to plan and specify specific Adj SID values in advance, which increases the configuration amount of users. The dynamic mode does not need the user to specify the specific value of Adj SID, but dynamically allocates the Adj SID value by IGP, which provides a certain convenience for user configuration. However, the dynamic configuration mode may cause the re-allocation of Adj SID due to route change, thereby causing slow SR route convergence speed, and even causing long single-tunnel service interruption time and other problems. The tunnel label processing method provided in the embodiment of the present application can save the dynamically allocated Adj SID value, ensure that the Adj SID value does not change dynamically when power failure or reset, thereby greatly accelerating the route convergence, and even achieving the goal of no interruption of SR-TE tunnel service in the single SR-TE tunnel scenario when resetting the IGP process.
[0119] Further, in order to facilitate understanding, Figure 3 A schematic diagram of another network system is shown to further illustrate the tunnel label processing process in the embodiment of the present application. Among them, the red arrow represents the SR-TE tunnel path propagation direction; the yellow arrow represents the configuration issuing process.
[0120] In actual use, Figure 3In the shown topology, all network devices perform the tunnel label processing provided in the embodiments of the present application, such as configuring interfaces, interface IP, ISIS, and other basic configuration contents for each network device, as shown by the yellow dashed arrows in the figure, which exemplifies PE1, P1, and P2, and other devices P3, P4, and PE2 are similar. After the configuration is completed, each network device stores the network entries containing the tunnel label in the respective preset storage location, such as saving the following associated group in the form of a triple in the preset database, which exemplifies PE1, 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}.
[0121] It can be seen that two network entries are generated on PE1 because SR is enabled on the out ports of the two network interfaces Eth1 / 1 and Eth1 / 2, and are stored in the preset database.
[0122] After the label stack of the Adj SID is configured on the source node PE1 through the controller controller or the CLI command, an SR-TE tunnel path in the direction of PE1 -> P1 -> P2 -> PE2 is formed, and when the message iterates to the SR-TE tunnel, the outer Adj SID is popped out along the path site by hop, and finally the message is sent to the destination device PE2. The configured label stack of the Adj SID is as follows:
[0123]
[0124] When the user needs to reset the network elements (network devices) or IGP processes on the path because of upgrade maintenance, such as resetting the P2 site or the IGP process in the P2 site, the P2 site will respond to the reset operation, and after the P2 is reset, the network entry containing the gateway protocol information can be found from the preset storage location by taking the gateway protocol information as an index parameter; and the tunnel label corresponding to the gateway protocol information is extracted, that is, the previously allocated Adj SID is found, so that the specific Adj SID value of the Adj SID of the P2 after being reset is still the value saved in the preset database before, that is Figure 3{ Adj SID =400,outport=eth1 / 1, nexthop=5.5.5.2}, so the Adj SID value does not change before resetting, and for the scenario of resetting the IGP process, the Adj SID value is not changed when it is issued to the forwarding plane, which does not cause the service flow to be interrupted in the P2 node; and for the scenario of resetting the entire site of the P2, the forwarding plane is also reset, so the previously stored Adj SID value is reissued to the chip of the forwarding plane.
[0125] In addition, the P2 site not only issues the Adj SID value to the local forwarding plane, but also notifies the remote network device, for example, the P2 site broadcasts the update message of the tunnel label to the PE1 source node, at this time, the PE1 receives the update message containing the Adj SID value and can respond, if the tunnel label, that is, the Adj SID value advertised by the P2 is consistent before and after resetting, then the Adj SID value received by the PE1 is also unchanged, so the PE1 does not need to update the chip of the forwarding plane additionally, thereby shortening the convergence speed of the SR route, and not affecting the normal forwarding of the existing service, thereby reducing the action of updating the adjacency label in the SR route of the forwarding plane, and accelerating the route convergence speed.
[0126] It should be understood that in the embodiments of the present application, the IGP protocol is ISIS, and in other embodiments, it can be an internal gateway protocol such as OSPF (Open Shortest Path First, Open Shortest Path First), which can implement the transmission of Adj SID or SR route; and the chip of the data forwarding plane of the network device can be an ASIC (Application Specific Integrated Circuit) chip, or other hardware platform implementation modes supporting SR-TE tunnel forwarding, including FPGA (Field-Programmable Gate Array, Programmable Logic Chip), NP (Network Processor), and programmable switching chip P4 (Programming Protocol-independent Packet Processors), etc., and the specific actual use is subject to the actual use, and the embodiments of the present application do not limit the same.
[0127] Further, on the basis of the above-mentioned embodiments, the embodiments of the present application further provide a tunnel label processing device applied to a network device, such as Figure 4 As shown in a structural schematic diagram of a tunnel label processing device, the device comprises:
[0128] The response module 40 is configured to, in response to a label allocation operation acting on the network device, acquire a tunnel label corresponding to the label allocation operation, wherein the tunnel label is used to represent an adjacent label between two adjacent network devices in a network link.
[0129] The generation module 42 is configured to generate a network entry containing the tunnel label in a preconfigured association group format.
[0130] The storage module 44 is configured to store the network entry to a preset storage location.
[0131] The publishing module 46 is configured to issue the allocated tunnel label to a forwarding plane of the network device to publish the tunnel label.
[0132] Further, the step of generating the network entry containing the tunnel label in the preconfigured association group format comprises: acquiring gateway protocol information of the network device preconfigured, wherein the gateway protocol information at least includes a network interface of the network device and an IP address corresponding to the network interface; and assembling the gateway protocol information and the tunnel label in the preconfigured association group format to obtain the network entry containing the tunnel label.
[0133] Further, the network entry comprises the tunnel label, an out port identifier of the network interface and a next hop IP address adjacent to the network device, which are sequentially assembled in the association group format.
[0134] Further, the apparatus is further configured to:
[0135] Before the response to the label allocation operation acting on the network device, the apparatus is further configured to: in response to a configuration operation of a gateway protocol of the network device; wherein the configuration operation is used to configure 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 start a segment routing (SR) function of the network device.
[0136] Further, the apparatus is further configured to:
[0137] In response to a reset operation acting on the network device, the gateway protocol information is loaded from a pre-constructed configuration database; wherein the configuration database is pre-configured with a protection mechanism; the network entry containing the gateway protocol information is searched from the preset storage location with the gateway protocol information as an index parameter; the tunnel label corresponding to the gateway protocol information is extracted from the searched network entry; the extracted tunnel label is issued to the forwarding plane of the network device, so that the forwarding plane updates the tunnel label; and an update message of the tunnel label is generated, and the update message is broadcasted in the network link.
[0138] Further, the device is further used for:
[0139] In response to receiving the update message of the tunnel label broadcasted by the target network device; wherein the target network device is a network device with an updated tunnel label in the network link; the tunnel label recorded in the update message is extracted; and the tunnel label is issued to the forwarding plane of the network device, so that the forwarding plane updates the tunnel label.
[0140] Further, the step of issuing the tunnel label to the forwarding plane of the network device, so that the forwarding plane updates the tunnel label, comprises: searching the network entry corresponding to the target network device recorded in the network entry stored in the preset storage location through the forwarding plane; judging whether the tunnel label recorded in the searched network entry is consistent with the tunnel label recorded in the update message; and if not, updating the tunnel label in the network entry to the tunnel label recorded in the update message.
[0141] The tunnel label processing device provided by the embodiment of the application has the same technical features as the tunnel label processing method provided by the above embodiment, and can solve the same technical problem and achieve the same technical effect.
[0142] Further, the embodiment of the application further provides a network device, and a controller of the network device is configured with the tunnel label processing device.
[0143] Further, the embodiment of the application further provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above method when executing the computer program.
[0144] The embodiment of the application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executable on the processor to execute the steps of the above method.
[0145] Further, the embodiment of the present application further provides a structural schematic diagram of an electronic device, as shown in the figure, which is a structural schematic diagram of the electronic device, wherein the electronic device comprises a processor 51 and a memory 50, the memory 50 stores computer executable instructions capable of being executed by the processor 51, and the processor 51 executes the computer executable instructions to realize the method. Figure 5
[0146] In the embodiment shown in the figure, the electronic device further comprises a bus 52 and a communication interface 53, wherein the processor 51, the communication interface 53 and the memory 50 are connected through the bus 52. Figure 5
[0147] The memory 50 can contain a high-speed random access memory (RAM) and can also include a non-volatile memory, for example 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 53 (which can be wired or wireless), and the Internet, a wide area network, a local area network, a metropolitan area network, etc. can be used. The bus 52 can 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 the convenience of representation, Figure 5 In the figure, only one bidirectional arrow is used to represent the bus, but it does not mean that there is only one bus or only one type of bus.
[0148] The processor 51 can be an integrated circuit chip with processing capability. In the implementation process, each step of the above method can be completed by the integrated logic circuit of hardware in the processor 51 or the instruction in the form of software. The processor 51 described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; 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, discrete hardware components. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in 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 in the art. The storage medium is located in the memory, and the processor 51 reads the information in the memory, and combines the hardware to complete the foregoing method.
[0149] The computer program product of the tunnel label processing method, device and network equipment provided by the embodiment of the present application includes a computer readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the method described in the foregoing method embodiment. The specific implementation can be referred to the method embodiment, and will not be described here.
[0150] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the foregoing method embodiment, and will not be described here.
[0151] In addition, in the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting" should be understood in a broad sense, for example, can be fixedly connected, can also be detachably connected, or integrally connected; can be mechanically connected, can also be electrically connected; can be directly connected, can also be indirectly connected through an intermediate medium, can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0152] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the present application that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0153] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", "third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.
[0154] Finally, it should be noted that: the above embodiments are only specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, and are not limited thereto, the protection scope of the present application is not limited thereto, although the present application 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 within the technical range disclosed by the present application can modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of processing of a tunnel label, characterized by, The method is applied to a network device, and comprises: In response to a label allocation operation acting on the network device, a tunnel label corresponding to the label allocation operation is obtained, wherein the tunnel label is used to represent an adjacent label between two adjacent network devices in a network link; A network entry containing the tunnel label is generated according to a pre-configured association group format; The network entry is saved to a preset storage location; and The allocated tunnel label is distributed to a forwarding plane of the network device to publish the tunnel label; The network entry is obtained according to the pre-configured association group format by assembling gateway protocol information and a tunnel label; The method further comprises: In response to a reset operation acting on the network device, the gateway protocol information is loaded from a pre-constructed configuration database; wherein the configuration database is pre-configured with a protection mechanism; The network entry containing the gateway protocol information is searched from the preset storage location by taking the gateway protocol information as an index parameter; A tunnel label corresponding to the gateway protocol information is extracted from the searched network entry; The extracted tunnel label is distributed to the forwarding plane of the network device to update the tunnel label; and An update packet of the tunnel label is generated, and the update packet is broadcasted in the network link.
2. The method of claim 1, wherein, The step of generating a network entry containing the tunnel label according to a pre-configured association group format comprises: Gateway protocol information of the network device is obtained according to a pre-configuration, wherein the gateway protocol information at least includes a network interface of the network device, and an IP address corresponding to the network interface; The gateway protocol information and the tunnel label are assembled according to the pre-configured association group format to obtain a network entry containing the tunnel label.
3. The method of claim 2, wherein, The network entry comprises the tunnel label, an out port identifier of the network interface, and a next hop IP address adjacent to the network device, which are sequentially assembled according to the association group format.
4. The method of claim 1, wherein, The method further comprises: Before responding to a label allocation operation acting on the network device, a configuration operation of a gateway protocol for the network device is responded to; wherein the configuration operation is used to configure 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 A segment routing (SR) function of the network device is started.
5. The method of claim 1, wherein, The method further comprises: In response to receiving an update packet of the tunnel label broadcasted by a target network device; wherein the target network device is a network device with an updated tunnel label in a network link; The tunnel label recorded in the update packet is extracted; The tunnel label is distributed to a forwarding plane of the network device to update the tunnel label.
6. The method of claim 5, wherein, The step of distributing the tunnel label to the forwarding plane of the network device to update the tunnel label comprises: The network entry corresponding to the target network device recorded in the network entry stored in the preset storage location is searched 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 packet; if not, updating the tunnel label in the network entry to the tunnel label recorded in the update packet.
7. A processing device of a tunnel label, characterized by, The application is applied to a network device, and the device comprises: a response module, configured to respond to a label allocation operation acting on the network device, and acquire a tunnel label corresponding to the label allocation operation, wherein the tunnel label is used to represent an adjacent 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 saving module, configured to save the network entry to a preset storage location; and a publishing module, configured to issue the allocated tunnel label to a forwarding plane of the network device, so as to publish the tunnel label; wherein the network entry is obtained by assembling gateway protocol information and a tunnel label according to a pre-configured association group format; the device is further configured to: respond to a reset operation acting on the network device, and load the gateway protocol information from a pre-constructed configuration database; wherein the configuration database is pre-configured with a protection mechanism; take the gateway protocol information as an index parameter, and find a network entry containing the gateway protocol information from the preset storage location; extract a tunnel label corresponding to the gateway protocol information from the found network entry; issue the extracted tunnel label to the forwarding plane of the network device, so that the forwarding plane updates the tunnel label; and generate an update packet of the tunnel label, and broadcast the update packet in the network link.
8. A network device, comprising: The controller of the network device is configured with the tunnel label processing device of claim 7.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is run by a processor to execute the method of any one of claims 1-6.
Citation Information
Patent Citations
Label distribution method and device
CN110191055A
Link label distribution method and device, network equipment and readable storage medium
CN111935016A