CN111314152B - Factory setting restoration control method and device and network equipment - Google Patents

Factory setting restoration control method and device and network equipment Download PDF

Info

Publication number
CN111314152B
CN111314152B CN202010128733.9A CN202010128733A CN111314152B CN 111314152 B CN111314152 B CN 111314152B CN 202010128733 A CN202010128733 A CN 202010128733A CN 111314152 B CN111314152 B CN 111314152B
Authority
CN
China
Prior art keywords
data
channel
factory
data receiving
receiving channel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010128733.9A
Other languages
Chinese (zh)
Other versions
CN111314152A (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.)
Guangzhou Jingxin Communication Technology Co ltd
Original Assignee
Comba Network Systems 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 Comba Network Systems Co Ltd filed Critical Comba Network Systems Co Ltd
Priority to CN202010128733.9A priority Critical patent/CN111314152B/en
Publication of CN111314152A publication Critical patent/CN111314152A/en
Application granted granted Critical
Publication of CN111314152B publication Critical patent/CN111314152B/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/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • 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/0866Checking the configuration
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention relates to a factory setting restoration control method, a factory setting restoration control device and network equipment. The factory setting restoration control method comprises the following steps: after the low-level initialization is completed, detecting the connection state of the data sending channel and the data receiving channel; and when the data sending channel and the data receiving channel are detected to be in the loopback state, starting to execute a factory resetting flow. After the device completes low-level initialization, connection state detection is performed on a data sending channel and a data receiving channel of the device, and when the data sending channel and the data receiving channel are detected to be looped back currently, the control module starts to execute a factory reset restoration process to restore the device to a factory set state. Therefore, whether the equipment has a human-computer interaction interface or not and whether network services such as webserver or network management are provided or not, the effect of factory setting operation control recovery can be achieved by directly utilizing the loopback states of the data sending channel and the data receiving channel, and the purpose of greatly improving the recovery efficiency is achieved.

Description

Factory setting restoration control method and device and network equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a factory settings restoration control method, apparatus, and network device.
Background
With the development of communication technology, various network devices have been widely used in social production activities and people's lives, and can be roughly classified into an indoor type and an outdoor type according to installation and application occasions. The traditional outdoor network device can perform network connection through a supported webserver or network management and other network services, operate on a connection interface after logging in the network device, and issue a control instruction to a control module of the network device, so that the control module executes an operation of restoring factory settings after receiving the control instruction, thereby achieving the purposes of clearing error configuration and restoring factory settings. Or after the maintenance personnel arrive at the site to open the equipment shell and connect the external operation terminal, the maintenance personnel operate the external operation terminal and issue a control instruction to the control module of the network equipment to restore the factory settings. However, in the implementation process, the inventor finds that the traditional factory setting restoration method has the problem of low restoration efficiency.
Disclosure of Invention
In view of the above, it is necessary to provide a factory reset control method, a factory reset control apparatus, a network device, and a computer-readable storage medium, which can effectively improve the recovery efficiency, in order to solve the problems of the conventional factory reset method.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
in one aspect, an embodiment of the present invention provides a factory reset control method, including:
after the low-level initialization is completed, detecting the connection state of the data sending channel and the data receiving channel;
and when the data sending channel and the data receiving channel are detected to be in a loopback state, starting to execute a factory reset flow.
In one embodiment, the process of detecting the connection status of the data transmission channel and the data reception channel includes:
detecting whether a data sending channel and a data receiving channel are in a connected state;
if yes, sending a set message to a data receiving channel through a data sending channel;
and if the data receiving channel receives the set message, determining that the data sending channel and the data receiving channel are in a loopback state.
In one embodiment, the message is set to be an L2CP multicast message; the method further comprises the following steps:
when the L2CP multicast message is sent to the data receiving channel through the data sending channel, starting a packet receiving process; the packet receiving process is used for indicating the data receiving channel to receive the message;
the method comprises the steps of carrying out validity check on a message to be checked received by a data receiving channel;
and if the result of the validity check indicates that the message to be checked is consistent with the L2CP multicast message sent by the data sending channel, determining that the data receiving channel receives the L2CP multicast message.
In one embodiment, the L2CP multicast packet is a control packet carrying customized preset information; the method for checking the validity of the message to be checked received by the data receiving channel comprises the following steps:
and analyzing the message to be checked, checking according to the check sum of the message to be checked, the source MAC information, the target MAC information and the self-defined preset information, and obtaining the validity checking result.
In one embodiment, the data transmission channel and the data reception channel are shorted by a communication cable or connected by a cable connector.
In one embodiment, the data sending channel and the data receiving channel are connected through a switch.
In one embodiment, the process of starting to execute the factory reset procedure includes:
replacing the current user configuration data with the pre-stored factory setting data; the factory setting data is used for indicating the OAM module to operate by using the factory setting data.
In one embodiment, the method further includes:
and when detecting that the data sending channel and the data receiving channel are not in a loopback state, indicating the OAM module to operate by using the current user configuration data.
On the other hand, a factory setting restoration control device is also provided, which includes:
the port detection module is used for detecting the connection state of the data sending channel and the data receiving channel after the low-level initialization is finished;
and the recovery execution module is used for starting to execute a factory reset recovery process when the data sending channel and the data receiving channel are detected to be in a loopback state.
In another aspect, a network device is further provided, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the factory setting restoration control method when executing the computer program.
In still another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the factory setting restoration control method.
One of the above technical solutions has the following advantages and beneficial effects:
according to the factory setting restoration control method, device and network equipment, after the equipment is powered on or reset and enters an initialization stage, after the equipment completes low-level initialization, connection state detection is carried out on a data sending channel and a data receiving channel of the equipment, whether the data sending channel and the data receiving channel are looped back currently is detected, if yes, the equipment needs to be restored to factory setting currently, and at the moment, a control module of the equipment starts to execute a factory setting restoration flow so as to restore the equipment to a factory setting state. Therefore, whether the equipment is provided with a direct human-computer interaction interface or not and whether network services such as webserver or network management are provided or not, the loopback states of the data sending channel and the data receiving channel can be directly utilized to inform the equipment that factory settings need to be restored currently, and therefore the control module of the equipment can conveniently and quickly achieve the effect of restoring the factory settings. A user only needs to loop back a transceiving channel of the equipment, and the equipment can be restored to a factory setting state without other maintenance operations, so that the aim of greatly improving the restoration efficiency is fulfilled.
Drawings
Fig. 1 is a first flowchart of a factory setting restoration control method in an embodiment;
FIG. 2 is a flow diagram illustrating a process for detecting a connection status of a data transceiving channel according to an embodiment;
fig. 3 is a schematic diagram of a loopback connection mode of a data transceiving channel in one embodiment;
fig. 4 is a schematic diagram of another loopback connection method of the data transceiving channel in one embodiment;
fig. 5 is a schematic flow chart illustrating a process of determining a loopback state of a data transceiving channel according to an embodiment;
fig. 6 is a schematic diagram illustrating another data transceiving channel loopback connection method according to an embodiment;
FIG. 7 is a second flowchart illustrating a factory reset control method according to an embodiment;
fig. 8 is a flowchart illustrating a specific implementation of the factory setting restoration control method in an embodiment;
fig. 9 is an application diagram of the factory setting restoration control method in one embodiment;
fig. 10 is a schematic diagram illustrating an application of the factory reset control method in another embodiment;
fig. 11 is a block diagram illustrating a block configuration of a factory settings restoration control apparatus according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It is to be noted that, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Network devices can be roughly divided into an indoor type and an outdoor type, and the indoor type network devices are often provided with human-computer interaction interfaces such as keys or dial-up interfaces for convenience of operation. The traditional indoor network device can perform network connection through a human-computer interaction interface on the operation device or through network services such as a supported webserver or a network manager, and issue a control instruction to a control module of the network device, so that the control module executes an operation of restoring factory settings after receiving the control instruction, thereby achieving the purposes of clearing error configuration and restoring factory settings. And the outdoor network equipment is communicated and installed at the outdoor position where people are not easy to reach in daily life, such as an iron tower, a holding pole or a frame. When the overall structure of the outdoor network device is designed, in consideration of water resistance, dust resistance, salt fog resistance and the like, any unnecessary interface is not usually arranged on the device shell except for a necessary service port.
As such, when the outdoor device is to be restored to factory settings, the conventional implementation is as follows: and the factory settings can be restored by network connection through supported web servers or network services such as network management and the like. Or a maintenance person (or called user) arrives at a field to open the equipment shell to expose the internal circuit board of the network equipment, and the maintenance person is further connected with an external operation terminal through an interface outgoing line reserved on the internal circuit board to operate on the external operation terminal so as to issue a control instruction to a control module of the network equipment to restore factory settings.
However, in practice, the inventor finds that the conventional factory resetting method has the problem of low resetting efficiency. As is well known, there are various reliability-affecting factors in a network service, such as a physical link failure and unreliable network service, and even a certain probability that a control instruction of a user operation cannot be issued to a control module of the network device due to an accidental loss of an IP address of the network device by a maintenance worker, so that the network device fails to recover a factory configuration. Moreover, when the mode that the equipment shell is opened and the external operation terminal is connected on the spot is reached, maintenance personnel are required to climb or ascend to go to the network equipment to open the cover, so that the efficiency is low, and the potential safety hazard is large. From the perspective of actual product design, safe and stable operation of network equipment is the primary objective of designers, and the operation of factory reset is not frequently used, so that the operation mode of factory reset can be chosen in safe and stable operation during product design and a certain choice in the operation mode of factory reset. Therefore, the outdoor network device can basically realize the operation control of factory setting restoration only through a supported webserver or a network manager, but cannot realize the operation control of factory setting restoration by locally adopting the operation mode of the indoor network device. When the physical link fails or the network service is unreliable, only the maintenance personnel can arrive at the site to open the cover of the network equipment or even return the network equipment to the factory for maintenance. In order to solve the problem that the traditional factory setting restoration method is low in restoration efficiency, the application provides the following technical scheme:
referring to fig. 1, in an embodiment, a factory setting restoration control method is provided, including the following steps S12 and S14:
s12, after the low-level initialization is completed, the connection status between the data transmission channel and the data reception channel is detected.
It is understood that the low-level initialization refers to an initialization stage before a data port transceiving function of a network device is guaranteed to be available and an Operation and Administration Monitoring (OAM) module is operated in a short time (for example, but not limited to, tens of seconds, depending on a specific type of network device) after the network device is powered on or in an initialization process such as reset. The data transmission channel may be a data transmission port on a network device (e.g., a multi-port network device with more than two data ports, at least one of which is a data transmission port), or may be a data transmission channel (TX) in a single port on a network device. Similarly, the data receiving channel may be a data receiving port on a network device (for example, a multi-port network device with more than two data ports, at least one of which is a data receiving port), or may be a data receiving channel (RX) in a single port on a network device with the single port.
For multi-port network equipment, data (messages) needing to be transmitted to the outside are sent from a data sending port, and data (messages) needing to be received from the outside are received from a data receiving port; for a single-port network device, data (messages) to be transmitted to the outside are sent from a data transmission channel (TX) in the single port, and data (messages) to be received from the outside are received from a data reception channel (RX) in the single port.
Specifically, when the network device is powered on for the first time, powered off during operation and then powered on again or reset (for example, local manual reset), the network device may be initialized. Under the ordinary daily condition that the factory settings of the network equipment do not need to be restored, a data sending channel and a data receiving channel of the network equipment are not directly connected together; when the network device needs to be restored to the factory setting, the maintenance personnel may connect the data transmitting channel and the data receiving channel together locally or remotely, for example, but not limited to, directly or indirectly connect the data transmitting channel and the data receiving channel of the network device through an applicable communication cable, so that the data transmitting channel and the data receiving channel of the network device are in a port loopback state.
Thus, when the network device is powered on or reset to start initialization, the control module of the network device may detect the connection state of the data transmission channel and the data reception channel after low-level initialization is completed, so as to detect whether the data transmission channel and the data reception channel are currently in an unconnected normal state or a loopback state. It can be understood that the detection control of the control module may be implemented by presetting a detection program, and the control module may be a master or a slave in a control architecture of the master and the slave, or may be a master in a master independent control architecture, which may be specifically determined according to a control architecture of the network device.
And S14, when the data sending channel and the data receiving channel are detected to be in the loopback state, starting to execute factory reset flow.
It is understood that in practical applications of the network device, port loopback is usually an erroneous operation or an irregular operation, which is usually prohibited in practical applications. In the scheme, the port loopback is utilized to inform the network device that the operation of factory reset needs to be performed currently, that is, the data transceiving port of the network device is looped back intentionally to inform the network device: the user needs to restore the network device to the factory setting at present.
Specifically, when a maintainer loops back a data transceiving port of a network device, for example, a multi-port network device with more than two ports, one of the ports may be designated as a transmitting port, and the other port may be designated as a receiving port, and the maintainer may directly or indirectly short-circuit the transmitting port and the receiving port by using a communication cable, so that the control module detects that the transmitting port and the receiving port are currently in a loop state, and the control module may determine that the network device to which the maintainer belongs currently needs to restore factory settings. Or, when the maintenance person loops back the data transmission channel (TX) and the data reception channel (RX) of one port, for example, for a network device with only one communication port, the TX channel may be used as a data transmission port, and the RX channel may be used as a data reception port, the maintenance person may directly or indirectly short the data transmission channel (TX) and the data reception channel (RX) using one communication cable, so that the control module may detect that the transmission port and the reception port are currently in a loop state, and the control module may determine that the network device to which the maintenance person belongs currently needs to restore the factory settings.
When the control module determines that the data sending channel and the data receiving channel are in the loopback state, it is considered that the user wants to restore the factory settings of the network device. After recognizing the intention of factory reset, the control module will start to execute a preset factory reset flow to reset the factory settings of the network device. In this way, the network device will be restored to the factory state after the subsequent startup using the factory settings. The preset factory reset process may be specifically determined according to the type and factory configuration of the network device, and description is not repeated in this specification.
According to the factory setting restoration control method, after the equipment is powered on or reset and enters an initialization stage, after the equipment completes low-level initialization, connection state detection is carried out on a data sending channel and a data receiving channel of the equipment, whether the data sending channel and the data receiving channel are looped back currently or not is detected, if yes, the equipment needs to be restored to factory setting currently, and at the moment, a control module of the equipment starts to execute a factory setting restoration process to restore the equipment to a factory setting state. Therefore, whether the equipment is provided with a direct human-computer interaction interface or not and whether network services such as webserver or network management are provided or not, the loopback states of the data sending channel and the data receiving channel can be directly utilized to inform the equipment that factory settings need to be restored currently, and therefore the control module of the equipment can conveniently and quickly achieve the effect of restoring the factory settings. A user only needs to loop back a receiving and sending channel of the equipment, and the equipment can be restored to a factory setting state without other maintenance operation, so that the aim of greatly improving the restoration efficiency is fulfilled.
Referring to fig. 2, in an embodiment, the process of detecting the connection status of the data transmitting channel and the data receiving channel in the control step S12 may specifically include the following processing steps S122 to S126:
s122, detecting whether the data sending channel and the data receiving channel are in a connection state;
s124, if yes, sending a set message to a data receiving channel through a data sending channel;
and S126, if the data receiving channel receives the set message, determining that the data sending channel and the data receiving channel are in a loopback state.
It is understood that the connection state also refers to a Link UP state between data transceiving ports on the network device. The set message is a message which is predetermined for checking whether the data sending channel and the data receiving channel loop back or not, and can be effectively forwarded from the data sending channel to the data receiving channel, and the set message may be various unicast or multicast messages in the field, as long as the message can be forwarded to the data receiving channel without being intercepted in the process of sending from the data sending channel to the data receiving channel.
The setting message may be pre-stored in a data storage medium in the network device when the device leaves a factory or installs a network, so as to be called when factory reset needs to be performed, and the specific pre-storing mode may be determined according to actual application needs, as long as it is ensured that the setting message can be obtained when factory reset needs to be performed on the network device. The set message may be a general message carrying general configuration parameters, or a dedicated message carrying customized information, or the type or configuration parameters of the set message may be changed periodically or aperiodically, or specifically, the set message may be determined according to the need of checking the loopback state of the data transceiving port in practical application, as long as the set message can effectively indicate that the data transmitting channel and the data receiving channel are in the loopback state.
In the process of sending the setting message to the data receiving channel through the data sending channel, the control module may send the setting message once through the data sending channel, or may send the setting message for multiple times within a set time (for example, several seconds to several tens of seconds, specifically, may be set according to an initialization process of different types of network devices), and the sending mode may be determined according to a loopback requirement of data transceiving ports of different types of network devices in practical application.
Specifically, after the low-level initialization of the network device is completed, the control module starts to detect the port states of the data transmission channel and the data reception channel of the network device, so as to determine whether the data transmission channel and the data reception channel are currently in a connected state or in a non-connected state in a normal operation process. When detecting that the data sending channel and the data receiving channel are currently in a connected state, the control module sends a set message to the data receiving channel through the data sending channel. If the data receiving channel is detected to receive the setting message sent by the data sending channel, the control module can determine that the data sending channel and the data receiving channel are currently in a loopback state; that is to say, the control module currently detects that the data transceiving port of the network device has been looped back by the maintenance personnel, so as to determine the intention that the maintenance personnel currently needs to restore the factory settings of the network device.
Through the processing steps, the control module can quickly and effectively determine whether the data sending channel and the data receiving channel are in the loopback state at present, network services such as webserver or network management are not needed, and the reliability of port state detection is high.
Referring to fig. 3 or 4, in one embodiment, the data transmission channel and the data reception channel are shorted by a communication cable 101 or connected by a cable connector 102.
It is understood that the maintenance personnel can directly short the data transmission channel and the data reception channel on the network device 110 using the communication cable 101, which is easily available in the art, when looping back the data transceiving port on the network device 110. For example, as shown in fig. 3, for a network device 110 deployed in an area easily operated by a person, a maintenance person may directly use the communication cable 101 to short-circuit a data transmission channel and a data reception channel of the network device, and then perform power-up or reboot (reset) on the network device 110, that is, after completing low-level initialization, a control module of the network device 110 may start to detect connection states of the data transmission channel and the data reception channel of the network device 110. The communication cable 101 may be, but is not limited to, a twisted wire pair or an optical fiber, and may be determined according to the type of data transceiving port of the actual network device 110.
When the maintenance personnel loops back to the data transceiving port on the network device 110, the cable connector 102 (for example, various network connectors, which may be, but are not limited to, RJ45 cable connectors or optical fiber connectors widely used in the market) may loop back to the data transmitting channel and the data receiving channel on the network device 110. For example, as shown in fig. 4, for a network device 110 without a cascaded switch, a maintenance person may loop back a data transmission channel and a data reception channel of the network device 110 directly by using the cable connector 102 at a convergence access port of a network cable, and then power up or restart (reset) the network device 110, that is, after completing low-level initialization, a control module of the network device 110 may start to detect a connection state of the data transmission channel and the data reception channel of the network device 110.
After the network device 110 is restored to the factory setting, the maintenance personnel may remove the connected communication cable 101, or the communication cable 101 and the cable connector 102 may return the network device 110 to the non-loopback normal operating state. By the above loopback connection mode, the communication cable or cable connector is easy to obtain and has low cost, and the connection is convenient and reliable, so that the loopback connection of the data transceiving port of the network device 110 can be efficiently realized, and the network device 110 can be efficiently controlled to restore factory settings.
Referring to fig. 5, in one embodiment, the setup message is an L2CP multicast message. The factory reset control method may further include the following processing steps S132 to 136:
s132, when the L2CP multicast message is sent to the data receiving channel through the data sending channel, starting a packet receiving process; the packet receiving process is used for indicating the data receiving channel to receive the message;
s134, carrying out validity check on the message to be checked received by the data receiving channel;
s136, if the result of the validity check indicates that the message to be checked is consistent with the L2CP multicast message sent by the data sending channel, it is determined that the data receiving channel receives the L2CP multicast message.
It can be understood that the L2CP multicast packet is also an L2 layer control packet commonly used in the art and belongs to a multicast packet, such as an L2 layer control packet based on the IEEE802.3 protocol family. The parameter configuration of each element in the framing of the L2CP multicast packet may adopt a general configuration, or may adopt a customized configuration of a custom parameter, which may be specifically determined according to the needs of a manufacturer of the network device and/or the verification needs of the packet, as long as reliable verification of the packet consistency on the data transceiving port can be effectively ensured. The switches on the communication link perform forwarding processing on the received L2CP multicast message, so that it can be more effectively ensured that the L2CP multicast message sent by the data transmission channel of the network device is forwarded without being intercepted.
The validity check refers to a check process of comparing the message received by the data receiving channel with the message sent by the data sending channel so as to verify whether the message received by the data receiving channel is the same as the message sent by the data sending channel. The result of validity check may be that the message to be checked is inconsistent with the L2CP multicast message sent by the data sending channel, and the result may indicate that the data sending channel and the data receiving message of the network device are not currently looped back; or the message to be checked may be consistent with the L2CP multicast message sent by the data sending channel, and the result may indicate that the data sending channel and the data receiving channel of the network device are currently looped back.
Specifically, when the control module sends the L2CP multicast packet to the data receiving channel through the data sending channel, the control module starts a packet receiving process to receive the L2CP multicast packet exclusively on the data receiving channel. If the maintenance personnel do not loop back the data sending channel and the data receiving channel of the network device, during the detection of the port connection state of the network device, the data receiving channel on the network device cannot receive the L2CP multicast message sent by the data sending channel, and the control module directly exits the current control flow for restoring the factory settings, so that the network device continues to be started normally.
If the maintenance personnel loop back the data sending channel and the data receiving channel of the network device, the data receiving channel on the network device can receive the L2CP multicast message sent by the data sending channel during the detection of the port connection state. Specifically, after the low-level initialization is completed, the data receiving channel of the network device can already receive data sent from the outside, and the data sent by the data sending channel can also be received under the condition that the data sending channel and the data receiving channel loop back, and these data are collectively referred to as a message to be checked. During the detection of the port connection state, the control module performs validity check on the messages to be checked, that is, compares the analyzed messages to be checked with the L2CP multicast messages sent through the data sending channel, and determines whether the messages to be checked are consistent with the L2CP multicast messages sent through the data sending channel.
If the received message to be checked is consistent with the L2CP multicast message sent through the data sending channel, it is determined that the data sending channel and the data receiving channel of the network device are currently in a connected state, and the data receiving channel receives the L2CP multicast message sent through the data sending channel, so that the control module can determine that the data sending channel and the data receiving channel of the network device are currently looped back, and then a factory reset procedure is executed to reset the network device to a factory state. Through the processing steps, the detection reliability of the loopback state of the data receiving and transmitting port of the network equipment is further improved, and the operation intention of the user for restoring the factory setting of the network equipment is efficiently and accurately identified, so that the network equipment can quickly execute the operation for restoring the factory setting.
In one embodiment, the L2CP multicast message is a control message carrying customized preset information. The step S134 may specifically include the following processing steps:
and analyzing the message to be checked, checking according to the check sum of the message to be checked, the source MAC information, the target MAC information and the self-defined preset information, and obtaining the validity checking result.
It is understood that the customized preset information refers to parameter information customized by a manufacturer or other users, such as information configured in element IUT-T S ubtype and element Data shown in table 1. Shown in table 1 is the framing format of the L2CP multicast message. The Destination MAC information is information configured in the element Destination Address in table 1.
Specifically, after the control module of the network device receives the message to be checked in the data receiving channel, the control module starts to analyze the received message to be checked, and checks the received message to be checked according to the checksum, the source MAC information, the destination MAC information, and the self-defined preset information of the message to be checked, that is, compares the checksum, the source MAC information, the destination MAC information, and the self-defined preset information of the message to be checked with the checksum, the source MAC information, the destination MAC information, and the self-defined preset information of the L2CP multicast message sent in the data sending channel. If the checksum of the received message to be checked is correct, and the source MAC information, the destination MAC information, and the customized preset information are all consistent with the source MAC information, the destination MAC information, and the customized preset information of the L2CP multicast message sent by the data sending channel, the obtained validity check result is that the message to be checked received by the data receiving channel is consistent with the L2CP multicast message sent by the data sending channel, and the control module can determine that the data sending channel and the data receiving channel are currently in a loopback state.
TABLE 1
Figure BDA0002395206930000141
Through the processing steps, the customized L2CP multicast message is adopted to detect the loopback state of the port, so that the detection reliability of the loopback state of the data receiving and transmitting port of the network equipment can be further improved, the operation intention of a user for restoring the network equipment to the factory setting can be more effectively and accurately identified, and the operation of restoring the factory setting can be accurately and quickly executed by the network equipment.
Referring to fig. 6, in one embodiment, the data sending channel and the data receiving channel are connected through a switch 103.
It can be understood that, for an application scenario in which the network device 110 converges and accesses the network through the switch 103, the network device 110 is usually installed in an area where people are not easy to reach, and after the port loopback protection function of the switch 103 is closed, a maintenance person may insert the communication cable 101 (i.e., an applicable cable) connected to the network device 110 into the switch 103, where the port corresponds to the data transmission channel and the data reception channel of the network device 110, respectively, so that the message loopback of the network device 110 may be implemented through the switch 103. Then, the network device 110 in the area that is not easily reached is restarted by power off, so that the network device 110 enters an initialization stage to start the control flow for restoring the factory settings. When the control module of the network device 110 detects that the data transmission channel and the data reception channel are currently in the loopback state, an operation flow for restoring factory settings is executed.
After the network device 110 is restored to the factory settings, the maintenance personnel only need to remove the looped cable on the switch 103 and re-start the port loopback protection function of the switch 103, so that the network device 110 can return to the normal working state of non-loopback. Through the above loop-back connection manner, the communication cable 101 is easy to obtain and has low cost, and the connection is convenient and reliable, so that loop-back connection to the data transceiver port of the network device 110 can be efficiently achieved, and the network device 110 can be efficiently controlled to restore factory settings.
In an embodiment, the process of starting execution of the factory reset procedure in the control step S14 may specifically include the following processing steps:
replacing the current user configuration data with the pre-stored factory setting data; the factory setting data is used for indicating the OAM module to operate by using the factory setting data.
It can be understood that the factory setting data refers to original configuration data that is pre-stored in the network device by a manufacturer when the network device is produced and shipped from a factory, and is used for configuring an initial operating state of the network device. The user configuration data refers to configuration data set by a user when the network device is in actual networking application, and is used for configuring the running state of the network device in the actual networking application.
Specifically, after determining an operation intention of a user to restore factory settings of the network device, a control module of the network device calls factory setting data stored in a non-volatile memory (NVRAM) of the network device to replace current user configuration data in the network device; furthermore, the operation, administration and monitoring (OAM) module of the network equipment can use the replaced factory setting data to continue to operate, and the starting operation of the network equipment is realized. The OAM module may be, but is not limited to, determined whether it can be operated by using factory setting data by means of instruction interaction between the control module and the OAM module, or by means of actively detecting whether the configuration data is replaced or not by the OAM module. Through the cooperation of the processing steps and the processing procedure of the embodiment, the factory reset of the network device can be efficiently realized.
Referring to fig. 7 and fig. 8, in an embodiment, the factory reset control method may further include the following processing step S15:
s15, when it is detected that the data sending channel and the data receiving channel are not in the loopback state, indicating the OAM module to operate using the current user configuration data.
It can be understood that, when detecting that the data sending channel and the data receiving channel are not in the connection state, the control module may directly determine that the data sending channel and the data receiving channel are not in the loopback state; when the control module detects that the data sending channel and the data receiving channel are in the connected state and the data receiving channel cannot receive the L2CP multicast message sent by the data sending channel during the detection of the port connected state, it may also directly determine that the data sending channel and the data receiving channel are not in the loopback state. Thus, it is indicated that the network device can be continuously and normally started at present without performing an operation of restoring factory settings, and the OAM module can continuously start and operate using the current user configuration data in the network device.
In order to more clearly and intuitively understand the embodiment, a specific implementation flow diagram as shown in fig. 8 is provided. Through the processing steps, the network equipment can quickly determine that factory reset is not needed at present after power-on or reset begins, so that normal starting and running of the network equipment are ensured, and misoperation is avoided.
It should be understood that, although the steps in the flowcharts of fig. 1, 2 and 5, and 7 and 8 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1, fig. 2 and fig. 5, and fig. 7 and fig. 8 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternatively with other steps or at least some of the sub-steps or stages of other steps.
In an embodiment, the network device to which the factory reset control method is applied may be a single communication port device, a dual communication port device, or a multi-communication port device that adopts a duplex communication mode. As shown in fig. 9, for a dual-communication port device or a multi-communication port device, in practical applications, a user loops back a data transmitting port (e.g., port P2) and a data receiving port (e.g., port P1) of the device directly or indirectly (e.g., via a cable connector or via a switch) using a communication cable on the field of the device or at the remote back end of the device, so that the device detects that the data transmitting/receiving port loops back, and knows that factory reset needs to be performed on the device at present, and then the control module starts to perform a factory reset procedure on the device, so as to reset the device to a factory set state. It should be noted that, the above-mentioned port P1 as the data sending port and port P2 as the data receiving port are only illustrative and not limited, and any one or more of the other ports Pn on the device may also be the data sending port or the data receiving port, and may be determined according to the specific type of network device used in the practical application.
As shown in fig. 10, for a single communication port device, in practical applications, a user directly or indirectly loops back a data transmitting port (i.e., channel Tx of the communication port) and a data receiving port (i.e., channel Rx of the communication port) in a communication port of the device by using a communication cable on a device field or at a remote back end of the device, so that the device detects that the data transmitting/receiving port loops, and knows that factory reset needs to be performed on the device at present, and then the control module starts to perform a factory reset procedure on the device, so as to reset the device to a factory reset state.
Referring to fig. 11, in an embodiment, a factory settings restoration control apparatus 100 is further provided, and includes a port detection module 11 and a restoration execution module 13. The port detection module 11 is configured to perform connection status detection on the data sending channel and the data receiving channel after the low-level initialization is completed. The recovery execution module 13 is configured to start executing a factory reset recovery process when detecting that the data sending channel and the data receiving channel are in a loopback state.
The factory setting resuming control apparatus 100, through cooperation of the modules, enters an initialization stage when the device is powered on or reset, and detects whether the data transmission channel and the data reception channel of the device are currently looped back by detecting a connection state of the data transmission channel and the data reception channel after the device completes low-level initialization, if so, it indicates that the device needs to be currently subjected to factory setting resuming operation, and at this time, the factory setting resuming execution module 13 starts to execute a factory setting resuming flow to resume the device to a factory setting state. Therefore, whether the equipment has a direct human-computer interaction interface or not and whether network services such as webserver or network management are provided or not can the loopback states of the data sending channel and the data receiving channel be directly used for informing the equipment that factory settings need to be restored currently, and therefore the control module of the equipment can conveniently and quickly achieve the effect of factory setting restoration. A user only needs to loop back a transceiving channel of the equipment, and the equipment can be restored to a factory setting state without other maintenance operations, so that the aim of greatly improving the restoration efficiency is fulfilled.
In one embodiment, the port detection module 11 includes a connection detection sub-module, a transmission processing sub-module, and a loopback determination module. The connection detection submodule is used for detecting whether the data sending channel and the data receiving channel are in a connection state or not. The sending processing sub-module is used for sending the set message to the data receiving channel through the data sending channel when the data sending channel is connected with the data receiving channel. The loopback determining module is used for determining that the data sending channel and the data receiving channel are in a loopback state when the data receiving channel receives the set message.
In one embodiment, the setup message is an L2CP multicast message. The factory setting restoration control apparatus 100 further includes a receiving module, a verifying module, and a receiving confirming module. The receiving module is used for starting a packet receiving process when sending the L2CP multicast message to the data receiving channel through the data sending channel; the packet receiving process is used for indicating the data receiving channel to receive the message. The checking module is used for checking the validity of the message to be checked received by the data receiving channel. The receiving confirmation module is used for determining that the data receiving channel receives the L2CP multicast message when the validity check result indicates that the message to be checked is consistent with the L2CP multicast message sent by the data sending channel.
In one embodiment, the L2CP multicast message is a control message carrying customized preset information. The verification module can be specifically used for analyzing the message to be verified, verifying according to the checksum, the source MAC information, the destination MAC information and the self-defined preset information of the message to be verified, and obtaining the result of validity verification.
In one embodiment, the data transmit path and the data receive path are shorted by a communication cable or connected by a cable connector.
In one embodiment, the data sending channel and the data receiving channel are connected by a switch.
In an embodiment, the factory reset execution module 13 may be specifically configured to replace the current user configuration data with pre-stored factory setting data in a process of starting to execute a factory reset procedure; the factory setting data is used for indicating the OAM module to operate by using the factory setting data.
In one embodiment, the factory reset control apparatus 100 further includes an operation indication module, where the operation indication module is configured to indicate the OAM module to operate using current user configuration data when it is detected that the data transmission channel and the data reception channel are not in a loopback state.
For specific limitations of the factory settings restoration control apparatus 100, reference may be made to the corresponding limitations of the factory settings restoration control method above, and details are not described here. Each module in the factory settings restoration control apparatus 100 may be entirely or partially implemented by software, hardware, or a combination thereof. The modules may be embedded in a hardware form or may be independent of a processor in a network device, or may be stored in a memory in the network device in a software form, so that the processor calls and executes operations corresponding to the modules, where the network device may be a base station.
In an embodiment, a network device is further provided, which may be a single communication port device, or may be a dual communication port device or a multi-communication port device, and the network device adopts a duplex communication mode. The network device comprises a memory and a processor, the memory stores a computer program, and the processor realizes the following steps when executing the computer program: after the low-level initialization is completed, detecting the connection state of the data sending channel and the data receiving channel; and when the data sending channel and the data receiving channel are detected to be in the loopback state, starting to execute a factory resetting flow.
Those skilled in the art can understand that the network device in this embodiment may include other components besides the memory and the processor, which may be determined according to the structural components and the implemented functions of the specific network device in practical application (for example, product devices of various duplex communication modes in the communication industry and the non-communication industry), and the description of this specification is not repeated.
In one embodiment, the processor may further implement the additional steps or substeps in the factory reset control method embodiments described above when executing the computer program.
In one embodiment, there is also provided a computer readable storage medium having a computer program stored thereon, the computer program when executed by a processor implementing the steps of: after the low-level initialization is completed, detecting the connection state of the data sending channel and the data receiving channel; and when the data sending channel and the data receiving channel are detected to be in a loopback state, starting to execute a factory reset flow.
In one embodiment, the computer program, when executed by the processor, may further implement the additional steps or substeps of the factory reset control method embodiments described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link DRAM (Synchlink) DRAM (SLDRAM), Rambus DRAM (RDRAM), and interface DRAM (DRDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features. The above examples only show some embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that various changes and modifications can be made by those skilled in the art without departing from the spirit of the invention, and these changes and modifications are all within the scope of the invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A factory setting restoration control method is characterized by comprising the following steps:
after the low-level initialization of the network equipment with a single port is finished, detecting the connection state of the port data sending channel and the port data receiving channel, and when the network equipment is installed in an area where personnel cannot easily reach, connecting the data sending channel and the data receiving channel through a switch;
when detecting that the data sending channel and the data receiving channel are in a loopback state, starting to execute a factory reset restoration process on the network equipment;
and after the network equipment is restored to factory settings, starting a port loopback protection function of the switch to enable the network equipment to return to a non-loopback state.
2. The factory setting restoration control method according to claim 1, wherein the process of detecting the connection state of the data transmission channel and the data reception channel includes:
detecting whether the data sending channel and the data receiving channel are in a connected state;
if yes, sending a set message to the data receiving channel through the data sending channel;
and if the data receiving channel receives the set message, determining that the data sending channel and the data receiving channel are in a loopback state.
3. The factory reset control method according to claim 2, wherein the setting message is an L2CP multicast message;
the method further comprises the following steps:
when the L2CP multicast message is sent to the data receiving channel through the data sending channel, starting a packet receiving process; the packet receiving process is used for indicating the data receiving channel to receive the message;
the validity of the message to be checked received by the data receiving channel is checked;
and if the validity check result indicates that the message to be checked is consistent with the L2CP multicast message sent by the data sending channel, determining that the data receiving channel receives the L2CP multicast message.
4. The factory setting restoration control method according to claim 3, wherein the L2CP multicast packet is a control packet carrying customized preset information; the step of checking the validity of the message to be checked received by the data receiving channel comprises the following steps:
and analyzing the message to be checked, checking according to the check sum of the message to be checked, the source MAC information, the target MAC information and the self-defined preset information, and obtaining the validity checking result.
5. The factory reset control method according to claim 2 or 3, wherein the data transmission channel and the data reception channel are shorted by a communication cable or connected by a cable connector.
6. The factory-setting-restoration control method according to claim 1, wherein starting execution of a factory-setting-restoration process on the network device includes:
replacing the current user configuration data of the network equipment with pre-stored factory setting data; and the factory setting data is used for indicating the OAM module to operate by using the factory setting data.
7. The factory reset control method according to claim 1, wherein the method further comprises:
and when detecting that the data sending channel and the data receiving channel are not in a loopback state, indicating the OAM module to operate by using the current user configuration data.
8. A factory setting restoration control device, comprising:
the port detection module is used for detecting the connection state of a data sending channel of the port and a data receiving channel of the port after the low-level initialization of the network equipment of the single port is completed, and when the network equipment is installed in an area where personnel cannot easily reach, the data sending channel and the data receiving channel are connected through a switch;
the recovery execution module is used for starting to execute a factory reset recovery process on the network equipment when the data sending channel and the data receiving channel are detected to be in a loopback state;
and after the network equipment is restored to factory settings, starting a port loopback protection function of the switch to enable the network equipment to return to a non-loopback state.
9. A network device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the factory settings restoration control method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the factory reset control method according to any one of claims 1 to 7.
CN202010128733.9A 2020-02-28 2020-02-28 Factory setting restoration control method and device and network equipment Active CN111314152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010128733.9A CN111314152B (en) 2020-02-28 2020-02-28 Factory setting restoration control method and device and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010128733.9A CN111314152B (en) 2020-02-28 2020-02-28 Factory setting restoration control method and device and network equipment

Publications (2)

Publication Number Publication Date
CN111314152A CN111314152A (en) 2020-06-19
CN111314152B true CN111314152B (en) 2022-09-30

Family

ID=71148423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010128733.9A Active CN111314152B (en) 2020-02-28 2020-02-28 Factory setting restoration control method and device and network equipment

Country Status (1)

Country Link
CN (1) CN111314152B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325046A (en) * 2011-09-08 2012-01-18 杭州华三通信技术有限公司 Method for triggering network equipment to recover default configuration and device
GB201215850D0 (en) * 2012-09-05 2012-10-24 Nvidia Corp Error recovery

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325046A (en) * 2011-09-08 2012-01-18 杭州华三通信技术有限公司 Method for triggering network equipment to recover default configuration and device
GB201215850D0 (en) * 2012-09-05 2012-10-24 Nvidia Corp Error recovery

Also Published As

Publication number Publication date
CN111314152A (en) 2020-06-19

Similar Documents

Publication Publication Date Title
US20220361274A1 (en) Method for Establishing Communication Connection after Device Is Offline and Smart Home System
WO2021169377A1 (en) Network configuration method and apparatus, and computer device
JP6796656B2 (en) Basic service set identifier BSSID update
US20070127435A1 (en) Nms corba listener for ems signals
US10037253B2 (en) Fault handling methods in a home service system, and associated household appliances and servers
US10148764B2 (en) Backup wide area network connection for access points and routers
JP2001103062A (en) Method for notifying detection of fault
CN111314152B (en) Factory setting restoration control method and device and network equipment
JP2017536759A (en) Method and apparatus for self-healing after disconnection of base station
CN101980478A (en) Method and device for detecting and processing equipment failures and network equipment
CN113259468B (en) Network equipment configuration method and device
TWM574793U (en) Network device capable of detecting state of external device
US10492088B2 (en) Technique for accessing at least one administration server
KR101128366B1 (en) Water-administration automation system and method with self-sensing of loss communication and auto-resume feature in dynamic ip environment
CN101959223B (en) Self-healing control method and self-healing control device of flow-control transport protocol link failure
US10491544B2 (en) Consistency control of a logical path passing through a relay device
EP2523480B1 (en) Method and system for emergency switching
CN108667509B (en) Cluster joining method and device and cluster equipment
CN109391544B (en) Automatic restarting method and circuit for dead halt of 2G/3G/4G router
KR101565348B1 (en) Remote power control method of ethernet switch using poe injector
CN111224803A (en) Multi-master detection method in stacking system and stacking system
CN113839816B (en) Wiring device and fault switching method thereof
CN103596060A (en) Information prompt method and device
KR100400733B1 (en) Internet link maintenance method for internetwork function
KR101578622B1 (en) Method of failover for routing system

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Applicant after: Jingxin Network System Co.,Ltd.

Address before: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Applicant before: COMBA TELECOM SYSTEMS (CHINA) Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221130

Address after: 7-1, Area A, Floor 7, Building (7), No. 10, Shenzhou Road, Huangpu District, Guangzhou, Guangdong 510,000

Patentee after: Guangzhou Jingxin Communication Technology Co.,Ltd.

Address before: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Patentee before: Jingxin Network System Co.,Ltd.