Communication method and apparatus

By embedding multicast routing information with a tree recursive structure in the message, the node determines the forwarding path by itself, solving the problems of poor scalability and fixed paths in the existing multicast technology, and achieving efficient and flexible multicast message forwarding and reducing deployment costs.

CN115733796BActive Publication Date: 2025-07-11HUAWEI TECH CO LTD

Patent Information

Application Number
CN202110977642.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-24
Publication Date
2025-07-11
Estimated Expiration
2041-08-24

AI Technical Summary

Technical Problem

Existing multicast technologies such as PIM-SM and BIER maintain multicast forwarding information database tables in the network resulting in poor scalability, and the multicast tree path is fixed and cannot be planned, which makes it poorly managed.

Method used

By embedding multicast routing information of a tree-shaped recursive structure into the message, the node determines the forwarding path by itself to avoid redundant messages, and supports the mixed deployment of new multicast nodes and ordinary nodes to achieve flexible message forwarding and path planning.

Benefits of technology

It improves the scalability and communication efficiency of multicast messages, saves processing resources of upstream nodes, and reduces deployment difficulty and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115733796B_ABST
    Figure CN115733796B_ABST
Patent Text Reader

Abstract

The present application provides a communication method and apparatus for improving the scalability of packets. The method includes: a first node receives a first packet from a second node and parses the first packet. The first packet includes: the multicast routing information of the second node, and the first node is a child node of the second node in the multicast tree. Among them, the multicast routing identifier of a node is used for the non-leaf child nodes of the node in the multicast tree to determine the multicast routing information of the non-leaf child nodes. The multicast routing information of a node includes: the multicast routing identifier of the node and the multicast routing information of the non-leaf child nodes of the node in the multicast tree.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and in particular, to a communication method and apparatus. Background Art

[0002] Multicast refers to a sender sending packets carrying the same data to multiple specific receivers. Initially, the implementation was that the sender copied the data in a packet multiple times according to the number of receivers, and encapsulated and sent them to each receiver respectively. This approach led to the repeated transmission of packets on some links, reducing the utilization rate of network resources and increasing the possibility of network congestion.

[0003] To solve the above problems, a series of multicast technologies have been proposed in the industry, and the most typical one is Protocol Independent Multicast - Sparse Mode (PIM - SM). Among them, PIM - SM needs to maintain a Multicast Forwarding Information Base (MFIB) table for each multicast flow in the network, which has serious scalability problems. Summary of the Invention

[0004] Embodiments of this application provide a communication method and apparatus for improving the scalability of packets.

[0005] To achieve the above object, this application adopts the following technical solutions:

[0006] In a first aspect, a communication method is provided. The method includes: a first node receives a first packet from a second node and parses the first packet. The first packet includes: multicast routing information of the second node, and the first node is a child node of the second node in a multicast tree. Among them, the multicast routing identifier of a node is used for the non - leaf child nodes of the node in the multicast tree to determine the multicast routing information of the non - leaf child nodes. The multicast routing information of a node includes: the multicast routing identifier of the node and the multicast routing information of the non - leaf child nodes of the node in the multicast tree.

[0007] Based on the method described in the first aspect, it can be known that: 1) The multicast routing information is embedded into the packet, such as the first packet. The multicast routing information in the packet includes a tree-like recursive structure, which can describe the packet forwarding information of a certain multicast tree or a subtree of the multicast tree, with good scalability, and the forwarding path can be conveniently planned and specified as needed. 2) The tree-like recursive structures in the packets sent by a node to each child node are the same, such as the tree-like recursive structure of the multicast routing information of the second node, so that the node can send only one packet at each corresponding output port to avoid redundant packets and improve communication efficiency. 3) The multicast routing information of each non-leaf child node does not need to be determined by the upstream node, such as the second node, but can be determined by the non-leaf child node itself, thus saving the processing resources of the upstream node and improving the operation efficiency.

[0008] In a possible design solution, the first node is a non-leaf child node of the second node, the third node is a child node of the first node, and the first node parses the first packet, including: The first node generates a second packet according to the first packet. The second packet includes: the multicast routing information of the first node, or the multicast routing information of the third node. The multicast routing information of the first node includes any one of the following: the multicast routing identifier of the first node and the multicast routing information of the third node, the multicast routing identifier of the first node, or the multicast routing identifier of the first node and the multicast routing identifier of the third node. Thus, after the first node parses the first packet, the method described in the first aspect may further include: The first node sends the second packet to the third node. It can be seen that the first node can process the first packet more flexibly. For example, if the third node supports determining the multicast routing information of the third node by itself, the first node can perform operations similar to those of the second node, that is, send the second packet containing the multicast routing information of the first node to the third node to avoid redundant packets, save the processing resources of the first node, and improve the operation efficiency. However, if the third node does not support determining the multicast routing information of the third node by itself, the first node can, on the basis of determining the multicast routing information of the first node, further determine the multicast routing information of the third node and send the second packet only containing the multicast routing information of the third node to the third node to ensure that the third node can process the second packet normally and ensure the reliability of communication.

[0009] Optionally, the first node generates a second message based on the first message, which may include: the first node determines the multicast routing information of the first node according to the multicast routing identifier of the second node; encapsulates the message according to the multicast routing information of the second node to obtain the second message. Alternatively, the first node generates a second message based on the first message, which may further include: the first node determines the multicast routing information of the first node according to the multicast routing identifier of the second node; determines the multicast routing information of the third node according to the multicast routing identifier of the first node in the multicast routing information of the first node; and then encapsulates the message according to the multicast routing information of the third node to obtain the second message.

[0010] Further, the first node determines the multicast routing information of the first node according to the multicast routing identifier of the second node, which may include: the first node determines the position of the first node in the first node set according to the multicast routing identifier of the second node, the first node set is the node set corresponding to the second node, and the first node set includes some or all of the potential child nodes of the second node; the first node determines the multicast routing information of the first node according to the position of the first node in the first node set.

[0011] Further, the multicast routing identifier of the second node includes: N first fields, N is the number of nodes in the first node set, and the first node determines the position of the first node in the first node set according to the multicast routing identifier of the second node, including: the first node determines the position of the first field corresponding to the first node among the N first fields, and the position of the first field corresponding to the first node is used to represent the position of the first node in the first node set.

[0012] Further, the multicast routing information of the second node further includes the addressing field of the second node. The first node determines the multicast routing information of the first node according to the multicast routing identifier of the second node, which may include: the first node determines the multicast routing information of the first node according to the multicast routing identifier of the second node and the addressing field of the second node.

[0013] It can be understood that if the lengths of the multicast routing information of each non-leaf child node of the second node are the same, the first node can also determine the multicast routing information of the first node only according to the position of the first node in the first node set. In this case, the multicast routing information of the second node may not include the addressing field of the second node to save communication overhead and improve communication efficiency. However, if the multicast routing information of the second node includes the addressing field of the second node, the first node can determine the multicast routing information of the first node regardless of whether the lengths of the multicast routing information of each non-leaf child node of the second node are the same, so that the lengths of the multicast routing information of each non-leaf child node can be flexibly set to apply to more scenarios.

[0014] Further, the addressing field of the second node is used to indicate the length of the multicast routing information of the child nodes of the second node, thus saving the bit overhead of the addressing field and improving communication efficiency. Alternatively, the addressing field of the second node is used to indicate the start position or end position of the multicast routing information of the child nodes of the second node, so that the first node can quickly determine the multicast routing information of the first node and improve the multicast efficiency. Alternatively, the addressing field of the second node includes: multiple delimiter fields, and the multicast routing information of the child nodes of the second node is separated by the multiple delimiter fields.

[0015] Optionally, the first node and the third node are nodes within the first network, and the second message further includes: a first header and a second header. The first header includes: the multicast routing information of the third node, or the multicast routing information of the first node. The second header includes: the unicast / multicast information of the second network. From the perspective of message forwarding, by encapsulating the unicast / multicast information, cross-network forwarding of the second message can be achieved, making the forwarding no longer restricted. From the perspective of device deployment, nodes that support multicast routing information forwarding (hereinafter referred to as new multicast nodes), that is, the first node and the third node, can be mixedly deployed with nodes that only support unicast / multicast information forwarding (hereinafter referred to as ordinary nodes). For example, new multicast nodes can be deployed in small batches in an interspersed manner among ordinary nodes, thereby reducing the deployment quantity of new multicast nodes to reduce the deployment difficulty and deployment cost.

[0016] Further, the first node has a corresponding relationship between the multicast routing identifier of the first node or the multicast routing identifier of the third node and the unicast / multicast information of the second network.

[0017] Further, the first node is a node within the second network. That is to say, the first node is both a new multicast node that supports multicast routing information forwarding and an ordinary node that supports unicast / multicast information forwarding. Therefore, during deployment, new multicast can be enabled on the ordinary node, making the ordinary node become a new multicast node that supports multicast routing information forwarding, thus eliminating the need to separately deploy new multicast nodes to further reduce the deployment cost.

[0018] In another possible design solution, the first node is a leaf child node of the second node. When the first node parses the first message, it may include: the first node generates a third message according to the first message, where the third message includes: the unicast / multicast information of the first device. Thus, after the first node parses the first message, the method described in the first aspect may further include: the first node sends the third message to the first device.

[0019] Optionally, the first message includes the multicast routing identifier of the first node, and the multicast routing identifier of the first node is used to indicate that the destination device is the first device, so that the first node can determine that it needs to send the third message to the first device only based on the multicast routing identifier of the first node, without unpacking the inner header of the first message, thereby improving the processing efficiency.

[0020] In a possible design, the first node and the second node are nodes within the first network, and the first message further includes: a third header and a fourth header. The third header includes the multicast routing information of the second node, and the fourth header includes the unicast / multicast information of the third network. From the perspective of message forwarding, by encapsulating the unicast / multicast information, cross-network forwarding of the first message can be achieved, making the forwarding no longer restricted. From the perspective of device deployment, the new multicast nodes, that is, the first node and the second node, can be deployed mixed with ordinary nodes. For example, the new multicast nodes can be deployed in small batches in an interspersed manner among ordinary nodes, thereby reducing the number of new multicast nodes deployed to reduce the deployment difficulty and cost.

[0021] Optionally, the second node is a node within the third network. That is to say, the second node is both a new multicast node that supports multicast routing information forwarding and an ordinary node that supports unicast / multicast information forwarding. Therefore, during deployment, new multicast can be enabled on the ordinary node, making the ordinary node become a new multicast node that supports multicast routing information forwarding, thus eliminating the need to deploy new multicast nodes separately to further reduce the deployment cost.

[0022] In a possible design, the unicast / multicast information may include any one of the following: Internet Protocol (IP) unicast / multicast information, Multiprotocol Label Switching (MPLS) label information, or bit string information, to apply to more scenarios.

[0023] In a second aspect, a communication method is provided. The method includes: the second node obtains the first message and sends the first message to the first node. The first node is a child node of the second node in the multicast tree. The first message includes the multicast routing information of the second node. The multicast routing identifier of a node is used for the non-leaf child nodes of the node in the multicast tree to determine the multicast routing information of the non-leaf child nodes. The multicast routing information of a node includes the multicast routing identifier of the node and the multicast routing information of the non-leaf child nodes of the node in the multicast tree.

[0024] In a possible design, the first node and the second node are nodes within the first network, and the first message may further include: a third header and a fourth header. The third header includes the multicast routing information of the second node, and the fourth header includes the unicast / multicast information of the third network.

[0025] Optionally, the second node is a node within the third network.

[0026] Optionally, the unicast / multicast information may include any one of the following: Internet Protocol (IP) unicast / multicast information, Multiprotocol Label Switching (MPLS) label information, or bit string information.

[0027] In addition, the technical effects of the method described in the second aspect can refer to the technical effects of the method described in the first aspect, which will not be elaborated here.

[0028] In a third aspect, a communication method is provided. The method includes: a fourth node obtains a fourth packet and, based on the fourth packet, sends a fifth packet to a fifth node. The fourth node is a node within a fourth network, and the fourth packet includes: a fifth header, and the fifth header includes: bit string information of a fifth network; the fifth node is a node within the fourth network, and the fifth packet includes: a fifth header and a sixth header, and the sixth header includes: bit string information of the fifth node.

[0029] Based on the method described in the third aspect, since the bit string information of the fifth node is encapsulated in the fifth packet, the fifth packet can be forwarded across networks before being sent to the fifth network, for example, forwarded across the fourth network to the fifth node, so that the forwarding is no longer restricted.

[0030] In a possible design, the fourth node is configured with a first entry and a second entry. The first entry includes: bit string information of the fifth network, and the second entry includes: bit string information of the fifth node, so that the fourth node can accurately determine the bit string information of the fifth node by traversing the entries.

[0031] In a possible design, the fourth node sends the fifth packet to the fifth node based on the fourth packet, including: the fourth node encapsulates a sixth header on the fourth packet to obtain the fifth packet, and thus sends the fifth packet to the fifth node.

[0032] In a fourth aspect, a communication method is provided. The method includes: the fifth node receives the fifth packet from the fourth node and parses the fifth packet. The fourth node and the fifth node are nodes within the fourth network, the fourth packet includes: a fifth header and a sixth header, the fifth header includes: bit string information of the fifth network, and the sixth header includes: bit string information of the fifth node.

[0033] In a possible design, after the fifth node parses the fifth packet, the method described in the fourth aspect may further include: the fifth node strips the sixth header from the fifth packet to obtain the fourth packet and sends the fourth packet to the fifth network to implement cross-network forwarding of the packet, so that the forwarding is no longer restricted.

[0034] In addition, the technical effects of the method described in the fourth aspect can refer to the technical effects of the method described in the third aspect, which will not be elaborated here.

[0035] In a fifth aspect, a first node is provided. The first node includes: a transceiver module and a processing module. Among them, the transceiver module is configured to receive a first message from a second node; the processing module is configured to parse the first message. Among them, the first message includes: multicast routing information of the second node. The first node is a child node of the second node in the multicast tree. The multicast routing identifier of a node is used for the non-leaf child nodes of the node in the multicast tree to determine the multicast routing information of the non-leaf child nodes. The multicast routing information of a node includes: the multicast routing identifier of the node and the multicast routing information of the non-leaf child nodes of the node in the multicast tree.

[0036] In a possible design, the first node is a non-leaf child node of the second node. The processing module is further configured to generate a second message according to the first message; the transceiver module is further configured to send the second message to a third node. Among them, the second message includes: the multicast routing information of the first node, or the multicast routing information of the third node. The multicast routing information of the first node includes any one of the following: the multicast routing identifier of the first node and the multicast routing information of the third node, the multicast routing identifier of the first node, or the multicast routing identifier of the first node and the multicast routing identifier of the third node.

[0037] Optionally, the processing module is further configured to determine the multicast routing information of the first node according to the multicast routing identifier of the second node; perform message encapsulation according to the multicast routing information of the second node to obtain a second message. Or, the processing module is further configured to determine the multicast routing information of the first node according to the multicast routing identifier of the second node by the first node; determine the multicast routing information of the third node according to the multicast routing identifier of the first node in the multicast routing information of the first node; perform message encapsulation according to the multicast routing information of the third node to obtain a second message.

[0038] Further, the processing module is further configured to determine the position of the first node in the first node set according to the multicast routing identifier of the second node, and determine the multicast routing information of the first node according to the position of the first node in the first node set. Among them, the first node set is the node set corresponding to the second node, and the first node set includes some or all of the potential child nodes of the second node.

[0039] Further, the multicast routing identifier of the second node includes: N first fields, where N is the number of nodes in the first node set. The processing module is further configured to determine the position of the first field corresponding to the first node among the N first fields, and the position of the first field corresponding to the first node is used to represent the position of the first node in the first node set.

[0040] Further, the multicast routing information of the second node further includes an addressing field of the second node. The processing module is further configured to determine the multicast routing information of the first node according to the multicast routing identifier of the second node and the addressing field of the second node.

[0041] Further, the addressing field of the second node is used to indicate the length of the multicast routing information of the child nodes of the second node. Alternatively, the addressing field of the second node is used to indicate the start position or the end position of the multicast routing information of the child nodes of the second node. Alternatively, the addressing field of the second node includes: a plurality of delimiter fields, and the multicast routing information of the child nodes of the second node is separated by the plurality of delimiter fields.

[0042] Optionally, the first node and the third node are nodes within the first network. The second message further includes: a first header and a second header, the first header includes: the multicast routing information of the third node, or the multicast routing information of the first node, and the second header includes: the unicast / multicast information of the second network.

[0043] Further, the first node has a corresponding relationship between the multicast routing identifier of the first node or the multicast routing identifier of the third node and the unicast / multicast information of the second network.

[0044] Further, the first node is a node within the second network.

[0045] In another possible design, the first node is a leaf child node of the second node, and the processing module is further configured to generate a third message according to the first message, where the third message includes: the unicast / multicast information of the first device; the transceiver module is further configured to send the third message to the first device.

[0046] Optionally, the first message includes the multicast routing identifier of the first node, and the multicast routing identifier of the first node is used to indicate that the destination device is the first device.

[0047] In one possible design, the first node and the second node are nodes within the first network, and the first message further includes: a third header and a fourth header, the third header includes: the multicast routing information of the second node, and the fourth header includes: the unicast / multicast information of the third network.

[0048] Optionally, the second node is a node within the third network.

[0049] In one possible design, the unicast / multicast information includes any one of the following: Internet Protocol (IP) unicast / multicast information, Multiprotocol Label Switching (MPLS) label information, or bit string information.

[0050] Optionally, the transceiver module may also include a sending module and a receiving module. Among them, the sending module is used to implement the sending function of the node described in the fifth aspect, and the receiving module is used to implement the receiving function of the node described in the fifth aspect.

[0051] Optionally, the node described in the fifth aspect may further include a storage module, which stores programs or instructions. When the processing module executes the program or instruction, the method described in the first aspect above is executed by the node.

[0052] It should be noted that the node described in the fifth aspect may be a terminal or a network device, or a chip (system) or other components or assemblies that can be set in the terminal or network device, or a device including the terminal or network device. The present application does not make any limitations in this regard.

[0053] In addition, the technical effects of the node described in the fifth aspect can refer to the technical effects of the method in the first aspect, which will not be elaborated here.

[0054] In a sixth aspect, a second node is provided. The second node includes: a processing module and a transceiver module. Among them, the processing module is used to obtain a first message; the transceiver module is used to send the first message to a first node, where the first node is a child node of the second node in the multicast tree. Among them, the first message includes: the multicast routing information of the second node, and the multicast routing identifier of a node is used for the non-leaf child nodes of the node in the multicast tree to determine the multicast routing information of the non-leaf child nodes. The multicast routing information of a node includes: the multicast routing identifier of the node and the multicast routing information of the non-leaf child nodes of the node in the multicast tree;

[0055] In a possible design, the first node and the second node are nodes within a first network, and the first message further includes: a third header and a fourth header. The third header includes: the multicast routing information of the second node, and the fourth header includes: the unicast / multicast information of a third network.

[0056] Optionally, the second node is a node within a third network.

[0057] Optionally, the unicast / multicast information includes any one of the following: Internet Protocol (IP) unicast / multicast information, Multiprotocol Label Switching (MPLS) label information, or bit string information.

[0058] Optionally, the transceiver module may also include a sending module and a receiving module. Among them, the sending module is used to implement the sending function of the node described in the sixth aspect, and the receiving module is used to implement the receiving function of the node described in the sixth aspect.

[0059] Optionally, the node described in the sixth aspect may further include a storage module that stores programs or instructions. When the processing module executes the programs or instructions, the method described in the second aspect above is executed by the node.

[0060] It should be noted that the node described in the sixth aspect may be a terminal or a network device, or may be a chip (system) or other components or assemblies in the settable terminal or network device, or may also be a device including a terminal or a network device. This application does not make any limitations in this regard.

[0061] In addition, the technical effects of the node described in the sixth aspect may refer to the technical effects of the method described in the second aspect, and will not be elaborated here.

[0062] In a seventh aspect, a fourth node is provided. The fourth node includes: a processing module and a transceiver module. Among them, the transceiver module is used to obtain a fourth message; the processing module is used to control the transceiver module to send a fifth message to a fifth node according to the fourth message. The fourth node is a node within a fourth network, the fourth message includes: a fifth header, and the fifth header includes: bit string information of a fifth network; the fifth node is a node within the fourth network, and the fifth message includes: a fifth header and a sixth header, and the sixth header includes: bit string information of the fifth node.

[0063] In a possible design solution, the fourth node is configured with a first entry and a second entry. Among them, the first entry includes: bit string information of the fifth network, and the second entry includes: bit string information of the fifth node.

[0064] In a possible design solution, the processing module is further used to encapsulate a sixth header on the fourth message to obtain a fifth message, so as to control the transceiver module to send the fifth message to the fifth node.

[0065] Optionally, the transceiver module may also include a sending module and a receiving module. Among them, the sending module is used to implement the sending function of the node described in the seventh aspect, and the receiving module is used to implement the receiving function of the node described in the seventh aspect.

[0066] Optionally, the node described in the seventh aspect may further include a storage module that stores programs or instructions. When the processing module executes the programs or instructions, the method described in the third aspect above is executed by the node.

[0067] It should be noted that the node described in the seventh aspect may be a terminal or a network device, or may be a chip (system) or other components or assemblies in the settable terminal or network device, or may also be a device including a terminal or a network device. This application does not make any limitations in this regard.

[0068] In addition, for the technical effects of the nodes in the seventh aspect, reference may be made to the technical effects of the method described in the third aspect, which will not be elaborated here.

[0069] In an eighth aspect, a fifth node is provided. The fifth node includes: a transceiver module and a processing module. Among them, the transceiver module is used to receive a fifth message from a fourth node; the processing module is used to parse the fifth message. Among them, the fourth node and the fifth node are nodes within a fourth network, and the fourth message includes: a fifth header and a sixth header. The fifth header includes: bit string information of a fifth network, and the sixth header includes: bit string information of the fifth node.

[0070] In a possible design, the processing module is further configured to, after parsing the fifth message, strip the sixth header from the fifth message to obtain a fourth message, so as to control the transceiver module to send the fourth message to the fifth network.

[0071] Optionally, the transceiver module may also include a sending module and a receiving module. Among them, the sending module is used to implement the sending function of the node in the eighth aspect, and the receiving module is used to implement the receiving function of the node in the eighth aspect.

[0072] Optionally, the node in the eighth aspect may further include a storage module, and the storage module stores programs or instructions. When the processing module executes the programs or instructions, the method in the fourth aspect described above is executed by the node.

[0073] It should be noted that the node in the eighth aspect may be a terminal or a network device, or may be a chip (system) or other components or assemblies in a set-top terminal or network device, or may be a device including a terminal or a network device. The present application does not make any limitations in this regard.

[0074] In addition, for the technical effects of the nodes in the eighth aspect, reference may be made to the technical effects of the method in the fourth aspect, which will not be elaborated here.

[0075] In a ninth aspect, a communication device is provided. The device includes: a processor. Among them, the processor is used to execute the method described in any one of the first aspect to the fourth aspect.

[0076] In a possible design, the device described in the ninth aspect may further include a transceiver. The transceiver may be a transceiver circuit or an interface circuit. The transceiver may be used for the device to communicate with other devices.

[0077] In a possible design, the device described in the ninth aspect may further include a memory. The memory may be integrated with the processor or may be separately provided. The memory may be used to store computer programs and / or data involved in the method described in any one of the first aspect to the fourth aspect.

[0078] In this application, the device described in the ninth aspect may be a terminal or a network device, or a chip (system) or other components or assemblies that can be disposed in the terminal or the network device, or a device that includes the terminal or the network device.

[0079] In addition, the technical effects of the device described in the ninth aspect may refer to the technical effects of the method described in any one of the first aspect to the fourth aspect, which will not be elaborated here.

[0080] In the tenth aspect, a communication device is provided. The device includes: a processor and a memory. Among them, the memory is used to store computer instructions, and when the processor executes the instructions, the device is caused to execute the method described in any one of the first aspect to the fourth aspect.

[0081] In a possible design, the device described in the tenth aspect may further include a transceiver. The transceiver may be a transceiver circuit or an interface circuit. The transceiver may be used for the device to communicate with other devices.

[0082] In this application, the device described in the tenth aspect may be a terminal or a network device, or a chip (system) or other components or assemblies that can be disposed in the terminal or the network device, or a device that includes the terminal or the network device.

[0083] In addition, the technical effects of the device described in the tenth aspect may refer to the technical effects of the method described in any one of the first aspect to the fourth aspect, which will not be elaborated here.

[0084] In the eleventh aspect, a communication device is provided. The device includes: a logic circuit and an input / output interface. Among them, the input / output interface is used to receive code instructions and transmit them to the logic circuit. The logic circuit is used to run the code instructions to execute the method described in any one of the first aspect to the fourth aspect.

[0085] In a possible design, the device described in the eleventh aspect may further include a transceiver. The transceiver may be a transceiver circuit. The transceiver may be used for the device to communicate with other devices.

[0086] In a possible design, the device described in the eleventh aspect may further include a memory. The memory may be integrated with the processor or may be separately provided. The memory may be used to store the computer programs and / or data involved in the method described in any one of the first aspect to the fourth aspect.

[0087] In this application, the device described in the eleventh aspect may be a terminal or a network device, or a chip (system) or other components or assemblies that can be disposed in the terminal or the network device, or a device that includes the terminal or the network device.

[0088] In addition, for the technical effects of the device described in the eleventh aspect, reference may be made to the technical effects of the method described in any one of the first to fourth aspects, which will not be elaborated herein.

[0089] In a twelfth aspect, a communication device is provided. The device includes: a processor and a transceiver. Among them, the transceiver is used for information interaction between the communication device and other devices, and the processor executes program instructions to execute the method described in any one of the first to fourth aspects.

[0090] In a possible design, the device described in the twelfth aspect may further include a memory. The memory may be integrated with the processor or may be separately provided. The memory may be used to store the computer programs and / or data involved in the method described in any one of the first to fourth aspects.

[0091] In this application, the device described in the twelfth aspect may be a terminal or a network device, or a chip (system) or other component or assembly that can be disposed in the terminal or the network device, or a device including the terminal or the network device.

[0092] In addition, for the technical effects of the device described in the twelfth aspect, reference may be made to the technical effects of the method described in any one of the first to fourth aspects, which will not be elaborated herein.

[0093] In a thirteenth aspect, a communication system is provided. The communication system includes one or more terminals or network devices, such as a first node, a second node, a third node, a fourth node, or a fifth node, etc., and the terminal or network device is used to execute the method described in any one of the first to fourth aspects.

[0094] In a fourteenth aspect, a computer-readable storage medium is provided, including: a computer program; when the computer program runs on a computer, the method described in any one of the first to fourth aspects is executed by the computer.

[0095] In a fifteenth aspect, a computer program product is provided, including a computer program, and when the computer program runs on a computer, the method described in any one of the first to fourth aspects is executed by the computer. BRIEF DESCRIPTION OF THE DRAWINGS

[0096] Figure 1A It is a schematic diagram of the structure of a multicast tree I;

[0097] Figure 1B It is a schematic diagram of the structure of a node and an entity;

[0098] Figure 2 It is a schematic diagram of the structure of a multicast tree Figure 2 ;

[0099] Figure 3A It is a schematic diagram of the forwarding process of multicast packets;

[0100] Figure 3B It is a schematic diagram of the structure of nodes and child nodes;

[0101] Figure 4 It is a schematic diagram of the network architecture;

[0102] Figure 5 It is the third schematic diagram of the structure of the multicast tree;

[0103] Figure 6 It is a schematic diagram of the IP multicast scenario;

[0104] Figure 7 It is a schematic diagram of the BIER multicast scenario;

[0105] Figure 8 It is the first schematic diagram of the process of the communication method provided by the embodiment of the present application;

[0106] Fig. 9 It is the first schematic diagram of the structure of the multicast routing information in the embodiment of the present application;

[0107] Fig.10 It is the schematic diagram of the structure of the multicast routing information in the communication method provided by the embodiment of the present application Figure 2 ;

[0108] Fig.11 It is the third schematic diagram of the structure of the multicast routing information in the communication method provided by the embodiment of the present application;

[0109] Fig.12 It is the schematic diagram of the structure of the multicast routing information in the communication method provided by the embodiment of the present application Figure 4 ;

[0110] Fig.13 It is the first schematic diagram of the structure of the multicast routing identifier in the communication method provided by the embodiment of the present application;

[0111] Fig.14 It is the schematic diagram of the mapping relationship of the multicast routing identifier in the communication method provided by the embodiment of the present application;

[0112] Fig.15 It is the schematic diagram of the structure of the multicast routing identifier in the communication method provided by the embodiment of the present application Figure 2 ;

[0113] Fig.16 It is the schematic diagram of the structure of the multicast routing information in the communication method provided by the embodiment of the present application Figure 5 ;

[0114] Fig.17 It is the schematic diagram of the structure of the multicast routing information in the communication method provided by the embodiment of the present application Figure 6 ;

[0115] Fig.18 Schematic diagram of the structure of multicast routing information in the communication method provided by the embodiment of the present application Figure 7 ;

[0116] Fig.19 Schematic diagram I of the structure of a message in the communication method provided by the embodiment of the present application;

[0117] Fig. 20 Schematic diagram of the architecture of a multicast tree in the communication method provided by the embodiment of the present application;

[0118] Fig.21 Schematic diagram of the structure of a message in the communication method provided by the embodiment of the present application Figure 2 ;

[0119] Fig. 22 Schematic diagram III of the structure of a message in the communication method provided by the embodiment of the present application;

[0120] Fig.23 Schematic diagram of the structure of a message in the communication method provided by the embodiment of the present application Figure 4 ;

[0121] Fig.24 Flow schematic diagram of the communication method provided by the embodiment of the present application Figure 2 ;

[0122] Fig.25 Schematic diagram of the structure of a message in the communication method provided by the embodiment of the present application Figure 6 ;

[0123] Fig.26 Flow schematic diagram III of the communication method provided by the embodiment of the present application;

[0124] Fig. 27 Scenario schematic diagram of BIER multicast in the communication method provided by the embodiment of the present application;

[0125] Fig.28 Schematic diagram of the structure of a message in the communication method provided by the embodiment of the present application Figure 7 ;

[0126] Fig.29 Schematic diagram I of the structure of the communication device provided by the embodiment of the present application;

[0127] Fig.30 Schematic diagram of the structure of the communication device provided by the embodiment of the present application Figure 2 。 Detailed implementation manners

[0128] The following introduces the technical terms involved in the embodiments of the present application.

[0129] 1. Multicast

[0130] Multicast is a point - to - multi - point transmission technology. For example Figure 1A as shown, a sender, such as a server, can send packets carrying the same data, also known as multicast packets, to multiple receivers, such as clients. After the multicast packets are sent by the sender, they can reach multiple receivers through multiple multicast nodes (hereinafter simply referred to as nodes).

[0131] 2. Node

[0132] A node has the ability to forward multicast packets, such as directly forwarding multicast packets or encapsulating and then forwarding multicast packets. A node can include one entity or multiple entities. An entity can belong to only one node or multiple nodes. Exemplarily, as Figure 1B shown in (a) and Figure 1B shown in (b), the left side is the network topology diagram of the entity, and the right side is the multicast tree. As Figure 1B shown in (a), node Z includes multiple entities, such as entity A, entity B, entity C, entity D, and entity E, and node E includes one entity, such as entity E. It can be seen that entity E belongs to both node Z and node E. As Figure 1B shown in (b), node X includes multiple entities, such as entity A and entity B. It can be seen that entity A and entity B belong to both node Z and node X.

[0133] It should be noted that for the convenience of description, in the embodiments of the present application, if an entity belongs to only one node, the node and the entity use the same identifier. At this time, the address of the entity can also be described as the address of the node, and the actions performed by the node are the same as those performed by the entity. Therefore, when referring to the address of a node in the following text, it refers to the address of the entity in the node. For example, a node that only includes entity A is called node A. At this time, the address of node A is the same as the address of entity A, and a node that only includes entity B is called node B. At this time, the address of node B is the same as the address of node entity B.

[0134] In the present application, an entity can also be called a functional entity. An entity can be a physical entity or a virtual entity. Physical entities can be, for example, routers, switches, servers, hosts, network cards, line cards, chips, die of chips, terminals (such as mobile terminals), internal modules of devices, etc. Virtual entities can be, for example, virtual machines, containers, processes, threads, etc. When the entity is a physical entity, the node can also be called a multicast device. For ease of understanding, the following will introduce by taking the node as an example.

[0135] 3. Multicast Tree

[0136] A multicast tree is a path from a source node to all destination nodes generated for a specific combination of source nodes and destination nodes based on a specific network topology through routing protocols such as Protocol Independent Multicast (PIM), Interior Gateway Protocol (IGP), etc., or other methods such as manual configuration, controller calculation, etc. This path is a tree structure with the source node as the root node and the destination nodes as the leaf nodes, called a multicast tree. A multicast tree can also be called a multicast distribution tree (MDT), and all nodes within the multicast tree support the same type of multicast. For example, Figure 2 is a schematic diagram of a multicast tree, Figure 2 in which (a) on the left is a network topology diagram. If the source node is node B and the destination nodes are node C, node D, and node E, for a combination of source nodes and destination nodes, an example of the generated multicast tree can be as shown in Figure 2 (b) in it.

[0137] It should be noted that the above-mentioned sender and / or receiver can be a node in the multicast tree or not. If it is the former, the source node can be the sender and the destination node can be the receiver. If the receiver is not a node in the multicast tree, after the data reaches the leaf node, the leaf node continues to send the data to the receiver connected to it. For the convenience of description, unless otherwise specified, in the embodiments of this application, the method provided by the embodiments of this application is exemplarily described with both the sender (the second node hereinafter) and the receiver (the first node or the third node hereinafter) being nodes in the multicast tree.

[0138] 4. Child Node

[0139] The child nodes of a node refer to the nodes that the packets of this node in the multicast tree can reach through one-hop multicast, such as after one multicast forwarding. One-hop multicast means looking up the multicast forwarding table once. For example, Figure 2 in (b), node R is a child node of node B, node S is a child node of node R, and node E is a child node of node R. It should be noted that if the multicast packet sent by the previous multicast-supporting node in the multicast tree reaches the next multicast-supporting node in the multicast tree after passing through one or more other nodes that do not support multicast (nodes not in the multicast tree), then the next multicast-supporting node is a child node of the previous multicast-supporting node. That is to say, the multicast packet has passed through one-hop multicast from the previous multicast-supporting node to the next multicast-supporting node. For example, Figure 3A is a schematic diagram of the forwarding process of a router, such as Figure 3AAs shown in the figure, Router A and Router C are routers that support multicast and are nodes in the multicast tree, while Router B is a router that does not support multicast. If Router A sends a multicast packet to Router C, then Router C is a child node of Router A, and Router B is not a child node of Router A.

[0140] In addition, when a child node of a node is a leaf node of the multicast tree, this child node can be called the leaf child node of this node; when a child node of a node is not a leaf node of the multicast tree, this child node can be called the non-leaf child node of this node.

[0141] In the description of this application, unless otherwise specified, the child nodes of a node mentioned hereinafter in this application all refer to the child nodes of this node in the multicast tree. The child nodes can also have other names, for example, multicast child nodes, etc., which are not limited in this application.

[0142] In addition, a module other than the network card in a device can be regarded as a node (assumed to be node a), and the network card in the server can be regarded as another node (assumed to be node b), then node b can be regarded as a child node of node a. A module other than the line card in a router can be regarded as a node (assumed to be node c), and the line card in the router can be regarded as another node (assumed to be node d), then node d can be regarded as a child node of node c. Exemplarily, as Figure 3B shown in the figure, A is a router, node A0 is a module other than the line card in the router, and nodes A1, A2, and A3 are 3 line cards in the router. The router can send multicast packets to nodes B, C, D, E, F, and G respectively through the interfaces on the 3 line cards. At this time, nodes A1, A2, and A3 can be child nodes of node A0. A can also be a server. At this time, nodes A1, A2, and A3 are 3 network cards in this server, and A can send multicast packets to nodes B, C, D, E, F, and G respectively through the network ports on the 3 network cards.

[0143] 5. Potential Child Nodes

[0144] The potential child nodes of a node refer to the nodes that the packets of this node can reach through one-hop multicast. For example, Figure 2 in the figure, nodes R and A are both potential child nodes of node B, and nodes F, R, C, and D are all potential child nodes of node S. It can be understood that the potential child nodes of a node include the child nodes of this node in the multicast tree. When a potential child node of a node is in the multicast tree, this potential child node is also the child node of this node in the multicast tree. The potential child nodes can also have other names, for example, multicast objects, preparatory child nodes, etc., which are not limited in this application.

[0145] 6. Network

[0146] The network can be divided into different areas, that is, different network areas (abbreviated as domains), or different network layers, to carry different services.

[0147] Among them, a network can be composed of all nodes of a multicast tree, and this network can also be regarded as a virtual node composed of all these nodes. For example, Figure 4 is a schematic diagram of the structure of the multicast tree, as shown in Figure 4 The multicast tree includes: Node 1 to Node 9. Node 1 is the source node, Node 6, Node 7, and Node 9 are the destination nodes. Node 1 to Node 9 can form a network, such as Network D. A network can include multiple sub-networks, or multiple sub-network areas. Sub-networks can be divided through routing protocols, such as PIM, IGP, etc., or other methods, such as manual configuration, controller calculation, etc. Each sub-network can include some nodes in the multicast tree. Among them, the nodes in the multicast tree that are not located at the edge of the sub-network can be called non-edge nodes, or non-boundary nodes, and the nodes located at the edge of the sub-network can be called edge nodes, or boundary nodes. Non-edge nodes can be used for packet forwarding within the sub-network, and edge nodes can be used for packet forwarding between sub-networks, such as receiving packets from the previous sub-network or sending packets to the next sub-network. In other words, the edge nodes of a sub-network can serve as the entry nodes or exit nodes of this sub-network. Two adjacent sub-networks can share the same edge node, or they can also each have their own dedicated edge nodes. If they share the same edge node, then the edge node serves as both the exit node of the previous sub-network and the entry node of the next sub-network. If they each have their own dedicated edge nodes, then the edge node serves either as the exit node of the sub-network where it is located or as the entry node of the sub-network where it is located. For example, Figure 4 As shown in the figure, Network A includes: Sub-network A1, Sub-network A2, and Sub-network A3. Taking Sub-network A1 as an example, Sub-network A1 includes: Node 1, Node 2, Node 3, Node 4, and Node 5. Among them, Node 2 is a non-edge node, and all other nodes are edge nodes, that is, Node 1, Node 3, Node 4, and Node 5 are edge nodes. Among them, Node 1 is the dedicated edge node of Sub-network A1 and is the entry node of Sub-network A1. Node 3 and Node 5 are also the dedicated edge nodes of Sub-network A1 and are the exit nodes of Sub-network A1. Node 4 is the edge node shared by Sub-network A1 and Sub-network A3, that is, Node 4 serves as both the exit node of Sub-network A1 and the entry node of Sub-network A3.

[0148] It should be understood that if nodes support different multicast modes, the networks formed by the nodes are different, or in other words, the networks to which the nodes belong are different. For the same node, if the node supports multiple multicast modes at the same time, the node can belong to multiple networks. For example, Figure 5 as shown in (a) of Figure 5 , the network topology includes: Node 1 to Node 11. Among them, Node 1, Node 5, Node 6, Node 7, Node 8, and Node 9 support one type of multicast, such as Internet Protocol (IP) multicast; Node 1, Node 2, Node 3, Node 4, Node 6, Node 10, and Node 11 support another type of multicast, such as Multi-Protocol Label Switching (MPLS) Point-to-Multiple-Point (P2MP) tunnel. At this time, as Figure 5 shown in (b) of Figure 5 , Node 1, Node 5, Node 6, Node 7, Node 8, and Node 9 can form a multicast tree, such as multicast tree T1, and the multicast tree T1 belongs to a network, such as network B. As Figure 5 shown in (c) of Figure 5 , Node 1, Node 2, Node 3, Node 4, Node 6, Node 10, and Node 11 can form another multicast tree, such as multicast tree T2, and the multicast tree T2 belongs to another network, such as network C. Among them, for Node 1 and Node 6, they belong to two networks, namely network B and network C.

[0149] 7. Unicast Packet, Multicast Packet

[0150] The First Definition of Unicast Packet and Multicast Packet:

[0151] Classify packets according to the processing behavior of nodes on the packets. At this time, whether a packet is a unicast packet or a multicast packet is relative. Specifically:

[0152] For a node, if the node does not need to perform multicast forwarding according to the multicast routing information in the packet, or in other words, does not need to look up the multicast forwarding table according to the multicast routing information for forwarding, but only needs to perform unicast forwarding according to the unicast encapsulation of the packet, or in other words, look up the unicast forwarding table according to the unicast encapsulation for forwarding, or consume the packet, that is, process the packet by itself without further forwarding, then the packet is a unicast packet for this node. On the contrary, if the node needs to perform multicast forwarding according to the multicast routing information in the packet, or in other words, needs to look up the multicast forwarding table according to the multicast routing information for forwarding, then the packet is a multicast packet for this node.

[0153] For example, node A and node B have a topological connection, and node B and node C have a topological connection. If node B multicasts and forwards a message from node A to node C, and node C consumes the message after receiving it, then the message is a unicast message for B, a multicast message for node B, and a unicast message for node C. Another example is that node A and node B have a topological connection. If node A unicasts a message to node B, then the message is a unicast message for node B.

[0154] The second definition of unicast messages and multicast messages:

[0155] Classify messages according to the structure of the message. Specifically, a message whose outermost header is a unicast header is a unicast message, and a message whose outermost header is a multicast header is a multicast message. Among them, an IP header whose destination IP address is a unicast address, or a mac header whose destination media access control (MAC) address is a unicast address are both unicast headers. An IP header whose destination IP address is a multicast address, a mac header whose destination mac address is a multicast address, or an MPLS header whose destination address is a tunnel label of a multi-protocol label switching (MPLS) point-to-multiple point (P2MP) master station are all multicast headers. In addition, the multicast routing information referred to later in this application is also a type of multicast header. For specific implementation, please refer to the later introduction and will not be elaborated here.

[0156] Based on the above two definitions of unicast messages and multicast messages, in order to make the method provided in the embodiments of this application clearer, this application uses the second definition to describe the method provided in the embodiments of this application. This application uses the first definition to describe the method provided in the embodiments of this application. When the second definition is used in this application, it is possible to determine whether a message is a unicast message or a multicast message according to the specific structure of the message. For example, in the following, the second node sends a first message to the first node. If the outermost header of the first message is a unicast header, then when described using the second definition, the first message can be understood as a unicast message.

[0157] In addition, the unicast encapsulation in the messages of this application may be the fourth version of the Internet Protocol (IPv4 for short) unicast encapsulation, the sixth version of IP (IPv6 for short) unicast encapsulation, or any other possible encapsulation form. In this application, any possible form of unicast encapsulation may be performed on the message containing multicast routing information, or unicast encapsulation may not be performed. The unicast encapsulation of the message enables the message to traverse the network between two nodes in unicast form (or be transmitted between two nodes). The multicast routing information mentioned in the explanations of unicast messages and multicast messages all refers to the multicast routing information defined hereinafter in this application.

[0158] It should be noted that, in the embodiments of this application, when the multicast message is an IP message, that is, the multicast message includes an IP header, and the destination IP address in the IP header is a unicast IP address, the IP header of the multicast message is the unicast encapsulation of the multicast message. It should be noted that if the multicast message in this application is an IP message, in the description of this application, the destination address always refers to the destination IP address.

[0159] In the following text of this application, if a node receives a multicast message and the multicast message is an IP message, the node first determines whether the destination address in the IP header of the multicast message is its own address. If so, it parses the multicast information after the IP header of the multicast message and forwards the multicast message according to the multicast information. In addition, for the process in which the node generates and sends a multicast message to other nodes, first, the node can determine the multicast routing information and data to be sent to other nodes, and then determine the address of the next hop (that is, the address of other nodes). Then, the node can fill the address of other nodes into the destination address field in the IP header, and encapsulate the multicast routing information and data in the IP header to generate a multicast message, so as to send the multicast message to other nodes. For the sake of simplicity, this process is not described in detail in each step in the following text of this application and is described uniformly here and will not be repeated hereinafter.

[0160] 8. Forwarding of Multicast Messages

[0161] Currently, there are various implementation methods for forwarding multicast messages. For example, it can be implemented through PIM-SM (Solution 1), explicit bit index replication (BIER) (Solution 2). The following are introduced separately.

[0162] Solution 1:

[0163] PIM-SM is a multicast routing protocol. PIM-SM is used to build the MFIB table hop by hop from the receiver towards the multicast source (sender or rendezvous point (RP)), and finally construct a tree structure with the multicast source as the root node and the receivers as the leaf nodes, that is, the multicast tree. Multicast packets start from the root node in the multicast tree and are replicated on each router (which can also be called a multicast router) towards the leaf node direction until they reach the receiver. All receivers can form a multicast group, and a receiver is a member of the multicast group. Among them, the multicast tree with the RP as the root node and the members in the multicast group as the leaf nodes is called the rendezvous point tree (RP tree, RPT), and the multicast tree with the sender as the root node and the members in the multicast group as the leaf nodes is called the shortest path tree (SPT). The forwarding processes of the RPT and SPT are basically the same. Taking the SPT as an example, after the SPT is constructed, each router stores an MFIB table. The MFIB table stores a group address and a port list. When the router receives a multicast packet with the destination address being this group address, it sends the multicast packet through the ports in this port list.

[0164] For ease of understanding, the following uses Figure 6 the multicast tree shown as an example to introduce the joining and forwarding of PIM-SM.

[0165] As Figure 6 shown, if Receiver 1 wants to join a certain multicast group, Receiver 1 can send an IGMP message to DR1. Among them, DR can represent the designated router, that is, the router that sends multicast packets to the members in the multicast group. The IGMP message can include: the address of this multicast group, such as 224.10.10.10, the source address of Receiver 1, such as 1.1.1.1, and the same destination address corresponding to all routers in the multicast tree, such as 224.0.0.2.

[0166] After DR1 receives the IGMP message from Receiver 1, it can generate a join message based on the IGMP message and send the join message to R1. Among them, the join message can include: the upstream neighbor of DR1, or in other words, the previous-hop device of DR1, such as the address of R1, the address of the multicast group, and the source address of Receiver 1. Among them, the address of DR1's upstream neighbor can be recorded in the MRIB table pre-configured by DR1, and R can represent an ordinary router. In addition, DR1 can also look up its MFIB table according to the IGMP message. If the lookup fails, DR1 can create an MFIB table. Among them, the group address in DR1's MFIB table can be the address of the above multicast group, such as 224.10.10.10, and the outgoing port list includes the incoming port where DR1 receives the join message, such as Port 1. If the lookup succeeds, DR1 can maintain the MFIB table, that is, check whether the outgoing port list in DR1's MFIB table includes the above incoming port. If the above incoming port is not included, DR1 can add the above incoming port to the port list.

[0167] After R1 receives the join message from DR1, it can modify the address of DR1's upstream neighbor in the join message, such as its own address, to the address of R1's upstream neighbor, such as the address of the multicast source, so as to send the join message to the multicast source. Among them, the address of R1's upstream neighbor can be recorded in the MRIB table pre-configured by R1. Similarly, R1 can also look up its MFIB table according to the join message. If the lookup fails, R1 can create an MFIB table. Among them, in R1's MFIB table, the group address can be the address of the above multicast group, such as 224.10.10.10, and the outgoing port list includes the incoming port where R1 receives the join message, such as Port 1. If the lookup succeeds, R1 can maintain the MFIB table, that is, check whether the outgoing port list in R1's MFIB table includes the above incoming port. If the above incoming port is not included, R1 can add the above incoming port to the port list.

[0168] After the multicast source receives the join message from R1, it can look up R1's MFIB table according to the join message. If the lookup fails, the multicast source can create an MFIB table. Among them, in the MFIB table of the multicast source, the group address can be the address of the above multicast group, such as 224.10.10.10, and the outgoing port list includes the incoming port where the multicast source receives the join message, such as Port 1. If the lookup succeeds, the multicast source can maintain the MFIB table, that is, check whether the outgoing port list in the MFIB table of the multicast source includes the above incoming port. If the above incoming port is not included, the multicast source can add the above incoming port to the port list. In this way, the establishment of the multicast path from Receiver 1 to the multicast source is completed.

[0169] It should be understood that for the receiving end 2 and the receiving end 3, the process of joining the multicast group is similar to that of the receiving end 1, which will not be elaborated here. After the receiving ends 2 and 3 also join the multicast group, the MFIB table maintained by each router in the multicast group can be as Figure 7 shown. On this basis, if the multicast source wants to send a multicast packet and the destination address of the multicast packet is 224.10.10.10, the multicast source can look up the MFIB table of the multicast source to determine that the outgoing ports of the multicast packet include port 1 and port 2, and then send a copy of the multicast packet to each of these two ports respectively. After receiving the multicast packet from the multicast source, R1 can look up the MFIB table of R1 to determine that the outgoing port of the multicast packet includes port 1, and then forward the multicast packet to port 1. After receiving the multicast packet from the multicast source, R2 can look up the MFIB table of R2 to determine that the outgoing ports of the multicast packet include port 1 and port 2. Then, R2 can copy a multicast packet and send a copy of the multicast packet to each of the two ports respectively. In this way, the receiving end 1, the receiving end 2, and the receiving end 3 can all receive the same multicast packet.

[0170] To sum up, according to the relevant introduction of the above solution 1, PIM-SM is implemented based on constructing and maintaining the MFIB table. That is to say, PIM-SM needs to maintain the MFIB table for each multicast flow in the network. However, the number of entries in the MFIB table maintained on each router is limited. If there are too many multicast trees or multicast flows, the router cannot correspondingly increase the MFIB table, resulting in poor scalability of the multicast tree. In addition, the multicast tree of PIM-SM is constructed by building the MFIB table hop by hop from the receiving end to the multicast source direction. Therefore, the multicast tree is completely fixed and cannot actively control the forwarding path based on the plan. Moreover, only the upstream node of the leaf node knows when the leaf node joins or leaves the multicast tree, and the multicast source does not know. That is to say, the multicast source cannot perceive the existence of users, and the manageability is poor.

[0171] Solution 2:

[0172] BIER is a stateless multicast routing protocol. Routers that support BIER are called BFR (Bit-forwarding router), domain ingress routers that support BIER are called BFIR (Bit-forwarding ingress router), and domain egress routers that support BIER are called bit-forwarding egress routers (BFER). BIER assigns a unique identifier (ID) to each BFER, called BFRID, and the typical value range is 1 to 65536. Among them, Figure 7 is a schematic diagram of the set partition of BFERs in BIER, as Figure 7As shown in the figure, if all BFERs are divided into several sets, each set has a set identifier (SI), and the typical value range is 0 to 255. Each set can have at most 256 BFERs. Each set fixedly occupies the BFRIDs from SI * 256 + 1 to (SI + 1) * 256, where "*" means "multiplied by".

[0173] The BIER protocol stipulates that multicast packets indicate which BFERs to multicast through the SI and bitstring carried in the header. The bitstring is a bitmap with a length of 256 bits, and each bit corresponds to a BFER. For example, when the value of the bit corresponding to a BFER is 1, it means that multicast needs to be sent to this BFER. A multicast packet can only carry one SI and one bitstring, so it can only multicast to a certain set. Exemplarily, see Figure 7 , the BFER with ID 2 in set1 sends a multicast packet to the BFERs with IDs 258 and 510 in set2 through node P (i.e., a node inside the operator network). The multicast packet includes an SI and a bitstring. The SI is 2, and the bits corresponding to the BFERs with IDs 258 and 510 in the bitstring are 1, and other bits are 0. In addition, each BFER maintains a bit index forwarding table (BIFT), and BIFT is a multicast routing table defined by BIER. The BFER can forward the multicast packet based on the SI and bitstring carried in the multicast packet header and the maintained BIFT.

[0174] In summary, according to the relevant introduction of the above Scheme 2, since a multicast packet can only carry one SI and one bitstring, it can only multicast to a certain set. This means that if there are a total of 50 sets and multicast packets need to be sent to the BFERs in 50 sets, then 50 copies of multicast packets need to be sent, and the excessive number of packets leads to poor multicast efficiency. And the BIFT in BIER is fixed, that is, each node has a fixed next hop, so the path routing still cannot be planned or specified.

[0175] To solve the problems existing in the above Scheme 1 and Scheme 2, this application provides a communication method applicable to communication between at least two nodes, such as communication between a first node and a second node, see Figure 8 , the method includes:

[0176] S801, the second node obtains a first packet.

[0177] Among them, the second node can be any node with child nodes in the multicast tree. Specifically, it can be the source node in the multicast tree, or it can also be a non-leaf child node of the source node or a certain node, and there is no limitation in this regard. If the second node is the source node, the second node obtaining the first packet can be the second node generating the first packet; if the second node is a non-leaf child node of a certain node, the second node obtaining the first packet can be receiving the first packet from that node. For ease of understanding, this application takes the second node as the source node as an example for introduction.

[0178] The first packet is a multicast packet corresponding to the multicast tree, that is, the first packet includes the multicast tree, or the multicast routing information of a node in a subtree of the multicast tree. The multicast routing information of a node includes: the multicast routing identifier of the node and the multicast routing information of the non-leaf child nodes of the node in the multicast tree. Among them, the specific implementation of the multicast routing identifier can refer to the relevant introduction in S802 and S803 below, and will not be elaborated here. The multicast routing information of the non-leaf child nodes in the multicast routing information of a node can be a list of multicast routing information. This list can be arranged in sequence, in a chain, or in other possible ways, and this application does not make any restrictions. It can be understood that if a node has no non-leaf child nodes, the multicast routing information of the node does not include the multicast routing information of the non-leaf child nodes, and only includes the multicast routing identifier of the node, or it can also not include the multicast routing identifier of the node, and there is no limitation in this regard. Therefore, for the second node, the first packet includes the multicast routing information of the second node. The multicast routing information of the second node includes: the multicast routing identifier of the second node, and the multicast routing information of the non-leaf child nodes of the second node. The multicast routing information of the non-leaf child nodes includes: its own multicast routing identifier, and the multicast routing information of its own non-leaf child nodes, and so on. It can be seen that the multicast routing information in the first packet has a tree-like recursive structure. The multicast routing information of a non-leaf child node of the second node in the first packet can be regarded as a recursive unit in the recursive structure. For ease of description, in some descriptions below in this application, the multicast routing information of a non-leaf child node of a node is denoted as a recursive unit. Assuming that the number of non-leaf child nodes of a node is M, the multicast routing information of the (m + 1)-th non-leaf child node of the node is denoted as the recursive unit m of the node, where m is an integer greater than or equal to 0 and less than M. It can be understood that the multicast routing information of each non-leaf child node of the second node also includes multiple recursive units (each recursive unit is the multicast routing information of a non-leaf child node of the non-leaf child node), and so on. Therefore, the multicast routing information included in the first packet can describe the packet forwarding information of a certain multicast tree or a subtree of the multicast tree.

[0179] For example, as Fig. 9As shown, assume that the non-leaf children of the second node are M1 in number, denoted as node 20, node 21, node 22, …, node 2 M1-1 , then the first message includes the multicast routing information of the second node. The multicast information of the second node includes the multicast routing identifier of the second node, and the multicast routing information of node 20, node 21, node 22, …, node 2 M1-1 . Further, the multicast routing information of each node in node 20, node 21, node 22, …, node 2 M1-1 also includes the multicast routing information of their respective non-leaf children. For example, assume that the non-leaf children of node 20 are M2 in number. Then the multicast routing information of node 20 includes the multicast routing identifier of node 20, and the multicast routing information of the first non-leaf child, the second non-leaf child, …, the M2th non-leaf child of node 20. Each non-leaf child of node 20 further includes the multicast routing information of its own non-leaf children, and so on. The same applies to node 21, node 22, …, node 2 M1-1 .

[0180] For example, as Fig.10 shown, assume that the multicast tree is as shown in (a) of Fig.10 , and as shown in (b) of Fig.10 . The multicast routing information of node D may include the multicast routing information of node A and the multicast routing information of node B. Optionally, it may also include the multicast routing identifier of node C (the leaf child of node D). The multicast routing information of node A may include the multicast routing identifier of node A. Optionally, it may also include the multicast routing identifier of node E (the leaf child of node A), and the multicast routing identifier of node F (the leaf child of node A). The multicast routing information of node B may include the multicast routing identifier of node B. Optionally, it may also include the multicast routing identifier of node H (the leaf child of node B).

[0181] Optionally, the multicast routing information of a node also includes the addressing field of the node. Among them, the addressing field of a node is used to determine the multicast routing information of the non-leaf child of the node in the multicast tree. Exemplarily, as Fig.11 shown, the multicast routing information of the second node includes the addressing field of the second node. The multicast routing information of node 20 includes the addressing field of node 20. The same applies to other nodes. Exemplarily, as Fig.12As shown, the multicast routing information of node D includes the addressing field of node D. Optionally, if the multicast routing information of node A includes the multicast routing identifier of node E (a leaf child node of node A), and / or the multicast routing identifier of node F (a leaf child node of node A), then the multicast routing information of node A may further include the addressing field of node A. At this time, the addressing field of node A is used by node E to determine the multicast routing identifier of node E, and / or used by node F to determine the multicast routing identifier of node F. Optionally, if the multicast routing information of node B includes the multicast routing identifier of node H (a leaf child node of node B), then the multicast routing information of node B may further include the addressing field of node B. At this time, the addressing field of node B is used by node H to determine the multicast routing identifier of node H.

[0182] It should be noted that the multicast routing information of a non-leaf child node of a node can be statically configured in the node in addition to being indicated by the addressing field. For example, if the number of child nodes of a node is fixed, and the child nodes of these child nodes are all leaf nodes, then the multicast routing information of these child nodes only includes the multicast routing identifiers of these child nodes, and the length of the multicast routing identifier is fixed. At this time, the length of the multicast routing information of these child nodes can be statically maintained in the node. At this time, the multicast routing information of the node may not include the addressing field of the node. In addition, the specific implementation of the addressing field of the second node can refer to the relevant introduction in S803 below, which will not be elaborated here.

[0183] Optionally, the first message further includes: a second field; the second field is used to indicate the total length of the multicast routing information of the non-leaf child nodes of the second node. Optionally, it is further used to indicate the sum of the total length of the multicast routing information of the non-leaf child nodes of the second node and the length of one or more of the following items. The following items include: the length of the second field, the length of the addressing field of the second node, and the length of the multicast routing identifier of the second node. In other words, the second field is used to indicate the length of the multicast routing information of the second node, or the total length of the multicast routing information of the second node and the second field, or the total length of the multicast routing information of the non-leaf child nodes in the multicast routing information of the second node. These lengths can be represented by bits, bytes, etc. The second field may further include a reserved field for subsequent function expansion. The second field can be a fixed-length field, for example, 1 byte (i.e., 8 bits). Exemplarily, see Fig.11 , the multicast information of the second node further includes the second field. Exemplarily, see Fig.12 , if the second node is node D, then the multicast messages sent by node D to node A, node B, and node C also include the second field.

[0184] Optionally, the multicast information of the second node further includes: a third field, where the third field is used to align the bytes of the multicast information of the second node. The third field may also be referred to as a padding field. Exemplarily, see Fig.11 , the multicast information of the second node further includes a third field. Exemplarily, see Fig.12 , if the second node is node D, the multicast packets sent by node D to node A, node B, and node C further include a third field. It should be noted that when performing byte alignment, it may be single-byte alignment. In this case, the existence of the third field is to make the number of bits of the entire multicast information divisible by 8. It may also be 4-byte alignment. In this case, the existence of the third field is to make the number of bits of the entire multicast information divisible by 32. It may also be 8-byte alignment. In this case, the existence of the third field is to make the number of bits of the entire multicast information divisible by 64. The specific length of the third field can be determined according to the number of bytes to be aligned. It can be understood that if there is no third field and the multicast routing information of the second node is already byte-aligned, then the third field is not required. For the convenience of description, in the following of this application, the method provided by the embodiments of this application will be exemplarily described by taking single-byte alignment as an example of byte alignment.

[0185] Among them, the second field and the third field can be added by the second node to the first message. In addition, for the convenience of description, the second field, the third field, and the multicast routing information of the second node are collectively referred to as the multicast information of the second node, that is, the multicast information of the second node includes the second field, the third field, and the multicast routing information of the second node.

[0186] S802, the second node sends a first message to the first node, and the first node receives the first message from the second node.

[0187] Among them, the first node may be a non-leaf child node of the second node. For a node, the multicast routing identifier of the node is used to guide the node to send multicast packets to the child nodes of the node, that is, the multicast routing identifier of the second node is used to guide the second node to send the first message to the first node. The multicast routing identifier of a node can be implemented in the following way 11, way 12, or way 13.

[0188] Way 11:

[0189] The multicast routing identifier of a node includes a fourth field and X fifth fields. The fourth field is used to indicate that the number of child nodes of the node is X, and a fifth field is used to indicate the identifier of a child node of the node. The identifier (ID) of the node can be, for example, the index of the node, the IP address of the node, or other identifiers of the node. Taking the identifier of the node as the index of the node as an example, such as Fig.13As shown in (a) of [the figure], the fourth field is denoted as Cnt (abbreviation of Count), which is used to indicate the number of nodes. The fifth field is denoted as Idx (abbreviation of Index), which is used to indicate the index. Idxi is the index of the i-th child node of the node. Idx1 to Idxx form an Idx sequence, and i is an integer greater than 0 and less than or equal to X.

[0190] The nodes in the node set corresponding to a node can have consecutive numbers. For example, 0, 1, 2, …. This node set can include all or part of the potential child nodes of the node. The index of a node can be the number of the node. A node can determine which nodes to send multicast packets to (that is, determine which nodes are its child nodes) through the index of the node carried in the multicast route identifier of the node in the received group broadcast message. In actual implementation, the numbers of the nodes in the node set corresponding to a node can also be consecutive values starting from other values (for example, 1) (that is, the indexes of the nodes in the node set corresponding to the node are 1, 2, 3, …), or they can also be discrete values. This application does not make any restrictions. When the nodes in the node set corresponding to a node are numbered starting from 0, the bit width of the fifth field N is the number of nodes in the node set corresponding to the node. The bit width of the fifth field can also be a fixed bit width. For example, 1 byte. When the value of the fourth field is a natural number, the bit width of the fourth field can be When the value of the fourth field is N - 1 (that is, when the value of the fourth field is 0, N is 1; when the value of the fourth field is 1, N is 2, and so on), the bit width of the fourth field can be The fourth field can also be a fixed bit width. For example, 1 byte. At this time, the maximum length of the fifth field is also fixed. The fourth field can also be called the Cnt field or the Count field. The fifth field can also be called the Idx field or the Index field. In the following text, the fourth field in Mode 11 is called the Cnt field, and the fifth field is called the Idx field.

[0191] Exemplarily, as Fig.10As shown, assume that the node set corresponding to node D contains node A, node B, and node C, indicating that there are 3 potential child nodes of node D, and the numbers of these 3 potential child nodes are 0, 1, and 2 respectively. If the value of the Cnt field is N - 1, both the Cnt field and the Idx field can be 2 bits. Since node D has 3 child nodes, namely node A, node B, and node C, there are 3 Idx fields, that is, the multicast routing identifier of node D has 8 bits. Since there are 3 nodes in the node set (i.e., N = 3), the value of the Cnt field can be 11. Among the 3 Idx fields, the value of the first Idx field is 10, indicating that the node numbered 0 (i.e., node A) is a child node of node D, the value of the second Idx field is 11, indicating that the node numbered 1 (i.e., node B) is a child node of node D, and the value of the third Idx field is 01, indicating that the node numbered 2 (i.e., node C) is a child node of node D. Then the multicast routing identifier of node D can be 11101101.

[0192] Among them, a multicast forwarding table (which can also be called a multicast routing table or a routing forwarding table or other names) can be stored on each node. The multicast forwarding table includes the correspondence between the node index in the node set corresponding to the node and the next hop (nexthop) information (for example, the outgoing interface to the next hop, the address of the next hop). A node can determine the node index according to the Idx field in the multicast routing identifier, then look up the multicast forwarding table to obtain the next hop information, and then forward the multicast packet to the next hop. For the second node, the second node can look up the multicast forwarding table of the second node according to the Idx field of the first node in the multicast routing identifier of the second node to determine the address of the first node, so as to send the first packet to the first node through the outgoing port corresponding to the address of the first node.

[0193] For example, based on Fig.10 the example shown, an example of the multicast forwarding table of node D can be seen in Table 1.

[0194] Table 1

[0195] Node Index Next hop address 0 The address of node A 1 Node B's address 2 The address of node C

[0196] Method 12:

[0197] The multicast routing identifier of a node includes N first fields, where N is the number of nodes in the node set corresponding to the node, and one first field is used to indicate whether a node in the node set is a child node of the node in the multicast tree. Taking the second node as an example, the multicast routing identifier of the second node may include N first fields, and one first field is used to indicate whether a node in the first node set is a child node of the second node in the multicast tree. N is the number of nodes in the first node set, which is the node set corresponding to the second node, and the first node set includes some or all of the potential child nodes of the second node.

[0198] One first field can be one bit. That is to say, the multicast routing identifier of a node (taking the second node as an example) includes N bits. As shown in (b) of Fig.13 The N bits form a bit sequence, and the N bits correspond one by one to the nodes in the first node set corresponding to the second node. One bit is used to indicate whether the node in the first node set corresponding to this bit is a child node of the second node. Specifically, when the value of one bit is 1 (it can also be 0), this bit is used to indicate that the node in the first node set corresponding to this bit is a child node of the second node. For the convenience of description, in the following, it is assumed that when the value of one bit is 1, it indicates that the node corresponding to this bit is the corresponding child node, and the method provided in this application will be described by way of example. The multicast routing identifier in Mode 12 is hereinafter referred to as a bit sequence.

[0199] For example, based on Fig.10 the example shown, the node set corresponding to node D contains node A, node B, and node C. These 3 nodes respectively correspond to the 1st, 2nd, and 3rd bits among 3 bits. If the nodes in the node set corresponding to the bit with a value of 1 are child nodes of node D, the bit sequence of node D can be 111. The node set corresponding to node A contains node D, node E, and node F. These 3 nodes respectively correspond to the 1st, 2nd, and 3rd bits among 3 bits, and node E and node F are child nodes of node A. If the nodes in the node set corresponding to the bit with a value of 1 are child nodes of node A, the bit sequence of node A can be 011.

[0200] Each node may store a multicast forwarding table, and the multicast forwarding table includes the correspondence between the bits in the bit sequence and the information of the next hop (for example, the outgoing interface to the next hop, the address of the next hop). A node can determine the information of the next hop according to the position of the bit in the bit sequence in the multicast forwarding table, and then forward the packet to the next hop. Among them, there are 4 cases for the correspondence between the bits in the bit sequence and the information of the next hop. As shown in Fig.14As shown, in the first case, the leftmost bit in the bit sequence is the 1st bit, and from left to right are the 1st bit, the 2nd bit, the 3rd bit, and so on. The jth bit in the bit sequence corresponds to the entry with index j - 1. In the second case, the rightmost bit in the bit sequence is the 1st bit, and from right to left are the 1st bit, the 2nd bit, the 3rd bit, and so on. The jth bit in the bit sequence corresponds to the entry with index j - 1. In the third case, the leftmost bit in the bit sequence is the 1st bit, and from left to right are the 1st bit, the 2nd bit, the 3rd bit, and so on. The jth bit in the bit sequence corresponds to the entry with index j. In the fourth case, the rightmost bit in the bit sequence is the 1st bit, and from right to left are the 1st bit, the 2nd bit, the 3rd bit, and so on. The jth bit in the bit sequence corresponds to the entry with index j. j is an integer greater than 0. Exemplarily, taking the bit sequence 010011 as an example, the 6 bits respectively correspond to nodes A to F. The correspondence between the bits in the bit sequence and the addresses of the next hops can be seen in Fig.14 . In the descriptions hereinafter of this application, unless otherwise specified, it is considered that the leftmost bit in the bit sequence is the 1st bit, and from left to right are the 1st bit, the 2nd bit, the 3rd bit, and so on. It should be noted that in addition to the above 4 cases, the indexes of the entries in the multicast forwarding table can also be consecutive values or discrete values starting from other values (for example, 2, 3, 4), and this application does not make any restrictions. For the second node, the second node can look up the multicast forwarding table of the second node according to the index corresponding to a bit of the first node in the bit sequence of the second node to determine the address of the first node, so as to send the first packet to the first node through the outgoing port corresponding to the address of the first node.

[0201] Method 13:

[0202] The multicast routing identifier of a node includes a group identifier, and the group identifier is used to indicate the node group corresponding to this node. The nodes in the node group corresponding to a node are all the child nodes of this node. Taking the second node as an example, the multicast routing identifier of the second node includes a first group identifier, and the first group identifier is used to indicate the first node group corresponding to the second node. The nodes in the first node group are all the child nodes of the second node.

[0203] Among them, the node group corresponding to a node is a subset of the node set corresponding to the node. The nodes in the node set corresponding to a node can form at least one node group. A node in the node set can be located in one node group or multiple node groups. Which nodes form a node group can be pre-configured. A node group corresponds to a group identifier (Group ID, abbreviated as GID). In this case, as shown in (c) of Fig.13 , the multicast routing identifier is the GID. A node can determine the nodes in the node group corresponding to the GID in the received multicast packet through the GID in the multicast routing identifier of the node, and send multicast packets to these nodes.

[0204] For example, based on the example shown in Figure 2 , assume that the node set corresponding to node R includes nodes B, A, S, and E. These 4 nodes can form 3 node groups. The first node group includes nodes A and B, the second node group includes nodes S and E, and the third node group includes nodes B, A, S, and E. The identifier of the first node group is identifier 1, the identifier of the second node group is identifier 2, and the identifier of the third node group is identifier 3. In the multicast tree shown on the right side of Figure 2 , nodes S and E are the child nodes of node R. Then the multicast routing identifier of node R can be identifier 2.

[0205] Similar to Method 11 and Method 12, in Method 13, a multicast forwarding table can also be stored on each node. The multicast forwarding table includes the corresponding relationship between the group identifier of the node group and the information of the next hop (for example, the outgoing interface to the next hop, the address of the next hop). The next hop here is the node in the node group corresponding to the group identifier. In this case, a node can determine to which nodes to forward multicast packets according to the multicast routing identifier and this corresponding relationship in the multicast forwarding table. For the second node, the second node can look up the multicast forwarding table according to the first group identifier in the multicast routing identifier of the second node, and determine to send the first packet to the child nodes (including the first node) within the first node group.

[0206] For example, based on the example shown in Figure 2 , an example of the multicast forwarding table of node R can be seen in Table 2.

[0207] Table 2

[0208]

[0209] It can be understood that the multicast routing identifiers in the above-mentioned Method 11, Method 12, and Method 13 can be mutually converted. For example, the GID in Method 13 can be converted into the bit sequence in Method 12 or the multicast routing identifier in Method 11. The multicast routing identifiers in the above-mentioned Method 11, Method 12, and Method 13 can be respectively referred to as the first type of multicast routing identifier, the second type of multicast routing identifier, and the third type of multicast routing identifier. The length of the multicast routing identifier of a node in the above-mentioned Method 11, Method 12, and Method 13 can be statically maintained in the node. The node (such as the source node) or the controller that generates the first multicast packet in the multicast tree can maintain the lengths of the multicast routing identifiers of all nodes in the multicast tree.

[0210] In the above-mentioned Method 11, in the multicast scenario with extremely low density of nodes in the multicast tree, the encapsulation efficiency of the multicast packet is optimal. In the above-mentioned Method 12, in the multicast scenario with relatively high density of nodes in the multicast tree, the encapsulation efficiency is optimal. In the above-mentioned Method 13, in the multicast scenario with the highest density of nodes in the multicast tree, the encapsulation efficiency is optimal.

[0211] Optionally, the multicast routing identifier of a node further includes a type field, and the type field is used to indicate the type of the multicast routing identifier of the node. The types of the multicast routing identifier include the above-mentioned first type of multicast routing identifier, the second type of multicast routing identifier, and the third type of multicast routing identifier. In this case, the node that receives the multicast packet can determine how to identify the multicast routing identifier according to the type of the multicast routing identifier. Exemplarily, when the multicast routing identifier further includes a type field, the multicast routing identifiers in Method 11, Method 12, and Method 13 can refer to Fig.15 in (a) of Fig.15 in (b) of Fig.15 in (c) of Fig.15 in (a) of Fig.15 in (b) of Fig.15 in (c) of

[0212] In actual implementation, one type of multicast routing identifier can be uniquely used (in this case, the type field is not required), or the type field can be used to indicate which type of multicast routing identifier is used. In addition, it should be noted that the type field can be considered as a part of the multicast routing identifier, or can be considered as a field independent of the multicast routing identifier, and this application does not make any restrictions. In a multicast packet, the types of the multicast routing identifiers of different nodes can be the same or different, and this application does not make any restrictions.

[0213] Optionally, the multicast routing identifier of a node further includes a multicast routing identifier length field and / or a node type field. The multicast routing identifier length field is used to indicate the length of the multicast routing identifier, and the node type field is used to indicate the node type. The node type includes a single-entity node and a multi-entity node. A single-entity node means that the node includes one entity, and a multi-entity node means that the node includes multiple entities. Similar to the type field, the multicast routing identifier length field and / or the node type field can be considered as part of the multicast routing identifier or as a field independent of the multicast routing identifier. This application does not make any restrictions in this regard.

[0214] The above type field, multicast routing identifier length field, and node type field can be collectively referred to as a description field or a dscr field. These fields may have other names, and this application does not make any restrictions.

[0215] Optionally, the second node sends a first message to the first node, and the destination address in the unicast encapsulation of the first message is the address of the first node. Specifically, the first message may be an IP message. In this case, the destination address in the first message is the address of the first node, and the first message further includes data. The multicast information of the second node in the first message is located between the IP header and the data of the first message. The unicast encapsulation may include an indication field, which is used to indicate whether the information after unicast encapsulation in the multicast message contains multicast information. After receiving the multicast message, the node can determine whether the information after unicast encapsulation in the multicast message contains multicast information according to this indication field. If the unicast encapsulation is an IPv4 encapsulation, the "protocol" field in the IPv4 header can indicate whether the information after unicast encapsulation in the multicast message contains multicast information. If the unicast encapsulation is an IPv6 encapsulation, the "Next Header" field in the IPv6 header can indicate whether the information after unicast encapsulation in the multicast message contains multicast information.

[0216] It should be noted that in the embodiments of this application, the source address in the unicast encapsulation of the multicast message sent by a node (for example, node a) to another node (for example, node b) can be the address of node a or the address of the source node in the multicast tree. For example, based on Fig.10 the example shown, the source address in the unicast encapsulation of the multicast message sent by node A to node E can be the address of node D or the address of node A.

[0217] It should be noted that when there is no unicast encapsulation in the group broadcast message of the present application, the node can determine the next-hop node of the multicast message through the multicast routing identifier in the group broadcast message. For example, when a node receives a multicast message and the multicast routing identifier of the node is the bit sequence in the following text, the node corresponding to the bit with a value of 1 in the multicast routing identifier is the next-hop node of the multicast message, that is, the child node of the node is the next-hop node of the multicast message.

[0218] S803, the first node parses the first message.

[0219] Among them, the first node parsing the first message may be that the first node generates a second message according to the first message. The second message may include: the multicast routing information of the first node, or the multicast routing information of the third node. Among them, the third node is the child node of the first node, and the multicast routing information of the first node includes any one of the following: the multicast routing identifier of the first node and the multicast routing information of the third node, the multicast routing identifier of the first node, or the multicast routing identifier of the first node and the multicast routing identifier of the third node. If the third node is a non-leaf child node of the first node, the multicast routing information of the first node includes the multicast routing identifier of the first node and the multicast routing information of the third node. However, if the third node is a leaf child node of the first node, the multicast routing information of the first node may include the multicast routing identifier of the third node, that is, includes the multicast routing identifier of the first node and the multicast routing identifier of the third node, or may not include the multicast routing identifier of the third node, that is, the multicast routing information of the first node may only include the multicast routing identifier of the first node. It can be seen that the first node can handle the first message more flexibly. For example, if the third node supports determining its own multicast routing information by the third node, the first node can perform an operation similar to that of the second node, that is, send a second message containing the multicast routing information of the first node to the third node, so as to avoid redundant messages, save the processing resources of the first node, and improve the operation efficiency. However, if the third node does not support determining its own multicast routing information by the third node, the first node can further determine the multicast routing information of the third node on the basis of determining the multicast routing information of the first node, and send a second message only containing the multicast routing information of the third node to the third node to ensure that the third node can process the second message normally and ensure the reliability of communication.

[0220] Among them, for a non-leaf child node of a node in the multicast tree, the multicast routing identifier of this node can be used by this non-leaf child node to determine the multicast routing information of this non-leaf child node. In other words, the first node can determine the multicast routing information of the first node according to the multicast routing identifier of the second node in the first message, and then encapsulate the message according to the multicast routing information of the first node to obtain the second message. Or, after determining the multicast routing information of the first node, the first node can further determine the multicast routing information of the third node, and then encapsulate the message according to the multicast routing information of the third node to obtain the second message. Among them, the implementation of determining the multicast routing information includes Method 21 and Method 22, which are introduced separately below.

[0221] Method 21:

[0222] The multicast routing identifier of a node is used by the non-leaf child nodes of this node in the multicast tree to determine the position of this non-leaf child node within a node set corresponding to this node. The position of this non-leaf child node within a node set corresponding to this node is used by this non-leaf child node to determine the multicast routing information of this non-leaf child node. Taking the first node as an example, the first node can determine the position of the first node within the first node set according to the multicast routing identifier of the second node, and then determine the multicast routing information of the first node according to the position of the first node within the first node set. The above three implementation methods are introduced separately in combination with the above multicast routing identifier.

[0223] In the above Method 11, the multicast routing identifier of a node includes a Cnt field and X Idx fields. The Cnt field is used to indicate that the number of child nodes of this node is X, and one Idx field is used to indicate the identifier of one child node of this node. Therefore, each non-leaf child node of this node in the multicast tree can determine the position of the Idx field corresponding to this non-leaf child node among the X Idx fields according to the Cnt field and the X Idx fields, and this position can represent the position of this non-leaf child node within the corresponding node set. Taking the first node as an example, the first node determines the position of the Idx field corresponding to the first node among the X Idx fields according to the Cnt field and the X Idx fields in the multicast routing identifier of the second node, and then determines the multicast routing information of the first node from the multicast routing information of the second node according to this position.

[0224] Specifically, a node stores the mapping relation table corresponding to the above Cnt field on each non-leaf child node in the multicast tree. The mapping relation table is used to indicate the correspondence between an Idx field corresponding to each non-leaf child node and the non-leaf child node. The position of an Idx field corresponding to each non-leaf child node in the mapping relation table can indicate the position of the non-leaf child node in the corresponding node set. Taking the first node as an example, the first mapping relation table of the first node is used to indicate the correspondence between an Idx field corresponding to each non-leaf child node (including the first node) and the non-leaf child node. The first node can look up the first mapping relation table according to the multicast routing identifier of the second node to determine the position of an Idx field corresponding to the first node in the first mapping relation table. For example, which Idx field in the first mapping relation is the Idx field corresponding to the first node, that is, the position of the first node in the first node set. For example, which child node of the first node set is the first node. The position of the first node in the first node set can be used to indicate the position of the multicast routing information of the first node in the multicast routing information of the second node, that is, which multicast routing information of the multicast routing information of the second node is the multicast routing information of the first node, or in other words, which recursive unit among all the recursive units included in the second node is the recursive unit of the first node. When the multicast routing information is of equal length, the first node can determine the multicast routing information of the first node according to the position of the multicast routing information of the first node in the multicast routing information of the second node.

[0225] For example, based on Fig.10 the example shown, an example of the mapping relation tables of node A, node B, and node C can be seen in Table 3.

[0226] Table 3

[0227] Idx field node 10 Node A 11 Node B 01 Node C

[0228] Among them, the multicast routing identifier of node D is 11101101. In the multicast routing identifier of node D, the value of the Cnt field is 11, the value of the first Idx field is 10, the value of the second Idx field is 11, and the value of the third Idx field is 01. Node A determines that it needs to look up Table 3 according to the value of 11 in the Cnt field. Node A looks up Table 3 according to the value of 10 in the first Idx field, determines that the first Idx field is an Idx field corresponding to node A, and determines that node A is the first node in the corresponding node set (including node A, node B, and node C). If the lengths of the multicast routing information of node A, node B, and node C are all 8 bits, then node A can determine that in the multicast routing information of node D, the first 8 bits are the multicast routing information of node A. Similarly, node B determines that it needs to look up Table 3 according to the value of 11 in the Cnt field. Node B looks up Table 3 according to the value of 10 in the first Idx field, determines that the first Idx field is an Idx field corresponding to node A, not an Idx field corresponding to node B. Node B continues to look up Table 3 according to the value of 11 in the second Idx field, determines that the second Idx field is an Idx field corresponding to node B, and determines that node B is the second node in the corresponding node set. In this way, node B can determine that in the multicast routing information of node D, the second 8 bits are the multicast routing information of node B. Similarly, node C determines that it needs to look up Table 3 according to the value of 11 in the Cnt field. Node C looks up Table 3 according to the value of 10 in the first Idx field, determines that the first Idx field is an Idx field corresponding to node A, not an Idx field corresponding to node C. Node C continues to look up Table 3 according to the value of 11 in the second Idx field, determines that the second Idx field is an Idx field corresponding to node B, not an Idx field corresponding to node C. Node C continues to look up Table 3 according to the value of 01 in the third Idx field, determines that the third Idx field is an Idx field corresponding to node C, and determines that node C is the third node in the corresponding node set. In this way, node C can determine that in the multicast routing information of node D, the third 8 bits are the multicast routing information of node C.

[0229] In the above-mentioned Method 12, the bit sequence of a node includes N first fields, where N is the number of nodes in the node set corresponding to this node. One first field is used to indicate whether a node in the node set is a child node of this node in the multicast tree. Therefore, each non-leaf child node of this node in the multicast tree can determine the position of a first field corresponding to this non-leaf child node among the N first fields according to the N first fields, and this position can represent the position of this non-leaf child node within the corresponding node set. Taking the first node as an example, the first node determines the position of a first field corresponding to the first node among the N first fields according to the N first fields in the bit sequence of the second node, and thus determines the multicast routing information of the first node in the multicast routing information of the second node according to this position.

[0230] Specifically, each non-leaf child node of a node in the multicast tree stores a mapping table corresponding to the above-mentioned first field. This mapping table is used to indicate the corresponding relationship between a first field corresponding to each non-leaf child node and this non-leaf child node. The position of a first field corresponding to each non-leaf child node within this mapping table can indicate the position of this non-leaf child node within the corresponding node set. Taking the first node as an example, the first mapping table of the first node is used to indicate the corresponding relationship between the index of a first field corresponding to each non-leaf child node (including the first node) and this non-leaf child node. The first node can search the first mapping table to determine the position of a first field corresponding to the first node among the N first fields. For example, which first field among the N first fields is the first field corresponding to the first node, that is, the position of the first node within the first node set. The position of the first node within the first node set can be used to indicate the position of the multicast routing information of the first node within the multicast routing information of the second node. When the multicast routing information is of the same length, the first node can determine the multicast routing information of the first node according to the position of the multicast routing information of the first node within the multicast routing information of the second node.

[0231] For example, based on Fig.10 the example shown, an example of the mapping tables of Node A, Node B, and Node C can be seen in Table 4.

[0232] Table 4

[0233] Index(bit) node 1 Node A 2 Node B 3 Node C

[0234] Among them, the bit sequence of node D is 111; node A looks up table 4 and determines that a first field corresponding to node A is the 1st bit in the bit sequence of node D. The value of the 1st bit is 1, that is, node A is a child node of node D. The multicast routing information of node D includes the multicast routing information of node A. If the lengths of the multicast routing information of node A, node B, and node C are all 8 bits, then node A can determine that in the multicast routing information of node D, the 1st 8 bits are the multicast routing information of node A. Similarly, node B looks up table 4 and determines that a first field corresponding to node B is the 2nd bit in the bit sequence. The value of the 2nd bit is 1, that is, node B is a child node of node D. The multicast routing information of node D includes the multicast routing information of node B. In this way, node B can determine that in the multicast routing information of node D, the 2nd 8 bits are the multicast routing information of node B. Similarly, node C looks up table 4 and determines that a first field corresponding to node C is the 3rd bit in the bit sequence. The value of the 3rd bit is 1, that is, node C is a child node of node D. The multicast routing information of node D includes the multicast routing information of node C. In this way, node C can determine that in the multicast routing information of node D, the 3rd 8 bits are the multicast routing information of node C. In addition, the index of the above table 4 can also start from 0, that is, 0, 1, 2, 3, etc., and there is no limit to this.

[0235] In the above method 13, the multicast routing identifier of a node includes a group identifier, and the group identifier is used to indicate the node group corresponding to the node. The nodes in the node group corresponding to a node are all child nodes of the node. Therefore, each non-leaf child node of the node in the multicast tree can determine whether the non-leaf child node is a node in the node group according to the group identifier. If the non-leaf child node is a node in the node group, then determine the position of the non-leaf child node in the node group. Since the node group belongs to the node set corresponding to the non-leaf child node, the position of the non-leaf child node in the node group can be considered as the position of the non-leaf child node in the corresponding node set. Taking the first node as an example, the first node determines that the first node is a node in the node group according to the first group identifier, and determines the position of the first node in the node group, so as to determine the multicast routing information of the first node in the multicast routing information of the second node according to this position.

[0236] Specifically, a node stores a mapping relation table on each non-leaf child node in the multicast tree, and the mapping relation table is used to indicate the correspondence between the above group identifier and the node group indicated by the group identifier. Taking the first node as an example, the first mapping relation table of the first node is used for the correspondence between the first group identifier and the first node group indicated by the first identifier. The first node can look up the first mapping relation table according to the first group identifier in the multicast routing information of the second node, determine that the first node is a node in the first node group, and determine the position of the first node in the first node group. For example, which child node of the first node group the first node is. The position of the first node in the first node group can be used to indicate the position of the multicast routing information of the first node in the multicast routing information of the second node. When the multicast routing information is of the same length, the first node can determine the multicast routing information of the first node according to the position of the multicast routing information of the first node in the multicast routing information of the second node.

[0237] For example, based on Fig.10 the example shown, an example of the mapping relation tables of node A, node B, and node C can be seen in Table 5.

[0238] Table 5

[0239]

[0240] Among them, the group identifier in the multicast routing identifier of node D is identifier 4, and the node group indicated by this identifier 4 includes node A, node B, and node C. Node A looks up Table 5 according to identifier 4, determines that node A is a node in the node group, and is the first node. If the lengths of the multicast routing information of node A, node B, and node C are all 8 bits, then node A can determine that in the multicast routing information of node D, the first 8 bits are the multicast routing information of node A. Similarly, node B looks up Table 5, determines that node B is a node in the node group, and is the second node. Node B can determine that in the multicast routing information of node D, the second 8 bits are the multicast routing information of node B. Similarly, node C looks up Table 5, determines that node C is a node in the node group, and is the third node. Node C can determine that in the multicast routing information of node D, the third 8 bits are the multicast routing information of node C.

[0241] Method 22: The multicast routing information of a node includes the addressing field of the node, and the multicast routing identifier and addressing field of a node are used for the non-leaf child nodes of the node in the multicast tree to determine the multicast routing information of the non-leaf child nodes. Taking the first node as an example, the first node can determine the multicast routing information of the first node according to the multicast routing identifier of the second node and the addressing field of the second node.

[0242] Among them, the addressing field of a node is used to indicate the length of the multicast routing information of the children nodes of the node; alternatively, the addressing field of a node is used to indicate the start position or end position of the multicast routing information of the children nodes of the node; alternatively, the addressing field of a node includes: multiple delimiter fields, and the multicast routing information of the children nodes of the node is separated by the multiple delimiter fields. Taking the second node as an example, the addressing field of the second node is used to indicate the length of the multicast routing information of the children nodes of the second node; alternatively, the addressing field of the second node is used to indicate the start position or end position of the multicast routing information of the children nodes of the second node; alternatively, the addressing field of the second node includes multiple delimiter fields, and the multicast routing information of the children nodes of the second node is separated by the multiple delimiter fields. The following will introduce the above several indication methods of the addressing field respectively.

[0243] In the first design scheme, the addressing field of a node is used to indicate the length of the multicast routing information of the non-leaf children nodes of the node.

[0244] Suppose this node is node 1, and node 1 has M non-leaf children nodes. The addressing field of node 1 may include M - 1 or M fields (this field is denoted as the sixth field), and one sixth field is used to indicate the length of the multicast routing information of one non-leaf child node of node 1 (this length is denoted as Y), and the bit width of this sixth field can be (At this time, the length indicated by this sixth field is the sum of the value of this sixth field and 1), or, (At this time, the length indicated by this sixth field is the value of this sixth field), or, a fixed bit width (for example, 1 byte, 2 bytes). The multicast information of node 1 is as Fig.16 shown. Among them, the recursive unit m represents the (m + 1)-th recursive unit of node 1 (that is, the multicast routing information of the (m + 1)-th non-leaf child node of node 1). The length of the recursive unit m (that is, the length of the multicast routing information of the (m + 1)-th non-leaf child node of node 1) can be denoted as L m . m is an integer greater than or equal to 0 and less than M.

[0245] In some scenarios, the addressing field of node 1 can indicate the lengths of M - 1 recursive units of node 1. The M - 1 recursive units can be any M - 1 recursive units among the M recursive units. In this case, the length of another recursive unit among the M recursive units can be calculated according to the length indicated by the second field. For example, as Fig.16 shown, the M - 1 recursive units are recursive units 0 to recursive unit M - 2, that is, the addressing field of node 1 indicates L0, L1, …, L M-2 . In this case, if the second field indicates the length of the multicast routing information of node 1 (denoted as the total length 1), the length of recursive unit M - 1 = total length 1 - (L0 + L1 + … + L M-2) - Length of the multicast routing identifier - Length of the addressing field. If the second field indicates the total length of M recursive units (denoted as total length 2), the length of recursive unit M - 1 = total length 2 - (L0 + L1 + … + L M-2 ).

[0246] In some other scenarios, such as Fig.16 shown, the addressing field of node 1 can indicate the lengths of M recursive units of node 1, that is, the addressing field of node 1 indicates L0, L1, …, L M-1 .

[0247] Assume that the non - leaf child node of node 1 is node 2. Node 2 can determine the starting position of recursive unit 0 based on the second field, the multicast routing identifier, and the length of the addressing field, and then determine the starting position and / or ending position of each recursive unit according to the lengths of the respective recursive units, that is, determine the positions of each recursive unit. The positions mentioned in this application can be an offset relative to the starting position of the multicast information, or an offset relative to some other position in the multicast message. Exemplarily, based on Fig.16 the example shown, taking the addressing field of node 1 indicating the lengths of M recursive units of node 1, the second field indicating total length 1, and the starting position of the recursive unit being an offset relative to the starting position of the multicast information as an example, the starting position of recursive unit m is denoted as offset m , and the starting positions of the respective recursive units are as shown in Table 6.

[0248] Table 6

[0249]

[0250]

[0251] In the second design scheme, the addressing field of a node is used to indicate the starting position or ending position of the multicast routing information of the child nodes of that node.

[0252] Assume that this node is node 1 and node 1 has M non - leaf child nodes. The addressing field of node 1 can include M - 1 or M fields (this field is denoted as the sixth field), and one sixth field is used to indicate the starting position or ending position of the multicast routing information of one non - leaf child node of node 1. The sixth field can be a fixed number of bits (for example, 4 bits) or a fixed number of bytes (for example, 1 byte). For the convenience of description, in the following, the first design scheme is described by taking the sixth field as being used to indicate the starting position as an example. The principle of the sixth field being used to indicate the ending position is similar and can be understood by reference. Fig.17 in (a) or Fig.17 in (b) or Fig.17as shown in (c) thereof. The starting position of the recursive unit m (i.e., the starting position of the multicast routing information of the (m + 1)-th non-leaf child node of node 1) can be denoted as O m . In the second design scheme, the length of the recursive unit M - 1 can be calculated from the length indicated by the second field. The calculation method is similar to that of the first design scheme and can be understood by reference, so details are not repeated here. Alternatively, the length of the recursive unit M - 1 can also be explicitly indicated by a field (denoted as the seventh field). In this case, the second field may or may not exist. If the second field does not exist, the seventh field can be located at the position of the second field or at other positions, which is not limited in this application. For the sake of convenience of description, hereinafter, the case where there is no second field when there is a seventh field and the seventh field is located at the position of the second field is taken as an example for illustration.

[0253] The second design scheme can be implemented by the following method a or method b.

[0254] Method a: The addressing field of node 1 indicates the starting positions of the M - 1 recursive units of node 1.

[0255] Among them, the M - 1 recursive units can be recursive units 1 to recursive units M - 1, that is, the addressing field of node 1 indicates O1, O2, …, O M-1 . For the first possible implementation manner of method a, see Fig.17 in (a), the addressing field of node 1 indicates O1, O2, …, O M-1 . For the second possible implementation manner of method a, see Fig.17 in (b), there is a sixth field before and adjacent to each recursive unit, and this sixth field is used to indicate the starting position of the next recursive unit.

[0256] Assume that the non-leaf child node of node 1 is node 2. Node 2 can determine the starting position of the recursive unit 0 according to the second field (or the seventh field), the multicast routing identifier, and the length of the addressing field, determine the starting positions of the recursive units 1 to recursive units M - 1 according to the addressing field, and the lengths of the recursive units 0 to recursive units M - 2, and then determine the length of the recursive unit M - 1 according to the second field (or the seventh field), that is, determine the positions of each recursive unit. The positions mentioned in this application are similar to those of the first design scheme and can be understood by reference, so details are not repeated here. Exemplarily, based on Fig.17 the example shown in (b), taking the length of the recursive unit M - 1 being determined according to the seventh field as an example, the starting positions and lengths of each recursive unit are shown in Table 7.

[0257] Table 7

[0258]

[0259] In Mode b, the addressing field of Node 1 indicates the starting position of M recursive units of Node 1.

[0260] Among them, the addressing field of Node 1 indicates O0, O1, …, O M-1 . In this case, assuming that the non-leaf child node of Node 1 is Node 2, Node 2 can determine the starting positions of recursive units 0 to M - 1, and the lengths of recursive units 0 to M - 2 according to the addressing field, and then determine the length of recursive unit M - 1 according to the second field or the seventh field, that is, determine the positions of each recursive unit. The positions mentioned in this application are similar to the first design scheme and can be understood by reference and will not be elaborated. Exemplarily, based on Fig.17 the example shown in (c) in, taking the length of recursive unit M - 1 determined according to the seventh field as an example, the starting positions and lengths of each recursive unit can be as shown in Table 8.

[0261] Table 8

[0262] Recursive Unit The starting position of the recursive unit Length of the recursive unit Recursive Unit 0 <![CDATA[O0]]> <![CDATA[O1 - O0]]> Recursive Unit 1 <![CDATA[O1]]> <![CDATA[O2 - O1]]> … … … Recursive unit M-1 <![CDATA[O M-1 > The seventh field indicates

[0263] In the third design scheme, the addressing field of a node includes multiple delimiter fields, and the multicast routing information of the non-leaf child nodes of this node is separated by multiple delimiter fields.

[0264] Among them, assuming that this node is Node 1, and Node 1 has M non-leaf child nodes. The addressing field of Node 1 can include M - 1 delimiter fields, and the length of the delimiter field can be pre-configured. The multicast information of Node 1 can be seen in Fig.18 . There can be a delimiter field between every two recursive units. In this case, the length of recursive unit M - 1 can be calculated from the length indicated by the first field, and the calculation method is similar to the first design scheme and can be understood by reference and will not be elaborated. Or, the length of recursive unit M - 1 can also be explicitly indicated by a field (denoted as the seventh field). At this time, the second field may or may not exist. If the second field does not exist, the seventh field can be located at the position of the second field or at other positions, which is not limited in this application. For the convenience of description, in the following, an example is given where there is no second field when there is a seventh field, and the seventh field is located at the position of the second field.

[0265] Assuming that the non-leaf child node of Node 1 is Node 2, Node 2 can determine the starting position of recursive unit 0 according to the second field (or the seventh field) and the length of the multicast routing identifier, determine the starting positions of recursive units 1 to M - 1 according to the delimiter field, and the lengths of recursive units 0 to M - 2, and then determine the length of recursive unit M - 1 according to the second field (or the seventh field), that is, determine the positions of each recursive unit. The positions mentioned in this application are similar to the first design scheme and can be understood by reference and will not be elaborated. Exemplarily, based on Fig.18 Taking the example shown, where the starting position of the recursive unit is the offset relative to the starting position of the multicast information and the length of the recursive unit M-1 is determined according to the sixth field, the starting position of the recursive unit m is denoted as offset m , the starting positions and lengths of each recursive unit can be as shown in Table 9.

[0266] Table 9

[0267]

[0268] Taking the first node as an example, according to the introduction of the above method 21, it can be known that the first node can determine its position in the first node set, that is, determine which multicast routing information of the first node is in the multicast routing information of the second node, or which recursive unit of the first node is in all the recursive units of the second node. Moreover, combined with the introduction of the addressing field above, the first node can determine the position of each recursive unit according to the addressing field of the second node. In this way, the first node can determine the recursive unit of the first node, that is, the multicast routing information of the first node.

[0269] Combined with the introduction of the above method 21 and method 22, it can be understood that if the lengths of the multicast routing information of each non-leaf child node of the second node are the same, the first node can also determine the multicast routing information of the first node only according to the position of the first node in the first node set. In this case, the multicast routing information of the second node may not include the addressing field of the second node to save communication overhead and improve communication efficiency. However, if the multicast routing information of the second node includes the addressing field of the second node, the first node can determine the multicast routing information of the first node regardless of whether the lengths of the multicast routing information of each non-leaf child node of the second node are the same, so that the lengths of the multicast routing information of each non-leaf child node can be flexibly set to apply to more scenarios.

[0270] After the first node determines the multicast routing information of the first node, it can generate a second message according to the multicast routing information of the first node. Or, after the first node determines the multicast routing information of the first node, it can further determine the multicast routing information of the third node and generate a second message according to the multicast routing information of the third node. In this way, the first node can send the second message to the third node. Among them, for determining the multicast routing information of the third node, reference can be made to the relevant introduction of determining the multicast routing information of the first node above, which will not be elaborated here.

[0271] Optionally, combined with the above embodiments, in the first application scenario, such as Fig.19As shown, the first node and the second node are nodes within the first network. The first message further includes: a third header and a fourth header; the third header includes: the multicast routing information of the second node, and optionally, may also include the multicast information of the second node; the fourth header includes: the unicast / multicast information of the third network. The first network is different from the third network. The first network or the third network may be a complete network or a sub-network within a complete network, and there is no limitation in this regard. The specific implementation of the first network and the third network may refer to the relevant introduction in "6. Network" above and will not be elaborated here. The unicast / multicast information of the third network may include any one of the following: IP unicast / multicast information, MPLS label information, or bit string information, and there is no limitation in this regard. That is to say, when the first message sent by the second node to the first node is not directly sent to the first node and needs to be forwarded by an ordinary node, the second node needs to encapsulate the header of the unicast / multicast information supported by the network where the ordinary node is located in the first message, that is, the fourth header including the unicast / multicast information of the third network. The fourth header may be the outermost header of the first message to enable the ordinary node to identify and forward the first message. Among them, when the second node encapsulates the unicast / multicast information of the third network, it is outside the third header and continues to encapsulate the fourth header including the unicast / multicast information of the third network without stripping the third header. Whether the second node can understand or recognize the unicast / multicast information of the third network is not limited. Whether the second node can understand the unicast / multicast information of the third network does not affect the second node's encapsulation of the unicast / multicast information of the third network.

[0272] Optionally, the first node and / or the second node may also be nodes within the third network and may be edge nodes within the third network. In other words, the first node and / or the second node are both new multicast nodes that support the forwarding of multicast routing information and ordinary nodes that support the forwarding of unicast / multicast information. Therefore, during deployment, new multicast can be enabled on ordinary nodes to make the ordinary nodes become new multicast nodes that support the forwarding of multicast routing information, thereby eliminating the need to separately deploy new multicast nodes to further reduce the deployment cost.

[0273] Exemplarily, the second node stores a first forwarding table, and the first forwarding table records the correspondence between the multicast routing identifier of the second node and the unicast / multicast information of the third network. The second node may encapsulate the fourth header in the first message according to the first forwarding table, which will be specifically introduced below.

[0274] In Mode 31, the unicast / multicast information of the third network is IP unicast information, and the first forwarding table records the correspondence between the multicast routing identifier of the second node and the IP unicast information of the third network. It can be understood that there are three implementation methods for the multicast routing identifier of the second node, namely the above-mentioned Mode 11, Mode 12, and Mode 13, which will be introduced below in combination with these three modes.

[0275] In the above-mentioned Mode 11, the multicast routing identifier of a node includes a Cnt field and X Idx fields. Taking the second node as an example, the Cnt field in the multicast routing identifier of the second node is used to indicate the number of child nodes of the second node, and one Idx field in the multicast routing identifier of the second node is used to indicate the identifier of a corresponding child node. The Idx field and X Cnt fields are used to indicate that the first packet needs to be sent to these X child nodes. On this basis, the first forwarding table can record the correspondence between the Cnt field, the IP unicast information of the child nodes, and the outgoing port. The second node can search the first forwarding table according to the multicast routing identifier of the second node to determine the corresponding X IP unicast information and outgoing port. The second node can copy the packet X times, encapsulate a fourth header including the corresponding IP unicast information in each packet to obtain X first packets. In this way, the second node can send a corresponding first packet to each child node (including the first node) through the outgoing port corresponding to each of the X first packets.

[0276] For example, based on Fig. 20 the example shown, nodes A - H (solid nodes) are nodes within the multicast tree, that is, nodes within Network 1. There are also 4 ordinary nodes, that is, nodes not within the multicast tree, namely nodes R1, R2, R3, and R4 (dashed nodes) between node D and nodes A - C. Nodes R1 - R4 are nodes within Network 2. Any one of nodes A - D can be a node within Network 2 or not. An example of the first forwarding table of node D is shown in Table 10.

[0277] Table 10

[0278] Idx field IP Unicast Information port 10 10.1.1.1 Port 1 11 10.1.1.2 Port 2 01 10.1.1.3 Port 2

[0279] Among them, the multicast routing identifier of node D is 11101101. In the multicast routing identifier of node D, the value of the Cnt field is 11, the value of the first Idx field is 10, the value of the second Idx field is 11, and the value of the third Idx field is 01. Node D determines that it needs to search Table 10 according to the value of 11 in the Cnt field. Node D searches Table 10 according to the value of 10 in the first Idx field, and determines that the IP unicast information corresponding to the first Idx field is the IP unicast address 10.1.1.1, and the corresponding port is port 1. Node D can encapsulate an outer header including the IP unicast address 10.1.1.1 in the packet (denoted as unicast packet 1), and send unicast packet 1 to node A through port 1. Node D searches Table 10 according to the value of 11 in the second Idx field, and determines that the IP unicast information corresponding to the second Idx field is the IP unicast address 10.1.1.2, and the corresponding port is port 2. Node D can encapsulate an outer header including the IP unicast address 10.1.1.2 in the packet (denoted as unicast packet 2), and send unicast packet 1 to node B through port 2. Node D searches Table 10 according to the value of 01 in the third Idx field, and determines that the IP unicast information corresponding to the third Idx field is the IP unicast address 10.1.1.3, and the corresponding port is port 2. Node D can encapsulate an outer header including the IP unicast address 10.1.1.3 in the packet (denoted as unicast packet 3), and send unicast packet 1 to node C through port 2.

[0280] In the above method 12, the bit sequence of a node includes N first fields, where N is the number of nodes in the node set corresponding to the node. One first field is used to indicate whether the node needs to send a packet to a potential child node corresponding to the first field. For example, if the value of the first field is 1, it is used to indicate that the node needs to send a packet to a potential child node corresponding to the first field; if the value of the first field is 0, it is used to indicate that the node does not need to send a packet to a potential child node corresponding to the first field. Taking the second node as an example, one first field is used to indicate whether the second node needs to send a second packet to a potential child node corresponding to the first field. On this basis, the first forwarding table can record the correspondence between the first field, the IP unicast information of the potential child node, and the output port. The second node can search the first forwarding table according to the bit sequence of the second node to determine the corresponding IP unicast information and output port. The second node can copy the packet into the corresponding number of copies according to the number of IP unicast information, and encapsulate a fourth header including a corresponding IP unicast information in each packet, so as to obtain the corresponding number of third packets. In this way, the second node can send a corresponding third packet to each potential child node (including the first node) through an output port corresponding to each third packet.

[0281] For example, based on Fig. 20 In the example shown, an example of the first forwarding table of node D can be as shown in Table 11.

[0282] Table 11

[0283]

[0284]

[0285] Among them, the bit sequence of node D is 111. For node A, a first field corresponding to it is the 1st bit in the bit sequence 111, that is, the bit with index 1 in Table 11. For node B, a first field corresponding to it is the 2nd bit in the bit sequence 111, that is, the bit with index 2 in Table 11. For node C, a first field corresponding to it is the 3rd bit in the bit sequence 111, that is, the bit with index 3 in Table 11. For node D, since the value of the 1st bit in the bit sequence 111 is 1, node D looks up Table 11 according to the 1st bit and determines that the IP unicast information corresponding to the 1st bit is the IP unicast address 10.1.1.1 and the corresponding port is port 1. Node D can encapsulate an outer header including the IP unicast address 10.1.1.1 in the packet (denoted as unicast packet 1) and send unicast packet 1 to node A through port 1. Since the value of the 2nd bit in the bit sequence 111 is 1, node D looks up Table 11 according to the 2nd bit and determines that the IP unicast information corresponding to the 1st bit is the IP unicast address 10.1.1.2 and the corresponding port is port 2. Node D can encapsulate an outer header including the IP unicast address 10.1.1.2 in the packet (denoted as unicast packet 2) and send unicast packet 2 to node B through port 2. Since the value of the 3rd bit in the bit sequence 111 is 1, node D looks up Table 11 according to the 3rd bit and determines that the IP unicast information corresponding to the 3rd bit is the IP unicast address 10.1.1.3 and the corresponding port is port 2. Node D can encapsulate an outer header including the IP unicast address 10.1.1.3 in the packet (denoted as unicast packet 3) and send unicast packet 3 to node C through port 2.

[0286] In the above-mentioned Method 13, the multicast routing identifier of a node includes a group identifier, which is used to indicate the node group corresponding to the node. Taking the second node as an example, the first group identifier in the multicast routing identifier of the second node is used to indicate the first node group, and indicates that the first message needs to be sent to the first node group, that is, to the nodes (including the first node) in the first node group. On this basis, the first forwarding table can record the correspondence between the group identifier, the IP unicast information of each node in the node group, and the outgoing port. The second node can look up the first forwarding table according to the first group identifier in the multicast routing identifier of the second node to determine the corresponding IP unicast information and outgoing port. The second node can copy the message into the corresponding number of copies according to the number of pieces of IP unicast information, and encapsulate a fourth header including a corresponding piece of IP unicast information in each copy of the message, so as to obtain the corresponding number of first messages. In this way, the second node can send a corresponding copy of the first message to each node (including the first node) in the first node group through an outgoing port corresponding to each first message.

[0287] For example, based on Fig. 20 the example shown, an example of the first forwarding table of node D can be as shown in Table 12.

[0288] Table 12

[0289]

[0290] Among them, the group identifier in the multicast routing identifier of node D is identifier 4. Node D looks up Table 12 according to identifier 4 and determines that the IP unicast information corresponding to identifier 4 includes IP unicast address 10.1.1.1, IP unicast address 10.1.1.2, and IP unicast address 10.1.1.3, and the corresponding ports include port 0 and port 1. Node D can encapsulate an outer header including IP unicast address 10.1.1.1 in the message (denoted as unicast message 1) and send unicast message 1 to node A through port 1. Node D can encapsulate an outer header including IP unicast address 10.1.1.2 in the message (denoted as unicast message 2) and send unicast message 2 to node B through port 2. Node D can encapsulate an outer header including IP unicast address 10.1.1.3 in the message (denoted as unicast message 3) and send unicast message 3 to node C through port 2.

[0291] In Method 32, the unicast / multicast information of the third network is IP multicast information, and the first forwarding table records the correspondence between the multicast routing identifier of the second node and the IP multicast information of the third network. It can be understood that there are three implementation methods for the multicast routing identifier of the second node, namely the above-mentioned Method 11, Method 12, and Method 13. The following will be introduced in combination with these three methods.

[0292] In Mode 11, the multicast routing identifier of the second node as a whole can be recorded in the first forwarding table, that is, including the Cnt field, X Idx fields, the IP multicast information, and the corresponding relationship of the output port, to indicate that the first packet needs to be sent to the multicast group corresponding to the IP multicast information (including the first node). The second node can look up the first forwarding table based on the multicast routing identifier of the second node to determine the corresponding IP multicast information and output port. The second node can encapsulate a fourth header including the IP multicast information in the packet to obtain the first packet. The second node can send the first packet to the multicast group (including the first node) through the output port corresponding to the first packet.

[0293] For example, based on Fig. 20 the example shown, an example of the first forwarding table of Node D can be as shown in Table 13.

[0294] Table 13

[0295] Idx field + X Idx fields IP Multicast Information port 11101101 224.1.1.1 Port 1, Port 2

[0296] Among them, the multicast routing identifier of Node D is 11101101. Node D looks up Table 13 based on the multicast routing identifier 11101101 to determine that the corresponding IP multicast information is the IP multicast address 224.1.1.1, and the corresponding port is Port 1. Node D can encapsulate the IP multicast address 224.1.1.1 into the outer header of the packet (denoted as multicast packet 1), and send multicast packet 1 to the multicast group (including Node A, Node B, and Node C) through Port 1 and Port 2.

[0297] In Mode 12, the corresponding relationship between the bit sequence of the second node, the IP multicast information, and the output port can be recorded in the first forwarding table, to indicate that the first packet needs to be sent to the multicast group corresponding to the IP multicast information (including the first node). The second node can look up the first forwarding table based on the bit sequence of the second node to determine the corresponding IP multicast information and output port. The second node can encapsulate a fourth header including the IP multicast information in the packet to obtain the first packet. The second node can send the first packet to the multicast group (including the first node) through the output port corresponding to the first packet.

[0298] For example, based on Fig. 20 the example shown, an example of the first forwarding table of Node D can be as shown in Table 14.

[0299] Table 14

[0300] bit sequence IP Multicast Information port 111 224.1.1.1 Port 1, Port 2

[0301] Among them, the bit sequence of node D is 111. Node D looks up Table 14 according to the bit sequence 111, determines that the corresponding IP multicast information is the IP multicast address 224.1.1.1, and the corresponding port is port 1. Node D can encapsulate the IP multicast address 224.1.1.1 into the outer header of the packet (denoted as multicast packet 1), and send multicast packet 1 to the multicast group (including node A, node B, and node C) through port 1 and port 2.

[0302] In the above method 13, the first forwarding table can record the correspondence between the group identifier, the IP multicast information, and the output port, to indicate that the packet needs to be sent to the multicast group (including the first node) corresponding to the IP multicast information. The second node can look up the first forwarding table according to the first group identifier in the multicast routing identifier of the second node, and determine the corresponding IP multicast information and output port. The second node can encapsulate a fourth header including the IP multicast information in the packet, thereby obtaining the first packet. The second node can send the first packet to the multicast group (including the first node) through the output port corresponding to the first packet.

[0303] For example, based on Fig. 20 In the example shown, an example of the first forwarding table of node F can be as shown in Table 15.

[0304] Table 15

[0305] Group ID IP Multicast Information port Logo 4 224.1.1.1 Port 1, Port 2 Logo 5 224.1.1.2 Port 2

[0306] Among them, the group identifier in the multicast routing identifier of node D is identifier 4. Node D looks up Table 15 according to identifier 4, determines that the corresponding IP multicast information is the IP multicast address 224.1.1.1, and the corresponding port is port 1. Node D can encapsulate the IP multicast address 224.1.1.1 into the outer header of the packet (denoted as multicast packet 1), and send multicast packet 1 to the multicast group (including node A, node B, and node C) through port 1 and port 2.

[0307] In method 33, the unicast / multicast information of the third network is MPLS label information, and the first forwarding table records the correspondence between the multicast routing identifier of the second node and the MPLS label information. It can be understood that there are three implementation methods for the multicast routing identifier of the second node, namely the above method 11, method 12, and method 13. The following is an introduction in combination with these three methods.

[0308] In the above method 11, the first forwarding table can record the entire multicast routing identifier of the second node, that is, including the Cnt field and X Idx fields, the MPLS label information, and the correspondence with the output port. The specific implementation is similar to the above method 32, and can be understood by referring to method 32, and will not be elaborated here.

[0309] For example, based on Fig. 20 In the example shown, an example of the first forwarding table of node D can be as shown in Table 16.

[0310] Table 16

[0311]

[0312] Among them, the multicast routing identifier of node D is 11101101. Node D looks up Table 16 according to the multicast routing identifier 11101101, and determines that the corresponding label list includes MPLS label 100, MPLS label 001, and MPLS label 101, and the corresponding ports include port 1 and port 2. Node D can encapsulate MPLS label 100 into the outer header of the packet (denoted as tunnel packet 1), and send tunnel packet 1 to node A through port 1. Node D can encapsulate MPLS label 001 into the outer header of the packet (denoted as tunnel packet 2), and send tunnel packet 2 to node B through port 2. Node D can encapsulate MPLS label 101 into the outer header of the packet (denoted as tunnel packet 3), and send tunnel packet 3 to node C through port 2.

[0313] In the above method 12, the bit sequence of the second node, the MPLS label information, and the corresponding relationship of the outgoing port can be recorded in the first forwarding table. The specific implementation is similar to the above method 32 and can be understood by referring to method 32, so it will not be elaborated here.

[0314] For example, based on Fig. 20 In the example shown, an example of the first forwarding table of node D can be as shown in Table 17.

[0315] Table 17

[0316]

[0317] Among them, the bit sequence of node D is 111. Node D looks up Table 17 according to the bit sequence 111, and determines that the corresponding label list includes MPLS label 100, MPLS label 001, and MPLS label 101, and the corresponding ports include port 1 and port 2. Node D can encapsulate MPLS label 100 into the outer header of the packet (denoted as tunnel packet 1), and send tunnel packet 1 to node A through port 1. Node D can encapsulate MPLS label 001 into the outer header of the packet (denoted as tunnel packet 2), and send tunnel packet 2 to node B through port 2. Node D can encapsulate MPLS label 101 into the outer header of the packet (denoted as tunnel packet 3), and send tunnel packet 3 to node C through port 2.

[0318] In the above-mentioned Method 13, the first forwarding table may record the correspondence relationships among the group identifier, MPLS label information, and the outgoing port. The specific implementation is similar to that of the above-mentioned Method 32 and can be understood by referring to Method 32, so it will not be elaborated here.

[0319] For example, based on Fig. 20 the example shown, an example of the first forwarding table of Node D can be as shown in Table 18.

[0320] Table 18

[0321]

[0322] Among them, the group identifier in the multicast routing identifier of Node D is Identifier 4. Node D searches Table 18 according to Identifier 4 and determines that the corresponding label list includes MPLS label 100, MPLS label 001, and MPLS label 101, and the corresponding ports include Port 1 and Port 2. Node D can encapsulate MPLS label 100 into the outer header of the packet (denoted as Tunnel Packet 1) and send Tunnel Packet 1 to Node A through Port 1. Node D can encapsulate MPLS label 001 into the outer header of the packet (denoted as Tunnel Packet 2) and send Tunnel Packet 2 to Node B through Port 2. Node D can encapsulate MPLS label 101 into the outer header of the packet (denoted as Tunnel Packet 3) and send Tunnel Packet 3 to Node C through Port 2.

[0323] In Method 34, the unicast / multicast information of the third network is bit string information, that is, the third network supports BIER multicast, and the first forwarding table records the correspondence relationship between the multicast routing identifier of the second node and the MPLS label information. It can be understood that there are three implementation methods for the multicast routing identifier of the second node, namely the above-mentioned Method 11, Method 12, and Method 13. These three methods will be introduced below.

[0324] In the above-mentioned Method 11, the first forwarding table may record the entire multicast routing identifier of the second node, that is, including the Cnt field, X Idx fields, bit string information, and the correspondence relationship with the neighbor device. The second node can search the first forwarding table according to the multicast routing identifier of the second node to determine the corresponding bit string information and neighbor device. The second node can encapsulate a fourth header including the bit string information in the packet to obtain the first packet. The second node can send the first packet to the first node through the outgoing port corresponding to the neighbor device.

[0325] For example, based on Fig. 20 the example shown, an example of the first forwarding table of Node D can be as shown in Table 19.

[0326] Table 19

[0327]

[0328] Among them, the multicast routing identifier of node D is 11101101. Node D looks up Table 19 according to the multicast routing identifier 11101101, and determines that the corresponding bit string information includes bit string information 100 and bit string information 011. Among them, the neighbor device corresponding to the bit string information 100 is node R2, indicating that the multicast packet sent to node A needs to pass through node R2, and the neighbor device corresponding to the bit string information 011 is node R1, indicating that the multicast packets sent to node B and node C need to pass through node R1. Node D can encapsulate the bit string information 100 into a packet (denoted as multicast packet 2), and send the multicast packet 2 through the port corresponding to node R2. Node D can encapsulate the bit string information 0011 into two packets respectively (denoted as multicast packet 3 and multicast packet 4), and send the multicast packet 3 and the multicast packet 4 through the port corresponding to node R1.

[0329] In the above method 12, the first forwarding table can record the correspondence between the bit sequence of the second node, the bit string information, and the neighbor device. The second node can look up the first forwarding table according to the bit sequence of the second node to determine the corresponding bit string information and neighbor device. The second node can encapsulate a fourth header including the bit string information in the packet to obtain a first packet. The second node can send the first packet to the first node through the outgoing port corresponding to the neighbor device.

[0330] For example, based on Fig. 20 the example shown, an example of the first forwarding table of node D can be as shown in Table 20.

[0331] Table 20

[0332]

[0333] Among them, the bit sequence of node D is 0111. Node D looks up Table 20 according to the bit sequence 111, and determines that the corresponding bit string information includes bit string information 100 and bit string information 011. Node D can encapsulate the bit string information 100 into a packet (denoted as multicast packet 2), and send the multicast packet 2 through the port corresponding to node R2. Node D can encapsulate the bit string information 011 into two packets respectively (denoted as multicast packet 3 and multicast packet 4), and send the multicast packet 3 and the multicast packet 4 through the port corresponding to node R1.

[0334] In the above method 13, the first forwarding table can record the correspondence between the group identifier, the bit string information, and the neighbor device. The second node can look up the first forwarding table according to the first group identifier in the multicast routing identifier of the second node to determine the corresponding bit string information and neighbor device. The second node can encapsulate a fourth header including the bit string information in the packet to obtain a first packet. The second node can send the first packet to the first node through the outgoing port corresponding to the neighbor device.

[0335] For example, based on Fig. 20 the example shown, an example of the first forwarding table of node E can be as shown in Table 21.

[0336] Table 21

[0337]

[0338] Among them, the group identifier in the multicast routing identifier of node D is identifier 4. Node D looks up Table 21 according to identifier 4 and determines that the corresponding bit string information includes bit string information 100 and bit string information 011. Node D can encapsulate bit string information 100 into a message (denoted as multicast message 2) and send multicast message 2 through the port corresponding to node R2. Node D can encapsulate bit string information 011 into two messages respectively (denoted as multicast message 3 and multicast message 4) and send multicast message 3 and multicast message 4 through the port corresponding to node R1.

[0339] It can be understood that the above Tables 19 - 21 are only examples and are not restrictive. For example, the item of neighbor device in Tables 19 - 21 can be configured as the corresponding outgoing port, that is, node E can directly send multicast messages through the outgoing port without perceiving or configuring the topology relationship of ordinary nodes.

[0340] Combined with the above Method 31 - Method 34, it can be seen that from the perspective of message forwarding, by encapsulating unicast / multicast information, cross - network forwarding of the first message can be achieved, making the forwarding no longer restricted. From the perspective of device deployment, the new multicast nodes, that is, the first node and the second node, can be deployed mixedly with ordinary nodes. For example, the new multicast nodes can be deployed in small batches in an interspersed manner among ordinary nodes, thereby reducing the number of new multicast nodes deployed to reduce the deployment difficulty and cost.

[0341] Optionally, combined with the above embodiments, in the second application scenario, as Fig.21As shown, the first node and the third node are nodes within the first network. The second message may further include: a first header and a second header. The first header includes: the multicast routing information of the above-mentioned third node, or the multicast routing information of the above-mentioned first node. The second header includes: the unicast / multicast information of the second network. The unicast / multicast information of the second network may include any one of the following: IP unicast / multicast information, MPLS label information, or bit string information, and is not limited thereto. That is to say, when the second message sent by the first node to the third node is not directly sent to the third node and needs to be forwarded by an ordinary node, the first node needs to encapsulate the header of the unicast / multicast information supported by the network where the ordinary node is located in the second message, that is, the second header including the unicast / multicast information of the second network. The second header may be the outermost header of the second message so that the ordinary node can identify and forward the second message. Among them, the second network and the third network may be the same or different. The second network or the third network may be a complete network or a sub-network within a complete network, and is not limited thereto. The specific implementation of the second network and the third network may refer to the relevant introduction in the above "6. Network" and will not be elaborated here. The first node encapsulates the unicast / multicast information of the second network outside the first header and continues to encapsulate the second header including the unicast / multicast information of the second network, without stripping the first header. Whether the first node can understand or recognize the unicast / multicast information of the second network, or cannot understand the unicast / multicast information of the second network, is not limited. Whether the first node can understand the unicast / multicast information of the second network does not affect the first node's encapsulation of the unicast / multicast information of the second network.

[0342] Optionally, the first node and / or the third node may also be nodes within the second network and may be edge nodes within the second network. In other words, the first node and / or the third node are both new multicast nodes that support the forwarding of multicast routing information and ordinary nodes that support the forwarding of unicast / multicast information. Therefore, during deployment, new multicast can be enabled on ordinary nodes to make the ordinary nodes become new multicast nodes that support the forwarding of multicast routing information, thereby eliminating the need to separately deploy new multicast nodes to further reduce the deployment cost. It should be noted that if the first node is both a node within the second network and a node within the third network, then in the case where the second network and the third network are different, the first node is a node belonging to multiple networks and can thus be called a shared node. If the first node is a node within the second network or the third network, then for the difference between the second network and the third network, the first node is a node belonging to a single network and can thus be called an exclusive node.

[0343] Exemplarily, the first node stores a second forwarding table, in which the correspondence between the multicast routing identifier of the first node and the unicast / multicast information of the second network is recorded. The first node may encapsulate a second header in the second packet according to the second forwarding table. Among them, the implementation principle of the first node encapsulating the second header in the second packet according to the second forwarding table is similar to the above-mentioned methods 31-34, and can be understood with reference to methods 31-34, which will not be elaborated here.

[0344] For example, based on Fig. 20 In the shown example, there is also one ordinary node between node A and node E, which is node R5 and belongs to the nodes in network 3. There is also one ordinary node between node A and node F, which is node R6 and belongs to the nodes in network 4. There is also one ordinary node between node B and node H, which is node R7 and belongs to the nodes in network 5. Network 2, network 3, network 4, and network 5 may be the same network or different networks, and there is no limitation in this regard. Node A and node E may or may not be the nodes in network 3; node A and node F may or may not be the nodes in network 4; node B and node H may or may not be the nodes in network 5, and there is no limitation in this regard. In this case, the principle of node A forwarding packets to node E and node F, and node B forwarding packets to node H is similar to that of the above-mentioned node D, and can be understood with reference to the above-mentioned methods 31-34, and will not be elaborated.

[0345] Optionally, in combination with the above embodiments, in the third application scenario, the first node may also be a leaf child node of the second node. In this case, the first node may also generate a third packet according to the first packet and send the third packet to the first device. Among them, the third packet includes: the unicast / multicast information of the first device, that is, the third packet may be a unicast packet or a multicast packet. The unicast / multicast information of the first device may include any one of the following: IP unicast / multicast information, MPLS label information, or bit string information. That is to say, the first device is not a node within the multicast tree. If a packet needs to be sent to the first device, the first node needs to encapsulate the unicast / multicast information supported by the network where the first device is located in the packet to achieve cross-network forwarding, send the packet from the network where the first node and the second node are located to the network where the first device is located, and finally send it to the first device. Whether the first node can understand or recognize the unicast / multicast information supported by the network where the first device is located, or whether the first node cannot understand the unicast / multicast information supported by the network where the first device is located, does not affect the first node's encapsulation of the unicast / multicast information supported by the network where the first device is located. There are two ways for the first node to encapsulate the unicast / multicast information supported by the network where the first device is located in the packet, which are method 41 and method 42 respectively, and will be specifically introduced below.

[0346] Method 41:

[0347] In the first message, the multicast routing information of the second node includes the multicast routing identifier of the first node. The first node stores a third forwarding table, in which the corresponding relationship between the multicast routing identifier of the first node and the unicast / multicast information of the first device is recorded. The first node can generate a third message according to the third forwarding table.

[0348] In the first implementation, the unicast / multicast information of the first device is IP unicast information, and the corresponding relationship between the multicast routing identifier of the first node and the IP unicast information is recorded in the third forwarding table. It can be understood that there are three implementation methods for the multicast routing identifier of the first node, namely the above-mentioned Method 11, Method 12, and Method 13. These three methods will be introduced below.

[0349] In the above-mentioned Method 11, the multicast routing identifier of a node includes a Cnt field and X Idx fields. At this time, for a leaf child node, the Cnt field in the multicast routing identifier of the leaf child node can be used to indicate the number of devices downstream of the leaf child node, and one Idx field in the multicast routing identifier of the leaf child node is used to indicate the identifier of a corresponding device. The Idx field and X Cnt fields are used to cooperate to indicate that the message needs to be sent to these X downstream devices. Taking the first node as an example, the Cnt field in the multicast routing identifier of the first node is used to indicate the number of the first devices, and one Idx field in the multicast routing identifier of the first node is used to indicate the identifier of a corresponding first device. The Idx field and X Cnt fields are used to indicate that the third message needs to be sent to these X first devices. On this basis, the corresponding relationship between the Cnt field, the IP unicast information of the first device, and the output port can be recorded in the third forwarding table. The first node can search the third forwarding table according to the multicast routing identifier of the first node to determine the corresponding X IP unicast information and output ports. As Fig. 22 shown, the first node can strip the multicast information of the second node in the second message to obtain the stripped message. The first node can copy the stripped message X times, and encapsulate each IP unicast information into the IP header of a corresponding copy of the message to obtain X third messages. In this way, the first node can send a corresponding copy of the third message to each first device through the output ports corresponding to the X third messages.

[0350] For example, based on Fig. 20 the example shown, an example of the third forwarding table of node C can be as shown in Table 22.

[0351] Table 22

[0352] Idx field IP Unicast Information port 1 10.1.1.4 Port 1 0 10.1.1.5 Port 2

[0353] Among them, the multicast routing identifier of node C is 110. In the multicast routing identifier of node C, the value of the Cnt field is 1, the value of the first Idx field is 1, and the value of the second Idx field is 0. Node C determines that it needs to search for Table 10 based on the value of 1 in the Cnt field. Node C searches for Table 22 based on the value of 1 in the first Idx field, and determines that the IP unicast information corresponding to the first Idx field is the IP unicast address 10.1.1.4 and the corresponding port is Port 1. Node C can strip the multicast information of node D in the packet, encapsulate the IP unicast address 10.1.1.4 into the IP header of the packet (denoted as unicast packet 4), and send unicast packet 4 to Device 1 through Port 1. Node C searches for Table 22 based on the value of 0 in the second Idx field, and determines that the IP unicast information corresponding to the second Idx field is the IP unicast address 10.1.1.5 and the corresponding port is Port 2. Node C can strip the multicast information of node D in the packet, encapsulate the IP unicast address 10.1.1.5 into the IP header of the packet (denoted as unicast packet 5), and send unicast packet 5 to Device 2 through Port 2. In addition, Device 1 and Device 2 are devices in Network 9, and node C can be a node in Network 9 or not a node in Network 9.

[0354] In the above Method 12, the bit sequence of a node includes N first fields, where N is the number of nodes in the node set corresponding to the node. At this time, for a leaf child node, the node set corresponding to the leaf child node can include some or all of the potential child nodes of the leaf child node, that is, it can include the upstream nodes of the leaf child node and all downstream devices of the leaf child node. One first field is used to indicate whether the leaf child node needs to send a packet to a potential child node corresponding to the first field. For example, if the value of the first field is 1, it is used to indicate that the leaf child node needs to send a packet to a potential child node corresponding to the first field; if the value of the first field is 0, it is used to indicate that the leaf child node does not need to send a packet to a potential child node corresponding to the first field. Taking the first node as an example, one first field is used to indicate whether the first node needs to send a third packet to a first device corresponding to the first field. On this basis, the third forwarding table can record the correspondence between the first field, the IP unicast information of the first device, and the output port. The first node can search the third forwarding table according to the bit sequence of the first node to determine the corresponding IP unicast information and output port. As Fig. 22 shown, the first node can strip the multicast information of the second node in the second packet to obtain the stripped packet. The first node copies the stripped packet the corresponding number of copies according to the number of IP unicast information, and encapsulates each IP unicast information into the IP header of a corresponding packet to obtain the third packet. In this way, the first node can send the corresponding third packet to the first device through the output port corresponding to the third packet.

[0355] For example, based on Fig. 20 the example shown, an example of the third forwarding table of node E can be as shown in Table 23.

[0356] Table 23

[0357] Index(bit) IP Unicast Information port 1 10.1.1.1 Port 0 2 10.1.1.6 Port 1 3 10.1.1.7 Port 1 4 10.1.1.8 Port 2

[0358] Among them, the bit sequence of node E is 0111. A first field corresponding to node A is the 1st bit in the bit sequence 0111, that is, the bit with index 1 in Table 11. A first field corresponding to device 3 is the 2nd bit in the bit sequence 0111, that is, the bit with index 2 in Table 11. A first field corresponding to device 4 is the 3rd bit in the bit sequence 0111, that is, the bit with index 3 in Table 11. A first field corresponding to device 5 is the 4th bit in the bit sequence 0111, that is, the bit with index 4 in Table 11. For node E, since the value of the 1st bit in the bit sequence 0111 is 0, node E skips this bit and looks for the 2nd bit in the bit sequence 0111. Since the value of the 2nd bit in the bit sequence 0111 is 1, node E looks up Table 23 according to the 2nd bit, and determines that the IP unicast information corresponding to the 2nd bit is the IP unicast address 10.1.1.6, and the corresponding port is port 1. Node E can strip the multicast information of node A in the packet, encapsulate the IP unicast address 10.1.1.6 into the IP header of the packet (denoted as unicast packet 6), and send unicast packet 6 to device 3 through port 1. Since the value of the 3rd bit in the bit sequence 0111 is 1, node E looks up Table 23 according to the 3rd bit, and determines that the IP unicast information corresponding to the 3rd bit is the IP unicast address 10.1.1.7, and the corresponding port is port 1. Node E can strip the multicast information of node A in the packet, encapsulate the IP unicast address 10.1.1.7 into the IP header of the packet (denoted as unicast packet 7), and send unicast packet 7 to device 4 through port 1. Since the value of the 4th bit in the multicast routing identifier 0111 is 1, node E looks up Table 23 according to the 4th bit, and determines that the IP unicast information corresponding to the 4th bit is the IP unicast address 10.1.1.8, and the corresponding port is port 2. Node E can strip the multicast information of node A in the packet, encapsulate the IP unicast address 10.1.1.8 into the IP header of the packet (denoted as unicast packet 8), and send unicast packet 8 to device 5 through port 2. In addition, device 3, device 4, and device 5 are devices in network 6. Node E can be a node in network 6 or not a node in network 6.

[0359] In the above-mentioned Method 13, the multicast routing identifier of a node includes a group identifier, which is used to indicate the node group corresponding to the node. At this time, for a leaf child node, the nodes in the node group corresponding to the leaf child node are all downstream devices of the leaf child node, and the packet needs to be sent to these downstream devices. Taking the first node as an example, the second group identifier in the multicast routing identifier of the first node is used to indicate the second node group, that is, it indicates that the third packet needs to be sent to the second node group. On this basis, the third forwarding table can record the corresponding relationship between the group identifier, the IP unicast information of each device in the node group, and the output port. The first node can look up the third forwarding table according to the second group identifier in the multicast routing identifier of the first node to determine the corresponding IP unicast information and output port. As Fig. 22 shown, the first node can strip the multicast information of the second node in the second packet to obtain the stripped packet. The first node copies the stripped packet the corresponding number of copies according to the number of IP unicast information, and encapsulates each IP unicast information into the IP header of a corresponding packet encapsulation to obtain the third packet. In this way, the first node can send the corresponding third packet to the first device through the output port corresponding to the third packet.

[0360] For example, based on Fig. 20 the example shown, an example of the third forwarding table of node E can be as shown in Table 24.

[0361] Table 24

[0362]

[0363] Among them, the group identifier in the multicast routing identifier of node E is identifier 6. Node E looks up Table 24 according to identifier 6 and determines that the IP unicast information corresponding to identifier 6 includes IP unicast address 10.1.1.6, IP unicast address 10.1.1.7, and IP unicast address 10.1.1.8, and the corresponding ports include port 1 and port 2. Node E can strip the multicast information of node A in the packet, encapsulate the IP unicast address 10.1.1.6 into the IP header of the packet (denoted as unicast packet 6), and send unicast packet 6 to device 3 through port 1. Node E can strip the multicast information of node A in the packet, encapsulate the IP unicast address 10.1.1.7 into the IP header of the packet (denoted as unicast packet 7), and send unicast packet 7 to device 4 through port 1. Node E can strip the multicast information of node A in the packet, encapsulate the IP unicast address 10.1.1.8 into the IP header of the packet (denoted as unicast packet 8), and send unicast packet 8 to device 5 through port 2.

[0364] In the second implementation, the unicast / multicast information of the first device is IP multicast information, that is, the first device is a device within the multicast group, and the third forwarding table records the correspondence between the multicast routing identifier of the first node and the IP multicast information. It can be understood that there are three implementation methods for the multicast routing identifier of the first node, namely the above-mentioned method 11, method 12, and method 13. The following will introduce them in combination with these three methods.

[0365] In the above method 11, the multicast routing identifier of a node includes a Cnt field and X Idx fields. Taking the first node as an example, the multicast routing identifier of the first node also includes a Cnt field and X Idx fields. On this basis, the third forwarding table can record the entire multicast routing identifier, that is, the correspondence between the Cnt field, X Idx fields, IP multicast information, and the outgoing port, to indicate that the packet needs to be sent to the multicast group corresponding to the IP multicast information. The first node can search the third forwarding table according to the multicast routing identifier of the first node to determine the corresponding IP multicast information and the outgoing port. As Fig. 22 shown, the first node can strip the multicast information of the second node in the second packet to obtain the stripped packet, and encapsulate the IP multicast information into the IP header of the stripped packet to obtain the third packet. In this way, the first node can send the third packet to the corresponding multicast group (including the first device) through the outgoing port corresponding to the third packet.

[0366] For example, based on Fig. 20 the example shown, an example of the third forwarding table of node F can be as shown in Table 25.

[0367] Table 25

[0368] Idx field + X Idx fields IP Multicast Information port 11 224.1.1.3 Port 1

[0369] Among them, the multicast routing identifier of node F is 11. In the multicast routing identifier of node F, the value of the Cnt field is 1, and the value of the Idx field is 1. Node F searches Table 25 according to the multicast routing identifier 11 to determine that the corresponding IP multicast information is the IP multicast address 224.1.1.3, and the corresponding port is port 1. Node F can strip the multicast information of node A in the packet, encapsulate the IP multicast address 224.1.1.3 into the IP header of the packet (denoted as multicast packet 5), and send multicast packet 5 to device 6 within the multicast group through port 1. In addition, device 6 is a device in network 7, and node F can be a node in network 7 or not a node in network 7.

[0370] In the above-mentioned Method 12, the bit sequence of a node includes N first fields. Taking the first node as an example, the bit sequence of the first node also includes N first fields. On this basis, the third forwarding table can record the correspondence between the bit sequence, the IP multicast information, and the output port, so as to indicate that the third packet needs to be sent to the multicast group corresponding to the IP multicast information. The first node can search the third forwarding table according to the bit sequence of the first node to determine the corresponding IP multicast information and output port. The first node can strip the multicast information of the second node in the second packet to obtain the stripped packet, and encapsulate the IP multicast information into the IP header of the stripped packet to obtain the third packet. In this way, the first node can send the third packet to the corresponding multicast group (including the first device) through the output port corresponding to the third packet.

[0371] For example, based on Fig. 20 the example shown, an example of the third forwarding table of node F can be as shown in Table 26.

[0372] Table 26

[0373] bit sequence IP Multicast Information port 01 224.1.1.3 Port 1

[0374] Among them, the bit sequence of node F is 01. Node F searches Table 26 according to the bit sequence 01 to determine that the corresponding IP multicast information is the IP multicast address 224.1.1.3, and the corresponding port is port 1. Node F can strip the multicast information of node A in the packet, encapsulate the IP multicast address 224.1.1.3 into the IP header of the packet (denoted as multicast packet 5), and send multicast packet 5 to device 6 in the multicast group through port 1.

[0375] In the above-mentioned Method 13, the multicast routing identifier of a node includes a group identifier. Taking the first node as an example, the multicast routing identifier of the first node includes a second group identifier. On this basis, the third forwarding table can record the correspondence between the group identifier in the multicast routing identifier, the IP multicast information, and the output port, so as to indicate that the packet needs to be sent to the multicast group corresponding to the IP multicast information. The first node can search the third forwarding table according to the second group identifier in the multicast routing identifier of the first node to determine the corresponding IP multicast information and output port. As Fig.19 shown, the first node can strip the multicast information of the second node in the second packet to obtain the stripped packet, and encapsulate the IP multicast information into the IP header of the stripped packet to obtain the third packet. In this way, the first node can send the third packet to the corresponding multicast group (including the first device) through the output port corresponding to the third packet.

[0376] For example, based on Fig. 20 the example shown, an example of the third forwarding table of node F can be as shown in Table 27.

[0377] Table 27

[0378] Group ID IP Multicast Information port Logo 8 224.1.1.3 Port 1

[0379] Among them, the group identifier in the multicast routing identifier of node F is identifier 8. Node F looks up Table 27 according to identifier 8, determines that the corresponding IP multicast information is the IP multicast address 224.1.1.3, and the corresponding port is port 1. Node F can strip the multicast information of node A in the packet, encapsulate the IP multicast address 224.1.1.3 into the IP header of the packet (denoted as multicast packet 5), and send multicast packet 5 to device 6 in the multicast group through port 1.

[0380] In the third implementation manner, the unicast / multicast information of the first device is MPLS label information, and the corresponding relationship between the multicast routing identifier of the first node and the MPLS label information is recorded in the third forwarding table. It can be understood that there are three implementation manners for the multicast routing identifier of the first node, namely the above-mentioned manner 11, manner 12, and manner 13. The following is an introduction in combination with these three manners.

[0381] In the above-mentioned manner 11, the entire multicast routing identifier of the first node can be recorded in the third forwarding table, that is, the corresponding relationship including the Cnt field, X Idx fields, MPLS label information, and the output port. The specific implementation is similar to the above-mentioned second implementation manner and can be understood with reference to the second implementation manner, so it will not be elaborated here.

[0382] For example, based on Fig. 20 the example shown, an example of the third forwarding table of node H can be as shown in Table 28.

[0383] Table 28

[0384]

[0385]

[0386] Among them, the multicast routing identifier of node H is 110. Node H looks up Table 28 according to the multicast routing identifier 110, determines that the corresponding MPLS label information includes MPLS label 100 and MPLS label 101, and the corresponding port is port 1. Node H can strip the multicast information of node B in the packet, encapsulate MPLS label 100 into the IP header of the packet (denoted as tunnel packet 4), and send tunnel packet 4 to device 7 through port 1. Node H can strip the multicast information of node B in the packet, encapsulate MPLS label 101 into the IP header of the packet (denoted as tunnel packet 5), and send tunnel packet 5 to device 8 through port 1. In addition, device 7 and device 8 are devices in network 8, and node H can be a node in network 8 or not a node in network 8.

[0387] In the above-mentioned Method 12, the corresponding relationship between the bit sequence of the first node, the MPLS label information, and the outgoing port can be recorded in the third forwarding table. The specific implementation is similar to the second embodiment above, and can be understood by referring to the second embodiment, so details are not described here.

[0388] For example, based on Fig. 20 the example shown, an example of the third forwarding table of node H can be as shown in Table 29.

[0389] Table 29

[0390]

[0391] Among them, the bit sequence of node H is 011. Node H looks up Table 29 according to the bit sequence 011, determines that the corresponding MPLS label information includes MPLS label 100 and MPLS label 101, and the corresponding port is port 1. Node H can strip the multicast information of node B in the packet, encapsulate MPLS label 100 into the IP header of the packet (denoted as tunnel packet 4), and send tunnel packet 4 to device 7 through port 1. Node H can strip the multicast information of node B in the packet, encapsulate MPLS label 101 into the IP header of the packet (denoted as tunnel packet 5), and send tunnel packet 5 to device 8 through port 1.

[0392] In the above-mentioned Method 13, the corresponding relationship between the group identifier in the multicast routing identifier, the MPLS label information, and the outgoing port can be recorded in the third forwarding table. The specific implementation is similar to the second embodiment above, and can be understood by referring to the second embodiment, so details are not described here.

[0393] For example, based on Fig. 20 the example shown, an example of the third forwarding table of node H can be as shown in Table 30.

[0394] Table 30

[0395]

[0396] Among them, the group identifier in the multicast routing identifier of node H is identifier 9. Node H looks up Table 30 according to identifier 9, determines that the corresponding MPLS label information includes MPLS label 100 and MPLS label 101, and the corresponding port is port 1. Node H can strip the multicast information of node B in the packet, encapsulate MPLS label 100 into the IP header of the packet (denoted as tunnel packet 4), and send tunnel packet 4 to device 7 through port 1. Node H can strip the multicast information of node B in the packet, encapsulate MPLS label 101 into the IP header of the packet (denoted as tunnel packet 5), and send tunnel packet 5 to device 8 through port 1.

[0397] In the fourth implementation manner, the unicast / multicast information of the first device is bit string information, that is, the first device is a device within the BIER multicast group, and the third forwarding table records the correspondence between the multicast routing identifier of the first node and the bit string information. It can be understood that there are three implementation manners for the multicast routing identifier of the first node, namely the above-mentioned manner 11, manner 12, and manner 13. The following is an introduction in combination with these three manners.

[0398] In the above-mentioned manner 11, the third forwarding table may record the entire multicast routing identifier, that is, including the Cnt field, X Idx fields, the bit string information, and the correspondence of the neighbor devices. The first node may search the third forwarding table according to the multicast routing identifier of the first node to determine the corresponding bit string information and neighbor devices. As Fig.23 shown, the first node may strip the multicast information of the second node in the second packet to obtain the stripped packet, and encapsulate an outer header including the bit string information in the stripped packet, so as to obtain the third packet. In this way, the first node may send the third packet to the BIER multicast group (including the first device) through the outport corresponding to the neighbor device.

[0399] For example, based on Fig. 20 the example shown, there are also 4 ordinary nodes, that is, nodes not within the multicast tree, between node E and devices 3 - 5, which are node R8, node R9, node R10, and node R11 respectively. Node R8, node R9, node R10, and node R11 are nodes in network 6. An example of the third forwarding table of node E is shown in Table 31.

[0400] Table 31

[0401]

[0402] Among them, the multicast routing identifier of node E is 11101101. In the multicast routing identifier of node E, the value of the Cnt field is 11, indicating that there are 3 downstream devices of node E; the value of the first Idx field is 10, indicating device 3; the value of the second Idx field is 11, indicating device 4; the value of the third Idx field is 01, indicating device 5. Node E searches table 31 according to the multicast routing identifier 11101101 and determines that the corresponding bit string information includes bit string information 0100 and bit string information 0011. Among them, the neighbor device corresponding to the bit string information 0100 is node R9, indicating that the multicast packet sent to device 3 needs to pass through node R9, and the neighbor device corresponding to the bit string information 0011 is node R8, indicating that the multicast packets sent to device 4 and device 5 need to pass through node R8. Node E can strip the multicast information of node A in the packet, encapsulate the outer header including the bit string information 0100 in the packet (denoted as multicast packet 6), and send the multicast packet 6 through the port corresponding to node R9. Node E can strip the multicast information of node A in the packet, then copy it twice, and encapsulate the outer header including the bit string information 0011 in the two packets (denoted as multicast packet 7 and multicast packet 8), and send the multicast packet 7 and the multicast packet 8 through the port corresponding to node R8.

[0403] In the above method 12, the third forwarding table can record the bit sequence of the first node, the bit string information, and the corresponding relationship of the neighbor devices. The first node can search the third forwarding table according to the bit sequence of the first node to determine the corresponding bit string information and neighbor devices. As Fig.23 shown, the first node can strip the multicast information of the second node in the second packet to obtain the stripped packet, and encapsulate the outer header including the bit string information in the stripped packet to obtain the third packet. In this way, the first node can send the third packet to the BIER multicast group (including the first device) through the out-port corresponding to the neighbor device.

[0404] For example, based on Fig. 20 the example shown, an example of the third forwarding table of node E can be as shown in Table 32.

[0405] Table 32

[0406]

[0407] Among them, the bit sequence of node E is 0111. The value of the first bit is 0, which is used to indicate that node A is not a potential child node of node E. The values of the second to fourth bits are 1, which are used to indicate that devices 3 to 5 are all potential child nodes of node E respectively. Node E looks up Table 32 according to the bit sequence 0111, and determines that the corresponding bit string information includes bit string information 0100 and bit string information 0011. Node E can strip the multicast information of node A in the packet, encapsulate the outer header including bit string information 0100 in the packet (denoted as multicast packet 6), and send multicast packet 6 through the port corresponding to node R9. Node E can strip the multicast information of node A in the packet, then copy it twice, and encapsulate the outer headers including bit string information 0011 in the two packets (denoted as multicast packet 7 and multicast packet 8), and send multicast packet 7 and multicast packet 8 through the port corresponding to node R8.

[0408] In the above method 13, the group identifier in the multicast routing identifier, the bit string information, and the corresponding relationship of the neighbor devices can be recorded in the third forwarding table. The first node can look up the third forwarding table according to the group identifier in the multicast routing identifier of the first node to determine the corresponding bit string information and neighbor devices. As Fig.23 shown, the first node can strip the multicast information of the second node in the second packet to obtain the stripped packet, and encapsulate the outer header including the bit string information in the stripped packet, so as to obtain the third packet. In this way, the first node can send the third packet to the BIER multicast group (including the first device) through the outgoing port corresponding to the neighbor device.

[0409] For example, based on Fig. 20 the example shown, an example of the third forwarding table of node E can be shown in Table 33.

[0410] Table 33

[0411]

[0412] Among them, the group identifier in the multicast routing identifier of node E is identifier 6. Node E looks up Table 33 according to identifier 6, and determines that the corresponding bit string information includes: bit string information 0100 and bit string information 0011. Node E can strip the multicast information of node A in the packet, encapsulate the outer header including bit string information 0100 in the packet (denoted as multicast packet 6), and send multicast packet 6 through the port corresponding to node R9. Node E can strip the multicast information of node A in the packet, then copy it twice, and encapsulate the outer headers including bit string information 0011 in the two packets (denoted as multicast packet 7 and multicast packet 8), and send multicast packet 7 and multicast packet 8 through the port corresponding to node R8.

[0413] It can be understood that the above Table 19 - Table 21 are only examples and not limitations. For example, the neighbor device item in Table 19 - Table 21 can be configured as the corresponding outgoing port, that is, node E can send multicast packets directly through the outgoing port without perceiving or configuring the topology of ordinary nodes. In addition, the above Network 2 - Network 9 can be the same network, different networks, independent networks, or sub - networks under a network, without limitation. For the relevant introduction of the network, reference can be made to the relevant introduction in "6. Network" above, which will not be elaborated here.

[0414] Method 42:

[0415] In the second packet, the multicast routing information of the second node does not include the multicast routing identifier of the first node. In this case, the first node can look up the second forwarding table dynamically maintained by the first node according to the IP address in the IP header of the second packet. The second forwarding table records the unicast / multicast information corresponding to this IP address, such as five - tuple information or two - tuple information. As Fig. 22 shown, after the first node strips the multicast information of the second node in the second packet, it can encapsulate the unicast / multicast information corresponding to the five - tuple information or two - tuple information in the IP header of the stripped packet, so as to obtain a third packet and send the third packet to the first device.

[0416] Combining the above Method 31 and Method 32, it can be seen that when the multicast routing information of the second node includes the multicast routing identifier of the first node, the multicast routing identifier of the first node can be used to indicate that the destination device is the first device, so that the first node can determine that it needs to send a third packet to the first device only according to the multicast routing identifier of the first node, without unpacking the inner header of the first packet, that is, the IP header, thus improving the processing efficiency.

[0417] Optionally, in combination with the above embodiments, in the fourth application scenario, a node may include multiple entities. After an entity within a node receives a multicast packet, it can process it through the Fig.24 method shown. This method is applied to the first entity, and the first entity belongs to the first node. The method specifically includes:

[0418] S2401, the first entity receives the first multicast packet.

[0419] Among them, the first multicast packet includes the first multicast routing information of the first node. The first multicast routing information of the first node includes: the first multicast routing identifier of the first node, and the multicast routing information of the non-leaf child nodes corresponding to the first multicast routing identifier of the first node. The first multicast routing identifier of the first node is the same as the multicast routing identifier of the first node, or is obtained by updating the multicast routing identifier of the first node. For the relevant description of the multicast routing information of the node, refer to the above text and will not be elaborated here.

[0420] According to the functions and descriptions of the multicast routing identifier in the above text, if the multicast routing identifier is a bit sequence, or, the Cnt field + Idx field, then there will be a corresponding bit or Idx field in the multicast routing identifier of a node for each child node (including non-leaf child nodes and leaf child nodes). Since the first multicast routing identifier is derived from the multicast routing identifier, the non-leaf child nodes corresponding to the first multicast routing identifier of the first node refer to the non-leaf child nodes among the child nodes corresponding to the bit or Idx field in this first multicast routing identifier.

[0421] Among them, the first entity is an entity in the first node. The first entity can receive the first multicast packet from other nodes outside the first node, or can receive the first multicast packet from other entities in the first node, and this application does not make any restrictions. If the first entity receives the first multicast packet from other nodes outside the first node, then the first multicast routing information of the first node is the same as the multicast routing information of the first node. If the first entity receives the first multicast packet from other entities in the first node, then the first multicast routing identifier of the first node may be the same as the multicast routing identifier of the first node, or may be obtained by updating the multicast routing identifier of the first node. The specific form of the first multicast routing information can be deduced according to the method of processing multicast packets between the first entity and the second entity. Specific examples can be found in the following text and will not be elaborated here.

[0422] S2402. The first entity determines the second entity according to the first multicast routing identifier of the first node.

[0423] Among them, the second entity is an entity in the first node. S2002 can specifically include: the first entity finds the second entity by looking up the multicast forwarding table according to the first multicast routing identifier of the first node. It should be noted that the first entity may obtain multiple second entities according to the first multicast routing identifier of the first node. Here, the second entity can be any one of them. In this application, an example of the first entity forwarding the multicast packet to one second entity is described. When the first node actually processes the multicast packet, it can forward the multicast packet to each second entity.

[0424] Exemplarily, if the first multicast routing identifier is a bit sequence, the next hop corresponding to the bit with a value of 1 in the first multicast routing identifier in the multicast forwarding table is the second entity; if the first multicast routing identifier is a Cnt field + Idx field, the next hop corresponding to the value of the Idx field in the multicast forwarding table is the second entity.

[0425] S2403, the first entity sends a second multicast packet to the second entity.

[0426] Among them, the second multicast packet includes the second multicast routing information of the first node. The second multicast routing information of the first node includes: the second multicast routing identifier of the first node, and the multicast routing information of some or all non-leaf child nodes corresponding to the third multicast routing identifier of the first node. The third multicast routing identifier of the first node is the same as the first multicast routing identifier of the first node, or is obtained by updating the first multicast routing identifier of the first node. The second multicast routing identifier of the first node is the same as the third multicast routing identifier of the first node, or is obtained by updating the third multicast routing identifier of the first node.

[0427] Among them, the first entity specifically needs to update the first multicast routing identifier of the first node to obtain the third multicast routing identifier of the first node in the following Case 1 and Case 2. In other cases, the third multicast routing identifier of the first node is the same as the first multicast routing identifier of the first node. The following gives an exemplary description of Case 1 and Case 2 and the update method.

[0428] Case 1: The first entity belongs to a certain child node of the first node (assumed to be child node 1). If the first multicast routing identifier is a bit sequence, the first entity sets the bit corresponding to child node 1 to 0 to obtain the third multicast routing identifier. If the first multicast routing identifier is a Cnt field + Idx field, the first entity deletes the Idx field corresponding to child node 1 and subtracts 1 from the value of the Cnt field to obtain the third multicast routing identifier.

[0429] Case 2: The first entity does not belong to any child node of the first node, but one or more child nodes of the first node (assumed to be Q child nodes) that the multicast packet can reach only through the multicast forwarding of the first entity. If the first multicast routing identifier is a bit sequence, the first entity sets the bits corresponding to the Q child nodes to 0 to obtain the third multicast routing identifier. If the first multicast routing identifier is a Cnt field + Idx field, the first entity deletes the Idx fields corresponding to the Q child nodes and subtracts Q from the value of the Cnt field to obtain the third multicast routing identifier.

[0430] Among them, when the first entity is specifically in the following Case 3, it is necessary to update the third multicast routing identifier of the first node to obtain the second multicast routing identifier of the first node. In other cases, the second multicast routing identifier of the first node is the same as the third multicast routing identifier of the first node. The following provides an exemplary description of Case 3 and the update method.

[0431] Case 3: The first entity needs to forward multicast packets to multiple second entities. For any one of the second entities, if the third multicast routing identifier is a bit sequence, the first entity needs to set to 0 the bits in the third multicast routing identifier of the first node corresponding to other child nodes except for P child nodes to obtain the second multicast routing identifier. If the third multicast routing identifier is a Cnt field + Idx field, the first entity deletes the Idx fields corresponding to other child nodes except for P child nodes, and subtracts P from the value of the Cnt field to obtain the second multicast routing identifier. Here, the P child nodes are one or more child nodes of the first node, and these child nodes need to pass through the multicast forwarding of this second entity to receive multicast packets.

[0432] In summary, the method provided in the above embodiments of the present application has the following advantages compared with PIM-SM:

[0433] 1. The number of entries in the multicast forwarding table in the node does not increase with the increase in the number of multicast flows. Therefore, even if the number of multicast flows is large, it is not necessary to expand more table space in the router to support the forwarding of multicast packets. Therefore, the scalability is good.

[0434] 2. The multicast packet is generated from the source node, and the multicast routing information of non-leaf child nodes is included in the multicast packet. Therefore, the forwarding path can be actively controlled by adjusting the multicast packet. For example, if there are multiple paths, the controller or the source node can select the optimal path through the control plane algorithm.

[0435] 3. The multicast packet is generated from the source node. Therefore, when a node joins or leaves the multicast tree, the source node can be informed, and the manageability is high. For example, the source node can collect the preferences of users through the application layer and adjust the data in the multicast packet according to these preferences.

[0436] 4. The node does not need to send join signaling. Therefore, the node does not need to process a large number of periodic signaling, avoiding increasing the computing load, power consumption, and processing resources of the node.

[0437] The method provided in the above embodiments of the present application has the following advantages compared with BIER:

[0438] 1. The group broadcast message includes the multicast routing information of non-leaf child nodes. The non-leaf child nodes can forward the multicast messages according to their own multicast routing information. Therefore, the number of message copies will not be excessive, and the multicast efficiency is relatively high.

[0439] 2. The multicast message is generated from the source node, and the group broadcast message includes the multicast routing information of non-leaf child nodes. Therefore, the forwarding path can be actively controlled by adjusting the multicast message. For example, if there are multiple paths, the controller or the source node can select the optimal path through the control plane algorithm.

[0440] In addition, the method provided in the above embodiments of the present application also has the following advantages:

[0441] 1. Since the tree recursive structure in the message sent by a node to each child node is the same, for example, it is the tree recursive structure of the multicast routing information of the second node, the node can send only one message on each corresponding outgoing port to avoid redundant messages and improve communication efficiency.

[0442] 2. The multicast routing information of each non-leaf child node does not need to be determined by the upstream node, such as the second node, but can be determined by the non-leaf child node itself, thereby saving the processing resources of the upstream node and improving the operation efficiency.

[0443] To make the embodiments of the present application clearer, the following is an exemplary description of the method provided in the above embodiments in combination with Fig. 20 the scenario shown, and taking the case where the multicast routing identifier of the node is implemented by the above method 12 as an example.

[0444] In Fig. 20In the multicast tree shown, the node set corresponding to node D includes 3 nodes, namely node A, node B, and node C. The bit width of the bit sequence of node D is 3. The first bit corresponds to node A, the second bit corresponds to node B, and the third bit corresponds to node C. Node A is a non-leaf child node of node D. The node set corresponding to node A includes 3 nodes, namely node D, node E, and node F. The bit width of the bit sequence of node A is 3. The first bit corresponds to node D, the second bit corresponds to node E, and the third bit corresponds to node F. Node E is a leaf child node of node A. The node set corresponding to node E includes 4 nodes, namely node A, device 3, device 4, and device 5. The bit width of the bit sequence of node A is 4. The first bit corresponds to node A, the second bit corresponds to device 3, the third bit corresponds to device 4, and the fourth bit corresponds to device 5. Node F is a leaf child node of node A. The node set corresponding to node F includes 2 nodes, namely node A and device 6. The bit width of the bit sequence of node A is 2. The first bit corresponds to node A, and the second bit corresponds to device 6. Node B is a non-leaf child node of node D. The node set corresponding to node B includes 2 nodes, namely node D and node H. The bit width of the bit sequence of node B is 2. The first bit corresponds to node D, and the second bit corresponds to node H. Node H is a leaf child node of node B. The node set corresponding to node H includes 3 nodes, namely node B, device 7, and device 8. The bit width of the bit sequence of node H is 3. The first bit corresponds to node B, the second bit corresponds to device 7, and the third bit corresponds to device 8. Node C is a leaf child node of node D. The node set corresponding to node C includes 3 nodes, namely node D, device 1, and device 2. The bit width of the bit sequence of node C is 3. The first bit corresponds to node D, the second bit corresponds to device 1, and the third bit corresponds to device 2. Fig.25 , except for the first field, the second field, and the addressing field, the letter before ":" represents the node corresponding to the field, and the value after ":" represents the bit sequence corresponding to the field; in the addressing field, LEN before ":" refers to the length of the multicast routing information of the node, and the value after ":" represents the value of the field. The bit width of the addressing field is 1 byte.

[0445] Among them, node D can generate Fig.25 the message 1 shown in (a) of. The unicast / multicast information 1 supported by network 2 is encapsulated in the outer header of message 1. Node D can send message 1 to node A, node B, and node C across network 2 respectively. After receiving message 1, node A can determine the multicast routing information of node A from the multicast routing information of node D according to the addressing field, and encapsulate the multicast routing information of node A to generate Fig.25Message 2 shown in (b) therein. Unicast / multicast information 2 supported by Network 3 and Network 4 is encapsulated in the outer header of Message 2. Node A can send Message 2 to Node E across Network 3 and also send Message 2 to Node E across Network 4. After receiving Message 2, Node E can strip off the multicast information of A in Message 2. At this time, if Network 6 supports IP unicast / multicast or MPLS labels, then Node E can encapsulate unicast / multicast information 3 in the IP header to generate Fig.25 Message 3 shown on the left side in (c) therein. This unicast / multicast information 3 includes IP unicast / multicast information or MPLS label information. If Network 6 supports BIER multicast, then Node E can encapsulate another header including BIER multicast information 1 outside the IP header to generate Fig.25 Message 3 shown on the right side in (c) therein. Node E can send Message 3 to Device 3, Device 4, and Device 5 across Network 6 respectively. After receiving Message 1, Node B can determine the multicast routing information of Node B from the multicast routing information of Node D according to the addressing field, and encapsulate the multicast routing information of Node B to generate Fig.25 Message 4 shown in (d) therein. Unicast / multicast information 4 supported by Network 5 is encapsulated in the outer header of Message 4. Node B can send Message 4 to Node H across Network 5. After receiving Message 4, Node H can strip off the multicast information of B in Message 4. At this time, if Network 8 supports IP unicast / multicast or MPLS labels, then Node H can encapsulate unicast / multicast information 5 in the IP header to generate Fig.25 Message 5 shown on the left side in (e) therein. This unicast / multicast information 5 includes IP unicast / multicast information or MPLS label information. If Network 8 supports BIER multicast, then Node E can encapsulate another header including BIER multicast information 2 outside the IP header to generate Fig.25 Message 5 shown on the right side in (e) therein. In this way, Node H can send Message 5 to Device 7 and Device 8 across Network 8 respectively. After receiving Message 1, Node C can strip off the multicast information of D in Message 1. At this time, if Network 9 supports IP unicast / multicast or MPLS labels, then Node C can encapsulate unicast / multicast information 6 in the IP header to generate Fig.25 Message 6 shown on the left side in (f) therein. This unicast / multicast information 6 includes IP unicast / multicast information or MPLS label information. If Network 9 supports BIER multicast, then Node C can encapsulate another header including BIER multicast information 3 outside the IP header to generate Fig.25 Message 6 shown on the right side in (f) therein. In this way, Node C can send Message 6 to Device 1 and Device 2 across Network 9 respectively.

[0446] In the above embodiments, the method provided by this application is exemplarily described by taking the group broadcast message not including a type field as an example. If the current node supports multiple types of multicast routing identifiers and the group broadcast message may include a type field, the node may parse the type field to obtain the type of the multicast routing identifier and identify the multicast routing identifier according to the type of the multicast routing identifier.

[0447] In the above embodiments, the bit width of any field in the group broadcast message is exemplary. In actual implementation, the bit width of any field may not be byte-aligned or may be aligned (for example, the field is 1 byte, 2 bytes, or more bytes), and this application does not make any restrictions.

[0448] In the above embodiments, after a node (or an entity in the node) receives a group broadcast message, it may determine whether the message header of the group broadcast message contains a multicast encapsulation according to the indication of the fields in the outer encapsulation. If the destination address in the outer encapsulation is the address of the node (or the entity) and it is determined that the message header of the group broadcast message contains a multicast encapsulation, the node (or the entity) may strip off the outer encapsulation, obtain the multicast encapsulation, and perform corresponding processing on the group broadcast message according to the multicast encapsulation.

[0449] In the above embodiments, before a node (or an entity) sends a group broadcast message to multiple nodes (or entities), it may copy the received group broadcast message. If it sends the message to N nodes (or entities), it copies N - 1 copies, and edits the copied group broadcast messages and the received group broadcast message to obtain the group broadcast message to be sent. If it only sends a group broadcast message to one node (or entity), it may not copy and directly edit the received group broadcast message. When the node (or the entity) copies the group broadcast message, it may copy all at once and then edit and send the group broadcast messages in parallel. It may also copy one group broadcast message at a time, edit the group broadcast message, and send it.

[0450] It should be noted that in the description of the embodiments of this application, a node (or an entity) sending a group broadcast message to another node (or an entity) means that the source address of the group broadcast message is the address of the said one node (or entity), and the destination address is the address of the said another node (or entity). The meaning represented when any bit (which can be a single bit or a bit in a bit sequence) in any of the above embodiments of this application has a value of 1 can also be represented by 0, and the meaning when it has a value of 0 can also be represented by 1 when it has a value of 1, without any restrictions. For example, in the above embodiments, when the value of a bit in the bit sequence is 1, it means that the bit is a child node of node D1, and when the value is 0, it means that the bit is not a child node of node D1. In actual implementation, it may also be that when the value of a bit in the bit sequence is 0, it means that the bit is a child node of node D1, and when the value is 1, it means that the bit is not a child node of node D1. The same applies to other bits and will not be elaborated one by one.

[0451] Please refer to Fig.26 , the communication method provided by this application is applicable to communication between at least two nodes, such as communication between a fourth node and a fifth node. The method includes:

[0452] S2601, the fourth node obtains a fourth message.

[0453] Among them, the fourth node is a node within the fourth network, which can be an edge node or a non-edge node, and there is no limitation in this regard. The fourth message includes a fifth header, and the fifth header includes bit string information of the fifth network, that is, the fourth message is a multicast message of BIER. The fourth network and the fifth network are different networks, and both the fourth network and the fifth network can be regarded as virtual nodes. In this way, the fourth node or the nodes within the fifth network can be regarded as entities within their respective virtual nodes. In addition, the specific implementation of the fourth network and the fifth network can refer to the relevant introduction in "6. Network" above, which will not be elaborated here. The fourth node can receive a message from an upstream node to generate a fourth message based on this message, or the fourth node can receive a fourth message from an upstream node, or the fourth node can also generate a fourth message according to the service, and there is no limitation in this regard. Optionally, the fourth node stores the BIFT of the fifth network. If the fourth node needs to generate a fourth message, it can search the BIFT of the fifth network to determine the bit string information of the fifth network, so as to encapsulate a fifth message including the bit string information of the fifth network in the message to generate a fifth message.

[0454] S2602, the fourth node sends the fifth message to the fifth node according to the fourth message. Correspondingly, the fifth node receives the fifth message from the fourth node.

[0455] Among them, the fifth node is a node within the fourth network and can be an edge node of the fourth network. The fifth node can be regarded as an entity in the virtual nodes. The fifth packet includes a fifth header and a sixth header. The sixth header is located in the outer layer of the fifth header, and the sixth header includes the bit string information of the fifth node. It can be seen that when the fifth node is an edge node of the fourth network, if it is desired to send the fifth packet to the fifth network, the bit string information of the fifth node needs to be encapsulated in the fifth packet so that the fifth packet can be sent to the fifth node and then sent to the fourth network through the fifth node, thereby achieving cross-domain forwarding. The second mapping relation table is stored on the fourth node, and the second mapping relation table can record the corresponding relationship between the fifth node and the fifth network. The fourth node searches the second mapping relation table to determine that the fifth packet needs to be sent to the fifth node. On this basis, the BIFT of the fourth network is stored on the fourth node, and the fourth node can search the BIFT of the fourth network to determine the bit string information of the fifth node, so that the fourth node encapsulates the sixth header including the bit string information of the fifth node in the fourth packet to obtain the fifth packet, thereby sending the fifth packet to the fifth node.

[0456] For example, assume that the network structure of BIER multicast is as Fig. 27 shown. Nodes A, P, B, and C are in the same network, such as nodes in Network 1. Nodes A, B, and C form BIER set 1. The bit string information of node A can be 001, the bit string information of node B can be 010, and the bit string information of node C can be 100. In addition, nodes T, E, and F are in the same network, such as nodes in Network 2. Nodes G, H, and K are in the same network, such as nodes in Network 3. Network 1 is regarded as virtual node D1, Network 2 is regarded as virtual node D2, and Network 3 is regarded as virtual node D3. Virtual nodes D1, D2, and D3 can form BIER set 2. In this way, the bit string information of virtual node D1 can be 100, the bit string information of virtual node D2 can be 010, and the bit string information of virtual node D3 can be 001. Nodes A, B, P, and C can be entities within virtual node D1, nodes T, E, and F can be entities within virtual node D2, and nodes G, H, and K can be entities within virtual node D3.

[0457] When virtual node D1 needs to send packets to virtual nodes D2 and D3, a certain entity within virtual node D1, such as node A, generates the packet. Among them, the BIFT1 of BIER set 1, mapping relation table 1, and BIFT2 of BIER set 2 are stored on node A. An example of BIFT1 can be shown in Table 34, an example of mapping relation table 1 can be shown in Table 35, and an example of BIFT2 can be shown in Table 36.

[0458] Table 34

[0459] Logo Forwarding bit mask Neighboring Devices 010 010 D2 001 001 D3

[0460] Table 35

[0461] node node Neighboring Devices D2 B 010 D3 C 100

[0462] Table 36

[0463] Logo Forwarding bit mask Neighboring Devices 010 010 P 100 100 C

[0464] Among them, the forwarding bit mask (F-BM) in Table 34 is used to indicate subsets in BIER set 1. There are two such subsets. The nodes in one subset are D2, and the nodes in the other subset are D3. The F-BM in Table 36 is used to indicate subsets in BIER set 2. There are two such subsets. The nodes in one subset are B, and the nodes in the other subset are C. Node A looks up Table 34 and determines that the forwarding bit mask corresponding to virtual node D2 is 010, that is, the bit string information is 010, and the forwarding bit mask corresponding to virtual node D3 is 001, that is, the bit string information is 001. As shown in (a) of Fig.28 , the node can encapsulate a header including bit string information 010 (denoted as header 1) in message A, and encapsulate a header including bit string information 001 (denoted as header 2) in message B. Node A looks up Table 35 and determines that it needs to further look up Table 36. Node A looks up Table 36 and determines that the forwarding bit mask corresponding to node P is 010, that is, the bit string information is 010, and the forwarding bit mask corresponding to node C is 100, that is, the bit string information is 100. As shown in (b) of Fig.28 , the node can encapsulate a header including bit string information 010 (denoted as header 3) in message A, and encapsulate a header including bit string information 001 (denoted as header 4) in message B. In message A, header 3 is located outside header 1. Similarly, in message B, header 4 is located outside header 2, so as to facilitate the forwarding of message A and message B. Node A can send message A to node P and send message B to node C, so that node B can receive message A and node C can receive message C.

[0465] It should be noted that if node A receives a message from another node (denoted as message X), and message X needs to be sent to virtual node D2 and virtual node D3, the bit string information in message X can be forwarding bit mask 001 + forwarding bit mask 010, that is, 011. Node A looks up Table 34 according to the bit string information 011, and determines that the forwarding bit mask corresponding to virtual node D2 is 010, and the forwarding bit mask corresponding to virtual node D3 is 001. Node A can strip the bit string information 011 in message X and copy the stripped message 2 times. In this way, node A can encapsulate the above-mentioned header 1 and header 3 in one of the messages to obtain message A, and encapsulate the above-mentioned header 2 and header 4 in the other message to obtain message B, that is, node A generates message A and message B according to message X from the upstream node.

[0466] S2603, the fifth node parses the fifth message.

[0467] Among them, the fifth network's BIFT is stored on the fifth node. The fifth node parses the fifth message to obtain the bit string information of the fifth node and the bit string information of the fifth network. The fifth node can look up the fifth network's BIFT and determine that the fifth network's BIFT records the bit string information of the fifth network, but the fifth node's bit string information is not recorded in the fifth network's BIFT. In this way, the fifth node can strip the sixth header in the fifth message to obtain the fourth message, and then send the fourth message to the fifth network to achieve cross-network forwarding of the message, making the forwarding no longer restricted.

[0468] For example, assume that the network structure of BIER multicast is as Fig. 27 shown. The above-mentioned Table 34 is stored on node B. After node B receives message A from node P, node B can strip header 3 in message A by looking up Table 34 to obtain message C (as shown in (c) in Fig.28 ). In this way, node B can send message C to virtual node D2 to achieve cross-network forwarding of message C. The above-mentioned Table 34 is stored on node C. After node C receives message B, node C can strip header 4 in message B by looking up Table 34 to obtain message D (as shown in (d) in Fig.28 ). In this way, node C can send message D to virtual node D3 to achieve cross-network forwarding of message D.

[0469] In summary, according to the method provided in the above embodiments, since the fifth message encapsulates the bit string information of the fifth node, the fifth message can be cross-network forwarded before being sent to the fifth network, such as being forwarded to the fifth node across the fourth network, making the forwarding no longer restricted.

[0470] The part before the ":" shown in the above-mentioned drawings in this application is a mnemonic, and there is no mnemonic and ":" in the actual message. In each drawing of this application, the positions of the respective fields are merely examples, and in actual implementation, the positions of some fields may be different from those shown in the drawings, and this application makes no restrictions.

[0471] The above mainly introduced the solution of the embodiment of this application from the perspective of the method. It can be understood that for each network element, for example, a node or an entity, in order to implement the above functions, it includes at least one of the corresponding hardware structures and software modules for executing each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in this article, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the manner of hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0472] The embodiment of this application can perform functional unit division on the node or entity according to the above method examples. For example, each functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of units in the embodiment of this application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.

[0473] The above combination Figure 8-Figure 28 has described in detail the communication method provided by the embodiment of this application. The following combination Fig.29 and Fig.30 will describe in detail the communication device for executing the communication method provided by the embodiment of this application.

[0474] Exemplarily, Fig.29 is the first structural schematic diagram of the communication device provided by the embodiment of this application. As Fig.29 shown, the communication device 2900 includes: a transceiver module 2901 and a processing module 2902. For the sake of convenience of description, Fig.29 only the main components of this communication device are shown.

[0475] In some embodiments, the communication device 2900 may be Figure 8 the first node in the method shown.

[0476] Among them, the transceiver module 2901 is used to receive a first message from a second node; the processing module 2902 is used to parse the first message. Among them, the first message includes: the multicast routing information of the second node. The first node is a child node of the second node in the multicast tree. The multicast routing identifier of a node is used for the non-leaf child nodes of the node in the multicast tree to determine the multicast routing information of the non-leaf child nodes. The multicast routing information of a node includes: the multicast routing identifier of the node and the multicast routing information of the non-leaf child nodes of the node in the multicast tree.

[0477] In a possible design solution, the first node is a non-leaf child node of the second node. The processing module 2902 is further used to generate a second message according to the first message; the transceiver module 2901 is further used to send the second message to a third node. Among them, the second message includes: the multicast routing information of the first node, or the multicast routing information of the third node. The multicast routing information of the first node includes any one of the following: the multicast routing identifier of the first node and the multicast routing information of the third node, the multicast routing identifier of the first node, or the multicast routing identifier of the first node and the multicast routing identifier of the third node.

[0478] Optionally, the processing module 2902 is further used to determine the multicast routing information of the first node according to the multicast routing identifier of the second node; perform message encapsulation according to the multicast routing information of the second node to obtain a second message. Or, the processing module 2902 is further used for the first node to determine the multicast routing information of the first node according to the multicast routing identifier of the second node; determine the multicast routing information of the third node according to the multicast routing identifier of the first node in the multicast routing information of the first node; perform message encapsulation according to the multicast routing information of the third node to obtain a second message.

[0479] Further, the processing module 2902 is further used to determine the position of the first node in the first node set according to the multicast routing identifier of the second node, and determine the multicast routing information of the first node according to the position of the first node in the first node set. Among them, the first node set is the node set corresponding to the second node, and the first node set includes some or all of the potential child nodes of the second node.

[0480] Further, the multicast routing identifier of the second node includes: N first fields, where N is the number of nodes in the first node set. The processing module 2902 is further used to determine the position of the first field corresponding to the first node among the N first fields, and the position of the first field corresponding to the first node is used to represent the position of the first node in the first node set.

[0481] Further, the multicast routing information of the second node further includes an addressing field of the second node. The processing module 2902 is further configured to determine the multicast routing information of the first node according to the multicast routing identifier of the second node and the addressing field of the second node.

[0482] Further, the addressing field of the second node is used to indicate the length of the multicast routing information of the child nodes of the second node. Alternatively, the addressing field of the second node is used to indicate the start position or the end position of the multicast routing information of the child nodes of the second node. Alternatively, the addressing field of the second node includes: a plurality of delimiter fields, and the multicast routing information of the child nodes of the second node is separated by the plurality of delimiter fields.

[0483] Optionally, the first node and the third node are nodes within the first network. The second message further includes: a first header and a second header, the first header includes: the multicast routing information of the third node, or the multicast routing information of the first node, and the second header includes: the unicast / multicast information of the second network.

[0484] Further, the first node has a corresponding relationship between the multicast routing identifier of the first node or the multicast routing identifier of the third node and the unicast / multicast information of the second network.

[0485] Further, the first node is a node within the second network.

[0486] In another possible design, the first node is a leaf child node of the second node. The processing module 2902 is further configured to generate a third message according to the first message, and the transceiver module 2901 is further configured to send the third message to the first device. The third message includes: the unicast / multicast information of the first device.

[0487] Optionally, the first message includes the multicast routing identifier of the first node, and the multicast routing identifier of the first node is used to indicate that the destination device is the first device.

[0488] In one possible design, the first node and the second node are nodes within the first network. The first message further includes: a third header and a fourth header, the third header includes: the multicast routing information of the second node, and the fourth header includes: the unicast / multicast information of the third network.

[0489] Optionally, the second node is a node within the third network.

[0490] In one possible design, the unicast / multicast information includes any one of the following: Internet Protocol (IP) unicast / multicast information, Multiprotocol Label Switching (MPLS) label information, or bit string information.

[0491] Optionally, the transceiver module 2901 may also include a sending module and a receiving module. Among them, the sending module is used to implement the sending function of the communication device 2900, and the receiving module is used to implement the receiving function of the communication device 2900

[0492] Optionally, the communication device 2900 may further include a storage module ( Fig.29 not shown in the figure), and the storage module stores programs or instructions. When the processing module 2902 executes the program or instruction, the communication device 2900 can execute Figure 8 the functions of the first node in the method shown in the figure.

[0493] It should be understood that the processing module 2902 involved in the communication device 2900 may be implemented by a processor or processor-related circuit components, and may be a processor or a processing unit; the transceiver module 2901 may be implemented by a transceiver or transceiver-related circuit components, and may be a transceiver or a transceiver unit.

[0494] It should be noted that the communication device 2900 may specifically be a terminal or a network device, or may also be a chip (system) or other components or assemblies that can be set in a terminal or a network device, or may also be a device including a terminal or a network device. The present application does not make any limitations in this regard.

[0495] In addition, the technical effects of the communication device 2900 can refer to Figure 8 the technical effects corresponding to the first node in the method shown in the figure, which will not be elaborated here.

[0496] In some other embodiments, the communication device 2900 may be Figure 8 the second node in the method shown in the figure.

[0497] Among them, the processing module 2902 is used to obtain the first message; the transceiver module 2901 is used to send the first message to the first node, and the first node is a child node of the second node in the multicast tree. Among them, the first message includes: the multicast routing information of the second node, the multicast routing identifier of a node is used for the non-leaf child nodes of the node in the multicast tree to determine the multicast routing information of the non-leaf child nodes, and the multicast routing information of a node includes: the multicast routing identifier of the node and the multicast routing information of the non-leaf child nodes of the node in the multicast tree;

[0498] In a possible design, the first node and the second node are nodes within the first network, and the first message further includes: a third header and a fourth header, the third header includes: the multicast routing information of the second node, and the fourth header includes: the unicast / multicast information of the third network.

[0499] Optionally, the second node is a node within the third network.

[0500] Optionally, the unicast / multicast information includes any one of the following: Internet Protocol (IP) unicast / multicast information, Multiprotocol Label Switching (MPLS) label information, or bit string information.

[0501] Optionally, the transceiver module 2901 may also include a sending module and a receiving module. Among them, the sending module is used to implement the sending function of the communication device 2900, and the receiving module is used to implement the receiving function of the communication device 2900.

[0502] Optionally, the communication device 2900 may further include a storage module ( Fig.29 not shown in the figure), and the storage module stores programs or instructions. When the processing module 2902 executes the programs or instructions, the communication device 2900 can execute Figure 8 the functions of the second node in the method shown.

[0503] It should be understood that the processing module 2902 involved in the communication device 2900 may be implemented by a processor or processor-related circuit components, and may be a processor or a processing unit; the transceiver module 2901 may be implemented by a transceiver or transceiver-related circuit components, and may be a transceiver or a transceiver unit.

[0504] It should be noted that the communication device 2900 may specifically be a terminal or a network device, or may also be a chip (system) or other components or assemblies that can be set in a terminal or a network device, or may also be a device including a terminal or a network device. The present application does not make any limitations in this regard.

[0505] In addition, the technical effects of the communication device 2900 may refer to Figure 8 the technical effects corresponding to the second node in the method shown, which will not be elaborated here.

[0506] In some other embodiments, the communication device 2900 may be Fig.26 the fourth node in the method shown.

[0507] Among them, the transceiver module 2901 is used to obtain a fourth message; the processing module 2902 is used to control the transceiver module 2901 to send a fifth message to a fifth node according to the fourth message. Among them, the fourth node is a node within a fourth network, the fourth message includes: a fifth header, and the fifth header includes: bit string information of a fifth network; the fifth node is a node within the fourth network, and the fifth message includes: a fifth header and a sixth header, and the sixth header includes: bit string information of the fifth node.

[0508] In a possible design solution, the fourth node is configured with a first entry and a second entry. Among them, the first entry includes: bit string information of a fifth network, and the second entry includes: string bit information of the fifth node.

[0509] In a possible design, the processing module 2902 is further configured to encapsulate a sixth header in the fourth message to obtain a fifth message, so as to control the transceiver module 2901 to send the fifth message to the fifth node.

[0510] Optionally, the transceiver module 2901 may also include a sending module and a receiving module. Among them, the sending module is used to implement the sending function of the communication device 2900, and the receiving module is used to implement the receiving function of the communication device 2900

[0511] Optionally, the communication device 2900 may further include a storage module ( Fig.29 not shown in the figure), and the storage module stores programs or instructions. When the processing module 2902 executes the programs or instructions, the communication device 2900 can execute Fig.26 the functions of the fourth node in the method shown.

[0512] It should be understood that the processing module 2902 involved in the communication device 2900 may be implemented by a processor or processor-related circuit components, and may be a processor or a processing unit; the transceiver module 2901 may be implemented by a transceiver or transceiver-related circuit components, and may be a transceiver or a transceiver unit.

[0513] It should be noted that the communication device 2900 may specifically be a terminal or a network device, or may be a chip (system) or other components or assemblies that can be set in a terminal or a network device, or may also be a device including a terminal or a network device. The present application does not make any limitations in this regard.

[0514] In addition, the technical effects of the communication device 2900 can refer to Fig.26 the technical effects corresponding to the fourth node in the method shown, which will not be elaborated here.

[0515] In some other embodiments, the communication device 2900 may be Fig.26 the fifth node in the method shown.

[0516] Among them, the transceiver module 2901 is used to receive the fifth message from the fourth node; the processing module 2902 is used to parse the fifth message. Among them, the fourth node and the fifth node are nodes within the fourth network, the fourth message includes: a fifth header and a sixth header, the fifth header includes: bit string information of the fifth network, and the sixth header includes: bit string information of the fifth node.

[0517] In a possible design, the processing module 2902 is further configured to, after parsing the fifth message, strip the sixth header from the fifth message to obtain the fourth message, so as to control the transceiver module 2901 to send the fourth message to the fifth network.

[0518] Optionally, the transceiver module 2901 may also include a transmitting module and a receiving module. Among them, the transmitting module is used to implement the transmitting function of the communication device 2900, and the receiving module is used to implement the receiving function of the communication device 2900

[0519] Optionally, the communication device 2900 may further include a storage module ( Fig.29 not shown in the figure), and the storage module stores programs or instructions. When the processing module 2902 executes the programs or instructions, the communication device 2900 can perform Fig.26 the functions of the fifth node in the method shown in the figure.

[0520] It should be understood that the processing module 2902 involved in the communication device 2900 may be implemented by a processor or processor-related circuit components, and may be a processor or a processing unit; the transceiver module 2901 may be implemented by a transceiver or transceiver-related circuit components, and may be a transceiver or a transceiver unit.

[0521] It should be noted that the communication device 2900 may specifically be a terminal or a network device, or may be a chip (system) or other components or assemblies that can be set in a terminal or a network device, or may also be a device including a terminal or a network device. The present application does not make any limitations in this regard.

[0522] In addition, the technical effects of the communication device 2900 can refer to Fig.26 the technical effects corresponding to the fifth node in the method shown in the figure, which will not be elaborated here.

[0523] Exemplarily, Fig.30 is a schematic structural diagram of a communication device provided by an embodiment of the present application Figure 2 . The communication device may be a terminal or a network device, or may be a chip (system) or other components or assemblies that can be set in a terminal or a network device. As Fig.30 shown in the figure, the communication device 3000 may include a processor 3001. Optionally, the communication device 3000 may further include a memory 3002 and / or a transceiver 3003. Among them, the processor 3001 is coupled to the memory 3002 and the transceiver 3003, and may be connected through a communication bus, for example.

[0524] Next, the respective components of the communication device 3000 will be specifically introduced in conjunction with Fig.30 :

[0525] Among them, the processor 3001 is the control center of the communication device 3000, which can be a single processor or a collective term for multiple processing elements. For example, the processor 3001 is one or more central processing units (CPUs), or can be an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as: one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). In addition, the processor 3001 can also be a logic circuit.

[0526] Optionally, the processor 3001 can execute the above Figure 8 or Fig.26 method by running or executing software programs stored in the memory 3002 and calling data stored in the memory 3002.

[0527] In a specific implementation, as an embodiment, the processor 3001 can include one or more CPUs, such as Fig.30 CPU0 and CPU1 shown in

[0528] In a specific implementation, as an embodiment, the communication device 3000 can also include multiple processors, such as Fig.30 the processor 3001 and the processor 3004 shown in

[0529] Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). Here, the processor can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0530] Optionally, the memory 3002 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or may be an electrically erasable programmable read-only memory (EEPROM), a 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 the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 3002 may be integrated with the processor 3001 or may exist independently and be coupled to the processor 3001 through the interface circuit of the communication device 3000 ( Fig.30 not shown in the figure), and the embodiments of the present application do not make specific limitations thereto.

[0531] A transceiver 3003 is used for communication with other communication devices. For example, when the communication device 3000 is a terminal device, the transceiver 3003 may be used for communication with a network device or with another terminal device. For another example, when the communication device 3000 is a network device, the transceiver 3003 may be used for communication with a terminal device or with another network device.

[0532] Optionally, the transceiver 3003 may include a receiver and a transmitter ( Fig.30 not shown separately). Among them, the receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.

[0533] Optionally, the transceiver 3003 may be integrated with the processor 3001 or may exist independently and be coupled to the processor 3001 through the interface circuit of the communication device 3000 ( Fig.30 not shown in the figure), and the embodiments of the present application do not make specific limitations thereto. In addition, the interface circuit may also be an input / output interface.

[0534] It should be noted that Fig.30 the structure of the communication device 3000 shown in the figure does not constitute a limitation on the communication device. The actual communication device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0535] In addition, for the technical effects of the communication device 3000, reference may be made to the technical effects of the communication method described in the foregoing method embodiments, which will not be elaborated herein.

[0536] An embodiment of the present application provides a communication system. The communication system includes one or more of the foregoing terminals or network devices. The network device is configured to execute the foregoing Figure 8 or Fig.26 method.

[0537] It should be understood that the processor in the embodiments of the present application may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0538] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0539] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more collections of available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.

[0540] It should be understood that the term "and / or" in this document is merely a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B can be singular or plural. In addition, the character " / " in this document generally represents an "or" relationship between the associated objects before and after, but it may also represent an "and / or" relationship, which can be specifically understood with reference to the context.

[0541] In the present application, "at least one" means one or more, and "a plurality" means two or more. "At least one of the following items (pieces)" or its similar expressions refer to any combination of these items, including any combination of single items (pieces) or plural items (pieces). For example, at least one of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or multiple.

[0542] It should be understood that in various embodiments of the present application, the magnitudes of the sequence numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0543] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0544] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0545] In several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0546] 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 can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0547] In addition, the functional units in each embodiment of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0548] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0549] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claimed rights.

Claims

1. A communication method, characterized in that The method includes: A first node receives a first message from a second node. The first message includes multicast routing information of the second node. The first node is a child node of the second node in a multicast tree. A multicast routing identifier of a node is used by non-leaf child nodes of the node in the multicast tree to determine the multicast routing information of the non-leaf child nodes. The multicast routing information of a node includes the multicast routing identifier of the node and the multicast routing information of the non-leaf child nodes of the node in the multicast tree. The first node parses the first message.

2. The method according to claim 1, characterized in that, The first node is a non-leaf child node of the second node, and a third node is a child node of the first node. The first node parsing the first message includes: The first node generates a second message according to the first message. The second message includes the multicast routing information of the first node or the multicast routing information of the third node. The multicast routing information of the first node includes any one of the following: the multicast routing identifier of the first node and the multicast routing information of the third node, the multicast routing identifier of the first node, or the multicast routing identifiers of the first node and the third node. After the first node parses the first message, the method further includes: The first node sends the second message to the third node.

3. The method according to claim 2, wherein The first node generating the second message according to the first message includes: The first node determines the multicast routing information of the first node according to the multicast routing identifier of the second node. The first node encapsulates the message according to the multicast routing information of the second node to obtain the second message. Alternatively, the first node generating the second message according to the first message includes: The first node determines the multicast routing information of the first node according to the multicast routing identifier of the second node. The first node determines the multicast routing information of the third node according to the multicast routing identifier of the first node in the multicast routing information of the first node. The first node encapsulates the message according to the multicast routing information of the third node to obtain the second message.

4. The method according to claim 3, wherein The first node determining the multicast routing information of the first node according to the multicast routing identifier of the second node includes: The first node determines the position of the first node in a first node set according to the multicast routing identifier of the second node. The first node set is the node set corresponding to the second node, and the first node set includes some or all of the potential child nodes of the second node. The first node determines the multicast routing information of the first node according to the position of the first node in the first node set.

5. The method according to claim 4, characterized in that The multicast routing identifier of the second node includes N first fields, where N is the number of nodes in the first node set. The first node determining the position of the first node in the first node set according to the multicast routing identifier of the second node includes: The first node determines the position of the first field corresponding to the first node among the N first fields, and the position of the first field corresponding to the first node is used to represent the position of the first node within the set of first nodes.

6. The method according to claim 3, characterized in that The multicast routing information of the second node further includes the addressing field of the second node. The first node determines the multicast routing information of the first node based on the multicast routing identifier of the second node, including: The first node determines the multicast routing information of the first node based on the multicast routing identifier of the second node and the addressing field of the second node.

7. The method according to claim 6, characterized in that, The addressing field of the second node is used to indicate the length of the multicast routing information of the child nodes of the second node; or, the addressing field of the node of the second node is used to indicate the start position or end position of the multicast routing information of the child nodes of the second node; or, the addressing field of the second node includes: a plurality of delimiter fields, and the multicast routing information of the child nodes of the second node is separated by the plurality of delimiter fields.

8. The method according to any one of claims 2-7, characterized in that, The first node and the third node are nodes within a first network. The second message further includes: a first header and a second header. The first header includes: the multicast routing information of the third node, or the multicast routing information of the first node. The second header includes: unicast / multicast information of a second network.

9. The method according to claim 8, characterized in that, The first node has a corresponding relationship between the multicast routing identifier of the first node or the multicast routing identifier of the third node and the unicast / multicast information of the second network.

10. The method according to claim 8, wherein The first node is a node within the second network.

11. The method according to claim 1, wherein The first node is a leaf child node of the second node. The first node parses the first message, including: The first node generates a third message based on the first message, where the third message includes: unicast / multicast information of a first device; After the first node parses the first message, the method further includes: The first node sends the third message to the first device.

12. The method according to claim 11, wherein The first message includes the multicast routing identifier of the first node, and the multicast routing identifier of the first node is used to indicate that the destination device is the first device.

13. The method according to claim 1, characterized in that The first node and the second node are nodes within a first network. The first message further includes: a third header and a fourth header. The third header includes: the multicast routing information of the second node. The fourth header includes: unicast / multicast information of a third network.

14. The method according to claim 13, wherein The second node is a node within the third network.

15. The method according to claim 8, wherein The unicast / multicast information includes any one of the following: Internet Protocol (IP) unicast / multicast information, Multiprotocol Label Switching (MPLS) label information, or bit string information.

16. A communication method, characterized in that, The method includes: The second node obtains a first message, where the first message includes: the multicast routing information of the second node. A multicast routing identifier of a node is used for non-leaf child nodes of the node in a multicast tree to determine the multicast routing information of the non-leaf child nodes. The multicast routing information of the node includes: the multicast routing identifier of the node and the multicast routing information of the non-leaf child nodes of the node in the multicast tree; The second node sends the first message to a first node, where the first node is a child node of the second node in the multicast tree.

17. The method according to claim 16, wherein The first node and the second node are nodes within a first network. The first message further includes: a third header and a fourth header. The third header includes: the multicast routing information of the second node. The fourth header includes: unicast / multicast information of a third network.

18. The method according to claim 17, wherein The second node is a node within the third network.

19. The method according to any one of claims 16 - 18, characterized in that, The unicast / multicast information includes any one of the following: Internet Protocol (IP) unicast / multicast information, Multiprotocol Label Switching (MPLS) label information, or bit string information.

20. A first node, characterized in that, including: a transceiver module and a processing module, where the transceiver module is configured to receive a first message from the second node, where the first message includes: the multicast routing information of the second node. The first node is a child node of the second node in the multicast tree. A multicast routing identifier of a node is used for non-leaf child nodes of the node in the multicast tree to determine the multicast routing information of the non-leaf child nodes. The multicast routing information of the node includes: the multicast routing identifier of the node and the multicast routing information of the non-leaf child nodes of the node in the multicast tree; the processing module is configured to parse the first message.

21. The node according to claim 20, wherein The first node is a non-leaf child node of the second node. The processing module is further configured to generate a second message according to the first message, where the second message includes: the multicast routing information of the first node, or the multicast routing information of a third node. The multicast routing information of the first node includes any one of the following: the multicast routing identifier of the first node and the multicast routing information of the third node, the multicast routing identifier of the first node, or the multicast routing identifiers of the first node and the third node. The transceiver module is further configured to send the second message to the third node.

22. The node according to claim 21, wherein The processing module is further configured to determine the multicast routing information of the first node according to the multicast routing identifier of the second node; perform message encapsulation according to the multicast routing information of the second node to obtain the second message; or, the processing module is further configured to enable the first node to determine the multicast routing information of the first node according to the multicast routing identifier of the second node; determine the multicast routing information of the third node according to the multicast routing identifier of the first node in the multicast routing information of the first node; perform message encapsulation according to the multicast routing information of the third node to obtain the second message.

23. The node according to claim 22, characterized in that, The processing module is further configured to determine the position of the first node within the first node set according to the multicast routing identifier of the second node, and determine the multicast routing information of the first node according to the position of the first node within the first node set. The first node set is the node set corresponding to the second node, and the first node set includes some or all of the potential child nodes of the second node.

24. The node according to claim 23, wherein The multicast routing identifier of the second node includes: N first fields, where N is the number of nodes in the first node set. The processing module is further configured to determine the position of the first field corresponding to the first node among the N first fields, and the position of the first field corresponding to the first node is used to represent the position of the first node within the first node set.

25. The node according to claim 22, characterized in that, The multicast routing information of the second node further includes an addressing field of the second node. The processing module is further configured to determine the multicast routing information of the first node according to the multicast routing identifier of the second node and the addressing field of the second node.

26. The node according to claim 25, wherein, The addressing field of the second node is used to indicate the length of the multicast routing information of the child nodes of the second node; or, the addressing field of the second node is used to indicate the start position or end position of the multicast routing information of the child nodes of the second node; or, the addressing field of the second node includes: a plurality of delimiter fields, and the multicast routing information of the child nodes of the second node is separated by the plurality of delimiter fields.

27. The node according to any one of claims 21 - 26, characterized in that, The first node and the third node are nodes within a first network. The second message further includes: a first header and a second header. The first header includes: the multicast routing information of the third node, or the multicast routing information of the first node. The second header includes: unicast / multicast information of a second network.

28. The node according to claim 27, wherein, The first node has a corresponding relationship between the multicast routing identifier of the first node or the third node and the unicast / multicast information of the second network.

29. The node according to claim 27, wherein The first node is a node within the second network.

30. The node according to claim 20, wherein The first node is a leaf child node of the second node. The processing module is further configured to generate a third message according to the first message, where the third message includes: unicast / multicast information of a first device. The transceiver module is further configured to send the third message to the first device.

31. The node according to claim 30, wherein The first message includes the multicast routing identifier of the first node, and the multicast routing identifier of the first node is used to indicate that the destination device is the first device.

32. The node according to claim 20, wherein, The first node and the second node are nodes within a first network. The first message further includes: a third header and a fourth header. The third header includes: the multicast routing information of the second node. The fourth header includes: unicast / multicast information of a third network.

33. The node according to claim 32, wherein The second node is a node within the third network.

34. The node according to claim 27, wherein The unicast / multicast information includes any one of the following: Internet Protocol (IP) unicast / multicast information, Multiprotocol Label Switching (MPLS) label information, or bit string information.

35. A second node, characterized in that, Includes: A processing module and a transceiver module, where The processing module is configured to obtain a first message, where the first message includes: the multicast routing information of the second node, and a multicast routing identifier of a node is used for a non-leaf child node of the node in the multicast tree to determine the multicast routing information of the non-leaf child node. The multicast routing information of the node includes: the multicast routing identifier of the node and the multicast routing information of the non-leaf child node of the node in the multicast tree. The transceiver module is configured to send the first message to a first node, where the first node is a child node of the second node in the multicast tree.

36. The node according to claim 35, wherein The first node and the second node are nodes within a first network. The first message further includes: a third header and a fourth header. The third header includes: the multicast routing information of the second node. The fourth header includes: unicast / multicast information of a third network.

37. The node according to claim 36, wherein, The second node is a node within the third network.

38. The node according to any one of claims 35 - 37, characterized in that, The unicast / multicast information includes any one of the following: Internet Protocol (IP) unicast / multicast information, Multiprotocol Label Switching (MPLS) label information, or bit string information.

39. A communication device, characterized in that, The apparatus includes: a processor and a memory. The memory is configured to store a computer program. When the processor executes the program, the method according to any one of claims 1-15 is performed, or the method according to any one of claims 16-19 is performed.

40. A computer program product, characterized in that, The computer program product includes: a computer program. When the computer program runs on a computer, the method according to any one of claims 1-15 is performed, or the method according to any one of claims 16-19 is performed.

Citation Information

Patent Citations

  • Method and equipment for many-one reducibility scene multicast data transmission

    CN104717143A

  • Multicast routing processing method, network device and routing reflector

    CN110278156A

Cited By

  • Communication method and device

    EP4380129B1