A method for quickly upgrading network equipment
By detecting the upgrade service notification message when the network device is powered on and directly entering the automatic upgrade process, the problem of a long upgrade process in the existing technology is solved, a method of quickly upgrading network equipment is realized, the upgrade time is shortened, and it is suitable for batches equipment.
Patent Information
- Application Number
- CN202111552003.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-12-17
AI Technical Summary
The upgrade process of existing network equipment requires waiting for the equipment to be fully started before starting the upgrade, which takes a long time and cannot meet the demand for fast delivery.
When the device is powered on, it detects the upgrade service notification message and directly enters the automatic upgrade process. It uses the broadcast message and unicast request mechanism to quickly obtain the IP address and upgrade file, so that the upgrade can be started without a complete startup.
It greatly shortens the waiting time to start the upgrade. It only takes 5-10 seconds from the time the device is powered on to the automatic detection of the upgrade command to start the upgrade. It is suitable for rapid upgrade of network equipment in batches.
Smart Images

Figure CN114237667B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network equipment upgrade in the communication field, and in particular relates to a method for rapidly upgrading network equipment. Background Art
[0002] In the production process of network equipment products, in order to cope with orders with short delivery cycles, it is often necessary to pre-produce a certain number of products with the basic software version. After receiving the specific shipping area, the software version of the shipping area can be upgraded and shipped directly. In most software upgrade processes, the network equipment is powered on and waits for the network equipment to start normally before starting the upgrade process. The time from powering on the network equipment to starting the upgrade process can be as short as 1 minute or as long as several minutes. Summary of the invention
[0003] The purpose of the present invention is to provide a method for quickly upgrading network equipment in view of the above-mentioned deficiencies in the prior art, which greatly shortens the waiting time for starting the upgrade and only takes 5-10 seconds to start the upgrade process.
[0004] To solve the above problems, the technical solution adopted by the present invention is:
[0005] A method for quickly upgrading a network device comprises the following steps:
[0006] S1. Connect the upgrade server and the network device to be upgraded to the same switching network. After the upgrade server selects the upgrade file, it starts to provide upgrade services to the outside world. The upgrade server broadcasts an upgrade service notification message at regular intervals.
[0007] S2. The network device to be upgraded is powered on. During the bootloader startup phase, it detects whether there is an upgrade service notification message in the network. If no upgrade service notification message is detected, it continues to start normally. If an upgrade service notification message is detected, it terminates the normal startup process and directly enters the automatic upgrade process. According to the source MAC address of the received upgrade service notification message, it unicasts a request for a networking IP address and an upgrade file name.
[0008] S3. The upgrade server replies and allocates a unique IP address and upgrade file name to the network device to be upgraded based on the IP address allocation.
[0009] S4. After receiving the reply, the network device to be upgraded configures its own network parameters, starts the TFTP service, and waits for the upgrade server to upload the upgrade file.
[0010] S5. After the upgrade server uploads the upgrade file, the network device to be upgraded verifies the validity of the file and automatically completes the version upgrade.
[0011] S6. After the network device to be upgraded is upgraded successfully, the upgrade indicator light is lit, indicating that the upgrade is successful.
[0012] A further technical solution is that, in step S1, the upgrade server and the network device to be upgraded are connected to the same switching network via a wired manner.
[0013] A further technical solution is that, in step S1, the upgrade server sends an upgrade service notification message in the form of a broadcast message every 1 second.
[0014] A further technical solution is that in step S2, the network device to be upgraded detects whether there is an upgrade service notification message in the network through a network port.
[0015] The beneficial effect of adopting the above technical solution is that when applied to network equipment products with wired network ports, it only takes 5-10 seconds from the power-on of the network equipment to the automatic detection of the upgrade command to start the upgrade, which greatly shortens the waiting time for the upgrade. There is no need to wait for the network equipment to be fully started before starting the upgrade process. In a batch upgrade network environment, hundreds of network devices can be quickly upgraded at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0017] The following embodiments of the present invention are described in further detail in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0018] The protocol message TMRP involved in the present invention works at the data link layer, and the TMRP Ethernet encapsulation structure is as follows:
[0019]
[0020] The TMRP Option structure is as follows:
[0021]
[0022] illustrate:
[0023] Except for the ADVERTISE message which is a broadcast message, all other TMRP messages are unicast messages.
[0024] The Ethernet protocol type of TMRP can be defined as any uncommon private protocol type, such as 0x0999.
[0025] The TMRP message contains a TMRP Header and zero or more TMRP options.
[0026] TMRP protocol message field definition
[0027] Code: occupies 1 byte. Indicates the type of data packet, such as ADVERTISE, CONF-REQ, CONF-ACK, etc. See the detailed list of TMRP Codes below.
[0028] Length: 1 byte. Refers to the length of the entire TMRP message, including Code, Length and Options fields.
[0029] TMRP Codes
[0030] (1) ADVERTISE
[0031] The code value of ADVERTISE is 0x01. The server continuously sends out broadcast packets. It contains a MAGIC option. After receiving the ADVERTISE message, the client must check the Ethernet type, TMRP code, and MAGIC option.
[0032] Allowed Option: MAGIC (required).
[0033] (2)CONF-REQ
[0034] The code value of CONF-REQ is 0x02. The client sends CONF-REQ to the server to request configuration information. It contains the DEV-IP option, which contains the IP address information that the client wants. However, it cannot guarantee that the server can allocate the address that the client wants. After sending CONF-REQ, the client waits for the server to respond with CONF-ACK.
[0035] Allowed option: DEV-IP option (optional).
[0036] (3)CONF-ACK
[0037] The Code value of CONF-ACK is 0x03. This message is the reply of the TMRP server to the CONF-REQ message of the client. The CONF-ACK message must contain the DEV-IP option, which contains the IP address information assigned by the server to the client. It must also contain the FILE-NAME option, the upgrade file name.
[0038] TMRP OPTION Types
[0039] (1) MAGIC
[0040] The type is 0x0001, occupies 8 bytes, of which 4 bytes have the value "TWIN".
[0041]
[0042] (2)DEV-IP (Device IP)
[0043] The type is 0x0002, including a 4-byte IP address and a 4-byte subnet mask.
[0044]
[0045]
[0046] (3)FILE-NAME (File Name)
[0047] The type is 0x0003, and the option value is a character string of the upgrade file name.
[0048]
[0049] like Figure 1 As shown, a method for quickly upgrading a network device comprises the following steps:
[0050] S1. Connect the upgrade server and the network device to be upgraded to the same switching network. After the upgrade server selects the upgrade file, it starts to provide upgrade services to the outside. The upgrade server sends an upgrade service notification message (ADVERTISE message) to the outside in the form of a broadcast message every 1 second. Preferably, the upgrade server and the network device to be upgraded are connected to the same switching network via a wired method.
[0051] S2. The network device to be upgraded is powered on. During the bootloader startup phase, the network device to be upgraded detects whether there is an upgrade service notification message (ADVERTISE message) in the network through the network port. If no upgrade service notification message is detected, the normal startup process continues. If an upgrade service notification message is detected, the normal startup process is terminated and the automatic upgrade process is directly entered. According to the source MAC address of the received upgrade service notification message, the CONF-REQ message is unicast to the upgrade server to request a networking IP address and upgrade file name.
[0052] S3. The upgrade server replies with a CONF-ACK message based on the IP address allocation, and allocates a network-unique IP address and upgrade file name to the network device to be upgraded.
[0053] S4. After receiving the reply CONF-ACK message, the network device to be upgraded configures its own network parameters, starts the TFTP service, and waits for the upgrade server to upload the upgrade file.
[0054] S5. After the upgrade server uploads the upgrade file, the network device to be upgraded verifies the validity of the file and automatically completes the version upgrade.
[0055] S6. After the network device to be upgraded is upgraded successfully, the upgrade indicator light is lit, indicating that the upgrade is successful.
[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for rapidly upgrading network equipment, characterized in that: The following steps are involved: S1. Connect the upgrade server and the network device to be upgraded to the same switching network. After the upgrade server selects the upgrade file, it starts to provide upgrade services to the outside world. The upgrade server broadcasts an upgrade service notification message at regular intervals. S2. The network device to be upgraded is powered on. During the bootloader startup phase, it detects whether there is an upgrade service notification message in the network. If no upgrade service notification message is detected, it continues to start normally. If an upgrade service notification message is detected, it terminates the normal startup process and directly enters the automatic upgrade process. According to the source MAC address of the received upgrade service notification message, it unicasts a request for a networking IP address and an upgrade file name. S3. The upgrade server replies and allocates a unique IP address and upgrade file name to the network device to be upgraded based on the IP address allocation. S4. After receiving the reply, the network device to be upgraded configures its own network parameters, starts the TFTP service, and waits for the upgrade server to upload the upgrade file. S5. After the upgrade server uploads the upgrade file, the network device to be upgraded verifies the validity of the file and automatically completes the version upgrade. S6. After the network device to be upgraded is upgraded successfully, the upgrade indicator light is lit, indicating that the upgrade is successful.
2. A method for rapidly upgrading network equipment according to claim 1, characterized in that: In step S1, the upgrade server and the network device to be upgraded are connected to the same switching network via a wired manner.
3. A method for rapidly upgrading network equipment according to claim 1, characterized in that: In step S1, the upgrade server sends an upgrade service notification message in the form of a broadcast message every 1 second.
4. A method for rapidly upgrading network equipment according to claim 1, characterized in that: In step S2, the network device to be upgraded detects whether there is an upgrade service notification message in the network through a network port.
