CN113612703B - Switch starting control method, device, equipment and medium - Google Patents

Switch starting control method, device, equipment and medium Download PDF

Info

Publication number
CN113612703B
CN113612703B CN202110990213.3A CN202110990213A CN113612703B CN 113612703 B CN113612703 B CN 113612703B CN 202110990213 A CN202110990213 A CN 202110990213A CN 113612703 B CN113612703 B CN 113612703B
Authority
CN
China
Prior art keywords
switch
port
forwarding
quick start
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.)
Active
Application number
CN202110990213.3A
Other languages
Chinese (zh)
Other versions
CN113612703A (en
Inventor
刘亚非
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kyland Technology Co Ltd
Original Assignee
Kyland Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Kyland Technology Co Ltd filed Critical Kyland Technology Co Ltd
Priority to CN202110990213.3A priority Critical patent/CN113612703B/en
Publication of CN113612703A publication Critical patent/CN113612703A/en
Application granted granted Critical
Publication of CN113612703B publication Critical patent/CN113612703B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • H04L49/552Prevention, detection or correction of errors by ensuring the integrity of packets received through redundant connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • H04L49/557Error 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 performed by a switch in a switch ring network, the method comprising: after the switch is powered down and powered up again, executing the starting process of the quick start forwarding system and the main system at the same time; after the quick start forwarding system is started, configuring each switching port in the switch according to the port configuration information stored locally, and after the configuration is completed, forwarding and controlling the received message; and after the starting is completed, the main system takes over the control right of the quick start forwarding system to the switch, and performs forwarding control 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 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.

Description

Switch starting control method, device, equipment and medium
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 an information exchange function in a communication system. The quick start of the switch requires that the switch can start forwarding the message in a very short time after power-on, wherein the two-layer forwarding requirement starts within 10 seconds and the three-layer forwarding requirement starts within 40 seconds.
At present, in a ring network topology structure, in a quick starting process of each switch, after the switch is powered on, all ports of each switch are set to be in a forwarding state, at this time, a broadcast storm is generated in the network, and only when a protocol configured in the ring network, such as a distributed redundancy protocol (Distributed Redundancy Protocol, DRP), comes into effect, normal transmission of data messages in the ring network can be restored, and the broadcast storm is eliminated.
Therefore, how to solve the broadcast storm problem of the switch in the starting process, avoid the network channel from being blocked, and ensure the normal forwarding of the data message is a problem to be solved urgently.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a medium for controlling the starting of a switch, which are used for solving the problem of broadcast storm in the starting process of the switch, avoiding the blocking 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 startup of a switch, which is executed by a switch in a switch ring network, where the switch includes: the fast redundancy ring function of the switch opened in the switch ring network comprises:
after the switch is powered down and powered up again, executing the starting process of the quick start forwarding system and the main system at the same time, wherein the starting speed of the quick start forwarding system is faster than that of the main system;
after the quick start forwarding system is started, configuring each switching port in the switch according to the port configuration information stored locally, and after the configuration is completed, forwarding and controlling the received message;
the port configuration information is matched with the port states of all ports arranged in the switch ring network before the switch is powered down;
and after the starting is completed, the main system takes over the control right of the quick start forwarding system to the switch, and performs forwarding control on the received message.
In a second aspect, an embodiment of the present invention further provides a startup control device of a switch, which is applied to a switch in a switch ring network, where the switch includes: the fast redundancy ring function of the switch opened in the switch ring network comprises:
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 down and powered up again, wherein the starting speed of the quick start forwarding system is faster than that of the main system;
the switching port configuration module is used for configuring each switching port in the switch according to the port configuration information stored locally after the quick-start forwarding system is started, and forwarding and controlling the received message after the configuration is completed;
the port configuration information is matched with the port states of all ports arranged 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 starting is completed through the main system and carrying out forwarding control on the received message.
In a third aspect, an embodiment of the present invention further provides a switch device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the startup control method of the switch according to any embodiment of the present invention when executing the program.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the program when executed by a processor implements a startup control method of a switch according to any embodiment of the present invention.
In the technical scheme provided by the embodiment of the invention, after the switch in the switch ring network is powered down and is powered up again, the starting processes of the quick start forwarding system and the main system are simultaneously executed, each switching port in the switch is configured according to the port configuration information stored locally after the quick start forwarding system is started, the received message is subjected to forwarding control after the configuration is completed, the control right of the quick start forwarding system to the switch is taken over after the main system is started, the received message is subjected to forwarding control, 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 problem of broadcast storm of the switch in the starting process is solved, the blocking of a network channel is avoided, and the normal forwarding of the data message is ensured.
Drawings
Fig. 1a is a flow chart of a method for controlling the start of a switch according to a first embodiment of the present invention;
fig. 1b is a schematic diagram of a topology of a ring network of switches according to a first embodiment of the present invention;
fig. 2 is a flow chart of a startup control method of a switch in 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 structure of a switch device in a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example 1
Fig. 1a is a flowchart of a method for controlling the start of a switch according to an embodiment of the present invention, where the embodiment of the present invention is applicable to solving broadcast storm, avoiding blocking of network channels and ensuring normal forwarding of data messages, and the method may be performed by a device for controlling the start of a switch according to the embodiment of the present invention, where the device may be implemented in software and/or hardware, and may be generally integrated in a switch device.
As shown in fig. 1a, the method for controlling the startup of a switch according to the present embodiment is executed by a switch in a switch ring network, where the switch includes: the quick-start forwarding system and the main system, and the quick redundancy ring function of the switch opened in the switch ring network specifically comprises:
s110, after the switch is powered down and powered up again, a 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 faster than that of the main system.
In this embodiment, each switch included in the switch ring network previously starts a fast start function, that is, when 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 speed, a simple message forwarding processing process can be rapidly executed, when the main system is actually restarted, the fast start forwarding system hands over control rights, and the started main system is used for realizing the message forwarding processing process in the actual sense.
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 forwarding a received message based on comparison by a user.
The main system is used for processing all functional items of the switch, such as forwarding control of received messages, and the like, and the starting speed is slower.
It can be understood that after the switch in the switch ring network is powered down and powered up again, the quick start forwarding system and the main system in the switch also synchronously perform power up start, wherein each switch in the switch ring network starts the quick redundancy ring function.
As an alternative implementation mode, the quick start forwarding system is a single chip microcomputer, and the main system is a central processing unit of the switch.
In the embodiment of the invention, the fast start forwarding system may be a single chip with a memory, the main system may be a central processing unit (Central Processing Unit, CPU) in a switch with a switching chip, where the memory may be a nonvolatile memory such as FLASH, ROM, etc., and the switching chip may be a chip KD5660, etc., and the embodiment of the invention is not limited in this way. The quick start forwarding system and the main system can be connected through a bus and conduct data interaction.
S120, after the start-up is completed through the quick start forwarding system, each switching port in the switch is configured according to the locally stored port configuration information, and after the configuration is completed, forwarding control is performed on the received message.
The port configuration information is adapted to the port states of all ports 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, after the configuration of a fast redundancy RING protocol (DT-RING) used in the switch RING network is validated.
The memory of the quick start forwarding system stores port configuration information of each exchange port in the switch 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 the FLASH memory is read, then relevant registers in the exchange chip of the switch are configured according to the port configuration information, states of each exchange port are set, and after the port configuration information is configured, the quick start forwarding system can perform forwarding control on received messages, for example, two-layer forwarding or three-layer forwarding control on the received messages and the like.
It can be understood that, in the switch ring network formed by the switches, the ring protocol may be selected as the fast redundancy ring protocol, and each switch turns on the fast redundancy function in advance.
The basic principle of the fast redundancy ring protocol is as follows: designating a master switch and a slave switch in a switch ring network, and designating a master port and a slave port of the master switch, wherein the master port is in a forwarding state, and the master port of the master switch sends a rapid redundancy detection message, and the slave port detects whether the rapid redundancy ring detection message is received or not; if so, indicating that a logic loop exists in the current switch system, and setting a slave port of the master switch to be in a blocking (block) state to disconnect the logic loop; if not, the slave port of the master switch is set to be in a forwarding state so as to increase the forwarding path to the greatest extent. Therefore, the fast 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 quick start forwarding system completes the start, configuring each switch port in the switch according to the locally stored port configuration information may include: after the quick start forwarding system is started, the main port in the main switch is set to be in a forwarding state according to the locally stored port configuration information, and the slave port in the main switch is set to be in a blocking state.
The switch ring network comprises a plurality of switches, wherein the switches comprise a master switch and at least one slave switch, and the master switch comprises a master port and a slave port. When the fast redundancy ring protocol is used in the switch ring network, the main port of the main switch is set to be in a forwarding state, and the slave port is set to be in a blocking state, namely the port configuration information which is locally stored by the fast start forwarding system and corresponds to the main switch.
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 slave port in the main switch is set to be in a blocking state, so that the logic loop in the whole switch ring network is ensured not to occur.
Optionally, the switch is a slave switch in the switch ring network; after the quick start forwarding system completes the start, configuring each switch port in the switch according to the locally stored port configuration information 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 ring network of the switch, all ports of the slave switch are set to be in a forwarding state, namely port configuration information which is locally stored by a quick start forwarding system corresponding to the slave switch, so that all ports in the slave switch can be set to be in a forwarding state when the quick start forwarding system configures the slave switch according to the port configuration information.
By way of example and not limitation, a case of 1 master switch and 4 slave switches is shown in fig. 1 b. Wherein, each switch is interconnected in turn to form a switch ring network. Alternatively, the number of slave exchanges is not limited to 4, but may be 1 or 5, etc. 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, all ports of the 4 slave switches are set to be in a forward state, at the moment, a logic loop cannot appear in the whole switch ring network, the problem of broadcast storm of the switch in the starting process is solved, the blocking of a network channel is avoided, and the normal forwarding of a data message is ensured.
S130, after the starting is completed through the main system, taking over the control right of the quick start forwarding system to the switch, and forwarding and controlling the received message.
After the quick start forwarding system completes the configuration of each switching port in the switch, other configurations are not carried out on the switch, the control right of the switch is released, after the main system of the switch is electrified and started, the main system takes over the control right, the forwarding control is carried out on the received message, and at the moment, the starting control of the switch is completed.
As an optional implementation manner, after the control right of the switch by the quick start forwarding system is taken over after the start is completed by the main system, the method may further include:
reading a root port in the switch ring network through the main system according to a quick redundancy ring function configured by the main system; determining, by the host system, a role of a switch in the switch ring network according to whether each port in the switch includes the root port; executing a control protocol matched with the master switch in the fast redundancy ring protocol by the master system if the role of the switch is determined to be the master switch; and if the role of the switch is determined to be the slave switch by the master system, 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 KIEN6000 switch configured with the fast redundancy ring protocol, port 4 is specified as the root port. Therefore, after taking over the control right of the switch, the main system can read the root port in the switch ring network according to the quick redundancy ring protocol configured by the local, if the root port belongs to the port in the local switch, the switch is determined to be the main switch, and a control protocol matched with the main switch in the quick redundancy ring protocol is executed, namely, a quick redundancy detection message is sent through the main port at regular intervals, and whether the slave port receives the quick redundancy detection message is detected; if the root port does not belong to the port in the local switch, determining that the switch is a slave switch, and executing a control protocol matched with the slave switch in the fast redundancy ring protocol, namely forwarding the fast redundancy detection message.
In the technical scheme provided by the embodiment of the invention, after the switch in the switch ring network is powered down and is powered up again, the starting processes of the quick start forwarding system and the main system are simultaneously executed, each switching port in the switch is configured according to the port configuration information stored locally after the quick start forwarding system is started, the received message is subjected to forwarding control after the configuration is completed, the control right of the quick start forwarding system to the switch is taken over after the main system is started, the received message is subjected to forwarding control, 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 problem of broadcast storm of the switch in the starting process is solved, the blocking of a network channel is avoided, and the normal forwarding of the data message is ensured.
Example two
Fig. 2 is a flowchart of a startup control method of a switch according to a second embodiment of the present invention. The present embodiment is embodied on the basis of the foregoing embodiment, where after determining, by the host system, a switch role of the switch in the switch ring network, the method may further include: if the main system determines that the switch roles of the switch are changed before and after power failure, according to a fast redundancy ring protocol, after the state of each port is set again, port configuration information corresponding to each port in the switch is obtained; 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 update and store the port configuration information locally.
As shown in fig. 2, the method for controlling the startup of the switch provided in this embodiment is executed by the switch in the switch ring network, where the switch includes: the quick-start forwarding system and the main system, and the quick redundancy ring function of the switch opened in the switch ring network specifically comprises:
and S210, after the switch is powered down and powered up again, executing the starting process of the quick start forwarding system and the main system at the same time, wherein the starting speed of the quick start forwarding system is faster than that of the main system.
S220, after the start-up is completed through the quick start forwarding system, each switching port in the switch is configured according to the locally stored port configuration information, and forwarding control is performed on the received message after the configuration is completed.
The port configuration information is adapted to the port states of all ports set in the switch ring network before the switch is powered down.
S230, after the starting is completed through the main system, taking over the control right of the quick start forwarding system to the switch, and forwarding and controlling the received message.
S240, reading the 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, it is necessary to simultaneously set the root port included in the switch ring network to which the switch is adapted, for example, the unique identification of the root port, inside the switch.
S250, determining the 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 own device, the switch role of the switch itself is described as the master switch, and when the switch determines that the root port is not included in the own device, the switch role of the switch itself is described as the slave switch.
And S260, if the master system determines that the switch role is the master switch, executing a control protocol matched with the master switch in the fast redundancy ring protocol.
If the switch is determined to be the master switch after being started and the fast redundancy ring function is started in advance, the fast redundancy detection message is sent through the master port regularly, whether the slave port receives the fast redundancy detection message is detected, and further whether the slave port is set to be in a forwarding state or in a blocking state can be determined according to whether the slave port can receive the fast redundancy detection message.
And 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 determined to be the main switch after being started and the fast redundancy ring function is started in advance, the received fast redundancy detection message is forwarded through each port of the switch.
S280, if the main system determines that the switch roles of the switch are changed before and after power failure, the main system acquires port configuration information corresponding to each port in the switch after carrying out state setting on each port again according to a fast redundancy ring protocol.
Further, if the switch finds itself to change its role before and after power failure, it needs to reset the state of each port.
Typically, if the switch role of the switch is changed from master to slave, each port needs to be set to a forwarding state; if the switch role of the switch is changed from slave to master, then the master port of itself needs to be set to forwarding state and the slave port needs to be set to blocking state. At this time, the port configuration information stored in the quick start forwarding system is no longer accurate, and when the switch is restarted, the port configuration according to the port configuration information stored in the quick start forwarding system cannot effectively avoid broadcast storm. Furthermore, the port configuration information in the quick start forwarding system needs to be updated and stored.
And S290, 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 update and store the port configuration information locally.
Optionally, sending, by the host system, the port configuration information to the fast forwarding system may include: and transmitting port configuration information to the quick start forwarding system by the main system through a serial peripheral interface channel between the main system and the quick start forwarding system.
In the embodiment of the invention, data interaction can be performed between the quick start forwarding system and the main system through a serial peripheral interface (Serial Peripheral Interface, SPI), namely, the main system sends port configuration information to the quick start forwarding system through the SPI for updating and storing.
The present embodiment is not explained in detail herein, and reference is made to the foregoing embodiments.
According to the technical scheme, if the main system determines that the role of the switch is changed before and after power failure, the main system acquires port configuration information corresponding to each port in the switch after carrying out state setting on each port again according to the fast redundancy ring protocol; the port configuration information is sent to the quick start forwarding system through the main system, so that the quick start forwarding system is instructed to update and store the port configuration information locally, the quick start forwarding system is used for updating port configuration information of each switch in the stored ring network when the switch role is changed in the switch ring network, timeliness of the port configuration information stored by the quick start forwarding system is guaranteed, and the problem of broadcast storm of the switch in the next starting process is solved.
On the basis of the above embodiments, the method may further include:
acquiring port configuration information corresponding to each port in the switch by the main system in response to a configuration storage instruction input by a user;
the port configuration information is sent to a quick start forwarding system through the main system, so that the quick start forwarding system is instructed to update and store the port configuration information locally;
the configuration storage instruction is triggered to be generated after the topological structure of the switch ring network is changed.
The configuration storage instruction is triggered to be generated after the topological structure of the switch ring network is changed. The configuration storage instruction refers to an instruction issued by a user to save the configuration information of the switch port.
When the topology structure of the switch ring network changes, a user can trigger to 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.
The host system sends the port configuration information to the singlechip, and the singlechip updates and stores the port configuration information in a FLASH memory of the host system, so that timeliness of the port configuration information stored in the quick-start forwarding system is ensured, and each exchange port in the switch can be configured according to the updated port configuration information stored in the singlechip when the switch is started next time.
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 embodiment of the present invention is applicable to solving broadcast storm, avoiding blocking of network channels and ensuring normal forwarding of data packets, 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 a switch in a switch ring network, and the switch comprises: the quick start forwarding system and the main system specifically comprise: a controller startup module 310, a switch port configuration module 320, and a control authority transfer module 330. Wherein,
the controller starting module 310 is configured to execute a starting process for the fast start forwarding system and the main system at the same time after the switch is powered down and powered up again, where the starting speed of the fast start 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 switch port configuration module 320 is configured to configure each switch port in the switch according to the locally stored port configuration information after the start-up of the fast start forwarding system is completed, and perform forwarding control on the received message after the configuration is completed;
the port configuration information is matched with the port states of all ports arranged in the switch ring network before the switch is powered down;
and the control right transfer module 330 is configured to take over the control right of the switch by the fast start forwarding system after the start is completed by the host system, and perform forwarding control on the received message.
In the technical scheme provided by the embodiment of the invention, after the switch in the switch ring network is powered down and is powered up again, the starting processes of the quick start forwarding system and the main system are simultaneously executed, each switching port in the switch is configured according to the port configuration information stored locally after the quick start forwarding system is started, the received message is subjected to forwarding control after the configuration is completed, the control right of the quick start forwarding system to the switch is taken over after the main system is started, the received message is subjected to forwarding control, 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 problem of broadcast storm of the switch in the starting process is solved, the blocking of a network channel is avoided, and the normal forwarding of the data message is ensured.
On the basis of the above embodiments, the switch is a master 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, a main port in the main switch is set to be in a forwarding state according to locally stored port configuration information, 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 for:
after the starting is completed through the main system, taking over the control right of the quick start forwarding system to the switch, and after forwarding the received message, 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;
determining, by the host system, a role of a switch in the switch ring network according to whether each port in the switch includes the root port;
executing a control protocol matched with the master switch in the fast redundancy ring protocol by the master system if the role of the switch is determined to be the master switch;
and if the role of the switch is determined to be the slave switch by the master system, 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:
the port configuration information acquisition unit is used for acquiring port configuration information corresponding to each port in the switch after the main system determines the role of the switch in the switch ring network, if the main system determines that the role of the switch is changed before and after power failure, the ports are reset according to a fast redundancy ring protocol;
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 update and store the port configuration information locally.
Based on the above embodiments, the port configuration information sending module may be specifically configured to:
and transmitting the port configuration information to the quick start forwarding system by the main system through a serial peripheral interface channel between the main system and the quick start forwarding system.
Based on the above embodiments, the quick start forwarding system is a single chip microcomputer, and the main system is a central processing unit of the switch.
The switch starting control device can execute the switch starting control method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the switch starting control method.
Example IV
Fig. 4 is a schematic hardware structure of a switch device according to a fourth embodiment of the present invention, where, 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 otherwise, for example in fig. 4.
Wherein the switch comprises: and a fast redundancy ring function of opening the switch in the switch ring network.
The memory 420 is used as a non-transitory computer readable storage medium, and may be used to store a software program and a computer executable program, for example, program instructions corresponding to a startup control method applied to a switch device in an embodiment of the present invention, including:
after the switch is powered down and powered up again, executing the starting process of the quick start forwarding system and the main system at the same time, wherein the starting speed of the quick start forwarding system is faster than that of the main system;
after the quick start forwarding system is started, configuring each switching port in the switch according to the port configuration information stored locally, and after the configuration is completed, forwarding and controlling the received message;
the port configuration information is matched with the port states of all ports arranged in the switch ring network before the switch is powered down;
and after the starting is completed, the main system takes over the control right of the quick start forwarding system to the switch, and performs forwarding control 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, i.e., implements the startup control method of any one of the switches applied to the switch device in the above-described embodiment.
Memory 420 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the switch device, etc. In addition, 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
A fifth embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a startup control method for a switch as provided in all the embodiments of the present invention: that is, the program, when executed by the processor, implements:
after the switch is powered down and powered up again, executing the starting process of the quick start forwarding system and the main system at the same time, wherein the starting speed of the quick start forwarding system is faster than that of the main system;
after the quick start forwarding system is started, configuring each switching port in the switch according to the port configuration information stored locally, and after the configuration is completed, forwarding and controlling the received message;
the port configuration information is matched with the port states of all ports arranged in the switch ring network before the switch is powered down;
and after the starting is completed, the main system takes over the control right of the quick start forwarding system to the switch, and performs forwarding control 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. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 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.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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 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 ++ and 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., connected through the internet using an internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. 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, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (8)

1. A startup control method of a switch, performed by a switch in a switch ring network, the switch comprising: the method is characterized by comprising the following steps of:
after the switch is powered down and powered up again, executing the starting process of the quick start forwarding system and the main system at the same time, wherein the starting speed of the quick start forwarding system is faster than that of the main system;
after the quick start forwarding system is started, configuring each switching port in the switch according to the port configuration information stored locally, and after the configuration is completed, forwarding and controlling the received message;
the port configuration information is matched with the port states of all ports arranged in the switch ring network before the switch is powered down;
after the starting is completed, the master system takes over the control right of the quick start forwarding system to the switch, and forwards and controls the received message;
the port configuration information is port state configuration items of all exchange ports of the switch after the rapid redundancy ring protocol configuration used in the switch ring network takes effect;
after the start-up is completed, the forwarding system configures each switch port in the switch according to the locally stored port configuration information, including:
after the quick start forwarding system is started, the switching port states of all switching ports in the switch are configured according to locally stored port state configuration items;
under the condition that the switch is determined to be a main switch in the switch ring network, after the start-up is completed through a quick start forwarding system, configuring each switch port in the switch according to locally stored port configuration information, wherein the method comprises the following steps:
after the quick start forwarding system is started, setting a main port in a main switch to a forwarding state and setting a slave port in the main switch to a blocking state according to locally stored port configuration information;
under the condition that the switch is determined to be a slave switch in the switch ring network, after the start-up is completed through a quick start forwarding system, configuring each switch port in the switch according to locally stored port configuration information, wherein the method comprises the following steps:
after the quick start forwarding system is started, each port in the slave switch is set to be in a forwarding state according to locally stored port configuration information;
after the configuration is completed, the forwarding control is performed on the received message through the quick start forwarding system, which comprises the following steps:
and performing three-layer forwarding control on the received message after configuration is completed through the quick start forwarding system.
2. The method according to claim 1, wherein after taking over control of the switch by the fast start forwarding system after completion of the start-up by the host system, performing forwarding control on the received message, further comprising:
reading a root port in the switch ring network through the main system according to a quick redundancy ring function configured by the main system;
determining, by the host system, a role of a switch in the switch ring network according to whether each port in the switch includes the root port;
executing a control protocol matched with the master switch in the fast redundancy ring protocol by the master system if the role of the switch is determined to be the master switch;
and if the role of the switch is determined to be the slave switch by the master system, executing a control protocol matched with the slave switch in the fast redundancy ring protocol.
3. The method of claim 2, further comprising, after determining, by the host system, a switch role of the switch in the switch ring network:
if the main system determines that the switch roles of the switch are changed before and after power failure, according to a fast redundancy ring protocol, after the state of each port is set again, port configuration information corresponding to each port in the switch is obtained;
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 update and store the port configuration information locally.
4. The method of claim 3, wherein sending, by the host system, the port configuration information to the fast forwarding system comprises:
and transmitting the port configuration information to the quick start forwarding system by the main system through a serial peripheral interface channel between the main system and the quick start forwarding system.
5. The method of claim 1, wherein the fast start forwarding system is a single chip microcomputer and the host system is a central processing unit of the switch.
6. A startup control device of a switch, performed by a switch in a switch ring network, the switch comprising: the device is characterized by comprising a quick start forwarding system and a main system, and the quick redundancy ring function of the switch opened in the switch ring network, wherein the device comprises:
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 down and powered up again, wherein the starting speed of the quick start forwarding system is faster than that of the main system;
the switching port configuration module is used for configuring each switching port in the switch according to the port configuration information stored locally after the quick-start forwarding system is started, and forwarding and controlling the received message after the configuration is completed;
the port configuration information is matched with the port states of all ports arranged in the switch ring network before the switch is powered down;
the control right transfer module is used for taking over the control right of the quick start forwarding system to the switch after the starting is completed through the main system and carrying out forwarding control on the received message;
the port configuration information is port state configuration items of all exchange ports of the switch after the rapid redundancy ring protocol configuration used in the switch ring network takes effect;
the switching port configuration module is specifically configured to:
when the switch is a main switch in the switch ring network, after the quick start forwarding system is started, setting a main port in the main switch to be in a forwarding state and setting a slave port in the main switch to be in a blocking state according to locally stored port configuration information;
when the switch is a slave switch in the switch ring network, setting all ports in the slave switch to be in a forwarding state according to locally stored port configuration information after the quick start forwarding system is started;
the switching port configuration module is specifically configured to:
after the quick start forwarding system is started, the switching port states of all switching ports in the switch are configured according to locally stored port state configuration items;
and performing three-layer forwarding control on the received message after configuration is completed through the quick start forwarding system.
7. A switch device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-5 when the program is executed by the processor.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-5.
CN202110990213.3A 2021-08-26 2021-08-26 Switch starting control method, device, equipment and medium Active CN113612703B (en)

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 CN113612703A (en) 2021-11-05
CN113612703B true 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 (11)

* Cited by examiner, † Cited by third party
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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201412058A (en) * 2012-09-07 2014-03-16 Etherwan Systems Inc Redundant system of a ring network and redundant method thereof

Patent Citations (11)

* Cited by examiner, † Cited by third party
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
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 (3)

* Cited by examiner, † Cited by third party
Title
一种双冗余网络快速切换方法;徐雄斌等;《舰船电子工程》;20181120(第11期);全文 *
以太网交换机环路防范技术研究;孙中全;;长春师范大学学报(02);全文 *
单端口环路检测技术的扩展应用;郭琪;《电子测试》;20130205;全文 *

Also Published As

Publication number Publication date
CN113612703A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
CN107070731B (en) Master-slave arbitration method and system
US20170153680A1 (en) Power Management System and Method
US20200193027A1 (en) Firmware upgrade method, slave station of robot, and machine readable storage medium
US7310803B2 (en) Method and system for executing multiple tasks in a task set
US8902898B2 (en) Apparatus and method for transferring a data signal by bypassing a power-saving segment in a communication network
CN115589273B (en) EPA communication system
CN110704090A (en) FPGA (field programmable Gate array) and upgrading method and upgrading system thereof
US20160202676A1 (en) Apparatus controller and apparatus control method
CN108595195B (en) Application program updating method, device, terminal and storage medium
CN113612703B (en) Switch starting control method, device, equipment and medium
US8837506B2 (en) Data transfer device
CN111813734B (en) 1553B bus communication method and system without message interval limitation
KR20150104435A (en) Method of performing transition of operation mode for a routing processor
US9906435B2 (en) Method and apparatus for determining intermediate routing node and system
CN109918215B (en) Process communication method, system, terminal and storage medium
EP3575965A1 (en) Command forwarding method and device, solar system, central controller, computer-readable storage medium
JP6894266B2 (en) Program update control method and program update control program for information processing device and management control device
CN112702428B (en) Distributed Internet of things equipment interoperation method and system
JP2010141731A (en) Layer-2 switch
CN105245840A (en) Data forwarding method and device and camera
CN116527486B (en) Device independent function self-adaptive management method, device and medium
EP3276489B1 (en) Parallel processing system
CN109560975B (en) Equipment updating method and device
CN112929283B (en) Data processing method, device, equipment and storage medium
TWI791316B (en) Method and system for implementing inter-process communications

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