CN110971667A - Method for recovering default configuration of equipment and electronic equipment - Google Patents
Method for recovering default configuration of equipment and electronic equipment Download PDFInfo
- Publication number
- CN110971667A CN110971667A CN201911072759.XA CN201911072759A CN110971667A CN 110971667 A CN110971667 A CN 110971667A CN 201911072759 A CN201911072759 A CN 201911072759A CN 110971667 A CN110971667 A CN 110971667A
- Authority
- CN
- China
- Prior art keywords
- network equipment
- upper computer
- reset
- time interval
- feedback message
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000004590 computer program Methods 0.000 claims description 12
- 238000010586 diagram Methods 0.000 description 4
- 238000012795 verification Methods 0.000 description 4
- 238000011084 recovery Methods 0.000 description 2
- 102100033189 Diablo IAP-binding mitochondrial protein Human genes 0.000 description 1
- 101710101225 Diablo IAP-binding mitochondrial protein Proteins 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
- H04L67/303—Terminal profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
- H04L67/306—User profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides a method for recovering default configuration of equipment, which comprises the following steps: the method comprises the steps that a host computer sends a connection request message to network equipment, receives a connection feedback message sent by the network equipment within a first preset time interval, and then sends a reset request message to the network equipment; and the upper computer receives the reset feedback message sent by the network equipment in a second preset time interval, and then prompts the user that the operation is successful. The scheme solves the problem that the operation process of recovering the default configuration of the network equipment is complex, effectively simplifies the process of recovering the default configuration of the equipment and is convenient for a user to manage the network equipment.
Description
Technical Field
The invention relates to the field of computer communication, in particular to a method for recovering default configuration of equipment.
Background
In some network devices provided in the market, such as switches, routers and the like, in order to save cost, a button for resetting and restoring default is not provided, only a network management interface is provided for managing the device, and the IP address of the device needs to be known when the device is accessed through the network interface. When accessing through the IP address, the user needs to input a user name and a password,
and in order to prevent the equipment from being configured maliciously, a user can modify a default user name and a default password, and when the equipment is not operated for a long time, the user name, the default password or the IP address is easy to forget, at this time, the user needs to recover the default setting of the equipment through complicated manual operation, and the management of the network equipment is very inconvenient in practice.
Disclosure of Invention
In view of this, the embodiment of the present invention provides a method for recovering a default configuration of a device, so as to solve the problem that the configuration of the default configuration of the device is complex.
In a first aspect of the embodiments of the present invention, a method for recovering a default configuration of a device is provided, including:
the method comprises the steps that a host computer sends a connection request message to network equipment, receives a connection feedback message sent by the network equipment within a first preset time interval, and then sends a reset request message to the network equipment;
and the upper computer receives the reset feedback message sent by the network equipment in a second preset time interval, and then prompts the user that the operation is successful.
In a second aspect of the embodiments of the present invention, an electronic device for recovering a default configuration of a device is provided, including:
a first sending module: the device is used for sending a connection request message to the network equipment;
a first receiving module: the network equipment is used for receiving a connection feedback message sent by the network equipment;
a second sending module: the network equipment is used for sending a reset request message to the network equipment after receiving a connection feedback message sent by the network equipment within a first preset time interval;
a second receiving module: and the reset feedback message is used for receiving the reset feedback message sent by the network equipment and generating prompt operation prompt information.
In a third aspect of embodiments of the present invention, a computer program product is provided, which comprises a computer program that, when executed by one or more processors, performs the steps of the method provided in the first aspect of embodiments of the present invention.
In the embodiment of the invention, the upper computer sends the connection request message to the network, the reset instruction is sent to the network equipment according to whether the feedback information of the network equipment is received, and the reset feedback message of the network equipment is received, so that the success of the reset is prompted, the problem that the operation of the default configuration of the traditional recovery equipment is complex is solved, the reset of the network equipment is effectively simplified, the reset of the default configuration of the equipment can be facilitated through simple program setting on the upper computer and the network equipment, and the user is helped to manage the equipment again when forgetting the user information or the IP information.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating a method for restoring default configuration of a device according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for restoring default configuration of a device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device for restoring a default configuration of a device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons skilled in the art without any inventive work shall fall within the protection scope of the present invention, and the principle and features of the present invention shall be described below with reference to the accompanying drawings.
The terms "comprises" and "comprising," when used in this specification and claims, and in the accompanying drawings and figures, are intended to cover non-exclusive inclusions, such that a process, method or system, or apparatus that comprises a list of steps or elements is not limited to the listed steps or elements.
Fig. 1 is a schematic diagram of a method for restoring a default configuration of a device according to an embodiment of the present invention, as shown in fig. 1:
the upper computer 110 sends a connection request message to the network device 120 through s1, and after receiving and verifying the connection request message, the network device 120 sends a connection feedback message to the upper computer 110 in s 2.
The upper computer 110 receives the connection feedback message sent by the network device within the preset time interval, and then sends a reset message request message to the network device 120 through s3, the network device 120 receives the verification reset request message, and when the verification is passed, the reset feedback message is sent to the upper computer 110 in s4, and the upper computer 110 receives the reset feedback message within the preset time interval, so that the user is prompted to operate successfully, otherwise, the operation failure is prompted.
And when the upper computer 110 does not receive the connection feedback message or the reset feedback message within the preset time, exiting the current upper computer program, and controlling the upper computer to send a message to the network equipment 120 every certain time in the upper computer program for confirming whether to establish connection with the network equipment or complete reset.
The upper computer is computer equipment capable of directly sending control instructions, such as a Personal Computer (PC), a tablet Personal Computer (PC), an industrial personal computer and the like, instruction information can be sent to the lower computer through a computer program in the upper computer, and the network equipment is a physical entity connected to a network, such as a network bridge, a gateway, a router and the like, and can receive the instruction information sent by the upper computer to perform feedback and execute corresponding operations.
Referring to fig. 2, a flow chart of a method for recovering a default configuration of a device according to an embodiment of the present invention includes:
s201, an upper computer sends a connection request message to network equipment, and if the upper computer receives a connection feedback message sent by the network equipment within a first preset time interval, the upper computer sends a reset request message to the network equipment;
the upper computer can send a network request message to the network equipment every certain time (such as 5 seconds), and within a first preset time interval, if a feedback message of the network equipment is not received, the upper computer repeatedly sends the network request message, and when the first preset time interval is exceeded, the upper computer exits from the current upper computer program.
Specifically, when the upper computer does not receive a connection feedback message sent by the network device within a first preset time interval, exiting from the current upper computer program. The current upper computer program is a program for controlling the upper computer to send a connection request to the network equipment at present, and can also be a program for controlling the network equipment to reset through the upper computer.
Preferably, the network device verifies at least the ethernet type, the message length, the destination physical address, the source physical address, the message subtype and the message identifier of the connection request message.
S202, the upper computer receives the reset feedback message sent by the network equipment in a second preset time interval, and then prompts a user that the operation is successful.
And in a second preset time interval, the network equipment repeatedly sends a reset request message for sending the reset feedback message, and if the reset request message is not received after exceeding the second preset time interval, the current upper computer program is also exited.
Specifically, when the upper computer does not receive the reset feedback message sent by the network device within a second preset time interval, the upper computer prompts that the operation of the user fails.
It is noted that the first predetermined time interval and the second predetermined time interval merely represent differences in the length of the time intervals, and typically the second predetermined time interval is smaller than the first predetermined time interval.
It should be further noted that, in the network device, the message needs to be verified when the connection request message or the reset request message is received, where the message includes an ethernet type of the message, a message length, a destination physical address, a source physical address, a message subtype, a message flag, and the like. In this embodiment, in order to prevent the common packet from having the same content as the connection request packet and the reset request packet, the frame length, the ethernet type, and other fields in the upper computer are distinguished.
Specifically, in the message mutually transmitted by the upper computer and the network device, the length of the byte is set to be 88 bytes, and the first 19 bytes are filled according to a frame format, including an ethernet type, a message length, a destination physical address, a source physical address, a message subtype, a message mark and the like. Random numbers are filled in the 20-88 fields of the message.
Illustratively, the message frame format is:
when the message is verified, the method comprises the following steps:
(1)Ethertype=0x5566;
(2) whether the length of the message is equal to 88;
(3)Dmac=02-02-02-02-02-02;
(4) if Smac is 04-04-04-04-04;
(5)Subtype=0x0C;
(6)Flag=00-20-A8。
when the above conditions are simultaneously met, the message passes the verification.
By the method provided by the embodiment, the recovery of the default configuration of the equipment can be simply and quickly finished for the network equipment which cannot recover the default configuration of the equipment through hardware reset and the user forgets the user name, the password or the IP address.
Fig. 3 is a schematic structural diagram of an electronic device for recovering a default configuration of a device according to an embodiment of the present invention, where the electronic device includes:
the first transmitting module 310: the device is used for sending a connection request message to the network equipment;
the first receiving module 320: the network equipment is used for receiving a connection feedback message sent by the network equipment;
the second sending module 330: the network equipment is used for sending a reset request message to the network equipment after receiving a connection feedback message sent by the network equipment within a first preset time interval;
optionally, after receiving the connection feedback packet sent by the network device within the first predetermined time interval, sending the reset request packet to the network device includes:
and when the upper computer does not receive the connection feedback message sent by the network equipment within a first preset time interval, exiting the current upper computer program.
The second receiving module 340: and the reset feedback message is used for receiving the reset feedback message sent by the network equipment and generating prompt operation prompt information.
Optionally, the receiving the reset feedback packet sent by the network device and generating the prompt operation prompt information includes:
and when the upper computer does not receive the reset feedback message sent by the network equipment within a second preset time interval, prompting the user that the operation is failed, and exiting the current upper computer program.
In one embodiment, a network device is also included, the network device comprising:
a first receiving module: the device is used for receiving a connection request message sent by an upper computer;
and checking the connection request message sent by the upper computer, if the check is successful, sending a connection feedback message to the upper computer through the first feedback module, and otherwise, ignoring the message.
A first feedback module: the upper computer is used for sending a connection feedback message to the upper computer;
a second receiving module: the system comprises a host computer, a reset request message and a reset request message, wherein the reset request message is used for receiving the reset request message sent by the host computer;
and receiving and verifying the reset request message, and disconnecting the network equipment from the upper computer when the network equipment does not receive the reset request message for a preset time.
A second feedback module: and the reset feedback message is used for sending the reset feedback message to the upper computer.
And after the reset request message is received and the verification is passed, sending a reset feedback message, restarting the equipment, and executing the operation of recovering the default configuration.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by a program to instruct associated hardware, where the program may be stored in a computer-readable storage medium, and when executed, the program includes steps S201 to S202, where the storage medium includes, for example: ROM/RAM, magnetic disk, optical disk, etc.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (5)
1. A method for restoring a default configuration of a device, comprising:
the method comprises the steps that a host computer sends a connection request message to network equipment, receives a connection feedback message sent by the network equipment within a first preset time interval, and then sends a reset request message to the network equipment;
and the upper computer receives the reset feedback message sent by the network equipment in a second preset time interval, and then prompts the user that the operation is successful.
2. The method of claim 1, wherein the sending of the connection request message to the network device by the upper computer, and the receiving of the connection feedback message sent by the network device by the upper computer within the first predetermined time interval comprises:
the network device verifies at least the Ethernet type, message length, destination physical address, source physical address, message subtype and message flag of the connection request message.
3. The method of claim 1, wherein the sending of the connection request message to the network device by the upper computer, and the receiving of the connection feedback message sent by the network device by the upper computer within the first predetermined time interval comprises:
and when the upper computer does not receive the connection feedback message sent by the network equipment within a first preset time interval, exiting the current upper computer program.
4. The method of claim 1, wherein if the upper computer receives a reset feedback message sent by the network device within a second predetermined time interval, the prompting that the user operation is successful comprises:
and when the upper computer does not receive the reset feedback message sent by the network equipment within a second preset time interval, prompting the user that the operation is failed.
5. An electronic device for restoring a default configuration of the device, comprising:
a first sending module: the device is used for sending a connection request message to the network equipment;
a first receiving module: the network equipment is used for receiving a connection feedback message sent by the network equipment;
a second sending module: the network equipment is used for sending a reset request message to the network equipment after receiving a connection feedback message sent by the network equipment within a first preset time interval;
a second receiving module: and the reset feedback message is used for receiving the reset feedback message sent by the network equipment and generating prompt operation prompt information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911072759.XA CN110971667A (en) | 2019-11-05 | 2019-11-05 | Method for recovering default configuration of equipment and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911072759.XA CN110971667A (en) | 2019-11-05 | 2019-11-05 | Method for recovering default configuration of equipment and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110971667A true CN110971667A (en) | 2020-04-07 |
Family
ID=70030081
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911072759.XA Pending CN110971667A (en) | 2019-11-05 | 2019-11-05 | Method for recovering default configuration of equipment and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110971667A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1414740A (en) * | 2002-03-28 | 2003-04-30 | 华为技术有限公司 | Centralized management method of local net exchange equipment |
US6687817B1 (en) * | 2000-11-14 | 2004-02-03 | Sun Microsystems, Inc. | Configuration of a network device via the network |
CN105391572A (en) * | 2015-10-15 | 2016-03-09 | 上海寰创通信科技股份有限公司 | Method for restoring factory configuration of equipment |
CN105516255A (en) * | 2015-11-27 | 2016-04-20 | 上海凌云天博光电科技有限公司 | Method for pushing configuration from MoCA central office to terminal device and corresponding device |
CN107332726A (en) * | 2016-04-29 | 2017-11-07 | 华为技术有限公司 | A kind of detection method and device of communication link |
CN110086676A (en) * | 2019-05-08 | 2019-08-02 | 深信服科技股份有限公司 | A kind of configuration method and relevant device of distribution router |
-
2019
- 2019-11-05 CN CN201911072759.XA patent/CN110971667A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6687817B1 (en) * | 2000-11-14 | 2004-02-03 | Sun Microsystems, Inc. | Configuration of a network device via the network |
CN1414740A (en) * | 2002-03-28 | 2003-04-30 | 华为技术有限公司 | Centralized management method of local net exchange equipment |
CN105391572A (en) * | 2015-10-15 | 2016-03-09 | 上海寰创通信科技股份有限公司 | Method for restoring factory configuration of equipment |
CN105516255A (en) * | 2015-11-27 | 2016-04-20 | 上海凌云天博光电科技有限公司 | Method for pushing configuration from MoCA central office to terminal device and corresponding device |
CN107332726A (en) * | 2016-04-29 | 2017-11-07 | 华为技术有限公司 | A kind of detection method and device of communication link |
CN110086676A (en) * | 2019-05-08 | 2019-08-02 | 深信服科技股份有限公司 | A kind of configuration method and relevant device of distribution router |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2015131740A1 (en) | Intelligent home terminal and control method therefor | |
US20190090133A1 (en) | Authentication method and server, and computer storage medium | |
US9917815B2 (en) | Border gateway protocol (BGP) communications over trusted network function virtualization (NFV) hardware | |
EP3068093B1 (en) | Security authentication method and bidirectional forwarding detection method | |
US20080104252A1 (en) | Resuming a computing session when rebooting a computing device | |
WO2021169377A1 (en) | Network configuration method and apparatus, and computer device | |
WO2007115488A1 (en) | Device parameters configuring method, system and device in digital subscriber line access network | |
CN105099889A (en) | Order notification method, apparatus and system | |
CN106528301B (en) | Method and device for updating timeout waiting duration | |
WO2015188440A1 (en) | Resource subscription processing method and device | |
WO2016054888A1 (en) | Method and device for creating subscription resource | |
WO2014117737A1 (en) | Oam packet processing method, device and system | |
WO2019095388A1 (en) | Remotely-assisted processing method and device | |
WO2015117446A1 (en) | Method and device for sending control resource change notification message | |
CN103199990B (en) | A kind of method and apparatus of Routing Protocol certification migration | |
WO2016180089A1 (en) | Method and apparatus for configuring switch, mobile terminal, and switch | |
CN110971667A (en) | Method for recovering default configuration of equipment and electronic equipment | |
CN107547217B (en) | Router service configuration method and router | |
JP3944030B2 (en) | Network device control apparatus, network device control method, and program for implementing the control method | |
CN105429867A (en) | Fused type home gateway and access method of application service thereof | |
WO2014000290A1 (en) | Method, device and system for controlling data packets | |
CN111918268B (en) | Control method and device of intelligent equipment, electronic equipment and storage medium | |
WO2015158058A1 (en) | Method and system for implementing call saving and recovery | |
Cisco | Cisco 7304 Router Troubleshooting and Configuration Notes | |
WO2016101424A1 (en) | Method and apparatus for realizing terminal service information processing |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200407 |
|
RJ01 | Rejection of invention patent application after publication |