WO2019001197A1 - 一种链路切换方法及装置 - Google Patents

一种链路切换方法及装置 Download PDF

Info

Publication number
WO2019001197A1
WO2019001197A1 PCT/CN2018/088716 CN2018088716W WO2019001197A1 WO 2019001197 A1 WO2019001197 A1 WO 2019001197A1 CN 2018088716 W CN2018088716 W CN 2018088716W WO 2019001197 A1 WO2019001197 A1 WO 2019001197A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
link
primary
standby
faulty
Prior art date
Application number
PCT/CN2018/088716
Other languages
English (en)
French (fr)
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 WO2019001197A1 publication Critical patent/WO2019001197A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • 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/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end

Definitions

  • the present disclosure relates to the field of communications technologies, and in particular, to a link switching method and apparatus.
  • UAPS Uplink Automatic Protection Switching
  • the UAPS implements the automatic protection switching function of the uplink port.
  • the UAPS is configured on the local device.
  • the local device sets the forwarding status of the working uplink port and the standby uplink port, and then clears the MAC address of the working uplink port (Medium Access Control, media access). Control) the address, automatically switch the service to the alternate uplink port.
  • the time required for setting the port forwarding state, clearing the MAC address, and learning the MAC address of the port is uncertain.
  • the link protection switching process is time-consuming and affects user services. For the problem that link protection switching is time consuming, no effective solution has been proposed yet.
  • the embodiment of the present disclosure provides a link switching method and apparatus.
  • the embodiment of the present disclosure provides a link switching method, where the local device and the peer device are both provided with an active port and a standby port, and the primary port of the local device is connected to the primary port of the remote device. And forming an active link, where the standby port of the local device is connected to the standby port of the peer device to form a standby link, where the method includes:
  • the working link is switched to the standby link by port redirection.
  • the embodiment of the present disclosure further provides a link switching device, which is applied to a local device and a peer device, where the local device and the peer device are both provided with an active port and a standby port, and the primary device is The port is connected to the primary port of the peer device to form a primary link, and the backup port of the local device is connected to the standby port of the peer device to form a backup link.
  • the device includes:
  • Determining a module configured to determine, by using port redirection, that the primary link is a working link
  • a detecting module configured to detect whether the primary link has a fault
  • a switching module configured to switch the working link to the standby link by using port redirection if it is detected that the primary link is faulty.
  • Embodiments of the present disclosure also provide an electronic device including a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor implementing the chain when executing the program Road switching method.
  • Embodiments of the present disclosure also provide a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the link switching method described above.
  • FIG. 1 is a flowchart of a link switching method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of an uplink link protection networking provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of uplink link protection switching according to an embodiment of the present disclosure
  • FIG. 4 is a flowchart of a link switching method according to another embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of a link switching apparatus according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of an electronic device according to an embodiment of the present disclosure.
  • an embodiment of the present disclosure provides a link switching method.
  • the method can be applied to the local device and the peer device, and the local device and the peer device are both provided with an active port and a standby port, and the primary port of the local device and the peer device are used by the peer device.
  • the port is connected to form a primary link
  • the standby port of the local device is connected to the standby port of the peer device to form a standby link.
  • the link switching method includes the following steps:
  • Step S101 Determine, by using port redirection, that the active link is a working link.
  • the local device and the peer device may be access devices, such as switches, routers, and the like.
  • the primary port of the local device is connected to the primary port of the peer device
  • the backup port of the local device is connected to the standby port of the peer device.
  • the primary port of the local device and the master device of the peer device A primary link is formed between the ports, and a backup link is formed between the backup port of the local device and the backup port of the peer device.
  • the primary port and the standby port may be uplink ports, and the primary port and the backup port of the local device may be one or more. Similarly, the primary port and the standby port of the peer device may also be one or more. .
  • port redirection refers to directing service data to a designated port and forwarding it by the designated port. For example, after receiving the data packet, the switch directly migrates the data packet to the designated port and forwards it by the designated port without determining the forwarding port of the data packet through MAC address learning.
  • the primary link is designated as the working link by the port redirection, that is, the control service data is transmitted only through the primary link, and the standby link has no service data.
  • the port is redirected to determine that the active link is the working link, and MAC address learning is not required, which can improve service data forwarding efficiency.
  • the primary link before the primary link is designated as the working link by port redirection, the primary link can be detected whether the primary link is in the path, that is, whether the primary link can normally transmit data, and if the primary link is detected. If the data can be transmitted normally, the service data can be directed to the active link through port redirection so that the active link acts as the working link.
  • Step S102 Detect whether the primary link has a fault.
  • step 103 when it is detected that there is a fault in the active link, step 103 is performed; otherwise, the process returns to step 102 or ends the process.
  • This embodiment is described by taking the return execution step 102 as an example.
  • Step S103 Switch the working link to a standby link by using port redirection.
  • the working link after detecting that the primary link is faulty, the working link can be switched to the standby link by using port redirection, that is, the service data is directly migrated to the standby link through port redirection.
  • the alternate link is transmitted, see Figure 3.
  • the working link is switched to the standby link by the port reconfiguration, and the operation of clearing the MAC address table of the original working port (that is, the active port) is not performed, and the MAC address learning is not performed, that is, the service data can be performed. Forwarding ensures that the user's service is not interrupted, reducing the time for link switching.
  • the local device and the peer device are both provided with an active port and a backup port, and the primary port of the local device is connected with the primary port of the peer device to form a primary link.
  • the standby port of the local device is connected to the standby port of the peer device to form a standby link, and the primary link is determined to be a working link by using port redirection; and detecting whether the primary link is faulty If it is detected that the primary link is faulty, the working link is switched to the standby link by port redirection. Because the link is switched through the port redirection in the case of a link fault, the operation of clearing the MAC address and learning the MAC address is not performed, and the link can be quickly switched to keep the user service uninterrupted.
  • the port corresponding to the working link can be set to the forwarding state (ie, the Forward state), and the port corresponding to the non-working link can be set to the blocking state (ie, the Block state).
  • the forwarding state ie, the Forward state
  • the blocking state ie, the Block state
  • the status of the primary port of the local device and the peer device is set to the forwarding state
  • the status of the standby port of the local device and the peer device is set to Blocking state.
  • the standby link is used as the working link
  • the status of the primary port of the local device and the peer device is set to the blocking state
  • the status of the standby port of the local device and the remote device is set to be forwarded. status.
  • the working link is determined by the port redirection, so the non-working link does not pass the service data, so that the status of the primary port and the standby port of the local device are both set to the forwarding state, and the peer device is The status of the primary port and the alternate port are also set to the forwarding state, and no loop is formed.
  • the primary port and the backup port of the local device may be set to the forwarding state
  • the primary port and the standby port of the peer device may also be set to the forwarding state. Since the state of the primary port and the standby port are both set to the forwarding state, the setting of the port forwarding state is not required at the time of link switching, and the time for link switching can be reduced.
  • an embodiment of the present disclosure further provides a link switching method.
  • the method can be applied to the local device and the peer device, and the local device and the peer device are both provided with an active port and a standby port, and the primary port of the local device and the peer device are used by the peer device.
  • the port is connected to form a primary link
  • the standby port of the local device is connected to the standby port of the peer device to form a standby link.
  • the link switching method includes the following steps:
  • Step S401 Direct service data to the primary port through port redirection, so that the primary link is a working link.
  • the local device and the peer device may be access devices, such as switches, routers, and the like.
  • the primary port of the local device is connected to the primary port of the peer device
  • the backup port of the local device is connected to the standby port of the peer device.
  • the primary port of the local device and the master device of the peer device A primary link is formed between the ports, and a backup link is formed between the backup port of the local device and the backup port of the peer device.
  • the primary port and the standby port may be uplink ports, and the primary port and the backup port of the local device may be one or more. Similarly, the primary port and the standby port of the peer device may also be one or more. .
  • port redirection refers to directing service data to a designated port and forwarding it by the designated port. For example, after receiving the data packet, the switch directly migrates the data packet to the designated port and forwards it by the designated port without determining the forwarding port of the data packet through MAC address learning.
  • the service data may be directed to the primary port through port redirection, so that the active link is the working link.
  • the service data can be migrated to the primary port of the local device through the port redirection on the local device side. Similarly, the service data is migrated to the peer device through the port redirection on the peer device side. The primary port, so that the service data is transmitted through the primary link. At this time, no service data is passed through the standby port of the local device and the standby port of the peer device, that is, the standby link has no service data transmission.
  • the configuration of the link switching mode may be performed in the local device and the peer device in advance, for example, the status of the primary port and the standby port are both set to the forwarding state (that is, In the Forward state, when the link protection switchover occurs, the settings of the primary port and the alternate port state are not performed, and the operation of clearing the MAC address table and learning the MAC address table are not performed.
  • the forwarding state that is, In the Forward state, when the link protection switchover occurs, the settings of the primary port and the alternate port state are not performed, and the operation of clearing the MAC address table and learning the MAC address table are not performed.
  • Step S402 Detect whether the primary link has a fault.
  • the detecting whether the primary link has a fault may include: detecting an on/off state of the primary port, where if the primary port is in an open state, determining the primary The link is faulty; and/or detecting whether the logical link corresponding to the primary port has a fault, wherein if the logical link has a fault, determining that the primary link is faulty.
  • detecting whether the logical link corresponding to the primary port (that is, the logical link of the primary link) has a fault can be detected by using a PING (Packet Internet Groper) to detect whether the logical link exists.
  • PING Packet Internet Groper
  • the ICMP Internet Control Message Protocol
  • the ICMP response packet from the peer device is not received, the logical chain is determined. The road is faulty.
  • the ICMP data packet may be sent to the peer device to the peer device at a preset time. If the ICMP acknowledgment packet from the peer device is not received for N consecutive times, the logical link is determined to be faulty. It is a positive integer, and its value can be set according to the actual situation.
  • Step S403 If it is detected that the primary link is faulty, the service data is directed to the standby port by port redirection to switch the working link to the standby link.
  • the port redirection configuration may be performed on the local device and the peer device in advance.
  • the mapping relationship between the service data and the port may be pre-configured in the local device and the peer device.
  • the service data and the primary port can be corresponding to each other in the local device and the remote device, and after receiving the service data, the service data is directly directed to the primary port, and is used by the primary device.
  • the port is forwarded.
  • the mapping between the service data and the port can be reset, the service data is matched with the backup port, and after receiving the service data, the data is directly directed to the standby port and passed.
  • the alternate port is forwarded.
  • the directing the service data to the primary port by using the port redirection may include: directing service data to the primary port according to the first access control list, so that the primary link For the working link, if it is detected that the primary link is faulty, the service data is directed to the standby port by using port redirection, including: detecting that the primary link is faulty And directing the service data to the alternate port according to a second access control list.
  • the port redirection configuration may be directly performed based on the access control mechanisms of the primary device and the remote device.
  • the correspondence between the service data and the port can be configured based on an Access Control List (ACL).
  • ACL Access Control List
  • the second access control list may be an access control table obtained by reconfiguring the first access control list.
  • the port redirection configuration can be as follows:
  • the port redirection configuration can be as follows:
  • port redirection is configured based on the access control mechanism of the primary device and the peer device, so that the modification operations on the primary device and the remote device can be reduced.
  • the link switching method of the embodiment of the present disclosure directs service data to the primary port through port redirection, so that the primary link is a working link; and detects whether the primary link has a fault; if the detected The primary link is faulty, and the service data is directed to the alternate port through port redirection to switch the working link to the standby link.
  • the embodiment of the present disclosure implements link protection switching by using port redirection, and does not need to perform operations such as clearing the MAC address, MAC address learning, and port state setting during the link switching process, which greatly shortens the link switching time and keeps the user service uninterrupted.
  • the link switching method in this embodiment can be applied to both the local device and the peer device without affecting the service between the local device and the peer device.
  • the link switching method of the embodiment of the present disclosure includes the following steps:
  • Step a defining a link protection switching mode.
  • the state of the primary port of the UAPS is set to the Forward state, and the state of the alternate port is set to the Block state.
  • the UAPS sets the status of the primary port to the Block state and then sets the status of the alternate port to the Forward state. Then clear the MAC address learned on the primary port. Due to the difference in hardware of the device and the size of the MAC address entry, the time required for the entire link protection switching process is unstable and time consuming.
  • the state of the primary port and the standby port of the UAPS are both set to the Forward state. When the link protection switchover occurs, the state of the port is not set, and the MAC address table is not cleared.
  • Step b The link protection switching mode is configured on both the local device and the peer device.
  • the status of the primary port is set to the Forward state, and the state of the standby port is set to the Block state. Therefore, the UAPS can only be applied to the local device, but the UAPS cannot be applied to the peer device.
  • the service between the local device and the remote device is unreachable.
  • the link protection switching mode can be applied to both the local device and the remote device, and the service between the local device and the remote device is not affected.
  • the local device and the peer device are both provided with an active port and a standby port.
  • the primary port of the local device is connected to the primary port of the peer device, and the standby port of the local device is The standby port of the peer device is connected.
  • step c if the link detects a fault, the link is switched through port redirection.
  • the local device is migrated to the active port through port redirection on the local device, and the local device is redirected to the active port through the port redirection on the peer device.
  • the status of the primary port and the standby port are both in the forward state, because the port is redirected, the standby port is unreachable and does not form a ring.
  • the service is automatically switched to the standby port, as shown in Figure 3.
  • the device is redirected to the backup port through the port redirection.
  • the remote device migrates the service to the backup port through port redirection.
  • the link switching time T (switch) of the existing UAPS includes: link detection time T (LinkDect), port state setting time T (SetStp), clear MAC address table time T (ClearMac), and MAC.
  • Address learning time T (MacLearn) namely:
  • the link switching time T (newswitch) of the link switching method provided by the embodiment of the present disclosure includes: link detection time T (LinkDect) and port setting redirection time T (SetReDirect), namely:
  • the link switching method of the embodiment of the present disclosure shields the hardware difference, and does not need to clear the MAC address table, which can greatly reduce the link switching time, and even reduce the link switching time to several milliseconds, reducing the link failure. The impact of the network, keeping the business uninterrupted.
  • an embodiment of the present disclosure provides a link switching device, which is applied to a local device and a peer device, where the local device and the peer device are both provided with an active port and a standby port.
  • the primary port of the local device is connected to the primary port of the peer device to form a primary link
  • the standby port of the local device is connected to the standby port of the peer device to form a backup link.
  • the link switching device 50 includes:
  • the determining module 51 is configured to determine, by using port redirection, that the active link is a working link
  • the detecting module 52 is configured to detect whether the primary link has a fault
  • the switching module 53 is configured to switch the working link to the standby link by port redirection if it is detected that the primary link is faulty.
  • the status of the primary port and the backup port of the local device can be set to the forwarding state, and the status of the primary port and the standby port of the peer device can also be set to the forwarding state.
  • the determining module 51 may include: a first targeting unit configured to direct service data to the primary port by port redirection, so that the primary link is the working link
  • the switching module 53 includes: a second directional unit configured to direct the service data to the standby port by port redirection to detect the fault of the primary link, to configure the working link Switch to the alternate link.
  • the first targeting unit may be configured to direct service data to the primary port according to the first access control list, so that the primary link is the working link;
  • the second targeting unit is configured to direct the service data to the standby port according to the second access control list if it is detected that the primary link is faulty.
  • the detecting module 52 may be configured to: detect an on/off state of the primary port, where, if the primary port is in an off state, determine that the primary link is faulty; and And detecting whether there is a fault in the logical link corresponding to the primary port, wherein if the logical link has a fault, determining that the primary link is faulty.
  • the link switching device 50 of the embodiment of the present disclosure determines that the primary link is a working link through the port redirection by the determining module 51; the detecting module 52 detects whether the primary link has a fault; if the switching module 53 detects If there is a fault to the primary link, the working link is switched to the standby link by port redirection. Because the link is switched through the port redirection in the case of a link fault, the operation of clearing the MAC address and learning the MAC address is not performed, and the link can be quickly switched to keep the user service uninterrupted.
  • an embodiment of the present disclosure provides an electronic device including an active port 61, a spare port 62, a memory 63, a processor 64, and a memory 64 and may be stored in the processor 64.
  • the running computer program 631 the primary port 61 corresponds to the primary link, the backup port 62 corresponds to the standby link, and the processor 64 executes the program 631 to implement the following steps:
  • the working link is switched to the standby link by port redirection.
  • the status of the primary port and the backup port of the local device can be set to the forwarding state, and the status of the primary port and the standby port of the peer device are also set to the forwarding state.
  • the determining that the primary link is a working link by port redirection may include: directing service data to the primary port by using port redirection, so that the primary link is The working link is configured to: if the primary link is faulty, switch the working link to the standby link by using port redirection, including: detecting the primary link There is a failure to direct the traffic data to the alternate port through port redirection to switch the working link to the alternate link.
  • the directing the service data to the primary port by using the port redirection may include: directing service data to the primary port according to the first access control list, so that the primary link For the working link, if it is detected that the primary link is faulty, the service data is directed to the standby port by using port redirection, including: detecting that the primary link is faulty And directing the service data to the alternate port according to a second access control list.
  • the detecting whether the primary link has a fault may include: detecting an on/off state of the primary port, where if the primary port is in an open state, determining the primary The link is faulty; and/or detecting whether the logical link corresponding to the primary port has a fault, wherein if the logical link has a fault, determining that the primary link is faulty.
  • An embodiment of the present disclosure provides a computer readable storage medium having stored thereon a computer program, wherein the program is executed by a processor to implement the link switching method described in any one of the foregoing method embodiments.
  • the working link is switched to the standby link by port redirection.
  • the status of the primary port and the backup port of the local device can be set to the forwarding state, and the status of the primary port and the standby port of the peer device are also set to the forwarding state.
  • the determining that the primary link is a working link by port redirection may include: directing service data to the primary port by using port redirection, so that the primary link is The working link is configured to: if the primary link is faulty, switch the working link to the standby link by using port redirection, including: detecting the primary link There is a failure to direct the traffic data to the alternate port through port redirection to switch the working link to the alternate link.
  • the directing the service data to the primary port by using the port redirection may include: directing service data to the primary port according to the first access control list, so that the primary link For the working link, if it is detected that the primary link is faulty, the service data is directed to the standby port by using port redirection, including: detecting that the primary link is faulty And directing the service data to the alternate port according to a second access control list.
  • the detecting whether the primary link has a fault may include: detecting an on/off state of the primary port, where if the primary port is in an open state, determining the primary The link is faulty; and/or detecting whether the logical link corresponding to the primary port has a fault, wherein if the logical link has a fault, determining that the primary link is faulty.
  • An embodiment of the present disclosure provides a computer readable storage medium having stored thereon a computer program, wherein the program is executed by a processor to implement the link switching method described in any one of the foregoing method embodiments.
  • the local device and the peer device are both provided with an active port and a backup port, and the primary port of the local device is connected with the primary port of the peer device to form a primary link.
  • the standby port of the local device is connected to the standby port of the peer device to form a standby link, and the primary link is determined to be a working link by using port redirection; and detecting whether the primary link exists Failure; if it is detected that the primary link is faulty, the working link is switched to the standby link by port redirection. Because the link is switched through the port redirection in the case of a link fault, the operation of clearing the MAC address and learning the MAC address is not performed, and the link can be quickly switched to keep the user service uninterrupted.
  • computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer.
  • communication media typically includes computer readable instructions, data structures, program modules or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .

Abstract

提供了一种链路切换方法及装置。本端设备和对端设备均设置有主用端口和备用端口,所述本端设备的主用端口与所述对端设备的主用端口连接,形成主用链路,所述本端设备的备用端口与所述对端设备的备用端口连接,形成备用链路,该方法包括:通过端口重定向确定所述主用链路为工作链路(S101);检测所述主用链路是否存在故障(S102);若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路(S103)。

Description

一种链路切换方法及装置 技术领域
本公开涉及通信技术领域,特别涉及一种链路切换方法及装置。
背景技术
UAPS(Uplink Automatic Protection Switching,上联口自动保护切换)主要实现上联端口的自动保护切换功能。UAPS配置在本端设备上,当工作上联端口出现故障时,本端设备先设置工作上联端口和备用上联端口的转发状态,再清除工作上联端口的MAC(Medium Access Control,媒体访问控制)地址,自动将业务切换至备用上联端口。由于本端设备和对端设备硬件的差异性,设置端口转发状态、清除MAC地址以及端口MAC地址学习所需的时间不确定,导致链路保护切换过程较为耗时,对用户业务造成影响。针对链路保护切换较为耗时的问题,目前尚未提出有效的解决方案。
发明概述
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
针对链路保护切换较为耗时的问题,本公开实施例提供了一种链路切换方法及装置。
本公开实施例提供了一种链路切换方法,本端设备和对端设备均设置有主用端口和备用端口,所述本端设备的主用端口与所述对端设备的主用端口连接,形成主用链路,所述本端设备的备用端口与所述对端设备的备用端口连接,形成备用链路,所述方法包括:
通过端口重定向确定所述主用链路为工作链路;
检测所述主用链路是否存在故障;
若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路。
本公开实施例还提供了一种链路切换装置,应用于本端设备和对端设备,所述本端设备和对端设备均设置有主用端口和备用端口,所述本端设备的主用端口与所述对端设备的主用端口连接,形成主用链路,所述本端设备的备用端口与所述对端设备的备用端口连接,形成备用链路,所述装置包括:
确定模块,设置为通过端口重定向确定所述主用链路为工作链路;
检测模块,设置为检测所述主用链路是否存在故障;
切换模块,设置为若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路。
本公开实施例还提供了一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现上述的链路切换方法。
本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现上述的链路切换方法。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为本公开实施例提供的链路切换方法的流程图;
图2为本公开实施例提供的上联链路保护组网的示意图;
图3为本公开实施例提供的上联链路保护切换的示意图;
图4为本公开又一实施例提供的链路切换方法的流程图;
图5为本公开实施例提供的链路切换装置的示意图;
图6为本公开实施例提供的电子设备的示意图。
详述
下面将结合附图及实施例进行详细描述。
如图1所示,本公开实施例提供一种链路切换方法。该方法可以应用于本端设备和对端设备,所述本端设备和对端设备均设置有主用端口和备用端口,所述本端设备的主用端口与所述对端设备的主用端口连接,形成主用链 路,所述本端设备的备用端口与所述对端设备的备用端口连接,形成备用链路。该链路切换方法包括以下步骤:
步骤S101、通过端口重定向确定主用链路为工作链路。
本实施例中,本端设备和对端设备可以是接入设备,例如,交换机、路由器等。参见图2,本端设备的主用端口和对端设备的主用端口相连,本端设备的备用端口和对端设备的备用端口相连,从而本端设备的主用端口和对端设备的主用端口之间形成主用链路,本端设备的备用端口和对端设备的备用端口之间形成备用链路。主用端口和备用端口可以是上联端口,本端设备的主用端口和备用端口可以一个或是多个,同样的,对端设备的主用端口和备用端口也可以是一个或是多个。
本实施例中,端口重定向是指将业务数据定向至指定端口,并由该指定端口进行转发。例如,交换机在接收到数据包后直接将该数据包迁移至指定端口,并由该指定端口进行转发,而无需通过MAC地址学习确定该数据包的转发端口。
本实施例可以通过端口重定向指定主用链路为工作链路,也即控制业务数据仅通过主用链路进行传输,而备用链路没有业务数据通过。由于本实施例通过端口重定向确定主用链路为工作链路,无需进行MAC地址学习,可以提高业务数据转发效率。
本实施例在通过端口重定向指定主用链路为工作链路之前,可以先检测主用链路是否处于通路,也即检测主用链路是否可以正常传输数据,若检测出主用链路可以正常传输数据,则可以通过端口重定向将业务数据定向至主用链路,以使主用链路作为工作链路。
步骤S102、检测所述主用链路是否存在故障。
本实施例中,在检测到主用链路存在故障时,执行步骤103,否则返回执行步骤102,或是结束流程。本实施例以返回执行步骤102为例进行说明。
步骤S103、通过端口重定向将所述工作链路切换为备用链路。
本实施例中,在检测到主用链路发生故障后,可以通过端口重定向将所述工作链路切换为备用链路,也即通过端口重定向直接将业务数据迁移至备用链路,通过备用链路进行传输,参见图3。由于本实施例是通过端口重定 将工作链路切换为备用链路,无需执行清除原工作端口(也即主用端口)的MAC地址表的操作,也无需进行MAC地址学习,即可以进行业务数据转发,保证用户业务不中断,减少了链路切换的时间。
本公开实施例中,本端设备和对端设备均设置有主用端口和备用端口,所述本端设备的主用端口与所述对端设备的主用端口连接,形成主用链路,所述本端设备的备用端口与所述对端设备的备用端口连接,形成备用链路,通过端口重定向确定所述主用链路为工作链路;检测所述主用链路是否存在故障;若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路。由于在链路故障时通过端口重定向进行链路切换,因而可以不执行清除MAC地址、MAC地址学习等操作,可以实现链路的快速切换,保持用户业务不中断。
在本实施例中,可以将工作链路对应的端口设置为转发状态(即Forward状态),将非工作链路对应的端口设置为阻塞状态(即Block状态)。例如,若确定主用链路为工作链路,则将本端设备和对端设备的主用端口的状态均设置为转发状态,将本端设备和对端设备的备用端口的状态均设置为阻塞状态。而在切换备用链路作为工作链路时,则将本端设备和对端设备的主用端口的状态均设置为阻塞状态,将本端设备和对端设备的备用端口的状态均设置为转发状态。
由于本实施例是通过端口重定向确定工作链路的,因此非工作链路并不通业务数据,从而可以将本端设备的主用端口和备用端口的状态均设置为转发状态,将对端设备的主用端口和备用端口的状态也均设置为转发状态,而并不会形成环路。
在本实施例中,所述本端设备的主用端口和备用端口可以均设置为转发状态,所述对端设备的主用端口和备用端口也可以均设置为转发状态。由于本实施例将主用端口和备用端口的状态均设置为转发状态,从而在链路切换时无需进行端口转发状态的设置,可以减少链接切换的时间。
如图4所示,本公开实施例还提供一种链路切换方法。该方法可以应用于本端设备和对端设备,所述本端设备和对端设备均设置有主用端口和备用端口,所述本端设备的主用端口与所述对端设备的主用端口连接,形成主用 链路,所述本端设备的备用端口与所述对端设备的备用端口连接,形成备用链路。该链路切换方法包括以下步骤:
步骤S401、通过端口重定向将业务数据定向到主用端口,以使主用链路为工作链路。
本实施例中,本端设备和对端设备可以是接入设备,例如,交换机、路由器等。参见图2,本端设备的主用端口和对端设备的主用端口相连,本端设备的备用端口和对端设备的备用端口相连,从而本端设备的主用端口和对端设备的主用端口之间形成主用链路,本端设备的备用端口和对端设备的备用端口之间形成备用链路。主用端口和备用端口可以是上联端口,本端设备的主用端口和备用端口可以一个或是多个,同样的,对端设备的主用端口和备用端口也可以是一个或是多个。
本实施例中,端口重定向是指将业务数据定向至指定端口,并由该指定端口进行转发。例如,交换机在接收到数据包后直接将该数据包迁移至指定端口,并由该指定端口进行转发,而无需通过MAC地址学习确定该数据包的转发端口。本实施例可以通过端口重定向将业务数据定向到所述主用端口,以使所述主用链路为所述工作链路。
在本实施例中,可以在本端设备侧通过端口重定向将业务数据迁移至本端设备的主用端口,同样的,在对端设备侧通过端口重定向将业务数据迁移至对端设备的主用端口,从而业务数据通过主用链路进行传输。此时,本端设备的备用端口和对端设备的备用端口均没有业务数据通过,也即备用链路没有业务数据传输。
在本实施例中,在执行上述步骤401之前,可以预先在本端设备和对端设备进行链路切换方式的配置,例如,将主用端口和备用端口的状态均设置为转发状态(也即Forward状态),发生链路保护切换时,不执行主用端口和备用端口状态的设置,不执行MAC地址表的清除和MAC地址表的学习等操作。
步骤S402、检测所述主用链路是否存在故障。
本实施例中,可以通过分别检测主用链路的物理链路和逻辑链路是否存在故障以确定主用链路是否存在故障,若主用链路的物理链路和逻辑链路中 任一个存在故障,则确定主用链路故障。
本实施例中,所述检测所述主用链路是否存在故障,可以包括:检测所述主用端口的通断状态,其中,若所述主用端口处于断开状态,则确定所述主用链路存在故障;和/或检测所述主用端口对应的逻辑链路是否存在故障,其中,若所述逻辑链路存在故障,则确定所述主用链路存在故障。
本实施例中,可以通过检测主用端口的通断状态(也即Link Down状态或Link Up状态)判断主用链路的物理链路是否存在故障,当检测到主用端口处于断开状态(也即Link Down状态),则确定主用链路的物理链路存在故障,从而也确定主用链路存在故障。
本实施例中,检测所述主用端口对应的逻辑链路(也即主用链路的逻辑链路)是否存在故障可以通过PING(Packet Internet Groper,互联网包探索器)检测逻辑链路是否存在故障,例如,可以通过本端设备的PING发送ICMP(Internet Control Message Protocol,互联网控制报文协议)数据包给对端设备,若没有收到来自对端设备的ICMP应答数据包,则确定逻辑链路存在故障。
本实施例可以每隔预设时间向对端设备发送ICMP数据包给对端设备,若连续N次没有收到来自对端设备的ICMP应答数据包,则确定逻辑链路存在故障,其中,N为正整数,其取值可以根据实际情况进行设置。
步骤S403、若检测到所述主用链路存在故障,通过端口重定向将所述业务数据定向到备用端口,以将所述工作链路切换为备用链路。
本实施例中,可以预先在本端设备和对端设备进行端口重定向配置,例如,可以在本端设备和对端设备中预先配置业务数据和端口的映射关系。例如,在通过主用链路传输业务数据时,可以在本端设备和对端设备中将业务数据和主用端口进行对应,在接收到业务数据后直接定向至主用端口,并通过主用端口进行转发;而在通过备用链路传输业务数据时,则可以重置业务数据和端口的映射关系,将业务数据和备用端口进行对应,在接收到业务数据后直接定向至备用端口,并通过备用端口进行转发。
本实施例中,所述通过端口重定向将业务数据定向到所述主用端口,可以包括:根据第一访问控制表将业务数据定向到所述主用端口,以使所述主 用链路为所述工作链路;所述若检测到所述主用链路存在故障,通过端口重定向将所述业务数据定向到所述备用端口,包括:若检测到所述主用链路存在故障,根据第二访问控制表将所述业务数据定向到所述备用端口。
本实施例中,为了减少对主端设备和对端设备的修改操作,可以直接基于主端设备和对端设备的访问控制机制进行端口重定向的配置。例如,可以基于访问控制表(Access Control List,简称为ACL)中配置业务数据和端口的对应关系。上述第二访问控制表可以是重配置第一访问控制表得到的访问控制表。
例如,以本端设备或对端设备为S3600交换机为例,交换机Ethernet1/0/1下接10.1.1.1/24网段,将来自10.1.1.1/24网段的流量均重定向到交换机的Ethernet1/0/7,端口重定向配置可以如下:
[H3C]acl number 2000
[H3C-acl-basic-2000]rule permit source 10.1.1.0.0.255
[H3C-acl-basic-2000]quit
[H3C-Ethernet1/0/]traffic-redirect inbound in-group 2000 interface Ethernet1/0/7。
在将来自10.1.1.1/24网段的流量切换重定向到交换机的Ethernet1/0/3时,则端口重定向配置可以如下:
[H3C]acl number 2000
[H3C-acl-basic-2000]rule permit source 10.1.1.0.0.255
[H3C-acl-basic-2000]quit
[H3C-Ethernet1/0/]traffic-redirect inbound in-group 2000 interface Ethernet1/0/3。
本实施例基于主端设备和对端设备的访问控制机制进行端口重定向的配置,从而可以减少对主端设备和对端设备的修改操作。
本公开实施例的链路切换方法,通过端口重定向将业务数据定向到主用端口,以使主用链路为工作链路;检测所述主用链路是否存在故障;若检测到所述主用链路存在故障,通过端口重定向将所述业务数据定向到备用端口,以将所述工作链路切换为备用链路。本公开实施例通过端口重定向实现 链路保护切换,在链路切换过程无需执行清除MAC地址、MAC地址学习、端口的状态设置等操作,大大缩短了链路切换的时间,保持用户业务不中断。此外,本实施例的链路切换方法可以同时应用于本端设备和对端设备,而不会影响本端设备和对端设备之间的业务。
以下结合示例对本公开实施例进行说明,本公开实施例的链路切换方法包括如下步骤:
步骤a,定义链路保护切换方式。
在一些情况下,UAPS的主用端口的状态设置为Forward状态,备用端口的状态设置为Block状态。主用端口切换至备用端口时,UAPS将主用端口的状态设置为Block状态,再将备用端口的状态设置为Forward状态。之后将主用端口上学到的MAC地址清除。由于设备硬件的差异性,以及MAC地址表项的规模会导致整个链路保护切换过程所需的时间不稳定,且耗时。而本实施例中,将UAPS的主用端口和备用端口的状态均设置为Forward状态,在发生链路保护切换时,不进行端口的状态的设置,不进行MAC地址表的清除。
步骤b,在本端设备和对端设备均配置上述链路保护切换方式。
在一些情况下,UAPS工作时,设置主用端口的状态为Forward状态,设置备用端口的状态为Block状态,因此只能在本端设备上应用UAPS,而对端设备不能应用UAPS,否则会造成本端设备和远端设备之间的业务不通。而本实施例中,上述链路保护切换方式可以同时应用在本端设备和对端设备上,而且不会影响本端设备和对端设备之间的业务。
本实施例中,参见图2,本端设备和对端设备均设置有主用端口和备用端口,本端设备的主用端口与对端设备的主用端口相连,本端设备的备用端口与对端设备的备用端口相连。
步骤c,若链路检测到故障,通过端口重定向进行链路切换。
本实施例中,在本端设备上通过端口重定向,将业务数据迁移至主用端口,在对端设备上,将本端设备通过端口重定向,将业务迁移至主用端口。虽然主用端口和备用端口的状态均为Forward状态,因为端口重定向,备用端口是不通业务的,不会形成环。
当本端设备和/或对端设备检测到链路故障时,例如,主用端口发生Link Down,或者PING测试失败,自动将业务切换至备用端口,如图3所示。切换时,在本端设备上通过端口重定向,将业务迁移至备用端口,远端设备上通过端口重定向将业务迁移至备用端口,实现链路保护切换,保持业务不中断。
由上可知,现有的UAPS的链路切换时间T(switch),包括:链路检测时间T(LinkDect),端口状态设置时间T(SetStp),清除MAC地址表时间T(ClearMac),以及MAC地址学习时间T(MacLearn),即:
T(switch)=T(LinkDect)+T(SetStp)+T(ClearMac)+T(MacLearn)
而本公开实施例提供的链路切换方法的链路切换时间T(newswitch),包括:链路检测时间T(LinkDect)和端口设置重定向时间T(SetReDirect),即:
T(newswitch)=T(LinkDect)+T(SetReDirect)
由于本端设备和对端设备的硬件差异以及MAC地址表项的规模,会导致T(SetStp)、T(ClearMac)和T(MacLearn)时间不固定且较为耗时,最大切换时间会出现几十秒的情况,而本公开实施例的链路切换方法屏蔽了硬件差异,同时不用清除MAC地址表,可以大大降低链路切换时间,甚至将链路切换时间降低至几毫秒,减少链路故障对网络造成的影响,保持业务不中断。
如图5所示,本公开实施例提供一种链路切换装置,应用于本端设备和对端设备,其中,所述本端设备和对端设备均设置有主用端口和备用端口,所述本端设备的主用端口与所述对端设备的主用端口连接,形成主用链路,所述本端设备的备用端口与所述对端设备的备用端口连接,形成备用链路,该链路切换装置50包括:
确定模块51,设置为通过端口重定向确定所述主用链路为工作链路;
检测模块52,设置为检测所述主用链路是否存在故障;
切换模块53,设置为若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路。
本实施例中,所述本端设备的主用端口和备用端口的状态均可以设置为转发状态,所述对端设备的主用端口和备用端口的状态也均可以设置为转发状态。
本实施例中,所述确定模块51可以包括:第一定向单元,设置为通过端口重定向将业务数据定向到所述主用端口,以使所述主用链路为所述工作链路;所述切换模块53包括:第二定向单元,设置为若检测到所述主用链路存在故障,通过端口重定向将所述业务数据定向到所述备用端口,以将所述工作链路切换为所述备用链路。
本实施例中,所述第一定向单元可以设置为:根据第一访问控制表将业务数据定向到所述主用端口,以使所述主用链路为所述工作链路;所述第二定向单元设置为:若检测到所述主用链路存在故障,根据第二访问控制表将所述业务数据定向到所述备用端口。
本实施例中,所述检测模块52可以设置为:检测所述主用端口的通断状态,其中,若所述主用端口处于断开状态,则确定所述主用链路存在故障;和/或检测所述主用端口对应的逻辑链路是否存在故障,其中,若所述逻辑链路存在故障,则确定所述主用链路存在故障。
本公开实施例的链路切换装置50,通过确定模块51通过端口重定向确定所述主用链路为工作链路;检测模块52检测所述主用链路是否存在故障;切换模块53若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路。由于在链路故障时通过端口重定向进行链路切换,因而可以不执行清除MAC地址、MAC地址学习等操作,可以实现链路的快速切换,保持用户业务不中断。
参见图6,本公开实施例提供一种电子设备,该电子设备60包括主用端口61、备用端口62、存储器63、处理器64及存储在所述存储器63上并可在所述处理器64上运行的计算机程序631,所述主用端口61对应于主用链路,所述备用端口62对应于备用链路,所述处理器64执行所述程序631时实现如下步骤:
通过端口重定向确定所述主用链路为工作链路;
检测所述主用链路是否存在故障;
若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路。
本实施例中,所述本端设备的主用端口和备用端口的状态均可以设置为 转发状态,所述对端设备的主用端口和备用端口的状态也均设置为转发状态。
本实施例中,所述通过端口重定向确定所述主用链路为工作链路,可以包括:通过端口重定向将业务数据定向到所述主用端口,以使所述主用链路为所述工作链路;所述若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路,包括:若检测到所述主用链路存在故障,通过端口重定向将所述业务数据定向到所述备用端口,以将所述工作链路切换为所述备用链路。
本实施例中,所述通过端口重定向将业务数据定向到所述主用端口,可以包括:根据第一访问控制表将业务数据定向到所述主用端口,以使所述主用链路为所述工作链路;所述若检测到所述主用链路存在故障,通过端口重定向将所述业务数据定向到所述备用端口,包括:若检测到所述主用链路存在故障,根据第二访问控制表将所述业务数据定向到所述备用端口。
本实施例中,所述检测所述主用链路是否存在故障,可以包括:检测所述主用端口的通断状态,其中,若所述主用端口处于断开状态,则确定所述主用链路存在故障;和/或检测所述主用端口对应的逻辑链路是否存在故障,其中,若所述逻辑链路存在故障,则确定所述主用链路存在故障。
本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现上述任一方法实施例所述的链路切换方法。
本领域普通技术人员可以理解实现上述实施例方法的全部或者部分步骤是可以通过程序指令相关的硬件来完成,所述的程序可以存储于一计算机可读取介质中,该程序在执行时,包括以下步骤:
通过端口重定向确定所述主用链路为工作链路;
检测所述主用链路是否存在故障;
若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路。
本实施例中,所述本端设备的主用端口和备用端口的状态均可以设置为转发状态,所述对端设备的主用端口和备用端口的状态也均设置为转发状 态。
本实施例中,所述通过端口重定向确定所述主用链路为工作链路,可以包括:通过端口重定向将业务数据定向到所述主用端口,以使所述主用链路为所述工作链路;所述若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路,包括:若检测到所述主用链路存在故障,通过端口重定向将所述业务数据定向到所述备用端口,以将所述工作链路切换为所述备用链路。
本实施例中,所述通过端口重定向将业务数据定向到所述主用端口,可以包括:根据第一访问控制表将业务数据定向到所述主用端口,以使所述主用链路为所述工作链路;所述若检测到所述主用链路存在故障,通过端口重定向将所述业务数据定向到所述备用端口,包括:若检测到所述主用链路存在故障,根据第二访问控制表将所述业务数据定向到所述备用端口。
本实施例中,所述检测所述主用链路是否存在故障,可以包括:检测所述主用端口的通断状态,其中,若所述主用端口处于断开状态,则确定所述主用链路存在故障;和/或检测所述主用端口对应的逻辑链路是否存在故障,其中,若所述逻辑链路存在故障,则确定所述主用链路存在故障。
本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现上述任一方法实施例所述的链路切换方法。
根据本公开实施例中,本端设备和对端设备均设置有主用端口和备用端口,所述本端设备的主用端口与所述对端设备的主用端口连接,形成主用链路,所述本端设备的备用端口与所述对端设备的备用端口连接,形成备用链路,通过端口重定向确定所述主用链路为工作链路;检测所述主用链路是否存在故障;若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路。由于在链路故障时通过端口重定向进行链路切换,因而可以不执行清除MAC地址、MAC地址学习等操作,可以实现链路的快速切换,保持用户业务不中断。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步 骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
以上所述是本公开的示例性实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本公开所述原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本公开的保护范围。

Claims (12)

  1. 一种链路切换方法,其中,本端设备和对端设备均设置有主用端口和备用端口,所述本端设备的主用端口与所述对端设备的主用端口连接,形成主用链路,所述本端设备的备用端口与所述对端设备的备用端口连接,形成备用链路,所述方法包括:
    通过端口重定向确定所述主用链路为工作链路(S101);
    检测所述主用链路是否存在故障(S102);
    若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路(S103)。
  2. 根据权利要求1所述的方法,其中,所述本端设备的主用端口和备用端口的状态均设置为转发状态,所述对端设备的主用端口和备用端口的状态也均设置为转发状态。
  3. 根据权利要求1或2所述的方法,其中,
    所述通过端口重定向确定所述主用链路为工作链路(S101),包括:通过端口重定向将业务数据定向到所述主用端口,以使所述主用链路为所述工作链路(S401);
    所述若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路(S103),包括:若检测到所述主用链路存在故障,通过端口重定向将所述业务数据定向到所述备用端口,以将所述工作链路切换为所述备用链路(S403)。
  4. 根据权利要求3所述的方法,其中,所述通过端口重定向将业务数据定向到所述主用端口(S401),包括:根据第一访问控制表将业务数据定向到所述主用端口,以使所述主用链路为所述工作链路;
    所述若检测到所述主用链路存在故障,通过端口重定向将所述业务数据定向到所述备用端口(S403),包括:若检测到所述主用链路存在故障,根据第二访问控制表将所述业务数据定向到所述备用端口。
  5. 根据权利要求1或2所述的方法,其中,所述检测所述主用链路是否存在故障(S102),包括:
    检测所述主用端口的通断状态,其中,若所述主用端口处于断开状态,则确定所述主用链路存在故障;或
    检测所述主用端口对应的逻辑链路是否存在故障,其中,若所述逻辑链路存在故障,则确定所述主用链路存在故障;或
    检测所述主用端口的通断状态,其中,若所述主用端口处于断开状态,则确定所述主用链路存在故障,以及,检测所述主用端口对应的逻辑链路是否存在故障,其中,若所述逻辑链路存在故障,则确定所述主用链路存在故障。
  6. 一种链路切换装置(50),其中,应用于本端设备和对端设备,其中,所述本端设备和对端设备均设置有主用端口和备用端口,所述本端设备的主用端口与所述对端设备的主用端口连接,形成主用链路,所述本端设备的备用端口与所述对端设备的备用端口连接,形成备用链路,所述装置包括:
    确定模块(51),设置为通过端口重定向确定所述主用链路为工作链路;
    检测模块(52),设置为检测所述主用链路是否存在故障;
    切换模块(53),设置为若检测到所述主用链路存在故障,则通过端口重定向将所述工作链路切换为所述备用链路。
  7. 根据权利要求6所述的装置,其中,所述本端设备的主用端口和备用端口的状态均设置为转发状态,所述对端设备的主用端口和备用端口的状态也均设置为转发状态。
  8. 根据权利要求6或7所述的装置,其中,所述确定模块(51)包括:第一定向单元,设置为通过端口重定向将业务数据定向到所述主用端口,以使所述主用链路为所述工作链路;
    所述切换模块(53)包括:第二定向单元,设置为若检测到所述主用链路存在故障,通过端口重定向将所述业务数据定向到所述备用端口,以将所述工作链路切换为所述备用链路。
  9. 根据权利要求8所述的装置,其中,所述第一定向单元设置为:根据第一访问控制表将业务数据定向到所述主用端口,以使所述主用链路为所述工作链路;
    所述第二定向单元设置为:若检测到所述主用链路存在故障,根据第二 访问控制表将所述业务数据定向到所述备用端口。
  10. 根据权利要求6或7所述的装置,其中,所述检测模块(52)设置为:
    检测所述主用端口的通断状态,其中,若所述主用端口处于断开状态,则确定所述主用链路存在故障;或
    检测所述主用端口对应的逻辑链路是否存在故障,其中,若所述逻辑链路存在故障,则确定所述主用链路存在故障;或
    检测所述主用端口的通断状态,其中,若所述主用端口处于断开状态,则确定所述主用链路存在故障,以及,检测所述主用端口对应的逻辑链路是否存在故障,其中,若所述逻辑链路存在故障,则确定所述主用链路存在故障。
  11. 一种电子设备(60),包括存储器(63)、处理器(64)及存储在所述存储器(63)上并可在所述处理器(64)上运行的计算机程序(631),其中,所述处理器执行所述程序时实现如权利要求1至5任一项所述的链路切换方法。
  12. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求1至5任一项所述的链路切换方法。
PCT/CN2018/088716 2017-06-30 2018-05-28 一种链路切换方法及装置 WO2019001197A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710523951.0 2017-06-30
CN201710523951.0A CN109218045A (zh) 2017-06-30 2017-06-30 一种链路切换方法及装置

Publications (1)

Publication Number Publication Date
WO2019001197A1 true WO2019001197A1 (zh) 2019-01-03

Family

ID=64740987

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/088716 WO2019001197A1 (zh) 2017-06-30 2018-05-28 一种链路切换方法及装置

Country Status (2)

Country Link
CN (1) CN109218045A (zh)
WO (1) WO2019001197A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110267285A (zh) * 2019-06-28 2019-09-20 京信通信系统(中国)有限公司 主备链路切换方法、装置和数字交换机
CN114640574A (zh) * 2022-02-28 2022-06-17 天翼安全科技有限公司 一种主备设备的切换方法及装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110086658B (zh) * 2019-04-11 2022-09-30 平安科技(深圳)有限公司 接口切换方法、装置及计算机可读存储介质
CN110995585A (zh) * 2019-12-10 2020-04-10 武汉瑞盈通网络技术有限公司 一种链路非负载分担保护方法
CN113315802A (zh) * 2020-07-27 2021-08-27 阿里巴巴集团控股有限公司 网络链路异常的处理方法、装置及设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110035523A1 (en) * 2009-08-07 2011-02-10 Brett Stanley Feero Communication infrastructure for a data processing apparatus and a method of operation of such a communication infrastructure
CN102111342A (zh) * 2011-04-07 2011-06-29 杭州华三通信技术有限公司 一种链路保护方法及其设备
CN102546222A (zh) * 2010-12-07 2012-07-04 中国电信股份有限公司 备份系统及故障检测处理方法
CN105634939A (zh) * 2016-04-11 2016-06-01 上海斐讯数据通信技术有限公司 用于电信网络的以太网设备以及保护倒换方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110035523A1 (en) * 2009-08-07 2011-02-10 Brett Stanley Feero Communication infrastructure for a data processing apparatus and a method of operation of such a communication infrastructure
CN102546222A (zh) * 2010-12-07 2012-07-04 中国电信股份有限公司 备份系统及故障检测处理方法
CN102111342A (zh) * 2011-04-07 2011-06-29 杭州华三通信技术有限公司 一种链路保护方法及其设备
CN105634939A (zh) * 2016-04-11 2016-06-01 上海斐讯数据通信技术有限公司 用于电信网络的以太网设备以及保护倒换方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110267285A (zh) * 2019-06-28 2019-09-20 京信通信系统(中国)有限公司 主备链路切换方法、装置和数字交换机
CN114640574A (zh) * 2022-02-28 2022-06-17 天翼安全科技有限公司 一种主备设备的切换方法及装置
CN114640574B (zh) * 2022-02-28 2023-11-28 天翼安全科技有限公司 一种主备设备的切换方法及装置

Also Published As

Publication number Publication date
CN109218045A (zh) 2019-01-15

Similar Documents

Publication Publication Date Title
WO2019001197A1 (zh) 一种链路切换方法及装置
WO2020020144A1 (zh) 链路切换方法、链路切换设备、网络通信系统以及计算机可读存储介质
EP3041178B1 (en) Fast convergence on link failure in multi-homed ethernet virtual private networks
EP3373547B1 (en) Method for realizing disaster tolerance backup
CN101170459B (zh) 基于双向转发链路进行故障检测与链路恢复的方法
CN107547383B (zh) 路径检测方法及装置
US8817601B2 (en) HVPLS hub connectivity failure recovery with dynamic spoke pseudowires
US10708081B2 (en) Failure protection method based on ring protection link, device, and system
EP2209267B1 (en) A system and a method for routing data traffic
EP3493489B1 (en) Failover between active pseudo wire and standby pseudo wire
EP2533474A1 (en) Method, apparatus and system for forwarding data
CN101425942A (zh) 一种实现双向转发检测的方法、装置及系统
JP6308534B2 (ja) ネットワーク保護方法およびネットワーク保護装置、オフリングノード、ならびにシステム
US11711243B2 (en) Packet processing method and gateway device
US10033573B2 (en) Protection switching method, network, and system
US9866428B2 (en) Fabric switchover for systems with control plane and fabric plane on same board
CN110138656B (zh) 业务处理方法及装置
WO2016202015A1 (zh) 数据通信网络主备接入网元保护的方法及装置
WO2015127735A1 (zh) 环网用户安全的实现方法及装置
CN108337118B (zh) 报文转发方法及装置
EP3720058B1 (en) Method for configuring private line service, device, and storage medium
CN113556244B (zh) 用于单向链路检测错误配置的自动检测的方法和系统
CN113132220B (zh) 一种路由信息的处理方法及装置
WO2023078275A1 (zh) 一种报文传输方法、装置及设备
US20240137312A1 (en) Packet transmission method and apparatus, and device

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: 18825438

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 26.05.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18825438

Country of ref document: EP

Kind code of ref document: A1