WO2022199294A1 - 组播报文发送方法及装置 - Google Patents

组播报文发送方法及装置 Download PDF

Info

Publication number
WO2022199294A1
WO2022199294A1 PCT/CN2022/076838 CN2022076838W WO2022199294A1 WO 2022199294 A1 WO2022199294 A1 WO 2022199294A1 CN 2022076838 W CN2022076838 W CN 2022076838W WO 2022199294 A1 WO2022199294 A1 WO 2022199294A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
multicast
entity
multicast routing
child
Prior art date
Application number
PCT/CN2022/076838
Other languages
English (en)
French (fr)
Inventor
王闯
孟锐
陈哲
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP22773956.2A priority Critical patent/EP4300913A1/en
Publication of WO2022199294A1 publication Critical patent/WO2022199294A1/zh
Priority to US18/472,896 priority patent/US20240064098A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/56Routing software
    • H04L45/566Routing instructions carried by the data packet, e.g. active networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1854Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with non-centralised forwarding system, e.g. chaincast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1886Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with traffic restrictions for efficiency improvement, e.g. involving subnets or subdomains
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/48Routing tree calculation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/15Flow control; Congestion control in relation to multipoint traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/185Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with management of multicast group membership

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a method and device for sending multicast packets.
  • Multicast means that a sender sends a message carrying the same data to multiple specific receivers.
  • the original implementation is that the sender copies the data in a message into multiple copies according to the number of receivers, and encapsulates them and sends them to each other.
  • this approach results in repeated transmission of packets on certain links, which reduces the utilization rate of network resources and increases the possibility of network congestion.
  • PIM-SM protocol independent multicast-sparse mode
  • MFIB multicast forwarding information base
  • the embodiments of the present application provide a method and device for sending a multicast message, which are used to improve the scalability of the multicast message.
  • a method for sending a multicast packet including: a first node acquires a first multicast packet including multicast information of a second node, and sends the first multicast packet to the second node.
  • the second node is a non-leaf child node of the first node in the multicast tree
  • the multicast information of the second node includes the multicast routing information of the second node
  • the multicast routing information of a node includes the multicast routing information of the node
  • the routing identifier and the multicast routing information of the node's non-leaf child nodes in the multicast tree is used for the node to determine the child nodes in the multicast tree.
  • multicast routing information is embedded in a multicast packet, and the multicast routing information of the tree-shaped recursive structure included in the multicast packet can describe the packet forwarding of a multicast tree or a subtree of the multicast tree. information, good scalability, and can easily plan and specify forwarding paths as needed.
  • the multicast routing identifier of a node is used for the node to determine the child nodes of the node in the multicast tree in the first node set corresponding to the node, and the first node corresponding to the node
  • the node set includes some or all of the potential child nodes of the node.
  • the multicast routing identifier of a node includes information on the number of child nodes of the node and an identifier of each child node of the node.
  • the multicast routing identifier of a node includes a third field and X fourth fields; the third field is used to indicate the number X of child nodes of the node, and one of the fourth fields Field is used to indicate the identity of a child node of this node.
  • the multicast routing identifier of a node includes N third fields, where N is the number of nodes in the first node set corresponding to the node, and one of the third fields is used to indicate the Whether a node in the first node set is a child node of the node in the multicast tree, the first node set corresponding to a node includes part or all of the potential child nodes of the node.
  • N is the number of nodes in the first node set corresponding to the node
  • one of the third fields is used to indicate the Whether a node in the first node set is a child node of the node in the multicast tree, the first node set corresponding to a node includes part or all of the potential child nodes of the node.
  • the multicast routing identifier of a node includes a third field, the third field includes a first group identifier, and the first group identifier is used to indicate the first node group corresponding to the node , the nodes in the first node group corresponding to a node are all child nodes of the node.
  • This possible implementation can provide the most efficient multicast encapsulation in a multicast scenario with the highest density of nodes in the multicast tree.
  • the multicast routing information of a node further includes an addressing field of the node; wherein, the addressing field of a node is used for the node to determine the multicast routing information of the non-leaf child nodes of the node s position.
  • the addressing field of a node is used to indicate the length of the multicast routing information of the non-leaf child nodes of the node. This possible implementation can save the bit overhead of the addressing field and improve resource utilization.
  • the addressing field of a node is used to indicate the start position or end position of the multicast routing information of the non-leaf child nodes of the node. This possible implementation can enable the node to quickly determine the location of the multicast routing information and improve the multicast efficiency.
  • the addressing field of a node includes a plurality of delimitation fields, and the multicast routing information of the non-leaf child nodes of the node is separated by the plurality of delimitation fields.
  • the multicast information of the second node further includes: a first field of the second node; the first field is used to indicate the length of the multicast routing information of the second node Or the length of the multicast information of the second node.
  • the multicast information of the second node further includes: a second field, where the second field is used to align bytes of the multicast information of the second node.
  • the first multicast packet is an IP packet
  • the destination address in the first multicast packet is the address of the second node
  • the first multicast packet also Including data
  • the multicast information of the second node in the first multicast packet is located between the IP header of the first multicast packet and the data.
  • the obtaining, by the first node, the first multicast packet includes: the first node receiving a second multicast packet, and the second multicast packet includes the first multicast packet.
  • multicast routing information of the node the first node determines that the second node is a non-leaf child node of the first node; the first node obtains the first node according to the multicast routing information of the first node The multicast routing information of the two nodes; the first node performs packet encapsulation according to the multicast routing information of the second node to obtain the first multicast packet.
  • the first node acquiring the multicast routing information of the second node according to the multicast routing information of the first node includes: the first node according to the first node The addressing field in the multicast routing information of the second node determines the location of the multicast routing information of the second node; the first node obtains the group of the second node according to the location of the multicast routing information of the second node. broadcast routing information.
  • the first node is a source node of the multicast tree
  • acquiring the first multicast packet by the first node includes: generating the first group by the first node broadcast the message.
  • the first node is a source node of the multicast tree
  • acquiring the first multicast packet by the first node includes: generating, by the first node, a second multicast packet
  • the second multicast packet includes the multicast routing information of the first node; the first node determines that the second node is a non-leaf child node of the first node; the first node Obtain the multicast routing information of the second node according to the multicast routing information of the first node; the first node obtains the first multicast by encapsulating packets according to the multicast routing information of the second node message.
  • the first node includes at least one entity
  • the second node includes at least one entity
  • the first multicast packet is an entity in the first node sending the message to the A multicast packet sent by an entity in the second node.
  • the multicast routing identifier of a node is specifically used by the entity in the node to determine the child node of the node in the multicast tree.
  • a method for sending a multicast packet is provided, which is applied to a first entity, where the first entity belongs to a first node, and the method includes: the first entity receives a third multicast packet, and the The third multicast packet includes the first multicast routing information of the first node; wherein, the first multicast routing information of the first node includes the first multicast routing identifier of the first node and the first multicast routing information of the first node. Describe the multicast routing information of the non-leaf child node corresponding to the first multicast routing identifier of the first node; the multicast routing information of a node includes the multicast routing identifier of the node and the non-leaf child of the node in the multicast tree.
  • the multicast routing information of the node, the multicast routing identifier of a node is used by the entity in the node to determine the child node of the node in the multicast tree; the first multicast routing identifier of the first node is the same as the first multicast routing identifier of the first node.
  • the multicast routing identifier of the first node is the same or obtained by updating the multicast routing identifier of the first node; the first entity determines the second entity according to the first multicast routing identifier of the first node, and the The second entity is an entity in the first node; the first entity sends a fourth multicast packet to the second entity, and the fourth multicast packet includes the second group of the first node multicast routing information, the second multicast routing information of the first node includes the second multicast routing identifier of the first node and the third multicast routing identifier of the first node corresponding to some or all of the non-leaf children
  • the multicast routing information of the node; the third multicast routing identifier of the first node is the same as the first multicast routing identifier of the first node or by updating the first multicast routing identifier of the first node It is obtained that the second multicast routing identifier of the first node is the same as the third multicast routing identifier of the first node or obtained by
  • the first entity determining the second entity according to the first multicast routing identifier of the first node includes: the first entity determines the second entity according to the first multicast routing identifier of the first node The routing identifier searches the multicast forwarding table to obtain the second entity.
  • the method further includes: the first entity determines a first child node according to a first multicast routing identifier of the first node, and the first child node is the first child node. A child node corresponding to the first entity in the child nodes of the node in the multicast tree; the first entity sends a fifth multicast packet to the first child node, the fifth multicast packet Including multicast routing information of the first child node.
  • the first entity does not belong to the first child node, and the first entity sends a fifth multicast packet to the first child node, including: the first entity The fifth multicast packet is sent to the third entity in the first child node.
  • the first entity belongs to the first child node
  • the method further includes: the first entity determines the second child node according to the multicast routing identifier of the first child node , the second child node is a child node corresponding to the first entity in the child nodes of the first child node in the multicast tree.
  • the first entity belongs to the first child node
  • the first child node further includes a fourth entity
  • the method further includes: the first entity reports to the fourth entity
  • the entity sends a sixth multicast packet, where the sixth multicast packet includes the first multicast routing information of the first child node, and the first multicast routing information of the first child node includes the first multicast routing information of the first child node.
  • the second multicast routing identifier of the node is the same or obtained by updating the second multicast routing identifier of the first child node.
  • a first node including: a processing unit and a communication unit; the processing unit is configured to acquire a first multicast packet, where the first multicast packet includes the multicast of the second node information, the second node is a non-leaf child node of the first node in the multicast tree, and the multicast information of the second node includes the multicast routing information of the second node;
  • the multicast routing information 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, and the multicast routing identifier of a node is used for the node to determine the A child node in the tree;
  • the communication unit is configured to send the first multicast message to the second node.
  • the multicast routing identifier of a node is used for the node to determine the child nodes of the node in the multicast tree in the first node set corresponding to the node, and the first node corresponding to the node
  • the node set includes some or all of the potential child nodes of the node.
  • the multicast routing identifier of a node includes information on the number of child nodes of the node and an identifier of each child node of the node.
  • the multicast routing identifier of a node includes a third field and X fourth fields; the third field is used to indicate the number X of child nodes of the node, and one of the fourth fields Field is used to indicate the identity of a child node of this node.
  • the multicast routing identifier of a node includes N third fields, where N is the number of nodes in the first node set corresponding to the node, and one of the third fields is used to indicate the Whether a node in the first node set is a child node of the node in the multicast tree, the first node set corresponding to a node includes part or all of the potential child nodes of the node.
  • the multicast routing identifier of a node includes a third field, the third field includes a first group identifier, and the first group identifier is used to indicate the first node group corresponding to the node , the nodes in the first node group corresponding to a node are all child nodes of the node.
  • the multicast routing information of a node further includes an addressing field of the node; wherein, the addressing field of a node is used for the node to determine the multicast routing information of the non-leaf child nodes of the node s position.
  • the addressing field of a node is used to indicate the length of the multicast routing information of the non-leaf child nodes of the node.
  • the addressing field of a node is used to indicate the start position or end position of the multicast routing information of the non-leaf child nodes of the node.
  • the addressing field of a node includes a plurality of delimitation fields, and the multicast routing information of the non-leaf child nodes of the node is separated by the plurality of delimitation fields.
  • the multicast information of the second node further includes: a first field of the second node; the first field is used to indicate the length of the multicast routing information of the second node Or the length of the multicast information of the second node.
  • the multicast information of the second node further includes: a second field, where the second field is used to align bytes of the multicast information of the second node.
  • the first multicast packet is an IP packet
  • the destination address in the first multicast packet is the address of the second node
  • the first multicast packet also Including data
  • the multicast information of the second node in the first multicast packet is located between the IP header of the first multicast packet and the data.
  • the processing unit is specifically configured to: receive a second multicast packet through the communication unit, where the second multicast packet includes multicast routing information of the first node ; Determine that the second node is a non-leaf child node of the first node; obtain the multicast routing information of the second node according to the multicast routing information of the first node; According to the group of the second node The first multicast packet is obtained by encapsulating the packet with the multicast routing information.
  • the processing unit is specifically configured to: determine the location of the multicast routing information of the second node according to the addressing field in the multicast routing information of the first node; The multicast routing information of the second node is obtained from the location of the multicast routing information of the second node.
  • the first node is a source node of the multicast tree
  • the processing unit is specifically configured to: generate the first multicast packet.
  • the first node is the source node of the multicast tree
  • the processing unit is specifically configured to: generate a second multicast packet, where the second multicast packet includes multicast routing information of the first node; determine that the second node is a non-leaf child node of the first node; obtain the multicast routing of the second node according to the multicast routing information of the first node information; and performing packet encapsulation according to the multicast routing information of the second node to obtain the first multicast packet.
  • the first node includes at least one entity
  • the second node includes at least one entity
  • the first multicast packet is an entity in the first node sending the message to the A multicast packet sent by an entity in the second node.
  • the multicast routing identifier of a node is specifically used by the entity in the node to determine the child node of the node in the multicast tree.
  • a first entity in a fourth aspect, belongs to a first node, and the first entity includes: a communication unit and a processing unit; the communication unit is configured to receive a third multicast packet, The third multicast packet includes the first multicast routing information of the first node; wherein the first multicast routing information of the first node includes the first multicast routing identifier of the first node and the The multicast routing information of the non-leaf child node corresponding to the first multicast routing identifier of the first node; the multicast routing information of a node includes the multicast routing identifier of the node and the non-leaf node of the node in the multicast tree.
  • the multicast routing information of the child node, the multicast routing identifier of a node is used by the entity in the node to determine the child node of the node in the multicast tree; the first multicast routing identifier of the first node is the same as the The multicast routing identifier of the first node is the same or obtained by updating the multicast routing identifier of the first node; the processing unit is configured to determine the second multicast routing identifier according to the first multicast routing identifier of the first node.
  • the communication unit is further configured to send a fourth multicast packet to the second entity, where the fourth multicast packet includes the first Second multicast routing information of a node, the second multicast routing information of the first node includes the second multicast routing identifier of the first node corresponding to the third multicast routing identifier of the first node
  • the multicast routing information of some or all of the non-leaf child nodes the third multicast routing identifier of the first node is the same as the first multicast routing identifier of the first node or the The multicast routing identifier is updated, and the second multicast routing identifier of the first node is the same as the third multicast routing identifier of the first node, or the third multicast routing identifier of the first node is updated. Update got.
  • the processing unit is specifically configured to: search for a multicast forwarding table according to the first multicast routing identifier of the first node to obtain the second entity.
  • the processing unit is further configured to determine a first child node according to a first multicast routing identifier of the first node, where the first child node is where the first node is located. a child node corresponding to the first entity in the child nodes in the multicast tree; the communication unit is further configured to send a fifth multicast packet to the first child node, the fifth multicast packet Including multicast routing information of the first child node.
  • the first entity does not belong to the first sub-node
  • the communication unit is specifically configured to: send the fifth group to a third entity in the first sub-node broadcast the message.
  • the processing unit is further configured to determine a second child node according to the multicast routing identifier of the first child node, and the The second child node is a child node corresponding to the first entity in the child nodes of the first child node in the multicast tree.
  • the first entity belongs to the first child node, and the first child node further includes a fourth entity; the communication unit is further configured to send the fourth entity to the fourth entity.
  • the sixth multicast packet includes the first multicast routing information of the first child node, and the first multicast routing information of the first child node includes the first multicast routing information of the first child node.
  • the multicast routing information of part or all of the non-leaf child nodes corresponding to the multicast routing identifier and the second multicast routing identifier of the first child node; the second multicast routing identifier of the first child node is the same as the second multicast routing identifier of the first child node.
  • the multicast routing identifier of the first child node is the same or obtained by updating the multicast routing identifier of the first child node, and the first multicast routing identifier of the first child node is the same as that of the first child node.
  • the two multicast routing identifiers are the same or obtained by updating the second multicast routing identifier of the first child node.
  • a communication device comprising: a processor.
  • the processor is connected to the memory, the memory is used for storing computer-executed instructions, and the processor executes the computer-executed instructions stored in the memory, thereby implementing any one of the methods provided in the first aspect or the second aspect.
  • the memory and the processor may be integrated together, or may be independent devices. In the latter case, the memory may be located in the communication device or outside the communication device.
  • the processor includes a logic circuit, and also includes an input interface and/or an output interface.
  • the output interface is used for performing the sending action in the corresponding method
  • the input interface is used for performing the receiving action in the corresponding method.
  • the communication device further includes a communication interface and a communication bus, and the processor, the memory and the communication interface are connected through the communication bus.
  • the communication interface is used to perform the actions of transceiving in the corresponding method.
  • the communication interface may also be referred to as a transceiver.
  • the communication interface includes at least one of a transmitter and a receiver. In this case, the transmitter is configured to perform the sending action in the corresponding method, and the receiver is configured to perform the receiving action in the corresponding method.
  • the communication device exists in the form of a chip product.
  • a sixth aspect provides a chip, comprising: a processor and an interface, the processor is coupled to a memory through the interface, and when the processor executes a computer program or instruction in the memory, any one of the first aspect or the second aspect provides method is executed.
  • a computer-readable storage medium comprising instructions, which, when executed on a computer, cause the computer to perform any one of the methods provided in the first aspect or the second aspect.
  • a computer program product comprising instructions that, when the instructions are run on a computer, cause the computer to execute any one of the methods provided in the first aspect or the second aspect.
  • FIG. 1A is a schematic diagram of a message multicast provided by an embodiment of the present application.
  • 1B is a schematic diagram of a topology connection and a multicast tree of an entity provided by an embodiment of the application;
  • FIG. 2 is a schematic diagram of a topology connection and a multicast tree of another entity provided by an embodiment of the present application;
  • 3A is a schematic diagram of a topology connection of another entity provided by an embodiment of the present application.
  • 3B is a schematic diagram of multicast packet transmission between routers according to an embodiment of the present application.
  • Fig. 4 is a kind of SPT and the schematic diagram of the MFIB table stored in the router in SPT;
  • Fig. 5 is a schematic diagram of the set division of BFER in a BIER
  • FIG. 6 is a flowchart of a method for sending a multicast packet according to an embodiment of the present application
  • FIG. 7 is a schematic structural diagram of a multicast packet according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of another multicast packet provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of another multicast packet provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of another multicast packet provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a multicast routing identifier provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of the correspondence between bits in a bit sequence and addresses of the next hop provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of the correspondence between bits in a bit sequence in a multicast message and an address of the next hop according to an embodiment of the present application;
  • FIG. 14 is a schematic structural diagram of another multicast packet provided by an embodiment of the present application.
  • 15 is a schematic structural diagram of a multicast routing identifier provided by an embodiment of the present application.
  • 16 is a schematic diagram of an addressing field provided by an embodiment of the present application.
  • FIG. 17 is a schematic diagram of yet another addressing field provided by an embodiment of the present application.
  • FIG. 18 is a schematic diagram of yet another addressing field provided by an embodiment of the present application.
  • FIG. 19 is a flowchart of another method for sending multicast packets provided by an embodiment of the present application.
  • FIG. 20 is a flowchart of still another method for sending a multicast packet according to an embodiment of the present application.
  • 21 is a schematic diagram of a topology connection between entities according to an embodiment of the present application.
  • 22 is a schematic structural diagram of a multicast tree and a multicast message provided by an embodiment of the present application.
  • FIG. 23 is a schematic structural diagram of yet another multicast tree and multicast message provided by an embodiment of the present application.
  • 24A is a schematic structural diagram of yet another multicast tree and multicast message provided by an embodiment of the present application.
  • FIG. 24B is a schematic structural diagram of another multicast packet provided by an embodiment of the present application.
  • FIG. 24C is a schematic structural diagram of another multicast packet provided by an embodiment of the present application.
  • FIG. 25 is a schematic diagram of another topology connection between entities according to an embodiment of the present application.
  • FIG. 26 is a schematic structural diagram of another multicast packet provided by an embodiment of the present application.
  • FIG. 27 is a schematic structural diagram of another multicast packet provided by an embodiment of the present application.
  • FIG. 28 is a schematic diagram of yet another multicast tree provided by an embodiment of the present application.
  • FIG. 29 is a schematic structural diagram of another multicast packet provided by an embodiment of the present application.
  • FIG. 30 is a schematic diagram of the composition of a communication device according to an embodiment of the present application.
  • FIG. 31 is a schematic diagram of a hardware structure of a communication device according to an embodiment of the present application.
  • words such as “first” and “second” are used to distinguish the same or similar items with basically the same function and effect.
  • words “first”, “second” and the like do not limit the quantity and execution order, and the words “first”, “second” and the like are not necessarily different.
  • the present application can be applied to a scenario where a sender needs to carry the same data in a message and send it to multiple receivers.
  • the message may be sent from the sender, and arrive at multiple receivers through multiple multicast nodes (hereinafter referred to as nodes for short).
  • This packet can be called a multicast packet, and the data in the multicast packet transmitted between different nodes is the same.
  • the sending end may be, for example, a server, and the receiving end may be, for example, a client.
  • the node has the capability of sending and forwarding multicast packets, and can forward the received multicast packets or send the generated multicast packets through multicast.
  • a node can include one entity or multiple entities.
  • An entity can belong to only one node, or it can belong to multiple nodes.
  • the left side is the network topology diagram of the entity
  • the right side is the multicast tree.
  • node Z includes multiple entities
  • the multiple entities are entity A, entity B, entity C, entity D and entity E
  • node E includes one entity, namely entity E. It can be seen that entity E belongs to both node Z and node E.
  • node X includes multiple entities, which are entity A and entity B. It can be seen that entity A and entity B belong to both node Z and node X.
  • the address of the entity can also be described as the address of the node
  • the action performed by the node is also the action performed by the entity. Therefore, when referring to the address of a node hereinafter, it refers to the address of the entity in the node.
  • a node that only includes entity A is called node A.
  • the address of node A is equal to the address of entity A
  • the node that includes only entity B is called node B.
  • the address of node B is equal to that of node entity B. the address of.
  • Entities can be physical entities or virtual entities.
  • Physical entities may be routers, switches, servers, hosts, network cards, line cards, chips, die of chips (DIEs), terminals (eg, mobile terminals), internal modules of devices, etc.
  • virtual entities may be virtual machines, containers, for example , processes, threads, etc.
  • the node can also be called a multicast device.
  • the multicast tree is based on specific
  • the network topology is a combination of a specific source node and destination node, which generates a path from the source node to all destination nodes.
  • the path is a tree structure with the source node as the root node and the destination node as the leaf node, called is a multicast tree.
  • a multicast tree can also be called a multicast distribution tree (MDT).
  • MDT multicast distribution tree
  • the left side is a network topology diagram of an entity. If the source node is Node B, and the destination nodes are Node C, Node D, and Node E, it is a part of the multicast tree generated by the combination of the source node and the destination node. An example of this can be seen on the right in Figure 2.
  • the sender and/or the receiver may be nodes in the multicast tree, or may not be nodes in the multicast tree. If it is the former, the source node can be the sender and the destination node can be the receiver.
  • the transmitting end and the receiving end are nodes in the multicast tree as an example to illustrate the methods provided in the embodiments of the present application. If the receiver is not a node in the multicast tree, after the data reaches the leaf node, the leaf node can send the received data to the receiver connected to it.
  • a module other than the network card in a server can be considered as a node (assumed as node a), the network card in the server can be considered as another node (assumed as node b), then node b can be considered as node a's child node.
  • a module other than a line card in a router can be considered as a node (assumed to be node c), and a line card in a router can be considered as another node (assumed as node d), then node d can be considered as node c. child node.
  • A is a router, node A0 in FIG.
  • node A1, node A2 and node A3 are three line cards in the router.
  • A can send multicast packets to Node B, Node C, Node D, Node E, Node F, and Node G respectively through the interfaces on the three line cards.
  • node A1, node A2 and node A3 may be child nodes of node A0.
  • A can also be a server. In this case, node A1, node A2, and node A3 are three network cards in the server.
  • A can connect to node B, node C, node D, node E, Node F and Node G send multicast packets.
  • a child node of a node refers to a node in the multicast tree to which the packet of the node can be reached through one-hop multicast (that is, only through one multicast forwarding).
  • the one-hop multicast refers to finding a multicast forwarding table once.
  • node R in FIG. 2 is a child node of node B
  • node S is a child node of node R
  • node E is a child node of node R.
  • router A and router C are routers that support multicast, and router B is a router that does not support multicast. At this time, router A sends a multicast packet to router C through router B, and router A sends a multicast packet to router C. and router C are nodes in the multicast tree, then router C is a child node of router A.
  • the child node of a node When the child node of a node is a leaf node of the multicast tree, the child node can be called the leaf child node of the node, and when the child node of a node is not the leaf node of the multicast tree, the child node can be called the leaf node of the multicast tree. Node's non-leaf children.
  • sub-nodes of a node mentioned in the following in this application all refer to the sub-nodes of the node in the multicast tree.
  • the child nodes may also have other names, for example, multicast child nodes, etc., which are not limited in this application.
  • a node to which an entity belongs may be a child node of another node to which the entity belongs.
  • the node X to which the entity A (or the entity B) belongs is a child node of the node Z to which the entity A (or the entity B) belongs.
  • a node to which an entity belongs may not be a child node of another node to which the node belongs.
  • a potential child node of a node is a node whose packets can be reached by one-hop multicast.
  • node R and node A in FIG. 2 are all potential child nodes of node B
  • node F, node R, node C and node D are all potential child nodes of node S.
  • the potential child nodes of a node include the child nodes of the node in the multicast tree.
  • the potential child node is also the child node of the node in the multicast tree.
  • Potential child nodes may also have other names, for example, multicast objects, prepared child nodes, etc., which are not limited in this application.
  • Multicast routing information For Multicast routing information, first multicast routing information, and second multicast routing information
  • the multicast routing information of a node is carried in a multicast packet forwarded between nodes.
  • Both the first multicast routing information and the second multicast routing information of a node are derived from the multicast routing information of the node, and are carried in multicast packets forwarded between entities in the node.
  • Multicast routing identifier first multicast routing identifier, second multicast routing identifier, and third multicast routing identifier
  • the multicast routing identifier of a node is carried in a multicast packet forwarded between nodes.
  • the first multicast routing ID, the second multicast routing ID, and the third multicast routing ID of a node are all derived from the multicast routing ID of the node, and carry the group forwarded between the entities in the node. in the broadcast message.
  • the packet is classified according to the behavior of the entity to process the packet.
  • both the unicast packet and the multicast packet are for the entity in this application.
  • Whether a packet is a unicast packet or a multicast packet is a Relatively, specifically:
  • the entity For an entity, if the received packet does not contain any multicast routing information that the entity needs to process or does not contain any multicast routing information, the entity does not need to multicast forward the packet (or does not need to Find the multicast forwarding table), and only need to perform unicast forwarding according to the unicast encapsulation in the message (or use the destination address of the unicast encapsulation to find the unicast forwarding table and forward) or consume the message (that is, process the message yourself. The message does not need to be forwarded), at this time, the message is a unicast message for the entity.
  • the message is a multicast message for the entity.
  • entity A and entity B have a topological connection
  • entity B and entity C have a topological connection.
  • the packet sent by entity A to entity C needs to pass through entity B to reach entity C. If the packet includes multicast routing information and Unicast encapsulation, where the destination address of the unicast encapsulation is the address of entity C, the packet is a unicast packet for entity B and a multicast packet for entity C.
  • entity A and entity B have topological connections, and entity A sends a packet to entity B.
  • the packet does not include multicast routing information, but includes unicast encapsulation.
  • the destination address of the unicast encapsulation is the address of entity B.
  • the message is a unicast message for entity B.
  • Packets are classified according to their structure. Specifically, a packet whose outermost header is a unicast header is a unicast packet, and a packet whose outermost header is a multicast header is a multicast packet. .
  • the IP header in which the destination IP address is a unicast address is a kind of unicast header, and the mac header in which the destination media access control (MAC) address is a unicast address is also a unicast header.
  • the IP header where the destination IP address is a multicast address is a multicast header, and the destination mac address is a mac header where the multicast address is also a multicast header.
  • the multicast information in this application is also a multicast header.
  • the first definition is used in the present application to describe the methods provided by the embodiments of the present application.
  • the second definition it can be determined whether the message is a unicast message or a multicast message according to the specific structure of the message. For example, in the following, the first node sends the first multicast message to the second node, If the outermost header of the first multicast packet is a unicast header, the first multicast packet can be described as a unicast packet when the second definition is used.
  • the unicast encapsulation in the message in this application may be the fourth edition of the Internet Protocol (IP) (referred to as IPv4) unicast encapsulation, the sixth edition of IP (referred to as IPv6) unicast encapsulation, or any other possible packages.
  • IP Internet Protocol
  • IPv6 the sixth edition of IP
  • any possible form of unicast encapsulation can be performed on the packet containing multicast routing information, or unicast encapsulation may not be performed.
  • the unicast encapsulation of the packet enables the packet to traverse two A network between entities (or rather a transport between 2 entities).
  • the multicast routing information mentioned in the explanation of the unicast message and the multicast message all refers to the multicast routing information defined below in this application.
  • the IP address of the multicast packet is a unicast address.
  • the header is the unicast encapsulation of the multicast packet.
  • the destination address refers to the destination IP address.
  • an entity receives a multicast packet and the multicast packet is an IP packet, the entity first determines whether the destination address in the IP header of the multicast packet is its own address , if yes, parse the multicast information after the IP header of the multicast packet, and forward the multicast packet according to the multicast information.
  • the entity In the process of sending multicast packets to other entities, the entity first determines the multicast information and data to be sent to other entities, then determines the address of the next hop (that is, the address of other entities), and fills in the addresses of other entities in The destination address field in the IP header, and the multicast information and data sent to other entities are encapsulated in the IP header to obtain multicast packets sent to other entities, and then sent to other entities.
  • this process is not described in each step, and is described in a unified manner here, and will not be repeated below.
  • the data in the multicast packet is also different for different parts in the multicast packet. Specifically, for a certain part in the multicast packet, the data refers to the part after the part in the multicast packet.
  • the data is the part after the outer encapsulation (ie, “multicast information of the second node + inner encapsulation + payload”), and for the multicast information of the second node, The data is the part after the multicast information of the second node (ie "inner encapsulation + payload”), and for the inner encapsulation, the data is the part after the inner encapsulation (ie "load").
  • the data mentioned in the embodiments of the present application all refer to the multicast information in the multicast message.
  • the data in the first multicast message shown in FIG. 9 is "inner layer encapsulation + payload”.
  • scheme 1 when forwarding multicast packets, it can be implemented through PIM-SM (referred to as scheme 1) or explicit bit index replication (bit index explicit replication, BIER) (referred to as scheme 2).
  • PIM-SM PIM-SM
  • BIER bit index explicit replication
  • PIM-SM is a multicast routing protocol.
  • PIM-SM is used to build an MFIB table hop-by-hop from the receiver to the multicast source (sender or rendezvous point (RP)), and finally constructs a group of A tree-like structure in which the broadcast source is the root node and the receiver is the leaf node, that is, a multicast tree.
  • the multicast packet starts from the root node in the multicast tree and moves toward the leaf node, and is replicated on each router (also called a multicast router) until it reaches the receiver. All receivers can form a multicast group, and a receiver is a member of the multicast group.
  • the multicast tree with the RP as the root node and the members of the multicast group as the leaf nodes is called a rendezvous point tree (RP Tree, RPT).
  • the multicast tree is called the shortest path tree (SPT).
  • SPT shortest path tree
  • the forwarding process of RPT and SPT is basically the same.
  • each router will store an MFIB table, and the MFIB table stores a group address and a port list.
  • the router receives the destination address as the group address
  • the multicast packet is sent through the ports in the port list.
  • Figure 4 for an MFIB table stored in an SPT and a router in an SPT.
  • R represents a common router
  • DR represents a designated router (a router that sends multicast packets to members in a multicast group). ).
  • PIM-SM needs to maintain an MFIB table in the network for each multicast stream, and the number of MFIB table entries maintained on each router is limited. If there are too many multicast trees or multicast streams, then It is necessary to expand more table spaces in the router to support the forwarding of multicast packets, and the scalability is very poor.
  • the multicast tree is constructed by building the MFIB table hop-by-hop from the receiver to the multicast source. Therefore, the multicast tree is completely fixed and cannot actively control the forwarding path based on planning.
  • the multicast tree is constructed by building the MFIB table hop-by-hop from the receiver to the multicast source, only the previous hop node knows when a leaf node joins or leaves the multicast tree, but the multicast source does not know, that is, In other words, the multicast source cannot perceive the existence of the user, and the manageability is poor.
  • the multicast tree is constructed by building the MFIB table hop-by-hop from the receiver to the multicast source, in order to maintain the hop-by-hop multicast state, the child nodes need to send join signaling regularly. For a long time, the router needs to process a large amount of periodic signaling, which increases the computing load, power consumption and processing resources of the router.
  • Scheme 2 Realize multicast packet forwarding through BIER.
  • BIER Stateless multicast routing protocol
  • a router that supports BIER is called BFR (Bit-Forwarding Router)
  • BFIR Bit-Forwarding Ingress Router
  • BFER bit-forwarding egress router.
  • BFRID unique identifier
  • BFRID unique identifier
  • SI set identifier
  • the BIER protocol specifies that a multicast packet indicates which BFERs to multicast to through the SI and bitstring carried in the header.
  • the bit string is a bitmap with a length of 256 bits, each bit corresponding to a BFER. For example, when the value of a bit corresponding to a BFER is 1, it indicates that multicasting to the BFER is required.
  • a multicast packet can only carry one SI and one bit string, so it can only be multicast to a certain set. Exemplarily, referring to FIG. 5 , the BFER with ID 2 in set 1 sends multicast packets to BFERs with IDs 258 and 510 in set 2 through node P (that is, a node inside the operator's network).
  • each BFER maintains a bit index forwarding table (BIFT), which is a multicast routing table defined by BIER.
  • BIFT bit index forwarding table
  • a multicast packet can only carry one SI and one bit string, it can only be multicast to a certain set, which means that if there are a total of 50 sets, and it needs to be sent to the BFER in the 50 sets To send multicast packets, 50 multicast packets need to be sent. Too many packets will lead to poor multicast efficiency.
  • the BIFT in BIER is fixed, that is to say, each node has a fixed next hop, so it is impossible to plan or specify path routing.
  • the present application provides a method for sending a multicast packet.
  • the method includes:
  • the first node obtains a first multicast packet, where the first multicast packet includes multicast information of the second node, the second node is a non-leaf child node of the first node in the multicast tree, and the group of the second node is The multicast information includes the multicast routing information of the second node; wherein, 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, a The multicast routing identifier of a node is used by the node to determine the child nodes in the multicast tree.
  • the first node may be any node in the multicast tree that has non-leaf child nodes.
  • the first node may include at least one entity.
  • the second node may include at least one entity.
  • the multicast routing identifier of a node is used to guide the node to forward multicast routing.
  • the multicast routing identifier of a node is used for the node to determine the child nodes of the node in the multicast tree in the first node set corresponding to the node, and the first node set corresponding to a node includes the node's Some or all potential child nodes.
  • One node may correspond to multiple node sets.
  • a set of nodes can be generated by a specific protocol, algorithm or configuration.
  • the first node set may be one of multiple node sets.
  • the first node set corresponding to a node may be indicated by the multicast routing identifier of the node.
  • the multicast routing identifier of the node may carry the set identifier, and the first node set may be indicated by the set identifier.
  • the first node set corresponding to a node may also be pre-configured in the node.
  • the multicast routing identifier of a node is specifically used by the entity in the node to determine the child node of the node in the multicast tree.
  • the multicast routing information of a non-leaf child node in the multicast routing information of a node may be a list of multicast routing information, and the list may be arranged in sequence, in a chain, or in other possible ways, which are not limited in this application. It can be understood that, if a node does not have a non-leaf child node, the multicast routing information of the node does not include the multicast routing information of the non-leaf child node, but only includes the multicast routing identifier of the node.
  • the first multicast packet includes multicast routing information in a tree-shaped recursive structure, and the multicast routing information of a non-leaf child node of the second node in the first multicast packet can be considered as A recursive unit in a recursive structure.
  • the multicast routing information of a non-leaf child node of a node is recorded as a recursive unit.
  • the The multicast routing information of the m+1th non-leaf child node is recorded 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 further 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.
  • the multicast routing information included in the first multicast packet may describe packet forwarding information of a certain multicast tree or a subtree of the multicast tree.
  • the first multicast report includes the multicast information of the second node, the multicast information of the second node includes the multicast routing identifier of the second node, and node 2 0 , node 2 1 , node 2 2 , , node 2 Multicast routing information of M1-1 . Further, the multicast routing information of each node in the node 2 0 , the node 2 1 , the node 2 2 , .
  • the node 2 M1-1 also includes the multicast routing information of the respective non-leaf child nodes.
  • the multicast routing information of node 20 includes the multicast routing identifier of node 20 , the first non-leaf child node of node 20 , the second The multicast routing information of the non-leaf child nodes, ..., the M2th non-leaf child node.
  • Each non-leaf child node of node 20 further includes multicast routing information of its own non-leaf child node, and so on.
  • Node 2 1 , Node 2 2 , ..., Node 2 M1-1 are similar.
  • the packet header of the multicast packet sent by node B to node R includes the multicast information of node R, and the multicast information of node R includes the multicast information of node R.
  • the multicast routing identifier of the node R and the multicast routing information of the non-leaf child nodes of the node R ie, the node S).
  • the multicast routing information of a node further includes an addressing field of the node.
  • the addressing field of a node is used for the node to determine the location of the multicast routing information of the non-leaf child nodes of the node.
  • the position may be the position of the multicast routing information of the non-leaf child nodes of the node in the multicast routing information or the multicast information of the node, or may refer to the position in the multicast packet.
  • the multicast routing information of the second node includes the addressing field of the second node
  • the multicast routing information of the node 20 includes the addressing field of the node 20
  • other nodes are similar. Exemplarily, referring to FIG.
  • the multicast routing information of the node R includes the addressing field of the node R.
  • the location of the multicast routing information of the non-leaf child nodes of the node may be statically configured in the node in addition to being indicated by the addressing field. For example, if a node has a fixed number of child nodes, and the child nodes of these child nodes are all leaf nodes, the multicast routing information of these child nodes only includes the multicast routing identifiers of these child nodes, and the multicast routing identifiers The length of the node is fixed. At this time, the length of the multicast routing information of these sub-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.
  • the multicast information of the second node further includes: a first field; the first field is used to indicate the length of the first field of the second node, the length of the addressing field of the second node, the group of the second node The sum of one or more lengths of the length of the multicast routing identifier and the total length of the multicast routing information of the non-leaf child nodes of the second node. The total length of the routing information.
  • the first field is used to indicate the length of the multicast routing information of the second node, or the length of the multicast routing information of the second node, or the multicast routing information of the non-leaf child nodes in the multicast routing information of the second node. The total length of the routing information.
  • the first field may also include a reserved field for subsequent function expansion.
  • the first field may be a fixed length field, eg, 1 byte (ie, 8 bits).
  • the multicast information of the second node further includes a first field.
  • the multicast information of node R further includes the first field.
  • the multicast information of the second node further includes: a second field, where the second field is used to align bytes of the multicast information of the second node.
  • the second field may also be referred to as a padding field.
  • the multicast information of the second node further includes a second field.
  • the multicast information of node R includes a second field. It should be noted that when performing byte alignment, it may be single-byte alignment. At this time, the existence of the second field is to make the number of bits of the entire multicast information divisible by 8, or 4-byte alignment.
  • the second field exists so that the number of bits of the entire multicast information can be an integer of 32, or it can be aligned with 8 bytes. At this time, the existence of the second field is so that the number of bits of the entire multicast information can be an integer of 64 .
  • the specific length of the second field can be determined according to the number of bytes to be aligned. It can be understood that, if there is no second field, the multicast routing information of the second node is already byte-aligned, and the second field is not required.
  • the method provided by the embodiments of the present application is exemplified by taking the byte alignment as a single-byte alignment as an example in the following description of the present application.
  • the first field and the second field may be added to the first multicast packet by the first node. For example, it is added to the first multicast message in the process of step 14) below.
  • the multicast information of the second node may be carried in the packet header of the first multicast packet.
  • the multicast information of the node can be regarded as the multicast encapsulation in the packet header of the multicast packet.
  • the packet header of the multicast packet in this application may include, in addition to multicast encapsulation, an outer encapsulation (Outer-header) and/or an inner encapsulation (Inner-header) header), and payload.
  • Outer encapsulation refers to the outer encapsulation compared with multicast encapsulation, which may be unicast encapsulation.
  • Inner layer encapsulation refers to the inner layer encapsulation compared to multicast encapsulation, which can be transport layer (transmission control protocol (TCP), user datagram protocol (UDP), etc.) encapsulation or any other encapsulation. possible packages.
  • transport layer transmission control protocol (TCP), user datagram protocol (UDP), etc.
  • the data for multicast information in the multicast packet is the information that actually needs to be sent to the leaf node.
  • step 601 When step 601 is specifically implemented, it can be implemented in the following manner 11 or manner 12 or manner 13.
  • Manner 11 The first node receives the second multicast packet, and obtains the first multicast packet according to the received second multicast packet.
  • Mode 11 may include:
  • the first node receives the second multicast packet, the second multicast packet includes the multicast routing information of the first node, and the multicast routing information of the first node includes the multicast routing identifier of the first node and the first node.
  • the multicast routing information of the non-leaf child nodes are included in the second multicast packet.
  • the first node determines that the second node is a non-leaf child node of the first node.
  • the first node acquires the multicast routing information of the second node according to the multicast routing information of the first node.
  • the first node performs packet encapsulation according to the multicast routing information of the second node to obtain the first multicast packet.
  • step 11 if the first node is not the source node of the multicast tree, the first node can receive the second multicast packet sent by other nodes in the multicast tree.
  • a non-leaf child node of a node can be configured in the node, in this case, the first node can determine whether the second node is the first node according to the configuration. Node's non-leaf children.
  • non-leaf child nodes and/or leaf child nodes of a node may be configured in the node, and the first node determines whether the second node is a child of the first node according to the multicast routing identifier of the first node node, if yes, then determine whether the second node is a non-leaf child node of the first node according to the information on whether the configured second node is a leaf node.
  • Step 13) can include:
  • the first node determines the location of the multicast routing information of the second node according to the addressing field in the multicast routing information of the first node.
  • step 13-1 For the specific implementation of step 13-1), reference may be made to the related description of the addressing field below, and details are not repeated here.
  • the first node acquires the multicast routing information of the second node according to the location of the multicast routing information of the second node.
  • Manner 12 The first node generates the first multicast packet, and the first node is the source node of the multicast tree.
  • Manner 13 The first node generates a second multicast packet, and acquires the first multicast packet according to the second multicast packet.
  • the second multicast packet includes multicast routing information of the first node.
  • Manner 13 may include: the first node generates a second multicast packet; the first node determines that the second node is a non-leaf child node of the first node; the first node obtains the multicast routing information according to the first node The multicast routing information of the second node; the first node performs packet encapsulation according to the multicast routing information of the second node to obtain the first multicast packet.
  • the implementation process of the steps that are the same as those of the way 11 can refer to the way 11, and details are not repeated here.
  • the first node sends a first multicast packet to the second node.
  • the second node receives the first multicast packet from the first node.
  • the first multicast message is a multicast message sent by an entity in the first node to an entity in the second node.
  • the processing of multicast packets between entities included in a node reference may be made to the embodiment shown in FIG. 20 .
  • the destination address in the unicast encapsulation in the first multicast packet is the address of the second node.
  • the first multicast packet may be an IP packet.
  • the destination address in the first multicast packet is the address of the second node, and the first multicast packet further includes data.
  • the multicast information of the two nodes is located between the IP header of the first multicast packet and the data.
  • the unicast encapsulation may include an indication field, which is used to indicate whether the unicast encapsulated information in the multicast packet contains multicast information. After receiving the multicast packet, the node or entity can The field determines whether the unicast encapsulated information in the multicast packet contains multicast information.
  • the "protocol" field in the IPv4 header may indicate whether the unicast encapsulated information in the multicast packet contains multicast information
  • the "Next Header" field in the IPv6 header can indicate whether the information after unicast encapsulation in the multicast packet contains multicast information.
  • the source address in the unicast encapsulation in the multicast packet sent by one node (for example, node a) to another node (for example, node b) may be the address of node a, It can also be the address of the source node in the multicast tree.
  • the source address in the unicast encapsulation in the multicast packet sent by node R to node S may be the address of node R or the address of node B.
  • the source address in the unicast encapsulation in the multicast packet sent by node S to node D may be the address of node S or the address of node B.
  • the node may determine the next hop node of the multicast packet through the multicast routing identifier in the multicast packet. For example, when a node receives a multicast packet, if the multicast routing identifier of the node is the following bit sequence, the node corresponding to the bit with a value of 1 in the multicast routing identifier is the address of the multicast packet. The next hop node, that is, the child node of the node is the next hop node of the multicast packet.
  • the multicast routing information is embedded in the multicast packet, and the multicast routing information of the tree-shaped recursive structure included in the multicast packet can describe the packet of a certain multicast tree or a subtree of the multicast tree.
  • Forwarding information has good scalability, and can easily plan and specify forwarding paths as needed.
  • the multicast routing identification of the node mentioned in the foregoing embodiment may be implemented in the following manner 21 , manner 22 or manner 23 .
  • the multicast routing identifier of a node includes information on the number of child nodes of the node and an identifier of each child node of the node.
  • the multicast routing identifier of a node includes a third field and X fourth fields, where the third field is used to indicate the number X of child nodes of the node, and a fourth field is used to indicate The identifier of a child node of this node.
  • the identification (ID) of the node may be, for example, the index of the node, the IP address of the node, or other identifications of the node. Taking the identifier of the node as the index of the node as an example, see (a) in FIG. 11 , the third field is denoted as Cnt (the abbreviation of Count), which indicates the number, and the fourth field is denoted as Idx (that is, the index of the Index).
  • Idx i is the index of the ith child node of the node, Idx 1 to Idx x form an Idx sequence, and i is an integer greater than 0 and less than or equal to X.
  • the nodes in the first node set corresponding to one node may have consecutive numbers, for example, 0, 1, 2, . . .
  • the index of a node can be the number of the node, and a node can determine which nodes need to send multicast packets (that is, determine which nodes to send multicast packets to) through the index of the node carried in the multicast routing identifier of the node in the received multicast packet. node is a child of itself).
  • the number of the node in the first node set corresponding to a node may also be a continuous value starting from another value (for example, 1) (that is, the index of the node in the first node set corresponding to the node is 1, 2, 3, ...), or can also be discrete values, which are not limited in this application.
  • the bit width of the fourth field N is the number of nodes in the first node set corresponding to the node.
  • the bit width of the fourth field may also be a fixed bit width, for example, 1 byte.
  • the bit width of the third field may be When the value of the third field is N-1 (that is, the value of the third field is 0 means N is 1, the value of the third field is 1 means N is 2, and so on), the bit width of the third field can be
  • the third field may also have a fixed bit width, for example, 1 byte. In this case, the maximum length of the fourth field is also fixed.
  • the third field may also be called a Cnt field or a Count field.
  • the fourth field may also be referred to as an Idx field or an Index field.
  • the third field in Mode 21 is hereinafter referred to as the Cnt field, and the fourth field is referred to as the Idx field.
  • the first node set corresponding to node R includes node B, node A, node S, and node E, and the numbers of these four nodes are 0, 1, 2, and 3, respectively.
  • node S and node E are child nodes of node R.
  • the value of the first fourth field among the two fourth fields is 10, indicating the node numbered 2 (ie node S) is a child node of node R, the value of the second and fourth field is 11, indicating that the node numbered 3 (ie node E) is a child node of node R, then the multicast routing identifier of node R can be is 111011.
  • each node may store a multicast forwarding table (also referred to as a multicast routing table or a routing forwarding table or other names), and the multicast forwarding table includes the first node set corresponding to the node.
  • a node can determine the node index according to the Idx field in the multicast routing identifier , and then look up the multicast forwarding table to obtain the information of the next hop, and then forward the multicast packet to the next hop.
  • a multicast forwarding table of node R reference may be made to Table 1.
  • node index next hop address 0
  • the multicast routing identifier of a node includes N third fields, where N is the number of nodes in the first node set corresponding to the node, and a third field is used to indicate whether a node in the first node set is a The child node of this node in the multicast tree.
  • a third field can be one bit, that is, the multicast routing identifier of a node (assuming node 1) includes N bits, see (b) in FIG. 11 , N bits form one bit Sequence (bit sequence), N bits are in one-to-one correspondence with nodes in the first node set corresponding to node 1, and one bit is used to indicate whether the node corresponding to this bit in the first node set is a child node of node 1 . Specifically, when the value of a bit is 1 (may also be 0), the bit is used to indicate that the node corresponding to the bit in the first node set is a child node of node 1 .
  • the multicast routing identifier in mode 22 is hereinafter referred to as a bit sequence.
  • a multicast forwarding table may be stored on each node, and the multicast forwarding table includes bits in the bit sequence and information of the next hop (for example, the outgoing interface to the next hop, the address), 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 multicast packet to the next hop.
  • the correspondence between the bits in the bit sequence and the information of the next hop may have 4 cases. In the first case, the leftmost bit in the bit sequence is the first bit, and from left to right are the first bit, the second bit, the third bit..., the first bit in the bit sequence
  • the j bits correspond to the entry whose index is j-1.
  • the rightmost bit in the bit sequence is the first bit, from right to left, the first bit, the second bit, the third bit..., the jth bit in the bit sequence Corresponds to the entry with index j-1.
  • the leftmost bit in the bit sequence is the first bit, from left to right are the first bit, the second bit, the third bit..., the jth bit in the bit sequence Corresponds to the entry with index j.
  • the rightmost bit in the bit sequence is the first bit, from right to left, the first bit, the second bit, the third bit..., the jth bit in the bit sequence Corresponds to the entry with index j.
  • j is an integer greater than 0.
  • the leftmost bit in the bit sequence is considered to be the first bit, and from left to right is the first bit, the second bit, the third bit... .
  • the index of the entry in the multicast forwarding table can also be a continuous value or a discrete value starting from other values (for example, 2, 3, 4). This application No restrictions apply.
  • the correspondence between the bit sequences of different nodes and the information of the next hop may be different entries in the same table.
  • the indices of the entries corresponding to the bit sequences of some nodes are not Starting with 1, for example, the table entries corresponding to the bit sequence of the node A1 in (a) of FIG. 13 are the table entries with indexes 3 and 4.
  • the correspondence between the bit sequences of different nodes and the information of the next hop may also be in different tables.
  • the first node set corresponding to node R includes node B, node A, node S and node E, and these four nodes correspond to The 1st, 2nd, 3rd and 4th bits of the 4 bits.
  • node S and node E are child nodes of node R.
  • the multicast routing identifier of node R may be 0011.
  • node A0 needs to send multicast packets to node B, node C, and node D.
  • the node set corresponding to the node A0 includes ⁇ node A1, node A2, node A3 ⁇ and ⁇ node B, node C, node D, node E, node F, node G ⁇ .
  • the multicast routing identifier of node A0 can indicate the first node set corresponding to node A0 by a bit.
  • this bit If the value of this bit is 0, it means that the first node set corresponding to node A0 is ⁇ node B, node C, node D, For node E, node F, and node G ⁇ , if the value of this bit is 1, it indicates that the first node set corresponding to node A0 is ⁇ node A1, node A2, node A3 ⁇ .
  • the first node set corresponding to node A1 is ⁇ node B, node C ⁇
  • the first node set corresponding to node A2 is ⁇ node D, node E ⁇
  • the first node set corresponding to node A3 is ⁇ node F, node G ⁇ .
  • the bits in the multicast routing identifier of node A0 are in one-to-one correspondence with the nodes in the first node set corresponding to node A0.
  • the bit corresponding to a node in the first node set corresponding to node A0 is 1, it indicates that the node is Child node of node A0, other nodes are similar.
  • Node A0 statically maintains the length of the multicast routing information of node A1 and node A2, and at this time, the addressing field is empty.
  • the multicast routing identifier of node A0 indicates that the first node set corresponding to node A0 is ⁇ node A1, node A2, node A3 ⁇ , and node A0 needs to send multicast packets to node A1 and node A2.
  • the multicast routing information of node A1 indicates that node A1 needs to send multicast packets to node B and node C.
  • the multicast routing information of node A2 indicates that node A2 needs to send a multicast packet to node D.
  • the process of sending multicast packets by each node in FIG. 3A is as follows:
  • Node A0 parses the received multicast packet A, obtains the multicast routing information of node A0, parses the set identifier (ie the first bit) in the multicast routing identifier of node A0, and the parsing result is 1, indicating that the node
  • the first node set corresponding to A0 is ⁇ node A1, node A2, node A3 ⁇ , then the multicast routing identifier of node A0 further includes 3 bits, continue to parse these 3 bits to obtain bit sequence 110.
  • Node A0 traverses the bit sequence 110, finds the first bit that is not 0, searches the multicast forwarding table according to the position of the bit, and learns that it needs to send multicast packet B to node A1, and the multicast packet sent to node A1
  • the structure of the message B can be seen in (a) of FIG. 14 .
  • the node A0 continues to traverse the bit sequence 110, finds the second bit that is not 0, searches the multicast forwarding table according to the position of the bit, and learns that it needs to send the multicast message C to the node A2. For the structure of broadcast packet C, see (b) in FIG. 14 .
  • the node A0 continues to traverse the bit sequence 110 and finds that there are no more bits that are not 0, and no longer sends the multicast message.
  • Node A1 receives multicast message B, parses the multicast routing identifier 11 of node A1, and sends unicast message D to node B and node C. Since node B and node C are leaf nodes in the multicast tree, therefore, The packets sent to Node B and Node C are unicast packets instead of multicast packets.
  • Node A2 receives multicast packet C, parses the multicast routing identifier 10 of node A2, and sends unicast packet E to node D. Since node D is a leaf node in the multicast tree, the packet sent to node D is The message is a unicast message instead of a multicast message.
  • the multicast routing identifier of node A0 indicates that the first node set corresponding to node A0 is ⁇ node B, node C, node D, node E, node F, node G ⁇ , and node A0 needs to send node B, node Node C and Node D send multicast packets.
  • the process of sending multicast packets by each node in FIG. 3A is as follows:
  • Node A0 parses the received multicast packet A, obtains the multicast routing information of node A0, parses the set identifier (that is, the first bit) in the multicast routing identifier of node A0, and the parsing result is 0, indicating that the node
  • the first node set corresponding to A0 is ⁇ node B, node C, node D, node E, node F, node G ⁇ , then the multicast routing identifier of node A0 further includes 6 bits, continue to parse these 6 bits , get the bit sequence 111000.
  • Node A0 traverses the bit sequence 111000, finds bits that are not 0, searches for the multicast forwarding table according to the positions of these bits, and learns that it needs to send messages to node B, node C and node D, because node B, node C and Node D is a leaf node, therefore, node A0 sends unicast packets to node B, node C and node D.
  • the source address in the unicast encapsulation in the unicast packet sent to node B is the address of node A0
  • the destination address is the address of node B
  • the source address in the unicast encapsulation in the unicast packet sent to node C is node A0
  • the address of A0, the destination address is the address of node C
  • the source address in the unicast encapsulation in the unicast message sent to node D is the address of node A0
  • the destination address is the address of node D.
  • the multicast routing identifier of a node includes a third field, and the third field includes a first group identifier.
  • the first group identifier is used to indicate the first node group corresponding to the node.
  • the nodes are all children of this node.
  • the first node group corresponding to a node is a subset of the first node set corresponding to the node.
  • Nodes in the first node set corresponding to a node may form at least one node group, and a node in the first node set may be located in one node group or may be located in multiple node groups, and which nodes form a node group may be pre-configured.
  • a node group corresponds to a group ID (Group ID, GID for short). In this case, referring to (c) in FIG.
  • the multicast routing identifier is GID
  • a node can determine the GID in the node group corresponding to the GID through the GID in the multicast routing identifier of the node in the received multicast packet. nodes, and send multicast packets to these nodes.
  • the first node set corresponding to node R includes node B, node A, node S, and node E, and these four nodes can form three node groups.
  • the first node group includes node A and node B
  • the second node group includes node S and node E
  • the third node group includes node B, node A, node S and node E.
  • the identifier of the first node group is identifier 1
  • the identifier of the second node group is identifier 2
  • the identifier of the third node group is identifier 3.
  • node S and node E are child nodes of node R. Then the multicast routing identifier of node R may be identifier 2.
  • a multicast forwarding table may also be stored on each node, and the multicast forwarding table includes the group ID of the node group and the information of the next hop (for example, going to the next node). The corresponding relationship between the outgoing interface of one hop and the address of the next hop). The next hop here is the node in the node group corresponding to the group ID.
  • a node may determine to which nodes to forward the multicast packet according to the multicast routing identifier and the corresponding relationship in the multicast forwarding table. Based on Example 1, an example of the multicast forwarding table of Node R can be found in Table 2.
  • the multicast routing identifiers in the above-mentioned modes 21, 22 and 23 can be converted to each other.
  • the GID in mode 23 can be converted into the bit sequence in mode 22 or the bit sequence in mode 21.
  • Multicast route identifier For example, the multicast routing ID (ie ID 2) of the node R in the above example 2 can be converted into the multicast routing ID (ie 0011) of the node R in the above example 1.
  • the multicast routing identifiers in the foregoing manners 21, 22, and 23 may be referred to as the first type of multicast routing identifiers, the second type of multicast routing identifiers, and the third type of multicast routing identifiers, respectively.
  • the length of the multicast routing identifier of a node in the foregoing mode 21, mode 22 and mode 23 may be statically maintained in the node.
  • the node (eg, the source node) or the controller that generates the first multicast message in the multicast tree may maintain the length of the multicast routing identifiers of all nodes in the multicast tree.
  • the encapsulation efficiency of the multicast packet is optimal.
  • the encapsulation efficiency is optimal in a multicast scenario with a very low density of nodes in the multicast tree.
  • the encapsulation efficiency is optimal in a multicast scenario with a high density of nodes in the multicast tree.
  • the encapsulation efficiency is optimal in a multicast scenario with the highest density of nodes in the multicast tree.
  • the multicast routing identifier of a node further includes a type field, where the type field is used to indicate the type of the multicast routing identifier of the node.
  • the types of multicast routing identifiers include the first type of multicast routing identifiers, the second type of multicast routing identifiers, and the third type of multicast routing identifiers.
  • the node receiving the multicast packet may determine how to identify the multicast routing identifier according to the type of the multicast routing identifier.
  • the multicast routing identifier further includes a type field
  • the multicast routing identifiers in Mode 21, Mode 22 and Mode 23 may refer to (a) in FIG. 15 , (b) in FIG. 15 and in FIG. 15 .
  • the type field is denoted as Type in (a) in Figure 15, (b) in Figure 15 and (c) in Figure 15.
  • one type of multicast routing identifier may be used uniquely (in this case, the type field is not required), and which type of multicast routing identifier to use may also be indicated through the type field.
  • the type field may be considered as a part of the multicast routing identifier, and may also be considered as a field independent of the multicast routing identifier, which is not limited in this application.
  • the types of multicast routing identifiers of different nodes may be the same or different, which is not limited in this application.
  • 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.
  • node types include single-entity nodes and multi-entity nodes.
  • a single-entity node means that the node includes one entity, and a multi-entity node means that the node includes multiple entities.
  • the multicast routing ID length field and/or the node type field can be considered as a part of the multicast routing ID, or can be regarded as a field independent of the multicast routing ID, which is not limited in this application.
  • the above-mentioned type field, multicast routing identifier length field and node type field may be collectively referred to as a description field or a dscr field. These fields may also have other names, which are not limited in this application.
  • the addressing fields mentioned in the above embodiments may be implemented in the following manner 31 , manner 32 or manner 33 .
  • Manner 31 The addressing field of a node is used to indicate the length of the multicast routing information of the non-leaf child nodes of the node.
  • the addressing field of node 1 may include M-1 or M fields (this field is denoted as the fifth field), and a fifth field is used to indicate the length of the multicast routing information of a non-leaf child node of node 1 (the The length is denoted as Y), and the bit width of the fifth field can be (At this time, the length indicated by the fifth field is the sum of the value of the fifth field and 1), or, (At this time, the length indicated by the fifth field is the value of the fifth field), or, a fixed bit width (for example, 1 byte, 2 bytes). See Figure 16 for the multicast information of node 1.
  • 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.
  • the addressing field of node 1 may indicate the length 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.
  • another recursive unit in the M recursive units can be calculated according to the length indicated by the first field.
  • the M-1 recursive units are recursive unit 0 to recursive unit M-2, ie, the addressing field of node 1 indicates L 0 , L 1 , . . . , L M-2 .
  • the addressing field of node 1 may indicate the length of M recursive units of node 1, ie the addressing field of node 1 indicates L 0 , L 1 , . . . , L M-1 .
  • node 1 can determine the starting position of recursive unit 0 according to the length of the first field, the multicast routing identifier and the addressing field, and then determine the starting position and/or the starting position of each recursive unit according to the length of each recursive unit. or end position.
  • the position mentioned in this application may be an offset relative to the starting position of the multicast information, or may be an offset relative to some other position in the multicast packet.
  • the addressing field of node 1 indicates the length of the M recursive units of node 1
  • the first field indicates the total length of 1
  • the starting position of the recursive unit is relative to the multicast.
  • the starting position of the recursive unit m is denoted as offset m
  • Table 3 can refer to the starting position of each recursive unit.
  • Manner 32 The addressing field of a node is used to indicate the start position or the end position of the multicast routing information of the non-leaf child nodes of the node.
  • the addressing field of node 1 may include M-1 or M fields (this field is denoted as the fifth field), and a fifth field is used to indicate the starting position of the multicast routing information of a non-leaf child node of node 1 or end position.
  • the fifth field may be a fixed number of bits (eg, 4 bits) or a fixed number of bytes (eg, 1 byte).
  • the following takes the fifth field for indicating the starting position as an example to illustrate the manner 32, and the principle is similar when the fifth field is used for indicating the ending position, which can be understood with reference.
  • the starting position of the recursive unit m (that is, 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 .
  • the length of the recursive unit M-1 can be calculated from the length indicated by the first field, and the calculation method is similar to that in mode 31, which can be understood with reference and will not be repeated.
  • the length of the recursive unit M-1 may also be indicated by a field (denoted as the sixth field), and in this case, the first field may or may not be present.
  • the sixth field may be located at the position of the first field, or may be located at other positions, which is not limited in this application. For the convenience of description, the following description is given by taking an example where the sixth field does not have the first field and the sixth field is located at the position of the first field.
  • the mode 32 can be implemented by the following mode a or mode b.
  • the addressing field of node 1 indicates the starting position of M-1 recursive units of node 1.
  • the M-1 recursive units may be recursive unit 1 to recursive unit M-1, that is, the addressing field of node 1 indicates O 1 , O 2 , . . . , O M-1 .
  • the addressing field of node 1 indicates O 1 , O 2 , . . . , O M-1 .
  • node 1 can determine the starting position of recursive unit 0 according to the first field (or sixth field), the multicast routing identifier and the length of the addressing field, and determine the recursive unit 1 to recursive unit M according to the addressing field
  • the starting position of -1, and the length of recursive unit 0 to recursive unit M-2, and then the length of recursive unit M-1 is determined according to the first field (or the sixth field).
  • the positions mentioned in this application are similar to those in Manner 31, which can be understood by reference, and will not be repeated here.
  • Exemplarily based on the example shown in (b) in Figure 17, taking the length of the recursive unit M-1 determined according to the sixth field as an example, the starting position and length of each recursive unit can be found in Table 4.
  • the addressing field of node 1 indicates the starting position of the M recursive units of node 1.
  • the addressing field of node 1 indicates O 0 , O 1 , . . . , O M-1 .
  • node 1 can determine the starting position of recursive unit 0 to recursive unit M-1 and the length of recursive unit 0 to recursive unit M-2 according to the addressing field, and then determine the recursive unit according to the first field or the sixth field. Length of unit M-1.
  • the positions mentioned in this application are similar to those in Manner 31, which can be understood by reference, and will not be repeated here. Exemplarily, based on the example shown in (c) of FIG. 17 , taking the length of the recursive unit M-1 determined according to the sixth field as an example, the starting position and length of each recursive unit can be found in Table 5.
  • the addressing field of a node includes a plurality of delimitation fields, and the multicast routing information of the non-leaf child nodes of the node is separated by a plurality of delimitation fields.
  • the addressing field of node 1 may include M-1 delimiter fields, and the length of the delimiter fields may be pre-configured. See Figure 18 for the multicast information of node 1.
  • a delimiting field can exist between every two recursive units.
  • the length of the recursive unit M-1 can be calculated from the length indicated by the first field, and the calculation method is similar to that in Mode 31, which can be understood with reference and will not be repeated here.
  • the length of the recursive unit M-1 may also be indicated by a field (denoted as the sixth field), and in this case, the first field may or may not be present.
  • the sixth field may be located at the position of the first field, or may be located at other positions, which is not limited in this application. For the convenience of description, the following description is given by taking an example where the sixth field does not have the first field and the sixth field is located at the position of the first field.
  • node 1 may determine the starting position of recursive unit 0 according to the length of the first field (or sixth field) and the multicast routing identifier, and determine the starting position of recursive unit 1 to recursive unit M-1 according to the delimiter field The starting position and the length of the recursive unit 0 to the recursive unit M-2, and then the length of the recursive unit M-1 is determined according to the first field (or the sixth field).
  • the positions mentioned in this application are similar to those in Manner 31, which can be understood by reference, and will not be repeated here. Exemplarily, based on the example shown in FIG.
  • the recursive unit 18 taking the starting position of the recursive unit as an 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 recursive unit
  • the starting position of m is denoted as offset m , and the starting position and length of each recursive unit can be found in Table 6.
  • the above-mentioned embodiment exemplifies the method provided by the present application by taking the second node as a non-leaf child node of the first node in the multicast tree as an example.
  • the second node may also be a leaf child node of the first node.
  • the method for sending multicast packets provided by this application can be implemented by the method shown in FIG. 19 , which may specifically include:
  • the first node receives a seventh multicast packet, where the seventh multicast packet includes multicast information and data of the first node.
  • the first node may receive the seventh multicast packet sent by other nodes in the multicast tree.
  • the first node determines that the second node is a leaf child node of the first node, the first node extracts data in the seventh multicast packet.
  • the process for the first node to determine whether a node is its own leaf child node may refer to the relevant description of the above step 12), and details are not repeated here. It can be understood that, if the second node is a leaf node of the first node, the second node does not need to multicast forward the multicast packet, so the first node can send the data to the second node. That is, the message sent by the first node to the second node is a unicast message.
  • the first node assembles the first unicast message according to the data.
  • the first node sends the first unicast packet to the second node.
  • the second node receives the first unicast packet from the first node.
  • a node may contain multiple entities.
  • an entity in a node can process it through the method shown in FIG. 20.
  • the method is applied to the first entity, and the first entity belongs to the first node.
  • the method specifically includes:
  • a first entity receives a third multicast packet, where the third multicast packet includes 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 is the same as the multicast routing identifier of the first node or obtained by updating the multicast routing identifier of the first node.
  • the multicast routing identifier of a node will be associated with each child node (including non-leaf child node and leaf child node) corresponding bits or Idx field. Since the first multicast routing identifier is derived from the multicast routing identifier, the non-leaf child node corresponding to the first multicast routing identifier of the first node refers to the bit or the Idx field in the first multicast routing identifier. A non-leaf child node in the corresponding child node.
  • the first entity is an entity in the first node, and the first entity can receive the third multicast packet from other nodes other than the first node, and can also receive the third multicast packet from other entities in the first node message, which is not limited in this application. If the first entity receives the third multicast packet from a node other than the first node, 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 third multicast packet from other entities in the first node, the first multicast routing identifier of the first node may be the same as the multicast routing identifier of the first node, or it may be The multicast routing ID is updated to obtain it. How the first multicast routing information is specifically can be obtained by inference according to a method for processing multicast packets between the first entity and the second entity. For a specific example, refer to the following, which will not be repeated.
  • the first entity determines a second entity according to the first multicast routing identifier of the first node, where the second entity is an entity in the first node.
  • Step 2002 may include: the first entity searches the multicast forwarding table according to the first multicast routing identifier of the first node to obtain the second entity. It should be noted that the first entity may obtain multiple second entities according to the first multicast routing identifier of the first node, and the second entity here may be any one of the second entities.
  • the entity forwarding a multicast packet to a second entity is described as an example. When actually processing the multicast packet, the first node may forward the multicast packet to each second entity.
  • 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 identifier is the Cnt field+Idx field, the next hop corresponding to the value of the Idx field in the multicast forwarding table is the second entity.
  • the first entity sends a fourth multicast packet to the second entity, where the fourth multicast packet includes second multicast routing information of the first node.
  • the second multicast routing information of the first node includes the multicast routing information of part or all of the non-leaf child nodes corresponding to the second multicast routing identifier of the first node and 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 obtained by updating the first multicast routing identifier of the first node.
  • the second multicast routing identifier is the same as the third multicast routing identifier of the first node or obtained by updating the third multicast routing identifier of the first node.
  • the first entity needs to update the first multicast routing identifier of the first node to obtain the third multicast routing identifier of the first node.
  • the third multicast routing identifier is the same as the first multicast routing identifier of the first node. Cases 1 and 2 and the update method are exemplarily described below.
  • Case 1 The first entity belongs to a certain child node of the first node (it is assumed to be child node 1).
  • 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 the Cnt field+Idx field, the first entity deletes the Idx field corresponding to the child node 1, and subtracts 1 from the value of the Cnt field to obtain the third multicast routing identifier.
  • entity A belongs to node A
  • the multicast routing identifier of node D1 in multicast packet A received by entity A is 110101
  • the second identifier in the multicast routing identifier is 110101.
  • the bits correspond to node A, therefore, see step 53 below)
  • entity A sends multicast packet C to entity B it can set the second bit in the multicast routing identifier (ie 110101) of node D1 to 0 obtains the multicast routing identifier 1 (ie, 100101) of the node D1.
  • Example 1 For details, refer to the first case in Example 1 below, which is not repeated here.
  • Case 2 The first entity does not belong to any child node of the first node, but the multicast packet can reach one or more child nodes of the first node (it is assumed to be Q children only through the multicast forwarding of the first entity) node).
  • the first entity sets the bits corresponding to the Q sub-nodes to 0 to obtain the third multicast routing identifier. If the first multicast routing identifier is the 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.
  • entity A does not belong to any child node of node D1
  • the first node set corresponding to node D1 is ⁇ node O, node P, node Q, node R, node S, Node T, Node U, Node V, Node W ⁇ .
  • node O, node Q, node S, node T, node U and node V are child nodes of node D1.
  • the multicast route identifier of node D1 in the multicast packet A received by entity A is 101011110, wherein the multicast packets of node O and node Q in the child nodes of node D1 only need to be forwarded by the multicast of entity A.
  • node O and node Q correspond to the first and third bits in 101011110, therefore, before entity A sends multicast packet C to entity B, it can identify the multicast route of node D1 (ie, 101011110)
  • the first and third bits are set to 0 to obtain the multicast routing identifier 1 of node D1 (ie, 000011110).
  • Example 1 Example 1 below, which will not be repeated here.
  • the first entity needs to update the third multicast routing identifier of the first node to obtain the second multicast routing identifier of the first node under the following circumstances 3, and in other cases, the second group of the first node
  • the multicast routing identifier is the same as the third multicast routing identifier of the first node. Case 3 and the update method are exemplarily described below.
  • Case 3 The first entity needs to forward multicast packets to multiple second entities.
  • the third multicast routing identifier is a bit sequence
  • the first entity needs to compare the third multicast routing identifier of the first node with other entities except the P sub-nodes.
  • the bit corresponding to the child node is set to 0 to obtain the second multicast routing identifier.
  • the third multicast routing identifier is the Cnt field+Idx field
  • the first entity deletes the Idx fields corresponding to other child nodes except the P child nodes, and subtracts P from the value of the Cnt field to obtain the second multicast routing identifier .
  • the P sub-nodes are one or more sub-nodes of the first node, and these sub-nodes need to be forwarded by the second entity before they can receive the multicast message.
  • entity A, entity B, entity C, entity D and entity E form node Z.
  • the first node set corresponding to the node Z is ⁇ node X, node Q, node R, node E, node V ⁇ .
  • node X, node R, node E, and node V are child nodes of node Z.
  • the multicast packets of node R and node E need to be forwarded by entity C, and the multicast packets of node V are forwarded by entity B.
  • the multicast route identifier of node Z in the multicast packet A received by entity A is 110111.
  • node R and node E correspond to the 4th and 5th bits in 110111
  • node V corresponds to the 6th bit in 110111. Therefore, referring to step 93 below), before entity A sends multicast packet B to entity B, it can set the fourth and fifth bits in the multicast routing identifier (ie 110111) of node Z to 0 to obtain the node
  • the multicast routing identifier of Z is 1 (ie 100001)
  • the sixth bit in the multicast routing identifier of node Z ie 110111
  • Example 3 Example 3 below, which will not be repeated here.
  • the second multicast routing information of the first node includes part or all of the multicast routing information of the non-leaf child nodes corresponding to the third multicast routing identifier of the first node, depending on how many routes the first entity needs to send to.
  • Each second entity sends a multicast packet. If the first entity needs to send a multicast packet to one second entity, the second multicast routing information of the first node includes the corresponding third multicast routing identifier of the first node. The multicast routing information of all non-leaf child nodes. If the first entity needs to send multicast packets to two or more second entities, the second multicast routing information of the first node includes the first The multicast routing information of some non-leaf child nodes corresponding to the three multicast routing identifiers.
  • the method further includes:
  • the first entity determines a first child node according to the first multicast routing identifier of the first node, and the first child node is a child node of the first node in the multicast tree corresponding to the first entity. child node.
  • the first entity sends a fifth multicast packet to the first child node, where the fifth multicast packet includes multicast routing information of the first child node.
  • the description is given by taking the first child node as a non-leaf child node of the first node as an example. If the first child node is a leaf child node of the first node, the first entity sends a unicast message to the third entity in the first child node.
  • the child node corresponding to the first entity is the child node that can be processed by the first entity.
  • the first child node is the certain child node.
  • the first child node is any one of the above-mentioned Q child nodes, and in this application, the first entity sends a multicast packet to a first child node
  • the first entity may send a multicast packet to each of the first sub-nodes.
  • step 42) may include: the first entity sends a fifth multicast packet to the third entity in the first sub-node.
  • the method further includes: the first entity determines the second child node according to the multicast routing identifier of the first child node, and the second child node is the first child node.
  • the first entity sends a packet to the second sub-node. If the second child node is a leaf child node of the first child node, the packet is a unicast packet, and the packet includes the data in the third multicast packet.
  • the packet is a multicast packet (may be recorded as the eighth multicast packet), and the eighth multicast packet includes the multicast routing information and data of the second child node.
  • the first entity is entity A
  • the first child node is node X
  • entity A belongs to node X
  • the second child node is node O.
  • the method further includes: the first entity sends a sixth multicast packet to the fourth entity, and the sixth The multicast packet includes first multicast routing information of the first child node, and the first multicast routing information of the first child node includes the first multicast routing identifier of the first child node and the second multicast route of the first child node.
  • the second multicast routing identifier of the first child node is the same as the multicast routing identifier of the first child node or the multicast routing identifier of the first child node
  • the first multicast routing identifier of the first child node is the same as the second multicast routing identifier of the first child node or obtained by updating the second multicast routing identifier of the first child node.
  • the entity may store multiple multicast forwarding tables, and one node corresponds to one or more multicast forwarding tables.
  • the multicast forwarding table corresponding to a node includes the correspondence between the multicast routing identifier of the node (for example, the node index or bit sequence or group identifier of the child node of the node) and the information of the next hop, which is used for this
  • the entity determines to which child nodes the multicast packet needs to be sent according to the multicast routing identifier of the node.
  • the multicast routing identifier of the node may further include a multicast forwarding table identifier field, which is used to instruct the entity which multicast forwarding table to search for.
  • a multicast forwarding table identifier field which is used to instruct the entity which multicast forwarding table to search for.
  • the identification field of the multicast forwarding table is 1 bit. When the value of this bit is 1, it means Search for multicast forwarding table 1. When the value of this bit is 0, it means to search for multicast forwarding table 2, and vice versa.
  • the identification field of the multicast forwarding table may not belong to the identification of the multicast routing, but is a field in the multicast information alone.
  • the embodiment shown in FIG. 20 is exemplarily described below through three examples.
  • the bits corresponding to the indexes in the multicast forwarding table all refer to the bits in the multicast routing identifier except the identifier field of the multicast forwarding table. It can also be understood that when searching for the multicast forwarding table , the bits used are all bits in the multicast routing ID except the ID field of the multicast forwarding table.
  • Fig. 21 shows the topological connection of some entities.
  • entity A, entity B, entity C, entity D and entity E constitute node D1.
  • the embodiment shown in FIG. 20 is exemplified by taking the multicast routing identifier as a bit sequence as an example, wherein the bits in the bit sequence are related to the first node set.
  • the nodes in the bit sequence correspond one-to-one, and when the value of one bit in the bit sequence is 1, it indicates that the node corresponding to the bit is a child node of the node D1.
  • the length of the multicast routing identifier of the node D1 can be statically maintained in each node.
  • the first node set corresponding to the node D1 is ⁇ node A, node B, node C, node D, node E ⁇ .
  • node A, node C and node E are child nodes of node D1. Since node 5 and entity A have topological connections, node 5 sends multicast packet A to node D1 (for the multicast routing information of node D1 in multicast packet A, see (b) in FIG. 22 ), Received by entity A in node D1.
  • the multicast routing information of node D1 in multicast packet A includes the multicast routing information of three non-leaf child nodes (that is, node A, node C, and node E).
  • the length of the multicast routing information of node A is configured in In entity A, the addressing field of node D1 is used to indicate the length of the multicast routing information of node C.
  • the entity B and the entity D store a multicast forwarding table 1, and the multicast forwarding table 1 is the multicast forwarding table corresponding to the node D1.
  • Two multicast forwarding tables are stored in entity A, entity C, and entity E.
  • the multicast forwarding table 1 stored in entity A, entity C, and entity E is the multicast forwarding table corresponding to node D1
  • the multicast forwarding table 2 stored in entity A is the multicast forwarding table corresponding to node A.
  • the stored multicast forwarding table 2 is the multicast forwarding table corresponding to the node C
  • the multicast forwarding table 2 stored in the entity E is the multicast forwarding table corresponding to the node E.
  • the multicast routing identifier of node D1 and the multicast routing identifier derived therefrom, the multicast routing identifier of node A, the multicast routing identifier of node C, and the multicast routing identifier of node E all include the multicast forwarding table identifier field, This field is the first bit in these multicast routing identifiers. The value of this bit is 1, which means searching for multicast forwarding table 1, and the value of this bit is 0, which means searching for multicast forwarding table 2.
  • each entity in node D1 sends a multicast packet as follows:
  • Entity A receives the multicast packet A, and determines that the value of the first bit in the multicast routing identifier (that is, 110101) of the node D1 in the multicast packet A is 1, then according to the multicast routing identifier of the node D1 Find the last 5 bits in the multicast forwarding table 1 (see Table 7), and determine that the first bit (ie, the first bit) of these 5 bits corresponds to itself (ie, entity A), and the remaining values are The bit of 1 corresponds to entity B.
  • Entity B's address 1 (corresponding to the second bit) Entity B's address 2 (corresponding to the 3rd bit) Entity B's address 3 (corresponding to the 4th bit) Entity B's address 4 (corresponding to the 5th bit) Entity B's address
  • entity A finds itself (ie, entity A), it obtains the multicast routing information of the node (ie, node A) corresponding to the first bit (ie, the first bit) of the 5 bits, and determines If the value of the first bit in the multicast routing identifier (ie 0101) of node A is 0, then look up multicast forwarding table 2 (see Table 8) according to the last three bits in the multicast routing identifier of node A, and determine The bit whose value is 1 among the three bits corresponds to the entity O and the entity Q, and the unicast packet B is sent to the entity O and the entity Q, and the unicast packet B includes the data in the multicast packet A.
  • entity A finds entity B, it sends a multicast packet C to entity B.
  • the multicast packet C includes the multicast routing identifier 1 of node D1 (ie 100101), the addressing field of node D1, and the address field of node C. Multicast routing information, multicast routing information and data of Node E. For the multicast routing information 1 of the node D1 in the multicast packet C, see (c) in FIG. 22 .
  • entity A since the multicast routing information of node A is processed by entity A, entity A updates the multicast routing ID of node D1 to multicast routing ID 1 of node D1 before sending multicast packet C .
  • Entity B receives the multicast packet C and determines that the value of the first bit in the multicast routing identifier 1 (ie 100101) of the node D1 in the multicast packet C is 1, then according to the multicast routing of the node D1
  • the last 5 bits in the identifier 1 are searched for the multicast forwarding table 1 (see Table 9), and it is determined that the bits with a value of 1 in the 5 bits all correspond to the entity C, and then the multicast packet C is sent to the entity C.
  • Entity C's address next hop address 0 (corresponding to the first bit) Entity A's address 1 (corresponding to the second bit) Entity B's address 2 (corresponding to the 3rd bit) Entity C's address 3 (corresponding to the 4th bit) Entity C's address 4 (corresponding to the 5th bit) Entity C's address
  • Entity C receives the multicast packet C, and determines that the value of the first bit in the multicast routing identifier 1 (ie 100101) of the node D1 in the multicast packet C is 1, then according to the multicast routing of the node D1
  • the last 5 bits in the identifier 1 look up the multicast forwarding table 1 (see Table 10), and determine that the first bit (that is, the third bit) of the 5 bits with a value of 1 corresponds to itself (that is, entity C), and the rest A bit with a value of 1 corresponds to entity D.
  • entity C finds itself (ie, entity C), it obtains the multicast routing information of the node (ie, node C) corresponding to the first bit of the 5 bits (ie, the third bit), and determines the node
  • the value of the first bit in the multicast routing identifier (ie, 0011) of node C is 0, then according to the last three bits in the multicast routing identifier of node C, the multicast forwarding table 2 (see Table 11) is searched, and 3 is determined.
  • a bit with a value of 1 among the bits corresponds to the entity S and the entity T, and sends a message to the entity S and the entity T.
  • the unicast packet D sent to the entity S includes the data in the multicast packet A
  • the multicast packet D sent to the entity T includes the multicast routing information and data of the node T in the multicast packet A
  • the group For the multicast information of the node T included in the broadcast packet D see (e) in FIG. 22 .
  • the node T receives the multicast packet D, searches the multicast forwarding table (see Table 12) according to the multicast routing identifier 110 of the node T in the multicast packet D, and determines that the bit whose value is 1 in the three bits corresponds to the entity X and The entity Y sends a unicast packet E to the entity X and the entity Y, and the unicast packet E includes the data in the multicast packet A.
  • Entity X's address 1 (corresponding to the second bit) Entity Y's address 2 (corresponding to the 3rd bit) Entity Z's address
  • entity C After finding entity D, entity C sends multicast packet F to entity D.
  • the multicast packet F includes multicast routing identifier 2 (ie 100001) of node D1, and multicast routing information and data of node E.
  • multicast routing information 2 of the node D1 in the multicast packet F see (d) in FIG. 22 .
  • entity C since the multicast routing information of node C is processed by entity C, entity C updates the multicast routing ID 1 of node D1 to the multicast routing ID of node D1 before sending the multicast packet F 2.
  • Entity D receives the multicast packet F, and determines that the value of the first bit in the multicast routing identifier 2 (ie 100001) of the node D1 in the multicast packet F is 1, then according to the multicast routing of the node D1
  • the last 5 bits in the identifier 2 look up the multicast forwarding table 1 (see Table 13), determine that the bit with a value of 1 in the 5 bits corresponds to the entity E, and send the multicast packet F to the entity E.
  • Entity C's address 2 (corresponding to the 3rd bit) Entity C's address 3 (corresponding to the 4th bit) Entity D's address 4 (corresponding to the 5th bit) Entity E's address
  • Entity E receives the multicast packet F, and determines that the value of the first bit in the multicast routing identifier 2 (ie 100001) of the node D1 in the multicast packet F is 1, then according to the multicast routing of the node D1
  • the last 5 bits in the identifier 2 look up the multicast forwarding table 1 (see Table 14), determine that the bit with a value of 1 in the 5 bits corresponds to itself (ie, entity E), and obtain the first value of the 5 bits.
  • the last 3 bits in the multicast routing identifier look up the multicast forwarding table 2 (see Table 15), determine that the bit with a value of 1 in the 3 bits corresponds to the entity U and the entity V, and send the unicast message to the entity U and the entity V G, the unicast packet G includes the data in the multicast packet A.
  • Entity D's address 1 (corresponding to the second bit) Entity D's address 2 (corresponding to the 3rd bit) Entity D's address 3 (corresponding to the 4th bit) Entity D's address 4 (corresponding to the 5th bit) Entity E's address
  • the first node set corresponding to node D1 is ⁇ node O, node P, node Q, node R, node S, node T, node U, node V, node W ⁇ .
  • node O, node Q, node S, node T, node U and node V are child nodes of node D1. Since node 5 and entity A have topological connections, node 5 sends multicast packet A to node D1 (for the multicast routing information of node D1 in multicast packet A, see (b) in FIG. 23 ), Received by entity A in node D1.
  • the entity A, the entity B, the entity C, the entity D, and the entity E store the multicast forwarding table corresponding to the node D1.
  • Entity A receives multicast packet A, searches for the multicast forwarding table (see Table 16) according to the multicast routing identifier of node D1 in multicast packet A (that is, 101011110), and determines the first and The second bit with a value of 1 corresponds to entity O and entity Q, and the remaining bits with a value of 1 correspond to entity B.
  • Entity B's address 4 (corresponding to the 5th bit) Entity B's address 5 (corresponding to the 6th bit) Entity B's address 6 (corresponding to the 7th bit) Entity B's address 7 (corresponding to the 8th bit) Entity B's address 8 (corresponding to the 9th bit) Entity B's address
  • the entity A After finding the entity O and the entity Q, the entity A sends the unicast packet B to the entity O and the entity Q, and the unicast packet B includes the data in the multicast packet A.
  • entity A After finding entity B, entity A sends multicast packet C to entity B.
  • the multicast packet C includes multicast routing identifier 1 (ie 000011110) of node D1, and multicast routing information and data of node T.
  • multicast routing information 1 of the node D1 in the multicast packet C see (c) in FIG. 23 .
  • entity A since the first three bits in the multicast routing identifier of node D1 are processed by entity A, entity A updates the multicast routing identifier of node D1 to node D1 before sending multicast packet C
  • the multicast routing ID is 1.
  • Entity B receives the multicast packet C, searches the multicast forwarding table (see Table 17) according to the multicast routing identifier 1 (ie 000011110) of the node D1 in the multicast packet C, and determines that the median value of the 9 bits is 1 The bits of each correspond to entity C, and send multicast packet C to entity C.
  • Entity C receives the multicast packet C, searches the multicast forwarding table (see Table 18) according to the multicast routing identifier 1 (ie 000011110) of the node D1 in the multicast packet C, and determines the first one of the 9 bits The second bit with a value of 1 corresponds to the entity S and the entity T, and the remaining bits with a value of 1 correspond to the entity D.
  • Entity B's address 1 (corresponding to the second bit) Entity B's address 2 (corresponding to the 3rd bit) Entity B's address 3 (corresponding to the 4th bit) address of entity R 4 (corresponding to the 5th bit) Entity S's address
  • Entity D's address 7 (corresponding to the 8th bit) Entity D's address 8 (corresponding to the 9th bit) Entity D's address
  • the entity C finds the entity S and the entity T, it sends the unicast message D to the entity S.
  • the unicast message D includes the data in the multicast message A, and sends the multicast message D to the entity T.
  • the multicast message The message D includes the multicast routing information and data of the node T in the multicast message A.
  • the entity T receives the multicast packet D, searches the multicast forwarding table (see Table 12 above) according to the multicast routing identifier 110 of the node T in the multicast packet D, and determines that the bit whose value is 1 in the three bits corresponds to the entity X and entity Y, send a unicast packet E to entity X and entity Y, where the unicast packet E includes the data in the multicast packet A.
  • the entity C After finding the entity D, the entity C sends a multicast packet E to the entity D.
  • the multicast packet E includes the multicast routing identifier 2 (ie, 000000110) and data of the node D1.
  • entity C since the middle 3 bits in the multicast routing identifier of node D1 are processed by entity C, entity C updates the multicast routing identifier 1 of node D1 to node D1 before sending the multicast packet E. Multicast route ID 2 of D1.
  • Entity D receives the multicast packet E, searches the multicast forwarding table (see Table 19) according to the multicast routing identifier 2 (ie 000000110) of the node D1 in the multicast packet E, and determines that the median value of the 9 bits is 1 The bits of all correspond to entity E, and send multicast packet E to entity E.
  • Entity E receives the multicast packet E, searches the multicast forwarding table (see Table 20) according to the multicast routing identifier 2 (ie 000000110) of the node D1 in the multicast packet E, and determines that the median value of the 9 bits is 1
  • the bits of correspond to entity U and entity V, and send unicast packet F to entity U and entity V, where unicast packet F includes the data in multicast packet A.
  • Entity D's address 4 (corresponding to the 5th bit) Entity D's address 5 (corresponding to the 6th bit) Entity D's address 6 (corresponding to the 7th bit) Entity U's address 7 (corresponding to the 8th bit) Entity V's address 8 (corresponding to the 9th bit) Entity W's address
  • the first node set corresponding to the node D1 is ⁇ node O, node P, node Q, node C, node D, node E ⁇ .
  • node O, node Q, node C and node E are child nodes of node D1. Since node 5 and entity A have topological connections, node 5 sends multicast packet A to node D1 (for the multicast routing information of node D1 in multicast packet A, see (b) in FIG. 24A ), Received by entity A in node D1.
  • the multicast routing information of node D1 in multicast packet A includes the multicast routing information of two non-leaf child nodes (node C and node E).
  • the length of the multicast routing information of node E is configured in entity A.
  • the length of the multicast routing information of the node C can be obtained by calculating the total length of the multicast routing information of the node D1.
  • the entity A, the entity B and the entity D store a multicast forwarding table 1, and the multicast forwarding table 1 is the multicast forwarding table corresponding to the node D1.
  • Two multicast forwarding tables are stored in entity C and entity E.
  • the multicast forwarding table 1 stored in the entity C and the entity E is the multicast forwarding table corresponding to the node D1
  • the multicast forwarding table 2 stored in the entity C is the multicast forwarding table corresponding to the node C
  • the group stored in the entity E is the multicast forwarding table.
  • the broadcast and forwarding table 2 is the multicast forwarding table corresponding to the node E.
  • the multicast routing identifier of node D1 and the multicast routing identifier derived from it, the multicast routing identifier of node C, and the multicast routing identifier of node E all include the multicast forwarding table identifier field, which is the identifier of the multicast routing table.
  • the first bit in the value of this bit is 1 to search for the multicast forwarding table corresponding to node D1, and the value of this bit is 0 to search for the multicast forwarding table 2.
  • Entity A receives the multicast packet A, and determines that the value of the first bit in the multicast routing identifier (ie, 1101101) of the node D1 in the multicast packet A is 1, then according to the multicast routing identifier of the node D1 Look up the multicast forwarding table (see Table 21) for the last 6 bits in the B.
  • the entity A After finding the entity O and the entity Q, the entity A sends the unicast packet B to the entity O and the entity Q, and the unicast packet B includes the data in the multicast packet A.
  • entity A finds entity B, it sends a multicast packet C to entity B.
  • the multicast packet C includes the multicast routing identifier 1 of node D1 (ie, 1000101), the multicast routing information of node C, and the multicast routing information of node E. multicast routing information and data.
  • the multicast routing information 1 of the node D1 in the multicast message C see (c) in FIG. 24A .
  • entity A since the first three bits in the multicast routing identifier of node D1 are processed by entity A, entity A updates the multicast routing identifier of node D1 to node D1 before sending multicast packet C
  • the multicast routing ID is 1.
  • Entity B receives the multicast packet C, and determines that the value of the first bit in the multicast routing identifier 1 (ie 1000101) of the node D1 in the multicast packet C is 1, then according to the multicast routing of the node D1
  • the last 6 bits in the identifier 1 are searched for the multicast forwarding table (see Table 22), it is determined that the bits whose value is 1 in the 6 bits all correspond to the entity C, and the multicast packet C is sent to the entity C.
  • Entity C's address next hop address 0 (corresponding to the first bit) Entity A's address 1 (corresponding to the second bit) Entity A's address 2 (corresponding to the 3rd bit) Entity A's address 3 (corresponding to the 4th bit) Entity C's address 4 (corresponding to the 5th bit) Entity C's address 5 (corresponding to the 6th bit) Entity C's address
  • Entity C receives the multicast packet C, and determines that the value of the first bit in the multicast routing identifier 1 (ie 1000101) of the node D1 in the multicast packet C is 1, then according to the multicast routing of the node D1
  • the last 6 bits in the identifier 1 look up the multicast forwarding table 1 (see Table 23), and determine that the first bit (that is, the fourth bit) of the 6 bits with a value of 1 corresponds to itself (that is, entity C), and the rest A bit with a value of 1 corresponds to entity D.
  • Entity D's address 5 (corresponding to the 6th bit) Entity D's address
  • entity C finds itself (ie, entity C), it obtains the multicast routing information of the node (ie, node C) corresponding to the first bit of the 6 bits (ie, the fourth bit), and determines the node
  • the value of the first bit in the multicast routing identifier (ie, 0011) of node C is 0, then according to the last three bits in the multicast routing identifier of node C, the multicast forwarding table 2 (see Table 11 above) is searched to determine The bit with a value of 1 among the three bits corresponds to the entity S and the entity T, and sends a message to the entity S and the entity T.
  • the unicast packet D sent to the entity S includes the data in the multicast packet A
  • the multicast packet D sent to the entity T includes the multicast routing information and data of the node T in the multicast packet A
  • the group For the multicast information of the node T included in the broadcast packet D see (e) in FIG. 22 .
  • the node T receives the multicast packet D, searches the multicast forwarding table (see Table 12 above) according to the multicast routing identifier 110 of the node T in the multicast packet D, and determines that the bit whose value is 1 in the three bits corresponds to the entity X and entity Y, send a unicast packet E to entity X and entity Y, where the unicast packet E includes the data in the multicast packet A.
  • entity C After finding entity D, entity C sends multicast packet F to entity D.
  • the multicast packet F includes multicast routing identifier 2 (ie 1000001) of node D1, and multicast routing information and data of node E.
  • multicast routing information 2 of the node D1 in the multicast packet F see (d) in FIG. 24A .
  • entity C since the multicast routing information of node C is processed by entity C, entity C updates the multicast routing ID 1 of node D1 to the multicast routing ID of node D1 before sending the multicast packet F 2.
  • Entity D receives the multicast packet F, and determines that the value of the first bit in the multicast routing identifier 2 (ie, 1000001) of the node D1 in the multicast packet F is 1, then according to the multicast routing of the node D1
  • the last 6 bits in the identifier 2 look up the multicast forwarding table 1 (see Table 24), determine that the bit whose value is 1 in the 6 bits corresponds to the entity E, and send the multicast packet F to the entity E.
  • Entity C's address 1 (corresponding to the second bit) Entity C's address 2 (corresponding to the 3rd bit) Entity C's address 3 (corresponding to the 4th bit) Entity C's address 4 (corresponding to the 5th bit) Entity C's address 5 (corresponding to the 6th bit) Entity E's address
  • Entity E receives the multicast packet F, and determines that the value of the first bit in the multicast routing identifier 2 (ie 1000001) of node D1 in the multicast packet F is 1, then according to the multicast routing of node D1
  • the last 6 bits in the identifier 2 look up the multicast forwarding table 1 (see Table 25), determine that the bit whose value is 1 in the 6 bits corresponds to itself (that is, the entity E), and obtain the first value of the 6 bits.
  • the multicast routing information of the node (that is, the node E) corresponding to the bit of 1 (that is, the sixth bit), and it is determined that the value of the first bit in the multicast routing identifier (that is, 0110) of the node E is 0, according to the node E.
  • the last 3 bits in the multicast routing identifier of E look up the multicast forwarding table 2 (see Table 15 above), determine that the bit with a value of 1 in the 3 bits corresponds to the entity U and the entity V, and send a single message to the entity U and the entity V.
  • the broadcast packet G, the unicast packet G includes the data in the multicast packet A.
  • Entity D's address 1 (corresponding to the second bit) Entity D's address 2 (corresponding to the 3rd bit) Entity D's address 3 (corresponding to the 4th bit) Entity D's address 4 (corresponding to the 5th bit) Entity D's address 5 (corresponding to the 6th bit) Entity E's address
  • Example 2 the embodiment shown in FIG. 20 is exemplified by taking the multicast routing identifier as a bit sequence as an example, wherein the bits in the bit sequence correspond to the nodes in the first node set one-to-one, and the bits in the bit sequence correspond to the nodes in the first node set.
  • the value of a bit is 1, it indicates that the node corresponding to the bit is a child node of node Z.
  • the length of the multicast routing identifier of node Z can be statically maintained in each node.
  • the first node set corresponding to the node Z is ⁇ node Q, node R, node E, node V ⁇ .
  • node R, node E, and node V are child nodes of node Z.
  • node 3 and entity A have topological connections, node 3 sends multicast packet A to node Z (for the multicast routing information of node Z in multicast packet A, see (a) in FIG. 24B ), Received by entity A in node Z.
  • the multicast routing information of node Z in the multicast packet A includes the multicast routing information of one non-leaf child node (ie, node E).
  • the entity A, the entity B, the entity C, the entity D, and the entity E store a multicast forwarding table 1, and the multicast forwarding table 1 is the multicast forwarding table corresponding to the node Z.
  • the entity E also stores a multicast forwarding table 2, and the multicast forwarding table 2 is the multicast forwarding table corresponding to the node E.
  • the multicast routing identifier of node Z, the multicast routing identifier derived from it, and the multicast routing identifier of node E all include a multicast forwarding table identifier field, which is the first bit in these multicast routing identifiers.
  • a bit value of 1 means searching for multicast forwarding table 1
  • a bit value of 0 means searching for multicast forwarding table 2.
  • Entity A receives the multicast packet A, and determines that the value of the first bit in the multicast routing identifier (that is, 10111) of node Z in the multicast packet A is 1, then according to the multicast routing identifier of node Z Find the last 4 bits in the multicast forwarding table 1 (see Table 26), and determine that the first and second bits in the 4 bits are 1 (that is, the second and third bits) correspond to entity C , and the third bit with a value of 1 (ie, the fourth bit) corresponds to entity B.
  • Entity C's address 1 (corresponding to the second bit) Entity C's address 2 (corresponding to the 3rd bit) Entity C's address 3 (corresponding to the 4th bit) Entity B's address
  • Entity A sends multicast packet B to entity B, and sends multicast packet C to entity C.
  • the multicast packet B includes the multicast routing identifier 1 (ie, 10001) of the node Z, and the multicast routing information 1 of the node Z in the multicast packet B can refer to (b) in FIG. 24B .
  • the multicast packet C includes the multicast routing identifier 2 (that is, 10110) of the node Z and the multicast routing information of the node E.
  • the multicast routing information 2 of the node Z in the multicast packet C can refer to ( c).
  • entity A since entity B does not process the second and third bits in the last four bits of the multicast routing identifier of node Z, before sending multicast packet B, entity A can The multicast routing ID is updated to the multicast routing ID 1 of node Z. Since entity C does not process the fourth bit of the last four bits in the multicast routing ID of node Z, entity A can update the multicast routing ID of node Z to node Z before sending multicast packet C. Z's multicast routing ID 2.
  • Entity B receives the multicast packet B, and determines that the value of the first bit in the multicast routing identifier 1 (ie 10001) of node Z in the multicast packet B is 1, then according to the multicast routing of node Z
  • the last 4 bits in the identifier 1 look up the multicast forwarding table 1 (see Table 27), determine that the first bit (that is, the fourth bit) of the 4 bits with a value of 1 corresponds to entity D, and send the group to entity D. Broadcast message B.
  • Entity D receives multicast packet B and determines that the value of the first bit in the multicast routing identifier 1 (ie 10001) of node Z in multicast packet B is 1, then according to the multicast routing identifier 1 of node Z Find the last 4 bits in the multicast forwarding table 1 (see Table 28), determine that the first bit (that is, the fourth bit) of the 4 bits corresponds to the entity V, and send the unicast message to the entity V D.
  • the unicast packet D includes the data in the multicast packet A.
  • Entity C receives the multicast packet C, and determines that the value of the first bit in the multicast routing identifier 2 (ie 10110) of node Z in the multicast packet C is 1, then according to the multicast routing of node Z
  • the last 4 bits in the identifier 2 look up the multicast forwarding table 1 (see Table 29), determine that the first bit of the 4 bits (that is, the second bit) corresponds to the entity R, and send a unicast report to the entity R
  • the unicast message E includes the data in the multicast message A, and the second bit (ie, the third bit) with a value of 1 corresponds to the entity E, and sends the multicast message F to the entity E.
  • the multicast packet F includes the multicast routing identifier 3 (ie, 10010) of the node Z.
  • the multicast routing identifier 2 is updated to the multicast routing identifier 3 of the node Z.
  • Entity E receives the multicast packet F, and determines that the value of the first bit in the multicast routing identifier 3 (ie 10010) of node Z in the multicast packet F is 1, then according to the multicast routing of node Z
  • the last 4 bits in the identifier 3 look up the multicast forwarding table 1 (see Table 30), determine that the bit (that is, the third bit) with a value of 1 in the 4 bits corresponds to itself (that is, the entity E), and obtain the group of node E.
  • the multicast forwarding table 2 is searched according to the last two bits in the multicast routing identifier of node E (see Table 31), obtain the entity S and the entity T, and send the unicast message G to the entity S and the entity T, and the unicast message G includes the data in the multicast message A.
  • Entity E's address 3 (corresponding to the 4th bit) Entity D's address
  • Example 3 the embodiment shown in FIG. 20 is exemplarily described by taking the multicast routing identifier as a bit sequence as an example, wherein the bits in the bit sequence correspond to the nodes in the first node set one-to-one, and the bits in the bit sequence correspond to the nodes in the first node set.
  • the value of a bit is 1, it indicates that the node corresponding to the bit is a child node of node Z.
  • the length of the multicast routing identifier of node Z can be statically maintained in each node.
  • the first node set corresponding to the node Z is ⁇ node X, node Q, node R, node E, node V ⁇ .
  • node X, node R, node E, and node V are child nodes of node Z. Since node 3 and entity A have topological connections, node 3 sends multicast packet A to node Z (for the multicast routing information of node Z in multicast packet A, see (a) in FIG. 24C ), Received by entity A in node Z.
  • the multicast routing information of node Z in the multicast packet A includes multicast routing information of two non-leaf child nodes (ie, node X and node E).
  • the entity A, the entity B, the entity C, the entity D, and the entity E store a multicast forwarding table 1, and the multicast forwarding table 1 is the multicast forwarding table corresponding to the node Z.
  • a multicast forwarding table 2 is also stored in the entity A and the entity B, and the multicast forwarding table 2 in the entity A and the entity B is the multicast forwarding table corresponding to the node X.
  • the entity E also stores a multicast forwarding table 2, and the multicast forwarding table 2 in the entity E is the multicast forwarding table corresponding to the node E.
  • the multicast routing ID of node Z and the multicast routing ID derived from it, the multicast routing ID of node X, and the multicast routing ID of node E all include the multicast forwarding table ID field, which is the multicast routing ID.
  • the first bit in the value of this bit is 1, which means searching for multicast forwarding table 1, and the value of this bit is 0, which means searching for multicast forwarding table 2.
  • Entity A receives the multicast packet A, and determines that the value of the first bit in the multicast routing identifier (that is, 110111) of node Z in the multicast packet A is 1, then according to the multicast routing identifier of node Z Find the last 5 bits in the multicast forwarding table 1 (see Table 32), and determine that the first bit (ie, the first bit) of the five bits corresponds to itself (ie, entity A), and the second The bit with a value of 1 (ie, the third bit) and the third bit with a value of 1 (ie, the fourth bit) correspond to entity C, and the fourth bit with a value of 1 (ie, the fifth bit) corresponds to entity B .
  • Entity A's address 1 (corresponding to the second bit) Entity C's address 2 (corresponding to the 3rd bit) Entity C's address 3 (corresponding to the 4th bit) Entity C's address 4 (corresponding to the 5th bit) Entity B's address
  • entity A finds itself (that is, entity A), it obtains the multicast routing information of the node (that is, node X) corresponding to the first bit (that is, the first bit) of the five bits.
  • the multicast routing identifier (ie 1) of node X looks up the multicast forwarding table (see Table 33), determines entity O, and sends unicast packet H to entity O, where unicast packet H includes the data in multicast packet A.
  • Entity A sends multicast packet B to entity B, and sends multicast packet C to entity C.
  • the multicast packet B includes the multicast routing identifier 1 (ie, 100001) of the node Z, and the multicast routing information 1 of the node Z in the multicast packet B can refer to (b) in FIG. 24C .
  • the multicast packet C includes the multicast routing identifier 2 (that is, 100110) of the node Z and the multicast routing information of the node E.
  • the multicast routing information 2 of the node Z in the multicast packet C can refer to ( c).
  • entity A since entity B does not process the third and fourth bits in the last five bits of the multicast routing identifier of node Z, before sending multicast packet B, entity A can The multicast routing ID is updated to the multicast routing ID 1 of node Z. Since entity C does not process the fifth bit of the last five bits in the multicast routing ID of node Z, entity A can update the multicast routing ID of node Z to node Z before sending multicast packet C Z's multicast routing ID 2.
  • Entity B receives the multicast packet B, and determines that the value of the first bit in the multicast routing identifier 1 (ie, 100001) of node Z in the multicast packet B is 1, then according to the multicast routing of node Z
  • the last 5 bits in the identifier 1 look up the multicast forwarding table 1 (see Table 34), determine that the first bit (that is, the fifth bit) of the 5 bits with a value of 1 corresponds to entity D, and send the group to entity D. Broadcast message B.
  • Entity D receives the multicast packet B, and determines that the value of the first bit in the multicast routing identifier 1 (ie, 100001) of node Z in the multicast packet B is 1, then according to the multicast routing identifier 1 of node Z Find the last 5 bits in the multicast forwarding table 1 (see Table 35), determine that the first bit (that is, the fifth bit) of the 5 bits with a value of 1 corresponds to the entity V, and send a unicast message to the entity V D.
  • the unicast packet D includes the data in the multicast packet A.
  • Entity D's address next hop address 0 (corresponding to the first bit) Entity B's address 1 (corresponding to the second bit) Entity C's address 2 (corresponding to the 3rd bit) Entity C's address 3 (corresponding to the 4th bit) Entity C's address 4 (corresponding to the 5th bit) Entity D's address
  • Entity B's address 1 (corresponding to the second bit) Entity B's address 2 (corresponding to the 3rd bit) Entity B's address 3 (corresponding to the 4th bit) Entity E's address 4 (corresponding to the 5th bit) Entity V's address
  • Entity C receives the multicast packet C, and determines that the value of the first bit in the multicast routing identifier 2 (ie 100110) of node Z in the multicast packet C is 1, then according to the multicast routing of node Z
  • the last 5 bits in the identifier 2 look up the multicast forwarding table 1 (see Table 36), determine that the first bit (that is, the third bit) of the 5 bits with a value of 1 corresponds to the entity R, and send a single message to the entity R.
  • the broadcast packet E, the unicast packet E includes the data in the multicast packet A, and the second bit (ie, the fourth bit) with a value of 1 corresponds to the entity E, and sends the multicast packet F to the entity E.
  • the multicast packet F includes the multicast routing identifier 3 (ie, 100010) of the node Z.
  • the multicast routing identifier 2 is updated to the multicast routing identifier 3 of the node Z.
  • Entity E receives the multicast packet F, and determines that the value of the first bit in the multicast routing identifier 3 (ie 100010) of node Z in the multicast packet F is 1, then according to the multicast routing of node Z
  • the last 5 bits in the identifier 3 look up the multicast forwarding table 1 (see Table 37), determine that the bit (that is, the fourth bit) whose value is 1 in the 5 bits corresponds to itself (that is, the entity E), and obtain the node Z's
  • the unicast packet G includes the data in the multicast packet A.
  • the number of entries in the multicast forwarding table in the node will not increase with the increase of the number of multicast streams. Therefore, even if the number of multicast streams is large, there is no need to expand more tables in the router. space to support the forwarding of multicast packets, therefore, the scalability is good.
  • the multicast packet is generated from the source node, and the multicast packet includes the multicast routing information of the non-leaf child nodes. Therefore, the forwarding path can be actively controlled by adjusting the multicast packet. For example, if there are multiple paths, the controller or source node can choose the optimal path through the control plane algorithm.
  • Multicast packets are generated from source nodes. Therefore, when a node joins or leaves a multicast tree, the source node can be informed, and the manageability is high. For example, the source node can collect user preferences through the application layer, and adjust the data in multicast packets according to these preferences.
  • the node does not need to send join signaling, therefore, the node does not need to process a large number of periodic signaling to avoid increasing the computing load, power consumption and processing resources of the node.
  • Multicast packets include multicast routing information of non-leaf child nodes. Non-leaf child nodes can forward multicast packets according to their own multicast routing information. Therefore, the number of packets will not be too many, and the multicast efficiency higher.
  • the multicast packet is generated from the source node, and the multicast packet includes the multicast routing information of the non-leaf child nodes. Therefore, the forwarding path can be actively controlled by adjusting the multicast packet. For example, if there are multiple paths, the controller or source node can choose the optimal path through the control plane algorithm.
  • Embodiment 1 the method provided in the above embodiment is exemplified by taking the multicast tree as the multicast tree shown in FIG. 25 and the implementation of the multicast routing identifier of the node by the above method 21 as an example.
  • Embodiment 2 the method provided in the foregoing embodiment is exemplarily described by taking the multicast tree as the multicast tree shown in FIG. 25 and the implementation of the multicast routing identifier of the node through the foregoing manner 22 as an example.
  • Embodiment 3 the method provided in the foregoing embodiment is exemplarily described by taking the multicast tree as the multicast tree shown in FIG. 28 and the implementation of the multicast routing identifier of the node through the foregoing manner 22 as an example.
  • the first node set corresponding to node B includes 2 nodes (ie node 1 and node R), then the bit width of the Idx field of node B is 1, and node B has 1 child Node (ie, node R), the index of node R is 1. Therefore, the value of the Cnt field in the multicast routing identifier of node B is 1, and the value of the Idx field is also 1.
  • the first node set corresponding to node R includes three nodes (ie, node B, node S, and node E), then the bit width of the Idx field of node R is 2, and node R has two child nodes, namely node S and node E.
  • the first node set corresponding to node S includes three nodes (ie, node R, node C, and node D), then the bit width of the Idx field of node S is 2, and node S has two child nodes, namely node C and node D. D.
  • the indices of node C and node D are 1 and 2 respectively.
  • the value of the Cnt field in the multicast routing identifier of node S is 2, the value of the Idx field is 2, and the values of the two Idx fields are 1 and 2 respectively.
  • the first node set corresponding to node C includes two nodes (ie node S and node 2), then the bit width of the Idx field of node C is 1, and node C has one child node, which is node 2, node 2
  • the index of the node C is 1. Therefore, the value of the Cnt field in the multicast routing identifier of node C is 1, and the value of the Idx field is 1.
  • the first node set corresponding to node D includes two nodes (ie node S and node 3), then the bit width of the Idx field of node D is 1, and node D has one child node, which is node 3, node 3
  • the index of the node D is 1. Therefore, the value of the Cnt field in the multicast routing identifier of node D is 1, and the value of the Idx field is 1.
  • the first node set corresponding to node E includes two nodes (that is, node R and node 4), then the bit width of the Idx field of node E is 1, and node E has one child node, which is node 4, node 4 The index of the node E is 1.
  • the value of the Cnt field in the multicast routing identifier of node E is 1, and the value of the Idx field is 1.
  • the multicast packet sent by node 1 to node B (referred to as multicast packet 1) can be referred to (a) in FIG. 26 .
  • the multicast packet sent by node 1 to node B (referred to as multicast packet 1) can be referred to (a) in FIG. 26 .
  • C before “:” indicates the Cnt field
  • I0 before “:” indicates the first Idx field
  • I1 before “:” indicates the second Idx field
  • Ls before “:” refers to the length of the multicast routing information of node S
  • the bit width of Ls is 1 byte.
  • Node B has only one subtree, that is, Node B has only one non-leaf child node
  • the location of the multicast routing information of the non-leaf child node can be determined by the length indicated by the first field and the difference of other fields. The length can be calculated. Therefore, the addressing field of Node B may not be carried in multicast packet 1.
  • each node in the multicast tree sends multicast packets as follows:
  • Node B parses multicast packet 1, and determines the position of the Cnt field (bits 9-16 in the multicast information of Node B) according to the length of the first field and the length of the Cnt field, and according to the value of the position If the value of the Cnt field is determined to be 1, then it is known that there is an Idx field (that is, Node B has a child node), and the position of the Idx field is determined according to the length of the Idx field (the 17th bit in the multicast information of Node B).
  • the multicast packet 2 may further include unicast encapsulation, where the source address in the unicast encapsulation is the address of node B, and the destination address is the address of node R.
  • node index next hop address 0 address of node 1 1 address of node R
  • node R has 2 subtrees, that is to say, node R has 2 non-leaf sub-nodes
  • the location of the multicast routing information of one non-leaf sub-node can be passed through the node in multicast packet 2
  • the addressing field of R indicates that the location of the multicast routing information of another non-leaf child node can be based on the length indicated by the first field in the multicast packet 2, the length indicated by the addressing field of node R, and the lengths of other fields. Calculated.
  • Node R receives and parses multicast packet 2, determines the position of the Cnt field (bits 9-16 in the multicast information of node R) according to the length of the first field and the length of the Cnt field, and determines the position of the Cnt field according to the length of the first field and the length of the Cnt field.
  • the value of the Cnt field determines the value of the Cnt field is 2, then it is known that there are 2 Idx fields (that is, the node R has 2 child nodes), and the positions of the 2 Idx fields are determined according to the length of the Idx field (the position of the first Idx field is The 17th-18th bits in the multicast information of node R, the position of the second Idx field is the 19th-20th bits in the multicast information of node R), and the first Idx is determined according to the value in this position
  • the value of the field is 1, and the value of the second Idx field is 2. Find the address of the next hop corresponding to the value of the Idx field in the multicast forwarding table of node R (see Table 40 below), and obtain node S and The address of node E.
  • node index next hop address 0
  • Node R according to the length of the first field, the length of the multicast routing identifier of node R, the length of the addressing field of node R, the length of the multicast routing information of node S indicated by the addressing field of node R, and the first
  • the total length of the multicast routing information of the node R indicated by the field determines the position of the multicast routing information of the node S in the multicast packet 2 (bits 29-58 in the multicast information of the node R), according to the position
  • the multicast routing information of the node S is extracted, and the multicast packet 3 is obtained by multicast encapsulation, and the multicast packet 3 is sent to the node S.
  • the multicast packet 3 may further include unicast encapsulation, where the source address in the unicast encapsulation is the address of node R, and the destination address is the address of node S.
  • node C has only one child node of node 2 and node 2 is a leaf node
  • node D has only one child node of node 3 and node 3 is a leaf node.
  • the number of Idx fields of node C and node D is different. will change, and both are 1. Therefore, the lengths of the Idx fields of the nodes C and D can be statically maintained in the node S. In this case, the addressing field of the node S may not be included in the multicast packet 3.
  • Node R according to the length of the first field, the length of the multicast routing identifier of node R, the length of the addressing field of node R, the length of the multicast routing information of node S indicated by the addressing field of node R, and the first The total length of the multicast routing information of node R indicated by the field, determines the position of the multicast routing information of node E in multicast packet 2 (bits 59-67 in the multicast information of node R), according to the position The multicast routing information of the node E is extracted, and the multicast packet 4 is obtained by multicast encapsulation, and the multicast packet 4 is sent to the node E.
  • the multicast packet 4 may further include unicast encapsulation, where the source address in the unicast encapsulation is the address of node R, and the destination address is the address of node E.
  • Node S receives and parses multicast packet 3, determines the position of the Cnt field (bits 9-16 in the multicast information of node S) according to the length of the first field and the length of the Cnt field, and determines the position of the Cnt field according to the length of the first field and the length of the Cnt field
  • the value of Cnt determines that the value of the Cnt field is 2, then it is known that there are 2 Idx fields (that is, node S has 2 child nodes), and the positions of the 2 Idx fields are determined according to the length of the Idx field (the position of the first Idx field is The 17th-18th bits in the multicast information of node S, the position of the second Idx field is the 19th-20th bits in the multicast information of node S), and the first Idx is determined according to the value in this position
  • the value of the field is 1, and the value of the second Idx field is 2.
  • node index next hop address 0 address of node R 1 address of node C 2 address of node D
  • Node S determines the group of node C in multicast packet 3 according to the length of the first field, the length of the multicast routing identifier of node S, and the length of the statically maintained multicast routing information of node C (that is, 9).
  • the position of the multicast routing information (bits 21-29 in the multicast information of node S), extract the multicast routing information of node C according to the position, and perform multicast encapsulation to obtain multicast packet 5, which is sent to node C.
  • the multicast packet 5 may also include unicast encapsulation, where the source address in the unicast encapsulation is the address of node S, and the destination address is the address of node C.
  • Node S according to the length of the first field, the length of the multicast routing identifier of node S, the length of the multicast routing information of node C (that is, 9) statically maintained, and the multicast routing of node S indicated by the first field
  • the total length of the information determine the location of the multicast routing information of node D in multicast packet 3 (the 30th to 38th bits in the multicast information of node S), and extract the multicast routing information of node D according to the position , and perform multicast encapsulation to obtain a multicast packet 6, and send the multicast packet 6 to node D.
  • the structure of the multicast information of the node D in the multicast packet 6 is similar to the structure of the multicast routing information of the node C, which can be understood by reference, and will not be repeated here.
  • Node C receives and parses the multicast packet 5, determines the position of the Cnt field (bits 9-16 in the multicast information of Node C) according to the length of the first field and the length of the Cnt field, and The value of the Cnt field is determined to be 1, then it is known that there is one Idx field (that is, node C has one child node), and the position of the Idx field is determined according to the length of the Idx field (No.
  • node index next hop address 0 address of node S 1 address of node 2
  • node D node D
  • node E node C
  • node C The multicast packet processing processes of node D, node E, and node C are similar, which can be understood by reference, and will not be repeated here.
  • the first node set corresponding to node B includes two nodes (ie node 1 and node R), then the bit width of the bit sequence of node B is 2, and the first bit is the same as Node 1 corresponds to node 1, and the second bit corresponds to node R, which is a child node of node B. Therefore, the value of 2 bits is 01.
  • the first node set corresponding to node R includes 3 nodes (ie, node B, node S, and node E), then the bit width of the bit sequence of node R is 3, the first bit corresponds to node B, and the second bit corresponds to node B.
  • the third bit corresponds to node E, node S and node E are child nodes of node R, therefore, the value of 3 bits is 011.
  • the first node set corresponding to node S includes 3 nodes (ie node R, node C and node D), then the bit width of the bit sequence of node S is 3, the first bit corresponds to node R, and the second bit
  • the third bit corresponds to node D, node C and node D are child nodes of node S, therefore, the value of 3 bits is 011.
  • the first node set corresponding to node C includes two nodes (ie node S and node 2), then the bit width of the bit sequence of node C is 2, the first bit corresponds to node S, and the second bit corresponds to node 2
  • node 2 is a child node of node C, therefore, the value of 2 bits is 01.
  • the first node set corresponding to node D includes two nodes (ie node S and node 3), then the bit width of the bit sequence of node D is 2, the first bit corresponds to node S, and the second bit corresponds to node 3
  • node 3 is a child node of node D, so the value of 2 bits is 01.
  • the first node set corresponding to node E includes two nodes (ie node R and node 4), then the bit width of the bit sequence of node E is 2, the first bit corresponds to node R, and the second bit corresponds to node 4 Correspondingly, node 4 is a child node of node E, so the value of 2 bits is 01.
  • the bit width of the first field is 1 byte
  • the multicast packet sent by node 1 to node B (referred to as multicast packet 1) can be referred to (a) in FIG. 27 .
  • multicast packet 1 to node B (referred to as multicast packet 1) can be referred to (a) in FIG. 27 .
  • multicast packet 1 to node B (referred to as multicast packet 1) can be referred to (a) in FIG. 27 .
  • the multicast packet sent by node 1 to node B (referred to as multicast packet 1) can be referred to (a) in FIG. 27 .
  • multicast packet 1 to node B (referred to as multi
  • the letter before “:” indicates the node corresponding to the field, and the value after “:” indicates the bit sequence corresponding to the field;
  • the Ls before “:” in the addressing field of node R It refers to the length of the multicast routing information of node S, the value after ":” indicates the value of this field, and the bit width of Ls is 1 byte.
  • Node B has only one subtree, that is, Node B has only one non-leaf child node
  • the location of the multicast routing information of the non-leaf child node can be determined by the length indicated by the first field and the difference of other fields. The length can be calculated. Therefore, the addressing field of Node B may not be carried in multicast packet 1.
  • each node in the multicast tree sends multicast packets as follows:
  • Node B parses multicast packet 1, determines the position of the bit sequence (bit 9-10 in the multicast information of Node B) according to the length of the first field and the length of the bit sequence, and determines the bit sequence according to the position is 01, then look up the address of the next hop corresponding to the value of the bit (that is, the second bit) that is not 0 in the multicast forwarding table of node B (see Table 43 below), and obtain the address of node R. address.
  • the multicast packet 2 may further include unicast encapsulation, where the source address in the unicast encapsulation is the address of node B, and the destination address is the address of node R.
  • node R has 2 subtrees, that is to say, node R has 2 non-leaf sub-nodes
  • the location of the multicast routing information of one non-leaf sub-node can be passed through the node in multicast packet 2
  • the addressing field of R indicates that the location of the multicast routing information of another non-leaf child node can be based on the length indicated by the first field in the multicast packet 2, the length indicated by the addressing field of node R, and the lengths of other fields. Calculated.
  • Node R receives and parses the multicast packet 2, determines the position of the bit sequence (bit 9-11 in the multicast information of node R) according to the length of the first field and the length of the bit sequence, and determines according to the position
  • the value of the bit sequence is 011, then look up the address of the next hop corresponding to the bits (that is, the second bit and the third bit) that are not 0 in the multicast forwarding table of node R (see Table 44 below) , get the addresses of node S and node E.
  • Node R according to the length of the first field, the length of the multicast routing identifier of node R, the length of the addressing field of node R, the length of the multicast routing information of node S indicated by the addressing field of node R, and the first
  • the total length of the multicast routing information of the node R indicated by the field determines the position of the multicast routing information of the node S in the multicast packet 2 (bits 20-26 in the multicast information of the node R), according to the position
  • the multicast routing information of the node S is extracted, and the multicast packet 3 is obtained by multicast encapsulation, and the multicast packet 3 is sent to the node S.
  • the multicast packet 3 may further include unicast encapsulation, where the source address in the unicast encapsulation is the address of node R, and the destination address is the address of node S.
  • the bit widths of the multicast routing identifiers of node C and node D will not change, both of which are 2. Therefore, the bit width of the multicast routing identifiers of the node C and the node D can be statically maintained in the node S. In this case, the addressing field of the node S may not be included in the multicast packet 3.
  • Node R according to the length of the first field, the length of the multicast routing identifier of node R, the length of the addressing field of node R, the length of the multicast routing information of node S indicated by the addressing field of node R, and the first
  • the total length of the multicast routing information of node R indicated by the field determines the position of the multicast routing information of node E in multicast packet 2 (bits 27-28 in the multicast information of node R), according to the position
  • the multicast routing information of the node E is extracted, and the multicast packet 4 is obtained by multicast encapsulation, and the multicast packet 4 is sent to the node E.
  • the multicast packet 4 may further include unicast encapsulation, where the source address in the unicast encapsulation is the address of node R, and the destination address is the address of node E.
  • Node S receives and parses multicast packet 3, determines the position of the bit sequence (bit 9-11 in the multicast information of node S) according to the length of the first field and the length of the bit sequence, and determines according to the position If the value of the bit sequence is 011, then look up the address of the next hop corresponding to the bits that are not 0 (that is, the second bit and the third bit) in the multicast forwarding table of node S (see Table 45 below) , get the addresses of node C and node D.
  • bits in a sequence of bits next hop address 1st address of node R 2nd address of node C 3rd address of node D
  • Node S determines the multicast of node C in multicast message 3 according to the length of the first field, the length of the multicast routing identifier of node S, and the total length of the multicast routing information of node S indicated by the first field
  • the location of the routing information (bits 12-13 in the multicast information of node S)
  • extract the multicast routing information of node C according to the location and perform multicast encapsulation to obtain multicast packet 5, which is sent to node C Multicast packet 5.
  • the multicast packet 5 may also include unicast encapsulation, where the source address in the unicast encapsulation is the address of node S, and the destination address is the address of node C.
  • Node S determines the multicast of node D in multicast message 3 according to the length of the first field, the length of the multicast routing identifier of node S, and the total length of the multicast routing information of node S indicated by the first field
  • the location of the routing information (bits 14-15 in the multicast information of node S), extract the multicast routing information of node D according to the location, and perform multicast encapsulation to obtain multicast packet 6, which is sent to node D Multicast message 6.
  • the structure of the multicast information of the node D in the multicast packet 6 is similar to the structure of the multicast routing information of the node C, which can be understood by reference, and will not be repeated here.
  • Node C receives and parses the multicast packet 5, determines the position of the bit sequence (bit 9-10 in the multicast information of node C) according to the length of the first field and the length of the bit sequence, and determines according to the position The value of the bit sequence is 01, then look up the address of the next hop corresponding to the bit (that is, the second bit) that is not 0 in the multicast forwarding table of node C (see Table 46 below), and obtain the address of the next hop of node 2. address, and send a unicast packet 6 to node 2, where the unicast packet 6 includes the data in the multicast packet 1.
  • bits in a sequence of bits next hop address 1st address of node S 2nd address of node 2
  • node D node D
  • node E node C
  • node C The multicast packet processing processes of node D, node E, and node C are similar, which can be understood by reference, and will not be repeated here.
  • the multicast source is node 1
  • the multicast destination nodes include: node O, node Q, node S, node X, node Y, node U, node V, Node G, Node H.
  • Entity A, Entity B, Entity C, Entity D, and Entity E form Node D1.
  • Figure 21 shows the topology connections between entities in Node D1 and between entities in Node D1 and entities other than Node D1.
  • Entity F, entity G and entity H form node D2
  • the topological connection between entities in node D2 can refer to (b) in FIG.
  • the first node set corresponding to node 3 includes 2 nodes (ie node 1 and node 5), then the bit width of the bit sequence of node 3 is 2, the first bit corresponds to node 1, and the second bit corresponds to node 5 Correspondingly, node 5 is a child node of node 3, so the value of 2 bits is 01.
  • the first node set corresponding to node 5 includes 3 nodes (ie node 3, node D1 and node D2), then the bit width of the bit sequence of node 5 is 3, the first bit corresponds to node 3, and the second bit Corresponding to node D1, the third bit corresponds to node D2, and node D1 and node D2 are child nodes of node 5, so the value of 3 bits is 011.
  • the first node set corresponding to node D1 includes 5 nodes (ie, node A, node B, node C, node D, and node E), then the bit width of the bit sequence of node D1 is 5, and the 5 bits from front to back Corresponding to node A, node B, node C, node D and node E respectively, node A, node C and node E are child nodes of node D1, therefore, the value of 5 bits is 10101.
  • the first node set corresponding to node A includes 3 nodes (ie node O, node P and node Q), then the bit width of the bit sequence of node A is 3, the first bit corresponds to node O, and the second bit Corresponding to node P, the third bit corresponds to node Q, node O and node Q are child nodes of node A, therefore, the value of 3 bits is 101.
  • the first node set corresponding to node C includes 3 nodes (ie node R, node S and node T), then the bit width of the bit sequence of node C is 3, the first bit corresponds to node R, and the second bit Corresponding to node S, the third bit corresponds to node T, node S and node T are child nodes of node C, therefore, the value of 3 bits is 011.
  • the first node set corresponding to node T includes 3 nodes (ie node X, node Y and node Z), then the bit width of the bit sequence of node T is 3, the first bit corresponds to node X, and the second bit corresponds to node X.
  • the third bit corresponds to node Z, node X and node Y are child nodes of node T, therefore, the value of 3 bits is 110.
  • the first node set corresponding to node E includes 3 nodes (ie node U, node V and node W), then the bit width of the bit sequence of node E is 3, the first bit corresponds to node U, and the second bit Corresponding to node V, the third bit corresponds to node W, node U and node V are child nodes of node E, therefore, the value of 3 bits is 110.
  • the first node set corresponding to node D2 includes 3 nodes (ie node F, node G and node H), then the bit width of the bit sequence of node D2 is 3, the first bit corresponds to node F, and the second bit Corresponding to node G, the third bit corresponds to node H, and node G and node H are child nodes of node D2, so the value of 3 bits is 011.
  • the multicast packet sent by node 1 to node B (referred to as multicast packet 1) can be referred to (a) in FIG. 29 .
  • the multicast packet sent by node 1 to node B (referred to as multicast packet 1) can be referred to (a) in FIG. 29 .
  • (b) in FIG. 29 (b) in FIG. 29 , (c) in FIG. 29 , (d) in FIG.
  • L D1 before “:” in the addressing field of node 5 Refers to the length of the multicast routing information of node D1, the value after “:” indicates the value of this field, the bit width of L D1 is 1 byte; the L C before “:” in the addressing field of node D1 is Refers to the addressing field of node C , the value after ":” indicates the value of this field, and the bit width of LC is 1 byte.
  • node 3 has only one subtree, that is, node 3 has only one non-leaf child node
  • the location of the multicast routing information of the non-leaf child node can be determined by the length indicated by the first field and the difference between other fields. The length is calculated, therefore, the addressing field of node 3 may not be carried in multicast packet 1.
  • each node in the multicast tree sends multicast packets as follows:
  • Node 1 sends multicast packet 1 to node 3, and node 3 receives and parses multicast packet 1, and determines the position of the bit sequence according to the length of the first field and the length of the bit sequence (in the multicast information of node 3).
  • the 9th to 10th bits according to the position, the value of the bit sequence is determined to be 01, then the multicast forwarding table of node 3 (see Table 47 below) is searched for the bit that is not 0 (that is, the second bit)
  • the value of corresponds to the address of the next hop, and the address of node 5 is obtained.
  • the length of the first field and the length of the bit sequence of node 3 determine the location of the multicast routing information of node 5 in multicast packet 1 (node 3 The 11th to 53rd bits in the multicast information), extract the multicast routing information of node 5 according to the position, perform multicast encapsulation to obtain multicast packet 2, and send multicast packet 2 to node 5.
  • the structure of the multicast information of node 5 in multicast packet 2 see (b) in Figure 29, where the length of the multicast routing information of node 5 is 43.
  • the multicast packet 2 may also include unicast encapsulation, where the source address in the unicast encapsulation is the address of node 3 and the destination address is the address of node 5 .
  • Node 5 receives and parses multicast packet 2, determines the position of the bit sequence (bit 9-11 in the multicast information of node 5) according to the length of the first field and the length of the bit sequence, and determines according to the position If the value of the bit sequence is 011, then look up the address of the next hop corresponding to the bits that are not 0 (that is, the second bit and the third bit) in the multicast forwarding table of node 5 (see Table 48 below) , get the addresses of entity A and entity F.
  • Node 5 according to the length of the first field, the length of the bit sequence of node 5, the length of the addressing field of node 5, the length of the multicast routing information of node D1 indicated by the addressing field of node 5, and the first field indication
  • the total length of the multicast routing information of node 5 in the The multicast routing information of the node D1 is obtained, and the multicast packet 3 is obtained by the multicast encapsulation, and the multicast packet 3 is sent to the entity A.
  • the multicast packet 3 may further include unicast encapsulation, where the source address in the unicast encapsulation is the address of the node 5, and the destination address is the address of the entity A in the node D1.
  • the entity A in the node D1 receives the multicast message 3 and forwards the multicast message.
  • the entity A in the node D1 receives the multicast message 3 and forwards the multicast message.
  • the specific process refer to the above steps 51)-step 59), and replace the multicast message A with the multicast message 3 to understand That's it.
  • the node 5 is based on the length of the first field, the length of the multicast routing identifier of the node 5, the length of the addressing field of the node 5, the length of the multicast routing information of the node D1 indicated by the addressing field of the node 5, and the first
  • the total length of the multicast routing information of node 5 indicated by the field determine the position of the multicast routing information of node D2 in multicast packet 2 (bits 49-51 in the multicast information of node 5), according to the position
  • the multicast routing information of the node D2 is extracted, and the multicast packet 4 is obtained by multicast encapsulation, and the multicast packet 4 is sent to the entity F.
  • the multicast packet 4 may also include unicast encapsulation, where the source address in the unicast encapsulation is the address of the node 5, and the destination address is the address of the entity F in the node D2.
  • the entity F in the node D2 receives and parses the multicast message 4, and determines the position of the bit sequence according to the length of the first field and the length of the bit sequence (the 9th-11th bits in the multicast information of the node D2), The value of the bit sequence is determined to be 011 according to the position, then the multicast forwarding table of node D2 (see Table 49 below) is searched for the lower bits corresponding to the bits that are not 0 (that is, the second bit and the third bit). The address of one hop is obtained to obtain the address of entity G and the address of entity H. Entity F sends unicast packet 5 to entity G and entity H, and unicast packet 5 includes the data in multicast packet 1.
  • the method provided by the present application is exemplified by taking the example that the multicast message does not include the type field. If the current node supports multiple types of multicast routing identifiers, and the multicast packet may include a type field, the node can 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.
  • bit width of any field in the multicast packet is exemplary.
  • the bit width of any field may not be byte-aligned, or may be aligned (for example, the field is is 1 byte, 2 bytes or more), which is not limited in this application.
  • a node after receiving the multicast packet, a node (or an entity in the node) can determine whether the packet header of the multicast packet contains multicast encapsulation according to the indication of the field in the outer layer encapsulation, If the destination address in the outer encapsulation is the address of the node (or the entity), and it is determined that the packet header in the multicast packet contains multicast encapsulation, the node (or the entity) can strip the outer encapsulation to obtain the multicast packet. multicast encapsulation, and perform corresponding processing on multicast packets according to the multicast encapsulation.
  • a node (or entity) before a node (or entity) sends a multicast packet to multiple nodes (or entities), it can copy the received multicast packet, and when sending to N nodes (or entities), copy N -1 copy, edit the copied multicast packet and the received multicast packet to obtain the multicast packet to be sent. If the multicast packet is only sent to one node (or entity), it can be edited directly on the received multicast packet without copying. When a node (or entity) replicates a multicast packet, it can copy all of it at one time, and then edit and send the multicast packet in parallel. It is also possible to copy one multicast message at a time, edit the multicast message and send it.
  • a node (or entity) sending a multicast packet to another node (or entity) means that the source address of the multicast packet is the one node (or entity) entity), and the destination address is the address of the other node (or entity).
  • the meaning represented by 0 can also be represented by 0, and the meaning when it is 0 can also be represented by 1. No restrictions apply.
  • bit in the bit sequence in the above embodiment when the value of a bit in the bit sequence in the above embodiment is 1, it indicates that the bit is a child node of node D1, and when the value is 0, it indicates that the bit is not a child node of node D1.
  • the value of a bit in the sequence is 0, it indicates that the bit is a child node of the node D1, and when the value is 1, it indicates that the bit is not a child node of the node D1.
  • Other bits are similar and will not be described one by one.
  • each network element for example, a node or an entity, includes at least one of a hardware structure and a software module corresponding to performing each function in order to implement the above-mentioned functions.
  • a hardware structure for example, a hardware structure
  • a software module corresponding to performing each function in order to implement the above-mentioned functions.
  • the present application can be implemented in hardware or a combination of hardware and computer software with the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
  • a node or an entity may be divided into functional units according to the foregoing method examples.
  • each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and other division methods may be used in actual implementation.
  • FIG. 30 shows a possible schematic structural diagram of the communication device (referred to as the communication device 300 ) involved in the above embodiment, where the communication device 300 includes a processing unit 3001 and a communication unit 3002 .
  • a storage unit 3003 is also included.
  • the communication apparatus 300 may be used to illustrate the structure of the nodes or entities in the above embodiments.
  • the processing unit 3001 is used to control and manage the actions of the first node, for example, the processing unit 3001 is used to execute the operation of FIG. 6 601 and 602 in FIG. 19 , 1901-1904 in FIG. 19 , and/or actions performed by the first node in other processes described in the embodiments of this application.
  • the processing unit 3001 may communicate with other nodes or entities through the communication unit 3002, eg, with the second node in FIG. 6 .
  • the storage unit 3003 is used for storing program codes and data of the first node.
  • the processing unit 3001 is used to control and manage the actions of the second node, for example, the processing unit 3001 is used to execute the operation of FIG. 6 602 in FIG. 19 , 1904 in FIG. 19 , and/or actions performed by the second node in other processes described in the embodiments of the present application.
  • the processing unit 3001 may communicate with other nodes or entities through the communication unit 3002, eg, with the first node in FIG. 6 .
  • the storage unit 3003 is used for storing program codes and data of the second node.
  • the processing unit 3001 is used to control and manage the actions of the first entity, for example, the processing unit 3001 is used to execute the operation of FIG. 20 Actions performed by the first entity in 2001-2003 in and/or other processes described in the embodiments of this application.
  • the processing unit 3001 may communicate with other nodes or entities through the communication unit 3002, eg, with a second entity.
  • the storage unit 3003 is used to store program codes and data of the first entity.
  • the processing unit 3001 is used to control and manage the actions of the nodes or entities, and the nodes or entities are used to execute this Actions performed by the node or entity in the process described in the application embodiments.
  • the communication apparatus 300 may be a device or a chip or a chip system.
  • the processing unit 3001 may be a processor; the communication unit 3002 may be a communication interface, a transceiver, an input interface and/or an output interface.
  • the transceiver may be a transceiver circuit.
  • the input interface may be an input circuit, and the output interface may be an output circuit.
  • the processing unit 3001 may be a processor, a processing circuit, a logic circuit, or the like.
  • the communication unit 3002 may be a communication interface, an input interface and/or an output interface, an interface circuit, an output circuit, an input circuit, a pin or a related circuit, etc. on the chip or chip system.
  • the integrated units in FIG. 30, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the medium includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • Storage media for storing computer software products include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or CD, etc. that can store program codes medium.
  • the processing unit 3001 is a processor
  • the communication unit 3002 is a communication interface
  • the storage unit 3003 is a memory
  • the communication device involved in this embodiment of the present application may be the communication device 310 shown in FIG. 31 .
  • FIG. 31 is a schematic diagram of a hardware structure of a communication apparatus provided by an embodiment of the present application, and the communication apparatus may be a node or an entity in this document.
  • the communication device 310 includes at least one processor 3101 , a communication bus 3102 and at least one communication interface 3104 .
  • a memory 3103 is also included.
  • the communication device 310 includes a processor 3101 and a communication interface 3104 as an example for drawing.
  • the processor 3101, the communication interface 3104 and the memory 3103 can communicate with each other through the communication bus 3102, and transmit control and/or data signals.
  • the computer program is invoked and executed to control the communication interface 3104 to send and receive signals.
  • the processor 3101 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more An integrated circuit for controlling the execution of the program of the present application.
  • the communication interface 3104 can be any device such as a transceiver.
  • the processor 3101 may be a logic circuit
  • the communication interface 3104 may include an input interface and/or an output interface.
  • Communication interface 3104 using any transceiver-like device, is used to communicate with other devices or a communication network.
  • the memory 3103 can be a ROM or other types of static storage devices that can store static information and instructions, a RAM or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (electrically erasable programmable read-only memory).
  • read-only memory EEPROM
  • compact disc read-only memory CD-ROM
  • optical disc storage including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.
  • magnetic disk A storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, without limitation.
  • the memory may exist independently and be connected to the processor through the communication bus 3102. The memory can also be integrated with the processor.
  • the memory 3103 is used for storing computer-executed instructions for executing the solution of the present application, and the execution is controlled by the processor 3101 .
  • the processor 3101 is configured to execute the computer-executed instructions stored in the memory 3103, thereby implementing the methods provided by the following embodiments of the present application.
  • the computer-executed instructions in the embodiment of the present application may also be referred to as application code, which is not specifically limited in the embodiment of the present application.
  • the processor 3101 is used to control and manage the actions of the first node, for example, the processor 3101 is used to execute the operation of FIG. 6 601 and 602 in FIG. 19 , 1901-1904 in FIG. 19 , and/or actions performed by the first node in other processes described in the embodiments of this application.
  • the processor 3101 may communicate with other nodes or entities through the communication interface 3104, eg, with the second node in FIG. 6 .
  • the memory 3103 is used to store program codes and data of the first node.
  • the processor 3101 is used to control and manage the actions of the second node, for example, the processor 3101 is used to execute the operation of FIG. 6 602 in FIG. 19 , 1904 in FIG. 19 , and/or actions performed by the second node in other processes described in the embodiments of the present application.
  • the processor 3101 may communicate with other nodes or entities through the communication interface 3104, eg, with the first node in FIG. 6 .
  • the memory 3103 is used to store program codes and data of the second node.
  • the processor 3101 is used to control and manage the actions of the first entity, for example, the processor 3101 is used to execute FIG. 20 Actions performed by the first entity in 2001-2003 in and/or other processes described in the embodiments of this application.
  • the processor 3101 may communicate with other nodes or entities through the communication interface 3104, eg, with a second entity.
  • the memory 3103 is used to store program codes and data of the first entity.
  • the processing unit 3001 is used to control and manage the actions of the nodes or entities, and the nodes or entities are used to execute this Actions performed by the node or entity in the process described in the application embodiments.
  • Embodiments of the present application further provide a computer-readable storage medium, including instructions, which, when executed on a computer, cause the computer to execute any of the foregoing methods.
  • Embodiments of the present application also provide a computer program product containing instructions, which, when run on a computer, enables the computer to execute any of the above methods.
  • An embodiment of the present application further provides a communication system, where the communication system includes one or more nodes in the foregoing embodiments, or the communication system includes one or more entities in the foregoing embodiments, or the communication system It includes one or more nodes and one or more entities in the above embodiments.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • a software program it 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. When the computer-executed instructions are loaded and executed on the computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or data storage devices including one or more servers, data centers, etc. that can be integrated with the medium.
  • the usable media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid state disks (SSDs)), and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供了一种组播报文发送方法及装置,涉及通信技术领域。该方法中,第一节点获取包括第二节点的组播路由信息的第一组播报文,并向第二节点发送第一组播报文。其中,第二节点为组播树中第一节点的非叶子子节点,一个节点的组播路由信息包括该节点的组播路由标识和该节点在组播树中的非叶子子节点的组播路由信息,一个节点的组播路由标识用于该节点确定在组播树中的子节点,通过将组播路由信息嵌入到组播报文中,组播报文中包括的树形递归结构的组播路由信息可以描述某个组播树或组播树的子树的报文转发信息,可扩展性好,并且根据需要可以方便的进行转发路径的规划和指定。

Description

组播报文发送方法及装置
本申请要求于2021年03月22日提交国家知识产权局、申请号为202110304363.4、申请名称为“组播报文发送方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种组播报文发送方法及装置。
背景技术
组播是指一个发送端把携带相同数据的报文发送给多个特定的接收端,最初的实现是发送端把一个报文中的数据按照接收端的数量拷贝成多份,分别进行封装发送给各个接收端,这种做法导致了报文在某些链路上重复传输,降低了网络资源的利用率,增加了网络拥塞的可能。
为了解决上述问题,业界提出了一系列组播技术,最典型的有稀疏模式协议无关组播(protocol independent multicast-sparse mode,PIM-SM)。其中,PIM-SM需要在网络中为每条组播流维护多播转发信息库(multicast forwarding information base,MFIB)表,有严重的可扩展性问题。
发明内容
本申请实施例提供了一种组播报文发送方法及装置,用于提高组播报文的可扩展性。
第一方面,提供了一种组播报文发送方法,包括:第一节点获取包括第二节点的组播信息的第一组播报文,并向第二节点发送第一组播报文。其中,第二节点为组播树中第一节点的非叶子子节点,第二节点的组播信息中包括第二节点的组播路由信息,一个节点的组播路由信息包括该节点的组播路由标识和该节点在组播树中的非叶子子节点的组播路由信息,一个节点的组播路由标识用于该节点确定在组播树中的子节点。第一方面提供的方法,将组播路由信息嵌入到组播报文中,组播报文中包括的树形递归结构的组播路由信息可以描述某个组播树或组播树的子树的报文转发信息,可扩展性好,并且根据需要可以方便的进行转发路径的规划和指定。
在一种可能的实现方式中,一个节点的组播路由标识用于该节点在该节点对应的第一节点集合内确定该节点在所述组播树中的子节点,一个节点对应的第一节点集合中包括该节点的部分或全部潜在子节点。
在一种可能的实现方式中,一个节点的组播路由标识包括该节点的子节点的个数信息和该节点的每个子节点的标识。
在一种可能的实现方式中,一个节点的组播路由标识包括第三字段和X个第四字段;所述第三字段用于指示该节点的子节点的个数X,一个所述第四字段用于指示该节点的一个子节点的标识。该种可能的实现方式,在组播树中的节点极低密度的组播场景下,可以提供最高效率的组播封装。
在一种可能的实现方式中,一个节点的组播路由标识包括N个第三字段,N为该节点对应的第一节点集合中的节点个数,一个所述第三字段用于指示所述第一节点集合中的一个节点是否为该节点在所述组播树中的子节点,一个节点对应的第一节点集合中包括该节点的部分或全部潜在子节点。该种可能的实现方式,在组播树中的节点较高密度的组播场景下,可以提供最高效率的组播封装。
在一种可能的实现方式中,一个节点的组播路由标识包括第三字段,所述第三字段中包括第一组标识,所述第一组标识用于指示该节点对应的第一节点组,一个节点对应的第一节点组中的节点均为该节点的子节点。该种可能的实现方式,在组播树中的节点最高密度的组播场景下,可以提供最高效率的组播封装。
在一种可能的实现方式中,一个节点的组播路由信息还包括该节点的寻址字段;其中,一个节点的寻址字段用于该节点确定该节点的非叶子子节点的组播路由信息的位置。
在一种可能的实现方式中,一个节点的寻址字段用于指示该节点的非叶子子节点的组播路由信息的长度。该种可能的实现方式,可以节约寻址字段的比特开销,提高资源利用率。
在一种可能的实现方式中,一个节点的寻址字段用于指示该节点的非叶子子节点的组播路由信息的起始位置或结束位置。该种可能的实现方式,可以使得节点快速的确定组播路由信息的位置,提高组播效率。
在一种可能的实现方式中,一个节点的寻址字段包括多个定界字段,该节点的非叶子子节点的组播路由信息由所述多个定界字段分隔开。
在一种可能的实现方式中,所述第二节点的组播信息中还包括:第二节点的第一字段;所述第一字段用于指示所述第二节点的组播路由信息的长度或者所述第二节点的组播信息的长度。
在一种可能的实现方式中,所述第二节点的组播信息中还包括:第二字段,所述第二字段用于对齐所述第二节点的组播信息的字节。
在一种可能的实现方式中,所述第一组播报文为IP报文,所述第一组播报文中的目的地址为所述第二节点的地址,所述第一组播报文还包括数据,所述第一组播报文中的所述第二节点的组播信息位于所述第一组播报文的IP头部和所述数据之间。
在一种可能的实现方式中,所述第一节点获取第一组播报文,包括:所述第一节点接收第二组播报文,所述第二组播报文包括所述第一节点的组播路由信息;所述第一节点确定所述第二节点为所述第一节点的非叶子子节点;所述第一节点根据所述第一节点的组播路由信息获取所述第二节点的组播路由信息;所述第一节点根据所述第二节点的组播路由信息进行报文封装得到所述第一组播报文。
在一种可能的实现方式中,所述第一节点根据所述第一节点的组播路由信息获取所述第二节点的组播路由信息,包括:所述第一节点根据所述第一节点的组播路由信息中的寻址字段确定所述第二节点的组播路由信息的位置;所述第一节点根据所述第二节点的组播路由信息的位置获取所述第二节点的组播路由信息。
在一种可能的实现方式中,所述第一节点为所述组播树的源节点,所述第一节点获取第一组播报文,包括:所述第一节点生成所述第一组播报文。
在一种可能的实现方式中,所述第一节点为所述组播树的源节点,所述第一节点获取第一组播报文,包括:所述第一节点生成第二组播报文,所述第二组播报文包括所述第一节点的组播路由信息;所述第一节点确定所述第二节点为所述第一节点的非叶子子节点;所述第一节点根据所述第一节点的组播路由信息获取所述第二节点的组播路由信息;所述第一节点根据所述第二节点的组播路由信息进行报文封装得到所述第一组播报文。
在一种可能的实现方式中,所述第一节点包括至少一个实体,所述第二节点包括至少一个实体,所述第一组播报文为所述第一节点中的一个实体向所述第二节点中的一个实体发送的组播报文。
在一种可能的实现方式中,一个节点的组播路由标识具体用于该节点中的实体确定该节点在所述组播树中的子节点。
第二方面,提供了一种组播报文发送方法,应用于第一实体,所述第一实体属于第一节点,所述方法包括:所述第一实体接收第三组播报文,所述第三组播报文包括所述第一节点的第一组播路由信息;其中,所述第一节点的第一组播路由信息包括所述第一节点的第一组播路由标识和所述第一节点的第一组播路由标识对应的非叶子子节点的组播路由信息;一个节点的组播路由信息包括该节点的组播路由标识和该节点在组播树中的非叶子子节点的组播路由信息,一个节点的组播路由标识用于该节点中的实体确定该节点在所述组播树中的子节点;所述第一节点的第一组播路由标识与所述第一节点的组播路由标识相同或通过对所述第一节点的组播路由标识进行更新得到;所述第一实体根据所述第一节点的第一组播路由标识确定第二实体,所述第二实体为所述第一节点中的实体;所述第一实体向所述第二实体发送第四组播报文,所述第四组播报文中包括所述第一节点的第二组播路由信息,所述第一节点的第二组播路由信息包括所述第一节点的第二组播路由标识和所述第一节点的第三组播路由标识对应的部分或全部非叶子子节点的组播路由信息;所述第一节点的第三组播路由标识与所述第一节点的第一组播路由标识相同或通过对所述第一节点的第一组播路由标识进行更新得到,所述第一节点的第二组播路由标识与所述第一节点的第三组播路由标识相同或通过对所述第一节点的第三组播路由标识进行更新得到。第二方面提供的方法,在一个节点包括多个实体的情况下,可以实现节点中的各个实体之间的组播报文的转发。
在一种可能的实现方式中,所述第一实体根据所述第一节点的第一组播路由标识确定第二实体,包括:所述第一实体根据所述第一节点的第一组播路由标识查找组播转发表得到所述第二实体。
在一种可能的实现方式中,所述方法还包括:所述第一实体根据所述第一节点的第一组播路由标识确定第一子节点,所述第一子节点为所述第一节点在所述组播树中的子节点中所述第一实体对应的子节点;所述第一实体向所述第一子节点发送第五组播报文,所述第五组播报文包括所述第一子节点的组播路由信息。
在一种可能的实现方式中,所述第一实体不属于所述第一子节点,所述第一实体向所述第一子节点发送第五组播报文,包括:所述第一实体向所述第一子节点中的第三实体发送所述第五组播报文。
在一种可能的实现方式中,所述第一实体属于所述第一子节点,所述方法还包括: 所述第一实体根据所述第一子节点的组播路由标识确定第二子节点,所述第二子节点为所述第一子节点在所述组播树中的子节点中所述第一实体对应的子节点。
在一种可能的实现方式中,所述第一实体属于所述第一子节点,所述第一子节点还包括第四实体,所述方法还包括:所述第一实体向所述第四实体发送第六组播报文,所述第六组播报文中包括所述第一子节点的第一组播路由信息,所述第一子节点的第一组播路由信息包括所述第一子节点的第一组播路由标识和所述第一子节点的第二组播路由标识对应的部分或全部非叶子子节点的组播路由信息;所述第一子节点的第二组播路由标识与所述第一子节点的组播路由标识相同或通过对所述第一子节点的组播路由标识进行更新得到,所述第一子节点的第一组播路由标识与所述第一子节点的第二组播路由标识相同或通过对所述第一子节点的第二组播路由标识进行更新得到。
第三方面,提供了一种第一节点,包括:处理单元和通信单元;所述处理单元,用于获取第一组播报文,所述第一组播报文包括第二节点的组播信息,所述第二节点为组播树中所述第一节点的非叶子子节点,所述第二节点的组播信息中包括所述第二节点的组播路由信息;其中,一个节点的组播路由信息包括该节点的组播路由标识和该节点在所述组播树中的非叶子子节点的组播路由信息,一个节点的组播路由标识用于该节点确定在所述组播树中的子节点;所述通信单元,用于向所述第二节点发送所述第一组播报文。
在一种可能的实现方式中,一个节点的组播路由标识用于该节点在该节点对应的第一节点集合内确定该节点在所述组播树中的子节点,一个节点对应的第一节点集合中包括该节点的部分或全部潜在子节点。
在一种可能的实现方式中,一个节点的组播路由标识包括该节点的子节点的个数信息和该节点的每个子节点的标识。
在一种可能的实现方式中,一个节点的组播路由标识包括第三字段和X个第四字段;所述第三字段用于指示该节点的子节点的个数X,一个所述第四字段用于指示该节点的一个子节点的标识。
在一种可能的实现方式中,一个节点的组播路由标识包括N个第三字段,N为该节点对应的第一节点集合中的节点个数,一个所述第三字段用于指示所述第一节点集合中的一个节点是否为该节点在所述组播树中的子节点,一个节点对应的第一节点集合中包括该节点的部分或全部潜在子节点。
在一种可能的实现方式中,一个节点的组播路由标识包括第三字段,所述第三字段中包括第一组标识,所述第一组标识用于指示该节点对应的第一节点组,一个节点对应的第一节点组中的节点均为该节点的子节点。
在一种可能的实现方式中,一个节点的组播路由信息还包括该节点的寻址字段;其中,一个节点的寻址字段用于该节点确定该节点的非叶子子节点的组播路由信息的位置。
在一种可能的实现方式中,一个节点的寻址字段用于指示该节点的非叶子子节点的组播路由信息的长度。
在一种可能的实现方式中,一个节点的寻址字段用于指示该节点的非叶子子节点的组播路由信息的起始位置或结束位置。
在一种可能的实现方式中,一个节点的寻址字段包括多个定界字段,该节点的非叶子子节点的组播路由信息由所述多个定界字段分隔开。
在一种可能的实现方式中,所述第二节点的组播信息中还包括:第二节点的第一字段;所述第一字段用于指示所述第二节点的组播路由信息的长度或者所述第二节点的组播信息的长度。
在一种可能的实现方式中,所述第二节点的组播信息中还包括:第二字段,所述第二字段用于对齐所述第二节点的组播信息的字节。
在一种可能的实现方式中,所述第一组播报文为IP报文,所述第一组播报文中的目的地址为所述第二节点的地址,所述第一组播报文还包括数据,所述第一组播报文中的所述第二节点的组播信息位于所述第一组播报文的IP头部和所述数据之间。
在一种可能的实现方式中,所述处理单元,具体用于:通过所述通信单元接收第二组播报文,所述第二组播报文包括所述第一节点的组播路由信息;确定所述第二节点为所述第一节点的非叶子子节点;根据所述第一节点的组播路由信息获取所述第二节点的组播路由信息;根据所述第二节点的组播路由信息进行报文封装得到所述第一组播报文。
在一种可能的实现方式中,所述处理单元,具体用于:根据所述第一节点的组播路由信息中的寻址字段确定所述第二节点的组播路由信息的位置;根据所述第二节点的组播路由信息的位置获取所述第二节点的组播路由信息。
在一种可能的实现方式中,所述第一节点为所述组播树的源节点,所述处理单元,具体用于:生成所述第一组播报文。
在一种可能的实现方式中,所述第一节点为所述组播树的源节点,所述处理单元,具体用于:生成第二组播报文,所述第二组播报文包括所述第一节点的组播路由信息;确定所述第二节点为所述第一节点的非叶子子节点;根据所述第一节点的组播路由信息获取所述第二节点的组播路由信息;根据所述第二节点的组播路由信息进行报文封装得到所述第一组播报文。
在一种可能的实现方式中,所述第一节点包括至少一个实体,所述第二节点包括至少一个实体,所述第一组播报文为所述第一节点中的一个实体向所述第二节点中的一个实体发送的组播报文。
在一种可能的实现方式中,一个节点的组播路由标识具体用于该节点中的实体确定该节点在所述组播树中的子节点。
第四方面,提供了一种第一实体,所述第一实体属于第一节点,所述第一实体包括:通信单元和处理单元;所述通信单元,用于接收第三组播报文,所述第三组播报文包括所述第一节点的第一组播路由信息;其中,所述第一节点的第一组播路由信息包括所述第一节点的第一组播路由标识和所述第一节点的第一组播路由标识对应的非叶子子节点的组播路由信息;一个节点的组播路由信息包括该节点的组播路由标识和该节点在组播树中的非叶子子节点的组播路由信息,一个节点的组播路由标识用于该节点中的实体确定该节点在所述组播树中的子节点;所述第一节点的第一组播路由标识与所述第一节点的组播路由标识相同或通过对所述第一节点的组播路由标识进行更新得到;所述处理单元,用于根据所述第一节点的第一组播路由标识确定第二实体, 所述第二实体为所述第一节点中的实体;所述通信单元,还用于向所述第二实体发送第四组播报文,所述第四组播报文中包括所述第一节点的第二组播路由信息,所述第一节点的第二组播路由信息包括所述第一节点的第二组播路由标识和所述第一节点的第三组播路由标识对应的部分或全部非叶子子节点的组播路由信息;所述第一节点的第三组播路由标识与所述第一节点的第一组播路由标识相同或通过对所述第一节点的第一组播路由标识进行更新得到,所述第一节点的第二组播路由标识与所述第一节点的第三组播路由标识相同或通过对所述第一节点的第三组播路由标识进行更新得到。
在一种可能的实现方式中,所述处理单元,具体用于:根据所述第一节点的第一组播路由标识查找组播转发表得到所述第二实体。
在一种可能的实现方式中,所述处理单元,还用于根据所述第一节点的第一组播路由标识确定第一子节点,所述第一子节点为所述第一节点在所述组播树中的子节点中所述第一实体对应的子节点;所述通信单元,还用于向所述第一子节点发送第五组播报文,所述第五组播报文包括所述第一子节点的组播路由信息。
在一种可能的实现方式中,所述第一实体不属于所述第一子节点,所述通信单元,具体用于:向所述第一子节点中的第三实体发送所述第五组播报文。
在一种可能的实现方式中,所述第一实体属于所述第一子节点,所述处理单元,还用于根据所述第一子节点的组播路由标识确定第二子节点,所述第二子节点为所述第一子节点在所述组播树中的子节点中所述第一实体对应的子节点。
在一种可能的实现方式中,所述第一实体属于所述第一子节点,所述第一子节点还包括第四实体;所述通信单元,还用于向所述第四实体发送第六组播报文,所述第六组播报文中包括所述第一子节点的第一组播路由信息,所述第一子节点的第一组播路由信息包括所述第一子节点的第一组播路由标识和所述第一子节点的第二组播路由标识对应的部分或全部非叶子子节点的组播路由信息;所述第一子节点的第二组播路由标识与所述第一子节点的组播路由标识相同或通过对所述第一子节点的组播路由标识进行更新得到,所述第一子节点的第一组播路由标识与所述第一子节点的第二组播路由标识相同或通过对所述第一子节点的第二组播路由标识进行更新得到。
第五方面,提供了一种通信装置,包括:处理器。处理器与存储器连接,存储器用于存储计算机执行指令,处理器执行存储器存储的计算机执行指令,从而实现第一方面或第二方面提供的任意一种方法。示例性的,存储器和处理器可以集成在一起,也可以为独立的器件。若为后者,存储器可以位于通信装置内,也可以位于通信装置外。
在一种可能的实现方式中,处理器包括逻辑电路,还包括输入接口和/或输出接口。示例性的,输出接口用于执行相应方法中的发送的动作,输入接口用于执行相应方法中的接收的动作。
在一种可能的实现方式中,通信装置还包括通信接口和通信总线,处理器、存储器和通信接口通过通信总线连接。通信接口用于执行相应方法中的收发的动作。通信接口也可以称为收发器。可选的,通信接口包括发送器和接收器中的至少一种,该情况下,发送器用于执行相应方法中的发送的动作,接收器用于执行相应方法中的接收的动作。
在一种可能的实现方式中,通信装置以芯片的产品形态存在。
第六方面,提供了一种芯片,包括:处理器和接口,处理器通过接口与存储器耦合,当处理器执行存储器中的计算机程序或指令时,使得第一方面或第二方面提供的任意一种方法被执行。
第七方面,提供了一种计算机可读存储介质,包括指令,当该指令在计算机上运行时,使得计算机执行第一方面或第二方面提供的任意一种方法。
第八方面,提供了一种计算机程序产品,包括指令,当该指令在计算机上运行时,使得计算机执行第一方面或第二方面提供的任意一种方法。
第三方面至第八方面中的任一种实现方式所带来的技术效果可参见第一方面或第二方面中对应实现方式所带来的技术效果,此处不再赘述。
需要说明的是,在方案不矛盾的前提下,上述各个方面中的方案均可以结合。
附图说明
图1A为本申请实施例提供的一种报文组播的示意图;
图1B为本申请实施例提供的一种实体的拓扑连接和组播树的示意图;
图2为本申请实施例提供的又一种实体的拓扑连接和组播树的示意图;
图3A为本申请实施例提供的又一种实体的拓扑连接示意图;
图3B为本申请实施例提供的一种路由器之间的组播报文传输示意图;
图4为一种SPT和SPT中的路由器中存储的MFIB表示意图;
图5为一种BIER中BFER的集合划分示意图;
图6为本申请实施例提供的一种组播报文发送方法的流程图;
图7为本申请实施例提供的一种组播报文的结构示意图;
图8为本申请实施例提供的又一种组播报文的结构示意图;
图9为本申请实施例提供的又一种组播报文的结构示意图;
图10为本申请实施例提供的又一种组播报文的结构示意图;
图11为本申请实施例提供的一种组播路由标识的结构示意图;
图12为本申请实施例提供的一种比特序列中的比特与下一跳的地址的对应关系的示意图;
图13为本申请实施例提供的一种组播报文中的比特序列中的比特与下一跳的地址的对应关系的示意图;
图14为本申请实施例提供的又一种组播报文的结构示意图;
图15为本申请实施例提供的一种组播路由标识的结构示意图;
图16为本申请实施例提供的一种寻址字段的示意图;
图17为本申请实施例提供的又一种寻址字段的示意图;
图18为本申请实施例提供的又一种寻址字段的示意图;
图19为本申请实施例提供的又一种组播报文发送方法的流程图;
图20为本申请实施例提供的再一种组播报文发送方法的流程图;
图21为本申请实施例提供的一种实体之间的拓扑连接示意图;
图22为本申请实施例提供的一种组播树以及组播报文的结构示意图;
图23为本申请实施例提供的又一种组播树以及组播报文的结构示意图;
图24A为本申请实施例提供的又一种组播树以及组播报文的结构示意图;
图24B为本申请实施例提供的又一种组播报文的结构示意图;
图24C为本申请实施例提供的又一种组播报文的结构示意图;
图25为本申请实施例提供的又一种实体之间的拓扑连接示意图;
图26为本申请实施例提供的又一种组播报文的结构示意图;
图27为本申请实施例提供的又一种组播报文的结构示意图;
图28为本申请实施例提供的又一种组播树的示意图;
图29为本申请实施例提供的又一种组播报文的结构示意图;
图30为本申请实施例提供的一种通信装置的组成示意图;
图31为本申请实施例提供的一种通信装置的硬件结构示意图。
具体实施方式
在本申请的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B。本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。在本申请的描述中,除非另有说明,“至少一个”是指一个或多个,“多个”是指两个或多于两个。
另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
需要说明的是,本申请中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本申请可以应用于一个发送端需要将相同的数据携带在报文中发送给多个接收端的场景。参见图1A,该报文可以从发送端发出,经过多个组播节点(以下简称为节点)到达多个接收端。该报文可以称为组播报文,不同节点之间传输的组播报文中的数据相同。其中,发送端例如可以为服务器,接收端例如可以为客户端。节点具备组播报文发送和转发能力,可以把接收到的组播报文进行组播转发或生成的组播报文进行组播发送。一个节点可以包括一个实体或多个实体。一个实体可以仅属于一个节点,也可以属于多个节点。示例性的,图1B中的(a)和图1B中的(b)中,左侧为实体的网络拓扑图,右侧为组播树。参见图1B中的(a),节点Z包括多个实体,这多个实体为实体A、实体B、实体C、实体D和实体E,节点E包括一个实体,即实体E。可以看出,实体E既属于节点Z,也属于节点E。参见图1B中的(b),节点X包括多个实体,这多个实体为实体A和实体B。可以看出,实体A和实体B既属于节点Z,也属于节点X。
需要说明的是,为了方便描述,在本申请实施例中,若一个实体仅属于一个节点,则该节点和该实体采用相同的标识,此时,该实体的地址也可以描述为该节点的地址,该节点执行的动作也就是该实体执行的动作。因此,下文中提到节点的地址时,均是指该节点中的实体的地址。例如,仅包括实体A的节点称为节点A,此时,节点A的地 址等同于实体A的地址,仅包括实体B的节点称为节点B,此时,节点B的地址等同于节点实体B的地址。
本申请中,实体也可以称为功能实体。实体可以为物理实体或虚拟实体。物理实体例如可以为路由器、交换机、服务器、主机、网卡、线卡、芯片、芯片的裸片(DIE)、终端(例如,移动终端)、设备内部模块等,虚拟实体例如可以为虚拟机、容器、进程、线程等。当实体为物理实体时,节点也可以称为组播设备。
为了使得本申请提供的方法更加的清楚,首先对本申请涉及到的部分概念作简单介绍。
1、组播树
组播树是通过路由协议(例如,协议无关组播(protocol independent multicast,PIM)、内部网关协议(interior gateway protocol,IGP)等)或其他方法(例如,手工配置、控制器计算等)基于特定的网络拓扑,为特定的源节点和目的节点的组合,生成的从源节点到所有目的节点的路径,该路径是一个以源节点为根节点,以目的节点为叶子节点的树形结构,称为组播树。组播树也可以称为组播分发树(multicast distribution tree,MDT)。例如,参见图2,左侧是一个实体的网络拓扑图,若源节点为节点B,目的节点为节点C、节点D和节点E,为源节点和目的节点的组合生成的组播树的一种示例可以参见图2中的右侧。
需要说明的是,发送端和/或接收端可以是组播树中的节点,也可以不是组播树中的节点。若为前者,则源节点可以为发送端,目的节点可以为接收端。为了方便描述,在没有特别说明的情况下,本申请实施例中均以发送端和接收端是组播树中的节点为例,对本申请实施例提供的方法作示例性说明。若接收端不是组播树中的节点,则数据到达叶子节点之后,叶子节点将接收到的数据发送给与其连接的接收端即可。
另外,一个服务器中的除网卡之外的模块可以认为是一个节点(假设为节点a),服务器中的网卡可以认为是另一个节点(假设为节点b),则节点b可以认为是节点a的子节点。一个路由器中的除线卡之外的模块可以认为是一个节点(假设为节点c),路由器中的线卡可以认为是另一个节点(假设为节点d),则节点d可以认为是节点c的子节点。示例性的,参见图3A,A为一个路由器,图3A中的节点A0为该路由器中的除线卡之外的模块,节点A1、节点A2和节点A3为该路由器中的3个线卡。A可以通过3个线卡上的接口分别向节点B、节点C、节点D、节点E、节点F和节点G发送组播报文。此时,节点A1、节点A2和节点A3可以为节点A0的子节点。A也可以为服务器,此时,节点A1、节点A2和节点A3为该服务器中的3个网卡,A可以通过3个网卡上的网口分别向节点B、节点C、节点D、节点E、节点F和节点G发送组播报文。
2、子节点
一个节点的子节点是指组播树中的该节点的报文可以通过一跳组播(即只经过一次组播转发)到达的节点。其中,一跳组播是指查找一次组播转发表。例如,图2中的节点R为节点B的子节点,节点S为节点R的子节点,节点E为节点R的子节点。需要说明的是,若组播树中一个支持组播的节点发送的组播报文经过一个或多个不支持组播的节点后到达了组播树中的另一个支持组播的节点,则后一个支持组播的节点为前一个支持组播的节点的子节点,也就是说,前一个支持组播的节点是经过了一跳组播到达 了后一个支持组播的节点。例如,参见图3B,路由器A和路由器C是支持组播的路由器,路由器B为不支持组播的路由器,此时,路由器A经过路由器B将组播报文发送给了路由器C,并且路由器A和路由器C均为组播树中的节点,则路由器C为路由器A的子节点。
当一个节点的子节点是组播树的叶子节点时,该子节点可以称为该节点的叶子子节点,当一个节点的子节点不是组播树的叶子节点时,该子节点可以称为该节点的非叶子子节点。
在本申请的描述中,若无特别说明,本申请下文中提到的一个节点的子节点均是指该节点在组播树中的子节点。子节点也可以有其他名称,例如,组播子节点等,本申请不作限制。
需要说明的是,一个实体所属的一个节点可以为该实体所属的另一个节点的子节点。示例性的,参见图1B中的(b),实体A(或实体B)所属的节点X为实体A(或实体B)所属的节点Z的子节点。当然,一个实体所属的一个节点也可以不是该节点所属的另一个节点的子节点。
3、潜在子节点
一个节点的潜在子节点是指该节点的报文可以通过一跳组播到达的节点。例如,图2中的节点R和节点A均为节点B的潜在子节点,节点F、节点R、节点C和节点D均为节点S的潜在子节点。可以理解的是,一个节点的潜在子节点包括该节点在组播树中的子节点。当一个节点的潜在子节点位于组播树中时,该潜在子节点也就是该节点在组播树中的子节点。潜在子节点也可以有其他名称,例如,组播对象、预备子节点等,本申请不作限制。
4、组播路由信息、第一组播路由信息、第二组播路由信息
在本申请实施例中,一个节点的组播路由信息携带在节点之间转发的组播报文中。一个节点的第一组播路由信息和第二组播路由信息均是由该节点的组播路由信息衍生得到的,携带在该节点中的各个实体之间转发的组播报文中。
5、组播路由标识、第一组播路由标识、第二组播路由标识、第三组播路由标识
在本申请实施例中,一个节点的组播路由标识携带在节点之间转发的组播报文中。一个节点的第一组播路由标识、第二组播路由标识和第三组播路由标识均是由该节点的组播路由标识衍生得到的,携带在该节点中的各个实体之间转发的组播报文中。
6、单播报文、组播报文
单播报文和组播报文的第一种定义:
根据实体对报文处理的行为对报文进行分类,此时,单播报文和组播报文都是对于本申请中的实体而言的,一个报文是单播报文还是组播报文是相对的,具体的:
对于一个实体,若接收到的报文中不含任何该实体需要处理的组播路由信息或者不含任何组播路由信息,则该实体不需要对该报文进行组播转发(或者说不需要查找组播转发表),而只需要根据该报文中的单播封装进行单播转发(或者说采用单播封装的目的地址查找单播转发表转发)或者消费报文(即自己处理该报文不需要再转发),此时,该报文对于该实体而言为单播报文。
对于一个实体,若接收到的报文中包含组播路由信息,并且该实体需要处理该组播路由信息,即需要根据该组播路由信息进行组播转发(或者说需要查找组播转发表), 则该报文对于该实体而言为组播报文。
例如,实体A和实体B具有拓扑连接,实体B和实体C具有拓扑连接,实体A向实体C发送的报文需要经过实体B才可以到达实体C,若该报文中包括组播路由信息和单播封装,单播封装的目的地址为实体C的地址,则该报文对于实体B而言是单播报文,对于实体C而言是组播报文。
再例如,实体A和实体B具有拓扑连接,实体A发送报文给实体B,该报文中不包括组播路由信息,但是包括单播封装,单播封装的目的地址为实体B的地址,则该报文对于实体B而言是单播报文。
单播报文和组播报文的第二种定义:
根据报文的结构对报文进行分类,具体的,最外层头部是单播头部的报文是单播报文,最外层头部是组播头部的报文是组播报文。其中,目的IP地址是单播地址的IP头部是一种单播头部,目的介质访问控制(media access control,MAC)地址是单播地址的mac头部也是一种单播头部。目的IP地址是组播地址的IP头部是一种组播头部,目的mac地址是组播地址的mac头部也是一种组播头部。本申请中的组播信息也是一种组播头部。
基于上述针对单播报文和组播报文的两种定义,为了使得本申请实施例提供的方法更加的清楚,本申请中采用第一种定义对本申请实施例提供的方法进行描述。当本申请中采用第二种定义时,可以根据报文的具体结构确定报文是单播报文还是组播报文,例如,下文中第一节点向第二节点发送第一组播报文,若第一组播报文的最外层头部是单播头部,采用第二种定义描述时第一组播报文则可以描述为单播报文。
本申请中的报文中的单播封装可以是互联网协议(internet protocol,IP)的第四版(简称为IPv4)单播封装、IP的第六版(简称为IPv6)单播封装或其他任何可能的封装形式。本申请中,可以在含有组播路由信息的报文上进行任何可能形式的单播封装,也可以不进行单播封装,报文的单播封装使报文可以以单播的形式穿越2个实体之间的网络(或者说在2个实体之间传输)。关于单播报文和组播报文解释中所提到的组播路由信息均是指本申请下文中定义的组播路由信息。
需要说明的是,在本申请实施例中,当组播报文为IP报文,并且该组播报文的IP头部中的目的IP地址为单播地址时,该组播报文的IP头部即该组播报文的单播封装。需要说明的是,若本申请中的组播报文为IP报文,则本申请的描述中,目的地址均是指目的IP地址。
在本申请下文中,若一个实体接收到一个组播报文、且该组播报文为IP报文,该实体首先判断该组播报文的IP头部中的目的地址是否为自身的地址,若是,则解析该组播报文的IP头部之后的组播信息,并根据组播信息转发组播报文。该实体向其他实体发送组播报文的过程中,首先确定需要向其他实体发送的组播信息和数据,再确定下一跳的地址(即其他实体的地址),将其他实体的地址填入IP头部中的目的地址字段,并将向其他实体发送的组播信息和数据封装在IP头部之后,得到向其他实体发送的组播报文,之后向其他实体发送组播报文。本申请下文中为了简洁,并未在每个步骤中展开描述这一过程,在此处统一描述,下文中不再赘述。
需要说明的是,关于组播报文中的数据,针对组播报文中的不同的部分,数据也 是不同的。具体的,针对组播报文中的某个部分,数据是指组播报文中该部分之后的部分。例如,参见图9,针对外层封装,数据为外层封装之后的部分(即“第二节点的组播信息+内层封装+载荷(payload)”),针对第二节点的组播信息,数据为第二节点的组播信息之后的部分(即“内层封装+载荷”),针对内层封装,数据为内层封装之后的部分(即“载荷”)。本申请实施例中所提到的数据均是针对组播报文中的组播信息而言的,例如,图9所示的第一组播报文中的数据即“内层封装+载荷”。
以上是对本申请涉及到的部分概念所作的简单介绍。
目前,在进行组播报文转发时,可以通过PIM-SM(记为方案1)或显式比特索引复制(bit index explicit replication,BIER)(记为方案2)实现。以下对方案1和方案2的实现过程以及存在的问题进行介绍。
方案1、通过PIM-SM实现组播报文转发。
PIM-SM是一种多播路由协议,PIM-SM用于从接收端向组播源(发送端或汇集点(rendezvous point,RP))方向逐跳建立MFIB表,最终构造出一棵以组播源为根节点,以接收端为叶子节点的树状结构,即组播树。组播报文从组播树中的根节点开始朝着叶子节点方向,在每个路由器(也可以称为组播路由器)上进行复制,直到接收端。所有的接收端可以组成一个组播组,一个接收端为组播组中的一个成员。其中,以RP为根节点、组播组中的成员为叶子节点的组播树称为汇集点树(RP Tree,RPT),以发送端为根节点、组播组中的成员为叶子节点的组播树称为最短路径树(shortest path tree,SPT)。RPT和SPT的转发流程基本一致。以SPT为例,在SPT构造完成之后,每个路由器中会存储一个MFIB表,MFIB表中存储有一个组地址(group address)和端口列表(port list),当路由器接收到目的地址为该组地址的组播报文时,通过该端口列表中的端口发送该组播报文。示例性的,一种SPT和SPT中的路由器中存储的MFIB表可参见图4,图4中的R表示普通路由器,DR表示指定路由器(向组播组中的成员发送组播报文的路由器)。
方案1存在的问题有:
1、PIM-SM需要为每条组播流在网络中维护MFIB表,而每个路由器上维护的MFIB表的表项数是有限制的,如果组播树或者说组播流太多,那么就需要在路由器中扩展更多的表空间来支持组播报文的转发,可扩展性很差。
2、组播树是从接收端向组播源方向逐跳建立MFIB表构造出的,因此,组播树是完全固定的,无法基于规划主动控制转发路径。
3、由于组播树是从接收端向组播源方向逐跳建立MFIB表构造出的,因此,叶子节点加入或离开组播树只有其上一跳节点知道,组播源不知道,也就是说,组播源感知不到用户的存在,可管理性较差。
4、由于组播树是从接收端向组播源方向逐跳建立MFIB表构造出的,因此,为了保持逐跳的组播状态,子节点需要定期的发送加入信令,在组播流较多时路由器要处理大量的周期性信令,增加了路由器的计算负载、功耗以及处理资源。
方案2、通过BIER实现组播报文转发。
针对PIM-SM存在的问题,业界提出了一种无状态的组播路由协议BIER。支持BIER的路由器称为BFR(Bit-Forwarding Router),支持BIER的域入口路由器称为BFIR(Bit- Forwarding Ingress Router),支持BIER的域出口路由器称为比特转发出口路由器(bit-forwarding egress router,BFER)。BIER为每个BFER分配一个唯一标识(ID),称为BFRID,典型取值范围是1~65536。参见图5,把所有BFER划分成若干集合(set),每个集合有一个集合标识(set identifier,SI),典型取值范围0~255。每个集合中最多有256个BFER,每个集合固定占用SI*256+1~(SI+1)*256的BFRID,“*”表示“乘以”。
BIER协议规定,组播报文通过头部携带的SI和位串(bitstring)指示向哪些BFER组播。位串是长度为256比特(bit)的位图(bitmap),每个比特对应于一个BFER。例如,一个BFER对应的比特的值为1时,表示需要向该BFER组播。一个组播报文只能携带一个SI和一个位串,因此只能向某一个集合组播。示例性的,参见图5,集合1中ID为2的BFER通过节点P(即运营商网络内部的节点)向集合2中的ID为258和510的BFER发送组播报文,该组播报文中包括一个SI和一个位串,SI为2,位串中ID为258和510的BFER对应的比特为1,其他比特为0。另外,每个BFER中会维护位索引转发表(bit index forwarding table,BIFT),BIFT是BIER定义的组播路由表。BFER可以基于组播报文头部携带的SI和位串以及维护的BIFT进行组播报文转发。
方案2存在的问题有:
1、由于一个组播报文只能携带一个SI和一个位串,因此只能向某一个集合组播,这也就意味着,如果总共有50个集合,并且需要向50个集合中的BFER发送组播报文,那么需要发送50份组播报文,报文份数过多导致组播效率较差。
2、BIER中的BIFT是固定的,也就是说,每个节点有固定的下一跳,因此,无法规划或指定路径路由。
为了解决上述方案1和方案2中存在的问题,本申请提供了一种组播报文发送方法,参见图6,该方法包括:
601、第一节点获取第一组播报文,第一组播报文包括第二节点的组播信息,第二节点为组播树中第一节点的非叶子子节点,第二节点的组播信息中包括第二节点的组播路由信息;其中,一个节点的组播路由信息包括该节点的组播路由标识和该节点在组播树中的非叶子子节点的组播路由信息,一个节点的组播路由标识用于该节点确定在组播树中的子节点。
其中,第一节点可以为组播树中的任何一个具有非叶子子节点的节点。第一节点可以包括至少一个实体。第二节点可以包括至少一个实体。
一个节点的组播路由标识用于指导该节点进行组播路由转发。可选的,一个节点的组播路由标识用于该节点在该节点对应的第一节点集合内确定该节点在组播树中的子节点,一个节点对应的第一节点集合中包括该节点的部分或全部潜在子节点。其中,一个节点可以对应多个节点集合。节点集合可以由特定的协议、算法或配置生成。第一节点集合可以为多个节点集合中的一个。一个节点对应的第一节点集合可以通过该节点的组播路由标识指示,例如,该节点的组播路由标识中可以携带集合标识,通过该集合标识指示第一节点集合。一个节点对应的第一节点集合也可以预先配置在该节点中。
可选的,一个节点的组播路由标识具体用于该节点中的实体确定该节点在组播树中的子节点。
一个节点的组播路由信息中的非叶子子节点的组播路由信息可以是一个组播路由信息列表,该列表可以是顺序排列、链式排列或其他可能的方式排列,本申请不作限制。可以理解的是,若一个节点没有非叶子子节点,则该节点的组播路由信息中不包括非叶子子节点的组播路由信息,仅仅包括该节点的组播路由标识。
基于对第一组播报文的描述可知,第一组播报文中包括树形递归结构的组播路由信息,第一组播报文中第二节点的一个非叶子子节点的组播路由信息可以认为是递归结构中的一个递归单元。为了方便描述,本申请下文中的部分描述中,将一个节点的一个非叶子子节点的组播路由信息记为一个递归单元,假设一个节点的非叶子子节点的个数为M,该节点的第m+1个非叶子子节点的组播路由信息记为该节点的递归单元m,m为大于等于0小于M的整数。可以理解的是,第二节点的每个非叶子子节点的组播路由信息又包括多个递归单元(每个递归单元为该非叶子子节点的一个非叶子子节点的组播路由信息),依次类推。第一组播报文中包括的组播路由信息可以描述某个组播树或组播树的子树的报文转发信息。
示例性的,参见图7,假设第二节点的非叶子子节点有M1个,分别记为节点2 0、节点2 1、节点2 2、…、节点2 M1-1,则第一组播报文的报文头中包括第二节点的组播信息,第二节点的组播信息中包括第二节点的组播路由标识,以及节点2 0、节点2 1、节点2 2、…、节点2 M1-1的组播路由信息。进一步的,节点2 0、节点2 1、节点2 2、…、节点2 M1-1中的每个节点的组播路由信息又包括各自的非叶子子节点的组播路由信息。例如,假设节点2 0的非叶子子节点有M2个,则节点2 0的组播路由信息中包括节点2 0的组播路由标识,以及节点2 0的第1个非叶子子节点、第2个非叶子子节点、…、第M2个非叶子子节点的组播路由信息。节点2 0的每个非叶子子节点进一步的包括自身的非叶子子节点的组播路由信息,依次类推。节点2 1、节点2 2、…、节点2 M1-1类似。
示例性的,基于图2所示的组播树,参见图8,节点B向节点R发送的组播报文的报文头中包括节点R的组播信息,节点R的组播信息中包括节点R的组播路由标识和节点R的非叶子子节点(即节点S)的组播路由信息。
可选的,一个节点的组播路由信息还包括该节点的寻址字段。其中,一个节点的寻址字段用于该节点确定该节点的非叶子子节点的组播路由信息的位置。该位置可以为该节点的非叶子子节点的组播路由信息在该节点的组播路由信息或组播信息中的位置,也可以是指在组播报文中的位置。示例性的,参见图9,第二节点的组播路由信息包括第二节点的寻址字段,节点2 0的组播路由信息包括节点2 0的寻址字段,其他节点类似。示例性的,参见图10,节点R的组播路由信息包括节点R的寻址字段。需要说明的是,节点的非叶子子节点的组播路由信息的位置除了通过寻址字段指示之外,还可以静态配置在节点中。例如,若一个节点的子节点个数固定,并且这些子节点的子节点都是叶子节点,那么这些子节点的组播路由信息中仅仅包括这些子节点的组播路由标识,并且组播路由标识的长度是固定的,此时,该节点中可以静态维护这些子节点的组播路由信息的长度,此时,该节点的组播路由信息中可以不包括该节点的寻址字段。
可选的,第二节点的组播信息中还包括:第一字段;第一字段用于指示第二节点的第一字段的长度、第二节点的寻址字段的长度、第二节点的组播路由标识的长度、 第二节点的非叶子子节点的组播路由信息的总长度中的一个或多个长度之和,这一个或多个中包括第二节点的非叶子子节点的组播路由信息的总长度。例如,第一字段用于指示第二节点的组播路由信息的长度,或者,第二节点的组播信息的长度,或者,第二节点的组播路由信息中的非叶子子节点的组播路由信息的总长度。这些长度可以通过比特、字节等表征。第一字段中还可以包括预留字段,用于后续功能扩展。第一字段可以是一个固定长度的字段,例如,1个字节(即8个比特)。示例性的,参见图9,第二节点的组播信息还包括第一字段。示例性的,参见图10,若第二节点为节点R,则节点R的组播信息还包括第一字段。
可选的,第二节点的组播信息中还包括:第二字段,第二字段用于对齐第二节点的组播信息的字节。第二字段也可以称为填充(padding)字段。示例性的,参见图9,第二节点的组播信息还包括第二字段。示例性的,参见图10,若第二节点为节点R,节点R的组播信息包括第二字段。需要说明的是,在进行字节对齐时,可能是单字节对齐,此时,第二字段的存在是为了使得整个组播信息的比特数可以整除8,也可以是4字节对齐,此时,第二字段的存在是为了使得整个组播信息的比特数可以整数32,也可以是8字节对齐,此时,第二字段的存在是为了使得整个组播信息的比特数可以整数64。第二字段的具体长度可以根据需要对齐的字节数确定。可以理解的是,若没有第二字段,第二节点的组播路由信息本身已经是字节对齐的,则不需要第二字段。为了方便描述,本申请下文中均以字节对齐为单字节对齐为例对本申请实施例提供的方法作示例性说明。
其中,第一字段和第二字段可以由第一节点添加到第一组播报文中。例如,在下文中的步骤14)的过程中添加到第一组播报文中。
第二节点的组播信息可以携带在第一组播报文的报文头中。节点的组播信息可以认为是组播报文的报文头中的组播封装。参见图9或图10,本申请中的组播报文的报文头中,除了可以包含组播封装之外,还可以包含外层封装(Outer-header)和/或内层封装(Inner-header),以及载荷。外层封装是指相比于组播封装的外层的封装,可以是单播封装。内层封装是指相比于组播封装的内层的封装,可以是传输层(传输控制协议(transmission control protocol,TCP)、用户数据报协议(user datagram protocol,UDP)等)封装或其他任何可能的封装形式。
组播报文中的针对组播信息而言的数据也就是实际需要发送到叶子节点的信息。
步骤601在具体实现时,可以通过以下方式11或方式12或方式13实现。
方式11、第一节点接收第二组播报文,根据接收到的第二组播报文获取第一组播报文。
方式11在具体实现时可以包括:
11)第一节点接收第二组播报文,第二组播报文包括第一节点的组播路由信息,第一节点的组播路由信息包括第一节点的组播路由标识和第一节点的非叶子子节点的组播路由信息。
12)第一节点确定第二节点为第一节点的非叶子子节点。
13)第一节点根据第一节点的组播路由信息获取第二节点的组播路由信息。
14)第一节点根据第二节点的组播路由信息进行报文封装得到第一组播报文。
在步骤11)中,若第一节点不为组播树的源节点,第一节点可以接收组播树中的其他节点发送的第二组播报文。
步骤12)在具体实现时,在一种可能的实现方式中,一个节点的非叶子子节点可以配置在节点中,该情况下,第一节点根据该配置即可确定第二节点是否为第一节点的非叶子子节点。在另一种实现方式中,一个节点的非叶子子节点和/或叶子子节点可以配置在节点中,第一节点根据第一节点的组播路由标识确定第二节点是否为第一节点的子节点,若是,再根据配置的第二节点是否为叶子节点的信息确定第二节点是否为第一节点的非叶子子节点。
步骤13)在具体实现时可以包括:
13-1)第一节点根据第一节点的组播路由信息中的寻址字段确定第二节点的组播路由信息的位置。步骤13-1)的具体实现可参见下文中关于寻址字段的相关描述,此处不再赘述。
13-2)第一节点根据第二节点的组播路由信息的位置获取第二节点的组播路由信息。
方式12、第一节点生成第一组播报文,第一节点为组播树的源节点。
方式13、第一节点生成第二组播报文,根据第二组播报文获取第一组播报文。其中,第二组播报文包括第一节点的组播路由信息。
方式13在具体实现时可以包括:第一节点生成第二组播报文;第一节点确定第二节点为第一节点的非叶子子节点;第一节点根据第一节点的组播路由信息获取第二节点的组播路由信息;第一节点根据第二节点的组播路由信息进行报文封装得到第一组播报文。方式13具体实现时与方式11相同的步骤的实现过程可参见方式11,不再赘述。
602、第一节点向第二节点发送第一组播报文。相应的,第二节点从第一节点接收第一组播报文。
其中,第一组播报文为第一节点中的一个实体向第二节点中的一个实体发送的组播报文。一个节点包括的实体之间的组播报文的处理可参见图20所示的实施例。
可选的,第一组播报文中的单播封装中的目的地址为第二节点的地址。具体的,第一组播报文可以为IP报文,此时,第一组播报文中的目的地址为第二节点的地址,第一组播报文还包括数据,第一组播报文中的第二节点的组播信息位于第一组播报文的IP头部和数据之间。其中,单播封装中可以包括指示字段,该指示字段用于指示组播报文中的单播封装后的信息中是否包含组播信息,节点或实体在接收到组播报文之后,可以根据该指示字段确定组播报文中的单播封装后的信息中是否包含组播信息。示例性的,若单播封装为IPv4封装,则IPv4头部中的“协议(protocol)”字段可以指示组播报文中的单播封装后的信息中是否包含组播信息,若单播封装为IPv6封装,则IPv6头部中的“下一包头(Next Header)”字段可以指示组播报文中的单播封装后的信息中是否包含组播信息。
需要说明的是,在本申请实施例中,一个节点(例如,节点a)向另一个节点(例如,节点b)发送的组播报文中的单播封装中的源地址可以为节点a的地址,也可以为组播树中的源节点的地址。示例性的,基于图2所示的示例,节点R向节点S发送的 组播报文中的单播封装中的源地址可以为节点R的地址,也可以为节点B的地址。节点S向节点D发送的组播报文中的单播封装中的源地址可以为节点S的地址,也可以为节点B的地址。
需要说明的是,在本申请中的组播报文中不包括单播封装的情况下,节点可以通过组播报文中的组播路由标识确定组播报文的下一跳节点。例如,一个节点接收到组播报文,在该节点的组播路由标识为下文中的比特序列的情况下,该组播路由标识中值为1的比特对应的节点为该组播报文的下一跳节点,即该节点的子节点为该组播报文的下一跳节点。
本申请实施例提供的方法,将组播路由信息嵌入到组播报文中,组播报文中包括的树形递归结构的组播路由信息可以描述某个组播树或组播树的子树的报文转发信息,可扩展性好,并且根据需要可以方便的进行转发路径的规划和指定。
上述实施例提到的节点的组播路由标识可以通过以下方式21、方式22或方式23实现。
方式21、一个节点的组播路由标识包括该节点的子节点的个数信息和该节点的每个子节点的标识。
在方式21中,可选的,一个节点的组播路由标识包括第三字段和X个第四字段,第三字段用于指示该节点的子节点的个数X,一个第四字段用于指示该节点的一个子节点的标识。节点的标识(ID)例如可以为节点的索引、节点的IP地址或节点的其他标识。以节点的标识为节点的索引为例,参见图11中的(a),第三字段记为Cnt(即Count的缩写),表示用于指示个数,第四字段记为Idx(即Index的缩写),表示用于指示索引。Idx i为节点的第i个子节点的索引,Idx 1至Idx x组成一个Idx序列,i为大于0小于等于X的整数。
在方式21中,一个节点对应的第一节点集合中的节点可以具有连续的编号,例如,0、1、2、…。一个节点的索引可以是该节点的编号,一个节点可以通过接收到的组播报文中的该节点的组播路由标识中携带的节点的索引确定需要向哪些节点发送组播报文(也就是确定哪些节点为自身的子节点)。实际实现时,一个节点对应的第一节点集合中的节点的编号也可以是从其他数值(例如,1)开始的连续的取值(即该节点对应的第一节点集合中的节点的索引为1、2、3、…),或者,也可以为离散的取值,本申请不作限制。当一个节点对应的第一节点集合中的节点从0开始编号时,第四字段的位宽
Figure PCTCN2022076838-appb-000001
N为该节点对应的第一节点集合中的节点个数。第四字段的位宽也可以是固定位宽,例如,1字节。
在方式21中,当第三字段的值为自然数时,第三字段的位宽可以为
Figure PCTCN2022076838-appb-000002
Figure PCTCN2022076838-appb-000003
当第三字段的值为N-1(即第三字段的值为0表示N为1,第三字段的值为1表示N为2,依次类推)时,第三字段的位宽可以为
Figure PCTCN2022076838-appb-000004
第三字段也可以为固定位宽,例如,1字节,此时,第四字段的最大长度也就固定了。
在方式21中,第三字段也可以称为Cnt字段或Count字段。第四字段也可以称为Idx字段或Index字段。下文中将方式21中的第三字段称为Cnt字段,第四字段称为Idx字段。
示例性的,基于图2所示的示例,假设节点R对应的第一节点集合包含节点B、 节点A、节点S和节点E,这4个节点的编号分别为0,1,2,3。在图2中的右侧所示的组播树中,节点S和节点E为节点R的子节点。若第三字段的值为N-1,则第三字段和第四字段均可以为2个比特。由于节点R有2个子节点,则第四字段有2个,即节点R的组播路由标识有6个比特。由于第一节点集合中共有4个节点(即N=4),则第三字段的值可以为11。2个第四字段中第1个第四字段的值为10,表示编号为2的节点(即节点S)为节点R的子节点,第2个第四字段的值为11,表示编号为3的节点(即节点E)为节点R的子节点,那么节点R的组播路由标识可以为111011。
在方式21中,每个节点上可以存储有组播转发表(也可以称为组播路由表或路由转发表或其他名称),组播转发表中包括该节点对应的第一节点集合中的节点索引与下一跳(nexthop)的信息(例如,去往下一跳的出接口、下一跳的地址)之间的对应关系,一个节点可以根据组播路由标识中的Idx字段确定节点索引,再查找组播转发表得到下一跳的信息,进而向该下一跳转发组播报文。例如,基于图2所示的示例,节点R的一种组播转发表可以参见表1。
表1:节点R的组播转发表
节点索引 下一跳的地址
0 节点B的地址
1 节点A的地址
2 节点S的地址
3 节点E的地址
方式22、一个节点的组播路由标识包括N个第三字段,N为该节点对应的第一节点集合中的节点个数,一个第三字段用于指示第一节点集合中的一个节点是否为该节点在组播树中的子节点。
在方式22中,一个第三字段可以为一个比特,也就是说,一个节点(假设为节点1)的组播路由标识包括N个比特,参见图11中(b),N个比特组成一个比特序列(bit squence),N个比特与节点1对应的第一节点集合中的节点一一对应,一个比特用于指示该第一节点集合中的与该比特对应的节点是否为节点1的子节点。具体的,一个比特的值为1(也可以为0)时,该比特用于指示该第一节点集合中的与该比特对应的节点为节点1的子节点。为了方便描述,下文中均以一个比特的值为1时,表示该比特对应的节点为其他节点的子节点为例对本申请提供的方法做示例性说明。方式22中的组播路由标识在下文中称为比特序列。
在方式22中,每个节点上可以存储有组播转发表,组播转发表中包括比特序列中的比特与下一跳的信息(例如,去往下一跳的出接口、下一跳的地址)之间的对应关系,一个节点可以根据组播转发表中的比特序列中的比特的位置确定下一跳的信息,进而向该下一跳转发组播报文。其中,比特序列中的比特与下一跳的信息的对应关系可以有4种情况。在第一种情况下,比特序列中最左边(leftmost)的比特为第1个比特,从左往右依次为第1个比特、第2个比特、第3个比特…,比特序列中的第j个比特对应索引为j-1的表项。在第二种情况下,比特序列中最右边的比特为第1个比特,从右往左依次为第1个比特、第2个比特、第3个比特…,比特序列中的第j个比特对应索引为j-1的表项。在第三种情况下,比特序列中最左边的比特为第1个比 特,从左往右依次为第1个比特、第2个比特、第3个比特…,比特序列中的第j个比特对应索引为j的表项。在第四种情况下,比特序列中最右边的比特为第1个比特,从右往左依次为第1个比特、第2个比特、第3个比特…,比特序列中的第j个比特对应索引为j的表项。j为大于0的整数。示例性的,以比特序列为010011为例,6个比特分别对应节点A至节点F,比特序列中的比特与下一跳的地址的对应关系可参见图12。在本申请下文中的描述中,若无特别说明,均认为比特序列中最左边的比特为第1个比特,从左往右依次为第1个比特、第2个比特、第3个比特…。需要说明的是,除了上述4种情况之外,组播转发表中的表项的索引还可以为从其他数值(例如,2、3、4)开始的连续的数值或离散的数值,本申请不作限制。
需要说明的是,不同节点的比特序列与下一跳的信息之间的对应关系可以为同一个表格中的不同表项,此时,有些节点的比特序列对应的表项的索引不从0或1开始,例如,图13中的(a)中的节点A1的比特序列对应的表项为索引为3和4的表项。不同节点的比特序列与下一跳的信息之间的对应关系也可以在不同的表格中。
示例性的(记为示例1),基于图2所示的实体的网络拓扑图,假设节点R对应的第一节点集合包含节点B、节点A、节点S和节点E,这4个节点分别对应4个比特中的第1、2、3、4个比特。在图2中右侧所示的组播树中,节点S和节点E为节点R的子节点。假设第一节点集合中的对应的比特的值为1的节点为节点R的子节点,则节点R的组播路由标识可以为0011。
示例性的,基于图3A所示的示例,节点A0需要向节点B、节点C和节点D发送组播报文。节点A0对应的节点集合包括{节点A1、节点A2、节点A3}和{节点B、节点C、节点D、节点E、节点F、节点G}。节点A0的组播路由标识中可以通过一个比特指示节点A0对应的第一节点集合,若该比特的值为0,表示节点A0对应的第一节点集合为{节点B、节点C、节点D、节点E、节点F、节点G},若该比特的值为1,表示节点A0对应的第一节点集合为{节点A1、节点A2、节点A3}。节点A1对应的第一节点集合为{节点B、节点C},节点A2对应的第一节点集合为{节点D、节点E},节点A3对应的第一节点集合为{节点F、节点G}。节点A0的组播路由标识中的比特与节点A0对应的第一节点集合中的节点一一对应,当节点A0对应的第一节点集合中的一个节点对应的比特为1时,表示该节点为节点A0的子节点,其他节点类似。节点A0静态维护节点A1和节点A2的组播路由信息的长度,此时,寻址字段为空。
若节点A0接收到的组播报文(记为组播报文A)中的节点A0的组播路由信息,以及比特序列中的比特与下一跳的地址之间的对应关系为图13中的(a),则节点A0的组播路由标识表示节点A0对应的第一节点集合为{节点A1、节点A2、节点A3},且节点A0需要向节点A1和节点A2发送组播报文。节点A1的组播路由信息表示节点A1需要向节点B和节点C发送组播报文。节点A2的组播路由信息表示节点A2需要向节点D发送组播报文。该情况下,图3A中各个节点发送组播报文的过程为:
21)节点A0解析接收到的组播报文A,获取节点A0的组播路由信息,解析节点A0的组播路由标识中的集合标识(即第一个比特),解析结果为1,表明节点A0对应的第一节点集合为{节点A1、节点A2、节点A3},则节点A0的组播路由标识中后续还包括3个比特,继续解析这3个比特,获取比特序列110。
22)节点A0遍历比特序列110,找到第一个不为0的比特,根据该比特的位置查找组播转发表,得知需要向节点A1发送组播报文B,向节点A1发送的组播报文B的结构可参见图14中的(a)。
23)节点A0继续遍历比特序列110,找到第二个不为0的比特,根据该比特的位置查找组播转发表,得知需要向节点A2发送组播报文C,向节点A2发送的组播报文C的结构可参见图14中的(b)。
24)节点A0继续遍历比特序列110,发现再没有不为0的比特,则不再进行组播报文发送。
25)节点A1接收组播报文B,解析节点A1的组播路由标识11,向节点B和节点C发送单播报文D,由于节点B和节点C为组播树中的叶子节点,因此,向节点B和节点C发送的报文为单播报文而不是组播报文。
26)节点A2接收组播报文C,解析节点A2的组播路由标识10,向节点D发送单播报文E,由于节点D为组播树中的叶子节点,因此,向节点D发送的报文为单播报文而不是组播报文。
若节点A0接收到的组播报文(记为组播报文A)中的A0的组播路由信息,以及比特序列中的比特与下一跳的地址之间的对应关系为图13中的(b),则节点A0的组播路由标识表示节点A0对应的第一节点集合为{节点B、节点C、节点D、节点E、节点F、节点G},且节点A0需要向节点B、节点C和节点D发送组播报文。该情况下,图3A中各个节点发送组播报文的过程为:
31)节点A0解析接收到的组播报文A,获取节点A0的组播路由信息,解析节点A0的组播路由标识中的集合标识(即第一个比特),解析结果为0,表明节点A0对应的第一节点集合为{节点B、节点C、节点D、节点E、节点F、节点G},则节点A0的组播路由标识中后续还包括6个比特,继续解析这6个比特,获取比特序列111000。
32)节点A0遍历比特序列111000,找到不为0的比特,根据这些比特的位置查找组播转发表,得知需要向节点B、节点C和节点D发送报文,由于节点B、节点C和节点D为叶子节点,因此,节点A0向节点B、节点C和节点D发送单播报文。其中,向节点B发送的单播报文中的单播封装中的源地址为节点A0的地址,目的地址为节点B的地址,向节点C发送的单播报文中的单播封装中的源地址为节点A0的地址,目的地址为节点C的地址,向节点D发送的单播报文中的单播封装中的源地址为节点A0的地址,目的地址为节点D的地址。
方式23、一个节点的组播路由标识包括第三字段,第三字段中包括第一组标识,第一组标识用于指示该节点对应的第一节点组,一个节点对应的第一节点组中的节点均为该节点的子节点。
其中,一个节点对应的第一节点组为该节点对应的第一节点集合的子集。一个节点对应的第一节点集合中的节点可以组成至少一个节点组,第一节点集合中的一个节点可以位于一个节点组,也可以位于多个节点组,哪些节点组成一个节点组可以是预先配置的,一个节点组对应一个组标识(Group ID,简称GID)。该情况下,参见图11中的(c),组播路由标识为GID,一个节点可以通过接收到的组播报文中的该节点的组播路由标识中的GID确定该GID对应的节点组中的节点,并向这些节点发送组播 报文。
示例性的(记为示例2),基于图2所示的示例,假设节点R对应的第一节点集合包含节点B、节点A、节点S和节点E,这4个节点可以组成3个节点组,第1个节点组包括节点A和节点B,第2个节点组包括节点S和节点E,第3个节点组包括节点B、节点A、节点S和节点E。第1个节点组的标识为标识1,第2个节点组的标识为标识2,第3个节点组的标识为标识3。在图2中的右侧所示的组播树中,节点S和节点E为节点R的子节点。则节点R的组播路由标识可以为标识2。
与方式21和方式22类似的,在方式23中,每个节点上也可以存储有组播转发表,组播转发表中包括节点组的组标识与下一跳的信息(例如,去往下一跳的出接口、下一跳的地址)的对应关系。此处的下一跳即组标识对应的节点组中的节点。该情况下,一个节点可以根据组播路由标识以及组播转发表中的该对应关系确定向哪些节点转发组播报文。基于示例1,节点R的组播转发表的一种示例可参见表2。
表2:节点R的组播转发表
Figure PCTCN2022076838-appb-000005
可以理解的是,上述方式21、方式22和方式23中的组播路由标识之间是可以进行相互转换的,例如,方式23中的GID可以转换为方式22中的比特序列或方式21中的组播路由标识。例如,上述示例2中的节点R的组播路由标识(即标识2)可以转换为上述示例1中的节点R的组播路由标识(即0011)。
上述方式21、方式22和方式23中的组播路由标识分别可以称为第一类型组播路由标识、第二类型组播路由标识和第三类型组播路由标识。上述方式21、方式22和方式23中的一个节点的组播路由标识的长度可以在该节点中静态维护。生成组播树中的第一个组播报文的节点(例如,源节点)或控制器可以维护组播树中的所有节点的组播路由标识的长度。
上述方式21,在组播树中的节点极低密度的组播场景下,组播报文的封装效率最优。上述方式22,在组播树中的节点较高密度的组播场景下,封装效率最优。上述方式23,在组播树中的节点最高密度的组播场景下,封装效率最优。
可选的,一个节点的组播路由标识中还包括类型字段,类型字段用于指示该节点的组播路由标识的类型。组播路由标识的类型包括上述第一类型组播路由标识、第二类型组播路由标识和第三类型组播路由标识。该情况下,接收组播报文的节点可以根据组播路由标识的类型确定如何识别组播路由标识。示例性的,当组播路由标识还包括类型字段时,方式21、方式22和方式23中的组播路由标识可以参见图15中的(a)、 图15中的(b)和图15中的(c),类型字段在图15中的(a)、图15中的(b)和图15中的(c)中记为Type。
在实际实现时,可以唯一使用一种类型的组播路由标识(此时,不需要类型字段),也可以通过类型字段指示使用哪种类型的组播路由标识。另外,需要说明的是,类型字段可以认为是组播路由标识的一部分,也可以认为是独立于组播路由标识的一个字段,本申请不作限制。在一个组播报文中,不同节点的组播路由标识的类型可以相同,也可以不同,本申请不作限制。
可选的,一个节点的组播路由标识中还包括组播路由标识长度字段和/或节点类型字段,组播路由标识长度字段用于指示组播路由标识的长度,节点类型字段用于指示节点类型,节点类型包括单实体节点和多实体节点,单实体节点是指该节点包括一个实体,多实体节点是指该节点包括多个实体。与类型字段类似的,组播路由标识长度字段和/或节点类型字段可以认为是组播路由标识的一部分,也可以认为是独立于组播路由标识的一个字段,本申请不作限制。
上述类型字段、组播路由标识长度字段和节点类型字段可以统称为描述字段或dscr字段。这些字段还可以有其他名称,本申请不作限制。
上述实施例提到的寻址字段可以通过以下方式31、方式32或方式33实现。
方式31、一个节点的寻址字段用于指示该节点的非叶子子节点的组播路由信息的长度。
假设该节点为节点1,节点1的非叶子子节点有M个。节点1的寻址字段中可以包括M-1或M个字段(该字段记为第五字段),一个第五字段用于指示节点1的一个非叶子子节点的组播路由信息的长度(该长度记为Y),该第五字段的位宽可以为
Figure PCTCN2022076838-appb-000006
(此时,该第五字段指示的长度为该第五字段的值与1之和),或,
Figure PCTCN2022076838-appb-000007
Figure PCTCN2022076838-appb-000008
(此时,该第五字段指示的长度为该第五字段的值),或,固定位宽(例如,1字节、2字节)。节点1的组播信息可参见图16。其中,递归单元m表示节点1的第m+1个递归单元(即节点1的第m+1个非叶子子节点的组播路由信息)。递归单元m的长度(即节点1的第m+1个非叶子子节点的组播路由信息的长度)可以记为L m。m为大于等于0小于M的整数。
在第一种情况下,节点1的寻址字段可以指示节点1的M-1个递归单元的长度。M-1个递归单元可以为M个递归单元中的任意M-1个递归单元。该情况下,M个递归单元中的另一个递归单元可以根据第一字段指示的长度计算得到。例如,参见图16,M-1个递归单元为递归单元0至递归单元M-2,即节点1的寻址字段指示L 0、L 1、…、L M-2。该情况下,若第一字段指示节点1的组播路由信息的长度(记为总长度1),递归单元M-1的长度=总长度1-(L 0+L 1+…+L M-2)-组播路由标识的长度-寻址字段的长度。若第一字段指示M个递归单元的总长度(记为总长度2),递归单元M-1的长度=总长度2-(L 0+L 1+…+L M-2)。
在第二种情况下,参见图16,节点1的寻址字段可以指示节点1的M个递归单元的长度,即节点1的寻址字段指示L 0、L 1、…、L M-1
在方式31下,节点1可以根据第一字段、组播路由标识和寻址字段的长度确定递归单元0的起始位置,再根据各个递归单元的长度确定每个递归单元的起始位置和/或 结束位置。本申请提到的位置可以是相对于组播信息的起始位置的偏移,也可以是相对于组播报文中的其他某个位置的偏移。示例性的,基于图16所示的示例,以节点1的寻址字段指示节点1的M个递归单元的长度、第一字段指示总长度1、且递归单元的起始位置为相对于组播信息的起始位置的偏移为例,递归单元m的起始位置记为offset m,各个递归单元的起始位置可参见表3。
表3
Figure PCTCN2022076838-appb-000009
方式32、一个节点的寻址字段用于指示该节点的非叶子子节点的组播路由信息的起始位置或结束位置。
假设该节点为节点1,节点1的非叶子子节点有M个。节点1的寻址字段中可以包括M-1或M个字段(该字段记为第五字段),一个第五字段用于指示节点1的一个非叶子子节点的组播路由信息的起始位置或结束位置。第五字段可以为固定几个比特(例如,4比特)或固定几个字节(例如,1字节)。为了方便描述,下文中以第五字段用于指示起始位置为例对方式32进行示例性说明,第五字段用于指示结束位置时原理类似,可参考进行理解。节点1的组播信息可参见图17中的(a)或图17中的(b)或图17中的(c)。其中,递归单元m的起始位置(即节点1的第m+1个非叶子子节点的组播路由信息的起始位置)可以记为O m。在方式32中,递归单元M-1的长度可以通过第一字段指示的长度计算得到,计算的方法与方式31中类似,可参考进行理解,不再赘述。或者,递归单元M-1的长度也可以由一个字段(记为第六字段)显示指示,此时,第一字段可以有也可以没有。若第一字段没有,第六字段可以位于第一字段的位置,也可以位于其他位置,本申请不作限定。为了方便描述,下文中以存在第六字段时没有第一字段、且第六字段位于第一字段的位置为例进行说明。
方式32可以通过以下方式a或方式b实现。
方式a、节点1的寻址字段指示节点1的M-1个递归单元的起始位置。
在方式a中,M-1个递归单元可以为递归单元1至递归单元M-1,即节点1的寻址字段指示O 1、O 2、…、O M-1。方式a的第一种可能的实现方式,参见图17中的(a),节点1的寻址字段指示O 1、O 2、…、O M-1。方式a的第二种可能的实现方式,参见图17中的(b),每个递归单元之前、且与该递归单元相邻的位置均有一个第五字段,该第五字段用于指示下一个递归单元的起始位置。
在方式a下,节点1可以根据第一字段(或第六字段)、组播路由标识和寻址字段的长度确定递归单元0的起始位置,根据寻址字段确定递归单元1至递归单元M-1的起始位置,以及递归单元0至递归单元M-2的长度,再根据第一字段(或第六字段)确定递归单元M-1的长度。本申请提到的位置与方式31中类似,可参考进行理解,不再赘述。示例性的,基于图17中的(b)所示的示例,以递归单元M-1的长度根据 第六字段确定为例,各个递归单元的起始位置以及长度可参见表4。
表4
Figure PCTCN2022076838-appb-000010
方式b、节点1的寻址字段指示节点1的M个递归单元的起始位置。
方式b中,节点1的寻址字段指示O 0、O 1、…、O M-1。该情况下,节点1可以根据寻址字段确定递归单元0至递归单元M-1的起始位置,以及递归单元0至递归单元M-2的长度,再根据第一字段或第六字段确定递归单元M-1的长度。本申请提到的位置与方式31中类似,可参考进行理解,不再赘述。示例性的,基于图17中的(c)所示的示例,以递归单元M-1的长度根据第六字段确定为例,各个递归单元的起始位置以及长度可参见表5。
表5
递归单元 递归单元的起始位置 递归单元的长度
递归单元0 O 0 O 1-O 0
递归单元1 O 1 O 2-O 1
递归单元M-1 O M-1 第六字段指示
方式33、一个节点的寻址字段包括多个定界字段,该节点的非叶子子节点的组播路由信息由多个定界字段分隔开。
假设该节点为节点1,节点1的非叶子子节点有M个。节点1的寻址字段中可以包括M-1个定界字段,定界字段的长度可以为预先配置的。节点1的组播信息可参见图18。每两个递归单元之间可以存在一个定界字段。该情况下,递归单元M-1的长度可以通过第一字段指示的长度计算得到,计算的方法与方式31中类似,可参考进行理解,不再赘述。或者,递归单元M-1的长度也可以由一个字段(记为第六字段)显示指示,此时,第一字段可以有也可以没有。若第一字段没有,第六字段可以位于第一字段的位置,也可以位于其他位置,本申请不作限定。为了方便描述,下文中以存在第六字段时没有第一字段、且第六字段位于第一字段的位置为例进行说明。
在方式33下,节点1可以根据第一字段(或第六字段)和组播路由标识的长度确定递归单元0的起始位置,根据定界字段确定递归单元1至递归单元M-1的起始位置,以及递归单元0至递归单元M-2的长度,再根据第一字段(或第六字段)确定递归单元M-1的长度。本申请提到的位置与方式31中类似,可参考进行理解,不再赘述。示例性的,基于图18所示的示例,以递归单元的起始位置为相对于组播信息的起始位置的偏移、递归单元M-1的长度根据第六字段确定为例,递归单元m的起始位置记为offset m,各个递归单元的起始位置以及长度可参见表6。
表6
Figure PCTCN2022076838-appb-000011
上述实施例以第二节点为组播树中第一节点的非叶子子节点为例对本申请提供的方法作示例性说明。第二节点也可能为第一节点的叶子子节点,该情况下,本申请提供了的组播报文发送方法可以通过图19所示的方法实现,具体可以包括:
1901、第一节点接收第七组播报文,第七组播报文包括第一节点的组播信息和数据。
关于第一节点的组播信息的描述可参见上文,不再赘述。若第一节点不为组播树的源节点,第一节点可以接收组播树中的其他节点发送的第七组播报文。
1902、若第一节点确定第二节点为第一节点的叶子子节点,第一节点提取出第七组播报文中的数据。
其中,第一节点确定一个节点是否为自身的叶子子节点的过程可参见上述步骤12)的相关描述,不再赘述。可以理解的是,若第二节点为第一节点的叶子节点,则第二节点不需要再对该组播报文进行组播转发,因此,第一节点可以将数据发送给第二节点。也就是说,第一节点发送给第二节点的报文为单播报文。
1903、第一节点根据数据组装第一单播报文。
1904、第一节点向第二节点发送第一单播报文。相应的,第二节点从第一节点接收第一单播报文。
上述实施例提供的方法,均站在节点的角度对本申请提供的方法作示例性说明。一个节点有可能包括多个实体。该情况下,一个节点内的实体接收到组播报文后可以通过图20所示的方法进行处理,该方法应用于第一实体,第一实体属于第一节点,该方法具体包括:
2001、第一实体接收第三组播报文,第三组播报文包括第一节点的第一组播路由信息。
其中,第一节点的第一组播路由信息包括第一节点的第一组播路由标识和第一节点的第一组播路由标识对应的非叶子子节点的组播路由信息,第一节点的第一组播路由标识与第一节点的组播路由标识相同或通过对第一节点的组播路由标识进行更新得到。关于节点的组播路由信息的相关描述可参见上文,不再赘述。
根据上文中关于组播路由标识的作用以及描述可知,若组播路由标识为比特序列,或,Cnt字段+Idx字段,则一个节点的组播路由标识中会有与每个子节点(包括非叶子子节点和叶子子节点)对应的比特或Idx字段。由于第一组播路由标识是根据组播路由标识衍生得到的,因此,第一节点的第一组播路由标识对应的非叶子子节点是指 该第一组播路由标识中的比特或Idx字段对应的子节点中的非叶子子节点。
其中,第一实体为第一节点中的一个实体,第一实体可以从第一节点之外的其他节点接收第三组播报文,也可以从第一节点中的其他实体接收第三组播报文,本申请不作限制。若第一实体从第一节点之外的其他节点接收第三组播报文,则第一节点的第一组播路由信息与第一节点的组播路由信息相同。若第一实体从第一节点中的其他实体接收第三组播报文,则第一节点的第一组播路由标识可能与第一节点的组播路由标识相同,也可能通过对第一节点的组播路由标识进行更新得到。第一组播路由信息具体是如何的可根据第一实体和第二实体之间处理组播报文的方法推算得到,具体示例可参见下文,不再赘述。
2002、第一实体根据第一节点的第一组播路由标识确定第二实体,第二实体为第一节点中的实体。
步骤2002在具体实现时可以包括:第一实体根据第一节点的第一组播路由标识查找组播转发表得到第二实体。需要说明的是,第一实体根据第一节点的第一组播路由标识可能可以得到多个第二实体,此处的第二实体可以为其中的任意一个第二实体,本申请中以第一实体向一个第二实体转发组播报文为例进行描述,第一节点在实际处理组播报文时,可以向每个第二实体转发组播报文。
示例性的,若第一组播路由标识为比特序列,则组播转发表中第一组播路由标识中的值为1的比特对应的下一跳为第二实体,若第一组播路由标识为Cnt字段+Idx字段,则组播转发表中Idx字段的值对应的下一跳为第二实体。
2003、第一实体向第二实体发送第四组播报文,第四组播报文中包括第一节点的第二组播路由信息。
其中,第一节点的第二组播路由信息包括第一节点的第二组播路由标识和第一节点的第三组播路由标识对应的部分或全部非叶子子节点的组播路由信息。第一节点的第三组播路由标识与所述第一节点的第一组播路由标识相同或通过对所述第一节点的第一组播路由标识进行更新得到,所述第一节点的第二组播路由标识与所述第一节点的第三组播路由标识相同或通过对所述第一节点的第三组播路由标识进行更新得到。
其中,第一实体具体在以下情况1和情况2下,需要对第一节点的第一组播路由标识进行更新得到第一节点的第三组播路由标识,在其他情况下,第一节点的第三组播路由标识与第一节点的第一组播路由标识相同,以下对情况1和情况2以及更新方法进行示例性说明。
情况1、第一实体属于第一节点的某个子节点(假设为子节点1)。
在情况1下,若第一组播路由标识为比特序列,则第一实体将子节点1对应的比特置0得到第三组播路由标识。若第一组播路由标识为Cnt字段+Idx字段,则第一实体将子节点1对应的Idx字段删除,并将Cnt字段的值减1得到第三组播路由标识。
示例性的,参见图22中的(a),实体A属于节点A,实体A接收到的组播报文A中的节点D1的组播路由标识为110101,该组播路由标识中的第2个比特与节点A对应,因此,参见下文中的步骤53),实体A向实体B发送组播报文C之前,可以将节点D1的组播路由标识(即110101)中的第2个比特置0得到节点D1的组播路由标识1(即100101)。具体可参见下文中的示例1中的第一种情况,此处不再赘述。
情况2、第一实体不属于第一节点的任意一个子节点,但是组播报文只需要经过第一实体的组播转发就可以到达的第一节点的一个或多个子节点(假设为Q个子节点)。
在情况2下,若第一组播路由标识为比特序列,则第一实体将Q个子节点对应的比特置0得到第三组播路由标识。若第一组播路由标识为Cnt字段+Idx字段,则第一实体将Q个子节点对应的Idx字段删除,并将Cnt字段的值减Q得到第三组播路由标识。
示例性的,参见图23中的(a),实体A不属于节点D1的任意一个子节点,节点D1对应的第一节点集合为{节点O、节点P、节点Q、节点R、节点S、节点T、节点U、节点V、节点W}。其中,节点O、节点Q、节点S、节点T、节点U和节点V为节点D1的子节点。实体A接收到的组播报文A中的节点D1的组播路由标识为101011110,其中,节点D1的子节点中节点O和节点Q的组播报文只需要经过实体A的组播转发就可以到达,由于节点O和节点Q对应101011110中的第1个和第3个比特,因此,实体A向实体B发送组播报文C之前,可以将节点D1的组播路由标识(即101011110)中的第1个和第3个比特置0得到节点D1的组播路由标识1(即000011110)。具体可参见下文中的示例1中的第二种情况,此处不再赘述。
其中,第一实体具体在以下情况3下,需要对第一节点的第三组播路由标识进行更新得到第一节点的第二组播路由标识,在其他情况下,第一节点的第二组播路由标识与第一节点的第三组播路由标识相同,以下对情况3以及更新方法进行示例性说明。
情况3、第一实体需要向多个第二实体转发组播报文。
在情况3下,针对任意一个第二实体,若第三组播路由标识为比特序列,则第一实体需要将第一节点的第三组播路由标识中的与除P个子节点之外的其他子节点对应的比特置0得到第二组播路由标识。若第三组播路由标识为Cnt字段+Idx字段,则第一实体将除P个子节点之外的其他子节点对应的Idx字段删除,并将Cnt字段的值减P得到第二组播路由标识。其中,P个子节点为第一节点的一个或多个子节点,这些子节点需要经过该第二实体的组播转发才可以接收到组播报文。
示例性的,参见图1B中的(b),实体A、实体B、实体C、实体D和实体E组成节点Z。节点Z对应的第一节点集合为{节点X、节点Q、节点R、节点E、节点V}。其中,节点X、节点R、节点E、节点V为节点Z的子节点。节点R和节点E的组播报文需要经过实体C转发,节点V的组播报文经过实体B转发。实体A接收到的组播报文A中的节点Z的组播路由标识为110111。其中,节点R和节点E对应110111中的第4个和第5个比特,节点V对应110111中的第6个比特。因此,参见下文中的步骤93),实体A向实体B发送组播报文B之前,可以将节点Z的组播路由标识(即110111)中的第4个和第5个比特置0得到节点Z的组播路由标识1(即100001),向实体C发送组播报文C之前,可以将节点Z的组播路由标识(即110111)中的第6个比特置0得到节点Z的组播路由标识2(即100110)。具体可参见下文中的示例3,此处不再赘述。
需要说明的是,第一节点的第二组播路由信息包括第一节点的第三组播路由标识对应的部分还是全部的非叶子子节点的组播路由信息,取决于第一实体需要向几个第 二实体发送组播报文,若第一实体需要向一个第二实体发送组播报文,则第一节点的第二组播路由信息包括第一节点的第三组播路由标识对应的全部的非叶子子节点的组播路由信息,若第一实体需要向2个或2个以上第二实体发送组播报文,则第一节点的第二组播路由信息包括第一节点的第三组播路由标识对应的部分非叶子子节点的组播路由信息。
可选的,该方法还包括:
41)第一实体根据第一节点的第一组播路由标识确定第一子节点,第一子节点为所述第一节点在所述组播树中的子节点中所述第一实体对应的子节点。
42)所述第一实体向所述第一子节点发送第五组播报文,所述第五组播报文包括所述第一子节点的组播路由信息。
需要说明的是,此处以第一子节点为第一节点的非叶子子节点为例进行描述的。若第一子节点为第一节点的叶子子节点,则第一实体向第一子节点中的第三实体发送单播报文。
其中,第一实体对应的子节点也就是第一实体能够处理的子节点。在第一实体属于第一节点的某个子节点的情况下,第一子节点为该某个子节点。在第一实体不属于第一节点的任意一个子节点的情况下,第一子节点为上述Q个子节点中的任意一个,本申请中以第一实体向一个第一子节点发送组播报文为例进行描述,在实际实现时,第一实体可以向每个第一子节点发送组播报文。
可选的,在第一实体不属于第一子节点的情况下,步骤42)在具体实现时可以包括:第一实体向第一子节点中的第三实体发送第五组播报文。
可选的,在第一实体属于第一子节点的情况下,该方法还包括:第一实体根据第一子节点的组播路由标识确定第二子节点,第二子节点为第一子节点在组播树中的子节点中第一实体对应的子节点。后续过程中,第一实体向第二子节点发送报文。若第二子节点为第一子节点的叶子子节点,则该报文为单播报文,该报文中包括第三组播报文中的数据,若第二子节点为第一子节点的非叶子子节点,则该报文为组播报文(可以记为第八组播报文),第八组播报文中包括第二子节点的组播路由信息和数据。示例性的,参见图1B中的(b),第一实体为实体A,第一子节点为节点X,实体A属于节点X,则第二子节点为节点O。
可选的,在第一实体属于第一子节点,且第一子节点还包括第四实体的情况下,该方法还包括:第一实体向第四实体发送第六组播报文,第六组播报文中包括第一子节点的第一组播路由信息,第一子节点的第一组播路由信息包括第一子节点的第一组播路由标识和第一子节点的第二组播路由标识对应的部分或全部非叶子子节点的组播路由信息;第一子节点的第二组播路由标识与第一子节点的组播路由标识相同或通过对第一子节点的组播路由标识进行更新得到,第一子节点的第一组播路由标识与第一子节点的第二组播路由标识相同或通过对第一子节点的第二组播路由标识进行更新得到。
需要说明的是,在图20所示的实施例中,若一个实体属于多个节点,则该实体中可以存储多个组播转发表,一个节点对应一个或多个组播转发表。一个节点对应的组播转发表中包括该节点的组播路由标识(例如,该节点的子节点的节点索引或比特序 列或组标识)与下一跳的信息之间的对应关系,用于该实体根据该节点的组播路由标识确定需要向哪些子节点发送组播报文。该情况下,节点的组播路由标识中还可以包括组播转发表标识字段,用于指示实体查找哪个组播转发表。示例性的,若实体中存储有2个组播转发表,分别为组播转发表1和组播转发表2,组播转发表标识字段为1个比特,该比特的值为1时,表示查找组播转发表1,该比特的值为0时,表示查找组播转发表2,反之亦可。组播转发表标识字段也可以不属于组播路由标识,而单独为组播信息中的一个字段。
为了使得图20所示的实施例更加的清楚,以下通过三个示例对图20所示的实施例作示例性说明。在这三个示例中,组播转发表中的索引对应的比特均是指组播路由标识中的除组播转发表标识字段之外的比特,由此也可以理解,在查找组播转发表时,采用的比特均为组播路由标识中的除组播转发表标识字段之外的比特。
示例1
参见图21,图21示出了部分实体的拓扑连接。其中,实体A、实体B、实体C、实体D和实体E组成节点D1。下文中的第一种情况至第三种情况中,均以组播路由标识为比特序列为例对图20所示的实施例进行示例性说明,其中,比特序列中的比特与第一节点集合中的节点一一对应,比特序列中的一个比特的值为1时,表示该比特对应的节点为节点D1的子节点。每个节点中可以静态维护节点D1的组播路由标识的长度。
在第一种情况下,参见图22中的(a),节点D1对应的第一节点集合为{节点A、节点B、节点C、节点D、节点E}。其中,节点A、节点C和节点E为节点D1的子节点。由于节点5和实体A具有拓扑连接,因此,节点5向节点D1发送的组播报文A(组播报文A中的节点D1的组播路由信息可参见图22中的(b)),由节点D1中的实体A接收。组播报文A中的节点D1的组播路由信息中包括3个非叶子子节点(即节点A、节点C和节点E)的组播路由信息,节点A的组播路由信息的长度配置在实体A中,节点D1的寻址字段用于指示节点C的组播路由信息的长度。实体B和实体D中存储有组播转发表1,组播转发表1为节点D1对应的组播转发表。实体A、实体C、实体E中存储有两个组播转发表。实体A、实体C和实体E中存储的组播转发表1均为节点D1对应的组播转发表,实体A中存储的组播转发表2为节点A对应的组播转发表,实体C中存储的组播转发表2为节点C对应的组播转发表,实体E中存储的组播转发表2为节点E对应的组播转发表。节点D1的组播路由标识以及由其衍生的组播路由标识、节点A的组播路由标识、节点C的组播路由标识、节点E的组播路由标识中均包括组播转发表标识字段,该字段为这些组播路由标识中的第1个比特,该比特值为1表示查找组播转发表1,该比特值为0表示查找组播转发表2。
在第一种情况下,节点D1中的各个实体发送组播报文的流程如下:
51)实体A接收组播报文A,确定组播报文A中的节点D1的组播路由标识(即110101)中的第1个比特的值为1,则根据节点D1的组播路由标识中的后5个比特查找组播转发表1(参见表7),确定这5个比特中第1个值为1的比特(即第1个比特)对应自身(即实体A),其余值为1的比特对应实体B。
表7
表索引 下一跳的地址
0(对应第1个比特) 实体A的地址
1(对应第2个比特) 实体B的地址
2(对应第3个比特) 实体B的地址
3(对应第4个比特) 实体B的地址
4(对应第5个比特) 实体B的地址
52)实体A查找到自身(即实体A)之后,获取这5个比特中第1个值为1的比特(即第1个比特)对应的节点(即节点A)的组播路由信息,确定节点A的组播路由标识(即0101)中的第1个比特的值为0,则根据节点A的组播路由标识中的后3个比特查找组播转发表2(参见表8),确定3个比特中值为1的比特对应实体O和实体Q,则向实体O和实体Q发送单播报文B,单播报文B中包括组播报文A中的数据。
表8
表索引 下一跳的地址
0(对应第1个比特) 实体O的地址
1(对应第2个比特) 实体P的地址
2(对应第3个比特) 实体Q的地址
53)实体A查找到实体B之后,向实体B发送组播报文C,组播报文C中包括节点D1的组播路由标识1(即100101)、节点D1的寻址字段、节点C的组播路由信息、节点E的组播路由信息和数据。组播报文C中节点D1的组播路由信息1可参见图22中的(c)。
需要说明的是,由于节点A的组播路由信息被实体A处理了,因此,在发送组播报文C之前,实体A将节点D1的组播路由标识更新为节点D1的组播路由标识1。
54)实体B接收组播报文C,确定组播报文C中的节点D1的组播路由标识1(即100101)中的第1个比特的值为1,则根据节点D1的组播路由标识1中的后5个比特查找组播转发表1(参见表9),确定5个比特中值为1的比特均对应实体C,则向实体C发送组播报文C。
表9
表索引 下一跳的地址
0(对应第1个比特) 实体A的地址
1(对应第2个比特) 实体B的地址
2(对应第3个比特) 实体C的地址
3(对应第4个比特) 实体C的地址
4(对应第5个比特) 实体C的地址
55)实体C接收组播报文C,确定组播报文C中的节点D1的组播路由标识1(即100101)中的第1个比特的值为1,则根据节点D1的组播路由标识1中的后5个比特查找组播转发表1(参见表10),确定这5个比特中第1个值为1的比特(即第3个比特)对应自身(即实体C),其余值为1的比特对应实体D。
表10
表索引 下一跳的地址
0(对应第1个比特) 实体B的地址
1(对应第2个比特) 实体B的地址
2(对应第3个比特) 实体C的地址
3(对应第4个比特) 实体D的地址
4(对应第5个比特) 实体D的地址
56)实体C查找到自身(即实体C)之后,获取5个比特中第1个值为1的比特(即第3个比特)对应的节点(即节点C)的组播路由信息,确定节点C的组播路由标识(即0011)中的第1个比特的值为0,则根据节点C的组播路由标识中的后3个比特查找组播转发表2(参见表11),确定3个比特中值为1的比特对应实体S和实体T,向实体S和实体T发送报文。其中,向实体S发送的单播报文D包括组播报文A中的数据,向实体T发送的组播报文D包括组播报文A中的节点T的组播路由信息和数据,组播报文D中包括的节点T的组播信息可参见图22中的(e)。
节点T接收组播报文D,根据组播报文D中的节点T的组播路由标识110查找组播转发表(参见表12),确定3个比特中值为1的比特对应实体X和实体Y,向实体X和实体Y发送单播报文E,单播报文E中包括组播报文A中的数据。
表11
表索引 下一跳的地址
0(对应第1个比特) 实体R的地址
1(对应第2个比特) 实体S的地址
2(对应第3个比特) 实体T的地址
表12
表索引 下一跳的地址
0(对应第1个比特) 实体X的地址
1(对应第2个比特) 实体Y的地址
2(对应第3个比特) 实体Z的地址
57)实体C查找到实体D之后,向实体D发送组播报文F,组播报文F中包括节点D1的组播路由标识2(即100001)、节点E的组播路由信息和数据。组播报文F中节点D1的组播路由信息2可参见图22中的(d)。
需要说明的是,由于节点C的组播路由信息被实体C处理了,因此,在发送组播报文F之前,实体C将节点D1的组播路由标识1更新为节点D1的组播路由标识2。
58)实体D接收组播报文F,确定组播报文F中的节点D1的组播路由标识2(即100001)中的第1个比特的值为1,则根据节点D1的组播路由标识2中的后5个比特查找组播转发表1(参见表13),确定这5个比特中值为1的比特对应实体E,则向实体E发送组播报文F。
表13
表索引 下一跳的地址
0(对应第1个比特) 实体C的地址
1(对应第2个比特) 实体C的地址
2(对应第3个比特) 实体C的地址
3(对应第4个比特) 实体D的地址
4(对应第5个比特) 实体E的地址
59)实体E接收组播报文F,确定组播报文F中的节点D1的组播路由标识2(即100001)中的第1个比特的值为1,则根据节点D1的组播路由标识2中的后5个比特查找组播转发表1(参见表14),确定5个比特中值为1的比特对应自身(即实体E),获取这5个比特中第1个值为1的比特(即第5个比特)对应的节点(即节点E)的组播路由信息,确定节点E的组播路由标识(即0110)中的第1个比特的值为0,则根据节点E的组播路由标识中的后3个比特查找组播转发表2(参见表15),确定3个比特中值为1的比特对应实体U和实体V,向实体U和实体V发送单播报文G,单播报文G中包括组播报文A中的数据。
表14
表索引 下一跳的地址
0(对应第1个比特) 实体D的地址
1(对应第2个比特) 实体D的地址
2(对应第3个比特) 实体D的地址
3(对应第4个比特) 实体D的地址
4(对应第5个比特) 实体E的地址
表15
表索引 下一跳的地址
0(对应第1个比特) 节点U的地址
1(对应第2个比特) 节点V的地址
2(对应第3个比特) 节点W的地址
在第二种情况下,参见图23中的(a),节点D1对应的第一节点集合为{节点O、节点P、节点Q、节点R、节点S、节点T、节点U、节点V、节点W}。其中,节点O、节点Q、节点S、节点T、节点U和节点V为节点D1的子节点。由于节点5和实体A具有拓扑连接,因此,节点5向节点D1发送的组播报文A(组播报文A中的节点D1的组播路由信息可参见图23中的(b)),由节点D1中的实体A接收。实体A、实体B、实体C、实体D、实体E中存储有节点D1对应的组播转发表。
在第二种情况下,节点D1中的各个实体发送组播报文的流程如下:
61)实体A接收组播报文A,根据组播报文A中的节点D1的组播路由标识(即101011110)查找组播转发表(参见表16),确定9个比特中第1个和第2个值为1的比特对应实体O、实体Q,其余值为1的比特对应实体B。
表16
表索引 下一跳的地址
0(对应第1个比特) 实体O的地址
1(对应第2个比特) 实体P的地址
2(对应第3个比特) 实体Q的地址
3(对应第4个比特) 实体B的地址
4(对应第5个比特) 实体B的地址
5(对应第6个比特) 实体B的地址
6(对应第7个比特) 实体B的地址
7(对应第8个比特) 实体B的地址
8(对应第9个比特) 实体B的地址
62)实体A查找到实体O和实体Q之后,向实体O和实体Q发送单播报文B,单播报文B中包括组播报文A中的数据。
63)实体A查找到实体B之后,向实体B发送组播报文C,组播报文C中包括节点D1的组播路由标识1(即000011110)、节点T的组播路由信息和数据。组播报文C中节点D1的组播路由信息1可参见图23中的(c)。
需要说明的是,由于节点D1的组播路由标识中的前3个比特被实体A处理了,因此,在发送组播报文C之前,实体A将节点D1的组播路由标识更新为节点D1的组播路由标识1。
64)实体B接收组播报文C,根据组播报文C中的节点D1的组播路由标识1(即000011110)查找组播转发表(参见表17),确定9个比特中值为1的比特均对应实体C,向实体C发送组播报文C。
表17
表索引 下一跳的地址
0(对应第1个比特) 实体A的地址
1(对应第2个比特) 实体A的地址
2(对应第3个比特) 实体A的地址
3(对应第4个比特) 实体C的地址
4(对应第5个比特) 实体C的地址
5(对应第6个比特) 实体C的地址
6(对应第7个比特) 实体C的地址
7(对应第8个比特) 实体C的地址
8(对应第9个比特) 实体C的地址
65)实体C接收组播报文C,根据组播报文C中的节点D1的组播路由标识1(即000011110)查找组播转发表(参见表18),确定9个比特中第1个和第2个值为1的比特对应实体S、实体T,其余值为1的比特对应实体D。
表18
表索引 下一跳的地址
0(对应第1个比特) 实体B的地址
1(对应第2个比特) 实体B的地址
2(对应第3个比特) 实体B的地址
3(对应第4个比特) 实体R的地址
4(对应第5个比特) 实体S的地址
5(对应第6个比特) 实体T的地址
6(对应第7个比特) 实体D的地址
7(对应第8个比特) 实体D的地址
8(对应第9个比特) 实体D的地址
66)实体C查找到实体S、实体T之后,向实体S发送单播报文D,单播报文D中包括组播报文A中的数据,向实体T发送组播报文D,组播报文D中包括组播报文A中的节点T的组播路由信息和数据。实体T接收组播报文D,根据组播报文D中的节点T的组播路由标识110查找组播转发表(参见上述表12),确定3个比特中值为1的比特对应实体X和实体Y,向实体X和实体Y发送单播报文E,单播报文E中包括组播报文A中的数据。
67)实体C查找到实体D之后,向实体D发送组播报文E,组播报文E中包括节点D1的组播路由标识2(即000000110)和数据。组播报文E中节点D1的组播路由信息2可参见图23中的(d)。
需要说明的是,由于节点D1的组播路由标识中的中间3个比特被实体C处理了,因此,在发送组播报文E之前,实体C将节点D1的组播路由标识1更新为节点D1的组播路由标识2。
68)实体D接收组播报文E,根据组播报文E中的节点D1的组播路由标识2(即000000110)查找组播转发表(参见表19),确定9个比特中值为1的比特均对应实体E,向实体E发送组播报文E。
表19
表索引 下一跳的地址
0(对应第1个比特) 实体C的地址
1(对应第2个比特) 实体C的地址
2(对应第3个比特) 实体C的地址
3(对应第4个比特) 实体C的地址
4(对应第5个比特) 实体C的地址
5(对应第6个比特) 实体C的地址
6(对应第7个比特) 实体E的地址
7(对应第8个比特) 实体E的地址
8(对应第9个比特) 实体E的地址
69)实体E接收组播报文E,根据组播报文E中的节点D1的组播路由标识2(即000000110)查找组播转发表(参见表20),确定9个比特中值为1的比特对应实体U、实体V,向实体U和实体V发送单播报文F,单播报文F中包括组播报文A中的数据。
表20
表索引 下一跳的地址
0(对应第1个比特) 实体D的地址
1(对应第2个比特) 实体D的地址
2(对应第3个比特) 实体D的地址
3(对应第4个比特) 实体D的地址
4(对应第5个比特) 实体D的地址
5(对应第6个比特) 实体D的地址
6(对应第7个比特) 实体U的地址
7(对应第8个比特) 实体V的地址
8(对应第9个比特) 实体W的地址
在第三种情况下,参见图24A中的(a),节点D1对应的第一节点集合为{节点O、节点P、节点Q、节点C、节点D、节点E}。其中,节点O、节点Q、节点C和节点E为节点D1的子节点。由于节点5和实体A具有拓扑连接,因此,节点5向节点D1发送的组播报文A(组播报文A中的节点D1的组播路由信息可参见图24A中的(b)),由节点D1中的实体A接收。组播报文A中的节点D1的组播路由信息中包括2个非叶子子节点(即节点C和节点E)的组播路由信息,节点E的组播路由信息的长度配置在实体A中,节点C的组播路由信息的长度可以通过节点D1的组播路由信息的总长度计算得到。实体A、实体B和实体D中存储有组播转发表1,组播转发表1为节点D1对应的组播转发表。实体C、实体E中存储有两个组播转发表。实体C和实体E中存储的组播转发表1均为节点D1对应的组播转发表,实体C中存储的组播转发表2为节点C对应的组播转发表,实体E中存储的组播转发表2为节点E对应的组播转发表。节点D1的组播路由标识以及由其衍生的组播路由标识、节点C的组播路由标识、节点E的组播路由标识中均包括组播转发表标识字段,该字段为这些组播路由标识中的第1个比特,该比特值为1表示查找节点D1对应的组播转发表,该比特值为0表示查找组播转发表2。
71)实体A接收组播报文A,确定组播报文A中的节点D1的组播路由标识(即1101101)中的第1个比特的值为1,则根据节点D1的组播路由标识中的后6个比特查找组播转发表(参见表21),确定这6个比特中第1个和第2个值为1的比特对应实体O、实体Q,其余值为1的比特对应实体B。
表21
表索引 下一跳的地址
0(对应第1个比特) 实体O的地址
1(对应第2个比特) 实体P的地址
2(对应第3个比特) 实体Q的地址
3(对应第4个比特) 实体B的地址
4(对应第5个比特) 实体B的地址
5(对应第6个比特) 实体B的地址
72)实体A查找到实体O和实体Q之后,向实体O和实体Q发送单播报文B,单播报文B中包括组播报文A中的数据。
73)实体A查找到实体B之后,向实体B发送组播报文C,组播报文C中包括节点D1的组播路由标识1(即1000101)、节点C的组播路由信息、节点E的组播路由信息和数据。组播报文C中节点D1的组播路由信息1可参见图24A中的(c)。
需要说明的是,由于节点D1的组播路由标识中的前3个比特被实体A处理了, 因此,在发送组播报文C之前,实体A将节点D1的组播路由标识更新为节点D1的组播路由标识1。
74)实体B接收组播报文C,确定组播报文C中的节点D1的组播路由标识1(即1000101)中的第1个比特的值为1,则根据节点D1的组播路由标识1中的后6个比特查找组播转发表(参见表22),确定这6个比特中值为1的比特均对应实体C,向实体C发送组播报文C。
表22
表索引 下一跳的地址
0(对应第1个比特) 实体A的地址
1(对应第2个比特) 实体A的地址
2(对应第3个比特) 实体A的地址
3(对应第4个比特) 实体C的地址
4(对应第5个比特) 实体C的地址
5(对应第6个比特) 实体C的地址
75)实体C接收组播报文C,确定组播报文C中的节点D1的组播路由标识1(即1000101)中的第1个比特的值为1,则根据节点D1的组播路由标识1中的后6个比特查找组播转发表1(参见表23),确定这6个比特中第1个值为1的比特(即第4个比特)对应自身(即实体C),其余值为1的比特对应实体D。
表23
表索引 下一跳的地址
0(对应第1个比特) 实体B的地址
1(对应第2个比特) 实体B的地址
2(对应第3个比特) 实体B的地址
3(对应第4个比特) 实体C的地址
4(对应第5个比特) 实体D的地址
5(对应第6个比特) 实体D的地址
76)实体C查找到自身(即实体C)之后,获取6个比特中第1个值为1的比特(即第4个比特)对应的节点(即节点C)的组播路由信息,确定节点C的组播路由标识(即0011)中的第1个比特的值为0,则根据节点C的组播路由标识中的后3个比特查找组播转发表2(参见上述表11),确定3个比特中值为1的比特对应实体S和实体T,向实体S和实体T发送报文。其中,向实体S发送的单播报文D包括组播报文A中的数据,向实体T发送的组播报文D包括组播报文A中的节点T的组播路由信息和数据,组播报文D中包括的节点T的组播信息可参见图22中的(e)。
节点T接收组播报文D,根据组播报文D中的节点T的组播路由标识110查找组播转发表(参见上述表12),确定3个比特中值为1的比特对应实体X和实体Y,向实体X和实体Y发送单播报文E,单播报文E中包括组播报文A中的数据。
77)实体C查找到实体D之后,向实体D发送组播报文F,组播报文F中包括节点D1的组播路由标识2(即1000001)、节点E的组播路由信息和数据。组播报文F中节点D1的组播路由信息2可参见图24A中的(d)。
需要说明的是,由于节点C的组播路由信息被实体C处理了,因此,在发送组播报文F之前,实体C将节点D1的组播路由标识1更新为节点D1的组播路由标识2。
78)实体D接收组播报文F,确定组播报文F中的节点D1的组播路由标识2(即1000001)中的第1个比特的值为1,则根据节点D1的组播路由标识2中的后6个比特查找组播转发表1(参见表24),确定6个比特中值为1的比特对应实体E,则向实体E发送组播报文F。
表24
表索引 下一跳的地址
0(对应第1个比特) 实体C的地址
1(对应第2个比特) 实体C的地址
2(对应第3个比特) 实体C的地址
3(对应第4个比特) 实体C的地址
4(对应第5个比特) 实体C的地址
5(对应第6个比特) 实体E的地址
79)实体E接收组播报文F,确定组播报文F中的节点D1的组播路由标识2(即1000001)中的第1个比特的值为1,则根据节点D1的组播路由标识2中的后6个比特查找组播转发表1(参见表25),确定这6个比特中值为1的比特对应自身(即实体E),获取这6个比特中第1个值为1的比特(即第6个比特)对应的节点(即节点E)的组播路由信息,确定节点E的组播路由标识(即0110)中的第1个比特的值为0,则根据节点E的组播路由标识中的后3个比特查找组播转发表2(参见上述表15),确定3个比特中值为1的比特对应实体U和实体V,向实体U和实体V发送单播报文G,单播报文G中包括组播报文A中的数据。
表25
表索引 下一跳的地址
0(对应第1个比特) 实体D的地址
1(对应第2个比特) 实体D的地址
2(对应第3个比特) 实体D的地址
3(对应第4个比特) 实体D的地址
4(对应第5个比特) 实体D的地址
5(对应第6个比特) 实体E的地址
示例2
基于图1B中的(a)所示的部分实体的拓扑连接和组播树。其中,实体A、实体B、实体C、实体D和实体E组成节点Z,实体E还组成节点E。示例2中均以组播路由标识为比特序列为例对图20所示的实施例进行示例性说明,其中,比特序列中的比特与第一节点集合中的节点一一对应,比特序列中的一个比特的值为1时,表示该比特对应的节点为节点Z的子节点。每个节点中可以静态维护节点Z的组播路由标识的长度。
在图1B中的(a)中,节点Z对应的第一节点集合为{节点Q、节点R、节点E、节点V}。其中,节点R、节点E、节点V为节点Z的子节点。由于节点3和实体A 具有拓扑连接,因此,节点3向节点Z发送的组播报文A(组播报文A中的节点Z的组播路由信息可参见图24B中的(a)),由节点Z中的实体A接收。组播报文A中的节点Z的组播路由信息中包括1个非叶子子节点(即节点E)的组播路由信息。实体A、实体B、实体C、实体D、实体E中存储有组播转发表1,组播转发表1为节点Z对应的组播转发表。实体E中还存储有组播转发表2,组播转发表2为节点E对应的组播转发表。节点Z的组播路由标识以及由其衍生的组播路由标识、节点E的组播路由标识中均包括组播转发表标识字段,该字段为这些组播路由标识中的第1个比特,该比特值为1表示查找组播转发表1,该比特值为0表示查找组播转发表2。
节点Z中的各个实体发送组播报文的流程如下:
81)实体A接收组播报文A,确定组播报文A中的节点Z的组播路由标识(即10111)中的第1个比特的值为1,则根据节点Z的组播路由标识中的后4个比特查找组播转发表1(参见表26),确定这4个比特中第1个和第2个值为1的比特(即第2个和第3个比特)对应实体C,第3个值为1的比特(即第4个比特)对应实体B。
表26
表索引 下一跳的地址
0(对应第1个比特) 实体C的地址
1(对应第2个比特) 实体C的地址
2(对应第3个比特) 实体C的地址
3(对应第4个比特) 实体B的地址
82)实体A向实体B发送组播报文B,向实体C发送组播报文C。组播报文B中包括节点Z的组播路由标识1(即10001),组播报文B中的节点Z的组播路由信息1可参见图24B中的(b)。组播报文C中包括节点Z的组播路由标识2(即10110)和节点E的组播路由信息,组播报文C中的节点Z的组播路由信息2可参见图24B中的(c)。
其中,由于实体B不处理节点Z的组播路由标识中的后4个比特中的第2个和第3个比特,因此,在发送组播报文B之前,实体A可以将节点Z的组播路由标识更新为节点Z的组播路由标识1。由于实体C不处理节点Z的组播路由标识中的后4个比特中的第4个比特,因此,在发送组播报文C之前,实体A可以将节点Z的组播路由标识更新为节点Z的组播路由标识2。
83)实体B接收组播报文B,确定组播报文B中的节点Z的组播路由标识1(即10001)中的第1个比特的值为1,则根据节点Z的组播路由标识1中的后4个比特查找组播转发表1(参见表27),确定这4个比特中第1个值为1的比特(即第4个比特)对应实体D,向实体D发送组播报文B。实体D接收组播报文B,确定组播报文B中的节点Z的组播路由标识1(即10001)中的第1个比特的值为1,则根据节点Z的组播路由标识1中的后4个比特查找组播转发表1(参见表28),确定这4个比特中第1个值为1的比特(即第4个比特)对应实体V,向实体V发送单播报文D,单播报文D中包括组播报文A中的数据。
表27
表索引 下一跳的地址
0(对应第1个比特) 实体C的地址
1(对应第2个比特) 实体C的地址
2(对应第3个比特) 实体C的地址
3(对应第4个比特) 实体D的地址
表28
表索引 下一跳的地址
0(对应第1个比特) 实体B的地址
1(对应第2个比特) 实体B的地址
2(对应第3个比特) 实体E的地址
3(对应第4个比特) 实体V的地址
84)实体C接收组播报文C,确定组播报文C中的节点Z的组播路由标识2(即10110)中的第1个比特的值为1,则根据节点Z的组播路由标识2中的后4个比特查找组播转发表1(参见表29),确定4个比特中第1个值为1的比特(即第2个比特)对应实体R,向实体R发送单播报文E,单播报文E中包括组播报文A中的数据,第2个值为1的比特(即第3个比特)对应实体E,向实体E发送组播报文F。组播报文F中包括节点Z的组播路由标识3(即10010)。
需要说明的是,由于实体C在发送组播报文F之前,由于已经处理了节点Z的组播路由标识2中的后4个比特中的第2个比特,因此,将节点Z的组播路由标识2更新为节点Z的组播路由标识3。
表29
表索引 下一跳的地址
0(对应第1个比特) 实体Q的地址
1(对应第2个比特) 实体R的地址
2(对应第3个比特) 实体E的地址
3(对应第4个比特) 实体B的地址
85)实体E接收组播报文F,确定组播报文F中的节点Z的组播路由标识3(即10010)中的第1个比特的值为1,则根据节点Z的组播路由标识3中的后4个比特查找组播转发表1(参见表30),确定4个比特中值为1的比特(即第3个比特)对应自身(即实体E),获取节点E的组播路由信息,确定节点E的组播路由标识(即011)中的第1个比特的值为0,则根据节点E的组播路由标识中的后2个比特查找组播转发表2(参见表31),得到实体S和实体T,向实体S和实体T发送单播报文G,单播报文G中包括组播报文A中的数据。
表30
表索引 下一跳的地址
0(对应第1个比特) 实体C的地址
1(对应第2个比特) 实体C的地址
2(对应第3个比特) 实体E的地址
3(对应第4个比特) 实体D的地址
表31
表索引 下一跳的地址
0(对应第1个比特) 实体S的地址
1(对应第2个比特) 实体T的地址
示例3
基于图1B中的(b)所示的部分实体的拓扑连接和组播树。其中,实体A、实体B、实体C、实体D和实体E组成节点Z,实体A和实体B还组成实体X,实体E还组成节点E。示例3中均以组播路由标识为比特序列为例对图20所示的实施例进行示例性说明,其中,比特序列中的比特与第一节点集合中的节点一一对应,比特序列中的一个比特的值为1时,表示该比特对应的节点为节点Z的子节点。每个节点中可以静态维护节点Z的组播路由标识的长度。
在图1B中的(b)中,节点Z对应的第一节点集合为{节点X、节点Q、节点R、节点E、节点V}。其中,节点X、节点R、节点E、节点V为节点Z的子节点。由于节点3和实体A具有拓扑连接,因此,节点3向节点Z发送的组播报文A(组播报文A中的节点Z的组播路由信息可参见图24C中的(a)),由节点Z中的实体A接收。组播报文A中的节点Z的组播路由信息中包括2个非叶子子节点(即节点X和节点E)的组播路由信息。实体A、实体B、实体C、实体D、实体E中存储有组播转发表1,组播转发表1为节点Z对应的组播转发表。实体A和实体B中还存储有组播转发表2,实体A和实体B中的组播转发表2为节点X对应的组播转发表。实体E中还存储有组播转发表2,实体E中的组播转发表2为节点E对应的组播转发表。节点Z的组播路由标识以及由其衍生的组播路由标识、节点X的组播路由标识、节点E的组播路由标识中均包括组播转发表标识字段,该字段为这些组播路由标识中的第1个比特,该比特值为1表示查找组播转发表1,该比特值为0表示查找组播转发表2。
节点Z中的各个实体发送组播报文的流程如下:
91)实体A接收组播报文A,确定组播报文A中的节点Z的组播路由标识(即110111)中的第1个比特的值为1,则根据节点Z的组播路由标识中的后5个比特查找组播转发表1(参见表32),确定这5个比特中第1个值为1的比特(即第1个比特)对应自身(即实体A),第2个值为1的比特(即第3个比特)和第3个值为1的比特(即第4个比特)对应实体C,第4个值为1的比特(即第5个比特)对应实体B。
表32
表索引 下一跳的地址
0(对应第1个比特) 实体A的地址
1(对应第2个比特) 实体C的地址
2(对应第3个比特) 实体C的地址
3(对应第4个比特) 实体C的地址
4(对应第5个比特) 实体B的地址
92)实体A查找到自身(即实体A)之后,获取这5个比特中第1个值为1的比特(即第1个比特)对应的节点(即节点X)的组播路由信息,根据节点X的组播路由标识(即1)查找组播转发表(参见表33),确定实体O,向实体O发送单播报文H,单播报文H中包括组播报文A中的数据。
表33
表索引 下一跳的地址
0(对应第1个比特) 实体O的地址
93)实体A向实体B发送组播报文B,向实体C发送组播报文C。组播报文B中包括节点Z的组播路由标识1(即100001),组播报文B中的节点Z的组播路由信息1可参见图24C中的(b)。组播报文C中包括节点Z的组播路由标识2(即100110)和节点E的组播路由信息,组播报文C中的节点Z的组播路由信息2可参见图24C中的(c)。
其中,由于实体B不处理节点Z的组播路由标识中的后5个比特中的第3个和第4个比特,因此,在发送组播报文B之前,实体A可以将节点Z的组播路由标识更新为节点Z的组播路由标识1。由于实体C不处理节点Z的组播路由标识中的后5个比特中的第5个比特,因此,在发送组播报文C之前,实体A可以将节点Z的组播路由标识更新为节点Z的组播路由标识2。
94)实体B接收组播报文B,确定组播报文B中的节点Z的组播路由标识1(即100001)中的第1个比特的值为1,则根据节点Z的组播路由标识1中的后5个比特查找组播转发表1(参见表34),确定这5个比特中第1个值为1的比特(即第5个比特)对应实体D,向实体D发送组播报文B。实体D接收组播报文B,确定组播报文B中的节点Z的组播路由标识1(即100001)中的第1个比特的值为1,则根据节点Z的组播路由标识1中的后5个比特查找组播转发表1(参见表35),确定这5个比特中第1个值为1的比特(即第5个比特)对应实体V,向实体V发送单播报文D,单播报文D中包括组播报文A中的数据。
表34
表索引 下一跳的地址
0(对应第1个比特) 实体B的地址
1(对应第2个比特) 实体C的地址
2(对应第3个比特) 实体C的地址
3(对应第4个比特) 实体C的地址
4(对应第5个比特) 实体D的地址
表35
表索引 下一跳的地址
0(对应第1个比特) 实体B的地址
1(对应第2个比特) 实体B的地址
2(对应第3个比特) 实体B的地址
3(对应第4个比特) 实体E的地址
4(对应第5个比特) 实体V的地址
95)实体C接收组播报文C,确定组播报文C中的节点Z的组播路由标识2(即100110)中的第1个比特的值为1,则根据节点Z的组播路由标识2中的后5个比特查找组播转发表1(参见表36),确定这5个比特中第1个值为1的比特(即第3个比特)对应实体R,向实体R发送单播报文E,单播报文E中包括组播报文A中的数据,第2个值为1的比特(即第4个比特)对应实体E,向实体E发送组播报文F。组播报文F中包括节点Z的组播路由标识3(即100010)。
需要说明的是,由于实体C在发送组播报文F之前,由于已经处理了节点Z的组播路由标识2中的后5个比特中的第3个比特,因此,将节点Z的组播路由标识2更新为节点Z的组播路由标识3。
表36
表索引 下一跳的地址
0(对应第1个比特) 实体A的地址
1(对应第2个比特) 实体Q的地址
2(对应第3个比特) 实体R的地址
3(对应第4个比特) 实体E的地址
4(对应第5个比特) 实体B的地址
96)实体E接收组播报文F,确定组播报文F中的节点Z的组播路由标识3(即100010)中的第1个比特的值为1,则根据节点Z的组播路由标识3中的后5个比特查找组播转发表1(参见表37),确定这5个比特中值为1的比特(即第4个比特)对应自身(即实体E),获取节点Z的组播路由标识3中的后5个比特中的第4个比特对应的节点(即节点E)的组播路由信息,确定节点E的组播路由标识(即011)中的第1个比特的值为0,则根据节点E的组播路由标识中的后2个比特查找组播转发表2(参见表38),得到实体S和实体T,向实体S和实体T发送单播报文G,单播报文G中包括组播报文A中的数据。
表37
表索引 下一跳的地址
0(对应第1个比特) 实体C的地址
1(对应第2个比特) 实体C的地址
2(对应第3个比特) 实体C的地址
3(对应第4个比特) 实体E的地址
4(对应第5个比特) 实体D的地址
表38
表索引 下一跳的地址
0(对应第1个比特) 实体S的地址
1(对应第2个比特) 实体T的地址
本申请上述实施例提供的方法,相比PIM-SM具有以下好处:
1、节点中的组播转发表的表项个数不会随着组播流个数的增加而增加,因此,即使组播流个数较多,也不需要在路由器中扩展更多的表空间来支持组播报文的转发,因此,可扩展性较好。
2、组播报文是从源节点生成的,并且,组播报文中包括非叶子子节点的组播路由信息,因此,可以通过调整组播报文,主动控制转发路径。例如,如果有多条路径,控制器或源节点可以通过控制面算法选择最优的路径。
3、组播报文是从源节点生成的,因此,节点加入或离开组播树,源节点均是可以获知的,可管理性较高。例如,源节点可以通过应用层采集到用户的偏好,根据这些偏好调整组播报文中的数据。
4、节点不需要发送加入信令,因此,节点不需要处理大量的周期性信令,避免增加节点的计算负载、功耗以及处理资源。
本申请上述实施例提供的方法,相比BIER具有以下好处:
1、组播报文中包括非叶子子节点的组播路由信息,非叶子子节点可以根据自身的组播路由信息进行组播报文的转发,因此,报文份数不会过多,组播效率较高。
2、组播报文是从源节点生成的,并且,组播报文中包括非叶子子节点的组播路由信息,因此,可以通过调整组播报文,主动控制转发路径。例如,如果有多条路径,控制器或源节点可以通过控制面算法选择最优的路径。
为了使得本申请实施例更加的清楚,以下通过实施例1、实施例2和实施例3对上述实施例提供的方法作示例性说明。其中,实施例1中以组播树为图25所示的组播树、且节点的组播路由标识通过上述方式21实现为例对上述实施例提供的方法作示例性说明。实施例2中以组播树为图25所示的组播树、且节点的组播路由标识通过上述方式22实现为例对上述实施例提供的方法作示例性说明。实施例3中以组播树为图28所示的组播树、且节点的组播路由标识通过上述方式22实现为例对上述实施例提供的方法作示例性说明。
实施例1
在图25所示的组播树中,节点B对应的第一节点集合中包括2个节点(即节点1和节点R),则节点B的Idx字段的位宽为1,节点B有1个子节点(即节点R),节点R的索引为1,因此,节点B的组播路由标识中的Cnt字段的值为1,Idx字段有一个,值也为1。节点R对应的第一节点集合中包括3个节点(即节点B、节点S和节点E),则节点R的Idx字段的位宽为2,节点R有2个子节点,分别为节点S和节点E,节点S和节点E的索引分别为1和2,因此,节点B的组播路由标识中的Cnt字段的值为2,Idx字段有2个,2个Idx字段的值分别为1和2。节点S对应的第一节点集合中包括3个节点(即节点R、节点C和节点D),则节点S的Idx字段的位宽为2,节点S有2个子节点,分别为节点C和节点D,节点C和节点D的索引分别为1和2,因此,节点S的组播路由标识中的Cnt字段的值为2,Idx字段有2个,2个Idx字段的值分别为1和2。节点C对应的第一节点集合中包括2个节点(即节点S和节点2),则节点C的Idx字段的位宽为1,节点C有1个子节点,该子节点为节点2,节点2的索引为1,因此,节点C的组播路由标识中的Cnt字段的值为1,Idx字段有一个,值为1。节点D对应的第一节点集合中包括2个节点(即节点S和节点3),则节点D的Idx字段的位宽为1,节点D有1个子节点,该子节点为节点3,节点3的索引为1,因此,节点D的组播路由标识中的Cnt字段的值为1,Idx字段有一个,值为1。节点E对应的第一节点集合中包括2个节点(即节点R和节点4),则 节点E的Idx字段的位宽为1,节点E有1个子节点,该子节点为节点4,节点4的索引为1,因此,节点E的组播路由标识中的Cnt字段的值为1,Idx字段有一个,值为1。假设第一字段和Cnt字段的位宽为1字节,则节点1发送给节点B的组播报文(记为组播报文1)可参见图26中的(a)。图26中的(a)、图26中的(b)、图26中的(c)、图26中的(d)、图26中的(e)中,“:”之前的C表示Cnt字段,“:”之前的I0表示第一个Idx字段,“:”之前的I1表示第二个Idx字段,“:”之前的Ls是指节点S的组播路由信息的长度,“:”之后的值表示该字段的值,Ls的位宽为1字节。
需要说明的是,由于节点B只有一棵子树,也就是说,节点B只有一个非叶子子节点,该非叶子子节点的组播路由信息的位置可以通过第一字段指示的长度和其他字段的长度计算得到,因此,组播报文1中可以不携带节点B的寻址字段。基于节点B接收到的组播报文1,组播树中的各个节点发送组播报文的过程如下:
101)节点B解析组播报文1,根据第一字段的长度和Cnt字段的长度确定Cnt字段的位置(节点B的组播信息中的第9-16个比特),根据该位置上的值确定Cnt字段的值为1,则获知后续有1个Idx字段(也就是节点B有一个子节点),根据Idx字段的长度确定Idx字段的位置(节点B的组播信息中的第17个比特),根据该位置上的值确定Idx字段的值为1,在节点B的组播转发表(参见下文中的表39)中查找Idx字段的值对应的下一跳的地址,得到节点R的地址。根据第一字段的长度和节点B的组播路由标识的长度,以及第一字段指示的节点B的组播路由信息的总长度确定组播报文1中节点R的组播路由信息的位置(节点B的组播信息中的第18-76个比特),根据该位置提取出节点R的组播路由信息,并进行组播封装得到组播报文2,向节点R发送组播报文2。组播报文2中节点R的组播信息的结构可参见图26中的(b),其中,节点R的组播路由信息的长度为59,因此,节点B在封装组播报文2时,可以添加第一字段和第二字段,第一字段的值为59,第二字段的长度为5比特。组播报文2中还可以包括单播封装,单播封装中的源地址为节点B的地址,目的地址为节点R的地址。
表39:节点B的组播转发表
节点索引 下一跳地址
0 节点1的地址
1 节点R的地址
需要说明的是,由于节点R有2棵子树,也就是说,节点R有2个非叶子子节点,其中一个非叶子子节点的组播路由信息的位置可以通过组播报文2中的节点R的寻址字段指示,另一个非叶子子节点的组播路由信息的位置可以根据组播报文2中的第一字段指示的长度、节点R的寻址字段指示的长度和其他字段的长度计算得到。
102)节点R接收并解析组播报文2,根据第一字段的长度和Cnt字段的长度确定Cnt字段的位置(节点R的组播信息中的第9-16个比特),根据该位置上的值确定Cnt字段的值为2,则获知后续有2个Idx字段(也就是节点R有2个子节点),根据Idx字段的长度确定2个Idx字段的位置(第1个Idx字段的位置为节点R的组播信息中的第17-18个比特,第2个Idx字段的位置为节点R的组播信息中的第19-20个比特),根据该位置上的值确定第1个Idx字段的值为1,第2个Idx字段的值为2,在节点R的组播转发表(参见下文中的表40)中查找Idx字段的值对应的下一跳的地址,得到节点S和节点E的地址。
表40:节点R的组播转发表
节点索引 下一跳地址
0 节点B的地址
1 节点S的地址
2 节点E的地址
103)节点R根据第一字段的长度、节点R的组播路由标识的长度、节点R的寻址字段的长度、节点R的寻址字段指示的节点S的组播路由信息的长度以及第一字段指示的节点R的组播路由信息的总长度,确定组播报文2中节点S的组播路由信息的位置(节点R的组播信息中的第29-58个比特),根据该位置提取出节点S的组播路由信息,并进行组播封装得到组播报文3,向节点S发送组播报文3。组播报文3中节点S的组播信息的结构可参见图26中的(c),其中,节点S的组播路由信息的长度为30,因此,节点R在封装组播报文3时,可以添加第一字段和第二字段,第一字段的值为30,第二字段的长度为2比特。组播报文3中还可以包括单播封装,单播封装中的源地址为节点R的地址,目的地址为节点S的地址。
需要说明的是,节点C只有节点2一个子节点并且节点2为叶子节点,节点D只有节点3一个子节点并且节点3为叶子节点,此时,节点C和节点D的Idx字段的个数不会变化,均为1,因此,节点S中可以静态维护节点C和节点D的Idx字段的长度,此时,组播报文3中可以不包括节点S的寻址字段。
104)节点R根据第一字段的长度、节点R的组播路由标识的长度、节点R的寻址字段的长度、节点R的寻址字段指示的节点S的组播路由信息的长度以及第一字段指示的节点R的组播路由信息的总长度,确定组播报文2中节点E的组播路由信息的位置(节点R的组播信息中的第59-67个比特),根据该位置提取出节点E的组播路由信息,并进行组播封装得到组播报文4,向节点E发送组播报文4。组播报文4中节点E的组播信息的结构可参见图26中的(d),其中,节点E的组播路由信息的长度为9,因此,节点R在封装组播报文4时,可以添加第一字段和第二字段,第一字段的值为9,第二字段的长度为7比特。组播报文4中还可以包括单播封装,单播封装中的源地址为节点R的地址,目的地址为节点E的地址。
105)节点S接收并解析组播报文3,根据第一字段的长度和Cnt字段的长度确定Cnt字段的位置(节点S的组播信息中的第9-16个比特),根据该位置上的值确定Cnt字段的值为2,则获知后续有2个Idx字段(也就是节点S有2个子节点),根据Idx字段的长度确定2个Idx字段的位置(第1个Idx字段的位置为节点S的组播信息中的第17-18个比特,第2个Idx字段的位置为节点S的组播信息中的第19-20个比特),根据该位置上的值确定第1个Idx字段的值为1,第2个Idx字段的值为2,在节点S的组播转发表(参见下文中的表41)中查找Idx字段的值对应的下一跳的地址,得到节点C和节点D的地址。
表41:节点S的组播转发表
节点索引 下一跳地址
0 节点R的地址
1 节点C的地址
2 节点D的地址
106)节点S根据第一字段的长度、节点S的组播路由标识的长度、以及静态维护的节点C的组播路由信息的长度(即9),确定组播报文3中节点C的组播路由信息的位置(节点S的组播信息中的第21-29个比特),根据该位置提取出节点C的组播路由信息,并进行组播封装得到组播报文5,向节点C发送组播报文5。组播报文5中节点C的组播信息的结构可参见图26中的(e),其中,节点C的组播路由信息的长度为9,因此,节点S在封装组播报文5时,可以添加第一字段和第二字段,第一字段的值为9,第二字段的长度为7比特。组播报文5中还可以包括单播封装,单播封装中的源地址为节点S的地址,目的地址为节点C的地址。
107)节点S根据第一字段的长度、节点S的组播路由标识的长度、静态维护的节点C的组播路由信息的长度(即9)、以及第一字段指示的节点S的组播路由信息的总长度,确定组播报文3中节点D的组播路由信息的位置(节点S的组播信息中的第30-38个比特),根据该位置提取出节点D的组播路由信息,并进行组播封装得到组播报文6,向节点D发送组播报文6。组播报文6中节点D的组播信息的结构与节点C的组播路由信息的结构类似,可参考进行理解,不再赘述。
108)节点C接收并解析组播报文5,根据第一字段的长度和Cnt字段的长度确定Cnt字段的位置(节点C的组播信息中的第9-16个比特),根据该位置上的值确定Cnt字段的值为1,则获知后续有1个Idx字段(也就是节点C有1个子节点),根据Idx字段的长度确定Idx字段的位置(节点C的组播信息中的第17个比特),根据该位置上的值确定Idx字段的值为1,在节点C的组播转发表(参见下文中的表42)中查找Idx字段的值对应的下一跳的地址,得到节点2的地址,向节点2发送单播报文6,单播报文6中包括组播报文1中的数据。
表42:节点C的组播转发表
节点索引 下一跳地址
0 节点S的地址
1 节点2的地址
节点D、节点E和节点C的组播报文处理过程类似,可参考进行理解,不再赘述。
实施例2
在图25所示的组播树中,节点B对应的第一节点集合中包括2个节点(即节点1和节点R),则节点B的比特序列的位宽为2,第1个比特与节点1对应,第2个比特与节点R对应,节点R为节点B的子节点,因此,2个比特的值为01。节点R对应的第一节点集合中包括3个节点(即节点B、节点S和节点E),则节点R的比特序列的位宽为3,第1个比特与节点B对应,第2个比特与节点S对应,第3个比特与节点E对应,节点S和节点E为节点R的子节点,因此,3个比特的值为011。节点S对应的第一节点集合中包括3个节点(即节点R、节点C和节点D),则节点S的比特序列的位宽为3,第1个比特与节点R对应,第2个比特与节点C对应,第3个比特与节点D对应,节点C和节点D为节点S的子节点,因此,3个比特的值为011。节点C对应的第一节点集合中包括2个节点(即节点S和节点2),则节点C的比特序列的位宽为2,第1个比特与节点S对应,第2个比特与节点2对应,节点2为节点C的子节点,因此,2个比特的值为01。节点D对应的第一节点集合中包括2个节 点(即节点S和节点3),则节点D的比特序列的位宽为2,第1个比特与节点S对应,第2个比特与节点3对应,节点3为节点D的子节点,因此,2个比特的值为01。节点E对应的第一节点集合中包括2个节点(即节点R和节点4),则节点E的比特序列的位宽为2,第1个比特与节点R对应,第2个比特与节点4对应,节点4为节点E的子节点,因此,2个比特的值为01。假设第一字段的位宽为1字节,则节点1发送给节点B的组播报文(记为组播报文1)可参见图27中的(a)。图27中的(a)、图27中的(b)、图27中的(c)、图27中的(d)、图27中的(e)中,除第一字段、第二字段和节点R的寻址字段之外,“:”之前的字母表示该字段对应的节点,“:”之后的值表示该字段对应的比特序列;节点R的寻址字段中的“:”之前的Ls是指节点S的组播路由信息的长度,“:”之后的值表示该字段的值,Ls的位宽为1字节。
需要说明的是,由于节点B只有一棵子树,也就是说,节点B只有一个非叶子子节点,该非叶子子节点的组播路由信息的位置可以通过第一字段指示的长度和其他字段的长度计算得到,因此,组播报文1中可以不携带节点B的寻址字段。基于节点B接收到的组播报文1,组播树中的各个节点发送组播报文的过程如下:
111)节点B解析组播报文1,根据第一字段的长度和比特序列的长度确定比特序列的位置(节点B的组播信息中的第9-10个比特),根据该位置确定比特序列的值为01,则在节点B的组播转发表(参见下文中的表43)中查找不为0的比特(即第二个比特)的值对应的下一跳的地址,得到节点R的地址。根据第一字段的长度和节点B的组播路由标识的长度,以及第一字段指示的节点B的组播路由信息的总长度确定组播报文1中节点R的组播路由信息的位置(节点B的组播信息中的第11-30个比特),根据该位置提取出节点R的组播路由信息,并进行组播封装得到组播报文2,向节点R发送组播报文2。组播报文2中节点R的组播信息的结构可参见图27中的(b),其中,节点R的组播路由信息的长度为20,因此,节点B在封装组播报文2时,可以添加第一字段和第二字段,第一字段的值为20,第二字段的长度为4比特。组播报文2中还可以包括单播封装,单播封装中的源地址为节点B的地址,目的地址为节点R的地址。
表43:节点B的组播转发表
Figure PCTCN2022076838-appb-000012
需要说明的是,由于节点R有2棵子树,也就是说,节点R有2个非叶子子节点,其中一个非叶子子节点的组播路由信息的位置可以通过组播报文2中的节点R的寻址字段指示,另一个非叶子子节点的组播路由信息的位置可以根据组播报文2中的第一字段指示的长度、节点R的寻址字段指示的长度和其他字段的长度计算得到。
112)节点R接收并解析组播报文2,根据第一字段的长度和比特序列的长度确定比特序列的位置(节点R的组播信息中的第9-11个比特),根据该位置确定比特序列的值为011,则在节点R的组播转发表(参见下文中的表44)中查找不为0的比特(即第二个比特和第三个比特)对应的下一跳的地址,得到节点S和节点E的地址。
表44:节点R的组播转发表
比特序列中的比特 下一跳地址
第1个 节点B的地址
第2个 节点S的地址
第3个 节点E的地址
113)节点R根据第一字段的长度、节点R的组播路由标识的长度、节点R的寻址字段的长度、节点R的寻址字段指示的节点S的组播路由信息的长度以及第一字段指示的节点R的组播路由信息的总长度,确定组播报文2中节点S的组播路由信息的位置(节点R的组播信息中的第20-26个比特),根据该位置提取出节点S的组播路由信息,并进行组播封装得到组播报文3,向节点S发送组播报文3。组播报文3中节点S的组播信息的结构可参见图27中的(c),其中,节点S的组播路由信息的长度为7,因此,节点R在封装组播报文3时,可以添加第一字段和第二字段,第一字段的值为7,第二字段的长度为1比特。组播报文3中还可以包括单播封装,单播封装中的源地址为节点R的地址,目的地址为节点S的地址。
需要说明的是,节点C和节点D对应的第一节点集合中只有2个节点并且其中一个为叶子节点,因此,节点C和节点D的组播路由标识的位宽不会变化,均为2,因此,节点S中可以静态维护节点C和节点D的组播路由标识的位宽,此时,组播报文3中可以不包括节点S的寻址字段。
114)节点R根据第一字段的长度、节点R的组播路由标识的长度、节点R的寻址字段的长度、节点R的寻址字段指示的节点S的组播路由信息的长度以及第一字段指示的节点R的组播路由信息的总长度,确定组播报文2中节点E的组播路由信息的位置(节点R的组播信息中的第27-28个比特),根据该位置提取出节点E的组播路由信息,并进行组播封装得到组播报文4,向节点E发送组播报文4。组播报文4中节点E的组播信息的结构可参见图27中的(d),其中,节点E的组播路由信息的长度为2,因此,节点R在封装组播报文4时,可以添加第一字段和第二字段,第一字段的值为2,第二字段的长度为6比特。组播报文4中还可以包括单播封装,单播封装中的源地址为节点R的地址,目的地址为节点E的地址。
115)节点S接收并解析组播报文3,根据第一字段的长度和比特序列的长度确定比特序列的位置(节点S的组播信息中的第9-11个比特),根据该位置确定比特序列的值为011,则在节点S的组播转发表(参见下文中的表45)中查找不为0的比特(即第二个比特和第三个比特)对应的下一跳的地址,得到节点C和节点D的地址。
表45:节点S的组播转发表
比特序列中的比特 下一跳地址
第1个 节点R的地址
第2个 节点C的地址
第3个 节点D的地址
116)节点S根据第一字段的长度、节点S的组播路由标识的长度、以及第一字段指示的节点S的组播路由信息的总长度,确定组播报文3中节点C的组播路由信息的位置(节点S的组播信息中的第12-13个比特),根据该位置提取出节点C的组播路由信息, 并进行组播封装得到组播报文5,向节点C发送组播报文5。组播报文5中节点C的组播信息的结构可参见图27中的(e),其中,节点C的组播路由信息的长度为2,因此,节点S在封装组播报文5时,可以添加第一字段和第二字段,第一字段的值为2,第二字段的长度为6比特。组播报文5中还可以包括单播封装,单播封装中的源地址为节点S的地址,目的地址为节点C的地址。
117)节点S根据第一字段的长度、节点S的组播路由标识的长度、以及第一字段指示的节点S的组播路由信息的总长度,确定组播报文3中节点D的组播路由信息的位置(节点S的组播信息中的第14-15个比特),根据该位置提取出节点D的组播路由信息,并进行组播封装得到组播报文6,向节点D发送组播报文6。组播报文6中节点D的组播信息的结构与节点C的组播路由信息的结构类似,可参考进行理解,不再赘述。
118)节点C接收并解析组播报文5,根据第一字段的长度和比特序列的长度确定比特序列的位置(节点C的组播信息中的第9-10个比特),根据该位置确定比特序列的值为01,则在节点C的组播转发表(参见下文中的表46)中查找不为0的比特(即第二个比特)对应的下一跳的地址,得到节点2的地址,向节点2发送单播报文6,单播报文6中包括组播报文1中的数据。
表46:节点C的组播转发表
比特序列中的比特 下一跳地址
第1个 节点S的地址
第2个 节点2的地址
节点D、节点E和节点C的组播报文处理过程类似,可参考进行理解,不再赘述。
实施例3
在图28中的(a)所示的组播树中,组播源是节点1,组播目的节点包括:节点O、节点Q、节点S、节点X、节点Y、节点U、节点V、节点G、节点H。实体A、实体B、实体C、实体D和实体E组成节点D1,节点D1中的实体之间、以及节点D1中的实体与节点D1之外的其他实体之间的拓扑连接可参见图21。实体F、实体G和实体H组成节点D2,节点D2中的实体之间的拓扑连接可参见图28中的(b),节点D2中的实体F与节点5具有拓扑连接。
节点3对应的第一节点集合中包括2个节点(即节点1和节点5),则节点3的比特序列的位宽为2,第1个比特与节点1对应,第2个比特与节点5对应,节点5为节点3的子节点,因此,2个比特的值为01。
节点5对应的第一节点集合中包括3个节点(即节点3、节点D1和节点D2),则节点5的比特序列的位宽为3,第1个比特与节点3对应,第2个比特与节点D1对应,第3个比特与节点D2对应,节点D1和节点D2为节点5的子节点,因此,3个比特的值为011。
节点D1对应的第一节点集合中包括5个节点(即节点A、节点B、节点C、节点D和节点E),则节点D1的比特序列的位宽为5,从前至后的5个比特分别与节点A、节点B、节点C、节点D和节点E对应,节点A、节点C和节点E为节点D1的子节点,因此,5个比特的值为10101。
节点A对应的第一节点集合中包括3个节点(即节点O、节点P和节点Q),则节点A的比特序列的位宽为3,第1个比特与节点O对应,第2个比特与节点P对应,第3个比 特与节点Q对应,节点O和节点Q为节点A的子节点,因此,3个比特的值为101。
节点C对应的第一节点集合中包括3个节点(即节点R、节点S和节点T),则节点C的比特序列的位宽为3,第1个比特与节点R对应,第2个比特与节点S对应,第3个比特与节点T对应,节点S和节点T为节点C的子节点,因此,3个比特的值为011。
节点T对应的第一节点集合中包括3个节点(即节点X、节点Y和节点Z),则节点T的比特序列的位宽为3,第1个比特与节点X对应,第2个比特与节点Y对应,第3个比特与节点Z对应,节点X和节点Y为节点T的子节点,因此,3个比特的值为110。
节点E对应的第一节点集合中包括3个节点(即节点U、节点V和节点W),则节点E的比特序列的位宽为3,第1个比特与节点U对应,第2个比特与节点V对应,第3个比特与节点W对应,节点U和节点V为节点E的子节点,因此,3个比特的值为110。
节点D2对应的第一节点集合中包括3个节点(即节点F、节点G和节点H),则节点D2的比特序列的位宽为3,第1个比特与节点F对应,第2个比特与节点G对应,第3个比特与节点H对应,节点G和节点H为节点D2的子节点,因此,3个比特的值为011。
假设第一字段的位宽为1字节,则节点1发送给节点B的组播报文(记为组播报文1)可参见图29中的(a)。图29中的(a)、图29中的(b)、图29中的(c)、图29中的(d)中,除第一字段、第二字段、节点5的寻址字段和节点D1的寻址字段之外,“:”之前的字母表示该字段对应的节点,“:”之后的值表示该字段对应的比特序列;节点5的寻址字段中的“:”之前的L D1是指节点D1的组播路由信息的长度,“:”之后的值表示该字段的值,L D1的位宽为1字节;节点D1的寻址字段中的“:”之前的L C是指节点C的寻址字段,“:”之后的值表示该字段的值,L C的位宽为1字节。
需要说明的是,由于节点3只有一棵子树,也就是说,节点3只有一个非叶子子节点,该非叶子子节点的组播路由信息的位置可以通过第一字段指示的长度和其他字段的长度计算得到,因此,组播报文1中可以不携带节点3的寻址字段。基于节点1生成的组播报文1,组播树中的各个节点发送组播报文的过程如下:
121)节点1向节点3发送组播报文1,节点3接收并解析组播报文1,根据第一字段的长度和比特序列的长度确定比特序列的位置(节点3的组播信息中的第9-10个比特),根据该位置确定比特序列的值为01,则在节点3的组播转发表(参见下文中的表47)中查找不为0的比特(即第二个比特)的值对应的下一跳的地址,得到节点5的地址。根据第一字段的长度和节点3的比特序列的长度,以及第一字段指示的节点3的组播路由信息的总长度确定组播报文1中节点5的组播路由信息的位置(节点3的组播信息中的第11-53个比特),根据该位置提取出节点5的组播路由信息,并进行组播封装得到组播报文2,向节点5发送组播报文2。组播报文2中节点5的组播信息的结构可参见图29中的(b),其中,节点5的组播路由信息的长度为43,因此,节点3在封装组播报文2时,可以添加第一字段和第二字段,第一字段的值为43,第二字段的长度为5比特。组播报文2中还可以包括单播封装,单播封装中的源地址为节点3的地址,目的地址为节点5的地址。
表47:节点3的组播转发表
Figure PCTCN2022076838-appb-000013
Figure PCTCN2022076838-appb-000014
122)节点5接收并解析组播报文2,根据第一字段的长度和比特序列的长度确定比特序列的位置(节点5的组播信息中的第9-11个比特),根据该位置确定比特序列的值为011,则在节点5的组播转发表(参见下文中的表48)中查找不为0的比特(即第二个比特和第三个比特)对应的下一跳的地址,得到实体A和实体F的地址。
表48:节点5的组播转发表
比特序列中的比特 下一跳地址
第1个 节点3的地址
第2个 实体A的地址
第3个 实体F的地址
123)节点5根据第一字段的长度、节点5的比特序列的长度、节点5的寻址字段的长度、节点5的寻址字段指示的节点D1的组播路由信息的长度以及第一字段指示的节点5的组播路由信息的总长度,确定组播报文2中节点D1的组播路由信息的位置(节点5的组播信息中的第20-48个比特),根据该位置提取出节点D1的组播路由信息,并进行组播封装得到组播报文3,向实体A发送组播报文3。组播报文3中节点D1的组播信息的结构可参见图29中的(c),其中,节点D1的组播路由信息的长度为29,因此,节点5在封装组播报文3时,可以添加第一字段和第二字段,第一字段的值为29,第二字段的长度为3比特。组播报文3中还可以包括单播封装,单播封装中的源地址为节点5的地址,目的地址为节点D1中的实体A的地址。
124)节点D1中的实体A接收组播报文3,并进行组播报文转发,具体过程可参见上述步骤51)-步骤59),将组播报文A替换为组播报文3理解即可。
125)节点5根据第一字段的长度、节点5的组播路由标识的长度、节点5的寻址字段的长度、节点5的寻址字段指示的节点D1的组播路由信息的长度以及第一字段指示的节点5的组播路由信息的总长度,确定组播报文2中节点D2的组播路由信息的位置(节点5的组播信息中的第49-51个比特),根据该位置提取出节点D2的组播路由信息,并进行组播封装得到组播报文4,向实体F发送组播报文4。组播报文4中节点D2的组播信息的结构可参见图29中的(d),其中,节点D2的组播路由信息的长度为3,因此,节点5在封装组播报文4时,可以添加第一字段和第二字段,第一字段的值为3,第二字段的长度为5比特。组播报文4中还可以包括单播封装,单播封装中的源地址为节点5的地址,目的地址为节点D2中的实体F的地址。
126)节点D2中的实体F接收并解析组播报文4,根据第一字段的长度和比特序列的长度确定比特序列的位置(节点D2的组播信息中的第9-11个比特),根据该位置确定比特序列的值为011,则在节点D2的组播转发表(参见下文中的表49)中查找不为0的比特(即第二个比特和第三个比特)对应的下一跳的地址,得到实体G的地址和实体H的地址,实体F向实体G和实体H发送单播报文5,单播报文5中包括组播报文1中的数据。
表49:节点D2的组播转发表
比特序列中的比特 下一跳地址
第1个 实体F的地址
第2个 实体G的地址
第3个 实体H的地址
上述实施例中,均以组播报文中不包括类型字段为例对本申请提供的方法作示例性说明。若当前节点支持多种类型的组播路由标识,组播报文中可以包括类型字段,则节点可以解析类型字段获取组播路由标识的类型,根据组播路由标识的类型对组播路由标识进行识别。
上述实施例中,组播报文中的任意一个字段的位宽均是示例性的,在实际实现时,任意一个字段的位宽可以不是字节对齐的,也可以是对齐的(例如,该字段均为1字节、2字节或更多字节),本申请不作限制。
上述实施例中,一个节点(或该节点中的实体)在接收到组播报文之后,可以根据外层封装中的字段的指示确定组播报文的报文头中是否包含组播封装,若外层封装中的目的地址为该节点(或该实体)的地址、且确定组播报文中的报文头中包含组播封装,该节点(或该实体)可以剥掉外层封装,获取组播封装,并根据组播封装对组播报文进行相应的处理。
上述实施例中,一个节点(或实体)向多个节点(或实体)发送组播报文之前,可以将接收到的组播报文进行复制,向N个节点(或实体)发送则复制N-1份,在复制的组播报文以及接收到的组播报文上进行编辑得到需要发送的组播报文。若只向一个节点(或实体)发送组播报文,则可以不复制,直接在接收到的组播报文上进行编辑。节点(或实体)在进行组播报文的复制时,可以一次全部复制,再并行编辑组播报文并发送。也可以一次复制一个组播报文,并编辑组播报文并发送。
本申请中的图13中的(a)、图13中的(b)、图14中的(a)、图14中的(b)、图22中的(b)、图22中的(c)、图22中的(d)、图22中的(e)、图23中的(b)、图23中的(c)、图23中的(d)、图24A中的(b)、图24A中的(c)、图24A中的(d)、图24B中的(a)、图24B中的(b)、图24B中的(c)、图24C中的(a)、图24C中的(b)、图24C中的(c)、图26中的(a)、图26中的(b)、图26中的(c)、图26中的(d)、图26中的(e)、图27中的(a)、图27中的(b)、图27中的(c)、图27中的(d)、图27中的(e)、图29中的(a)、图29中的(b)、图29中的(c)、图29中的(d)中所示的组播报文中,“:”之前的部分为助记符,实际报文中并不存在助记符和“:”。本申请各个附图中,各个字段的位置仅仅为示例,在实际实现时有些字段的位置可以与图示中不同,本申请不作限制。
需要说明的是,在本申请实施例的描述中,一个节点(或实体)向另一个节点(或实体)发送组播报文是指该组播报文的源地址为所述一个节点(或实体)的地址,目的地址为所述另一个节点(或实体)的地址。本申请上述实施例中任何一个比特(可以为单个比特也可以为比特序列中的比特)的值为1时表示的含义也可以通过0表示,为0时的含义也可以通过为1时表示,不作限制。例如,上述实施例中比特序列中的比特的值为1时,表示该比特为节点D1的子节点,值为0时表示该比特不为节点D1的子节点,在实际实现时,也可以比特序列中的比特的值为0时,表示该比特为节点D1的子节点,值为1时表示该比特不为节点D1的子节点。其他比特类似,不再一一阐述。
上述主要从方法的角度对本申请实施例的方案进行了介绍。可以理解的是,各个 网元,例如,节点或实体为了实现上述功能,其包含了执行各个功能相应的硬件结构和软件模块中的至少一个。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对节点或实体进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
示例性的,图30示出了上述实施例中所涉及的通信装置(记为通信装置300)的一种可能的结构示意图,该通信装置300包括处理单元3001和通信单元3002。可选的,还包括存储单元3003。通信装置300可以用于示意上述实施例中的节点或实体的结构。
当图30所示的结构示意图用于示意上述实施例中所涉及的第一节点的结构时,处理单元3001用于对第一节点的动作进行控制管理,例如,处理单元3001用于执行图6中的601和602,图19中的1901-1904,和/或本申请实施例中所描述的其他过程中的第一节点执行的动作。处理单元3001可以通过通信单元3002与其他节点或实体通信,例如,与图6中的第二节点通信。存储单元3003用于存储第一节点的程序代码和数据。
当图30所示的结构示意图用于示意上述实施例中所涉及的第二节点的结构时,处理单元3001用于对第二节点的动作进行控制管理,例如,处理单元3001用于执行图6中的602,图19中的1904,和/或本申请实施例中所描述的其他过程中的第二节点执行的动作。处理单元3001可以通过通信单元3002与其他节点或实体通信,例如,与图6中的第一节点通信。存储单元3003用于存储第二节点的程序代码和数据。
当图30所示的结构示意图用于示意上述实施例中所涉及的第一实体的结构时,处理单元3001用于对第一实体的动作进行控制管理,例如,处理单元3001用于执行图20中的2001-2003,和/或本申请实施例中所描述的其他过程中的第一实体执行的动作。处理单元3001可以通过通信单元3002与其他节点或实体通信,例如,与第二实体通信。存储单元3003用于存储第一实体的程序代码和数据。
当图30所示的结构示意图用于示意上述实施例中所涉及的其他节点或实体的结构时,处理单元3001用于对该节点或实体的动作进行控制管理,该节点或实体用于执行本申请实施例中所描述的过程中该节点或实体执行的动作。
示例性的,通信装置300可以为一个设备也可以为芯片或芯片系统。
当通信装置300为一个设备时,处理单元3001可以是处理器;通信单元3002可以是通信接口、收发器,输入接口和/或输出接口。可选地,收发器可以为收发电路。可选地,输入接口可以为输入电路,输出接口可以为输出电路。
当通信装置300为芯片或芯片系统时,处理单元3001可以是处理器、处理电路或 逻辑电路等。通信单元3002可以是该芯片或芯片系统上的通信接口、输入接口和/或输出接口、接口电路、输出电路、输入电路、管脚或相关电路等。
图30中的集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。存储计算机软件产品的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
当处理单元3001为处理器,通信单元3002为通信接口,存储单元3003为存储器时,本申请实施例所涉及的通信装置可以为图31所示的通信装置310。
图31所示为本申请实施例提供的通信装置的硬件结构示意图,该通信装置可以为本文中的节点或实体。该通信装置310包括至少一个处理器3101,通信总线3102以及至少一个通信接口3104。可选的,还包括存储器3103。图31中以通信装置310包括一个处理器3101和一个通信接口3104为例进行绘制。
处理器3101、通信接口3104和存储器3103之间可以通过通信总线3102连接实现互相通信,传递控制和/或数据信号,该存储器3103用于存储计算机程序,该处理器3101用于从该存储器3103中调用并运行该计算机程序,以控制该通信接口3104收发信号。
在第一种可能的实现方式中,处理器3101可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。通信接口3104,可以为任何收发器一类的装置。
在第二种可能的实现方式中,处理器3101可以为逻辑电路,通信接口3104可以包括输入接口和/或输出接口。
通信接口3104,使用任何收发器一类的装置,用于与其他设备或通信网络通信。
存储器3103可以是ROM或可存储静态信息和指令的其他类型的静态存储设备,RAM或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信总线3102与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器3103用于存储执行本申请方案的计算机执行指令,并由处理器3101来控制执行。处理器3101用于执行存储器3103中存储的计算机执行指令,从而实现本申请下述实施例提供的方法。
可选的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。
当图31所示的结构示意图用于示意上述实施例中所涉及的第一节点的结构时,处理器3101用于对第一节点的动作进行控制管理,例如,处理器3101用于执行图6中的601和602,图19中的1901-1904,和/或本申请实施例中所描述的其他过程中的第一节点执行的动作。处理器3101可以通过通信接口3104与其他节点或实体通信,例如,与图6中的第二节点通信。存储器3103用于存储第一节点的程序代码和数据。
当图31所示的结构示意图用于示意上述实施例中所涉及的第二节点的结构时,处理器3101用于对第二节点的动作进行控制管理,例如,处理器3101用于执行图6中的602,图19中的1904,和/或本申请实施例中所描述的其他过程中的第二节点执行的动作。处理器3101可以通过通信接口3104与其他节点或实体通信,例如,与图6中的第一节点通信。存储器3103用于存储第二节点的程序代码和数据。
当图31所示的结构示意图用于示意上述实施例中所涉及的第一实体的结构时,处理器3101用于对第一实体的动作进行控制管理,例如,处理器3101用于执行图20中的2001-2003,和/或本申请实施例中所描述的其他过程中的第一实体执行的动作。处理器3101可以通过通信接口3104与其他节点或实体通信,例如,与第二实体通信。存储器3103用于存储第一实体的程序代码和数据。
当图30所示的结构示意图用于示意上述实施例中所涉及的其他节点或实体的结构时,处理单元3001用于对该节点或实体的动作进行控制管理,该节点或实体用于执行本申请实施例中所描述的过程中该节点或实体执行的动作。
本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行上述任一方法。
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述任一方法。
本申请实施例还提供了一种通信系统,该通信系统中包括上述实施例中的一个或多个节点,或者,该通信系统包括上述实施例中的一个或多个实体,或者,该通信系统中包括上述实施例中的一个或多个节点和一个或多个实体。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机执行指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介 质(例如固态硬盘(solid state disk,SSD))等。
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (48)

  1. 一种组播报文发送方法,其特征在于,包括:
    第一节点获取第一组播报文,所述第一组播报文包括第二节点的组播信息,所述第二节点为组播树中所述第一节点的非叶子子节点,所述第二节点的组播信息中包括所述第二节点的组播路由信息;其中,一个节点的组播路由信息包括该节点的组播路由标识和该节点在所述组播树中的非叶子子节点的组播路由信息,一个节点的组播路由标识用于该节点确定在所述组播树中的子节点;
    所述第一节点向所述第二节点发送所述第一组播报文。
  2. 根据权利要求1所述的方法,其特征在于,一个节点的组播路由标识用于该节点在该节点对应的第一节点集合内确定该节点在所述组播树中的子节点,一个节点对应的第一节点集合中包括该节点的部分或全部潜在子节点。
  3. 根据权利要求1或2所述的方法,其特征在于,一个节点的组播路由标识包括该节点的子节点的个数信息和该节点的每个子节点的标识。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,一个节点的组播路由标识包括第三字段和X个第四字段;所述第三字段用于指示该节点的子节点的个数X,一个所述第四字段用于指示该节点的一个子节点的标识。
  5. 根据权利要求1-3任一项所述的方法,其特征在于,一个节点的组播路由标识包括N个第三字段,N为该节点对应的第一节点集合中的节点个数,一个所述第三字段用于指示所述第一节点集合中的一个节点是否为该节点在所述组播树中的子节点,一个节点对应的第一节点集合中包括该节点的部分或全部潜在子节点。
  6. 根据权利要求1-3任一项所述的方法,其特征在于,一个节点的组播路由标识包括第三字段,所述第三字段中包括第一组标识,所述第一组标识用于指示该节点对应的第一节点组,一个节点对应的第一节点组中的节点均为该节点的子节点。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,一个节点的组播路由信息还包括该节点的寻址字段;其中,一个节点的寻址字段用于该节点确定该节点的非叶子子节点的组播路由信息的位置。
  8. 根据权利要求7所述的方法,其特征在于,一个节点的寻址字段用于指示该节点的非叶子子节点的组播路由信息的长度;或者,一个节点的寻址字段用于指示该节点的非叶子子节点的组播路由信息的起始位置或结束位置;或者,一个节点的寻址字段包括多个定界字段,该节点的非叶子子节点的组播路由信息由所述多个定界字段分隔开。
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述第二节点的组播信息中还包括:第二节点的第一字段;所述第一字段用于指示所述第二节点的组播路由信息的长度或者所述第二节点的组播信息的长度。
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述第二节点的组播信息中还包括:第二字段,所述第二字段用于对齐所述第二节点的组播信息的字节。
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述第一组播报文为互联网协议IP报文,所述第一组播报文中的目的地址为所述第二节点的地址,所述第一组播报文还包括数据,所述第一组播报文中的所述第二节点的组播信息位于所述第一组 播报文的IP头部和所述数据之间。
  12. 根据权利要求1-11任一项所述的方法,其特征在于,所述第一节点获取第一组播报文,包括:
    所述第一节点接收第二组播报文,所述第二组播报文包括所述第一节点的组播路由信息;
    所述第一节点确定所述第二节点为所述第一节点的非叶子子节点;
    所述第一节点根据所述第一节点的组播路由信息获取所述第二节点的组播路由信息;
    所述第一节点根据所述第二节点的组播路由信息进行报文封装得到所述第一组播报文。
  13. 根据权利要求12所述的方法,其特征在于,所述第一节点根据所述第一节点的组播路由信息获取所述第二节点的组播路由信息,包括:
    所述第一节点根据所述第一节点的组播路由信息中的寻址字段确定所述第二节点的组播路由信息的位置;
    所述第一节点根据所述第二节点的组播路由信息的位置获取所述第二节点的组播路由信息。
  14. 根据权利要求1-11任一项所述的方法,其特征在于,所述第一节点为所述组播树的源节点,所述第一节点获取第一组播报文,包括:
    所述第一节点生成所述第一组播报文。
  15. 根据权利要求1-11任一项所述的方法,其特征在于,所述第一节点为所述组播树的源节点,所述第一节点获取第一组播报文,包括:
    所述第一节点生成第二组播报文,所述第二组播报文包括所述第一节点的组播路由信息;
    所述第一节点确定所述第二节点为所述第一节点的非叶子子节点;
    所述第一节点根据所述第一节点的组播路由信息获取所述第二节点的组播路由信息;
    所述第一节点根据所述第二节点的组播路由信息进行报文封装得到所述第一组播报文。
  16. 根据权利要求1-15任一项所述的方法,其特征在于,所述第一节点包括至少一个实体,所述第二节点包括至少一个实体,所述第一组播报文为所述第一节点中的一个实体向所述第二节点中的一个实体发送的组播报文。
  17. 根据权利要求1-16任一项所述的方法,其特征在于,一个节点的组播路由标识具体用于该节点中的实体确定该节点在所述组播树中的子节点。
  18. 一种组播报文发送方法,其特征在于,应用于第一实体,所述第一实体属于第一节点,所述方法包括:
    所述第一实体接收第三组播报文,所述第三组播报文包括所述第一节点的第一组播路由信息;其中,所述第一节点的第一组播路由信息包括所述第一节点的第一组播路由标识和所述第一节点的第一组播路由标识对应的非叶子子节点的组播路由信息;一个节点的组播路由信息包括该节点的组播路由标识和该节点在组播树中的非叶子子 节点的组播路由信息,一个节点的组播路由标识用于该节点中的实体确定该节点在所述组播树中的子节点;所述第一节点的第一组播路由标识与所述第一节点的组播路由标识相同或通过对所述第一节点的组播路由标识进行更新得到;
    所述第一实体根据所述第一节点的第一组播路由标识确定第二实体,所述第二实体为所述第一节点中的实体;
    所述第一实体向所述第二实体发送第四组播报文,所述第四组播报文中包括所述第一节点的第二组播路由信息,所述第一节点的第二组播路由信息包括所述第一节点的第二组播路由标识和所述第一节点的第三组播路由标识对应的部分或全部非叶子子节点的组播路由信息;所述第一节点的第三组播路由标识与所述第一节点的第一组播路由标识相同或通过对所述第一节点的第一组播路由标识进行更新得到,所述第一节点的第二组播路由标识与所述第一节点的第三组播路由标识相同或通过对所述第一节点的第三组播路由标识进行更新得到。
  19. 根据权利要求18所述的方法,其特征在于,所述第一实体根据所述第一节点的第一组播路由标识确定第二实体,包括:
    所述第一实体根据所述第一节点的第一组播路由标识查找组播转发表得到所述第二实体。
  20. 根据权利要求18或19所述的方法,其特征在于,所述方法还包括:
    所述第一实体根据所述第一节点的第一组播路由标识确定第一子节点,所述第一子节点为所述第一节点在所述组播树中的子节点中所述第一实体对应的子节点;
    所述第一实体向所述第一子节点发送第五组播报文,所述第五组播报文包括所述第一子节点的组播路由信息。
  21. 根据权利要求20所述的方法,其特征在于,所述第一实体不属于所述第一子节点,所述第一实体向所述第一子节点发送第五组播报文,包括:
    所述第一实体向所述第一子节点中的第三实体发送所述第五组播报文。
  22. 根据权利要求20或21任一项所述的方法,其特征在于,所述第一实体属于所述第一子节点,所述方法还包括:
    所述第一实体根据所述第一子节点的组播路由标识确定第二子节点,所述第二子节点为所述第一子节点在所述组播树中的子节点中所述第一实体对应的子节点。
  23. 根据权利要求20-22任一项所述的方法,其特征在于,所述第一实体属于所述第一子节点,所述第一子节点还包括第四实体,所述方法还包括:
    所述第一实体向所述第四实体发送第六组播报文,所述第六组播报文中包括所述第一子节点的第一组播路由信息,所述第一子节点的第一组播路由信息包括所述第一子节点的第一组播路由标识和所述第一子节点的第二组播路由标识对应的部分或全部非叶子子节点的组播路由信息;所述第一子节点的第二组播路由标识与所述第一子节点的组播路由标识相同或通过对所述第一子节点的组播路由标识进行更新得到,所述第一子节点的第一组播路由标识与所述第一子节点的第二组播路由标识相同或通过对所述第一子节点的第二组播路由标识进行更新得到。
  24. 一种第一节点,其特征在于,包括:处理单元和通信单元;
    所述处理单元,用于获取第一组播报文,所述第一组播报文包括第二节点的组播 信息,所述第二节点为组播树中所述第一节点的非叶子子节点,所述第二节点的组播信息中包括所述第二节点的组播路由信息;其中,一个节点的组播路由信息包括该节点的组播路由标识和该节点在所述组播树中的非叶子子节点的组播路由信息,一个节点的组播路由标识用于该节点确定在所述组播树中的子节点;
    所述通信单元,用于向所述第二节点发送所述第一组播报文。
  25. 根据权利要求24所述的第一节点,其特征在于,一个节点的组播路由标识用于该节点在该节点对应的第一节点集合内确定该节点在所述组播树中的子节点,一个节点对应的第一节点集合中包括该节点的部分或全部潜在子节点。
  26. 根据权利要求24或25所述的第一节点,其特征在于,一个节点的组播路由标识包括该节点的子节点的个数信息和该节点的每个子节点的标识。
  27. 根据权利要求24-26任一项所述的第一节点,其特征在于,一个节点的组播路由标识包括第三字段和X个第四字段;所述第三字段用于指示该节点的子节点的个数X,一个所述第四字段用于指示该节点的一个子节点的标识。
  28. 根据权利要求24-26任一项所述的第一节点,其特征在于,一个节点的组播路由标识包括N个第三字段,N为该节点对应的第一节点集合中的节点个数,一个所述第三字段用于指示所述第一节点集合中的一个节点是否为该节点在所述组播树中的子节点,一个节点对应的第一节点集合中包括该节点的部分或全部潜在子节点。
  29. 根据权利要求24-26任一项所述的第一节点,其特征在于,一个节点的组播路由标识包括第三字段,所述第三字段中包括第一组标识,所述第一组标识用于指示该节点对应的第一节点组,一个节点对应的第一节点组中的节点均为该节点的子节点。
  30. 根据权利要求24-29任一项所述的第一节点,其特征在于,一个节点的组播路由信息还包括该节点的寻址字段;其中,一个节点的寻址字段用于该节点确定该节点的非叶子子节点的组播路由信息的位置。
  31. 根据权利要求30所述的第一节点,其特征在于,一个节点的寻址字段用于指示该节点的非叶子子节点的组播路由信息的长度;或者,一个节点的寻址字段用于指示该节点的非叶子子节点的组播路由信息的起始位置或结束位置;或者,一个节点的寻址字段包括多个定界字段,该节点的非叶子子节点的组播路由信息由所述多个定界字段分隔开。
  32. 根据权利要求24-31任一项所述的第一节点,其特征在于,所述第二节点的组播信息中还包括:第二节点的第一字段;所述第一字段用于指示所述第二节点的组播路由信息的长度或者所述第二节点的组播信息的长度。
  33. 根据权利要求24-32任一项所述的第一节点,其特征在于,所述第二节点的组播信息中还包括:第二字段,所述第二字段用于对齐所述第二节点的组播信息的字节。
  34. 根据权利要求24-33任一项所述的第一节点,其特征在于,所述第一组播报文为互联网协议IP报文,所述第一组播报文中的目的地址为所述第二节点的地址,所述第一组播报文还包括数据,所述第一组播报文中的所述第二节点的组播信息位于所述第一组播报文的IP头部和所述数据之间。
  35. 根据权利要求24-34任一项所述的第一节点,其特征在于,所述处理单元,具体用于:
    通过所述通信单元接收第二组播报文,所述第二组播报文包括所述第一节点的组播路由信息;
    确定所述第二节点为所述第一节点的非叶子子节点;
    根据所述第一节点的组播路由信息获取所述第二节点的组播路由信息;
    根据所述第二节点的组播路由信息进行报文封装得到所述第一组播报文。
  36. 根据权利要求35所述的第一节点,其特征在于,所述处理单元,具体用于:
    根据所述第一节点的组播路由信息中的寻址字段确定所述第二节点的组播路由信息的位置;
    根据所述第二节点的组播路由信息的位置获取所述第二节点的组播路由信息。
  37. 根据权利要求24-34任一项所述的第一节点,其特征在于,所述第一节点为所述组播树的源节点,所述处理单元,具体用于:
    生成所述第一组播报文。
  38. 根据权利要求24-34任一项所述的第一节点,其特征在于,所述第一节点为所述组播树的源节点,所述处理单元,具体用于:
    生成第二组播报文,所述第二组播报文包括所述第一节点的组播路由信息;
    确定所述第二节点为所述第一节点的非叶子子节点;
    根据所述第一节点的组播路由信息获取所述第二节点的组播路由信息;
    根据所述第二节点的组播路由信息进行报文封装得到所述第一组播报文。
  39. 根据权利要求24-38任一项所述的第一节点,其特征在于,所述第一节点包括至少一个实体,所述第二节点包括至少一个实体,所述第一组播报文为所述第一节点中的一个实体向所述第二节点中的一个实体发送的组播报文。
  40. 根据权利要求24-39任一项所述的第一节点,其特征在于,一个节点的组播路由标识具体用于该节点中的实体确定该节点在所述组播树中的子节点。
  41. 一种第一实体,其特征在于,所述第一实体属于第一节点,所述第一实体包括:通信单元和处理单元;
    所述通信单元,用于接收第三组播报文,所述第三组播报文包括所述第一节点的第一组播路由信息;其中,所述第一节点的第一组播路由信息包括所述第一节点的第一组播路由标识和所述第一节点的第一组播路由标识对应的非叶子子节点的组播路由信息;一个节点的组播路由信息包括该节点的组播路由标识和该节点在组播树中的非叶子子节点的组播路由信息,一个节点的组播路由标识用于该节点中的实体确定该节点在所述组播树中的子节点;所述第一节点的第一组播路由标识与所述第一节点的组播路由标识相同或通过对所述第一节点的组播路由标识进行更新得到;
    所述处理单元,用于根据所述第一节点的第一组播路由标识确定第二实体,所述第二实体为所述第一节点中的实体;
    所述通信单元,还用于向所述第二实体发送第四组播报文,所述第四组播报文中包括所述第一节点的第二组播路由信息,所述第一节点的第二组播路由信息包括所述第一节点的第二组播路由标识和所述第一节点的第三组播路由标识对应的部分或全部非叶子子节点的组播路由信息;所述第一节点的第三组播路由标识与所述第一节点的第一组播路由标识相同或通过对所述第一节点的第一组播路由标识进行更新得到,所 述第一节点的第二组播路由标识与所述第一节点的第三组播路由标识相同或通过对所述第一节点的第三组播路由标识进行更新得到。
  42. 根据权利要求41所述的第一实体,其特征在于,
    所述处理单元,具体用于:根据所述第一节点的第一组播路由标识查找组播转发表得到所述第二实体。
  43. 根据权利要求41或42所述的第一实体,其特征在于,
    所述处理单元,还用于根据所述第一节点的第一组播路由标识确定第一子节点,所述第一子节点为所述第一节点在所述组播树中的子节点中所述第一实体对应的子节点;
    所述通信单元,还用于向所述第一子节点发送第五组播报文,所述第五组播报文包括所述第一子节点的组播路由信息。
  44. 根据权利要求43所述的第一实体,其特征在于,所述第一实体不属于所述第一子节点;
    所述通信单元,具体用于:向所述第一子节点中的第三实体发送所述第五组播报文。
  45. 根据权利要求43或44所述的第一实体,其特征在于,所述第一实体属于所述第一子节点;
    所述处理单元,还用于根据所述第一子节点的组播路由标识确定第二子节点,所述第二子节点为所述第一子节点在所述组播树中的子节点中所述第一实体对应的子节点。
  46. 根据权利要求43-45任一项所述的第一实体,其特征在于,所述第一实体属于所述第一子节点,所述第一子节点还包括第四实体;
    所述通信单元,还用于向所述第四实体发送第六组播报文,所述第六组播报文中包括所述第一子节点的第一组播路由信息,所述第一子节点的第一组播路由信息包括所述第一子节点的第一组播路由标识和所述第一子节点的第二组播路由标识对应的部分或全部非叶子子节点的组播路由信息;所述第一子节点的第二组播路由标识与所述第一子节点的组播路由标识相同或通过对所述第一子节点的组播路由标识进行更新得到,所述第一子节点的第一组播路由标识与所述第一子节点的第二组播路由标识相同或通过对所述第一子节点的第二组播路由标识进行更新得到。
  47. 一种通信装置,其特征在于,包括:处理器;
    所述处理器与存储器连接,所述存储器用于存储计算机执行指令,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述通信装置实现如权利要求1-17任一项,或者,权利要求18-23任一项所述的方法。
  48. 一种计算机可读存储介质,其特征在于,包括指令,当所述指令在计算机上运行时,使得所述计算机执行如权利要求1-17任一项,或者,权利要求18-23任一项所述的方法。
PCT/CN2022/076838 2021-03-22 2022-02-18 组播报文发送方法及装置 WO2022199294A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22773956.2A EP4300913A1 (en) 2021-03-22 2022-02-18 Multicast packet sending method and device
US18/472,896 US20240064098A1 (en) 2021-03-22 2023-09-22 Multicast Packet Sending Method and Apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110304363.4 2021-03-22
CN202110304363.4A CN115134289A (zh) 2021-03-22 2021-03-22 组播报文发送方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/472,896 Continuation US20240064098A1 (en) 2021-03-22 2023-09-22 Multicast Packet Sending Method and Apparatus

Publications (1)

Publication Number Publication Date
WO2022199294A1 true WO2022199294A1 (zh) 2022-09-29

Family

ID=83374619

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/076838 WO2022199294A1 (zh) 2021-03-22 2022-02-18 组播报文发送方法及装置

Country Status (4)

Country Link
US (1) US20240064098A1 (zh)
EP (1) EP4300913A1 (zh)
CN (1) CN115134289A (zh)
WO (1) WO2022199294A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009201054A (ja) * 2008-02-25 2009-09-03 Nippon Telegr & Teleph Corp <Ntt> Ipマルチキャスト疎通監視方法及びシステム
US20150049760A1 (en) * 2013-08-15 2015-02-19 Verizon Patent And Licensing Inc. Source routing in multicast transmissions
CN110224935A (zh) * 2018-03-02 2019-09-10 华为技术有限公司 一种处理组播数据报文的方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009201054A (ja) * 2008-02-25 2009-09-03 Nippon Telegr & Teleph Corp <Ntt> Ipマルチキャスト疎通監視方法及びシステム
US20150049760A1 (en) * 2013-08-15 2015-02-19 Verizon Patent And Licensing Inc. Source routing in multicast transmissions
CN110224935A (zh) * 2018-03-02 2019-09-10 华为技术有限公司 一种处理组播数据报文的方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ROSEN, E. ET AL.: "Ingress Replication Tunnels in Multicast VPN", IETF RFC7988, 31 October 2016 (2016-10-31), XP015115622 *

Also Published As

Publication number Publication date
CN115134289A (zh) 2022-09-30
US20240064098A1 (en) 2024-02-22
EP4300913A1 (en) 2024-01-03

Similar Documents

Publication Publication Date Title
CN106059924B (zh) 一种管理信息的方法,装置及系统
US10616063B1 (en) Stateless multicast in IP networks
JP5214804B2 (ja) ネットワークにおけるパケット転送
CN107770073B (zh) 一种信息同步的方法,装置及系统
US8724533B2 (en) Multicast support by mobile routers in a mobile ad hoc network
CN107968750B (zh) 报文传输方法、装置及节点
Jain et al. Viro: A scalable, robust and namespace independent virtual id routing for future networks
US9628435B2 (en) Duplicate address detection based on distributed bloom filter
CN111835637B (zh) 一种基于SRv6的数据处理方法及相关网络设备
WO2016184334A1 (en) Multi-region source routed multicast using sub-tree identifiers
WO2017190559A1 (zh) 路由查找方法、装置、分配节点、查找节点及入口节点
CN112187648B (zh) 组播报文转发方法及装置
CN113726667B (zh) 一种反向路径转发rpf检查方法及装置
US20160269188A1 (en) Reverse directed acyclic graph for multiple path reachability from origin to identified destination via multiple target devices
WO2022199294A1 (zh) 组播报文发送方法及装置
CN113630316A (zh) 一种数据传输方法及通信装置
WO2015039616A1 (zh) 一种报文处理方法及设备
CN116094987A (zh) 转发路径的确定方法及装置
WO2023025171A1 (zh) 通信方法及装置
US20230353484A1 (en) PCE for BIER-TE Path
CN117135105A (zh) 一种层次化bier组播报文转发的方法和装置
WO2023164320A1 (en) Optimal encoding multicast tree using link number and bit
CN118301060A (zh) 组播数据报文的处理方法及装置
WO2020210844A1 (en) Preferred path routing fast reroute use of segment routing header
CN117880003A (zh) 数据转发方法、装置、设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22773956

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022773956

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022773956

Country of ref document: EP

Effective date: 20230926

NENP Non-entry into the national phase

Ref country code: DE