CN113612703A - Startup control method, device, equipment and medium of switch - Google Patents
Startup control method, device, equipment and medium of switch Download PDFInfo
- Publication number
- CN113612703A CN113612703A CN202110990213.3A CN202110990213A CN113612703A CN 113612703 A CN113612703 A CN 113612703A CN 202110990213 A CN202110990213 A CN 202110990213A CN 113612703 A CN113612703 A CN 113612703A
- Authority
- CN
- China
- Prior art keywords
- switch
- port
- quick
- forwarding
- configuration information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 69
- 230000006870 function Effects 0.000 claims description 22
- 238000004590 computer program Methods 0.000 claims description 9
- 230000000903 blocking effect Effects 0.000 claims description 8
- 230000002093 peripheral effect Effects 0.000 claims description 4
- 238000001514 detection method Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/10—Packet switching elements characterised by the switching fabric construction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/25—Routing or path finding in a switch fabric
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/55—Prevention, detection or correction of errors
- H04L49/552—Prevention, detection or correction of errors by ensuring the integrity of packets received through redundant connections
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/55—Prevention, detection or correction of errors
- H04L49/557—Error correction, e.g. fault recovery or fault tolerance
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Small-Scale Networks (AREA)
Abstract
The embodiment of the invention discloses a method, a device, equipment and a medium for controlling the starting of a switch. The method is executed by a switch in a switch ring network, and comprises the following steps: after the switch is powered off and powered on again, the starting process of the quick-start forwarding system and the main system is executed at the same time; after the quick-start forwarding system is started, all the switching ports in the switch are configured according to locally stored port configuration information, and after the configuration is finished, forwarding control is carried out on the received message; after the main system is started, the control right of the quick-start forwarding system to the switch is taken over, and the forwarding control is carried out on the received message. In the technical scheme, when the switch is started, each switching port in the switch can be configured according to the port configuration information stored in the quick-start forwarding system, so that the problem of broadcast storm occurring in the starting process of the switch is solved, the network channel is prevented from being blocked, and the normal forwarding of the data message is ensured.
Description
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a method, a device, equipment and a medium for controlling the starting of a switch.
Background
A switch is a device that performs information exchange functions in a communication system. The fast start of the switch requires that the switch can start forwarding the message in a very short time after being powered on, wherein the two-layer forwarding requirement starts in 10 seconds, and the three-layer forwarding requirement starts in 40 seconds.
At present, in a ring network topology structure, a fast start process of each switch is usually to set all ports of each switch to a forwarding state after the switch is powered on, and at this time, a broadcast storm may be generated in a network, and only when a Protocol configured in a ring network, such as a Distributed Redundancy Protocol (DRP), starts to take effect, normal transmission of a data packet in the ring network may be resumed, and the broadcast storm is eliminated.
Therefore, how to solve the broadcast storm problem of the switch in the starting process, avoiding the network channel from being blocked and ensuring the normal forwarding of the data message is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a medium for controlling the starting of an exchanger, which are used for solving the broadcast storm problem of the exchanger in the starting process, avoiding the blockage of a network channel and ensuring the normal forwarding of a data message.
In a first aspect, an embodiment of the present invention provides a method for controlling a switch to start, where the method is performed by a switch in a ring network of switches, where the switch includes: quick-start forwarding system and main system, and the switch is in the quick redundant ring function of opening in the switch looped netowrk includes:
after the switch is powered off and powered on again, the starting process of the quick-start forwarding system and the main system is executed at the same time, wherein the starting speed of the quick-start forwarding system is higher than that of the main system;
after the quick-start forwarding system is started, all the switching ports in the switch are configured according to locally stored port configuration information, and after the configuration is finished, forwarding control is carried out on the received message;
the port configuration information is matched with the port state of each port set in the switch ring network before the switch is powered down;
after the main system is started, the control right of the quick-start forwarding system to the switch is taken over, and the forwarding control is carried out on the received message.
In a second aspect, an embodiment of the present invention further provides a start control device for a switch, which is applied to a switch in a ring network of the switch, where the switch includes: quick-start forwarding system and main system, and the switch is in the quick redundant ring function of opening in the switch looped netowrk includes:
the controller starting module is used for simultaneously executing the starting process of the quick-start forwarding system and the main system after the switch is powered off and powered on again, wherein the starting speed of the quick-start forwarding system is higher than that of the main system;
the switching port configuration module is used for configuring each switching port in the switch according to locally stored port configuration information after the quick-start forwarding system is started, and performing forwarding control on the received message after the configuration is completed;
the port configuration information is matched with the port state of each port set in the switch ring network before the switch is powered down;
and the control right transfer module is used for taking over the control right of the quick-start forwarding system to the switch after the main system is started, and performing forwarding control on the received message.
In a third aspect, an embodiment of the present invention further provides a switch device, which includes a memory, a processor, and a computer program that is stored in the memory and is executable on the processor, where the processor implements the method for controlling the start of the switch according to any embodiment of the present invention when executing the computer program.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a startup control method for a switch according to any embodiment of the present invention.
In the technical scheme provided by the embodiment of the invention, when the switch in the switch ring network is powered off and powered on again, the starting process of the quick-start forwarding system and the main system is executed at the same time, after the quick-start forwarding system is started, each switching port in the switch is configured according to the locally stored port configuration information, the received message is forwarded and controlled after the configuration is completed, the main system takes over the control right of the quick-start forwarding system to the switch after the starting is completed, the received message is forwarded and controlled, and when the switch is started, each switching port in the switch can be configured according to the port configuration information stored in the quick-start forwarding system, so that the broadcast storm problem of the switch in the starting process is solved, the network channel is prevented from being blocked, and the normal forwarding of the data message is ensured.
Drawings
Fig. 1a is a schematic flowchart of a method for controlling startup of a switch according to a first embodiment of the present invention;
fig. 1b is a schematic diagram of a topology structure of a ring network of switches according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for controlling the start of the switch according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a start control device of a switch in a third embodiment of the present invention;
fig. 4 is a schematic hardware configuration diagram of a switch device in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1a is a flowchart of a method for controlling a start of a switch according to an embodiment of the present invention, where the method is applicable to solving a broadcast storm, avoiding a network channel from being blocked, and ensuring normal forwarding of a data packet.
As shown in fig. 1a, the start control method for an exchange provided in this embodiment is executed by an exchange in an exchange ring network, where the exchange includes: quick-start forwarding system and main system, just the switch is in the quick redundant ring function of opening in the switch looped netowrk specifically includes:
and S110, after the switch is powered off and powered on again, simultaneously executing the starting process of the quick-start forwarding system and the main system, wherein the starting speed of the quick-start forwarding system is higher than that of the main system.
In this embodiment, each switch included in the switch ring network starts a fast-start function in advance, that is, after the switch is powered down and powered up again, the fast-start forwarding system and the main system are started at the same time, the fast-start forwarding system is fast in starting, and can quickly execute a simple packet forwarding processing procedure.
The quick-start forwarding system is used for storing port configuration information of the switch, is high in starting speed, and can be used for carrying out forwarding processing on received messages on a comparison basis by a user.
The main system is used for processing all function items of the switch, such as forwarding control of received messages and the like, and the starting speed is low.
It can be understood that, after the switch in the switch ring network is powered down and powered up again, the fast-boot forwarding system in the switch and the main system are also powered up synchronously, wherein each switch in the switch ring network starts the fast redundant ring function.
As an optional implementation, the fast-boot forwarding system is a single chip, and the main system is a central processing unit of the switch.
In this embodiment of the present invention, the fast boot forwarding system may be a single chip with a memory, and the main system may be a Central Processing Unit (CPU) inside a switch with a switch chip, where the memory may be a non-volatile memory such as FLASH and ROM, and the switch chip may be a chip KD5660, and this is not specifically limited in this embodiment of the present invention. The quick-start forwarding system and the main system can be connected through the bus and perform data interaction.
And S120, after the quick-start forwarding system is started, configuring each switching port in the switch according to the locally stored port configuration information, and after the configuration is finished, performing forwarding control on the received message.
The port configuration information is adapted to the port state of each port set in the switch ring network before the switch is powered down.
The port configuration information refers to configuration items of each port of the switch, such as port states and the like, after the configuration of a fast redundancy RING protocol (DT-RING) used in the switch RING network takes effect.
The method includes that port configuration information of each switching port in a switch is stored in a memory of a quick-start forwarding system in advance, after the quick-start forwarding system is powered on and started, the locally stored port configuration information is read, for example, the port configuration information stored in a FLASH memory is read, then a relevant register in a switching chip of the switch is configured according to the port configuration information, states of each switching port are set, and after the port configuration information is configured, the quick-start forwarding system can perform forwarding control on a received message, for example, two-layer forwarding or three-layer forwarding control on the received message.
It can be understood that in the switch ring network formed by the switches, the loop protocol can be selected as the fast redundancy loop protocol, and each switch starts the fast redundancy function in advance.
The basic principle of the fast redundancy ring protocol is as follows: appointing a main switch and a slave switch in a switch ring network, and appointing a main port and a slave port of the main switch, wherein the main port is in a forwarding (forward) state, the main port of the main switch sends a fast redundancy detection message, and the slave port detects whether the fast redundancy ring detection message is received; if yes, it indicates that there is a logic loop in the current switch system, and the slave port of the master switch needs to be set to a blocking (block) state to disconnect the loop; if not, the slave port of the main switch is set to be in a forwarding state, so that the forwarding path is increased to the maximum extent. Therefore, the rapid redundancy ring protocol is used in the switch ring network, so that the broadcast storm problem of the switch in the starting process can be effectively avoided, and the normal forwarding of the data message is ensured.
Optionally, the switch is a master switch in a switch ring network; after the fast-boot forwarding system is booted, configuring each switching port in the switch according to the locally stored port configuration information, which may include: after the quick-start forwarding system is started, according to locally stored port configuration information, a main port in a main switch is set to be in a forwarding state, and a slave port in the main switch is set to be in a blocking state.
The switch ring network comprises a plurality of switches, the switches comprise a main switch and at least one slave switch, and the main switch comprises a main port and a slave port. When the fast redundancy ring protocol is used in the ring network of the switch, the main port of the main switch is set to be in a forwarding state, and the auxiliary port is set to be in a blocking state, namely, the port configuration information of the fast start forwarding system corresponding to the main switch, which is locally stored, is set.
Correspondingly, when the quick-start forwarding system configures the main switch according to the port configuration information, the main port in the main switch can be set to be in a forwarding state, and the auxiliary port in the main switch is set to be in a blocking state, so that a logic loop cannot appear in the whole switch ring network.
Optionally, the switch is a slave switch in a switch ring network; after the fast-boot forwarding system is booted, configuring each switching port in the switch according to the locally stored port configuration information, which may include: after the quick-start forwarding system is started, all ports in the slave switch are set to be in a forwarding state according to the locally stored port configuration information.
When the fast redundancy ring protocol is used in the switch ring network, each port of the slave switch is set to be in a forwarding state, namely, the port configuration information of the fast start forwarding system corresponding to the slave switch, which is locally stored, is used, so that when the fast start forwarding system configures the slave switch according to the port configuration information, each port in the slave switch can be set to be in the forwarding state.
By way of example and not limitation, a scenario of 1 master switch and 4 slave switches is shown in FIG. 1 b. Wherein, each switch interconnects in turn and constitutes a switch looped network together. Alternatively, the number of slave switches is not limited to 4, and may be 1 or 5, and the like. The main port of the main switch is set to be in a forward state, the slave ports are set to be in a block state, and all the ports of the 4 slave switches are set to be in the forward state.
And S130, after the main system is started, taking over the control right of the quick-start forwarding system to the switch, and performing forwarding control on the received message.
After the quick-start forwarding system completes configuration of each switching port in the switch, the switch is not subjected to other configuration, the control right of the switch is released, after a main system of the switch is powered on and started, the main system takes over the control right and performs forwarding control on a received message, and at the moment, the starting control of the switch is completed.
As an optional implementation manner, after the main system takes over the control right of the fast-boot forwarding system to the switch after completing the boot, and performs forwarding control on the received packet, the method may further include:
reading a root port in the switch ring network through the main system according to a quick redundant ring function configured by the main system; determining, by the host system, a switch role of the switch in the switch ring network according to whether each port in the switch includes the root port; if the main system determines that the switch role is the main switch, executing a control protocol matched with the main switch in a fast redundancy ring protocol; and if the master system determines that the switch role is the slave switch, executing a control protocol matched with the slave switch in the fast redundancy ring protocol.
For a switch configured with the fast redundancy ring protocol, a root port in the entire switch ring network needs to be specified in advance, for example, in a kinen 6000 switch configured with the fast redundancy ring protocol, a port 4 is specified as the root port. Therefore, after the main system takes over the control right of the switch, the main system can read the root port in the switch ring network according to the fast redundancy ring protocol configured by the local machine, if the root port belongs to the port in the local machine, the switch is determined as the main switch, and the control protocol matched with the main switch in the fast redundancy ring protocol is executed, namely, the fast redundancy detection message is sent through the main port periodically, and whether the fast redundancy detection message is received by the slave port is detected; if the root port does not belong to the port in the local switch, the switch is determined to be the slave switch, and a control protocol matched with the slave switch in the fast redundancy ring protocol is executed, namely the fast redundancy detection message is forwarded.
In the technical scheme provided by the embodiment of the invention, when the switch in the switch ring network is powered off and powered on again, the starting process of the quick-start forwarding system and the main system is executed at the same time, after the quick-start forwarding system is started, each switching port in the switch is configured according to the locally stored port configuration information, the received message is forwarded and controlled after the configuration is completed, the main system takes over the control right of the quick-start forwarding system to the switch after the starting is completed, the received message is forwarded and controlled, and when the switch is started, each switching port in the switch can be configured according to the port configuration information stored in the quick-start forwarding system, so that the broadcast storm problem of the switch in the starting process is solved, the network channel is prevented from being blocked, and the normal forwarding of the data message is ensured.
Example two
Fig. 2 is a flowchart of a method for controlling startup of a switch according to a second embodiment of the present invention. This embodiment is embodied on the basis of the foregoing embodiment, wherein after determining, by the host system, the switch role of the switch in the switch ring network, the method may further include: if the main system determines that the role of the switch is changed before and after the switch is powered down, the main system resets the state of each port according to a fast redundancy ring protocol and then acquires port configuration information corresponding to each port in the switch; and sending the port configuration information to the quick-start forwarding system through the main system so as to instruct the quick-start forwarding system to locally update and store the port configuration information.
As shown in fig. 2, the start control method for the switch provided in this embodiment is executed by the switch in the ring network of switches, and the switch includes: quick-start forwarding system and main system, just the switch is in the quick redundant ring function of opening in the switch looped netowrk specifically includes:
s210, after the switch is powered off and powered on again, starting the quick-start forwarding system and the main system at the same time, wherein the starting speed of the quick-start forwarding system is higher than that of the main system.
S220, after the quick-start forwarding system is started, all the switching ports in the switch are configured according to the locally stored port configuration information, and after the configuration is completed, the forwarding control is carried out on the received message.
The port configuration information is adapted to the port state of each port set in the switch ring network before the switch is powered down.
And S230, after the main system is started, taking over the control right of the quick-start forwarding system to the switch, and performing forwarding control on the received message.
S240, reading a root port in the switch ring network through the main system according to the quick redundancy ring function configured by the main system.
As described above, if the fast redundancy ring function is turned on in the switch, the root port included in the switch ring network to which the switch is adapted, for example, the unique identification of the root port, needs to be set inside the switch at the same time.
S250, determining the switch role of the switch in the switch ring network by the main system according to whether each port in the switch comprises the root port.
In this embodiment, when the switch determines that the root port is included in the local computer, it indicates that the switch role of the switch itself is the master switch, and when the switch determines that the root port is not included in the local computer, it indicates that the switch role of the switch itself is the slave switch.
S260, if the main system determines that the switch role is the main switch, executing a control protocol matched with the main switch in a fast redundancy ring protocol.
If the switch is started, the local switch is determined to be a main switch, and the fast redundancy ring function is started in advance, the fast redundancy detection message is sent through the main port regularly, whether the fast redundancy detection message is received by the slave port is detected, and then the slave port is determined to be set to be in a forwarding state or a blocking state according to whether the fast redundancy detection message can be received by the slave port.
S270, if the master system determines that the switch role is the slave switch, executing a control protocol matched with the slave switch in the fast redundancy ring protocol.
If the switch is started, the local computer is determined to be the main switch, and the fast redundancy ring function is started in advance, the received fast redundancy detection message is forwarded through each port of the local computer.
S280, if the main system determines that the role of the switch is changed before and after the switch is powered down, the main system resets the state of each port according to a fast redundancy ring protocol and then acquires port configuration information corresponding to each port in the switch.
Further, if the switch finds that the role of the switch changes before and after the power failure, the state of each port needs to be set again.
Typically, if the switch role of the switch is changed from the master switch to the slave switch, each port needs to be set to a forwarding state; if the switch role of the switch is changed from the slave switch to the master switch, the master port of the switch needs to be set to a forwarding state, and the slave port needs to be set to a blocking state. At this time, the port configuration information stored in the fast-start forwarding system is no longer accurate, and when the switch is restarted, the broadcast storm cannot be effectively avoided according to the port configuration information stored in the fast-start forwarding system. Furthermore, it is necessary to update and store the port configuration information in the fast-boot forwarding system.
And S290, sending the port configuration information to the quick-start forwarding system through the main system to instruct the quick-start forwarding system to locally update and store the port configuration information.
Optionally, sending the port configuration information to the fast-boot forwarding system through the host system may include: and sending the port configuration information to the quick-start forwarding system by the main system by adopting a serial peripheral interface channel between the main system and the quick-start forwarding system.
In the embodiment of the present invention, data interaction may be performed between the fast-boot forwarding system and the host system through a Serial Peripheral Interface (SPI) channel, that is, the host system sends the port configuration information to the fast-boot forwarding system through the SPI channel to perform update and storage.
For those parts of this embodiment that are not explained in detail, reference is made to the aforementioned embodiments, which are not repeated herein.
According to the technical scheme, if the main system determines that the role of the switch is changed before and after the switch is powered down, the main system resets the state of each port according to the fast redundancy ring protocol and then acquires port configuration information corresponding to each port in the switch; the port configuration information is sent to the quick-start forwarding system through the main system so as to indicate the quick-start forwarding system to locally update and store the port configuration information, when the switch in the switch ring network changes the role of the switch, the quick-start forwarding system updates the stored port configuration information of each switch in the ring network, the timeliness of the port configuration information stored by the quick-start forwarding system is ensured, and the problem of broadcast storm of the switch in the next starting process is solved.
On the basis of the foregoing embodiments, the method may further include:
responding to a configuration storage instruction input by a user through the main system, and acquiring port configuration information corresponding to each port in the switch;
sending the port configuration information to a quick-start forwarding system through the main system so as to instruct the quick-start forwarding system to locally update and store the port configuration information;
and triggering and generating the configuration storage instruction after the topological structure of the switch ring network changes.
The configuration storage instruction is triggered and generated after the topological structure of the switch ring network changes. The configuration storage instruction refers to an instruction issued by a user for storing the switch port configuration information.
When the topology structure of the switch ring network changes, a user can trigger and generate a configuration storage instruction, and after receiving the configuration storage instruction, the main system acquires port configuration information corresponding to each port in the switch so as to update and store the port configuration information.
Illustratively, the main system sends the port configuration information to the single chip microcomputer, and the single chip microcomputer updates and stores the port configuration information into a FLASH memory of the single chip microcomputer, so that timeliness of the port configuration information stored in the quick-start forwarding system is guaranteed, and therefore when the switch is started next time, each switching port in the switch can be configured according to the updated port configuration information stored in the single chip microcomputer.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a start control device of a switch according to a third embodiment of the present invention, where the third embodiment of the present invention is applicable to solving a broadcast storm, avoiding a network channel from being blocked, and ensuring normal forwarding of a data packet, and the device may be implemented in a software and/or hardware manner, and may be generally integrated in a switch device.
As shown in fig. 3, the start control device of the switch is applied to the switch in the switch ring network, and the switch includes: the quick-start forwarding system and the main system specifically comprise: a controller start module 310, a switch port configuration module 320, and a control right handing-off module 330. Wherein,
a controller starting module 310, configured to execute a starting process for the fast-boot forwarding system and the main system at the same time after the switch is powered down and powered up again, where a starting speed of the fast-boot forwarding system is faster than that of the main system, and the switch has a fast redundancy ring function that is started in the switch ring network;
the switching port configuration module 320 is configured to configure each switching port in the switch according to locally stored port configuration information after the fast-start forwarding system is started, and perform forwarding control on the received message after the configuration is completed;
the port configuration information is matched with the port state of each port set in the switch ring network before the switch is powered down;
and a control right forwarding module 330, configured to take over the control right of the fast-start forwarding system to the switch after the main system is started, and perform forwarding control on the received packet.
In the technical scheme provided by the embodiment of the invention, when the switch in the switch ring network is powered off and powered on again, the starting process of the quick-start forwarding system and the main system is executed at the same time, after the quick-start forwarding system is started, each switching port in the switch is configured according to the locally stored port configuration information, the received message is forwarded and controlled after the configuration is completed, the main system takes over the control right of the quick-start forwarding system to the switch after the starting is completed, the received message is forwarded and controlled, and when the switch is started, each switching port in the switch can be configured according to the port configuration information stored in the quick-start forwarding system, so that the broadcast storm problem of the switch in the starting process is solved, the network channel is prevented from being blocked, and the normal forwarding of the data message is ensured.
On the basis of the above embodiments, the switch is a main switch in the switch ring network;
the switch port configuration module 320 may be specifically configured to:
after the quick-start forwarding system is started, according to locally stored port configuration information, a main port in a main switch is set to be in a forwarding state, and a slave port in the main switch is set to be in a blocking state.
On the basis of the above embodiments, the switch is a slave switch in the switch ring network;
the switch port configuration module 320 may be specifically configured to:
after the quick-start forwarding system is started, all ports in the slave switch are set to be in a forwarding state according to the locally stored port configuration information.
On the basis of the above embodiments, the method may further include: a protocol control module to:
after the main system is started, taking over the control right of the quick-start forwarding system to the switch, and after forwarding control is performed on the received message, reading a root port in the switch ring network through the main system according to a quick redundant ring function configured by the main system;
determining, by the host system, a switch role of the switch in the switch ring network according to whether each port in the switch includes the root port;
if the main system determines that the switch role is the main switch, executing a control protocol matched with the main switch in a fast redundancy ring protocol;
and if the master system determines that the switch role is the slave switch, executing a control protocol matched with the slave switch in the fast redundancy ring protocol.
On the basis of the above embodiments, the method may further include:
a port configuration information obtaining unit, configured to, after determining, by the host system, a switch role of the switch in the switch ring network, obtain, by the host system, port configuration information corresponding to each port in the switch after resetting a state of each port according to a fast redundant ring protocol if it is determined that the switch role of the switch is changed before and after power failure;
and the port configuration information sending module is used for sending the port configuration information to the quick-start forwarding system through the main system so as to instruct the quick-start forwarding system to locally update and store the port configuration information.
On the basis of the foregoing embodiments, the port configuration information sending module may be specifically configured to:
and sending the port configuration information to the quick-start forwarding system by the main system by adopting a serial peripheral interface channel between the main system and the quick-start forwarding system.
On the basis of the above embodiments, the quick-start forwarding system is a single chip microcomputer, and the main system is the central processing unit of the switch.
The starting control device of the switch can execute the starting control method of the switch provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the starting control method of the switch.
Example four
Fig. 4 is a schematic diagram of a hardware structure of a switch device according to a fourth embodiment of the present invention, and as shown in fig. 4, the switch device includes:
one or more processors 410, one processor 410 being illustrated in FIG. 4;
a memory 420;
the processor 410 and the memory 420 in the switch device may be connected by a bus or other means, as exemplified by the bus connection in fig. 4.
Wherein the switch comprises: and the switch is used for starting a quick redundant ring function in the switch ring network.
The memory 420 is a non-transitory computer-readable storage medium, and can be used for storing a software program, a computer-executable program, and program instructions corresponding to a startup control method of a switch, which is applied to a switch device in an embodiment of the present invention, including:
after the switch is powered off and powered on again, the starting process of the quick-start forwarding system and the main system is executed at the same time, wherein the starting speed of the quick-start forwarding system is higher than that of the main system;
after the quick-start forwarding system is started, all the switching ports in the switch are configured according to locally stored port configuration information, and after the configuration is finished, forwarding control is carried out on the received message;
the port configuration information is matched with the port state of each port set in the switch ring network before the switch is powered down;
after the main system is started, the control right of the quick-start forwarding system to the switch is taken over, and the forwarding control is carried out on the received message.
The processor 410 executes various functional applications of the host and data processing by executing software program instructions stored in the memory 420, that is, implements the startup control method applied to any one of the switches of the switch device in the above-described embodiments.
The memory 420 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the switch device, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
EXAMPLE five
An embodiment five of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for controlling startup of a switch, according to any of the embodiments of the present invention: that is, the program when executed by the processor implements:
after the switch is powered off and powered on again, the starting process of the quick-start forwarding system and the main system is executed at the same time, wherein the starting speed of the quick-start forwarding system is higher than that of the main system;
after the quick-start forwarding system is started, all the switching ports in the switch are configured according to locally stored port configuration information, and after the configuration is finished, forwarding control is carried out on the received message;
the port configuration information is matched with the port state of each port set in the switch ring network before the switch is powered down;
after the main system is started, the control right of the quick-start forwarding system to the switch is taken over, and the forwarding control is carried out on the received message.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A startup control method of a switch, executed by a switch in a ring network of switches, the switch comprising: the method comprises the steps of starting a forwarding system and a main system, and starting a fast redundancy ring function of a switch in a switch ring network, and is characterized in that the method comprises the following steps:
after the switch is powered off and powered on again, the starting process of the quick-start forwarding system and the main system is executed at the same time, wherein the starting speed of the quick-start forwarding system is higher than that of the main system;
after the quick-start forwarding system is started, all the switching ports in the switch are configured according to locally stored port configuration information, and after the configuration is finished, forwarding control is carried out on the received message;
the port configuration information is matched with the port state of each port set in the switch ring network before the switch is powered down;
after the main system is started, the control right of the quick-start forwarding system to the switch is taken over, and the forwarding control is carried out on the received message.
2. The method of claim 1, wherein the switch is a master switch in the switch ring;
after the fast-start forwarding system is started, configuring each switching port in the switch according to the locally stored port configuration information, including:
after the quick-start forwarding system is started, according to locally stored port configuration information, a main port in a main switch is set to be in a forwarding state, and a slave port in the main switch is set to be in a blocking state.
3. The method of claim 1, wherein the switch is a slave switch in the switch ring network;
after the fast-start forwarding system is started, configuring each switching port in the switch according to the locally stored port configuration information, including:
after the quick-start forwarding system is started, all ports in the slave switch are set to be in a forwarding state according to the locally stored port configuration information.
4. The method according to any one of claims 1 to 3, wherein after the host system takes over control of the switch by the fast-boot forwarding system after completion of boot, and performs forwarding control on the received packet, the method further comprises:
reading a root port in the switch ring network through the main system according to a quick redundant ring function configured by the main system;
determining, by the host system, a switch role of the switch in the switch ring network according to whether each port in the switch includes the root port;
if the main system determines that the switch role is the main switch, executing a control protocol matched with the main switch in a fast redundancy ring protocol;
and if the master system determines that the switch role is the slave switch, executing a control protocol matched with the slave switch in the fast redundancy ring protocol.
5. The method of claim 4, after determining, by the host system, a switch role for the switch in the switch ring, further comprising:
if the main system determines that the role of the switch is changed before and after the switch is powered down, the main system resets the state of each port according to a fast redundancy ring protocol and then acquires port configuration information corresponding to each port in the switch;
and sending the port configuration information to the quick-start forwarding system through the main system so as to instruct the quick-start forwarding system to locally update and store the port configuration information.
6. The method of claim 5, wherein sending the port configuration information to the fast-boot forwarding system via the host system comprises:
and sending the port configuration information to the quick-start forwarding system by the main system by adopting a serial peripheral interface channel between the main system and the quick-start forwarding system.
7. The method according to any one of claims 1-3, wherein the fast boot forwarding system is a single chip microcomputer, and the host system is a central processing unit of the switch.
8. A startup control device for a switch, executed by a switch in a ring network of switches, the switch comprising: quick-start forwarding system and main system, just the switch is in the quick redundant ring function of opening in the switch looped netowrk, its characterized in that, the device includes:
the controller starting module is used for simultaneously executing the starting process of the quick-start forwarding system and the main system after the switch is powered off and powered on again, wherein the starting speed of the quick-start forwarding system is higher than that of the main system;
the switching port configuration module is used for configuring each switching port in the switch according to locally stored port configuration information after the quick-start forwarding system is started, and performing forwarding control on the received message after the configuration is completed;
the port configuration information is matched with the port state of each port set in the switch ring network before the switch is powered down;
and the control right transfer module is used for taking over the control right of the quick-start forwarding system to the switch after the main system is started, and performing forwarding control on the received message.
9. A switch device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-7 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110990213.3A CN113612703B (en) | 2021-08-26 | 2021-08-26 | Switch starting control method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110990213.3A CN113612703B (en) | 2021-08-26 | 2021-08-26 | Switch starting control method, device, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113612703A true CN113612703A (en) | 2021-11-05 |
CN113612703B CN113612703B (en) | 2024-02-20 |
Family
ID=78309398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110990213.3A Active CN113612703B (en) | 2021-08-26 | 2021-08-26 | Switch starting control method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113612703B (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101958831A (en) * | 2010-06-10 | 2011-01-26 | 福建星网锐捷网络有限公司 | Ethernet ring network failure recovery method, Ethernet ring network and switching equipment |
CN102195858A (en) * | 2010-03-18 | 2011-09-21 | 武汉迈威光电技术有限公司 | Overload protection technique of carrier Ethernet ring network |
CN103095540A (en) * | 2013-01-18 | 2013-05-08 | 武汉迈威光电技术有限公司 | Industrial Ethernet data distribution and link redundancy design |
US20140071812A1 (en) * | 2012-09-07 | 2014-03-13 | Etherwan Systems, Inc. | Backup system of ring network and backup method of ring network |
CN105262635A (en) * | 2015-09-07 | 2016-01-20 | 上海斐讯数据通信技术有限公司 | Looped network protection protocol switching time automatic testing method, equipment and system |
CN105897578A (en) * | 2014-09-11 | 2016-08-24 | 姬磊 | Rapid self-healing transformer station ring network protocol algorithm and realization method thereof |
US10031763B1 (en) * | 2015-08-24 | 2018-07-24 | Amazon Technologies, Inc. | Network switch recovery after reboot |
CN108924064A (en) * | 2018-06-27 | 2018-11-30 | 北京东土军悦科技有限公司 | Interchanger quick start method, interchanger and medium |
CN109284136A (en) * | 2018-09-12 | 2019-01-29 | 盛科网络(苏州)有限公司 | A kind of method and device realizing switch system and quickly restarting |
CN109683968A (en) * | 2018-12-18 | 2019-04-26 | 北京东土军悦科技有限公司 | Interchanger quick start method, interchanger and storage medium |
CN111510315A (en) * | 2019-04-24 | 2020-08-07 | 上海自恒信息科技有限公司 | Ring network redundancy protocol based on proprietary switching chip network pipe type industrial switch |
CN113282351A (en) * | 2021-05-27 | 2021-08-20 | 北京东土军悦科技有限公司 | Switch starting method and device, electronic equipment and storage medium |
-
2021
- 2021-08-26 CN CN202110990213.3A patent/CN113612703B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102195858A (en) * | 2010-03-18 | 2011-09-21 | 武汉迈威光电技术有限公司 | Overload protection technique of carrier Ethernet ring network |
CN101958831A (en) * | 2010-06-10 | 2011-01-26 | 福建星网锐捷网络有限公司 | Ethernet ring network failure recovery method, Ethernet ring network and switching equipment |
US20140071812A1 (en) * | 2012-09-07 | 2014-03-13 | Etherwan Systems, Inc. | Backup system of ring network and backup method of ring network |
CN103095540A (en) * | 2013-01-18 | 2013-05-08 | 武汉迈威光电技术有限公司 | Industrial Ethernet data distribution and link redundancy design |
CN105897578A (en) * | 2014-09-11 | 2016-08-24 | 姬磊 | Rapid self-healing transformer station ring network protocol algorithm and realization method thereof |
US10031763B1 (en) * | 2015-08-24 | 2018-07-24 | Amazon Technologies, Inc. | Network switch recovery after reboot |
CN105262635A (en) * | 2015-09-07 | 2016-01-20 | 上海斐讯数据通信技术有限公司 | Looped network protection protocol switching time automatic testing method, equipment and system |
CN108924064A (en) * | 2018-06-27 | 2018-11-30 | 北京东土军悦科技有限公司 | Interchanger quick start method, interchanger and medium |
CN109284136A (en) * | 2018-09-12 | 2019-01-29 | 盛科网络(苏州)有限公司 | A kind of method and device realizing switch system and quickly restarting |
CN109683968A (en) * | 2018-12-18 | 2019-04-26 | 北京东土军悦科技有限公司 | Interchanger quick start method, interchanger and storage medium |
CN111510315A (en) * | 2019-04-24 | 2020-08-07 | 上海自恒信息科技有限公司 | Ring network redundancy protocol based on proprietary switching chip network pipe type industrial switch |
CN113282351A (en) * | 2021-05-27 | 2021-08-20 | 北京东土军悦科技有限公司 | Switch starting method and device, electronic equipment and storage medium |
Non-Patent Citations (5)
Title |
---|
孙中全;: "以太网交换机环路防范技术研究", 长春师范大学学报, no. 02 * |
徐雄斌等: "一种双冗余网络快速切换方法", 《舰船电子工程》 * |
徐雄斌等: "一种双冗余网络快速切换方法", 《舰船电子工程》, no. 11, 20 November 2018 (2018-11-20) * |
郭琪: "单端口环路检测技术的扩展应用", 《电子测试》 * |
郭琪: "单端口环路检测技术的扩展应用", 《电子测试》, 5 February 2013 (2013-02-05) * |
Also Published As
Publication number | Publication date |
---|---|
CN113612703B (en) | 2024-02-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11080404B2 (en) | Firmware upgrade method, slave station of robot, and machine readable storage medium | |
JP2020514865A (en) | Blockchain based consensus method and device | |
EP3407187B1 (en) | Optical line terminal, and method for upgrading master device and slave device | |
US10241551B2 (en) | Control and synchronization mechanism for a complex distributed power management system | |
CN107070731B (en) | Master-slave arbitration method and system | |
CN102104531B (en) | Message processing device, method and system | |
US20230132861A1 (en) | Switching method and apparatus, device, and storage medium | |
CN102752215B (en) | Processing method for VDP (vertical data processing) request messages and edge switch | |
CN110704090A (en) | FPGA (field programmable Gate array) and upgrading method and upgrading system thereof | |
CN113261249A (en) | Data transmission method, related equipment and computer storage medium | |
CN115589273A (en) | EPA communication system | |
CN107547285B (en) | Configuration information storage method and device | |
KR20150104435A (en) | Method of performing transition of operation mode for a routing processor | |
CN111488163B (en) | Firmware updating method and device, electronic equipment and storage medium | |
US9906435B2 (en) | Method and apparatus for determining intermediate routing node and system | |
CN103678163A (en) | Method, device and system for switching of data stream | |
CN113612703A (en) | Startup control method, device, equipment and medium of switch | |
CN109918215B (en) | Process communication method, system, terminal and storage medium | |
CN106537973A (en) | Service management method and device therefor | |
CN111314272B (en) | Task processing method and device | |
CN116527486B (en) | Device independent function self-adaptive management method, device and medium | |
US12001835B2 (en) | In-service software upgrade with active service monitoring | |
EP4180947A1 (en) | Software upgrading method, apparatus, and system | |
CN112685143B (en) | Method and device for realizing equipment operation | |
CN110677357B (en) | Method and device for rapidly forwarding port data of switching equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |