A method, apparatus, electronic device and storage medium for multicast message processing
By synchronizing software entries to hardware entries in the multicast network, the problem of receiving ports being unable to join groups when the aggregation port is down is solved, thus achieving stability and reliability of multicast services.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2026-03-10
AI Technical Summary
In multicast networks, when the aggregation port is in the Down state, some receiving ports cannot join the group normally, causing the receiving network elements in multicast services to be unable to receive multicast packets normally.
By obtaining the virtual LAN packets of the multicast source and receiver of the multicast message, the type and status of the outgoing port are determined, and the software table entries are synchronized to the hardware table entries of the underlying software development kit under preset conditions, so as to ensure that the receiver can still multicast and join groups according to the hardware table entries when the outgoing port fails.
This ensures the stability of multicast services, prevents multicast message transmission failures due to port failures, and guarantees the normal operation of multicast services.
Smart Images

Figure CN115834467B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of network communication technology, and in particular to a multicast message processing method and device, electronic equipment and a storage medium. BACKGROUND
[0002] Generally, there are two communication modes in traditional network communication, one is one-to-one communication between a source host and a target host, i.e. unicast. The other mode is communication between the source host and other hosts in the network, i.e. broadcast, in which information is sent to hosts that do not need the information, resulting in waste of transmission resources, and even causing broadcast storm. In this case, multicast technology is applied, and multicast realizes point-to-multipoint network connection between a sender and each receiver. If a sender transmits the same data to multiple receivers at the same time, only one copy of the same data packet needs to be copied. It improves data transmission efficiency and reduces the possibility of backbone network congestion. However, there are still some defects in multicast services. Network node failures cause problems that receiving network elements in multicast services cannot normally receive multicast messages. SUMMARY
[0003] The present application provides a multicast message processing method, device, electronic equipment and storage medium to solve the problem that part of the receiving ports of the aggregation port in the Down state cannot normally add groups in the multicast network, and to ensure the stability of multicast services.
[0004] According to an aspect of the present application, a multicast message processing method is provided, wherein the method comprises:
[0005] obtaining a multicast source and a receiver of a multicast message, and determining a first virtual local area network group in which the multicast source is located and a second virtual local area network group in which the receiver is located;
[0006] obtaining a port type and a port state of an out port of the multicast source;
[0007] in a case where the first virtual local area network group and the second virtual local area network group are different and the port type and the port state satisfy a preset condition, synchronizing software table item content to a bottom software development kit hardware table item.
[0008] According to another aspect of the present application, a multicast message processing device is provided, wherein the device comprises:
[0009] a group determination module configured to obtain a multicast source and a receiver of a multicast message, and determine a first virtual local area network group in which the multicast source is located and a second virtual local area network group in which the receiver is located;
[0010] The port determination module is used to obtain the port type and port status of the output port of the multicast source;
[0011] The table entry synchronization module is used to synchronize the software table entry content to the underlying software development kit hardware table entry when the first virtual LAN group and the second virtual LAN group are different and the port type and the port status meet preset conditions.
[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0013] At least one processor; and
[0014] A memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the multicast message processing method according to any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the multicast message processing method according to any embodiment of the present invention.
[0017] The technical solution of this invention determines the first virtual local area network (VLAN) group to which the multicast source of the multicast message belongs and the second VLAN group to which the receiver belongs. It then obtains the port type and port status of the outgoing port of the multicast source. When the port type and port status meet preset conditions and the first VLAN group and the second VLAN group are different, the software entry content is synchronized to the underlying software development kit (SDK) hardware entry. This allows some receivers to join multicast groups according to the underlying SSDK hardware entry when the outgoing port fails, preventing the multicast message transmission from failing due to the port failure of the multicast source and ensuring the stability of multicast services.
[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a network topology diagram of a multicast service provided according to an embodiment of the present invention;
[0021] Figure 2 This is a flowchart of a multicast message processing method provided in Embodiment 1 of the present invention;
[0022] Figure 3 This is a flowchart of a multicast message processing method provided in Embodiment 2 of the present invention;
[0023] Figure 4 This is an example diagram of a multicast message processing method provided in Embodiment 3 of the present invention;
[0024] Figure 5 This is a schematic diagram of the structure of a multicast message processing device according to Embodiment 4 of the present invention;
[0025] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the multicast message processing method of this invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] See Figure 1In this network topology, multicast services are based on the Protocol Independent Multicast-Sparse Mode (PIM-SM) protocol. Due to a malfunction in the SW16 switch, some terminals in the multicast service are unable to receive multicast data. When the fault occurs, traffic in the receiving groups of even-numbered Virtual Local Area Networks (VLANs) is interrupted; specifically, the VLAN2 multicast receiver on the SW16 switch shows correct entries in the upper-layer software table, but no multicast data is being sent to VLAN7. Capturing the device table entries reveals entries for VLAN7, but checking the underlying SDK hardware entries reveals that the problematic table entries are missing. Compared to normal entries, entries corresponding to VLAN7 (ethernet1 / 21 and ethernet1 / 22) are missing. The port group 1 of VLAN7 contains two physical interfaces, eth1 / 21 and eth1 / 22. When these interfaces are down, the port group detaches them; when they are up, they are added back to the port group. If a multicast packet joins through the portgroup while the member port is in a down state, there is a possibility that the member port may not be able to send the packet to the underlying Software Development Kit (SDK) hardware table. The underlying SDK hardware table lacks information for receiving end group joining, which prevents some receiving network elements from joining the service multicast group according to the underlying SDK hardware table, thus preventing multicast packets from being propagated to the aforementioned receiving network elements.
[0029] To address the aforementioned issues, this invention provides a multicast message processing method to resolve the problem that some receiving ports cannot join groups normally when the aggregation port is in the Down state in a multicast network, thus ensuring the stability of multicast services.
[0030] Example 1
[0031] Figure 2 This is a flowchart of a multicast message processing method according to Embodiment 1 of the present invention. This embodiment is applicable to the processing of multicast messages for multicast services. The method can be executed by a multicast message processing device, which can be implemented in hardware and / or software and can be configured in a switch. Figure 2 As shown, the method includes:
[0032] Step 110: Obtain the multicast source and receiver of the multicast message, and determine the first virtual LAN packet where the multicast source is located and the second virtual LAN packet where the receiver is located.
[0033] Multicast messages can be data packets transmitted via multicast. A multicast message can include information about the multicast source and receiver. The multicast source can be the sender of the multicast message, and the receiver can be the recipient of the multicast message. Virtual LAN groups can be organizations that allocate devices according to factors such as function, department, and business. Communication between devices in the same virtual LAN group can be similar to communication within the same network segment. Virtual LAN groups can be pre-configured according to business needs. The first virtual LAN group can be the virtual LAN group to which the network address of the multicast source belongs, while the second virtual LAN group can be the virtual LAN group to which the network address of the receiver belongs. It should be understood that the terms "first" and "second" in the first and second virtual LAN groups are used only for distinction, not to restrict the order or category.
[0034] In this embodiment of the invention, the multicast source and receiver can be extracted from a multicast message to determine the first VLAN packet to which the multicast source belongs and the second VLAN packet to which the receiver belongs. It is understood that the VLAN packets to which the multicast source and receiver belong can be determined by searching in a configuration file or in a multicast routing table. For example, the multicast source address and the receiver's destination address can be extracted from the multicast message, and the VLAN packet numbers associated with the multicast source address and destination address can be found in the configuration file.
[0035] Step 120: Obtain the port type and port status of the multicast source's output port.
[0036] The output port can be the port from which multicast messages are output, and the port type can be information reflecting the port type. For example, if the output port is an aggregated port, then the port type can be information identifying that the output port is an aggregated port. The port type can be composed of at least one of numbers, letters, or symbols. The port status can be information identifying the working status of the output port. The working status of the output port can include the UP state (normal operation) and the Down state (abnormal operation).
[0037] In this embodiment of the invention, the output port at the multicast source can be obtained, and the port type and port status of the output port can be determined. For example, if the output port at the multicast source is configured with relevant configuration information of the aggregation port, the port type of the output port can be determined to be the aggregation port. If the working status identifier of the output port is DOWN, the port status of the output port can be determined to be the non-working state.
[0038] Step 130: If the first virtual LAN group and the second virtual LAN group are different and the port type and port status meet the preset conditions, synchronize the software table entries to the underlying software development kit hardware table entries.
[0039] The preset conditions can be the state in which the outgoing port of the multicast source is not working properly. The preset conditions can be configured with different conditions for specific business scenarios. The preset conditions can include one or more rule discrimination information for port type and port status. For example, the preset conditions can include determining that the outgoing port of the multicast source is not working properly when the port type is an aggregation port and the port status is non-working.
[0040] Specifically, it can be determined whether the first VLAN packet and the second VLAN packet are different. This difference can be determined by whether the identification information of the first VLAN packet and the second VLAN packet is the same or whether the first VLAN packet and the second VLAN packet are in the same group list. If the multicast source and receiver of a multicast message are not in the same VLAN packet, and the port transmitting the multicast message is in certain specific states—for example, the port transmitting the multicast message is an aggregation port, and this aggregation port is in a non-working state—when the multicast message meets the above conditions, due to defects in the existing multicast message transmission protocol, it is impossible to send the software table entries of the multicast messages of some member ports in the non-working state within the aggregation port to the underlying software development tools. This results in the multicast message failing to reach the terminal. Therefore, when it is determined that the multicast source and receiver are in different VLAN packets, the port type and port state can be judged to determine whether they meet the preset conditions, and if so, the software table entries can be read. The software table entries are populated into the underlying software development kit (SDK) so that the receiver can still use the software table entries in the underlying SSD even when the outgoing port fails. When the receiver joins a multicast group according to the multicast protocol, it can obtain the software table entries in the underlying SSD, such as multicast source, multicast address, outgoing interface VLAN information, and multicast route. The receiver can add the above software table entries to the multicast routing table to achieve the joining operation. For example, the preset conditions may include the multicast source being located in an odd-numbered VLAN group and the receiver being located in an even-numbered VLAN group, the port type being an aggregated port and the port status being non-working. In this case, the software table entries will be synchronized to the hardware table entries in the underlying SSD.
[0041] In this embodiment of the invention, by determining the first and second virtual local area network (VLAN) groups to which the multicast source and receiver of the multicast message belong respectively, the port type and port status of the outgoing port of the multicast source are obtained. When the port type and port status meet preset conditions and are different in the first and second VLAN groups, the software entry content is synchronized to the underlying software development kit (SDK) hardware entry. This allows some receivers to join multicast groups according to the underlying SSDK hardware entry when the outgoing port fails, preventing the multicast message transmission from failing due to the port failure of the multicast source and ensuring the stability of multicast services.
[0042] Example 2
[0043] Figure 3 This is a flowchart of a multicast message processing method according to Embodiment 2 of the present invention. This embodiment is a specific implementation based on the above-described invention. See also... Figure 3 The specific steps in this embodiment of the invention are as follows:
[0044] Step 210: Extract the multicast source address of the multicast source and the destination address of the receiver from the multicast message.
[0045] The multicast source address can be a virtual or physical address of the multicast source in the network, while the destination address can be a virtual or physical address of the receiver in the network. For example, the multicast source address and destination address can be the Internet Protocol (IP) address of the multicast source, respectively.
[0046] In this embodiment of the invention, multicast messages can be parsed to extract the multicast source address and the destination address of the corresponding receiver from the message header. Specifically, the multicast message can be a PIM-SM multicast protocol message, and the multicast file can be parsed according to the PIM-SM multicast protocol to extract the multicast source address and destination address.
[0047] Step 220: In the configuration file, find the first virtual LAN packet associated with the multicast source address and the second virtual LAN packet associated with the destination address according to the correspondence between network address and virtual LAN packet.
[0048] The configuration file can be a set of pre-configured parameters in the device that executes the method of the present invention. The configuration file can set the virtual local area network (VLAN) groups to which different nodes in the network belong. The configuration file can include the correspondence between network addresses and VLAN groups. Different network addresses can be pre-assigned to different VLAN groups according to user needs. For example, there can be two groups of VLAN groups: one group of odd-numbered VLAN groups with odd network addresses and the other group of even-numbered VLAN groups with even network addresses. Alternatively, VLAN groups can be divided according to services, and network addresses that perform different services can be assigned to different VLAN groups.
[0049] Specifically, a pre-stored configuration file can be read. Within this file, a search can be performed based on the mapping between VLAN packets and network addresses. The configuration file can search for a network address matching the multicast source address, and the VLAN packet corresponding to that address can be designated as the first VLAN packet. Similarly, the configuration file can search for a network address matching the destination address, and the VLAN packet corresponding to that address can be designated as the second VLAN packet. It's important to understand that the first and second VLAN packets are used only to distinguish objects, not to restrict a specific order or sequence. The retrieved first and second VLAN packets can specifically be identification information for VLAN packets, such as VLAN1 or odd-numbered VLANs.
[0050] Step 230: Extract the port configuration information of the port according to the port configuration lookup command, and extract the port type in the port configuration information. The port type includes at least aggregated port and non-aggregated port.
[0051] The port configuration lookup command is a command that searches for port configuration information within a device. The specific command structure may differ between different manufacturers' devices. A port configuration lookup command can search for the configuration information of all ports, a specific port, or ports of a particular type. Port configuration information can be pre-configured information for the output port to perform its functions, and may specifically include information such as port type and port number.
[0052] In this embodiment of the invention, a port configuration lookup command can be used to find the port configuration information of a port. The port type can be directly extracted from the port configuration information to determine whether the output port is an aggregated port or a non-aggregated port. Furthermore, the port configuration lookup command can be used to find port configuration information of type aggregated port. If the port configuration lookup command does not find port configuration information for an output port that belongs to aggregated port, the output port can be determined to be a non-aggregated port. If port configuration information is found, the output port is determined to be an aggregated port.
[0053] Step 240: Extract the port status information of the output port according to the port status lookup instruction, and extract the port status from the port status information, wherein the port status includes at least online status and offline status.
[0054] The port status lookup command can be a command used to find the port status. The structure of the port status lookup command may differ between different manufacturers' devices. The port status lookup command can query the port status information of all ports or only the port status information of a specified port. The port status information may include the port status, Media Access Control (MAC) address, duplex mode, default VLAN, and data packet transmission and reception statistics, etc. The port status can be information that identifies the working status of the port, including online and offline status. It can be understood that the way the online or offline status is identified in the port status is not restricted here. For example, the online status can be UP and the offline status can be DOWN, or the online status can be 1 and the offline status can be 0.
[0055] In this embodiment of the invention, a port status lookup command can be used to query port information and extract information identifying the port status from the port information. This information can consist of numbers, letters, or special symbols, and different information can identify different port statuses. For example, port information of outgoing ports can be obtained in a switch according to a query command, such as "showinterfacef0 / 1", thereby querying the port information of outgoing ports 0 and 1. The port status can be extracted from the queried port information based on regular expression matching or character recognition, thus achieving the extraction of the outgoing port status.
[0056] Step 250: Determine whether the virtual LAN identifiers of the first virtual LAN group and the second virtual LAN group are different.
[0057] The virtual LAN identifier can identify information about a virtual LAN group. Specifically, the virtual LAN identifier can include information such as the LAN group name or the virtual LAN group number.
[0058] Specifically, the VLAN IDs of the first and second VLAN packets can be compared to determine whether they belong to the same pre-configured VLAN group. For example, if the first VLAN is an odd-numbered VLAN and the second VLAN is an even-numbered VLAN, and these odd-numbered and even-numbered VLANs are pre-configured as different VLAN groups, then the multicast source and receiver belong to different VLAN groups.
[0059] Step 260: If they are different, then the first VLAN packet and the second VLAN packet are different. Determine whether the port type is an aggregated port and the port status is offline. If they are the same, then no further processing is performed on the multicast message.
[0060] In this embodiment of the invention, after determining that the multicast source and the receiver belong to different virtual local area network (VLAN) groups, the port type and port status can be further determined to determine whether the port type is an aggregated port and whether the port status is offline. If it is determined that the first VLAN group of the multicast source and the second VLAN group of the receiver belong to the same VLAN group, no other processing is performed on the multicast message, and it is still transmitted according to the multicast message transmission mechanism in the prior art.
[0061] Step 270: If the port type is an aggregated port and the port status is offline, then synchronize the software entry content to the underlying software development kit hardware entry. If the port type is a non-aggregated port or the port status is online, then do not perform any other processing on the multicast message.
[0062] Specifically, when the port type is an aggregated port and the port status is offline, the software entry content can be filled into the hardware entry of the underlying software development kit, so that the receiver can still perform multicast grouping operations based on the software entry content in the underlying software development kit when the port fails. If the port type is not an aggregated port or the port status is not offline, no other processing is required for the multicast message, and it will still be transmitted according to the existing multicast message transmission mechanism.
[0063] In this embodiment of the invention, by extracting the multicast source address and the destination address of the receiver from the multicast message, the first VLAN group to which the multicast source address belongs and the second VLAN group to which the destination address belongs are determined in the configuration file according to the correspondence between network addresses and VLAN groups. The port configuration information of the multicast source's output port is searched according to the port configuration lookup command to determine the port type. The port status is extracted from the port status information of the output port according to the port status lookup command. It is then determined whether the first VLAN group and the second VLAN group belong to different VLAN groups. If the group and the second VLAN group belong to different VLAN groups, the system continues to determine if the port type is an aggregated port and the port status is offline. If the port type is not an aggregated port or the port status is not offline, no further processing is performed on the multicast message. When the port type is an aggregated port and the port status is offline, the software entry content is synchronized to the underlying software development kit hardware entry. This solves the problem that some receivers in the multicast network cannot multicast join the group when the outgoing port fails, and prevents the failure of the multicast source port from causing the transmission failure of some multicast messages, thus ensuring the stability of multicast services.
[0064] Furthermore, based on the above embodiments of the invention, the first virtual LAN packet and the second virtual LAN packet differ, including:
[0065] The first VLAN packet belongs to the odd-numbered VLAN packet group, and the second VLAN packet belongs to the even-numbered VLAN packet group.
[0066] In this embodiment of the invention, the first virtual local area network (VLAN) packet of the multicast source is specifically an odd-numbered VLAN packet, while the second VLAN packet of the receiver is specifically an even-numbered VLAN packet, and the multicast source and the receiver belong to different VLAN packets.
[0067] Furthermore, based on the above embodiments of the invention, the software entry content includes at least one of the following parameters: multicast source, multicast group address, outgoing interface virtual LAN information, and multicast route.
[0068] In this embodiment of the invention, the software entry content synchronized to the underlying software development kit hardware entry specifically includes information such as multicast source, multicast group address, outgoing interface virtual LAN information, and multicast routing.
[0069] Furthermore, based on the above embodiments of the invention, synchronizing the software entry content to the underlying software development kit hardware entry includes:
[0070] Read the software table entries of the multicast protocol; send the software table entries to the application programming interface (API) from the software development kit (SDK) platform; and populate the software table entries transmitted by the API into the underlying SSD hardware table entries.
[0071] In this embodiment of the invention, the software entry content in the software entry of the multicast protocol, such as multicast source, multicast group address, outgoing interface virtual LAN information, multicast routing, etc., can be read. The read information can be sent to the application programming interface (API) through the SDK platform, transmitted to the underlying hardware entry through the API interface, and the above-mentioned software entry content can be filled into the underlying hardware entry.
[0072] Furthermore, based on the above-described embodiments, before the multicast source and receiver of the multicast message, it also includes:
[0073] In response to the abnormal status information of the multicast message, determine the protocol operation status of the multicast message;
[0074] If the protocol operation state is such that the first VLAN packet and the second VLAN packet are different and the port type and the port state meet the preset conditions, it is determined that the hardware entry of the underlying software development kit is missing the software entry content.
[0075] The abnormal status information may include information indicating that the multicast message cannot be processed correctly, such as error messages for the corresponding multicast message or device abnormal status information. In some embodiments, the abnormal status information may include switch abnormal information or abnormal information that the terminal cannot receive the multicast message. The protocol operation status refers to the operation status of the transport protocol used for multicast message transmission, and may include the specific details of the message protocol operation, such as virtual LAN grouping information, port information, etc.
[0076] In this embodiment of the invention, upon receiving abnormal status information, the protocol operation status of the multicast message can be detected to determine whether the multicast source of the multicast message is located in a first virtual local area network (VLAN) and the receiver of the multicast message is located in a second VLAN. The first VLAN and the second VLAN are different, the port type of the multicast message is an aggregated port, and the port status is offline. When the protocol operation status of the multicast message meets the above conditions, the hardware entries of the underlying software development kit (SDK) of the device processing the multicast message can be detected to determine whether the underlying SSD is missing the software entry content of the multicast message. If so, the multicast message processing continues according to the method provided in this embodiment of the invention to restore the normal transmission of the multicast message.
[0077] Example 3
[0078] Figure 4 This is an example diagram of a multicast message processing method provided in Embodiment 3 of the present invention. See also... Figure 4 This multicast message processing method can add a software process to the interactive unit to determine whether the traffic type is multicast, whether the outgoing port used by the multicast traffic belongs to a certain aggregation group (i.e., the port is an aggregation port), whether the aggregation port in the aggregation group is in a DOWN state, and whether the multicast source is an odd-numbered VLAN and the receiver is an even-numbered VLAN. When the above four conditions are met, the upper-layer software appearance content is periodically synchronized to the lower-layer SDK hardware table entries. See details. Figure 1 The network topology shown indicates that the multicast message processing method may include the following steps:
[0079] (1) Device 1, as the sender, broadcasts an Internet Group Management Protocol (IGMP) message to all receivers;
[0080] (2) Receiver device 4 sends (*,G) i.e. (0.0.0.0,230.1.1.20) to RP i.e. Device 1;
[0081] (3) After receiving (*,G) sent by device 4, device 1 sends a registered unicast message to the receiver device 4. This message carries (S,G), which is (192.168.102.1,230.1.1.20). This is the multicast routing table of device 1.
[0082] (4) Receiver device 4 then sends a (S,G) grouping message to device 1, which is its own multicast routing table;
[0083] (5) At this point, device 4 has successfully joined a group, and the normal PIM-SM multicast group joining process is complete.
[0084] (6) However, since the multicast source device 1 uses VLAN 11, which is an odd-numbered VLAN, and the group-adding device 4 uses VLAN 2, which is an even-numbered VLAN;
[0085] (7) Therefore, it is necessary to first determine whether the port 1 / 22 of the outgoing interface from device 1 to device 4 is an aggregated port;
[0086] (8) If it is not an aggregated port, follow the normal procedure;
[0087] (9) If port 1 / 22 is in the up state, the normal procedure is also followed.
[0088] (10) If port 1 / 22 is in a down state and multicast traffic is being sent, the upper layer software table entries will be synchronized to the lower layer SDK hardware table entries at regular intervals to ensure that Device4 can be successfully added to the group and that the traffic is connected. The upper layer software table entries include multicast source, multicast group address, outgoing interface VLAN information, multicast routing and other related parameters.
[0089] Example 4
[0090] Figure 5 This is a schematic diagram of a multicast message processing device according to Embodiment 4 of the present invention. Figure 5 As shown, the device includes:
[0091] The group determination module 301 is used to obtain the multicast source and receiver of the multicast message, and determine the first virtual local area network group where the multicast source is located and the second virtual local area network group where the receiver is located.
[0092] The port determination module 302 is used to obtain the port type and port status of the output port of the multicast source.
[0093] The table entry synchronization module 303 is used to synchronize the software table entry content to the underlying software development kit hardware table entry when the first virtual LAN group and the second virtual LAN group are different and the port type and the port status meet preset conditions.
[0094] In this embodiment of the invention, the group determination module determines the first and second virtual local area network (VLAN) groups to which the multicast source and receiver of the multicast message belong, respectively. The port determination module obtains the port type and port status of the outgoing port of the multicast source. When the port type and port status meet preset conditions and the first and second VLAN groups are different, the entry synchronization module synchronizes the software entry content to the underlying software development kit (SDK) hardware entry. This allows some receivers to join multicast groups according to the underlying SSDK hardware entry when the outgoing port fails, preventing the multicast message transmission from failing due to the port failure of the multicast source and ensuring the stability of multicast services.
[0095] Furthermore, based on the above embodiments of the invention, the grouping determination module 301 includes:
[0096] The address extraction unit is used to extract the multicast source address of the multicast source and the destination address of the receiver from the multicast message.
[0097] The packet lookup unit is used to look up the first virtual local area network (VLAN) packet to which the multicast source address belongs and the second VLAN packet to which the destination address belongs, according to the correspondence between network address and VLAN packet in the configuration file.
[0098] Furthermore, based on the above embodiments of the invention, the port determination module 302 includes:
[0099] The type determination unit is used to extract the port configuration information of the output port according to the port configuration lookup instruction, and extract the port type in the port configuration information, wherein the port type includes at least aggregated port and non-aggregated port.
[0100] A status determination unit is used to extract the port status information of the output port according to the port status lookup instruction, and to extract the port status from the port status information, wherein the port status includes at least an online status and an offline status.
[0101] Furthermore, based on the above embodiments of the invention, the table entry synchronization module 303 includes:
[0102] The group determination unit is used to determine whether the virtual LAN identifiers of the first virtual LAN group and the second virtual LAN group are different.
[0103] The condition determination unit is used to determine whether the port type is an aggregated port and the port status is offline if they are different, and if they are the same, no further processing is performed on the multicast message.
[0104] The table entry synchronization unit is used to synchronize the software table entry content to the underlying software development kit hardware table entry if the port type is an aggregated port and the port status is offline; otherwise, it does not perform any further processing on the multicast message if the port type is a non-aggregated port or the port status is online.
[0105] Furthermore, based on the above embodiments of the invention, the first virtual LAN packet and the second virtual LAN packet in the table synchronization module 303 are different, including:
[0106] The first VLAN packet belongs to the odd-numbered VLAN packet group, and the second VLAN packet belongs to the even-numbered VLAN packet group.
[0107] Furthermore, based on the above embodiments of the invention, the software entries in the device include at least one of the following parameters: multicast source, multicast group address, outgoing interface virtual LAN information, and multicast route.
[0108] Furthermore, based on the above embodiments of the invention, the entry synchronization unit is specifically used to read the software entry content of the multicast protocol; send the software entry content to the application programming interface (API) on the software development kit (SDK) platform; and fill the software entry content transmitted by the API into the underlying SSD hardware entry.
[0109] The multicast message processing apparatus provided in the embodiments of the present invention can execute the multicast message processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0110] Example 5
[0111] Figure 6 This is a schematic diagram of the structure of an electronic device implementing the multicast message processing method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, switches, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0112] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0113] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0114] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as multicast message processing methods.
[0115] In some embodiments, the multicast message processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the multicast message processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the multicast message processing method by any other suitable means (e.g., by means of firmware).
[0116] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0117] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0118] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0119] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0120] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0121] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0122] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0123] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for processing multicast messages, the method comprising: The method comprises the following steps: acquiring a multicast source and a receiver of a multicast message, and determining a first virtual local area network (VLAN) group in which the multicast source is located and a second VLAN group in which the receiver is located; acquiring a port type and a port state of an out port of the multicast source; in a case where the first VLAN group and the second VLAN group are different and the port type and the port state satisfy a preset condition, synchronizing software table item content to underlying software development kit (SDK) hardware table items; wherein the preset condition at least comprises that the port type is an aggregation port and the port state is a non-working state.
2. The method of claim 1, wherein, The acquiring of the multicast source and the receiver of the multicast message, and the determining of the first VLAN group in which the multicast source is located and the second VLAN group in which the receiver is located, comprises: extracting a multicast source address of the multicast source and a destination address of the receiver from the multicast message; in a configuration file, looking up a first VLAN group associated with the multicast source address and a second VLAN group associated with the destination address according to a correspondence relationship between network addresses and VLAN groups.
3. The method of claim 1, wherein, The acquiring of the port type and the port state of the out port of the multicast source comprises: extracting port configuration information of the out port according to a port configuration lookup instruction, and extracting a port type in the port configuration information, wherein the port type at least comprises an aggregation port and a non-aggregation port; extracting port state information of the out port according to a port state lookup instruction, and extracting a port state in the port state information, wherein the port state at least comprises an online state and a non-online state.
4. The method of claim 1, wherein, The synchronizing of the software table item content to the underlying SDK hardware table items in a case where the first VLAN group and the second VLAN group are different and the port type and the port state satisfy a preset condition comprises: judging whether virtual local area network (VLAN) identifiers of the first VLAN group and the second VLAN group are different; if different, the first VLAN group and the second VLAN group are different, and it is judged and determined whether the port type is an aggregation port and the port state is a non-online state, if same, no other processing is performed on the multicast message; if the port type is an aggregation port and the port state is a non-online state, the software table item content is synchronized to the underlying SDK hardware table items, if the port type is a non-aggregation port or the port state is an online state, no other processing is performed on the multicast message.
5. The method of claim 4, wherein, The first VLAN group and the second VLAN group being different comprises: the first VLAN group belongs to an odd-numbered VLAN group, and the second VLAN group belongs to an even-numbered VLAN group.
6. The method of claim 1 or 4, wherein, The synchronizing of the software table item content to the underlying SDK hardware table items comprises: reading the software table item content of a multicast protocol; sending the software table item content to an application program interface (API) on an SDK platform; filling the software table item content transmitted by the API to the underlying SDK hardware table items.
7. The method of claim 1, wherein, Before the multicast source and the receiver of the multicast message are acquired, the method further includes: In response to the abnormal state information of the multicast message, determining a protocol running state of the multicast message; In a case where the protocol running state is different between the first virtual local area network group and the second virtual local area network group and the port type and the port state satisfy a preset condition, determining that the underlying software development kit hardware table item lacks the software table item content.
8. A multicast packet processing device, comprising: The method comprises: A group determination module is configured to acquire a multicast source and a receiver of a multicast message, and determine a first virtual local area network group in which the multicast source is located and a second virtual local area network group in which the receiver is located; A port determination module is configured to acquire a port type and a port state of an out port of the multicast source; A table item synchronization module is configured to, in a case where the first virtual local area network group and the second virtual local area network group are different and the port type and the port state satisfy a preset condition, synchronize software table item content to an underlying software development kit hardware table item. The preset condition at least includes that the port type is an aggregation port and the port state is a non-working state.
9. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the multicast message processing method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing the processor to execute when the multicast message processing method of any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Methods and devices for configuring and issuing Open Flow items
CN104796336A
Port interface mode updating method and device, equipment and readable medium
CN112737820A