CN112367179B - Link switching method and device - Google Patents

Link switching method and device Download PDF

Info

Publication number
CN112367179B
CN112367179B CN202011027628.2A CN202011027628A CN112367179B CN 112367179 B CN112367179 B CN 112367179B CN 202011027628 A CN202011027628 A CN 202011027628A CN 112367179 B CN112367179 B CN 112367179B
Authority
CN
China
Prior art keywords
link
main
received
response
connection
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
CN202011027628.2A
Other languages
Chinese (zh)
Other versions
CN112367179A (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 Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202011027628.2A priority Critical patent/CN112367179B/en
Publication of CN112367179A publication Critical patent/CN112367179A/en
Application granted granted Critical
Publication of CN112367179B publication Critical patent/CN112367179B/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
    • 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
    • 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/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/02Capturing of monitoring data
    • H04L43/028Capturing of monitoring data by filtering
    • 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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a link switching method, which comprises the following steps: sending a first detection message to the main AC through the first link, and sending a second detection message to the main AC through the second link; after waiting for a first preset time, judging whether the connection between the AP and the main AC is interrupted or not according to the condition that the response message is received through the first link and the condition that the response message is received through the second link; and if the connection is interrupted, switching the second link serving as the standby link to the main link. The AP can judge whether the main AC is available or not by simultaneously sending the detection message to the main AC once through the first link and the second link. In addition, the fault is judged by sending the detection message through the two links, and compared with the fault judgment method in the prior art that the fault is judged by sending the detection message through one link, the reliability is higher.

Description

Link switching method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a link switching method and apparatus.
Background
At present, the application of WLAV (Wireless Local Area Network) has become more and more popular, and a typical application networking scene is an AC (Wireless Access Point Controller) + AP (Access Point) networking mode. In the networking mode, the AP is responsible for radio frequency access, the AC is responsible for issuing a control strategy and data forwarding, so that a large amount of state maintenance and data forwarding work of the AP is borne on the AC, service interruption of a wireless network is caused under the condition that the main AC is unavailable, and therefore, through adopting double-link networking, namely, the main AC and the standby AC are mutually backups, when the main AC fails, the standby AC starts to work after the main and standby links are switched, and the risk of service interruption of the wireless network caused by single AC failure is reduced.
However, a short network interruption occurs during the switching process of the main/standby links, and the time of the switching process of the main/standby links mainly depends on the time when the AP detects the failure of the main link, so that the link switching time needs to be shortened as much as possible.
Disclosure of Invention
The present invention provides a link switching method and device for overcoming the above-mentioned deficiencies in the prior art, and the object is achieved by the following technical solutions.
A first aspect of the present invention provides a link switching method, where the method is applied to an AP in a dual-link networking, where the dual-link networking further includes a primary AC and a standby AC, the AP is connected to the primary AC through a first link, and the AP is connected to the standby AC through a second link, and the method includes:
when the link detection condition is determined to be met, sending a first detection message to the main AC through a first link, and simultaneously sending a second detection message to the main AC through a second link;
after waiting for a first preset time, judging whether the connection between the AP and the main AC is interrupted or not according to the condition that the first link receives a response message and the condition that the second link receives a response message;
and if the connection is interrupted, switching the second link serving as the standby link to the main link.
A second aspect of the present invention provides a link switching apparatus, where the apparatus is applied to an AP in a dual-link networking, where the dual-link networking further includes a primary AC and a standby AC, the AP is connected to the primary AC through a first link, and the AP is connected to the standby AC through a second link, and the apparatus includes:
a sending module, configured to send a first detection packet to the main AC through a first link and send a second detection packet to the main AC through a second link at the same time when it is determined that the link detection condition is met;
a judging module, configured to judge whether connection between the AP and the main AC is interrupted or not in a case where a response packet is received through the first link and in a case where a response packet is received through the second link after waiting for a first preset duration;
and the switching module is used for switching the second link serving as the standby link into the main link when the connection interruption is judged.
The link switching method and device based on the above description have the following beneficial effects:
the AP can quickly judge whether the main AC is available or not by simultaneously sending the detection message to the main AC once through the first link and the second link. In addition, the fault is judged by sending the detection message through the two links, and compared with the fault judgment method in the prior art that the fault is judged by sending the detection message through one link, the reliability is higher.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a schematic diagram illustrating a dual link networking architecture according to an exemplary embodiment of the present invention;
fig. 2A is a flowchart illustrating an embodiment of a link switching method according to an exemplary embodiment of the present invention;
fig. 2B is a schematic diagram illustrating an Echo message format structure according to the embodiment shown in fig. 2A;
fig. 3 is a flowchart illustrating another embodiment of a link switching method according to an exemplary embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a hardware structure of an AP device according to an exemplary embodiment of the present invention;
fig. 5 is a schematic structural diagram of a link switching apparatus according to an exemplary embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The dual-link networking structure shown in fig. 1 includes an AP device, a primary AC, a standby AC, and a switch, where a communication link between the AP device and the primary AC is a first link, a communication link between the AP device and the standby AC is a second link, and the AP device may be a FITAP (i.e., a thin AP). The AP equipment is responsible for radio frequency access, a first link serves as a main link when a main AC is available, a standby AC does not forward data traffic on a second link, the main AC is responsible for issuing a control strategy and forwarding the data traffic, the second link serving as the standby link is switched to the main link when the main AC is unavailable so as to ensure normal operation of user services, and the data traffic begins to be processed after the standby AC becomes the main AC.
It should be noted that the time required for this active/standby link switching process mainly depends on two aspects: (1) the time when the AP device detects a failure of the main link; (2) the time required for the links of the AP device and the primary AC to switch from standby to active.
For the time in the above (1), the required time can be calculated according to the link detection interaction principle specified by the communication protocol between the AP and the AC; for the time in the above (2), only the time for retransmitting the configuration is negligible. Thus, the time for this active-standby link switch is actually dependent on the time it takes for the AP device to detect that the primary AC is unavailable.
The protocol specifies the following manner for estimating the time when the AP device detects that the main AC is unavailable:
after the AP device enters the operating state, a ProbeInterval timer (timeout t1 is 4 seconds) and an Echo interval timer (timeout t2 is 30 seconds) are started, where the ProbeInterval timer is used to send a probe message (Echo Request) to the main AC to detect whether the first link communication is normal or not when neither the control tunnel nor the data tunnel on the first link has a message, and the Echo interval timer is used to time out only when the control tunnel on the first link has no message, i.e., the timer is used to send an Echo Request to the main AC.
In addition, after sending the Echo Request, the AP device also starts a transmittinterval timer (timeout t3 is 3 seconds), if a Response message (i.e., Echo Response) is received within 3 seconds, the transmittinterval timer is closed, if no Echo Response is received after the 3 seconds timeout, considering the problems of network transmission congestion and packet loss, the AP device sends the Echo Request to the main AC again, and resets the transmittinterval timer again until the AP device continuously sends the Echo Request 4 times in total, and does not receive the Echo Response after the transmittinterval timer has timed out each time, and determines that the main AC is in an unavailable state.
Since the timeout period of the ProbeInterval timer is shorter than the timeout period of the EchoInterval timer, the time required to detect whether the main AC is usable or not, which is triggered by the EchoInterval timer timeout, is longer than the time required to detect whether the main AC is usable or not, which is triggered by the ProbeInterval timer timeout.
Based on this, it can be inferred that the AP device determines the minimum time T ═ T1+ T3 ═ 4+3 ═ 4 ═ 16 seconds required for the main AC to be unavailable.
Therefore, during the time when the primary AC is unavailable and the handover is complete, the network is unable to serve the user, so it is desirable to shorten this time as much as possible.
It will be understood by those skilled in the art that the BFD (Bidirectional Forwarding Detection) technology currently used in the main network is not suitable for the dual-link networking scenario shown in fig. 1, because the AP device is a simple, plug-and-play device that cannot complete the processing of the BFD protocol.
In order to shorten the time for detecting whether the main AC is available, the invention provides an improved link switching method, wherein a detection message is sent to the main AC only once through a first link, so as to avoid the problems of network transmission congestion and packet loss, and simultaneously, a detection message is sent to the main AC once through a second link, after waiting for a certain time, whether the main AC is available is determined according to the condition that the first link returns a response message and the condition that the second link returns a response message, and the main AC and the standby links are switched under the condition that the main AC is determined to be unavailable.
Based on the above description, it can be known that the AP can quickly determine whether the main AC is available by simultaneously sending the probe message to the main AC once through the first link and the second link, and compared with the prior art in which the AP needs to send the probe message to the main AC multiple times to finally determine the availability of the main AC, the time for detecting whether the main AC is available is obviously shortened, thereby speeding up the link switching time. In addition, the fault is judged by sending the detection message through the two links, and compared with the fault judgment method in the prior art that the fault is judged by sending the detection message through one link, the reliability is higher.
As can be seen, assuming that the time before the primary probe packet is sent to the primary AC through the first link (i.e., the primary link) is the timeout time T1 of the ProbeInterval timer, and the waiting time after the probe packet is sent is T4, the AP device determines that the shortest time T required for the unavailability of the primary AC is T1+ T4. If T4 takes 1.5 seconds, T4 + 1.5-5.5 seconds, the shortest time 16 seconds described in the above prior art is much shorter.
The following describes the link switching method proposed by the present invention in detail with specific embodiments.
Fig. 2A is a flowchart of an embodiment of a link switching method according to an exemplary embodiment of the present invention, where the link switching method may be applied to an AP device in a dual-link networking shown in fig. 1, and in combination with the schematic diagram of the dual-link networking shown in fig. 1, the link switching method includes the following steps:
step 101: and when the link detection condition is determined to be met, sending a first detection message to the main AC through the first link, and simultaneously sending a second detection message to the main AC through the second link.
The condition meeting the link detection requirement may be a predefined trigger condition for triggering the sending of the detection packet on the AP. For example, when the first link is used as a main link, the communication protocol between the AP and the AC triggers the AP to send a probe message to the main AC when the probe interval timer times out and neither the control tunnel nor the data tunnel on the main link has a message, or triggers the AP to send a probe message to the main AC when the echo interval timer times out and the control tunnel on the main link has no message but the data tunnel has a message.
It will be understood by those skilled in the art that the control tunnel and the data tunnel may be distinguished by the port number carried in the message. Typically, control packets are transmitted using a control tunnel and data packets are transmitted using a data tunnel. The AP and the AC transmit control packets and data packets, and a communication protocol generally adopts a CAPWAP (control and Provisioning of Wireless Access Point) protocol, so that the control tunnel and the data tunnel are collectively referred to as a CAPWAP tunnel.
In some embodiments, for a process of sending a first probe packet to the main AC through the first link, the main AC may return a response packet containing a second type value by generating a first probe packet containing a first type value and then sending the generated first probe packet to the main AC through the first link.
The first type value is used for indicating the main AC to return a response message containing the second type value through the first link.
Meanwhile, in order to distinguish the probe messages sent through the main second link and return different response messages on the main AC for the probe messages received through different links, a second probe message containing a third type value may be generated for a process of sending the second probe message to the main AC through the second link, and then the second probe message is sent to the main AC through the second link, so that the main AC returns a response message containing a fourth type value and an interface state, where the interface state is a state of an interface of the first link on the main AC.
And the third type value is used for indicating the main AC to return a response message containing the fourth type value and the interface state through the second link. The specific process of the AP sending the second detection packet to the main AC through the second link is that the AP sends the second detection packet to the standby AC through the second link, and the standby AC forwards the second detection packet to the main AC.
And aiming at the process that the main AC returns a response message containing the fourth type value and the interface state, when the main AC receives the second detection message, the main AC reads the interface state of the first link, then generates a response message containing the read state and the fourth type value and sends the response message to the standby AC, and the standby AC forwards the response message containing the fourth type value and the interface state to the AP through the second link.
It should be noted that the address of the main AC needs to be configured in advance on the standby AC, and the address of the standby AC also needs to be configured in advance on the main AC. The link between the standby AC and the AP is in a standby state, and when the main AC is available, the standby AC does not process any packet on the second link, but after the second probe packet is sent to the standby AC, the standby AC forwards the second probe packet to the main AC via the locally configured address of the main AC. Correspondingly, the main AC also forwards the response message generated for the second probe message to the standby AC through the locally configured address of the standby AC, and the standby AC forwards the response message to the AP.
For example, whether the first probe packet is sent to the main AC via the first link or the second probe packet is sent to the main AC via the second link, the first probe packet and the second probe packet may both be sent using the control tunnel.
In specific implementation, both the probe message and the response message returned for the probe message generally belong to an Echo message, as shown in fig. 2B, the format structure of the Echo message specified by the CAPWAP protocol is shown, where in a message Type field represented by a 32bit, in general, when the message Type carried in the message is 13, the message Type is represented as an Echo Request message, that is, the probe message; when the message Type carried by the message is 14, it indicates that the message Type is an Echo Response message, that is, a Response message. That is, the first type value is 13 and the second type value is 14.
When the Echo message is forwarded through the second link, the message Type message field represented by the 32bit is specifically set to 30/31, that is, the third Type value is 30, the fourth Type value is 31, if the standby AC receives the Echo Request message containing the third Type value 30, the Echo Request message is forwarded to the main AC, and if the main AC receives the Echo Request message containing the third Type value 30, the main AC reads the state of the first link interface of the standby AC, generates an Echo Response message containing the fourth Type value 31 and the read state, and forwards the Echo Response message to the standby AC, and if the standby AC receives the Echo Response message containing the message Type value 31, the Echo Response message is forwarded to the AP through the second link. It is noted that the second link does not process the rest of the messages except for this special message.
Step 102: and after waiting for the first preset time, judging whether the connection between the AP and the main AC is interrupted or not according to the condition that the response message is received through the first link and the condition that the response message is received through the second link.
The first preset duration refers to the longest waiting time for receiving a response message after the AP sends out the first detection message and the second detection message through the first link and the second link, respectively. The first preset time period can be set according to practical experience.
In some embodiments, a process of determining whether connection between the AP and the main AC is interrupted is performed for a case where the response packet is received through the first link and a case where the response packet is received through the second link, and if the response packet is received through the first link, it is determined that connection between the AP and the main AC is normal, and if the response packet is not received through both the first link and the second link, it is determined that connection between the AP and the main AC is interrupted, and if the response packet is not received through the first link but a response packet including an interface state of a dropped connection (i.e., an interface state of down) is received through the second link, it is determined that connection between the AP and the main AC is interrupted.
It should be noted that there are two cases where the AP device finds the main AC unavailable, one is that the main AC itself fails, and the other is that the first link (i.e., the main link) between the main AC and the AP device fails. That is, according to the situation that the first link and the second link return response messages, the specific location where the failure occurs can be further determined to be fed to the user. That is, if the response packet is not received through the first link and the second link, it indicates that the main AC cannot receive the packet due to the failure and cannot process the packet, it may be determined that the main AC itself fails, and if the response packet is not received through the first link but a response packet including an interface in a dropped state is received through the second link, it indicates that the interface between the main AC and the standby AC is normal and the interface between the AP and the first link has been dropped, it may be determined that the first link between the main AC and the AP has failed.
It should be further noted that, when the response packet is not received through the first link but the response packet including the interface state being online is received through the second link, considering the situation of network congestion, packet loss, and the like, which may cause the problem that the response packet is not received through the first link, in order to verify the first link, the situation of the link may be detected again, that is, the first detection packet is continuously sent to the main AC through the first link, and the second detection packet is sent to the main AC through the second link, and after waiting for a second preset time, if the response packet is received through the first link, it is determined that the connection between the AP and the main AC is normal, and if the response packet is not received through the first link, it is determined that the connection between the AP and the main AC is interrupted.
The second preset duration refers to the longest waiting time for receiving the response message after the AP sends out the first detection message and the second detection message through the first link and the second link, respectively, for the second time. The second preset time period may be set according to practical experience, and generally the second preset time period is greater than the first preset time period.
It should be noted that if the response packet is not received through the first link and the response packet is received through the second link, it indicates that the main AC itself has no failure problem, but the AP does not receive the response packet due to the failure of the first link, so it can be determined that the first link between the AP and the main AC has failed. For the link condition detected again, the response message is still not received through the first link, and the reason that the interface is disconnected may be that any link on the first link has a problem no matter the interface state is disconnected or online, so that whether the interface state is disconnected or online, it indicates that the first link between the AP and the main AC has a fault.
For the process from step 101 to step 102, it is assumed that the time meeting the link detection condition is 4 seconds, that is, the timeout time of the ProbeInterval timer, the first preset time is 1.5 seconds, and the second preset time is 3 seconds.
If the main AC can be judged to be unavailable through the first detection, the required minimum time is 4 seconds +1.5 seconds to 5.5 seconds.
If the response message is not received through the first link but the response message containing the interface state online is received through the second link during the first detection, final judgment needs to be carried out through second detection, and at the moment, the shortest time required for detecting that the main AC is unavailable is 4 seconds +1.5 seconds +3 seconds which is 8.5 seconds.
If the time for switching the link is ignored, compared with the prior art, the scheme has the advantages that the time for detecting the unavailability of the main AC is faster and more reliable, and the primary feedback can also be made to whether the position of the user fault is the main AC or the intermediate link.
Step 103: and when the connection is judged to be interrupted, switching the second link serving as the standby link to the main link.
When the connection between the AP and the main AC is interrupted, the AP indicates that the main AC is in an unavailable state, and the AP triggers a process of switching a second link serving as a standby link to the main link. Those skilled in the art can understand that the flow for switching the standby link into the main link can be implemented by using related technologies, and the present invention is not specifically limited to this flow.
To this end, the process shown in fig. 2A is completed, and a detection packet is sent to the main AC only once through the first link, so as to avoid the problems of network transmission congestion and packet loss, and at the same time, a detection packet is sent to the main AC once through the second link, and after waiting for a certain time, whether the main AC is available is determined according to the condition that the first link returns a response packet and the condition that the second link returns a response packet, and the main/standby links are switched when the main AC is determined to be unavailable.
Based on the above description, it can be known that the AP can quickly determine whether the main AC is available by simultaneously sending the probe message to the main AC once through the first link and the second link, and compared with the prior art in which the AP needs to send the probe message to the main AC multiple times to finally determine the availability of the main AC, the time for detecting whether the main AC is available is obviously shortened, thereby speeding up the link switching time. In addition, the fault is judged by sending the detection message through the two links, and compared with the fault judgment method in the prior art that the fault is judged by sending the detection message through one link, the reliability is higher.
Fig. 3 is a flowchart illustrating another link switching method according to an exemplary embodiment of the present invention, where the entire link switching process is described in an interactive manner among an AP, a primary AC, and a standby AC, and as shown in fig. 3, the link switching method includes the following steps:
step 301: and when determining that the link detection condition is met, the AP sends a first detection message to the main AC through the first link, simultaneously sends a second detection message to the standby AC through the second link, and starts timing.
Step 302: when receiving the first detection message, the main AC generates a response message for the first detection message and sends the response message to the AP through the first link, and performs step 306.
Step 303: and when receiving the second detection message, the standby AC forwards the second detection message to the main AC, and performs step 304-step 305.
Step 304: and when the main AC receives the second detection message, generating a response message aiming at the second detection message and forwarding the response message to the standby AC.
Step 305: and when the standby AC receives the response message, forwarding the response message to the AP through the second link.
Step 306: after timing the first preset time, the AP judges whether the connection between the AP and the main AC is interrupted or not according to the condition that the AP receives the response message through the first link and the condition that the AP receives the response message through the second link.
Step 307: and if the connection is interrupted, the AP switches the second link serving as the standby link into the main link.
For the process from step 301 to step 307, reference may be made to the related description from step 101 to step 103 in the embodiment shown in fig. 2A, and the description of the present invention is not repeated herein.
In this embodiment, the AP may quickly determine whether the main AC is available by sending a probe message to the main AC through the first link and the second link at the same time, and compared with the prior art in which the AP needs to send the probe message to the main AC multiple times to finally determine the availability of the main AC, the time for detecting whether the main AC is available is obviously shortened, thereby speeding up the link switching time. In addition, the fault is judged by sending the detection message through the two links, and compared with the fault judgment method in the prior art that the fault is judged by sending the detection message through one link, the reliability is higher.
Fig. 4 is a schematic diagram illustrating a hardware structure of an AP device according to an exemplary embodiment of the present invention, where the AP device includes: a communication interface 401, a processor 402, a machine-readable storage medium 403, and a bus 404; wherein the communication interface 401, the processor 402 and the machine-readable storage medium 403 communicate with each other via a bus 404. The processor 402 may execute the above-described link switching method by reading and executing machine executable instructions corresponding to the control logic of the link switching method in the machine readable storage medium 403, and the specific content of the method is referred to the above-described embodiments, which will not be described herein again.
The machine-readable storage medium 403 referred to in this disclosure 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: volatile memory, non-volatile memory, or similar storage media. In particular, the machine-readable storage medium 403 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard disk drive), any type of storage disk (e.g., an optical disk, a DVD, etc.), or similar storage medium, or a combination thereof.
Corresponding to the foregoing embodiments of the link switching method, the present invention also provides embodiments of a link switching apparatus.
Fig. 5 is a schematic structural diagram of a link switching apparatus according to an exemplary embodiment of the present invention, where the link switching apparatus may be applied to an AP device in a dual-link networking shown in fig. 1, and in combination with the schematic structural diagram of the dual-link networking shown in fig. 1, as shown in fig. 5, the link switching apparatus includes:
a sending module 510, configured to send a first probe packet to the main AC through the first link and send a second probe packet to the main AC through the second link at the same time when it is determined that the link detection condition is met;
a determining module 520, configured to determine whether connection between the AP and the main AC is interrupted or not according to a condition that the response packet is received through the first link and a condition that the response packet is received through the second link after waiting for a first preset duration;
a switching module 530, configured to switch the second link serving as the standby link to the main link when the connection interruption is determined.
In an optional implementation manner, the sending module 510 is specifically configured to generate a first probe packet including a first type value in a process of sending the first probe packet to a main AC through a first link, and send the first probe packet to the main AC through the first link, where the first type value is used to instruct the main AC to return a response packet including a second type value through the first link;
the sending module 520 is further specifically configured to generate a second probe packet including a third type value during a process of sending the second probe packet to the main AC through the second link, and send the second probe packet to the main AC through the second link, where the third type value is used to indicate that the main AC returns a response packet including a fourth type value and an interface state through the second link, and the interface state is a state of an interface of the first link on the main AC.
In an optional implementation manner, the determining module 520 is specifically configured to determine that the connection between the AP and the main AC is normal if the response packet is received through the first link; if the response message is not received through the first link and the second link, determining that the connection between the AP and the main AC is interrupted; and if the response message containing the interface state of the disconnection is not received through the first link but the response message containing the interface state of the disconnection is received through the second link, determining that the connection between the AP and the main AC is interrupted.
In an optional implementation manner, the determining module 520 is specifically configured to, if a response packet including an interface state that is online is not received through the first link but is received through the second link, continue to send the first detection packet to the main AC through the first link, and send the second detection packet to the main AC through the second link at the same time; after waiting for a second preset time, if a response message is received through the first link, determining that the connection between the AP and the main AC is normal; and if the response message is not received through the first link, determining that the connection between the AP and the main AC is interrupted.
In an alternative implementation, the apparatus further comprises (not shown in fig. 5):
and the first fault point determining module is used for determining that the first link between the AP and the main AC is in fault when judging that the response message is still not received through the first link and the response message is still received through the second link.
In an alternative implementation, the apparatus further comprises (not shown in fig. 5):
the second fault point determining module is used for determining that the main AC has a fault when judging that the response message is not received through the first link and the second link; and determining that the first link between the main AC and the AP is in failure when judging that the response message is not received through the first link but the response message containing the interface state of the dropped interface is received through the second link.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A link switching method is applied to an Access Point (AP) in a dual-link networking, the dual-link networking further comprises a main wireless controller (AC) and a standby AC, the AP is connected with the main AC through a first link, and the AP is connected with the standby AC through a second link, and the method comprises the following steps:
when the link detection condition is determined to be met, sending a first detection message to the main AC through a first link, and simultaneously sending a second detection message to the main AC through a second link;
after waiting for a first preset time, judging whether the connection between the AP and the main AC is interrupted or not according to the condition that the first link receives a response message and the condition that the second link receives a response message;
and if the connection is interrupted, switching the second link serving as the standby link to the main link.
2. The method of claim 1, wherein sending the first probe packet to the primary AC over the first link comprises:
generating a first detection message containing a first type value, and sending the first detection message to the main AC through a first link, wherein the first type value is used for indicating the main AC to return a response message containing a second type value through the first link;
the sending a second probe packet to the primary AC over a second link includes:
generating a second detection message containing a third type value, and sending the second detection message to the main AC through a second link, wherein the third type value is used for indicating the main AC to return a response message containing a fourth type value and an interface state through the second link; the interface state is a state of an interface of a first link on the primary AC.
3. The method of claim 2, wherein the determining whether the connection between the AP and the main AC is interrupted in the case of receiving the response packet through the first link and in the case of receiving the response packet through the second link comprises:
if a response message is received through the first link, determining that the connection between the AP and the main AC is normal;
if no response message is received through the first link and the second link, determining that the connection between the AP and the main AC is interrupted;
and if no response message is received through the first link but a response message containing an interface state of a dropped connection is received through the second link, determining that the connection between the AP and the main AC is interrupted.
4. The method of claim 3, further comprising:
if no response is received through the first link but a response containing an interface state of being online is received through the second link, continuously sending a first detection message to the main AC through the first link, and simultaneously sending a second detection message to the main AC through the second link;
after waiting for a second preset time, if a response is received through the first link, determining that the connection between the AP and the main AC is normal;
determining that the connection between the AP and the main AC is broken if no response is received through the first link.
5. The method of claim 4, further comprising:
determining that a first link between the AP and the main AC is down if no response is still received over the first link and a response is still received over the second link.
6. The method of claim 3, further comprising:
if no response is received through the first link and the second link, determining that the main AC has a fault;
determining that the first link between the main AC and the AP is faulty if no response is received through the first link but a response including an interface status of being disconnected is received through the second link.
7. A link switching device is applied to an Access Point (AP) in a dual-link networking, the dual-link networking further comprises a main wireless controller (AC) and a standby AC, the AP is connected with the main AC through a first link, the AP is connected with the standby AC through a second link, and the device comprises:
a sending module, configured to send a first detection packet to the main AC through a first link and send a second detection packet to the main AC through a second link at the same time when it is determined that the link detection condition is met;
a judging module, configured to judge whether connection between the AP and the main AC is interrupted or not in a case where a response packet is received through the first link and in a case where a response packet is received through the second link after waiting for a first preset duration;
and the switching module is used for switching the second link serving as the standby link into the main link when the connection interruption is judged.
8. The apparatus according to claim 7, wherein the sending module is specifically configured to, during sending the first probe packet to the main AC through the first link, generate a first probe packet including a first type value, and send the first probe packet to the main AC through the first link, where the first type value is used to instruct the main AC to return a response packet including a second type value through the first link;
the sending module is further specifically configured to generate a second probe packet including a third type value during a process of sending the second probe packet to the main AC through the second link, and send the second probe packet to the main AC through the second link, where the third type value is used to instruct the main AC to return a response packet including a fourth type value and an interface state through the second link, and the interface state is a state of an interface of the first link on the main AC.
9. The apparatus according to claim 8, wherein the determining module is specifically configured to determine that the connection between the AP and the main AC is normal if a response packet is received through the first link; if no response message is received through the first link and the second link, determining that the connection between the AP and the main AC is interrupted; and if no response message is received through the first link but a response message containing an interface state of a dropped connection is received through the second link, determining that the connection between the AP and the main AC is interrupted.
10. The apparatus according to claim 8, wherein the determining module is specifically configured to, if a response packet is not received via the first link but a response packet including an interface state that is online is received via the second link, continue to send the first probe packet to the main AC via the first link, and send the second probe packet to the main AC via the second link; after waiting for a second preset time, if a response message is received through the first link, determining that the connection between the AP and the main AC is normal; and if no response message is received through the first link, determining that the connection between the AP and the main AC is interrupted.
CN202011027628.2A 2020-09-25 2020-09-25 Link switching method and device Active CN112367179B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011027628.2A CN112367179B (en) 2020-09-25 2020-09-25 Link switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011027628.2A CN112367179B (en) 2020-09-25 2020-09-25 Link switching method and device

Publications (2)

Publication Number Publication Date
CN112367179A CN112367179A (en) 2021-02-12
CN112367179B true CN112367179B (en) 2022-03-29

Family

ID=74507502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011027628.2A Active CN112367179B (en) 2020-09-25 2020-09-25 Link switching method and device

Country Status (1)

Country Link
CN (1) CN112367179B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114531373A (en) * 2022-02-25 2022-05-24 苏州浪潮智能科技有限公司 Node state detection method, node state detection device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925429A (en) * 2006-09-30 2007-03-07 杭州华为三康技术有限公司 Method and equipment for realizing fast detection
CN102231687A (en) * 2011-06-29 2011-11-02 华为技术有限公司 Method and device for detecting link failure
CN102891769A (en) * 2012-10-16 2013-01-23 杭州华三通信技术有限公司 Link fault informing method and apparatus
CN107332726A (en) * 2016-04-29 2017-11-07 华为技术有限公司 A kind of detection method and device of communication link
WO2018121589A1 (en) * 2016-12-30 2018-07-05 中兴通讯股份有限公司 Data link detection method, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925429A (en) * 2006-09-30 2007-03-07 杭州华为三康技术有限公司 Method and equipment for realizing fast detection
CN102231687A (en) * 2011-06-29 2011-11-02 华为技术有限公司 Method and device for detecting link failure
CN102891769A (en) * 2012-10-16 2013-01-23 杭州华三通信技术有限公司 Link fault informing method and apparatus
CN107332726A (en) * 2016-04-29 2017-11-07 华为技术有限公司 A kind of detection method and device of communication link
WO2018121589A1 (en) * 2016-12-30 2018-07-05 中兴通讯股份有限公司 Data link detection method, apparatus and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
IPv6可用带宽测量方法的设计与实现;李智涛等;《电子科技大学学报》;20081130(第06期);全文 *

Also Published As

Publication number Publication date
CN112367179A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
CN101547082B (en) Active/standby link switching method and network device
CN100459601C (en) Method for realizing active/standby gateway apparatus in network
US8027247B2 (en) Method and router for controlling graceful restart status
KR101591102B1 (en) Method for router of virtual router redundancy protocol and communication system therefor
CN101729426B (en) Method and system for quickly switching between master device and standby device of virtual router redundancy protocol (VRRP)
CN107547368B (en) BFD session switching method, device and storage medium
CN101197733A (en) Automatic detection method and device for network connectivity
CN101984600A (en) Graceful restart method, equipment and system of routing protocol
US20090006650A1 (en) Communication device, communication method, communication interface, and program product
CN110943878A (en) Heartbeat packet transmission method, terminal and device with storage function
CN103281720B (en) The hot standby changing method of wireless controller and device, wireless controller, connecting system
CN112367179B (en) Link switching method and device
CN113328916A (en) BFD detection mode switching method, device and equipment
CN101909006A (en) BFD (Bidirectional Forwarding Detection) message sending and receiving methods as well as device and communication system thereof
CN107872822B (en) Service bearing method and device
CN101237696B (en) Base station access unit switching method and base station
CN108337118B (en) Message forwarding method and device
CN101848165A (en) Method for controlling recovery of interrupted communication link and interface board
CN113726650B (en) SBFD detection method and network equipment
CN102546313B (en) Multi-activation detection method and multi-activation detection device
CN106301835B (en) BFD link establishing method and device and router
CN109818870B (en) Multicast routing method, device, service board and machine readable storage medium
CN101686153A (en) Method for transmitting VRRP notice news by communication equipment and device thereof
CN101217405A (en) SGSN backup method and communication system, communication device
US9554290B2 (en) Wireless communication system and method for automatically switching device identifications

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