Message forwarding method and device and computer readable storage medium
By assigning a first label to each FEC type and determining a composite second label based on the original instance number, the method addresses excessive MPLS label consumption in SR-MPLS, improving network performance through optimized label resource management.
Patent Information
- Application Number
- CN202310652132.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-02
- Publication Date
- 2024-12-03
AI Technical Summary
The existing Segment Routing (SR) Multi-Protocol Label Switching (MPLS) solution consumes excessive MPLS label resources due to the allocation of adjacency segment identifiers (Adjacency SIDs) for multiple links and forwarding equivalence class (FEC) types with multiple original instances, exacerbated by functions like virtual topology and network slicing.
Assign a first label to each FEC type by the first node, and have the second node determine a composite second label based on the first label and original instance number, encapsulating it in the forwarding message, allowing the first node to process the message without allocating MPLS labels for each original instance.
This approach significantly reduces MPLS label resource consumption and notification, thereby enhancing network performance by optimizing label allocation and processing.
Smart Images

Figure CN119071208A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communications, and in particular to a message forwarding method, device, and computer-readable storage medium. Background Art
[0002] Segment routing is a routing method based on the source node, which specifically includes: the source node attaches a layer of ordered instruction list information outside the data message, and forwards the shortest path segment by segment on the data plane according to the ordered segment identifier (SID) list information.
[0003] At present, segment routing (SR) can be applied to the multi-protocol label switching (MPLS) data plane and the internet protocol version 6 (IPv6) data plane, which are respectively called SR-MPLS solution and SRv6 solution.
[0004] Among them, when forwarding messages involving segmented routing in the SR-MPLS solution, a layer of ordered segment list, that is, the MPLS label stack, will be encapsulated for the message. In this solution, it is necessary to allocate adjacency segment identifiers (AdjacencySIDs) for a large number of links, and the allocation of these Adjacency SIDs will consume more MPLS label resources. And in the prior art, for forwarding equivalence class (FEC) types with multiple original instances, different MPLS labels will be allocated to each original instance. As a result, the consumption of MPLS label resources in the SR-MPLS solution is relatively large. Moreover, after combining functions such as virtual topology and network slicing, the consumption of MPLS label resources will be more serious. Summary of the invention
[0005] The present disclosure provides a message forwarding method, device and computer-readable storage medium, which can solve the problem of excessive consumption of MPLS label resources when forwarding messages involving segment routing in the SR-MPLS solution at this stage.
[0006] In order to achieve the above objectives, the present disclosure adopts the following technical solutions:
[0007] On the one hand, an embodiment of the present disclosure provides a message forwarding method, comprising: receiving a target message sent by a second node; wherein the target message includes a second label, the second label includes a first label and an original instance number, the first label corresponds to a forwarding equivalence class FEC type, and the original instance number represents an identifier or index of an original instance belonging to the FEC type;
[0008] The target message is processed according to the second label.
[0009] On the other hand, an embodiment of the present disclosure provides a message forwarding method, comprising: sending a target message to a first node; wherein the target message includes a second label, the second label includes a first label and an original instance number, the first label corresponds to a forwarding equivalence class FEC type, and the original instance number represents an identifier or index of an original instance belonging to the FEC type.
[0010] On the other hand, the embodiment of the present disclosure provides a message forwarding device, including: a receiving unit and a processing unit;
[0011] A receiving unit, configured to receive a target message sent by a second node; wherein the target message includes a second label, the second label includes a first label and an original instance number, the first label corresponds to a forwarding equivalence class FEC type, and the original instance number indicates an identifier or index of an original instance belonging to the FEC type;
[0012] The processing unit is used to process the target message according to the second label.
[0013] On the other hand, the embodiment of the present disclosure provides a message forwarding device, including: a sending unit;
[0014] A sending unit is used to send a target message to the first node; wherein the target message includes a second label, the second label includes a first label and an original instance number, the first label corresponds to a forwarding equivalence class FEC type, and the original instance number represents an identifier or index of an original instance belonging to the FEC type.
[0015] On the other hand, an embodiment of the present disclosure provides a message forwarding device, which includes: a memory and a processor; the memory and the processor are coupled; the memory is used to store a computer program; and when the processor executes the computer program, the message forwarding method of any of the above embodiments is implemented.
[0016] On the other hand, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the message forwarding method of any of the above embodiments is implemented.
[0017] On the other hand, a computer program product is provided, which includes computer program instructions, and when the computer program instructions are executed by a processor, the message forwarding method of any of the above embodiments is implemented.
[0018] In the technical solution provided by the present disclosure, for the original instances of multiple specific FEC types in the SR-MPLS solution, the first node in the network can assign a first label to each FEC type; the second node in the network will determine a composite second label based on the first label and the original instance number, and encapsulate the second label in the subsequently generated forwarding message sent to the first node; then, after receiving the target message, the first node can process the target message according to the second label included in the message. Since the first label is independent of the original instance included in the FEC type and is only related to the number of FEC types, the first node in the present disclosure no longer needs to assign an MPLS label to each original instance. Therefore, the present disclosure can greatly save the consumption of MPLS label resources, while also reducing the notification of label messages, thereby improving the overall network performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present disclosure, the following briefly introduces the drawings required to be used in some embodiments of the present disclosure. Obviously, the drawings described below are only drawings of some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can also be obtained based on these drawings. In addition, the drawings described below can be regarded as schematic diagrams, and are not limitations on the actual size of the product involved in the embodiments of the present disclosure, the actual process of the method, the actual timing of the signal, etc.
[0020] Figure 1 A schematic diagram of the architecture of an MPLS network system provided for some embodiments of the present disclosure;
[0021] Figure 2 A flowchart of a message forwarding method provided in some embodiments of the present disclosure;
[0022] Figure 3 A schematic diagram of the composition of an MPLS label stack provided in some embodiments of the present disclosure;
[0023] Figure 4 A schematic diagram of another MPLS label stack structure provided in some embodiments of the present disclosure;
[0024] Figure 5 A schematic diagram of another MPLS label stack structure provided in some embodiments of the present disclosure;
[0025] Figure 6 A schematic diagram of an LSE format provided for some embodiments of the present disclosure;
[0026] Figure 7 Another LSE format schematic diagram provided for some embodiments of the present disclosure;
[0027] Figure 8A flowchart of another message forwarding method provided in some embodiments of the present disclosure;
[0028] Fig. 9 A flowchart of another message forwarding method provided in some embodiments of the present disclosure;
[0029] Fig.10 A sub-TLV encapsulation format diagram provided for some embodiments of the present disclosure;
[0030] Fig.11 A schematic diagram of the structure of a message forwarding device provided in some embodiments of the present disclosure;
[0031] Fig.12 A schematic diagram of the structure of another message forwarding device provided in some embodiments of the present disclosure;
[0032] Fig.13 A schematic structural diagram of another message forwarding device provided for some embodiments of the present disclosure. DETAILED DESCRIPTION
[0033] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in some embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments provided by the present disclosure, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present disclosure.
[0034] Unless the context requires otherwise, throughout the specification and claims, the term "comprise" and other forms thereof, such as the third person singular form "comprises" and the present participle form "comprising", are to be interpreted as open, inclusive, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "example", "specific example" or "some examples" and the like are intended to indicate that specific features, structures, materials or characteristics associated with the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representation of the above terms does not necessarily refer to the same embodiment or example. In addition, the specific features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner.
[0035] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.
[0036] “At least one of A, B, and C” has the same meaning as “at least one of A, B, or C” and both include the following combinations of A, B, and C: A only, B only, C only, the combination of A and B, the combination of A and C, the combination of B and C, and the combination of A, B, and C.
[0037] “A and / or B” includes the following three combinations: A only, B only, and a combination of A and B.
[0038] The use of "adapted to" or "configured to" herein is meant to be open and inclusive language that does not exclude devices adapted or configured to perform additional tasks or steps.
[0039] Additionally, the use of “based on” is meant to be open and inclusive, as a process, step, calculation, or other action “based on” one or more stated conditions or values may, in practice, be based on additional conditions or values beyond those stated.
[0040] Segment routing (SR) technology is a method of routing based on the source node. The source node attaches a layer of ordered instruction list information outside the data message, and performs the shortest path and service chain segment by segment on the data plane according to the ordered segment identifier (SID) list information. This method can force a flow to pass through any path and service chain by maintaining the state of each flow only on the source node, and neither the intermediate node nor the tail node needs to maintain the state of the flow. Segment routing can be applied to the multi-protocol label switching (MPLS) data plane and the Internet Protocol version 6 (IPv6) data plane, which are respectively called SR-MPLS solution and SRv6 solution.
[0041] At present, when forwarding messages involving segment routing in the SR-MPLS solution, a layer of ordered segment list, that is, the MPLS label stack, will be encapsulated for the message. In this solution, it is necessary to allocate adjacency segment identifiers (Adjacency SIDs) for a large number of links. The allocation of these Adjacency SIDs will consume more MPLS label resources. In addition, in the prior art, for forwarding equivalence class (FEC) types with multiple original instances (for example, instant-1, instant-2,..., instant-n), different MPLS labels will be allocated to each original instance. As a result, the consumption of MPLS label resources in the SR-MPLS solution is relatively large. Moreover, after combining functions such as virtual topology and network slicing, the consumption of MPLS label resources will be even more serious.
[0042] In view of the defect of excessive consumption of MPLS label resources when forwarding messages involving segment routing in the SR-MPLS scheme at this stage, the present disclosure provides a message forwarding method and device. In the message forwarding method provided in the present disclosure, for the original instances of multiple specific FEC types in the SR-MPLS scheme, a first label can be assigned by the first node in the network to each FEC type; the second node in the network will determine a composite second label based on the first label and the original instance number, and encapsulate the second label in the subsequently generated forwarding message sent to the first node; then, after receiving the target message, the first node can process the target message according to the second label included in the message. Since the first label is independent of the original instance included in the FEC type and is only related to the number of FEC types, the first node in the present disclosure no longer needs to allocate an MPLS label for each original instance. Therefore, the present disclosure can greatly save the consumption of MPLS label resources, while also reducing the notification of label messages, thereby improving the overall performance of the network.
[0043] The message forwarding method and device provided by the present disclosure are described in detail below in conjunction with the accompanying drawings of the specification. It should be noted that the various embodiments of the present disclosure can refer to each other, for example, the same or similar steps, method embodiments, system embodiments and device embodiments can refer to each other without limitation.
[0044] The technical solution provided by the embodiments of the present disclosure can be applied to an MPLS network system. Figure 1 As shown, Figure 1 The schematic diagram of the architecture of an MPLS network system provided in some embodiments of the present disclosure is as follows: The MPLS network system may include at least one first node 101 and at least one second node 102, wherein the first node 101 and the second node 102 are both nodes in the MPLS network. Figure 1 Only one first node 101 and one second node 102 are shown.
[0045] Among them, the first node 101 is used to receive the target message sent by the second node 102; wherein the target message includes a second label, the second label includes a first label and an original instance number, the first label corresponds to the forwarding equivalence class FEC type, and the original instance number represents the identifier or index of the original instance belonging to the FEC type; according to the second label, the target message is processed.
[0046] The second node 102 sends a target message to the first node 101; wherein the target message includes a second label, the second label includes a first label and an original instance number, the first label corresponds to the forwarding equivalence class FEC type, and the original instance number represents the identifier or index of the original instance belonging to the FEC type.
[0047] It should be noted that Figure 1 This is just an exemplary framework diagram. Figure 1 The number and names of nodes included in the Figure 1 In addition to the functional nodes shown, the MPLS network system may also include other nodes, such as core network equipment, and the present disclosure does not impose any limitation on this.
[0048] The application scenarios of the embodiments of the present disclosure are not limited. The system architecture and business scenarios described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. It is known to those skilled in the art that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.
[0049] For example, Figure 2 As shown, Figure 2 A flowchart of a message forwarding method provided according to some embodiments includes the following steps:
[0050] S201: A second node sends a target message to a first node. Correspondingly, the first node receives the target message.
[0051] The target message includes a second label, the second label includes a first label and an original instance number, the first label corresponds to a forwarding equivalence class (FEC) type, and the original instance number indicates an identifier or index of an original instance belonging to the FEC type.
[0052] It should be noted that the first label is a label assigned by the first node to the original instance of a specific FEC type, and the first label is independent of the original instance and only corresponds to the FEC type of the original instance to achieve the effect of saving label resources.
[0053] In some embodiments, the first label may be implemented as a universal SID. It should be noted that the universal SID may be an absolute MPLS label or a relative index for obtaining an absolute MPLS label, and the present disclosure does not specifically limit this. For example, the present disclosure may allocate different universal SIDs to different virtual networks.
[0054] In some embodiments, for different virtual networks, the first node may assign different first labels to the same FEC type. The types of virtual networks include, but are not limited to, interior gateway protocol (IGP) multi-topology, IGP flexible algorithm (flex-algo), network resource partition (NRP). It is understandable that the physical network can be regarded as a special virtual network.
[0055] In some embodiments, the FEC type of the original instance includes at least one of the following: an egress port type, a service function (Service Funciton) type, and a virtual private network (VPN) type.
[0056] Correspondingly, when the FEC type of the original instance is an egress port type, the original instance number is an egress port identifier or index, and the original instance is an egress port instance.
[0057] Alternatively, when the FEC type of the original instance is a Service Funciton type, the original instance number is a Service Funciton identifier or index, and the original instance is a Service Funciton instance.
[0058] Alternatively, when the FEC type of the original instance is a VPN type, the original instance number is a VPN identifier or index, and the original instance is a VPN instance.
[0059] In some embodiments, the correspondence between the first label and the FEC type may be reflected by a label forwarding table corresponding to the first label. The label forwarding table may be created by the first node according to the first label.
[0060] Exemplarily, the label forwarding table includes FEC types and operation instructions corresponding to each FEC type. The operation instruction is used to instruct to obtain the original instance number of the original instance.
[0061] For example, when the FEC type of the original instance is the egress port type, the label forwarding table corresponding to the first label includes the following content: the FEC type is the egress port type and an operation instruction for obtaining the original instance number.
[0062] Similarly, when the FEC type of the original instance is the Service Funciton type, the label forwarding table corresponding to the first label includes the following contents: the FEC type is the Service Funciton type and an operation instruction for obtaining the original instance number.
[0063] Similarly, when the FEC type of the original instance is the VPN type, the label forwarding table corresponding to the first label includes the following contents: the FEC type is the VPN type and an operation instruction for obtaining the original instance number.
[0064] In some embodiments, after assigning the first label to the original instance, the first node sends a first notification message to the second node, where the first notification message includes the first label and the FEC type corresponding to the first label. In this way, after receiving the first notification message, the second node can obtain the first label from the first notification message.
[0065] In some embodiments, before receiving the target message sent by the second node, the first node sends a second notification message to the second node, and the second notification message includes the original instance and the original instance number. In this way, after receiving the second notification message, the second node can obtain the original instance number from the second notification message.
[0066] It is understandable that after obtaining the first label and the original instance number, the second node can combine the first label and the original instance number as a composite label corresponding to the original instance, and the composite label is the second label. It should be noted that the process of the second node determining the second label can be referred to S801-S803 below, which will not be repeated here.
[0067] In some embodiments, the target message may be an MPLS forwarding message. Exemplarily, the MPLS forwarding message includes an MPLS label stack. Thus, the second label may be carried in the MPLS label stack.
[0068] The following describes how the MPLS label stack carries the second label in different situations:
[0069] (1) Case 1: The MPLS label stack includes the first label and the original instance number in sequence.
[0070] For example, Figure 3 A schematic diagram of the composition of an MPLS label stack provided by an embodiment of the present disclosure. Figure 3In the example, the encapsulated MPLS label stack includes, from the top to the bottom of the stack, other MPLS labels (if any), the first label, the original instance number, other MPLS labels (if any), and the payload.
[0071] (2) Case 2: The MPLS label stack includes the first label, the MPLS special label, and the original instance number in sequence.
[0072] For example, Figure 4 A schematic diagram of another MPLS label stack provided in an embodiment of the present disclosure. Figure 4 In the example, the encapsulated MPLS label stack includes, from the top to the bottom of the stack, other MPLS labels (if any), the first label, the MPLS special label, the original instance number, other MPLS labels (if any), and the payload.
[0073] (3) Case 3: The MPLS label stack includes the first label, the MPLS special label, and the auxiliary data structure in sequence.
[0074] For example, Figure 5 A schematic diagram of another MPLS label stack provided in an embodiment of the present disclosure. Figure 5 In the example, the encapsulated MPLS label stack includes, from the top to the bottom of the stack, other MPLS labels (if any), the first label, the MPLS special label, the auxiliary data structure, other MPLS labels (if any), and the payload. The auxiliary data structure includes the original instance number.
[0075] The above describes the manner in which the MPLS label stack carries the second label.
[0076] It should be noted that, in combination with the above description of the MPLS label stack carrying the second label, the original instance number may occupy one or more LSE (label switch entry) elements in the MPLS label stack terminal.
[0077] For example, Figure 6 A schematic diagram of an LSE format provided by an embodiment of the present disclosure. Figure 6 In the example, the highest bit is set to 1 to prevent the device from treating this LSE as a special label; the stack bottom flag S needs to be set according to the actual situation, that is, when the LSE corresponding to the original instance number is at the bottom of the stack, its stack bottom flag S is set to 1, otherwise it is 0. This means that the range of the original instance number is not continuous.
[0078] Or, illustratively, Figure 7 Another LSE format diagram provided by the embodiment of the present disclosure. Figure 7In the , all 32 bits are used to represent the original instance number, and its value range is continuous. At this time, if the LSE corresponding to the original instance number is actually at the bottom of the label stack, the stack bottom flag needs to be set in the first label or special label that precedes the original instance number, so that the first node can successfully determine the end position of the entire label stack.
[0079] S202: The first node processes the target message according to the second label.
[0080] In some embodiments, after receiving the second label, the first node parses the first label from the second label and queries the label forwarding table. After that, the first node determines the operation corresponding to the first label according to the label forwarding table. For example, in combination with the example in S201, the first node determines that the operation corresponding to the first label is to obtain the original instance number of the original instance, and then the first node parses the second label to obtain the original instance number. It should be noted that the process of the first node obtaining the original instance number corresponding to the second label is referred to in S901-S903 below, which will not be repeated here.
[0081] Furthermore, the first node determines the original instance corresponding to the second label according to the FEC type and the original instance number of the original instance, and processes the target message according to the original instance.
[0082] In some embodiments, the first node processes the target message according to the original instance, including at least one of the following:
[0083] (1) When the original instance is an egress port instance, send the target message to the egress port instance;
[0084] (2) When the original instance is a Service Funciton instance, the target message is processed according to the instructions contained in the Service Funciton instance;
[0085] (3) When the original instance is a VPN instance, the target message is forwarded based on the routing table of the VPN instance.
[0086] The above describes the manner in which the first node processes the target message.
[0087] Based on the above technical solution, the embodiment of the present disclosure is aimed at the original instances of multiple specific FEC types in the SR-MPLS scheme, and the first node in the network can assign a first label to each FEC type; the second node in the network will determine a composite second label based on the first label and the original instance number, and encapsulate the second label in the subsequently generated forwarding message sent to the first node; then, after receiving the target message, the first node can process the target message according to the second label included in the message. Since the first label is independent of the original instance included in the FEC type, but only related to the number of FEC types, the first node in the present disclosure no longer needs to assign an MPLS label to each original instance. Therefore, the present disclosure can greatly save the consumption of MPLS label resources, while also reducing the notification of label messages, thereby improving the overall network performance.
[0088] For example, in combination Figure 2 ,like Figure 8 As shown, Figure 8 A flowchart of another message forwarding method provided in some embodiments of the present disclosure. The message forwarding method provided in the present disclosure further includes the following steps:
[0089] S801: A first node sends a first notification message to a second node. Correspondingly, the second node receives the first notification message.
[0090] The first notification message includes a first label and an FEC type corresponding to the first label.
[0091] In some embodiments, the first notification message further includes first identification information, and the first identification information is used to indicate that there is no corresponding relationship between the first label and the original instance. Exemplarily, the first identification information can be implemented as a wildcard flag. For example, if the representation value of the wildcard flag is TRUE, it indicates that there is no corresponding relationship between the first label and the original instance.
[0092] S802: The first node sends a second notification message to the second node. Correspondingly, the second node receives the second notification message.
[0093] The second notification message includes the original instance number of the original instance.
[0094] It can be understood that the second notification message may also include the object corresponding to the original instance.
[0095] S803: The second node determines a second label.
[0096] In some embodiments, the second node determines a composite label according to the first label and the original instance number, and determines the composite label as the second label. Further, the second label is carried in the MPLS label stack.
[0097] Based on the above technical solution, the embodiment of the present disclosure can determine a composite second label based on the notification message sent by the first node, and the second label includes the first label and the original instance number. In this way, the second node can encapsulate the second label when sending the target message to the first node, so that the first node can process the target message after receiving it.
[0098] For example, in combination Figure 6 ,like Fig. 9 As shown, Fig. 9 A flowchart of another message forwarding method provided in some embodiments of the present disclosure. The message forwarding method provided in the present disclosure further includes the following steps:
[0099] S901. A first node obtains a first label from a second label.
[0100] It can be understood that after receiving the second label, the first node parses the second label to obtain the first label.
[0101] S902: The first node determines an operation corresponding to the first label according to the label forwarding table.
[0102] The label forwarding table is used to indicate the corresponding relationship between labels and operations.
[0103] It can be understood that, since there is a corresponding relationship between the first label and the FEC type, after the first node queries the label forwarding table according to the first label, it can determine the operation corresponding to the first label according to the label forwarding table.
[0104] Exemplarily, when the first label indicates that the FEC type of the original instance is an egress port type, a ServiceFunciton type, or a VPN type, the first node queries the label forwarding table and can determine that the operation corresponding to the first label is to obtain the original instance number according to the label forwarding table.
[0105] S903: When the operation corresponding to the first label is an operation for obtaining the original instance number, the first node obtains the original instance number from the second label.
[0106] It can be understood that, in combination with the above example, when the operation corresponding to the first label is an operation for obtaining the original instance number, the first node parses the MPLS label stack carrying the second label to determine the original instance number.
[0107] Based on the above technical solution, in the embodiment of the present disclosure, the first node can obtain the FEC type and the original instance number of the original instance from the target message to determine the original instance corresponding to the target message, and then process the target message according to the original instance.
[0108] It should be noted that in the message forwarding method provided by the embodiment of the present disclosure, the second label only appears when the first node that allocates and sends the first notification message and the second notification message reads the top label of the MPLS label message, so that the first node processes the message accordingly. For nodes corresponding to old devices that do not adopt the message forwarding method provided by the embodiment of the present disclosure, the second label is not visible.
[0109] In this way, when the nodes corresponding to the old devices in the network construct the MPLS label message forwarded to the first node, they can use the traditional method to encapsulate the forwarding label of the first node (such as the node SID of the first node, or the SID list) in the label stack, and the second label described above follows the forwarding label. In other words, the nodes corresponding to the old devices in the network still forward the message to the first node based on the traditional forwarding label, and the second label in the label stack is not visible throughout the process. Therefore, the message forwarding method provided by the embodiment of the present disclosure is also compatible with a network where there are both devices improved using the method of the present disclosure and devices not improved using the method of the present disclosure.
[0110] Below is a combination of the above embodiments and Fig.10 , how to optimize the allocation and notification of algorithm-related Adjacency SIDs in the SR-MPLS scenario in the embodiments of the present disclosure is described:
[0111] As described above, in the embodiment of the present disclosure, the first node allocates a universal SID (corresponding to the first label) for the egress port type (here, the FEC type of the original instance is taken as the egress port type as an example, and the same is true for other FEC types). At this time, the original instance number is the index of the corresponding egress port.
[0112] Since the wildcard egress port is irrelevant to a specific link, the universal SID is advertised as a Prefix SID. In addition, the index of the corresponding egress port is carried in each specific link advertisement.
[0113] The existing intermediate system to intermediate system (ISIS) protocol suite (refer to RFC5305, RFC5120, RFC5308) has defined TLVs 135 / 235 / 236 / 237 for notifying Internet protocol (IP) reachability information.
[0114] In some embodiments, the first node in the present disclosure adds a Sub-TLV in these TLVs, which is recorded as Wildcard-Instance-Prefix-SID Sub-TLV, for announcing a SID of a specific FEC type that is not related to the original instance, that is, the first notification message. Fig.10 As shown, Fig.10 A sub-TLV encapsulation format diagram is provided for some embodiments of the present disclosure.
[0115] exist Fig.10 The fields of the Wildcard-Instance-Prefix-SID Sub-TLV are described as follows:
[0116] (1) Type: occupies 1 byte, pending IANA allocation, indicating that this sub-TLV is the Wildcard-Instance-Prefix-SID Sub-TLV;
[0117] (2) Length: 1 byte, indicating the length of this Sub-TLV, excluding the length of the Type / Length field itself. This length is variable and depends on the length of the VN ID field and the length of the SID / Index / Label field.
[0118] (3) Flags: occupies 1 byte and has the same meaning as the field of the same name in the Prefix-SID sub-TLV defined in RFC8667.
[0119] (4) VN Type: occupies 1 byte and indicates the type of virtual network. It determines the length of the VN ID.
[0120] Exemplarily, the value of VN type is defined as follows in the embodiment of the present disclosure:
[0121] 0: indicates the default physical network. In this case, the length of the VN ID field is 0.
[0122] 1: Indicates IGP multi-topology. In this case, the VN ID occupies 2 bytes. The meaning of the VN ID is the same as the MTID defined in RFC5120 or the MT-ID defined in RFC4915.
[0123] 2: Indicates the IGP algorithm. In this case, the VN ID occupies 1 byte. The meaning of the VN ID is referred to the "IGPAlgorithm Types" registry of IANA. For example, 0 indicates the Shortest Path First (SPF) algorithm based on link metric, 1 indicates the strict shortest path first algorithm based on link metric, and 128 to 255 indicates flexible algorithms defined by the user.
[0124] 3: Indicates NRP slicing. In this case, the VN ID occupies 4 bytes. The meaning of the VN ID is the same as the NRP-ID defined in draft-ietf-teas-ns-ip-mpls-02.
[0125] (5) VN ID: variable length, indicating the corresponding virtual network identifier.
[0126] (6) FEC Type: occupies 1 byte and indicates a specific FEC type, such as the output port type, service function type, VPN type, etc.
[0127] In some embodiments, the value of FEC type in the embodiments of the present disclosure is defined as follows:
[0128] 0: reserved value;
[0129] 1: output port type;
[0130] 2: Service Function type;
[0131] 3: L3VPN service type;
[0132] 4: EVPN service type;
[0133] (7) SID / Index / Label: Variable length, with the same meaning as the field of the same name in the Prefix-SID sub-TLV defined in RFC8667. Corresponds to the first label.
[0134] As described in S801 above, when the first node announces the first label, in addition to including the FEC type, it may also include a wildcard flag.
[0135] The Wildcard-Instance-Prefix-SID Sub-TLV itself has the function of representing a wildcard, so there is no need to define an explicit wildcard flag.
[0136] It should be noted that, when the first label is implemented as the wildcard-Instance-Prefix-SID Sub-TLV, the first node in the network can notify the first label associated with a specific algorithm to the second node in the network. For example, if you want to notify the first label corresponding to the virtual network Flex-algo128 for the outbound port FEC type, you can set the VN Type field in the Sub-TLV to 2, the VN ID field to 128, the FEC Type field to 1, and the SID / Index / Label to the first label.
[0137] In addition, in some other embodiments, Link Local / RemoteIdentifiers sub-TLV defined in the prior art RFC5307 is used as the second notification message. Thus, the first node can notify the second node in the network of the index of each local egress port as the original instance number of the corresponding egress port.
[0138] Exemplarily, in addition to being in the physical network, the first node also joins three Flex-algo virtual networks, namely Flex-algo128, 129, and 130. Then, the first node can assign a first label that is independent of a specific egress port instance to the egress port FEC type for the physical network and each virtual network, as follows:
[0139] algo-0:
[0140] First label corresponding to the outbound port FEC type: 1000
[0141] Flex-algo 128:
[0142] First label corresponding to the outbound port FEC type: 2000
[0143] Flex-algo 129:
[0144] First label corresponding to the outbound port FEC type: 2001
[0145] Flex-algo 130:
[0146] First label corresponding to the outbound port FEC type: 2002
[0147] It should be understood that the above three first tags can all be notified to other nodes in the network through wildcard-Instance-Prefix-SID Sub-TLV.
[0148] It can be understood that if the first node has 1000 local egress ports, and the local indexes from the first egress port (port-1) to the 1000th egress port (port-1000) are 1, 2, 3, ..., 1000 respectively, then the local indexes of these egress ports can be announced to other nodes in the network through the Link Local / Remote Identifiers sub-TLV.
[0149] In combination with the above description of the two notification messages, the first node informs the second node in the network that, for the physical network or each virtual network, the composite second label bound to each of its local outbound ports is as follows:
[0150] algo-0:
[0151] Second label of port-1: <1000,1>
[0152] Second label of port-2: <1000,2> ......
[0154] Second label for port-1000: <1000,1000>
[0155] Flex-algo 128:
[0156] Second label of port-1: <2000,1>
[0157] Second label of port-2: <2000,2> ......
[0159] Second label of port-1000: <2000,1000>
[0160] Flex-algo 129:
[0161] Second label of port-1: <2001,1>
[0162] Second label of port-2: <2001,2> ......
[0164] Second label of port-1000: <2001,1000>
[0165] Flex-algo 130:
[0166] Second label of port-1: <2002,1>
[0167] Second label of port-2: <2002,2> ......
[0169] Second label of port-1000: <2002,1000>
[0170] In this way, when the second node in the network needs to construct an MPLS message to send to the first node, and specify the first node to forward the message along a specific output port in the virtual network corresponding to the corresponding algorithm, the corresponding second label can be encapsulated in the MPLS message. For example, the second label <2002,1000> can be encapsulated to specify the first node to forward the message along port-1000 in the virtual network corresponding to algorithm 130.
[0171] It should be noted that, in the embodiment of the present disclosure, a first label that is not related to the original instance of the specific egress port type can also be notified for the egress port FEC type according to protocols such as OSPF and BGP-LS. The specific content of the corresponding notification message can be found in the existing OSPF, BGP-LS and other protocols, and this embodiment will not be repeated here.
[0172] The embodiments of the present disclosure can divide the functional modules or functional units of the message forwarding device generated by the above method example. For example, each functional module or functional unit can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules or functional units. Among them, the division of modules or units in the embodiments of the present disclosure is schematic, which is only a logical functional division, and there may be other division methods in actual implementation.
[0173] For example, Fig.11 1 is a possible structural diagram of a message forwarding device provided in some embodiments of the present disclosure. The message forwarding device 1100 includes: a receiving unit 1101, a processing unit 1102, and a sending unit 1103.
[0174] The receiving unit 1101 is used to receive a target message sent by the second node. The target message includes a second label, the second label includes a first label and an original instance number, the first label corresponds to a forwarding equivalence class FEC type, and the original instance number indicates an identifier or index of an original instance belonging to the FEC type.
[0175] The processing unit 1102 is configured to process the target message according to the second label.
[0176] In some embodiments, the sending unit 1103 is configured to send a first notification message to the second node, where the first notification message includes a first label and an FEC type corresponding to the first label.
[0177] In some embodiments, the sending unit 1103 is further configured to send a second notification message to the second node, where the second notification message includes the original instance and the original instance number.
[0178] In some embodiments, the processing unit 1102 is configured to determine the corresponding original instance based on the FEC type and the original instance number.
[0179] In some embodiments, the processing unit 1102 is further configured to process the target message based on the original instance.
[0180] In some embodiments, the processing unit 1102 is further configured to obtain the first tag from the second tag.
[0181] In some embodiments, the processing unit 1102 is further used to determine the operation corresponding to the first tag according to the tag forwarding table, where the tag forwarding table is used to indicate the corresponding relationship between the tag and the operation.
[0182] In some embodiments, the processing unit 1102 is further configured to obtain the original instance number from the second tag when the operation corresponding to the first tag is an operation for obtaining the original instance number.
[0183] In some embodiments, the message forwarding device 1100 may further include a storage unit ( Fig.11 The storage unit stores a program or instruction. When the receiving unit 1101, the processing unit 1102 and the sending unit 1103 execute the program or instruction, the message forwarding device can execute the message forwarding method described in the above method embodiment.
[0184] also, Fig.11 The technical effects of the message forwarding device can refer to the technical effects of the message forwarding method described in the above embodiment, and will not be repeated here.
[0185] For example, Fig.12 FIG. 1 is a possible structural diagram of another message forwarding device provided in some embodiments of the present disclosure. The message forwarding device 1200 includes: a sending unit 1201 and a receiving unit 1202 .
[0186] Among them, the sending unit 1201 is used to send a target message to the first node; wherein the target message includes a second label, the second label includes a first label and an original instance number, the first label corresponds to the forwarding equivalence class FEC type, and the original instance number represents the identifier or index of the original instance belonging to the FEC type.
[0187] In some embodiments, the receiving unit 1202 is configured to receive a first notification message sent by the first node, where the first notification message includes the first label and the FEC type corresponding to the first label.
[0188] In some embodiments, the receiving unit 1202 is further configured to receive a second notification message sent by the first node, where the second notification message includes the original instance and the original instance number.
[0189] In some embodiments, the message forwarding device 1200 may further include a storage unit ( Fig.12 The storage unit stores a program or instruction. When the sending unit 1201 and the receiving unit 1202 execute the program or instruction, the message forwarding device can execute the message forwarding method described in the above method embodiment.
[0190] also, Fig.12 The technical effects of the message forwarding device can refer to the technical effects of the message forwarding method described in the above embodiment, and will not be repeated here.
[0191] For example, Fig.13 FIG. 2 is another possible structural diagram of the message forwarding device involved in the above embodiment. Fig.13 As shown, the message forwarding device 1300 includes: a processor 1302.
[0192] Among them, the processor 1302 is used to control and manage the actions of the message forwarding device, for example, executing the steps performed by the above-mentioned receiving unit 1101, processing unit 1102, sending unit 1103, sending unit 1201 and receiving unit 1202, and / or other processes for executing the technical solution described in this article.
[0193] The processor 1302 may be a processor that implements or executes various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. The processor may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0194] In some embodiments, the message forwarding device 1300 may further include a communication interface 1303, a memory 1301 and a bus 1304. The communication interface 1303 is used to support message forwarding between the message forwarding device 1300 and other network entities. The memory 1301 is used to store program codes and data of the message forwarding device.
[0195] Among them, the memory 1301 can be a memory in the message forwarding device, which can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory can also include a combination of the above types of memory.
[0196] The bus 1304 may be an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1304 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0197] Through the description of the above implementation methods, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and module described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0198] An embodiment of the present disclosure provides a computer program product including instructions. When the computer program product is run on an electronic device of the present disclosure, the computer is enabled to execute the message forwarding method described in the above method embodiment.
[0199] The embodiment of the present disclosure further provides a computer-readable storage medium, in which instructions are stored. When a computer executes the instructions, the electronic device of the present disclosure executes each step executed by the message forwarding device in the method flow shown in the above method embodiment.
[0200] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, and a hard disk. Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), registers, hard disks, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any other form of computer-readable storage medium in a suitable combination of the above, or numerical values in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an Application Specific Integrated Circuit (ASIC). In the embodiments of the present disclosure, computer-readable storage media may be any tangible media that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0201] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A message forwarding method, characterized in that: Applied to the first node, the method includes: Receive a target message sent by a second node; wherein the target message includes a second label, the second label includes a first label and an original instance number, the first label corresponds to a forwarding equivalence class (FEC) type, and the original instance number represents an identifier or index of an original instance belonging to the FEC type; Process the target message according to the second label.
2. The method according to claim 1, characterized in that Before receiving the target message sent by the second node, the method further includes: A first notification message is sent to the second node, where the first notification message includes the first label and an FEC type corresponding to the first label.
3. The method according to claim 2, characterized in that The first notification message further includes first identification information, where the first identification information is used to indicate that there is no corresponding relationship between the first label and the original instance.
4. The method according to claim 1, wherein Before receiving the target message sent by the second node, the method further includes: A second notification message is sent to the second node, where the second notification message includes the original instance and the original instance number.
5. The method according to claim 4, characterized in that The processing of the target message according to the second label includes: Determining the corresponding original instance based on the FEC type and the original instance number; The target message is processed based on the original instance.
6. The method according to claim 5, characterized in that Before determining the corresponding original instance based on the FEC type and the original instance number, the method further includes: Obtaining the first tag from the second tag; Determining, according to a label forwarding table, an operation corresponding to the first label, wherein the label forwarding table is used to indicate a correspondence between labels and operations; When the operation corresponding to the first tag is an operation for obtaining the original instance number, the original instance number is obtained from the second tag.
7. The method according to claim 5, characterized in that The FEC type of the original instance includes at least one of the following: an egress port type, a service function type, and a virtual private network VPN type.
8. The method according to claim 7, characterized in that In the case where the FEC type of the original instance is the egress port type, the original instance number is an egress port identifier or index, and the original instance is an egress port instance; or In the case where the FEC type of the original instance is the Service Funciton type, the original instance number is a Service Funciton identifier or index, and the original instance is a Service Funciton instance; or In a case where the FEC type of the original instance is the VPN type, the original instance number is a VPN identity ID or index, and the original instance is a VPN instance.
9. The method according to claim 8, characterized in that The processing of the target message based on the original instance includes: In a case where the original instance is the egress port instance, sending the target message to the egress port instance; or, In the case where the original instance is the Service Funciton instance, processing the target message according to the instructions contained in the Service Funciton instance; or, In a case where the original instance is the VPN instance, the target message is looked up based on the routing table of the VPN instance and forwarded.
10. The method according to claim 9, characterized in that The target message is a Multi-Protocol Label Switching (MPLS) forwarding message, the MPLS forwarding message includes an MPLS label stack, and the MPLS label stack includes the second label.
11. The method according to claim 10, characterized in that The MPLS label stack includes the first label and the original instance number in sequence; or, The MPLS label stack includes the first label, the MPLS special label, and the original instance number in sequence; or, The MPLS label stack includes the first label, an MPLS special label, and an auxiliary data structure in sequence, and the auxiliary data structure includes the original instance number.
12. A message forwarding method, characterized in that: Applied to the second node, the method includes: Send a target message to the first node; wherein the target message includes a second label, the second label includes a first label and an original instance number, the first label corresponds to the forwarding equivalence class FEC type, and the original instance number represents the identifier or index of the original instance belonging to the FEC type.
13. The method according to claim 12, characterized in that Before sending the target message to the first node, the method further includes: A first notification message sent by the first node is received, where the first notification message includes the first label and an FEC type corresponding to the first label.
14. The method according to claim 13, wherein: The first notification message further includes first identification information, where the first identification information is used to indicate that there is no corresponding relationship between the first label and the original instance.
15. The method according to claim 12, characterized in that Before sending the target message to the first node, the method further includes: A second notification message sent by the first node is received, where the second notification message includes the original instance and the original instance number.
16. The method according to claim 15, characterized in that The FEC type of the original instance includes at least one of the following: an egress port type, a service function type, and a virtual private network VPN type.
17. The method according to claim 16, characterized in that In the case where the FEC type of the original instance is the egress port type, the original instance number is an egress port identifier or index, and the original instance is an egress port instance; or When the FEC type of the original instance is the Service Funciton type, the original instance number is a Service Funciton identifier or index, and the original instance is a Service Funciton instance; In a case where the FEC type of the original instance is the VPN type, the original instance number is a VPN identity ID or index, and the original instance is a VPN instance.
18. The method according to claim 17, characterized in that The target message is a Multi-Protocol Label Switching (MPLS) forwarding message, the MPLS forwarding message includes an MPLS label stack, and the MPLS label stack includes the second label.
19. The method according to claim 18, characterized in that The MPLS label stack includes the first label and the original instance number in sequence; or, The MPLS label stack includes the first label, the MPLS special label, and the original instance number in sequence; or, The MPLS label stack includes the first label, an MPLS special label, and an auxiliary data structure in sequence, and the auxiliary data structure includes the original instance number.
20. A message forwarding device, characterized in that: include: a processor and a memory for storing instructions executable by the processor; The processor is configured to execute the instruction so that the message forwarding device executes the message forwarding method according to any one of claims 1-11 or claims 12-19.
21. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is caused to execute the message forwarding method according to any one of claims 1 to 11 or claims 12 to 19.
