Method and apparatus for distributing Layer 3 multicast configurations to network devices
By generating batch parameters and implementing a channel status awareness mechanism, the problem of large volume and low efficiency in distributing Layer 3 multicast configurations has been solved, achieving efficient and stable multicast configuration distribution, which is suitable for large-scale multicast scenarios.
Patent Information
- Application Number
- CN202610213763.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-13
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies involve a huge amount of configuration during the distribution of Layer 3 multicast configurations, resulting in high CPU and channel resource consumption, which can easily lead to channel congestion and hot-swapping of cards, making them unsuitable for large-scale multicast networking needs.
By generating batch parameters, all outgoing port information corresponding to VLANIF is summarized, and the batch distribution channel is used to distribute the information to the driver layer at once. A channel status awareness mechanism is introduced to update the multicast forwarding table entries of the switching chip asynchronously.
It significantly reduced the amount of configuration distribution, improved distribution efficiency and system stability, reduced the risk of channel congestion, and ensured equipment reliability and business continuity in large-scale multicast scenarios.
Smart Images

Figure CN122093250A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer information processing, and more specifically, to a method and apparatus for distributing three-layer multicast configurations to network devices. Background Technology
[0002] With the widespread application of IP multicast technology in scenarios such as live video streaming, distance education, and multimedia applications, Layer 3 multicast has gradually evolved into one of the indispensable core functions of network devices. In a typical Layer 3 multicast forwarding process, multicast traffic first converges in the upper-layer network and then is distributed to downstream users or business systems through the VLANIF interface. The switching chip, as a hardware forwarding unit, needs to copy and forward data packets according to the multicast forwarding table entries to ensure that every legitimate receiving port can correctly receive the multicast packets.
[0003] However, since the exit point of a Layer 3 multicast entry is a Layer 3 VLANIF port, all physical ports and aggregated ports corresponding to the specified VLANIF need to be added when distributing configurations to the chip, resulting in a huge amount of configuration distribution. Especially in distributed devices, each slot needs to receive configurations independently, further exacerbating configuration redundancy and channel load. Therefore, how to significantly reduce the amount of configuration distribution while maintaining the integrity of Layer 3 multicast functionality and improving the channel efficiency and stability of distributed devices has become a technical problem that needs to be solved.
[0004] Currently, Layer 3 multicast configuration distribution for network devices uses a method that iterates through all physical ports and aggregation ports. Specifically, for each multicast group, all physical port IDs and aggregation port IDs under its member VLANIF ports are sequentially distributed to the switching chip. This existing technology involves a large number of repetitive configuration operations, consuming CPU and channel resources and causing configuration delays. Furthermore, high-frequency distribution in a short period can easily lead to channel congestion, heartbeat timeouts, and even hot-swapping of circuit boards. As the multicast scale or the number of ports increases, the distribution volume increases exponentially, making it unsuitable for large-scale multicast networking requirements.
[0005] Therefore, a new method and device for distributing Layer 3 multicast configurations to network devices is needed.
[0006] The information disclosed in the background section is only intended to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0007] In view of this, this application provides a method and apparatus for distributing Layer 3 multicast configurations to network devices, which can significantly improve the distribution efficiency and system stability in large-scale multicast scenarios while ensuring functional integrity.
[0008] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0009] According to one aspect of this application, a method for distributing Layer 3 multicast configurations to network devices is proposed. The method includes: obtaining a Layer 3 multicast configuration to be distributed, wherein the Layer 3 multicast configuration uses a Layer 3 virtual interface VLANIF as its exit point; aggregating and processing the port information of all exit points corresponding to the VLANIF to generate batch parameters; distributing the batch parameters to the driver layer in one go through a batch distribution channel; the driver layer parsing the batch parameters to generate corresponding multicast forwarding table entries; and distributing the multicast forwarding table entries to a switching chip to update the multicast forwarding table entries in the switching chip.
[0010] In one exemplary embodiment of this application, the port information of all exits corresponding to the VLANIF is aggregated and processed to generate batch parameters, including: aggregating and processing the port information of all exits corresponding to the VLANIF to generate an aggregated port ID bitmap and a physical port ID bitmap.
[0011] In one exemplary embodiment of this application, the batch parameters are sent to the driver layer at once through a batch sending channel, which includes: querying the channel status interface provided by the driver layer to obtain the busy status of the batch sending channel; if the batch sending channel is in a non-busy state, the batch parameters are sent to the driver layer at once.
[0012] In one exemplary embodiment of this application, the batch parameters are sent to the driver layer at once through a batch sending channel, and the method further includes: if the batch sending channel is busy, the sending operation is performed after a preset time.
[0013] In one exemplary embodiment of this application, the driver layer parses the batch parameters to generate corresponding multicast forwarding entries, including: the driver layer parses the batch parameters to obtain an aggregation port ID bitmap and a physical port ID bitmap; determines a target output port set based on the aggregation port ID bitmap and the physical port ID bitmap; and generates multicast forwarding entries based on the target output port set.
[0014] In one exemplary embodiment of this application, generating multicast forwarding entries based on the target output port set includes: constructing a multicast forwarding entry structure conforming to the switching chip format based on the target output port set.
[0015] In one exemplary embodiment of this application, sending the multicast forwarding table entry to the switching chip includes: the driver layer sending the multicast forwarding table entry to the switching chip asynchronously.
[0016] In one exemplary embodiment of this application, the driver layer asynchronously sends the multicast forwarding table entry to the switching chip, including: the driver layer placing the multicast forwarding table entry into the channel packet sending queue; and an independent asynchronous processing thread retrieving the multicast forwarding table entry from the channel packet sending queue and sending it to the switching chip.
[0017] In one exemplary embodiment of this application, the switching chip further includes: implementing the replication and forwarding of Layer 3 multicast messages based on multicast forwarding table entries.
[0018] According to one aspect of this application, a Layer 3 multicast configuration distribution device for network devices is proposed. The device includes: a configuration module for acquiring a Layer 3 multicast configuration to be distributed, wherein the Layer 3 multicast configuration uses a Layer 3 virtual interface VLANIF as the exit point; a parameter module for summarizing and processing port information of all exit points corresponding to the VLANIF to generate batch parameters; a batching module for distributing the batch parameters to the driver layer at once through a batch distribution channel; a parsing module for the driver layer to parse the batch parameters and generate corresponding multicast forwarding table entries; and a distribution module for distributing the multicast forwarding table entries to a switching chip to update the multicast forwarding table entries in the switching chip.
[0019] According to one aspect of this application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the method as described above.
[0020] According to one aspect of this application, a computer-readable medium is provided having a computer program stored thereon that, when executed by a processor, implements the method described above.
[0021] According to the Layer 3 multicast configuration distribution method and apparatus for network devices in this application, by acquiring the Layer 3 multicast configuration to be distributed, wherein the Layer 3 multicast configuration uses a Layer 3 virtual interface VLANIF as the exit point; summarizing and processing the port information of all exit points corresponding to the VLANIF to generate batch parameters; distributing the batch parameters to the driver layer at once through a batch distribution channel; the driver layer parses the batch parameters to generate corresponding multicast forwarding table entries; and distributing the multicast forwarding table entries to the switching chip to update the multicast forwarding table entries in the switching chip, the distribution efficiency and system stability in large-scale multicast scenarios can be significantly improved while ensuring functional integrity.
[0022] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0023] The above and other objects, features, and advantages of this application will become more apparent from the detailed description of exemplary embodiments with reference to the accompanying drawings. The drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0024] Figure 1 This is a flowchart illustrating a method for distributing Layer 3 multicast configurations to network devices according to an exemplary embodiment.
[0025] Figure 2 This is a flowchart illustrating a method for distributing Layer 3 multicast configurations to network devices according to another exemplary embodiment.
[0026] Figure 3 This is a flowchart illustrating a method for distributing Layer 3 multicast configurations to network devices according to another exemplary embodiment.
[0027] Figure 4 This is a block diagram illustrating a Layer 3 multicast configuration distribution apparatus for network devices according to an exemplary embodiment.
[0028] Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment.
[0029] Figure 6 This is a block diagram illustrating a computer-readable medium according to an exemplary embodiment. Detailed Implementation
[0030] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.
[0031] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0032] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0033] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0034] It should be understood that although the terms first, second, third, etc., may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of this application. As used herein, the term "and / or" includes all combinations of any one and more of the associated listed items.
[0035] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily essential for implementing this application, and therefore cannot be used to limit the scope of protection of this application.
[0036] The technical abbreviations used in this application are explained as follows: VLANIF: Virtual Local Area Network Interface. A logical interface on a switching device used for Layer 3 forwarding.
[0037] Layer 3 multicast: A multicast technology implemented based on the IP network layer. It uses multicast routing protocols (such as PIM and IGMP) to build a distribution tree, enabling efficient data transmission from one point to multiple points.
[0038] Physical port: The actual physical port on a switching chip or switching device, used for the physical transmission and reception of data.
[0039] Aggregated port: A logical port formed by binding multiple physical ports, used to improve bandwidth and link redundancy.
[0040] Bitmap: A data structure that uses binary bits to indicate the presence or absence of a resource. In this application, it is used to efficiently represent the set of physical port IDs or aggregate port IDs that need to be issued.
[0041] Distributed devices: Network devices consisting of multiple independent processing units (such as main control boards and interface boards), which communicate with each other through internal channels and support distributed forwarding and control.
[0042] Channel heartbeat: A mechanism used in distributed devices to detect the status of inter-board communication, periodically sending heartbeat messages to ensure the survival and synchronization of each unit.
[0043] This application aims to address the issues of excessive configuration distribution, easy congestion of distributed device channels, and high risks associated with hot-swapping of boards in Layer 3 multicast scenarios. By employing batch distribution methods and channel status awareness methods, it achieves efficient and stable Layer 3 multicast configuration distribution, ensuring device reliability and service continuity.
[0044] The content of this application will be described in detail below with the aid of specific embodiments.
[0045] Figure 1 This is a flowchart illustrating a Layer 3 multicast configuration distribution method for network devices according to an exemplary embodiment. The Layer 3 multicast configuration distribution method 10 for network devices includes at least steps S102 to S110.
[0046] like Figure 1 As shown, in S102, the Layer 3 multicast configuration to be sent is obtained, wherein the Layer 3 multicast configuration uses the Layer 3 virtual interface VLANIF as the output.
[0047] In practical implementation, the Layer 3 multicast configuration can be calculated by the control plane according to a multicast routing protocol (such as IGMP, PIM, etc.). The configuration includes at least the multicast group address, the corresponding VLANIF interface identifier, and the egress port information associated with the VLANIF interface. The VLANIF interface serves as the logical egress point for Layer 3 forwarding, and multiple physical ports and / or aggregated ports are connected to it for carrying the actual forwarding of multicast traffic.
[0048] In S104, the port information of all exits corresponding to the VLANIF is aggregated and processed to generate batch parameters. For example, the port information of all exits corresponding to the VLANIF is aggregated and processed to generate an aggregated port ID bitmap and a physical port ID bitmap.
[0049] In one exemplary implementation, the port information includes physical port identifiers and aggregated port identifiers. Instead of generating and issuing commands separately for each physical port or aggregated port, the platform layer uniformly organizes all egress ports corresponding to the VLANIF and expresses them using a compressed method.
[0050] For example, the port information of all exits corresponding to the VLANIF can be aggregated and processed to generate an aggregated port ID bitmap and a physical port ID bitmap, respectively. Each bit in the bitmap is used to indicate whether the corresponding port is a valid exit of the current multicast configuration, thereby significantly reducing the parameter size while maintaining the integrity of port representation.
[0051] In S106, the batch parameters are sent to the driver layer all at once through the batch sending channel.
[0052] For example, the channel status interface provided by the driver layer can be queried to obtain the busy status of the batch delivery channel; if the batch delivery channel is not busy, the batch parameters are delivered to the driver layer all at once. Alternatively, if the batch delivery channel is busy, the delivery operation can be performed after a preset time.
[0053] In one exemplary implementation, the batch delivery channel is an internal communication channel between the platform layer and the driver layer, and the channel carries the transmission of configuration commands. Before executing the batch delivery, the channel status interface provided by the driver layer can be queried to obtain the current busy status of the batch delivery channel.
[0054] If the batch delivery channel is not busy, the platform layer will directly send the batch parameters to the driver layer at once; if the batch delivery channel is busy, the platform layer can pause the current delivery operation and try to send it again after waiting for a preset time, so as to avoid channel congestion caused by sending a large number of configurations in a short period of time.
[0055] In S108, the driver layer parses the batch parameters and generates corresponding multicast forwarding table entries. For example, the driver layer parses the batch parameters to obtain an aggregation port ID bitmap and a physical port ID bitmap; determines the target output port set based on the aggregation port ID bitmap and the physical port ID bitmap; and generates multicast forwarding table entries based on the target output port set.
[0056] More specifically, a multicast forwarding table entry structure conforming to the switching chip format can be constructed based on the target output port set.
[0057] Specifically, after receiving the batch parameters, the driver layer parses the aggregation port ID bitmap and physical port ID bitmap contained therein, and determines the target output port set corresponding to the multicast message based on the set bits in the bitmap. Subsequently, the driver layer generates multicast forwarding table entries for the switching chip to identify and process based on the target output port set.
[0058] In one exemplary implementation, a multicast forwarding table entry structure conforming to the hardware format requirements of the switching chip can be constructed based on the target output port set, such as filling in port masks, port indexes, or replication control fields.
[0059] In S110, the multicast forwarding table entry is sent to the switching chip to update the multicast forwarding table entry in the switching chip. The driver layer may, for example, send the multicast forwarding table entry to the switching chip asynchronously.
[0060] More specifically, the driver layer puts the multicast forwarding table entry into the channel packet sending queue; an independent asynchronous processing thread retrieves the multicast forwarding table entry from the channel packet sending queue and sends it to the switching chip.
[0061] In one exemplary implementation, the driver layer may use an asynchronous delivery method to send the generated multicast forwarding table entries to the switching chip. Specifically, the driver layer may place the multicast forwarding table entries into a channel packet sending queue, and an independent asynchronous processing thread may retrieve the multicast forwarding table entries to be sent from the channel packet sending queue and write them into the multicast forwarding table inside the switching chip according to the interface protocol of the switching chip.
[0062] In one embodiment, the method further includes: the switching chip implementing the replication and forwarding of Layer 3 multicast packets based on multicast forwarding table entries. The switching chip can implement the replication and forwarding of Layer 3 multicast packets based on updated multicast forwarding table entries, enabling multicast packets to be simultaneously output from multiple physical ports or aggregated ports corresponding to the VLANIF.
[0063] According to the Layer 3 multicast configuration distribution method for network devices in this application, by obtaining the Layer 3 multicast configuration to be distributed, wherein the Layer 3 multicast configuration uses a Layer 3 virtual interface VLANIF as the exit point; summarizing and processing the port information of all exit points corresponding to the VLANIF to generate batch parameters; distributing the batch parameters to the driver layer at once through a batch distribution channel; the driver layer parses the batch parameters to generate corresponding multicast forwarding table entries; and distributing the multicast forwarding table entries to the switching chip to update the multicast forwarding table entries in the switching chip, the distribution efficiency and system stability in large-scale multicast scenarios can be significantly improved while ensuring functional integrity.
[0064] It should be clearly understood that this application describes how specific examples are formed and used, but the principles of this application are not limited to any details of these examples. Rather, based on the teachings of the disclosure of this application, these principles can be applied to many other embodiments.
[0065] Figure 2 This is a flowchart illustrating a method for distributing Layer 3 multicast configurations to network devices according to an exemplary embodiment. Figure 2 The process shown in step 20 is... Figure 1 The detailed description of S106 in the illustrated process, "The batch parameters are sent to the driver layer all at once through the batch sending channel," like Figure 2 As shown, in S202, the channel status interface provided by the driver layer is queried to obtain the busy status of the batch distribution channels. The channel status interface can be used to reflect whether there are any pending configuration instructions in the current channel, or whether the channel buffer is close to saturation.
[0066] In S204, if the batch delivery channel is not busy, the batch parameters are delivered to the driver layer all at once, thereby triggering the subsequent parsing and processing flow of the driver layer.
[0067] In S206, if the batch delivery channel is busy, the delivery operation will be performed after a preset time. If the batch delivery channel is busy, the platform layer will temporarily suspend the delivery operation and wait for a preset time before re-querying the channel status, so that the delivery can continue after the channel load returns to normal, thereby reducing the risk of channel congestion.
[0068] To address the issues of large data transmission volume, low configuration efficiency, and high system load in existing Layer 3 multicast configuration processes, this application proposes a network device-oriented Layer 3 multicast configuration transmission method. This method introduces a batch transmission mechanism and a channel state awareness mechanism, effectively reducing the number of interactions between the control plane and the driver plane, improving configuration transmission efficiency, and enhancing the overall stability of the system while ensuring the complete implementation of Layer 3 multicast functionality. Figure 3 This is a flowchart illustrating a method for distributing Layer 3 multicast configurations to network devices according to another exemplary embodiment. Figure 3 The process shown in step 30 is... Figure 1 A detailed description of the process shown.
[0069] like Figure 3 As shown, in S302, multicast and VLANIF egress are configured. This includes configuring the multicast service and the VLANIF egress, including establishing the association between the multicast group and the VLANIF interface.
[0070] In one specific embodiment of this application, the driver layer provides a batch distribution interface. When the platform layer distributes configurations for multicast services, it no longer distributes the configurations one by one to each physical port or aggregated port under the VLANIF interface. Instead, it organizes all the egress port information corresponding to the same VLANIF interface and distributes it as a whole parameter.
[0071] At the driver layer, to reduce the amount of data sent and alleviate internal channel pressure, the egress port information is converted into aggregated port ID bitmaps and physical port ID bitmaps, and stored and transmitted in a compressed manner. This transforms the original multiple configuration sending at the port level into batch configuration sending at the VLANIF interface level. This reduces the number of configuration sending operations from an order of magnitude related to the number of ports to an order of magnitude related only to the number of multicast and VLANIF instances, significantly reducing the overall configuration sending volume, which is particularly suitable for large-scale multicast egress scenarios.
[0072] In S304, multicast configuration is sent to the switching chip. This triggers the multicast configuration sending process, preparing to send the multicast configuration related to the VLANIF to the switching chip.
[0073] In S306, is the channel busy? If the channel is busy, proceed to S308; otherwise, proceed to S310.
[0074] During the configuration distribution process, this application further introduces a channel status awareness mechanism. The driver layer provides a channel status query interface to reflect the current busy status of the configuration distribution channel. Before calling the batch distribution interface, the platform layer can first obtain the current load status of the channel through the channel status query interface. When a channel is detected to be busy, the platform layer distribution thread pauses the current configuration distribution operation and enters a short waiting state, resuming configuration distribution after the channel load decreases; when the channel is not busy, the batch distribution operation is executed directly. Through the above method, channel overload can be avoided during centralized configuration distribution, reducing the risks of heartbeat packet loss, slot availability misjudgment, and abnormal board reset caused by channel congestion, thereby improving the operational stability of distributed devices in large-scale multicast configuration scenarios.
[0075] In S308, a short sleep period is entered. The platform layer enters a short sleep period to wait for the channel load to decrease.
[0076] In S310, the batch distribution channel is invoked for distribution.
[0077] In S312, an egress information bitmap is generated, and the configuration is placed into the channel packet sending queue. A port information bitmap corresponding to the VLANIF egress is generated, and the generated configuration commands are placed into the channel packet sending queue.
[0078] In S314, packets are sent asynchronously to the board, which receives, parses, and sends out configurations.
[0079] When the configuration command arrives at the service board, the driver layer parses the received aggregation port ID bitmap and physical port ID bitmap, converts the logical port information contained therein into the multicast forwarding table entry structure required by the switching chip, and writes the multicast forwarding table entry into the local forwarding table of the switching chip. Based on the updated multicast forwarding table entry, the switching chip performs replication and forwarding operations on multicast packets, thereby achieving efficient forwarding of Layer 3 multicast traffic.
[0080] Through the above technical solution, this application can effectively reduce configuration redundancy and distribution overhead in the three-layer multicast configuration process, significantly improve configuration distribution efficiency, and reduce system load and channel congestion risk, making it suitable for large-scale three-layer multicast application scenarios.
[0081] In step S316, check if any multicast configurations remain. Determine if there are still undelivered multicast configurations. If so, return to continue processing; otherwise, proceed to step S318.
[0082] In S318, the process ends. This concludes the entire Layer 3 multicast configuration distribution process. Those skilled in the art will understand that all or part of the steps of the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, it performs the functions defined by the method provided in this application. The program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.
[0083] Furthermore, it should be noted that the above figures are merely illustrative representations of the processes included in the method according to exemplary embodiments of this application, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0084] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0085] Figure 4 This is a block diagram illustrating a Layer 3 multicast configuration distribution apparatus for network devices according to an exemplary embodiment. Figure 4 As shown, the Layer 3 multicast configuration distribution device 40 for network devices includes: a configuration module 402, a parameter module 404, a batch module 406, a parsing module 408, and a distribution module 410.
[0086] The configuration module 402 is used to obtain the Layer 3 multicast configuration to be sent, wherein the Layer 3 multicast configuration uses the Layer 3 virtual interface VLANIF as the output.
[0087] The parameter module 404 is used to summarize the port information of all exits corresponding to the VLANIF and generate batch parameters; the parameter module 404 is also used to summarize the port information of all exits corresponding to the VLANIF and generate an aggregated port ID bitmap and a physical port ID bitmap, and use the aggregated port ID bitmap and the physical port ID bitmap as the batch parameters.
[0088] The batch module 406 is used to send the batch parameters to the driver layer all at once through the batch sending channel. The batch module 406 is also used to query the channel status interface provided by the driver layer to obtain the busy status of the batch sending channel. If the batch sending channel is not busy, the batch parameters are sent to the driver layer all at once. If the batch sending channel is busy, the sending operation is performed after waiting for a preset time.
[0089] The parsing module 408 is used by the driver layer to parse the batch parameters and generate corresponding multicast forwarding table entries; the parsing module 408 is also used by the driver layer to parse the batch parameters to obtain the aggregation port ID bitmap and the physical port ID bitmap; determine the target output port set according to the aggregation port ID bitmap and the physical port ID bitmap; and generate multicast forwarding table entries according to the target output port set.
[0090] The distribution module 410 is used to distribute the multicast forwarding table entries to the switching chip to update the multicast forwarding table entries in the switching chip. The distribution module 410 is also used for the driver layer to put the multicast forwarding table entries into the channel packet sending queue; an independent asynchronous processing thread retrieves the multicast forwarding table entries from the channel packet sending queue and distributes them to the switching chip.
[0091] According to the Layer 3 multicast configuration distribution device for network devices in this application, by acquiring the Layer 3 multicast configuration to be distributed, wherein the Layer 3 multicast configuration uses a Layer 3 virtual interface VLANIF as the exit point; summarizing and processing the port information of all exit points corresponding to the VLANIF to generate batch parameters; distributing the batch parameters to the driver layer at once through a batch distribution channel; the driver layer parses the batch parameters to generate corresponding multicast forwarding table entries; and distributing the multicast forwarding table entries to the switching chip to update the multicast forwarding table entries in the switching chip, the distribution efficiency and system stability in large-scale multicast scenarios can be significantly improved while ensuring functional integrity.
[0092] Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment.
[0093] The following reference Figure 5 To describe an electronic device 500 according to this embodiment of the present application. Figure 5The electronic device 500 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0094] like Figure 5 As shown, the electronic device 500 is presented in the form of a general-purpose computing device. The components of the electronic device 500 may include, but are not limited to: at least one processing unit 510, at least one storage unit 520, a bus 530 connecting different system components (including storage unit 520 and processing unit 510), a display unit 540, etc.
[0095] The storage unit stores program code that can be executed by the processing unit 510, causing the processing unit 510 to perform the steps described in this specification according to various exemplary embodiments of this application. For example, the processing unit 510 can perform actions such as... Figure 1 , Figure 2 , Figure 3 The steps are shown in the figure.
[0096] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 5201 and / or a cache storage unit 5202, and may further include a read-only memory unit (ROM) 5203.
[0097] The storage unit 520 may also include a program / utility 5204 having a set (at least one) program module 5205, such program module 5205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0098] Bus 530 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0099] Electronic device 500 can also communicate with one or more external devices 500' (e.g., keyboard, pointing device, Bluetooth device, etc.), enabling users to communicate with devices that interact with electronic device 500, and / or any device (e.g., router, modem, etc.) that allows electronic device 500 to communicate with one or more other computing devices. This communication can be performed via input / output (I / O) interface 550. Furthermore, electronic device 500 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 560. Network adapter 560 can communicate with other modules of electronic device 500 via bus 530. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0100] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software, or by combining software with necessary hardware. Therefore, as... Figure 6 As shown, the technical solution according to the embodiments of this application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.) or on a network, and includes several instructions to cause a computing device (such as a personal computer, server, or network device, etc.) to execute the above-described method according to the embodiments of this application.
[0101] In summary, this disclosure addresses the issues of large data volume and low efficiency in traditional Layer 3 multicast configuration implementations by proposing an efficient Layer 3 multicast configuration method for network devices. The core design of this method lies in using a batch configuration mechanism and a channel status awareness mechanism. This significantly reduces the interaction pressure between the control plane and the driver plane while ensuring functional integrity, thereby improving the overall system efficiency and stability. In short, this disclosure improves efficiency and stability by compressing the amount of data transmitted through the channel during configuration and adjusting the configuration speed based on the channel's busy / idle status. Specifically, the driver provides a batch configuration interface. When configuring multicast services, the platform no longer needs to traverse the VLANIF egress information (ifindex) one by one; instead, it directly stores all egress information of the VLANIF port in an array as parameters for configuration. On the driver side, to alleviate channel pressure, the egress information parameters are transformed into an aggregated port ID bitmap and a physical port ID bitmap, stored and transmitted in a compressed manner. This approach transforms the previous method of configuring and distributing data for each physical port into a unified method of distributing data on a VLANIF interface basis. This reduces the number of configuration distributions from the order of magnitude of multicast quantity × VLANIF quantity × port quantity to the order of magnitude of multicast quantity × VLANIF quantity. This order-of-magnitude reduction significantly decreases the total number of configuration distributions, especially in scenarios with large-scale multicast outgoing interfaces, effectively improving configuration distribution efficiency. During the distribution process, this disclosure further introduces a channel status awareness mechanism. The driver provides a channel status query interface to return channel busy information. Before calling the batch distribution interface to distribute configurations, the platform layer can call this interface to obtain the current channel busyness information. If the channel is currently busy, the platform distribution thread should not continue blindly pushing, but should proactively enter a brief sleep state, waiting for the channel to become idle before continuing distribution; if the channel is currently in a normal state, the configuration command is immediately distributed to the driver. Through this channel status awareness mechanism, this invention effectively avoids channel overload during configuration peaks, reduces channel congestion, heartbeat packet loss, and the resulting risks of slot misjudgment and board hot-swapping, significantly improving the operational stability of distributed devices in large-scale multicast configuration scenarios. Once the configuration command reaches the service board, the driver layer parses the received port bitmap and converts the logical information into the multicast entry structure required by the chip. Then, the driver layer writes the entry into the local forwarding table of the switching chip, and the chip hardware updates the multicast packet replication and forwarding logic accordingly. Ultimately, the entire system can efficiently forward and accurately deliver large-scale multicast traffic with relatively low overhead.Through the above technical solutions, this disclosure can effectively solve the problems of configuration redundancy, low distribution efficiency and excessive system load in existing three-layer multicast in large-scale scenarios, and achieve order-of-magnitude compression of configuration distribution and significant improvement in system stability.
[0102] The software product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0103] The computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0104] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0105] The aforementioned computer-readable medium carries one or more programs. When these programs are executed by a device, the computer-readable medium performs the following functions: acquiring a Layer 3 multicast configuration to be distributed, wherein the Layer 3 multicast configuration uses a Layer 3 virtual interface VLANIF as the exit point; summarizing and processing the port information of all exit points corresponding to the VLANIF to generate batch parameters; distributing the batch parameters to the driver layer at once through a batch distribution channel; the driver layer parsing the batch parameters to generate corresponding multicast forwarding table entries; and distributing the multicast forwarding table entries to the switching chip to update the multicast forwarding table entries in the switching chip.
[0106] Those skilled in the art will understand that the above modules can be distributed in the device as described in the embodiments, or they can be modified accordingly and placed in one or more devices that are unique to this embodiment. The modules in the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.
[0107] Through the description of the above embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0108] Exemplary embodiments of this application have been specifically shown and described above. It should be understood that this application is not limited to the detailed structures, arrangements, or implementation methods described herein; rather, this application is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended claims.
Claims
1. A method for distributing Layer 3 multicast configurations to network devices, characterized in that, include: Obtain the Layer 3 multicast configuration to be distributed, wherein the Layer 3 multicast configuration uses the Layer 3 virtual interface VLANIF as the output; The port information of all exits corresponding to the VLANIF is summarized and processed to generate batch parameters; The batch parameters are sent to the driver layer all at once through the batch delivery channel; The driver layer parses the batch parameters and generates corresponding multicast forwarding table entries; The multicast forwarding table entry is sent to the switching chip to update the multicast forwarding table entry in the switching chip.
2. The method as described in claim 1, characterized in that, The port information of all exits corresponding to the VLANIF is aggregated and processed to generate batch parameters, including: The port information of all exits corresponding to the VLANIF is aggregated and processed to generate an aggregated port ID bitmap and a physical port ID bitmap. The aggregation port ID bitmap and the physical port ID bitmap are used as the batch parameters.
3. The method as described in claim 1, characterized in that, The batch parameters are sent to the driver layer all at once through the batch delivery channel, including: Query the channel status interface provided by the driver layer to obtain the busy status of the batch distribution channels; If the batch delivery channel is not busy, the batch parameters will be delivered to the driver layer all at once.
4. The method as described in claim 3, characterized in that, The method further includes sending the batch parameters to the driver layer all at once via a batch delivery channel: If the batch delivery channel is busy, the delivery operation will be performed after a preset time.
5. The method as described in claim 1, characterized in that, The driver layer parses the batch parameters and generates corresponding multicast forwarding table entries, including: The driver layer parses the batch parameters to obtain the aggregation port ID bitmap and the physical port ID bitmap; The target output port set is determined based on the aggregated port ID bitmap and the physical port ID bitmap; Generate multicast forwarding entries based on the target output port set.
6. The method as described in claim 5, characterized in that, Based on the target output port set, generate multicast forwarding table entries, including: Based on the target output port set, construct a multicast forwarding table entry structure that conforms to the switching chip format.
7. The method as described in claim 1, characterized in that, Sending the multicast forwarding table entries to the switching chip includes: The driver layer asynchronously sends the multicast forwarding table entries to the switching chip.
8. The method as described in claim 7, characterized in that, The driver layer asynchronously sends the multicast forwarding table entries to the switching chip, including: The driver layer places the multicast forwarding table entry into the channel packet sending queue; An independent asynchronous processing thread retrieves the multicast forwarding table entry from the channel packet queue and sends it to the switching chip.
9. The method as described in claim 1, characterized in that, Also includes: The switching chip implements the replication and forwarding of three-layer multicast messages based on multicast forwarding table entries.
10. A three-layer multicast configuration distribution device for network devices, characterized in that, include: The configuration module is used to obtain the Layer 3 multicast configuration to be sent, wherein the Layer 3 multicast configuration uses the Layer 3 virtual interface VLANIF as the output. The parameter module is used to summarize and process the port information of all exits corresponding to the VLANIF to generate batch parameters; The batch module is used to send the batch parameters to the driver layer all at once through the batch sending channel; The parsing module is used by the driver layer to parse the batch parameters and generate corresponding multicast forwarding table entries; The distribution module is used to distribute the multicast forwarding table entries to the switching chip to update the multicast forwarding table entries in the switching chip.