CN113726554A - Method for restoring network equipment version and network equipment - Google Patents

Method for restoring network equipment version and network equipment Download PDF

Info

Publication number
CN113726554A
CN113726554A CN202110877415.7A CN202110877415A CN113726554A CN 113726554 A CN113726554 A CN 113726554A CN 202110877415 A CN202110877415 A CN 202110877415A CN 113726554 A CN113726554 A CN 113726554A
Authority
CN
China
Prior art keywords
version
network
network device
configuration information
access configuration
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.)
Withdrawn
Application number
CN202110877415.7A
Other languages
Chinese (zh)
Inventor
张司宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd Chengdu Branch
Original Assignee
New H3C Technologies Co Ltd Chengdu Branch
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd Chengdu Branch filed Critical New H3C Technologies Co Ltd Chengdu Branch
Priority to CN202110877415.7A priority Critical patent/CN113726554A/en
Publication of CN113726554A publication Critical patent/CN113726554A/en
Withdrawn legal-status Critical Current

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/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • H04L41/0661Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities by reconfiguring faulty entities

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present specification provides a method for restoring a network device version and a network device, the method comprising: and when the network equipment fails to start the version, acquiring the recorded first version number and the network access configuration information from the first partition, accessing the network by using the network access configuration information, updating the version stored in the network according to the first version number, and starting the network equipment by using the updated version. By the method, when the main version of the network equipment has problems, the version data of the network equipment can be recovered.

Description

Method for restoring network equipment version and network equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method for recovering a version of a network device and a network device.
Background
The network equipment (such as a household router) is not provided with debugging tools or means such as serial ports and the like due to the limitation of subjective and objective reasons such as lack of professional field knowledge, insufficient manual and manual capabilities, no matched network tools and the like of a user. For example, in the version upgrade process of the network device, if the power failure occurs suddenly, the risk still exists that the version of the network device is damaged and the network device cannot be used, and generally, in such a situation, the home user cannot recover the version of the network device and can only return to the factory for repair or purchase again.
Disclosure of Invention
The embodiment of the disclosure provides a method for recovering a network device version and a network device.
The embodiment of the disclosure provides a method for restoring a network device version, which comprises the following steps:
when the network equipment fails to start the version, acquiring a recorded first version number and network access configuration information from a first partition;
accessing the network by using the network access configuration information and updating the version stored by the network access configuration information according to the first version number;
starting the network equipment by using the updated version;
the first version number is a version number corresponding to a version used when the network equipment is normally started.
Optionally, when the version of the network device is normally started, the first version number and the network access configuration information of the currently running version of the network device are recorded, and the first version number and the network access configuration information are recorded in the first partition.
Optionally, the recording the first version number and the network access configuration information in the first partition includes:
and dividing a first partition from a Flash area of the network equipment, and recording the first version number and the network access configuration information in the first partition.
Optionally, the method for determining that the network device startup version fails includes:
and when the version of the network equipment cannot be guided through Boot, determining that the version of the network equipment fails to be started.
Optionally, when accessing the network by using the network access configuration information and failing to update the version stored in the network according to the first version number, the method further includes:
and the backup version stored in the network equipment is covered with the main version, and the network equipment is started by using the covered main version.
Optionally, the network device includes: a router or a switch.
By the method, when the main version of the network equipment has problems, the version stored in the network equipment (the version can be the main version and/or the standby version which fails to start) can be upgraded, and when the network equipment is started by using the upgraded version, the stored version is updated to the version of the network equipment when the network equipment is normally started, so that the network equipment can be directly started by the updated version, and the network equipment does not need to wait for the process of upgrading the version after being started.
An embodiment of the present disclosure further provides a network device, where the network device includes:
the acquisition module is used for acquiring the recorded first version number and network access configuration information from the first partition after the network equipment fails to start the version;
the processing module is used for accessing the network by using the network access configuration information and updating the version stored by the processing module according to the first version number;
the processing module is further configured to start the network device using the updated version;
the first version number is a version number corresponding to a version used when the network equipment is normally started.
Optionally, the network device further includes: and the storage module is used for recording a first version number and network access configuration information of a current running version of the network equipment when the version of the network equipment is normally started, and recording the first version number and the network access configuration information in a first partition.
Optionally, the obtaining module is further configured to determine that the version of the network device fails to be started when the version of the network device cannot be guided by Boot.
Optionally, the network device includes: a router or a switch.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
Fig. 1 is a flowchart illustrating a method for restoring a network device version according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the uboot mechanism, when a boot cannot guide the version to be started normally, a boot system provides an emergency recovery version page which can be accessed through a browser, a version file can be selected locally through the page to carry out version update, a damaged main version is repaired, and then the use of equipment is recovered.
In this mechanism, it is necessary to know the access address of the urgent recovery version page in advance, and to prepare the version to be updated locally, which are too cumbersome for the home user.
In the backup mechanism, a backup version can be stored in the device, and when boot is performed, if the version is found to be damaged and cannot be started, the backup version is booted.
However, in the backup mechanism, the backup version is generally a separate version and is not updated as the primary version is updated. Therefore, after the boot backup version is started, the started version is actually the old version, and span exists between the started version and the version used when the user version is damaged, which may cause the problems of incomplete user network function and the like.
Moreover, since the primary version is not repaired, a judgment process that the primary version damages the boot backup version is required to be performed every time the boot backup version is started, which results in poor user experience.
To solve the above technical problem, the present disclosure provides a method for restoring a network device version, as shown in fig. 1, the method including:
s101, after the version starting of the network equipment fails, acquiring a recorded first version number and network access configuration information from a first partition;
s102, accessing a network by using the network access configuration information and updating the version stored by the user according to the first version number;
s103, the network equipment is started by using the updated version.
The first version number is a version number corresponding to a version used when the network equipment is normally started.
In this embodiment, the network device may be a router or a switch, and since the router may be a home router, in a general case, after a user sets a home appliance to the router, the router may guide version startup in the router through Boot, so that the router operates.
In the normal operation of the network device, the network device may obtain a first version number of a version in which the network device is operating and network access configuration information when the network device accesses a network, where the network access configuration information includes: WAN port configuration, address information, username, password, etc.
The network device may store the acquired information after acquiring the first version number and the network access configuration information, wherein in a method of storing the information, the network device divides a first area from a Flash area of the network device and stores the information in the first area.
Because Flash is involved, in order to avoid incomplete information caused by power failure and the like in the process, an Md5 verification mechanism is added. Namely:
1. before writing the acquired information data into the first partition, the Md5 of the information data to be written is calculated and stored in a general file system.
2. After Md5 is created and saved, new data is written into the first partition.
3. Performing Md5 calculation on the first time when the equipment is started, and if the result is consistent with the stored Md5 result, indicating that the equipment is not damaged; if not, repeating the steps (1) and (2) to rewrite the first content.
Meanwhile, in the present embodiment, Boot also supports the following functions:
1. version information and network access configuration information of the first partition can be read.
2. The access configuration information can be used to associate with an external network.
3. The server-side equipment can be associated, and the version corresponding to the version number of the first partition is downloaded from the server-side equipment.
In step S101, after the network device is powered on, if the network device fails to Boot the version through Boot, the network device may determine that the Boot version fails.
At this time, the network device acquires the recorded first version number and network access configuration information from the first partition.
After obtaining the information recorded in the first partition, the network device may access the network using the network access configuration information, for example, Boot may restore an uplink of a server (e.g., a cloud) using the network access configuration information, may associate with the server after restoring the uplink, obtain update information corresponding to the first version number from the server using the first version number, and update a locally stored version using the update information, where the locally stored version may be a master version and/or a backup version.
After the version is updated, the network equipment can be started through the updated version.
In an embodiment, there may be a case where the network device cannot connect to the network through the network access configuration information, or the network device may be successfully connected to the network but cannot connect to the server, at this time, the network device may overwrite the master version with the backup version stored in the network device itself, and after the overwriting is completed, the network device may start the network device using the overwritten master version (i.e., the backup version before the overwriting), so that it is possible to avoid performing a complete recovery attempt due to damage of the master version at each time of starting due to direct booting of the backup version.
It can be seen from the above embodiments that, by storing the version number and the network access configuration information in the designated Flash partition, when the boot master version fails, an attempt is made to recover the uplink and update the version from the server, thereby avoiding the use problem of the user due to the span between the recovered version and the original version.
Based on the same concept as the method described above, an embodiment of the present disclosure further provides a network device, including:
the acquisition module is used for acquiring the recorded first version number and network access configuration information from the first partition after the network equipment fails to start the version;
the processing module is used for accessing the network by using the network access configuration information and updating the version stored by the processing module according to the first version number;
the processing module is further configured to start the network device using the updated version.
The first version number is a version number corresponding to a version used when the network equipment is normally started.
Meanwhile, the network device further includes: and the storage module is used for recording a first version number and network access configuration information of the current running version of the network equipment when the network equipment normally starts the version, and recording the first version number and the network access configuration information in a first partition.
The obtaining module is further configured to determine that the version of the network device fails to be started when the version of the network device cannot be guided by Boot.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (10)

1. A method for restoring a version of a network device, the method comprising:
when the network equipment fails to start the version, acquiring a recorded first version number and network access configuration information from a first partition;
accessing the network by using the network access configuration information and updating the version stored by the network access configuration information according to the first version number;
starting the network equipment by using the updated version;
the first version number is a version number corresponding to a version used when the network equipment is normally started.
2. The method of claim 1, further comprising:
when the network equipment normally starts the version, recording a first version number and network access configuration information of the current running version of the network equipment, and recording the first version number and the network access configuration information in a first partition.
3. The method of claim 2, wherein the recording the first version number and the network entry configuration information in the first partition comprises:
and dividing a first partition from a Flash area of the network equipment, and recording the first version number and the network access configuration information in the first partition.
4. The method of claim 1, wherein determining that the network device boot version failed comprises:
and when the version of the network equipment cannot be guided through Boot, determining that the version of the network equipment fails to be started.
5. The method of claim 1, wherein when accessing a network using the network access configuration information and updating the version stored in the network according to the first version number fails, the method further comprises:
and the backup version stored in the network equipment is covered with the main version, and the network equipment is started by using the covered main version.
6. The method of claim 1, wherein the network device comprises: a router or a switch.
7. A network device, characterized in that the network device comprises:
the acquisition module is used for acquiring the recorded first version number and network access configuration information from the first partition after the network equipment fails to start the version;
the processing module is used for accessing the network by using the network access configuration information and updating the version stored by the processing module according to the first version number;
the processing module is further configured to start the network device using the updated version;
the first version number is a version number corresponding to a version used when the network equipment is normally started.
8. The network device of claim 7, wherein the network device further comprises: a storage module for storing the data of the data,
the storage module is configured to record a first version number and network access configuration information of a version currently running in the network device when the version of the network device is normally started, and record the first version number and the network access configuration information in a first partition.
9. The network device of claim 7,
the obtaining module is further configured to determine that the version of the network device fails to be started when the version of the network device cannot be guided by Boot.
10. The network device of claim 7, wherein the network device comprises: a router or a switch.
CN202110877415.7A 2021-07-31 2021-07-31 Method for restoring network equipment version and network equipment Withdrawn CN113726554A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110877415.7A CN113726554A (en) 2021-07-31 2021-07-31 Method for restoring network equipment version and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110877415.7A CN113726554A (en) 2021-07-31 2021-07-31 Method for restoring network equipment version and network equipment

Publications (1)

Publication Number Publication Date
CN113726554A true CN113726554A (en) 2021-11-30

Family

ID=78674513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110877415.7A Withdrawn CN113726554A (en) 2021-07-31 2021-07-31 Method for restoring network equipment version and network equipment

Country Status (1)

Country Link
CN (1) CN113726554A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103079109A (en) * 2013-01-14 2013-05-01 广东九联科技股份有限公司 Method for counting upgrading conditions of set top box
CN105100144A (en) * 2014-05-05 2015-11-25 腾讯科技(深圳)有限公司 Application updating method and device
CN105740032A (en) * 2016-03-10 2016-07-06 汉柏科技有限公司 Network device system upgrading method and device
CN105955846A (en) * 2016-04-29 2016-09-21 乐视控股(北京)有限公司 Method and system for carrying out recovery after upgrade failure of mobile terminal on basis of network
CN108366064A (en) * 2018-02-11 2018-08-03 四川虹美智能科技有限公司 A kind of method and system of docking platform, a kind of electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103079109A (en) * 2013-01-14 2013-05-01 广东九联科技股份有限公司 Method for counting upgrading conditions of set top box
CN105100144A (en) * 2014-05-05 2015-11-25 腾讯科技(深圳)有限公司 Application updating method and device
CN105740032A (en) * 2016-03-10 2016-07-06 汉柏科技有限公司 Network device system upgrading method and device
CN105955846A (en) * 2016-04-29 2016-09-21 乐视控股(北京)有限公司 Method and system for carrying out recovery after upgrade failure of mobile terminal on basis of network
CN108366064A (en) * 2018-02-11 2018-08-03 四川虹美智能科技有限公司 A kind of method and system of docking platform, a kind of electronic equipment

Similar Documents

Publication Publication Date Title
US6820214B1 (en) Automated system recovery via backup and restoration of system state
EP2641175B1 (en) Networked recovery system
US7509544B2 (en) Data repair and synchronization method of dual flash read only memory
CN101014034A (en) U disk server-based cluster solving method
CN101436138A (en) Control device and control method for software upgrade and dynamic rolling back
JP2015508929A5 (en)
CN109582332B (en) System upgrading method and device for Internet camera
CN103970564A (en) Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions
CN108345464A (en) A kind of the startup method and Android vehicle device of Android system
CN105138433A (en) Backup method for UBIFS file system in embedded type Linux operating system
CN110209525B (en) Operating system restoration method and device
CN105867962A (en) System upgrading method and device
CN105868047A (en) Repairing method and device of data partition, and terminal
CN104699615A (en) System failure processing method and device
CN109375953B (en) Operating system starting method and device
CN111651304A (en) Software recovery method and device based on double-core intelligent electric meter and computer equipment
CN111338889A (en) Evidence obtaining method, device, equipment and storage medium supporting multiple operating systems
CN113190256B (en) Upgrading method, device and equipment
CN106156626A (en) A kind of method and apparatus of security of system upgrading
JPH10307726A (en) System for firmware recovery at time of start error
CN113726554A (en) Method for restoring network equipment version and network equipment
CN109086085A (en) A kind of os starting management method and device
CN115827069A (en) Starting control method, system and device for server mainboard
CN110795155B (en) System starting method and device, electronic equipment and storage medium
CN114995852A (en) Equipment upgrading method, equipment and computer readable storage medium

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20211130

WW01 Invention patent application withdrawn after publication