Local priority forwarding implementation method and device, network equipment, storage medium and program product
By creating virtual link aggregation and forwarding messages on switches that do not support local priority forwarding, the problem of local priority forwarding at the chip level is solved, local priority forwarding of known unicast messages and normal forwarding of non-known unicast messages is realized, and the universality of the device is improved.
Patent Information
- Application Number
- CN202411822138.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-28
AI Technical Summary
Some switches do not support local priority forwarding at the chip level, resulting in the failure to realize local priority forwarding of known unicast messages in the stacking system, affecting the universality of the device.
By creating a virtual link aggregation consistent with the target link aggregation, delete the physical ports of other network devices in the target link aggregation, record only the local physical ports, and forward them through the target link aggregation or virtual link aggregation according to the message type.
It realizes local priority forwarding of known unicast messages on network devices that do not support local priority forwarding, and ensures normal forwarding of non-known unicast messages, improving the universality of the device in the stacking system.
Smart Images

Figure CN119728537A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication, and in particular to a method, device, network equipment, storage medium and program product for realizing local priority forwarding. Background Art
[0002] Stacking refers to combining more than one switch to work together to provide as many ports as possible in a limited space. It is a software virtualization technology that manages a group of switches as an object, enabling multiple devices to work together and be managed in a unified manner. Link aggregation technology is often used in stacking systems, which can bind multiple physical links together to form a complete logical link.
[0003] Local priority forwarding is a common function of link aggregation, that is, the known unicast traffic entering from this chip, when the exit is the link aggregation port, will be forwarded out by the member port of the link aggregation on this chip first, so as to reduce the traffic across devices in the stacking scenario. Local priority forwarding is only effective for known unicast messages, and for BUM (Broadcast, Unknown unicast, Multiple, broadcast, unknown unicast and multicast) traffic, it is flooded in the corresponding VLAN. Due to some limitations in the process of technological development, some manufacturers' switches do not support the local priority forwarding function at the chip level. For these switches that do not support the local priority forwarding function at the chip level, some methods are urgently needed to realize functions similar to local priority to improve the versatility of the equipment in the stacking system. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a method, apparatus, network device, storage medium and program product for implementing local priority forwarding, which can implement the local priority forwarding function of known unicast messages without affecting the functions of other chips of the network device.
[0005] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:
[0006] In a first aspect, the present invention provides a method for implementing local priority forwarding, which is applied to a network device in a stacking system, and the method comprises:
[0007] Creating a virtual link aggregation that is consistent with a member port of a target link aggregation of the device, wherein the target link aggregation refers to a link aggregation of member ports including a local physical port and physical ports of other network devices of the stacking system;
[0008] Deleting the physical ports of the other network devices in the target link aggregation and saving the data;
[0009] After obtaining the message to be forwarded, determine whether the message to be forwarded is a known unicast message; if so, forward the message to be forwarded through the local physical port in the target link aggregation; otherwise, forward the message to be forwarded through all member ports in the virtual link aggregation.
[0010] In an optional implementation manner, before creating a virtual link aggregation that is consistent with a member port of a target link aggregation of the device, the method further includes:
[0011] An instruction for enabling local priority forwarding of the target link aggregation is received.
[0012] In an optional implementation manner, before deleting and saving the physical ports of the other network devices in the target link aggregation, the method further includes:
[0013] The link aggregation set for the local physical port in the target link aggregation and used to forward the BUM message is updated to the virtual link aggregation.
[0014] In an optional implementation manner, the determining whether the message to be forwarded is a known unicast message includes:
[0015] Search the MAC address forwarding table, and if there is an entry matching the destination MAC address and the corresponding VLAN identifier carried by the message to be forwarded, determine that the message to be forwarded is the known unicast message; otherwise, determine that the message to be forwarded is a BUM message.
[0016] In an optional implementation manner, forwarding the message to be forwarded through a local physical port in the target link aggregation includes:
[0017] Obtain the link aggregation port corresponding to the destination MAC address and the VLAN identifier in the MAC address forwarding table;
[0018] Find the corresponding member port of the target link aggregation according to the link aggregation port, and forward the message to be forwarded through all the member ports in the target link aggregation.
[0019] In an optional implementation manner, forwarding the message to be forwarded through all member ports in the virtual link aggregation includes:
[0020] Obtain the link aggregation port of the target link aggregation in the VLAN corresponding to the message to be forwarded, determine the member ports of the target link aggregation, obtain the virtual link aggregation for forwarding BUM messages set in the member ports of the target link aggregation, and forward the message to be forwarded through all member ports in the virtual link aggregation.
[0021] In a second aspect, the present invention provides a device for implementing local priority forwarding, which is applied to a network device in a stacking system, and the device includes:
[0022] A local priority module, used to create a virtual link aggregation consistent with a member port of a target link aggregation of the device, wherein the target link aggregation refers to a link aggregation including a local physical port and physical ports of other network devices of the stacking system in the member ports; delete the physical ports of the other network devices in the target link aggregation and save;
[0023] The message forwarding module is used to determine whether the message to be forwarded is a known unicast message after obtaining the message to be forwarded; if so, forward the message to be forwarded through the local physical port in the target link aggregation; otherwise, forward the message to be forwarded through all member ports in the virtual link aggregation.
[0024] In a third aspect, the present invention provides a network device, including a switching chip and a processor, wherein the switching chip implements a method for implementing local priority forwarding as described in any one of the aforementioned implementation modes under the control of the processor.
[0025] In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon, which implements a method for implementing local priority forwarding as described in any one of the aforementioned implementation modes when the computer program is executed by a switching chip under the control of a processor.
[0026] In a fifth aspect, the present invention provides a program product, which implements the local priority forwarding implementation method as described in any one of the aforementioned implementation modes when the program product is executed by a switching chip under the control of a processor.
[0027] Compared with the prior art, the implementation method, device, network device, storage medium and program product of local priority forwarding provided by the embodiment of the present invention, the method creates a virtual link aggregation for the target link aggregation including the local physical port and the physical port of other network devices of the stacking system in the member port, the member port of the virtual link aggregation is consistent with the target link aggregation, including the local physical port and the physical port of other network devices of the stacking system. The physical ports of other network devices recorded in the member port of the target link aggregation are deleted, and only the local physical port is recorded. The known unicast message is forwarded through the local physical port in the target link aggregation, and the unknown unicast message is forwarded through all member ports in the virtual link aggregation, while the local priority forwarding of the known unicast message in the stacking system is realized, and the normal forwarding of the unknown unicast message is ensured. It can enable the network device that does not support the local priority forwarding function to realize the local priority forwarding of the known unicast message at the chip level, and it is completely realized through the link aggregation function itself, without affecting other chip functions of the network device.
[0028] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 A schematic flow chart of a method for implementing local priority forwarding provided by an embodiment of the present invention is shown.
[0031] Figure 2 Another flow chart of a method for implementing local priority forwarding provided by an embodiment of the present invention is shown.
[0032] Figure 3 A block diagram of a stacking system provided by an embodiment of the present invention is shown.
[0033] Figure 4 A block diagram of local priority forwarding provided by an embodiment of the present invention is shown.
[0034] Figure 5 A block diagram of a device for implementing local priority forwarding provided by an embodiment of the present invention is shown.
[0035] Figure 6A block diagram of a network device provided by an embodiment of the present invention is shown.
[0036] Icons: 400 - network device; 410 - processor; 420 - switching chip; 300 - local priority forwarding implementation device; 301 - local priority module; 302 - message forwarding module. DETAILED DESCRIPTION
[0037] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0038] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0039] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0040] The inventors have discovered that for network devices (such as switches) that do not support the local priority forwarding function at the chip level, the prior art CN114374659A will occupy the traffic ingress port and the isolation resources of the non-chip link aggregation member port when forwarding non-unknown unicast messages, making the local priority forwarding and port isolation functions of the above-mentioned ports mutually exclusive, limiting the usage scenarios of the local priority forwarding function.
[0041] In summary, how to support this function on network devices that do not support local priority forwarding and provide a method that is as general as possible is an urgent problem to be solved.
[0042] Based on this, the implementation method and device of local priority forwarding provided by the embodiment of the present invention creates a virtual link aggregation for the target link aggregation whose member ports include local physical ports and physical ports of other network devices in the stacking system. The member ports of the virtual link aggregation are consistent with the target link aggregation, including local physical ports and physical ports of other network devices in the stacking system. The physical ports of other network devices recorded in the member ports of the target link aggregation are deleted, and only the local physical ports are recorded. Known unicast messages are forwarded through the local physical ports in the target link aggregation, and unknown unicast messages are forwarded through all member ports in the virtual link aggregation. While realizing local priority forwarding of known unicast messages in the stacking system, the normal forwarding of unknown unicast messages is ensured. It enables network devices that do not support the local priority forwarding function to realize local priority forwarding of known unicast messages at the chip level, and it is completely realized through the link aggregation function itself, without affecting other chip functions of the network device.
[0043] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0044] Please refer to Figure 1 , Figure 1 A flow chart of a method for implementing local priority forwarding provided by an embodiment of the present invention is shown. The method is applied to a network device in a stacking system. The method includes the following steps:
[0045] Step S20: Create a virtual link aggregation that is consistent with the member ports of the target link aggregation of the device, wherein the target link aggregation refers to a link aggregation of member ports including local physical ports and physical ports of other network devices in the stacking system.
[0046] In an embodiment of the present invention, if a local physical port of the device exists in a member port of a link aggregation of an original configuration, and the member ports of the link aggregation also include physical ports of other devices in the stacking system, then the link aggregation is the target link aggregation of the present invention, and a corresponding virtual link aggregation is created according to the member ports of the target link aggregation. At this time, the member ports of the created virtual link aggregation are consistent with the member ports of the target link aggregation, that is, the member ports of the virtual link aggregation include the local physical port of the device and the physical ports of other network devices in the stacking system. If the local physical port of the device does not exist in the member ports of the link aggregation, the device does not process it.
[0047] Step S40, deleting the physical ports of other network devices in the target link aggregation and saving the data.
[0048] In the embodiment of the present invention, physical ports of other network devices are deleted from the member ports of the target link aggregation, thereby ensuring that only local physical ports exist in the member ports of the target link aggregation with local priority forwarding enabled.
[0049] Step S50: After obtaining the message to be forwarded, determine whether the message to be forwarded is a known unicast message.
[0050] Step S60: If yes, the message to be forwarded is forwarded through the local physical port in the target link aggregation.
[0051] Step S70: otherwise, the message to be forwarded is forwarded through all member ports in the virtual link aggregation.
[0052] In the embodiment of the present invention, after receiving the message to be forwarded, if the message to be forwarded is a known unicast message, the device forwards the message to be forwarded through the local physical port in the target link aggregation from which the physical ports of other devices in the stacking system have been deleted. If the message to be forwarded is a known unicast message and there is no local physical port in the matching link aggregation, the message to be forwarded is sent to other network devices in the stacking system through the stacking port, so that the message to be forwarded is forwarded through the local physical ports of other network devices.
[0053] If the message to be forwarded is a BUM message, this device will copy a copy and forward it to other network devices in the stack system through the stack port, and obtain the virtual link aggregation corresponding to the target link aggregation, and forward the message to be forwarded through all member ports of the virtual link aggregation. For link aggregations that do not have local physical ports, the BUM message will not be forwarded to them.
[0054] In summary, the implementation method of local priority forwarding provided by the embodiment of the present invention creates a corresponding virtual link aggregation for the target link aggregation whose member ports include local physical ports and physical ports of other network devices in the stacking system, and the member ports of the virtual link aggregation are consistent with the target link aggregation. The physical ports of other network devices in the member ports of the target link aggregation are deleted, and only the local physical ports are retained. Known unicast messages are forwarded through the local physical ports in the target link aggregation, and unknown unicast messages are forwarded through all member ports in the virtual link aggregation, while realizing the local priority forwarding of known unicast messages in the stacking system, ensuring the normal forwarding of unknown unicast messages. It can enable network devices that do not support the local priority forwarding function to realize local priority forwarding of known unicast messages at the chip level, and it is completely realized through the link aggregation function itself, without affecting other chip functions of the network device.
[0055] Optionally, see Figure 2 ,exist Figure 1Before step S20, the method further includes the following steps:
[0056] Step S10: receiving an instruction for enabling local priority forwarding of target link aggregation.
[0057] In an embodiment of the present invention, a user is supported to enable the local priority forwarding function of the target link aggregation by issuing an instruction. The instruction issued by the user to enable the local priority forwarding of the target link aggregation will be issued to all member devices of the stacking system. After each member device receives the instruction to enable the local priority forwarding of the target link aggregation, the local priority forwarding of the target link aggregation is implemented based on the embodiments of the present invention.
[0058] Optionally, see Figure 2 ,exist Figure 1 Before step S40, the method further includes the following steps:
[0059] Step S30: updating the link aggregation for forwarding BUM messages set for the local physical port in the target link aggregation to a virtual link aggregation.
[0060] In an embodiment of the present invention, before enabling local priority forwarding of the target link aggregation, the link aggregation used to forward BUM messages set by the local physical port in the target link aggregation (which can be set through the port register) is the target link aggregation, that is, the link aggregation of the local physical port used to forward known unicast messages and BUM messages are all target link aggregations.
[0061] After the local priority forwarding of the target link aggregation is enabled, the link aggregation set by the local physical port in the target link aggregation is updated to the virtual link aggregation corresponding to the target link aggregation. In other words, the link aggregation for forwarding BUM messages set in the local physical port is the virtual link aggregation corresponding to the target link aggregation, thereby realizing the local priority forwarding of known unicast messages through the local physical port recorded by the target link aggregation, and realizing the forwarding of BUM messages through all member ports recorded in the virtual link aggregation.
[0062] Optionally, a possible implementation method is provided below for how to determine whether the message to be forwarded is a known unicast message. Figure 1 The sub-steps of step S50 may include:
[0063] The MAC address forwarding table is searched. If there is an entry matching the destination MAC address and the corresponding VLAN ID carried by the message to be forwarded, the message to be forwarded is determined to be a known unicast message; otherwise, the message to be forwarded is determined to be a BUM message.
[0064] In an embodiment of the present invention, the correspondence between the MAC address, the VLAN (Virtual Local Area Network) identifier (i.e., VLAN ID) and the link aggregation port is recorded in the MAC (Media Access Control) address forwarding table. The destination MAC address carried by the message to be forwarded and the VLAN identifier corresponding to the message to be forwarded are obtained. If there is a table entry corresponding to the destination MAC address and VLAN identifier carried by the message to be forwarded in the MAC address forwarding table, the message to be forwarded is determined to be a known unicast message. If there is no table entry corresponding to the destination MAC address and VLAN identifier carried by the message to be forwarded in the MAC address forwarding table, the message to be forwarded is determined to be a BUM message.
[0065] Optionally, a possible implementation manner is provided below for how to forward a message to be forwarded from a local physical port. Figure 1 The sub-steps of step S60 may include:
[0066] Obtain the link aggregation port corresponding to the destination MAC address and VLAN ID in the MAC address forwarding table; find the member port of the corresponding target link aggregation according to the link aggregation port, and forward the message to be forwarded through all the member ports of the target link aggregation.
[0067] In the embodiment of the present invention, a table entry matching the destination MAC address and the corresponding VLAN identifier carried by the message to be forwarded is obtained in the MAC address forwarding table, a link aggregation port is obtained from the matching table entry, the corresponding target link aggregation is obtained according to the link aggregation port, and forwarding is performed from the member port of the target link aggregation. The member ports of the target link aggregation for which local priority forwarding is enabled only include local physical ports, and all known unicast messages forwarded via the target link aggregation will only be forwarded from the local physical port, thereby ensuring local priority forwarding of the target link aggregation.
[0068] Optionally, a possible implementation manner is provided below for how to aggregate and forward the message to be forwarded through a virtual link. Figure 1 The sub-steps of step S70 may include:
[0069] Obtain the link aggregation port of the target link aggregation in the VLAN corresponding to the message to be forwarded, determine the member ports of the target link aggregation, obtain the virtual link aggregation set in the member ports of the target link aggregation for forwarding the BUM message, and forward the message to be forwarded through all member ports in the virtual link aggregation.
[0070] In an embodiment of the present invention, when there is no table entry corresponding to the destination MAC address and VLAN identifier carried by the message to be forwarded in the MAC address forwarding table, it is determined that the message to be forwarded is a BUM message, and then a mechanism of flooding the message to be forwarded in the corresponding VLAN can be adopted. Since the aggregation port of the target link aggregation is in the VLAN, the link aggregation port of the target link aggregation in the VLAN is obtained, and the member port of the target link aggregation is obtained according to the link aggregation port.
[0071] If the target link aggregation has enabled local priority forwarding, update the link aggregation set in the local physical port in the target link aggregation to a virtual link aggregation, and forward the BUM message through all member ports of the virtual link aggregation. At this time, the BUM message can be loaded in all member ports by hashing, and forwarded when hashed to the local physical port. If it is hashed to the physical port of other devices, the message is discarded.
[0072] In order to more clearly illustrate the implementation method of local priority forwarding provided by the embodiment of the present invention, the following example is used for illustration.
[0073] by Figure 3 For example, assuming that the stacking system includes device A and device B, the link aggregation initially configured in the stacking system includes link aggregation 1 and link aggregation 2. The member ports of link aggregation 1 include physical port 2 of device A and physical port 3 of device B (link aggregation 1 is the link aggregation for the purpose of the present invention), and the member ports of link aggregation 2 include physical port 4 of device B.
[0074] Assume that the message to be forwarded enters from physical port 1 of device A, then physical port 2 is the local physical port of link aggregation 1 on device A, and physical port 3 is the local physical port of link aggregation 1 on device B. Link aggregation 2 has no local physical port on device A, and physical port 4 is the local physical port of link aggregation 2 on device B.
[0075] Assume that each link aggregation is provided with a register 1, and the register 1 of the link aggregation is used to record member port information, and the member port information includes the number of member ports and the member ports.
[0076] When local priority forwarding is not enabled, both device A and device B record the member port information of their respective link aggregations. The member port information of link aggregation 1 is shown in Table 1, and the member port information of link aggregation 2 is shown in Table 2.
[0077] Table 1
[0078]
[0079] Table 2
[0080]
[0081]
[0082] The physical port is provided with register 2, which is used to record the link aggregation used to forward the BUM message. The link aggregation set in physical port 2 and physical port 3 is link aggregation 1 (ie, target link aggregation), and the link aggregation set in physical port 4 and physical port 5 is link aggregation 2.
[0083] When local priority forwarding of link aggregation 1 is enabled, for device A, physical port 2 is a member port of link aggregation 1. A new target link aggregation, i.e. virtual link aggregation 1 corresponding to link aggregation 1, is created on device A, and the link aggregation set for physical port 2 on device A is updated to virtual link aggregation 1. Virtual link aggregation 1 is also provided with register 1 to record member port information of virtual link aggregation 1. The member port information of virtual link aggregation 1 is obtained by copying the member port information of link aggregation 1, as shown in Table 1. Physical port 3 is deleted from the member ports of link aggregation 1 on device A, and the updated member port information is shown in Table 3.
[0084] Table 3
[0085] Number of member ports Member Port 1 Physical port 2 of device A
[0086] Similarly, for device B, link aggregation 1 is also its target link aggregation. A new virtual link aggregation corresponding to link aggregation 1 is created on device B, and the link aggregation set for physical port 3 is updated to the newly created virtual link aggregation. The member port information of the newly created virtual link aggregation is shown in Table 1. Physical port 2 is deleted from the member ports of link aggregation 1 on device B, and the updated member port information is shown in Table 4.
[0087] Table 4
[0088] Number of member ports Member Port 1 Physical port 3 of device B
[0089] Continue with Figure 4 For example, assuming that a known unicast message enters from physical port 1 of device A, if it exits from link aggregation 1, it will exit from the local physical port of the target link aggregation on device A, that is, from physical port 2. If it exits from link aggregation 2, since there is no local physical port of link aggregation 2 on device A, the known unicast message is forwarded to the local physical port of the link aggregation on device B through the stacking port, that is, from physical port 4.
[0090] It should be noted that the local priority forwarding of the target link aggregation can be turned on or off at any time. When the local priority forwarding is turned on and the corresponding virtual link aggregation is established, the physical ports of other devices are deleted, and the member port information of the target link aggregation only includes the local physical port to ensure that when a known unicast message needs to be forwarded, only the local physical port can be obtained when the forwarding port is obtained from register 1 corresponding to the target link aggregation, thereby realizing local priority forwarding of known unicast messages.
[0091] In other words, the forwarding of the known unicast message is determined by register 1, that is, by the member port information of the target link aggregation. The forwarding of the BUM message is determined by register 1 and register 2, that is, the local physical port is obtained from the member port information of the target link aggregation, and the recorded link aggregation is obtained from register 2 corresponding to the local physical port, that is, the virtual link aggregation corresponding to the target link aggregation, such as Figure 4 shown.
[0092] In this way, when forwarding BUM messages, although only the local physical port can be viewed in the matching target link aggregation, the local physical port points to the virtual link aggregation, and the member port information of the virtual link aggregation records all member ports, so that the BUM message can be normally loaded from all member ports. This ensures that the devices receiving the BUM message can determine the consistent forwarding port using the same virtual link aggregation, avoiding the phenomenon of forwarding a BUM message from the physical ports of multiple devices.
[0093] When local priority forwarding is disabled, the member port information of the target link aggregation is updated to the member port information of the virtual link aggregation to record all member ports of the target link aggregation, the link aggregation recorded by the local physical port is updated to the target link aggregation, and the corresponding virtual link aggregation is deleted.
[0094] Based on the same inventive concept, the basic principle and technical effect of the implementation device of local priority forwarding provided in the embodiment of the present invention are the same as those in the above embodiment. For the sake of brief description, for parts not mentioned in this embodiment, reference may be made to the corresponding contents in the above embodiment.
[0095] Please refer to Figure 5 , Figure 5 A block diagram of a local priority forwarding implementation device 300 is provided for an embodiment of the present invention. The local priority forwarding implementation device 300 is applied to a network device in a stacking system. The local priority forwarding implementation device 300 includes a local priority module 301 and a message forwarding module 302.
[0096] The local priority module 301 is used to create a virtual link aggregation that is consistent with the member ports of the target link aggregation of this device, wherein the target link aggregation refers to a link aggregation whose member ports include local physical ports and physical ports of other network devices in the stacking system; delete the physical ports of other network devices in the target link aggregation and save them.
[0097] The message forwarding module 302 is used to determine whether the message to be forwarded is a known unicast message after obtaining the message to be forwarded; if so, forward the message to be forwarded through the local physical port in the target link aggregation; otherwise, forward the message to be forwarded through all member ports in the virtual link aggregation.
[0098] In summary, the implementation device of local priority forwarding provided by the embodiment of the present invention creates a virtual link aggregation for the target link aggregation, and the member ports of the virtual link aggregation are consistent with the target link aggregation, including local physical ports and physical ports of other network devices in the stacking system. The physical ports of other network devices recorded in the member ports of the target link aggregation are deleted, and only the local physical ports are recorded. Known unicast messages are forwarded through the local physical ports in the target link aggregation, and unknown unicast messages are forwarded through all member ports in the virtual link aggregation. While realizing the local priority forwarding of known unicast messages in the stacking system, the normal forwarding of unknown unicast messages is ensured. It can enable network devices that do not support the local priority forwarding function to realize local priority forwarding of known unicast messages at the chip level, and it is completely realized through the link aggregation function itself, without affecting other chip functions of the network device.
[0099] Optionally, the local priority module 301 is further configured to receive an instruction for enabling local priority forwarding of a target link aggregation.
[0100] Optionally, the local priority module 301 is further configured to update the link aggregation set for the local physical port in the target link aggregation and used to forward the BUM message to a virtual link aggregation.
[0101] Optionally, the message forwarding module 302 is specifically used to search the MAC address forwarding table. If there is an entry that matches the destination MAC address and the corresponding VLAN identifier carried by the message to be forwarded, the message to be forwarded is determined to be a known unicast message; otherwise, the message to be forwarded is determined to be a BUM message.
[0102] Optionally, the message forwarding module 302 is specifically used to obtain the link aggregation port corresponding to the destination MAC address and VLAN identifier in the MAC address forwarding table; find the member port of the corresponding target link aggregation according to the link aggregation port, and forward the message to be forwarded through all member ports in the target link aggregation.
[0103] Optionally, the message forwarding module 302 is specifically used to obtain the link aggregation port of the target link aggregation in the VLAN corresponding to the message to be forwarded, determine the member port of the target link aggregation, obtain the virtual link aggregation set in the member port of the target link aggregation for forwarding BUM messages, and forward the message to be forwarded through all member ports in the virtual link aggregation.
[0104] Please refer to Figure 6 , Figure 6 A block diagram of a network device 400 provided in an embodiment of the present invention. The network device 400 includes a processor 410 and a switching chip 420. The switching chip 420 can implement the local priority forwarding implementation method disclosed in the above embodiments under the control of the processor 410.
[0105] The embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by the switching chip 420 under the control of the processor 410, the local priority forwarding implementation method disclosed in the above embodiments is implemented.
[0106] The embodiment of the present invention further provides a program product, which implements the local priority forwarding implementation method disclosed in the above embodiments when the program product is executed by the switching chip 420 under the control of the processor 410.
[0107] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0108] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0109] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, ROM (Read-Only Memory), RAM (Random Access Memory), disk or optical disk, etc., various media that can store program codes.
[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for implementing local priority forwarding, characterized in that: A network device applied to a stacking system, the method comprising: Creating a virtual link aggregation that is consistent with a member port of a target link aggregation of the device, wherein the target link aggregation refers to a link aggregation of member ports including a local physical port and physical ports of other network devices of the stacking system; Deleting the physical ports of the other network devices in the target link aggregation and saving the data; After obtaining the message to be forwarded, determine whether the message to be forwarded is a known unicast message; if so, forward the message to be forwarded through the local physical port in the target link aggregation; otherwise, forward the message to be forwarded through all member ports in the virtual link aggregation.
2. The method for implementing local priority forwarding according to claim 1, characterized in that: Before creating a virtual link aggregation that is consistent with a member port of a target link aggregation of the device, the method further includes: An instruction for enabling local priority forwarding of the target link aggregation is received.
3. The method for implementing local priority forwarding according to claim 1, characterized in that: Before deleting and saving the physical ports of the other network devices in the target link aggregation, the method further includes: The link aggregation set for the local physical port in the target link aggregation and used to forward the BUM message is updated to the virtual link aggregation.
4. The method for implementing local priority forwarding according to claim 1, characterized in that: The determining whether the message to be forwarded is a known unicast message includes: Search the MAC address forwarding table, and if there is an entry matching the destination MAC address and the corresponding VLAN identifier carried by the message to be forwarded, determine that the message to be forwarded is the known unicast message; otherwise, determine that the message to be forwarded is a BUM message.
5. The method for implementing local priority forwarding according to claim 4, characterized in that: The step of forwarding the message to be forwarded through a local physical port in the target link aggregation includes: Obtain the link aggregation port corresponding to the destination MAC address and the VLAN identifier in the MAC address forwarding table; Find the corresponding member port of the target link aggregation according to the link aggregation port, and forward the message to be forwarded through all the member ports in the target link aggregation.
6. The method for implementing local priority forwarding according to claim 4, characterized in that: The step of forwarding the message to be forwarded through all member ports in the virtual link aggregation includes: Obtain the link aggregation port of the target link aggregation in the VLAN corresponding to the message to be forwarded, determine the member ports of the target link aggregation, obtain the virtual link aggregation for forwarding BUM messages set in the member ports of the target link aggregation, and forward the message to be forwarded through all member ports in the virtual link aggregation.
7. A device for implementing local priority forwarding, characterized in that: A network device applied to a stacking system, the device comprising: A local priority module, used to create a virtual link aggregation consistent with a member port of a target link aggregation of the device, wherein the target link aggregation refers to a link aggregation including a local physical port and physical ports of other network devices of the stacking system in the member ports; delete the physical ports of the other network devices in the target link aggregation and save; The message forwarding module is used to determine whether the message to be forwarded is a known unicast message after obtaining the message to be forwarded; if so, forward the message to be forwarded through the local physical port in the target link aggregation; otherwise, forward the message to be forwarded through all member ports in the virtual link aggregation.
8. A network device, characterized in that: The method comprises a switching chip and a processor, wherein the switching chip implements the local priority forwarding method as described in any one of claims 1 to 6 under the control of the processor.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the switching chip under the control of the processor, the method for implementing local priority forwarding as described in any one of claims 1 to 6 is implemented.
10. A program product, characterized in that When the program product is executed by the switching chip under the control of the processor, the method for implementing local priority forwarding as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and device for realizing local priority forwarding in stacking system, and storage medium
CN114374659A
Cited By
Aggregation port MACsec session creation method, network equipment and device
CN121077964A