A message processing method, apparatus, network device, and medium
By segmenting OAM messages in the SRv6 network to generate source addresses including network segments, host segments, and fragments, and clearing the fragments at the destination node, the problem of OAM messages being unable to be sent to the control plane is solved, achieving efficient message forwarding and resource conservation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEW H3C TECH CO LTD
- Filing Date
- 2021-09-30
- Publication Date
- 2026-05-26
Smart Images

Figure CN117280671B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a message processing method, apparatus, network device and medium. Background Technology
[0002] Network slicing is an on-demand networking method that can separate multiple virtual end-to-end networks from the same network. At the control plane, the network topology can be divided into multiple topologies, and then the controller further slices the resources within each topology, reserving bandwidth resources for each slice. Network slicing can provide different service level agreements (SLAs) guarantees for different services.
[0003] When processing packets in the forwarding plane, segments can be associated with pre-allocated hardware queues, thereby reserving specified bandwidth resources for those segments. Taking IPv6 segment routing (SRv6) as an example, when the original packet enters the bearer network, the head node in the bearer network encapsulates the original packet with IPv6 to obtain an encapsulated packet, carrying the segment ID through the lower N bits of the source Internet Protocol version 6 (IPv6) address. After receiving this encapsulated packet, the intermediate node in the bearer network can associate it with a pre-allocated hardware queue based on the segment ID carried in the encapsulated packet, and use the bandwidth resources corresponding to that hardware queue to forward the encapsulated packet.
[0004] To enable intermediate nodes to identify whether the source IPv6 address of the encapsulated packet carries a slice ID, it is necessary to plan a dedicated slice network segment for the slice domain in advance, and configure a network segment for each node within the slice domain. For example, the slice network segment for the slice domain is 2001:2002:2003:2004:: / 64, and the slice network segment configured for the head node within the slice domain is 2001:2002:2003:2004:nodeid:: / 96, where nodeid is the node identifier of the head node.
[0005] Currently, the slice ID can be carried in the host bits of the slice network segment. For example, when the master node sends an Operations, Administration, and Maintenance (OAM) message to other nodes in the slice domain, assuming the slice ID is 1 and the node identifier in the header node is 2, the source IPv6 address of the OAM message is 2001:2002:2003:2004:0000:0002::1, where "2001:2002:2003:2004:0000:0002" is the network segment of the source IPv6 address, and "0000:0001" is the host segment of the source IPv6 address.
[0006] The node receiving the OAM message will swap the source and destination IPv6 addresses to generate a response message and send it to the head node. In other words, the destination IPv6 address in the response message carries the slice ID: 2001:2002:2003:2004:0000:0002::1, and this destination IPv6 address is different from the host address of the head node. With a large number of slices, the number of destination addresses for the response messages can be numerous. Ensuring that these response messages are correctly forwarded to the control plane after the head node receives them is a critical problem that needs to be solved. Summary of the Invention
[0007] The purpose of this application is to provide a message processing method, apparatus, network device, and medium to solve the problem that OAM message response messages cannot be sent to the control plane. The specific technical solution is as follows:
[0008] In a first aspect, embodiments of this application provide a message processing method, the method being applied to a head node within an SRv6 network, the method comprising:
[0009] Generate a first SRv6 OAM message. The source address of the first SRv6 OAM message includes a network segment, a host segment, and a segment, and the segment includes a segment identifier.
[0010] Send the first SRv6 OAM message to the destination node so that after the destination node receives the first SRv6 OAM message, if it determines that the source address in the first SRv6 OAM message belongs to the specified slice network segment based on the network segment and the host segment, then clear the slice in the source address to zero, use the source address with the slice cleared to zero as the destination address of the second SRv6 OAM message, and send the second SRv6 OAM message to the head node;
[0011] Receive the second SRv6 OAM message, which includes the destination address;
[0012] If the destination address is the same as the host address of the head node, then the second SRv6OAM message is sent to the control plane.
[0013] In one possible implementation, the loopback address of the head node includes a network segment, a host segment, and a segment with the slice bit set to 0, wherein the host segment included in the loopback address includes the node identifier of the master node; generating the first SRv6OAM message includes:
[0014] Obtain the slice identifier of the slice to which the head node and the destination node belong, wherein the slice identifier belongs to the specified slice network segment;
[0015] The source address is obtained by filling the segment of the loopback address with the segment identifier, and the first SRv6 OAM message is generated.
[0016] In one possible implementation, before generating the first SRv6 OAM message, the method further includes:
[0017] Generate a route advertisement message, the route advertisement message including the loopback address;
[0018] The routing advertisement message is sent to all nodes in the SRv6 network except the head node, so that the nodes that receive the routing advertisement message generate forwarding table entries based on the loopback address.
[0019] Secondly, embodiments of this application provide a message processing method, which is applied to a destination node within an SRv6 network, and the method includes:
[0020] Receive a first SRv6 OAM message from the head node. The source address of the first SRv6 OAM message includes a network segment, a host segment, and a segment, and the segment includes a segment identifier.
[0021] The source address of the first SRv6 OAM message is matched with the specified slice network segment based on the network segment and the host segment;
[0022] If it is determined from the network segment and the host segment that the source address of the first SRv6 OAM message belongs to the designated slice network segment, then the slice in the source address is cleared to zero, and the source address after the slice is cleared to zero is used as the destination address of the second SRv6 OAM message;
[0023] Send the second SRv6 OAM message to the head node.
[0024] In one possible implementation, clearing the segment in the source address includes:
[0025] Based on the pre-configured slice bit length information, the slice of the source address is cleared to zero.
[0026] In one possible implementation, prior to receiving the first SRv6 OAM message from the head node, the method further includes:
[0027] Receive the routing advertisement message sent by the head node. The routing advertisement message includes the loopback address of the head node. The loopback address includes a network segment, a host segment, and a segment with the slice bit set to 0. The host segment included in the loopback address includes the node identifier of the master node.
[0028] Generate forwarding entries based on the loopback address.
[0029] Thirdly, embodiments of this application provide a message processing apparatus, which is applied to a head node within an SRv6 network, and the apparatus includes:
[0030] The generation module is used to generate a first SRv6 OAM message. The source address of the first SRv6 OAM message includes a network segment, a host segment, and a segment, and the segment includes a segment identifier.
[0031] The sending module is configured to send the first SRv6 OAM message to the destination node, so that after the destination node receives the first SRv6 OAM message, if it determines that the source address in the first SRv6 OAM message belongs to a specified slice network segment based on the network segment and the host segment, it clears the slice in the source address to zero, uses the source address with the slice cleared to zero as the destination address of the second SRv6 OAM message, and sends the second SRv6 OAM message to the head node;
[0032] The receiving module is configured to receive the second SRv6 OAM message, wherein the second SRv6 OAM message includes a destination address;
[0033] The uploading module is used to send the second SRv6 OAM message to the control plane if the destination address is the same as the host address of the head node.
[0034] In one possible implementation, the loopback address of the head node includes a network segment, a host segment, and a slice segment with the slice bit set to 0, wherein the host segment of the loopback address includes the node identifier of the master node; the generation module is specifically used for:
[0035] Obtain the slice identifier of the slice to which the head node and the destination node belong, wherein the slice identifier belongs to the specified slice network segment;
[0036] The source address is obtained by filling the segment of the loopback address with the segment identifier, and the first SRv6 OAM message is generated.
[0037] In one possible implementation, the generation module is further configured to generate a routing advertisement message, the routing advertisement message including the loopback address;
[0038] The sending module is further configured to send the routing advertisement message to other nodes in the SRv6 network other than the head node, so that the node receiving the routing advertisement message generates a forwarding table entry based on the loopback address.
[0039] Fourthly, embodiments of this application provide a message processing apparatus, which is applied to a destination node within an SRv6 network, and the apparatus includes:
[0040] The receiving module is configured to receive a first SRv6 OAM message from the head node. The source address of the first SRv6 OAM message includes a network segment, a host segment, and a segment, wherein the segment includes a segment identifier.
[0041] The matching module is used to match the source address of the first SRv6 OAM message with a specified slice network segment based on the network segment and the host segment;
[0042] The encapsulation module is configured to, if it is determined from the network segment and the host segment that the source address of the first SRv6 OAM message belongs to the specified slice network segment, clear the slice fragment in the source address to zero, and use the source address after the slice fragment is cleared to zero as the destination address of the second SRv6 OAM message;
[0043] The sending module is used to send the second SRv6 OAM message to the head node.
[0044] In one possible implementation, the encapsulation module is specifically used to clear the slice of the source address to zero based on pre-configured slice bit length information.
[0045] In one possible implementation, the apparatus further includes a generation module;
[0046] The receiving module is further configured to receive a routing advertisement message sent by the head node. The routing advertisement message includes the loopback address of the head node. The loopback address includes a network segment, a host segment, and a segment with a slice bit of 0. The host segment included in the loopback address includes the node identifier of the master node.
[0047] The generation module is used to generate forwarding table entries based on the loopback address.
[0048] Fifthly, embodiments of this application also provide a network device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0049] Memory, used to store computer programs;
[0050] When a processor executes a program stored in memory, it implements the message processing method steps described in the first or second aspect above.
[0051] Sixthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the message processing method described in the first or second aspect.
[0052] In a seventh aspect, embodiments of this application also provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the message processing method described in the first or second aspect above.
[0053] Using the above technical solution, since the source address of the first SRv6 OAM message generated by the head node includes a network segment, a host segment, and a fragment, after the destination node receives the first SRv6 OAM message, if it determines that the source address belongs to the specified slice network segment based on the network segment and host segment, it can clear the fragment of the source address to zero and use the source address with the cleared fragment as the destination address of the second SRv6 OAM message. Since the host address of the head node is usually composed of a network segment and a host segment, clearing the fragment in the aforementioned source address yields the host address of the head node. In other words, the destination address of the second SRv6 OAM message received by the head node is its own host address, thus enabling the head node's forwarding plane to correctly send the second SRv6 OAM message to the control plane.
[0054] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0055] To more clearly illustrate the technical solutions of the embodiments of this application and the prior art, the drawings used in the embodiments and the prior art are briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.
[0056] Figure 1 An architecture diagram of an SRv6 network provided for an embodiment of this application;
[0057] Figure 2 This is a schematic diagram of the segmented structure of the source address in this related technology;
[0058] Figure 3 A schematic diagram of a segmented structure of a source address is provided in an embodiment of this application;
[0059] Figure 4 A flowchart illustrating a message processing method provided in this application embodiment;
[0060] Figure 5 A flowchart illustrating another message processing method provided in this application embodiment;
[0061] Figure 6 A flowchart illustrating another message processing method provided in this application embodiment;
[0062] Figure 7 This is a schematic diagram of the structure of a message processing device provided in an embodiment of this application;
[0063] Figure 8 A schematic diagram of another message processing apparatus provided in the embodiments of this application;
[0064] Figure 9 This is a schematic diagram of the structure of a network device provided in an embodiment of this application. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are merely some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0066] First, the application scenarios of the embodiments of this application are introduced. The embodiments of this application can be applied in SRv6 networks, which are slice networks, for example, Figure 1 As shown, the SRv6 network includes four nodes, namely P1, P2, P3 and P4, where P1 is the head node and P4 is the tail node.
[0067] by Figure 1Taking the SRv6 network shown as an example, after receiving the original packet, node P1 can encapsulate the original packet with IPv6. When encapsulating with IPv6, the slice identifier (Slice ID) can be carried in the source address of the IPv6 header. The encapsulated original packet includes the destination address (DA), the source address (SA) carrying the slice ID, the Segment Routing Header (SRH), and the original packet.
[0068] from Figure 1 As can be seen, P1 transmits a message carrying a slice identifier between P1 and P2, and P2 transmits a message carrying a slice identifier between P3. Node P4 will decapsulate the received encapsulated message to recover the original message, and forward the original message according to the destination address of the original message.
[0069] In related technologies, each node within a slice domain needs to be configured with a network segment. For example, the slice prefix is 32 bits, the node identifier (node id) is 16 bits, and the slice ID is 32 bits. Assuming the network segment used to deploy the slice is 2001:2002:2003:2004:: / 64, then the slice network segment configured for the head node within the slice network needs to be 2001:2002:2003:2004:nodeid:: / 96. For example... Figure 2 As shown, the source address includes a network segment and a host segment, and in related technologies, the slice identifier is carried through the host segment.
[0070] For example, Table 1 shows two source addresses that carry slice identifiers.
[0071] Table 1
[0072] Slice identifier Node identifier Source address 1 2 2001:2002:2003:2004:0000:0002::1 5 8 2001:2002:2003:2004:0000:0008::5
[0073] In the source address 2001:2002:2003:2004:0000:0002::1, "2001:2002:2003:2004:0000:0002" belongs to the network segment, and "0000:0001" belongs to the host segment, that is, the host segment includes the slice identifier 1.
[0074] In the source address 2001:2002:2003:2004:0008::5, "2001:2002:2003:2004:0000:0008" belongs to the network segment, and "0000:0005" belongs to the host segment, meaning that the host segment includes the slice identifier 5.
[0075] In this embodiment of the application, in order to ensure that the second SRv6 OAM message is correctly sent to the control plane, the source address carrying the slice identifier is subjected to another segmentation process, such as... Figure 3 As shown, in this embodiment, a segment is added to the source address, dividing the source address into three segments: a network segment, a host segment, and a segment. The segment carries a segment identifier. The source address is 128 bits long, with the network segment being 80 bits, the host segment 16 bits, and the segment 32 bits; alternatively, the network segment can be 64 bits, and both the host and segment segments are 32 bits. The lengths of the network segment, host segment, and segment can be configured according to actual needs, and this embodiment does not impose any limitations on this.
[0076] As an example, the network segment is 64 bits, while the fragment and host segments are both 32 bits. Taking the network segment 2001:2002:2003:2004:: / 64 as an example, the final representation of the source address is still the source address format in Table 1 above, but the segmentation method has changed.
[0077] For example, in the source address 2001:2002:2003:2004:0000:0002::1, “2001:2002:2003:2004:” belongs to the network segment, “0000:0002:” belongs to the host segment, and “0000:0001” belongs to the segment.
[0078] In the source address 2001:2002:2003:2004:0000:0008::5, “2001:2002:2003:2004:” belongs to the network segment, “0000:0008:” belongs to the host segment, and “0000:0005” belongs to the segment.
[0079] It should be noted that the node in the embodiments of this application may also be called a node device, which may be a router, switch, etc.
[0080] The following describes in detail the message processing method provided in the embodiments of this application, in conjunction with the above message segmentation method.
[0081] This application provides a message processing method, which is applied to the head node in an SRv6 network, such as... Figure 4 As shown, the method includes:
[0082] S401. Generate a first SRv6 OAM message. The source address of the first SRv6 OAM message includes a network segment, a host segment, and a segment, and the segment includes a segment identifier.
[0083] The first SRv6 OAM message is used to detect the connectivity of the SRv6 path and locate the faulty node in the SRv6 path.
[0084] The first SRv6 OAM message can specifically be a ping message, a traceroute message, or a Bidirectional Forwarding Detection (BFD) message. The ping message is used to detect whether nodes within a slice are reachable, while the traceroute message is used to detect whether nodes within a slice are reachable and can also be used to analyze which node has failed.
[0085] S402. Send a first SRv6 OAM message to the destination node, so that after the destination node receives the first SRv6 OAM message, if it determines that the source address in the first SRv6 OAM message belongs to the specified slice network segment based on the network segment and host segment, then clear the slice in the source address to zero, use the source address with the slice cleared to zero as the destination address of the second SRv6 OAM message, and send the second SRv6 OAM message to the head node.
[0086] The destination node is any other node belonging to the same SRv6 network as the head node. For example, if the head node is... Figure 1 If the destination node is P1, then the destination node can be... Figure 1 The P2 node, P3 node, or P4 node in the system.
[0087] If the head node uses the network segment 2001:2002:2003:2004:: / 64, then the specified slice network segment can be "2001:2002:2003:2004:nodeid::", where nodeid is the node identifier of the head node.
[0088] Assuming the node identifier of the header node is 2, and the source address in the first SRv6 OAM message is 2001:2002:2003:2004:0000:0002::1, the source address "2001:2002:2003:2004:" belongs to the network segment, "0000:0002:" belongs to the host segment, and "0000:0001" belongs to the segment.
[0089] As can be seen, the source address belongs to the specified slice segment 2001:2002:2003:2004:0000:0002::. Therefore, the destination node can clear the slice segment included in the source address to obtain 2001:2002:2003:2004:0000:0002::. Then, 2001:2002:2003:2004:0000:0002:: is used as the destination address of the second SRv6 OAM message, and the destination address included in the first SRv6 OAM message is used as the source address of the second SRv6 OAM message.
[0090] In this embodiment of the application, if the first SRv6 OAM message is a ping message, then the second SRv6 OAM message is a response message to the ping message.
[0091] If the first SRv6 OAM message is a traceroute message, then the second SRv6 OAM message is an Internet Control Message Protocol (ICMP) timeout message.
[0092] If the first SRv6 OAM message is a BFD message, then the second SRv6 OAM message is a BFD response message.
[0093] S403, Receive the second SRv6 OAM message.
[0094] The second SRv6 OAM message includes a destination address, which is 2001:2002:2003:2004:0000:0002::.
[0095] S404. If the destination address is the same as the host address of the head node, then send a second SRv6 OAM message to the control plane.
[0096] Based on the working principle of the node forwarding plane, if the destination address of a packet received by the node's forwarding plane is its own host address, the received packet will be forwarded to the control plane. In this embodiment, after the head node's forwarding plane receives the second SRv6 OAM packet, it can obtain the destination address of the second SRv6 OAM packet 2001:2002:2003:2004:0000:0002::. Since this destination address does not carry a slice ID and is the same as the head node's host address, it can forward the second SRv6 OAM packet to the control plane.
[0097] Using this method, since the source address of the first SRv6 OAM message generated by the head node includes a network segment, a host segment, and a fragment, when the destination node receives this first SRv6 OAM message, if it determines that the source address belongs to a specified slice network segment based on the network segment and host segment of the source address, it can clear the fragment of the source address to zero and use the source address with the zeroed fragment as the destination address of the second SRv6 OAM message. Since the host address of the head node is usually composed of a network segment and a host segment, clearing the fragment in the aforementioned source address yields the host address of the head node. In other words, the destination address of the second SRv6 OAM message received by the head node is its own host address, thus allowing the head node's forwarding plane to correctly send the second SRv6 OAM message to the control plane.
[0098] In this embodiment, a loopback address can be pre-configured for the head node and set as the source address of the slice. The loopback address includes a network segment, a host segment, and a slice segment with the slice bit set to 0. The host segment of the loopback address includes the node identifier of the head node. In this embodiment, the head node uses this loopback address as its own host address.
[0099] For example, the loopback address is 2001:2002:2003:2004:nodeid:: / 128.
[0100] Based on the above embodiments, such as Figure 5 As shown, the process of generating the first SRv6 OAM message in S401 and the header node includes:
[0101] S4011. Obtain the slice identifier of the slice to which the head node and the destination node belong. The slice identifier belongs to the specified slice network segment.
[0102] S4012. Fill the slice identifier into the slice of the loopback address to obtain the source address and generate the first SRv6 OAM message.
[0103] In this case, all the slice bits in the segment of the loopback address are 0. When it is necessary to carry the slice identifier in the message, the slice identifier to be carried can be directly filled into the segment of the loopback address, so that the obtained address can be used as the source address of the message.
[0104] When generating the first SRv6 OAM message, the slice identifiers of the slices to which the header node and destination node belong can be directly filled into the slice of the loopback address, so that the resulting address can be used as the source address of the first SRv6 OAM message.
[0105] For example, if the node identifier of the head node is 5, then the loopback address is 2001:2002:2003:2004:0000:0005:: / 128. If the slice identifier of the slice to which the head node and the destination node belong is 3, then the slice identifier 3 can be filled into the slice of the loopback address to obtain the source address 2001:2002:2003:2004:0000:0005::3.
[0106] Using this method, when generating the first SRv6 OAM message, the source address can be generated simply by filling the required slice identifier into the slice segment of the loopback address of the head node, which is simple to implement. Furthermore, because the host segment and slice segment of the source address are set independently in this embodiment, after receiving the first SRv6 OAM message, if the destination node determines that the first SRv6 OAM belongs to a specified slice network segment, it will clear the slice segment. In this way, the host address of the head node can be recovered, and then this host address can be used as the destination address of the second SRv6 OAM message. The master node does not need additional matching operations and can naturally support sending the second SRv6 OAM message to the control plane.
[0107] In related technologies, the slice identifier is carried in the host segment, and the destination node cannot delete the slice identifier from the host segment. To enable the second SRv6 OAM message to be sent to the control plane, the master node's control plane can send all addresses carrying slice identifiers as host addresses to the forwarding plane. Thus, if the destination address of a message received by the forwarding plane carries a slice identifier, the forwarding plane can also send that message to the control plane. However, slice segments are very large, and correspondingly, there are many addresses carrying slice identifiers. Sending addresses carrying slice identifiers from the control plane to the forwarding plane one by one would consume a significant amount of resources.
[0108] In this embodiment, the destination node can recover the host address of the header node without the slice identifier. The destination address of the second SRv6 OAM message returned by the destination node to the header node does not carry the slice identifier. Therefore, in this embodiment, the master node's control plane only needs to send its local address to the forwarding plane to achieve the uploading of the second SRv6 OAM message to the control plane. This eliminates the need to send addresses carrying slice identifiers one by one, reducing resource consumption.
[0109] In another embodiment of this application, in Figure 4 Prior to the illustrated process, the method also includes:
[0110] Generate a route advertisement message, which includes a loopback address, and send the route advertisement message to all nodes in the SRv6 network except the head node, so that the nodes that receive the route advertisement message can generate forwarding table entries based on the loopback address.
[0111] For example, the head node sends a route advertisement message to the destination node. After receiving the route advertisement message, the destination node generates a forwarding table entry whose next hop is the loopback address carried in the route advertisement message.
[0112] For example, if the loopback address is 2001:2002:2003:2004:nodeid:: / 128, then the prefix of the forwarding table entry generated by the destination node is 2001:2002:2003:2004:nodeid:, the outgoing interface is the interface on the destination node connected to the head node, and the next hop is the address of the physical interface of the device connected to the destination node among the devices included in the path from the destination node to the head node.
[0113] When there is a direct connection between the head node and the destination node, the next hop of the forwarding table entry generated by the destination node is the physical address of the interface on the head node that is connected to the destination node.
[0114] For example, if the head node is node 1, and node 1's physical interface A is connected to node 2, and node 2's physical interface B is connected to node 3, then the next hop in the forwarding table entry generated by node 2 is the physical address of physical interface A, and the next hop in the forwarding table entry generated by node 3 is the physical address of physical interface B.
[0115] Understandably, nodes that receive routing announcement messages can also generate forwarding table entries in the same way.
[0116] In this embodiment, the head node advertises the loopback address as a regular host address. Correspondingly, other nodes can generate forwarding table entries based on this loopback address, and then send a second SRv6 OAM message without a slice identifier to the head node according to the generated forwarding table entries. Furthermore, compared to existing technologies, this embodiment simplifies the network segment that the head node needs to maintain specially (the network segment configured for each node) to the head node's host address. This eliminates the need for special network segment maintenance, making the process logically closer to the head node's own processing and simplifying the head node's workflow.
[0117] Corresponding to the above embodiments, this application also provides a message processing apparatus, which is applied to a destination node within an SRv6 network, such as... Figure 6 As shown, the method includes:
[0118] S601. Receive the first SRv6 OAM message from the head node. The source address of the first SRv6 OAM message includes the network segment, the host segment, and the segment. The segment includes the segment identifier.
[0119] The host segment includes the node identifier of the head node.
[0120] S602. Match the source address of the first SRv6 OAM message with the specified slice network segment based on the network segment and host segment.
[0121] For example, if the source address in the first SRv6 OAM message is 2001:2002:2003:2004:0000:0002::1, then “2001:2002:2003:2004:” belongs to the network segment and “0000:0002:” belongs to the host segment. Therefore, the source address belongs to the specified slice network segment 2001:2002:2003:2004:0000:0002::.
[0122] S603. If the source address of the first SRv6 OAM message is determined to belong to the specified slice network segment based on the network segment and host segment, then the slice in the source address is cleared to zero, and the source address after the slice is cleared to zero is used as the destination address of the second SRv6 OAM message.
[0123] In this SRv6 network, each node is configured with a specified slice segment and slice bit length information. When the destination node receives the first SRv6 OAM message, if it determines that the source address of the first SRv6 OAM message belongs to the specified slice segment, it can determine that the source address carries a slice identifier. Then, based on the pre-configured slice bit length information, it can clear the slice segments included in the source address to obtain the host address of the head node.
[0124] For example, if the slice length information is in the lower 16 bits, the destination node can clear the lower 16 bits of the source address. Alternatively, if the slice length information is in the lower 32 bits, the destination node can clear the lower 32 bits of the source address.
[0125] S604. Send the second SRv6 OAM message to the head node.
[0126] Using this method, the source address of the first SRv6 OAM message received by the destination node includes the network segment, host segment, and fragment. Therefore, if the destination node determines that the first SRv6 OAM message matches the specified slice network segment, it can directly clear the fragment of the source address to zero, and use the source address with the cleared fragment as the destination address of the second SRv6 OAM message. Since the host address of the head node is usually composed of the network segment and host segment, clearing the fragment in the above source address results in the host address of the head node. In other words, the destination address of the second SRv6 OAM message received by the head node is its own host address, and thus the forwarding plane of the head node can correctly send the second SRv6 OAM message to the control plane.
[0127] In another embodiment of this application, in Figure 6 Prior to the illustrated embodiment, the method further includes:
[0128] Receive the routing advertisement message sent by the head node. The routing advertisement message includes the loopback address of the head node. The loopback address includes the network segment, the host segment, and the segment with the slice bit set to 0. The host segment included in the loopback address includes the node identifier of the master node. Generate forwarding table entries based on the loopback address.
[0129] For example, after the destination node receives the route advertisement message, the next hop of the generated forwarding table entry is the loopback address carried in the route advertisement message.
[0130] For example, if the loopback address is 2001:2002:2003:2004:nodeid:: / 128, then the prefix of the forwarding table entry generated by the destination node is 2001:2002:2003:2004:nodeid:, the outgoing interface is the interface on the destination node connected to the head node, and the next hop is the address of the physical interface of the device connected to the destination node among the devices included in the path from the destination node to the head node.
[0131] Based on this, in S604 above, the destination node can send a second SRv6OAM message to the head node based on the above forwarding table entries.
[0132] This method enables each node in the SRv6 network to generate forwarding table entries based on loopback table entries, and then send a second SRv6 OAM message without a slice identifier to the head node based on the forwarding table entries. This allows the head node's forwarding plane to send the second SRv6 OAM message to the control plane without needing to configure a complex matching mechanism for the head node, thus avoiding the situation where the second SRv6 OAM message cannot be sent to the control plane.
[0133] Corresponding to the above method embodiments, this application also provides a message processing apparatus, which is applied to the head node in an SRv6 network, such as... Figure 7 As shown, the device includes:
[0134] The generation module 701 is used to generate a first SRv6 OAM message. The source address of the first SRv6 OAM message includes a network segment, a host segment, and a segment, and the segment includes a segment identifier.
[0135] The sending module 702 is used to send a first SRv6 OAM message to the destination node, so that after the destination node receives the first SRv6 OAM message, if it determines that the source address in the first SRv6 OAM message belongs to the specified slice network segment based on the network segment and the host segment, it clears the slice in the source address to zero, uses the source address with the slice cleared to zero as the destination address of the second SRv6 OAM message, and sends the second SRv6 OAM message to the head node;
[0136] The receiving module 703 is used to receive a second SRv6 OAM message, the second SRv6 OAM message including a destination address;
[0137] The uplink module 704 is used to send a second SRv6 OAM message to the control plane if the destination address is the same as the host address of the head node.
[0138] In another embodiment of this application, the loopback address of the head node includes a network segment, a host segment, and a slice segment with a slice bit of 0. The host segment included in the loopback address includes the node identifier of the master node.
[0139] Module 701 is specifically used for:
[0140] Obtain the slice identifier of the slice to which the head node and the destination node belong. The slice identifier belongs to the specified slice network segment.
[0141] The source address is obtained by filling the slice identifier into the slice of the loopback address and generating the first SRv6 OAM message.
[0142] In another embodiment of this application, the generation module 701 is further configured to generate a routing advertisement message, the routing advertisement message including a loopback address;
[0143] The sending module 702 is also used to send routing advertisement messages to other nodes in the SRv6 network other than the head node, so that the nodes that receive the routing advertisement messages can generate forwarding table entries based on the loopback address.
[0144] Corresponding to the above method embodiments, this application also provides another message processing apparatus, which is applied to a destination node within an SRv6 network, such as... Figure 8 As shown, the device includes:
[0145] The receiving module 801 is used to receive the first SRv6 OAM message from the head node. The source address of the first SRv6 OAM message includes a network segment, a host segment, and a segment, and the segment includes a segment identifier.
[0146] Matching module 802 is used to match the source address of the first SRv6 OAM message with the specified slice network segment based on the network segment and host segment;
[0147] The encapsulation module 803 is used to clear the segment in the source address and use the source address after clearing the segment as the destination address of the second SRv6OAM message if the source address of the first SRv6 OAM message belongs to the specified slice network segment based on the network segment and the host segment.
[0148] The sending module 804 is used to send the second SRv6 OAM message to the head node.
[0149] In another embodiment of this application, the encapsulation module 803 is specifically used to clear the slice of the source address to zero based on the pre-configured slice bit length information.
[0150] In another embodiment of this application, the apparatus further includes a generation module;
[0151] The receiving module 801 is also used to receive a routing advertisement message sent by the head node. The routing advertisement message includes the loopback address of the head node. The loopback address includes a network segment, a host segment, and a segment with the slice bit set to 0. The host segment included in the loopback address includes the node identifier of the head node.
[0152] The generation module is used to generate forwarding table entries based on the loopback address.
[0153] This application also provides a network device, which can be either the head node or the destination node as described in the above embodiments, such as... Figure 9 As shown, it includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.
[0154] Memory 903 is used to store computer programs;
[0155] When the processor 901 executes the program stored in the memory 903, it implements the method steps in the above method embodiments.
[0156] The communication bus mentioned in the above network devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0157] The communication interface is used for communication between the aforementioned network devices and other devices.
[0158] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0159] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0160] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described message processing methods.
[0161] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the message processing methods described above.
[0162] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-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. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. 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 integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0163] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0164] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0165] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A message processing method, characterized in that, The method is applied to head nodes within an SRv6 network, and the method includes: Generate a first SRv6 OAM message. The source address of the first SRv6 OAM message includes a network segment, a host segment, and a segment, and the segment includes a segment identifier. Send the first SRv6 OAM message to the destination node so that after the destination node receives the first SRv6 OAM message, if it determines that the source address in the first SRv6 OAM message belongs to the specified slice network segment based on the network segment and the host segment, then clear the slice in the source address to zero, use the source address with the slice cleared to zero as the destination address of the second SRv6 OAM message, and send the second SRv6 OAM message to the head node. Receive the second SRv6 OAM message, which includes the destination address; If the destination address is the same as the host address of the head node, then the second SRv6 OAM message is sent to the control plane.
2. The method according to claim 1, characterized in that, The loopback address of the head node includes a network segment, a host segment, and a segment with a slice bit of 0. The host segment included in the loopback address includes the node identifier of the head node. The generation of the first SRv6 OAM message includes: Obtain the slice identifier of the slice to which the head node and the destination node belong, wherein the slice identifier belongs to the specified slice network segment; The source address is obtained by filling the segment of the loopback address with the segment identifier, and the first SRv6 OAM message is generated.
3. The method according to claim 2, characterized in that, Before generating the first SRv6 OAM message, the method further includes: Generate a route advertisement message, the route advertisement message including the loopback address; The routing advertisement message is sent to all nodes in the SRv6 network except the head node, so that the nodes that receive the routing advertisement message generate forwarding table entries based on the loopback address.
4. A message processing method, characterized in that, The method is applied to a destination node within an SRv6 network, and the method includes: Receive a first SRv6 OAM message from the head node. The source address of the first SRv6 OAM message includes a network segment, a host segment, and a segment, and the segment includes a segment identifier. The source address of the first SRv6 OAM message is matched with the specified slice network segment based on the network segment and the host segment; If it is determined from the network segment and the host segment that the source address of the first SRv6 OAM message belongs to the designated slice network segment, then the slice in the source address is cleared to zero, and the source address after the slice is cleared to zero is used as the destination address of the second SRv6 OAM message; Send the second SRv6 OAM message to the head node.
5. The method according to claim 4, characterized in that, The step of clearing the segment in the source address includes: Based on the pre-configured slice bit length information, the slice of the source address is cleared to zero.
6. The method according to claim 4 or 5, characterized in that, Before receiving the first SRv6OAM message from the head node, the method further includes: Receive the routing advertisement message sent by the head node. The routing advertisement message includes the loopback address of the head node. The loopback address includes a network segment, a host segment, and a segment with the slice bit set to 0. The host segment included in the loopback address includes the node identifier of the head node. Generate forwarding entries based on the loopback address.
7. A message processing apparatus, characterized in that, The device is applied to a head node within an SRv6 network, and the device includes: The generation module is used to generate a first SRv6 OAM message. The source address of the first SRv6 OAM message includes a network segment, a host segment, and a segment, and the segment includes a segment identifier. The sending module is configured to send the first SRv6 OAM message to the destination node, so that after the destination node receives the first SRv6 OAM message, if it determines that the source address in the first SRv6 OAM message belongs to a specified slice network segment based on the network segment and the host segment, it clears the slice in the source address to zero, uses the source address with the slice cleared to zero as the destination address of the second SRv6 OAM message, and sends the second SRv6 OAM message to the head node; The receiving module is configured to receive the second SRv6 OAM message, wherein the second SRv6 OAM message includes a destination address; The uploading module is used to send the second SRv6 OAM message to the control plane if the destination address is the same as the host address of the head node.
8. The apparatus according to claim 7, characterized in that, The loopback address of the head node includes a network segment, a host segment, and a segment with a slice bit of 0. The host segment in the loopback address includes the node identifier of the head node. The generation module is specifically used for: Obtain the slice identifier of the slice to which the head node and the destination node belong, wherein the slice identifier belongs to the specified slice network segment; The source address is obtained by filling the segment of the loopback address with the segment identifier, and the first SRv6 OAM message is generated.
9. The apparatus according to claim 8, characterized in that, The generation module is further configured to generate a routing advertisement message, the routing advertisement message including the loopback address; The sending module is further configured to send the routing advertisement message to other nodes in the SRv6 network other than the head node, so that the node receiving the routing advertisement message generates a forwarding table entry based on the loopback address.
10. A message processing apparatus, characterized in that, The device is applied to a destination node within an SRv6 network, and the device includes: The receiving module is configured to receive a first SRv6 OAM message from the head node. The source address of the first SRv6 OAM message includes a network segment, a host segment, and a segment, wherein the segment includes a segment identifier. The matching module is used to match the source address of the first SRv6 OAM message with a specified slice network segment based on the network segment and the host segment; The encapsulation module is used to, if it is determined from the network segment and the host segment that the source address of the first SRv6 OAM message belongs to the specified slice network segment, clear the slice in the source address to zero, and use the source address after the slice is cleared to be the destination address of the second SRv6 OAM message; The sending module is used to send the second SRv6 OAM message to the head node.
11. The apparatus according to claim 10, characterized in that, The encapsulation module is specifically used to clear the slice of the source address to zero based on the pre-configured slice bit length information.
12. The apparatus according to claim 10 or 11, characterized in that, The device also includes a generation module; The receiving module is further configured to receive a routing advertisement message sent by the head node. The routing advertisement message includes the loopback address of the head node. The loopback address includes a network segment, a host segment, and a segment with a slice bit of 0. The host segment included in the loopback address includes the node identifier of the head node. The generation module is used to generate forwarding table entries based on the loopback address.
13. A network device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-3 or 4-6.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-3 or 4-6.