Multicast message forwarding method and device, MLAG equipment and program product
By introducing forwarding and exit categories into the multicast forwarding table entries in MLAG networking, the problem of high CPU resource consumption when the aggregation group member port of MLAG device fails is solved, and more efficient multicast packet forwarding and fault convergence are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-04-10
AI Technical Summary
In existing MLAG networking technologies, when a member port of the aggregation group fails, a large number of multicast forwarding table entries need to be added and deleted, resulting in high CPU resource consumption and affecting fault convergence and recovery efficiency.
By introducing forwarding categories and egress categories for multicast forwarding table entries, and clearing the egress category of the forwarding port of non-faulty MLAG devices, multicast packets from faulty MLAG devices are forwarded to non-faulty devices, reducing the need for changes to forwarding table entries.
It improves the efficiency of handling port failures in aggregation groups, reduces failure convergence time, and enhances the processing efficiency of multicast packet forwarding and the flexibility of policy judgment.
Smart Images

Figure CN121842083A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a multicast message forwarding method and device, MLAG equipment and program product. BACKGROUND
[0002] In the MLAG (Multichassis Link Aggregation Group) scenario, multicast traffic needs to enter two MLAG devices in the MLAG network. When the egress is MLAG, the two MLAG devices need to perform load sharing forwarding on the MLAG egress (i.e., the two aggregation group member ports), and each forwards a part of the multicast group traffic. The mainstream load method is to forward the multicast traffic of the odd multicast group address by one MLAG device and the multicast traffic of the even multicast group address by the other MLAG device according to the multicast group address.
[0003] In the prior art, when the MLAG egress is set for the three-layer multicast, whether the MLAG egress is truly added is determined according to the calculation result of the load algorithm. For example, in the odd-even load, the MLAG device 1 only adds the MLAG egress of the odd multicast group, and the MLAG device 2 only adds the MLAG egress of the even multicast group.
[0004] When a link fails, for example, the aggregation group member port of the MLAG device 1 in the MLAG network fails, the MLAG device 2 needs to cancel the load sharing and re-add the MLAG egress in the multicast forwarding table. When the link failure is recovered, the load forwarding needs to be re-performed. For example, when the aggregation group member port of the MLAG device 1 in the MLAG recovers after failure, the MLAG device 2 needs to re-perform the load sharing, delete the MLAG egress in the multicast forwarding table corresponding to the odd multicast group, and the MLAG device 1 adds the MLAG egress in the multicast forwarding table corresponding to the odd multicast group.
[0005] When the number of multicast groups is large, a large number of multicast forwarding table egress addition and deletion operations are required, which occupies a large amount of CPU processing resources. The above-mentioned method is not efficient in processing the aggregation group member port failure and failure recovery, and affects the convergence and recovery time of the aggregation group member port failure. SUMMARY
[0006] The present application relates to the technical field of communication, in particular to a multicast message forwarding method and device, MLAG equipment and program product.
[0007] Embodiments of the present application can be implemented as follows: In a first aspect, the present invention provides a multicast message forwarding method, applied to MLAG devices in a cross-device link aggregation group (MLAG) network, wherein the MLAG network further includes peer MLAG devices, and the method includes: When a fault is detected in the aggregation group member port of the peer MLAG device, the preset exit category corresponding to the forwarding port in the multicast forwarding table entry of this MLAG device that matches the multicast message to be forwarded by the peer MLAG device is cleared, so that the multicast message to be forwarded is forwarded through the forwarding port of this MLAG device.
[0008] In an optional implementation, the method further includes: When the failure of the aggregation group member port of the peer MLAG device is detected to be restored, the forwarding port in this MLAG device is set to the preset exit category so that the multicast message to be forwarded is forwarded again by the forwarding port in the peer MLAG device.
[0009] In an optional implementation, the method further includes: Receive the multicast message to be forwarded; Obtain the target multicast forwarding table entry that matches the multicast group to which the multicast message to be forwarded is sent; The multicast message to be forwarded is processed according to the target forwarding category corresponding to the target multicast forwarding entry and the target exit category corresponding to the forwarding port in the target multicast forwarding entry.
[0010] In an optional implementation, the step of processing the multicast packet to be forwarded according to the target forwarding category corresponding to the target multicast forwarding table entry and the target egress category corresponding to the forwarding port in the target multicast forwarding table entry includes: Obtain the target forwarding category corresponding to the multicast message to be forwarded; Obtain the target egress category corresponding to the forwarding port in the target multicast forwarding table entry; Send the target forwarding category, the target egress category, and the multicast message to be forwarded to the forwarding port in the target multicast forwarding table entry; If the forwarding port in the target multicast forwarding table determines that the target forwarding category and the target egress category match the preset forwarding policy, then the multicast packet to be forwarded is discarded; otherwise, the multicast packet to be forwarded is forwarded.
[0011] In an optional implementation, the forwarding category of the preset forwarding policy is a preset forwarding category, and the exit category of the preset forwarding policy is the preset exit category; Before the step of discarding the multicast packet to be forwarded if the forwarding port in the target multicast forwarding table entry determines that the target forwarding category and the target egress category match the preset forwarding policy, the following steps are included: If the target forwarding category is the preset forwarding category and the target egress category is the preset egress category, then it is determined that it matches the preset forwarding policy; otherwise, it is determined that it does not match the preset forwarding policy.
[0012] In an optional implementation, before detecting a failure at the aggregation group member port of the peer MLAG device, the method further includes: This MLAG device is configured with the same multicast forwarding table entries as the peer MLAG device. The forwarding category corresponding to each multicast forwarding table entry is set with a preset forwarding category according to the load balancing strategy, and the egress category corresponding to the forwarding port in each multicast forwarding table entry is the preset egress category. The preset forwarding category and the preset egress category are used to control the forwarding of the multicast packets to be forwarded.
[0013] Secondly, the present invention provides a multicast message forwarding device, applied to MLAG devices in a cross-device link aggregation group (MLAG) network, wherein the MLAG network further includes peer MLAG devices, and the device comprises: The processing module is configured to, when a fault is detected in the aggregation group member port of the peer MLAG device, clear the preset exit category corresponding to the forwarding port in the multicast forwarding table entry of this MLAG device that matches the multicast message to be forwarded forwarded by the peer MLAG device, so that the multicast message to be forwarded is forwarded through the forwarding port of this MLAG device.
[0014] In an optional implementation, the processing module is further configured to: When the failure of the aggregation group member port of the peer MLAG device is detected to be restored, the forwarding port in this MLAG device is set to the preset exit category so that the multicast message to be forwarded is forwarded again by the forwarding port in the peer MLAG device.
[0015] Thirdly, the present invention provides an MLAG device, including a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement the multicast message forwarding method described in the first aspect when executing the program.
[0016] Fourthly, the present invention provides a program product that, when executed by a processor, implements the multicast message forwarding method described in the first aspect.
[0017] Compared with the prior art, the present invention has the following beneficial effects: This invention introduces forwarding categories and exit categories of multicast forwarding table entries to control the forwarding of multicast packets by MLAG devices in an MLAG network. When the aggregation group member port of an MLAG device in an MLAG network fails, the multicast packets that were originally forwarded by the MLAG device with the failed aggregation group member port can be forwarded to the non-faulty MLAG device by clearing the exit category of the forwarding port. This improves the efficiency of handling aggregation group member port failures and reduces the convergence time of aggregation group member port failures. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a diagram illustrating an example of MLAG networking in this embodiment.
[0020] Figure 2 This is a block diagram of the MLAG device provided in this embodiment.
[0021] Figure 3 This is a flowchart illustrating the multicast message forwarding method provided in this embodiment.
[0022] Figure 4 A block diagram example of the multicast message forwarding device provided in this embodiment. Figure 1 .
[0023] Figure 5 A block diagram example of the multicast message forwarding device provided in this embodiment. Figure 2 .
[0024] Icons: 10-MLAG device; 11-processor; 12-memory; 13-bus; 100-multicast message forwarding device; 110-processing module. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0026] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0027] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0028] In the description of this invention, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.
[0029] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0030] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.
[0031] Please refer to Figure 1 , Figure 1 This is a diagram illustrating an example of MLAG networking provided in this embodiment. Figure 1 In this context, MLAG networking includes MLAG device 1 and MLAG device 2 belonging to the same MLAG. MLAG device 1 and MLAG device 2 establish a peer-link. The peer-link is a aggregation of direct links between MLAG device 1 and MLAG device 2, used for exchanging MLAG protocol multicast messages and transmitting data traffic. Figure 1 Access devices 1 and 2 are dual-homed to MLAG, and MLAG devices 1 and MLAG devices 2 can jointly forward multicast traffic from the uplink multicast forwarding device to both access devices. Figure 1For example, MLAG device 1 and MLAG device 2 are configured with link aggregation groups linkagg1 connecting to access device 1 and link aggregation groups linkagg2 connecting to access device 2, respectively. Linkagg1 of both MLAG devices is added to mlag group1, and linkagg2 of both MLAG devices is added to mlag group2. The two MLAG devices are connected to the multicast forwarding device via a Layer 3 interface to receive multicast traffic from the multicast forwarding device.
[0032] In existing technologies, multicast forwarding tables include at least one multicast forwarding entry, and each multicast forwarding entry corresponds to at least one forwarding port of a multicast group. For example, for MLAG networking using parity load, the forwarding tables of MLAG device 1 and MLAG device 2 are shown in Table 1:
[0033] Table 1 In Table 1, multicast group 224.xx.xx.1 in MLAG device 1 corresponds to two link aggregation groups, linkagg1 and linkagg2. Under normal circumstances, the linkagg1 and linkagg2 member ports on MLAG device 1 only forward traffic from the odd-numbered multicast group 224.xx.xx.1 and not from the even-numbered multicast group 224.xx.xx.2. In MLAG device 2, multicast group 224.xx.xx.2 corresponds to two link aggregation member ports, linkagg1 and linkagg2. The linkagg1 and linkagg2 member ports on MLAG device 1 only forward traffic from the even-numbered multicast group 224.xx.xx.2 and not from the odd-numbered multicast group 224.xx.xx.1.
[0034] To avoid the need for numerous multicast forwarding table entry addition and deletion operations when any MLAG device's aggregation group member port fails, due to the large number of multicast groups, which would consume significant CPU processing resources and reduce the efficiency and convergence time of aggregation group member port failure handling, this embodiment introduces forwarding categories for multicast forwarding entries and exit categories for forwarding ports. A forwarding category is set for each multicast group, and an exit category is set for each forwarding port. A forwarding strategy is set based on the forwarding and exit categories. When any MLAG device's aggregation group member port fails, the exit category of the forwarding port in the non-faulty MLAG device is cleared, causing multicast packets originally forwarded by the MLAG device with the failed aggregation group member port to be forwarded by the non-faulty MLAG device. This will be described in detail below.
[0035] First, this embodiment provides Figure 1 Please refer to the example block diagram of the MLAG equipment.Figure 2 , Figure 2 This is a block diagram of the MLAG equipment provided in this embodiment. Figure 2 The MLAG device in the middle can be Figure 1 MLAG device 1 in the middle can also be Figure 1 The MLAG device 2 in the embodiment implements the multicast message forwarding method of this embodiment. The MLAG device 10 includes a processor 11, a memory 12 and a bus 13, and the processor 11 and the memory 12 are connected through the bus 13.
[0036] The processor 11 can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the multicast message forwarding method in this embodiment can be completed by the integrated logic circuits in the processor 11 or by software instructions. The processor 11 can be a general-purpose processor, including a CPU (Central Processing Unit), an NP (Network Processor), etc.; it can also be a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Logic Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0037] The memory 12 is used to store the program that implements the multicast message forwarding method of this embodiment. The program may be a software function module stored in the memory 12 in the form of software or firmware or embedded in the OS (Operating System) of the MLAG device 10.
[0038] After receiving the execution instruction, the processor 11 executes the program to implement the multicast message forwarding method of this embodiment.
[0039] based on Figure 1 and Figure 2 This embodiment also provides an application for Figure 1 and Figure 2 For instructions on multicast message forwarding methods in MLAG devices, please refer to [link / reference]. Figure 3 , Figure 3 This is a flowchart illustrating the multicast message forwarding method provided in this embodiment. The method includes the following steps: Step S101: When a fault is detected in the aggregation group member port of the peer MLAG device, the preset exit category corresponding to the forwarding port in the multicast forwarding table entry of this MLAG device that matches the multicast message to be forwarded by the peer MLAG device is cleared, so that the multicast message to be forwarded is forwarded through the forwarding port of this MLAG device.
[0040] In this embodiment, with Figure 1 Taking MLAG device 1 as an example, MLAG device 1 and MLAG device 2 are the local MLAG device and the peer MLAG device, respectively. Both MLAG devices are configured with the same multicast forwarding table entries, and the forwarding category corresponding to each multicast forwarding table entry is set according to the load balancing strategy. That is, the matching multicast forwarding table entries forwarded by MLAG device 1 are set to one category, and the matching multicast forwarding table entries forwarded by MLAG device 2 are set to another category. The forwarding category corresponding to each multicast forwarding table entry in both the local and peer MLAG devices is set to a preset forwarding category according to the load balancing strategy, and the egress category corresponding to the forwarding port in each multicast forwarding table entry is a preset egress category. The preset forwarding category and preset egress category are used for forwarding control of the multicast packets to be forwarded. It should be noted that in specific embodiments of the present invention, the load balancing strategy is not limited to odd-even load balancing; load balancing can also be performed based on the multicast source address, in which case the corresponding forwarding category can be set in the matching multicast forwarding table entries of the two MLAG devices.
[0041] For example, this embodiment improves the multicast forwarding entries in Table 1. After the improvement, both MLAG device 1 and MLAG device 2 store the same multicast forwarding entries. The multicast forwarding entries of MLAG device 1 and MLAG device 2 are shown in Table 2.
[0042] Table 2
[0043] In Table 2, multicast groups 224.xx.xx.1 and 224.xx.xx.2 both correspond to the two link aggregation groups, linkagg1 and linkagg2. In the two MLAG devices, according to the load balancing strategy, the forwarding category corresponding to the multicast forwarding table entry for the odd-numbered multicast group 224.xx.xx.1 forwarded by MLAG device 1 is forwarding category 1, and the forwarding category corresponding to the multicast forwarding table entry for the even-numbered multicast group 224.xx.xx.2 is forwarding category 2. The egress category for both linkagg1 and linkagg2 is egress category 1. If both MLAG device 1 and MLAG device 2 are functioning normally, MLAG device 1 forwards multicast packets destined for multicast group 224.xx.xx.1, and MLAG device 2 forwards multicast packets destined for multicast group 224.xx.xx.2. For MLAG device 1, the preset forwarding category corresponding to the multicast forwarding table entry for multicast group 224.xx.xx.2 is set to category 2, and the preset egress category corresponding to the forwarding port linkagg1 and linkagg2 in the multicast forwarding table entry for multicast group 224.xx.xx.2 is set to category 1.
[0044] To achieve the purpose of forwarding control for multicast packets, one implementation method is as follows: Set the forwarding policy of MLAG device 1 to: forwarding category is forwarding category 2 and egress category is egress category 1. If the forwarding policy is met, the packet is discarded; otherwise, it is forwarded normally. When MLAG device 1 receives a multicast packet destined for even multicast group 224.xx.xx.2, if the forwarding policy is met, the multicast packet is discarded. When MLAG device 1 receives a multicast packet destined for multicast group 224.xx.xx.1, if the forwarding policy is not met, the multicast packet is forwarded normally. When a member port of the aggregation group of MLAG device 2 fails, in order to transfer the multicast packets originally forwarded by MLAG device 2 to MLAG device 1 for forwarding, MLAG device 1 clears the preset egress category corresponding to the forwarding port linkagg1 in the multicast forwarding table entry that matches 224.xx.xx.2 in its MLAG device. Then, when MLAG device 1 receives a multicast packet destined for multicast group 224.xx.xx.2, since the preset egress category of the forwarding port linkagg1 has been cleared, the forwarding policy is not met, and the multicast packet is forwarded.
[0045] It should be noted that the same applies to MLAG device 2. For example, the forwarding policy of MLAG device 2 can be set as follows: if the forwarding category is forwarding category 1 and the egress category is egress category 1, the packet is discarded; otherwise, it is forwarded normally. This ensures that when both MLAG device 1 and MLAG device 2 are functioning normally, MLAG device 1 forwards multicast packets destined for odd-numbered multicast group 224.xx.xx.1, and MLAG device 2 forwards multicast packets destined for even-numbered multicast group 224.xx.xx.2. When the aggregation group member port of MLAG device 1 fails, the preset egress category of the forwarding port linkagg1 corresponding to the multicast forwarding table entry matching 224.xx.xx.1 in MLAG device 2 is cleared. Therefore, when MLAG device 2 receives a multicast packet destined for multicast group 224.xx.xx.1, since the preset egress category of the forwarding port linkagg1 has been cleared, the forwarding policy is not met, and the multicast packet is forwarded.
[0046] The method provided in this embodiment introduces the forwarding category and the exit category of the forwarding port in the multicast forwarding table to control the multicast packet forwarding of MLAG devices according to the forwarding category and the exit category. When the aggregation group member port of the MLAG device fails, the multicast packets that were originally forwarded by the MLAG device with the failed aggregation group member port can be forwarded to the non-faulty MLAG device by clearing the exit category of the forwarding port. This improves the efficiency of handling aggregation group member port failures and reduces the convergence time of aggregation group member port failures.
[0047] In an optional implementation, in order to quickly achieve balanced multicast packet forwarding between the local MLAG device and the peer MLAG device after the aggregation group member port of the peer MLAG device recovers from a failure, this embodiment also provides an implementation method: When the failure of the aggregation group member port of the peer MLAG device is detected to be restored, the forwarding port in this MLAG device is set to the preset exit category so that the multicast packets to be forwarded are forwarded again by the corresponding forwarding port in the peer MLAG device.
[0048] In this embodiment, taking Table 1 above as an example, when the aggregation group member port of MLAG device 2 recovers from the failure, the preset egress category of the forwarding port linkagg1 is set to category 1. When MLAG device 1 receives a multicast message destined for multicast group 224.xx.xx.2, since the preset egress category of the forwarding port linkagg1 has been reset to category 1, the forwarding policy is satisfied, and the multicast message is discarded.
[0049] In an optional implementation, by introducing the forwarding category and the egress category of the multicast forwarding table entry, multicast packet forwarding control can be performed on MLAG devices in the MLAG network based on the forwarding category and egress category. This embodiment provides one implementation method in this case: First, receive multicast messages to be forwarded; Secondly, obtain the target multicast forwarding table entry that matches the multicast group to which the multicast message to be forwarded is sent; In this embodiment, the destination address carried in the multicast message to be forwarded is the address of the multicast group. The forwarding table may include multicast forwarding entries for at least one multicast group, and the target multicast forwarding entry is the multicast forwarding entry in the forwarding table that matches the multicast group to which the multicast message to be forwarded is sent. For example, if the forwarding table is as shown in Table 2 above, and the destination address carried in the multicast message to be forwarded is 224.xx.xx.1, then the target multicast forwarding entry is the multicast forwarding entry in the first row of Table 1.
[0050] Finally, the multicast packets to be forwarded are processed according to the target forwarding category of the target multicast forwarding table entry and the target exit category corresponding to the forwarding port in the target multicast forwarding table entry.
[0051] In this embodiment, multicast forwarding entries in the forwarding table can be pre-classified according to load requirements, and a forwarding category can be set for each multicast forwarding entry. Simultaneously, forwarding ports can be classified, and a corresponding egress category can be set for each forwarding port. Based on actual forwarding needs, forwarding policies are set according to the forwarding categories and egress categories, and these policies control the forwarding and dropping of multicast packets. As one implementation method, the forwarding categories can be recorded in the corresponding multicast forwarding entries, and the correspondence between forwarding ports and egress categories can be recorded in the forwarding chip.
[0052] In an optional implementation, to facilitate correct determination of the processing method for the multicast packets to be forwarded at the forwarding port, this embodiment provides an implementation method for processing the multicast packets to be forwarded based on the target forwarding category corresponding to the target multicast forwarding entry and the target exit category corresponding to the forwarding port in the target multicast forwarding entry: First, obtain the target forwarding category corresponding to the multicast packet to be forwarded; then, obtain the target egress category corresponding to the forwarding port in the target multicast forwarding table entry. In this embodiment, there are at least two ways to obtain the target forwarding category and the target egress category: The first method involves including the target forwarding category and target exit category in the forwarding multicast message. These can be extracted from the multicast message header at any time when needed to determine the processing method.
[0053] In this embodiment, as an implementation method, in order to avoid modifying the multicast message to be forwarded itself, an additional layer of encapsulation can be added on top of the multicast message to be forwarded, and the target forwarding category can be encapsulated in the header of the outer encapsulation.
[0054] The second method involves pre-setting the target forwarding category and target exit category in the register of the MLAG device's switching chip, and retrieving them from the register when needed.
[0055] Secondly, the target forwarding category, target exit category, and multicast message to be forwarded are sent to the forwarding port in the target multicast forwarding table entry; Finally, if the forwarding port in the target multicast forwarding table entry determines that the target forwarding category and target egress category match the preset forwarding policy, the multicast packet to be forwarded is discarded; otherwise, the multicast packet to be forwarded is forwarded.
[0056] In this embodiment, a preset forwarding policy is used to control the forwarding and discarding of multicast packets received by this MLAG device.
[0057] In an optional implementation, as a way to determine whether the target forwarding category and the target egress category match the preset forwarding policy, the matching rules corresponding to the preset forwarding policy can be predetermined and recorded before the determination is made. One implementation is as follows: If the target forwarding category is a preset forwarding category and the target exit category is a preset exit category, then it is determined that it matches the preset forwarding policy; otherwise, it is determined that it does not match the preset forwarding policy.
[0058] In this embodiment, the matching rule corresponding to the preset forwarding strategy of MLAG device 1 can be: the preset forwarding category is forwarding category 2 and the preset exit category is exit category 1. If the target forwarding category is forwarding category 2 and the target exit category is exit category 1, it is determined to match the preset forwarding strategy; otherwise, it is determined not to match.
[0059] To perform the corresponding steps in the above embodiments and various possible implementations, an implementation method of the multicast message forwarding device 100 is given below. Please refer to... Figure 4 , Figure 4 A block diagram of the multicast message forwarding device provided in this embodiment. Figure 1 It should be noted that the multicast message forwarding device 100 provided by the present invention has the same basic principle and technical effect as the corresponding embodiment described above. For the sake of brevity, this embodiment does not mention it.
[0060] The multicast message forwarding device 100 includes a processing module 110.
[0061] Processing module 110 is used to clear the preset exit category corresponding to the forwarding port in the multicast forwarding table entry of this MLAG device that matches the multicast message to be forwarded forwarded by the peer MLAG device when a failure of the aggregation group member port of the peer MLAG device is detected, so that the multicast message to be forwarded is forwarded through the forwarding port of this MLAG device.
[0062] In an optional implementation, the processing module 110 is further configured to: When the failure of the aggregation group member port of the peer MLAG device is detected to be restored, the forwarding port in this MLAG device is set to the preset exit category so that the multicast packets to be forwarded are forwarded again by the forwarding port of the peer MLAG device.
[0063] In an optional implementation, the processing module 110 is further configured to: Receive multicast messages to be forwarded; Retrieve the target multicast forwarding table entry that matches the multicast group to which the multicast message to be forwarded is sent; The multicast packets to be forwarded are processed according to the target forwarding category corresponding to the target multicast forwarding entry and the target exit category corresponding to the forwarding port in the target multicast forwarding entry.
[0064] In an optional implementation, the processing module 110, when processing the multicast packet to be forwarded according to the target forwarding category corresponding to the target multicast forwarding entry and the target egress category corresponding to the forwarding port in the target multicast forwarding entry, specifically performs the following: Obtain the target forwarding category corresponding to the multicast message to be forwarded; Obtain the target egress category corresponding to the forwarding port in the target multicast forwarding table entry; send the target forwarding category, target egress category, and multicast message to be forwarded to the forwarding port in the target multicast forwarding table entry; if the forwarding port in the target multicast forwarding table entry determines that the target forwarding category and target egress category match the preset forwarding strategy, then discard the multicast message to be forwarded; otherwise, forward the multicast message to be forwarded.
[0065] In an optional implementation, the forwarding category of the preset forwarding policy is a preset forwarding category, and the exit category of the preset forwarding policy is a preset exit category; the processing module 110 is further configured to: If the target forwarding category is a preset forwarding category and the target exit category is a preset exit category, then it is determined that it matches the preset forwarding policy; otherwise, it is determined that it does not match the preset forwarding policy.
[0066] In an optional implementation, the MLAG device is configured with the same multicast forwarding table entries as the peer MLAG device. The forwarding category corresponding to each multicast forwarding table entry is set to a preset forwarding category according to the load balancing strategy, and the egress category corresponding to the forwarding port in each multicast forwarding table entry is a preset egress category. The preset forwarding category and the preset egress category are used to control the forwarding of multicast packets to be forwarded.
[0067] As another implementation, the multicast message forwarding device 100 can be divided into a forwarding table classification module, a forwarding exit classification module, a forwarding strategy module, and a forwarding module. Please refer to [reference needed]. Figure 5 , Figure 5 A block diagram example of the multicast message forwarding device provided in this embodiment. Figure 2 , Figure 5 The processing functions implemented by each module are as follows: The forwarding table classification module is used to classify forwarding tables and record the correspondence between forwarding rules and forwarding table categories.
[0068] The forwarding exit classification module is used to classify forwarding exits and record the correspondence between forwarding rules and forwarding exit categories.
[0069] As one implementation method, the correspondence between forwarding rules and forwarding table categories, as well as the correspondence between forwarding rules and forwarding exit categories, can be stored in the switching chip of the MLAG device.
[0070] The forwarding strategy module is used to match multicast packets according to preset rules and process the multicast packets according to specified behaviors. In this embodiment, the matching rules are forwarding category and exit category, and the processing behavior is to discard or forward.
[0071] The required processing in the control flow includes: setting the rules of the forwarding table classification module and setting the calculated classification into the forwarding table; setting the rules of the forwarding exit classification module and setting the calculated classification into the forwarding port; setting the matching rules of the forwarding policy module and the processing behavior of multicast packets.
[0072] In the multicast packet forwarding process, the forwarding module needs to perform the following processing: obtain the forwarding table category based on the forwarding table and mark it in the multicast packet; during the forwarding egress processing, obtain the forwarding egress category based on the forwarding port table and mark it in the multicast packet; based on the forwarding table category and the forwarding egress category, the forwarding strategy module processes the multicast packet according to preset matching rules and performs preset behavior processing. Therefore, when a peer member's aggregation group member port in an MLAG fails, and the local MLAG device needs to forward the packet, only the rules of the forwarding egress classification module need to be updated to complete the forwarding behavior update for all relevant forwarding tables, without needing to add a forwarding egress for each forwarding table.
[0073] This embodiment provides a program product that, when executed by a processor, implements the multicast message forwarding method described in this embodiment.
[0074] In summary, this invention provides a multicast message forwarding method, apparatus, MLAG device, and program product, applied to MLAG devices in MLAG networking, which also includes peer MLAG devices. The method includes: when a fault is detected in the aggregation group member port of the peer MLAG device, clearing the preset exit category of the forwarding port corresponding to the multicast forwarding table entry in this MLAG device that matches the multicast message to be forwarded by the peer MLAG device, so that the multicast message to be forwarded is forwarded through the forwarding port of this MLAG device. Compared with the prior art, this embodiment has at least the following advantages: (1) By introducing the forwarding category of the multicast forwarding table entry and the exit category of the forwarding port, the multicast message forwarding control of the MLAG device is performed according to the forwarding category and the exit category. When the aggregation group member port of the MLAG device fails, the multicast message originally forwarded by the MLAG device with the faulty aggregation group member port can be forwarded to the non-faulty MLAG device by clearing the exit category of the forwarding port. Especially when the number of multicast forwarding table entries is large, the change of forwarding logic can be completed in batches. (1) Improved the efficiency of handling port failures in the aggregation group and reduced the convergence time of port failures in the aggregation group. (2) The forwarding category of the multicast forwarding table entry and the exit category of the forwarding port are carried in the multicast message to be forwarded, which improves the flexibility of forwarding strategy judgment. (3) The forwarding category of the multicast forwarding table entry and the exit category of the forwarding port are stored in the switching chip to speed up the reading efficiency of the forwarding category and the exit category, thereby improving the multicast message processing efficiency.
[0075] The above descriptions are merely various embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A multicast message forwarding method, characterized in that, The method, applied to MLAG devices in a cross-device link aggregation group (MLAG) network, wherein the MLAG network also includes peer MLAG devices, comprises: When a fault is detected in the aggregation group member port of the peer MLAG device, the preset exit category corresponding to the forwarding port in the multicast forwarding table entry of this MLAG device that matches the multicast message to be forwarded by the peer MLAG device is cleared, so that the multicast message to be forwarded is forwarded through the forwarding port of this MLAG device.
2. The method according to claim 1, characterized in that, The method further includes: When the failure of the aggregation group member port of the peer MLAG device is detected to be restored, the forwarding port in this MLAG device is set to the preset exit category so that the multicast message to be forwarded is forwarded again by the forwarding port in the peer MLAG device.
3. The method according to claim 1, characterized in that, The method further includes: Receive the multicast message to be forwarded; Obtain the target multicast forwarding table entry that matches the multicast group to which the multicast message to be forwarded is sent; The multicast message to be forwarded is processed according to the target forwarding category corresponding to the target multicast forwarding entry and the target exit category corresponding to the forwarding port in the target multicast forwarding entry.
4. The method according to claim 3, characterized in that, The step of processing the multicast message to be forwarded according to the target forwarding category corresponding to the target multicast forwarding table entry and the target egress category corresponding to the forwarding port in the target multicast forwarding table entry includes: Obtain the target forwarding category corresponding to the multicast message to be forwarded; Obtain the target egress category corresponding to the forwarding port in the target multicast forwarding table entry; Send the target forwarding category, the target egress category, and the multicast message to be forwarded to the forwarding port in the target multicast forwarding table entry; If the forwarding port in the target multicast forwarding table determines that the target forwarding category and the target egress category match the preset forwarding policy, then the multicast packet to be forwarded is discarded; otherwise, the multicast packet to be forwarded is forwarded.
5. The method according to claim 4, characterized in that, The forwarding category of the preset forwarding strategy is the preset forwarding category, and the exit category of the preset forwarding strategy is the preset exit category; Before the step of discarding the multicast packet to be forwarded if the forwarding port in the target multicast forwarding table entry determines that the target forwarding category and the target egress category match the preset forwarding policy, the following steps are included: If the target forwarding category is the preset forwarding category and the target egress category is the preset egress category, then it is determined that it matches the preset forwarding policy; otherwise, it is determined that it does not match the preset forwarding policy.
6. The method according to any one of claims 1-5, characterized in that, Prior to detecting a failure in the aggregation group member port of the peer MLAG device, the method further includes: The same multicast forwarding table entries are set in this MLAG device as those in the peer MLAG device. The forwarding category corresponding to each multicast forwarding table entry is set to a preset forwarding category according to the load sharing strategy, and the egress category corresponding to the forwarding port in each multicast forwarding table entry is the preset egress category. The preset forwarding category and the preset egress category are used to control the forwarding of the multicast packets to be forwarded.
7. A multicast message forwarding device, characterized in that, An MLAG device applied in a cross-device link aggregation group MLAG network, wherein the MLAG network also includes a peer MLAG device, the device comprising: The processing module is configured to, when a fault is detected in the aggregation group member port of the peer MLAG device, clear the preset exit category corresponding to the forwarding port in the multicast forwarding table entry of this MLAG device that matches the multicast message to be forwarded forwarded by the peer MLAG device, so that the multicast message to be forwarded is forwarded through the forwarding port of this MLAG device.
8. The apparatus according to claim 7, characterized in that, The processing module is also used for: When the failure of the aggregation group member port of the peer MLAG device is detected to be restored, the forwarding port in this MLAG device is set to the preset exit category so that the multicast message to be forwarded is forwarded again by the forwarding port in the peer MLAG device.
9. An MLAG device, characterized in that, It includes a processor and a memory, the memory being used to store a program, and the processor being used to implement the multicast message forwarding method according to any one of claims 1-6 when executing the program.
10. A program product, characterized in that, When the program product is executed by the processor, it implements the multicast message forwarding method according to any one of claims 1-6.