WO2023160516A1 - 一种报文处理方法及相关设备 - Google Patents
一种报文处理方法及相关设备 Download PDFInfo
- Publication number
- WO2023160516A1 WO2023160516A1 PCT/CN2023/077310 CN2023077310W WO2023160516A1 WO 2023160516 A1 WO2023160516 A1 WO 2023160516A1 CN 2023077310 W CN2023077310 W CN 2023077310W WO 2023160516 A1 WO2023160516 A1 WO 2023160516A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- sid
- segment list
- child node
- message
- network device
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 14
- 238000000034 method Methods 0.000 claims abstract description 74
- 238000012545 processing Methods 0.000 claims abstract description 58
- 230000015654 memory Effects 0.000 claims description 33
- 238000004891 communication Methods 0.000 claims description 17
- 230000006835 compression Effects 0.000 abstract description 4
- 238000007906 compression Methods 0.000 abstract description 4
- 230000010076 replication Effects 0.000 description 51
- 230000006870 function Effects 0.000 description 38
- 238000010586 diagram Methods 0.000 description 26
- 230000008569 process Effects 0.000 description 19
- 230000008859 change Effects 0.000 description 6
- 101100256916 Caenorhabditis elegans sid-1 gene Proteins 0.000 description 4
- 238000004590 computer program Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003068 static effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/16—Multipoint routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/48—Routing tree calculation
Definitions
- the present application relates to the technical field of communications, and in particular to a message processing method and related equipment.
- Bit Index Explicit Replication (Bit Index Explicit Replication, BIER) is a multicast technology, by encapsulating the set of destination nodes of the multicast message in the form of bit string in the message header, so that the intermediate node does not need to To establish a multicast tree and save the state of the multicast flow, it is only necessary to copy and forward the multicast message according to the set of destination nodes in the message header of the multicast message.
- Multicast Source Routing over Internet Protocol version 6 (MSR6) is a multicast source routing technology based on Internet Protocol version 6 (IPv6).
- IPv6 Internet Protocol version 6
- the multicast message In order to guide the network equipment in the multicast tree to process the multicast message, the multicast message usually includes a segment list (segment list) in the MSR6-based multicast message, and the segment list includes the segment identifier of each node of the multicast tree (segment identity, SID).
- segment list includes the segment identifier of each node of the multicast tree (segment identity, SID).
- the SIDs of all network devices in the multicast tree will be carried in the segment list.
- the segment list in the multicast packet is very long, resulting in the header of the multicast packet If the length is too long, the packet processing efficiency will be affected.
- this application provides a message processing method and related equipment, through the operation of the segment list in the message forwarding process of MSR6, the segment list of the message sent to a certain subtree can only include the subtree
- the SID of each node in the network reduces the length of the message and realizes the effective compression of the message, thereby improving the processing efficiency of the message.
- the present application provides a message processing method, which can be applied to a first network device.
- the first network device obtains the first message, if the destination address (destination address, DA) of the first message ) field matches the first SID of the first network device, the first network device obtains the second message and the third message based on the first message, wherein the first segment list of the first message includes the first SID, the second section list and the third section list, the second section list corresponds to the subtree rooted at the first subnode of the first network device (that is, the second section list may include the subtree rooted at the first subnode SIDs of all nodes of the tree), the third section list corresponds to the subtree rooted at the second subnode of the first network device (that is, the third section list may include all nodes of the subtree rooted at the second subnode SID), the second message and the third message also include the multicast data message in the first message; in this way, the first network device
- the first network device can split the obtained segment list in the message to be multicast according to different sub-nodes of the first network device, and the segment list of the message sent to a certain sub-node Include only the relevant SID of the subtree rooted at the subtree after splitting, which will not affect the processing of the message by the subtree, and can effectively reduce the length of the segment list in the message, thereby reducing the The length of the message can achieve the effect of improving the efficiency of message processing without affecting the processing and forwarding of the message.
- the first SID of the first network device is used to indicate that the subtree is popped up.
- the SID (also can be denoted as the SID of subtree pop-up (child tree pop, CTP) type) with subtree pop-up function, according to the indication of this SID in the multicast tree During the middle transmission, the contents invalid for this subtree in the message will be popped up, so as to realize the compression of the MSR6 message.
- the first SID is not only used to identify the first network device, but also used to instruct the first network device to perform a subtree pop-up operation on the received packet whose DA is the first SID.
- the SID of the CTP type can be subdivided into: a child tree pop and N-SID (CTPN) type SID, and a child tree pop and pointer (childtree pop and pointer, CTPP) type SID.
- the first SID may be a CTPN type SID, that is, the first SID includes a first number identifier (number SID, N-SID), and the first N-SID is used to indicate the number of child nodes.
- the second segment list may include the SID of the first child node and the SIDs of the child nodes of the first child node, the SID of the first child node includes a second N-SID, and the second N-SID is used to indicate the first The number of child nodes for child nodes.
- obtaining the second packet and the third packet based on the first packet by the first network device may include: the first network device obtaining the second packet and the third packet based on the first packet A list and the first SID, from the first list to obtain the second list and the third list after the second list; then, the first network device is based on the identification used to indicate the number of copies, the second list , the third segment list and the multicast data message included in the first message, to obtain the second message and the third message.
- the first network device obtains the second segment list from the first segment list may include: the first network device first determines the SID of the first child node based on the first N-SID and the first segment list; then, the first network device Based on the SID of the first child node and the second N-SID, obtain the SID of the child node of the first child node; finally, the first network device obtains the SID based on the SID of the first child node and the SID of the child node of the first child node The second list.
- the first network device acquires the third segment list from the first segment list may include: the first network device determines that the first SID after the end of the second segment list is the SID of the second child node; then, the first network device based on The SID of the second child node and the third N-SID, and obtain the SID of the child node of the second child node; then, the first network device obtains the second child node based on the SID of the second child node and the SID of the child node of the second child node.
- the second segment list may include the SID of the first child node and the SIDs of the child nodes of the first child node, the SID of the first child node includes a second pointer, and the second pointer is used to indicate the SID of the first child node The offset of the child node in the first segment list.
- obtaining the second packet and the third packet based on the first packet by the first network device may include: the first network device obtaining the second packet and the third packet based on the first packet A list and the first SID, from the first list to obtain the second list and the third list after the second list; then, the first network device is based on the identification used to indicate the number of copies, the second list , the third segment list and the multicast data message included in the first message, to obtain the second message and the third message.
- the first network device obtains the second list from the first list, which may include: the first network device first determines the SID of the first child node based on the first N-SID and the first list; then, the first network The device obtains the SID of the child node of the first child node based on the SID of the first child node and the second pointer; finally, the first network device obtains the SID of the child node of the first child node based on the SID of the first child node and the SID of the child node of the first child node. Two-segment list.
- the first network device obtains the third segment list from the first segment list may include: the first network device determines that the first SID after the first sub-node is the SID of the second sub-node; then, the first network device based on the first SID The SID of the second child node and the third pointer obtain the SID of the child node of the second child node; then, the first network The device acquires the third segment list based on the SID of the second child node and the SIDs of the child nodes of the second child node.
- the SID starting from the SID indicated by the second pointer to the SID before the SID indicated by the third pointer is the SID of the child node of the first child node.
- the first SID may be a CTPP-type SID, that is, the first SID includes a first pointer (pointer), and the first pointer is used to indicate that the child node of the first network device is in the first segment The offset of the list.
- the second segment list may include the SID of the first child node and the SIDs of the child nodes of the first child node, the SID of the first child node includes a second N-SID, and the second N-SID is used to indicate the first The number of child nodes for child nodes.
- the first network device obtaining the second message and the third message based on the first message may include: the first network device obtains the second message and the third message based on the first segment list and the first SID, obtain the second list and the third list after the second list from the first list; the first network device is based on the identification used to indicate the number of copies, the second list, the third The list and the multicast data packets included in the first packet are used to obtain the second packet and the third packet.
- the first network device obtains the second segment list from the first segment list, which may include: the first network device first determines the SID of the first child node based on the first pointer and the first segment list; then, the first network device determines the SID based on The SID of the first sub-node and the second N-SID obtain the SID of the sub-node of the first sub-node; then, the first network device obtains the SID of the sub-node of the first sub-node based on the SID of the first sub-node and the SID of the sub-node of the first sub-node. Two-segment list.
- the first network device acquires the third segment list from the first segment list may include: the first network device determines that the first SID after the end of the second segment list is the SID of the second child node; then, the first network device based on The SID of the second child node and the third N-SID, and obtain the SID of the child node of the second child node; then, the first network device obtains the second child node based on the SID of the second child node and the SID of the child node of the second child node.
- the second segment list may include the SID of the first child node and the SIDs of the child nodes of the first child node, the SID of the first child node includes a second pointer, and the second pointer is used to indicate the SID of the first child node The offset of the child node in the list of the first segment.
- the first network device obtaining the second message and the third message based on the first message may include: the first network device obtains the second message and the third message based on the first segment list and the first SID, obtain the second list and the third list after the second list from the first list; the first network device is based on the identification used to indicate the number of copies, the second list, the third The list and the multicast data packets included in the first packet are used to obtain the second packet and the third packet.
- the first network device obtains the second segment list from the first segment list, which may include: the first network device first determines the SID of the first child node based on the first pointer and the first segment list; then, the first network device determines the SID based on Based on the SID of the first child node and the second pointer, the SID of the child node of the first child node is obtained; then, based on the SID of the first child node and the SID of the child node of the first child node, the second segment list is obtained.
- the first network device obtains the third segment list from the first segment list may include: the first network device determines that the first SID after the first subnode is the SID of the second subnode; then, the first network device based on the first SID The SID of the second child node and the third pointer obtain the SID of the child node of the second child node; then, the first network device obtains the third segment list based on the SID of the second child node and the SID of the child node of the second child node .
- the SID starting from the SID indicated by the second pointer to the SID before the SID indicated by the third pointer is the SID of the child node of the first child node.
- the first SID, the SID of the first child node, or the SID of the second child node may also be a child tree no pop (CTNP) type SID, and the CTNP type SID is used to indicate that no subtree pop operation is performed.
- CTNP child tree no pop
- the SID of the second child node is used to indicate that the second child node is responsible for the received
- the segment list of the message does not perform the subtree pop-up operation.
- the SID of the CTNP type can be subdivided into: the SID of the subtree does not pop and carries the quantity identification (child tree no pop and N-SID, CTNPN), and the subtree does not pop and carries the pointer (child tree no pop and pointer, CTNPP) type of SID. It should be noted that as long as there is a CTP-type SID in the segment list of the message, the subtree pop-up operation can be performed on the corresponding node to realize the compression of the message length.
- the SID of some nodes in the multicast tree is allowed to be of the CTNP type. SID, so as to reduce the message processing workload of nodes that do not need to perform subtree pop-up operations (such as nodes with relatively short segment lists in received messages).
- the third segment list includes the SID of the second child node and the SID of the child nodes of the second child node, the SID of the second child node includes a third N-SID, and the third N-SID is used to indicate the The number of child nodes of the second child node.
- the first network device may be an ingress node, then, obtaining the first packet by the first network device may include: the first network device receives the multicast data packet, and the multicast data packet includes Multicast information; the first network device obtains a first segment list based on the multicast information; the first network device generates a first message based on the multicast data message and the first segment list.
- Obtaining the first segment list based on the multicast information by the first network device may include: the first network device obtains the first segment list corresponding to the multicast information according to the multicast information; or, the first network device obtains the SLA according to the multicast information.
- the first segment list that is required and corresponds to the multicast information.
- the multicast information includes the multicast group address, or, the multicast information includes the multicast group address and the identifier of the multicast tree, or, the multicast information includes the multicast group address, the multicast tree identifier, and the parameter.
- the first network device may be an intermediate node, then, obtaining the first message by the first network device may include: the first network device receiving the first message sent by the last hop node of the first network device message, the last hop node of the first network device is an entry node or a last hop intermediate node.
- the present application further provides a packet processing device, which is applied to a first network device, and the device includes: a first obtaining unit, a second obtaining unit, and a first sending unit.
- the first obtaining unit is used to obtain the first message
- the first message includes the destination address DA, the first segment list and the multicast data message
- the first segment list includes the first segment identification SID of the first network device
- the second list corresponds to the subtree rooted at the first child node of the first network device
- the third list corresponds to the subtree rooted at the second child node of the first network device Subtree
- the second obtaining unit is used to obtain the second message and the third message based on the first message when the DA matches the first SID, the second message includes the second segment list and the multicast data message
- the third message includes a third segment list and a multicast data message
- the first sending unit is configured to send the second message to the first child node, and send the third
- the first SID is used to indicate that the subtree is popped up.
- the first SID includes a first number identifier N-SID, and the first N-SID is used to indicate the number of child nodes.
- the second segment list includes the SID of the first child node and the SIDs of the child nodes of the first child node, the SID of the first child node includes a second N-SID, and the second N-SID is used to indicate that the first child node The number of child nodes of the node.
- the second obtaining unit may include a first obtaining subunit and a second obtaining subunit.
- the first obtaining subunit is used to obtain the second section list and the third section list after the second section list from the first section list based on the first section list and the first SID; the second obtaining subunit uses The second packet and the third packet are obtained based on the identifier used to indicate the number of times of replication, the second segment list, the third segment list, and the multicast data packet included in the first packet.
- the first obtaining subunit is specifically configured to: determine the SID of the first child node based on the first N-SID and the first segment list; obtain the first child node based on the SID of the first child node and the second N-SID The SIDs of the child nodes of the node; based on the SID of the first child node and the SIDs of the child nodes of the first child node, the second segment list is obtained.
- the second segment list includes the SID of the first child node and the SIDs of the child nodes of the first child node, the SID of the first child node includes a second pointer, and the second pointer is used to indicate the child of the first child node The offset of the node in the first segment of the list.
- the second obtaining unit may include: a fifth obtaining subunit and a sixth obtaining subunit.
- the fifth obtaining subunit is used for obtaining the second section list and the third section list after the second section list from the first section list based on the first section list and the first SID;
- the sixth obtaining subunit is used The second packet and the third packet are obtained based on the identifier used to indicate the number of times of replication, the second segment list, the third segment list, and the multicast data packet included in the first packet.
- the fifth obtaining subunit is specifically configured to: determine the SID of the first child node based on the first N-SID and the first segment list; obtain the SID of the first child node based on the SID of the first child node and the second pointer The SID of the child node; based on the SID of the first child node and the SIDs of the child nodes of the first child node, the second segment list is obtained.
- the first SID includes a first pointer, and the first pointer is used to indicate the offset of the first segment list of the child node of the first network device.
- the second segment list includes the SID of the first child node and the SIDs of the child nodes of the first child node, the SID of the first child node includes a second N-SID, and the second N-SID is used to indicate that the first child node The number of child nodes of the node.
- the second obtaining unit may include: a third obtaining subunit and a fourth obtaining subunit.
- the third obtaining subunit is used to obtain the second section list and the third section list after the second section list from the first section list based on the first section list and the first SID; the fourth obtaining subunit is used The second packet and the third packet are obtained based on the identifier used to indicate the number of times of replication, the second segment list, the third segment list, and the multicast data packet included in the first packet.
- the third obtaining subunit is specifically configured to: determine the SID of the first child node based on the first pointer and the first section list; obtain the SID of the first child node based on the SID of the first child node and the second N-SID The SID of the child node; based on the SID of the first child node and the SIDs of the child nodes of the first child node, the second segment list is obtained.
- the second segment list includes the SID of the first child node and the SIDs of the child nodes of the first child node, the SID of the first child node includes a second pointer, and the second pointer is used to indicate the child of the first child node The offset of the node in the first segment of the list.
- the second obtaining unit may include: a seventh obtaining subunit and an eighth obtaining subunit.
- the seventh obtaining subunit is used to obtain the second section list and the third section list after the second section list from the first section list based on the first section list and the first SID; the eighth obtaining subunit is used
- the second packet and the third packet are obtained based on the identifier used to indicate the number of times of replication, the second segment list, the third segment list, and the multicast data packet included in the first packet.
- the seventh obtaining subunit is specifically used to: determine the SID of the first child node based on the first pointer and the first segment list; obtain the child nodes of the first child node based on the SID of the first child node and the second pointer the SID of the first child node; based on the SID of the first child node and the SIDs of the child nodes of the first child node, the second segment list is obtained.
- the SID of the first child node is used to indicate that subtree popping is not performed.
- the third segment list includes the SID of the second child node and the SID of the child nodes of the second child node, the SID of the second child node includes a third N-SID, and the third N-SID is used to indicate the The number of child nodes of the second child node.
- the first network device is an ingress node
- the first obtaining unit may include: a receiving subunit, a ninth obtaining subunit, and a generating subunit.
- the receiving subunit is used to receive the multicast data message, and the multicast data message includes multicast information
- the ninth obtaining subunit is used to obtain the first segment list based on the multicast information
- the generating subunit is used to obtain the first segment list based on the multicast information
- the ninth obtaining subunit is specifically used to: obtain the first segment list corresponding to the multicast information according to the multicast information; or obtain the first segment list corresponding to the multicast information that satisfies the SLA requirement and is based on the multicast information .
- the multicast information includes a multicast group address, or the multicast information includes a multicast group address and a multicast tree ID, or the multicast information includes a multicast group address, a multicast tree ID, and parameters for identifying SLA requirements.
- the first network device is an intermediate node
- the first obtaining unit is specifically configured to: receive the first message sent by the last hop node of the first network device, and the last hop node of the first network device It is the entry node or the last hop intermediate node.
- the present application provides a network device, the network device includes a processor and a memory, the memory is used to store instructions or program codes, and the processor is used to call and run the instructions or program codes from the memory to execute the first The method in one aspect or any possible implementation of the first aspect.
- the present application provides a graph communication system, which may include a first network device, a first subnode of the first network device, and a second subnode of the first network device; wherein, the first network device, Used to execute the method described in the first aspect or any possible implementation of the first aspect; the first subnode is used to receive the second message sent by the first network device; the second subnode is used to receive The third packet sent by the first network device.
- the first network device may be the packet processing apparatus provided in the second aspect above.
- the present application provides a computer-readable storage medium, which is characterized in that it includes instructions, programs or codes, and when executed on a computer, the computer executes any one of the first aspect or the first aspect.
- the described method in a possible implementation.
- the present application provides a computer program product, which, when the computer program product runs on a network device, causes the network device to execute all the above-mentioned first aspect or any possible implementation of the first aspect. described method.
- Fig. 1 is the schematic diagram of MSR6 SID in this application.
- FIG. 2 is a schematic structural diagram of a multicast tree in an embodiment of the present application.
- FIG. 3a is a schematic diagram of a message 1 of an MSR6 in the present application.
- Fig. 3b is a schematic diagram of message 1 of another MSR6 in the present application.
- FIG. 4a is a schematic diagram of an M-SID in an embodiment of the present application.
- FIG. 4b is a schematic diagram of an M-SID in the embodiment of the present application.
- FIG. 5a is a schematic diagram of a message 1 of an MSR6 in the embodiment of the present application.
- FIG. 5b is a schematic diagram of processing message 1 in the scenario shown in FIG. 2 in the embodiment of the present application;
- FIG. 6 is a schematic flowchart of a message processing method 100 provided in an embodiment of the present application.
- FIG. 7 is a schematic structural diagram of another multicast tree in the embodiment of the present application.
- Figure 8a is a schematic diagram of a segment list 1 of a message 1 in the embodiment of the present application.
- Figure 8b is a schematic diagram of segment list 1 of another message 1 in the embodiment of the present application.
- Fig. 8c is a schematic diagram of segment list 1 of another message 1 in the embodiment of the present application.
- Fig. 8d is a schematic diagram of segment list 1 of another message 1 in the embodiment of the present application.
- FIG. 9a is a schematic diagram of a second message in the embodiment of the present application.
- FIG. 9b is a schematic diagram of a third message in the embodiment of the present application.
- FIG. 10a is a schematic diagram of processing message 1 in the scenario shown in FIG. 7 in the embodiment of the present application;
- FIG. 10b is another schematic diagram of processing message 1 in the scenario shown in FIG. 7 in the embodiment of the present application.
- FIG. 10c is another schematic diagram of processing message 1 in the scenario shown in FIG. 7 in the embodiment of the present application.
- FIG. 11 is a schematic structural diagram of a network device 1100 in an embodiment of the present application.
- FIG. 12 is a schematic structural diagram of a network device 1200 in an embodiment of the present application.
- FIG. 13 is a schematic structural diagram of a network device 1300 in an embodiment of the present application.
- FIG. 14 is a schematic structural diagram of a communication system 1400 in an embodiment of the present application.
- the MSR6 SID of the network device in the multicast tree can be referred to as shown in Figure 1, including: location (Locator) field, function (Function) field and variable (Arguments) field, wherein, Arguments field includes: replication number (replication number ) and a pointer (pointer), where the replication number is the identifier used to indicate the number of replications, the value of the replication number indicates the number of messages that the current node needs to replicate, and the pointer is the identifier used to indicate the child node of the current node, and the value of the pointer It is used to indicate the position (such as offset) of the SID of the child node of the current node in the segment list.
- Location Location
- Function Function
- Arguments variable
- Arguments field includes: replication number (replication number ) and a pointer (pointer), where the replication number is the identifier used to indicate the number of replications, the value of the replication number indicates the number of messages that the current node needs to replicate, and the point
- this multicast tree comprises network equipment A, network equipment B, network equipment C, network equipment D, network equipment E, network equipment F and network equipment G, wherein, the child node of network equipment A comprises network equipment B and Network device C, the child nodes of network device B include network device D and network device E, and the child nodes of network device C include network device F and network device G.
- the MSR6 SID F of network device F may include: Locator F, Function End.
- message 1 includes IPv6 header, MRH and multicast data message, wherein, IPv6 header can include: version (Version) field, traffic type (Traffic Type) field, flow identification (Flow Label) field , Payload Length (Payload Length) field, Next Header (Next Header) field, Hop Limit (Hop Limit) field, Source Address (Source Address, SA) field and Destination Address (Destination Address, DA) field.
- version Version
- Traffic Type Traffic Type
- Flow Label Flow Label
- Payload Length Payload Length
- Next Header Next Header
- Hop Limit Hop Limit
- Source Address Source Address, SA
- Destination Address Destination Address
- the meaning of each field in the IPv6 header can refer to the explanation in Request for Comments (RFC) 8200.
- the MRH can include: the next header (Next Header) field, header extension length (Hdr Ext Len) field, routing type (Routing Type) field, segment remaining (segment left) field, MRH type (MRH Type) field, Reserved field and segment list.
- the meaning of each field in the MRH can refer to the explanation in the draft "draft-geng-msr6-traffic-engineering-00".
- the MSR6 message will carry the MSR6 SID of all network devices in the multicast tree, and the length of each MSR6 SID is 128 bits. If the multicast tree is large, the message header of the MSR6 message will be too long. It affects the processing efficiency of the MSR6 message, which is not conducive to the implementation and promotion of the MSR6 technology.
- the proposed part can be recorded as the common prefix (Common Prefix), which appears in the MSR6 In the DA field of the IPv6 header of the message; MSR6 SID other than Common Prefix is recorded as M-SID, for example, MSR6 SID A can be recorded as Common Prefix+M-SID A.
- the length of the M-SID can be 32 bits, so, in the segment list of the MRH of the MSR6 message, it can be compressed from including multiple 128-bit MSR6 SIDs to including the same number of multiple 32-bit M-SIDs.
- the same Common Prefix in the Locators of the MSR6 SIDs of all network devices in the multicast tree is proposed, and the Common Prefix is only carried in one place of the MSR6 message (for example, carried in the DA field of the IPv6 header).
- the segment list of the MRH in the text carries the M-SID of all network devices in the multicast tree.
- the M-SID is the remaining part of the MSR6SID after removing the Common Prefix.
- the M-SID is only 32 bits long. For the same multicast tree, this implementation effectively compresses the length of the message header of the MSR6 message.
- the segment list of the MRH of the message always carries the SIDs of all nodes in the multicast tree.
- the relevant SIDs of other subtrees with the same parent node are invalid.
- the message 1' received by network device B M-SID C, M-SID F, and M-SID G belong to the relevant SIDs of the subtree rooted at network device C, and will not affect the forwarding of multicast data packets in the subtree rooted at network device C .
- the relevant SID of the subtree includes the SID of the root node in the subtree and the SID of the child nodes of the subtree.
- the embodiment of the present application provides a message processing method, by defining a SID with a subtree pop-up function (also can It is denoted as a subtree pop-up (childtree pop, CTP) type SID), according to the instruction of the SID, when transmitting in the multicast tree, the content invalid for this subtree in the pop-up message is realized to compress the message of MSR6.
- a subtree pop-up function also can It is denoted as a subtree pop-up (childtree pop, CTP) type SID
- the SID issued by the node that needs to perform the subtree pop-up operation includes the SID used to indicate the subtree pop-up at the node.
- the entry node of the multicast tree also needs to obtain the segment list corresponding to the multicast tree.
- the segment list corresponding to the multicast tree can be generated by the controller based on the SID issued by each network device and sent to the multicast The entry node of the tree; in another case, the segment list corresponding to the multicast tree can also be generated by the entry node of the multicast tree itself based on the SID issued by each network device; in another case, the segment list corresponding to the multicast tree The segment list can also be manually configured on the entry node of the multicast tree.
- the SID in the segment list in the embodiment of the present application may be a 128-bit MSR6 SID, or the M-SID compressed by extracting the public Common Prefix, which does not affect the implementation of the embodiment of the present application.
- the SID in the segment list is M-SID as an example in the following description.
- the pointer in FIG. 4a can also be replaced with a number identifier (N-SID), and the N-SID is used to indicate the number of sub-nodes of the network device.
- N-SID number identifier
- the processing process of the first message of MSR6 is described from the perspective of the first network device performing the subtree pop-up operation, and the child nodes of the first network device include the second child node and the third child node, the SID issued by the first network device includes the first SID for instructing to perform a subtree pop-up operation.
- the first network device obtains the first message of MSR6, the first message includes DA, the first segment list and the multicast data message, and the first segment list includes the first SID, the second segment list and the first segment list Three segment lists, where the second segment list corresponds to the subtree rooted at the first child node, and the third segment list corresponds to the subtree rooted at the second child node; if it is determined that the DA matches the first SID, then the first segment list corresponds to the subtree rooted at the second child node; A network device can obtain a second message and a third message based on the first message, wherein the second message includes a second segment list and a multicast data message, and the third message includes a third segment list and a group broadcast data packets; thus, the first network device sends the second packet to the first subnode, and sends the third packet to the second subnode.
- the network device can split the obtained segment list in the message to be multicast according to different sub-nodes, and only the segment list of the message sent to a certain sub-node Including the relevant SID of the subtree rooted at the subtree after splitting, it will not affect the processing of multicast data packets by this subtree, and can also effectively reduce the length of the segment list in the packet, thereby reducing The length of the small message realizes the effect of improving the efficiency of message processing without affecting the processing and forwarding of the message.
- the network device and the node in the embodiment of the present application refer to the same meaning, and both may refer to a communication device with a message forwarding function such as a switch, a router, a virtual routing device, or a virtual forwarding device.
- the packet processing method provided by the embodiment of the present application is described exemplarily.
- MSR6 SID 1 can include Common Prefix and M-SID 1.
- the message 1 generated by network device A can be referred to, for example, as shown in Figure 5a.
- N-SID is used to indicate the number of sub-nodes of the network device
- M-SID B may include N-SID B
- the MSR6 SID or M-SID of a network device includes N-SID
- the N-SID SIDs adjacent to the SID of the network device after the SID of the network device in the segment list correspond to the child nodes of the network device the SID. For example, in segment list 1 in message 1
- network device A can split the segment list in the obtained message according to different subnodes, and the segment list of the message sent to network device B only includes the segment list After the related SID of the subtree rooted at network device B, the segment list of the packet sent to network device C only includes the related SID of the subtree rooted at network device C after splitting.
- the length of the segment list in the message can be effectively reduced, thereby reducing the length of the message, and realizing the process without affecting the processing and forwarding of the message Based on the effect of improving packet processing efficiency.
- FIG. 6 is a schematic flowchart of a packet processing method 100 provided in an embodiment of the present application.
- the method 100 is described by taking the first network device as the execution body, and the sub-nodes of the first network device include the first sub-node and the second sub-node.
- the method 100 may include, for example, the following S101-S103:
- the first network device obtains a first packet, the first packet includes a DA, a first segment list, and a multicast data packet, and the first segment list includes a first SID, a second segment list, and a first segment list of the first network device Three segment lists, the second segment list corresponds to the subtree rooted at the first child node, and the third segment list corresponds to the subtree rooted at the second child node.
- the first SID is used to instruct the first network device to perform a subtree pop-up operation on the obtained message.
- the type of SID (may also indicate the operation indicated by the SID) can be determined based on the value of Function in the SID.
- the value End.RL of Function in this embodiment of the present application is only exemplary, and the value of End.RL in each SID may be different to indicate whether to perform a subtree pop-up operation.
- the first segment list includes the SID of the first network device and the SID of the child node of the first network device; the second The segment list includes the SID of the first child node and the SIDs of the child nodes of the first child node; the third segment list includes the SID of the second child node and the SIDs of the child nodes of the second child node.
- the first network device may be network device A, the first child node of the first network device is network device B, and the second child node of the first network device is network device C.
- the first packet may correspond to packet 1 shown in FIG. 5a, and the first segment list corresponds to segment list 1, where the first SID corresponds to M-SID 1.
- the first segment list can include the relevant SID of the subtree rooted at network device A, that is, the first segment list includes the M-SID 1 of network device A and the SID of the child node of network device A; similarly, the second segment list Can include the relevant SID of the subtree with the network device B as the root, that is, the second segment list includes the SID of the network device B and the SID of the child nodes of the network device B, for example, can include: M-SID B, M-SID D and M-SID E; the third segment list may include the relevant SID of the subtree rooted at the network device C, that is, the third segment list includes the SID of the network device C and the SID of the child node of the network device C, for example may include: M -SID C, M-SID F and M-SID G.
- the first network device may be an ingress node, for example, the first network device may be network device A of the multicast tree shown in FIG. 2 .
- S101 may include, for example: S101a1, the first network device receives the multicast data message, the multicast data message includes multicast information; S101a2, the first network device obtains the first segment list based on the multicast information; S101a3 , the first network device generates the first message based on the multicast data message and the first segment list.
- the first network device saves the correspondence between the multicast information and the segment list, then, after the first network device receives the multicast data message including the multicast information, it can save it locally
- the segment list corresponding to the multicast information in the multicast data message is obtained from the corresponding relationship, which is recorded as the first segment list.
- the multicast information may include a multicast group address, then the first network device may obtain a first segment list corresponding to the multicast group address.
- the multicast information can also include the multicast group address and the multicast tree identification (tree id), then, the first network device can obtain the identification corresponding to the multicast group address and the multicast group address in the multicast information.
- the first segment list is the correspondence between the multicast information and the segment list.
- the correspondence between multicast information, segment list and service level agreement is saved on the first network equipment, so, the first network equipment receives the multicast including multicast information
- the segment list corresponding to the multicast information in the multicast data message and meeting the SLA requirements can be obtained from the locally stored correspondence, which is recorded as the first segment list.
- the multicast information may include a multicast group address, a multicast tree identifier and parameters for identifying SLA requirements, then the first network device may obtain the identifier and the multicast group address of the multicast tree in the multicast information
- the corresponding first segment list that meets the SLA requirements may be, for example, a color (color) value.
- the first network device may be an intermediate node
- S101 may include, for example: S101b
- the first network device receives the first packet sent by the last hop node of the first network device.
- the last hop node of the first network device is an entry node.
- the first network device may be network device B of the multicast tree shown in FIG. 2
- S101 may be network device B receiving network device A
- the last hop node of the first network device is the last hop intermediate node
- the first network device may also be network device F in the scenario shown in FIG. 7
- S101 may be network device F Receive the first packet sent by the network device C.
- the difference between Fig. 7 and the scene shown in Fig. 2 is that: network device F also includes two child nodes - network device H and network Device I and network device G also include two child nodes - network device J and network device K.
- the first SID may be a CTP type SID.
- the first SID is not only used to identify the first network device, but also used to instruct the first network device to perform a subtree pop-up operation on the received packet whose DA is the first SID.
- the SID of the CTP type can be subdivided into: the SID of the child tree pop and N-SID, CTPN type, and the SID of the pointer (child tree pop and pointer, CTPP) type of the child tree pop and pointer (CTPP) type. .
- the first SID is a CTPN-type SID, that is, the first SID includes a first N-SID, and the first N-SID is used to indicate the number of child nodes.
- the SID of the first child node is a CTPN-type SID, that is, the SID of the first child node includes the second N-SID, and the second N-SID is used to indicate the child of the first child node Number of nodes;
- the SID of the second child node is a CTPN-type SID, that is, the SID of the second child node includes a third N-SID, and the third N-SID is used to indicate the number of child nodes of the second child node.
- the segment list 1 of message 1 is shown in Figure 8a
- the SID of the first child node is a CTPP type SID, that is, the SID of the first child node includes a second pointer, and the second pointer is used to indicate that the child node of the first child node is at the An offset in the segment list;
- the SID of the second child node is a CTPP type SID, that is, the SID of the second child node includes a third pointer, and the third pointer is used to indicate that the child node of the second child node is in the first The offset in the segment list.
- the segment list 1 of message 1 is shown in Figure 8b
- the first SID is a CTPP-type SID, that is, the first SID includes a first pointer, and the first pointer is used to indicate an offset of a child node of the first network device in the first segment list.
- the SID of the first child node is a CTPN-type SID, that is, the SID of the first child node includes the second N-SID, and the second N-SID is used to indicate the child of the first child node Number of nodes;
- the SID of the second child node is a CTPN-type SID, that is, the SID of the second child node includes a third N-SID, and the third N-SID is used to indicate the number of child nodes of the second child node.
- the segment list 1 of message 1 is shown in Figure 8c.
- the SID of the first child node is a CTPP type SID, that is, the SID of the first child node includes a second pointer, and the second pointer is used to indicate that the child node of the first child node is at the An offset in the segment list;
- the SID of the second child node is a CTPP type SID, that is, the SID of the second child node includes a third pointer, and the third pointer is used to indicate that the child node of the second child node is in the first The offset in the segment list.
- the segment list 1 of message 1 is shown in Figure 8d
- the SID of the first child node and the SID of the second child node are CTP-type SIDs as an example.
- the SID of the first child node and the SID of the second child node can also be subtrees No pop (child tree no pop, CTNP) type SID, the CTNP type SID is used to indicate that no subtree pop operation will be performed.
- the SID of the second child node is used to instruct the second child node not to perform a subtree pop-up operation on the segment list of the received multicast message.
- SIDs of the CTNP type can be subdivided into: SIDs of the child tree no pop and N-SID, CTNPN type, and child tree no pop and N-SID, CTNPN type SIDs, and child tree no pop and pointer (CTNPP) type SIDs, of the child tree no pop and pointer type the SID.
- CTNPP child tree no pop and pointer
- the first child node may not perform the subtree pop-up operation by default.
- the second child node may not perform the subtree pop-up operation by default.
- the SID of the child node of the first child node includes a replication number whose value is not 0, the type of the SID of the first child node (or the second child node) is considered, and Whether the first child node (or the second child node) performs a subtree pop-up operation.
- the SID of the first sub-node and the SID of the second sub-node are of the same type as an example for description.
- the SID of the first sub-node and the SID of the second sub-node may also be of different types.
- the first network device obtains the second message and the third message based on the first message, the second message includes the second segment list and the multicast data message, and the third message Including the third segment list and the multicast data message.
- the first network device After the first network device obtains the first message, it obtains the value of the DA field by parsing the first message, and judges whether the value of the DA field matches the SID of the first network device, and if so, continues to determine the matched type of the SID, and correspondingly process the first packet according to the type of the matched SID.
- the first network device determines that the DA of the first packet matches the first SID of the CTP type of the first network device, perform S102 to obtain the second packet and the third packet.
- the first network device does Determining that the DA of the first packet matches the first SID may include: the first network device obtains the Common Prefix and M-SID 1 from the DA field, and then concatenates the Common Prefix and M-SID 1 to obtain the MSR6 SID A, if If the MSR6 SID is the same as the first SID, it is determined that the DA matches the first SID.
- the first network device determining that the DA of the first message matches the first SID may also include: the first network device obtains M-SID 1 from the DA field, and then, if M-SID 1 and the first SID are last N If the bits are the same, it is determined that the DA matches the first SID, where N is an integer greater than 0 and less than 128, and N may be equal to the length of the MSR6 SID after removing the Common Prefix.
- S102 may include: S102a1 The first network device based on the second N-SID A segment list and a first SID, obtaining a second segment list and a third segment list after the second segment list from the first segment list; S102a2, the first network device based on the value of the replication number in the first message, the second The segment list, the third segment list and the multicast data message are obtained to obtain the second message and the third message.
- the first network device obtains the second segment list from the first segment list, for example, may include: S51, the first network device determines the SID of the first child node based on the first N-SID and the first segment list; S52 , the first network device obtains the SID of the child node of the first child node based on the SID of the first child node and the second N-SID; S53, the first network device obtains the SID of the child node of the first child node based on the SID of the first child node and the child node of the first child node SID of the node to get the second segment list.
- the first network device acquires the third segment list from the first segment list may include: the first network device determines that the first SID after the end of the second segment list is the SID of the second child node; then, the first network device based on The SID of the second child node and the third N-SID, and obtain the SID of the child node of the second child node; then, the first network device obtains the second child node based on the SID of the second child node and the SID of the child node of the second child node.
- S102 may include: S102b1, the first network device based on the first segment list and the first SID, obtaining the second segment list and the third segment list after the second segment list from the first segment list; S102b2, the first network device based on the value of the replication number in the first message, the second segment list, The third segment list and the multicast data message are used to obtain the second message and the third message.
- the first network device obtains the second segment list from the first segment list, for example, may include: S61, the first network device determines the SID of the first child node based on the first N-SID and the first segment list; S62 , the first network device obtains the SID of the child node of the first child node based on the SID of the first child node and the second pointer; S63, the first network device obtains the SID of the child node of the first child node based on the SID of the first child node and the child node of the first child node SID, get the second segment list.
- the first network device from the first The segment list acquisition of the third segment list may include, for example: the first network device determines that the first SID after the first subnode is the SID of the second subnode; then, the first network device based on the SID of the second subnode and the first SID Three pointers, obtaining the SID of the child node of the second child node; then, the first network device obtains the third segment list based on the SID of the second child node and the SID of the child node of the second child node.
- the SID starting from the SID indicated by the second pointer to the SID before the SID indicated by the third pointer is the SID of the child node of the first child node.
- S102 may include: S102c1, the first network device based on the first The segment list and the first SID, from the first segment list to obtain the second segment list and the third segment list after the second segment list; S102c2, the first network device based on the value of the replication number in the first message, the second segment list, the third segment list and the multicast data packet to obtain the second packet and the third packet.
- the first network device acquires the second segment list from the first segment list may include: S71, the first network device determines the SID of the first child node based on the first pointer and the first segment list; S72, the first segment list A network device obtains the SID of the child node of the first child node based on the SID of the first child node and the second N-SID; S73, the first network device obtains the SID of the child node of the first child node based on the SID of the first child node and the child node of the first child node. SID, get the second segment list.
- the first network device obtains the third segment list from the first segment list may include: the first network device determines that the first SID after the end of the second segment list is the SID of the second child node; then, the first network device based on The SID of the second child node and the third N-SID, and obtain the SID of the child node of the second child node; then, the first network device obtains the second child node based on the SID of the second child node and the SID of the child node of the second child node.
- S102 may include: S102d1, the first network device based on the first segment list and the first segment list A SID, obtaining the second segment list and the third segment list after the second segment list from the first segment list; S102d2, the first network device based on the value of the replication number in the first message, the second segment list, the third The segment list and the multicast data message are obtained to obtain the second message and the third message.
- the first network device acquires the second segment list from the first segment list may include: S81, the first network device determines the SID of the first child node based on the first pointer and the first segment list; S82, the first segment list A network device obtains the SID of the child node of the first child node based on the SID of the first child node and the second pointer; S83, the first network device obtains the SID of the child node of the first child node based on the SID of the first child node and the SID of the child node of the first child node, Get the second segment list.
- the first network device obtains the third segment list from the first segment list may include: the first network device determines that the first SID after the first subnode is the SID of the second subnode; then, the first network device based on the first SID The SID of the second child node and the third pointer obtain the SID of the child node of the second child node; then, the first network device obtains the third segment list based on the SID of the second child node and the SID of the child node of the second child node .
- the SID starting from the SID indicated by the second pointer to the SID before the SID indicated by the third pointer is the SID of the child node of the first child node.
- the second message can include IPv6 header, MRH and multicast data message, and MRH includes segment list 2 and SL, wherein, the value of DA in the IPv6 header can be MSR6 SID B, also It can be Common Prefix+M-SID B; the value of SL indicates MSR6 SID B or M-SID B in segment list 2.
- the third message can include DA, MRH and multicast data message, and MRH includes segment list 3 and SL, where the value of DA can be MSR6 SID C or Common Prefix+ M-SID C; The value of SL indicates MSR6 SID C or M-SID C in segment list 3.
- the first network device sends the second packet to the first subnode, and sends the third packet to the second subnode.
- the first network device processes the obtained first message into the second message and the third message according to the method provided in the embodiment of the present application, and the second segment list of the second message is related to the first child node as The subtree of the root corresponds (that is, only includes the SID of the first child node and the SID of the child nodes of the first child node), and does not include the related SID of the second child node.
- the third segment list of the third message Corresponding to the subtree rooted at the second child node (that is, only including the SID of the second child node and the SIDs of the child nodes of the second child node), and not including the related SID of the first child node, so that the first network
- the lengths of the second message and the third message sent by the device to the first child node and the second child node respectively are compressed, and invalid information that does not affect message processing is eliminated, so that the first child node can follow the second segment list For the received second message
- the second child node can normally process the received third message according to the third segment list, which improves the message processing efficiency and reduces the resources required for message forwarding.
- the embodiment of the present application also provides a CTNP-type SID. After the first network device performs a subtree pop-up operation on the first packet, the first child node and /or the second child node does not perform subtree popping.
- the multicast tree includes network equipment A, network equipment B, network equipment C, network equipment D, network equipment E, network equipment F, network equipment G, network equipment H, network equipment I, network equipment J and network Device K, wherein the child nodes of network device A include network device B and network device C, the child nodes of network device B include network device D and network device E, and the child nodes of network device C include network device F and network device G, The child nodes of network device F include network device H and network device I, and the child nodes of network device G include network device J and network device K.
- the values of pointer are 4, 6, 8 and 10 respectively, and the value of pointer in other M-SIDs is 0.
- the segment list 2 of message 2 includes: M-SID B, M-SID D and M-SID E in sequence, where M-SID B, M-SID The pointer values in SID D and M-SID E are 2, 0, and 0 respectively;
- the segment list 3 of message 3 includes: M-SID C, M-SID F, M-SID G, M-SID H, For M-SID I, M-SID J, and M-SID K, the values of pointers in M-SID C, M-SID F, and M-SID G are 2, 4, and 6 respectively, and the values of pointers in other M-SIDs are The value is 0.
- network device B After network device B receives message 2, it copies and modifies DA to obtain message 2' and message 2", and sends message 2' and message 2" to network device D and network device E respectively.
- network device C After network device C receives message 3, it copies and modifies DA to obtain message 3' and message 3", both of which include segment list 3, and network device C respectively reports Message 3' and message 3" are sent to network device F and network device G; after network device F receives message 3', it copies and modifies DA to obtain message 31 and message 32, message 31 and message Both text 32 includes segment list 3, and network device F sends message 31 and message 32 to network device H and network device I respectively; after network device G receives message 3", it copies and modifies DA to obtain The message 31' and the message 32', both the message 31' and the message 32' include the segment list 3, and the network device G sends the message 31' and the message 32' to the network device J and the network device K respectively.
- the values of N-SID are 2, 6, 2 and 2 respectively, and the value of N-SID in other M-SIDs is 0.
- segment list 2 of message 2 includes: M-SID B, M-SID D, and M-SIDE E in sequence, where M-SID B, M-SID SID D and M-SID E The values of N-SID are 2, 0, and 0 respectively;
- segment list 3 of message 3 includes: M-SID C, M-SID F, M-SID H, M-SID I, M-SID G, M -SID J and M-SID K, where the values of N-SID in M-SID C, M-SID F and M-SID G are 6, 2 and 2 respectively, and the value of pointer in other M-SIDs is 0.
- network device B After network device B receives message 2, it copies and modifies DA to obtain message 2 and message 2', and sends message 2 and message 2' to network device D and network device E respectively.
- network device C After network device C receives message 3, it copies and modifies DA to obtain message 3 and message 3'.
- Both message 3 and message 3' include segment list 3, and network device C respectively converts message 3 and message 3' are sent to network device F and network device G; after receiving message 3, network device F copies and modifies DA to obtain message 31 and message 32, and both message 31 and message 32 are Including segment list 3, network device F sends message 31 and message 32 to network device H and network device I respectively; after network device G receives message 3', it copies and modifies DA to obtain message 31' and message 32', both the message 31' and the message 32' include segment list 3, and the network device G sends the message 31' and the message 32' to the network device J and the network device K respectively.
- the SID of network device A is of CTPP or CTPN type
- the SIDs of network device B and network device C are of CTNPN type
- the SIDs of network device D and network device E are of CTNPN type
- the SID of other network devices is CTNPP type
- the SID of other network devices is CTNPP type
- the segment 1 of message 1 obtained by network device A includes: M-SID 1, M-SID B , M-SID D, M-SID E, M-SID C, M-SID F, M-SID G, M-SID H, M-SID I, M-SID J and M-SID K
- the values of N-SID of M-SID B and M-SID C are 2 and 6 respectively
- the values of pointer in M-SID F and M-SID G are respectively 4 and 6, the value of point
- segment list 2 of message 2 includes: M-SID B, M-SID D and M-SID E in sequence, where M-SID B, M-SID The values of N-SID in SID D and M-SID E are 2, 0 and 0 respectively;
- segment list 3 of message 3 includes: M-SID C, M-SID F, M-SID G, M-SID H, M-SID I, M-SID J, and M-SID K, where the N-SID values of M-SID C are 6, and the pointers of M-SID F and M-SID G are 4 and 6, respectively.
- the value of pointer in other M-SIDs is 0.
- network device B After network device B receives message 2, it copies and modifies DA to obtain message 2 and message 2', and sends message 2 and message 2' to network device D and network device E respectively.
- network device C After network device C receives message 3, it copies and modifies DA to obtain message 3 and message 3'.
- Both message 3 and message 3' include segment list 3, and network device C respectively converts message 3 and message 3' are sent to network device F and network device G; after receiving message 3, network device F copies and modifies DA to obtain message 31 and message 32, and both message 31 and message 32 are Including segment list 3, network device F sends message 31 and message 32 to network device H and network device I respectively; after network device G receives message 3', it copies and modifies DA to obtain message 31' and message 32', both message 31' and message 32' include segment list 3, and network device G sends message 31' and message 32' to network device J and network device K respectively.
- M-SID D and M-SIDE E may also be of CTNPP type, which does not affect the implementation of this embodiment of the application.
- the method provided by the embodiment of the present application provides a variety of SID types, and can flexibly use a specific type of SID in the segment list according to the position of the network device in the multicast tree, for example, to perform a subtree pop-up operation
- a network device such as a network device near the entry node of the multicast tree
- using the CTP type SID of the network device in the segment list realizes popping up the subtree at the network device to compress the length of the multicast packet effect
- the SID of the CTNP type of the network device is used in the segment list, and the subtree pop-up operation is not performed at the network device, so as to reduce the message processing workload of the network device and improve message processing efficiency.
- FIG. 11 shows a schematic diagram of a possible structure of a packet processing apparatus 1100.
- the packet processing apparatus 1100 can implement the function of the first network device in the example shown in FIG. 6 .
- the packet processing apparatus 1100 includes: a first obtaining unit 1101 , a second obtaining unit 1102 and a first sending unit 1103 . These units can perform corresponding functions of the first network device in the above method examples.
- the first obtaining unit 1101 is used to support the message processing device 1100 to execute S101 in FIG. 6; the second obtaining unit 1102 is used to support the message processing device 1100 to perform S102 in FIG.
- the packet processing device 1100 executes S103 in FIG. 6 .
- the packet processing apparatus 1100 can also implement other processes performed by all network devices or nodes in the embodiments of the present application.
- the first obtaining unit 1101 is configured to perform the operation of obtaining the first packet performed by the first network device in the above method 100; the second obtaining unit 1102 is configured to perform the DA and When the first SID matches, the operation of obtaining the second message and the third message based on the first message; the first sending unit 1103 is configured to perform the sending of the second message to the first child node performed by the first network device in the method 100 above. message, an operation of sending a third message to the second child node.
- the first SID is used to indicate that the subtree is popped up.
- the first SID includes a first number identifier N-SID, and the first N-SID is used to indicate the number of child nodes.
- the SID of the first child node includes the second N-SID
- the second N-SID is used to indicate the first The number of child nodes for child nodes.
- the first SID further includes an identifier for indicating the number of copies
- the second obtaining unit 1102 may include: a first obtaining subunit and a second obtaining subunit.
- the first obtaining subunit is used to obtain the second section list and the third section list after the second section list from the first section list based on the first section list and the first SID; the second obtaining subunit uses The second packet and the third packet are obtained based on the identifier used to indicate the number of times of replication, the second segment list, the third segment list, and the multicast data packet included in the first packet.
- the first obtaining subunit refers to S102a1 in the embodiment shown in FIG. 6
- the specific implementation manner of the second obtaining subunit refer to S102a2 in the embodiment shown in FIG. 6 .
- the first obtaining subunit is specifically configured to: determine the SID of the first child node based on the first N-SID and the first segment list; obtain the first child node based on the SID of the first child node and the second N-SID The SIDs of the child nodes of the node; based on the SID of the first child node and the SIDs of the child nodes of the first child node, the second segment list is obtained.
- the first obtaining subunit is specifically configured to: determine the SID of the first child node based on the first N-SID and the first segment list; obtain the first child node based on the SID of the first child node and the second N-SID The SIDs of the child nodes of the node; based on the SID of the first child node and the SIDs of the child nodes of the first child node, the second segment list is obtained.
- the SID of the first child node includes a second pointer
- the second pointer is used to indicate the SID of the first child node
- the offset of the child node in the first segment list if the second segment list includes the SID of the first child node and the SIDs of the child nodes of the first child node, the SID of the first child node includes a second pointer, and the second pointer is used to indicate the SID of the first child node The offset of the child node in the first segment list.
- the first SID further includes an identifier for indicating the number of copies
- the second obtaining unit 1102 may include: a fifth obtaining subunit and a sixth obtaining subunit.
- the fifth obtaining subunit is used for obtaining the second section list and the third section list after the second section list from the first section list based on the first section list and the first SID; the sixth obtaining subunit is used
- the second packet and the third packet are obtained based on the identifier used to indicate the number of times of replication, the second segment list, the third segment list, and the multicast data packet included in the first packet.
- the fifth sub-list For the specific implementation manner of the unit, refer to S102b1 in the embodiment shown in FIG. 6
- the specific implementation manner of the sixth obtaining subunit refer to S102b2 in the embodiment shown in FIG. 6 .
- the fifth obtaining subunit is specifically configured to: determine the SID of the first child node based on the first N-SID and the first segment list; obtain the SID of the first child node based on the SID of the first child node and the second pointer The SID of the child node; based on the SID of the first child node and the SIDs of the child nodes of the first child node, the second segment list is obtained.
- the fifth obtaining subunit is specifically configured to: determine the SID of the first child node based on the first N-SID and the first segment list; obtain the SID of the first child node based on the SID of the first child node and the second pointer The SID of the child node; based on the SID of the first child node and the SIDs of the child nodes of the first child node, the second segment list is obtained.
- the first SID includes a first pointer, and the first pointer is used to indicate the offset of the first segment list of the child node of the first network device.
- the second segment list includes the SID of the first child node and the SIDs of the child nodes of the first child node
- the SID of the first child node includes the second N-SID
- the second N-SID is used to indicate the first The number of child nodes for child nodes.
- the first SID further includes an identifier for indicating the number of copies
- the second obtaining unit may include: a third obtaining subunit and a fourth obtaining subunit.
- the third obtaining subunit is used to obtain the second section list and the third section list after the second section list from the first section list based on the first section list and the first SID; the fourth obtaining subunit is used
- the second packet and the third packet are obtained based on the identifier used to indicate the number of times of replication, the second segment list, the third segment list, and the multicast data packet included in the first packet.
- the third obtaining subunit is specifically configured to: determine the SID of the first child node based on the first pointer and the first segment list; obtain the SID of the first child node based on the SID of the first child node and the second N-SID The SID of the child node; based on the SID of the first child node and the SIDs of the child nodes of the first child node, the second segment list is obtained.
- the third obtaining subunit is specifically configured to: determine the SID of the first child node based on the first pointer and the first segment list; obtain the SID of the first child node based on the SID of the first child node and the second N-SID The SID of the child node; based on the SID of the first child node and the SIDs of the child nodes of the first child node, the second segment list is obtained.
- the SID of the first child node includes a second pointer
- the second pointer is used to indicate the SID of the first child node
- the first SID further includes an identifier for indicating the number of copies
- the second obtaining unit may include: a seventh obtaining subunit and an eighth obtaining subunit.
- the seventh obtaining subunit is used to obtain the second section list and the third section list after the second section list from the first section list based on the first section list and the first SID; the eighth obtaining subunit is used The second packet and the third packet are obtained based on the identifier used to indicate the number of times of replication, the second segment list, the third segment list, and the multicast data packet included in the first packet.
- the seventh obtaining subunit refers to S102d1 in the embodiment shown in FIG. 6
- the specific implementation manner of the eighth obtaining subunit refer to S102d2 in the embodiment shown in FIG. 6 .
- the seventh obtaining subunit is specifically configured to: determine the SID of the first child node based on the first pointer and the first segment list; obtain the child nodes of the first child node based on the SID of the first child node and the second pointer the SID of the first child node; based on the SID of the first child node and the SIDs of the child nodes of the first child node, the second segment list is obtained.
- the seventh obtaining subunit is specifically configured to: determine the SID of the first child node based on the first pointer and the first segment list; obtain the child nodes of the first child node based on the SID of the first child node and the second pointer the SID of the first child node; based on the SID of the first child node and the SIDs of the child nodes of the first child node, the second segment list is obtained.
- S81 to S83 in the embodiment shown in FIG. 6 .
- the SID of the first child node is used to indicate that subtree popping is not performed.
- the third segment list includes the SID of the second child node and the SID of the child nodes of the second child node, the SID of the second child node includes a third N-SID, and the third N-SID is used to indicate the The number of child nodes of the second child node.
- the first network device is an ingress node
- the first obtaining unit 1101 may include: a receiving subunit, a ninth obtaining subunit, and a generating subunit.
- the receiving subunit is used to receive the multicast data message, and the multicast data message includes multicast information
- the ninth obtaining subunit is used to obtain the first segment list based on the multicast information
- the generating subunit is used to obtain the first segment list based on the multicast information
- the ninth obtaining subunit is specifically configured to: obtain the first segment list corresponding to the multicast information according to the multicast information; or obtain the first segment list corresponding to the multicast information that satisfies the SLA requirement and is based on the multicast information .
- the multicast information includes the multicast group address, or, the multicast information includes the multicast group address and the identifier of the multicast tree, or, the multicast information includes the multicast group address, the multicast tree identifier, and the parameter.
- the receiving subunit refer to S101a1 in the embodiment shown in FIG. 6 .
- the ninth obtaining subunit refer to S101a2 in the embodiment shown in FIG. 6 .
- S101a3 in the embodiment shown in FIG. 6 .
- the first network device is an intermediate node
- the first obtaining unit 1101 is specifically configured to: receive the first message sent by the last hop node of the first network device, and receive the first message sent by the last hop node of the first network device.
- the node is the entry node or the last hop intermediate node. It should be noted that, for a specific implementation manner of the first obtaining unit 1101, reference may be made to S101b in the embodiment shown in FIG. 6 .
- each functional unit in the embodiment of the present application may be integrated into one processing unit, or each unit may physically exist separately, or two or more units may be integrated into one unit.
- the first obtaining unit, the second obtaining unit, and the first sending unit may be the same unit or different units.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
- FIG. 12 is a schematic structural diagram of a network device 1200 provided by an embodiment of the present application.
- the first network device in FIG. 6 or the packet processing apparatus 1100 in FIG. 11 may be implemented by the network device shown in FIG. 12 .
- the network device 1200 includes at least one processor 1201 , a communication bus 1202 and at least one network interface 1204 , and optionally, the network device 1200 may also include a memory 1203 .
- the processor 1201 may be a general-purpose central processing unit (central processing unit, CPU), a specific application integrated circuit (application-specific integrated circuit, ASIC) or one or more integrated circuits (integrated circuit) for controlling the program execution of the application scheme , IC).
- CPU central processing unit
- ASIC application-specific integrated circuit
- integrated circuit integrated circuit
- the processor 1201 may be configured to process packets, so as to implement the packet processing method provided in this embodiment of the application. For example, when the first network device in FIG. 6 is implemented by the network device shown in FIG. 12, the processor 1201 can be used to obtain the first packet, and match the DA carried in the first packet with the first SID When obtaining the second packet and the third packet based on the first packet, for specific function implementation, refer to the processing part corresponding to the first network device in the method embodiment.
- Communication bus 1202 is used to transfer information between processor 1201 , network interface 1204 and memory 1203 .
- the memory 1203 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, and the memory 1203 can also be a random access memory (random access memory, RAM) or can store information and other types of dynamic storage devices for instructions, and can also be compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, without limitation.
- ROM read-only memory
- RAM random access memory
- CD-ROM compact disc read-only memory
- CD-ROM compact disc read-only memory
- optical disc storage including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.
- magnetic disk storage media or other magnetic storage devices or any other medium that can
- the memory 1203 may exist independently, and is connected to the processor 1201 through the communication bus 1202 .
- the memory 1203 can also be integrated with the processor 1201.
- the memory 1203 is used to store program codes or instructions for implementing the solutions of the present application, and the execution is controlled by the processor 1201 .
- the processor 1201 is used to execute program codes or instructions stored in the memory 1203 .
- One or more software modules may be included in the program code.
- the processor 1201 may also store program codes or instructions for executing the solutions of the embodiments of the present application. In this case, the processor 1201 does not need to read the program codes or instructions from the memory 1203 .
- the network interface 1204 may be a device such as a transceiver for communicating with other devices or a communication network, and the communication network may be Ethernet, radio access network (RAN) or wireless local area networks (wireless local area networks, WLAN). In this embodiment of the present application, the network interface 1204 may be used to receive messages sent by other nodes in the segment routing network, and may also send messages to other nodes in the segment routing network.
- the network interface 1204 may be an Ethernet interface (ethernet) interface, a fast ethernet (fast ethernet, FE) interface, or a gigabit ethernet (gigabit ethernet, GE) interface, etc.
- the network device 1200 may include multiple processors, for example, the processor 1201 and the processor 1205 shown in FIG. 12 .
- Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
- a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
- FIG. 13 is a schematic structural diagram of a network device 1300 provided by an embodiment of the present application.
- the first network device in FIG. 6 or the packet processing apparatus 1100 shown in FIG. 11 may be implemented by the network device shown in FIG. 13 .
- the network device 1300 includes a main control board and one or more interface boards.
- the main control board is communicatively connected with the interface board.
- the main control board is also called a main processing unit (main processing unit, MPU) or a route processing card (route processor card).
- the main control board includes a CPU and a memory.
- the main control board is responsible for controlling and managing each component in the network device 1300. Including route calculation, device management and maintenance functions.
- the interface board is also called a line processing unit (line processing unit, LPU) or a line card (line card), and is used to receive and send packets.
- the communication between the main control board and the interface board or between the interface board and the interface board is through a bus.
- the interface boards communicate through the SFU.
- the network device 1300 also includes the SFU, the SFU communicates with the main control board and the interface board, and the SFU is used for forwarding the interface. Data between boards, the SFU can also be called a switch fabric unit (SFU).
- the interface board includes a CPU, a memory, a forwarding engine, and an interface card (interface card, IC), where the interface card may include one or more network interfaces.
- the network interface may be an Ethernet interface, an FE interface, or a GE interface.
- the CPU communicates with the memory, the forwarding engine and the interface card respectively.
- the memory is used to store the forwarding table.
- the forwarding engine is used to forward the received message based on the forwarding table stored in the memory.
- the forwarding engine may be a network processor (network processor, NP).
- the interface card is also called a daughter card, which can be installed on the interface board. It is responsible for converting the photoelectric signal into a data frame, and checking the validity of the data frame before forwarding it to the forwarding engine for processing or the CPU of the interface board.
- the CPU can also perform the function of the forwarding engine, such as implementing soft forwarding based on a general-purpose CPU, so that no forwarding engine is needed in the interface board.
- the forwarding engine may be implemented by an ASIC or a field programmable gate array (field programmable gate array, FPGA).
- the memory storing the forwarding table can also be integrated into the forwarding engine as a part of the forwarding engine.
- the embodiment of the present application provides a communication system 1400, which is used to implement The message processing method in the aforementioned method 100.
- the communication system 1400 includes a network device 1401 , a subnode 1402 and a subnode 1403 .
- the network device 1401 can realize the function of the first network device in the embodiment shown in FIG. 6 or the packet processing apparatus 1100 in FIG. 11
- the subnode 1402 and the subnode 1403 can realize the first subnode function of the node and the second child node.
- the specific execution process please refer to the detailed description of the corresponding steps in the above embodiment shown in FIG. 6 , which will not be repeated here.
- the embodiment of the present application also provides a chip system, including: a processor, the processor is coupled with a memory, and the memory is used to store programs or instructions, and when the programs or instructions are executed by the processor, the The chip system implements the method of the first network device in the embodiment shown in FIG. 6 above.
- processors in the chip system there may be one or more processors in the chip system.
- the processor can be realized by hardware or by software.
- the processor may be a logic circuit, an integrated circuit, or the like.
- the processor may be a general-purpose processor implemented by reading software codes stored in a memory.
- the memory can be integrated with the processor, or can be set separately from the processor, which is not limited in this application.
- the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be respectively arranged on different chips.
- the setting method of the processor is not specifically limited.
- the system-on-a-chip can be an FPGA, an ASIC, a system on chip (SoC), a CPU, an NP, or a digital signal processing circuit (digital signal processor, DSP), can also be a microcontroller (micro controller unit, MCU), can also be a programmable controller (programmable logic device, PLD) or other integrated chips.
- SoC system on chip
- DSP digital signal processing circuit
- MCU microcontroller
- PLD programmable controller
- each step in the foregoing method embodiments may be implemented by an integrated logic circuit of hardware in a processor or instructions in the form of software.
- the method steps disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
- the embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when run on a computer, cause the computer to execute the methods in the foregoing embodiments
- At least one (one) means one or more, and “multiple” means two or more.
- At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items.
- at least one item (piece) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .
- “A and/or B” is considered to include A alone, B alone, and A+B.
- the disclosed system, device and method can be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical module division.
- multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be obtained according to actual needs to achieve the purpose of the solution of this embodiment.
- each module unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software module units.
- the integrated unit is implemented in the form of a software module unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
- Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
- a storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请公开了一种报文处理方法及相关设备,网络设备在获得第一报文,若第一报文的DA与该网络设备的第一SID匹配时,该网络设备基于第一报文获得第二报文和第三报文,第一报文的第一段列表包括第一SID、第二段列表和第三段列表,第二段列表对应以第一网络设备的第一子节点为根的子树,第三段列表对应以第一网络设备的第二子节点为根的子树,第二报文和第三报文还包括第一报文中的组播数据报文;第一网络设备向第一子节点发送第二报文,向第二子节点发送第三报文。可见,该方法通过子树弹出操作,使得发送给某个子树的报文的segment list中能够仅包括该子树中各节点的SID,实现对报文的有效压缩,从而提高报文的处理效率。
Description
本申请要求于2022年02月24日提交中国国家知识产权局、申请号为202210175165.7、申请名称为“一种报文处理方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,特别是涉及一种报文处理方法及相关设备。
比特索引显示复制(Bit Index Explicit Replication,BIER)是一种组播技术,通过将组播报文的目的节点的集合以比特串的方式封装在报文头中,使中间节点无需为每一个组播流建立组播树及保存组播流状态,仅需根据组播报文的报文头中目的节点的集合进行组播报文的复制转发即可。基于第六版互联网协议的组播源路由(Multicast Source Routing over Internet Protocol version 6,MSR6)是一种基于第六版互联网协议(Internet Protocol version6,IPv6)的组播源路由技术,利用源路由在IPv6数据平面上的特点,提供简化的组播流量工程(Traffic Engineering,TE)和尽力而为(Best Effort,BE)服务。
为了指导组播树中的网络设备对组播报文的处理,组播报文中通常包括基于MSR6的组播报文中的段列表(segment list),该segment list包括组播树的每个节点的段标识(segment identity,SID)。
可见,组播报文在组播树中转发的过程中,会在segment list中携带组播树中所有网络设备的SID,组播报文中的segment list很长,导致组播报文的报文头过长,从而影响报文的处理效率。
发明内容
基于此,本申请提供了一种报文处理方法及相关设备,通过对MSR6的报文转发过程中segment list的操作,使得发送给某个子树的报文的segment list中能够仅包括该子树中各节点的SID,减小了报文的长度,实现对报文的有效压缩,从而提高报文的处理效率。
第一方面,本申请提供了一种报文处理方法,该方法可以应用于第一网络设备,该第一网络设备在获得第一报文,若第一报文的目的地址(destination address,DA)字段的值与第一网络设备的第一SID匹配时,第一网络设备基于第一报文获得第二报文和第三报文,其中,第一报文的第一段列表包括第一SID、第二段列表和第三段列表,第二段列表对应以第一网络设备的第一子节点为根的子树(即第二段列表可以包括该以第一子节点为根的子树的所有节点的SID),第三段列表对应以第一网络设备的第二子节点为根的子树(即第三段列表可以包括该以第二子节点为根的子树的所有节点的SID),第二报文和第三报文还包括第一报文中的组播数据报文;如此,第一网络设备可以向第一子节点发送第二报文,以及向第二子节点发送第三报文。可见,通过该方法,第一网络设备能够将所获得的待组播的报文中的segment list按照该第一网络设备的不同子节点进行拆分,向某个子节点发送的报文的segment list中仅包括拆分后的、以该子节点为根的子树的相关SID,既不影响该子树对报文的处理,也能够有效的减小报文中segment list的长度,从而减小报文的长度,实现在不影响报文的处理和转发的基础上提升报文处理效率的效果。
其中,第一网络设备的第一SID用于指示子树弹出。
需要说明的是,在进行上述报文处理之前,定义具有子树弹出功能的SID(也可以记作子树弹出(child tree pop,CTP)类型的SID),按照该SID的指示在组播树中传输时弹出报文中对本子树而言无效的内容,实现对MSR6的报文的压缩。第一SID,不仅用于标识第一网络设备,还用于指示第一网络设备对所接收的DA为该第一SID的报文进行子树弹出操作。CTP类型的SID可以细分为:子树弹出且携带数量标识(child tree pop andN-SID,CTPN)类型的SID,以及,子树弹出且携带pointer(childtree pop andpointer,CTPP)类型的SID。
在一种可能的实现方式中,第一SID可以为CTPN类型的SID,即,第一SID包括第一数量标识(number SID,N-SID),第一N-SID用于指示子节点数量。
作为一个示例,第二段列表可以包括第一子节点的SID和第一子节点的子节点的SID,第一子节点的SID包括第二N-SID,第二N-SID用于指示第一子节点的子节点数量。如果第一网络设备的第一SID还包括用于指示复制次数的标识,那么,第一网络设备基于第一报文获得第二报文和第三报文,可以包括:第一网络设备基于第一段列表和第一SID,从第一段列表获取第二段列表和位于第二段列表之后的第三段列表;接着,第一网络设备基于用于指示复制次数的标识、第二段列表、第三段列表和第一报文包括的组播数据报文,获得第二报文和第三报文。其中,第一网络设备从第一段列表获取第二段列表可以包括:第一网络设备先基于第一N-SID和第一段列表,确定第一子节点的SID;然后,第一网络设备基于第一子节点的SID和第二N-SID,获取第一子节点的子节点的SID;最后,第一网络设备基于第一子节点的SID和第一子节点的子节点的SID,获取第二段列表。第一网络设备从第一segment list获取第三segment list,例如可以包括:第一网络设备确定第二segment list结束后的第一个SID为第二子节点的SID;接着,第一网络设备基于第二子节点的SID和第三N-SID,获取第二子节点的子节点的SID;然后,第一网络设备基于第二子节点的SID和第二子节点的子节点的SID,获取第三segment list。
作为另一个示例,第二段列表可以包括第一子节点的SID和第一子节点的子节点的SID,第一子节点的SID包括第二pointer,第二pointer用于指示第一子节点的子节点在第一段列表中的偏移量。如果第一网络设备的第一SID还包括用于指示复制次数的标识,那么,第一网络设备基于第一报文获得第二报文和第三报文,可以包括:第一网络设备基于第一段列表和第一SID,从第一段列表获取第二段列表和位于第二段列表之后的第三段列表;接着,第一网络设备基于用于指示复制次数的标识、第二段列表、第三段列表和第一报文包括的组播数据报文,获得第二报文和第三报文。其中,第一网络设备从第一段列表获取第二段列表,可以包括:第一网络设备先基于第一N-SID和第一段列表,确定第一子节点的SID;然后,第一网络设备基于第一子节点的SID和第二pointer,获取第一子节点的子节点的SID;最后,第一网络设备基于第一子节点的SID和第一子节点的子节点的SID,获取第二段列表。第一网络设备从第一segment list获取第三segment list,例如可以包括:第一网络设备确定第一子节点后的第一个SID为第二子节点的SID;接着,第一网络设备基于第二子节点的SID和第三pointer,获取第二子节点的子节点的SID;然后,第一网络
设备基于第二子节点的SID和第二子节点的子节点的SID,获取第三segment list。其中,从第二pointer所指示的SID开始到第三pointer所指示的SID之前一个SID均为第一子节点的子节点的SID。
在另一种可能的实现方式中,第一SID可以为CTPP类型的SID,即,第一SID包括第一指针(pointer),第一pointer用于指示第一网络设备的子节点在第一段列表的偏移量。
作为一个示例,第二段列表可以包括第一子节点的SID和第一子节点的子节点的SID,第一子节点的SID包括第二N-SID,第二N-SID用于指示第一子节点的子节点数量。如果第一网络设备的SID还包括用于指示复制次数的标识,那么,第一网络设备基于第一报文获得第二报文和第三报文,可以包括:第一网络设备基于第一段列表和第一SID,从第一段列表获取第二段列表和位于第二段列表之后的第三段列表;第一网络设备基于用于指示复制次数的标识、第二段列表、第三段列表和第一报文包括的组播数据报文,获得第二报文和第三报文。其中,第一网络设备从第一段列表获取第二段列表,可以包括:第一网络设备先基于第一pointer和第一段列表,确定第一子节点的SID;然后,第一网络设备基于第一子节点的SID和第二N-SID,获取第一子节点的子节点的SID;接着,第一网络设备基于第一子节点的SID和第一子节点的子节点的SID,获取第二段列表。第一网络设备从第一segment list获取第三segment list,例如可以包括:第一网络设备确定第二segment list结束后的第一个SID为第二子节点的SID;接着,第一网络设备基于第二子节点的SID和第三N-SID,获取第二子节点的子节点的SID;然后,第一网络设备基于第二子节点的SID和第二子节点的子节点的SID,获取第三segment list。
作为另一个示例,第二段列表可以包括第一子节点的SID和第一子节点的子节点的SID,第一子节点的SID包括第二pointer,第二pointer用于指示第一子节点的子节点在第一段列表中的偏移量。如果第一网络设备的SID还包括用于指示复制次数的标识,那么,第一网络设备基于第一报文获得第二报文和第三报文,可以包括:第一网络设备基于第一段列表和第一SID,从第一段列表获取第二段列表和位于第二段列表之后的第三段列表;第一网络设备基于用于指示复制次数的标识、第二段列表、第三段列表和第一报文包括的组播数据报文,获得第二报文和第三报文。其中,第一网络设备从第一段列表获取第二段列表,可以包括:第一网络设备先基于第一pointer和第一段列表,确定第一子节点的SID;然后,第一网络设备基于第一子节点的SID和第二pointer,获取第一子节点的子节点的SID;接着,基于第一子节点的SID和第一子节点的子节点的SID,获取第二段列表。第一网络设备从第一segment list获取第三segment list,例如可以包括:第一网络设备确定第一子节点后的第一个SID为第二子节点的SID;接着,第一网络设备基于第二子节点的SID和第三pointer,获取第二子节点的子节点的SID;然后,第一网络设备基于第二子节点的SID和第二子节点的子节点的SID,获取第三segment list。其中,从第二pointer所指示的SID开始到第三pointer所指示的SID之前一个SID均为第一子节点的子节点的SID。
第一SID、第一子节点的SID或第二子节点的SID也可以是子树不弹出(child tree no pop,CTNP)类型的SID,CTNP类型的SID用于指示不进行子树弹出操作。以第二子节点的SID为CTNP类型的SID为例,该第二子节点的SID用于指示第二子节点对所接收的
报文的segment list不进行子树弹出操作。CTNP类型的SID可以细分为:子树不弹出且携带数量标识(child tree no pop andN-SID,CTNPN)类型的SID,以及,子树不弹出且携带pointer(child tree no pop andpointer,CTNPP)类型的SID。需要说明的是,只要报文的segment list中存在CTP类型的SID,均可以在对应的节点执行子树弹出操作以实现报文长度的压缩,组播树中允许部分节点的SID为CTNP类型的SID,以降低不必要进行子树弹出操作的节点(如所接收的报文中segment list比较短的节点)的报文处理工作量。
在一些实现方式中,第三段列表包括第二子节点的SID和第二子节点的子节点的SID,第二子节点的SID包括第三N-SID,第三N-SID用于指示第二子节点的子节点数量。
在一些实现方式中,第一网络设备可以是入口节点,那么,第一网络设备获得第一报文,可以包括:第一网络设备接收所述组播数据报文,该组播数据报文包括组播信息;第一网络设备基于组播信息获取第一segment list;第一网络设备基于组播数据报文和第一segment list,生成第一报文。第一网络设备基于组播信息获取第一段列表,可以包括:第一网络设备根据组播信息获取与组播信息对应的第一段列表;或者,第一网络设备根据组播信息获取满足SLA需求的且与组播信息对应的第一段列表。其中,组播信息包括组播组地址,或者,组播信息包括组播组地址和组播树的标识,或者,组播信息包括组播组地址、组播树标识和用于标识SLA需求的参数。
在另一些实现方式中,第一网络设备可以是中间节点,那么,第一网络设备获得第一报文,可以包括:第一网络设备接收该第一网络设备的上一跳节点发送的第一报文,该第一网络设备的上一跳节点为入口节点或上一跳中间节点。
第二方面,本申请还提供了一种报文处理装置,该装置应用于第一网络设备,该装置包括:第一获得单元、第二获得单元和第一发送单元。其中,第一获得单元,用于获得第一报文,第一报文包括目的地址DA、第一段列表和组播数据报文,第一段列表包括第一网络设备的第一段标识SID、第二段列表和第三段列表,第二段列表对应以第一网络设备的第一子节点为根的子树,第三段列表对应以第一网络设备的第二子节点为根的子树;第二获得单元,用于DA与第一SID匹配时,基于第一报文获得第二报文和第三报文,第二报文包括第二段列表和组播数据报文,第三报文包括第三段列表和组播数据报文;第一发送单元,用于向第一子节点发送第二报文,向第二子节点发送第三报文。
其中,第一SID用于指示子树弹出。
在一些实现方式中,第一SID包括第一数量标识N-SID,第一N-SID用于指示子节点数量。
作为一个示例,第二段列表包括第一子节点的SID和第一子节点的子节点的SID,第一子节点的SID包括第二N-SID,第二N-SID用于指示第一子节点的子节点数量。
如果第一网络设备的SID还包括用于指示复制次数的标识,那么,所述第二获得单元可以包括第一获得子单元和第二获得子单元。其中,第一获得子单元,用于基于第一段列表和第一SID,从第一段列表获取第二段列表和位于第二段列表之后的第三段列表;第二获得子单元,用于基于用于指示复制次数的标识、第二段列表、第三段列表和第一报文包括的组播数据报文,获得第二报文和第三报文。
其中,第一获得子单元,具体用于:基于第一N-SID和第一段列表,确定第一子节点的SID;基于第一子节点的SID和第二N-SID,获取第一子节点的子节点的SID;基于第一子节点的SID和第一子节点的子节点的SID,获取第二段列表。
作为另一个示例,第二段列表包括第一子节点的SID和第一子节点的子节点的SID,第一子节点的SID包括第二pointer,第二pointer用于指示第一子节点的子节点在第一段列表中的偏移量。
如果第一网络设备的SID还包括用于指示复制次数的标识,那么,所述第二获得单元,可以包括:第五获得子单元和第六获得子单元。其中,第五获得子单元,用于基于第一段列表和第一SID,从第一段列表获取第二段列表和位于第二段列表之后的第三段列表;第六获得子单元,用于基于用于指示复制次数的标识、第二段列表、第三段列表和第一报文包括的组播数据报文,获得第二报文和第三报文。
其中,第五获得子单元,具体用于:基于第一N-SID和第一段列表,确定第一子节点的SID;基于第一子节点的SID和第二pointer,获取第一子节点的子节点的SID;基于第一子节点的SID和第一子节点的子节点的SID,获取第二段列表。
在另一些实现方式中,第一SID包括第一指针pointer,第一pointer用于指示第一网络设备的子节点在第一段列表的偏移量。
作为一个示例,第二段列表包括第一子节点的SID和第一子节点的子节点的SID,第一子节点的SID包括第二N-SID,第二N-SID用于指示第一子节点的子节点数量。
如果第一网络设备的SID还包括用于指示复制次数的标识,第二获得单元可以包括:第三获得子单元和第四获得子单元。其中,第三获得子单元,用于基于第一段列表和第一SID,从第一段列表获取第二段列表和位于第二段列表之后的第三段列表;第四获得子单元,用于基于用于指示复制次数的标识、第二段列表、第三段列表和第一报文包括的组播数据报文,获得第二报文和第三报文。
其中,第三获得子单元,具体用于:基于第一pointer和第一段列表,确定第一子节点的SID;基于第一子节点的SID和第二N-SID,获取第一子节点的子节点的SID;基于第一子节点的SID和第一子节点的子节点的SID,获取第二段列表。
作为另一个示例,第二段列表包括第一子节点的SID和第一子节点的子节点的SID,第一子节点的SID包括第二pointer,第二pointer用于指示第一子节点的子节点在第一段列表中的偏移量。
如果第一网络设备的SID还包括用于指示复制次数的标识,第二获得单元,可以包括:第七获得子单元和第八获得子单元。其中,第七获得子单元,用于基于第一段列表和第一SID,从第一段列表获取第二段列表和位于第二段列表之后的第三段列表;第八获得子单元,用于基于用于指示复制次数的标识、第二段列表、第三段列表和第一报文包括的组播数据报文,获得第二报文和第三报文。
其中,第七获得子单元,具体用于:基于第一pointer和第一段列表,确定第一子节点的SID;基于第一子节点的SID和第二pointer,获取第一子节点的子节点的SID;基于第一子节点的SID和第一子节点的子节点的SID,获取第二段列表。
在一些实现方式中,第一子节点的SID用于指示不进行子树弹出。
在一些实现方式中,第三段列表包括第二子节点的SID和第二子节点的子节点的SID,第二子节点的SID包括第三N-SID,第三N-SID用于指示第二子节点的子节点数量。
在一些实现方式中,第一网络设备是入口节点,第一获得单元,可以包括:接收子单元、第九获得子单元和生成子单元。其中,接收子单元,用于接收组播数据报文,组播数据报文包括组播信息;第九获得子单元,用于基于组播信息获取第一段列表;生成子单元,用于基于组播数据报文和第一段列表,生成第一报文。
其中,第九获得子单元,具体用于:根据组播信息获取与组播信息对应的第一段列表;或者,根据组播信息获取满足SLA需求的且与组播信息对应的第一段列表。组播信息包括组播组地址,或者,组播信息包括组播组地址和组播树的标识,或者,组播信息包括组播组地址、组播树标识和用于标识SLA需求的参数。
在另一些实现方式中,第一网络设备为中间节点,第一获得单元,具体用于:接收第一网络设备的上一跳节点发送的第一报文,第一网络设备的上一跳节点为入口节点或上一跳中间节点。
第三方面,本申请提供一种网络设备,所述网络设备包括处理器和存储器,存储器用于存储指令或程序代码,处理器用于从存储器中调用并运行所述指令或程序代码,以执行第一方面或第一方面的任意一种可能的实现中的所述方法。
第四方面,本申请提供一种图通信系统,该通信系统可以包括第一网络设备、第一网络设备的第一子节点和第一网络设备的第二子节点;其中,第一网络设备,用于执行第一方面或第一方面的任意一种可能的实现中所述的方法;第一子节点,用于接收第一网络设备发送的第二报文;第二子节点,用于接收第一网络设备发送的第三报文。其中,所述第一网络设备可以是上述第二方面提供的报文处理装置。
第五方面,本申请提供一种计算机可读存储介质,其特征在于,包括指令、程序或代码,当其在计算机上执行时,使得所述计算机执行第一方面或第一方面的任意一种可能的实现中的所述方法。
第六方面,本申请提供一种计算机程序产品,当所述计算机程序产品在网络设备上运行时,使得所述网络设备执行上述第一方面或第一方面的任意一种可能的实现中的所述方法。
图1为本申请中MSR6 SID的示意图;
图2为本申请实施例中一组播树的结构示意图;
图3a为本申请中一MSR6的报文1的示意图;
图3b为本申请中另一MSR6的报文1的示意图;
图4a为本申请实施例中一M-SID的示意图;
图4b为本申请实施例中一M-SID的示意图;
图5a为本申请实施例中一MSR6的报文1的示意图;
图5b为本申请实施例中图2所示场景中对报文1的处理示意图;
图6为本申请实施例提供的一种报文处理方法100的流程示意图;
图7为本申请实施例中另一组播树的结构示意图;
图8a为本申请实施例中一报文1的segment list 1的示意图;
图8b为本申请实施例中另一报文1的segment list 1的示意图;
图8c为本申请实施例中又一报文1的segment list 1的示意图;
图8d为本申请实施例中再一报文1的segment list 1的示意图;
图9a为本申请实施例中第二报文的示意图;
图9b为本申请实施例中第三报文的示意图;
图10a为本申请实施例中图7所示场景中一种对报文1的处理示意图;
图10b为本申请实施例中图7所示场景中另一种对报文1的处理示意图;
图10c为本申请实施例中图7所示场景中又一种对报文1的处理示意图;
图11为本申请实施例中网络设备1100的结构示意图;
图12为本申请实施例中网络设备1200的结构示意图;
图13为本申请实施例中网络设备1300的结构示意图;
图14为本申请实施例中通信系统1400的结构示意图。
目前,组播树中的网络设备的MSR6 SID可以参见图1所示,包括:位置(Locator)字段、功能(Function)字段和变量(Arguments)字段,其中,Arguments字段包括:复制数量(replication number)和指针(pointer),其中,replication number为用于指示复制次数的标识,replication number的值表示当前节点需要复制报文的数量,pointer为用于指示当前节点的子节点的标识,pointer的值用于指示当前节点的子节点的SID在segment list中的位置(例如偏移量)。
以图2所示的组播树为例进行后续说明。参见图2,该组播树包括网络设备A、网络设备B、网络设备C、网络设备D、网络设备E、网络设备F和网络设备G,其中,网络设备A的子节点包括网络设备B和网络设备C,网络设备B的子节点包括网络设备D和网络设备E,网络设备C的子节点包括网络设备F和网络设备G。
网络设备A的MSR6 SID A可以包括:Locator A、Function End.RL、replication number=1和pointer=2,网络设备B的MSR6 SID B可以包括:Locator B、Function End.RL、replication number=1和pointer=4,网络设备C的MSR6 SID C可以包括:Locator C、Function End.RL、replication number=1和pointer=6,网络设备D的MSR6 SID D可以包括:Locator D、Function End.RL、replication number=0和pointer=0,网络设备E的MSR6 SID E可以包括:Locator E、Function End.RL、replication number=0和pointer=0,网络设备F的MSR6 SID F可以包括:Locator F、Function End.RL、replication number=0和pointer=0,网络设备G的MSR6 SID G可以包括:Locator G、Function End.RL、replication number=0和pointer=0。其中,各MSR6 SID的长度均为128比特;Function End.RL用于指示MSR6 SID对应的网络设备执行复制报文的功能;replication number=1用于指示MSR6 SID对应的网络设备对所接收的报文复制一份,即,该网络设备获得两份相同的报文,replication number=0用于指示MSR6 SID
对应的网络设备对所接收的报文无需复制;pointer=2用于指示网络设备的子节点的MSR6 SID从segment list的第2个MSR6 SID开始,pointer=4用于指示网络设备的子节点的MSR6 SID从segment list的第4个MSR6 SID开始,pointer=6用于指示网络设备的子节点的MSR6 SID从segment list的第6个MSR6 SID开始,pointer=0用于指示网络设备没有子节点。
以MSR6TE为例,组播数据报文需要在图2所示的组播树传输,网络设备A需要发送组播数据报文到网络设备D、网络设备E、网络设备F和网络设备G。A节点生成报文1,报文1包括IPv6头、MRH和组播数据报文,其中,IPv6头可以包括:版本(Version)字段、流量类型(Traffic Type)字段、流标识(Flow Label)字段、载荷长度(Payload Length)字段、下一个报文头(Next Header)字段、跳数限制(Hop Limit)字段、源地址(Source Address,SA)字段以及目的地址(Destination Address,DA)字段。IPv6头中各个字段的含义可以参考请求评议(Request for Comments,RFC)8200中的解释。MRH中可以包括:下一个报文头(Next Header)字段、头扩展长度(Hdr Ext Len)字段、路由类型(Routing Type)字段、段剩余(segment left)字段、MRH类型(MRH Type)字段、预留(Reserved)字段以及segment list。MRH中各个字段的含义可以参考草案“draft-geng-msr6-traffic-engineering-00”中的解释。
在一些实现方式中,如图3a所示,报文1的DA字段为MSR6 SID A;segment left字段=0,用于指示segment list中的第一个SID——MSR6 SID A;segment list依次包括:MSR6 SID G、MSR6 SID F、MSR6 SID E、MSR6 SID D、MSR6 SID C、MSR6 SID B和MSR6 SID A。
报文1在图2所示的组播树中传输的过程可以包括:S11,网络设备A根据报文1的DA字段(即MSR6 SID A)中replication number=1,复制报文1获得报文1和报文2,报文2和报文1相同;S12,网络设备A根据DA字段(即MSR6 SID A)中pointer=2,从segment list中获得第二个MSR6 SID——MSR6 SID B,修改报文1的segment left字段的值使得segment left字段指向MSR6 SID B(例如segment left字段的值修改为1),并且将报文1的DA字段的值修改为MSR6 SID B,得到报文1’;接着,从segment list中获得MSR6 SID B的下一个MSR6 SID——MSR6 SID C,修改报文2的segment left字段的值使得segment left字段指向MSR6 SID C,并且将报文2的DA字段的值修改为MSR6 SID C,得到报文2’;S13,网络设备A将报文1’发送给网络设备B,网络设备A将报文2’发送给网络设备C;S14,网络设备B根据报文1’中DA字段(即MSR6 SID B)中replication number=1,复制报文1’获得报文1’和报文1”,报文1”和报文1’相同;S15,网络设备B根据MSR6SID B中pointer=4,从segment list中获得第四个MSR6 SID——MSR6 SID D,修改报文1’的segment left字段的值使得segment left字段指向MSR6 SID D,并且将报文1’的DA字段的值修改为MSR6 SID D,得到报文3;接着,从segment list中获得MSR6 SID D的下一个MSR6 SID——MSR6 SID E,修改报文1”的segment left字段的值使得segment left字段指向MSR6 SID C,并且将报文1”的DA字段的值修改为MSR6 SID E,得到报文4;S16,网络设备B将报文3发送给网络设备D,网络设备B将报文4发送给网络设备E;同理,S17,网络设备C根据DA字段(即MSR6 SID C)中replication number=1,复制报文2’
获得报文2’和报文2”,报文2”和报文2’相同;S18,网络设备C根据报文2’中MSR6SID C中pointer=6,从segment list中获得第六个MSR6 SID——MSR6 SID F,修改报文2’的segment left字段的值使得segment left字段指向MSR6 SID F,并且将报文2’的DA字段的值修改为MSR6 SID F,得到报文5;接着,从segment list中获得MSR6 SID F的下一个MSR6 SID——MSR6 SID G,修改报文2”的segment left字段的值使得segment left字段指向MSR6 SID G,并且将报文2”的DA字段的值修改为MSR6 SID G,得到报文6;S19,网络设备C将报文5发送给网络设备F,网络设备C将报文6发送给网络设备G。S14~S16和S17~S19可以同时执行,也可以先执行S14~S16再执行S17~S19,还可以先执行S17~S19再执行S14~S16。
可见,MSR6的报文会携带组播树中所有网络设备的MSR6 SID,每个MSR6 SID的长度为128比特,如果组播树较大,会导致该MSR6的报文的报文头过长,影响MSR6的报文的处理效率,不利于MSR6技术的实施和推广。
在另一些实现方式中,考虑到MSR6 SID A、MSR6 SID B、MSR6 SID C、MSR6 SID D、MSR6 SID E、MSR6 SID F和MSR6 SID G中的Locator部分有相同的部分,为了缩短MSR6的报文的报文头长度,可以将各MSR6 SID的Locator中相同的部分提出并仅在该报文中出现一次,具体而言,被提出的部分可以记作共同前缀(Common Prefix),出现在MSR6的报文的IPv6头的DA字段中;MSR6 SID除了Common Prefix以外的其他部分记作M-SID,例如,MSR6 SID A可以记作Common Prefix+M-SID A。其中,M-SID的长度可以是32比特,如此,MSR6的报文的MRH的segment list中,可以从包括多个128比特的MSR6 SID压缩为包括相同数量的多个32比特的M-SID。
作为一个示例,如图4a所示,M-SID可以包括:节点标识(node id)字段、Function字段和Arguments字段,其中,node id可以是局域网分配的、用于标识M-SID(或MSR6 SID)对应的网络设备的字段,Arguments字段可以包括replication number和pointer,例如:M-SID A可以包括:node idA、Function End.RL、replication number=1和pointer=2。
如图3b所示,报文1中,DA字段包括Common Prefix和M-SID A;segment left字段=0,,用于指示segment list中的第一个SID——M-SID A;segment list依次包括:M-SID G、M-SID F、M-SID E、M-SID D、M-SID C、M-SID B和M-SID A。
报文1在图2所示的组播树中传输的过程可以包括:S21,网络设备A根据报文1中DA字段的M-SID中replication number=1,复制报文1获得报文1和报文2,报文2和报文1相同;S22,网络设备A根据DA字段的M-SID A中pointer=2,从segment list中获得第二个M-SID——M-SID B,修改报文1的segment left字段的值使得segment left字段指向M-SID B,并且将报文1的DA字段的M-SID A修改为M-SID B,得到报文1’;接着,从segment list中获得M-SID B的下一个M-SID——M-SID C,修改报文2的segment left字段的值使得segment left字段指向M-SID C,并且将报文2的DA字段的M-SID A修改为M-SID C,得到报文2’;S23,网络设备A将报文1’发送给网络设备B,网络设备A将报文2’发送给网络设备C;S24,网络设备B根据报文1’中DA字段的M-SID B中replication number=1,复制报文1’获得报文1’和报文1”,报文1”和报文1’相同;S25,网络设
备B根据M-SID B中pointer=4,从segment list中获得第四个M-SID——M-SID D,修改报文1’的segment left字段的值使得segment left字段指向M-SID D,并且将报文1’的DA字段的M-SID B修改为M-SID D,得到报文3;接着,从segment list中获得M-SID D的下一个M-SID——M-SID E,修改报文1”的segment left字段的值使得segment left字段指向M-SID E,并且将报文1”的DA字段的M-SID B修改为M-SID E,得到报文4;S26,网络设备B将报文3发送给网络设备D,网络设备B将报文4发送给网络设备E;同理,S27,网络设备C根据报文2’中DA字段的M-SID C中replication number=1,复制报文2’获得报文2’和报文2”,报文2”和报文2’相同;S28,网络设备C根据M-SID C中pointer=6,从segment list中获得第六个M-SID——M-SID F,修改报文2’的segment left字段的值使得segment left字段指向M-SID F,并且将报文2’的DA字段的M-SID C修改为M-SID F,得到报文5;接着,从segment list中获得M-SID F的下一个M-SID——M-SID G,修改报文2”的segment left字段的值使得segment left字段指向M-SID G,并且将报文2”的DA字段的M-SID C修改为M-SID G,得到报文6;S29,网络设备C将报文5发送给网络设备F,网络设备C将报文6发送给网络设备G。S24~S26和S27~S29可以同时执行,也可以先执行S24~S26再执行S27~S29,还可以先执行S27~S29再执行S24~S26。
可见,将组播树中所有网络设备的MSR6 SID的Locator中相同的Common Prefix提出,仅在MSR6的报文的一处携带(例如在IPv6头的DA字段中携带)该Common Prefix,MSR6的报文的MRH的segment list中携带组播树中所有网络设备的M-SID,该M-SID为MSR6SID去掉Common Prefix后剩余的部分,128比特的MSR6 SID相比,M-SID仅32比特长,对于相同的组播树,该实现方式有效的压缩了MSR6的报文的报文头的长度。
但是,通过上文可知,目前MSR6的报文在组播树中传输时,报文的MRH的segment list中始终携带组播树中所有节点的SID,对于某个子树而言,与该子树具有相同父节点的其他子树的相关SID属于无效的内容,例如,对于图2所示的组播树中以网络设备B为根的子树而言,网络设备B所接收的报文1’中M-SID C、M-SID F和M-SID G属于以网络设备C为根的子树的相关SID,不会影响组播数据报文在以网络设备C为根的子树中的转发。其中,子树的相关SID包括该子树中根节点的SID和该子树的子节点的SID。
基于此,为了能够充分体现组播的优势,进一步减小MSR6的报文的报文头长度,本申请实施例提供了一种报文处理方法,通过定义具有子树弹出功能的SID(也可以记作子树弹出(childtree pop,CTP)类型的SID),按照该SID的指示在组播树中传输时弹出报文中对本子树而言无效的内容,实现对MSR6的报文的压缩。
在生成MSR6的报文之前,组播树中的网络设备均发布能够标识自己的SID,其中,需要进行子树弹出操作的节点发布的SID包括用于指示在该节点进行子树弹出的SID。另外,组播树的入口节点还需要获取该组播树对应的segment list,一种情况下,组播树对应的segment list可以是控制器基于各网络设备发布的SID生成并发送给该组播树的入口节点的;另一种情况下,组播树对应的segment list也可以是该组播树的入口节点自己基于各网络设备发布的SID生成的;又一种情况下,组播树对应的segment list还可以是手动配置到该组播树的入口节点上的。
本申请实施例中segment list中的SID可以是128比特的MSR6 SID,也可以是通过提取公共Common Prefix压缩后的M-SID,均不影响本申请实施例的实现。为了方便描述,下文中以segment list中的SID为M-SID为例进行说明。
本申请实施例中的M-SID中,可以如图4a所示,也可以将图4a中的pointer替换为数量标识(N-SID),N-SID用于指示网络设备的子节点的数量,如图4b所示。例如,M-SID B中可以包括N-SID B,N-SID B=2,用于指示网络设备B包括2个子节点。
本申请实施例提供的报文处理方法中,以进行子树弹出操作的第一网络设备的角度对MSR6的第一报文的处理过程进行描述,第一网络设备的子节点包括第二子节点和第三子节点,第一网络设备发布的SID包括用于指示进行子树弹出操作的第一SID。具体实现时,第一网络设备获得MSR6的第一报文,该第一报文包括DA、第一segment list和组播数据报文,第一segment list包括第一SID、第二segment list和第三segment list,其中,第二segment list对应以第一子节点为根的子树,第三segment list对应以第二子节点为根的子树;如果确定DA和第一SID匹配,则,第一网络设备能够给基于第一报文获得第二报文和第三报文,其中,第二报文包括第二segment list和组播数据报文,第三报文包括第三segment list和组播数据报文;从而,第一网络设备向第一子节点发送第二报文,向第二子节点发送第三报文。可见,本申请实施例提供的方法中,网络设备能够将所获得的待组播的报文中的segment list按照不同的子节点进行拆分,向某个子节点发送的报文的segment list中仅包括拆分后的、以该子节点为根的子树的相关SID,既不影响该子树对组播数据报文的处理,也能够有效的减小报文中segment list的长度,从而减小报文的长度,实现在不影响报文的处理和转发的基础上提升报文处理效率的效果。
本申请实施例中的网络设备和节点指代相同的含义,均可以指交换机、路由器、虚拟路由设备或虚拟转发设备等具有报文转发功能的通信设备。
举例来说,仍然以图2所示的组播树为例,对本申请实施例提供的报文处理方法进行示例性的描述。作为一个示例,定义网络设备A的MSR6 SID 1为CTP类型的SID,如果segment list中包括MSR6 SID 1或M-SID 1,那么,网络设备A对该segment list所属的报文进行子树弹出操作。其中,MSR6 SID 1可以包括Common Prefix和M-SID 1。
网络设备A生成的报文1例如可以参见图5a所示,报文1的DA字段包括Common Prefix和M-SID 1;segment left字段=0,用于指示segment list 1中的第一个SID——M-SID1;,报文1还包括segment list 1,该segment list 1可以包括:M-SID G、M-SID F、M-SID E、M-SID D、M-SID C、M-SID B和M-SID 1。
参见图5b所示,报文1在图2所示的组播树中传输的过程可以包括:S31,网络设备A根据报文1中DA字段的M-SID 1中replication number=1,复制报文1获得报文1和报文2,报文2和报文1相同;S32,网络设备A根据DA字段的M-SID 1中pointer或N-SID的指示,从segment list 1中获得segment list 2和segment list 3,将报文1的MRH中的segment list 1更新为segment list 2,并且将报文1的DA字段的M-SID 1修改为M-SID B,得到报文1’,将报文2的MRH中的segment list 1更新为segment list 3,并且将报文2的DA字段的M-SID 1修改为M-SID C,得到报文1’,得到报文2’;S33,网络设备A将报文1’
发送给网络设备B,网络设备A将报文2’发送给网络设备C;S34,网络设备B根据报文1’中DA字段的M-SID B中replication number=1,复制报文1’获得报文1’和报文1”,报文1”和报文1’相同;S35,网络设备B根据M-SID B中pointer或N-SID,从segment list 2中获得网络设备B的子节点D和E的M-SID,将报文1’的DA字段的M-SID B修改为M-SID D得到报文3,将报文1”的DA字段的M-SID B修改为M-SID E,得到报文4;S36,网络设备B将报文3发送给网络设备D,网络设备B将报文4发送给网络设备E;同理,S37,网络设备C根据报文2’中DA字段的M-SID C中replication number=1,复制报文2’获得报文2’和报文2”,报文2”和报文2’相同;S38,网络设备C根据M-SID C中pointer或N-SID,从segment list 2中获得网络设备C的子节点F和G的M-SID,将报文2’的DA字段的M-SID C修改为M-SID F,得到报文5,将报文2”的DA字段的M-SID C修改为M-SID G,得到报文6;S39,网络设备C将报文5发送给网络设备F,网络设备C将报文6发送给网络设备G。S34~S36和S37~S39可以同时执行,也可以先执行S34~S36再执行S37~S39,还可以先执行S37~S39再执行S34~S36。
其中,N-SID用于指示该网络设备的子节点的数量,例如,M-SID B中可以包括N-SID B,N-SID B=2,用于指示网络设备B包括2个子节点。通常,网络设备的MSR6 SID或M-SID包括N-SID,则,segment list中该网络设备的SID之后、与该网络设备的SID相邻的N-SID个SID为该网络设备的子节点对应的SID。例如,报文1中segment list 1中
可见,通过本申请实施例提供的方法,网络设备A能够将所获得的报文中的segment list按照不同的子节点进行拆分,向网络设备B发送的报文的segment list中仅包括拆分后的、以网络设备B为根的子树的相关SID,向网络设备C发送的报文的segment list中仅包括拆分后的、以网络设备C为根的子树的相关SID,在不影响该网络设备B和网络设备C对报文的处理的基础上,能够有效的减小报文中segment list的长度,从而减小报文的长度,实现在不影响报文的处理和转发的基础上提升报文处理效率的效果。
以上为以场景实施例的形式对本申请实施例的介绍,下面结合附图详细说明本申请实施例的具体实现方式。
图6为本申请实施例提供的一种报文处理方法100的流程示意图。该方法100为了更加清楚的介绍本申请,以第一网络设备为执行主体进行描述,该第一网络设备的子节点包括第一子节点和第二子节点。具体实现时,该方法100例如可以包括下述S101~S103:
S101,第一网络设备获得第一报文,第一报文包括DA、第一segment list和组播数据报文,第一segment list包括第一网络设备的第一SID、第二segment list和第三segment list,第二segment list对应以第一子节点为根的子树,第三segment list对应以第二子节点为根的子树。
其中,第一SID用于指示第一网络设备对所获得的报文进行子树弹出操作。SID的类型(也可以表示SID所指示执行的操作)能够基于SID中的Function的值确定。本申请实施例中的Function的值End.RL仅是示例性的,各个SID中的End.RL的值可以不同,以指示是否进行子树弹出操作。
第一segment list包括第一网络设备的SID和第一网络设备的子节点的SID;第二
segment list包括第一子节点的SID和第一子节点的子节点的SID;第三segment list包括第二子节点的SID和第二子节点的子节点的SID。
以图2示出的组播树为例,第一网络设备可以是网络设备A,第一网络设备的第一子节点为网络设备B,第一网络设备的第二子节点为网络设备C。第一报文可以对应图5a所示的报文1,第一segment list对应segment list 1,其中,第一SID对应M-SID 1。第一segment list可以包括以网络设备A为根的子树的相关SID,即第一segment list包括网络设备A的M-SID 1和网络设备A的子节点的SID;同理,第二segment list可以包括以网络设备B为根的子树的相关SID,即第二segment list包括网络设备B的SID和网络设备B的子节点的SID,例如可以包括:M-SID B、M-SID D和M-SID E;第三segment list可以包括以网络设备C为根的子树的相关SID,即第三segment list包括网络设备C的SID和网络设备C的子节点的SID,例如可以包括:M-SID C、M-SID F和M-SID G。
在一些实现方式中,第一网络设备可以是入口节点,例如第一网络设备可以是图2所示的组播树的网络设备A。那么,S101例如可以包括:S101a1,第一网络设备接收所述组播数据报文,该组播数据报文包括组播信息;S101a2,第一网络设备基于组播信息获取第一segment list;S101a3,第一网络设备基于组播数据报文和第一segment list,生成第一报文。
对于S1012,作为一个示例,第一网络设备上保存组播信息和segment list之间的对应关系,那么,第一网络设备接收到包括组播信息的组播数据报文后,即可从本地保存的对应关系中获取与组播数据报文中的组播信息对应的segment list,记作第一segment list。例如,组播信息可以包括组播组地址,那么,第一网络设备可以获取与该组播组地址对应的第一segment list。又例如,组播信息也可以包括组播组地址和组播树的标识(tree id),那么,第一网络设备可以获得与该组播信息中的组播树的标识和组播组地址对应的第一segment list。
作为另一个示例,第一网络设备上保存有组播信息、segment list和服务等级协议(service level agreement,SLA)之间的对应关系,那么,第一网络设备接收到包括组播信息的组播数据报文后,可以从本地保存的对应关系中获取与组播数据报文中的组播信息对应且满足SLA需求的segment list,记作第一segment list。例如,组播信息可以包括组播组地址、组播树标识和用于标识SLA需求的参数,那么,第一网络设备可以获得与该组播信息中的组播树的标识和组播组地址对应的、且满足SLA需求的第一segment list。其中,用于标识SLA需求的参数,例如可以是颜色(color)的值。
在另一些实现方式中,第一网络设备可以是中间节点,那么,S101例如可以包括:S101b,第一网络设备接收该第一网络设备的上一跳节点发送的第一报文。一种情况下,该第一网络设备的上一跳节点为入口节点,例如,第一网络设备可以是图2所示的组播树的网络设备B,S101可以是网络设备B接收网络设备A发送的第一报文。另一种情况下,该第一网络设备的上一跳节点为上一跳中间节点,例如,第一网络设备也可以是图7所示的场景中的网络设备F,S101可以是网络设备F接收网络设备C发送的第一报文。其中,图7相比图2所示的场景的区别在于:网络设备F还包括两个子节点——网络设备H和网络
设备I,网络设备G还包括两个子节点——网络设备J和网络设备K。
第一SID,可以是CTP类型的SID。第一SID不仅用于标识第一网络设备,还用于指示第一网络设备对所接收的DA为该第一SID的报文进行子树弹出操作。CTP类型的SID可以细分为:子树弹出且携带数量标识(child tree pop andN-SID,CTPN)类型的SID,以及,子树弹出且携带pointer(child tree pop and pointer,CTPP)类型的SID。
作为一个示例,第一SID为CTPN类型的SID,即,第一SID包括第一N-SID,第一N-SID用于指示子节点数量。以图2所示的场景为例,报文1的segment list 1可以参见图8a和图8b所示,其中,网络设备A的M-SID 1可以包括node id A、Function End.RL、replication number=1和N-SID=6,其中,N-SID=6用于指示网络设备A包括6个子节点。
该示例中,一种情况下,第一子节点的SID为CTPN类型的SID,即,第一子节点的SID包括第二N-SID,第二N-SID用于指示第一子节点的子节点数量;第二子节点的SID为CTPN类型的SID,即,第二子节点的SID包括第三N-SID,第三N-SID用于指示第二子节点的子节点数量。以图2所示的场景为例,报文1的segment list 1参见图8a所示,网络设备B的M-SID B可以包括node id B、Function End.RL、replication number=1和N-SID=2,其中,N-SID=2用于指示网络设备B包括2个子节点;网络设备C的M-SID C可以包括node id C、Function End.RL、replication number=1和N-SID=2,其中,N-SID=2用于指示网络设备C包括2个子节点。
该示例中,另一种情况下,第一子节点的SID为CTPP类型的SID,即,第一子节点的SID包括第二pointer,第二pointer用于指示第一子节点的子节点在第一segment list中的偏移量;第二子节点的SID为CTPP类型的SID,即,第二子节点的SID包括第三pointer,第三pointer用于指示第二子节点的子节点在第一segment list中的偏移量。以图2所示的场景为例,报文1的segment list 1参见图8b所示,网络设备B的M-SID B可以包括node id B、Function End.RL、replication number=1和pointer=4,其中,pointer=4用于指示网络设备B的子节点在segment list 1中的偏移量为4,即,segment list 1中第4个M-SID为网络设备B的子节点;网络设备C的M-SID C可以包括node id C、Function End.RL、replication number=1和pointer=6,其中,pointer=6用于指示网络设备C的子节点在segment list 1中的偏移量为6,即,segment list 1中第6个M-SID为网络设备C的子节点。
作为另一个示例,第一SID为CTPP类型的SID,即,第一SID包括第一pointer,第一pointer用于指示第一网络设备的子节点在所述第一segment list的偏移量。以图2所示的场景为例,报文1的segment list 1可以参见图8c和图8d所示,其中,网络设备A的M-SID1可以包括node idA、Function End.RL、replication number=1和pointer=2,其中,pointer=2用于指示网络设备A的子节点在segment list 1的偏移量为2,即,segment list 1中第2个M-SID为网络设备A的子节点。
该示例中,一种情况下,第一子节点的SID为CTPN类型的SID,即,第一子节点的SID包括第二N-SID,第二N-SID用于指示第一子节点的子节点数量;第二子节点的SID为CTPN类型的SID,即,第二子节点的SID包括第三N-SID,第三N-SID用于指示第二子节点的子节点数量。以图2所示的场景为例,报文1的segment list 1参见图8c所示,网
络设备B的M-SID B可以包括node id B、Function End.RL、replication number=1和N-SID=2,其中,N-SID=2用于指示网络设备B包括2个子节点;网络设备C的M-SID C可以包括node id C、Function End.RL、replication number=1和N-SID=2,其中,N-SID=2用于指示网络设备C包括2个子节点。
该示例中,另一种情况下,第一子节点的SID为CTPP类型的SID,即,第一子节点的SID包括第二pointer,第二pointer用于指示第一子节点的子节点在第一segment list中的偏移量;第二子节点的SID为CTPP类型的SID,即,第二子节点的SID包括第三pointer,第三pointer用于指示第二子节点的子节点在第一segment list中的偏移量。以图2所示的场景为例,报文1的segment list 1参见图8d所示,网络设备B的M-SID B可以包括node id B、Function End.RL、replication number=1和pointer=4,其中,pointer=4用于指示网络设备B的子节点在segment list 1中的偏移量为4,即,segment list 1中第4个M-SID为网络设备B的子节点;网络设备C的M-SID C可以包括node id C、Function End.RL、replication number=1和pointer=6,其中,pointer=6用于指示网络设备C的子节点在segment list 1中的偏移量为6,即,segment list 1中第6个M-SID为网络设备C的子节点。
上述描述中以第一子节点的SID和第二子节点的SID为CTP类型的SID为例进行说明,在具体实现中,第一子节点的SID和第二子节点的SID也可以是子树不弹出(child tree no pop,CTNP)类型的SID,CTNP类型的SID用于指示不进行子树弹出操作。以第二子节点的SID为CTNP类型的SID为例,该第二子节点的SID用于指示第二子节点对所接收的组播报文的segment list不进行子树弹出操作。CTNP类型的SID可以细分为:子树不弹出且携带数量标识(child tree no pop andN-SID,CTNPN)类型的SID,以及,子树不弹出且携带pointer(childtree no pop andpointer,CTNPP)类型的SID。
如果第一子节点的子节点的SID中replication number的值均为0,则,为了降低第一子节点的报文处理工作量,第一子节点可以默认不进行子树弹出操作。同理,如果第二子节点的子节点的SID中replication number的值均为0,则,为了降低第二子节点的报文处理工作量,第二子节点可以默认不进行子树弹出操作。也就是说,当第一子节点(或第二子节点)的子节点的SID包括值不为0的replication number时,才考虑第一子节点(或第二子节点)的SID的类型,以及第一子节点(或第二子节点)是否进行子树弹出操作。
上文中以第一子节点的SID和第二子节点的SID的类型相同为例进行描述,具体实现时,第一子节点的SID和第二子节点的SID的类型也可以不同。
S102,DA与第一SID匹配时,第一网络设备基于第一报文获得第二报文和第三报文,第二报文包括第二segment list和组播数据报文,第三报文包括第三segment list和组播数据报文。
第一网络设备获得第一报文后,通过解析第一报文获得DA字段的值,并判断该DA字段的值是否与该第一网络设备的SID匹配,如果匹配,则,继续确定所匹配的SID的类型,并按照所匹配的SID的类型对第一报文进行相应的处理。
在一些实现方式中,如果第一网络设备确定第一报文的DA与该第一网络设备的CTP类型的第一SID匹配,则,执行该S102获得第二报文和第三报文。其中,第一网络设备确
定第一报文的DA与第一SID匹配,可以包括:第一网络设备从DA字段中获得Common Prefix和M-SID 1,接着,将Common Prefix和M-SID 1拼接得到MSR6 SID A,如果MSR6 SID和第一SID相同,则确定DA与第一SID匹配。或者,第一网络设备确定第一报文的DA与第一SID匹配,也可以包括:第一网络设备从DA字段中获得M-SID 1,接着,如果M-SID 1和第一SID最后N比特相同,则确定DA与第一SID匹配,其中,N为大于0小于128的整数,N可以等于MSR6 SID剔除Common Prefix后的长度。
针对第一SID包括第一N-SID,第一子节点的SID包括第二N-SID,第二子节点的SID包括第三N-SID的情况,S102可以包括:S102a1第一网络设备基于第一segment list和第一SID,从第一segment list获取第二segment list和位于第二segment list之后的第三segment list;S102a2,第一网络设备基于第一报文中replication number的值、第二segment list、第三segment list和组播数据报文,获得第二报文和第三报文。其中,S102a1中第一网络设备从第一segment list获取第二segment list,例如可以包括:S51,第一网络设备基于第一N-SID和第一segment list,确定第一子节点的SID;S52,第一网络设备基于第一子节点的SID和第二N-SID,获取第一子节点的子节点的SID;S53,第一网络设备基于第一子节点的SID和第一子节点的子节点的SID,获取第二segment list。第一网络设备从第一segment list获取第三segment list,例如可以包括:第一网络设备确定第二segment list结束后的第一个SID为第二子节点的SID;接着,第一网络设备基于第二子节点的SID和第三N-SID,获取第二子节点的子节点的SID;然后,第一网络设备基于第二子节点的SID和第二子节点的子节点的SID,获取第三segment list。以图2所示的场景中,图8a所示的报文1的segment list 1为例,网络设备A可以确定segment list 1中,M-SID 1的N-SID=6之后为网络设备A的子节点,从而获得网络设备B的M-SID B,接着,网络设备A根据M-SID B的N-SID=2,确定M-SID B之后的2个M-SID为网络设备B的子节点,从而获得网络设备D的M-SID D和网络设备E的M-SID E,接着,网络设备A获得segment list 2,segment list 2包括M-SID B、M-SID D和M-SID E。网络设备A可以确定segment list 1中,M-SID E之后的第一个SID指示网络设备A的另一个子节点,从而获得网络设备C的M-SID C,接着,网络设备A根据M-SID C的N-SID=2,确定M-SID C之后的2个M-SID为网络设备C的子节点,从而获得网络设备F的M-SID F和网络设备G的M-SID G,接着,网络设备A获得segment list 3,segment list 3包括M-SID C、M-SID F和M-SID G。
针对第一SID包括第一N-SID,第一子节点的SID包括第二pointer,第二子节点的SID包括第三pointer的情况,S102可以包括:S102b1,第一网络设备基于第一segment list和第一SID,从第一segment list获取第二segment list和位于第二segment list之后的第三segment list;S102b2,第一网络设备基于第一报文中replication number的值、第二segment list、第三segment list和组播数据报文,获得第二报文和第三报文。其中,S102b1中第一网络设备从第一segment list获取第二segment list,例如可以包括:S61,第一网络设备基于第一N-SID和第一segment list,确定第一子节点的SID;S62,第一网络设备基于第一子节点的SID和第二pointer,获取第一子节点的子节点的SID;S63,第一网络设备基于第一子节点的SID和第一子节点的子节点的SID,获取第二segment list。第一网络设备从第一
segment list获取第三segment list,例如可以包括:第一网络设备确定第一子节点后的第一个SID为第二子节点的SID;接着,第一网络设备基于第二子节点的SID和第三pointer,获取第二子节点的子节点的SID;然后,第一网络设备基于第二子节点的SID和第二子节点的子节点的SID,获取第三segment list。其中,从第二pointer所指示的SID开始到第三pointer所指示的SID之前一个SID均为第一子节点的子节点的SID。以图2所示的场景中,图8b所示的报文1的segment list 1为例,网络设备A可以确定segment list 1中,M-SID 1的N-SID=6之后为网络设备A的子节点,从而获得网络设备B的M-SID B,接着,网络设备A根据M-SID B的pointer=4,确定第4个M-SID为网络设备B的子节点,从而获得网络设备D的M-SID D和网络设备E的M-SID E,接着,网络设备A获得segment list 2,segment list 2包括M-SID B、M-SID D和M-SID E。网络设备A可以确定segment list 1中,M-SID B之后的第一个SID指示网络设备A的另一个子节点,从而获得网络设备C的M-SID C,接着,网络设备A根据M-SID C的pointer=6,确定第6个M-SID为网络设备C的子节点,从而获得网络设备F的M-SID F和网络设备G的M-SID G,接着,网络设备A获得segment list 3,segment list 3包括M-SID C、M-SID F和M-SID G。
针对第一SID包括第一pointer,第一子节点的SID包括第二N-SID,第二子节点的SID包括第三N-SID的情况,S102可以包括:S102c1,第一网络设备基于第一segment list和第一SID,从第一segment list获取第二segment list和位于第二segment list之后的第三segment list;S102c2,第一网络设备基于第一报文中replication number的值、第二segment list、第三segment list和组播数据报文,获得第二报文和第三报文。其中,S102c1中第一网络设备从第一segment list获取第二segment list,例如可以包括:S71,第一网络设备基于第一pointer和第一segment list,确定第一子节点的SID;S72,第一网络设备基于第一子节点的SID和第二N-SID,获取第一子节点的子节点的SID;S73,第一网络设备基于第一子节点的SID和第一子节点的子节点的SID,获取第二segment list。第一网络设备从第一segment list获取第三segment list,例如可以包括:第一网络设备确定第二segment list结束后的第一个SID为第二子节点的SID;接着,第一网络设备基于第二子节点的SID和第三N-SID,获取第二子节点的子节点的SID;然后,第一网络设备基于第二子节点的SID和第二子节点的子节点的SID,获取第三segment list。以图2所示的场景中,图8c所示的报文1的segment list 1为例,网络设备A可以根据M-SID 1的pointer=2确定segment list 1中第2个M-SID为网络设备A的子节点的SID,从而获得网络设备B的M-SID B,接着,网络设备A根据M-SID B的N-SID=2,确定M-SID B之后的2个M-SID为网络设备B的子节点,从而获得网络设备D的M-SID D和网络设备E的M-SID E,接着,网络设备A获得segment list 2,segment list 2包括M-SID B、M-SID D和M-SID E。网络设备A可以确定segment list 1中,M-SID E之后的第一个SID指示网络设备A的另一个子节点,从而获得网络设备C的M-SID C,接着,网络设备A根据M-SID C的N-SID=2,确定M-SID C之后的2个M-SID为网络设备C的子节点,从而获得网络设备F的M-SID F和网络设备G的M-SID G,接着,网络设备A获得segment list 3,segment list 3包括M-SID C、M-SID F和M-SID G。
针对第一SID包括第一pointer,第一子节点的SID包括第二pointer,第二子节点的SID包括第三pointer的情况,S102可以包括:S102d1,第一网络设备基于第一segment list和第一SID,从第一segment list获取第二segment list和位于第二segment list之后的第三segment list;S102d2,第一网络设备基于第一报文中replication number的值、第二segment list、第三segment list和组播数据报文,获得第二报文和第三报文。其中,S102d1中第一网络设备从第一segment list获取第二segment list,例如可以包括:S81,第一网络设备基于第一pointer和第一segment list,确定第一子节点的SID;S82,第一网络设备基于第一子节点的SID和第二pointer,获取第一子节点的子节点的SID;S83,第一网络设备基于第一子节点的SID和第一子节点的子节点的SID,获取第二segment list。第一网络设备从第一segment list获取第三segment list,例如可以包括:第一网络设备确定第一子节点后的第一个SID为第二子节点的SID;接着,第一网络设备基于第二子节点的SID和第三pointer,获取第二子节点的子节点的SID;然后,第一网络设备基于第二子节点的SID和第二子节点的子节点的SID,获取第三segment list。其中,从第二pointer所指示的SID开始到第三pointer所指示的SID之前一个SID均为第一子节点的子节点的SID。以图2所示的场景中,图8d所示的报文1的segment list 1为例,网络设备A可以根据M-SID 1的pointer=2确定segment list 1中第2个M-SID为网络设备A的子节点的SID,从而获得网络设备B的M-SID B,接着,网络设备A根据M-SID B的pointer=4,确定第4个M-SID为网络设备B的子节点,从而获得网络设备D的M-SID D和网络设备E的M-SID E,接着,网络设备A获得segment list 2,segment list 2包括M-SID B、M-SID D和M-SID E。网络设备A可以确定segment list 1中,M-SID B之后的第一个SID指示网络设备A的另一个子节点,从而获得网络设备C的M-SID C,接着,网络设备A根据M-SID C的pointer=6,确定第6个M-SID为网络设备C的子节点,从而获得网络设备F的M-SID F和网络设备G的M-SID G,接着,网络设备A获得segment list 3,segment list 3包括M-SID C、M-SID F和M-SID G。
具体实现时,如图9a所示,第二报文可以包括IPv6头、MRH和组播数据报文,MRH包括segment list 2和SL,其中,IPv6头中DA的值可以为MSR6 SID B,也可以为Common Prefix+M-SID B;SL的值指示segment list 2中的MSR6 SID B或M-SID B。同理,如图9b所示,第三报文可以包括DA、MRH和组播数据报文,MRH包括segment list 3和SL,其中,DA的值可以为MSR6 SID C,也可以为Common Prefix+M-SID C;SL的值指示segment list 3中的MSR6 SID C或M-SID C。
S103,第一网络设备向第一子节点发送第二报文,向第二子节点发送第三报文。
可见,第一网络设备将所获得的第一报文依据本申请实施例提供的方法处理为第二报文和第三报文,第二报文的第二segment list与以第一子节点为根的子树对应(即为仅包括第一子节点的SID和第一子节点的子节点的SID),不包括第二子节点的相关SID,同理,第三报文的第三segment list与以第二子节点为根的子树对应(即为仅包括第二子节点的SID和第二子节点的子节点的SID),不包括第一子节点的相关SID,从而使得第一网络设备分别向第一子节点和第二子节点发送的第二报文和第三报文的长度得到压缩,剔除了不影响报文处理的无效信息,使得第一子节点能够按照第二segment list对所接收的第二报文
进行正常的处理,第二子节点能够按照第三segment list对所接收的第三报文进行正常的处理,提高了报文处理效率,降低了报文转发所需占用的资源。
此外,为了减少网络设备的处理报文的工作量,本申请实施例还提供了一种CTNP类型的SID,在第一网络设备对第一报文进行子树弹出操作后,第一子节点和/或第二子节点不进行子树弹出。
下文中以图7所示的场景进行介绍。参见图7,该组播树包括网络设备A、网络设备B、网络设备C、网络设备D、网络设备E、网络设备F、网络设备G、网络设备H、网络设备I、网络设备J和网络设备K,其中,网络设备A的子节点包括网络设备B和网络设备C,网络设备B的子节点包括网络设备D和网络设备E,网络设备C的子节点包括网络设备F和网络设备G,网络设备F的子节点包括网络设备H和网络设备I,网络设备G的子节点包括网络设备J和网络设备K。
作为一个示例,图7所示的场景中除了网络设备A以外的网络设备的SID均为CTNPP类型,那么,如图10a所示,网络设备A获得的报文1的segment 1中,依次包括:M-SID 1、M-SID B、M-SID C、M-SID D、M-SID E、M-SID F、M-SID G、M-SID H、M-SID I、M-SID J和M-SID K,其中,M-SID 1为CTPP或CTPN类型的SID,pointer=2或N-SID=10,M-SID B、M-SID C、M-SID F和M-SID G中pointer的值分别为4、6、8和10,其他M-SID中pointer的值为0。对于网络设备A处理所得的报文2和报文3,报文2的segment list 2中依次包括:M-SID B、M-SID D和M-SID E,其中,M-SID B、M-SID D和M-SID E中pointer的值分别为2、0和0;报文3的segment list 3中依次包括:M-SID C、M-SID F、M-SID G、M-SID H、M-SID I、M-SID J、M-SID K,其中,M-SID C、M-SID F和M-SID G中pointer的值分别为2、4和6,其他M-SID中pointer的值为0。网络设备B接收到报文2后,复制并经过修改DA等操作得到报文2’和报文2”,将报文2’和报文2”分别发送至网络设备D和网络设备E。网络设备C接收到报文3后,复制并经过修改DA等操作得到报文3’和报文3”,报文3’和报文3”中均包括segment list 3,网络设备C分别将报文3’和报文3”发送至网络设备F和网络设备G;网络设备F接收到报文3’后,复制并经过修改DA等操作得到报文31和报文32,报文31和报文32中均包括segment list 3,网络设备F分别将报文31和报文32发送至网络设备H和网络设备I;网络设备G接收到报文3”后,复制并经过修改DA等操作得到报文31’和报文32’,报文31’和报文32’中均包括segment list 3,网络设备G分别将报文31’和报文32’发送至网络设备J和网络设备K。
作为另一个示例,图7所示的场景中除了网络设备A以外的网络设备的SID均为CTNPN类型,那么,如图10b所示,网络设备A获得的报文1的segment 1中,依次包括:M-SID 1、M-SID B、M-SID D、M-SID E、M-SID C、M-SID F、M-SID H、M-SID I、M-SID G、M-SID J和M-SID K,其中,M-SID 1为CTPP或CTPN类型的SID,pointer=2或N-SID=10,M-SID B、M-SID C、M-SID F和M-SID G中N-SID的值分别为2、6、2和2,其他M-SID中N-SID的值为0。对于网络设备A处理所得的报文2和报文3,报文2的segment list 2中依次包括:M-SID B、M-SID D和M-SID E,其中,M-SID B、M-SID D和M-SID E中
N-SID的值分别为2、0和0;报文3的segment list 3中依次包括:M-SID C、M-SID F、M-SID H、M-SID I、M-SID G、M-SID J和M-SID K,其中,M-SID C、M-SID F和M-SID G中N-SID的值分别为6、2和2,其他M-SID中pointer的值为0。网络设备B接收到报文2后,复制并经过修改DA等操作得到报文2和报文2’,将报文2和报文2’分别发送至网络设备D和网络设备E。网络设备C接收到报文3后,复制并经过修改DA等操作得到报文3和报文3’,报文3和报文3’中均包括segment list 3,网络设备C分别将报文3和报文3’发送至网络设备F和网络设备G;网络设备F接收到报文3后,复制并经过修改DA等操作得到报文31和报文32,报文31和报文32中均包括segment list 3,网络设备F分别将报文31和报文32发送至网络设备H和网络设备I;网络设备G接收到报文3’后,复制并经过修改DA等操作得到报文31’和报文32’,报文31’和报文32’中均包括segment list 3,网络设备G分别将报文31’和报文32’发送至网络设备J和网络设备K。
作为另一个示例,图7所示的场景中,网络设备A的SID为CTPP或CTPN类型,网络设备B和网络设备C的SID为CTNPN类型,网络设备D和网络设备E的SID为CTNPN类型,其他网络设备的SID为CTNPP类型其他网络设备的SID为CTNPP类型,那么,如图10c所示,网络设备A获得的报文1的segment 1中,依次包括:M-SID 1、M-SID B、M-SID D、M-SID E、M-SID C、M-SID F、M-SID G、M-SID H、M-SID I、M-SID J和M-SID K,其中,M-SID 1中包括pointer=2或N-SID=10,M-SID B和M-SID C的N-SID的值分别为2和6,M-SID F和M-SID G中pointer的值分别为4和6,其他M-SID中pointer或N-SID的值为0。对于网络设备A处理所得的报文2和报文3,报文2的segment list 2中依次包括:M-SID B、M-SID D和M-SID E,其中,M-SID B、M-SID D和M-SID E中N-SID的值分别为2、0和0;报文3的segment list 3中依次包括:M-SID C、M-SID F、M-SID G、M-SID H、M-SID I、M-SID J和M-SID K,其中,M-SID C的N-SID的值分别为6,M-SID F和M-SID G的pointer分别为4和6,其他M-SID中pointer的值为0。网络设备B接收到报文2后,复制并经过修改DA等操作得到报文2和报文2’,将报文2和报文2’分别发送至网络设备D和网络设备E。网络设备C接收到报文3后,复制并经过修改DA等操作得到报文3和报文3’,报文3和报文3’中均包括segment list 3,网络设备C分别将报文3和报文3’发送至网络设备F和网络设备G;网络设备F接收到报文3后,复制并经过修改DA等操作得到报文31和报文32,报文31和报文32中均包括segment list 3,网络设备F分别将报文31和报文32发送至网络设备H和网络设备I;网络设备G接收到报文3’后,复制并经过修改DA等操作得到报文31’和报文32’,报文31’和报文32’中均包括segment list 3,网络设备G分别将报文31’和报文32’发送至网络设备J和网络设备K。该示例中,M-SID D和M-SID E也可以是CTNPP类型,不影响本申请实施例的实现。
可见,本申请实施例提供的方法,提供了多种SID的类型,可以根据网络设备在组播树中的位置灵活的在segment list中采用特定类型的SID,例如,对需要进行子树弹出操作的网络设备(如处于组播树的入口节点附近的网络设备),在segment list中使用该网络设备的CTP类型的SID,实现在该网络设备处进行子树弹出以压缩组播报文长度的效果;又例如,对报文长度较小或报文处理资源有限的网络设备(如处理组播树的叶子节点附近的
网络设备),在segment list中使用该网络设备的CTNP类型的SID,在该网络设备处不进行子树弹出操作,以降低该网络设备报文处理的工作量,提高报文处理效率。
图11示出了一种报文处理装置1100的一种可能的结构示意图,该报文处理装置1100可以实现图6所示实例中第一网络设备的功能。参阅图11,该报文处理装置1100包括:第一获得单元1101、第二获得单元1102和第一发送单元1103。这些单元可以执行上述方法示例中第一网络设备的相应功能。第一获得单元1101,用于支持报文处理装置1100执行图6中S101;第二获得单元1102,用于支持报文处理装置1100执行图6中的S102;第一发送单元1103,用于支持报文处理装置1100执行图6中的S103。或者,该报文处理装置1100也能够实现本申请实施例中所有网络设备或节点执行的其它过程。
例如,第一获得单元1101,用于执行上述方法100中第一网络设备执行的获得第一报文的操作;第二获得单元1102,用于执行上述方法100中第一网络设备执行的DA与第一SID匹配时基于第一报文获得第二报文和第三报文的操作;第一发送单元1103,用于执行上述方法100中第一网络设备执行的向第一子节点发送第二报文,向第二子节点发送第三报文的操作。
其中,第一SID用于指示子树弹出。
在一些实现方式中,第一SID包括第一数量标识N-SID,第一N-SID用于指示子节点数量。
作为一个示例,如果第二段列表包括第一子节点的SID和第一子节点的子节点的SID,第一子节点的SID包括第二N-SID,第二N-SID用于指示第一子节点的子节点数量。该示例下,第一SID还包括用于指示复制次数的标识,所述第二获得单元1102,可以包括:第一获得子单元和第二获得子单元。其中,第一获得子单元,用于基于第一段列表和第一SID,从第一段列表获取第二段列表和位于第二段列表之后的第三段列表;第二获得子单元,用于基于用于指示复制次数的标识、第二段列表、第三段列表和第一报文包括的组播数据报文,获得第二报文和第三报文。需要说明的是,第一获得子单元的具体实现方式可以参见图6所示的实施例中S102a1,第二获得子单元的具体实现方式可以参见图6所示的实施例中S102a2。
例如,第一获得子单元,具体用于:基于第一N-SID和第一段列表,确定第一子节点的SID;基于第一子节点的SID和第二N-SID,获取第一子节点的子节点的SID;基于第一子节点的SID和第一子节点的子节点的SID,获取第二段列表。需要说明的是,该举例中第一获得子单元的具体实现方式可以参见图6所示实施例中S51~S53。
作为另一个示例,如果第二段列表包括第一子节点的SID和第一子节点的子节点的SID,第一子节点的SID包括第二pointer,第二pointer用于指示第一子节点的子节点在第一段列表中的偏移量。该示例下,第一SID还包括用于指示复制次数的标识,第二获得单元1102,可以包括:第五获得子单元和第六获得子单元。其中,第五获得子单元,用于基于第一段列表和第一SID,从第一段列表获取第二段列表和位于第二段列表之后的第三段列表;第六获得子单元,用于基于用于指示复制次数的标识、第二段列表、第三段列表和第一报文包括的组播数据报文,获得第二报文和第三报文。需要说明的是,第五获得子单
元的具体实现方式可以参见图6所示的实施例中S102b1,第六获得子单元的具体实现方式可以参见图6所示的实施例中S102b2。
例如,第五获得子单元,具体用于:基于第一N-SID和第一段列表,确定第一子节点的SID;基于第一子节点的SID和第二pointer,获取第一子节点的子节点的SID;基于第一子节点的SID和第一子节点的子节点的SID,获取第二段列表。需要说明的是,该举例中第五获得子单元的具体实现方式可以参见图6所示实施例中S61~S63。
在另一些实现方式中,第一SID包括第一指针pointer,第一pointer用于指示第一网络设备的子节点在第一段列表的偏移量。
作为一个示例,如果第二段列表包括第一子节点的SID和第一子节点的子节点的SID,第一子节点的SID包括第二N-SID,第二N-SID用于指示第一子节点的子节点数量。该示例下,第一SID还包括用于指示复制次数的标识,第二获得单元,可以包括:第三获得子单元和第四获得子单元。其中,第三获得子单元,用于基于第一段列表和第一SID,从第一段列表获取第二段列表和位于第二段列表之后的第三段列表;第四获得子单元,用于基于用于指示复制次数的标识、第二段列表、第三段列表和第一报文包括的组播数据报文,获得第二报文和第三报文。需要说明的是,第三获得子单元的具体实现方式可以参见图6所示的实施例中S102c1,第四获得子单元的具体实现方式可以参见图6所示的实施例中S102c2。
例如,第三获得子单元,具体用于:基于第一pointer和第一段列表,确定第一子节点的SID;基于第一子节点的SID和第二N-SID,获取第一子节点的子节点的SID;基于第一子节点的SID和第一子节点的子节点的SID,获取第二段列表。需要说明的是,该举例中第三获得子单元的具体实现方式可以参见图6所示实施例中S71~S73。
作为另一个示例,如果第二段列表包括第一子节点的SID和第一子节点的子节点的SID,第一子节点的SID包括第二pointer,第二pointer用于指示第一子节点的子节点在第一段列表中的偏移量。该示例中,第一SID还包括用于指示复制次数的标识,第二获得单元,可以包括:第七获得子单元和第八获得子单元。其中,第七获得子单元,用于基于第一段列表和第一SID,从第一段列表获取第二段列表和位于第二段列表之后的第三段列表;第八获得子单元,用于基于用于指示复制次数的标识、第二段列表、第三段列表和第一报文包括的组播数据报文,获得第二报文和第三报文。需要说明的是,第七获得子单元的具体实现方式可以参见图6所示的实施例中S102d1,第八获得子单元的具体实现方式可以参见图6所示的实施例中S102d2。
例如,第七获得子单元,具体用于:基于第一pointer和第一段列表,确定第一子节点的SID;基于第一子节点的SID和第二pointer,获取第一子节点的子节点的SID;基于第一子节点的SID和第一子节点的子节点的SID,获取第二段列表。需要说明的是,该举例中第七获得子单元的具体实现方式可以参见图6所示实施例中S81~S83。
在一些实现方式中,第一子节点的SID用于指示不进行子树弹出。
在一些实现方式中,第三段列表包括第二子节点的SID和第二子节点的子节点的SID,第二子节点的SID包括第三N-SID,第三N-SID用于指示第二子节点的子节点数量。
在一些实现方式中,第一网络设备是入口节点,第一获得单元1101,可以包括:接收子单元、第九获得子单元和生成子单元。其中,接收子单元,用于接收组播数据报文,组播数据报文包括组播信息;第九获得子单元,用于基于组播信息获取第一段列表;生成子单元,用于基于组播数据报文和第一段列表,生成第一报文。例如,第九获得子单元,具体用于:根据组播信息获取与组播信息对应的第一段列表;或者,根据组播信息获取满足SLA需求的且与组播信息对应的第一段列表。其中,组播信息包括组播组地址,或者,组播信息包括组播组地址和组播树的标识,或者,组播信息包括组播组地址、组播树标识和用于标识SLA需求的参数。需要说明的是,接收子单元的具体实现方式可以参见图6所示的实施例中S101a1,第九获得子单元的具体实现方式可以参见图6所示的实施例中S101a2,生成子单元的具体实现方式可以参见图6所示的实施例中S101a3。
在另一些实现方式中,第一网络设备为中间节点,第一获得单元1101,具体用于:接收第一网络设备的上一跳节点发送的第一报文,第一网络设备的上一跳节点为入口节点或上一跳中间节点。需要说明的是,第一获得单元1101的具体实现方式可以参见图6所示的实施例中S101b。
报文处理装置1100的具体执行过程请参考上述图6所示实施例中相应步骤的详细描述,这里不再一一赘述。
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。本申请实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。例如,上述实施例中,第一获得单元、第二获得单元和第一发送单元可以是同一个单元,也不同的单元。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
图12是本申请实施例提供的一种网络设备1200的结构示意图。图6中的第一网络设备或者图11中的报文处理装置1100可以通过图12所示的网络设备来实现。参见图12,该网络设备1200包括至少一个处理器1201,通信总线1202以及至少一个网络接口1204,可选地,该网络设备1200还可以包括存储器1203。处理器1201可以是一个通用中央处理器(central processing unit,CPU)、特定应用集成电路(application-specific integrated circuit,ASIC)或一个或多个用于控制本申请方案程序执行的集成电路(integrated circuit,IC)。处理器1201可以用于对报文进行处理,以实现本申请实施例中提供的报文处理方法。比如,当图6中的第一网络设备通过图12所示的网络设备来实现时,该处理器1201可以用于获得第一报文,并在第一报文携带的DA与第一SID匹配时基于第一报文获得第二报文和第三报文,具体功能实现可参考方法实施例中对应第一网络设备的处理部分。通信总线1202用于在处理器1201、网络接口1204和存储器1203之间传送信息。存储器1203可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,存储器1203还可以是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是只读光盘(compact disc read-only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、
蓝光光碟等)、磁盘存储介质或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器1203可以是独立存在,通过通信总线1202与处理器1201相连接。存储器1203也可以和处理器1201集成在一起。可选地,存储器1203用于存储执行本申请方案的程序代码或指令,并由处理器1201来控制执行。处理器1201用于执行存储器1203中存储的程序代码或指令。程序代码中可以包括一个或多个软件模块。可选地,处理器1201也可以存储执行本申请实施例方案的程序代码或指令,在这种情况下处理器1201不需要到存储器1203中读取程序代码或指令。网络接口1204可以为收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(RAN)或无线局域网(wireless local area networks,WLAN)等。在本申请实施例中,网络接口1204可以用于接收分段路由网络中的其他节点发送的报文,也可以向分段路由网络中的其他节点发送报文。网络接口1204可以为以太接口(ethernet)接口、快速以太(fast ethernet,FE)接口或千兆以太(gigabit ethernet,GE)接口等。在具体实现中,作为一种实施例,网络设备1200可以包括多个处理器,例如图12中所示的处理器1201和处理器1205。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
图13是本申请实施例提供的一种网络设备1300的结构示意图。图6中的第一网络设备或图11所示的报文处理装置1100可以通过图13所示的网络设备来实现。参见图13所示的网络设备1300的结构示意图,网络设备1300包括主控板和一个或多个接口板。主控板与接口板通信连接。主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板包括CPU和存储器,主控板负责对网络设备1300中各个组件的控制和管理,包括路由计算、设备管理和维护功能。接口板也称为线处理单元(line processing unit,LPU)或线卡(line card),用于接收和发送报文。在一些实施例中,主控板与接口板之间或接口板与接口板之间通过总线通信。在一些实施例中,接口板之间通过交换网板通信,在这种情况下网络设备1300也包括交换网板,交换网板与主控板、接口板通信连接,交换网板用于转发接口板之间的数据,交换网板也可以称为交换网板单元(switch fabric unit,SFU)。接口板包括CPU、存储器、转发引擎和接口卡(interface card,IC),其中接口卡可以包括一个或多个网络接口。网络接口可以为Ethernet接口、FE接口或GE接口等。CPU与存储器、转发引擎和接口卡分别通信连接。存储器用于存储转发表。转发引擎用于基于存储器中保存的转发表转发接收到的报文。转发引擎可以是网络处理器(network processor,NP)。接口卡也称为子卡,可安装在接口板上,负责将光电信号转换为数据帧,并对数据帧进行合法性检查后转发给转发引擎处理或接口板CPU。在一些实施例中,CPU也可执行转发引擎的功能,比如基于通用CPU实现软转发,从而接口板中不需要转发引擎。在一些实施例中,转发引擎可以通过ASIC或现场可编程门阵列(field programmable gate array,FPGA)实现。在一些实施例中,存储转发表的存储器也可以集成到转发引擎中,作为转发引擎的一部分。
参见图14所示,本申请实施例提供了一种通信系统1400,该通信系统1400用于实现
前述方法100中的报文处理方法。该通信系统1400包括网络设备1401、子节点1402和子节点1403。网络设备1401可以实现图6所示的实施例中的第一网络设备或图11中的报文处理装置1100的功能,子节点1402和子节点1403可以实现图6所示的实施例中第一子节点和第二子节点的功能。具体执行过程请参考上述图6所示实施例中相应步骤的详细描述,这里不再一一赘述。
本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述图6所示实施例中第一网络设备的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性的,该芯片系统可以是FPGA,可以是ASIC,还可以是系统芯片(system on chip,SoC),还可以是CPU,还可以是NP,还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行前述实施例中的方法
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包括,例如,包括了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本申请中“至少一项(个)”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。本申请中认为“A和/或B”包括单独A,单独B,和A+B。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装
置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑模块划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要获取其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各模块单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件模块单元的形式实现。
所述集成的单元如果以软件模块单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述的具体实施方式,对本申请的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本申请的具体实施方式而已。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
Claims (47)
- 一种报文处理方法,其特征在于,应用于第一网络设备,所述方法包括:获得第一报文,所述第一报文包括目的地址DA、第一段列表和组播数据报文,所述第一段列表包括所述第一网络设备的第一段标识SID、第二段列表和第三段列表,所述第二段列表对应以所述第一网络设备的第一子节点为根的子树,所述第三段列表对应以所述第一网络设备的第二子节点为根的子树;所述DA与所述第一SID匹配时,基于所述第一报文获得第二报文和第三报文,所述第二报文包括所述第二段列表和所述组播数据报文,所述第三报文包括所述第三段列表和所述组播数据报文;向所述第一子节点发送所述第二报文,向所述第二子节点发送所述第三报文。
- 根据权利要求1所述的方法,其特征在于,所述第一SID用于指示子树弹出。
- 根据权利要求1或2所述的方法,其特征在于,所述第一SID包括第一数量标识N-SID,所述第一N-SID用于指示子节点数量。
- 根据权利要求1或2所述的方法,其特征在于,所述第一SID包括第一指针pointer,所述第一pointer用于指示所述第一网络设备的子节点在所述第一段列表的偏移量。
- 根据权利要求3所述的方法,其特征在于,所述第二段列表包括所述第一子节点的SID和所述第一子节点的子节点的SID,所述第一子节点的SID包括第二N-SID,所述第二N-SID用于指示所述第一子节点的子节点数量。
- 根据权利要求5所述的方法,其特征在于,所述第一SID还包括用于指示复制次数的标识,所述基于所述第一报文获得第二报文和第三报文,包括:基于所述第一段列表和所述第一SID,从所述第一段列表获取所述第二段列表和位于所述第二段列表之后的所述第三段列表;基于所述用于指示复制次数的标识、所述第二段列表、所述第三段列表和所述第一报文包括的所述组播数据报文,获得所述第二报文和所述第三报文。
- 根据权利要求6所述的方法,其特征在于,所述从所述第一段列表获取所述第二段列表包括:基于所述第一N-SID和所述第一段列表,确定所述第一子节点的SID;基于所述第一子节点的SID和所述第二N-SID,获取所述第一子节点的子节点的SID;基于所述第一子节点的SID和所述第一子节点的子节点的SID,获取所述第二段列表。
- 根据权利要求4所述的方法,其特征在于,所述第二段列表包括所述第一子节点的SID和所述第一子节点的子节点的SID,所述第一子节点的SID包括第二N-SID,所述第二N-SID用于指示所述第一子节点的子节点数量。
- 根据权利要求8所述的方法,其特征在于,所述第一SID还包括用于指示复制次数的标识,所述基于所述第一报文获得第二报文和第三报文,包括:基于所述第一段列表和所述第一SID,从所述第一段列表获取所述第二段列表和位于所述第二段列表之后的所述第三段列表;基于所述用于指示复制次数的标识、所述第二段列表、所述第三段列表和所述第一报 文包括的所述组播数据报文,获得所述第二报文和所述第三报文。
- 根据权利要求9所述的方法,其特征在于,所述从所述第一段列表获取所述第二段列表包括:基于所述第一pointer和所述第一段列表,确定所述第一子节点的SID;基于所述第一子节点的SID和所述第二N-SID,获取所述第一子节点的子节点的SID;基于所述第一子节点的SID和所述第一子节点的子节点的SID,获取所述第二段列表。
- 根据权利要求3所述的方法,其特征在于,所述第二段列表包括所述第一子节点的SID和所述第一子节点的子节点的SID,所述第一子节点的SID包括第二pointer,所述第二pointer用于指示所述第一子节点的子节点在所述第一段列表中的偏移量。
- 根据权利要求11所述的方法,其特征在于,所述第一SID还包括用于指示复制次数的标识,所述基于所述第一报文获得第二报文和第三报文,包括:基于所述第一段列表和所述第一SID,从所述第一段列表获取所述第二段列表和位于所述第二段列表之后的所述第三段列表;基于所述用于指示复制次数的标识、所述第二段列表、所述第三段列表和所述第一报文包括的所述组播数据报文,获得所述第二报文和所述第三报文。
- 根据权利要求12所述的方法,其特征在于,所述从所述第一段列表获取所述第二段列表包括:基于所述第一N-SID和所述第一段列表,确定所述第一子节点的SID;基于所述第一子节点的SID和所述第二pointer,获取所述第一子节点的子节点的SID;基于所述第一子节点的SID和所述第一子节点的子节点的SID,获取所述第二段列表。
- 根据权利要求4所述的方法,其特征在于,所述第二段列表包括所述第一子节点的SID和所述第一子节点的子节点的SID,所述第一子节点的SID包括第二pointer,所述第二pointer用于指示所述第一子节点的子节点在所述第一段列表中的偏移量。
- 根据权利要求14所述的方法,其特征在于,所述第一SID还包括用于指示复制次数的标识,所述基于所述第一报文获得第二报文和第三报文,包括:基于所述第一段列表和所述第一SID,从所述第一段列表获取所述第二段列表和位于所述第二段列表之后的所述第三段列表;基于所述用于指示复制次数的标识、所述第二段列表、所述第三段列表和所述第一报文包括的所述组播数据报文,获得所述第二报文和所述第三报文。
- 根据权利要求15所述的方法,其特征在于,所述从所述第一段列表获取所述第二段列表包括:基于所述第一pointer和所述第一段列表,确定所述第一子节点的SID;基于所述第一子节点的SID和所述第二pointer,获取所述第一子节点的子节点的SID;基于所述第一子节点的SID和所述第一子节点的子节点的SID,获取所述第二段列表。
- 根据权利要求5-16任一项所述的方法,其特征在于,所述第一子节点的SID用于指示不进行子树弹出。
- 根据权利要求1-17任一项所述的方法,其特征在于,所述第三段列表包括所述第二 子节点的SID和所述第二子节点的子节点的SID,所述第二子节点的SID包括第三N-SID,所述第三N-SID用于指示所述第二子节点的子节点数量。
- 根据权利要求1-18任一项所述的方法,其特征在于,所述第一网络设备是入口节点,所述获得第一报文,包括:接收所述组播数据报文,所述组播数据报文包括组播信息;基于所述组播信息获取所述第一段列表;基于所述组播数据报文和所述第一段列表,生成所述第一报文。
- 根据权利要求19所述的方法,其特征在于,所述基于所述组播信息获取所述第一段列表包括:根据所述组播信息获取与所述组播信息对应的所述第一段列表;或者根据所述组播信息获取满足SLA需求的且与所述组播信息对应的所述第一段列表。
- 根据权利要求19或20所述的方法,其特征在于,所述组播信息包括组播组地址,所述组播信息包括组播组地址和组播树的标识,或者所述组播信息包括组播组地址、组播树标识和用于标识SLA需求的参数。
- 根据权利要求1-18任一项所述的方法,其特征在于,所述第一网络设备为中间节点,所述获得第一报文,包括:接收所述第一网络设备的上一跳节点发送的所述第一报文,所述第一网络设备的上一跳节点为入口节点或上一跳中间节点。
- 一种报文处理装置,其特征在于,设置于第一网络设备,所述装置包括:第一获得单元,用于获得第一报文,所述第一报文包括目的地址DA、第一段列表和组播数据报文,所述第一段列表包括所述第一网络设备的第一段标识SID、第二段列表和第三段列表,所述第二段列表对应以所述第一网络设备的第一子节点为根的子树,所述第三段列表对应以所述第一网络设备的第二子节点为根的子树;第二获得单元,用于所述DA与所述第一SID匹配时,基于所述第一报文获得第二报文和第三报文,所述第二报文包括所述第二段列表和所述组播数据报文,所述第三报文包括所述第三段列表和所述组播数据报文;第一发送单元,用于向所述第一子节点发送所述第二报文,向所述第二子节点发送所述第三报文。
- 根据权利要求23所述的装置,其特征在于,所述第一SID用于指示子树弹出。
- 根据权利要求23或24所述的装置,其特征在于,所述第一SID包括第一数量标识N-SID,所述第一N-SID用于指示子节点数量。
- 根据权利要求23或24所述的装置,其特征在于,所述第一SID包括第一指针pointer,所述第一pointer用于指示所述第一网络设备的子节点在所述第一段列表的偏移量。
- 根据权利要求25所述的装置,其特征在于,所述第二段列表包括所述第一子节点的SID和所述第一子节点的子节点的SID,所述第一子节点的SID包括第二N-SID,所述第二N-SID用于指示所述第一子节点的子节点数量。
- 根据权利要求27所述的装置,其特征在于,所述第一SID还包括用于指示复制次数的标识,所述第二获得单元,包括:第一获得子单元,用于基于所述第一段列表和所述第一SID,从所述第一段列表获取所述第二段列表和位于所述第二段列表之后的所述第三段列表;第二获得子单元,用于基于所述用于指示复制次数的标识、所述第二段列表、所述第三段列表和所述第一报文包括的所述组播数据报文,获得所述第二报文和所述第三报文。
- 根据权利要求28所述的装置,其特征在于,所述第一获得子单元,具体用于:基于所述第一N-SID和所述第一段列表,确定所述第一子节点的SID;基于所述第一子节点的SID和所述第二N-SID,获取所述第一子节点的子节点的SID;基于所述第一子节点的SID和所述第一子节点的子节点的SID,获取所述第二段列表。
- 根据权利要求26所述的装置,其特征在于,所述第二段列表包括所述第一子节点的SID和所述第一子节点的子节点的SID,所述第一子节点的SID包括第二N-SID,所述第二N-SID用于指示所述第一子节点的子节点数量。
- 根据权利要求30所述的装置,其特征在于,所述第一SID还包括用于指示复制次数的标识,所述第二获得单元,包括:第三获得子单元,用于基于所述第一段列表和所述第一SID,从所述第一段列表获取所述第二段列表和位于所述第二段列表之后的所述第三段列表;第四获得子单元,用于基于所述用于指示复制次数的标识、所述第二段列表、所述第三段列表和所述第一报文包括的所述组播数据报文,获得所述第二报文和所述第三报文。
- 根据权利要求31所述的装置,其特征在于,所述第三获得子单元,具体用于:基于所述第一pointer和所述第一段列表,确定所述第一子节点的SID;基于所述第一子节点的SID和所述第二N-SID,获取所述第一子节点的子节点的SID;基于所述第一子节点的SID和所述第一子节点的子节点的SID,获取所述第二段列表。
- 根据权利要求25所述的装置,其特征在于,所述第二段列表包括所述第一子节点的SID和所述第一子节点的子节点的SID,所述第一子节点的SID包括第二pointer,所述第二pointer用于指示所述第一子节点的子节点在所述第一段列表中的偏移量。
- 根据权利要求33所述的装置,其特征在于,所述第一SID还包括用于指示复制次数的标识,所述第二获得单元,包括:第五获得子单元,用于基于所述第一段列表和所述第一SID,从所述第一段列表获取所述第二段列表和位于所述第二段列表之后的所述第三段列表;第六获得子单元,用于基于所述用于指示复制次数的标识、所述第二段列表、所述第三段列表和所述第一报文包括的所述组播数据报文,获得所述第二报文和所述第三报文。
- 根据权利要求34所述的装置,其特征在于,所述第五获得子单元,具体用于:基于所述第一N-SID和所述第一段列表,确定所述第一子节点的SID;基于所述第一子节点的SID和所述第二pointer,获取所述第一子节点的子节点的SID;基于所述第一子节点的SID和所述第一子节点的子节点的SID,获取所述第二段列表。
- 根据权利要求26所述的装置,其特征在于,所述第二段列表包括所述第一子节点 的SID和所述第一子节点的子节点的SID,所述第一子节点的SID包括第二pointer,所述第二pointer用于指示所述第一子节点的子节点在所述第一段列表中的偏移量。
- 根据权利要求36所述的装置,其特征在于,所述第一SID还包括用于指示复制次数的标识,所述第二获得单元,包括:第七获得子单元,用于基于所述第一段列表和所述第一SID,从所述第一段列表获取所述第二段列表和位于所述第二段列表之后的所述第三段列表;第八获得子单元,用于基于所述用于指示复制次数的标识、所述第二段列表、所述第三段列表和所述第一报文包括的所述组播数据报文,获得所述第二报文和所述第三报文。
- 根据权利要求37所述的装置,其特征在于,所述第七获得子单元,具体用于:基于所述第一pointer和所述第一段列表,确定所述第一子节点的SID;基于所述第一子节点的SID和所述第二pointer,获取所述第一子节点的子节点的SID;基于所述第一子节点的SID和所述第一子节点的子节点的SID,获取所述第二段列表。
- 根据权利要求27-38任一项所述的装置,其特征在于,所述第一子节点的SID用于指示不进行子树弹出。
- 根据权利要求23-39任一项所述的装置,其特征在于,所述第三段列表包括所述第二子节点的SID和所述第二子节点的子节点的SID,所述第二子节点的SID包括第三N-SID,所述第三N-SID用于指示所述第二子节点的子节点数量。
- 根据权利要求23-40任一项所述的装置,其特征在于,所述第一网络设备是入口节点,所述第一获得单元,包括:接收子单元,用于接收所述组播数据报文,所述组播数据报文包括组播信息;第九获得子单元,用于基于所述组播信息获取所述第一段列表;生成子单元,用于基于所述组播数据报文和所述第一段列表,生成所述第一报文。
- 根据权利要求41所述的装置,其特征在于,所述第九获得子单元,具体用于:根据所述组播信息获取与所述组播信息对应的所述第一段列表;或者根据所述组播信息获取满足SLA需求的且与所述组播信息对应的所述第一段列表。
- 根据权利要求41或42所述的装置,其特征在于,所述组播信息包括组播组地址,所述组播信息包括组播组地址和组播树的标识,或者所述组播信息包括组播组地址、组播树标识和用于标识SLA需求的参数。
- 根据权利要求23-40任一项所述的装置,其特征在于,所述第一网络设备为中间节点,所述第一获得单元,具体用于:接收所述第一网络设备的上一跳节点发送的所述第一报文,所述第一网络设备的上一跳节点为入口节点或上一跳中间节点。
- 一种网络设备,其特征在于,所述网络设备包括存储器和处理器;所述存储器,用于存储指令;所述处理器,用于执行所述存储器中的所述指令,执行权利要求1-22任意一项所述的方法。
- 一种通信系统,其特征在于,所述通信系统包括第一网络设备、所述第一网络设备的第一子节点和所述第一网络设备的第二子节点;所述第一网络设备,用于执行权利要求1-22任意一项所述的方法;所述第一子节点,用于接收所述第一网络设备发送的第二报文;所述第二子节点,用于接收所述第一网络设备发送的第三报文。
- 一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得所述计算机执行以上权利要求1-22任意一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210175165.7A CN116708276A (zh) | 2022-02-24 | 2022-02-24 | 一种报文处理方法及相关设备 |
CN202210175165.7 | 2022-02-24 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023160516A1 true WO2023160516A1 (zh) | 2023-08-31 |
Family
ID=87764744
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/077310 WO2023160516A1 (zh) | 2022-02-24 | 2023-02-21 | 一种报文处理方法及相关设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116708276A (zh) |
WO (1) | WO2023160516A1 (zh) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150049760A1 (en) * | 2013-08-15 | 2015-02-19 | Verizon Patent And Licensing Inc. | Source routing in multicast transmissions |
CN107534613A (zh) * | 2015-05-20 | 2018-01-02 | 华为技术有限公司 | 使用子树标识符的多区域源路由组播 |
CN108055211A (zh) * | 2017-12-22 | 2018-05-18 | 盛科网络(苏州)有限公司 | 一种组播复制的方法、设备和存储介质 |
CN114006780A (zh) * | 2020-07-14 | 2022-02-01 | 华为技术有限公司 | 报文转发的方法、设备以及系统 |
-
2022
- 2022-02-24 CN CN202210175165.7A patent/CN116708276A/zh active Pending
-
2023
- 2023-02-21 WO PCT/CN2023/077310 patent/WO2023160516A1/zh unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150049760A1 (en) * | 2013-08-15 | 2015-02-19 | Verizon Patent And Licensing Inc. | Source routing in multicast transmissions |
CN107534613A (zh) * | 2015-05-20 | 2018-01-02 | 华为技术有限公司 | 使用子树标识符的多区域源路由组播 |
CN108055211A (zh) * | 2017-12-22 | 2018-05-18 | 盛科网络(苏州)有限公司 | 一种组播复制的方法、设备和存储介质 |
CN114006780A (zh) * | 2020-07-14 | 2022-02-01 | 华为技术有限公司 | 报文转发的方法、设备以及系统 |
Also Published As
Publication number | Publication date |
---|---|
CN116708276A (zh) | 2023-09-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022078509A1 (zh) | IPv6报文的扩展头封装方法及装置 | |
US20220255772A1 (en) | Packet sending method, apparatus, and system | |
EP3813318B1 (en) | Packet transmission method, communication device, and system | |
EP4009596A1 (en) | Message forwarding method, device, and system in sr network | |
US11134129B2 (en) | System for determining whether to forward packet based on bit string within the packet | |
US11757775B2 (en) | Message generation method and apparatus, and message processing method and apparatus | |
CN112929367A (zh) | 一种Profinet网络与工业IPv6骨干网的协议转换方法 | |
WO2021197141A1 (zh) | 业务处理方法、装置、设备及存储介质 | |
CN107070719B (zh) | 一种设备管理方法和装置 | |
WO2022134674A1 (zh) | 报文传输的方法、装置、设备、存储介质及系统 | |
CN113285878B (zh) | 负载分担的方法、第一网络设备 | |
WO2023160516A1 (zh) | 一种报文处理方法及相关设备 | |
TW200407013A (en) | Frame transfer method and node in ethernet | |
CN115499366B (zh) | 报文传输方法以及装置 | |
JP2023530347A (ja) | Bier oam検出方法、デバイス及びシステム | |
CN114006780A (zh) | 报文转发的方法、设备以及系统 | |
EP4380129A1 (en) | Communication method and device | |
WO2024174668A1 (zh) | 一种信息传输方法及相关设备 | |
WO2023040702A1 (zh) | 一种信息传输方法以及相关设备 | |
US11570106B2 (en) | Address processing method and network device | |
EP4300913A1 (en) | Multicast packet sending method and device | |
WO2023174188A1 (zh) | 一种报文处理的方法、路由通告的方法及相关设备 | |
WO2022033496A1 (zh) | 一种报文发送方法、报文处理方法及设备 | |
WO2022033449A1 (zh) | 发送组播报文的方法、获取转发表项的方法及装置 | |
WO2023088145A1 (zh) | 一种报文处理方法、装置及设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23759141 Country of ref document: EP Kind code of ref document: A1 |