CN108965060B - Protection switching method and device - Google Patents

Protection switching method and device Download PDF

Info

Publication number
CN108965060B
CN108965060B CN201810847095.9A CN201810847095A CN108965060B CN 108965060 B CN108965060 B CN 108965060B CN 201810847095 A CN201810847095 A CN 201810847095A CN 108965060 B CN108965060 B CN 108965060B
Authority
CN
China
Prior art keywords
link
state
main link
vlan interface
main
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810847095.9A
Other languages
Chinese (zh)
Other versions
CN108965060A (en
Inventor
叶金荣
汪萌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd Hefei Branch
Original Assignee
New H3C Technologies Co Ltd Hefei Branch
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 New H3C Technologies Co Ltd Hefei Branch filed Critical New H3C Technologies Co Ltd Hefei Branch
Priority to CN201810847095.9A priority Critical patent/CN108965060B/en
Publication of CN108965060A publication Critical patent/CN108965060A/en
Application granted granted Critical
Publication of CN108965060B publication Critical patent/CN108965060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • 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/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/20Hop count for routing purposes, e.g. TTL
    • 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

Landscapes

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

Abstract

The present disclosure relates to a protection switching method and device, which comprises detecting the state of a main link through an Ethernet link connectivity detection mechanism on the basis of enabling fast rerouting; when the Ethernet link connectivity detection mechanism detects that the main link fails, setting a Virtual Local Area Network (VLAN) interface associated with a physical interface connected with the main link to be in a closed state; and when the main link is detected to be in an available state through the Ethernet link connectivity detection mechanism, and the duration of the main link in the available state is longer than the specified duration, setting the VLAN interface to be in an open state, so that a routing protocol can normally run on the VLAN interface. By setting the VLAN interface to the on state after the main link returns to normal for a period of time, the protection switching method and apparatus according to the embodiments of the present disclosure can reduce the possibility of network oscillation caused by protection switching.

Description

Protection switching method and device
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a protection switching method and apparatus.
Background
When links or network switching devices in the network fail, messages arriving at the destination via the failed links or network switching devices may be discarded, which may cause traffic disruption in the network until the network reconverges to calculate new topologies and routes.
FRR (Fast Reroute) aims to provide backup protection for links or network switching devices in a network after the links or the network switching devices fail, implement Fast Reroute, shorten the flow interruption time caused by network failure, reduce the influence on the flow when the links or the network switching devices fail, and enable the flow to be rapidly restored.
After the FRR function is enabled on the network switching device, a routing protocol such as Open Shortest Path First (OSPF) or Intermediate system to Intermediate system (ISIS) calculates or designates a backup next hop for a route. When the network switching device detects a link failure by means of BFD (Bidirectional Forwarding Detection) and the like, it may switch to the standby link and use the backup next hop obtained in advance to direct the Forwarding of the packet. When the backup next hop is used for guiding message forwarding, the routing protocol can recalculate the optimal path according to the changed network topology, and after the network convergence is finished, the newly calculated optimal route is used for guiding message forwarding.
Disclosure of Invention
In view of this, the present disclosure provides a protection switching method and device, which can reduce the possibility of network oscillation caused by protection switching.
According to an aspect of the present disclosure, a protection switching method is provided, including: on the basis of enabling fast rerouting, detecting the state of a main link through an Ethernet link connectivity detection mechanism, wherein the main link is a link between the equipment and main next hop equipment; when the Ethernet link connectivity detection mechanism detects that the main link fails, setting a Virtual Local Area Network (VLAN) interface associated with a physical interface connected with the main link to be in a closed state; and when the main link is detected to be in an available state through the Ethernet link connectivity detection mechanism, and the duration of the main link in the available state is longer than the specified duration, setting the VLAN interface to be in an open state, so that a routing protocol can normally run on the VLAN interface.
According to another aspect of the present disclosure, there is provided a protection switching device, including: a detection module, configured to detect, through an ethernet link connectivity detection mechanism, a state of a main link on the basis of enabling fast rerouting, where the main link is a link between the device and a main next hop device; a first setting module, configured to set, when the ethernet link connectivity detection mechanism detects that the main link fails, a virtual local area network VLAN interface associated with a physical interface connected to the main link to a closed state; and the second setting module is used for setting the VLAN interface to be in an open state when the main link is detected to be in an available state through the Ethernet link connectivity detection mechanism and the duration of the main link in the available state is longer than the specified duration, so that a routing protocol can normally run on the VLAN interface.
Detecting the state of a main link through an Ethernet link connectivity detection mechanism on the basis of enabling the fast rerouting; when the main link fault is detected, setting a VLAN interface associated with a physical interface connected with the main link to be in a closed state; when the main link is detected to be in the available state and the duration of the main link in the available state is longer than the specified duration, the VLAN interface is set to the open state, and the protection switching method and the protection switching device according to the embodiments of the disclosure can set the VLAN interface to the open state after the main link is recovered to be normal for a period of time, so that after the state of the main link is stable, the routing protocol can be normally operated on the VLAN interface, the optimal routing is reconverged, and the forwarding path is switched back to the main link, thereby reducing the possibility of network oscillation caused by protection switching.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flowchart of a protection switching method according to an embodiment of the present disclosure.
Fig. 2 shows a fast reroute network schematic according to an embodiment of the present disclosure.
Fig. 3 shows a flowchart of a protection switching method according to an embodiment of the present disclosure.
Fig. 4 shows a flowchart of a protection switching method according to an embodiment of the present disclosure.
Fig. 5 shows a flowchart of a protection switching method according to an embodiment of the present disclosure.
Fig. 6 shows a flowchart of a protection switching method according to an embodiment of the present disclosure.
Fig. 7 shows a block diagram of a protection switching device according to an embodiment of the present disclosure.
Fig. 8 shows a block diagram of a protection switching device according to an embodiment of the present disclosure.
Fig. 9 is a block diagram illustrating a protection switching device according to an exemplary embodiment.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 shows a flowchart of a protection switching method according to an embodiment of the present disclosure. Fig. 2 shows a fast reroute network schematic according to an embodiment of the present disclosure. As shown in fig. 2, SwitchA, SwitchB and SwitchC represent network switching devices (e.g., routers or three-tier switches, etc.). After switchca enables fast reroute functionality, the routing protocol may calculate or assign a backup next hop for the route. Assuming that switch B is the primary next hop device from switch a to a certain destination IP address, switch c is the backup next hop device from switch a to the destination IP address, link a between switch a and switch B may be referred to as the primary link, and link B between switch a and switch c may be referred to as the backup link.
The protection switching method shown in fig. 1 may be applied to network switching devices such as a router and a three-layer switch, for example, the switch a shown in fig. 2. As shown in fig. 1, the protection switching method may include:
step S11, on the basis of enabling fast rerouting, detecting the state of a main link through an ethernet link connectivity detection mechanism, where the main link is a link between the device and a main next-hop device.
After the network switching device enables the fast rerouting, a forwarding table entry carrying a main next hop and a backup next hop may be generated. When forwarding normally, the network switching device may use the main next hop to direct the forwarding of the packet. When detecting a link failure through BFD (Bidirectional Forwarding Detection), the network switching device may direct packet Forwarding by using a standby next hop. The main next hop is the address of the main next hop device, and the backup next hop is the address of the backup next hop device. The link between the network switching device and the primary next-hop device may be referred to as a primary link, and the link between the network switching device and the backup next-hop device may be referred to as a backup link. The forwarding path through the primary link may be referred to as a primary path and the forwarding path through the backup link may be referred to as a backup path.
The network switch device may start a link detection mechanism, such as an ethernet link connectivity detection mechanism defined by standards such as IEEE 802.lag CFM, IEEE 802.3AH EFM-OAM, ITU-y.1731, etc., on the local physical interface, where the detection mechanism is a mechanism for implementing OAM (Operation, Administration and Maintenance) on the ethernet, and may be referred to as an ethernet link connectivity detection mechanism. Taking the switch a shown in fig. 2 as the present device as an example, the switch a may start a link detection mechanism on the physical interface Eth1/0/1, so as to detect whether a link (link a) from the switch a to the switch b fails. In the embodiment of the present disclosure, on the basis of enabling fast rerouting, the network switching device may start ethernet link connectivity detection mechanism detection between the device and the primary next-hop device, and detect the state of the primary link through the ethernet link connectivity detection mechanism to determine whether the primary link fails.
It should be noted that the link detection when the network switching device implements fast rerouting and the detection of the main link through the ethernet link connectivity detection mechanism are independent detections: when the network switching equipment detects a link failure in the realization of fast rerouting, the switching of the next hop is executed; upon detecting the primary link failure by the ethernet link connectivity detection mechanism, steps S12 and S13 are performed.
Step S12, when the ethernet link connectivity detection mechanism detects that the main link is faulty, setting the VLAN interface associated with the physical interface connected to the main link to a closed state.
On a Network switching device, the routing protocol runs on a VLAN (Virtual Local Area Network) interface, rather than a physical interface. After a certain physical interface is added to a certain VLAN, the physical interface can forward the packet of the VLAN to become a VLAN interface. Configuring an IP address on the VLAN interface and enabling a corresponding routing protocol on the VLAN interface may enable the routing protocol to run on the VLAN interface. For example, as shown in fig. 2, in the switch a, Eth1/0/1 (physical interface) is added to a VLAN with tag (tag) of 200, at this time Eth1/0/1 may forward a packet of VLAN200 to become a VLAN interface, and the VLAN interface may be denoted as VLAN 200. Configuring the IP address on VLAN200 and enabling the corresponding routing protocol may cause the routing protocol to run on VLAN 200.
Successful establishment of a routing protocol connection requires that the routing protocol be enabled on a VLAN interface, and that the VLAN interface meet the state requirements for running the routing protocol. When the VLAN interface is in an UP (opening) state, the routing protocol can normally run on the VLAN interface, and the VLAN interface can establish routing protocol connection with other VLAN interfaces; when the VLAN interface is in a shut down state, the routing protocol cannot normally run on the VLAN interface, and the VLAN interface cannot establish a routing protocol connection with other VLAN interfaces.
The Ethernet link connectivity detection mechanism is a link layer detection mechanism, and after the network switching equipment detects the failure of the main link through the Ethernet link connectivity detection mechanism, the physical interface connected with the main link in the equipment and the VLAN interface established on the physical interface can be determined. Since the connection of the routing protocol is established over VLAN interfaces, and there may be multiple VLAN interfaces on one physical interface, the network switching device needs to specify which VLAN interfaces on the physical interface are controlled by the state of the physical interface in the method of the embodiments of the present disclosure. In a possible implementation manner, an association relationship between a VLAN interface and a physical interface may be pre-established, and when detecting the failure of the main link through an ethernet link connectivity detection mechanism, the network switching device may determine, according to the association relationship between the VLAN interface and the physical interface, the VLAN interface associated with the physical interface connected to the main link, and further set the VLAN interface to a closed state, so that a routing protocol cannot normally run on the VLAN interface.
It should be noted that, when the main link fails, the network switching device may also detect the failure when implementing fast rerouting, and at this time, the network switching device may use a backup next hop to direct packet forwarding, instead of sending a packet through the main link, so in step S12, when the main link failure is detected through the ethernet link connectivity detection mechanism, setting the VLAN interface associated with the physical interface connected to the main link to a closed state does not affect the forwarding of the traffic packet.
Step S13, when it is detected by the ethernet link connectivity detection mechanism that the main link is in an available state and the duration of the main link in the available state is longer than a specified duration, setting the VLAN interface to an open state, so that the routing protocol can normally run on the VLAN interface.
Wherein, the specified duration can be set according to the requirement. For example, the specified time period may be set to 6 minutes, or several hours.
When the Ethernet link connectivity detection mechanism detects that the main link is in an available state, the main link is recovered, and the main link can forward the message. When the duration of the main link in the available state is longer than the specified duration, the network condition of the main link is stable, the VLAN interface associated with the physical interface connected with the main link is set to be in an open state, the routing protocol can normally run on the VLAN interface, and the message can be forwarded on the main link.
In the fast rerouting, when the main link is in an available state and the routing protocol on the main link is established again successfully, the network switching device may direct the packet forwarding by using the main next hop. In the embodiment of the present disclosure, when the duration of the main link in the available state is longer than the specified duration, the LAN interface associated with the physical interface connected to the main link is set to the open state, so that the network switching device can determine that the network condition of the main link is stable, the routing protocol can normally run on the VLAN interface, and the network switching device can direct packet forwarding by using the main next hop.
In one possible implementation, step S13 may include: when the main link is detected to be in an available state through an Ethernet link connectivity detection mechanism, starting a delay timer; when the timer times longer than a specified time, setting the VLAN interface to be in an open state so that a routing protocol can normally run on the VLAN interface; deleting the delay timer.
In the related technology, when a main link is restored, a routing protocol recalculates an optimal path and a backup path according to a changed network topology, a forwarding path is restored from the backup link to the main link, if the main link is unstable or related personnel perform a link pulling/plugging test on the main link, the main link is continuously failed and restored, and the forwarding path is continuously switched between the main link and the backup link, so that network oscillation is caused.
In the disclosure, after the main link is recovered to be normal for a period of time, the VLAN interface is set to be in the open state, so that after the main link is stable, the VLAN interface can normally run the routing protocol, the forwarding path can be switched back to the main link, and the main link performs packet forwarding, thereby reducing the possibility of network oscillation caused by protection switching.
In one example, as shown in fig. 2, assuming link a (primary link) fails, switch a forwards the message over link B (backup link). In the related art, when the switch a detects that the link a is in the available state, the switch a calculates the optimal path according to the changed network topology center, and retransmits the packet by using the link a. In the embodiment of the present disclosure, since the VLAN200 associated with Eth1/0/1 is set to the off state by the switch a when detecting the link a failure, at this time, the routing protocol cannot normally run on the VLAN200, and the routing protocols of SwitchA and switch b cannot be successfully established again. When switcha detects that the link a is in an available state through the ethernet link connectivity detection mechanism, and the duration of the link a in the available state is longer than a specified duration, the VLAN200 is set to an open state, and at this time, the routing protocol may normally run on the VLAN 200. And the SwitchA calculates the optimal path according to the changed network topology center and retransmits the message by adopting the link A. When the duration of the link a in the available state is short (the link a is unstable, or a user performs a pull/plug link test on the link a), the routing protocols of the switchha and the SwitchB cannot be established again successfully, and the switchha does not recalculate the optimal path, and therefore the link a is not adopted again to forward the packet, and the possibility of network oscillation is reduced.
Fig. 3 shows a flowchart of a protection switching method according to an embodiment of the present disclosure. As shown in fig. 3, the protection switching method further includes:
step S14, if it is detected through the ethernet link connectivity detection mechanism that the main link is in an available state, and the duration of the main link in the available state is less than or equal to the specified duration, the VLAN interface is kept in a closed state.
When the Ethernet link connectivity detection mechanism detects that the main link is in an available state, if the main link fault is detected within a specified time length (the duration of the main link in the available state is less than or equal to the specified time length), which indicates that the state of the main link is possibly unstable, the network switching equipment keeps the VLAN interface in a closed state, so that the routing protocol cannot normally operate on the VLAN interface, the routing protocol cannot recalculate an optimal path, the optimal path cannot be switched to the main link, and the possibility of network oscillation caused by the unstable state of the main link is reduced.
In one possible implementation, step S14 may include: when the main link is detected to be in an available state through an Ethernet link connectivity detection mechanism, starting a delay timer; and when the timer times less than or equal to the specified time, if the main link fault is detected through an Ethernet link connectivity detection mechanism, keeping the VLAN interface in a closed state, and stopping the timing of the delay timer.
When the timer times less than or equal to the designated time, if the main link fault is detected through the Ethernet link connectivity detection mechanism, the state of the main link is unstable, and the network switching equipment can be prevented from switching the forwarding path to the main link by keeping the VLAN interface in the closed state. Then, when the network switching device detects that the main link is in the available state again through the ethernet link connectivity detection mechanism, the delay timer may be started again to re-determine whether the state of the main link is stable, and when the state of the main link is unstable, the VLAN interface associated with the physical interface connected to the main link is maintained in the closed state, and when the state of the main link is stable, the VLAN interface is set in the open state.
Fig. 4 shows a flowchart of a protection switching method according to an embodiment of the present disclosure. As shown in fig. 4, the protection switching method further includes:
step S15, when it is detected by the ethernet link connectivity detection mechanism that the main link is in an available state and the duration of the main link in the available state is less than or equal to the specified duration, if a command to start the VLAN interface is received, setting the VLAN interface in an open state.
The network switching equipment detects that the main link is in an available state through an Ethernet link connectivity detection mechanism, and indicates that the main link can be used for message forwarding, and at the moment, the network switching equipment can switch a forwarding path to the main link.
The command for opening the VLAN interface may be a command triggered by manually opening the VLAN interface for the relevant person. When the duration of the main link in the available state is less than or equal to the specified duration, if a command for starting the VLAN interface is received, the VLAN interface is set to the start state, so that the routing protocol can run normally on the VLAN interface in advance, that is, the routing protocol can be restored to the main link in advance. For example, relevant personnel perform a link pulling/plugging test on a main link, when the duration of the main link in the available state is less than or equal to the specified duration, if the relevant personnel determines that the test is completed, the relevant personnel can manually start a VLAN interface, and at this time, the network switching device can receive a command for starting the VLAN interface, so as to set the VLAN interface to the start state, so that the routing protocol recalculates an optimal path according to the changed network topology, and further switches the forwarding path to the main link.
In one possible implementation, step S15 may include: when the main link is detected to be in an available state through an Ethernet link connectivity detection mechanism, starting a delay timer; and when the timing of the timer is less than or equal to the specified time, if a command for starting the VLAN interface is received, setting the VLAN interface to be in a starting state, and deleting the timing of the delay timer.
In a possible implementation manner, when the specified duration is infinite, the VLAN interface associated with the physical interface connected to the main link cannot be automatically set to the on state, and only when a command for turning on the VLAN interface is received, the VLAN interface is set to the on state. Therefore, only the artificial cultivation command (manually started) can be switched to the main link, and network oscillation caused by testing of related personnel on the main link is reduced.
Fig. 5 shows a flowchart of a protection switching method according to an embodiment of the present disclosure. As shown in fig. 5, when it is detected through the ethernet link connectivity detection mechanism that the main link is in an available state, and the duration of the main link in the available state is longer than a specified duration, the step S13 of setting the VLAN interface to an on state includes:
step S131, when the Ethernet link connectivity detection mechanism detects that the main link is in an available state, the VLAN interface is set to a delayed opening state.
Step S132, determining whether the duration of the main link in the available state is greater than a specified duration.
Step S133, when the duration of the main link in the available state is longer than a specified duration, setting the VLAN interface to an open state.
In the embodiment of the present disclosure, a delay on state may be added to the VLAN interface, and the delay on state may be a state parallel to the on state and the off state, or may be a sub-state of the on state and the off state, which is not limited in this disclosure.
In an example, in a case where the delayed on state is a state that is parallel to the on state and the off state, the network switching device may set the state of the VLAN interface to the on state and determine whether a duration of the main link in the available state is greater than a specified duration when the main link is detected to be in the available state by the ethernet link connectivity detection mechanism. When the duration of the main link in the available state is longer than a specified duration, the network switching device may set the VLAN interface to an open state. When the duration of the main link in the available state is less than or equal to the specified duration, the network switching device may set the VLAN interface to the off state.
In one example, in a case that the delayed on state is a sub-state of the on state and the off state, the network switching device may, when it is detected that the main link is in the available state through the ethernet link connectivity detection mechanism, maintain the state of the VLAN interface in the off state, set the delayed on state to the sub-state of the off state, and determine whether a duration of the main link in the available state is greater than a specified duration. When the time length of the main link in the available state is longer than the specified time length, the network switching device may set the VLAN interface to the open state, and since the open state is the reset state, the open state does not have the sub-state. When the time length of the main link in the available state is less than or equal to the specified time length, the network switching device may set the VLAN interface to the closed state, and since the closed state is a reset state, the closed state does not have a sub-state yet.
Thus, when the network switching device determines that the VLAN interface is in the delayed on state, it may indicate that the primary link is available, but the state of the primary link may be unstable.
Fig. 6 shows a flowchart of a protection switching method according to an embodiment of the present disclosure. As shown in fig. 6, the protection switching method includes:
step S16, when the address of the backup next hop device is used to direct packet forwarding, if a failure of the backup link is detected by BFD and the VLAN interface is in the delayed on state, the state of the VLAN interface is set to the on state to direct packet forwarding by using the address of the main next hop device, and the backup link is a link between the local device and the backup next hop device.
Referring to steps S131 to S133, it can be seen that the VLAN interface associated with the physical interface connected to the main link is in the delayed-on state, which indicates that the main link is in the available state, but the state of the main link is not yet determined, and at this time, if a failure of the backup link is detected, the forwarding link needs to be immediately switched back to the main link, so as to reduce the packet loss.
In one possible implementation, after the network switching device enables fast reroute, a fast reroute status record may be formed, the fast intermediate route status record including: and backing up a next hop, a main next hop, an output interface corresponding to the main next hop and recording the state. Wherein, the backup next hop is the address of the backup next hop device; the primary next hop is the address of the primary next hop device; the corresponding outlet interface of the main next hop is a VLAN interface connected with the main link; the recording state comprises normal and switched, the normal indicates that the main next hop is adopted to guide message forwarding, and the switched indicates that the standby next hop is adopted to guide message forwarding.
In one example, as shown in fig. 2, assume that the fast reroute record on SwitchA is as shown in table 1. When detecting a failure of link a (link to primary next hop 10.1.1.2), switchca finds record 1, setting the record status to switched. When detecting a failure of link B (link to backup next hop 20.1.1.2), switchca finds record 1 and finds the outgoing interface corresponding to the primary next hop from it as VLAN 200. If the Switch a determines that the VLAN200 is in the delayed on state, the Switch immediately sets the state of the VLAN200 to the on state, so as to use 10.1.1.2 to direct the packet forwarding. When the VLAN200 is in the open state, the routing protocol may operate normally in the VLAN200, and may successfully establish a routing protocol connection to implement routing re-convergence, thereby using 10.1.1.2 to direct packet forwarding.
TABLE 1
Figure BDA0001746843850000121
Fig. 7 shows a block diagram of a protection switching device according to an embodiment of the present disclosure. As shown in fig. 7, the apparatus 20 includes:
a detecting module 21, configured to detect, through an ethernet link connectivity detecting mechanism, a state of a main link on the basis that fast rerouting is enabled, where the main link is a link between the local device and a main next hop device;
a first setting module 22, configured to set, when the ethernet link connectivity detection mechanism detects that the main link fails, a virtual local area network VLAN interface associated with a physical interface connected to the main link to a closed state;
a second setting module 23, configured to set the VLAN interface to an open state when it is detected that the main link is in an available state through the ethernet link connectivity detection mechanism, and a duration of the main link in the available state is longer than a specified duration, so that a routing protocol can normally run on the VLAN interface.
Fig. 8 shows a block diagram of a protection switching device according to an embodiment of the present disclosure. As shown in fig. 8, in a possible implementation, the apparatus 20 further includes:
a third setting module 24, configured to set the VLAN interface to a closed state if it is detected that the main link is in an available state through the ethernet link connectivity detection mechanism, and a duration of the main link in the available state is less than or equal to the specified duration.
In one possible implementation, the apparatus 20 further includes:
a fourth setting module 25, configured to, when it is detected that the main link is in an available state through the ethernet link connectivity detection mechanism, and a duration of the main link in the available state is less than or equal to the specified duration, set the VLAN interface to an open state if a command to open the VLAN interface is received.
In a possible implementation manner, the first setting module 22 is specifically configured to:
when the Ethernet link connectivity detection mechanism detects that the main link is in an available state, setting the VLAN interface to be in a delayed starting state;
determining whether the duration of the main link in the available state is longer than a specified duration;
and when the duration of the main link in the available state is longer than the specified duration, setting the VLAN interface to be in an open state.
In one possible implementation, the apparatus 20 further includes:
a fifth setting module 26, configured to, when the address of the backup next hop device is used to direct packet forwarding, if a failure of the backup link is detected through BFD and the VLAN interface is in a delayed turn-on state, set the state of the VLAN interface to a turn-on state, so as to direct packet forwarding by using the address of the main next hop device, where the backup link is a link between the local device and the backup next hop device.
Detecting the state of a main link through an Ethernet link connectivity detection mechanism on the basis of enabling the fast rerouting; when the main link fault is detected, setting a VLAN interface associated with a physical interface connected with the main link to be in a closed state; when the main link is detected to be in the available state and the duration of the main link in the available state is longer than the specified duration, the VLAN interface is set to the open state, and the protection switching device according to the embodiment of the present disclosure can set the VLAN interface to the open state after the main link is recovered to be normal for a period of time, so that after the main link is stable, the routing protocol can be normally run on the VLAN interface, the optimal routing is reconverged, and the forwarding path is switched back to the main link, thereby reducing the possibility of network oscillation caused by protection switching.
Fig. 9 is a block diagram illustrating an apparatus 900 for protection switching according to an exemplary embodiment. Referring to fig. 9, the apparatus 900 may include a processor 901, a machine-readable storage medium 902 having stored thereon machine-executable instructions. The processor 901 and the machine-readable storage medium 902 may communicate via a system bus 903. And, the processor 901 executes the protection switching method described above by reading a machine-executable instruction corresponding to the protection switching logic in the machine-readable storage medium 902.
The machine-readable storage medium 902 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A protection switching method is characterized in that the method comprises the following steps:
on the basis of enabling fast rerouting, detecting the state of a main link through an Ethernet link connectivity detection mechanism, wherein the main link is a link between the equipment and main next hop equipment;
when the Ethernet link connectivity detection mechanism detects that the main link fails, determining a VLAN interface associated with a physical interface connected with the main link according to a pre-established association relationship between the VLAN interface and the physical interface, and setting a VLAN interface associated with the physical interface connected with the main link to be in a closed state, so that a routing protocol cannot normally run on the VLAN interface;
and when the main link is detected to be in an available state through the Ethernet link connectivity detection mechanism, and the duration of the main link in the available state is longer than the specified duration, setting the VLAN interface to be in an open state, so that a routing protocol can normally run on the VLAN interface.
2. The method of claim 1, further comprising:
and if the main link is detected to be in the available state through the Ethernet link connectivity detection mechanism, and the duration of the main link in the available state is less than or equal to the specified duration, setting the VLAN interface to be in a closed state.
3. The method of claim 1, further comprising:
and if a command for opening the VLAN interface is received when the main link is detected to be in the available state through the Ethernet link connectivity detection mechanism and the duration of the main link in the available state is less than or equal to the specified duration, the VLAN interface is set to be in the open state.
4. The method according to any of claims 1 to 3, wherein the step of setting the VLAN interface to an on state when the primary link is detected to be available through the Ethernet link connectivity detection mechanism and the duration of the primary link being available is longer than a specified duration comprises:
when the Ethernet link connectivity detection mechanism detects that the main link is in an available state, setting the VLAN interface to be in a delayed starting state;
determining whether the duration of the main link in the available state is longer than a specified duration;
and when the duration of the main link in the available state is longer than the specified duration, setting the VLAN interface to be in an open state.
5. The method of claim 4, further comprising:
when the address of the backup next hop device is used for guiding message forwarding, if a backup link fault is detected through BFD and the VLAN interface is in a delayed opening state, the state of the VLAN interface is set to be in an opening state so as to guide message forwarding by using the address of the main next hop device, and the backup link is a link between the device and the backup next hop device.
6. A protection switching device, comprising:
a detection module, configured to detect, through an ethernet link connectivity detection mechanism, a state of a main link on the basis of enabling fast rerouting, where the main link is a link between the device and a main next hop device;
a first setting module, configured to, when the main link failure is detected through the ethernet link connectivity detection mechanism, determine, according to a pre-established association relationship between a VLAN interface and a physical interface, a VLAN interface associated with the physical interface connected to the main link, and set, in a closed state, a VLAN interface associated with the physical interface connected to the main link, so that a routing protocol cannot normally run on the VLAN interface;
and the second setting module is used for setting the VLAN interface to be in an open state when the main link is detected to be in an available state through the Ethernet link connectivity detection mechanism and the duration of the main link in the available state is longer than the specified duration, so that a routing protocol can normally run on the VLAN interface.
7. The apparatus of claim 6, further comprising:
and the third setting module is used for setting the VLAN interface to be in a closing state if the main link is detected to be in an available state through the Ethernet link connectivity detection mechanism and the duration of the main link in the available state is less than or equal to the specified duration.
8. The apparatus of claim 6, further comprising:
a fourth setting module, configured to, when it is detected that the main link is in an available state through the ethernet link connectivity detection mechanism, and a duration of the main link in the available state is less than or equal to the specified duration, set the VLAN interface in an open state if a command to open the VLAN interface is received.
9. The apparatus according to any one of claims 6 to 8, wherein the first setting module is specifically configured to:
when the Ethernet link connectivity detection mechanism detects that the main link is in an available state, setting the VLAN interface to be in a delayed starting state;
determining whether the duration of the main link in the available state is longer than a specified duration;
and when the duration of the main link in the available state is longer than the specified duration, setting the VLAN interface to be in an open state.
10. The apparatus of claim 9, further comprising:
and a fifth setting module, configured to set, when the address of the backup next hop device is used to direct packet forwarding, the state of the VLAN interface to an on state if a failure of the backup link is detected through BFD and the VLAN interface is in a delayed on state, so as to direct packet forwarding using the address of the main next hop device, where the backup link is a link between the local device and the backup next hop device.
CN201810847095.9A 2018-07-27 2018-07-27 Protection switching method and device Active CN108965060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810847095.9A CN108965060B (en) 2018-07-27 2018-07-27 Protection switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810847095.9A CN108965060B (en) 2018-07-27 2018-07-27 Protection switching method and device

Publications (2)

Publication Number Publication Date
CN108965060A CN108965060A (en) 2018-12-07
CN108965060B true CN108965060B (en) 2021-01-26

Family

ID=64465449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810847095.9A Active CN108965060B (en) 2018-07-27 2018-07-27 Protection switching method and device

Country Status (1)

Country Link
CN (1) CN108965060B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141364A (en) * 2006-09-07 2008-03-12 华为技术有限公司 Method and device for implementing protection rearrangement in ring ethernet
CN101170459A (en) * 2007-11-28 2008-04-30 中兴通讯股份有限公司 Failure detection and link recovery method based on bidirectional forward link
CN102664788A (en) * 2012-04-05 2012-09-12 中兴通讯股份有限公司 CE dual-homed link protection method in MPLS L3VPN and system thereof
CN102780635A (en) * 2012-08-09 2012-11-14 华为技术有限公司 Method for realizing protection switching based on TRILL (transparent interconnection of lots of link) network, TOR (top of rack) switchboard and system
US8488444B2 (en) * 2007-07-03 2013-07-16 Cisco Technology, Inc. Fast remote failure notification
CN104135434A (en) * 2014-08-04 2014-11-05 杭州华三通信技术有限公司 Method and device for path switching in Ethernet virtualized interconnect (EVI) network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141364A (en) * 2006-09-07 2008-03-12 华为技术有限公司 Method and device for implementing protection rearrangement in ring ethernet
US8488444B2 (en) * 2007-07-03 2013-07-16 Cisco Technology, Inc. Fast remote failure notification
CN101170459A (en) * 2007-11-28 2008-04-30 中兴通讯股份有限公司 Failure detection and link recovery method based on bidirectional forward link
CN102664788A (en) * 2012-04-05 2012-09-12 中兴通讯股份有限公司 CE dual-homed link protection method in MPLS L3VPN and system thereof
CN102780635A (en) * 2012-08-09 2012-11-14 华为技术有限公司 Method for realizing protection switching based on TRILL (transparent interconnection of lots of link) network, TOR (top of rack) switchboard and system
CN104135434A (en) * 2014-08-04 2014-11-05 杭州华三通信技术有限公司 Method and device for path switching in Ethernet virtualized interconnect (EVI) network

Also Published As

Publication number Publication date
CN108965060A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
US8780699B1 (en) Handling switchover of multi-homed connections in VPLS networks
US9654386B2 (en) Apparatus, system, and method for reconfiguring point-to-multipoint label-switched paths
US7929427B2 (en) Ring rapid spanning tree protocol
US9800432B2 (en) Using ethernet ring protection switching with computer networks
US6262977B1 (en) High availability spanning tree with rapid reconfiguration
CN107547383B (en) Path detection method and device
JP3715501B2 (en) Spanning tree bridge and route change method using the same
US7093027B1 (en) Fast connection protection in a virtual local area network based stack environment
JP5666590B2 (en) LDP and IGP synchronization for broadcast networks
EP2404397B1 (en) Ldp igp synchronization for broadcast networks
US7715307B2 (en) Communication connection control systems and methods
US20040078619A1 (en) Method and system for implementing IS-IS protocol redundancy
US20080056142A1 (en) Test method for message paths in communications networks and redundant network arrangements
CN101610221B (en) IP unicast smoothly switching method during STP switch and device thereof
EP1672847B1 (en) Ring rapid spanning tree protocol
Papán et al. Overview of IP fast reroute solutions
WO2013040930A1 (en) Intermediate node protection method and device for multicast label switched path
WO2019001197A1 (en) Link switching method and apparatus
EP2466804A1 (en) Protection switching method for ethernet automatic protection switching (eaps) ring network and master node in eaps ring network
WO2014101125A1 (en) Aggregation group link negotiation method, device and system
CN108965060B (en) Protection switching method and device
WO2012071905A1 (en) Method and system for protecting ring network uplink
WO2011147298A1 (en) Method and apparatus for resetting layer 3 virtual private network routes
CN108337118B (en) Message forwarding method and device
WO2016202015A1 (en) Method and apparatus for protecting active and standby access network elements in data communications network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant