WO2017000550A1 - Method and device for switching between primary and backup link and realizing redundancy backup of link - Google Patents

Method and device for switching between primary and backup link and realizing redundancy backup of link Download PDF

Info

Publication number
WO2017000550A1
WO2017000550A1 PCT/CN2016/072690 CN2016072690W WO2017000550A1 WO 2017000550 A1 WO2017000550 A1 WO 2017000550A1 CN 2016072690 W CN2016072690 W CN 2016072690W WO 2017000550 A1 WO2017000550 A1 WO 2017000550A1
Authority
WO
WIPO (PCT)
Prior art keywords
link
port
switching device
backup
backup group
Prior art date
Application number
PCT/CN2016/072690
Other languages
French (fr)
Chinese (zh)
Inventor
江启运
汤渊清
Original Assignee
北京东土科技股份有限公司
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 北京东土科技股份有限公司 filed Critical 北京东土科技股份有限公司
Publication of WO2017000550A1 publication Critical patent/WO2017000550A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • H04L12/437Ring fault isolation or reconfiguration

Definitions

  • the present application relates to the field of industrial Ethernet technologies, and in particular, to a method for switching between active and standby links, and a method and device for implementing link redundancy backup.
  • each switching device that constitutes a DRP ring network is in an equal position, and each switching device maintains the network state in a fixed allocated time slice and sends The network maintenance message, the other switching device fills in the network status of the current ring port in the maintenance message, and forwards the network maintenance message. After the next time slice arrives, the switching device corresponding to the time slice in the DRP ring network To maintain the network.
  • DRP Distributed Redundancy Protocol
  • the switching equipment can be located in an industrial Ethernet site, such as a substation, and two switching devices can be deployed in one industrial Ethernet site, and the switching devices located nationwide form a DRP ring network.
  • an industrial Ethernet site such as a substation
  • two switching devices can be deployed in one industrial Ethernet site, and the switching devices located nationwide form a DRP ring network.
  • different terminals located in the industrial Ethernet site need to be connected to implement data transmission in the DRP ring network.
  • each terminal connected to the network topology formed in the DRP ring network needs to form a redundant backup of the link.
  • one method when implementing redundancy backup, one method is to connect two switching devices in the DRP ring network in the same industrial Ethernet site through two links by using two network card terminals, and the dual network card terminals simultaneously
  • the two switching devices send data packets, and the two switching devices negotiate, and one of the switching devices forwards the data packets.
  • the switch can be used.
  • the other link transmits data packets to implement redundant backup of the link.
  • Another method is to use a terminal that supports the Rapid Spanning Tree Protocol (RSTP).
  • RSTP Rapid Spanning Tree Protocol
  • the terminal and the switching device in the DRP ring network generate a network topology based on the RSTP protocol, and implement redundancy backup of the link based on the RSTP protocol. .
  • the dual NIC terminals and RSTP terminals used in the existing two methods have higher costs, which increases the cost of redundant backup of the link, and the low-cost common hub HUB port terminal cannot be used in either method. use.
  • the time for re-generating the network topology of the RSTP terminal will be limited by the number of switching devices included in the DRP ring network.
  • each switching device After the network state maintenance is completed in the allocated time slice, the redundant backup of the link can be realized, and the redundancy backup time will reach the second level, which cannot meet the millisecond switching requirement in industrial applications.
  • the embodiment of the present application discloses a method for switching between active and standby links, and a method and device for implementing link redundancy backup.
  • the technical solutions are as follows:
  • a method for implementing a link redundancy backup is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second switching device All of the switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, and through the second link The second switching device is connected, the first link is in a disconnected state, the second link is in a connected state, and the first link and the second link form a backup group; Methods include:
  • the selecting one port from the discovered ports and setting it to an open state includes:
  • the selecting one port from the discovered ports and setting it to an open state includes:
  • the backup groups corresponding to the discovered ports are sorted in the order of the preset IDs, and the ports corresponding to the first backup group are set to the open state.
  • An active/standby link switching method is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, where the first switching device and the second switching device are both a switching device in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, and through the second link The second switching device is connected, and the first link and the second link form a backup group, and the second link that is currently in a connected state in the first link and the second link
  • the primary link is the primary link, and the first link that is currently in the disconnected state is the backup link.
  • the method includes:
  • the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table.
  • the identifier information of the backup group includes: identifier information of an industrial Ethernet station where the backup group is located, and identifier information of a group where the backup group is located in an industrial Ethernet site; or The identification information of the industrial Ethernet site where the backup group is located, the identification information of the group where the backup group is located in the industrial Ethernet site, and the identification information of the switching device in the group; or the identifier of the terminal corresponding to the backup group information.
  • a link redundancy backup device is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second switching device All are switching devices in the same distributed redundancy protocol DRP ring network; a terminal in the website, the terminal is connected to the first switching device by using a first link, and is connected to the second switching device by using a second link, where the first link is in a disconnected state. The second link is in a connected state, and the first link and the second link form a backup group; the device includes:
  • a link state monitoring module configured to monitor a link state of a DRP ring network link that is connected to the second switching device
  • a second port search module configured to: when it is detected that the DRP ring link connected to the second switching device is faulty, and the duration of the entire DRP ring network is in a fault state reaches a preset threshold, according to the local configuration information table Find the port number of the port assigned to the corresponding link for each backup group itself, and find each port that is in the blocked state;
  • a second port opening module configured to select a port from the discovered ports, set it to an open state, and connect the first link connected to the port to connect the first link and the first
  • the second link of a link in the same backup group is switched to the link in the DRP ring network.
  • the second port opening module is specifically configured to:
  • the port assigned to the link corresponding to the terminal with the highest priority is identified from the found port, and the identified port is set to be opened. status.
  • the second port opening module is specifically configured to:
  • the backup groups corresponding to the discovered ports are sorted in the order of the preset IDs, and the ports corresponding to the first backup group are set to the open state.
  • An active/standby link switching device is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, where the first switching device and the second switching device are both a switching device in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, and through the second link The second switching device is connected, and the first link and the second link form a backup group, and the second link that is currently in a connected state in the first link and the second link
  • the primary link is the primary link, and the first link that is currently in the disconnected state is the backup link; the device includes:
  • the fault communication message receiving module is configured to receive the fault communication message, where the fault communication message includes the identification information of the backup group where the second link that is faulty is located;
  • the first port searching module is configured to allocate, according to the local configuration information table, the corresponding link for each backup group according to the switching device corresponding to the backup group where the second link that is faulty is located. Port number of the port, find the corresponding port;
  • the first port open module is configured to set the found port to an open state, so that the first link connected to the port is in a connected state.
  • the identifier information of the backup group includes: identifier information of an industrial Ethernet station where the backup group is located, and identifier information of a group where the backup group is located in an industrial Ethernet site; or The identification information of the industrial Ethernet site where the backup group is located, the identification information of the group where the backup group is located in the industrial Ethernet site, and the identification information of the switching device in the group; or the identifier of the terminal corresponding to the backup group information.
  • the first switching device after receiving the fault communication message, can determine whether it is the backup group where the faulty link is located, according to the identifier information of the backup group in the fault communication message. The switching device determines whether the identification information of the backup group is recorded in the local configuration information. If yes, the first switching device can find the port that is allocated to the corresponding link of the same backup group as the faulty link.
  • the terminal is not limited.
  • the common HUB port terminal can also implement redundancy backup of the link, which reduces the running cost of the redundant backup of the link.
  • the first switching device can set the corresponding port to the open state as long as it receives the fault communication message or meets the port open condition, and does not need to reconstruct the entire network topology structure. Therefore, the process requires a short duration and can meet the industrial requirement.
  • the millisecond level of switching requirements in the application can be set.
  • an embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is configured to execute one of the applications described in the present application at runtime.
  • a method for implementing link redundancy backup includes:
  • an embodiment of the present application further provides an application, where the application is used to perform a link redundancy backup method described in the present application at runtime.
  • the method for implementing link redundancy backup described in the present application includes:
  • the embodiment of the present application further provides a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second device.
  • the switching devices are all switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, through the second chain
  • the second link is connected to the second switching device, the first link is in a disconnected state, the second link is in a connected state, and the first link and the second link form a backup group;
  • the first switching device includes:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
  • an embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is configured to perform one type of active/standby link switching described in the present application at runtime.
  • the method for switching between the active and standby links in the present application includes:
  • the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table.
  • an embodiment of the present application further provides an application, where The program is used to perform a primary and backup link switching method described in the present application at runtime.
  • the method for switching between the active and standby links in the present application includes:
  • the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table.
  • the embodiment of the present application further provides a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second device.
  • the switching devices are all switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, through the second chain
  • the road is connected to the second switching device, and the first link and the second link form a backup group, and the first link and the second link are currently in a connected state.
  • the second link is the primary link, and the first link that is currently in the disconnected state is the backup link.
  • the first switching device includes:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
  • the end allocated for the corresponding link for each backup group itself is recorded according to the local configuration information table. Port number of the port, find the corresponding port;
  • FIG. 1 is a schematic diagram of a DRP ring network in an embodiment of the present application.
  • FIG. 2 is a flowchart of an implementation of a method for switching between a primary and backup link in an embodiment of the present application
  • FIG. 3 is a flowchart of an implementation of a method for implementing link redundancy backup according to an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of an active/standby link switching apparatus according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a device for implementing link redundancy backup in the embodiment of the present application.
  • the method may include the following steps:
  • the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table.
  • the execution body of the above steps is the first switching device.
  • the first switching device and the second switching device are deployed in the same industrial Ethernet site, such as a substation, and the first switching device and the second switching device are switching devices in the same distributed redundancy protocol DRP ring network;
  • DRP ring network In the Industrial Ethernet site
  • Each terminal the terminal is connected to the first switching device through the first link, and is connected to the second switching device through the second link, and the first link and the second link form a backup group, in the first chain.
  • the second link that is currently in the connected state is the primary link
  • the first link that is currently in the disconnected state is the backup link.
  • the embodiment of the present application is described by taking an industrial Ethernet station as a substation as an example.
  • SW1, SW2, SW3, and SW4 are deployed in the first substation
  • SW1 and SW4 are deployed in the second substation.
  • the first substation there are three terminals having a link connection relationship with SW2 and SW3, and the terminal H1, the terminal H2, and the terminal H3.
  • the link that is currently connected is the primary link
  • the link that is currently disconnected is the backup link. That is to say, the first switching device in the embodiment of the present application may be different for different terminals.
  • the SW2 is the second switching device, and the SW3 is the first switching device; It is said that if the link connected to SW2 is in the disconnected state and the link connected to SW3 is in the open state, SW2 is the first switching device, and SW3 is the second switching device.
  • the two links corresponding to the terminal H1 form a first backup group
  • the two links corresponding to the terminal H2 form a second backup group
  • the two links corresponding to the terminal H3 form a third backup group. It should be noted that the number of terminals in the same substation can be adjusted according to the actual situation, and the embodiment of the present application does not limit this.
  • the corresponding switching device When the link between the switching device and the terminal fails, the corresponding switching device sends a fault communication packet to the other switching device in the DRP ring network.
  • the fault communication packet contains the identifier of the backup group where the faulty link is located. information.
  • the first switching device can determine whether it is the switching device corresponding to the backup group where the second link is faulty according to the identifier information of the backup group in the fault communication message. If yes, Then, according to the port number of the port allocated for the corresponding link for each backup group itself recorded in the local configuration information table, the port allocated to the link in the same backup group as the failed second link can be found. And setting the port to the open state, so that the first link connected to the port is in a connected state, and the switching between the active and standby links is implemented.
  • the first switching device after receiving the fault communication message, can determine whether it is the backup group where the faulty link is located, according to the identifier information of the backup group in the fault communication message. The switching device determines whether the identification information of the backup group is recorded in the local configuration information. If yes, the first switching device can find the port that is allocated to the corresponding link of the same backup group as the faulty link. And set the port to open. In this way, the link connected to the port can be connected, thereby implementing redundant backup of the link.
  • the terminal is not limited.
  • the common HUB port terminal can also implement redundancy backup of the link, which reduces the running cost of the redundant backup of the link.
  • the first switching device can set the corresponding port to the open state as long as it receives the faulty communication packet, and does not need to reconstruct the entire network topology structure. Therefore, the process requires a short duration and can meet milliseconds in industrial applications. Switching requirements.
  • the embodiment of the present application provides a method for switching between the active and standby links, where the method is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second device.
  • the switching devices are all switching devices in the same DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, and is connected to the second switching device through the second link.
  • the first link and the second link form a backup group.
  • the second link that is currently in the connected state is the primary link
  • the first link is currently in the disconnected state.
  • the link is a backup link; as shown in FIG. 2, which is an implementation flowchart of the method, the method may include the following steps:
  • the fault communication message includes the identifier information of the backup group where the second link that is faulty is located.
  • each terminal in the industrial Ethernet site is connected to two switching devices in the industrial Ethernet site in the DRP ring network through a link, one of which is the main link in the connected state, and the other chain
  • the road is a backup link in the disconnected state, and each terminal sends a data packet through its primary link.
  • the corresponding switching device can send fault communication packets to other switching devices in the DRP ring network through broadcast or multicast.
  • the fault communication packet can contain the identification information of the backup group where the faulty link is located.
  • a backup group can be uniquely identified by the identification information of the backup group. It should be noted that the faulty link is the first link that fails.
  • the identifier information of the backup group may include: identifier information of an industrial Ethernet station where the backup group is located, and identifier information of a group where the backup group is located in an industrial Ethernet site; Or the identification information of the industrial Ethernet site where the backup group is located, the identification information of the group where the backup group is located in the industrial Ethernet site, and the identification information of the switching device in the group; or the terminal corresponding to the backup group Identification information.
  • the identification information of the backup group is not limited to the above-mentioned information, and a unique coding information may be used to determine a unique identification information for each backup group in the DRP ring network. Make restrictions.
  • the first switching device After receiving the fault communication message, the first switching device can resolve the identification information of the backup group where the faulty link is located from the fault communication message, and record the corresponding backup group in the local configuration information table of the first switching device.
  • the identification information is obtained by querying the configuration information table, and the first switching device can determine whether it is the switching device corresponding to the backup group where the faulty link is located. If the information about the VRRP group with the faulty link is recorded in the configuration information table, the first switching device is the switching device corresponding to the VRRP group where the faulty link resides.
  • SW2 in FIG. 1 detects that the main link connecting SW2 and terminal H1 is faulty, and SW2 can send a fault communication message to other switching devices in the DRP ring network, and the fault communication message includes SW2 and terminal H1.
  • the SW3 is the first switching device in the embodiment of the present application, and the SW3 receives the faulty communication packet and parses the identifier of the VRRP group.
  • the backup group where the faulty link is located is the first backup group. If the information about the first backup group is recorded in the local configuration information table, the SW3 can determine that it is the first backup group. Switching equipment.
  • step S120 When the first switching device determines that it is the switching device corresponding to the backup group where the second link that is faulty is located, the operation of step S120 may be continued.
  • S120 Search for the corresponding port according to the port number of the port allocated for the corresponding link for each backup group itself recorded in the local configuration information table.
  • a corresponding switching device is required to assign a port to the corresponding link of the corresponding terminal.
  • SW2 in Figure 1 can assign port 1 to terminal H1.
  • Terminal H2 allocates port 2, and assigns port 3 to terminal H3.
  • SW3 can assign port 1 to terminal H1, port 2 to terminal H2, and port 3 to terminal H3.
  • specific port assignment rules can be set and adjusted according to specific conditions.
  • the configuration information table can be saved in the corresponding switching device.
  • the configuration information table saved in SW3 can be as shown in Table 1.
  • Backup group identification information The port number Identification information of the first backup group 1 Identification information of the second backup group 2 Identification information of the third backup group 3
  • Table 1 only shows the identification information and port number of the backup group in the configuration information table.
  • the configuration information table can also store other more information, such as the identification information of the second switching device.
  • the first switching device searches for a port assigned to the link in the same backup group as the failed link according to the port number of the port allocated for the corresponding link for each backup group itself recorded in the local configuration information table.
  • the faulty link is the link between the SW2 and the terminal H1
  • the fault communication message received by the SW3 includes the identifier information of the first backup group
  • the SW3 queries the local configuration information table to identify the identifier information of the first backup group.
  • the corresponding port number is 1. This port is the port that SW3 is assigned to the link in the same backup group as the faulty link.
  • S130 Set the found port to an open state, so that the first link connected to the port is in a connected state.
  • the port may be set to an open state, so that the link connected to the port is in a connected state.
  • the faulty link is the link between the SW2 and the terminal H1
  • the SW3 is the switching device corresponding to the backup group where the faulty link is located, and the SW3 sets the port of the link assigned to the terminal H1 to the open state, which can enable The link between SW3 and terminal H1 is connected.
  • the pass state the data packet sent by the terminal H1 is transmitted through the link between the SW3 and the terminal H1.
  • the first switching device after receiving the fault communication message, can determine whether it is the backup group where the faulty link is located, according to the identifier information of the backup group in the fault communication message. The switching device determines whether the identification information of the backup group is recorded in the local configuration information. If yes, the first switching device can find the port allocated to the corresponding link of the same backup group as the faulty link. The port is set to the open state, so that the link connected to the port can be connected, thereby implementing redundant backup of the link.
  • the terminal is not limited.
  • the common HUB port terminal can also implement redundancy backup of the link, which reduces the running cost of the redundant backup of the link.
  • the first switching device can set the corresponding port to the open state as long as it receives the faulty communication packet, and does not need to reconstruct the entire network topology structure. Therefore, the process requires a short duration and can meet milliseconds in industrial applications. Switching requirements.
  • a DRP ring network not only the link between the switching device and the terminal may be faulty, but also the DRP ring link between the switching devices may be faulty. If the switching device supports the RSTP protocol in the DRP ring network, when a fault occurs on the link between two switching devices on the DRP ring network, you can enable the pre-configured port in the blocked state. Redundant backup of the link. However, if there are at least two DRP ring network links, if the redundancy backup of the link is to be implemented, the link redundancy backup method provided by the embodiment of the present application may be applied.
  • the method is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, and the first switching device and the second switching device are both the same distributed redundancy protocol DRP ring network.
  • a switching device in the medium the terminal is connected to the first switching device by using the first link, and is connected to the second switching device by using the second link, where the first link is In the disconnected state, the second link is in a connected state, and the first link and the second link form a backup group.
  • an implementation flowchart of a method for implementing link redundancy backup may include the following steps:
  • S210 Monitor a link state of a DRP ring network link that is connected to the second switching device.
  • the first switching device can monitor the link state of the DRP ring network link that is connected to the second switching device in real time. If the DRP ring link is detected, The operation of step S220 can be continued.
  • the switching device supports the RSTP protocol in the DRP ring network
  • the link between two switching devices on the DRP ring network fails, the pre-configured port in the blocked state is opened.
  • the method of performing the redundancy backup of the link and opening the pre-configured port in the blocked state belongs to the prior art, and is not repeatedly described in the embodiment of the present application.
  • the DRP ring network is in a normal communication state, indicating that the previously blocked port in the DRP ring network has been opened. , solved the link failure problem.
  • the DRP ring network may be indicated.
  • the link is not the first faulty link in the DRP ring network.
  • the link between other switching devices in the DRP ring network has failed, and the pre-configuration is performed.
  • the operation of a blocked port At this time, the first switching device can find each port in the blocked state according to the port number of the port allocated for the corresponding link for each backup group itself recorded in the local configuration information table.
  • SW3 can obtain the information of port 1, port 2, and port 3 according to the port number recorded in the local configuration information table for each backup group itself, and then determine the status of each port.
  • Each port in the blocked state is found, for example, the ports found are port 1 and port 2.
  • S230 Select a port from the discovered ports, set it to an open state, and connect the first link connected to the port to connect the first link and the first link.
  • the second link in the backup group switches to the link in the DRP ring network.
  • the first switching device finds each port in the blocked state, and selects one port from the found ports. Specifically, the first switching device may randomly select or select according to a preset requirement, and then select The outgoing port is set to an open state, so that the link connected to the port is in a connected state. In this way, the two links in the backup group corresponding to the port are in a connected state, which is equivalent to switching the first link and the second link in the same backup group as the first link to the DRP ring.
  • the link in the network forms a switching of the DRP ring network, where the first link and the second link can transmit data packets as part of the link of the DRP ring network.
  • the election of the primary switching device can be performed on the DRP ring network.
  • the elected primary switching device re-configures the port status of the corresponding port. This process is prior art. This will not be repeated here.
  • step S230 may specifically include the following steps:
  • the port assigned to the link corresponding to the terminal with the highest priority is identified from the found port, and the identified port is set to be opened. status.
  • priority can be set for each terminal connected to the DRP ring network according to the actual situation.
  • the priorities of different terminals are different. For example, a high priority can be set for a terminal with a small load capacity.
  • the first switching device can identify the port allocated by the link corresponding to the terminal with the highest priority from the found port. And set the identified port to the open state.
  • step S230 may specifically include the following steps:
  • the backup groups corresponding to the discovered ports are sorted in the order of the preset IDs, and the ports corresponding to the first backup group are set to the open state.
  • each backup group has a unique identifier.
  • the backup groups corresponding to the discovered ports can be sorted according to the order of the identifiers from large to small or from small to large, and the first backup group is corresponding.
  • the port is set to open.
  • each of the Industrial Ethernet sites For each Industrial Ethernet site, each of the Industrial Ethernet sites Each terminal can be connected to two switching devices in the industrial Ethernet site.
  • the first switching device in different industrial Ethernet sites is The method provided in this embodiment of the present application can be used to set the port of the corresponding link allocated to the corresponding terminal to an open state to implement redundancy backup of the link.
  • the terminal is not limited.
  • the common HUB port terminal can also implement redundancy backup of the link, which reduces the running cost of the redundant backup of the link.
  • the first switching device can set the corresponding port to the open state without reconfiguring the entire network topology structure, so the process requires a short duration and can meet millisecond switching in industrial applications. Claim.
  • the embodiment of the present application further provides an active/standby link switching device, where the device is applied to a first switching device, and the first switching device and the second switching device are deployed in the same industry.
  • the first switching device and the second switching device are switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal passes the a link is connected to the first switching device, connected to the second switching device by using a second link, and the first link and the second link form a backup group, where the first link In the link and the second link, the second link that is currently in the connected state is the primary link, and the first link that is currently in the disconnected state is the backup link;
  • the device may include The following modules:
  • the fault communication message receiving module 310 is configured to receive the fault communication message, where the fault communication message includes the identifier information of the backup group where the second link that is faulty is located;
  • the identification information of the backup group may include: identifier information of an industrial Ethernet site where the backup group is located, and identifier information of a group where the backup group is located in an industrial Ethernet site; or an industrial Ethernet site where the backup group is located The identification information of the group in which the backup group is located in the industrial Ethernet site and the identification information of the switching device in the group; or the identification information of the terminal corresponding to the backup group.
  • the first port searching module 320 is configured to: when determining that the switching device corresponding to the backup group where the second link is faulty, the corresponding link is recorded for each backup group according to the local configuration information table. The port number of the assigned port to find the corresponding port;
  • the first port opening module 330 is configured to set the found port to an open state, so that the first link connected to the port is in a connected state.
  • the first switching device can determine whether the backup group corresponding to the fault link is exchanged according to the identifier information of the backup group in the fault communication message.
  • the device that is, whether the identification information of the backup group is recorded in the local configuration information, and if yes, the first switching device can find the port allocated to the corresponding link of the same backup group as the faulty link, and The port is set to the open state, so that the link connected to the port can be connected, thereby implementing redundant backup of the link.
  • the terminal is not limited.
  • the common HUB port terminal can also implement redundancy backup of the link, which reduces the running cost of the redundant backup of the link.
  • the first switching device can set the corresponding port to the open state as long as it receives the faulty communication packet, and does not need to reconstruct the entire network topology structure. Therefore, the process requires a short duration and can meet milliseconds in industrial applications. Switching requirements.
  • the embodiment of the present application further provides a link redundancy backup device, where the device is applied to a first switching device, and the first switching device is deployed in the same manner as the second switching device.
  • the first switching device and the second switching device are switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal passes The first link is connected to the first switching device, and is connected to the second switching device by using a second link, where the first link is in an open state, and the second link is in a connected state, and The first link and the second link form a backup group; as shown in FIG. 5, the device may include the following modules:
  • the link state monitoring module 410 is configured to monitor a link state of a DRP ring network link that is connected to the second switching device.
  • the second port searching module 420 is configured to: when it is detected that the DRP ring link connected to the second switching device is faulty, and the duration of the entire DRP ring network is in a fault state reaches a preset threshold, according to the local The port number of the port assigned to the corresponding link for each backup group itself recorded in the configuration information table, and each port in the blocked state is searched;
  • the second port opening module 430 is configured to select a port from the discovered ports, set it to an open state, and enable the first link connected to the port to be in a connected state, to connect the first link and the The second link of the first link in the same backup group is switched to the link in the DRP ring network.
  • the second port opening module 430 may be specifically configured to: according to the priority of each terminal and the port allocated by itself for the link corresponding to each terminal, from the found The port identified in the port as the link corresponding to the terminal with the highest priority, and the identified port is set to the open state.
  • the second port opening module 430 may be specifically configured to: sort the backup groups corresponding to the searched ports according to a preset identifier sequence, and correspond to the first backup group. The port is set to open.
  • the device When the device provided by the embodiment of the present application detects that the DRP ring network link that is connected to the second switching device is faulty, and the length of the DRP ring network is in a fault state reaches a preset threshold, the device can search for a preset threshold. Connect to the blocked port that is assigned to the corresponding link of each backup group, and select one of the discovered ports to set it to the open state. In this way, the link connected to the port can be connected. State, thus enabling redundant backup of the link.
  • the terminal is not limited.
  • the common HUB port terminal can also implement redundancy backup of the link, which reduces the running cost of the redundant backup of the link.
  • the first switching device can set the corresponding port to the open state without reconfiguring the entire network topology structure, so the process requires a short duration and can meet millisecond switching in industrial applications. Claim.
  • an embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is used to perform link redundancy described in the present application at runtime.
  • Backup method The method for implementing link redundancy backup described in the present application includes:
  • an embodiment of the present application further provides an application, where the application is used to perform a link redundancy backup method described in the present application at runtime.
  • the method for implementing link redundancy backup described in the present application includes:
  • the embodiment of the present application further provides a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second device.
  • the switching devices are all switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, through the second chain
  • the second link is connected to the second switching device, the first link is in a disconnected state, the second link is in a connected state, and the first link and the second link form a backup group;
  • the first switching device includes:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
  • an embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is configured to perform one type of active/standby link switching described in the present application at runtime.
  • the method for switching between the active and standby links in the present application includes:
  • the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table.
  • the embodiment of the present application further provides an application, where the application is used to perform a primary and backup link switching method described in the present application at runtime.
  • the method for switching between the active and standby links in the present application includes:
  • the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table.
  • the embodiment of the present application further provides a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second device.
  • the switching devices are all switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, through the second chain
  • the road is connected to the second switching device, and the first link and the second link form a backup group, and the first link and the second link are currently in a connected state.
  • the second link is the primary link, and the first link that is currently in the disconnected state is the backup link.
  • the first switching device includes:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
  • the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Embodiments of the present invention disclose methods and devices for switching between a primary link and backup link and realizing redundancy backup of a link. A method for switching between a primary link and backup link is applied in a first switch, and can comprise the following steps: receiving a failure communication packet; searching, according to port numbers of ports for corresponding links allocated by respective backup groups and recorded in a local configuration information table, for a corresponding port; and configuring the found port to be in an open state, such that a first link connected to the port is in a connected state. A method for realizing redundancy back of a link is applied in the first switch, and can comprise the following steps: monitoring a link state of a DRP ring network link of the first switch, the DRP ring network link being connected to a second switch; searching for all ports in a blocked state; and selecting one port from the found ports to configure the selected port to be in an open state. The technical solutions provided in the embodiments of the present application can be applied to reduce an operating cost of redundancy backup of a link, and satisfy the millisecond level requirement of switching in industrial applications.

Description

一种主备链路切换、实现链路冗余备份方法及装置Master-slave link switching, method and device for implementing link redundancy backup
本申请要求于2015年07月02日提交中国专利局、申请号为201510383324.2发明名称为“一种主备链路切换、实现链路冗余备份方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application entitled "A Master-Slave Link Switching, Link Redundancy Backup Method and Apparatus" submitted by the Chinese Patent Office on July 2, 2015, and the application number is 201510383324.2. The entire contents are incorporated herein by reference.
技术领域Technical field
本申请涉及工业以太网技术领域,特别涉及一种主备链路切换、实现链路冗余备份方法及装置。The present application relates to the field of industrial Ethernet technologies, and in particular, to a method for switching between active and standby links, and a method and device for implementing link redundancy backup.
背景技术Background technique
在现有的DRP(Distributed Redundancy Protocol,分布式冗余协议)环网中,组成DRP环网的每台交换设备都处于平等位置,每台交换设备在固定分配的时间片内维护网络状态,发送网络维护报文,其他交换设备在维护报文上填写当前环端口的网络状态,并转发网络维护报文,在下一个时间片到来后,由该DRP环网中的与该时间片对应的交换设备来维护网络。In the existing DRP (Distributed Redundancy Protocol) ring network, each switching device that constitutes a DRP ring network is in an equal position, and each switching device maintains the network state in a fixed allocated time slice and sends The network maintenance message, the other switching device fills in the network status of the current ring port in the maintenance message, and forwards the network maintenance message. After the next time slice arrives, the switching device corresponding to the time slice in the DRP ring network To maintain the network.
在实际应用中,交换设备可以位于工业以太网站点,如变电站中,并且一个工业以太网站点中可以部署两台交换设备,位于全国范围内的交换设备组成DRP环网。基于用户的需求,位于该工业以太网站点内的不同终端需要连接在该DRP环网中实现数据传输。为了保证数据传输,每个终端连接到DRP环网中构成的网络拓扑结构需要形成链路的冗余备份。In practical applications, the switching equipment can be located in an industrial Ethernet site, such as a substation, and two switching devices can be deployed in one industrial Ethernet site, and the switching devices located nationwide form a DRP ring network. Based on the needs of the user, different terminals located in the industrial Ethernet site need to be connected to implement data transmission in the DRP ring network. In order to ensure data transmission, each terminal connected to the network topology formed in the DRP ring network needs to form a redundant backup of the link.
现有技术在实现冗余备份时,一种方法是,使用双网卡终端通过两条链路分别与同一工业以太网站点中位于DRP环网中的两台交换设备连接,该双网卡终端同时向两台交换设备发送数据报文,这两台交换设备进行协商,由其中一台交换设备进行数据报文的转发,一旦该双网卡终端与交换设备之间的某条链路出现故障,可以使用另一条链路传输数据报文,实现链路的冗余备份。In the prior art, when implementing redundancy backup, one method is to connect two switching devices in the DRP ring network in the same industrial Ethernet site through two links by using two network card terminals, and the dual network card terminals simultaneously The two switching devices send data packets, and the two switching devices negotiate, and one of the switching devices forwards the data packets. Once a link between the dual NIC terminal and the switching device fails, the switch can be used. The other link transmits data packets to implement redundant backup of the link.
另一种方法是,采用支持快速生成树协议(RSTP,Rapid Spanning Tree Protocol)的终端,在DRP环网中的终端与交换设备基于RSTP协议生成网络拓扑,基于RSTP协议实现链路的冗余备份。 Another method is to use a terminal that supports the Rapid Spanning Tree Protocol (RSTP). The terminal and the switching device in the DRP ring network generate a network topology based on the RSTP protocol, and implement redundancy backup of the link based on the RSTP protocol. .
现有的这两种方法所使用的双网卡终端和RSTP终端的成本都较高,增加了链路的冗余备份的成本,低成本的普通的集线器HUB端口终端在这两种方法中均无法使用。另外,采用RSTP终端在链路出现故障时,重新生成网络拓扑的时间将会受DRP环网中包含的交换设备的数量的限制,当DRP环网中包含的交换设备较多时,每台交换设备在其被分配的时间片内完成网络状态维护后,才能实现链路的冗余备份,冗余备份的时间将会达到秒级,无法满足工业应用中毫秒级的切换要求。The dual NIC terminals and RSTP terminals used in the existing two methods have higher costs, which increases the cost of redundant backup of the link, and the low-cost common hub HUB port terminal cannot be used in either method. use. In addition, when the link is faulty, the time for re-generating the network topology of the RSTP terminal will be limited by the number of switching devices included in the DRP ring network. When there are many switching devices included in the DRP ring network, each switching device After the network state maintenance is completed in the allocated time slice, the redundant backup of the link can be realized, and the redundancy backup time will reach the second level, which cannot meet the millisecond switching requirement in industrial applications.
发明内容Summary of the invention
为解决上述问题,本申请实施例公开了一种主备链路切换、实现链路冗余备份方法及装置。技术方案如下:To solve the above problem, the embodiment of the present application discloses a method for switching between active and standby links, and a method and device for implementing link redundancy backup. The technical solutions are as follows:
一种实现链路冗余备份方法,应用于第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,所述第一链路为断开状态,所述第二链路为连通状态,且所述第一链路与所述第二链路构成一个备份组;所述方法包括:A method for implementing a link redundancy backup is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second switching device All of the switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, and through the second link The second switching device is connected, the first link is in a disconnected state, the second link is in a connected state, and the first link and the second link form a backup group; Methods include:
监测自身与所述第二交换设备连接的DRP环网链路的链路状态;Monitoring a link state of a DRP ring network link that is connected to the second switching device;
当监测到自身与所述第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口;When it is detected that the DRP ring network link that is connected to the second switching device is faulty, and the length of the entire DRP ring network is in a fault state reaches a preset threshold, according to the record in the local configuration information table for each backup group The port number of the port that is itself assigned to the corresponding link, and finds each port that is in the blocked state;
从查找到的端口中选择一个端口,将其设置为打开状态,使与该端口连接的第一链路处于连通状态,以将该第一链路及与该第一链路在同一备份组中的第二链路切换为所述DRP环网中的链路。Select a port from the discovered port, set it to the open state, and connect the first link connected to the port to connect the first link and the first link in the same backup group. The second link is switched to the link in the DRP ring network.
在本申请的一种具体实施方式中,所述从查找到的端口中选择一个端口,将其设置为打开状态,包括:In a specific implementation manner of the present application, the selecting one port from the discovered ports and setting it to an open state includes:
根据每个终端的优先级及自身为每个终端对应的链路分配的端口,从查 找到的端口中识别为优先级最高的终端对应的链路分配的端口,将识别到的端口设置为打开状态。According to the priority of each terminal and the port assigned to the link corresponding to each terminal, check The port identified as the link corresponding to the terminal with the highest priority among the found ports, and the identified port is set to the open state.
在本申请的一种具体实施方式中,所述从查找到的端口中选择一个端口,将其设置为打开状态,包括:In a specific implementation manner of the present application, the selecting one port from the discovered ports and setting it to an open state includes:
将查找到的端口对应的备份组按照预设标识顺序进行排序,将第一个备份组对应的端口设置为打开状态。The backup groups corresponding to the discovered ports are sorted in the order of the preset IDs, and the ports corresponding to the first backup group are set to the open state.
一种主备链路切换方法,应用于第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,且所述第一链路与所述第二链路构成一个备份组,在所述第一链路和所述第二链路中,当前处于连通状态的第二链路为主链路,当前处于断开状态的第一链路为备份链路;所述方法包括:An active/standby link switching method is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, where the first switching device and the second switching device are both a switching device in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, and through the second link The second switching device is connected, and the first link and the second link form a backup group, and the second link that is currently in a connected state in the first link and the second link The primary link is the primary link, and the first link that is currently in the disconnected state is the backup link. The method includes:
接收故障通讯报文,所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息;Receiving a fault communication message, where the fault communication message includes the identification information of the backup group where the second link that is faulty is located;
当确定自身为所述出现故障的第二链路所在的备份组对应的交换设备时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找对应的端口;When it is determined that it is the switching device corresponding to the backup group where the second link that is faulty is located, the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table. Port
将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通状态。Set the discovered port to the open state, so that the first link connected to the port is connected.
在本申请的一种具体实施方式中,所述备份组的标识信息包括:所述备份组所在工业以太网站点的标识信息和所述备份组位于工业以太网站点中所在组的标识信息;或,所述备份组所在工业以太网站点的标识信息、所述备份组位于工业以太网站点中所在组的标识信息以及该组中交换设备的标识信息;或,所述备份组对应的终端的标识信息。In an embodiment of the present application, the identifier information of the backup group includes: identifier information of an industrial Ethernet station where the backup group is located, and identifier information of a group where the backup group is located in an industrial Ethernet site; or The identification information of the industrial Ethernet site where the backup group is located, the identification information of the group where the backup group is located in the industrial Ethernet site, and the identification information of the switching device in the group; or the identifier of the terminal corresponding to the backup group information.
一种实现链路冗余备份装置,应用于第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太 网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,所述第一链路为断开状态,所述第二链路为连通状态,且所述第一链路与所述第二链路构成一个备份组;所述装置包括:A link redundancy backup device is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second switching device All are switching devices in the same distributed redundancy protocol DRP ring network; a terminal in the website, the terminal is connected to the first switching device by using a first link, and is connected to the second switching device by using a second link, where the first link is in a disconnected state. The second link is in a connected state, and the first link and the second link form a backup group; the device includes:
链路状态监测模块,用于监测自身与所述第二交换设备连接的DRP环网链路的链路状态;a link state monitoring module, configured to monitor a link state of a DRP ring network link that is connected to the second switching device;
第二端口查找模块,用于当监测到自身与所述第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口;a second port search module, configured to: when it is detected that the DRP ring link connected to the second switching device is faulty, and the duration of the entire DRP ring network is in a fault state reaches a preset threshold, according to the local configuration information table Find the port number of the port assigned to the corresponding link for each backup group itself, and find each port that is in the blocked state;
第二端口打开模块,用于从查找到的端口中选择一个端口,将其设置为打开状态,使与该端口连接的第一链路处于连通状态,以将该第一链路及与该第一链路在同一备份组中的第二链路切换为所述DRP环网中的链路。a second port opening module, configured to select a port from the discovered ports, set it to an open state, and connect the first link connected to the port to connect the first link and the first The second link of a link in the same backup group is switched to the link in the DRP ring network.
在本申请的一种具体实施方式中,所述第二端口打开模块,具体用于:In a specific implementation manner of the application, the second port opening module is specifically configured to:
根据每个终端的优先级及自身为每个终端对应的链路分配的端口,从查找到的端口中识别为优先级最高的终端对应的链路分配的端口,将识别到的端口设置为打开状态。According to the priority of each terminal and the port assigned to the link corresponding to each terminal, the port assigned to the link corresponding to the terminal with the highest priority is identified from the found port, and the identified port is set to be opened. status.
在本申请的一种具体实施方式中,所述第二端口打开模块,具体用于:In a specific implementation manner of the application, the second port opening module is specifically configured to:
将查找到的端口对应的备份组按照预设标识顺序进行排序,将第一个备份组对应的端口设置为打开状态。The backup groups corresponding to the discovered ports are sorted in the order of the preset IDs, and the ports corresponding to the first backup group are set to the open state.
一种主备链路切换装置,应用于第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,且所述第一链路与所述第二链路构成一个备份组,在所述第一链路和所述第二链路中,当前处于连通状态的第二链路为主链路,当前处于断开状态的第一链路为备份链路;所述装置包括: An active/standby link switching device is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, where the first switching device and the second switching device are both a switching device in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, and through the second link The second switching device is connected, and the first link and the second link form a backup group, and the second link that is currently in a connected state in the first link and the second link The primary link is the primary link, and the first link that is currently in the disconnected state is the backup link; the device includes:
故障通讯报文接收模块,用于接收故障通讯报文,所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息;The fault communication message receiving module is configured to receive the fault communication message, where the fault communication message includes the identification information of the backup group where the second link that is faulty is located;
第一端口查找模块,用于当确定自身为所述出现故障的第二链路所在的备份组对应的交换设备时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找对应的端口;The first port searching module is configured to allocate, according to the local configuration information table, the corresponding link for each backup group according to the switching device corresponding to the backup group where the second link that is faulty is located. Port number of the port, find the corresponding port;
第一端口打开模块,用于将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通状态。The first port open module is configured to set the found port to an open state, so that the first link connected to the port is in a connected state.
在本申请的一种具体实施方式中,所述备份组的标识信息包括:所述备份组所在工业以太网站点的标识信息和所述备份组位于工业以太网站点中所在组的标识信息;或,所述备份组所在工业以太网站点的标识信息、所述备份组位于工业以太网站点中所在组的标识信息以及该组中交换设备的标识信息;或,所述备份组对应的终端的标识信息。In an embodiment of the present application, the identifier information of the backup group includes: identifier information of an industrial Ethernet station where the backup group is located, and identifier information of a group where the backup group is located in an industrial Ethernet site; or The identification information of the industrial Ethernet site where the backup group is located, the identification information of the group where the backup group is located in the industrial Ethernet site, and the identification information of the switching device in the group; or the identifier of the terminal corresponding to the backup group information.
应用本申请实施例所提供的技术方案,第一交换设备接收到故障通讯报文后,根据故障通讯报文中的备份组的标识信息,可以确定自身是否为故障链路所在的备份组对应的交换设备,也就是判断本地配置信息中是否记录有该备份组的标识信息,在是的情况下,第一交换设备可以查找到自身分配给与故障链路在同一备份组的相应链路的端口,并将该端口设置为打开状态,这样,可以使与该端口连接的链路处于连通状态,或者,第一交换设备监测到自身与第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,可以查找到自身为每个备份组的相应链路分配的处于阻塞状态的端口,并从查找到的端口中选择一个端口,将其设置为打开状态,这样,可以使与该端口连接的链路处于连通状态,从而实现链路的冗余备份。本申请实施例中对终端不做限制,使用普通的HUB端口终端也可以实现链路的冗余备份,降低了链路的冗余备份的运行成本。另外,第一交换设备只要接收故障通讯报文或者满足端口打开条件,即可将相应端口设置为打开状态,无需进行全网拓扑结构的重构,因此该过程需要的时长较短,可以满足工业应用中毫秒级的切换要求。With the technical solution provided by the embodiment of the present application, after receiving the fault communication message, the first switching device can determine whether it is the backup group where the faulty link is located, according to the identifier information of the backup group in the fault communication message. The switching device determines whether the identification information of the backup group is recorded in the local configuration information. If yes, the first switching device can find the port that is allocated to the corresponding link of the same backup group as the faulty link. And setting the port to an open state, so that the link connected to the port is in a connected state, or the first switching device detects that the DRP ring link connected to the second switching device is faulty, and When the duration of the faulty state of the entire DRP ring network reaches the preset threshold, you can find the blocked port that is assigned to the corresponding link of each backup group, and select a port from the discovered ports to set it. In the open state, the link connected to the port can be connected, thereby implementing redundant backup of the link. In the embodiment of the present application, the terminal is not limited. The common HUB port terminal can also implement redundancy backup of the link, which reduces the running cost of the redundant backup of the link. In addition, the first switching device can set the corresponding port to the open state as long as it receives the fault communication message or meets the port open condition, and does not need to reconstruct the entire network topology structure. Therefore, the process requires a short duration and can meet the industrial requirement. The millisecond level of switching requirements in the application.
为了实现上述目的,本申请实施例还提供了一种存储介质,其中,该存储介质用于存储应用程序,所述应用程序用于在运行时执行本申请所述的一 种实现链路冗余备份方法。其中,本申请所述的一种实现链路冗余备份方法,包括:In order to achieve the above object, an embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is configured to execute one of the applications described in the present application at runtime. A method for implementing link redundancy backup. The method for implementing link redundancy backup described in the present application includes:
监测自身与所述第二交换设备连接的DRP环网链路的链路状态;Monitoring a link state of a DRP ring network link that is connected to the second switching device;
当监测到自身与所述第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口;When it is detected that the DRP ring network link that is connected to the second switching device is faulty, and the length of the entire DRP ring network is in a fault state reaches a preset threshold, according to the record in the local configuration information table for each backup group The port number of the port that is itself assigned to the corresponding link, and finds each port that is in the blocked state;
从查找到的端口中选择一个端口,将其设置为打开状态,使与该端口连接的第一链路处于连通状态,以将该第一链路及与该第一链路在同一备份组中的第二链路切换为所述DRP环网中的链路。Select a port from the discovered port, set it to the open state, and connect the first link connected to the port to connect the first link and the first link in the same backup group. The second link is switched to the link in the DRP ring network.
为了实现上述目的,本申请实施例还提供了一种应用程序,其中,该应用程序用于在运行时执行本申请所述的一种实现链路冗余备份方法。其中,本申请所述的一种实现链路冗余备份方法,包括:In order to achieve the above object, an embodiment of the present application further provides an application, where the application is used to perform a link redundancy backup method described in the present application at runtime. The method for implementing link redundancy backup described in the present application includes:
监测自身与所述第二交换设备连接的DRP环网链路的链路状态;Monitoring a link state of a DRP ring network link that is connected to the second switching device;
当监测到自身与所述第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口;When it is detected that the DRP ring network link that is connected to the second switching device is faulty, and the length of the entire DRP ring network is in a fault state reaches a preset threshold, according to the record in the local configuration information table for each backup group The port number of the port that is itself assigned to the corresponding link, and finds each port that is in the blocked state;
从查找到的端口中选择一个端口,将其设置为打开状态,使与该端口连接的第一链路处于连通状态,以将该第一链路及与该第一链路在同一备份组中的第二链路切换为所述DRP环网中的链路。Select a port from the discovered port, set it to the open state, and connect the first link connected to the port to connect the first link and the first link in the same backup group. The second link is switched to the link in the DRP ring network.
为了实现上述目的,本申请实施例还提供了一种第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,所述第一链路为断开状态,所述第二链路为连通状态,且所述第一链路与所述第二链路构成一个备份组; In order to achieve the above object, the embodiment of the present application further provides a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second device. The switching devices are all switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, through the second chain The second link is connected to the second switching device, the first link is in a disconnected state, the second link is in a connected state, and the first link and the second link form a backup group;
所述第一交换设备包括:The first switching device includes:
处理器、存储器、通信接口和总线;a processor, a memory, a communication interface, and a bus;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;The processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
所述存储器存储可执行程序代码;The memory stores executable program code;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:The processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
监测自身与所述第二交换设备连接的DRP环网链路的链路状态;Monitoring a link state of a DRP ring network link that is connected to the second switching device;
当监测到自身与所述第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口;When it is detected that the DRP ring network link that is connected to the second switching device is faulty, and the length of the entire DRP ring network is in a fault state reaches a preset threshold, according to the record in the local configuration information table for each backup group The port number of the port that is itself assigned to the corresponding link, and finds each port that is in the blocked state;
从查找到的端口中选择一个端口,将其设置为打开状态,使与该端口连接的第一链路处于连通状态,以将该第一链路及与该第一链路在同一备份组中的第二链路切换为所述DRP环网中的链路。Select a port from the discovered port, set it to the open state, and connect the first link connected to the port to connect the first link and the first link in the same backup group. The second link is switched to the link in the DRP ring network.
为了实现上述目的,本申请实施例还提供了一种存储介质,其中,该存储介质用于存储应用程序,所述应用程序用于在运行时执行本申请所述的一种主备链路切换方法。其中,本申请所述的一种主备链路切换方法,包括:In order to achieve the above object, an embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is configured to perform one type of active/standby link switching described in the present application at runtime. method. The method for switching between the active and standby links in the present application includes:
接收故障通讯报文,所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息;Receiving a fault communication message, where the fault communication message includes the identification information of the backup group where the second link that is faulty is located;
当确定自身为所述出现故障的第二链路所在的备份组对应的交换设备时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找对应的端口;When it is determined that it is the switching device corresponding to the backup group where the second link that is faulty is located, the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table. Port
将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通状态。Set the discovered port to the open state, so that the first link connected to the port is connected.
为了实现上述目的,本申请实施例还提供了一种应用程序,其中,该应 用程序用于在运行时执行本申请所述的一种主备链路切换方法。其中,本申请所述的一种主备链路切换方法,包括:In order to achieve the above object, an embodiment of the present application further provides an application, where The program is used to perform a primary and backup link switching method described in the present application at runtime. The method for switching between the active and standby links in the present application includes:
接收故障通讯报文,所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息;Receiving a fault communication message, where the fault communication message includes the identification information of the backup group where the second link that is faulty is located;
当确定自身为所述出现故障的第二链路所在的备份组对应的交换设备时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找对应的端口;When it is determined that it is the switching device corresponding to the backup group where the second link that is faulty is located, the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table. Port
将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通状态。Set the discovered port to the open state, so that the first link connected to the port is connected.
为了实现上述目的,本申请实施例还提供了一种第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,且所述第一链路与所述第二链路构成一个备份组,在所述第一链路和所述第二链路中,当前处于连通状态的第二链路为主链路,当前处于断开状态的第一链路为备份链路;In order to achieve the above object, the embodiment of the present application further provides a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second device. The switching devices are all switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, through the second chain The road is connected to the second switching device, and the first link and the second link form a backup group, and the first link and the second link are currently in a connected state. The second link is the primary link, and the first link that is currently in the disconnected state is the backup link.
所述第一交换设备包括:The first switching device includes:
处理器、存储器、通信接口和总线;a processor, a memory, a communication interface, and a bus;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;The processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
所述存储器存储可执行程序代码;The memory stores executable program code;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:The processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
接收故障通讯报文,所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息;Receiving a fault communication message, where the fault communication message includes the identification information of the backup group where the second link that is faulty is located;
当确定自身为所述出现故障的第二链路所在的备份组对应的交换设备时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端 口的端口号,查找对应的端口;When it is determined that it is the switching device corresponding to the backup group where the second link that is faulty is located, the end allocated for the corresponding link for each backup group itself is recorded according to the local configuration information table. Port number of the port, find the corresponding port;
将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通状态。Set the discovered port to the open state, so that the first link connected to the port is connected.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative work for those skilled in the art.
图1为本申请实施例中DRP环网示意图;1 is a schematic diagram of a DRP ring network in an embodiment of the present application;
图2为本申请实施例中主备链路切换方法的一种实施流程图;2 is a flowchart of an implementation of a method for switching between a primary and backup link in an embodiment of the present application;
图3为本申请实施例中实现链路冗余备份方法的一种实施流程图;FIG. 3 is a flowchart of an implementation of a method for implementing link redundancy backup according to an embodiment of the present application;
图4为本申请实施例中主备链路切换装置的一种结构示意图;4 is a schematic structural diagram of an active/standby link switching apparatus according to an embodiment of the present application;
图5为本申请实施例中实现链路冗余备份装置的一种结构示意图。FIG. 5 is a schematic structural diagram of a device for implementing link redundancy backup in the embodiment of the present application.
具体实施方式detailed description
首先对本申请实施例所提供的一种主备链路切换方法进行说明,该方法可以包括以下步骤:An active/standby link switching method provided by the embodiment of the present application is described. The method may include the following steps:
接收故障通讯报文,所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息;Receiving a fault communication message, where the fault communication message includes the identification information of the backup group where the second link that is faulty is located;
当确定自身为所述出现故障的第二链路所在的备份组对应的交换设备时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找对应的端口;When it is determined that it is the switching device corresponding to the backup group where the second link that is faulty is located, the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table. Port
将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通状态。Set the discovered port to the open state, so that the first link connected to the port is connected.
上述步骤的执行主体为第一交换设备。该第一交换设备与第二交换设备部署于同一工业以太网站点,如变电站中,该第一交换设备和该第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中 的每个终端,该终端通过第一链路与第一交换设备连接,通过第二链路与第二交换设备连接,且第一链路与第二链路构成一个备份组,在第一链路和第二链路中,当前处于连通状态的第二链路为主链路,当前处于断开状态的第一链路为备份链路。本申请实施例以工业以太网站点为变电站为例进行说明。The execution body of the above steps is the first switching device. The first switching device and the second switching device are deployed in the same industrial Ethernet site, such as a substation, and the first switching device and the second switching device are switching devices in the same distributed redundancy protocol DRP ring network; In the Industrial Ethernet site Each terminal, the terminal is connected to the first switching device through the first link, and is connected to the second switching device through the second link, and the first link and the second link form a backup group, in the first chain. In the second link, the second link that is currently in the connected state is the primary link, and the first link that is currently in the disconnected state is the backup link. The embodiment of the present application is described by taking an industrial Ethernet station as a substation as an example.
参见图1所示,在一个全国范围的DRP环网中,共有四台交换设备,分别为:SW1、SW2、SW3和SW4。其中,SW2和SW3部署于第一变电站中,SW1和SW4部署于第二变电站中。在第一变电站中,与SW2和SW3具有链路连接关系的终端共有3个,终端H1、终端H2和终端H3。对于每个终端来说,当前处于连通状态的链路为主链路,当前处于断开状态的链路为备份链路。也就是说对于不同的终端,本申请实施例中的第一交换设备可能是不同的。比如,对于终端H1来说,如果其与SW2连接的链路为连通状态,与SW3连接的链路为断开状态,则SW2为第二交换设备,SW3为第一交换设备;对于终端H2来说,如果其与SW2连接的链路为断开状态,与SW3连接的链路为打开状态,则SW2为第一交换设备,SW3为第二交换设备。终端H1对应的两条链路构成第一备份组,终端H2对应的两条链路构成第二备份组,终端H3对应的两条链路构成第三备份组。需要说明的是,同一变电站中的终端数量可以根据实际情况进行调整,本申请实施例对此不做限制。Referring to Figure 1, in a nationwide DRP ring network, there are four switching devices: SW1, SW2, SW3, and SW4. Among them, SW2 and SW3 are deployed in the first substation, and SW1 and SW4 are deployed in the second substation. In the first substation, there are three terminals having a link connection relationship with SW2 and SW3, and the terminal H1, the terminal H2, and the terminal H3. For each terminal, the link that is currently connected is the primary link, and the link that is currently disconnected is the backup link. That is to say, the first switching device in the embodiment of the present application may be different for different terminals. For example, for the terminal H1, if the link connected to the SW2 is in the connected state, and the link connected to the SW3 is in the disconnected state, the SW2 is the second switching device, and the SW3 is the first switching device; It is said that if the link connected to SW2 is in the disconnected state and the link connected to SW3 is in the open state, SW2 is the first switching device, and SW3 is the second switching device. The two links corresponding to the terminal H1 form a first backup group, the two links corresponding to the terminal H2 form a second backup group, and the two links corresponding to the terminal H3 form a third backup group. It should be noted that the number of terminals in the same substation can be adjusted according to the actual situation, and the embodiment of the present application does not limit this.
当交换设备与终端之间的链路发生故障时,相应的交换设备将向DRP环网中的其他交换设备发送故障通讯报文,故障通讯报文中包含有故障链路所在的备份组的标识信息。第一交换设备接收到故障通讯报文后,根据故障通讯报文中的备份组的标识信息,可以确定自身是否为该出现故障的第二链路所在的备份组对应的交换设备,如果是,则可以根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找到分配给与该出现故障的第二链路在同一备份组中的链路的端口,并将该端口设置为打开状态,以使该端口连接的第一链路为连通状态,实现主备链路的切换。When the link between the switching device and the terminal fails, the corresponding switching device sends a fault communication packet to the other switching device in the DRP ring network. The fault communication packet contains the identifier of the backup group where the faulty link is located. information. After receiving the fault communication message, the first switching device can determine whether it is the switching device corresponding to the backup group where the second link is faulty according to the identifier information of the backup group in the fault communication message. If yes, Then, according to the port number of the port allocated for the corresponding link for each backup group itself recorded in the local configuration information table, the port allocated to the link in the same backup group as the failed second link can be found. And setting the port to the open state, so that the first link connected to the port is in a connected state, and the switching between the active and standby links is implemented.
应用本申请实施例所提供的技术方案,第一交换设备接收到故障通讯报文后,根据故障通讯报文中的备份组的标识信息,可以确定自身是否为故障链路所在的备份组对应的交换设备,也就是判断本地配置信息中是否记录有该备份组的标识信息,在是的情况下,第一交换设备可以查找到自身分配给与故障链路在同一备份组的相应链路的端口,并将该端口设置为打开状态, 这样,可以使与该端口连接的链路处于连通状态,从而实现链路的冗余备份。本申请实施例中对终端不做限制,使用普通的HUB端口终端也可以实现链路的冗余备份,降低了链路的冗余备份的运行成本。另外,第一交换设备只要接收故障通讯报文,即可将相应端口设置为打开状态,无需进行全网拓扑结构的重构,因此该过程需要的时长较短,可以满足工业应用中毫秒级的切换要求。With the technical solution provided by the embodiment of the present application, after receiving the fault communication message, the first switching device can determine whether it is the backup group where the faulty link is located, according to the identifier information of the backup group in the fault communication message. The switching device determines whether the identification information of the backup group is recorded in the local configuration information. If yes, the first switching device can find the port that is allocated to the corresponding link of the same backup group as the faulty link. And set the port to open. In this way, the link connected to the port can be connected, thereby implementing redundant backup of the link. In the embodiment of the present application, the terminal is not limited. The common HUB port terminal can also implement redundancy backup of the link, which reduces the running cost of the redundant backup of the link. In addition, the first switching device can set the corresponding port to the open state as long as it receives the faulty communication packet, and does not need to reconstruct the entire network topology structure. Therefore, the process requires a short duration and can meet milliseconds in industrial applications. Switching requirements.
为了使本领域技术人员更好地理解本申请实施例中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following, in which the technical solutions in the embodiments of the present application are clearly and completely described. The embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
本申请实施例提供了一种主备链路切换方法,该方法应用于第一交换设备,该第一交换设备与第二交换设备部署于同一工业以太网站点中,第一交换设备和第二交换设备均为同一DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与第一交换设备连接,通过第二链路与第二交换设备连接,且第一链路与第二链路构成一个备份组,在第一链路和第二链路中,当前处于连通状态的第二链路为主链路,当前处于断开状态的第一链路为备份链路;参见图2所示,为该方法的一种实施流程图,该方法可以包括以下步骤:The embodiment of the present application provides a method for switching between the active and standby links, where the method is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second device. The switching devices are all switching devices in the same DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, and is connected to the second switching device through the second link. And the first link and the second link form a backup group. In the first link and the second link, the second link that is currently in the connected state is the primary link, and the first link is currently in the disconnected state. The link is a backup link; as shown in FIG. 2, which is an implementation flowchart of the method, the method may include the following steps:
S110:接收故障通讯报文。S110: Receive a fault communication message.
所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息。在实际应用中,工业以太网站点中的每个终端与DRP环网中该工业以太网站点中的两台交换设备通过链路连接,其中一条链路为连通状态的主链路,另一条链路为断开状态的备份链路,每个终端通过其主链路发送数据报文。The fault communication message includes the identifier information of the backup group where the second link that is faulty is located. In practical applications, each terminal in the industrial Ethernet site is connected to two switching devices in the industrial Ethernet site in the DRP ring network through a link, one of which is the main link in the connected state, and the other chain The road is a backup link in the disconnected state, and each terminal sends a data packet through its primary link.
当DRP环网中的交换设备与终端之间的链路发生故障时,相应的交换设备可以通过广播或组播方式,向DRP环网中的其他交换设备发送故障通讯报文。故障通讯报文中可以包含故障链路所在的备份组的标识信息。在一个DRP环网中,通过备份组的标识信息可以唯一确定一个备份组。需要说明的是,故障链路即为出现故障的第一链路。 When the link between the switching device and the terminal in the DRP ring network fails, the corresponding switching device can send fault communication packets to other switching devices in the DRP ring network through broadcast or multicast. The fault communication packet can contain the identification information of the backup group where the faulty link is located. In a DRP ring network, a backup group can be uniquely identified by the identification information of the backup group. It should be noted that the faulty link is the first link that fails.
在本申请的一种具体实施方式中,所述备份组的标识信息可以包括:所述备份组所在工业以太网站点的标识信息和所述备份组位于工业以太网站点中所在组的标识信息;或,所述备份组所在工业以太网站点的标识信息、所述备份组位于工业以太网站点中所在组的标识信息以及该组中交换设备的标识信息;或,所述备份组对应的终端的标识信息。In an embodiment of the present application, the identifier information of the backup group may include: identifier information of an industrial Ethernet station where the backup group is located, and identifier information of a group where the backup group is located in an industrial Ethernet site; Or the identification information of the industrial Ethernet site where the backup group is located, the identification information of the group where the backup group is located in the industrial Ethernet site, and the identification information of the switching device in the group; or the terminal corresponding to the backup group Identification information.
需要说明的是,备份组的标识信息并不限于上述提到的这些信息,还可以通过一定的编码方法为DRP环网中的每个备份组确定唯一一个标识信息,本申请实施例对此不做限制。It should be noted that the identification information of the backup group is not limited to the above-mentioned information, and a unique coding information may be used to determine a unique identification information for each backup group in the DRP ring network. Make restrictions.
第一交换设备接收到故障通讯报文后,可以从该故障通讯报文中解析出故障链路所在的备份组的标识信息,在第一交换设备本地配置信息表中可以记录相对应的备份组的标识信息,通过查询配置信息表,第一交换设备可以确定自身是否为该故障链路所在的备份组对应的交换设备。如果配置信息表中记录有故障链路所在的备份组的标识信息,则表明第一交换设备为故障链路所在的备份组对应的交换设备。After receiving the fault communication message, the first switching device can resolve the identification information of the backup group where the faulty link is located from the fault communication message, and record the corresponding backup group in the local configuration information table of the first switching device. The identification information is obtained by querying the configuration information table, and the first switching device can determine whether it is the switching device corresponding to the backup group where the faulty link is located. If the information about the VRRP group with the faulty link is recorded in the configuration information table, the first switching device is the switching device corresponding to the VRRP group where the faulty link resides.
为方便理解,举例说明。比如,图1中的SW2检测到SW2与终端H1连接的主链路发生故障,SW2可以向DRP环网中的其他交换设备发送故障通讯报文,该故障通讯报文中包含SW2与终端H1连接的链路所在的备份组的标识信息,即第一备份组的标识信息,对于终端H1来说,SW3为本申请实施例中的第一交换设备,SW3接收到故障通讯报文后,解析得到故障链路所在的备份组为第一备份组,查询本地配置信息表中记录有第一备份组的标识信息,则根据第一备份组的标识信息,SW3可以确定自身为该第一备份组对应的交换设备。For ease of understanding, an example is given. For example, SW2 in FIG. 1 detects that the main link connecting SW2 and terminal H1 is faulty, and SW2 can send a fault communication message to other switching devices in the DRP ring network, and the fault communication message includes SW2 and terminal H1. For the terminal H1, the SW3 is the first switching device in the embodiment of the present application, and the SW3 receives the faulty communication packet and parses the identifier of the VRRP group. The backup group where the faulty link is located is the first backup group. If the information about the first backup group is recorded in the local configuration information table, the SW3 can determine that it is the first backup group. Switching equipment.
当第一交换设备确定自身为该出现故障的第二链路所在的备份组对应的交换设备时,可以继续执行步骤S120的操作。When the first switching device determines that it is the switching device corresponding to the backup group where the second link that is faulty is located, the operation of step S120 may be continued.
S120:根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找对应的端口。S120: Search for the corresponding port according to the port number of the port allocated for the corresponding link for each backup group itself recorded in the local configuration information table.
在一个工业以太网站点,如变电站中,如果该工业以太网站点中的终端要与该工业以太网站点中的交换设备进行链路连接,需要相应的交换设备为相应终端的相应链路分配端口。比如,图1中SW2可以为终端H1分配端口1、为 终端H2分配端口2、为终端H3分配端口3,同样,SW3可以为终端H1分配端口1、为终端H2分配端口2、为终端H3分配端口3。当然,具体的端口分配规则可以根据具体情况进行设置和调整。In an industrial Ethernet site, such as a substation, if a terminal in the Industrial Ethernet site is to be connected to a switching device in the Industrial Ethernet site, a corresponding switching device is required to assign a port to the corresponding link of the corresponding terminal. . For example, SW2 in Figure 1 can assign port 1 to terminal H1. Terminal H2 allocates port 2, and assigns port 3 to terminal H3. Similarly, SW3 can assign port 1 to terminal H1, port 2 to terminal H2, and port 3 to terminal H3. Of course, specific port assignment rules can be set and adjusted according to specific conditions.
该工业以太网站点中的终端与交换设备进行链路的配置后,可以在相应的交换设备中保存配置信息表。以上例为例,SW3中保存的配置信息表可以如表1所示。After the terminal in the industrial Ethernet site performs the link configuration with the switching device, the configuration information table can be saved in the corresponding switching device. For example, the configuration information table saved in SW3 can be as shown in Table 1.
备份组的标识信息Backup group identification information 端口号The port number
第一备份组的标识信息Identification information of the first backup group 11
第二备份组的标识信息Identification information of the second backup group 22
第三备份组的标识信息Identification information of the third backup group 33
表1Table 1
需要说明的是,表1仅示出了配置信息表中备份组的标识信息和端口号,在实际应用中,配置信息表中还可以保存其他更多的信息,如第二交换设备的标识信息、第二交换设备分配给各终端相应链路的端口号等。It should be noted that Table 1 only shows the identification information and port number of the backup group in the configuration information table. In the actual application, the configuration information table can also store other more information, such as the identification information of the second switching device. The port number assigned by the second switching device to the corresponding link of each terminal.
第一交换设备根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找分配给与该故障链路在同一备份组中的链路的端口。比如,故障链路为SW2与终端H1之间的链路,SW3接收到的故障通讯报文中包含第一备份组的标识信息,SW3在本地配置信息表中查询与第一备份组的标识信息对应的端口号为1,该端口即为SW3为与故障链路在同一备份组中的链路分配的端口。The first switching device searches for a port assigned to the link in the same backup group as the failed link according to the port number of the port allocated for the corresponding link for each backup group itself recorded in the local configuration information table. For example, the faulty link is the link between the SW2 and the terminal H1, and the fault communication message received by the SW3 includes the identifier information of the first backup group, and the SW3 queries the local configuration information table to identify the identifier information of the first backup group. The corresponding port number is 1. This port is the port that SW3 is assigned to the link in the same backup group as the faulty link.
S130:将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通状态。S130: Set the found port to an open state, so that the first link connected to the port is in a connected state.
在步骤S120,第一交换设备查找到分配给与该故障链路在同一备份组中的链路的端口后,可以将该端口设置为打开状态,以使得与该端口连接的链路处于连通状态,实现主备链路的切换。比如,故障链路为SW2与终端H1之间的链路,SW3为该故障链路所在的备份组对应的交换设备,SW3将自身分配给终端H1的链路的端口设置为打开状态,可以使SW3与终端H1之间的链路处于连 通状态,终端H1发送的数据报文将通过SW3与终端H1之间的链路进行传输。After the first switching device finds the port assigned to the link in the same backup group as the faulty link, the port may be set to an open state, so that the link connected to the port is in a connected state. To switch between the active and standby links. For example, the faulty link is the link between the SW2 and the terminal H1, the SW3 is the switching device corresponding to the backup group where the faulty link is located, and the SW3 sets the port of the link assigned to the terminal H1 to the open state, which can enable The link between SW3 and terminal H1 is connected. In the pass state, the data packet sent by the terminal H1 is transmitted through the link between the SW3 and the terminal H1.
应用本申请实施例所提供的技术方案,第一交换设备接收到故障通讯报文后,根据故障通讯报文中的备份组的标识信息,可以确定自身是否为故障链路所在的备份组对应的交换设备,也就是判断本地配置信息中是否记录有该备份组的标识信息,在是的情况下,第一交换设备可以查找到分配给与故障链路在同一备份组的相应链路的端口,并将该端口设置为打开状态,这样,可以使与该端口连接的链路处于连通状态,从而实现链路的冗余备份。本申请实施例中对终端不做限制,使用普通的HUB端口终端也可以实现链路的冗余备份,降低了链路的冗余备份的运行成本。另外,第一交换设备只要接收故障通讯报文,即可将相应端口设置为打开状态,无需进行全网拓扑结构的重构,因此该过程需要的时长较短,可以满足工业应用中毫秒级的切换要求。With the technical solution provided by the embodiment of the present application, after receiving the fault communication message, the first switching device can determine whether it is the backup group where the faulty link is located, according to the identifier information of the backup group in the fault communication message. The switching device determines whether the identification information of the backup group is recorded in the local configuration information. If yes, the first switching device can find the port allocated to the corresponding link of the same backup group as the faulty link. The port is set to the open state, so that the link connected to the port can be connected, thereby implementing redundant backup of the link. In the embodiment of the present application, the terminal is not limited. The common HUB port terminal can also implement redundancy backup of the link, which reduces the running cost of the redundant backup of the link. In addition, the first switching device can set the corresponding port to the open state as long as it receives the faulty communication packet, and does not need to reconstruct the entire network topology structure. Therefore, the process requires a short duration and can meet milliseconds in industrial applications. Switching requirements.
在DRP环网中,不只是交换设备和终端之间的链路可能发生故障,各交换设备之间的DRP环网链路也可能发生故障。如果在DRP环网中,各交换设备支持RSTP协议,当DRP环网的某两台交换设备之间的链路出现一处故障时,可以通过打开预先配置的处于阻塞状态的端口的方式,实现链路的冗余备份。但是,如果有至少两条DRP环网链路出现故障时,如果要实现链路的冗余备份,可以应用本申请实施例所提供的实现链路冗余备份方法。In a DRP ring network, not only the link between the switching device and the terminal may be faulty, but also the DRP ring link between the switching devices may be faulty. If the switching device supports the RSTP protocol in the DRP ring network, when a fault occurs on the link between two switching devices on the DRP ring network, you can enable the pre-configured port in the blocked state. Redundant backup of the link. However, if there are at least two DRP ring network links, if the redundancy backup of the link is to be implemented, the link redundancy backup method provided by the embodiment of the present application may be applied.
该方法应用于第一交换设备,该第一交换设备与第二交换设备部署于同一工业以太网站点中,该第一交换设备和该第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与该第一交换设备连接,通过第二链路与该第二交换设备连接,第一链路为断开状态,第二链路为连通状态,且该第一链路与该第二链路构成一个备份组。The method is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, and the first switching device and the second switching device are both the same distributed redundancy protocol DRP ring network. a switching device in the medium; the terminal is connected to the first switching device by using the first link, and is connected to the second switching device by using the second link, where the first link is In the disconnected state, the second link is in a connected state, and the first link and the second link form a backup group.
参见图3所示,为本申请实施例所提供的实现链路冗余备份方法的一种实施流程图,该方法可以包括以下步骤:As shown in FIG. 3, an implementation flowchart of a method for implementing link redundancy backup provided by an embodiment of the present application may include the following steps:
S210:监测自身与所述第二交换设备连接的DRP环网链路的链路状态。S210: Monitor a link state of a DRP ring network link that is connected to the second switching device.
为保证整个DRP环网的正常通信,第一交换设备可以实时监测自身与第二交换设备连接的DRP环网链路的链路状态。如果监测到该DRP环网链路出现故 障,可以继续执行步骤S220的操作。To ensure normal communication of the entire DRP ring network, the first switching device can monitor the link state of the DRP ring network link that is connected to the second switching device in real time. If the DRP ring link is detected, The operation of step S220 can be continued.
S220:当监测到自身与所述第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口。S220: When it is detected that the DRP ring link connected to the second switching device is faulty, and the duration of the entire DRP ring network is in a fault state reaches a preset threshold, according to the record in the local configuration information table for each The port number of the port that the backup group itself allocates for the corresponding link, and finds each port that is in the blocked state.
在实际应用中,如果在DRP环网中,各交换设备支持RSTP协议,当DRP环网的某两台交换设备之间的链路出现故障时,通过打开预先配置的处于阻塞状态的端口的方式,可以实现链路的冗余备份,打开预先配置的处于阻塞状态的端口的方法属于现有技术,本申请实施例不再赘述。In the actual application, if the switching device supports the RSTP protocol in the DRP ring network, when the link between two switching devices on the DRP ring network fails, the pre-configured port in the blocked state is opened. The method of performing the redundancy backup of the link and opening the pre-configured port in the blocked state belongs to the prior art, and is not repeatedly described in the embodiment of the present application.
当DRP环网的一处DRP环网链路出现故障,打开预先配置的处于阻塞状态的端口,实现链路的冗余备份,所需要的时长较短,可以根据实际应用中需要的时长预先设置一个阈值。When a DRP ring network link on the DRP ring network fails, the pre-configured port is blocked and the link is redundant. The required time is shorter. You can set the time according to the length of time required in the actual application. A threshold.
当第一交换设备监测到该DRP环网链路出现故障,并且还未达到预设阈值时,DRP环网已经处于正常通信状态,可以表明该DRP环网中之前处于阻塞状态的端口已经被打开,解决了链路故障问题。When the first switching device detects that the DRP ring link is faulty and has not reached the preset threshold, the DRP ring network is in a normal communication state, indicating that the previously blocked port in the DRP ring network has been opened. , solved the link failure problem.
相反,当第一交换设备监测到自身与所述第二交换设备连接的DRP环网链路出现故障,并且整个DRP环网处于故障状态的时长达到了预设阈值时,可以表明该DRP环网链路不是该DRP环网中的第一条故障链路,在该DRP环网链路出现故障之前,DRP环网中其他交换设备之间的链路已经出现了故障,并且执行了打开预先配置的处于阻塞状态的端口的操作。此时,第一交换设备可以根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口。Conversely, when the first switching device detects that the DRP ring link connected to the second switching device is faulty, and the duration of the fault condition of the entire DRP ring network reaches a preset threshold, the DRP ring network may be indicated. The link is not the first faulty link in the DRP ring network. Before the DRP ring network link fails, the link between other switching devices in the DRP ring network has failed, and the pre-configuration is performed. The operation of a blocked port. At this time, the first switching device can find each port in the blocked state according to the port number of the port allocated for the corresponding link for each backup group itself recorded in the local configuration information table.
比如,SW3根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,可以得到端口1、端口2和端口3的信息,再判断每个端口的状态,将处于阻塞状态的每个端口查找出来,比如查找到的端口为端口1和端口2。For example, SW3 can obtain the information of port 1, port 2, and port 3 according to the port number recorded in the local configuration information table for each backup group itself, and then determine the status of each port. Each port in the blocked state is found, for example, the ports found are port 1 and port 2.
S230:从查找到的端口中选择一个端口,将其设置为打开状态,使与该端口连接的第一链路处于连通状态,以将该第一链路及与该第一链路在同一 备份组中的第二链路切换为所述DRP环网中的链路。S230: Select a port from the discovered ports, set it to an open state, and connect the first link connected to the port to connect the first link and the first link. The second link in the backup group switches to the link in the DRP ring network.
执行步骤S220的操作后,第一交换设备查找到了处于阻塞状态的每个端口,可以从查找到的端口中选择一个端口,具体的,可以随机选择或者按照预设的要求进行选择,然后将选择出的该端口设置为打开状态,使得与该端口连接的链路处于连通状态。这样,该端口对应的备份组中的两条链路均为连通状态,相当于将该第一链路及与该第一链路在同一备份组中的第二链路切换为所述DRP环网中的链路,形成DRP环网的倒换,这里的第一链路和第二链路可以作为DRP环网的链路的一部分进行数据报文的传输。After the operation of step S220 is performed, the first switching device finds each port in the blocked state, and selects one port from the found ports. Specifically, the first switching device may randomly select or select according to a preset requirement, and then select The outgoing port is set to an open state, so that the link connected to the port is in a connected state. In this way, the two links in the backup group corresponding to the port are in a connected state, which is equivalent to switching the first link and the second link in the same backup group as the first link to the DRP ring. The link in the network forms a switching of the DRP ring network, where the first link and the second link can transmit data packets as part of the link of the DRP ring network.
在上述DRP环网倒换后,可以在DRP环网中进行主交换设备的选举,由选举出的主交换设备重新进行其对应的端口的端口状态的设置,此过程为现有技术,本申请对此不再赘述。After the DRP ring network is switched, the election of the primary switching device can be performed on the DRP ring network. The elected primary switching device re-configures the port status of the corresponding port. This process is prior art. This will not be repeated here.
在本申请的一种具体实施方式中,步骤S230具体可以包括以下步骤:In a specific implementation manner of the present application, step S230 may specifically include the following steps:
根据每个终端的优先级及自身为每个终端对应的链路分配的端口,从查找到的端口中识别为优先级最高的终端对应的链路分配的端口,将识别到的端口设置为打开状态。According to the priority of each terminal and the port assigned to the link corresponding to each terminal, the port assigned to the link corresponding to the terminal with the highest priority is identified from the found port, and the identified port is set to be opened. status.
在实际应用中,可以根据实际情况为与DRP环网连接的各终端设定优先级,不同终端的优先级不同,比如,可以为负载能力较小的终端设置高优先级。第一交换设备获得每个终端的优先级及自身为每个终端对应链路分配的端口等信息后,可以从查找到的端口中识别出自身为优先级最高的终端对应的链路分配的端口,并将识别到的端口设置为打开状态。In actual applications, priority can be set for each terminal connected to the DRP ring network according to the actual situation. The priorities of different terminals are different. For example, a high priority can be set for a terminal with a small load capacity. After obtaining the priority of each terminal and the port allocated by each terminal for each terminal, the first switching device can identify the port allocated by the link corresponding to the terminal with the highest priority from the found port. And set the identified port to the open state.
在本申请的另一种具体实施方式中,步骤S230具体可以包括以下步骤:In another specific implementation manner of the present application, step S230 may specifically include the following steps:
将查找到的端口对应的备份组按照预设标识顺序进行排序,将第一个备份组对应的端口设置为打开状态。The backup groups corresponding to the discovered ports are sorted in the order of the preset IDs, and the ports corresponding to the first backup group are set to the open state.
在DRP环网中,每个备份组具有唯一的标识,可以根据标识从大到小或者从小到大的顺序,将查找到的端口对应的备份组进行排序,并将第一个备份组对应的端口设置为打开状态。In a DRP ring network, each backup group has a unique identifier. The backup groups corresponding to the discovered ports can be sorted according to the order of the identifiers from large to small or from small to large, and the first backup group is corresponding. The port is set to open.
在DRP环网中,对于每个工业以太网站点来说,该工业以太网站点中的每 个终端都可以与该工业以太网站点中的两台交换设备进行链路连接,当DRP环网中至少两处DRP环网链路出现故障时,不同工业以太网站点中的第一交换设备均可以应用本申请实施例所提供的方法,将分配给相应终端的相应链路的端口设置为打开状态,实现链路的冗余备份。In the DRP ring network, for each Industrial Ethernet site, each of the Industrial Ethernet sites Each terminal can be connected to two switching devices in the industrial Ethernet site. When at least two DRP ring links in the DRP ring network fail, the first switching device in different industrial Ethernet sites is The method provided in this embodiment of the present application can be used to set the port of the corresponding link allocated to the corresponding terminal to an open state to implement redundancy backup of the link.
应用本申请实施例所提供的技术方案,第一交换设备监测到自身与第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,可以查找到自身为每个备份组的相应链路分配的处于阻塞状态的端口,并从查找到的端口中选择一个端口,将其设置为打开状态,这样,可以使与该端口连接的链路处于连通状态,从而实现链路的冗余备份。本申请实施例中对终端不做限制,使用普通的HUB端口终端也可以实现链路的冗余备份,降低了链路的冗余备份的运行成本。另外,第一交换设备只要满足端口打开条件,即可将相应端口设置为打开状态,无需进行全网拓扑结构的重构,因此该过程需要的时长较短,可以满足工业应用中毫秒级的切换要求。Applying the technical solution provided by the embodiment of the present application, when the first switching device detects that the DRP ring network link connected to the second switching device is faulty, and the duration of the DRP ring network in the fault state reaches a preset threshold, Find the blocked port that is assigned to the corresponding link of each backup group, and select one of the discovered ports to set it to the open state, so that the link connected to the port can be Connected state, thus achieving redundant backup of the link. In the embodiment of the present application, the terminal is not limited. The common HUB port terminal can also implement redundancy backup of the link, which reduces the running cost of the redundant backup of the link. In addition, as long as the port switching condition is met, the first switching device can set the corresponding port to the open state without reconfiguring the entire network topology structure, so the process requires a short duration and can meet millisecond switching in industrial applications. Claim.
相应于图2所示方法实施例,本申请实施例还提供了一种主备链路切换装置,该装置应用于第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,且所述第一链路与所述第二链路构成一个备份组,在所述第一链路和所述第二链路中,当前处于连通状态的第二链路为主链路,当前处于断开状态的第一链路为备份链路;参见图4所示,该装置可以包括以下模块:Corresponding to the method embodiment shown in FIG. 2, the embodiment of the present application further provides an active/standby link switching device, where the device is applied to a first switching device, and the first switching device and the second switching device are deployed in the same industry. In the Ethernet site, the first switching device and the second switching device are switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal passes the a link is connected to the first switching device, connected to the second switching device by using a second link, and the first link and the second link form a backup group, where the first link In the link and the second link, the second link that is currently in the connected state is the primary link, and the first link that is currently in the disconnected state is the backup link; as shown in FIG. 4, the device may include The following modules:
故障通讯报文接收模块310,用于接收故障通讯报文,所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息;The fault communication message receiving module 310 is configured to receive the fault communication message, where the fault communication message includes the identifier information of the backup group where the second link that is faulty is located;
所述备份组的标识信息可以包括:所述备份组所在工业以太网站点的标识信息和所述备份组位于工业以太网站点中所在组的标识信息;或,所述备份组所在工业以太网站点的标识信息、所述备份组位于工业以太网站点中所在组的标识信息以及该组中交换设备的标识信息;或,所述备份组对应的终端的标识信息。 The identification information of the backup group may include: identifier information of an industrial Ethernet site where the backup group is located, and identifier information of a group where the backup group is located in an industrial Ethernet site; or an industrial Ethernet site where the backup group is located The identification information of the group in which the backup group is located in the industrial Ethernet site and the identification information of the switching device in the group; or the identification information of the terminal corresponding to the backup group.
第一端口查找模块320,用于当确定自身为所述出现故障的第二链路所在的备份组对应的交换设备时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找对应的端口;The first port searching module 320 is configured to: when determining that the switching device corresponding to the backup group where the second link is faulty, the corresponding link is recorded for each backup group according to the local configuration information table. The port number of the assigned port to find the corresponding port;
第一端口打开模块330,用于将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通状态。The first port opening module 330 is configured to set the found port to an open state, so that the first link connected to the port is in a connected state.
应用本申请实施例所提供的装置,第一交换设备接收到故障通讯报文后,根据故障通讯报文中的备份组的标识信息,可以确定自身是否为故障链路所在的备份组对应的交换设备,也就是判断本地配置信息中是否记录有该备份组的标识信息,在是的情况下,第一交换设备可以查找到分配给与故障链路在同一备份组的相应链路的端口,并将该端口设置为打开状态,这样,可以使与该端口连接的链路处于连通状态,从而实现链路的冗余备份。本申请实施例中对终端不做限制,使用普通的HUB端口终端也可以实现链路的冗余备份,降低了链路的冗余备份的运行成本。另外,第一交换设备只要接收故障通讯报文,即可将相应端口设置为打开状态,无需进行全网拓扑结构的重构,因此该过程需要的时长较短,可以满足工业应用中毫秒级的切换要求。Applying the device provided by the embodiment of the present application, after receiving the fault communication message, the first switching device can determine whether the backup group corresponding to the fault link is exchanged according to the identifier information of the backup group in the fault communication message. The device, that is, whether the identification information of the backup group is recorded in the local configuration information, and if yes, the first switching device can find the port allocated to the corresponding link of the same backup group as the faulty link, and The port is set to the open state, so that the link connected to the port can be connected, thereby implementing redundant backup of the link. In the embodiment of the present application, the terminal is not limited. The common HUB port terminal can also implement redundancy backup of the link, which reduces the running cost of the redundant backup of the link. In addition, the first switching device can set the corresponding port to the open state as long as it receives the faulty communication packet, and does not need to reconstruct the entire network topology structure. Therefore, the process requires a short duration and can meet milliseconds in industrial applications. Switching requirements.
相应于图3所示方法实施例,本申请实施例还提供了一种实现链路冗余备份装置,该装置应用于第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,所述第一链路为断开状态,所述第二链路为连通状态,且所述第一链路与所述第二链路构成一个备份组;参见图5所示,该装置可以包括以下模块:Corresponding to the method embodiment shown in FIG. 3, the embodiment of the present application further provides a link redundancy backup device, where the device is applied to a first switching device, and the first switching device is deployed in the same manner as the second switching device. In an industrial Ethernet site, the first switching device and the second switching device are switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal passes The first link is connected to the first switching device, and is connected to the second switching device by using a second link, where the first link is in an open state, and the second link is in a connected state, and The first link and the second link form a backup group; as shown in FIG. 5, the device may include the following modules:
链路状态监测模块410,用于监测自身与所述第二交换设备连接的DRP环网链路的链路状态;The link state monitoring module 410 is configured to monitor a link state of a DRP ring network link that is connected to the second switching device.
第二端口查找模块420,用于在监测到自身与所述第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值的情况下,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口; The second port searching module 420 is configured to: when it is detected that the DRP ring link connected to the second switching device is faulty, and the duration of the entire DRP ring network is in a fault state reaches a preset threshold, according to the local The port number of the port assigned to the corresponding link for each backup group itself recorded in the configuration information table, and each port in the blocked state is searched;
第二端口打开模块430,用于从查找到的端口中选择一个端口,将其设置为打开状态,使与该端口连接的第一链路处于连通状态,以将该第一链路及与该第一链路在同一备份组中的第二链路切换为所述DRP环网中的链路。The second port opening module 430 is configured to select a port from the discovered ports, set it to an open state, and enable the first link connected to the port to be in a connected state, to connect the first link and the The second link of the first link in the same backup group is switched to the link in the DRP ring network.
在本申请的一种具体实施方式中,所述第二端口打开模块430,可以具体用于:根据每个终端的优先级及自身为每个终端对应的链路分配的端口,从查找到的端口中识别为优先级最高的终端对应的链路分配的端口,将识别到的端口设置为打开状态。In a specific implementation manner of the present application, the second port opening module 430 may be specifically configured to: according to the priority of each terminal and the port allocated by itself for the link corresponding to each terminal, from the found The port identified in the port as the link corresponding to the terminal with the highest priority, and the identified port is set to the open state.
在本申请的一种具体实施方式中,所述第二端口打开模块430,可以具体用于:将查找到的端口对应的备份组按照预设标识顺序进行排序,将第一个备份组对应的端口设置为打开状态。In a specific implementation manner of the present application, the second port opening module 430 may be specifically configured to: sort the backup groups corresponding to the searched ports according to a preset identifier sequence, and correspond to the first backup group. The port is set to open.
应用本申请实施例所提供的装置,第一交换设备监测到自身与第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,可以查找到自身为每个备份组的相应链路分配的处于阻塞状态的端口,并从查找到的端口中选择一个端口,将其设置为打开状态,这样,可以使与该端口连接的链路处于连通状态,从而实现链路的冗余备份。本申请实施例中对终端不做限制,使用普通的HUB端口终端也可以实现链路的冗余备份,降低了链路的冗余备份的运行成本。另外,第一交换设备只要满足端口打开条件,即可将相应端口设置为打开状态,无需进行全网拓扑结构的重构,因此该过程需要的时长较短,可以满足工业应用中毫秒级的切换要求。When the device provided by the embodiment of the present application detects that the DRP ring network link that is connected to the second switching device is faulty, and the length of the DRP ring network is in a fault state reaches a preset threshold, the device can search for a preset threshold. Connect to the blocked port that is assigned to the corresponding link of each backup group, and select one of the discovered ports to set it to the open state. In this way, the link connected to the port can be connected. State, thus enabling redundant backup of the link. In the embodiment of the present application, the terminal is not limited. The common HUB port terminal can also implement redundancy backup of the link, which reduces the running cost of the redundant backup of the link. In addition, as long as the port switching condition is met, the first switching device can set the corresponding port to the open state without reconfiguring the entire network topology structure, so the process requires a short duration and can meet millisecond switching in industrial applications. Claim.
为了实现上述目的,本申请实施例还提供了一种存储介质,其中,该存储介质用于存储应用程序,所述应用程序用于在运行时执行本申请所述的一种实现链路冗余备份方法。其中,本申请所述的一种实现链路冗余备份方法,包括:In order to achieve the above object, an embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is used to perform link redundancy described in the present application at runtime. Backup method. The method for implementing link redundancy backup described in the present application includes:
监测自身与所述第二交换设备连接的DRP环网链路的链路状态;Monitoring a link state of a DRP ring network link that is connected to the second switching device;
当监测到自身与所述第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口; When it is detected that the DRP ring network link that is connected to the second switching device is faulty, and the length of the entire DRP ring network is in a fault state reaches a preset threshold, according to the record in the local configuration information table for each backup group The port number of the port that is itself assigned to the corresponding link, and finds each port that is in the blocked state;
从查找到的端口中选择一个端口,将其设置为打开状态,使与该端口连接的第一链路处于连通状态,以将该第一链路及与该第一链路在同一备份组中的第二链路切换为所述DRP环网中的链路。Select a port from the discovered port, set it to the open state, and connect the first link connected to the port to connect the first link and the first link in the same backup group. The second link is switched to the link in the DRP ring network.
为了实现上述目的,本申请实施例还提供了一种应用程序,其中,该应用程序用于在运行时执行本申请所述的一种实现链路冗余备份方法。其中,本申请所述的一种实现链路冗余备份方法,包括:In order to achieve the above object, an embodiment of the present application further provides an application, where the application is used to perform a link redundancy backup method described in the present application at runtime. The method for implementing link redundancy backup described in the present application includes:
监测自身与所述第二交换设备连接的DRP环网链路的链路状态;Monitoring a link state of a DRP ring network link that is connected to the second switching device;
当监测到自身与所述第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口;When it is detected that the DRP ring network link that is connected to the second switching device is faulty, and the length of the entire DRP ring network is in a fault state reaches a preset threshold, according to the record in the local configuration information table for each backup group The port number of the port that is itself assigned to the corresponding link, and finds each port that is in the blocked state;
从查找到的端口中选择一个端口,将其设置为打开状态,使与该端口连接的第一链路处于连通状态,以将该第一链路及与该第一链路在同一备份组中的第二链路切换为所述DRP环网中的链路。Select a port from the discovered port, set it to the open state, and connect the first link connected to the port to connect the first link and the first link in the same backup group. The second link is switched to the link in the DRP ring network.
为了实现上述目的,本申请实施例还提供了一种第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,所述第一链路为断开状态,所述第二链路为连通状态,且所述第一链路与所述第二链路构成一个备份组;In order to achieve the above object, the embodiment of the present application further provides a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second device. The switching devices are all switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, through the second chain The second link is connected to the second switching device, the first link is in a disconnected state, the second link is in a connected state, and the first link and the second link form a backup group;
所述第一交换设备包括:The first switching device includes:
处理器、存储器、通信接口和总线;a processor, a memory, a communication interface, and a bus;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;The processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
所述存储器存储可执行程序代码;The memory stores executable program code;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于: The processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
监测自身与所述第二交换设备连接的DRP环网链路的链路状态;Monitoring a link state of a DRP ring network link that is connected to the second switching device;
当监测到自身与所述第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口;When it is detected that the DRP ring network link that is connected to the second switching device is faulty, and the length of the entire DRP ring network is in a fault state reaches a preset threshold, according to the record in the local configuration information table for each backup group The port number of the port that is itself assigned to the corresponding link, and finds each port that is in the blocked state;
从查找到的端口中选择一个端口,将其设置为打开状态,使与该端口连接的第一链路处于连通状态,以将该第一链路及与该第一链路在同一备份组中的第二链路切换为所述DRP环网中的链路。Select a port from the discovered port, set it to the open state, and connect the first link connected to the port to connect the first link and the first link in the same backup group. The second link is switched to the link in the DRP ring network.
为了实现上述目的,本申请实施例还提供了一种存储介质,其中,该存储介质用于存储应用程序,所述应用程序用于在运行时执行本申请所述的一种主备链路切换方法。其中,本申请所述的一种主备链路切换方法,包括:In order to achieve the above object, an embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is configured to perform one type of active/standby link switching described in the present application at runtime. method. The method for switching between the active and standby links in the present application includes:
接收故障通讯报文,所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息;Receiving a fault communication message, where the fault communication message includes the identification information of the backup group where the second link that is faulty is located;
当确定自身为所述出现故障的第二链路所在的备份组对应的交换设备时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找对应的端口;When it is determined that it is the switching device corresponding to the backup group where the second link that is faulty is located, the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table. Port
将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通状态。Set the discovered port to the open state, so that the first link connected to the port is connected.
为了实现上述目的,本申请实施例还提供了一种应用程序,其中,该应用程序用于在运行时执行本申请所述的一种主备链路切换方法。其中,本申请所述的一种主备链路切换方法,包括:In order to achieve the above objective, the embodiment of the present application further provides an application, where the application is used to perform a primary and backup link switching method described in the present application at runtime. The method for switching between the active and standby links in the present application includes:
接收故障通讯报文,所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息;Receiving a fault communication message, where the fault communication message includes the identification information of the backup group where the second link that is faulty is located;
当确定自身为所述出现故障的第二链路所在的备份组对应的交换设备时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找对应的端口;When it is determined that it is the switching device corresponding to the backup group where the second link that is faulty is located, the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table. Port
将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通 状态。Set the discovered port to the open state, so that the first link connected to the port is connected. status.
为了实现上述目的,本申请实施例还提供了一种第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,且所述第一链路与所述第二链路构成一个备份组,在所述第一链路和所述第二链路中,当前处于连通状态的第二链路为主链路,当前处于断开状态的第一链路为备份链路;In order to achieve the above object, the embodiment of the present application further provides a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the second device. The switching devices are all switching devices in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, through the second chain The road is connected to the second switching device, and the first link and the second link form a backup group, and the first link and the second link are currently in a connected state. The second link is the primary link, and the first link that is currently in the disconnected state is the backup link.
所述第一交换设备包括:The first switching device includes:
处理器、存储器、通信接口和总线;a processor, a memory, a communication interface, and a bus;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;The processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
所述存储器存储可执行程序代码;The memory stores executable program code;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:The processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
接收故障通讯报文,所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息;Receiving a fault communication message, where the fault communication message includes the identification information of the backup group where the second link that is faulty is located;
当确定自身为所述出现故障的第二链路所在的备份组对应的交换设备时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找对应的端口;When it is determined that it is the switching device corresponding to the backup group where the second link that is faulty is located, the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table. Port
将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通状态。Set the discovered port to the open state, so that the first link connected to the port is connected.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明 确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply such entities or operations. There is any such actual relationship or order between them. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variants thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that includes a plurality of elements includes not only those elements but also Other elements that are listed, or include elements inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the present specification are described in a related manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可读取存储介质中,这里所称得的存储介质,如:ROM/RAM、磁碟、光盘等。One of ordinary skill in the art can understand that all or part of the steps in implementing the above method embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, which is referred to herein. Storage media such as ROM/RAM, disk, CD, etc.
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。 The above description is only the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are included in the scope of the present application.

Claims (10)

  1. 一种实现链路冗余备份方法,其特征在于,应用于第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,所述第一链路为断开状态,所述第二链路为连通状态,且所述第一链路与所述第二链路构成一个备份组;所述方法包括:A method for implementing a link redundancy backup, which is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the The second switching device is a switching device in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device by using the first link, The second link is connected to the second switching device, the first link is in a disconnected state, the second link is in a connected state, and the first link and the second link constitute a backup Group; the method includes:
    监测自身与所述第二交换设备连接的DRP环网链路的链路状态;Monitoring a link state of a DRP ring network link that is connected to the second switching device;
    当监测到自身与所述第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口;When it is detected that the DRP ring network link that is connected to the second switching device is faulty, and the length of the entire DRP ring network is in a fault state reaches a preset threshold, according to the record in the local configuration information table for each backup group The port number of the port that is itself assigned to the corresponding link, and finds each port that is in the blocked state;
    从查找到的端口中选择一个端口,将其设置为打开状态,使与该端口连接的第一链路处于连通状态,以将该第一链路及与该第一链路在同一备份组中的第二链路切换为所述DRP环网中的链路。Select a port from the discovered port, set it to the open state, and connect the first link connected to the port to connect the first link and the first link in the same backup group. The second link is switched to the link in the DRP ring network.
  2. 根据权利要求1所述的方法,其特征在于,所述从查找到的端口中选择一个端口,将其设置为打开状态,包括:The method according to claim 1, wherein said selecting a port from the found ports and setting it to an open state comprises:
    根据每个终端的优先级及自身为每个终端对应的链路分配的端口,从查找到的端口中识别为优先级最高的终端对应的链路分配的端口,将识别到的端口设置为打开状态。According to the priority of each terminal and the port assigned to the link corresponding to each terminal, the port assigned to the link corresponding to the terminal with the highest priority is identified from the found port, and the identified port is set to be opened. status.
  3. 根据权利要求1所述的方法,其特征在于,所述从查找到的端口中选择一个端口,将其设置为打开状态,包括:The method according to claim 1, wherein said selecting a port from the found ports and setting it to an open state comprises:
    将查找到的端口对应的备份组按照预设标识顺序进行排序,将第一个备份组对应的端口设置为打开状态。The backup groups corresponding to the discovered ports are sorted in the order of the preset IDs, and the ports corresponding to the first backup group are set to the open state.
  4. 一种主备链路切换方法,其特征在于,应用于第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对 该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,且所述第一链路与所述第二链路构成一个备份组,在所述第一链路和所述第二链路中,当前处于连通状态的第二链路为主链路,当前处于断开状态的第一链路为备份链路;所述方法包括:An active/standby link switching method is applied to a first switching device, where the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the first The second switching device is a switching device in the same distributed redundancy protocol DRP ring network; Each terminal in the industrial Ethernet site, the terminal is connected to the first switching device by using a first link, and the second switching device is connected by a second link, and the first link is The second link constitutes a backup group. In the first link and the second link, the second link that is currently in the connected state is the primary link, and the first link that is currently in the disconnected state. As a backup link; the method includes:
    接收故障通讯报文,所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息;Receiving a fault communication message, where the fault communication message includes the identification information of the backup group where the second link that is faulty is located;
    当确定自身为所述出现故障的第二链路所在的备份组对应的交换设备时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找对应的端口;When it is determined that it is the switching device corresponding to the backup group where the second link that is faulty is located, the corresponding port number of the port allocated for the corresponding link for each backup group itself is searched according to the port number recorded in the local configuration information table. Port
    将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通状态。Set the discovered port to the open state, so that the first link connected to the port is connected.
  5. 根据权利要求4所述的方法,其特征在于,所述备份组的标识信息包括:所述备份组所在工业以太网站点的标识信息和所述备份组位于工业以太网站点中所在组的标识信息;或,所述备份组所在工业以太网站点的标识信息、所述备份组位于工业以太网站点中所在组的标识信息以及该组中交换设备的标识信息;或,所述备份组对应的终端的标识信息。The method according to claim 4, wherein the identification information of the backup group comprises: identification information of an industrial Ethernet site where the backup group is located, and identification information of a group where the backup group is located in an industrial Ethernet site. Or the identification information of the industrial Ethernet site where the backup group is located, the identification information of the group in which the backup group is located in the industrial Ethernet site, and the identification information of the switching device in the group; or the terminal corresponding to the backup group Identification information.
  6. 一种实现链路冗余备份装置,其特征在于,应用于第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,所述第一链路为断开状态,所述第二链路为连通状态,且所述第一链路与所述第二链路构成一个备份组;所述装置包括:A device for implementing a link redundancy backup, characterized in that it is applied to a first switching device, the first switching device and the second switching device are deployed in the same industrial Ethernet site, the first switching device and the The second switching device is a switching device in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device by using the first link, The second link is connected to the second switching device, the first link is in a disconnected state, the second link is in a connected state, and the first link and the second link constitute a backup Group; the device comprises:
    链路状态监测模块,用于监测自身与所述第二交换设备连接的DRP环网链路的链路状态;a link state monitoring module, configured to monitor a link state of a DRP ring network link that is connected to the second switching device;
    第二端口查找模块,用于当监测到自身与所述第二交换设备连接的DRP环网链路出现故障、且整个DRP环网处于故障状态的时长达到预设阈值时,根据 本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找处于阻塞状态的每个端口;a second port search module, configured to: when it is detected that the DRP ring link connected to the second switching device is faulty, and the duration of the entire DRP ring network is in a fault state reaches a preset threshold, The port number of the port assigned to the corresponding link for each backup group itself recorded in the local configuration information table, and each port in the blocked state is searched;
    第二端口打开模块,用于从查找到的端口中选择一个端口,将其设置为打开状态,使与该端口连接的第一链路处于连通状态,以将该第一链路及与该第一链路在同一备份组中的第二链路切换为所述DRP环网中的链路。a second port opening module, configured to select a port from the discovered ports, set it to an open state, and connect the first link connected to the port to connect the first link and the first The second link of a link in the same backup group is switched to the link in the DRP ring network.
  7. 根据权利要求6所述的装置,其特征在于,所述第二端口打开模块,具体用于:The device according to claim 6, wherein the second port opening module is specifically configured to:
    根据每个终端的优先级及自身为每个终端对应的链路分配的端口,从查找到的端口中识别为优先级最高的终端对应的链路分配的端口,将识别到的端口设置为打开状态。According to the priority of each terminal and the port assigned to the link corresponding to each terminal, the port assigned to the link corresponding to the terminal with the highest priority is identified from the found port, and the identified port is set to be opened. status.
  8. 根据权利要求6所述的装置,其特征在于,所述第二端口打开模块,具体用于:The device according to claim 6, wherein the second port opening module is specifically configured to:
    将查找到的端口对应的备份组按照预设标识顺序进行排序,将第一个备份组对应的端口设置为打开状态。The backup groups corresponding to the discovered ports are sorted in the order of the preset IDs, and the ports corresponding to the first backup group are set to the open state.
  9. 一种主备链路切换装置,其特征在于,应用于第一交换设备,所述第一交换设备与第二交换设备部署于同一工业以太网站点中,所述第一交换设备和所述第二交换设备均为同一分布式冗余协议DRP环网中的交换设备;针对该工业以太网站点中的每个终端,该终端通过第一链路与所述第一交换设备连接,通过第二链路与所述第二交换设备连接,且所述第一链路与所述第二链路构成一个备份组,在所述第一链路和所述第二链路中,当前处于连通状态的第二链路为主链路,当前处于断开状态的第一链路为备份链路;所述装置包括:An active/standby link switching device is configured to be applied to a first switching device, where the first switching device and the second switching device are deployed in a same industrial Ethernet site, the first switching device and the first The second switching device is a switching device in the same distributed redundancy protocol DRP ring network; for each terminal in the industrial Ethernet site, the terminal is connected to the first switching device through the first link, and passes through the second The link is connected to the second switching device, and the first link and the second link form a backup group, and the first link and the second link are currently in a connected state. The second link is the primary link, and the first link that is currently in the disconnected state is the backup link; the device includes:
    故障通讯报文接收模块,用于接收故障通讯报文,所述故障通讯报文中包含出现故障的第二链路所在的备份组的标识信息;The fault communication message receiving module is configured to receive the fault communication message, where the fault communication message includes the identification information of the backup group where the second link that is faulty is located;
    第一端口查找模块,用于当确定自身为所述出现故障的第二链路所在的备份组对应的交换设备时,根据本地配置信息表中记录的针对每个备份组自身为相应链路分配的端口的端口号,查找对应的端口; The first port searching module is configured to allocate, according to the local configuration information table, the corresponding link for each backup group according to the switching device corresponding to the backup group where the second link that is faulty is located. Port number of the port, find the corresponding port;
    第一端口打开模块,用于将查找到的端口设置为打开状态,使与该端口连接的第一链路处于连通状态。The first port open module is configured to set the found port to an open state, so that the first link connected to the port is in a connected state.
  10. 根据权利要求9所述的装置,其特征在于,所述备份组的标识信息包括:所述备份组所在工业以太网站点的标识信息和所述备份组位于工业以太网站点中所在组的标识信息;或,所述备份组所在工业以太网站点的标识信息、所述备份组位于工业以太网站点中所在组的标识信息以及该组中交换设备的标识信息;或,所述备份组对应的终端的标识信息。 The device according to claim 9, wherein the identification information of the backup group comprises: identification information of an industrial Ethernet site where the backup group is located, and identification information of a group where the backup group is located in an industrial Ethernet site. Or the identification information of the industrial Ethernet site where the backup group is located, the identification information of the group in which the backup group is located in the industrial Ethernet site, and the identification information of the switching device in the group; or the terminal corresponding to the backup group Identification information.
PCT/CN2016/072690 2015-07-02 2016-01-29 Method and device for switching between primary and backup link and realizing redundancy backup of link WO2017000550A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510383324.2 2015-07-02
CN201510383324.2A CN105099771B (en) 2015-07-02 2015-07-02 A kind of active/standby link switchover, realize link redundancy backup method and device

Publications (1)

Publication Number Publication Date
WO2017000550A1 true WO2017000550A1 (en) 2017-01-05

Family

ID=54579387

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/072690 WO2017000550A1 (en) 2015-07-02 2016-01-29 Method and device for switching between primary and backup link and realizing redundancy backup of link

Country Status (2)

Country Link
CN (1) CN105099771B (en)
WO (1) WO2017000550A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955187A (en) * 2019-12-18 2020-04-03 中国长江电力股份有限公司 PLC control system and control method for dual power supply and communication of speed regulator hydraulic system
CN111083198A (en) * 2019-11-22 2020-04-28 浙江中控技术股份有限公司 Communication link switching method, master domain server, slave domain server and system
CN111585797A (en) * 2020-04-27 2020-08-25 深圳震有科技股份有限公司 Ethernet link switching method, device, equipment and computer readable storage medium
CN111628891A (en) * 2020-05-25 2020-09-04 中车青岛四方车辆研究所有限公司 Method for realizing dual Ethernet redundancy based on QNX
CN115065858A (en) * 2022-08-18 2022-09-16 广州市保伦电子有限公司 Audio and video transmission method and system based on double optical fibers
CN115344432A (en) * 2022-10-12 2022-11-15 宏远智控科技(北京)有限公司 System and method for transmitting keyboard, display and mouse data

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099771B (en) * 2015-07-02 2018-04-24 北京东土科技股份有限公司 A kind of active/standby link switchover, realize link redundancy backup method and device
CN106656659B (en) * 2016-11-30 2020-12-29 浙江宇视科技有限公司 Network path selection method and network video recorder
CN107124322B (en) * 2017-07-14 2020-04-14 广州致远电子有限公司 Redundant communication method
US10469921B2 (en) * 2017-11-10 2019-11-05 Juniper Networks, Inc. Data center packet optical transport failure protection
CN107948062A (en) * 2017-12-25 2018-04-20 锐捷网络股份有限公司 Message forwarding method and device based on VRRP backup groups
CN109167742B (en) * 2018-08-15 2021-05-18 北京东土科技股份有限公司 Dual-homing protocol deployment system, method, device, switch and storage medium
CN109639355B (en) * 2018-12-04 2022-07-01 马鞍山钢铁股份有限公司 Method for undisturbed access of industrial optical fiber ring network to EMS (energy management system) online system
CN114095951B (en) * 2020-08-24 2023-09-05 中国移动通信集团终端有限公司 Data transmission method, device and system and computer storage medium
CN112737938B (en) * 2020-11-30 2022-09-27 北京东土军悦科技有限公司 DRP switching method, device, equipment and medium
CN112822102B (en) * 2020-12-30 2023-01-24 瑞斯康达科技发展股份有限公司 Link switching method, device, equipment, system and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252426A (en) * 2007-09-11 2008-08-27 北京东土科技股份有限公司 Method for realizing high-reliability distributed redundant looped network
CN102664745A (en) * 2012-04-09 2012-09-12 北京东土科技股份有限公司 Method and device for registering and deleting multicast list item based on ring network
CN105099771A (en) * 2015-07-02 2015-11-25 北京东土科技股份有限公司 Main-standby link switch and link redundancy backup method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588304B (en) * 2009-06-30 2012-04-18 杭州华三通信技术有限公司 Implementation method of VRRP and device
JP5033856B2 (en) * 2009-10-20 2012-09-26 株式会社日立製作所 Devices and systems for network configuration assumptions
CN103607293B (en) * 2013-10-30 2017-08-22 新华三技术有限公司 A kind of flow rate protecting method and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252426A (en) * 2007-09-11 2008-08-27 北京东土科技股份有限公司 Method for realizing high-reliability distributed redundant looped network
CN102664745A (en) * 2012-04-09 2012-09-12 北京东土科技股份有限公司 Method and device for registering and deleting multicast list item based on ring network
CN105099771A (en) * 2015-07-02 2015-11-25 北京东土科技股份有限公司 Main-standby link switch and link redundancy backup method and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111083198A (en) * 2019-11-22 2020-04-28 浙江中控技术股份有限公司 Communication link switching method, master domain server, slave domain server and system
CN110955187A (en) * 2019-12-18 2020-04-03 中国长江电力股份有限公司 PLC control system and control method for dual power supply and communication of speed regulator hydraulic system
CN110955187B (en) * 2019-12-18 2024-06-11 中国长江电力股份有限公司 PLC control system and control method for dual power supply and communication of speed regulator hydraulic system
CN111585797A (en) * 2020-04-27 2020-08-25 深圳震有科技股份有限公司 Ethernet link switching method, device, equipment and computer readable storage medium
CN111628891A (en) * 2020-05-25 2020-09-04 中车青岛四方车辆研究所有限公司 Method for realizing dual Ethernet redundancy based on QNX
CN111628891B (en) * 2020-05-25 2023-04-25 中车青岛四方车辆研究所有限公司 Dual-Ethernet redundancy realization method based on QNX
CN115065858A (en) * 2022-08-18 2022-09-16 广州市保伦电子有限公司 Audio and video transmission method and system based on double optical fibers
CN115065858B (en) * 2022-08-18 2022-11-15 广州市保伦电子有限公司 Audio and video transmission method and system based on double optical fibers
CN115344432A (en) * 2022-10-12 2022-11-15 宏远智控科技(北京)有限公司 System and method for transmitting keyboard, display and mouse data
CN115344432B (en) * 2022-10-12 2023-01-10 宏远智控科技(北京)有限公司 System and method for transmitting keyboard, display and mouse data

Also Published As

Publication number Publication date
CN105099771B (en) 2018-04-24
CN105099771A (en) 2015-11-25

Similar Documents

Publication Publication Date Title
WO2017000550A1 (en) Method and device for switching between primary and backup link and realizing redundancy backup of link
CN101601232B (en) Triple-tier anycast addressing
US7173934B2 (en) System, device, and method for improving communication network reliability using trunk splitting
CN104104570A (en) Aggregation processing method in IRF (Intelligent Resilient Framework) system and device
CN102315975B (en) Fault processing method based on intelligent resilient framework (IRF) system and equipment thereof
US20150003464A1 (en) LACP Negotiation Processing Method, Relay Node, and System
US20110310729A1 (en) Maintaining balance of active links across network devices in a double-sided virtual port-channel environment
CN102917384B (en) Hot backup method of coordinators in Zigbee network
JP2008288880A (en) Node, communicating method, and program for node
CN101588304A (en) Implementation method of VRRP
CN102231682B (en) Stacking conflict processing method and equipment
EP3316555B1 (en) Mac address synchronization method, device and system
CN107465613B (en) Link aggregation interface communication state switching method and device
WO2013097639A1 (en) Expanding member ports of a link aggregation group between clusters
CN102209035B (en) Traffic forwarding method and devices
CN103095573A (en) Method for virtual router redundancy protocol backup set switching and switch
EP2879338B1 (en) Logical channel establishing method and system, edge virtual bridging station, and bridge
CN104243304B (en) The data processing method of non-full-mesh topological structure, equipment and system
US10581638B2 (en) Assign tunnel tag identifying virtual local area network tunnel
KR20110046897A (en) Method to elect master nodes from nodes of a subnet
CN108306998A (en) Method for network address translation and device
WO2015101278A1 (en) Cell activation method and device
US20140140219A1 (en) Transmission device and transmission method
CN112511419B (en) Distributed forwarding system
US20180083863A1 (en) Layer-2 next-hop group mlag failover

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16816915

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16816915

Country of ref document: EP

Kind code of ref document: A1