CN118200195A - Method for monitoring network connection state of network equipment based on TR069 protocol - Google Patents

Method for monitoring network connection state of network equipment based on TR069 protocol Download PDF

Info

Publication number
CN118200195A
CN118200195A CN202410589520.4A CN202410589520A CN118200195A CN 118200195 A CN118200195 A CN 118200195A CN 202410589520 A CN202410589520 A CN 202410589520A CN 118200195 A CN118200195 A CN 118200195A
Authority
CN
China
Prior art keywords
time
network equipment
parameter
network
target
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.)
Pending
Application number
CN202410589520.4A
Other languages
Chinese (zh)
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.)
Hunan Tianguan Electronic Information Technology Co ltd
Original Assignee
Hunan Tianguan Electronic Information Technology 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 Hunan Tianguan Electronic Information Technology Co ltd filed Critical Hunan Tianguan Electronic Information Technology Co ltd
Priority to CN202410589520.4A priority Critical patent/CN118200195A/en
Publication of CN118200195A publication Critical patent/CN118200195A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application is suitable for the technical field of network monitoring, and provides a method for monitoring network connection state of network equipment based on a TR069 protocol, which comprises the following steps: determining whether the value of a target default parameter for monitoring the connection state in the parameters of the network equipment acquired based on the TR069 protocol meets the state detection condition, and controlling the network equipment to adjust the value of the target default parameter to meet the state detection condition when the value of the target default parameter does not meet the state detection condition; when the state detection period arrives, acquiring the transmission time of the last session message transmitted by the network equipment to the automatic configuration server, and determining the online keep-alive period of the network equipment according to the value of the target default parameter of the network equipment; determining the session timeout time of the network device according to the sending time and the online keep-alive period; if the current time exceeds the session timeout time, determining that the network device enters an offline state after the sending time. The off-line monitoring mode of the application can reduce the occupation of network broadband resources.

Description

Method for monitoring network connection state of network equipment based on TR069 protocol
Technical Field
The application belongs to the technical field of network monitoring, and particularly relates to a method for monitoring network connection state of network equipment based on a TR069 protocol.
Background
Currently, most network device management software is implemented based on a public network management protocol such as a Simple Network Management Protocol (SNMP), TR069 (TR 069 is an application layer protocol based on a hypertext transfer protocol), a network configuration protocol (netcon), and the like, and performs operation and maintenance operations on remote devices through a network using a agreed communication mode, wherein a basic objective precondition is that the managed device must be online when receiving remote operation and maintenance, and implementing monitoring or subsequent inspection in the network management software when the device is offline is an important capability of the network management software. However, due to the reasons of the network environment where the equipment is located or the change of the working condition of the equipment, and the like, the equipment is temporarily or permanently offline, so that the equipment enters an abnormal working or pipe-off state, therefore, network management software is required to capture and check the offline condition of the equipment more timely and accurately on the system capacity, and the system has a vital work support for improving the overall efficiency of operation and maintenance business.
The TR069 protocol cluster does not define the content and implementation requirements of the long connection, so the Auto Configuration Server (ACS) cannot determine that the client is offline when the Transmission Control Protocol (TCP)/Internet Protocol (IP) connection is abnormally disconnected. In practice, there are various off-line modes of computing network equipment (CPE), for example, a periodic mode of timing reporting is used for monitoring, the mode is relatively passive and has low efficiency, the main reason is that the timing message is relatively large, at least about 6kb exists, the period is set relatively long in order to save server resources, the real-time performance of the off-line condition detected by the server is seriously affected, the occupation of the server and network broadband resources is more due to lower interval setting, the hardware cost is high, and the process of monitoring the off-line result of the CPE by the server is delayed more due to higher interval setting. Other realizable methods such as active probing and the like also suffer from the above drawbacks.
Disclosure of Invention
The embodiment of the application provides a method for monitoring network connection state of network equipment based on a TR069 protocol, which can solve the problem of high occupation of network broadband resources in off-line monitoring of the network equipment.
The embodiment of the application provides a method for monitoring network connection state of network equipment based on a TR069 protocol, which is applied to an automatic configuration server, wherein the automatic configuration server has a STUN server function, and each network equipment in communication connection with the automatic configuration server has a STUN client function, and the method comprises the following steps:
Determining whether a value of a target default parameter for monitoring a connection state in parameters of the network device acquired based on the TR069 protocol meets a state detection condition preset in an automatic configuration server or not according to each network device, and controlling the network device to adjust the value of the target default parameter to meet the state detection condition based on the TR069 protocol when the value of the target default parameter does not meet the state detection condition; the target default parameters include an identity parameter for characterizing an identity of the network device, a protocol usage parameter for indicating whether the network device enables a STUN protocol, an address parameter for characterizing address information of a target STUN server for the network device to send a STUN message, a port parameter for characterizing port information of the target STUN server, a time parameter for specifying a maximum interval time for the network device to send the STUN message, and a time parameter for specifying a minimum interval time for the network device to send the STUN message;
when the state detection period arrives, the following steps are executed for each network device respectively:
Acquiring the last time the network equipment transmits a session message to the automatic configuration server, and determining the online keep-alive period of the network equipment according to the value of the target default parameter of the network equipment; the online keep-alive period is a period for reporting STUN messages by the network equipment;
determining the session timeout time of the network device according to the sending time and the online keep-alive period;
If the current time exceeds the session timeout time, determining that the network equipment enters an offline state after the sending time;
If the current time does not exceed the session timeout time, determining that the network device is currently in an online state.
Optionally, the state detection condition includes:
The protocol usage parameter indicates the network device to enable the STUN protocol, address information in the address parameter is a public IP address of a STUN server in the auto configuration server, port information in the port parameter is a port number of an external network of the STUN server, and the minimum interval time is less than or equal to the maximum interval time.
Alternatively, the minimum interval time and the maximum interval time are each in the range of 1 to 10 seconds.
Optionally, determining the online keep-alive period of the network device according to the value of the target default parameter of the network device includes:
and taking the sum of the maximum interval time and the preset fault tolerance time as the online keep-alive period of the network equipment.
Optionally, determining the session timeout time of the network device according to the sending time and the online keep-alive period includes:
and taking the sending time as a timing starting point, and taking the time when the timing time reaches the duration of the online keep-alive period as the session timeout time.
Optionally, the method further comprises:
When a state query instruction for querying the network connection state of the target network equipment is received, acquiring the reporting time of the last report session message of the target network equipment to the automatic configuration server according to the identity information of the target network equipment carried in the state query instruction; the target network equipment is any network equipment in communication connection with the automatic configuration server;
Taking the difference value between the current time and the reporting time as a passive session period;
if the passive session period is greater than the online keep-alive period of the target network device, determining that the target network device is in an offline state currently;
and if the passive session period is less than or equal to the online keep-alive period of the target network equipment, determining that the target network equipment is in an online state currently.
Optionally, the target default parameters further comprise a cryptographic parameter for characterizing a STUN password of the network device.
Optionally, the session message is a STUN message or a TR069 message.
Optionally, the method further comprises:
Receiving an Inform message sent by any network equipment in communication connection with an automatic configuration server; the information message is sent by the network equipment after the parameters of the network equipment are changed, and the information message carries the parameters of the network equipment;
when the changed parameter contains a target default parameter, determining whether a value of the changed target default parameter meets a state detection condition;
And if the value of the changed target default parameter does not meet the state detection condition, controlling the network equipment to adjust the value of the target default parameter to meet the state detection condition.
The scheme of the application has the following beneficial effects:
In the embodiment of the application, aiming at the network equipment in communication connection with the automatic configuration server, after the automatic configuration server acquires the parameters of the network equipment based on the TR069 protocol, judging whether the value of the target default parameter for monitoring the connection state in the parameters meets the preset state detection condition, and when the state detection condition is not met, controlling the network equipment based on the TR069 protocol to adjust the value of the target default parameter to meet the state detection condition, so that when the state detection period arrives, the online keep-alive period of the network equipment can be determined according to the value of the target default parameter, then the session timeout time of the network equipment can be determined according to the online keep-alive period and the transmission time of the last session message of the network equipment, and if the current time exceeds the session timeout time, determining that the network equipment enters an offline state after the transmission time. In the off-line monitoring mode, the automatic configuration server and the network equipment do not need to additionally transmit information, and state monitoring can be realized only based on the existing TR069 protocol flow and the session message, so that occupation of network broadband resources is greatly reduced.
In addition, because the off-line monitoring does not occupy extra network broadband resources, the detection period can be properly shortened, and the real-time performance of the off-line monitoring is improved.
Other advantageous effects of the present application will be described in detail in the detailed description section which follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for monitoring a network connection state of a network device based on TR069 protocol according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Aiming at the problem that the network broadband resource occupation is high in the offline monitoring of the current network equipment, the embodiment of the application provides a method for monitoring the network connection state of the network equipment based on a TR069 protocol. In the off-line monitoring mode, the automatic configuration server and the network equipment do not need to additionally transmit information, and state monitoring can be realized only based on the existing TR069 protocol flow and the session message, so that occupation of network broadband resources is greatly reduced.
In addition, because the off-line monitoring does not occupy extra network broadband resources, the detection period can be properly shortened, and the real-time performance of the off-line monitoring is improved.
Related names related to the embodiments of the present application are explained below.
TR069: the wide area network management protocol (CWMP) of the user terminal equipment defines a set of brand-new network management system structure, which comprises a management model, an interaction interface and basic management parameters.
STUN: a network protocol that is simply traversed by the user datagram protocol (UDP, user Datagram Protocol) of NAT.
NAT: gateway device with independent public network IPv4 address, IPv4 being a fourth version of the internet communication protocol.
ACS: the automatic configuration server is realized based on TR069, and when the ACS is a cluster, the server needs to synchronize time in a timing way.
CPE: network equipment, such as switches, routers and the like, which realize the network management function based on the TR 069.
STUN-Server: a server implementing STUN protocol server-side functions, i.e. a STUN server.
Network management software: an application program that implements auto-configuration and provides a user access manner including an interface design (UI), a Command Line Interface (CLI), or an Application Programming Interface (API) based on TR 069.
Target default parameters: the TR 069-defined fixed name configuration parameters relevant to the present disclosure and required to participate in the calculation.
Inform: and the CPE actively initiates reporting of the basic information and part of parameter content to the ACS by the method defined in the TR069 protocol.
GetParameterValues: the method defined in the TR069 protocol uses a passive response mode to send a request to CPE by ACS, and is used for obtaining the content of the TR069 configuration parameters in batches.
SetParameterValues: the method defined in the TR069 protocol uses a passive response mode to send a request to CPE by ACS, and is used for setting the content of the TR069 configuration parameters in batches.
SetParameterAttributes: the method name defined in the TR069 protocol is sent to the CPE by the ACS in a passive response mode, and the method is used for setting the change value of the parameter in batches and putting the change value into the information message of the parameter and initiating the information by the CPE.
The method for monitoring the network connection state of the network equipment based on the TR069 protocol is exemplified in the following way with specific embodiments.
The method for monitoring the network connection state of the network equipment based on the TR069 protocol is applied to an automatic configuration server, wherein the automatic configuration server has a STUN server function, and each network equipment in communication connection with the automatic configuration server has a STUN client function. Meanwhile, the exit NAT of the network equipment (CPE) allows simple UDP penetration, namely at least meets the requirement that the CPE can receive the UDP message actively issued by the corresponding STUN-Server; the CPE supports parameters corresponding to a switch, a server address, a server port, a user name, a password and a keep-alive period for reading and writing the STUN through a TRO69 protocol, and supports the state of reading a serial number and the STUN and the penetrated external address; the CPE device has turned on the TR069 client function and the parameters of the ACS's username, password, address and reporting period allow for reading and writing via the TR069 protocol, while the initialization of these parameter values needs to be completed before being on-line and consistent with what the actual Auto Configuration Server (ACS) provides.
As shown in fig. 1, the method for monitoring the network connection state of the network device based on the TR069 protocol includes the following steps:
Step 11, determining, for each network device, whether a value of a target default parameter for monitoring a connection state in parameters of the network device acquired based on the TR069 protocol satisfies a state detection condition preset in the auto-configuration server, and when the value of the target default parameter does not satisfy the state detection condition, controlling the network device based on the TR069 protocol to adjust the value of the target default parameter to satisfy the state detection condition.
The target default parameters include an identity parameter (i.e., a parameter of internet gateway device, manager server, stuuse name) for characterizing an identity of a network device, a protocol usage parameter (i.e., a parameter of internet gateway device, manager server, STUN enable) for indicating whether the network device is enabled or not, an address parameter (i.e., a parameter of internet gateway device, manager server, STUNMaximumKeepAlivePeriod) for characterizing address information of a target STUN server for the network device to send a STUN message, a port parameter (i.e., a parameter of internet gateway device, manager address) for characterizing port information of the target STUN server, a time parameter (i.e., a parameter of internet gateway device, manager server, STUNServerPort) for specifying a maximum interval time for the network device to send the STUN message, and a time parameter (i.e., a parameter of internet gateway device, manager STUNMaximumKeepAlivePeriod) for specifying a minimum interval time for the network device to send the STUN message.
In some embodiments of the present application, as an optional example, the target default parameters further include a cryptographic parameter (i.e., parameter internet gateway device.
The above state detection conditions include: the protocol usage parameter indicates the network device to enable the STUN protocol, address information in the address parameter is a public IP address of a STUN server in the auto configuration server, port information in the port parameter is a port number of an external network of the STUN server, and the minimum interval time is less than or equal to the maximum interval time.
Wherein, the range of minimum interval time and maximum interval time is 1 to 10 seconds. As a preferred example, the default values of the minimum interval time and the maximum interval time may each be set to 10 seconds. It should be noted that the smaller the value is, the more sensitive, and the adjustment can be performed uniformly or one-to-one according to the requirements and the server configuration, so as to support manual online setting.
In some embodiments of the present application, the ACS may obtain parameters of the network device based on the existing TR069 protocol flow. The parameters of the network device can be obtained by a network remote procedure call (RPC, remote Procedure Call) method for reading the parameters in the TR069 protocol flow. Correspondingly, when the value of the target default parameter does not meet the state detection condition, the network equipment can be controlled to modify the parameter by the RPC method for reading the parameter in the TR069 protocol flow until the value of the target default parameter meets the state detection condition.
The setting of the values of the target default parameters is exemplarily described below based on the TR069 protocol flow.
When the CPE is started, the CPE actively initiates a hypertext transfer protocol (HTTP, hypertext Transfer Protocol) connection to the ACS and reports an Inform message. The ACS may parse the information message content to obtain the key parameter information such as the serial number (i.e. parameter internet gateway device. Deviceinfo. Serial number) and event code of the CPE. The ACS then automatically executes the flow of GetParameterValues once in order to obtain the values of the target default parameters of the current CPE in bulk. After the CPE responds to the request result, the ACS continues to automatically perform the following operations:
Step1, recording and storing parameter results, and preferentially selecting an in-memory database for processing to record data required in the calculation process in a lasting mode.
Step2. Construct a SetParameterValues null message that may then require the default parameters to be issued.
The value of the parameter internet gateway device, manager server, stunenable if not equal to 1 is added to the default parameter message, and the value is equal to 1, so that the parameter internet gateway device, manager server, stunenable instructs the network device to enable STUN protocol.
The value of the parameter internet gateway device management server is added to the default parameter message if it is empty, and the value may use the serial number of the CPE itself, and if no serial number is used, the corresponding recorded user name information in the mapping dictionary table of user names and serial numbers may be used. The parameter is used for identifying the identity of the CPE initiating the message in the STUN message, the user name must be acquired and recorded in a dictionary table which can be designed by itself, and only the maintainable mapping relation between the unique user name and the serial number is needed to be realized.
Step5. the parameter internet gateway device. Management server. Stunpassword can be given a fixed or secret code in a table, without forcing the need to modify the value of this parameter, and the code is an empty string. If the STUN cipher is needed, the parameter set value is added to the default parameter message. The password value must be obtained and recorded in a password table, which can be designed by itself, and only a maintainable mapping relation between the user name and the password is needed.
The value of the parameter internet gateway device management server is added to the default message if it is different from the target value set by ACS, and the value is equal to the public IP address of one STUN server of ACS itself.
The value of the parameter internet gateway device management server STUNServerPort, if different from the target value set by the ACS, adds the parameter to the default message and the value is equal to the port number of the external network of one STUN server of the ACS itself.
Step8. the value of the time parameter (i.e., internet gateway device. Management server. STUNMaximumKeepAlivePeriod) that specifies the maximum time interval for the network device to send a STUN message, if not set, is added to the default message and a value in seconds ranging from 1 to 10 is set. Since this parameter will affect the sensitivity or real-time of the offline state being discovered, it is recommended to set at 5-10 seconds, taking into account the conflict of balancing server resource savings with improved real-time.
Step9. the value of the time parameter (i.e., internet gateway device. Management server STUNMinimumKeepAlivePeriod) that specifies the minimum time interval for the network device to send a STUN message, if not set or greater than the value of the parameter in Step8, requires that the parameter be added to the default message and a value in the range of 1 to 10 seconds be set, default equal to the value set in Step 8.
Step10, the construction process of the default parameter message is finished, when the default parameter needing to be reset exists in the message, the default parameter message is automatically used for executing a SetParameterValues process once, when the CPE response message is successful in execution, the default parameter result of the set value is recorded again, and the process of automatically configuring the default parameter of the starting equipment is finished.
Step11 when any Step from Step2 to Step10 is wrong, the process of restarting the startup procedure needs to be executed again after waiting for the next active session initiation of the CPE and reporting the Inform message.
It should be noted that the method further includes the following steps: receiving an information message sent by any network device in communication connection with the automatic configuration server (the information message is sent by the network device after the parameters of the network device are changed, and the information message carries the serial number of the network device and the parameters of the network device; when the changed parameter contains a target default parameter, determining whether a value of the changed target default parameter meets a state detection condition; and if the value of the changed target default parameter does not meet the state detection condition, controlling the network equipment to adjust the value of the target default parameter to meet the state detection condition.
That is, when the parameters of the CPE itself occur, the CPE will immediately initiate a new session actively to report an Inform message of the information, wherein the event code of "4 VALUE CHANGE" in the event list informs the ACS that the parameters of the device change, so that the ACS continues to check whether the current time includes the target default parameters in the message, if yes, the parameters are compared with the recorded parameter values, if different, the data accords with the state detection condition, and if not, the setting flow of the target default parameters is re-executed until the state detection condition is met.
Among the reasons for the change in the target default parameters include TR069 online delivery configuration, device CLI command setup, and device local network (web) operation.
In some embodiments of the present application, to ensure real-time monitoring of offline status, the STUN server in ACS also needs to complete the recording process of the STUN message period of CPE, and only needs to implement the content of the BINDING REQUEST (binding_request) event message of the associated STUN, specifically, it should be noted that the content of STUN also does not need to be implemented in any special way, only uses the Username (i.e. the identity parameter) attribute, and the attribute is supported to be set in TR 069. The method comprises the following specific steps:
the step1.Stun server receives the message of bindingjrequest of CPE, directly ignores the packet when it fails the check of the status detection condition and does not perform the subsequent processing.
When the value of the Username attribute length in the message is 0, no subsequent processing is performed because it cannot be identified which CPE sent the current STUN message.
Step3, obtaining the attribute value of the Username, obtaining the corresponding serial number from the method defined by the dictionary table of the user name and the serial number, and if the record cannot be found, not carrying out subsequent processing.
Step4, after the CPE serial number of the current BINDING_REQUEST message is obtained, the serial number and the server time of the current STUN server are used as the latest session time of the CPE and the current default parameter configuration content of the CPE are recorded together, so that the CPE can be conveniently read out at one time in the subsequent calculation. Note that the current Step4 Step is also performed after the other TR069 messages of the CPE reach the ACS.
In some embodiments of the present application, the identity parameters (i.e., STUNUsername) of the CPE are globally unique. When the STUN server of the ACS processes the STUN message of the CPE, the STUN server can locate the serial number of the corresponding CPE according to the current STUNUsername dictionary table, and complete one-to-one association between the sender of the STUN message and the actual CPE, so that the report time of the last STUN message (or TR069 message) of the corresponding CPE can be recorded, and key parameters are provided for the connection state of the subsequent monitored CPE.
Step 12, when the state detection period arrives, the following steps are executed for each network device: acquiring the last time the network equipment transmits a session message to the automatic configuration server, and determining the online keep-alive period of the network equipment according to the value of the target default parameter of the network equipment; determining the session timeout time of the network device according to the sending time and the online keep-alive period; if the current time exceeds the session timeout time, determining that the network equipment enters an offline state after the sending time; if the current time does not exceed the session timeout time, determining that the network device is currently in an online state.
The shorter the state detection period is, the higher the real-time performance of off-line state monitoring is, and the real-time performance can be specifically set according to actual conditions; the session message may be a STUN message or a TR069 message, and the online keep-alive period is a period of reporting the STUN message by the network device. In some embodiments of the present application, the STUN message is the BINDING_REQUEST.
In order to facilitate connection status monitoring, the serial number of the CPE, the value of the target default parameter, and the latest session time (i.e., the time when the session message was last sent to the auto-configuration server) are combined into a new string in the format of a string, and stored: the length of SerialNumber (two bytes) +serialnumber+ STUNUsername length (two bytes) + STUNUsername + STUNPassword length (two bytes) + STUNPassword + STUNEnable length (two bytes) + STUNEnable + STUNServerAddress +length (two bytes) + STUNServerAddress + STUNServerPort length (two bytes) + STUNServerPort + MaximumPeriod length (two bytes) + MaximumPeriod + MinimumPeriod length (two bytes) + MinimumPeriod +latest session time length (two bytes) +latest session time. The length 16 digits are stored in the form of a string, for example:
091234567890Eadmin123456789000110B175.6.12.31048016021002100E20240128120101。
Wherein, serialNumber represents a serial number, STUNUsername represents an identity parameter, STUNPassword represents a password parameter, STUNEnable represents a protocol usage parameter, STUNServerAddress represents an address parameter, STUNServerPort represents a port parameter, maximumPeriod represents a time parameter of a maximum interval time, and MinimumPeriod represents a time parameter of a minimum interval time. In practical application, the serial number of the CPE, the Value of the target default parameter and the latest session time may be stored in a REDIS, which is an open-source log-type, key-Value (Key-Value) database written in standard C language, supporting the network, and being capable of being based on memory and also being persistent.
In some embodiments of the present application, the sum of the maximum interval time and the preset fault tolerance time in the target default parameters may be used as the online keep-alive period of the network device. The fault tolerance time is used for adding an external adverse factor to the online keep-alive period of the CPE to generate an extra occupied time number, wherein the extra occupied time number is expressed in seconds, such as network delay, parallel request of excessive server processing speed, and the like. It should be noted that, if the on-line keep-alive period is calculated and MaximumPeriod is smaller than MinimumPeriod, the ACS needs to correct the values of the two default parameters through the foregoing automatic configuration process, and the result of the on-line keep-alive period before the correction is 3600 seconds, and at this time, the CPE off-line event within 1 hour will not be monitored. By way of example, if the default values for both the maximum interval time and the minimum interval time are set to 10 seconds, the fault tolerance time is 1 second, meaning that the default value for the online keep-alive period is 11, the acs can calculate whether the original online CPE has been offline within the last 11 seconds. The setting of this value is related to the longest lifetime of the channel where the NAT maintains the ACS and CPE binding, while the higher frequency UDP messages need to be considered to bring high load impact to the server.
After the online keep-alive period is determined, the sending time of the last time of the network equipment for sending the session message to the automatic configuration server can be retrieved from the stored and recorded data, then the sending time is taken as a timing starting point, the time when the timing time reaches the duration of the online keep-alive period is taken as the session timeout time, and if the current time exceeds the session timeout time, the network equipment is determined to enter an offline state after the sending time; otherwise, determining that the network device is currently in an online state.
In some embodiments of the present application, the step 12 is to actively monitor the appearance of the offline state of the CPE, where the session timeout time is the last session time of the cpe+the online keep-alive period of the CPE, which is also equivalent to the duration of the online state of the device after the last session of the CPE, and is used to monitor the time range of this change of the actual running state of the device from online to offline. The result that can be calculated from this is a period of time when the device is offline, which is equal to the last session time of the CPE until the session time is increased by one online keep-alive period. The core idea is to uniformly monitor the CPE session timeout time in the form of data record, when the CPE session timeout time value is smaller than the current time, the state of the CPE can be judged to be changed from on-line to off-line in the on-line keep-alive period after the last session, and when the on-line keep-alive period is smaller, the range of the obtained result is smaller, namely the actual time point when the CPE is changed from on-line to off-line is closer to the CPE.
In some embodiments of the present application, to facilitate querying a connection status of a specified CPE, the method further includes the step of passively monitoring an offline status of the CPE as follows:
When a state query instruction for querying the network connection state of the target network equipment is received, acquiring the reporting time of the last report session message of the target network equipment to the automatic configuration server according to the identity information of the target network equipment carried in the state query instruction; the target network equipment is any network equipment in communication connection with the automatic configuration server;
Taking the difference value between the current time and the reporting time as a passive session period;
if the passive session period is greater than the online keep-alive period of the target network device, determining that the target network device is in an offline state currently;
and if the passive session period is less than or equal to the online keep-alive period of the target network equipment, determining that the target network equipment is in an online state currently.
The online keep-alive period of the target network device is calculated as described above, that is, the online keep-alive period is a sum of a maximum interval time and a preset fault tolerance time in a target default parameter of the target network device.
It can be appreciated that the ACS, after monitoring the network connection status of the CPEs, presents the monitoring result to the user, so that the user can determine whether each CPE is offline.
It should be noted that the above method of the present application does not damage the network management architecture defined by TR069, and the low intrusion design does not need ACS and CPE to implement additional flow mechanisms of offline events of the user monitoring device, and is compatible with data formats of parameters of TR069 of different manufacturers. The external tools used in the above process are the middleware such as REDIS/message queue, which is commonly used when implementing the network management system, the flow involved in automatic configuration is also defined in the TR069 protocol specification, and other optional parts are not required to be implemented in STUN. In the off-line monitoring mode, the automatic configuration server and the network equipment do not need to additionally transmit information, and state monitoring can be realized only based on the existing TR069 protocol flow and session messages, so that occupation of network broadband resources is greatly reduced. Meanwhile, the off-line monitoring does not occupy extra network broadband resources, so that the detection period can be properly shortened, and the real-time performance of the off-line monitoring is improved.
While the foregoing is directed to the preferred embodiments of the present application, it will be appreciated by those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present application, and such modifications and adaptations are intended to be comprehended within the scope of the present application.

Claims (9)

1. A method for monitoring network connection status of network devices based on TR069 protocol, which is applied to an automatic configuration server, wherein the automatic configuration server has STUN server function, and each network device communicatively connected with the automatic configuration server has STUN client function, the method comprising:
Determining whether a value of a target default parameter for monitoring a connection state among parameters of the network device acquired based on a TR069 protocol meets a state detection condition preset in the automatic configuration server or not according to each network device, and controlling the network device to adjust the value of the target default parameter to meet the state detection condition based on the TR069 protocol when the value of the target default parameter does not meet the state detection condition; the target default parameters include an identity parameter for characterizing an identity of the network device, a protocol usage parameter for indicating whether the network device enables a STUN protocol, an address parameter for characterizing address information of a target STUN server for the network device to send a STUN message, a port parameter for characterizing port information of the target STUN server, a time parameter for specifying a maximum interval time for the network device to send the STUN message, and a time parameter for specifying a minimum interval time for the network device to send the STUN message;
When the state detection period arrives, the following steps are executed for each network device respectively:
acquiring the last time the network equipment transmits a session message to the automatic configuration server, and determining the online keep-alive period of the network equipment according to the value of the target default parameter of the network equipment; the online keep-alive period is a period for reporting STUN messages by the network equipment;
Determining a session timeout time of the network device according to the sending time and the online keep-alive period;
If the current time exceeds the session timeout time, determining that the network equipment enters an offline state after the sending time;
and if the current time does not exceed the session timeout time, determining that the network equipment is currently in an online state.
2. The method of claim 1, wherein the status detection condition comprises:
The protocol usage parameter indicates that the network device enables a STUN protocol, the address information in the address parameter is a public IP address of a STUN server in the auto configuration server, the port information in the port parameter is a port number of an external network of the STUN server, and the minimum interval time is smaller than or equal to the maximum interval time.
3. The method of claim 2, wherein the minimum interval and the maximum interval are each in the range of 1 to 10 seconds.
4. The method of claim 2, wherein the determining the online keep-alive period of the network device based on the value of the target default parameter of the network device comprises:
and taking the sum value of the maximum interval time and the preset fault tolerance time as the online keep-alive period of the network equipment.
5. The method of claim 1, wherein said determining a session timeout time for said network device based on said transmission time and said online keep-alive period comprises:
And taking the sending time as a timing starting point, and taking the time when the timing time reaches the duration of the online keep-alive period as the session timeout time.
6. The method according to claim 1, wherein the method further comprises:
when a state query instruction for querying the network connection state of target network equipment is received, acquiring the reporting time of the last report session message of the target network equipment to the automatic configuration server according to the identity information of the target network equipment carried in the state query instruction; the target network equipment is any network equipment in communication connection with the automatic configuration server;
Taking the difference value between the current time and the reporting time as a passive session period;
If the passive session period is greater than the online keep-alive period of the target network device, determining that the target network device is in an offline state currently;
and if the passive session period is smaller than or equal to the online keep-alive period of the target network equipment, determining that the target network equipment is in an online state currently.
7. The method of claim 1, wherein the target default parameters further comprise a cryptographic parameter for characterizing a STUN password of the network device.
8. The method of claim 1, wherein the session message is a STUN message or a TR069 message.
9. The method according to claim 1, wherein the method further comprises:
Receiving an Inform message sent by any network equipment in communication connection with the automatic configuration server; the information message is sent by the network equipment after the parameters of the network equipment are changed, and the information message carries the parameters of the network equipment which are changed;
When the changed parameter comprises the target default parameter, determining whether the value of the changed target default parameter meets the state detection condition;
And if the value of the target default parameter after the change does not meet the state detection condition, controlling the network equipment to adjust the value of the target default parameter to meet the state detection condition.
CN202410589520.4A 2024-05-13 2024-05-13 Method for monitoring network connection state of network equipment based on TR069 protocol Pending CN118200195A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410589520.4A CN118200195A (en) 2024-05-13 2024-05-13 Method for monitoring network connection state of network equipment based on TR069 protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410589520.4A CN118200195A (en) 2024-05-13 2024-05-13 Method for monitoring network connection state of network equipment based on TR069 protocol

Publications (1)

Publication Number Publication Date
CN118200195A true CN118200195A (en) 2024-06-14

Family

ID=91405262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410589520.4A Pending CN118200195A (en) 2024-05-13 2024-05-13 Method for monitoring network connection state of network equipment based on TR069 protocol

Country Status (1)

Country Link
CN (1) CN118200195A (en)

Similar Documents

Publication Publication Date Title
EP1059766B1 (en) Network device managing apparatus and method
US8370487B2 (en) Method and system for optimizing performance and availability of a dynamic host configuration protocol (DHCP) service
JP4719540B2 (en) Method and apparatus for detecting connection termination of an internet protocol version 6 access network
US8316133B2 (en) Thin client system using session managing server and session managing method
EP2256626B1 (en) Network event triggered software updates
US7991856B2 (en) Network system
JP2005530372A5 (en)
US10917289B2 (en) Handling network failures in networks with redundant servers
CN106656534B (en) Data communication method and system
US10979360B2 (en) Resource obtaining method and apparatus
EP1073244A1 (en) Method and system for monitoring dynamic host configuration protocol (DHCP) service in an internet protocol network
CN115664989A (en) Monitoring system and method of cloud desktop
KR102289307B1 (en) Communication method for virtual machines, electronic device, and non-transitory computer readable storage medium
CN103138961B (en) server control method, controlled server and central control server
CN118200195A (en) Method for monitoring network connection state of network equipment based on TR069 protocol
CN111726367A (en) User equipment CPE access binding method, device, system and equipment
US20040117473A1 (en) Proxy network control apparatus
US20110235641A1 (en) Communication apparatus, method of controlling the communication apparatus,and program
CN113691591B (en) Data transmission method, device and computer readable storage medium
KR100397468B1 (en) Network management device and method using mib name server
JP4532238B2 (en) On-demand service provision system
TWM588928U (en) System for remotely waking network user device
KR102344263B1 (en) Apparatus and method for maintaining DDS stability in case of momentary disconnection of network
JP2023173536A (en) relay device
US20080025302A1 (en) Method and system for managing network ports

Legal Events

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