Message forwarding method, device and system
By selecting the target tunnel for forwarding among multiple tunnels based on message attributes in the communication system, the problem of inconsistent forwarding performance requirements for different messages on the same node is solved, the message forwarding effect is improved, and business diversion is achieved.
Patent Information
- Application Number
- CN202110182228.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-09
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2041-02-09
AI Technical Summary
In a communication system, different messages of the same node have different requirements for forwarding performance. However, in the prior art, all messages are forwarded through the same tunnel, resulting in poor forwarding performance.
The node determines multiple tunnels based on the multiple tunnel attributes and indication information carried in the received route of the destination node, and selects the target tunnel from these tunnels based on the message attributes for forwarding, so as to meet the forwarding performance requirements of different messages.
It realizes forwarding on different tunnels according to different performance requirements of the message, improves the message forwarding effect, and realizes business diversion.
Smart Images

Figure CN114915582B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message forwarding method, device and system. Background Art
[0002] The communication system includes multiple nodes, and the nodes are capable of forwarding messages on the tunnel.
[0003] When forwarding a message, a node can search for a route to the destination node based on the message's intended destination. This route includes a next-hop identifier and a tunnel color attribute. The node then determines the target tunnel based on the next-hop identifier and the color attribute, and forwards the message through that target tunnel. The target tunnel is the tunnel between the node and the node indicated by the next-hop identifier, and the color attribute of the target tunnel is the same as the color attribute in the route.
[0004] It can be seen that all packets sent to the same node are forwarded through the same tunnel. However, different packets may have different requirements for forwarding performance, resulting in poor packet forwarding performance. Summary of the Invention
[0005] This application provides a message forwarding method, device, and system that can solve the problem of poor message forwarding performance. The technical solution is as follows:
[0006] In a first aspect, a message forwarding method is provided, comprising: a first node first receiving a route to a destination node from a second node, the route carrying an identifier of the second node and multiple tunnel attributes. The first node then determines multiple tunnels from the first node to the second node based on the multiple tunnel attributes carried in the route. After receiving a message addressed to the destination node, the first node determines a target tunnel from the multiple tunnels based on the message attributes carried in the message, and forwards the message to the second node via the target tunnel. The multiple tunnels correspond one-to-one to the multiple tunnel attributes, and the tunnels have the corresponding tunnel attributes.
[0007] The route of the destination node carries the identifier of the second node. For example, the second node may carry the identifier of the second node as the next hop identifier in the route. In this case, the route of the destination node carries the next hop identifier, and the next hop identifier is the identifier of the second node. Of course, the second node may not carry the identifier of the second node as the next hop identifier in the route, and this application does not limit this.
[0008] In the message forwarding method provided by the present application, the first node can determine the multiple tunnels through which the first node forwards the message sent to the destination node to the second node based on the multiple tunnel attributes carried by the route sent by the second node. When forwarding the message, the first node can filter a target tunnel from the multiple tunnels based on the message attributes carried by the message, and forward the message on the target tunnel. Therefore, different message attributes can be carried in the message according to the different requirements of the message forwarding performance, so that messages with different forwarding performance requirements can be forwarded on different target tunnels. In this way, the forwarding performance requirements of different nodes for messages, as well as the forwarding performance requirements of the same node for different messages, can be met, thereby improving the effect of message forwarding and realizing business diversion.
[0009] Optionally, after determining multiple tunnels corresponding one-to-one to the multiple tunnel attributes carried in the route, the first node may also obtain indication information corresponding to each of the multiple tunnels based on the indication information corresponding to the tunnel attributes carried in the route of the destination node. The indication information corresponding to each tunnel is: indication information corresponding to the tunnel attribute corresponding to the tunnel. When the first node determines a target tunnel from the multiple tunnels based on the target indication information, it may determine the tunnel corresponding to the target indication information as the target tunnel based on the indication information corresponding to the multiple tunnels.
[0010] There are many ways to implement routing to the destination node.
[0011] As a possible implementation method, the route also carries: multiple indication information, and the multiple indication information corresponds one-to-one to the multiple tunnel attributes; when the first node determines the target tunnel among the multiple tunnels based on the message attributes, it can first determine the target indication information that matches the message attributes among the multiple indication information; then, determine the target tunnel among the multiple tunnels based on the target indication information, wherein the tunnel attributes of the target tunnel correspond to the target indication information.
[0012] For example, when determining the target indication information, the first node may, based on a correspondence between message attributes and indication information, determine the indication information corresponding to the message attributes carried by the corresponding message as the target indication information. For another example, when determining the target indication information, the first node may also determine the target indication information based on a certain matching rule. For example, based on a preset operation rule, information matching the message attributes may be determined as the target indication information.
[0013] As another possible implementation, when the first node determines the target tunnel from the multiple tunnels based on the message attributes, it may first determine the target tunnel attributes that match the message attributes from the multiple tunnel attributes; and then determine the target tunnel having the target tunnel attributes from the multiple tunnel attributes. The process of the first node determining the target tunnel attributes that match the message attributes from the multiple tunnel attributes can refer to the process of the first node determining the target indication information that matches the message attributes from the multiple indication information, and this application will not elaborate on this.
[0014] The route of the destination node sent by the second node can carry the above-mentioned multiple tunnel attributes and multiple indication information in any manner. Optionally, the route of the destination node includes: multiple type-length-value (TLV) fields, the multiple TLV fields corresponding to the multiple tunnel attributes one-to-one, and each TLV field carrying the corresponding tunnel attribute.
[0015] Optionally, the indication information corresponding to the tunnel attribute in the route may also be carried in the TLV field corresponding to the tunnel attribute, or, optionally, the indication information corresponding to the tunnel attribute in the route is carried in other fields of the route rather than the TLV field corresponding to the tunnel attribute.
[0016] In this application, the routing of the target node is taken as an example to carry the tunnel attributes and the indication information required to be carried in certain implementation methods through the TLV field. Of course, the routing of the target node can also carry the tunnel attributes in other ways, and can also use other ways to carry the indication information required to be carried in certain implementation methods. This application does not limit this.
[0017] Optionally, the tunnel attribute in the route of the destination node sent by the second node may be any attribute of the tunnel, such as a color attribute.
[0018] Optionally, the indication information in the route of the destination node sent by the second node may be any information. For example, the indication information includes: a preference value corresponding to the color attribute.
[0019] Optionally, the message sent to the destination node carries a message attribute, which may be any attribute of the message, such as a priority. For example, the message attribute may include at least one of: a Differentiated Services Code Point (DSCP) priority, an Internet Protocol (IP) priority, an 802.1p priority, and a Multi-Protocol Label Switching Exp (MPLSExp).
[0020] In a second aspect, a message forwarding method is provided, the method comprising: a second node sending a route of a destination node to a first node, and then the second node receiving the message forwarded by the first node through a target tunnel. The route carries: an identifier of the second node and multiple tunnel attributes; the route is used to instruct the first node: to determine multiple tunnels from the first node to the second node based on the multiple tunnel attributes, to determine a target tunnel from the multiple tunnels based on the message attributes carried in the message sent to the destination node, and to forward the message to the second node through the target tunnel; the multiple tunnels correspond one-to-one to the multiple tunnel attributes, and the tunnels have the corresponding tunnel attributes.
[0021] In the message forwarding method provided by the present application, the second node sends a route carrying multiple tunnel attributes to the first node. Therefore, the first node can determine the multiple tunnels through which the first node forwards the message sent to the destination node to the second node based on the multiple tunnel attributes. When forwarding the message, the first node can filter a target tunnel from the multiple tunnels based on the message attributes carried by the message, and forward the message on the target tunnel. Therefore, different message attributes can be carried in the message according to the different requirements of the message forwarding performance, so that messages with different forwarding performance requirements can be forwarded on different target tunnels. In this way, the forwarding performance requirements of different nodes for messages, as well as the forwarding performance requirements of the same node for different messages, can be met, thereby improving the effect of message forwarding and realizing business diversion.
[0022] There are many ways to implement routing to the destination node.
[0023] As a possible implementation method, the route also carries: multiple indication information, the multiple indication information corresponding one-to-one to the multiple tunnel attributes; the route is used to instruct the first node: determine the target indication information that matches the message attribute among the multiple indication information; and determine the target tunnel among the multiple tunnels based on the target indication information, wherein the tunnel attribute of the target tunnel corresponds to the target indication information.
[0024] As another possible implementation manner, the route is used to instruct the first node to: determine a target tunnel attribute matching the message attribute from the multiple tunnel attributes; and determine the target tunnel having the target tunnel attribute from the multiple tunnels.
[0025] The route of the destination node sent by the second node can carry the above-mentioned multiple tunnel attributes and multiple indication information in any manner. Optionally, the route of the destination node includes: multiple TLV fields, the multiple TLV fields correspond one-to-one to the multiple tunnel attributes, and each TLV field carries the corresponding tunnel attribute.
[0026] Optionally, the indication information corresponding to the tunnel attribute in the route may also be carried in the TLV field corresponding to the tunnel attribute, or, optionally, the indication information corresponding to the tunnel attribute in the route is carried in other fields of the route rather than the TLV field corresponding to the tunnel attribute.
[0027] Optionally, the tunnel attribute in the route of the destination node sent by the second node may be any attribute of the tunnel, such as a color attribute.
[0028] Optionally, the indication information in the route of the destination node sent by the second node may be any information. For example, the indication information includes: a preference value corresponding to the color attribute.
[0029] Optionally, the message sent to the destination node carries a message attribute, which may be any message attribute, such as priority. For example, the message attribute may include at least one of DSCP priority, IP priority, 802.1p priority, and MPLSExp.
[0030] In a third aspect, a message forwarding device is provided, comprising: a receiving module, a first determining module, an acquiring module, a second determining module, and a forwarding module. The receiving module is configured to receive a route of a destination node sent by a second node, the route carrying: an identifier of the second node and multiple tunnel attributes; the first determining module is configured to determine, based on the multiple tunnel attributes, multiple tunnels from the first node to the second node, wherein the multiple tunnels correspond one-to-one to the multiple tunnel attributes, and the tunnels have the corresponding tunnel attributes; the acquiring module is configured to acquire a message sent to the destination node, the message carrying the message attributes; the second determining module is configured to determine a target tunnel from the multiple tunnels based on the message attributes; and the forwarding module is configured to forward the message to the second node through the target tunnel.
[0031] In the message forwarding device provided by the present application, the first determination module can determine the multiple tunnels through which the first node forwards the message sent to the destination node to the second node based on the multiple tunnel attributes carried by the route sent by the second node. Before the forwarding module forwards the message, the second determination module can filter a target tunnel from the multiple tunnels based on the message attributes carried by the message, so that the forwarding module can forward the message on the target tunnel. Therefore, different message attributes can be carried in the message according to the different requirements of the forwarding performance of the message, so that messages with different forwarding performance requirements can be forwarded on different target tunnels. In this way, the forwarding performance requirements of different nodes for messages, as well as the forwarding performance requirements of the same node for different messages, can be met, thereby improving the effect of message forwarding and realizing business diversion.
[0032] There are many ways for the second determination module to determine the target tunnel among multiple tunnels according to the message attributes, and two of them are used as examples for explanation below.
[0033] As a possible implementation method, the route also carries: multiple indication information, the multiple indication information corresponds one-to-one to multiple tunnel attributes; the second determination module is used to: determine the target indication information that matches the message attribute among the multiple indication information; determine the target tunnel among the multiple tunnels based on the target indication information, wherein the tunnel attributes of the target tunnel correspond to the target indication information.
[0034] As another possible implementation manner, the second determining module is configured to: determine a target tunnel attribute that matches the message attribute from multiple tunnel attributes; and determine a target tunnel having the target tunnel attribute from multiple tunnels.
[0035] The route of the destination node sent by the second node may carry the above-mentioned multiple tunnel attributes and multiple indication information in any manner.
[0036] Optionally, the route includes: multiple TLV fields corresponding one-to-one to multiple tunnel attributes, where the TLV fields carry the corresponding tunnel attributes. In this case, if the route also carries indication information, the indication information corresponding to the tunnel attributes may be carried in the TLV fields corresponding to the tunnel attributes. Optionally, the indication information corresponding to the tunnel attributes may also be carried in other fields of the route, rather than in the TLV fields corresponding to the tunnel attributes.
[0037] Optionally, the route includes: a plurality of TLV fields corresponding one-to-one to a plurality of tunnel attributes, the TLV fields carrying the corresponding tunnel attributes and indication information corresponding to the tunnel attributes.
[0038] The tunnel attribute may be any attribute of the tunnel. Optionally, the tunnel attribute includes a color attribute.
[0039] The indication information may be any type of information. Optionally, the indication information includes: a preference value corresponding to a color attribute.
[0040] The message sent to the destination node carries a message attribute, which can be any message attribute. Optionally, the message attribute includes at least one of: DSCP priority, IP priority, 802.1p priority, and MPLS Exp.
[0041] In a fourth aspect, a message forwarding device is provided, which includes: a sending module and a receiving module. The sending module is used to send the route of the destination node to the first node. The receiving module is used to receive the message forwarded by the first node through the target tunnel. The route carries: an identifier of the second node and multiple tunnel attributes; the route is used to instruct the first node: to determine multiple tunnels from the first node to the second node according to the multiple tunnel attributes, and to determine a target tunnel among the multiple tunnels according to the message attributes carried in the message sent to the destination node, and to forward the message to the second node through the target tunnel; the multiple tunnels correspond one-to-one to the multiple tunnel attributes, and the tunnels have the corresponding tunnel attributes.
[0042] In the message forwarding device provided by the present application, the route sent by the sending module to the first node carries multiple tunnel attributes. Therefore, the first node can determine the multiple tunnels through which the first node forwards the message sent to the destination node to the second node based on the multiple tunnel attributes. When forwarding the message, the first node can filter a target tunnel from the multiple tunnels based on the message attributes carried by the message, and forward the message on the target tunnel. Therefore, different message attributes can be carried in the message according to the different requirements of the message forwarding performance, so that messages with different forwarding performance requirements can be forwarded on different target tunnels. In this way, the forwarding performance requirements of different nodes for messages, as well as the forwarding performance requirements of the same node for different messages, can be met, thereby improving the effect of message forwarding and realizing business diversion.
[0043] The above routing can be implemented in multiple ways. The following takes two of them as examples to explain.
[0044] As a possible implementation, the route further carries: multiple indication information, where the multiple indication information corresponds one-to-one to the multiple tunnel attributes;
[0045] The route is used to instruct the first node: determine target indication information matching the message attribute from multiple indication information; and determine a target tunnel from multiple tunnels based on the target indication information, wherein the tunnel attribute of the target tunnel corresponds to the target indication information.
[0046] As another possible implementation, the route is used to instruct the first node to: determine a target tunnel attribute matching the message attribute from among multiple tunnel attributes carried in the route; and determine a target tunnel having the target tunnel attribute from among the multiple tunnels.
[0047] The route of the destination node sent by the second node may carry the above-mentioned multiple tunnel attributes and multiple indication information in any manner.
[0048] Optionally, the route includes: multiple TLV fields corresponding one-to-one to the multiple tunnel attributes, where the TLV fields carry the corresponding tunnel attributes. In this case, if the route also carries indication information, the indication information corresponding to the tunnel attributes may be carried in the TLV fields corresponding to the tunnel attributes. Optionally, the indication information corresponding to the tunnel attributes may also be carried in other fields of the route, rather than being carried in the TLV fields corresponding to the tunnel attributes.
[0049] Optionally, the route includes: a plurality of TLV fields corresponding one-to-one to the plurality of tunnel attributes, the TLV fields carrying the corresponding tunnel attributes and indication information corresponding to the tunnel attributes.
[0050] The tunnel attribute may be any attribute of the tunnel. Optionally, the tunnel attribute includes a color attribute.
[0051] The indication information may be any type of information. Optionally, the indication information includes: a preference value corresponding to a color attribute.
[0052] The message sent to the destination node carries a message attribute, which can be any message attribute. Optionally, the message attribute includes at least one of: DSCP priority, IP priority, 802.1p priority, and MPLS Exp.
[0053] In a fifth aspect, a communication system is provided, comprising a first node and a second node. The second node is configured to send a route of a destination node to the first node, the route carrying: an identifier of the second node and a plurality of tunnel attributes. The first node is configured to determine, based on the plurality of tunnel attributes, a plurality of tunnels from the first node to the second node, and after obtaining a message sent to the destination node, determine a target tunnel from the plurality of tunnels based on the message attributes carried in the message, and forward the message to the second node through the target tunnel. The plurality of tunnels correspond one-to-one to the plurality of tunnel attributes, and the tunnels have the corresponding tunnel attributes.
[0054] In the communication system provided by the present application, the second node sends a route carrying multiple tunnel attributes to the first node. Therefore, the first node can determine the multiple tunnels through which the first node forwards the message sent to the destination node to the second node based on the multiple tunnel attributes. When forwarding the message, the first node can filter a target tunnel from the multiple tunnels based on the message attributes carried by the message, and forward the message on the target tunnel. Therefore, different message attributes can be carried in the message according to different requirements for the forwarding performance of the message, so that messages with different forwarding performance requirements can be forwarded on different target tunnels. In this way, the forwarding performance requirements of different nodes for messages, as well as the forwarding performance requirements of the same node for different messages, can be met, thereby improving the effect of message forwarding and realizing business diversion.
[0055] There are many ways to implement routing to the destination node.
[0056] As a possible implementation method, the route also carries: multiple indication information, the multiple indication information corresponding one-to-one to the multiple tunnel attributes; the first node is used to determine the target indication information that matches the message attribute among the multiple indication information, and then determine the target tunnel among the multiple tunnels based on the target indication information, wherein the tunnel attribute of the target tunnel corresponds to the target indication information.
[0057] As another possible implementation manner, the first node is configured to determine a target tunnel attribute matching the message attribute from among the multiple tunnel attributes, and then determine the target tunnel having the target tunnel attribute from among the multiple tunnels.
[0058] The route of the destination node sent by the second node can carry the above-mentioned multiple tunnel attributes and multiple indication information in any manner. Optionally, the route of the destination node includes: multiple TLV fields, the multiple TLV fields correspond one-to-one to the multiple tunnel attributes, and each TLV field carries the corresponding tunnel attribute.
[0059] Optionally, the indication information corresponding to the tunnel attribute in the route may also be carried in the TLV field corresponding to the tunnel attribute, or, optionally, the indication information corresponding to the tunnel attribute in the route is carried in other fields of the route rather than the TLV field corresponding to the tunnel attribute.
[0060] Optionally, the tunnel attribute in the route of the destination node sent by the second node may be any attribute of the tunnel, such as a color attribute.
[0061] Optionally, the indication information in the route of the destination node sent by the second node may be any information. For example, the indication information includes: a preference value corresponding to the color attribute.
[0062] Optionally, the message sent to the destination node carries a message attribute, which may be any message attribute, such as priority. For example, the message attribute may include at least one of DSCP priority, IP priority, 802.1p priority, and MPLSExp.
[0063] In the sixth aspect, a communication device is provided, comprising: a processor and a memory, wherein a program is stored in the memory; the processor is used to call the program stored in the memory so that the communication device executes the message forwarding method described in any design of the first aspect.
[0064] In the seventh aspect, a communication device is provided, comprising: a processor and a memory, wherein a program is stored in the memory; the processor is used to call the program stored in the memory so that the communication device executes the message forwarding method described in any design of the second aspect.
[0065] In an eighth aspect, a computer storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the message forwarding method described in any design of the first aspect.
[0066] In the ninth aspect, a computer storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the message forwarding method described in any design of the second aspect.
[0067] In a tenth aspect, a computer program product comprising instructions is provided. When the computer program product runs on a path adjustment device, the path adjustment device executes the message forwarding method as described in any one of the designs of the first aspect.
[0068] In the eleventh aspect, a computer program product comprising instructions is provided. When the computer program product runs on a path adjustment device, the path adjustment device executes the message forwarding method as described in any one of the designs of the second aspect.
[0069] The technical effects brought about by any design method in the second aspect to the eleventh aspect can refer to the technical effects brought about by the corresponding design method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 A schematic diagram of a scenario in which a message is forwarded along a tunnel provided in an embodiment of the present application;
[0071] Figure 2 A schematic diagram of a message forwarding path provided in an embodiment of the present application;
[0072] Figure 3A schematic diagram of the structure of a communication system provided in an embodiment of the present application;
[0073] Figure 4 A schematic diagram of the structure of a communication device provided in an embodiment of the present application;
[0074] Figure 5 A flowchart of a message forwarding method provided in an embodiment of the present application;
[0075] Figure 6 A schematic diagram of a local structure of a destination node route provided in an embodiment of the present application;
[0076] Figure 7 A schematic diagram of the structure of a TLV field provided in an embodiment of the present application;
[0077] Figure 8 A schematic diagram of another message forwarding path provided in an embodiment of the present application;
[0078] Figure 9 A schematic diagram of the structure of a message forwarding device provided in an embodiment of the present application;
[0079] Figure 10 A schematic structural diagram of another message forwarding device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0080] In order to make the principles and technical solutions of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0081] A communication system typically includes multiple nodes, and a node in the communication system may be any device capable of forwarding messages, such as a router, a gateway, and the like. A tunnel for forwarding messages may be deployed in the communication system. The tunnel in the embodiment of the present application may be any type of tunnel, such as a tunnel based on the Segment Routing Internet Protocol version 6 policy (SRv6 policy), a Segment Routing Traffic Engineering policy (SR-TE policy), or a best-effort Segment Routing Best Effort policy (SR-BE policy) tunnel.
[0082] A tunnel consists of multiple nodes (which can be located in the same or different network domains). The tunnel can be a tunnel from the head node to the tail node among the multiple nodes. Messages transmitted on this tunnel can be transmitted from the head node to the tail node. In addition, the tunnel has a color attribute that can be used to indicate the service level agreement (SLA) corresponding to the tunnel.
[0083] For the head node among multiple nodes, the head node can be configured with information of multiple tunnels, and the head node can forward the message on any tunnel among the multiple tunnels based on the information of the tunnel. Taking the head node as the first node as an example, before the first node forwards the message, the second node (for example, the tail node of a tunnel where the head node is located) will send the route of the destination node connected to the second node to the first node, and the route includes: the identifier of the second node and a color attribute. After receiving the route, the first node can determine the target tunnel corresponding to the route among the multiple tunnels based on the route. Among them, the head node of the target tunnel is the first node, the tail node is the second node, and the tunnel has the color attribute in the route. After receiving the message that needs to be sent to the destination node, the first node will forward the message on the target tunnel corresponding to the route of the destination node.
[0084] For example, Figure 1 A schematic diagram of a scenario in which a message is forwarded along a tunnel is provided in an embodiment of the present application, such as Figure 1 As shown, this scenario includes multiple nodes: Customer Edge (CE) nodes CE1, CE2, CE3, and CE4; Provider Edge (PE) nodes PE1 and PE2; and Provider (P) nodes P1, P2, and P3. PEs and CEs are private network neighbors. For example, CE1, CE2, and CE3 are all private network neighbors with PE1, and CE4 is a private network neighbor with PE2. PEs are public network neighbors with virtual private networks (VPNs). For example, PE1 and PE2 are VPN public network neighbors, and PE1 and PE2 are connected via P1, P2, and P3, respectively.
[0085] A PE is configured with information for multiple tunnels. For example, PE1 is configured with information for tunnels 1, 2, and 3. Tunnel 1 includes PE1, P1, and PE2; tunnel 2 includes PE1, P2, and PE2; and tunnel 3 includes PE1, P3, and PE2. Each of these tunnels has a color attribute. For example, tunnel 1 has color attribute A1; tunnel 2 has color attribute A2; and tunnel 3 has color attribute A3.
[0086] PE2 will publish CE4's route to PE1. The route includes: PE2's identifier and a color attribute (such as color attribute A1). After receiving CE4's route, PE1 will find the target tunnel (Tunnel 1) corresponding to CE4's route from multiple tunnels. The head node of the target tunnel is PE1, the tail node is PE2, and the color attribute of the tunnel is A1. Figure 2 As shown in the figure, when each node, CE1, CE2, and CE3, needs to send a message to CE4, it sends the message intended for CE4 to PE1. After receiving the message intended for CE4, PE1 forwards the message on the target tunnel (Tunnel 1), for example, forwarding the tunnel along the path between PE1, P1, and PE2. Therefore, all messages sent by each node, CE1, CE2, and CE3, are forwarded on the same target tunnel (Tunnel 1).
[0087] However, CE1, CE2, and CE3 may have different requirements for packet forwarding performance. Each node in CE1, CE2, and CE3 may also have different requirements for packet forwarding performance. Forwarding all these packets through the same destination tunnel will result in poor packet forwarding performance.
[0088] The present invention provides a packet forwarding method that can identify multiple tunnels based on multiple tunnel attributes carried in a route, and then select a target tunnel for forwarding the message from the multiple tunnels based on the message attributes carried in the message. This allows messages carrying different message attributes to be forwarded over different tunnels, thereby meeting the forwarding performance requirements of different nodes for messages, as well as the forwarding performance requirements of the same node for different messages, improving the effectiveness of message forwarding and achieving service diversion.
[0089] The message forwarding method provided in the embodiment of the present application can be used in the communication system provided in the embodiment of the present application. Before describing the message forwarding method provided in the embodiment of the present application, a brief introduction to the communication system provided in the embodiment of the present application is first given.
[0090] For example, Figure 3 This is a schematic diagram of the structure of a communication system provided in an embodiment of the present application. The communication system includes multiple forwarding nodes, such as Figure 3 It should be noted that the communication system may further include other forwarding nodes in addition to the first node 01 and the second node 02, which is not limited in the embodiment of the present application.
[0091] The forwarding nodes in the communication system (such as the first node 01 and the second node 02) are all communication devices. For example, the communication device may include: a processor; the processor is used to couple with the memory, and after reading the instructions in the memory, execute the method performed by the communication device as described in the embodiment of the present application according to the instructions.
[0092] In the communication device, there may be multiple processors, and the memory coupled to the processor may be independent of the processor or the communication device, or may be within the processor or network device. The memory may be a physically independent unit, or a storage space on a cloud server or a network hard disk, etc. Optionally, there may be one or more memories. When there are multiple memories, they may be located in the same or different locations, and may be used independently or in combination. For example, when the memory is located inside the communication device, please refer to Figure 4 , Figure 4 The present invention provides a structural diagram of a communication device according to an embodiment of the present invention. The communication device 200 includes: a processor 202 and a memory 201, wherein the memory 201 is used to store programs, and the processor 202 is used to call the programs stored in the memory 201 so that the communication device executes the corresponding method or function. Optionally, as Figure 3 As shown, the communication device 200 may further include at least one communication interface 203 and at least one communication bus 204. The memory 201, the processor 202, and the communication interface 203 are communicatively connected via the communication bus 204. The communication interface 203 is used to communicate with other devices under the control of the processor 202, and the processor 202 can call programs stored in the memory 201 via the communication bus 204.
[0093] The following will be Figure 5 Taking the shown embodiment as an example, the message forwarding method provided in the embodiment of the present application is explained and illustrated.
[0094] For example, Figure 5 A flowchart of a message forwarding method provided in an embodiment of the present application is shown as follows: Figure 5 As shown, the message forwarding method may include:
[0095] S501: The second node sends a route of a destination node to the first node. The route carries: an identifier of the second node, multiple tunnel attributes, and multiple indication information. The multiple indication information corresponds to the multiple tunnel attributes in a one-to-one manner.
[0096] The destination node may be a node connected to the second node, and the second node is located on the path between the first node and the destination node. Figure 1 Taking the illustrated scenario as an example, the first node may be node PE1, the second node may be node PE2, and the destination node may be node CE4 or other device types.
[0097] The route of the destination node carries the identifier of the second node. For example, the second node may carry the identifier of the second node as the next hop identifier in the route. In this case, the route of the destination node carries the next hop identifier, and the next hop identifier is the identifier of the second node. Where possible, the second node may not carry the identifier of the second node as the next hop identifier in the route, and this embodiment of the present application is not limited to this.
[0098] The route to the destination node also carries multiple tunnel attributes and multiple indication information corresponding to the multiple tunnel attributes. The multiple indication information corresponds one-to-one with the multiple tunnel attributes carried in the route. The tunnel attribute can be any tunnel attribute, such as a color attribute. The indication information can be any type of information, such as a preference value, a number, a priority, etc.
[0099] In this embodiment of the present application, a tunnel attribute is a color attribute, and the corresponding indication information of the tunnel attribute is a preference value corresponding to the color attribute. For example, as shown in Table 1, a route to a destination node may carry three color attributes: color attribute A1, color attribute A2, and color attribute A3. The route may also carry three preference values: preference value B1 corresponding to color attribute A1, preference value B2 corresponding to color attribute A2, and preference value B3 corresponding to color attribute A3.
[0100] Table 1
[0101] Color attributes Preference value A1 B1 A2 B2 A3 B3
[0102] The route of the destination node sent by the second node can carry the aforementioned multiple tunnel attributes and multiple indication information in any manner. For example, the route of the destination node includes: multiple TLV fields, each of which corresponds one-to-one to multiple tunnel attributes, each TLV field carrying a corresponding tunnel attribute and indication information corresponding to the tunnel attribute. Alternatively, the tunnel attributes may be carried in the corresponding TLV fields, but the indication information corresponding to the tunnel attributes may be carried in other fields of the route, rather than in the TLV fields corresponding to the tunnel attributes.
[0103] For example, Figure 6 A schematic diagram of the local structure of a destination node route provided in an embodiment of the present application. Assuming that the color attributes and preference values carried by the destination node route are as shown in Table 1, then Figure 6 As shown, the route includes three TLV fields, namely TLV field 1, TLV field 2, and TLV field 3. TLV field 1 carries color attribute A1 and preference value B1, TLV field 2 carries color attribute A2 and preference value B2, and TLV field 3 carries color attribute A3 and preference value B3.
[0104] Figure 6 The TLV field can be implemented in any way, for example, Figure 6 The structure of each TLV field in Figure 7 As shown, the TLV field includes: a type (Type) subfield, a length (Length) subfield, a reserved (Reserved) subfield, a preference value subfield, and a data (Value) subfield arranged in sequence. Among them, the type subfield is used to indicate the type of the TLV field, the length subfield is used to indicate the length of all subfields in the TLV field after the length subfield, the preference value subfield is used to carry the preference value that the TLV field needs to carry, and the data subfield is used to carry the color attribute that the TLV field needs to carry. Optionally, Figure 6 The type subfield, length subfield, reserved subfield, and preference value subfield may each include 8 bits, and the data subfield may include 32 bits.
[0105] In the embodiment of the present application, the route of the target node carries the tunnel attributes and the indication information required to be carried in certain implementation methods through the TLV field as an example. The route of the target node can also carry the tunnel attributes in other ways, and can also use other ways to carry the indication information required to be carried in certain implementation methods. The embodiment of the present application does not limit this.
[0106] S502: The first node determines multiple tunnels from the first node to the second node according to multiple tunnel attributes in the route, wherein the multiple tunnels correspond to the multiple tunnel attributes one by one, and the tunnels have corresponding tunnel attributes.
[0107] The first node can be configured with information about some tunnels. Information about each tunnel includes its head node, tail node, and tunnel attributes. Based on the multiple tunnel attributes carried in the route, the first node can filter out multiple tunnels corresponding to the multiple tunnel attributes. Each of these multiple tunnels has its head node as the first node, its tail node as the second node, and possesses the tunnel attributes corresponding to the tunnel.
[0108] For example, taking the color attribute as an example, as shown in Table 2, the first node is configured with information about tunnels 1, 2, 3, 4, and 5. Tunnel 1 has color attribute A1, tunnel 2 has color attribute A2, tunnel 3 has color attribute A3, tunnel 4 has color attribute A1, and tunnel 5 has color attribute A2. The head nodes of tunnels 1, 2, and 3 are all the first node, and their tail nodes are all the second node. The head nodes of tunnels 4 and 5 are both the first node, and their tail nodes are both the third node.
[0109] Table 2
[0110] tunnel Head node tail node Color attributes 1 First Node Second node A1 2 First Node Second node A2 3 First Node Second node A3 4 First Node The third node A1 5 First Node The third node A2
[0111] Based on the three color attributes carried in the route (as shown in Table 1) and the identification information of the tail node, the first node can select three tunnels from the five tunnels shown in Table 2 that correspond to the three color attributes. These tunnels are: tunnels 1, 2, and 3. The head node of each of these three tunnels is the first node, and the tail node is the second node. Tunnel 1 corresponds to color attribute A1 carried in the route of the destination node and has color attribute A1; tunnel 2 corresponds to color attribute A2 carried in the route of the destination node and has color attribute A2; tunnel 3 corresponds to color attribute A3 carried in the route of the destination node and has color attribute A3.
[0112] After determining multiple tunnels corresponding one-to-one to the multiple tunnel attributes carried in the route, the first node can filter out a target tunnel from the multiple tunnels through subsequent operations and forward the message to be sent to the destination node on the target tunnel.
[0113] S503: The first node obtains a message sent to the destination node, where the message carries message attributes.
[0114] The message sent to the destination node may be a message received by the first node, or the message may be a message generated by the first node. The embodiment of the present application does not limit the way in which the first node obtains the message. For example, assuming that the first node is Figure 1 The second node is the node PE1, the second node is the node PE2, and the destination node is the node CE4. Then, the message may be a message sent from the node CE1 to the node PE1.
[0115] The message sent to the destination node carries a message attribute, which can be any message attribute, such as priority. For example, the message attribute can include at least one of DSCP priority, IP priority, 802.1p priority, and MPLS Exp.
[0116] S504: The first node determines target indication information matching the message attribute from multiple indication information.
[0117] After obtaining the message sent to the destination node, the first node may filter target indication information that matches the message attribute carried in the message from multiple indication information in the route of the destination node.
[0118] For example, when determining the target indication information, the first node may determine, based on the correspondence between the message attributes and the indication information, the indication information of the message attributes carried by the corresponding message in the correspondence as the target indication information.
[0119] Take the case where the message attribute is the DSCP priority and the indication information is the preference value as an example. Assume that the correspondence between the message attribute and the indication information is as shown in Table 3, and the multiple preference values carried in the route of the destination node are as shown in Table 1. If the message attribute carried by the message sent to the destination node is DSCP priority C1, then the first node can determine the preference value B1 corresponding to the DSCP priority C1 in Table 3 as the target indication information that matches the message attribute carried by the message. In a possible implementation, the values of the DSCP priority and the corresponding preference value can be the same. In this case, it can also be understood that the information carried in the message for determining the target tunnel is the preference value itself; or, the values of the DSCP priority and the corresponding preference value can also be different, but have the correspondence shown in Table 3.
[0120] Table 3
[0121] DSCP priority Preference value C1 B1 C2 B2 C3 B3 C4 B4
[0122] Optionally, the first node may also determine target indication information that matches a message attribute carried in a message sent to the destination node based on a certain matching rule. For example, the first node may determine indication information that matches the message attribute based on the message attribute and a preset matching rule, and determine the matching indication information as the target indication information.
[0123] S505: The first node determines a target tunnel among multiple tunnels according to the target indication information, wherein a tunnel attribute of the target tunnel corresponds to the target indication information.
[0124] In S502, each of the multiple tunnels determined by the first node has corresponding tunnel attributes, and the route of the destination node carries indication information corresponding to the tunnel attributes. In S505, the first node may determine the tunnel having the tunnel attributes corresponding to the target indication information as the target tunnel.
[0125] Optionally, after determining multiple tunnels corresponding one-to-one to the multiple tunnel attributes carried in the route in S502, the first node may further obtain indication information corresponding to each of the multiple tunnels based on the indication information corresponding to the tunnel attributes carried in the route of the destination node. The indication information corresponding to each tunnel is: indication information corresponding to the tunnel attribute corresponding to the tunnel. When the first node determines a target tunnel from the multiple tunnels based on the target indication information, it may determine the tunnel corresponding to the target indication information as the target tunnel based on the indication information corresponding to the multiple tunnels.
[0126] For example, consider the case where the tunnel attribute indication information is a tunnel attribute preference value. If the indication information carried by the route is as shown in Table 1, and the multiple tunnels determined by the first node include tunnels 1, 2, and 3 as shown in Table 2, then, as shown in Table 4, the first node can determine a preference value B1 corresponding to tunnel 1, a preference value B2 corresponding to tunnel 2, and a preference value B3 corresponding to tunnel 3. If the target indication information is preference value B1, the first node can determine tunnel 1 corresponding to preference value B1 as the target tunnel.
[0127] Table 4
[0128]
[0129]
[0130] S506: The first node forwards the message to the second node through the target tunnel.
[0131] For example, it is assumed that the multiple tunnels determined by the first node in S502 according to the multiple tunnel attributes carried by the route include: Figure 1 Tunnels 1, 2, and 3 in the.
[0132] For example, if the first node determines in step S504 based on the DSCP priority C1 carried in the message that the target indication information is the preference value B1 of the color attribute A1 of tunnel 1, the first node can determine that tunnel 1 is the target tunnel and forward the message to the second node through tunnel 1.
[0133] As another example, if the target indication information determined by the first node in S504 based on the DSCP priority C2 carried in the message is the preference value B2 of the color attribute A2 of tunnel 2, the first node can determine that tunnel 2 is the target tunnel and forward the message to the second node through tunnel 2.
[0134] For example, please combine Figure 1 and Figure 8 Assume that the first packet sent from CE1 to PE1 carries DSCP priority C1, the second packet sent from CE2 to PE1 carries DSCP priority C2, and the third packet sent from CE3 to PE1 carries DSCP priority C3. PE1 will then forward the first packet on tunnel 1 (along the path between PE1, P1, and PE2), the second packet on tunnel 2 (along the path between PE1, P2, and PE2), and the third packet on tunnel 3 (along the path between PE1, P3, and PE2).
[0135] It can be seen that in an embodiment of the present application, the first node can determine the multiple tunnels through which the first node forwards a message sent to the destination node to the second node based on the multiple tunnel attributes carried by the route sent by the second node. When forwarding the message, the first node can filter a target tunnel from the multiple tunnels based on the message attributes carried by the message, and forward the message on the target tunnel. Therefore, different message attributes can be carried in the message according to different requirements for the forwarding performance of the message, so that messages with different forwarding performance requirements can be forwarded on different target tunnels. In this way, the forwarding performance requirements of different nodes for messages, as well as the forwarding performance requirements of the same node for different messages, can be met, thereby improving the effect of message forwarding and realizing business diversion.
[0136] In the related art, nodes can classify messages based on features such as the source address, destination address, source port, and destination port of the message, and transmit different types of messages on different paths. However, this solution requires configuring classification rules based on features such as the source address, destination address, source port, and destination port on the node. When there are many messages that need to be classified, there is a lot of information to be configured on the node, and the configuration difficulty is high. In the message forwarding method provided in the embodiment of the present application, there is no need to configure classification rules based on features such as the source address, destination address, source port, and destination port on the first node, and business diversion can be achieved at the routing level. Therefore, the information configured on the node is reduced, and the difficulty of the solution is reduced. In addition, in Figure 5 In the embodiment shown, some correspondences are configured in the first node (such as the correspondences between the above-mentioned message attributes and the indication information). Compared with the classification rules based on source address, destination address, source port, destination port and other features configured on the first node, the information configured in the first node in the embodiment of the present application is less.
[0137] The routing in the embodiments of the present application can be based on any protocol, such as Border Gateway Protocol version 4.0 (BGP-4) routing, or Multiprotocol Extensions for BGP-4 (MP-BGP) routing. MP-BGP is a multiprotocol extension of BGP-4 that supports both the traditional fourth-version Internet Protocol (IPv4) address family and other address families, such as the Virtual Private Network (VPN-IPv4) address family based on the fourth-version Internet Protocol and the sixth-version Internet Protocol (IPv6) address family.
[0138] The tunnel in the embodiment of the present application may include one or more paths, and the messages forwarded on the tunnel will be forwarded along any path in the tunnel. The above examples all take the example of a tunnel including one path.
[0139] For example, taking the SR-TE policy tunnel as an example, the policy of the SR-TE policy tunnel includes multiple candidate paths, each candidate path includes one or more segment routing lists, and each segment routing list is used to indicate a path. The SR-TE policy tunnel has a head node and a tail node. The head node of the path indicated by each segment routing list is the head node of the SR-TE policy tunnel, and the tail node of the path indicated by each segment routing list is the tail node of the SR-TE policy tunnel. The path of the SR-TE policy tunnel may include: the path indicated by each segment routing list in the candidate path with the highest priority among the multiple candidate paths.
[0140] In the above embodiment, the first node determines the target tunnel based on tunnel attributes, indication information, and message attributes. Alternatively, the first node may determine the target tunnel based on tunnel attributes and message attributes. In this case, the route of the destination node may not carry the aforementioned multiple indication information.
[0141] For example, when the first node determines the target tunnel based on the tunnel attributes and the message attributes, the first node may not execute the above S504 and S505. Instead, after S503, the first node may first determine the target tunnel attributes that match the message attributes (such as DSCP priority) from multiple tunnel attributes (such as color attributes), and then filter the target tunnels with the target tunnel attributes from the multiple tunnels determined in S502, and then forward the message to the destination node on the target tunnel in S506. The process of the first node determining the target tunnel attributes that match the message attributes from multiple tunnel attributes can refer to the process of the first node determining the target indication information that matches the message attributes from multiple indication information, and the embodiments of the present application will not be described in detail here.
[0142] As can be seen, embodiments of the present application can match the tunnel attributes carried by a route with the message attributes to determine the target tunnel. In this solution, the tunnel attributes can also function as the aforementioned indication information. For example, the multiple color attributes carried in the route received by the first node also have priority attributes. In this case, the route does not need to carry the aforementioned indication information, and can directly match the tunnel attributes with the message attributes, thereby reducing the information required to be carried by the route.
[0143] In the message forwarding method provided in the present application, regardless of whether the first node determines the target tunnel based on tunnel attributes, indication information and message attributes, or determines the target tunnel based on tunnel attributes and message attributes, the first node can first determine multiple tunnels based on multiple tunnel attributes, and then determine the target tunnel among the multiple tunnels based on the message attributes.
[0144] Combined with the above Figures 1 to 8 , describes in detail the message forwarding method provided by the present application. It can be understood that in order to implement the functions described in the above methods, the node must include hardware and / or software modules that perform the corresponding functions. In combination with the execution process of each method described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of this application.
[0145] In this embodiment, the functional modules of the corresponding device can be divided according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into a single processing module. The above integrated modules can be implemented in the form of hardware. It should be noted that the module division in this embodiment is illustrative and is specifically used as a possible division method for logical functions. In actual implementation, other division methods may be used.
[0146] When the functional module division method is adopted, the following will be combined Figure 9 and Figure 10 Describe the message forwarding device provided by this application.
[0147] Figure 9 This is a block diagram of a message forwarding device provided in an embodiment of the present application. The message forwarding device can be used as the first node in the aforementioned embodiments. Figure 9 As shown, the message forwarding device includes: a receiving module 901 , a first determining module 902 , an acquiring module 903 , a second determining module 904 and a forwarding module 905 .
[0148] The receiving module 901 is used to receive the route of the destination node sent by the second node, and the route carries: the identifier of the second node and multiple tunnel attributes. The operations performed by the receiving module 901 can be referred to Figure 5 The content related to the first node in S501 in the illustrated embodiment.
[0149] The first determining module 902 is used to determine multiple tunnels from the first node to the second node according to multiple tunnel attributes, wherein the multiple tunnels correspond to the multiple tunnel attributes one by one, and the tunnels have corresponding tunnel attributes; the operation performed by the first determining module 902 can refer to Figure 5 The content related to the first node in S502 in the illustrated embodiment.
[0150] The acquisition module 903 is used to obtain the message sent to the destination node, and the message carries the message attribute; the operation performed by the acquisition module 903 can be referred to Figure 5 The content related to the first node in S503 in the illustrated embodiment.
[0151] The second determining module 904 is used to determine the target tunnel among multiple tunnels according to the message attributes; the operation performed by the second determining module 904 can be referred to Figure 5 The content related to the first node in S504 and S505 in the illustrated embodiment.
[0152] The forwarding module 905 is used to forward the message to the second node through the target tunnel. The operations performed by the forwarding module 905 can be referred to Figure 5 The content related to the first node in S506 in the illustrated embodiment.
[0153] There are multiple ways for the second determining module 904 to determine the target tunnel among multiple tunnels according to the message attributes, and two of the ways are used as examples for explanation below.
[0154] As a possible implementation method, the route also carries: multiple indication information, the multiple indication information corresponds one-to-one to multiple tunnel attributes; the second determination module 904 is used to: determine the target indication information that matches the message attribute among the multiple indication information; determine the target tunnel among the multiple tunnels based on the target indication information, wherein the tunnel attributes of the target tunnel correspond to the target indication information.
[0155] As another possible implementation, the second determining module 904 is configured to: determine a target tunnel attribute that matches the message attribute from multiple tunnel attributes; and determine a target tunnel having the target tunnel attribute from multiple tunnels.
[0156] The route of the destination node sent by the second node may carry the above-mentioned multiple tunnel attributes and multiple indication information in any manner.
[0157] Optionally, the route includes: multiple TLV fields corresponding to multiple tunnel attributes, and the TLV fields carry the corresponding tunnel attributes. In this case, if the route also carries indication information, the indication information corresponding to the tunnel attributes can be carried in the TLV fields corresponding to the tunnel attributes. Of course, the indication information corresponding to the tunnel attributes can also be carried in other fields of the route instead of the TLV fields corresponding to the tunnel attributes.
[0158] Optionally, the route includes: a plurality of TLV fields corresponding one-to-one to a plurality of tunnel attributes, the TLV fields carrying the corresponding tunnel attributes and indication information corresponding to the tunnel attributes.
[0159] The tunnel attribute may be any attribute of the tunnel. Optionally, the tunnel attribute includes a color attribute.
[0160] The indication information may be any type of information. Optionally, the indication information includes: a preference value corresponding to a color attribute.
[0161] The message sent to the destination node carries a message attribute, which can be any message attribute. Optionally, the message attribute includes at least one of: DSCP priority, IP priority, 802.1p priority, and MPLS Exp.
[0162] In summary, in the message forwarding device provided by the embodiment of the present application, the first determination module can determine the multiple tunnels through which the first node forwards the message sent to the destination node to the second node based on the multiple tunnel attributes carried by the route sent by the second node. Before forwarding the message, the second determination module can filter a target tunnel from the multiple tunnels based on the message attributes carried by the message, so that the forwarding module can forward the message on the target tunnel. Therefore, different message attributes can be carried in the message according to the different requirements of the forwarding performance of the message, so that messages with different forwarding performance requirements can be forwarded on different target tunnels. In this way, the requirements of different nodes for the forwarding performance of the message, as well as the requirements of the same node for the forwarding performance of different messages, can be met, thereby improving the effect of message forwarding and realizing business diversion.
[0163] When an integrated unit is employed, the message forwarding device for the first node provided herein may include a processing module, a storage module, and a communication module. The processing module may be used to control and manage the actions of the message forwarding device. For example, it may be used to support the message forwarding device in executing the actions performed by the first node in S501 to S506. The storage module may be used to support the message forwarding device in storing program code and data. The communication module may be used for communication between the message forwarding device and other devices.
[0164] The processing module may be a processor or a controller. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module may be a memory. The communication module may specifically be a device that interacts with other devices, such as a radio frequency circuit, a Bluetooth chip, or a Wi-Fi chip.
[0165] In one embodiment, when the processing module is a processor, the storage module is a memory, and the communication module is a communication interface, the message forwarding device involved in this embodiment can be a Figure 4 In one implementation, the above modules included in the message forwarding device may be computer programs stored in a memory and called by a processor to implement the corresponding execution functions of each module.
[0166] Figure 10 This is a block diagram of another message forwarding device provided in an embodiment of the present application. The message forwarding device can be used as the second node in the aforementioned embodiments. Figure 10 As shown, the message forwarding device includes: a sending module 1001 and a receiving module 1002.
[0167] The sending module 1001 is used to send a route of the destination node to the first node, and the route carries: an identifier of the second node and multiple tunnel attributes; the route is used to instruct the first node: determine multiple tunnels from the first node to the second node according to the multiple tunnel attributes, and determine a target tunnel from the multiple tunnels according to the message attributes carried in the message sent to the destination node, and forward the message to the second node through the target tunnel; wherein the multiple tunnels correspond to the multiple tunnel attributes one by one, and the tunnels have corresponding tunnel attributes; the operations performed by the sending module 1001 can be referred to Figure 5 The content related to the second node in S501 in the illustrated embodiment.
[0168] The receiving module 1002 is configured to receive a message forwarded by the first node through the target tunnel. The operations performed by the receiving module 1002 can be referred to Figure 5 The content related to the second node in S506 in the illustrated embodiment.
[0169] The above routing can be implemented in multiple ways. The following takes two of them as examples to explain.
[0170] As a possible implementation, the route further carries: multiple indication information, where the multiple indication information corresponds one-to-one to the multiple tunnel attributes;
[0171] The route is used to instruct the first node: determine target indication information matching the message attribute from multiple indication information; and determine a target tunnel from multiple tunnels based on the target indication information, wherein the tunnel attribute of the target tunnel corresponds to the target indication information.
[0172] As another possible implementation, the route is used to instruct the first node to: determine a target tunnel attribute matching the message attribute from among multiple tunnel attributes carried in the route; and determine a target tunnel having the target tunnel attribute from among the multiple tunnels.
[0173] The route of the destination node sent by the second node may carry the above-mentioned multiple tunnel attributes and multiple indication information in any manner.
[0174] Optionally, the route includes: multiple TLV fields corresponding one-to-one to the multiple tunnel attributes, and the TLV fields carry the corresponding tunnel attributes. In this case, if the route also carries indication information, the indication information corresponding to the tunnel attributes can be carried in the TLV fields corresponding to the tunnel attributes. Of course, the indication information corresponding to the tunnel attributes can also be carried in other fields of the route instead of the TLV fields corresponding to the tunnel attributes.
[0175] Optionally, the route includes: a plurality of TLV fields corresponding one-to-one to the plurality of tunnel attributes, the TLV fields carrying the corresponding tunnel attributes and indication information corresponding to the tunnel attributes.
[0176] The tunnel attribute may be any attribute of the tunnel. Optionally, the tunnel attribute includes a color attribute.
[0177] The indication information may be any type of information. Optionally, the indication information includes: a preference value corresponding to a color attribute.
[0178] The message sent to the destination node carries a message attribute, which can be any message attribute. Optionally, the message attribute includes at least one of: DSCP priority, IP priority, 802.1p priority, and MPLS Exp.
[0179] In summary, in the message forwarding device provided by the embodiment of the present application, the route sent by the sending module to the first node carries multiple tunnel attributes. Therefore, the first node can determine the multiple tunnels through which the first node forwards the message sent to the destination node to the second node based on the multiple tunnel attributes. When forwarding the message, the first node can filter a target tunnel from the multiple tunnels based on the message attributes carried by the message, and forward the message on the target tunnel. Therefore, different message attributes can be carried in the message according to the different requirements of the message forwarding performance, so that messages with different forwarding performance requirements can be forwarded on different target tunnels. In this way, the forwarding performance requirements of different nodes for messages, as well as the forwarding performance requirements of the same node for different messages, can be met, thereby improving the effect of message forwarding and realizing business diversion.
[0180] When an integrated unit is used, the message forwarding device for the second node provided in this application may include a processing module, a storage module, and a communication module. The processing module may be used to control and manage the actions of the message forwarding device. For example, it may be used to support the message forwarding device in executing the actions performed by the second node in S501 to S506. The storage module may be used to support the message forwarding device in executing and storing program code and data. The communication module may be used for communication between the message forwarding device and other devices.
[0181] The processing module, storage module and communication module can respectively refer to the processing module, storage module and communication module in the message forwarding device for the first node mentioned above, and the embodiments of the present application are not described here in detail.
[0182] In one embodiment, when the processing module is a processor, the storage module is a memory, and the communication module is a communication interface, the message forwarding device involved in this embodiment can be a Figure 4 In one implementation, the above modules included in the message forwarding device may be computer programs stored in a memory and called by a processor to implement the corresponding execution functions of each module.
[0183] The embodiment of the present application provides a communication system. The structure of the communication system can be as follows: Figure 3 As shown, the communication system may include: a first node and a second node. The functions of the first node and the second node may refer to the corresponding functions described in the above embodiments, and will not be described in detail in this embodiment of the present application.
[0184] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is used to execute the method used by the first node to execute in any message forwarding method provided in the embodiment of the present application.
[0185] An embodiment of the present application provides another computer-readable storage medium, which stores a computer program. The computer program is used to execute the method used by the second node to execute in any message forwarding method provided in the embodiment of the present application.
[0186] An embodiment of the present application provides a computer program product comprising instructions. When the computer program product is run on a path adjustment device, the path adjustment device executes the method for execution by the first node in any message forwarding method provided in the embodiment of the present application.
[0187] An embodiment of the present application provides a computer program product comprising instructions. When the computer program product is run on a path adjustment device, the path adjustment device executes the method for execution by the second node in any message forwarding method provided in the embodiment of the present application.
[0188] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium (e.g., a solid-state hard disk).
[0189] In this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The term "at least one" refers to one or more, and "a plurality" refers to two or more, unless otherwise expressly defined.
[0190] The different types of embodiments, such as the method embodiments and device embodiments provided in the embodiments of this application, can refer to each other, and the embodiments of this application are not limited thereto. The order of the operations of the method embodiments provided in the embodiments of this application can be appropriately adjusted, and the operations can be increased or decreased accordingly according to the circumstances. Any person skilled in the art who can easily think of a method of variation within the technical scope disclosed in this application should be included in the scope of protection of this application, and therefore will not be described in detail.
[0191] In the corresponding embodiments provided in this application, it should be understood that the disclosed systems, devices, and apparatuses can be implemented through other structural methods. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0192] Units described as separate components may or may not be physically separate, and components described as units may or may not be physical units, and may be located in one place or distributed across multiple devices. Some or all of these units may be selected to achieve the purpose of this embodiment based on actual needs.
[0193] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A message forwarding method, characterized in that: The method is performed by a first node, and includes: receiving a route of a destination node sent by a second node, where the route carries: an identifier of the second node and a plurality of tunnel attributes; Determining, based on the multiple tunnel attributes, multiple tunnels from the first node to the second node, wherein the multiple tunnels correspond to the multiple tunnel attributes one-to-one, the tunnels have the corresponding tunnel attributes, and different tunnels in the multiple tunnels are used to forward messages with different forwarding performance requirements; Obtaining a message sent to the destination node, the message carrying message attributes; determining a target tunnel among the multiple tunnels according to the message attributes, where the tunnel attributes of the target tunnel match the message attributes; Forward the message to the second node through the target tunnel.
2. The method according to claim 1, characterized in that The route further carries: a plurality of indication information, the plurality of indication information corresponding one-to-one to the plurality of tunnel attributes; Determining a target tunnel among the multiple tunnels according to the message attribute includes: Determining target indication information matching the message attribute among the multiple indication information; The target tunnel is determined from the multiple tunnels according to the target indication information, wherein the tunnel attribute of the target tunnel corresponds to the target indication information.
3. The method according to claim 1, characterized in that Determining a target tunnel among the multiple tunnels according to the message attribute includes: Determining a target tunnel attribute that matches the message attribute from the multiple tunnel attributes; The target tunnel having the target tunnel attribute is determined among the multiple tunnels.
4. The method according to claim 2 or 3, characterized in that The route includes: a plurality of type-length-value (TLV) fields corresponding one-to-one to the plurality of tunnel attributes, and the TLV fields carry the corresponding tunnel attributes.
5. The method according to claim 2, characterized in that The route includes: a plurality of TLV fields corresponding one-to-one to the plurality of tunnel attributes, the TLV fields carrying the corresponding tunnel attributes and indication information corresponding to the tunnel attributes.
6. The method according to any one of claims 1-3 and 5, characterized in that: The tunnel attributes include a color attribute.
7. The method according to claim 6, characterized in that The route further carries: a plurality of indication information, the plurality of indication information corresponds one-to-one to the plurality of tunnel attributes, and the indication information includes: a preference value corresponding to the color attribute.
8. The method according to any one of claims 1-3, 5, and 7, characterized in that: The message attributes include: at least one of: Differentiated Services Code Point (DSCP) priority, Internet Protocol (IP) priority, 802.1p priority, and Multi-Protocol Label Switching (MPLSExp) priority.
9. A message forwarding device, characterized in that: The message forwarding device includes: a receiving module, configured to receive a route of a destination node sent by a second node, wherein the route carries: an identifier of the second node and a plurality of tunnel attributes; a first determining module, configured to determine, based on the multiple tunnel attributes, multiple tunnels from the first node to the second node, wherein the multiple tunnels correspond to the multiple tunnel attributes one-to-one, the tunnels have the corresponding tunnel attributes, and different tunnels in the multiple tunnels are used to forward messages with different forwarding performance requirements; an acquisition module, configured to acquire a message sent to the destination node, wherein the message carries message attributes; a second determining module, configured to determine a target tunnel among the multiple tunnels according to the message attributes, wherein the tunnel attributes of the target tunnel match the message attributes; A forwarding module is used to forward the message to the second node through the target tunnel.
10. The message forwarding device according to claim 9, characterized in that: The route further carries: a plurality of indication information, the plurality of indication information corresponding one-to-one to the plurality of tunnel attributes; The second determining module is used for: Determining target indication information matching the message attribute among the multiple indication information; The target tunnel is determined from the multiple tunnels according to the target indication information, wherein the tunnel attribute of the target tunnel corresponds to the target indication information.
11. The message forwarding device according to claim 9, characterized in that: The second determining module is used for: Determining a target tunnel attribute that matches the message attribute from the multiple tunnel attributes; The target tunnel having the target tunnel attribute is determined among the multiple tunnels.
12. The message forwarding device according to claim 10 or 11, characterized in that: The route includes: a plurality of type-length-value (TLV) fields corresponding one-to-one to the plurality of tunnel attributes, and the TLV fields carry the corresponding tunnel attributes.
13. The message forwarding device according to claim 10, characterized in that: The route includes: a plurality of TLV fields corresponding one-to-one to the plurality of tunnel attributes, the TLV fields carrying the corresponding tunnel attributes and indication information corresponding to the tunnel attributes.
14. The message forwarding device according to any one of claims 9 to 11 and 13, characterized in that: The tunnel attributes include a color attribute.
15. The message forwarding device according to claim 14, characterized in that: The route further carries: a plurality of indication information, the plurality of indication information corresponds one-to-one to the plurality of tunnel attributes, and the indication information includes: a preference value corresponding to the color attribute.
16. The message forwarding device according to any one of claims 9 to 11, 13 and 15, characterized in that: The message attributes include: at least one of: Differentiated Services Code Point (DSCP) priority, Internet Protocol (IP) priority, 802.1p priority, and Multi-Protocol Label Switching (MPLS) priority.
17. A communication system, characterized in that: The communication system includes a first node and a second node; The second node is used to send a route of a destination node to the first node, where the route carries: an identifier of the second node and multiple tunnel attributes; The first node is used to determine multiple tunnels from the first node to the second node based on the multiple tunnel attributes, wherein the multiple tunnels correspond one-to-one to the multiple tunnel attributes, the tunnels have corresponding tunnel attributes, and different tunnels among the multiple tunnels are used to forward messages with different forwarding performance requirements; obtain a message sent to the destination node, the message carrying message attributes; determine a target tunnel among the multiple tunnels based on the message attributes, and forward the message to the second node through the target tunnel, and the tunnel attributes of the target tunnel match the message attributes.
18. The communication system according to claim 17, wherein: The route further carries: a plurality of indication information, the plurality of indication information corresponding one-to-one to the plurality of tunnel attributes; The first node is configured to: determine, from the plurality of indication information, target indication information that matches the message attribute; The target tunnel is determined from the multiple tunnels according to the target indication information, wherein the tunnel attribute of the target tunnel corresponds to the target indication information.
19. A communication device, characterized in that: The communication device includes: a processor and a memory, wherein the memory stores a program; The processor is configured to call the program stored in the memory so that the communication device executes the message forwarding method according to any one of claims 1 to 8.
20. A computer storage medium, characterized in that The storage medium stores a computer program, and the computer program is used to execute the message forwarding method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and system for expanding PCEP protocol to automatically create tunnel in SDN scene
CN111245644A