Three-layer multicast method, network equipment and device
By dividing multiple multicast traffic into the same multicast traffic group and merging it to generate MLL, the problem of insufficient storage resources of network equipment when processing a large amount of multicast traffic is solved, and efficient forwarding of multicast traffic is achieved.
Patent Information
- Application Number
- CN202411379437.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-29
AI Technical Summary
When network devices process large amounts of multicast traffic, due to limited underlying hardware storage resources, the multicast linked list (Mll) failed, affecting the forwarding of multicast traffic.
By dividing the corresponding exit interfaces and belonging to different grouping groups to the same group of broadcast traffic groups, and generate a group of the first group of broadcast list MLL for each group, combine MLL to save storage storage resource.
This method effectively saves the storage resources of the underlying hardware of the network device, reduces the possibility of failure to issue MLL, and ensures the normal reposting of the broadcast traffic.
Smart Images

Figure CN119341975A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network technology, and in particular to a three-layer multicast method, network equipment and device. Background Art
[0002] Network devices can use multicast technology to send multicast traffic from a single point to multiple points, thereby achieving efficient data transmission from one point to multiple points in the network, saving network bandwidth and reducing network load. Therefore, multicast technology can play an important role in online live broadcast, Internet TV, distance education, telemedicine, real-time video conferencing and other scenarios.
[0003] In the related art, in order to realize the forwarding of multicast traffic, after receiving the multicast traffic belonging to the target multicast group through the target inbound interface, the network device first needs to generate a platform entry. The platform entry corresponds to the target inbound interface and the target multicast group, and is used to forward the multicast traffic received through the target inbound interface and belonging to the target multicast group.
[0004] However, due to the limited storage resources of the underlying hardware of network devices, when network devices process a large amount of multicast traffic, a large number of Mlls (Multicast linked lists) need to be sent to the underlying hardware. The underlying hardware of network devices may not be able to accommodate all Mlls, resulting in failure to send Mlls, which in turn affects the forwarding of multicast traffic. Summary of the invention
[0005] The purpose of the embodiment of the present application is to provide a three-layer multicast method, network device and apparatus to save storage resources of the underlying hardware of the network device when generating and issuing M11. The specific technical solution is as follows:
[0006] In a first aspect, an embodiment of the present application provides a three-layer multicast method, the method comprising:
[0007] After receiving multicast traffic, multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups are divided into the same multicast traffic group;
[0008] For each multicast traffic group, a first multicast linked list Mll is generated and sent to the underlying driver module, so that the underlying driver module forwards the multicast traffic in the multicast traffic group to the output interface corresponding to the first Mll according to the first Mll received by itself, wherein the output interface field recorded in the first Mll indicates the output interface corresponding to the multicast traffic in the multicast traffic group, and the multicast group address field recorded in the first Mll indicates the address of the multicast group to which all multicast traffic in the multicast traffic group belongs.
[0009] In one embodiment of the present application, after generating and sending a first multicast chain table M11 to the bottom driver module for each multicast traffic group, the method further includes:
[0010] For each multicast traffic group, a longest prefix match LPM table entry is generated according to the first Mll corresponding to the multicast traffic group and sent to the underlying driver module, wherein the next hop index value in the LPM table entry points to the first Mll.
[0011] In one embodiment of the present application, when receiving multicast traffic through a layer-3 virtual local area network (vlan) interface, the method of dividing multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups into the same multicast traffic group includes:
[0012] For an inbound interface whose interface type is a Layer 3 VLAN interface, multiple multicast flows received through a single inbound interface, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast flow group;
[0013] For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
[0014] In one embodiment of the present application, when receiving multicast traffic through a routing interface or a routing aggregation interface, the method of dividing multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups into the same multicast traffic group includes:
[0015] For an inbound interface whose interface type is a routing interface or a routing aggregation interface, multiple multicast flows received through all inbound interfaces, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast flow group.
[0016] For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
[0017] In one embodiment of the present application, the method further includes:
[0018] After receiving the target multicast traffic, determining a target outbound interface corresponding to the target multicast traffic;
[0019] Determine whether there is a second M11 in the bottom driver module, wherein the output interface field recorded in the second M11 indicates the target output interface;
[0020] If the second M11 exists, a third M11 is generated, wherein the outgoing interface field recorded in the third M11 indicates the target outgoing interface, and the multicast group address field recorded in the third M11 indicates the address of the multicast group to which the target multicast traffic belongs;
[0021] According to the third M11, the second M11 in the bottom driver module is updated.
[0022] In a second aspect, an embodiment of the present application provides a network device, wherein the network device includes a memory, a transceiver, and a processor:
[0023] A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations:
[0024] After receiving multicast traffic, multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups are divided into the same multicast traffic group;
[0025] For each multicast traffic group, a first multicast linked list Mll is generated and sent to the underlying driver module, so that the underlying driver module forwards the multicast traffic in the multicast traffic group to the output interface corresponding to the first Mll according to the first Mll received by itself, wherein the output interface field recorded in the first Mll indicates the output interface corresponding to the multicast traffic in the multicast traffic group, and the multicast group address field recorded in the first Mll indicates the address of the multicast group to which all multicast traffic in the multicast traffic group belongs.
[0026] In one embodiment of the present application, after generating and sending a first multicast chain table M11 to the bottom driver module for each multicast traffic group, the processor is further configured to perform the following operations:
[0027] For each multicast traffic group, a longest prefix match LPM table entry is generated according to the first Mll corresponding to the multicast traffic group and sent to the underlying driver module, wherein the next hop index value in the LPM table entry points to the first Mll.
[0028] In one embodiment of the present application, when receiving multicast traffic through a layer-3 virtual local area network (vlan) interface, the method of dividing multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups into the same multicast traffic group specifically includes:
[0029] For an inbound interface whose interface type is a Layer 3 VLAN interface, multiple multicast flows received through a single inbound interface, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast flow group;
[0030] For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
[0031] In one embodiment of the present application, when receiving multicast traffic through a routing interface or a routing aggregation interface, the method of dividing multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups into the same multicast traffic group specifically includes:
[0032] For an inbound interface whose interface type is a non-routing interface or a routing aggregation interface, multiple multicast flows received through all inbound interfaces, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast flow group.
[0033] For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
[0034] In one embodiment of the present application, the processor is further configured to perform the following operations:
[0035] After receiving the target multicast traffic, determining a target outbound interface corresponding to the target multicast traffic;
[0036] Determine whether there is a second M11 in the bottom driver module, wherein the output interface field recorded in the second M11 indicates the target output interface;
[0037] If the second M11 exists, a third M11 is generated, wherein the outgoing interface field recorded in the third M11 indicates the target outgoing interface, and the multicast group address field recorded in the third M11 indicates the address of the multicast group to which the target multicast traffic belongs;
[0038] According to the third M11, the second M11 in the bottom driver module is updated.
[0039] In a third aspect, an embodiment of the present application provides a layer-3 multicast device, the device comprising:
[0040] A traffic division module is used to divide a plurality of multicast flows corresponding to the same outbound interface and belonging to different multicast groups into the same multicast flow group after receiving the multicast flows;
[0041] The Mll sending module is used to generate and send a first multicast link list Mll to the underlying driver module for each multicast traffic group, so that the underlying driver module forwards the multicast traffic in the multicast traffic group to the output interface corresponding to the first Mll according to the first Mll received by itself, wherein the output interface field recorded in the first Mll indicates the output interface corresponding to the multicast traffic in the multicast traffic group, and the multicast group address field recorded in the first Mll indicates the address of the multicast group to which all multicast traffic in the multicast traffic group belongs.
[0042] In one embodiment of the present application, the device further includes:
[0043] The LPM sending module is used to generate and send the longest prefix matching LPM table entry to the underlying driver module for each multicast traffic group according to the first Mll corresponding to the multicast traffic group, wherein the next hop index value in the LPM table entry points to the first Mll.
[0044] In one embodiment of the present application, when receiving multicast traffic through a Layer 3 virtual local area network (vlan) interface, the traffic division module is specifically used to:
[0045] After receiving multicast traffic, for the inbound interface whose interface type is a Layer 3 VLAN interface, multiple multicast traffic received through a single inbound interface, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast traffic group;
[0046] For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
[0047] In one embodiment of the present application, when multicast traffic is received through a routing interface or a routing aggregation interface, the traffic division module is specifically used to:
[0048] After receiving multicast traffic, for the inbound interface whose interface type is a routing interface or a routing aggregation interface, multiple multicast traffics received through all inbound interfaces, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast traffic group;
[0049] For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
[0050] In one embodiment of the present application, the device further includes:
[0051] An outbound interface determination module, configured to determine a target outbound interface corresponding to the target multicast traffic after receiving the target multicast traffic;
[0052] An Mll judging module, used for judging whether there is a second Mll in the bottom driver module, wherein the output interface field recorded in the second Mll indicates the target output interface;
[0053] An Mll generating module, configured to generate a third Mll if the second Mll exists, wherein the outgoing interface field recorded in the third Mll indicates the target outgoing interface, and the multicast group address field recorded in the third Mll indicates the address of the multicast group to which the target multicast traffic belongs;
[0054] An Mll updating module is used to update the second Mll in the bottom driver module according to the third Mll.
[0055] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.
[0056] In a fifth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect above.
[0057] Beneficial effects of the embodiments of the present invention:
[0058] In the scheme provided by the embodiment of the present application, after receiving the multicast traffic, the network device first compares the output interfaces corresponding to the multicast traffic. Multiple multicast traffic corresponding to the same output interface and belonging to different multicast groups are divided into the same multicast traffic group. And for each multicast traffic group, an M11 is jointly generated for the multicast traffic in the multicast traffic group. That is, in the embodiment of the present application, only one M11 is generated for multiple multicast traffic in the same multicast traffic group. Compared with the related art in which one M11 is generated for each multicast traffic, the scheme provided by the embodiment of the present application can merge M11, thereby saving the storage resources of the underlying hardware occupied by M11, and then reducing the possibility of failure of M11 to send. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and a person skilled in the art can also obtain other drawings based on these drawings.
[0060] Figure 1 A schematic diagram of the process of the first three-layer multicast method provided in the embodiment of the present application;
[0061] Figure 2 A schematic diagram of a second layer 3 multicast method provided in an embodiment of the present application;
[0062] Figure 3 A schematic diagram of a multicast traffic forwarding process provided in an embodiment of the present application;
[0063] Figure 4 A schematic diagram of a third layer 3 multicast method provided in an embodiment of the present application;
[0064] Figure 5A schematic diagram of a fourth layer 3 multicast method provided in an embodiment of the present application;
[0065] Figure 6 A flowchart of a fifth layer 3 multicast method provided in an embodiment of the present application;
[0066] Figure 7 A schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0067] Figure 8 A schematic diagram of the structure of a three-layer multicast device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field based on this application belong to the scope of protection of the present invention.
[0069] In order to reflect the difference between the solution provided in the embodiments of the present application and the related art, the solution in the related art is first described.
[0070] In order to forward multicast packets, network devices need to generate and send multicast traffic forwarding information to the underlying hardware (driver). Multicast traffic forwarding information includes Mll (Multicast linked list) and LPM (Longest Prefix Match) entries. First, Mll is sent down, which corresponds to the target inbound interface and the target multicast group. The generated Mll node records the outbound interface field, which indicates the outbound interface of the multicast traffic belonging to the target multicast group received from the target inbound interface.
[0071] After that, the network device generates an LPM table entry based on Mll and the platform table entry, and sends the LPM table entry to the underlying driver module. The LPM table entry records information such as the multicast address of the target multicast group and the next hop index value pointing to Mll. Therefore, the network device can retrieve the LPM according to information such as the target multicast group to which the multicast traffic belongs, thereby determining the Mll to which the next hop index value corresponding to the multicast traffic points, and then determine the outbound interface of the multicast traffic according to the outbound interface field of Mll, thereby completing the forwarding of the multicast traffic.
[0072] In related technologies, IP multicast working at the network layer is called Layer 3 multicast, and the corresponding multicast protocols are called Layer 3 multicast protocols, including IGMP (Internet Group Management Protocol), PIM (Protocol Independent Multicast), MSDP (Multicast Source Discovery Protocol), etc. Layer 3 multicast protocols include multicast group management protocols and multicast routing protocols.
[0073] The multicast group management protocol is a protocol between the host and the three-layer multicast device directly connected to it, usually using IGMP. The IGMP protocol specifies the mechanism for establishing and maintaining multicast group membership between the host and the three-layer multicast device, including the mechanism for joining a multicast group, the mechanism for leaving a multicast group, the mechanism for monitoring messages, and the mechanism for managing a multicast group.
[0074] The multicast routing protocol runs between Layer 3 multicast devices to establish and maintain multicast routes and to forward multicast messages correctly and efficiently.
[0075] In the related art, for a network chip, the outbound interface information such as the identifier of an outbound interface corresponding to a multicast group (the on-demand interface for the multicast group) will be recorded in the node of Mll. The multicast traffic will be flooded at the outbound interface indicated by the identifier of the outbound interface recorded in Mll. Each Mll corresponds to an LPM table entry.
[0076] For example, there is the following example 1: Table entry SG (Soft Graph) 1 is an LPM table entry, and the outbound interface identifiers recorded in SG1 are the identifiers of IF1 and IF2. The next hop index value in SG1 points to Mll1, and Mll1 records the outbound interface field indicating IF1 and IF2. Both SG1 and Mll1 are sent to the underlying driver module.
[0077] Table entry SG2 is another LPM table entry. The outbound interface identifiers recorded in SG2 are the identifiers of IF1 and IF2. The next hop index value in SG2 points to Mll2, and Mll2 records the outbound interface fields indicating IF1 and IF2. Both SG2 and Mll2 are sent to the underlying driver module.
[0078] Although the outgoing interface fields recorded in Mll1 and Mll2 indicate the same outgoing interface. However, in the related art, one outgoing interface field is recorded in one Mll. In the existing multicast process, it is necessary to distinguish the interface information of the incoming interface when configuring the multicast group. For multicast traffic with different ingoing interfaces, even if the outgoing interfaces are the same, different Mlls need to be generated, and the generated Mll will record the outgoing interface field indicating the same outgoing interface.
[0079] That is, in the above scenario, it is necessary to occupy the storage resources in the underlying driver module that can accommodate 2 LPM table entries + 2 Mlls.
[0080] If the underlying driver module can accommodate 4000 sets of LPM table items + Mll, one corresponding LPM table item and one Mll are a group. There are 5000 platform table items in the network device, and 5000 sets of LPM table items + Mll need to be sent to the underlying driver module. However, in fact, because the storage resource capacity of the underlying driver module is exceeded, 1000 sets of LPM table items + Mll are not sent to the underlying driver module.
[0081] In order to solve the above problems, the embodiments of the present application provide a three-layer multicast method, a network device and an apparatus.
[0082] See also Figure 1 , is a flow chart of the first three-layer multicast method provided in the embodiment of the present application, the method comprises the following steps S101-S102. The execution subject of the embodiment of the present application is the control plane of the network device.
[0083] S101: After receiving multicast traffic, multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups are divided into the same multicast traffic group.
[0084] Specifically, each multicast group has a unique multicast address. Different multicast groups have different multicast addresses. Multicast traffic belonging to the same multicast group has the same multicast address, while multicast traffic belonging to different multicast groups has different multicast addresses. Therefore, it can be determined whether multicast traffic belongs to the same multicast group based on its multicast address.
[0085] In addition, a corresponding relationship table is recorded in the execution body of the present application, and each entry in the corresponding relationship table records the corresponding relationship between a multicast group and an outbound interface. The outbound interface corresponding to each multicast group can be configured on demand.
[0086] Therefore, the outbound interface corresponding to each multicast flow can be determined by searching the above correspondence table, thereby determining the multicast flow corresponding to the same outbound interface.
[0087] In addition, there may be multicast traffic in the multicast traffic that does not belong to the same multicast traffic group as other multicast traffic. LPM entries and M11 can be generated for each such multicast traffic and sent to the underlying driver module through relevant technologies, and this embodiment of the present application will not be repeated.
[0088] If there are no multiple multicast flows corresponding to the same outbound interface in the multicast flows, the subsequent step S102 is not performed. The LPM table entry and M11 are directly generated for each multicast flow and sent to the bottom driver module through the relevant technology.
[0089] S102: For each multicast traffic group, generate and send a first M11 to the underlying driver module, so that the underlying driver module forwards the multicast traffic in the multicast traffic group to the outbound interface corresponding to the first M11 according to the first M11 received by itself.
[0090] Among them, the outgoing interface field recorded in the above-mentioned first Mll indicates the outgoing interface corresponding to the multicast traffic in the multicast traffic group, and the multicast group address field recorded in the above-mentioned first Mll indicates the address of the multicast group to which all multicast traffic in the multicast traffic group belongs.
[0091] It should be noted that there may be one or more multicast traffic groups in the multicast traffic, and different multicast traffic groups correspond to different outbound interfaces. For each multicast traffic group, the embodiment of the present application will generate a first Mll.
[0092] In addition, the multicast traffic in the same multicast traffic group belongs to different multicast groups, and all multicast traffic in the same multicast traffic group corresponds to the same first M11, so the multicast address field in the first M11 needs to record the address of the multicast group to which all multicast traffic in the multicast traffic group belongs. This means that when the bottom driver module forwards the multicast traffic in all multicast groups corresponding to the recorded address, it can find the outbound interface of the multicast traffic through the first M11.
[0093] In the scheme provided by the embodiment of the present application, after receiving the multicast traffic, the network device first compares the output interfaces corresponding to the multicast traffic. Multiple multicast traffic corresponding to the same output interface and belonging to different multicast groups are divided into the same multicast traffic group. And for each multicast traffic group, an M11 is jointly generated for the multicast traffic in the multicast traffic group. That is, in the embodiment of the present application, only one M11 is generated for multiple multicast traffic in the same multicast traffic group. Compared with the related art in which one M11 is generated for each multicast traffic, the scheme provided by the embodiment of the present application can merge M11, thereby saving the storage resources of the underlying hardware occupied by M11, and then reducing the possibility of failure of M11 to send.
[0094] Compared with the above example 1, in the solution provided by the embodiment of the present application, since the identifiers of the outgoing interfaces recorded in SG1 and SG2 are both the identifiers of IF1 and IF2, only one M11 can be sent to SG1 and SG2. Compared with the need to send two M11s in the related art, the storage resources of the underlying driver module can be saved by the embodiment of the present application.
[0095] See also Figure 2 , which is a flow chart of the second three-layer multicast method provided in an embodiment of the present application, and after the aforementioned step S102, it also includes the following step S103.
[0096] S103: For each multicast traffic group, generate an LPM table entry according to the first M11 corresponding to the multicast traffic group and send it to the bottom layer driver module.
[0097] Among them, the next hop index value in the above LPM table entry points to the first M11.
[0098] Specifically, for the same multicast traffic group, LPM table entries corresponding to each multicast traffic in the multicast traffic group are respectively issued, and the next hop index value in each LPM table entry issued for the same multicast traffic group points to the first Mll corresponding to the multicast traffic group.
[0099] In addition, the information contained in the LPM entry may include, in addition to the next hop index value, the destination IP address, source IP address, inbound interface identifier, and other information of the corresponding multicast traffic.
[0100] As can be seen from the above, in the solution provided in the embodiment of the present application, in addition to generating and issuing the first M11 for the multicast traffic in the multicast traffic group, the LPM table item corresponding to the first M11 will also be issued, and the LPM table item issued for the same multicast traffic group corresponds to the same first M11. Therefore, in the case of implementing M11 merging in the embodiment of the present application, the LPM table item can still be generated and issued normally, ensuring the normal forwarding of the multicast traffic by the underlying driver module.
[0101] See also Figure 3 , is a schematic diagram of a multicast traffic forwarding process provided in an embodiment of the present application.
[0102] As can be seen from the figure, after receiving multicast traffic, the underlying driver module first searches the LPM table (by Figure 2 Indicated by arrow 1 in the figure), then determine the nexthop index contained in the matched LPM table entry, that is, the next hop index value (represented by Figure 2 The nexthop index points to Mll (indicated by Figure 2Indicated by arrow 3 in the figure). When the outgoing interface is a Layer 3 VLAN (Virtual Local Area Network) interface, the outgoing interface field in Mll can record the vidx of the outgoing interface (indicated by Figure 2 Indicated by arrow 4 in the figure), the outbound interface indicated by vidx forwards multicast traffic (indicated by Figure 2 Or, when the outgoing interface is not a Layer 3 VLAN interface, the outgoing interface field in Mll may record other information indicating the outgoing interface, and the outgoing interface indicated by the information performs multicast traffic forwarding (indicated by Figure 2 Indicated by arrow 6).
[0103] In the embodiment of the present application, there may be both a three-layer VLAN interface and a routing interface or a routing aggregation interface on the network device, such as a routing interface and a routing aggregation port. The multicast traffic received through the three-layer VLAN interface and the multicast traffic received through the non-VLAN interface are processed separately. The processing methods of the two are respectively described below. Figure 4 and Figure 5 The illustrated embodiment is described.
[0104] See also Figure 4 , is a flow chart of a third layer 3 multicast method provided in an embodiment of the present application, which is similar to the aforementioned Figure 1 Compared with the embodiment shown, the above step S101 can be implemented by the following step S101A.
[0105] S101A: After receiving the multicast traffic, for an inbound interface whose interface type is a layer-3 VLAN interface, multiple multicast traffics received through a single inbound interface, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast traffic group.
[0106] That is, when the interface type of the inbound interface of the multicast traffic is a layer 3 vlan interface, in the embodiment of the present application, when dividing the multicast traffic groups, only the multicast traffic received through the same layer 3 vlan interface is divided. That is, in this embodiment, the multicast traffic received through different layer 3 vlan interfaces is compared respectively, and the multicast traffic groups are divided respectively.
[0107] For example, there are 10 multicast flows received through the three-layer vlan10 interface and 10 multicast flows received through the three-layer vlan20 interface. In the embodiment of the present application, the 10 multicast flows received through the three-layer vlan10 interface are compared, the multicast flow groups are divided, and M11 is generated and issued in the subsequent step S102. And the 10 multicast flows received through the three-layer vlan20 interface are compared, the multicast flow groups are divided, and M11 is generated and issued in the subsequent step S102. Both can be executed in parallel.
[0108] In an embodiment of the present application, regardless of whether the outbound interfaces corresponding to the multicast traffic received through different Layer 3 VLAN interfaces are the same, they will not be classified into the same multicast traffic group.
[0109] For each multicast traffic group, the input interface field recorded in the generated first M11 indicates the input interface corresponding to all multicast traffic in the multicast traffic group. Since the multicast traffic groups are divided respectively for the input interfaces whose interface type is a layer-3 vlan interface in the embodiment of the present application, the input interface fields recorded in the generated different first M11 indicate different layer-3 vlan interfaces for the multicast traffic groups corresponding to different layer-3 vlan interfaces. The bottom layer driver module can distinguish the multicast traffic received through different layer-3 vlan interfaces based on the input interface field and forward the multicast traffic respectively.
[0110] In addition, when the interface type of the inbound interface of the multicast traffic is a layer 3 vlan interface, the outbound interface corresponding to the multicast traffic should also be a layer 3 vlan interface. In this case, the generated first Mll contains two nodes. The outbound interface field in the node of the first Mll may record the vidx, eport (e interface) or trunkid of the outbound interface.
[0111] The following example 2 Figure 4 The illustrated embodiment is compared with the related art.
[0112] Example 2: Assume that there are 10 multicast groups, and the multicast addresses of the 10 multicast groups are 225.0.0.1 to 225.0.0.10 respectively. And the outbound interfaces corresponding to the 10 multicast groups recorded in the correspondence table are the same.
[0113] If Mll is issued by using the related technology, then if 10 multicast flows are received through the Layer 3 vlan10 interface, the 10 multicast flows belong to the above 10 multicast groups. Then the related technology will generate 1 platform table entry, 1 LPM table entry and 1 Mll for each multicast flow. In this case, 10 platform table entries, 10 LPM table entries and 10 Mlls will be generated. Each Mll contains 2 nodes, for a total of 20 nodes.
[0114] Furthermore, if 10 multicast flows are received through the Layer 3 vlan20 interface, the 10 multicast flows belong to the above 10 multicast groups. In the related art, 1 platform entry, 1 LPM entry, and 1 Mll are generated for each multicast flow. In this case, 10 platform entries, 10 LPM entries, and 10 Mlls are generated. Each Mll contains 2 nodes, for a total of 20 nodes.
[0115] That is, for the multicast traffic received through the Layer 3 vlan10 interface and the Layer 3 vlan20 interface, a total of 20 platform entries, 20 LPM entries, and 20 Mlls are generated, and the generated Mlls contain a total of 40 nodes. Among them, 20 LPM entries and 20 Mlls are sent to the bottom driver module, and the sent Mlls contain a total of 40 nodes.
[0116] However, if the solution provided by the embodiment of the present application is adopted, for the 10 multicast flows received through the three-layer vlan10 interface, since the 10 multicast groups to which the 10 multicast flows belong correspond to the same outbound interface, the 10 multicast flows all belong to one multicast flow group, and only one Mll needs to be generated. That is, in this case, one Mll will be generated. Each Mll contains 2 nodes, for a total of 2 nodes.
[0117] Similarly, for the 10 multicast flows received through the Layer 3 vlan20 interface, since the 10 multicast groups to which the 10 multicast flows belong correspond to the same outbound interface, the 10 multicast flows all belong to one multicast flow group, and only one Mll needs to be generated. That is, in this case, one Mll will be generated. Each Mll contains 2 nodes, for a total of 2 nodes.
[0118] That is, for the multicast traffic received through the three-layer vlan10 interface and the three-layer vlan20 interface, a total of 2 Mlls are generated, and the generated Mlls contain a total of 4 nodes. Among them, 2 Mlls are sent to the bottom driver module, and the sent Mlls contain a total of 4 nodes.
[0119] As can be seen from Example 2, compared with the related art, the Figure 4 The solution provided by the illustrated embodiment can significantly reduce the occupation of storage resources of the underlying driver module.
[0120] It can be seen from the above that the solution provided in the embodiment of the present application can be applied to multicast traffic received through a three-layer VLAN interface, which can reduce the occupancy of storage resources of the underlying driver module in this case.
[0121] See also Figure 5 , is a flow chart of the fourth three-layer multicast method provided in the embodiment of the present application, which is similar to the above Figure 1 Compared with the embodiment shown, the above step S101 can be implemented by the following step S101B.
[0122] S101B: After receiving the multicast traffic, for an inbound interface whose interface type is a routing interface or a routing aggregation interface, multiple multicast traffics received through all inbound interfaces, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast traffic group.
[0123] In this embodiment, for all multicast traffic received through an inbound interface whose interface type is a routing interface and a routing aggregation interface, the inbound interfaces are not distinguished, but are compared together to divide the multicast traffic groups.
[0124] When the inbound interface of the multicast traffic is a routing interface or a routing aggregation interface, the outbound interface corresponding to the multicast traffic should also be a routing interface, and the first M11 includes a node. The outbound interface field in the node of the first M11 may record a bitmap of the outbound interface.
[0125] For example, there are 10 multicast flows received through routing interface 1 and 10 multicast flows received through routing interface 2. In the embodiment of the present application, a total of 20 multicast flows received through routing interface 1 and routing interface 2 are compared together, and multicast flow groups are divided, and then M11 is generated and issued.
[0126] The following three examples are given below Figure 5 The illustrated embodiment is compared with the related art.
[0127] Example 3: Assume that there are 10 multicast groups, and their multicast addresses are 225.0.0.1 to 225.0.0.10 respectively. And the outbound interfaces corresponding to the 10 multicast groups are the same.
[0128] If Mll is issued by using the related technology, then if 10 multicast traffics are received through routing interface 1, and the 10 multicast traffics belong to the above 10 multicast groups respectively. Then the related technology will generate 1 platform table entry, 1 LPM table entry and 1 Mll for each multicast traffic accordingly. In this case, 10 platform table entries, 10 LPM table entries and 10 Mlls will be generated. Each Mll contains 1 node, for a total of 10 nodes.
[0129] Furthermore, if 10 multicast flows are received through routing interface 2, the 10 multicast flows belong to the above 10 multicast groups respectively. In the related art, 1 platform entry, 1 LPM entry and 1 Mll will be generated for each multicast flow accordingly. In this case, 10 platform entries, 10 LPM entries and 10 Mlls will be generated. Each Mll contains 1 node, for a total of 10 nodes.
[0130] That is, for the multicast traffic received through routing interface 1 and routing interface 2, a total of 20 platform entries, 20 LPM entries and 20 Mlls are generated, and the generated Mlls contain a total of 20 nodes. Among them, 20 LPM entries and 20 Mlls are sent to the underlying driver module, and the sent Mlls contain a total of 20 nodes.
[0131] However, if the solution provided by the embodiment of the present application is adopted, for the 20 multicast flows received through routing interface 1 and routing interface 2, since the 10 multicast groups to which the 20 multicast flows belong correspond to the same outbound interface. Therefore, the 20 multicast flows belong to the multicast flow group, and only one Mll needs to be generated. Each Mll contains one node, for a total of one node. Among them, the Mll sent to the bottom driver module contains a total of one node.
[0132] As can be seen from Example 3, compared with the related art, the Figure 5 The solution provided by the illustrated embodiment can significantly reduce the occupation of storage resources of the underlying driver module.
[0133] It can be seen from the above that the solution provided in the embodiment of the present application can be applied to multicast traffic received through a routing interface or a routing aggregation interface, which can reduce the occupation of storage resources of the underlying driver module in this case.
[0134] In another embodiment of the present application, see Figure 6 , is a flow chart of the fifth three-layer multicast method provided in the embodiment of the present application, which is similar to the above Figure 1 Compared with the embodiment shown, the above method further includes the following steps S104 to S107.
[0135] S104: After receiving the target multicast traffic, determine a target outbound interface corresponding to the target multicast traffic.
[0136] S105: Determine whether there is a second M11 in the bottom-level driver module.
[0137] Among them, the outgoing interface field recorded in the above-mentioned second M11 indicates the above-mentioned target outgoing interface.
[0138] If the second M11 exists, step S106-step S107 is executed; if the second M11 does not exist, the second M11 is generated by using the relevant technology.
[0139] S106: Generate the third M11.
[0140] Among them, the outgoing interface field recorded in the third M11 indicates the target outgoing interface, and the multicast group address field recorded in the third M11 indicates the address of the multicast group to which the target multicast traffic belongs.
[0141] S107: According to the third M11, updating the second M11 in the bottom driving module.
[0142] If there is a second M11, it means that the second M11 corresponding to the target multicast traffic has been issued in the bottom driver module. In this case, there is no need to issue the generated third M11 to the bottom driver module, and only the second M11 needs to be updated so that the second M11 can be used to forward the target multicast traffic.
[0143] Specifically, it can be determined whether the multicast group address field in the second M11 indicates the address of the multicast group of the target multicast traffic. If not, the content recorded in the multicast group address field in the third M11 is added to the multicast group address field in the second M11.
[0144] It should be noted that, in one embodiment of the present application, if the interface type of the incoming interface of the target multicast traffic is a layer 3 vlan interface, then when searching for the second M11, the second M11 is only searched from the M11 corresponding to the layer 3 vlan interface. If the interface type of the incoming interface of the target multicast traffic is a routing interface or a routing aggregation interface, the second M11 is searched from all the M11s corresponding to the routing interfaces or routing aggregation interfaces.
[0145] As can be seen from the above, after receiving the new target multicast traffic, the embodiment of the present application can first determine whether the second M11 recording the target outgoing interface corresponding to the target multicast traffic has been issued in the bottom driver module. If it exists, the second M11 can be directly used to forward the target multicast traffic. The specific processing method is to generate a third M11, and then update the second M11 according to the third M11. That is, there is no need to issue a new M11 to the bottom driver module, so that the occupation of the storage resources of the bottom driver module by M11 can be saved.
[0146] Corresponding to the aforementioned three-layer multicast method, an embodiment of the present application also provides a network device.
[0147] See also Figure 7 , is a schematic diagram of the structure of a network device provided in an embodiment of the present application, wherein the network device includes a memory 701, a transceiver 702, and a processor 703:
[0148] The memory 701 is used to store computer programs; the transceiver 702 is used to send and receive data under the control of the processor 703; the processor 703 is used to read the computer program in the memory 701 and perform the following operations:
[0149] After receiving multicast traffic, multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups are divided into the same multicast traffic group;
[0150] For each multicast traffic group, a first multicast linked list Mll is generated and sent to the underlying driver module, so that the underlying driver module forwards the multicast traffic in the multicast traffic group to the output interface corresponding to the first Mll according to the first Mll received by itself, wherein the output interface field recorded in the first Mll indicates the output interface corresponding to the multicast traffic in the multicast traffic group, and the multicast group address field recorded in the first Mll indicates the address of the multicast group to which all multicast traffic in the multicast traffic group belongs.
[0151] Among them, Figure 7 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 703 and various circuits of memory represented by memory 701 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 702 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, which transmission medium may include a wireless channel, a wired channel, an optical cable, and other transmission media. The processor 703 is responsible for managing the bus architecture and general processing, and the memory 701 may store data used by the processor 703 when performing operations.
[0152] The processor 703 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD). The processor 703 may also adopt a multi-core architecture.
[0153] It should be noted here that the above-mentioned network device provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts of this embodiment that are the same as the method embodiment will not be described in detail here.
[0154] As can be seen from the above, in the solution provided by the embodiment of the present application, after receiving the multicast traffic, the network device first compares the output interfaces corresponding to the multicast traffic. Multiple multicast traffic corresponding to the same output interface and belonging to different multicast groups are divided into the same multicast traffic group. And for each multicast traffic group, an M11 is jointly generated for the multicast traffic in the multicast traffic group. That is, in the embodiment of the present application, only one M11 is generated for multiple multicast traffic in the same multicast traffic group. Compared with the related art in which one M11 is generated for each multicast traffic, the solution provided by the embodiment of the present application can merge M11, thereby saving the storage resources of the underlying hardware occupied by M11, and then reducing the possibility of failure to send M11.
[0155] In one embodiment of the present application, after generating and sending a first multicast chain table M11 to the bottom driver module for each multicast traffic group, the processor is further configured to perform the following operations:
[0156] For each multicast traffic group, a longest prefix match LPM table entry is generated according to the first Mll corresponding to the multicast traffic group and sent to the underlying driver module, wherein the next hop index value in the LPM table entry points to the first Mll.
[0157] As can be seen from the above, in the solution provided in the embodiment of the present application, in addition to generating and issuing the first M11 for the multicast traffic in the multicast traffic group, the LPM table item corresponding to the first M11 will also be issued, and the LPM table item issued for the same multicast traffic group corresponds to the same first M11. Therefore, in the case of implementing M11 merging in the embodiment of the present application, the LPM table item can still be generated and issued normally, ensuring the normal forwarding of the multicast traffic by the underlying driver module.
[0158] In one embodiment of the present application, when receiving multicast traffic through a layer-3 virtual local area network (vlan) interface, the method of dividing multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups into the same multicast traffic group specifically includes:
[0159] For an inbound interface whose interface type is a Layer 3 VLAN interface, multiple multicast flows received through a single inbound interface, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast flow group;
[0160] For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
[0161] It can be seen from the above that the solution provided in the embodiment of the present application can be applied to multicast traffic received through a three-layer VLAN interface, which can reduce the occupancy of storage resources of the underlying driver module in this case.
[0162] In one embodiment of the present application, when receiving multicast traffic through a routing interface or a routing aggregation interface, the method of dividing multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups into the same multicast traffic group specifically includes:
[0163] For an inbound interface whose interface type is a routing interface or a routing aggregation interface, multiple multicast flows received through all inbound interfaces, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast flow group.
[0164] For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
[0165] It can be seen from the above that the solution provided in the embodiment of the present application can be applied to multicast traffic received through a routing interface or a routing aggregation interface, which can reduce the occupation of storage resources of the underlying driver module in this case.
[0166] In one embodiment of the present application, the processor is further configured to perform the following operations:
[0167] After receiving the target multicast traffic, determining a target outbound interface corresponding to the target multicast traffic;
[0168] Determine whether there is a second M11 in the bottom driver module, wherein the output interface field recorded in the second M11 indicates the target output interface;
[0169] If the second M11 exists, a third M11 is generated, wherein the outgoing interface field recorded in the third M11 indicates the target outgoing interface, and the multicast group address field recorded in the third M11 indicates the address of the multicast group to which the target multicast traffic belongs;
[0170] According to the third M11, the second M11 in the bottom driver module is updated.
[0171] As can be seen from the above, after receiving the new target multicast traffic, the embodiment of the present application can first determine whether the second M11 recording the target outgoing interface corresponding to the target multicast traffic has been issued in the bottom driver module. If it exists, the second M11 can be directly used to forward the target multicast traffic. The specific processing method is to generate a third M11, and then update the second M11 according to the third M11. That is, there is no need to issue a new M11 to the bottom driver module, so that the occupation of the storage resources of the bottom driver module by M11 can be saved.
[0172] Corresponding to the aforementioned three-layer multicast method, the embodiment of the present application also provides a three-layer multicast device.
[0173] See also Figure 8, is a schematic diagram of the structure of a three-layer multicast device provided in an embodiment of the present application, the device comprising:
[0174] The traffic division module 801 is used to divide multiple multicast flows corresponding to the same outbound interface and belonging to different multicast groups into the same multicast flow group after receiving the multicast flows;
[0175] The Mll sending module 802 is used to generate and send a first multicast link list Mll to the underlying driver module for each multicast traffic group, so that the underlying driver module forwards the multicast traffic in the multicast traffic group to the output interface corresponding to the first Mll according to the first Mll received by itself, wherein the output interface field recorded in the first Mll indicates the output interface corresponding to the multicast traffic in the multicast traffic group, and the multicast group address field recorded in the first Mll indicates the address of the multicast group to which all multicast traffic in the multicast traffic group belongs.
[0176] As can be seen from the above, in the solution provided by the embodiment of the present application, after receiving the multicast traffic, the network device first compares the output interfaces corresponding to the multicast traffic. Multiple multicast traffic corresponding to the same output interface and belonging to different multicast groups are divided into the same multicast traffic group. And for each multicast traffic group, an M11 is jointly generated for the multicast traffic in the multicast traffic group. That is, in the embodiment of the present application, only one M11 is generated for multiple multicast traffic in the same multicast traffic group. Compared with the related art in which one M11 is generated for each multicast traffic, the solution provided by the embodiment of the present application can merge M11, thereby saving the storage resources of the underlying hardware occupied by M11, and then reducing the possibility of failure to send M11.
[0177] In one embodiment of the present application, the device further includes:
[0178] The LPM sending module is used to generate and send the longest prefix matching LPM table entry to the underlying driver module for each multicast traffic group according to the first Mll corresponding to the multicast traffic group, wherein the next hop index value in the LPM table entry points to the first Mll.
[0179] As can be seen from the above, in the solution provided in the embodiment of the present application, in addition to generating and issuing the first M11 for the multicast traffic in the multicast traffic group, the LPM table item corresponding to the first M11 will also be issued, and the LPM table item issued for the same multicast traffic group corresponds to the same first M11. Therefore, in the case of implementing M11 merging in the embodiment of the present application, the LPM table item can still be generated and issued normally, ensuring the normal forwarding of the multicast traffic by the underlying driver module.
[0180] In one embodiment of the present application, when receiving multicast traffic through a Layer 3 virtual local area network (vlan) interface, the traffic division module 801 is specifically used to:
[0181] After receiving multicast traffic, for the inbound interface whose interface type is a Layer 3 VLAN interface, multiple multicast traffic received through a single inbound interface, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast traffic group;
[0182] For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
[0183] It can be seen from the above that the solution provided in the embodiment of the present application can be applied to multicast traffic received through a three-layer VLAN interface, which can reduce the occupancy of storage resources of the underlying driver module in this case.
[0184] In one embodiment of the present application, when multicast traffic is received through a routing interface or a routing aggregation interface, the traffic division module 801 is specifically used to:
[0185] After receiving multicast traffic, for the inbound interface whose interface type is a routing interface or a routing aggregation interface, multiple multicast traffics received through all inbound interfaces, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast traffic group;
[0186] For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
[0187] It can be seen from the above that the solution provided in the embodiment of the present application can be applied to multicast traffic received through a routing interface or a routing aggregation interface, which can reduce the occupation of storage resources of the underlying driver module in this case.
[0188] In one embodiment of the present application, the device further includes:
[0189] An outbound interface determination module, configured to determine a target outbound interface corresponding to the target multicast traffic after receiving the target multicast traffic;
[0190] An Mll judging module, used for judging whether there is a second Mll in the bottom driver module, wherein the output interface field recorded in the second Mll indicates the target output interface;
[0191] An Mll generating module, configured to generate a third Mll if the second Mll exists, wherein the outgoing interface field recorded in the third Mll indicates the target outgoing interface, and the multicast group address field recorded in the third Mll indicates the address of the multicast group to which the target multicast traffic belongs;
[0192] An Mll updating module is used to update the second Mll in the bottom driver module according to the third Mll.
[0193] As can be seen from the above, after receiving the new target multicast traffic, the embodiment of the present application can first determine whether the second M11 recording the target outgoing interface corresponding to the target multicast traffic has been issued in the bottom driver module. If it exists, the second M11 can be directly used to forward the target multicast traffic. The specific processing method is to generate a third M11, and then update the second M11 according to the third M11. That is, there is no need to issue a new M11 to the bottom driver module, so that the occupation of the storage resources of the bottom driver module by M11 can be saved.
[0194] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above three-layer multicast methods are implemented.
[0195] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes any of the three-layer multicast methods in the above embodiments.
[0196] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, 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 groups of computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more groups of available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0197] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0198] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the network device, apparatus, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0199] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A three-layer multicast method, characterized in that: The method comprises: After receiving multicast traffic, multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups are divided into the same multicast traffic group; For each multicast traffic group, a first multicast linked list Mll is generated and sent to the underlying driver module, so that the underlying driver module forwards the multicast traffic in the multicast traffic group to the output interface corresponding to the first Mll according to the first Mll received by itself, wherein the output interface field recorded in the first Mll indicates the output interface corresponding to the multicast traffic in the multicast traffic group, and the multicast group address field recorded in the first Mll indicates the address of the multicast group to which all multicast traffic in the multicast traffic group belongs.
2. The method according to claim 1, characterized in that After generating and sending a first multicast chain table M11 to the bottom driver module for each multicast traffic group, the method further includes: For each multicast traffic group, a longest prefix match LPM table entry is generated according to the first Mll corresponding to the multicast traffic group and sent to the underlying driver module, wherein the next hop index value in the LPM table entry points to the first Mll.
3. The method according to claim 1, characterized in that In the case of receiving multicast traffic through a Layer 3 virtual local area network (vlan) interface, the method of dividing a plurality of multicast traffic corresponding to the same outbound interface and belonging to different multicast groups into the same multicast traffic group includes: For an inbound interface whose interface type is a Layer 3 VLAN interface, multiple multicast flows received through a single inbound interface, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast flow group; For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
4. The method according to claim 1, characterized in that: In the case where multicast traffic is received through a routing interface or a routing aggregation interface, the method of dividing a plurality of multicast traffic corresponding to the same outgoing interface and belonging to different multicast groups into the same multicast traffic group includes: For an inbound interface whose interface type is a routing interface or a routing aggregation interface, multiple multicast flows received through all inbound interfaces, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast flow group. For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
5. The method according to claim 1, characterized in that: The method further comprises: After receiving the target multicast traffic, determining a target outbound interface corresponding to the target multicast traffic; Determine whether there is a second M11 in the bottom driver module, wherein the output interface field recorded in the second M11 indicates the target output interface; If the second M11 exists, a third M11 is generated, wherein the outgoing interface field recorded in the third M11 indicates the target outgoing interface, and the multicast group address field recorded in the third M11 indicates the address of the multicast group to which the target multicast traffic belongs; According to the third M11, the second M11 in the bottom driver module is updated.
6. A network device, characterized in that: The network device includes a memory, a transceiver, and a processor: A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations: After receiving multicast traffic, multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups are divided into the same multicast traffic group; For each multicast traffic group, a first multicast linked list Mll is generated and sent to the underlying driver module, so that the underlying driver module forwards the multicast traffic in the multicast traffic group to the output interface corresponding to the first Mll according to the first Mll received by itself, wherein the output interface field recorded in the first Mll indicates the output interface corresponding to the multicast traffic in the multicast traffic group, and the multicast group address field recorded in the first Mll indicates the address of the multicast group to which all multicast traffic in the multicast traffic group belongs.
7. The network device according to claim 6, characterized in that: After generating and sending a first multicast chain list M11 to the bottom driver module for each multicast traffic group, the processor is further configured to perform the following operations: For each multicast traffic group, a longest prefix match LPM table entry is generated according to the first Mll corresponding to the multicast traffic group and sent to the underlying driver module, wherein the next hop index value in the LPM table entry points to the first Mll.
8. The network device according to claim 6, characterized in that: In the case of receiving multicast traffic through a Layer 3 virtual local area network (vlan) interface, the method of dividing multiple multicast traffic corresponding to the same outbound interface and belonging to different multicast groups into the same multicast traffic group specifically includes: For an inbound interface whose interface type is a Layer 3 VLAN interface, multiple multicast flows received through a single inbound interface, corresponding to the same outbound interface and belonging to different multicast groups are classified into the same multicast flow group; For each multicast traffic group, the inbound interface field recorded in the generated first M11 indicates the inbound interface corresponding to all multicast traffic in the multicast traffic group.
9. A three-layer multicast device, characterized in that: The device comprises: A traffic division module is used to divide a plurality of multicast flows corresponding to the same outbound interface and belonging to different multicast groups into the same multicast flow group after receiving the multicast flows; The Mll sending module is used to generate and send a first multicast link list Mll to the underlying driver module for each multicast traffic group, so that the underlying driver module forwards the multicast traffic in the multicast traffic group to the output interface corresponding to the first Mll according to the first Mll received by itself, wherein the output interface field recorded in the first Mll indicates the output interface corresponding to the multicast traffic in the multicast traffic group, and the multicast group address field recorded in the first Mll indicates the address of the multicast group to which all multicast traffic in the multicast traffic group belongs.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method and device for issuing multicast forwarding table items
CN102946357A
Multicast forwarding method and device
CN105530188A
Multicast flow forwarding method and device and electronic equipment
CN110391919A
Multicast message forwarding method and device, network equipment and storage medium
CN111010343A
Multicast table entry synchronization method and device based on stacking environment and medium
CN115022261A