Packet loss prevention method and device for stacking system
By perceiving the configuration status of the switching device in the VSU system and delaying the implementation of the new forwarding configuration, the packet loss problem caused by topological changes is solved, and the stability and reliability of the system are improved.
Patent Information
- Application Number
- CN202210016585.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-07
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2042-01-07
AI Technical Summary
During the topology change of the VSU system, the inconsistent forwarding configuration of the switching device leads to packet loss.
When the VSU changes to the topology, the switching device generates a new forwarding configuration, but the configuration will only take effect when confirming that the configuration status of other switching devices is non-initial, so as to avoid packet loss caused by incomplete forwarding configuration.
By accurately sensing the configuration status of other switching devices, the flow interruption time caused by topological changes is reduced, packet loss is prevented, and the continuity of message forwarding is ensured.
Smart Images

Figure CN114513478B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data communication, and in particular to a packet loss prevention method and device for a stacking system. Background Art
[0002] The stacking system, namely the Virtual Switch Unit (VSU), combines multiple physical switching devices into one virtual switching device using virtualization technology. The stacking system can simplify the configuration complexity of network devices and provide a highly reliable and highly redundant network. The Virtual Switching Link (VSL) is a special link for transmitting control information and data streams between devices in the VSU system.
[0003] VSU network topologies include linear topology and ring topology. Linear topology is simple to connect and uses fewer ports and cables, but there is only one communication link between devices, so the reliability of the VSL link is low. In the ring topology, the two communication links between all VSU devices can back up each other to form link redundancy and improve the reliability of the VSU system. The ring topology and linear topology of the VSU can be converted to each other by adding VSL links or restarting the device. In the VSU ring topology and linear topology, there are the following change scenarios: that is, in a multi-machine VSU, a switching device is restarted for some reason. After the restart, the cross-card forwarding traffic between the multiple switching devices that have not been restarted will experience packet loss. The specific process is as follows:
[0004] like Figure 1 The four-machine VSU shown in the figure has a ring topology and includes four devices numbered 1, 2, 3, and 4, and four VSL links numbered A, B, C, and D. Assuming that the traffic inlet is device 1, the traffic forwarding route from device 1 to other devices is as shown in Table 1 below:
[0005] Message source device Destination device of the message route 1 2 1---A---2 1 3 1---A---2---B---3 1 4 1---D---4
[0006] Table 1
[0007] When device 2 is powered off due to a restart, VSL links A and B become invalid and unavailable, and the topology changes to a linear topology. Devices 1, 3, and 4 each calculate the current topology and obtain the message path to other devices at this time. At this time, device 1 calculates the traffic forwarding route to other devices as shown in Table 2 below:
[0008] Message source chassis Destination chassis of the message route 1 3 1---D---4---C---3 1 4 1---D---4
[0009] Table 2
[0010] Because the VSL link disconnection is directly sensed, the packet loss during the entire switching process is within 500ms.
[0011] When device 2 is restarted and powered on again, the topology changes back to a ring topology. At this time, the four devices 1 / 2 / 3 / 4 each calculate a new message forwarding path. The path calculated by device 1 is still as shown in Table 1 above.
[0012] However, there is a problem when device 2 is powered on again: because device 2 has just been powered on, VSL is ready, but the forwarding configuration calculation and actual effect are very slow. When the VSL link is ready, device 1 will switch the forwarding path to device 3 from 1---D---4---C---3 to 1---A---2---B---3, but the forwarding configuration of device 2 takes effect slowly after it is just started, resulting in the inability to forward packets on device 2. At this time, the packets from device 1 to device 3 will be discarded on device 2. Summary of the invention
[0013] The embodiment of the present invention provides a method and device for preventing packet loss in a stacking system, which are used to solve the problem of interruption or packet loss caused by topology change of a VSU in the prior art.
[0014] According to an embodiment of the present invention, a packet loss prevention method for a stacking system is provided. The method is applicable to a virtual switching unit VSU, the VSU includes multiple switching devices, and the method is applied to a switching device in the VSU. The method includes:
[0015] When the first switching device senses that a topology change occurs in the VSU, generating a first forwarding configuration according to the changed topology;
[0016] Determine whether the configuration status of other switching devices in the VSU stored by the first switching device is in an initial state INIT;
[0017] When the configuration state of the other switching devices does not have INIT, sending the first forwarding configuration to the hardware to take effect;
[0018] When the configuration state of the other switching device is INIT, the first forwarding configuration is cached.
[0019] Optionally, the first switching device senses that a topology change occurs in the VSU, specifically including:
[0020] The first switching device senses that the second switching device is powered on, receives and stores an initial state INIT sent globally after the second switching device is powered on;
[0021] Set its own configuration state to the partial forwarding state PART_FORWARD.
[0022] Optionally, the first switching device senses that a topology change occurs in the VSU, specifically including:
[0023] The first switching device senses that the third switching device is powered off, and deletes the stored configuration state of the third switching device.
[0024] Optionally, after sending the first forwarding configuration to hardware to take effect, the method further includes:
[0025] Setting the configuration state of the first switching device to a forwarding state FORWARD;
[0026] After caching the first forwarding configuration, the method further includes:
[0027] Setting the configuration state of the first switching device to a partial forwarding state PART_FORWARD; and
[0028] Update the corresponding configuration status according to the configuration status received from other switching devices.
[0029] Optionally, the method further includes:
[0030] When the first switching device is restarted and powered on, an initial state INIT is globally sent to other switching devices in the VSU;
[0031] After generating the second forwarding configuration, determine whether the configuration state is INIT;
[0032] When determining that the configuration state is INIT, sending the second forwarding configuration to the hardware to take effect;
[0033] The configuration state of the device itself is set to FORWARD and is globally sent to other switching devices in the VSU.
[0034] According to an embodiment of the present invention, a packet loss prevention device for a stacking system is also provided, the device is applicable to a virtual switching unit VSU, the VSU includes multiple switching devices, the device is applied to a switching device in the VSU, the device includes: a forwarding configuration module, a state configuration module; wherein,
[0035] The forwarding configuration module is used to generate a first forwarding configuration according to the changed topology when the state configuration module senses that the VSU has a topology change;
[0036] The state configuration module is used to determine whether the configuration states of other switching devices in the VSU stored in the first switching device have an initial state INIT;
[0037] The forwarding configuration module is further configured to send the first forwarding configuration to the hardware to take effect when the state configuration module determines that the configuration state of the other switching devices does not have INIT; and cache the first forwarding configuration when the configuration state of the other switching devices has INIT.
[0038] Optionally, the state configuration module senses that a topology change occurs in the VSU, and is specifically configured to:
[0039] Sensing that the second switching device is powered on, receiving and storing an initial state INIT sent globally after the second switching device is powered on;
[0040] Set its own configuration state to the partial forwarding state PART_FORWARD.
[0041] Optionally, the state configuration module senses that a topology change occurs in the VSU, specifically including:
[0042] It is sensed that the third switching device is powered off, and the stored configuration state of the third switching device is deleted.
[0043] Optionally, after the forwarding configuration module sends the first forwarding configuration to the hardware to take effect, the state configuration module is further configured to:
[0044] Setting the configuration state of the first switching device to a forwarding state FORWARD;
[0045] After the forwarding configuration module caches the first forwarding configuration, the state configuration module is further configured to:
[0046] The configuration state of the first switching device is set to a partially forwardable state PART_FORWARD; and after receiving the configuration state sent by other switching devices, the corresponding configuration state stored in the self-storage is updated.
[0047] Optionally, the state configuration module is further configured to globally send an initial state INIT to other switching devices in the VSU when the first switching device is restarted and powered on;
[0048] The forwarding configuration module is further configured to generate a second forwarding configuration, and when the state configuration module determines that its own configuration state is INIT, send the second forwarding configuration to the hardware to take effect;
[0049] The state configuration module is further used to set its own configuration state to FORWARD and globally send it to other switching devices in the VSU.
[0050] According to an embodiment of the present invention, there is also provided an electronic device, the electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0051] Memory, used to store computer programs;
[0052] The processor is used to implement the above method steps when executing the program stored in the memory.
[0053] According to an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method steps when executed by a processor.
[0054] The beneficial effects of the present invention are as follows:
[0055] The anti-packet loss method and device for a stacking system provided by an embodiment of the present invention, when a first switching device in a VSU senses that a topology change has occurred in the VSU, generates a first forwarding configuration according to the changed topology; determines whether the configuration status of other switching devices in the VSU stored by the first switching device has an initial state INIT; when the configuration status of the other switching devices does not have INIT, sends the first forwarding configuration to the hardware to take effect; when the configuration status of the other switching devices has INIT, caches the first forwarding configuration. In the embodiment of the present invention, when the switching device in the VSU generates a new forwarding configuration when the VSU topology changes, the forwarding configuration is not immediately effective, but it is determined whether the forwarding configurations of other switching devices in the VSU have been completed. If there are other switching devices whose configuration status is INIT, it means that there are switching devices whose forwarding configurations are not completed. At this time, it is necessary to cache the new forwarding configuration first and continue to use the original forwarding configuration for message forwarding; only when the configuration status of other switching devices does not have INIT, the new forwarding configuration can be effective at this time, thereby reducing the interruption time caused by the VSU topology change; in the embodiment of the present invention, the switching device in the VSU can accurately perceive the configuration status of other switching devices, solve the interruption problem caused by the inconsistent forwarding configuration effectiveness time of different switching devices, and prevent packet loss caused by topology changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a network topology diagram of a VSU consisting of four machines;
[0057] Figure 2 Schematic diagram of the process of the anti-packet loss method of the stacking system in the embodiment of the present invention
[0058] Figure 3A schematic diagram of the relationship between the configuration states of a switching device in an embodiment of the present invention;
[0059] Figure 4 Schematic diagram of the structure of the anti-packet loss device of the stacking system in an embodiment of the present invention;
[0060] Figure 5 This is a schematic diagram of the structure of an electronic device shown in this application. DETAILED DESCRIPTION
[0061] In view of the problem of interruption or packet loss caused by topology changes in VSU existing in the prior art, the anti-packet loss method of the stacking system provided in the embodiment of the present invention is applicable to a virtual switching unit VSU composed of multiple switching devices, and is specifically applied to the switching devices in the VSU. When the switching device senses that the topology of the VSU to which it belongs has changed, it will regenerate the forwarding configuration according to the changed topology, but it will not take effect immediately. Instead, the new forwarding configuration will take effect only when it is confirmed that the configuration status of other switching devices in the VSU is not the initial state, so as to prevent the forwarding configuration of other switching devices from being completed and being taken effect by the switching device, thereby causing packet loss.
[0062] The process of the method of the present invention is as follows Figure 2 As shown, it can be applied to each switching device in the VSU. The following description is made by taking any switching device in the VSU as the execution subject. For the convenience of description, the switching device is called the first switching device. The execution steps are as follows:
[0063] Step 201: When the first switching device senses that the VSU has a topology change, it generates a first forwarding configuration according to the changed topology;
[0064] Step 202, determining whether the configuration status of other switching devices in the VSU stored in the first switching device has an initial status INIT;
[0065] In the embodiment of the present invention, the configuration state of each switching device includes three states: an initial state (INIT), a partial forwarding state (PART_FORWARD), and a forwarding state (FORWARD). The meanings of these three states are as follows:
[0066] a) INIT: indicates that the device has just started and no forwarding configuration has taken effect;
[0067] b) FORWARD: Indicates that the forwarding configuration from this switching device to all other online devices in the current VSU has been completed;
[0068] c) PART_FORWARD: Indicates that in the current VSU, this switching device has configured some forwarding configurations to other devices, but the forwarding configuration to another device has not yet taken effect. Appears when a new device is added in a stable topology.
[0069] The transition relationship between the three configuration states can be referred to Figure 3 ,Depend on Figure 3 It can be seen that when the power is initially turned on, the configuration state of the switching device is INIT. When the first forwarding configuration takes effect, the configuration state of the switching device changes to FORWARD. At this time, if a new switching device is added, the state first changes to PART_FORWARD, and then changes to FORWARD after the forwarding configuration of the newly added switching device takes effect.
[0070] Step 203: When the configuration state of the other switching device does not contain INIT, the first forwarding configuration is sent to the hardware to take effect;
[0071] When other switching devices in the VSU do not have INIT, it indicates that the forwarding configurations of other switching devices have taken effect. At this time, the first switching device can send the first forwarding configuration to the hardware, that is, take effect on its own forwarding configuration.
[0072] Step 204: When the configuration state of the other switching device is INIT, cache the first forwarding configuration.
[0073] Here, when the configuration status of at least one of the other switching devices is INIT, it means that there is a switching device with incomplete forwarding configuration in the VSU. At this time, the first forwarding configuration cannot be effective, but the first forwarding configuration is cached until the configuration status of other switching devices does not have INIT.
[0074] Optionally, the first switching device senses that a topology change occurs in the VSU, specifically including:
[0075] The first switching device senses that the second switching device is powered on, receives and stores the initial state INIT sent globally after the second switching device is powered on; each switching device in the VSU in the embodiment of the present invention will globally notify its own configuration state when its own configuration state changes, for example, it can store its own configuration state in a global database for common access by switching devices, or send its own configuration state to each other switching device for timely synchronization. In addition, it should be understood that PART_FORWARD here is a transition state between INIT and FORWARD. When the configuration state switches to PART_FORWARD, it may be globally synchronized or not.
[0076] Set its own configuration state to the partial forwarding state PART_FORWARD.
[0077] Optionally, the first switching device senses that a topology change occurs in the VSU, specifically including:
[0078] The first switching device senses that the third switching device is powered off and deletes the stored configuration state of the third switching device. Here, when there is a switching device that is powered off, for ease of description, it is called the third switching device, and the configuration state of the third switching device needs to be deleted in the global database or its own database to prevent the third switching device from being affected by the residual configuration state table items after it is powered on again, causing a disconnection.
[0079] Optionally, after sending the first forwarding configuration to hardware to take effect, the method further includes:
[0080] The configuration state of the first switching device is set to the forwardable state FORWARD; optionally, when the first switching device sets its own configuration state to RORWARD, it may further perform a global notification to synchronize its own configuration state to other switching devices.
[0081] After caching the first forwarding configuration, the method further includes:
[0082] Setting the configuration state of the first switching device to a partial forwarding state PART_FORWARD; and
[0083] Update the corresponding configuration status according to the configuration status received from other switching devices.
[0084] Optionally, the method further includes:
[0085] When the first switching device is restarted and powered on, an initial state INIT is globally sent to other switching devices in the VSU;
[0086] After generating the second forwarding configuration, determine whether the configuration state is INIT;
[0087] When it is determined that its own configuration state is INIT, the second forwarding configuration is sent to the hardware to take effect; here, when it is determined that its own configuration state is INIT, it means that it is the first time to generate the forwarding configuration, so the second forwarding configuration can be directly sent to the hardware.
[0088] The configuration state of the device is set to FORWARD and sent globally to other switching devices in the VSU. Here, the configuration state of the device can be stored in a global database for common access by all switching devices, or sent to each other switching device for timely synchronization.
[0089] The above method is described in detail with a specific embodiment below. Figure 1 If switching device 2 is restarted, taking switching device 1 and switching device 3 as an example, the configuration status changes of the two switching devices are shown in Table 3 below:
[0090]
[0091] Table 3
[0092] Based on the same inventive concept, an embodiment of the present invention provides an anti-packet loss device for a stacking system, the device is applicable to a virtual switching unit VSU, the VSU includes multiple switching devices, the device is applied to the switching device in the VSU, and the structure is as follows Figure 4 As shown, it includes: a forwarding configuration module 41 and a state configuration module 42; wherein,
[0093] The forwarding configuration module 41 is configured to generate a first forwarding configuration according to the changed topology when the state configuration module senses that the VSU has a topology change;
[0094] The state configuration module 42 is used to determine whether the configuration states of other switching devices in the VSU stored in the first switching device are in the initial state INIT;
[0095] The forwarding configuration module 41 is further configured to send the first forwarding configuration to the hardware to take effect when the state configuration module determines that the configuration state of the other switching devices does not have INIT; and cache the first forwarding configuration when the configuration state of the other switching devices has INIT.
[0096] Optionally, the state configuration module 42 senses that a topology change occurs in the VSU, and is specifically configured to:
[0097] Sensing that the second switching device is powered on, receiving and storing an initial state INIT sent globally after the second switching device is powered on;
[0098] Set its own configuration state to the partial forwarding state PART_FORWARD.
[0099] Optionally, the state configuration module 42 senses that a topology change occurs in the VSU, specifically including:
[0100] It is sensed that the third switching device is powered off, and the stored configuration state of the third switching device is deleted.
[0101] Optionally, after the forwarding configuration module 41 sends the first forwarding configuration to the hardware to take effect, the state configuration module 42 is further configured to:
[0102] Setting the configuration state of the first switching device to a forwarding state FORWARD;
[0103] After the forwarding configuration module caches the first forwarding configuration, the state configuration module is further configured to:
[0104] The configuration state of the first switching device is set to a partially forwardable state PART_FORWARD; and after receiving the configuration state sent by other switching devices, the corresponding configuration state stored in the self-storage is updated.
[0105] Optionally, the state configuration module 42 is further configured to globally send an initial state INIT to other switching devices in the VSU when the first switching device is restarted and powered on;
[0106] The forwarding configuration module 41 is further configured to generate a second forwarding configuration, and when the state configuration module determines that its own configuration state is INIT, send the second forwarding configuration to the hardware to take effect;
[0107] The state configuration module 42 is further configured to set its own configuration state to FORWARD and globally send it to other switching devices in the VSU.
[0108] It should be understood that the implementation principle and process of the anti-packet loss device of the stacking system provided in the embodiment of the present invention are similar to the above Figure 2 The embodiments are similar to those shown in the figure and will not be described in detail here.
[0109] The anti-packet loss method and device for a stacking system provided by an embodiment of the present invention, when a first switching device in a VSU senses that a topology change has occurred in the VSU, generates a first forwarding configuration according to the changed topology; determines whether the configuration status of other switching devices in the VSU stored by the first switching device has an initial state INIT; when the configuration status of the other switching devices does not have INIT, sends the first forwarding configuration to the hardware to take effect; when the configuration status of the other switching devices has INIT, caches the first forwarding configuration. In the embodiment of the present invention, when the switching device in the VSU generates a new forwarding configuration when the VSU topology changes, the forwarding configuration is not immediately effective, but it is determined whether the forwarding configurations of other switching devices in the VSU have been completed. If there are other switching devices whose configuration status is INIT, it means that there are switching devices whose forwarding configurations are not completed. At this time, it is necessary to cache the new forwarding configuration first and continue to use the original forwarding configuration for message forwarding; only when the configuration status of other switching devices does not have INIT, the new forwarding configuration can be effective at this time, thereby reducing the interruption time caused by the VSU topology change; in the embodiment of the present invention, the switching device in the VSU can accurately perceive the configuration status of other switching devices, solve the interruption problem caused by the inconsistent forwarding configuration effectiveness time of different switching devices, and prevent packet loss caused by topology changes.
[0110] The present application also provides an electronic device. Figure 5 As shown, it includes a processor 510 , a communication interface 520 , a memory 530 and a communication bus 540 , wherein the processor 510 , the communication interface 520 , and the memory 530 communicate with each other via the communication bus 540 .
[0111] Memory 530, for storing computer programs;
[0112] The processor 510 is configured to implement the packet loss prevention method for the stacking system described in any one of the above embodiments when executing the program stored in the memory 530.
[0113] The communication interface 520 is used for communication between the electronic device and other devices.
[0114] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0115] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0116] In this solution, when the switching device in the VSU generates a new forwarding configuration when the VSU topology changes, the forwarding configuration does not take effect immediately, but determines whether the forwarding configurations of other switching devices in the VSU have been completed. If the configuration status of other switching devices is INIT, it means that there are switching devices with incomplete forwarding configurations. At this time, it is necessary to cache the new forwarding configuration first and continue to use the original forwarding configuration for message forwarding; only when the configuration status of other switching devices does not have INIT, the new forwarding configuration can be effective at this time, thus reducing the interruption time caused by the VSU topology change; in the embodiment of the present invention, the switching device in the VSU can accurately perceive the configuration status of other switching devices, solve the interruption problem caused by inconsistent forwarding configuration effectiveness time of different switching devices, and prevent packet loss caused by topology changes.
[0117] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the anti-packet loss method for a stacking system described in any one of the above embodiments.
[0118] In this solution, when the switching device in the VSU generates a new forwarding configuration when the VSU topology changes, the forwarding configuration does not take effect immediately, but determines whether the forwarding configurations of other switching devices in the VSU have been completed. If the configuration status of other switching devices is INIT, it means that there are switching devices with incomplete forwarding configurations. At this time, it is necessary to cache the new forwarding configuration first and continue to use the original forwarding configuration for message forwarding; only when the configuration status of other switching devices does not have INIT, the new forwarding configuration can be effective at this time, thus reducing the interruption time caused by the VSU topology change; in the embodiment of the present invention, the switching device in the VSU can accurately perceive the configuration status of other switching devices, solve the interruption problem caused by inconsistent forwarding configuration effectiveness time of different switching devices, and prevent packet loss caused by topology changes.
[0119] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.
[0120] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.
[0121] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0122] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as 201, 202, 203, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.
[0123] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0124] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0125] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0127] Although the optional embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the optional embodiments and all changes and modifications that fall within the scope of the present invention.
[0128] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if these modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for preventing packet loss in a stacking system, the method being applicable to a virtual switching unit VSU, the VSU comprising a plurality of switching devices, the method being applied to a switching device in the VSU, characterized in that: The method comprises: When the first switching device senses that a topology change occurs in the VSU, generating a first forwarding configuration according to the changed topology; Determine whether the configuration status of other switching devices in the VSU stored by the first switching device is in an initial state INIT; When the configuration state of the other switching devices does not have INIT, sending the first forwarding configuration to the hardware to take effect; When the configuration state of the other switching device is INIT, the first forwarding configuration is cached.
2. The method according to claim 1, characterized in that The first switching device senses that a topology change occurs in the VSU, specifically including: The first switching device senses that the second switching device is powered on, receives and stores an initial state INIT sent globally after the second switching device is powered on; Set its own configuration state to the partial forwarding state PART_FORWARD.
3. The method according to claim 1, characterized in that: The first switching device senses that a topology change occurs in the VSU, specifically including: The first switching device senses that the third switching device is powered off, and deletes the stored configuration state of the third switching device.
4. The method according to claim 1, characterized in that After sending the first forwarding configuration to the hardware to take effect, the method further includes: Setting the configuration state of the first switching device to a forwarding state FORWARD; After caching the first forwarding configuration, the method further includes: Setting the configuration state of the first switching device to a partial forwarding state PART_FORWARD; and Update the corresponding configuration status according to the configuration status received from other switching devices.
5. The method according to claim 1, characterized in that The method further comprises: When the first switching device is restarted and powered on, an initial state INIT is globally sent to other switching devices in the VSU; After generating the second forwarding configuration, determine whether the configuration state is INIT; When determining that the configuration state is INIT, sending the second forwarding configuration to the hardware to take effect; The configuration state of the device itself is set to FORWARD and is globally sent to other switching devices in the VSU.
6. A packet loss prevention device for a stacking system, the device being applicable to a virtual switching unit VSU, the VSU comprising a plurality of switching devices, the device being applied to a switching device in the VSU, characterized in that: The device comprises: a forwarding configuration module and a state configuration module; wherein, The forwarding configuration module is used to generate a first forwarding configuration according to the changed topology when the state configuration module senses that the VSU has a topology change; The state configuration module is used to determine whether the configuration states of other switching devices in the VSU stored in the first switching device have an initial state INIT; The forwarding configuration module is further configured to send the first forwarding configuration to the hardware to take effect when the status configuration module determines that the configuration status of the other switching devices does not have INIT; and cache the first forwarding configuration when the configuration status of the other switching devices has INIT.
7. The device according to claim 6, characterized in that The state configuration module senses that the VSU has a topology change, and is specifically used to: Sensing that the second switching device is powered on, receiving and storing an initial state INIT sent globally after the second switching device is powered on; Set its own configuration state to the partial forwarding state PART_FORWARD.
8. The device according to claim 6, characterized in that The state configuration module senses that a topology change occurs in the VSU, specifically including: It is sensed that the third switching device is powered off, and the stored configuration state of the third switching device is deleted.
9. The device according to claim 6, characterized in that After the forwarding configuration module sends the first forwarding configuration to the hardware to make it effective, the state configuration module is further used to: Setting the configuration state of the first switching device to a forwarding state FORWARD; After the forwarding configuration module caches the first forwarding configuration, the state configuration module is further configured to: The configuration state of the first switching device is set to a partially forwardable state PART_FORWARD; and after receiving the configuration state sent by other switching devices, the corresponding configuration state stored in the self-storage is updated.
10. The device according to claim 6, characterized in that The state configuration module is further configured to globally send an initial state INIT to other switching devices in the VSU when the first switching device is restarted and powered on; The forwarding configuration module is further configured to generate a second forwarding configuration, and when the state configuration module determines that its own configuration state is INIT, send the second forwarding configuration to the hardware to take effect; The state configuration module is further used to set its own configuration state to FORWARD and globally send it to other switching devices in the VSU.
11. An electronic device, characterized in that: The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 5 when executing a program stored in a memory.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.
