CN108933818B - Communication method and device - Google Patents

Communication method and device Download PDF

Info

Publication number
CN108933818B
CN108933818B CN201810644985.XA CN201810644985A CN108933818B CN 108933818 B CN108933818 B CN 108933818B CN 201810644985 A CN201810644985 A CN 201810644985A CN 108933818 B CN108933818 B CN 108933818B
Authority
CN
China
Prior art keywords
communication
communication device
routing protocol
holding time
switching
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
CN201810644985.XA
Other languages
Chinese (zh)
Other versions
CN108933818A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201810644985.XA priority Critical patent/CN108933818B/en
Publication of CN108933818A publication Critical patent/CN108933818A/en
Application granted granted Critical
Publication of CN108933818B publication Critical patent/CN108933818B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a communication method and device, and relates to the technical field of data communication. The communication control device monitors the current state of the routing protocol processes in the two communication devices establishing the neighbor relation, and when the master-slave process switching of the routing protocol process of any communication device is monitored, a control instruction is sent so that the opposite-end communication device of the communication device generating the master-slave process switching adopts the preset connection holding time to maintain the neighbor relation between the two communication devices, and the communication interruption caused by the fact that the opposite-end communication device adopts the original connection holding time to receive the message is avoided. The preset connection holding time is longer than the original connection holding time determined when the two communication devices establish the neighbor relation. When the master and standby processes of the routing protocol process are switched, the connection holding time is prolonged, so that communication interruption caused by overtime of receiving messages of opposite-end communication equipment due to the master and standby process switching of the routing protocol process can be effectively avoided.

Description

Communication method and device
Technical Field
The present application relates to the field of data communication technologies, and in particular, to a communication method and apparatus.
Background
After a routing Protocol (for example, Border Gateway Protocol (BGP)) establishes a neighbor relationship between communication devices (for example, routers or switches), the routing Protocol designs keep-alive messages (keep alive information), keep-alive timers and keep-alive timers for quickly sensing network changes. The keep-alive message is used for maintaining the neighbor relation between the communication devices and detecting the validity of the connection. After the routing protocol connection is established between the communication devices, the communication devices send keep-alive messages to the opposite-end communication device at regular time according to the keep-alive timer so as to prevent the opposite-end communication device from considering the routing protocol connection to be interrupted. Specifically, if the peer communication device does not receive a keep-alive message or any other type of message within the connection Hold time (Hold time) set by the Hold timer, it considers that the routing protocol connection is interrupted, and exits the connection. In this case, reducing the survival time and the connection holding time allows a failure of the communication link to be detected more quickly, and facilitates quick convergence of the routing protocol.
Meanwhile, the connection keeping time is determined by message negotiation in the process of establishing the neighbor relation of the routing protocol. So the keep-alive time cannot change once the neighbor relation is established. If the connection holding time is to be changed, the communication device needs to be disconnected and then reconnected.
Usually, an uninterrupted Routing (NSR) function of a Routing protocol is used on a distributed device to ensure that communication connection between communication devices having a neighbor relation is not disconnected and Routing and forwarding are not interrupted when software is upgraded or abnormally restarted. In the process of switching the main process and the standby process of the communication equipment, the original standby process is upgraded into a main process, if the hardware performance is insufficient or the number of routes is large, the backup data is not processed before, and the standby process needs to process the data to be upgraded into the main process.
Disclosure of Invention
The embodiment of the application describes a communication method and a communication device, which are used for solving the problem of communication interruption caused by overtime of message receiving of opposite-end communication equipment when a master/standby process is switched in a routing protocol process.
In a first aspect, an embodiment of the present application provides a communication method, which is applied to a communication control device, where the communication control device establishes communication with two communication devices that establish a neighbor relation, and the method includes:
monitoring the current state of the routing protocol processes in the two communication devices;
when it is monitored that the master-slave process switching occurs in the routing protocol process of any one of the communication devices, sending a first control instruction to an opposite-end communication device of the communication device in which the master-slave process switching occurs, so that the opposite-end communication device maintains the neighbor relation between the two communication devices by adopting a preset connection holding time according to the first control instruction;
and the preset connection holding time is longer than the original connection holding time determined when the two communication devices establish the neighbor relation.
Optionally, in this embodiment, the method further includes:
after sending the first control instruction to the opposite-end communication device, detecting whether the communication device which generates the main/standby process switching has completed the main/standby process switching of the routing protocol process;
and when the communication equipment which is subjected to the main/standby process switching finishes the main/standby process switching of the routing protocol process, sending a second control instruction to the opposite-end communication equipment so that the opposite-end communication equipment maintains the neighbor relation between the two communication equipment by adopting original connection holding time according to the second control instruction.
Optionally, in this embodiment, the step of detecting whether the communication device that has undergone the active-standby process switching has completed the active-standby process switching of the routing protocol process includes:
detecting whether a notification of completion of switching the main process and the standby process, which is sent by the communication equipment with the main process and the standby process switching, through a network protocol configuration interface is received;
if the notification is received, judging that the main process and the standby process of the routing protocol process are switched;
if the notification is not received, the main/standby process switching of the routing protocol process is determined to be incomplete.
Optionally, in this embodiment, the step of detecting whether the communication device that has undergone the active-standby process switching has completed the active-standby process switching of the routing protocol process includes:
detecting whether the communication equipment which is subjected to the main/standby process switching sends a message to the opposite-end communication equipment within the preset connection holding time;
when detecting the message sent to the opposite-end communication device by the communication device which has undergone the main/standby process switching within the preset connection holding time, determining that the main/standby process switching of the routing protocol process is completed, and otherwise, determining that the main/standby process switching of the routing protocol process is not completed.
Optionally, in this embodiment, before monitoring the current state of the routing protocol processes in the two communication devices, the method further includes:
receiving session negotiation information reported by the two communication devices after establishing a neighbor relation, wherein the session negotiation information comprises the original connection holding time;
storing the original connection holding time in the communication control apparatus.
In a second aspect, an embodiment of the present application further provides a communication apparatus, which is applied to a communication control device, where the communication control device establishes communication with two communication devices that establish a neighbor relation, and the apparatus includes:
the monitoring module is used for monitoring the current states of the routing protocol processes in the two communication devices;
a first sending module, configured to send a first control instruction to an opposite-end communication device of the communication device that undergoes the master-slave process switching when it is monitored that the master-slave process switching occurs in the routing protocol process of any one of the communication devices, so that the opposite-end communication device maintains a neighbor relationship between the two communication devices by using a preset connection holding time according to the first control instruction;
and the preset connection holding time is longer than the original connection holding time determined when the two communication devices establish the neighbor relation.
Optionally, in this embodiment, the apparatus further includes:
a detection module, configured to detect whether a communication device that has undergone a primary-standby process switching has completed primary-standby process switching of the routing protocol process after sending the first control instruction to the opposite-end communication device;
a second sending module, configured to send a second control instruction to the opposite-end communication device when the communication device that has undergone the active-standby process switching has completed the active-standby process switching of the routing protocol process, so that the opposite-end communication device maintains a neighbor relationship between the two communication devices by using original connection holding time according to the second control instruction.
Optionally, in this embodiment, the detection module is specifically configured to:
detecting whether a notification of completion of switching the main process and the standby process, which is sent by the communication equipment with the main process and the standby process switching, through a network protocol configuration interface is received;
if the notification is received, judging that the main process and the standby process of the routing protocol process are switched;
if the notification is not received, the main/standby process switching of the routing protocol process is determined to be incomplete.
Optionally, in this embodiment, the detection module is specifically configured to:
detecting whether the communication equipment which is subjected to the main/standby process switching sends a keep-alive message to the opposite-end communication equipment within the preset connection keeping time or not;
when detecting the keep-alive message sent to the opposite-end communication device by the communication device which has undergone the main/standby process switching within the preset connection holding time, determining that the main/standby process switching of the routing protocol process is completed, and determining that the main/standby process switching of the routing protocol process is not completed if the main/standby process switching of the routing protocol process is not completed.
Optionally, in this embodiment, the apparatus further includes:
a receiving module, configured to receive session negotiation information reported by the two communication devices after establishing a neighbor relationship, where the session negotiation information includes the original connection holding time;
and the storage module is used for storing the original connection holding time in the communication control equipment.
In a third aspect, an embodiment of the present application further provides a communication control apparatus, where the communication control apparatus includes a processor and a non-volatile memory storing several computer instructions, and when the computer instructions are executed by the processor, the communication control apparatus executes the communication method according to the first aspect.
In a fourth aspect, an embodiment of the present application further provides a readable storage medium, where the readable storage medium includes a computer program, and the computer program controls, when running, the communication control apparatus where the readable storage medium is located to execute the communication method according to the first aspect.
Compared with the prior art, the method has the following beneficial effects:
according to the communication method and the communication device provided by the embodiment of the application, the communication control equipment monitors the states of the routing protocol processes of the two communication devices establishing the neighbor relation. If it is monitored that the master-slave process switching occurs in the routing protocol process of one of the communication devices, the communication control device sends a control instruction, so that the opposite-end communication device of the communication device in which the master-slave process switching occurs adopts a preset connection holding time longer than the original connection holding time, maintains the neighbor relation between the two communication devices, and further avoids communication interruption caused by the fact that the opposite-end communication device adopts the original connection holding time to receive a message.
In the embodiment of the invention, because the preset connection holding time is longer than the original connection holding time determined when the two communication devices establish the neighbor relation, when the master/standby process switching of the routing protocol process occurs, the connection holding time is prolonged, and the communication interruption caused by the master/standby process switching of the routing protocol process and the overtime of the opposite-end communication device receiving the message can be effectively avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is an application environment diagram of a communication control device according to an embodiment of the present application;
fig. 2 is a block diagram of a communication control apparatus according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a communication method according to an embodiment of the present application;
fig. 4 is another schematic flow chart of a communication method according to an embodiment of the present application;
fig. 5 is a functional block diagram of a communication device according to an embodiment of the present disclosure;
fig. 6 is a block diagram of another functional module of a communication device according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present application, it is further noted that, unless expressly stated or limited otherwise, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Referring to fig. 1, fig. 1 is a view of an application scenario of a communication control device according to an embodiment of the present application, and as shown in the figure, a communication control device 100 is communicatively connected to a first communication device 200 and a second communication device 300, where the first communication device 200 and the second communication device 300 may be routers or switches.
The first communication device 200 and the second communication device 300 communicate through a routing Protocol (for example, BGP), for example, the first communication device 200 and the second communication device 300 may establish a neighbor relationship based on a Transmission Control Protocol (TCP), and after establishing the neighbor relationship, the first communication device 200 and the second communication device 300 are opposite-end communication devices.
Referring to fig. 2, fig. 2 is a schematic structural diagram of the communication control apparatus 100 in fig. 1 according to an embodiment of the present disclosure. The communication control apparatus 100 includes a communication device 110, a memory 111, a processor 112, and a communication unit 113.
The elements of the memory 111, the processor 112 and the communication unit 113 may be electrically connected to each other directly or indirectly to enable data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The Memory 111 may be, but not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 111 is used for storing a program, and the processor 112 executes the program after receiving the execution instruction. The communication unit 113 is used to establish a communication connection between the communication control apparatus 100 and the first communication apparatus 200 and the second communication apparatus 300 via a network, and to perform reception and transmission of data via the network.
The communication device 110 includes at least one software functional module which can be stored in the memory 111 in the form of software or firmware (firmware) or is fixed in an Operating System (OS) of the communication control apparatus 100. The processor 112 is used for executing executable modules stored in the memory 111, such as software functional modules and computer programs included in the communication device 110.
It should be understood that the configuration shown in fig. 2 is merely illustrative, and the communication control apparatus 100 may further include more or fewer components than shown in fig. 2, or have a different configuration from that shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 3, fig. 3 is a flowchart of a communication method applied to the communication control apparatus 100 in fig. 2 according to an embodiment of the present application, and various steps included in the method are described in detail below by taking a routing protocol as BGP as an example.
Step S310, monitoring the current state of the routing protocol processes in the two communication devices.
After the BGP neighbor relationship is established between the first communication device 200 and the second communication device 300, the communication control device 100 monitors states of a routing protocol process (hereinafter referred to as a BGP process) of the first communication device 200 and the second communication device 300, where the states of the BGP process include switching between a BGP main process and a BGP standby process.
In this step, the BGP process state monitoring mode may be a passive monitoring mode or an active monitoring mode.
In the passive monitoring mode, when the BGP process state changes, the first communication device 200 or the second communication device 300 notifies the communication control device 100 of the change in the BGP process state by sending a notification.
In the active monitoring mode, the communication control device 100 may actively acquire the BGP process states of the first communication device 200 and the second communication device 300 through a network configuration protocol interface of the first communication device 200 or the second communication device 300.
Step S320, when it is monitored that the master/slave process switching occurs in the routing protocol process of any communication device, sending a first control instruction to an opposite-end communication device of the communication device in which the master/slave process switching occurs, so that the opposite-end communication device maintains a neighbor relationship between the two communication devices by using a preset connection holding time according to the first control instruction.
In this step, for example, the first communication device 200 is switched between the main process and the standby process, and a passive monitoring mode is adopted. After the BGP process of the first communication device 200 performs the active-standby process switching, the BGP process notifies the communication control device 100 through the network configuration protocol interface, and after receiving the notification, the communication control device 100 sends a first control instruction to the peer communication device (the second communication device 300).
The first control instruction includes a preset connection holding time, where the connection holding time is greater than an original connection holding time determined when the first communication device 200 and the second communication device 300 establish a neighbor relationship.
After receiving the first control instruction, the second communication device 300 maintains the neighbor relationship between the first communication device 200 and the second communication device 300 by using the preset connection holding time, and specifically, may receive the keep-alive packet sent by the first communication device 200 by using the set connection holding time.
Because the preset connection holding time is longer than the original connection holding time, it can be avoided that the communication between the first communication device 200 and the second communication device 300 is interrupted because the time delay of the first communication device 200 during the primary-standby process switching is prolonged due to factors such as hardware or routing number and the keep-alive messages are not received within the original connection holding time.
In the above scheme, the communication control device 100 may lengthen the connection holding time when the main/standby process of the communication device is switched, so as to solve a problem of communication interruption that may be caused when the main/standby process of the communication device is switched. However, simply increasing the connection holding time results in a slower failure detection of the communication link between the first communication device 200 and the second communication device 300, and also does not facilitate a faster convergence of the routing protocol between the first communication device 200 and the second communication device 300.
In order to solve the above problem, please refer to fig. 4, in the implementation of the present application, after the step S320 is executed, the method may further include a step S330 and a step S340. Step S330 and step S340 may shorten the connection holding time after the active/standby process switching is completed, which is beneficial to the fast detection of the failure of the communication link between the first communication device 200 and the second communication device 300 and the fast convergence of the routing protocol between the first communication device 200 and the second communication device 300.
The specific contents of step S330 and step S340 are as follows:
step S330, detecting whether the communication device that has undergone the master-slave process switching has completed the master-slave process switching of the routing protocol process.
In this embodiment, the communication control device 100 may implement the following two ways to detect the completion condition of the switching between the main process and the standby process.
In the first mode, whether a notification that switching of the main process and the standby process of the routing protocol process is completed, which is sent by a communication device in which switching of the main process and the standby process occurs through a network protocol configuration (Netconf) interface, is received is detected.
If the notification is received, the switching of the main process and the standby process of the routing protocol process is judged to be completed, and if the notification is not received, the switching of the main process and the standby process of the routing protocol process is judged to be not completed.
In the second mode, it is detected whether the communication device in which the active/standby process switching occurs sends a keep-alive message to the opposite-end communication device within a preset connection holding time.
When detecting the keep-alive messages sent to the opposite-end communication equipment by the communication equipment with the main/standby process switching within the preset connection holding time, judging that the main/standby process switching of the routing protocol process is completed, and judging that the main/standby process switching of the routing protocol process is not completed if the main/standby process switching of the routing protocol process is not completed.
Optionally, in this embodiment, the communication control device 100 may implement detection on the keep-alive packet by capturing the keep-alive packet on the communication link between the first communication device 200 and the second communication device 300; the detection of the keep-alive messages can also be realized by mirroring the keep-alive messages to the communication control device 100 through the first communication device 200 or the second communication device 300.
Step S340, when the communication device that has undergone the master-slave process switching has completed the master-slave process switching of the routing protocol process, sending a second control instruction to an opposite-end communication device, so that the opposite-end communication device maintains a neighbor relationship between the two communication devices by using an original connection holding time according to the second control instruction.
In this step, when communication control device 100 determines that the communication device that has undergone the main-standby process switching completes the main-standby process switching of the routing protocol process, a second control instruction is sent to the opposite-end communication device, where the second control instruction includes original connection holding time.
And when the opposite-end communication equipment receives the second control instruction, the connection holding time is changed from the preset connection holding time to the original connection holding time. And the opposite-end communication equipment maintains the neighbor relation between the two communication equipment by adopting the original connection holding time, and specifically, the opposite-end communication equipment receives the keep-alive messages sent by the communication equipment with the master-slave process switching through the original connection holding time.
The method can monitor the switching of the main process and the standby process of the routing protocol process, dynamically adjust the connection holding time when the main process and the standby process are switched, ensure that the communication link fault can be quickly detected on the premise of no communication interruption, and accelerate the convergence of the routing protocol.
Optionally, in this embodiment, before step S310, the method may further include:
receiving session negotiation information reported by two communication devices after establishing a neighbor relation, wherein the session negotiation information comprises original connection holding time;
the original connection holding time is stored in the communication control apparatus 100.
After the first communication device 200 and the second communication device 300 establish the neighbor relationship, the session negotiation information is reported to the communication control device 100. The communication control apparatus 100 maintains session negotiation information between the first communication apparatus 100 and the second communication apparatus 200. The session negotiation information includes the IP address of the communication device, the negotiated survival time, the original connection holding time, and the like, and in this embodiment, the communication control device 100 may store the session negotiation information in the form of a table.
When the first communication device 200 or the second communication device 300 switches between the main and standby processes of the routing protocol process, the communication control device 100 may obtain, in a table lookup manner, an IP address of an opposite-end communication device corresponding to the communication device that has switched between the main and standby processes, and send the original connection holding time determined when the two communication devices are connected to the neighbor relationship to the opposite-end communication device through the IP address of the opposite-end communication device. Meanwhile, whether the communication link between the two communication devices has the keep-alive message or not can be monitored through the IP addresses of the two communication devices.
The communication method provided by this embodiment lengthens the connection holding time when the master/standby process of the routing protocol process is switched, so that it can effectively avoid communication interruption caused by overtime of the opposite-end communication device receiving the message due to the master/standby process switching of the routing protocol process. Meanwhile, when the main/standby process switching is completed, the connection holding time is shortened, so that the communication link fault can be quickly detected and the convergence is accelerated on the premise that the communication interruption does not occur.
The embodiment of the present application further provides a communication device 110, and unlike the above embodiments, the communication device 110 describes the solution of the present application from the perspective of a virtual device. Referring to fig. 5, the communication device 110 may include the following modules.
A monitoring module 1101, configured to monitor a current state of a routing protocol process in two communication devices.
After a BGP neighbor is established between the first communication device 200 and the second communication device 300, the monitoring module 1101 monitors states of a routing protocol process (hereinafter referred to as a BGP process) in the first communication device 200 and the second communication device 300, where the states of the BGP process include switching between a BGP main process and a BGP standby process.
The monitoring module 1101 may monitor the state of the BGP process in a passive monitoring manner or an active monitoring manner. In the passive monitoring mode, when the BGP process state changes, the monitoring module 1101 receives a notification sent by the communication device whose BGP process state changes, and obtains the BGP process state by the first communication device 200 or the second communication device 300. In the active monitoring mode, the monitoring module 1101 may actively acquire the BGP process states of the first communication device and the second communication device through a network configuration protocol interface of the first communication device 200 or the second communication device 300.
A first sending module 1102, configured to send a first control instruction to an opposite-end communication device of the communication device that undergoes the main-standby process switching when the main-standby process switching occurs in the routing protocol process of any one communication device is monitored, so that the opposite-end communication device maintains a neighbor relationship between the two communication devices by using a preset connection holding time according to the first control instruction.
After the monitoring module 1101 receives the notification, the first sending module 1102 sends a first control instruction to an opposite-end communication device (the second communication device 300), where the first control instruction includes a preset connection holding time, and the connection holding time is greater than an original connection holding time determined when the first communication device 200 and the second communication device 300 establish a neighbor relationship. After receiving the first control instruction, the second communication device 300 receives the keep-alive message sent by the first communication device 200 by using the preset connection holding time. Because the preset connection holding time is longer than the original connection holding time, it can be avoided that the communication between the first communication device 200 and the second communication device 300 is interrupted because the time delay of the first communication device 200 is prolonged due to the factors such as hardware or routing number when the primary/standby process is switched and no message is received in the original connection holding time.
Referring to fig. 6, in the present embodiment, the communication device 110 may further include:
a detecting module 1103, configured to detect whether the communication device that has undergone the main/standby process switching has completed the main/standby process switching of the routing protocol process after sending the first control instruction to the opposite-end communication device.
In an implementation manner of this embodiment, the detecting module 1103 is specifically configured to:
whether a notification of switching completion of the main and standby processes sent by the communication equipment with the main and standby process switching occurrence through the network protocol configuration interface is received or not is detected.
If the notification is received, judging that the main process and the standby process of the routing protocol process are switched; if the notification is not received, the main/standby process switching of the routing protocol process is determined to be incomplete.
In another implementation manner of this embodiment, the detecting module 1103 is specifically configured to:
detecting whether the communication equipment which is subjected to the main/standby process switching sends a keep-alive message to opposite-end communication equipment within a preset connection keeping time.
When detecting the keep-alive messages sent to the opposite-end communication equipment by the communication equipment with the main/standby process switching within the preset connection holding time, judging that the main/standby process switching of the routing protocol process is completed, and judging that the main/standby process switching of the routing protocol process is not completed if the main/standby process switching of the routing protocol process is not completed.
A second sending module 1104, configured to send a second control instruction to an opposite-end communication device when the communication device that has undergone the active-standby process switching has completed the active-standby process switching of the routing protocol process, so that the opposite-end communication device maintains a neighbor relationship between the two communication devices by using original connection holding time according to the second control instruction.
Referring to fig. 6 again, in the present embodiment, the communication device 110 may further include:
a receiving module 1105, configured to receive session negotiation information reported by the two communication devices after establishing a neighbor relationship, where the session negotiation information includes the original connection holding time.
A storage module 1106, configured to store the original connection holding time in the communication control device.
If the above functions are implemented in the form of software functional modules and sold or used as a separate product, they may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing the communication control apparatus 100 to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In summary, the communication method and apparatus provided in the embodiments of the present application. The communication control device monitors the routing protocol process states of the two communication devices establishing the neighbor relation. If it is monitored that the master-slave process switching occurs in the routing protocol process of one of the communication devices, the communication control device sends a control instruction, so that the opposite-end communication device of the communication device in which the master-slave process switching occurs adopts a preset connection holding time longer than the original connection holding time, maintains the neighbor relation between the two communication devices, and further avoids communication interruption caused by the fact that the opposite-end communication device adopts the original connection holding time to receive a message. When the master and standby processes of the routing protocol process are switched, the connection holding time is prolonged, so that communication interruption caused by overtime of receiving messages of opposite-end communication equipment due to the master and standby process switching of the routing protocol process can be effectively avoided. Meanwhile, when the main and standby processes are switched, the connection holding time is recovered, so that the communication link fault can be quickly detected, and the accelerated convergence of the routing protocol is ensured.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (8)

1. A communication method applied to a communication control apparatus that establishes communication with two communication apparatuses that establish a neighbor relation, the method comprising:
monitoring the current state of the routing protocol processes in the two communication devices;
when it is monitored that the master-slave process switching of the routing protocol process of any communication device occurs, sending a first control instruction to an opposite-end communication device of the communication device with the master-slave process switching, so that the opposite-end communication device maintains the neighbor relation between the two communication devices by adopting preset connection holding time according to the first control instruction, wherein the preset connection holding time is longer than the original connection holding time determined when the two communication devices establish the neighbor relation;
detecting whether the communication equipment which is subjected to the main/standby process switching completes the main/standby process switching of the routing protocol process;
when the communication device which has undergone the master-slave process switching has completed the master-slave process switching of the routing protocol process, sending a second control instruction including the original connection holding time to the opposite-end communication device, so that the opposite-end communication device maintains the neighbor relationship between the two communication devices by using the original connection holding time according to the second control instruction.
2. The method of claim 1, wherein the detecting whether the communication device that has undergone the active-standby process switching has completed the active-standby process switching of the routing protocol process includes:
detecting whether a notification of completion of switching the main process and the standby process, which is sent by the communication equipment with the main process and the standby process switching, through a network protocol configuration interface is received;
if the notification is received, judging that the main process and the standby process of the routing protocol process are switched;
if the notification is not received, the main/standby process switching of the routing protocol process is determined to be incomplete.
3. The method of claim 1, wherein the detecting whether the communication device that has undergone the active-standby process switching has completed the active-standby process switching of the routing protocol process comprises:
detecting whether the communication equipment which is subjected to the main/standby process switching sends a keep-alive message to the opposite-end communication equipment within the preset connection keeping time or not;
when detecting the keep-alive message sent to the opposite-end communication device by the communication device which has undergone the main/standby process switching within the preset connection holding time, determining that the main/standby process switching of the routing protocol process is completed, and determining that the main/standby process switching of the routing protocol process is not completed if the main/standby process switching of the routing protocol process is not completed.
4. The method of claim 1, prior to said monitoring a current state of routing protocol processes within said two communication devices, said method further comprising:
receiving session negotiation information reported by the two communication devices after establishing a neighbor relation, wherein the session negotiation information comprises the original connection holding time;
storing the original connection holding time in the communication control apparatus.
5. A communication apparatus applied to a communication control device that establishes communication with two communication devices that establish a neighbor relation, the apparatus comprising:
the monitoring module is used for monitoring the current states of the routing protocol processes in the two communication devices;
a first sending module, configured to send a first control instruction to an opposite-end communication device of the communication device that undergoes the master-slave process switching when it is monitored that the master-slave process switching occurs in the routing protocol process of any communication device, so that the opposite-end communication device maintains a neighbor relationship between the two communication devices by using a preset connection holding time according to the first control instruction, where the preset connection holding time is greater than an original connection holding time determined when the two communication devices establish the neighbor relationship;
a detection module, configured to detect whether a communication device that has undergone a primary-standby process switching has completed primary-standby process switching of the routing protocol process after sending the first control instruction to the opposite-end communication device;
a second sending module, configured to send a second control instruction including the original connection holding time to the opposite-end communication device when the communication device that has undergone the active-standby process switching has completed the active-standby process switching of the routing protocol process, so that the opposite-end communication device maintains a neighbor relationship between the two communication devices by using the original connection holding time according to the second control instruction.
6. The apparatus of claim 5, wherein the detection module is specifically configured to:
detecting whether a notification of completion of switching the main process and the standby process, which is sent by the communication equipment with the main process and the standby process switching, through a network protocol configuration interface is received;
if the notification is received, judging that the main process and the standby process of the routing protocol process are switched;
if the notification is not received, the main/standby process switching of the routing protocol process is determined to be incomplete.
7. The apparatus of claim 5, wherein the detection module is specifically configured to:
detecting whether the communication equipment which is subjected to the main/standby process switching sends a keep-alive message to the opposite-end communication equipment within the preset connection keeping time or not;
when detecting the keep-alive message sent to the opposite-end communication device by the communication device which has undergone the main/standby process switching within the preset connection holding time, determining that the main/standby process switching of the routing protocol process is completed, and determining that the main/standby process switching of the routing protocol process is not completed if the main/standby process switching of the routing protocol process is not completed.
8. The apparatus of claim 5, further comprising:
a receiving module, configured to receive session negotiation information reported by the two communication devices after establishing a neighbor relationship, where the session negotiation information includes the original connection holding time;
and the storage module is used for storing the original connection holding time in the communication control equipment.
CN201810644985.XA 2018-06-21 2018-06-21 Communication method and device Active CN108933818B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810644985.XA CN108933818B (en) 2018-06-21 2018-06-21 Communication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810644985.XA CN108933818B (en) 2018-06-21 2018-06-21 Communication method and device

Publications (2)

Publication Number Publication Date
CN108933818A CN108933818A (en) 2018-12-04
CN108933818B true CN108933818B (en) 2021-09-07

Family

ID=64446185

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810644985.XA Active CN108933818B (en) 2018-06-21 2018-06-21 Communication method and device

Country Status (1)

Country Link
CN (1) CN108933818B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111371680B (en) * 2020-03-04 2022-04-29 深信服科技股份有限公司 Route management method, device, equipment and storage medium for dual-computer hot standby
CN112583708B (en) * 2020-12-25 2022-08-30 新华三技术有限公司 Connection relation control method and device and electronic equipment
CN113726649B (en) * 2021-09-07 2023-06-13 新华三大数据技术有限公司 Routing information processing method and system
CN114338505B (en) * 2021-12-01 2023-06-27 杭州迪普科技股份有限公司 Route calculation method, device, storage medium and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197697A (en) * 2006-12-04 2008-06-11 华为技术有限公司 Method and device for restraining virtual local area network interface state change
US7406030B1 (en) * 2003-08-25 2008-07-29 Juniper Networks, Inc. Dynamic renegotiation of graceful restart time to avoid double-failure traffic loss
CN102170399A (en) * 2011-05-17 2011-08-31 中兴通讯股份有限公司 Keep-alive time regulation method, device and system
CN104539530A (en) * 2015-01-13 2015-04-22 重庆金美通信有限责任公司 Host/standby switching uninterrupted forwarding method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7406030B1 (en) * 2003-08-25 2008-07-29 Juniper Networks, Inc. Dynamic renegotiation of graceful restart time to avoid double-failure traffic loss
CN101197697A (en) * 2006-12-04 2008-06-11 华为技术有限公司 Method and device for restraining virtual local area network interface state change
CN102170399A (en) * 2011-05-17 2011-08-31 中兴通讯股份有限公司 Keep-alive time regulation method, device and system
CN104539530A (en) * 2015-01-13 2015-04-22 重庆金美通信有限责任公司 Host/standby switching uninterrupted forwarding method

Also Published As

Publication number Publication date
CN108933818A (en) 2018-12-04

Similar Documents

Publication Publication Date Title
CN108933818B (en) Communication method and device
US9219641B2 (en) Performing failover in a redundancy group
JP4639207B2 (en) Network system, node device and management server
CN109344014B (en) Main/standby switching method and device and communication equipment
US7257731B2 (en) System and method for managing protocol network failures in a cluster system
US7957330B1 (en) Failsafe management of periodic communications during system upgrade for a network device
CN107612754B (en) Bidirectional forwarding link fault detection method and device and network node equipment
US20170214609A1 (en) Forwarding method and forwarding device
CN106603261B (en) Hot backup method, first main device, standby device and communication system
US9270558B2 (en) Method, local gateway, and system for local voice survivability
US10972337B2 (en) Method and apparatus for split-brain avoidance in sub-secondary high availability systems
CN107241208B (en) Message forwarding method, first switch and related system
CN109586986B (en) Method, device, equipment and storage medium for switching network equipment
WO2017036165A1 (en) Link fault detection method and apparatus
CN112383414B (en) Dual-machine hot backup quick switching method and device
JP6421516B2 (en) Server device, redundant server system, information takeover program, and information takeover method
CN107872822B (en) Service bearing method and device
CN109039747B (en) Dual-computer hot standby control method and device for DPDK service
CN116708129A (en) Method, device and storage medium for link fault detection and quick recovery
US11258700B1 (en) Enhanced messaging for backup state status notifications in communications networks
CN111934939B (en) Network node fault detection method, device and system
CN115361310A (en) Link detection method and device of firewall
WO2021018150A1 (en) Link detection method and apparatus
JP2009003491A (en) Server switching method in cluster system
CN112231154A (en) Dual-computer hot standby switching method and device

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