A method, device and equipment for transmitting multicast messages in a stacking system
By setting ACL entries and redirecting IGMP report messages in the stack system, the problem of difficulty in synchronizing multicast forwarding entries between devices is solved, and stable transmission and forwarding logic consistency of multicast services in the stack system are achieved.
Patent Information
- Application Number
- CN202211441779.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-11-17
AI Technical Summary
In a stacked system, since the hardware of each device may not necessarily support RCPU, it is difficult to synchronize the establishment of multicast forwarding entries, which limits the application of multicast services.
By setting ACL entries in the main device, redirect IGMP report messages to the CPU of the main device, and establish multicast forwarding logic and port lists on the main device to ensure that the multicast forwarding logic between devices is consistent and synchronized, and supports different All devices that support RCPU can participate in packet reporting.
It achieves stable transmission of multicast service packets in the stack system, ensures complete consistency and synchronization of multicast forwarding logic, and solves the problem of failure to create multicast forwarding entries under hardware capacity limitations.
Smart Images

Figure CN115883517B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of switches, and in particular to a method, device and equipment for transmitting multicast messages in a stacking system. Background Art
[0002] With the rapid development of information technology, the scale of networks has expanded dramatically. The number of switch interfaces previously planned for networks is not enough to meet the needs of network applications. At this time, switch stacking technology came into being.
[0003] Stacking technology is different from simple cascading of switches, because cascaded devices are logically independent of each other, while multiple switches stacked together are logically equivalent to the same device. Therefore, stacking technology can increase the port density of switches, and a stacking system only needs one management entrance. After adding ports through stacking, there is no need to change the original network topology and configuration, thereby achieving efficient interconnection and unified management between switches, which is of great significance for actual network maintenance and management.
[0004] In the prior art, a stacking system is composed of multiple stacking switches (stack members) with independent functions. In the stacking system, a switch is required to act as the controller and manager of the stacking system, which is called the master device. At the same time, in order to ensure the stability of the stacking system and to minimize the impact of the master device failure on the entire stacking system, a backup device is required to back up the operating data and configuration data of the stacking system in real time, and automatically switch to the backup device when the master device fails or is missing. The remaining multiple devices are slave devices, and the devices are connected through stacking links. The master device, backup device, and slave device can all be determined according to the corresponding election strategy, and have corresponding identification locally.
[0005] Multicast, as a common data transmission mode, is widely used in stacking systems at present. IGMP-Snooping (Internet Group Management Protocol Snooping) is usually used in the multicast network of the prior art to listen to multicast protocol messages and establish multicast forwarding table items. Then, in the stacking system, the forwarding of multicast service messages is carried out according to the multicast forwarding table items. However, the establishment of the multicast forwarding table items is usually subject to the limitation of hardware capacity, and because the roles of various devices in the stacking system are different, the hardware of each device does not necessarily support RCPU (Remote CPU). Therefore, it is often complicated to establish fully synchronous multicast forwarding table items between various devices, which is even infeasible. These have all become the problems that restrict the application of multicast services in the stacking system and need to be solved. Summary of the invention
[0006] The purpose of the present application is to provide a method, device and equipment for transmitting multicast messages in a stacking system, which is used to solve the problem that the hardware of existing devices may not support RCPU, resulting in the complexity of establishing fully synchronized multicast forwarding table entries between devices, thereby restricting the application of multicast services in the stacking system.
[0007] In a first aspect, an embodiment of the present application provides a method for transmitting a multicast message in a stacking system, which is applied to a master device in the stacking system, and the method includes:
[0008] Notify other devices in the stacking system to set a first access control list (ACL) entry or a range for RCPU inspection, where the first ACL entry is used to instruct the other devices to send a group management protocol (IGMP) report message to the CPU port of the master device by redirection after receiving the IGMP report message;
[0009] Receiving, through the master device CPU, IGMP report messages sent by other devices that support the RCPU and are within the inspection range of the RCPU, through the RCPU;
[0010] After receiving, through the master device CPU, the IGMP report message sent by other slave devices that do not support RCPU and filtering out the IGMP report message according to the first ACL table entry, by redirecting;
[0011] After receiving the IGMP report message and determining that the device is the master device, the IGMP report message is sent to the CPU of the master device;
[0012] A multicast forwarding logic is established and updated synchronously according to the IGMP report message received by the main device CPU, and the received multicast service message is forwarded according to the multicast forwarding logic. The multicast forwarding logic includes a multicast forwarding table item and a port list. The multicast forwarding table item includes the relationship between the multicast group address and the multicast VLAN, and a port list index is set for a multicast group. The index is used to index the port list for receiving the multicast service message sent by the multicast group address.
[0013] The first ACL table entry matches the IGMP report message through the key field key, the action is set to redirect, the redirection port is the CPU port of the main device, and the IGMP protocol message is set to the highest priority.
[0014] In some possible embodiments, establishing a multicast forwarding logic and synchronously updating it according to the IGMP report message received by the CPU of the master device includes:
[0015] Mark the state of the multicast forwarding table entry of the multicast group as update or new according to whether there is a multicast forwarding table entry corresponding to the multicast group in the IGMP report message locally;
[0016] According to the port list in the port list library and the port list after adding the port that first receives the IGMP report message, mark the state of the index of the port list of the multicast group as new or shared;
[0017] The multicast forwarding table entries whose states are update and new and the port list whose index states are new and share are sent to other devices in the stack system.
[0018] In some possible embodiments, marking the state of the multicast forwarding table entry of the multicast group as update or new according to whether there is a multicast forwarding table entry corresponding to the multicast group in the IGMP report message locally includes:
[0019] When it is determined that a multicast forwarding table entry of the multicast group exists locally according to the multicast group corresponding to the multicast group address in the IGMP report message, marking the state of the multicast forwarding table entry of the multicast group as update;
[0020] Determine that a multicast forwarding table entry for the multicast group does not exist locally, create a new multicast forwarding table entry, and mark the state of the new multicast forwarding table entry as new.
[0021] According to the port list in the port list library and the port list after adding the port that first receives the IGMP report message, marking the state of the index of the port list of the multicast group as new or shared, including:
[0022] When it is determined that a multicast forwarding table entry of the multicast group exists locally, judging whether the port that first receives the IGMP report message is a new port of the multicast group according to the port list indexed by the index of the multicast group;
[0023] If it is a new port of the multicast group, determine whether a first new port list obtained after adding the new port to the port list indexed by the multicast group is in the port list library;
[0024] If in the port list library, mark the index corresponding to the first new port list as share, and update the index of the multicast group to the index corresponding to the first new port list;
[0025] If not in the port list library, add the new port to the port list indexed by the multicast group index to obtain a second new port list, apply for a new index for the multicast group and mark it as new, and establish a corresponding relationship between the new index and the second new port list.
[0026] In some possible embodiments, according to the port list in the port list library and the port list after adding the port that first receives the IGMP report message, marking the state of the index of the port list of the multicast group as new or shared includes:
[0027] Determine that there is no multicast forwarding table entry for the multicast group locally, and apply for a new index for the multicast group;
[0028] Determine whether there is a third port list in the port list library that includes only the port that first receives the IGMP report message;
[0029] If it exists, establish a corresponding relationship between a new index and the third port list, and mark the state of the new index as share;
[0030] Otherwise, a new port list is added to the port list library, a corresponding relationship between the new port list and the new index is established, and the state of the new index is marked as new.
[0031] In some possible embodiments, the multicast forwarding logic further includes an extended ACL, and the extended ACL is created in the following manner:
[0032] Receive the multicast forwarding table entry update failure reason returned by the forwarding layer through the protocol layer;
[0033] If the failure reason is that the multicast forwarding table is full, the forwarding layer is instructed to create an extended ACL through the protocol layer, wherein the extended ACL includes a matching multicast group address DMAC+VLAN keyword field key, the action is set to redirect, and the redirection port is a port list corresponding to the multicast group;
[0034] Forwarding the received multicast service message according to the multicast forwarding logic, including:
[0035] According to the extended ACL rule, the received multicast service message is forwarded according to its redirected port list.
[0036] In some possible embodiments, the parameters of the port list in the port list library include the number of members and the number of references, where the number of references is used to identify the number of multicast groups corresponding to the port list.
[0037] In some possible embodiments, forwarding the received multicast service message according to the multicast forwarding logic includes:
[0038] Search the multicast forwarding table entry based on the multicast group address + VLAN carried in the multicast service message;
[0039] Confirm the corresponding index according to the found multicast forwarding table entry, and search the port list according to the confirmed index to determine whether the local port exists on the device;
[0040] If yes, the multicast service message is forwarded locally according to the local multicast forwarding table entry; otherwise, the multicast service message is forwarded to the next-level device via the stack port, and the index is carried in the stack header.
[0041] In some possible embodiments, the method further includes:
[0042] After receiving the IGMP leave message, the CPU of the master device determines whether there is a corresponding multicast forwarding table entry according to the multicast group address carried in the IGMP leave message;
[0043] If a corresponding multicast forwarding table entry exists, the multicast forwarding table entry and the port list are updated in different ways according to the number of members and the number of references of the port list corresponding to the multicast forwarding table entry;
[0044] If there is no corresponding multicast forwarding entry, it is determined that the corresponding multicast service message is forwarded based on the extended ACL, and the reporting port of the IGMP leave message in the port list of the extended ACL is deleted.
[0045] In a second aspect, an embodiment of the present application provides a method for transmitting a multicast message in a stacking system, the method comprising:
[0046] A first access control list ACL entry or a RCPU check range is set according to the notification of the master device, wherein the first ACL entry is used to instruct the other devices to send a group management protocol report IGMP report message to the CPU port of the master device through redirection after receiving the IGMP report message.
[0047] When it is determined that the RCPU is supported and within the inspection range of the RCPU, an IGMP report message is sent to the master device CPU through the RCPU;
[0048] When it is determined that RCPU is not supported, after selecting the IGMP report message according to the first ACL table item, the IGMP report message is sent to the master device CPU by redirection;
[0049] The multicast forwarding logic is updated according to the notification of the master device, and the received multicast service message is forwarded according to the multicast forwarding logic, the multicast forwarding logic includes a multicast forwarding table item and a port list, the multicast forwarding table item includes the relationship between the multicast group address and the multicast VLAN, and a port list index is set for a multicast group, and the index is used to index the port list for receiving the multicast service message sent by the multicast group address.
[0050] In some possible embodiments, updating the multicast forwarding logic according to the notification of the master device includes:
[0051] The state of the multicast forwarding table entries notified by the receiving master device is update and new, and the port list of the index state is new and shared;
[0052] Update the local multicast forwarding table and port list.
[0053] In some possible embodiments, updating the local multicast forwarding table entry and the port list includes:
[0054] If the state of the notified multicast forwarding table entry is new and the state of index is new, a multicast forwarding table entry and a port list corresponding to the current index index are created locally;
[0055] If the state of the notified multicast forwarding table entry is new and the state of the index is share, a multicast forwarding table entry is created locally, and a corresponding relationship between the index and the port list is established;
[0056] If the state of the notified multicast forwarding table entry is update and the state of index is share, the local multicast forwarding table entry is updated using the notified multicast forwarding table entry, and the current index of the multicast forwarding table entry is re-updated; as well as the corresponding relationship between the current index and the corresponding port list;
[0057] If the state of the received multicast forwarding table entry is update and the state of index is new, the local multicast forwarding table entry is updated using the notified multicast forwarding table entry, and a port list corresponding to the index is established.
[0058] In some possible embodiments, the multicast forwarding logic further includes an extended ACL, and the extended ACL is created in the following manner:
[0059] Receive the multicast forwarding table entry update failure reason returned by the forwarding layer through the protocol layer;
[0060] If the failure reason is that the multicast forwarding table is full, the forwarding layer is instructed to create an extended ACL through the protocol layer, wherein the extended ACL includes a matching multicast group address DMAC+VLAN keyword field key, the action is set to redirect, and the redirection port is a port list corresponding to the multicast group;
[0061] Forwarding the received multicast service message according to the multicast forwarding logic, including:
[0062] According to the extended ACL rule, the received multicast service message is forwarded according to its redirected port list.
[0063] In the third aspect, another embodiment of the present application also provides a transmission device for multicast messages in a stacking system, which is a main device in the stacking system, including at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the transmission method for multicast messages in any stacking system provided in the first aspect of the embodiment of the present application.
[0064] In the fourth aspect, another embodiment of the present application also provides a transmission device for multicast messages in a stacking system, which device is a slave device or a backup device in the stacking system, and includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for transmitting multicast messages in any stacking system provided in the second aspect of the embodiment of the present application.
[0065] In a fifth aspect, another embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program is used to enable a computer to execute the method for transmitting a multicast message in any stacking system provided in an embodiment of the present application.
[0066] The embodiment of the present application can complete the transmission of multicast service messages in the stacking system. During the entire transmission process, since the multicast forwarding logic on each device in the stacking system is completely consistent and updated synchronously, message reporting can also be implemented for devices that do not support RCPU. Through the established multicast forwarding logic, multicast service message transmission can be implemented in the stacking system.
[0067] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings introduced below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0069] Figure 1 A schematic diagram of a method for transmitting a multicast message in a stacking system of a master device according to an embodiment of the present application;
[0070] Figure 2 A schematic diagram of a process for establishing multicast forwarding logic for a master device in an embodiment of the present application;
[0071] Figure 3 A schematic flow chart of a method for transmitting a multicast message in a stacking system applied to other devices in the stacking system according to an embodiment of the present application;
[0072] Figure 4 A schematic diagram of the updating process of the multicast forwarding table and the port list in the embodiment of the present application;
[0073] Figure 5 This is a schematic diagram of the multicast service message forwarding process in an embodiment of the present application;
[0074] Figure 6 A schematic diagram of the process of maintaining multicast forwarding logic in an embodiment of the present application;
[0075] Figure 7 This is a schematic diagram of the structure of a transmission device for multicast messages in a stacking system in an embodiment of the present application;
[0076] Figure 8 This is a schematic diagram of the structure of another device for transmitting multicast messages in a stacking system in an embodiment of the present application;
[0077] Fig. 9 The present invention is a schematic diagram of the structure of a transmission device for multicast messages in a stacking system in an embodiment of the present application. DETAILED DESCRIPTION
[0078] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0079] In the description of the embodiments of the present application, unless otherwise specified, the term "multiple" refers to two or more, and other quantifiers are similar and should be understood. The preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments of the present application and the features therein may be combined with each other if there is no conflict.
[0080] To further illustrate the technical solution provided by the embodiment of the present application, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiment of the present application provides the method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiment of the present application. The method can be executed in the order of the method shown in the embodiment or drawings or in parallel during the actual processing process or when the control device is executed.
[0081] In view of the fact that the hardware of each device in the related art may not support RCPU, it is relatively complicated to establish fully synchronized multicast forwarding entries between devices, which restricts the application of multicast services in stacking systems. The present application proposes a method, device and equipment for transmitting multicast messages in a stacking system.
[0082] The following describes in detail the method, apparatus and device for transmitting multicast messages in a stacking system in the embodiments of the present application in conjunction with the accompanying drawings.
[0083] See also Figure 1 , is a method for transmitting a multicast message in a stacking system according to an embodiment of the present application, applied to a master device in the stacking system, the method comprising:
[0084] Step 101, notifying other devices in the stacking system to set a first ACL (Access Control List) entry or a range for RCPU inspection, wherein the first ACL entry is used to instruct the other devices to receive an Internet Group Management Protocol (IGMP) report message and send it to the CPU port of the master device through redirection;
[0085] The range of the above RCPU inspection is a preset range.
[0086] The IGMP Report message is a connection request message initiated by the downstream terminal of the device that receives the message, which is used to indicate that the terminal applies to join a multicast group; the multicast group address is carried by the multicast group address Groupaddress field, which is usually the destination media access control MAC (multicast DMMAC) of the multicast source.
[0087] Step 102, receiving, through the master device CPU, IGMP report messages sent by other devices that support the RCPU and are within the inspection range of the RCPU, through the RCPU;
[0088] The CPU of the anchor device receives IGMP report messages sent by the hardware RCPU from other devices that support the RCPU and are within the inspection range of the RCPU.
[0089] Supporting RCPU means that when a protocol message is received, the message can be forwarded to the main device CPU through the hardware forwarding table.
[0090] Step 103, receiving, through the master device CPU, an IGMP report message sent by other slave devices that do not support RCPU after filtering out the IGMP report message according to the first ACL table entry, and redirecting the IGMP report message;
[0091] Optionally, the first ACL table entry matches the IGMP report message through a key field key, the action is set to redirect, the redirection port is the CPU port of the master device, and the IGMP protocol message is set to the highest priority.
[0092] Step 104, after receiving the IGMP report message and determining that the device is the master device, the IGMP report message is sent to the CPU of the master device;
[0093] There is no restriction on the order in which the above steps 102, 103 and 104 are to be executed.
[0094] Each device in the stack system can determine whether its current role in the stack system is a master device according to its own identifier.
[0095] Step 105: establish a multicast forwarding logic and synchronously update it according to the IGMP report message received by the main device CPU, and forward the received multicast service message according to the multicast forwarding logic. The multicast forwarding logic includes a multicast forwarding table item and a port list. The multicast forwarding table item includes the relationship between the multicast group address and the multicast VLAN, and a port list index is set for a multicast group. The index is used to index the port list for receiving the multicast service message sent by the multicast group address.
[0096] Based on the above settings, in order to enable multicast service messages to be transmitted in the stacking system, it is also necessary to maintain multicast forwarding logic in each device in the stacking system. The multicast forwarding logic includes: multicast forwarding table entries and port lists.
[0097] The above-mentioned multicast forwarding table entry at least includes: the correspondence between the multicast group address and the multicast VLAN; and a current index is set for a multicast group (multicast group address + multicast VLAN); the value of the index is generated by the software according to the policy; an index corresponds to a port list for receiving the multicast service message sent by the multicast address, that is: one multicast group corresponds to one port list, but one port list can correspond to multiple multicast groups at the same time.
[0098] Optionally, a multicast forwarding logic is established according to the IGMP report message received by the CPU of the master device, including:
[0099] Mark the state of the multicast forwarding table entry of the multicast group as update or new according to whether there is a multicast forwarding table entry corresponding to the multicast group in the IGMP report message locally;
[0100] According to the port list in the port list library and the port list after adding the port that first receives the IGMP report message, mark the state of the index of the port list of the multicast group as new or shared;
[0101] The multicast forwarding table entries whose states are update and new and the port list whose index states are new and share are sent to other devices in the stack system.
[0102] The following is a specific process of establishing multicast forwarding logic based on the IGMP report message received by the CPU of this device in conjunction with the accompanying drawings. Figure 2 As shown, including:
[0103] Step 200, the master device CPU obtains the IGMP Report message;
[0104] Step 201, determine whether there is a corresponding multicast forwarding table entry locally;
[0105] Determine whether there is a multicast forwarding table entry corresponding to the multicast group applied to join through the current IGMP Report message locally. If yes, it indicates that the multicast group already exists, mark the state of the multicast forwarding table entry as update, and execute step 202; otherwise, execute step 206;
[0106] In this step, judging whether there is a multicast forwarding table entry corresponding to the multicast group applied for joining through the current IGMP Report message locally is specifically: determining whether there is a corresponding multicast forwarding table entry according to the multicast group address carried in the IGMP Report message.
[0107] Optionally, the parameters of the port list in the port list library include the number of members and the number of references, wherein the number of references is used to identify the number of multicast groups corresponding to the port list, that is, how many multicast forwarding table entries the port list corresponds to; the members in the port list may include several ports located on the same or different devices.
[0108] Step 202, based on the port list indexed by the index of the multicast group, determine whether the port that first receives the IGMP Report message is a new port of the multicast group. If so, execute step 203, otherwise, do not do anything; wherein the port that first receives the IGMP Report message refers to: the reporting port of the IGMP Report message for the device in the stacking system, that is, the port that receives the IGMP Report message for the first time in the entire stacking system.
[0109] In this step, if the port that first receives the IGMP Report message is not in the port list corresponding to the multicast group represented by the IGMP Report message and applied to join, then the port is considered to be a new port of the multicast group.
[0110] Step 203, after adding the new port to the port list indexed by the multicast group, whether the first new port list obtained is in the local port list library, that is, after adding the new port to the port list corresponding to the current index index corresponding to the multicast group applied for joining represented by the IGMP Report message, whether the new port list is in the local port list library, if yes, execute step 204, otherwise execute step 205;
[0111] Step 204, whether the new port list is in the library of all port lists stored locally, indicates that there are sharable port resources, and the corresponding index index is determined as the sharable index index according to the first new port list, and the sharable index index state is marked as share, and the index of the multicast group is updated to the index corresponding to the first new port list; at the same time, the number of references to the port list is increased by 1, and step 208 is executed.
[0112] In this step, since a port-connected terminal can join multiple multicast groups at the same time, a port can exist in multiple different port lists, and all port list libraries stored locally can include multiple port lists corresponding to the indexes of all multicast groups. Therefore, if the newly generated port list is in the existing port list library, it indicates that it is also referenced by other multicast groups. At this time, it is considered that there are shareable port resources. There is no need to generate a new port list, but only need to directly associate with the existing corresponding port list and increase the number of references of the port list by 1.
[0113] In this step, if the number of port list references before the port is added is 1, the memory resources occupied by the port list can be released through the protocol layer;
[0114] Step 205, adding the new port to the port list indexed by the multicast group index to obtain a second new port list, then applying for a new index for the multicast group and marking it as new, and establishing a corresponding relationship between the new index and the second new port list; recording the number of members of the new port list plus 1, and setting the number of references of the new port list to 1;
[0115] In this step, the application for a new index is determined according to a preset rule, for example, increasing one by one, etc. The second new port list members include: the port list members corresponding to the multicast forwarding table entries + the new port of the port that first receives the IGMP Report message;
[0116] If the number of port list references before adding the port is 1, after the new index index is established with the locally stored new port list, the memory resources occupied by the port list and the index index resources can be released through the protocol layer.
[0117] Step 206, creating a new multicast forwarding table entry, marking the state of the multicast forwarding table entry as new, and setting a new index index for the multicast forwarding table entry;
[0118] Step 207, determine whether there is a third port list in the local port list library that only includes the port that first receives the IGMP Report message. If so, establish a corresponding relationship between a new index and the third port list, mark the state of the new index as share, and increase the number of references of the port list by 1; otherwise, add a new port list to the local port list library, establish a corresponding relationship between the new port list and the new index, mark the state of the new index as new, the new port list includes: the port that first receives the IGMP Report message, and establish a corresponding relationship between the port list and the newly applied index index, and mark the state of the index index as new; record the number of members of the new port list as: 1, and set the number of references of the new port list to 1;
[0119] Step 208, the master device sends the currently updated multicast forwarding table entry and port list to other devices in the stacking system;
[0120] In this step, the sending method of the multicast forwarding table entry and the port list can be implemented by using the data transmission method in the stacking system in the prior art, which is not specifically limited in this application.
[0121] In this step, the multicast forwarding table entries currently updated include: all multicast forwarding table entries whose states are update and new, and the port list currently updated includes: the port list corresponding to all indexes index whose states are new and share;
[0122] The embodiment of the present application also provides a method for transmitting a multicast message in a stacking system, the method being applied to a standby device or a slave device in the stacking system, such as Figure 3 As shown, the method includes:
[0123] Step 301, setting a first access control list ACL entry or RCPU check range according to the notification of the master device, wherein the first ACL entry is used to instruct the other devices to send the received group management protocol report IGMP report message to the CPU port of the master device through redirection.
[0124] Step 302, determine whether RCPU is supported, if so, execute step 303, otherwise execute step 304;
[0125] Step 303, when it is determined that the RCPU is supported and within the RCPU inspection range, an IGMP report message is sent to the master device through the RCPU;
[0126] Step 304: When it is determined that RCPU is not supported, after selecting an IGMP report message according to the first ACL table item, send the IGMP report message to the master device by redirection;
[0127] When the slave device determines that the device supports RCPU, it sets whether the submission reason carried in the DSA tag (cascade tag) of the IGMP protocol message is within the range of RCPU inspection, so as to submit the IGMP protocol message received by the non-master device in the system to the master device CPU through the hardware RCPU; otherwise, the first ACL table item is set locally. After the IGMP Report message matches the first ACL table item, it is sent to the master device CPU through redirection.
[0128] The first ACL table entry matches the IGMP report message through the key field key, the action is set to redirect, the redirection port is the CPU port of the main device, and the IGMP protocol message is set to the highest priority.
[0129] Step 305: update the multicast forwarding logic according to the notification of the master device, and forward the received multicast service message according to the multicast forwarding logic, wherein the multicast forwarding logic includes a multicast forwarding table item and a port list, wherein the multicast forwarding table item includes the relationship between the multicast group address and the multicast VLAN, and a port list index is set for a multicast group, wherein the index is used to index the port list for receiving the multicast service message sent by the multicast group address.
[0130] It should be noted that, no matter whether the slave device or the backup device sends an IGMP Report message to the CPU port of the master device through RCPU or ACL redirection, it is necessary to search for the stacking port pointing to the CPU of the master device through the locally saved stacking topology path, and encapsulate the IGMP message with a stacking header according to the prior art. The stacking header includes: first, the port information of the IGMP message is received; and then it is forwarded to the master device hop by hop.
[0131] The above multicast forwarding logic is described in the master device embodiment and will not be described in detail here.
[0132] Optionally, updating the multicast forwarding logic according to the notification of the master device includes:
[0133] The state of the multicast forwarding table entries notified by the receiving master device is update and new, and the port list of the index state is new and shared;
[0134] Update the local multicast forwarding table and port list.
[0135] In this embodiment, the device that receives the multicast forwarding table entry and the port list updates the local multicast forwarding table entry and the port list according to the status of the received multicast forwarding table entry and the status of the index index in the multicast forwarding table entry.
[0136] In this step, if the state of the received multicast forwarding table entry is new, the state of the index index is new, and the multicast forwarding table entry and the corresponding port list do not exist locally before, a multicast forwarding table entry and a port list corresponding to the current index index are created locally;
[0137] In this step, if the state of the received multicast forwarding table entry is new and the state of the index index is share, it indicates that the multicast forwarding table entry does not exist locally before but the port list already exists; therefore, a multicast forwarding table entry is created locally, and a corresponding relationship is established between the current index index and the corresponding port list;
[0138] In this step, if the state of the received multicast forwarding table item is update, and the state of the index index is share, it indicates that the local multicast forwarding table item has been stored before, and the port list already exists; therefore, the local multicast forwarding table item is updated with the received multicast forwarding table item, and the current index index of the multicast forwarding table item is re-updated; and the corresponding relationship between the current index index and the corresponding port list;
[0139] In this step, if the status of the received multicast table entry is update and the status of the current index index is new, it indicates that the multicast forwarding table entry has been stored locally before, but a new port list needs to be generated; therefore, the local multicast forwarding table entry is updated locally with the received multicast forwarding table entry, and a port list corresponding to the current index index is established.
[0140] In this step, when creating a port list locally according to the port information carried in the port list, it can be determined whether the port in the port list is a local port of the device. If so, it is added to the local port list. Otherwise, when it is determined that the device is a slave device, it is not processed; and when it is a backup device, it is also added to the local port list to perform real-time backup; therefore, for the slave device, the upper protocol layer does not need to pay attention to whether the forwarding port is local, which reduces the work of the upper protocol layer;
[0141] In this step, operations on multicast forwarding table entries are all completed by the forwarding layer.
[0142] Optionally, for a master device or other device in a stack system, the multicast forwarding logic further includes an extended ACL, and the extended ACL is created in the following manner:
[0143] Receive the multicast forwarding table entry update failure reason returned by the forwarding layer through the protocol layer;
[0144] If the failure reason is that the multicast forwarding table is full, the forwarding layer is instructed to create an extended ACL through the protocol layer, wherein the extended ACL includes a matching multicast group address DMAC+VLAN keyword field key, the action is set to redirect, and the redirection port is a port list corresponding to the multicast group;
[0145] Forwarding the received multicast service message according to the multicast forwarding logic, including:
[0146] According to the extended ACL rule, the received multicast service message is forwarded according to its redirected port list.
[0147] Specifically, Figure 4 As shown, after the master device sends the currently updated multicast forwarding table entry and the port list to other devices in the stack system, the following further includes:
[0148] Step 400, the device that receives the multicast forwarding table and the port list updates the multicast forwarding table entry and the port list according to the state of the index index in the multicast forwarding table;
[0149] Step 401, for a master device or other devices in a stacking system, determine whether all devices in the stacking system are updated successfully, if yes, execute step 402, otherwise, execute step 403;
[0150] In this step, each device first determines whether the local multicast forwarding table entry is successfully updated, and notifies other devices in the stacking system of the update result. After each device knows whether the local update is successful and receives notification from other devices about whether the update is successful, it can know whether all devices in the stacking system have been updated successfully.
[0151] In this step, if the number of entries in the multicast forwarding table reaches the maximum hardware capacity, further adding multicast forwarding table entries will cause the multicast forwarding table entry update to fail. At this time, the multicast table entry update failure is notified to the remaining devices. That is to say, if any device in the entire stack system fails to update the multicast forwarding table entry, it is considered that the multicast table entry update of all devices has failed.
[0152] Step 402, each device notifies the protocol layer of the update result of the multicast forwarding table entry, and the protocol layer records the multicast group information, including: multicast group address, VLAN, current index index and the number of times the index index is referenced, but does not record the status identifier of the index index.
[0153] In this step, each device will notify other devices after the local multicast entry is successfully updated, and the specific method is not limited.
[0154] Step 403: Each device enters the multicast entry processing flow.
[0155] Specifically, the multicast entry processing flow includes: if the index state of the multicast forwarding entry that fails to be updated is new, releasing the newly applied index; if the index state is marked as share, reducing the number of port references by 1.
[0156] Furthermore, in this step, the protocol layer can determine the cause of failure based on the error information returned by the forwarding layer and perform different processing. Typically, the error information returned by the forwarding layer can be indicated by an error value indicating the failure to establish the multicast forwarding table entry. When the returned error value indicates that the current multicast forwarding table entry is full, the protocol layer instructs the forwarding layer to create an extended ACL rule: the keyword field key matches the multicast lease address DMAC+VLAN, the action is set to redirect, and the redirection port is the port list corresponding to the multicast group, and the expansion mode of the multicast group is marked as ACL; when the returned error value indicates other reasons, the protocol layer notifies the user, and this application does not involve the specific implementation process.
[0157] Therefore, through the above steps, the same multicast message forwarding logic can be set on each device in the stack system through the multicast forwarding table, the port list and the extended ACL rule.
[0158] like Figure 5 As shown in FIG. 1 , when a master device or other device in a stack system receives a multicast service message, the process of forwarding the multicast service message is as follows:
[0159] Step 501, searching the multicast forwarding table entry according to the multicast group address+VLAN carried in the multicast service message, searching the multicast forwarding table entry, if the corresponding entry is found, executing step 502; otherwise, executing step 506;
[0160] Step 502, confirming the corresponding index index according to the found multicast forwarding table entry;
[0161] Step 503, searching the port list according to the confirmed index to determine whether there is a local port, if yes, executing step 505, otherwise, executing step 504;
[0162] Step 504: forward the multicast service message to the next-level device via the stack port, and then continue to execute steps 502 and 503 on the next-level device;
[0163] In this step, when the stack port forwards the multicast service message, the index corresponding to the outbound port is carried in the stack header, so that the next-level device can directly search the port list when receiving the multicast service message, without having to search the multicast forwarding table entry again according to the multicast group address + VLAN;
[0164] Step 505, the multicast service message is forwarded locally according to the local forwarding table;
[0165] Step 506: forward the multicast service message according to the extended ACL rule and the redirected port list.
[0166] One special point is to be noted here, when a multicast service message is received and forwarding cannot be achieved according to the multicast forwarding table and the extended ACL rules, it is processed according to the existing technology and is not involved in this application.
[0167] Based on the above steps, the transmission of multicast service messages in the stacking system can be completed. During the entire transmission process, since the multicast forwarding logic on each device in the stacking system is completely consistent and updated synchronously, there is no need to distinguish between system roles. For multicast service messages, it is only necessary to query the multicast forwarding table items on the first receiving device. When the multicast forwarding table items exist, subsequent forwarding between devices does not need to query the multicast forwarding table items, but only determines the port for forwarding according to the index. When the multicast forwarding table items do not exist due to hardware capacity problems, the messages between devices are forwarded through the extended ACL rules, making the whole process simple to implement and stable and reliable.
[0168] Furthermore, in the embodiment of the present application, the multicast forwarding logic is also maintained, such as Figure 6 As shown, it may also include:
[0169] Step 601, upon receiving an IGMP Leave (Internet Group Management Protocol Leave) message, determine whether the device is a master device. If so, send the message directly to the master device CPU, and then execute step 605; otherwise, execute step 602;
[0170] In this step, the IGMP Leave message is a leave request message initiated by the downstream terminal of the device that receives the message, which is used to indicate that the terminal applies to leave a multicast group; the multicast group address is carried by the Groupaddress field, which is usually the destination MAC (multicast DMMAC) of the multicast source;
[0171] The device can determine whether its current role in the stacking system is a master device according to its own identification;
[0172] Step 602, determine whether the device supports RCPU, if yes, execute step 604, if no, execute step 603;
[0173] Step 603, after matching the IGMP Leave message with the first ACL entry, the message is sent to the CPU of the master device by redirection;
[0174] Step 604, sending the IGMP Leave message to the master device CPU via the RCPU;
[0175] Step 605, after the master device CPU obtains the IGMP Leave message, it determines whether there is a corresponding multicast forwarding table entry for the multicast group address carried therein, if yes, execute step 606b, otherwise, it indicates that the previous multicast service message is forwarded based on the extended ACL rule, execute step 606a;
[0176] Step 606a: Delete the reporting port of the IGMP Leave message in the port list of the extended ACL rule.
[0177] Step 606b, obtaining the number of members and the number of references in the port list corresponding to the current index index of the multicast forwarding table entry, and updating the multicast forwarding table entry and the port list in different ways; specifically:
[0178] When the number of members in the port list is 1 and the number of references is 1, it indicates that the member port in the port list is only referenced by the multicast group corresponding to the multicast forwarding table entry, and the forwarding layers of all devices in the stacking system are notified to directly delete the multicast forwarding table entry and the index corresponding to the multicast forwarding table entry;
[0179] If the number of members in the port list is 1 and the number of references is greater than 1, it indicates that the member port in the port list is still referenced by other multicast groups. The number of references in the port list is reduced by 1, and the forwarding layers of all devices in the stack system are notified to delete only the multicast forwarding entry.
[0180] When the number of members in the port list is greater than 1, it indicates that the member ports in the port list are referenced by the current multicast group or other multicast groups, delete the member ports (device ports receiving the IGMPLeave messages) determined in the port list, generate a new port list, and judge whether there is the same port list in all local port list libraries, if so, update the current index index of the multicast forwarding table item to the index index corresponding to the local port list; and add 1 to the number of port list references, otherwise, generate a new current index index for the multicast forwarding table item, establish the corresponding relationship between the current index index and the port list after deleting the member ports, and mark the state of the current multicast forwarding table item as update, and the state of the current index index as new;
[0181] In the above step, notifying the forwarding layers of all devices in the stacking system to directly delete the multicast forwarding entry can be implemented by ordinary technicians in the field according to the existing technology, which is not repeated here. As long as each device can identify the multicast forwarding entry and port list information that need to be deleted, it will be sufficient.
[0182] Step 607: The master device sends the currently updated multicast forwarding table entry and port list to other devices in the stacking system.
[0183] The sending method of the multicast forwarding table entry and the port list can be implemented by using the data transmission method in the stacking system in the prior art, and the present application does not specifically limit it.
[0184] In this step, the multicast forwarding table entries currently updated include: all multicast forwarding table entries whose state is update, and the port list currently updated includes: the port list corresponding to all indexes indexed whose states are new and share;
[0185] Step 608: The device that has received the multicast forwarding table entry and the port list updates the local multicast forwarding table entry and the port list according to the status of the received multicast forwarding table entry and the status of the index index in the multicast forwarding table entry.
[0186] In this step, if the state of the received multicast forwarding table entry is update, and the state of the index index is share, the local multicast forwarding table entry is updated with the received multicast forwarding table entry, and the current index index of the multicast forwarding table entry is re-updated; and the corresponding relationship between the current index index and the corresponding port list;
[0187] In this step, if the state of the received multicast table entry is update and the state of the current index index is new, the local multicast forwarding table entry is updated with the received multicast forwarding table entry, and a port list corresponding to the current index index is established.
[0188] In this step, when creating a port list locally according to the port information carried in the port list, it can be determined whether the port in the port list is a local port of the device. If so, it is added to the local port list. Otherwise, when it is determined that the device is a slave device, it is not processed; and when it is a backup device, it is also added to the local port list to perform real-time backup; therefore, for the slave device, the upper protocol layer does not need to pay attention to whether the forwarding port is local, which reduces the work of the upper protocol layer;
[0189] In this step, operations on multicast forwarding table entries are all completed by the forwarding layer.
[0190] Step 609, each device receives the notification sent by the master device and the forwarding layer of all devices in the stacking system directly deletes the multicast forwarding entry or the index corresponding to the multicast forwarding entry, performs the deletion operation at the local forwarding layer according to the notification, and after the forwarding layer completes the deletion, the protocol layer releases the corresponding resources.
[0191] One thing to note here is that the above steps 608 and 609 do not have a specific order, and they are processed in order for the sake of convenience.
[0192] Based on the same inventive concept, the present application also provides a transmission device 700 for multicast messages in a stacking system. Figure 7 As shown, the device comprises:
[0193] Notification setting module 701, used for notifying other devices in the stacking system to set a first access control list (ACL) table item or a range of RCPU inspection, wherein the first ACL table item is used to indicate that the other devices receive a group management protocol report (IGMP) report message and then send it to the CPU port of the master device through redirection;
[0194] The first receiving module 702 is used to receive, through the main device CPU, IGMP report messages sent by other devices that support RCPU and are within the inspection range of the RCPU through the RCPU;
[0195] The second receiving module 703 is used to receive, through the master device CPU, an IGMP report message sent by other slave devices that do not support RCPU in a redirection manner after filtering out the IGMP report message according to the first ACL table item;
[0196] The third receiving module 704 is used to receive the IGMP report message and determine that the device is the master device, and send the IGMP report message to the master device CPU;
[0197] The update forwarding module 705 is used to establish and synchronously update the multicast forwarding logic according to the IGMP report message received by the main device CPU, and forward the received multicast service message according to the multicast forwarding logic. The multicast forwarding logic includes a multicast forwarding table item and a port list. The multicast forwarding table item includes the relationship between the multicast group address and the multicast VLAN, and a port list index is set for a multicast group. The index is used to index the port list for receiving the multicast service message sent by the multicast group address.
[0198] The first ACL table entry matches the IGMP report message through the key field key, the action is set to redirect, the redirection port is the CPU port of the main device, and the IGMP protocol message is set to the highest priority.
[0199] Optionally, the update forwarding module establishes a multicast forwarding logic according to the IGMP report message received by the CPU of the master device and updates it synchronously, including:
[0200] Mark the state of the multicast forwarding table entry of the multicast group as update or new according to whether there is a multicast forwarding table entry corresponding to the multicast group in the IGMP report message locally;
[0201] According to the port list in the port list library and the port list after adding the port that first receives the IGMP report message, mark the state of the index of the port list of the multicast group as new or shared;
[0202] The multicast forwarding table entries whose states are update and new and the port list whose index states are new and share are sent to other devices in the stack system.
[0203] Optionally, the updating and forwarding module marks the state of the multicast forwarding table entry of the multicast group as updated or newly created according to whether there is a multicast forwarding table entry corresponding to the multicast group in the IGMP report message locally, including:
[0204] When it is determined that a multicast forwarding table entry of the multicast group exists locally according to the multicast group corresponding to the multicast group address in the IGMP report message, marking the state of the multicast forwarding table entry of the multicast group as update;
[0205] Determine that a multicast forwarding table entry for the multicast group does not exist locally, create a new multicast forwarding table entry, and mark the state of the new multicast forwarding table entry as new.
[0206] Optionally, the updating forwarding module marks the state of the index of the port list of the multicast group as newly created or shared according to the port list in the port list library and the port list after adding the port that first receives the IGMP report message, including:
[0207] When it is determined that a multicast forwarding table entry of the multicast group exists locally, judging whether the port that first receives the IGMP report message is a new port of the multicast group according to the port list indexed by the index of the multicast group;
[0208] If it is a new port of the multicast group, determine whether a first new port list obtained after adding the new port to the port list indexed by the multicast group is in the port list library;
[0209] If in the port list library, mark the index corresponding to the first new port list as share, and update the index of the multicast group to the index corresponding to the first new port list;
[0210] If not in the port list library, add the new port to the port list indexed by the multicast group index to obtain a second new port list, apply for a new index for the multicast group and mark it as new, and establish a corresponding relationship between the new index and the second new port list.
[0211] Optionally, the updating forwarding module marks the state of the index of the port list of the multicast group as newly created or shared according to the port list in the port list library and the port list after adding the port that first receives the IGMP report message, including:
[0212] Determine that there is no multicast forwarding table entry for the multicast group locally, and apply for a new index for the multicast group;
[0213] Determine whether there is a third port list in the port list library that includes only the port that first receives the IGMP report message;
[0214] If it exists, establish a corresponding relationship between a new index and the third port list, and mark the state of the new index as share;
[0215] Otherwise, a new port list is added to the port list library, a corresponding relationship between the new port list and the new index is established, and the state of the new index is marked as new.
[0216] Optionally, the multicast forwarding logic further includes an extended ACL, and the extended ACL is created in the following manner:
[0217] Receive the multicast forwarding table entry update failure reason returned by the forwarding layer through the protocol layer;
[0218] If the failure reason is that the multicast forwarding table is full, the forwarding layer is instructed to create an extended ACL through the protocol layer, wherein the extended ACL includes a matching multicast group address DMAC+VLAN keyword field key, the action is set to redirect, and the redirection port is a port list corresponding to the multicast group;
[0219] Forwarding the received multicast service message according to the multicast forwarding logic, including:
[0220] According to the extended ACL rule, the received multicast service message is forwarded according to its redirected port list.
[0221] Optionally, the parameters of the port list in the port list library include the number of members and the number of references, and the number of references is used to identify the number of multicast groups corresponding to the port list.
[0222] Optionally, the updating forwarding module forwards the received multicast service message according to the multicast forwarding logic, including:
[0223] Search the multicast forwarding table entry based on the multicast group address + VLAN carried in the multicast service message;
[0224] Confirm the corresponding index according to the found multicast forwarding table entry, and search the port list according to the confirmed index to determine whether the local port exists on the device;
[0225] If yes, the multicast service message is forwarded locally according to the local multicast forwarding table entry; otherwise, the multicast service message is forwarded to the next-level device via the stack port, and the index is carried in the stack header.
[0226] Optionally, the update forwarding module is further used to:
[0227] After receiving the IGMP leave message through the master device CPU, determining whether there is a corresponding multicast forwarding table entry according to the multicast group address carried in the IGMP leave message;
[0228] If a corresponding multicast forwarding table entry exists, the multicast forwarding table entry and the port list are updated in different ways according to the number of members and the number of references of the port list corresponding to the multicast forwarding table entry;
[0229] If there is no corresponding multicast forwarding entry, it is determined that the corresponding multicast service message is forwarded based on the extended ACL, and the reporting port of the IGMP leave message in the port list of the extended ACL is deleted.
[0230] The above technical solution provided by the embodiment of the present application has the following technical effects:
[0231] This application is based on the multicast forwarding logic including multicast forwarding table entries, port lists and extended ACL rules, and the transmission of multicast service messages in the stacking system is stable and reliable;
[0232] In a stack system, multicast protocol packets entering a slave device are directly sent to the master device CPU through the ACL or RCPU. At the same time, multicast protocol packets are set to a high priority, which ensures that multicast forwarding entries can be quickly learned when a large number of request packets or other protocols are running at the same time.
[0233] The present application also implements fault-tolerant processing of the creation failure of multicast forwarding entries in the stacking system due to resource limitations, and uses ACL to expand the capacity of some multicast entries that exceed chip resources, thereby ensuring the service's demand for multicast capacity;
[0234] The present application realizes a method in which only a complete port list needs to be saved in the CPU of the main device and the CPU of the backup device at the protocol layer, without distinguishing and saving corresponding forwarding lists according to different devices, thereby greatly reducing the memory usage of the protocol layer.
[0235] The present application implements a method for creating a list first and then updating the entries in order to prevent the service situation of existing users when updating the user list of multicast entries.
[0236] The embodiment of the present application also provides a transmission device for multicast messages in a stacking system, such as Figure 8 As shown, including:
[0237] The notification setting module 801 is used to set the first access control list ACL table item or the RCPU inspection range according to the notification of the main device. The first ACL table item is used to indicate that the other devices send the group management protocol report IGMP report message to the CPU port of the main device through redirection after receiving it.
[0238] A first sending module 802 is used to send an IGMP report message to the master device CPU through the RCPU when it is determined that the RCPU is supported and is within the RCPU inspection range;
[0239] The second sending module 803 is used for selecting an IGMP report message according to the first ACL table item and sending the IGMP report message to the master device CPU by redirection when it is determined that the RCPU is not supported;
[0240] The update forwarding module 804 is used to update the multicast forwarding logic according to the notification of the main device, and forward the received multicast service message according to the multicast forwarding logic. The multicast forwarding logic includes a multicast forwarding table item and a port list. The multicast forwarding table item includes the relationship between the multicast group address and the multicast VLAN, and a port list index is set for a multicast group. The index is used to index the port list for receiving the multicast service message sent by the multicast group address.
[0241] Optionally, the updating forwarding module updates the multicast forwarding logic according to the notification of the master device, including:
[0242] The state of the multicast forwarding table entries notified by the receiving master device is update and new, and the port list of the index state is new and shared;
[0243] Update the local multicast forwarding table and port list.
[0244] Optionally, the update forwarding module updates the local multicast forwarding table entry and the port list, including:
[0245] If the state of the notified multicast forwarding table entry is new and the state of index is new, a multicast forwarding table entry and a port list corresponding to the current index index are created locally;
[0246] If the state of the notified multicast forwarding table entry is new and the state of the index is share, a multicast forwarding table entry is created locally, and a corresponding relationship between the index and the port list is established;
[0247] If the state of the notified multicast forwarding table entry is update and the state of index is share, the local multicast forwarding table entry is updated using the notified multicast forwarding table entry, and the current index of the multicast forwarding table entry is re-updated; as well as the corresponding relationship between the current index and the corresponding port list;
[0248] If the state of the received multicast forwarding table entry is update and the state of index is new, the local multicast forwarding table entry is updated using the notified multicast forwarding table entry, and a port list corresponding to the index is established.
[0249] Optionally, the multicast forwarding logic further includes an extended ACL, and the extended ACL is created in the following manner:
[0250] Receive the multicast forwarding table entry update failure reason returned by the forwarding layer through the protocol layer;
[0251] If the failure reason is that the multicast forwarding table is full, the forwarding layer is instructed to create an extended ACL through the protocol layer, wherein the extended ACL includes a matching multicast group address DMAC+VLAN keyword field key, the action is set to redirect, and the redirection port is a port list corresponding to the multicast group;
[0252] Forwarding the received multicast service message according to the multicast forwarding logic, including:
[0253] According to the extended ACL rule, the received multicast service message is forwarded according to its redirected port list.
[0254] The embodiment of the present application also provides a transmission device for multicast messages in a stacking system, such as Fig. 9 As shown, it includes at least one processor 902; and a memory 901 that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for transmitting multicast messages in a stacking system executed by the main device in the above-mentioned embodiment, or execute the method for transmitting multicast messages in a stacking system executed by other devices other than the main device in the above-mentioned embodiment.
[0255] The memory 901 is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory 901 may be a volatile memory, such as a random-access memory (RAM); or a non-volatile memory, such as a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or a combination of any one or more of the above volatile memories and non-volatile memories.
[0256] The processor 902 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP. It may also be a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0257] Based on the same inventive concept, this embodiment also provides a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program is used to enable a computer to execute the above-mentioned industrial land evaluation method.
[0258] The above-mentioned storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0259] The present disclosure also provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any one of the above-mentioned methods for transmitting a multicast message in a stacking system according to the present disclosure.
[0260] The technical solution provided by the present application is introduced in detail above. The principles and implementation methods of the present application are explained by using specific examples in the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0261] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for transmitting a multicast message in a stacking system, applied to a master device in the stacking system, characterized in that: The method comprises: Notify other devices in the stacking system to set a first access control list (ACL) entry or a range for RCPU inspection, where the first ACL entry is used to instruct the other devices to send a group management protocol (IGMP) report message to the CPU port of the master device by redirection after receiving the IGMP report message; Receiving, through the master device CPU, IGMP report messages sent by other devices that support the RCPU and are within the inspection range of the RCPU, through the RCPU; After receiving, through the master device CPU, the IGMP report message sent by other slave devices that do not support RCPU and filtering out the IGMP report message according to the first ACL table entry, by redirecting; After receiving the IGMP report message and determining that the device is the master device, the IGMP report message is sent to the CPU of the master device; A multicast forwarding logic is established and updated synchronously according to the IGMP report message received by the main device CPU, and the received multicast service message is forwarded according to the multicast forwarding logic. The multicast forwarding logic includes a multicast forwarding table item and a port list. The multicast forwarding table item includes the relationship between the multicast group address and the multicast VLAN, and a port list index is set for a multicast group. The index is used to index the port list for receiving the multicast service message sent by the multicast group address.
2. The method according to claim 1, characterized in that The first ACL table entry matches the IGMP report message through the key field key, the action is set to redirect, the redirection port is the CPU port of the main device, and the IGMP protocol message is set to the highest priority.
3. The method according to claim 1, characterized in that: The multicast forwarding logic is established and updated synchronously based on the IGMP report messages received by the CPU of the master device, including: Mark the state of the multicast forwarding table entry of the multicast group as update or new according to whether there is a multicast forwarding table entry corresponding to the multicast group in the IGMP report message locally; According to the port list in the port list library and the port list after adding the first received IGMP report message, the index status of the port list of the multicast group is marked as new or shared share; The multicast forwarding table entries whose states are update and new and the port list whose index states are new and share are sent to other devices in the stack system.
4. The method according to claim 3, characterized in that Marking the state of the multicast forwarding table entry of the multicast group as update or new according to whether there is a multicast forwarding table entry corresponding to the multicast group in the IGMP report message locally, including: When it is determined that a multicast forwarding table entry of the multicast group exists locally according to the multicast group corresponding to the multicast group address in the IGMP report message, marking the state of the multicast forwarding table entry of the multicast group as update; Determine that a multicast forwarding table entry for the multicast group does not exist locally, create a new multicast forwarding table entry, and mark the state of the new multicast forwarding table entry as new.
5. The method according to claim 3, characterized in that: According to the port list in the port list library and the port list after adding the port that first receives the IGMP report message, marking the state of the index of the port list of the multicast group as new or shared, including: When it is determined that a multicast forwarding table entry of the multicast group exists locally, judging whether the port that first receives the IGMP report message is a new port of the multicast group according to the port list indexed by the index of the multicast group; If it is a new port of the multicast group, determine whether a first new port list obtained after adding the new port to the port list indexed by the multicast group is in the port list library; If in the port list library, mark the index corresponding to the first new port list as share, and update the index of the multicast group to the index corresponding to the first new port list; If not in the port list library, add the new port to the port list indexed by the multicast group index to obtain a second new port list, apply for a new index for the multicast group and mark it as new, and establish a corresponding relationship between the new index and the second new port list.
6. The method according to claim 3, characterized in that: According to the port list in the port list library and the port list after adding the port that first receives the IGMP report message, marking the state of the index of the port list of the multicast group as new or shared, including: Determine that there is no multicast forwarding table entry for the multicast group locally, and apply for a new index for the multicast group; Determine whether there is a third port list in the port list library that includes only the port that first receives the IGMP report message; If it exists, establish a corresponding relationship between a new index and the third port list, and mark the state of the new index as share; Otherwise, a new port list is added to the port list library, a corresponding relationship between the new port list and the new index is established, and the state of the new index is marked as new.
7. The method according to claim 3, characterized in that The multicast forwarding logic also includes an extended ACL, which is created in the following manner: Receive the multicast forwarding table entry update failure reason returned by the forwarding layer through the protocol layer; If the failure reason is that the multicast forwarding table is full, the forwarding layer is instructed to create an extended ACL through the protocol layer, wherein the extended ACL includes a matching multicast group address DMAC+VLAN keyword field key, the action is set to redirect, and the redirection port is a port list corresponding to the multicast group; Forwarding the received multicast service message according to the multicast forwarding logic, including: According to the extended ACL rule, the received multicast service message is forwarded according to its redirected port list.
8. The method according to claim 3 or 7, characterized in that: The parameters of the port list in the port list library include the number of members and the number of references, and the number of references is used to identify the number of multicast groups corresponding to the port list.
9. The method according to claim 1, characterized in that: Forwarding the received multicast service message according to the multicast forwarding logic, including: Search the multicast forwarding table entry based on the multicast group address + VLAN carried in the multicast service message; Confirm the corresponding index according to the found multicast forwarding table entry, and search the port list according to the confirmed index to determine whether the local port exists on the device; If yes, the multicast service message is forwarded locally according to the local multicast forwarding table entry; otherwise, the multicast service message is forwarded to the next-level device via the stack port, and the index is carried in the stack header.
10. The method according to claim 8, characterized in that Also includes: After receiving the IGMP leave message, the CPU of the master device determines whether there is a corresponding multicast forwarding table entry according to the multicast group address carried in the IGMP leave message; If there is a corresponding multicast forwarding table entry, the multicast forwarding table entry and the port list are updated in different ways according to the number of members and the number of references of the port list corresponding to the multicast forwarding table entry; If there is no corresponding multicast forwarding entry, it is determined that the corresponding multicast service message is forwarded based on the extended ACL, and the reporting port of the IGMP leave message in the port list of the extended ACL is deleted.
11. A method for transmitting multicast messages in a stacking system, applied to other devices in the stacking system, characterized in that: The method comprises: Setting a first access control list (ACL) entry or a range of RCPU inspection according to the notification of the master device, wherein the first ACL entry is used to instruct the other devices to send a group management protocol (IGMP) report message to the CPU port of the master device through redirection after receiving the IGMP report message; When it is determined that the RCPU is supported and within the inspection range of the RCPU, an IGMP report message is sent to the master device CPU through the RCPU; When it is determined that RCPU is not supported, after selecting the IGMP report message according to the first ACL table item, the IGMP report message is sent to the master device CPU by redirection; The multicast forwarding logic is updated according to the notification of the master device, and the received multicast service message is forwarded according to the multicast forwarding logic, the multicast forwarding logic includes a multicast forwarding table item and a port list, the multicast forwarding table item includes the relationship between the multicast group address and the multicast VLAN, and a port list index is set for a multicast group, and the index is used to index the port list for receiving the multicast service message sent by the multicast group address.
12. The method according to claim 11, characterized in that Update the multicast forwarding logic based on the notification from the master device, including: The state of the multicast forwarding table entries notified by the receiving master device is update and new, and the port list of the index state is new and shared; Update the local multicast forwarding table and port list.
13. The method according to claim 12, characterized in that Update the local multicast forwarding table and port list, including: If the state of the notified multicast forwarding table entry is new and the state of index is new, a multicast forwarding table entry and a port list corresponding to the current index index are created locally; If the state of the notified multicast forwarding table entry is new and the state of the index is share, a multicast forwarding table entry is created locally, and a corresponding relationship between the index and the port list is established; If the state of the notified multicast forwarding table entry is update and the state of index is share, the local multicast forwarding table entry is updated using the notified multicast forwarding table entry, and the current index of the multicast forwarding table entry is re-updated; as well as the corresponding relationship between the current index and the corresponding port list; If the state of the received multicast forwarding table entry is update and the state of index is new, the local multicast forwarding table entry is updated using the notified multicast forwarding table entry, and a port list corresponding to the index is established.
14. The method according to claim 11, characterized in that The multicast forwarding logic also includes an extended ACL, which is created in the following manner: Receive the multicast forwarding table entry update failure reason returned by the forwarding layer through the protocol layer; If the failure reason is that the multicast forwarding table is full, the forwarding layer is instructed to create an extended ACL through the protocol layer, wherein the extended ACL includes a matching multicast group address DMAC+VLAN keyword field key, the action is set to redirect, and the redirection port is a port list corresponding to the multicast group; Forwarding the received multicast service message according to the multicast forwarding logic, including: According to the extended ACL rule, the received multicast service message is forwarded according to its redirected port list.
15. A transmission device for multicast messages in a stacking system, the device being a master device in the stacking system, characterized in that: It comprises at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described in any one of claims 1-10.
16. A transmission device for multicast messages in a stacking system, the device being a slave device or a backup device in the stacking system, characterized in that: It comprises at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described in any one of claims 11-14.
17. A device for transmitting multicast messages in a stacking system, the device being a master device in the stacking system, characterized in that: include: A notification setting module, used for notifying other devices in the stacking system to set a first access control list (ACL) table item or a range of RCPU inspection, wherein the first ACL table item is used to instruct the other devices to send a group management protocol (IGMP) report message to the CPU port of the master device by redirection after receiving the IGMP report message; A first receiving module, configured to receive, through the main device CPU, IGMP report messages sent by other devices supporting the RCPU and within the inspection range of the RCPU through the RCPU; A second receiving module is used to receive, through the master device CPU, an IGMP report message sent by other slave devices that do not support RCPU after filtering out the IGMP report message according to the first ACL table item in a redirection manner; The third receiving module is used to receive the IGMP report message and determine that the device is the master device, and send the IGMP report message to the master device CPU; The update forwarding module is used to establish and synchronously update the multicast forwarding logic according to the IGMP report message received by the main device CPU, and forward the received multicast service message according to the multicast forwarding logic. The multicast forwarding logic includes a multicast forwarding table item and a port list. The multicast forwarding table item includes the relationship between the multicast group address and the multicast VLAN, and a port list index is set for a multicast group. The index is used to index the port list for receiving the multicast service message sent by the multicast group address.
18. A device for transmitting multicast messages in a stacking system, wherein the device is another device in the stacking system, characterized in that: include: A notification setting module, used for setting a first access control list (ACL) item or a range of RCPU inspection according to the notification of the master device, wherein the first ACL item is used for indicating that the other devices receive a group management protocol report (IGMP) report message and then send it to the CPU port of the master device through redirection; A first sending module, configured to send an IGMP report message to the master device CPU through the RCPU when determining that the RCPU is supported and within the RCPU inspection range; A second sending module, configured to send an IGMP report message to the master device CPU by redirecting after selecting an IGMP report message according to the first ACL entry when determining that the RCPU is not supported; The update forwarding module is used to update the multicast forwarding logic according to the notification of the master device, and forward the received multicast service message according to the multicast forwarding logic, the multicast forwarding logic includes a multicast forwarding table item and a port list, the multicast forwarding table item includes the relationship between the multicast group address and the multicast VLAN, and a port list index is set for a multicast group, and the index is used to index the port list for receiving the multicast service message sent by the multicast group address.
19. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and the computer program is used to enable a computer to execute the method according to any one of claims 1 to 10, or to execute the method according to any one of claims 11 to 14.
Citation Information
Patent Citations
Three-layer multicast achieving method in software longitudinal stacking system and equipment
CN103457862A
Multicast data packet forwarding method, device and system
CN108123880A
Multicast table entry synchronization method and device based on stacking environment and medium
CN115022261A
Near-hitless upgrade or fast bootup with virtualized hardware
US20220091870A1
