CN113765711A - Network equipment keep-alive method and device - Google Patents

Network equipment keep-alive method and device Download PDF

Info

Publication number
CN113765711A
CN113765711A CN202110984685.8A CN202110984685A CN113765711A CN 113765711 A CN113765711 A CN 113765711A CN 202110984685 A CN202110984685 A CN 202110984685A CN 113765711 A CN113765711 A CN 113765711A
Authority
CN
China
Prior art keywords
keep
alive
target network
time
duration
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.)
Granted
Application number
CN202110984685.8A
Other languages
Chinese (zh)
Other versions
CN113765711B (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 Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data 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 Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202110984685.8A priority Critical patent/CN113765711B/en
Publication of CN113765711A publication Critical patent/CN113765711A/en
Application granted granted Critical
Publication of CN113765711B publication Critical patent/CN113765711B/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/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/0836Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability to enhance reliability, e.g. reduce downtime

Abstract

The present application relates to the field of network communication technologies, and in particular, to a keep-alive method and apparatus for a network device. The method is applied to an SDN controller and comprises the following steps: receiving a keep-alive message sent by target network equipment, and adding one to the number of the keep-alive messages to be processed corresponding to the target network equipment; acquiring the number of keep-alive messages to be processed corresponding to the target network equipment in a keep-alive management data table and the processing time consumption of the previous keep-alive message; and adjusting the keep-alive time of the target network equipment based on the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the last keep-alive message.

Description

Network equipment keep-alive method and device
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a keep-alive method and apparatus for a network device.
Background
SDN (Software Defined Network ) is a novel Network innovation architecture, and is an implementation manner of Network virtualization, and a core technology of the SDN is to separate a control layer and a forwarding layer of a Network device, such as a switch or a router, through a unified southbound interface protocol (such as OpenFlow and NETCONF), so as to implement control layer intelligent management and operation and maintenance of Network resources and Network services.
Currently, between an SDN controller and a network device, either an Echo Request/Echo Reply message is sent by using UDP at a client and a server for keep-alive, or a keep-alive mechanism of an OpenFlow connection or a TCP long connection is used for keep-alive.
However, when the networking architecture is large, and the number of network devices managed by the SDN controller reaches a certain magnitude, the SND controller may have a processing bottleneck, which may cause a problem that the device cannot normally process/receive the keep-alive messages within the keep-alive time, thereby causing a keep-alive failure.
Disclosure of Invention
The application provides a keep-alive method and a keep-alive device for network equipment, which are used for solving the problem that in the prior art, a large networking architecture causes that an SDN controller cannot normally process keep-alive messages, so that keep-alive failure is caused.
In a first aspect, the present application provides a network device keep-alive method, which is applied to an SDN controller, and the method includes:
receiving a keep-alive message sent by target network equipment, and adding one to the number of the keep-alive messages to be processed corresponding to the target network equipment;
acquiring the number of keep-alive messages to be processed corresponding to the target network equipment in a keep-alive management data table and the processing time consumption of the previous keep-alive message;
and adjusting the keep-alive time of the target network equipment based on the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the last keep-alive message.
Optionally, a keep-alive duration range and a keep-alive header packet sending offset time range are preconfigured in the SDN controller, and the method further includes:
when the access of the target network equipment is detected, the keep-alive duration of the target network equipment is configured based on the keep-alive duration range, and the keep-alive first packet sending offset time of the target network equipment is configured based on the keep-alive first packet sending offset time range;
sending the keep-alive duration and the keep-alive first packet sending offset time to the target network device, so that the target network device sends a keep-alive message to the SDN controller based on the keep-alive duration and the keep-alive first packet sending offset time, and stores the keep-alive duration and the keep-alive first packet sending offset time in the keep-alive management data table.
Optionally, the step of adjusting the keep-alive duration of the target network device based on the number of keep-alive messages to be processed corresponding to the target network device and the processing time consumption of the previous keep-alive message includes:
calculating the product of the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the last keep-alive message;
if the product is smaller than a first threshold value, reducing the keep-alive time length;
and if the product is larger than a second threshold value, increasing the keep-alive time length.
Optionally, if the first threshold is one fourth of the keep-alive duration, the step of reducing the keep-alive duration includes:
adjusting the keep-alive time of the target network equipment to be one half of the original keep-alive time;
if the second threshold is one half of the keep-alive time, the step of increasing the keep-alive time comprises:
and adjusting the keep-alive time of the target network equipment to be twice of the original keep-alive time.
Optionally, the adjusted keep-alive duration is greater than or equal to the minimum value of the keep-alive duration range and less than or equal to the maximum value of the keep-alive duration range, and the first threshold is smaller than the second threshold.
In a second aspect, the present application provides a network device keep-alive device, applied to an SDN controller, the device including:
the device comprises a receiving unit, a sending unit and a processing unit, wherein the receiving unit is used for receiving the keep-alive messages sent by the target network equipment and adding one to the number of the keep-alive messages to be processed corresponding to the target network equipment;
an obtaining unit, configured to obtain the number of keep-alive messages to be processed and the processing time of a previous keep-alive message, where the number corresponds to the target network device in the keep-alive management data table;
and the adjusting unit is used for adjusting the keep-alive duration of the target network equipment based on the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the previous keep-alive message.
Optionally, a keep-alive duration range and a keep-alive first packet sending offset time range are preconfigured in the SDN controller, and the apparatus further includes:
a configuration unit, configured to configure a keep-alive duration of a target network device based on the keep-alive duration range and configure a keep-alive first packet transmission offset time of the target network device based on the keep-alive first packet transmission offset time range when detecting that the target network device is accessed;
a sending unit, configured to send the keep-alive duration and the keep-alive first packet sending offset time to the target network device, so that the target network device sends a keep-alive packet to the SDN controller based on the keep-alive duration and the keep-alive first packet sending offset time, and stores the keep-alive duration and the keep-alive first packet sending offset time in the keep-alive management data table.
Optionally, based on the number of keep-alive messages to be processed corresponding to the target network device and the processing time of the previous keep-alive message, the adjusting unit is specifically configured to:
calculating the product of the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the last keep-alive message;
if the product is smaller than a first threshold value, reducing the keep-alive time length;
and if the product is larger than a second threshold value, increasing the keep-alive time length.
Optionally, if the first threshold is one fourth of the keep-alive duration, and the keep-alive duration is reduced, the adjusting unit is specifically configured to:
adjusting the keep-alive time of the target network equipment to be one half of the original keep-alive time;
if the second threshold is one half of the keep-alive time length, the keep-alive time length is increased, and the adjusting unit is specifically configured to:
and adjusting the keep-alive time of the target network equipment to be twice of the original keep-alive time.
Optionally, the adjusted keep-alive duration is greater than or equal to the minimum value of the keep-alive duration range and less than or equal to the maximum value of the keep-alive duration range, and the first threshold is smaller than the second threshold.
In a third aspect, an embodiment of the present application provides a network device keep-alive device, where the network device keep-alive device includes:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the steps of the method according to any one of the above first aspects in accordance with the obtained program instructions.
In a fourth aspect, the present application further provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the steps of the method according to any one of the above first aspects.
In summary, the network device keep-alive method provided in the embodiment of the present application is applied to an SDN controller, and the method includes: receiving a keep-alive message sent by target network equipment, and adding one to the number of the keep-alive messages to be processed corresponding to the target network equipment; acquiring the number of keep-alive messages to be processed corresponding to the target network equipment in a keep-alive management data table and the processing time consumption of the previous keep-alive message; and adjusting the keep-alive time of the target network equipment based on the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the last keep-alive message.
By adopting the network device keep-alive method provided by the embodiment of the application, whether the keep-alive time of the network device needs to be adjusted or not can be comprehensively judged based on the number of the messages to be processed corresponding to each network device and the processing time consumption of the previous keep-alive message, and the keep-alive time of the network device is dynamically adjusted, namely the SDN controller can intelligently and dynamically adjust the keep-alive time of each network device according to the congestion degree of the keep-alive message of each network device, so that the situation that the SDN controller sets the state of the normally keep-alive network device to be offline when the large-scale network device keeps alive is avoided, and the service robustness of the SDN controller is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
Fig. 1 is a detailed flowchart of a network device keep-alive method according to an embodiment of the present disclosure;
fig. 2 is a detailed flowchart of a method for hosting a network device according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a network device keep-alive device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another network device keep-alive device according to an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the 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 is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the 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 application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
Illustratively, referring to fig. 1, a detailed flowchart of a network device keep-alive method provided in an embodiment of the present application is shown, where the method is applied to an SDN controller, and the method includes the following steps:
step 100: receiving a keep-alive message sent by target network equipment, and adding one to the number of the keep-alive messages to be processed corresponding to the target network equipment.
In the implementation of the application, a keep-alive duration range and a keep-alive first packet sending offset time range are preconfigured in the SDN controller, so that when detecting that a target network device is accessed, the SDN controller configures the keep-alive duration of the target network device based on the keep-alive duration range, and configures the keep-alive first packet sending offset time of the target network device based on the keep-alive first packet sending offset time range; sending the keep-alive duration and the keep-alive first packet sending offset time to the target network device, so that the target network device sends a keep-alive message to the SDN controller based on the keep-alive duration and the keep-alive first packet sending offset time, and stores the keep-alive duration and the keep-alive first packet sending offset time in the keep-alive management data table.
That is to say, the SDN controller maintains a keep-alive management data table, where the keep-alive management data table includes entries corresponding to each accessed network device, that is, an entry corresponding to a target network device is maintained in the keep-alive management data table, where the entry includes the number of keep-alive messages to be processed corresponding to the target network device and the processing time of the previous keep-alive message, and may further include a keep-alive duration corresponding to the target network device and a keep-alive first packet sending offset time.
In practical application, the keep-alive duration range and the keep-alive header packet transmission offset time range can be configured according to user requirements and/or specific application scenarios:
specifically, the process of visually configuring the sending offset time range of the keep-alive header packet is as follows:
1. acquiring a current keep-alive first packet sending offset time range from a database, and displaying the current keep-alive first packet sending offset time range on a page;
2. configuring a new range by a user page;
3. and determining whether to save, if so, saving in the database, and if not, not taking effect on the new range.
The process of visually configuring the keep-alive duration range comprises the following steps:
1. and acquiring the current keep-alive duration range from the database, and displaying the keep-alive duration range on a page.
2. The user page configures a new scope.
3. And determining whether to save, if so, saving in the database, and if not, not taking effect on the new range.
In the embodiment of the present application, when the SND controller manages the network device, a preferred implementation manner is shown in fig. 2, which is a detailed flowchart of a method for managing the network device provided in the embodiment of the present application, where the method includes the following steps:
step 200: the page addition specifies a network device.
Step 210: the SDN controller establishes a NETCONF channel with the network equipment.
Step 220: and acquiring the keep-alive time range from the database, and acquiring default keep-alive time, namely the minimum value of the keep-alive time range, from the keep-alive time range to serve as the keep-alive time of the network equipment.
Step 230: and acquiring a keep-alive first packet transmission offset time range from the database, and acquiring a random value from the range to serve as the keep-alive first packet transmission offset time of the network equipment.
Step 240: and sending the keep-alive duration and the keep-alive first packet sending offset time selected in the step 220 and the step 230 to the network equipment through a NETCONF channel.
Step 250: and after successful issuing, saving the keep-alive duration and the keep-alive first packet sending offset time of the network equipment into keep-alive management data.
Step 260: and setting the network equipment to be in an on-line state. If the network device is in the on-line state, the network device is ready, and the service processing can be started.
In this embodiment of the application, after receiving the keep-alive duration and the keep-alive first packet sending offset time issued by the SDN controller, the target network device sends a keep-alive message to the SDN control based on the keep-alive duration and the keep-alive first packet sending offset time, for example, if the SDN controller configures the keep-alive first packet sending offset time of the network device a to be 20 seconds and the keep-alive duration to be 10 seconds, the network device a sends the keep-alive first packet after configuring the effective 20 seconds, and then sends the keep-alive message at regular intervals of 10 seconds.
Then, when receiving a keep-alive message sent by the target network device, the SDN controller adds one to the number of keep-alive messages to be processed corresponding to the target network device.
Step 110: and acquiring the number of keep-alive messages to be processed corresponding to the target network equipment in the keep-alive management data table and the processing time consumption of the previous keep-alive message.
Specifically, after receiving a keep-alive message sent by a target network device, the SDN controller obtains the number of keep-alive messages to be processed corresponding to the target network device and the processing time of the previous keep-alive message from a keep-alive management data table.
The processing time is the time consumed from the reception of a keep-alive message sent by the network equipment to the feedback of a response message to the network equipment.
Step 120: and adjusting the keep-alive time of the target network equipment based on the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the last keep-alive message.
In this embodiment of the present application, when the keep-alive time of the target network device is adjusted based on the number of keep-alive messages to be processed corresponding to the target network device and the processing time of the previous keep-alive message, a preferred implementation manner is:
calculating the product of the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the last keep-alive message; if the product is smaller than a first threshold value, reducing the keep-alive time length; and if the product is larger than a second threshold value, increasing the keep-alive time length.
Specifically, if the first threshold is one fourth of the keep-alive time, then the keep-alive time is reduced, and a preferred implementation manner is as follows: and adjusting the keep-alive time of the target network equipment to be half of the original keep-alive time.
If the second threshold is one half of the keep-alive time, increasing the keep-alive time, and a preferred implementation manner is: and adjusting the keep-alive time of the target network equipment to be twice of the original keep-alive time.
Of course, in this embodiment of the present application, because there is a keep-alive duration range, then, the adjusted keep-alive duration may be defined as a minimum value greater than or equal to the keep-alive duration range, and less than or equal to a maximum value of the keep-alive duration range, and the first threshold is less than the second threshold.
It should be noted that, the values of the first threshold and the second threshold may be configured in a user-defined manner according to different user requirements and/or different application scenarios, and only the first threshold is required to be smaller than the second threshold.
In summary, when there are more messages to be processed corresponding to one network device and the time consumed for processing the previous keep-alive message by the SDN controller is long (that is, the message processing performance of the SDN controller is low), the keep-alive time of the corresponding network device needs to be increased, and otherwise, the keep-alive time of the corresponding network device may be decreased.
The network device keep-alive configuration processing flow provided by the embodiment of the present application is described in detail below with reference to a specific application scenario. Illustratively, the method for processing keep-alive configuration by a network device according to an embodiment of the present application may include the following steps:
step 1: and the SDN controller configures the keep-alive time and the keep-alive first packet sending offset time to the network equipment through a NETCONF channel.
Step 2: and after the network equipment is successfully configured, keeping the keep-alive time and the keep-alive first packet sending offset time.
And step 3: judging whether a keep-alive message sending timer exists locally or not, if so, stopping and deleting the timer, and continuing to the step 4; if not, continue to step 4.
And 4, step 4: the sleep keep-alive header packet is sent an offset time.
And 5, starting a keep-alive message sending timer, wherein the starting interval duration is the keep-alive duration, and the timer sends the keep-alive messages once every keep-alive duration.
Step 6, after the timer is started, judging whether the keep-alive message sending timer is started for the first time, and carrying out the following two processes according to the judgment result:
if so, resetting the statistical data of the keep-alive messages, sending the keep-alive messages, adding one to the number of the sent messages, and updating the statistical data of the keep-alive messages.
If not, acquiring the statistical data of the keep-alive messages, including the number of the received messages and the number of the sent messages, judging whether the number of the sent messages is equal to the number of the received messages, if so, sending the keep-alive messages, adding one to the number of the sent messages, and updating the statistical data of the keep-alive messages.
Further, the keep-alive reply message receiving processing flow of the network device is as follows:
step 1: and the network equipment waits for receiving the keep-alive reply message sent by the SDN controller.
Step 2: and after receiving the keep-alive reply message, adding one to the number of the received messages, and updating the statistic data of the keep-alive messages.
And step 1 and step 2 are executed in a circulating mode.
The flow of the intelligent keep-alive of the SDN controller and the network equipment is as follows:
step 1: and the SDN controller receives the keep-alive message of the network equipment.
Step 2: and taking the current time as the keep-alive message receiving time of the network equipment, and updating the keep-alive message receiving time into the keep-alive management data.
And step 3: and acquiring the keep-alive management data of the network equipment, adding one to the number of keep-alive messages to be processed in the keep-alive management data, and updating the keep-alive management data.
And 4, step 4: judging whether the number of the keep-alive messages to be processed multiplied by the processing time of more than one keep-alive message is less than one fourth of the keep-alive time or not, and carrying out the following two processing according to the judgment result:
a. if the number of keep-alive messages multiplied by the processing time of the more than one keep-alive message is less than one fourth of the keep-alive time, the new keep-alive time of the network equipment is configured to be one half of the original keep-alive time (if the new keep-alive time is less than the minimum value of the keep-alive time range, the minimum value is taken), and the step 7 is continuously executed.
b. Otherwise, step 5 is executed.
And 5: judging whether the number of the keep-alive messages to be processed multiplied by the processing time of the more than one keep-alive message is more than or equal to one half of the keep-alive time and is less than the keep-alive time, and carrying out the following two processing according to the judgment result:
a. if the number of the keep-alive messages to be processed multiplied by the processing time consumption of the above keep-alive messages is more than or equal to one half of the keep-alive time and less than the keep-alive time, the new keep-alive time of the network equipment is configured to be one time of the original keep-alive time (if the new keep-alive time is more than the maximum value of the keep-alive time range, the maximum value is taken), and the step 7 is continuously executed.
b. Otherwise, step 6 is executed.
Step 6: judging whether the number of the keep-alive messages to be processed multiplied by the processing time consumption of more than one keep-alive message is more than or equal to the keep-alive duration and the original keep-alive duration is less than the maximum value of the keep-alive duration range, and processing the following two types according to the judgment result:
a. and if the number of the keep-alive messages to be processed multiplied by the processing time consumption of the more than one keep-alive message is more than or equal to the keep-alive time and the original keep-alive time is less than the maximum value of the keep-alive time range, configuring the new keep-alive time of the network equipment as the maximum value of the keep-alive time range, and continuously executing the step 7.
b. Otherwise step 7 is performed.
And 7: and sending the keep-alive back packet to the network equipment.
And 8: and subtracting one from the number of the keep-alive messages to be processed, calculating the keep-alive message processing time, and updating the keep-alive management data.
And step 9: judging whether a new keep-alive time length needs to be configured or not, and carrying out the following two processes according to a judgment result:
a. if the new keep-alive time length needs to be configured, another thread is started, the new keep-alive time length is configured to the corresponding network equipment through the NETCONF channel, and the processing is finished.
a. The process is ended.
The keep-alive monitoring process is as follows:
step 1: the SDN controller starts a keep-alive monitoring timer, and the starting interval time is the minimum value of the keep-alive duration range. And if the minimum value of the keep-alive time range changes, the old keep-alive monitoring timer is stopped being deleted, the keep-alive monitoring timer is newly built, and the interval time is started to be the minimum value of the new keep-alive time range.
Step 2: after the timer is started, each on-line network device is processed in a circulating mode, and the processing flow is as follows:
step 21: and acquiring the receiving time and the keep-alive duration of the keep-alive message in the keep-alive management data of the corresponding network equipment.
Step 22: if the difference value between the current time and the keep-alive message receiving time in the keep-alive management data is more than 4 times of the keep-alive time, the state of the network equipment is set to be offline, and the service related to the network equipment is not processed any more.
Step 23: and if the difference value between the current time and the keep-alive message receiving time in the keep-alive management data is less than or equal to 4 times of the keep-alive time, finishing the processing of the network equipment.
Exemplarily, referring to fig. 3, a schematic structural diagram of a network device keep-alive device provided in an embodiment of the present application is applied to an SDN controller, where the device includes:
a receiving unit 30, configured to receive a keep-alive message sent by a target network device, and add one to the number of keep-alive messages to be processed corresponding to the target network device;
an obtaining unit 31, configured to obtain the number of keep-alive messages to be processed corresponding to the target network device in the keep-alive management data table and the processing time of the previous keep-alive message;
an adjusting unit 32, configured to adjust the keep-alive duration of the target network device based on the number of keep-alive messages to be processed corresponding to the target network device and the processing time consumption of the previous keep-alive message.
Optionally, a keep-alive duration range and a keep-alive first packet sending offset time range are preconfigured in the SDN controller, and the apparatus further includes:
a configuration unit, configured to configure a keep-alive duration of a target network device based on the keep-alive duration range and configure a keep-alive first packet transmission offset time of the target network device based on the keep-alive first packet transmission offset time range when detecting that the target network device is accessed;
a sending unit, configured to send the keep-alive duration and the keep-alive first packet sending offset time to the target network device, so that the target network device sends a keep-alive packet to the SDN controller based on the keep-alive duration and the keep-alive first packet sending offset time, and stores the keep-alive duration and the keep-alive first packet sending offset time in the keep-alive management data table.
Optionally, based on the number of keep-alive messages to be processed corresponding to the target network device and the processing time of the previous keep-alive message, the adjusting unit 32 is specifically configured to:
calculating the product of the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the last keep-alive message;
if the product is smaller than a first threshold value, reducing the keep-alive time length;
and if the product is larger than a second threshold value, increasing the keep-alive time length.
Optionally, if the first threshold is one fourth of the keep-alive duration, and then the keep-alive duration is reduced, the adjusting unit 32 is specifically configured to:
adjusting the keep-alive time of the target network equipment to be one half of the original keep-alive time;
if the second threshold is one half of the keep-alive time length, the keep-alive time length is increased, and the adjusting unit is specifically configured to:
and adjusting the keep-alive time of the target network equipment to be twice of the original keep-alive time.
Optionally, the adjusted keep-alive duration is greater than or equal to the minimum value of the keep-alive duration range and less than or equal to the maximum value of the keep-alive duration range, and the first threshold is smaller than the second threshold.
The above units may be one or more integrated circuits configured to implement the above methods, for example: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above units is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Further, in the network device keep-alive device provided in the embodiment of the present application, from a hardware level, a schematic diagram of a hardware architecture of the network device keep-alive device may be shown in fig. 4, and the network device keep-alive device may include: a memory 40 and a processor 41, which,
memory 40 is used to store program instructions; processor 41 calls program instructions stored in memory 40 and executes the above-described method embodiments in accordance with the obtained program instructions. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, the present application also provides an SDN controller, including at least one processing element (or chip) for executing the above method embodiments.
Optionally, the present application also provides a program product, such as a computer-readable storage medium, having stored thereon computer-executable instructions for causing the computer to perform the above-described method embodiments.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A network device keep-alive method is applied to an SDN controller and comprises the following steps:
receiving a keep-alive message sent by target network equipment, and adding one to the number of the keep-alive messages to be processed corresponding to the target network equipment;
acquiring the number of keep-alive messages to be processed corresponding to the target network equipment in a keep-alive management data table and the processing time consumption of the previous keep-alive message;
and adjusting the keep-alive time of the target network equipment based on the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the last keep-alive message.
2. The method of claim 1, wherein a keep-alive duration range and a keep-alive header packet transmission offset time range are preconfigured in the SDN controller, and the method further comprises:
when the access of the target network equipment is detected, the keep-alive duration of the target network equipment is configured based on the keep-alive duration range, and the keep-alive first packet sending offset time of the target network equipment is configured based on the keep-alive first packet sending offset time range;
sending the keep-alive duration and the keep-alive first packet sending offset time to the target network device, so that the target network device sends a keep-alive message to the SDN controller based on the keep-alive duration and the keep-alive first packet sending offset time, and stores the keep-alive duration and the keep-alive first packet sending offset time in the keep-alive management data table.
3. The method according to claim 1 or 2, wherein the step of adjusting the keep-alive duration of the target network device based on the number of keep-alive messages to be processed corresponding to the target network device and the processing time consumption of the previous keep-alive message comprises:
calculating the product of the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the last keep-alive message;
if the product is smaller than a first threshold value, reducing the keep-alive time length;
and if the product is larger than a second threshold value, increasing the keep-alive time length.
4. The method of claim 3, wherein the first threshold is one-quarter of a keep-alive duration, and wherein the step of reducing the keep-alive duration comprises:
adjusting the keep-alive time of the target network equipment to be one half of the original keep-alive time;
if the second threshold is one half of the keep-alive time, the step of increasing the keep-alive time comprises:
and adjusting the keep-alive time of the target network equipment to be twice of the original keep-alive time.
5. The method of claim 4, wherein the adjusted keep-alive duration is greater than or equal to a minimum value of the keep-alive duration range and less than or equal to a maximum value of the keep-alive duration range, and the first threshold is less than the second threshold.
6. A network device keep-alive apparatus applied to an SDN controller, the apparatus comprising:
the device comprises a receiving unit, a sending unit and a processing unit, wherein the receiving unit is used for receiving the keep-alive messages sent by the target network equipment and adding one to the number of the keep-alive messages to be processed corresponding to the target network equipment;
an obtaining unit, configured to obtain the number of keep-alive messages to be processed and the processing time of a previous keep-alive message, where the number corresponds to the target network device in the keep-alive management data table;
and the adjusting unit is used for adjusting the keep-alive duration of the target network equipment based on the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the previous keep-alive message.
7. The apparatus of claim 6, wherein a keep-alive duration range and a keep-alive header packet transmission offset time range are preconfigured in the SDN controller, the apparatus further comprising:
a configuration unit, configured to configure a keep-alive duration of a target network device based on the keep-alive duration range and configure a keep-alive first packet transmission offset time of the target network device based on the keep-alive first packet transmission offset time range when detecting that the target network device is accessed;
a sending unit, configured to send the keep-alive duration and the keep-alive first packet sending offset time to the target network device, so that the target network device sends a keep-alive packet to the SDN controller based on the keep-alive duration and the keep-alive first packet sending offset time, and stores the keep-alive duration and the keep-alive first packet sending offset time in the keep-alive management data table.
8. The apparatus according to claim 6 or 7, wherein the adjusting unit is specifically configured to adjust the keep-alive time duration of the target network device based on the number of keep-alive messages to be processed corresponding to the target network device and the processing time consumption of the previous keep-alive message, and is further configured to:
calculating the product of the number of the keep-alive messages to be processed corresponding to the target network equipment and the processing time consumption of the last keep-alive message;
if the product is smaller than a first threshold value, reducing the keep-alive time length;
and if the product is larger than a second threshold value, increasing the keep-alive time length.
9. The apparatus according to claim 8, wherein the first threshold is a quarter of a keep-alive duration, and if the keep-alive duration is reduced, the adjusting unit is specifically configured to:
adjusting the keep-alive time of the target network equipment to be one half of the original keep-alive time;
if the second threshold is one half of the keep-alive time length, the keep-alive time length is increased, and the adjusting unit is specifically configured to:
and adjusting the keep-alive time of the target network equipment to be twice of the original keep-alive time.
10. The apparatus of claim 9, wherein the adjusted keep-alive duration is greater than or equal to a minimum value of the keep-alive duration range and less than or equal to a maximum value of the keep-alive duration range, and the first threshold is less than the second threshold.
CN202110984685.8A 2021-08-25 2021-08-25 Network equipment keep-alive method and device Active CN113765711B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110984685.8A CN113765711B (en) 2021-08-25 2021-08-25 Network equipment keep-alive method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110984685.8A CN113765711B (en) 2021-08-25 2021-08-25 Network equipment keep-alive method and device

Publications (2)

Publication Number Publication Date
CN113765711A true CN113765711A (en) 2021-12-07
CN113765711B CN113765711B (en) 2023-12-26

Family

ID=78791298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110984685.8A Active CN113765711B (en) 2021-08-25 2021-08-25 Network equipment keep-alive method and device

Country Status (1)

Country Link
CN (1) CN113765711B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100312899A1 (en) * 2009-06-08 2010-12-09 Microsoft Corporation Determining an efficient keep-alive interval for a network connection
US20130067063A1 (en) * 2011-09-12 2013-03-14 Cisco Technology, Inc. Dynamic keepalive parameters for reverse path validation in computer networks
US20140321448A1 (en) * 2013-04-30 2014-10-30 Seven Networks, Inc. Detection and reporting of keepalive messages for optimization of keepalive traffic in a mobile network
WO2018090602A1 (en) * 2016-11-18 2018-05-24 上海斐讯数据通信技术有限公司 Keep-alive packet control method and system for long connection server
CN108616903A (en) * 2016-12-19 2018-10-02 南宁富桂精密工业有限公司 Link keep-alive method between AC and AP and system
CN111355764A (en) * 2018-12-24 2020-06-30 迈普通信技术股份有限公司 Keep-alive message sending method and device, electronic equipment and readable storage medium
CN111641702A (en) * 2020-05-26 2020-09-08 南京领行科技股份有限公司 Heartbeat message management method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100312899A1 (en) * 2009-06-08 2010-12-09 Microsoft Corporation Determining an efficient keep-alive interval for a network connection
US20130067063A1 (en) * 2011-09-12 2013-03-14 Cisco Technology, Inc. Dynamic keepalive parameters for reverse path validation in computer networks
US20140321448A1 (en) * 2013-04-30 2014-10-30 Seven Networks, Inc. Detection and reporting of keepalive messages for optimization of keepalive traffic in a mobile network
WO2018090602A1 (en) * 2016-11-18 2018-05-24 上海斐讯数据通信技术有限公司 Keep-alive packet control method and system for long connection server
CN108616903A (en) * 2016-12-19 2018-10-02 南宁富桂精密工业有限公司 Link keep-alive method between AC and AP and system
CN111355764A (en) * 2018-12-24 2020-06-30 迈普通信技术股份有限公司 Keep-alive message sending method and device, electronic equipment and readable storage medium
CN111641702A (en) * 2020-05-26 2020-09-08 南京领行科技股份有限公司 Heartbeat message management method and device

Also Published As

Publication number Publication date
CN113765711B (en) 2023-12-26

Similar Documents

Publication Publication Date Title
US10169060B1 (en) Optimization of packet processing by delaying a processor from entering an idle state
US9237460B2 (en) Traffic control method and device
US10075409B2 (en) Terminal and application synchronization method therefor
US20170317961A1 (en) Email notifications
CN112383585A (en) Message processing system and method and electronic equipment
CN108390954B (en) Message transmission method and device
WO2014063487A1 (en) Traffic control method and device
CN113656176B (en) Cloud equipment distribution method, device and system, electronic equipment, medium and product
WO2017185615A1 (en) Method for determining service status of service processing device and scheduling device
US20140281038A1 (en) Terminal and application synchronization method thereof
CN113285884B (en) Flow control method and system
CN111835797A (en) Data processing method, device and equipment
CN109361749B (en) Message processing method, related equipment and computer storage medium
US10608889B2 (en) High-level interface to analytics engine
US20140297817A1 (en) Managing Software Operations Based Upon User Status In A Unified Communications Environment
EP2949083B1 (en) Receiving a communication event
CN112148426A (en) Bandwidth allocation method and device
US11700189B2 (en) Method for performing task processing on common service entity, common service entity, apparatus and medium for task processing
CN113535344A (en) Network data processing method and device, server and storage medium
EP3491807B1 (en) Storing and expiring non-tcp endpoints
CN113765711A (en) Network equipment keep-alive method and device
US20140164523A1 (en) Automated enabling of instant messaging communications in a client system
US10129084B1 (en) Centralized parameter management system
CN112751895B (en) Communication connection keep-alive method and system thereof
US9515970B2 (en) Techniques for auto-detecting positions in a multi-resource login control of instant messaging

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