CN107645404B - Method and device for sending and receiving repair packet and fault repair system - Google Patents

Method and device for sending and receiving repair packet and fault repair system Download PDF

Info

Publication number
CN107645404B
CN107645404B CN201610588640.8A CN201610588640A CN107645404B CN 107645404 B CN107645404 B CN 107645404B CN 201610588640 A CN201610588640 A CN 201610588640A CN 107645404 B CN107645404 B CN 107645404B
Authority
CN
China
Prior art keywords
address
fault
new
equipment
embedded
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
CN201610588640.8A
Other languages
Chinese (zh)
Other versions
CN107645404A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201610588640.8A priority Critical patent/CN107645404B/en
Priority to PCT/CN2017/089366 priority patent/WO2018014695A1/en
Publication of CN107645404A publication Critical patent/CN107645404A/en
Application granted granted Critical
Publication of CN107645404B publication Critical patent/CN107645404B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming

Abstract

The embodiment of the invention discloses a method and a device for sending and receiving a repair packet and a fault repair system, wherein the sending method comprises the following steps: the server receives equipment information which is sent by at least one fault embedded equipment and comprises an original IP address of the fault embedded equipment; acquiring a new IP address allocated to each fault embedded device; sending a modification instruction to each fault embedded device so that each fault embedded device can directly connect with the server by using the new IP address after obtaining the new IP address aiming at the fault embedded device from the modification instruction; receiving repair requests sent by all fault embedded devices; and sending a repair packet corresponding to the repair request to all the fault embedded devices so that all the fault embedded devices complete fault repair. The embodiment of the invention is applied to realize the quick direct connection between the fault embedded equipment and the server, and further realize the quick repair of the fault embedded equipment.

Description

Method and device for sending and receiving repair packet and fault repair system
Technical Field
The invention relates to the technical field of equipment fault processing, in particular to a method and a device for sending and receiving a repair packet and a fault repair system.
Background
After the embedded device fails, if the failure is the damage of the main program, the failed embedded device needs to be repaired. The current common repair methods are: the fault embedded device applies for downloading a repair package to a server through a U-Boot (universal Boot loader) to complete repair, wherein the U-Boot is a bootstrap of the embedded device, and the server may be a TFTP (simple File Transfer Protocol).
In this case, it is required that the failed embedded device must be able to connect directly to the server, i.e., the failed embedded device is required to be in the same network segment as the server. At present, a manager modifies the IP address of each faulty embedded device one by one into the IP address in the same network segment as the server through the serial port of each faulty embedded device, so as to directly connect the faulty embedded device and the server, and further complete fault recovery of the faulty embedded device.
In the prior art, the IP addresses of the fault embedded devices are modified one by one in a manual mode. Therefore, when a large number of embedded devices fail, it takes a long time to modify the IP addresses of all the failed embedded devices, so that the direct connection between the failed embedded devices and the server cannot be realized in time, and further the failure of the failed embedded devices cannot be repaired in time.
Disclosure of Invention
The embodiment of the invention discloses a method and a device for sending and receiving a repair packet and a fault repair system, which are used for realizing the quick direct connection of fault embedded equipment and a server and further realizing the quick repair of the fault embedded equipment. The specific scheme is as follows:
in one aspect, an embodiment of the present invention provides a method for sending a repair packet, where the method includes:
receiving equipment information sent by at least one fault embedded equipment, wherein the equipment information comprises an original IP address of the fault embedded equipment;
acquiring a new IP address allocated to each fault embedded device;
sending a modification instruction to each fault embedded device so that each fault embedded device obtains a new IP address for itself from the modification instruction and then directly connects the server by using the new IP address, wherein the modification instruction carries the allocated new IP address;
receiving repair requests sent by all fault embedded devices;
and sending a repair packet corresponding to the repair request to all the fault embedded devices so as to complete fault repair of all the fault embedded devices.
Optionally, after receiving the device information sent by the at least one failed embedded device, the method further includes:
determining all first fault embedded devices from the at least one fault embedded device according to the device information, wherein the first fault embedded devices are fault embedded devices of which the original IP addresses and the server are not in the same network segment;
the obtaining of the new IP address allocated to each failed embedded device includes:
a new IP address assigned to each first failed embedded device is obtained.
Optionally, before the sending the modification instruction to each faulty embedded device, the method further includes:
judging whether the corresponding fault embedded equipment supports multicast or not according to the equipment information;
when the corresponding fault embedded device supports multi-broadcasting, the sending of the modification instruction to each fault embedded device is as follows: multicasting a modification instruction of the corresponding fault embedded equipment;
when the corresponding fault embedded device does not support multi-broadcast, the sending of the modification instruction to each fault embedded device is as follows: and broadcasting the modification instruction of the corresponding fault embedded equipment.
Optionally, the device information further includes a MAC address of the faulty embedded device;
the sending of the modification instruction to each faulty embedded device includes:
respectively sending modification instructions carrying the MAC address of each fault embedded device and the new IP address correspondingly distributed to each fault embedded device;
the new IP address for itself is: a new IP address for its own MAC address.
Optionally, the device information further includes a MAC address of the faulty embedded device;
before the receiving of the repair requests sent by all the failed embedded devices, the method further includes:
receiving ARP information broadcasted by the at least one fault embedded device;
and storing the corresponding relation between the MAC address of the corresponding fault embedded equipment carried in the ARP information and the new IP address.
In one aspect, an embodiment of the present invention provides a repair packet receiving method, where the method includes:
sending equipment information to a server, wherein the equipment information comprises an original IP address of the fault embedded equipment;
receiving a modification instruction sent by the server, wherein the modification instruction carries the allocated new IP address, and the new IP address is an address allocated by the server;
modifying the original IP address of the fault embedded equipment into a corresponding new IP address so as to directly connect the server by using the new IP address;
sending a repair request to the server;
and receiving a repair packet which is sent by the server and corresponds to the repair request, and completing fault repair.
Optionally, the modification instruction further carries an MAC address of the faulty embedded device;
the modifying the original IP address of the fault embedded device to the corresponding new IP address comprises:
and modifying the original IP address of the fault embedded equipment into a new IP address corresponding to the MAC address of the fault embedded equipment.
Optionally, the modification instruction further carries an MAC address of the faulty embedded device;
before the sending the repair request to the server, the method further comprises:
and broadcasting ARP information carrying the corresponding relation between the MAC address of the fault embedded equipment and the new IP address so that the server stores the corresponding relation between the MAC address of the fault embedded equipment and the new IP address after receiving the ARP information.
In one aspect, an embodiment of the present invention provides a repair packet sending apparatus, where the apparatus includes: the device comprises a first receiving module, an obtaining module, a first sending module, a second receiving module and a second sending module;
the first receiving module is used for receiving equipment information sent by at least one fault embedded equipment, wherein the equipment information comprises an original IP address of the fault embedded equipment;
the obtaining module is used for obtaining a new IP address distributed to each fault embedded device;
the first sending module is used for sending a modification instruction to each fault embedded device so that each fault embedded device can directly connect with the server by using a new IP address after obtaining the new IP address aiming at the fault embedded device from the modification instruction, wherein the modification instruction carries the allocated new IP address;
the second receiving module is used for receiving the repair requests sent by all the fault embedded devices;
and the second sending module is used for sending the repair packet corresponding to the repair request to all the fault embedded devices so as to complete fault repair of all the fault embedded devices.
Optionally, the apparatus further comprises a determining module;
the determining module is configured to determine, after the receiving of the device information sent by the at least one faulty embedded device, all first faulty embedded devices from the at least one faulty embedded device according to the device information, where the first faulty embedded device is a faulty embedded device whose original IP address and the server are not in the same network segment;
the obtaining module is specifically configured to obtain a new IP address allocated to each first failed embedded device.
Optionally, the apparatus further includes a determining module;
the judging module is used for judging whether the corresponding fault embedded equipment supports multicast or not according to the equipment information before the modification instruction is sent to each fault embedded equipment;
the first sending module is specifically used for multicasting a modification instruction of the corresponding fault embedded device when the corresponding fault embedded device supports multicast; and when the corresponding fault embedded equipment does not support multi-broadcasting, broadcasting a modification instruction of the corresponding fault embedded equipment.
Optionally, the device information further includes a MAC address of the faulty embedded device;
the first sending module is specifically configured to send a modification instruction carrying the MAC address of each faulty embedded device and the new IP address allocated correspondingly to each faulty embedded device;
the new IP address for itself is: a new IP address for its own MAC address.
Optionally, the device information further includes a MAC address of the faulty embedded device;
the device also comprises a third receiving module and a storage module;
the third receiving module is used for receiving the ARP information broadcasted by the at least one fault embedded device;
and the storage module is used for storing the corresponding relation between the MAC address of the corresponding fault embedded equipment carried in the ARP information and the new IP address.
In one aspect, an embodiment of the present invention provides a repair packet receiving apparatus, where the apparatus includes: the system comprises a third sending module, a fourth receiving module, a modification module, a fourth sending module and a fifth receiving module;
the third sending module is used for sending equipment information to the server, wherein the equipment information comprises an original IP address of the fault embedded equipment;
the fourth receiving module is configured to receive a modification instruction sent by the server, where the modification instruction carries the assigned new IP address, and the new IP address is an address assigned by the server;
the modification module is used for modifying the original IP address of the fault embedded equipment into a corresponding new IP address so as to directly connect the new IP address with the server;
the fourth sending module is configured to send a repair request to the server;
and the fifth receiving module is configured to receive a repair packet corresponding to the repair request sent by the server, and complete fault repair.
Optionally, the modification instruction further carries an MAC address of the faulty embedded device;
the modification module is specifically configured to modify the original IP address of the failed embedded device to be a new IP address corresponding to the MAC address of the failed embedded device.
Optionally, the modification instruction further carries an MAC address of the faulty embedded device;
the apparatus also includes a broadcast module;
the broadcast module is used for broadcasting Address Resolution Protocol (ARP) information carrying the corresponding relation between the MAC address of the fault embedded equipment and the new IP address before the repair request is sent to the server, so that the server stores the corresponding relation between the MAC address of the fault embedded equipment and the new IP address after receiving the ARP information.
In another aspect, an embodiment of the present invention provides a fault repairing system, where the system includes:
the fault embedded equipment is used for sending equipment information to the server, wherein the equipment information comprises an original IP address of the fault embedded equipment;
the server is used for receiving the equipment information sent by the fault embedded equipment and acquiring a new IP address distributed to each fault embedded equipment; sending a modification instruction to each fault embedded device, wherein the modification instruction carries the allocated new IP address;
the fault embedded equipment is also used for receiving a modification instruction sent by the server; modifying the original IP address of the fault embedded equipment into a corresponding new IP address so as to directly connect the server by using the new IP address; and sending a repair request to the server;
the server is also used for receiving repair requests sent by all the fault embedded devices; sending a repair packet corresponding to the repair request to all the fault embedded devices;
and the fault embedded equipment is also used for receiving a repair packet which is sent by the server and corresponds to the repair request, and completing fault repair.
In the scheme, a server receives equipment information which is sent by at least one fault embedded equipment and comprises an original IP address of the fault embedded equipment; acquiring a new IP address allocated to each fault embedded device; sending a modification instruction to each fault embedded device so that each fault embedded device can directly connect with the server by using the new IP address after obtaining the new IP address aiming at the fault embedded device from the modification instruction; receiving repair requests sent by all fault embedded devices; and sending a repair packet corresponding to the repair request to all the fault embedded devices so that all the fault embedded devices complete fault repair. Therefore, the server can allocate new IP addresses to the fault embedded devices in the same network segment and different network segments, so that each fault embedded device can directly connect with the server by using the new IP address after obtaining the new IP address for the fault embedded device from the modification instruction, the IP addresses of the fault embedded devices are not required to be modified one by one manually, the fault embedded devices are quickly and directly connected with the server, and the fault of the fault embedded devices is further quickly repaired. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for sending a repair packet according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a repair packet receiving method according to an embodiment of the present invention;
fig. 3 is a schematic view of an interaction flow for performing fault repair by applying the repair packet sending and receiving method provided by the embodiment of the present invention;
fig. 4 is a schematic structural diagram of a repair packet sending apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a repair packet receiving apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a fault repairing system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a method and a device for sending and receiving a repair packet and a fault repair system, which are used for realizing the quick direct connection of fault embedded equipment and a server and further realizing the quick repair of the fault embedded equipment.
First, a method for sending a repair packet according to an embodiment of the present invention is described below, where the method for sending a repair packet is based on a fault repair system.
As shown in fig. 1, the method may include the steps of:
s101: receiving equipment information sent by at least one fault embedded equipment, wherein the equipment information comprises an original IP address of the fault embedded equipment;
it can be understood that, after the embedded device is powered on, the embedded device detects that a failure occurs in itself through a U-Boot (universal Boot loader), and broadcasts device information of itself through the U-Boot at regular or irregular time if the main program is damaged. The server may receive device information broadcast by at least one failed embedded device. Further, the server may present the received device information in a display interface. The U-boot is a single-threaded loop program, which can be used as a boot program of the embedded device. The server may be a TFTP server and may provide repair packets for the failed embedded device.
S102: acquiring a new IP address allocated to each fault embedded device;
it should be noted that the server obtains a new IP address assigned to each failed embedded device, where the new IP address can be reassigned by the user for each failed embedded device. Or the server may reallocate it for each failed embedded device.
S103: sending a modification instruction to each fault embedded device so that each fault embedded device obtains a new IP address for itself from the modification instruction and then directly connects the new IP address with a server, wherein the modification instruction carries the allocated new IP address;
the server can send a modification instruction to each fault embedded device through the prior art, so that each fault embedded device obtains a new IP address for itself from one or more modification instructions through the U-boot, modifies the original IP address of itself into the obtained new IP address for itself through the U-boot, and is directly connected with the server through the new IP address.
S104: receiving repair requests sent by all fault embedded devices;
s105: and sending a repair packet corresponding to the repair request to all the fault embedded equipment so as to complete fault repair of all the fault embedded equipment.
The repair request can carry information such as the device model of the corresponding fault embedded device, so that the server can send a corresponding repair packet to the fault embedded device according to the device model of the fault embedded device.
By applying the embodiment of the invention, the server receives the equipment information which is sent by at least one fault embedded equipment and comprises the original IP address of the fault embedded equipment; acquiring a new IP address allocated to each fault embedded device; sending a modification instruction to each fault embedded device so that each fault embedded device can directly connect with the server by using the new IP address after obtaining the new IP address aiming at the fault embedded device from the modification instruction; receiving repair requests sent by all fault embedded devices; and sending a repair packet corresponding to the repair request to all the fault embedded devices so that all the fault embedded devices complete fault repair. Therefore, the server can allocate new IP addresses to the fault embedded devices in the same network segment and different network segments, so that each fault embedded device can directly connect with the server by using the new IP address after obtaining the new IP address for the fault embedded device from the modification instruction, the IP addresses of the fault embedded devices are not required to be modified one by one manually, the fault embedded devices are quickly and directly connected with the server, and the fault of the fault embedded devices is further quickly repaired.
In addition, the embodiment of the invention can be used for aiming at the fault embedded equipment in the same network segment and also can be used for aiming at the fault embedded equipment in different network segments. By applying the embodiment of the invention, only one server exists in different network segments, so that the embodiment of the invention can be used for providing the repair packet for the fault embedded equipment without deploying the server in each network segment.
In a specific implementation manner, some fault embedded devices are in the same network segment with the server, and can be directly connected with the server, so that the modification of an IP address is not required. In order to save resources of the server, an IP address may be allocated only to a failed embedded device that is on a different network segment from the server. After receiving the device information sent by the at least one failed embedded device, the method for sending the repair packet according to the embodiment of the present invention may further include:
determining all first fault embedded devices from the at least one fault embedded device according to the device information, wherein the first fault embedded devices are fault embedded devices of which the original IP addresses and the server are not in the same network segment;
the obtaining of the new IP address allocated to each failed embedded device includes:
a new IP address assigned to each first failed embedded device is obtained.
The server can determine all first fault embedded devices of which the original IP addresses are not in the same network segment with the server from the at least one fault embedded device according to the original IP addresses of the fault embedded devices carried in the device information and the IP addresses of the first fault embedded devices, and perform subsequent processes. In addition, a user can check the device information sent by at least one failed embedded device on a display interface of the server, and the step of determining all first failed embedded devices which are not in the same network segment with the server can be understood and input to the server after being screened on the interface by the user.
In addition, when the fault embedded device and the server are in the same network segment, the server can be directly connected with the fault embedded device. Subsequently, the server can send the corresponding repair packet to the fault embedded device through the TFTP protocol, so that the fault embedded device completes fault repair through the U-boot. The device information may include information such as a device model of the failed embedded device, so that the server may send a repair packet matching the device model for the failed embedded device.
In one specific implementation, the server does not know the path information sent to each failed embedded device, and sends the modification instruction in a broadcast manner. Since other hosts (including but not limited to non-failing embedded devices) are not present in the network, the modification instructions may be sent in a multicast fashion in order to reduce the processing burden on such hosts. The burden of other hosts outside the multicast group on the network is effectively reduced, and the data sent to the multicast group cannot be transmitted to the drivers of the hosts to be processed, so that the unnecessary waste of resources is avoided. The device information may also carry information on whether the corresponding failed embedded device supports multicast, and before the modification instruction is sent to each failed embedded device, the method for sending the repair packet provided by the embodiment of the present invention may further include:
judging whether the corresponding fault embedded equipment supports multicast or not according to the equipment information;
when the corresponding fault embedded device supports multi-broadcasting, the sending of the modification instruction to each fault embedded device is as follows: multicasting a modification instruction of the corresponding fault embedded equipment;
when the corresponding fault embedded device does not support multi-broadcast, the sending of the modification instruction to each fault embedded device is as follows: and broadcasting the modification instruction of the corresponding fault embedded equipment.
For example, when the failed embedded device includes A, B, C, D and E five devices, wherein, according to the device information, it can be known that A, B and C support multicast and D and E do not support multicast. Respectively multicasting a modification instruction for A, a modification instruction for B and a modification instruction for C; the modification instruction for D and the modification instruction for E are broadcast separately. For A, B and C, it will receive the modification instruction for a, the modification instruction for B, the modification instruction for C, the modification instruction for D, and the modification instruction for E, and select the modification instruction carrying the new IP address for itself. For D and E, it only receives the modification instruction for D and the modification instruction for E, and selects the modification instruction carrying the new IP address for itself.
In a specific implementation manner, the device information may further include a MAC address of the failed embedded device;
the sending of the modification instruction to each faulty embedded device includes:
respectively sending modification instructions carrying the MAC address of each fault embedded device and the new IP address correspondingly distributed to each fault embedded device;
the new IP address for itself is: a new IP address for its own MAC address.
In order to better ensure that the server allocates a new IP address for each failed embedded device, ensure that each failed embedded device determines a new IP address for itself, and avoid occupying IP addresses of other embedded devices, the device information may further include an MAC address of the failed embedded device. And the sent modification instruction carries the MAC address of each fault embedded device and the corresponding allocated new IP address, so that each fault embedded device can screen out the new IP address aiming at the MAC address of the fault embedded device through the U-boot.
Of course, it can be understood that the device information may also carry other information that can uniquely identify the faulty embedded device, and the embodiment of the present invention does not limit this type of information.
In a specific implementation manner, the device information may further include a MAC address of the failed embedded device;
before the receiving of the repair requests sent by all the failed embedded devices, the method for sending the repair packet provided by the embodiment of the present invention may further include:
receiving ARP information broadcasted by the at least one fault embedded device;
and storing the corresponding relation between the MAC address of the corresponding fault embedded equipment carried in the ARP information and the new IP address.
It can be understood that after the failed embedded device modifies the IP Address, the correspondence between the new IP Address and the MAC Address of the failed embedded device is not stored in other hosts in the network (including but not limited to the server and each switch device), for example, the correspondence between the new IP Address and the MAC Address of the failed embedded device is not stored in an Address Resolution Protocol (ARP) table, and the U-boot cannot respond to the ARP requests of the other hosts. In order to avoid that subsequent fault embedded equipment cannot perform information interaction with other hosts, after the fault embedded equipment modifies the IP address of the fault embedded equipment, ARP information can be actively broadcasted through the U-boot, so that the other hosts can increase and store the corresponding relation between the new IP address and the MAC address of the fault embedded equipment. After the server stores the corresponding relationship, the server can send the corresponding repair packet to the fault embedded device, so that the fault embedded device can complete fault repair.
On the other hand, an embodiment of the present invention provides a method for receiving a repair packet, where the method for receiving a repair packet is based on a fault repair system, and as shown in fig. 2, the method may include the following steps:
s201: sending equipment information to a server, wherein the equipment information comprises an original IP address of the fault embedded equipment;
after the embedded device is powered on, the U-boot detects that the embedded device has a fault, if the main program is damaged, the embedded device broadcasts own device information at regular time or irregular time.
S202: receiving a modification instruction sent by the server, wherein the modification instruction carries the allocated new IP address, and the new IP address is an address allocated by the server;
the modification instructions are sent by the server for each failed embedded device. When a plurality of fault embedded devices are available, the fault embedded devices receive the modification instructions through the U-boot, then screen out the modification instructions for the fault embedded devices through the U-boot, and the modification instructions for the fault embedded devices carry the new IP addresses distributed by the server and for the fault embedded devices.
S203: modifying the original IP address of the fault embedded equipment into a corresponding new IP address so as to directly connect the server by using the new IP address;
and the fault embedded equipment modifies the original IP address into a corresponding new IP address through the U-boot and is directly connected with the server through the new IP address.
S204: sending a repair request to the server;
s205: and receiving a repair packet which is sent by the server and corresponds to the repair request, and completing fault repair.
And the fault embedded equipment sends a repair request to the server through the U-boot, and receives a repair packet which is sent by the server and corresponds to the repair request through the U-boot to complete fault repair.
By applying the embodiment of the invention, after the embedded equipment fails, the IP address is modified, the modified new IP address is directly connected with the server, the repair request is sent to the server, and the repair packet which is sent by the server and corresponds to the repair request is received to complete fault repair. The quick direct connection between the fault embedded equipment and the server is realized, and the quick repair of the fault embedded equipment is further realized.
In a specific implementation manner, in order to better ensure that the server allocates a new IP address for each failed embedded device, it is ensured that each failed embedded device determines a new IP address for itself, and the IP addresses of other embedded devices are prevented from being occupied. The modification instruction also carries the MAC address of the fault embedded equipment;
the modifying the original IP address of the fault embedded device to the corresponding new IP address comprises:
and modifying the original IP address of the fault embedded equipment into a new IP address corresponding to the MAC address of the fault embedded equipment.
In a specific implementation manner, the modification instruction also carries an MAC address of the faulty embedded device;
before sending the repair request to the server, the method for receiving the repair packet according to the embodiment of the present invention may further include:
and broadcasting ARP information carrying the corresponding relation between the MAC address of the fault embedded equipment and the new IP address so that the server stores the corresponding relation between the MAC address of the fault embedded equipment and the new IP address after receiving the ARP information.
It can be understood that, after determining a new IP address for its own MAC address from the modification instruction through the U-boot, the failed embedded device modifies the original IP address to the new IP address through the U-boot, and actively broadcasts the ARP information, so that other hosts including the server receive the ARP information and then store the corresponding relationship between the MAC address of the failed embedded device and the new IP address, so that the failed embedded device can perform subsequent information interaction with other hosts. The server can send the repair packet corresponding to the fault embedded device according to the corresponding relation, so that the fault embedded device completes fault repair. The device information broadcast by the fault embedded device can also carry information such as a device model, so that the server sends a corresponding repair packet to the fault embedded device according to the device model.
Specifically, as shown in fig. 3, it is a schematic diagram of interaction between a server and a failed embedded device:
if the fault embedded equipment has faults, such as the main program is damaged, the equipment information of the fault embedded equipment is broadcasted;
the TFTP server receives equipment information broadcasted by the fault embedded equipment;
the TFTP server can display each received display message and obtain a new IP address allocated to each failed embedded device;
the TFTP server broadcasts or multicasts a modification instruction carrying the obtained new IP address;
each fault embedded device receives a modification instruction, screens out a new IP address for the fault embedded device from the modification instruction through U-boot, and modifies the IP address;
each fault embedded device broadcasts ARP information which carries the corresponding relation between the MAC address of the fault embedded device and the new IP address;
the TFTP server receives ARP information broadcasted by each fault embedded device, stores the corresponding relation between the MAC address of each fault embedded device carried in the ARP information and the new IP address, and is directly connected with each fault embedded device;
after each fault embedded device is directly connected with the TFTP server, a repair request is sent to the TFTP server;
the TFTP server receives repair requests sent by all fault embedded devices; the repair request can carry information such as the equipment model of the corresponding fault embedded equipment;
and the TFTP server sends a corresponding repair packet for each fault embedded device so that each fault embedded device completes fault repair.
After the fault repair of each fault embedded device is completed, the fault repair success information can be fed back to the TFTP server.
Corresponding to the foregoing method embodiment, an embodiment of the present invention provides a repair packet sending apparatus, and as shown in fig. 4, the apparatus may include: a first receiving module 401, an obtaining module 402, a first sending module 403, a second receiving module 404 and a second sending module 405;
the first receiving module 401 is configured to receive device information sent by at least one failed embedded device, where the device information includes an original IP address of the failed embedded device;
the obtaining module 402 is configured to obtain a new IP address allocated to each failed embedded device;
the first sending module 403 is configured to send a modification instruction to each faulty embedded device, so that each faulty embedded device obtains a new IP address for itself from the modification instruction and then directly connects the server with the new IP address, where the modification instruction carries the allocated new IP address;
the second receiving module 404 is configured to receive repair requests sent by all failed embedded devices;
the second sending module 405 is configured to send a repair packet corresponding to the repair request to all the faulty embedded devices, so that all the faulty embedded devices complete fault repair.
By applying the embodiment of the invention, the server receives the equipment information which is sent by at least one fault embedded equipment and comprises the original IP address of the fault embedded equipment; acquiring a new IP address allocated to each fault embedded device; sending a modification instruction to each fault embedded device so that each fault embedded device can directly connect with the server by using the new IP address after obtaining the new IP address aiming at the fault embedded device from the modification instruction; receiving repair requests sent by all fault embedded devices; and sending a repair packet corresponding to the repair request to all the fault embedded devices so that all the fault embedded devices complete fault repair. Therefore, the server can allocate new IP addresses to the fault embedded devices in the same network segment and different network segments, so that each fault embedded device can directly connect with the server by using the new IP address after obtaining the new IP address for the fault embedded device from the modification instruction, the IP addresses of the fault embedded devices are not required to be modified one by one manually, the fault embedded devices are quickly and directly connected with the server, and the fault of the fault embedded devices is further quickly repaired.
In a specific implementation manner, the device further comprises a determining module;
the determining module is configured to determine, after the receiving of the device information sent by the at least one faulty embedded device, all first faulty embedded devices from the at least one faulty embedded device according to the device information, where the first faulty embedded device is a faulty embedded device whose original IP address and the server are not in the same network segment;
the obtaining module 402 is specifically configured to obtain a new IP address allocated to each first failed embedded device.
In a specific implementation manner, the device further comprises a judging module;
the judging module is used for judging whether the corresponding fault embedded equipment supports multicast or not according to the equipment information before the modification instruction is sent to each fault embedded equipment;
the first sending module 403 is specifically configured to multicast a modification instruction of the corresponding failed embedded device when the corresponding failed embedded device supports multicast; and when the corresponding fault embedded equipment does not support multi-broadcasting, broadcasting a modification instruction of the corresponding fault embedded equipment.
In a specific implementation manner, the device information further includes a MAC address of the faulty embedded device;
the first sending module 403 is specifically configured to send a modification instruction carrying the MAC address of each faulty embedded device and the new IP address allocated correspondingly to each faulty embedded device;
the new IP address for itself is: a new IP address for its own MAC address.
In a specific implementation manner, the device information further includes a MAC address of the faulty embedded device;
the device also comprises a third receiving module and a storage module;
the third receiving module is used for receiving the ARP information broadcasted by the at least one fault embedded device;
and the storage module is used for storing the corresponding relation between the MAC address of the corresponding fault embedded equipment carried in the ARP information and the new IP address.
On the other hand, based on the foregoing method embodiment, an embodiment of the present invention provides a repair packet receiving apparatus, as shown in fig. 5, where the apparatus may include: a third sending module 501, a fourth receiving module 502, a modification module 503, a fourth sending module 504 and a fifth receiving module 505;
the third sending module 501 is configured to send device information to a server, where the device information includes an original IP address of a failed embedded device;
the fourth receiving module 502 is configured to receive a modification instruction sent by the server, where the modification instruction carries the assigned new IP address, and the new IP address is an address assigned by the server;
the modifying module 503 is configured to modify the original IP address of the failed embedded device to be a corresponding new IP address, so as to use the new IP address to directly connect with the server;
the fourth sending module 504 is configured to send a repair request to the server;
the fifth receiving module 505 is configured to receive a repair packet sent by the server and corresponding to the repair request, so as to complete fault repair.
By applying the embodiment of the invention, after the embedded equipment fails, the IP address is modified, the modified new IP address is directly connected with the server, the repair request is sent to the server, and the repair packet which is sent by the server and corresponds to the repair request is received to complete fault repair. The quick direct connection between the fault embedded equipment and the server is realized, and the quick repair of the fault embedded equipment is further realized.
In a specific implementation manner, the modification instruction further carries an MAC address of the faulty embedded device;
the modifying module 503 is specifically configured to modify the original IP address of the failed embedded device to be a new IP address corresponding to the MAC address of the failed embedded device.
In a specific implementation manner, the modification instruction further carries an MAC address of the faulty embedded device;
the apparatus also includes a broadcast module;
the broadcast module is used for broadcasting Address Resolution Protocol (ARP) information carrying the corresponding relation between the MAC address of the fault embedded equipment and the new IP address before the repair request is sent to the server, so that the server stores the corresponding relation between the MAC address of the fault embedded equipment and the new IP address after receiving the ARP information.
An embodiment of the present invention provides a fault repairing system, as shown in fig. 6, where the system includes:
the fault embedded device 601 is used for sending device information to the server, wherein the device information comprises an original IP address of the fault embedded device;
the server 602 is configured to receive device information sent by a faulty embedded device, and obtain a new IP address allocated to each faulty embedded device; sending a modification instruction to each fault embedded device, wherein the modification instruction carries the allocated new IP address;
the fault embedded device 601 is further configured to receive a modification instruction sent by the server; modifying the original IP address of the fault embedded equipment into a corresponding new IP address so as to directly connect the server by using the new IP address; and sending a repair request to the server;
the server 602 is further configured to receive repair requests sent by all failed embedded devices; sending a repair packet corresponding to the repair request to all the fault embedded devices;
the fault embedded device 601 is further configured to receive a repair packet corresponding to the repair request sent by the server, and complete fault repair.
For the system/apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. A repair packet transmission method, comprising:
receiving equipment information sent by at least one fault embedded equipment, wherein the equipment information comprises an original IP address of the fault embedded equipment and information whether the fault embedded equipment supports multicast;
acquiring a new IP address allocated to each fault embedded device;
judging whether the corresponding fault embedded equipment supports multicast or not according to the equipment information;
when the corresponding fault embedded equipment supports multicast, multicasting a modification instruction of the corresponding fault embedded equipment so that each fault embedded equipment supporting multicast directly connects with the server by using a new IP address after obtaining the new IP address aiming at the fault embedded equipment from the modification instruction corresponding to the fault embedded equipment, wherein the modification instruction corresponding to each fault embedded equipment supporting multicast carries the new IP address distributed for the fault embedded equipment;
when the corresponding fault embedded equipment does not support multicast, broadcasting a modification instruction of the corresponding fault embedded equipment so that each fault embedded equipment which does not support multicast obtains a new IP address for the fault embedded equipment from the modification instruction corresponding to the fault embedded equipment, and then directly connecting the new IP address with the server, wherein the modification instruction corresponding to each fault embedded equipment which does not support multicast carries the new IP address distributed for the fault embedded equipment;
receiving ARP information broadcasted by the at least one fault embedded device, and storing the corresponding relation between the MAC address of the corresponding fault embedded device carried in the ARP information and the new IP address;
receiving repair requests sent by all fault embedded devices;
and sending a repair packet corresponding to the repair request to all the fault embedded devices so as to complete fault repair of all the fault embedded devices.
2. The method of claim 1, wherein after the receiving device information sent by the at least one failed embedded device, the method further comprises:
determining all first fault embedded devices from the at least one fault embedded device according to the device information, wherein the first fault embedded devices are fault embedded devices of which the original IP addresses and the server are not in the same network segment;
the obtaining of the new IP address allocated to each failed embedded device includes:
a new IP address assigned to each first failed embedded device is obtained.
3. The method according to claim 1 or 2, wherein the device information further comprises a MAC address of the failed embedded device;
the sending of the modification instruction to each faulty embedded device includes:
respectively sending modification instructions carrying the MAC address of each fault embedded device and the new IP address correspondingly distributed to each fault embedded device;
the new IP address for itself is: a new IP address for its own MAC address.
4. A repair packet receiving method, the method comprising:
sending equipment information to a server, wherein the equipment information comprises an original IP address of a fault embedded equipment and information whether the fault embedded equipment supports multicast;
receiving a modification instruction of the server multicast or broadcast, wherein the modification instruction carries the allocated new IP address, and the new IP address is an address allocated to the server;
modifying the original IP address of the fault embedded equipment into a corresponding new IP address so as to directly connect the server by using the new IP address;
broadcasting ARP information carrying the corresponding relation between the MAC address of the fault embedded equipment and the new IP address so that the server stores the corresponding relation between the MAC address of the fault embedded equipment and the new IP address after receiving the ARP information;
sending a repair request to the server;
and receiving a repair packet which is sent by the server and corresponds to the repair request, and completing fault repair.
5. The method according to claim 4, wherein the modification instruction further carries a MAC address of the failed embedded device;
the modifying the original IP address of the fault embedded device to the corresponding new IP address comprises:
and modifying the original IP address of the fault embedded equipment into a new IP address corresponding to the MAC address of the fault embedded equipment.
6. A repair packet transmission apparatus, characterized in that the apparatus comprises: the device comprises a first receiving module, an obtaining module, a judging module, a first sending module, a second receiving module, a second sending module, a third receiving module and a storage module;
the first receiving module is used for receiving equipment information sent by at least one fault embedded equipment, wherein the equipment information comprises an original IP address of the fault embedded equipment and information whether the fault embedded equipment supports multicast;
the obtaining module is used for obtaining a new IP address distributed to each fault embedded device;
the judging module is used for judging whether the corresponding fault embedded equipment supports multicast or not according to the equipment information before sending the modification instruction to each fault embedded equipment;
the first sending module is used for multicasting the modification instruction of the corresponding fault embedded equipment when the corresponding fault embedded equipment supports multi-broadcasting, and broadcasting the modification instruction of the corresponding fault embedded equipment when the corresponding fault embedded equipment does not support multi-broadcasting so that each fault embedded equipment is directly connected with the server by using a new IP address after obtaining the new IP address aiming at the fault embedded equipment from the modification instruction corresponding to the fault embedded equipment, wherein the modification instruction corresponding to each fault embedded equipment carries the new IP address allocated to the fault embedded equipment;
the second receiving module is used for receiving the repair requests sent by all the fault embedded devices;
the second sending module is configured to send a repair packet corresponding to the repair request to all the faulty embedded devices, so that all the faulty embedded devices complete fault repair;
the third receiving module is used for receiving the ARP information broadcasted by the at least one fault embedded device;
and the storage module is used for storing the corresponding relation between the MAC address of the corresponding fault embedded equipment carried in the ARP information and the new IP address.
7. The apparatus of claim 6, further comprising a determination module;
the determining module is configured to determine, after the receiving of the device information sent by the at least one faulty embedded device, all first faulty embedded devices from the at least one faulty embedded device according to the device information, where the first faulty embedded device is a faulty embedded device whose original IP address and the server are not in the same network segment;
the obtaining module is specifically configured to obtain a new IP address allocated to each first failed embedded device.
8. The apparatus of claim 6 or 7, wherein the device information further comprises a MAC address of the failed embedded device;
the first sending module is specifically configured to send a modification instruction carrying the MAC address of each faulty embedded device and the new IP address allocated correspondingly to each faulty embedded device;
the new IP address for itself is: a new IP address for its own MAC address.
9. A repair packet receiving apparatus, comprising: the system comprises a third sending module, a fourth receiving module, a modification module, a fourth sending module, a fifth receiving module and a broadcasting module;
the third sending module is used for sending equipment information to the server, wherein the equipment information comprises an original IP address of the fault embedded equipment;
the fourth receiving module is configured to receive a modification instruction broadcasted or multicasted by the server, where the modification instruction carries the assigned new IP address, and the new IP address is an address assigned by the server;
the modification module is used for modifying the original IP address of the fault embedded equipment into a corresponding new IP address so as to directly connect the new IP address with the server;
the fourth sending module is configured to send a repair request to the server;
the fifth receiving module is configured to receive a repair packet sent by the server and corresponding to the repair request, and complete fault repair;
the broadcast module is used for broadcasting Address Resolution Protocol (ARP) information carrying the corresponding relation between the MAC address of the fault embedded equipment and the new IP address before the repair request is sent to the server, so that the server stores the corresponding relation between the MAC address of the fault embedded equipment and the new IP address after receiving the ARP information.
10. The apparatus according to claim 9, wherein the modification instruction further carries a MAC address of the failed embedded device;
the modification module is specifically configured to modify the original IP address of the failed embedded device to be a new IP address corresponding to the MAC address of the failed embedded device.
11. A fault remediation system, the system comprising:
the device comprises a fault embedded device and a server, wherein the fault embedded device is used for sending device information to the server, and the device information comprises an original IP address of the fault embedded device and information whether the fault embedded device supports multicast or not;
the server is used for receiving the equipment information sent by the fault embedded equipment and acquiring a new IP address distributed to each fault embedded equipment; judging whether the corresponding fault embedded equipment supports multicast or not according to the equipment information; when the corresponding fault embedded equipment supports multi-broadcasting, multicasting a modification instruction of the corresponding fault embedded equipment; when the corresponding fault embedded equipment does not support multi-broadcasting, broadcasting a modification instruction of the corresponding fault embedded equipment; wherein the modification instruction carries the assigned new IP address;
the fault embedded equipment is also used for receiving modification instructions broadcasted or multicasted by the server; modifying the original IP address of the fault embedded equipment into a corresponding new IP address so as to directly connect the server by using the new IP address; broadcasting ARP information carrying the corresponding relation between the MAC address of the fault embedded equipment and the new IP address; and sending a repair request to the server;
the server is also used for receiving ARP information broadcasted by the fault embedded equipment and storing the corresponding relation between the MAC address of the corresponding fault embedded equipment carried in the ARP information and the new IP address; receiving repair requests sent by all fault embedded devices; sending a repair packet corresponding to the repair request to all the fault embedded devices;
and the fault embedded equipment is also used for receiving a repair packet which is sent by the server and corresponds to the repair request, and completing fault repair.
CN201610588640.8A 2016-07-21 2016-07-21 Method and device for sending and receiving repair packet and fault repair system Active CN107645404B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610588640.8A CN107645404B (en) 2016-07-21 2016-07-21 Method and device for sending and receiving repair packet and fault repair system
PCT/CN2017/089366 WO2018014695A1 (en) 2016-07-21 2017-06-21 Method and device for sending and receiving a repair packet, and fault repair system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610588640.8A CN107645404B (en) 2016-07-21 2016-07-21 Method and device for sending and receiving repair packet and fault repair system

Publications (2)

Publication Number Publication Date
CN107645404A CN107645404A (en) 2018-01-30
CN107645404B true CN107645404B (en) 2020-10-02

Family

ID=60991906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610588640.8A Active CN107645404B (en) 2016-07-21 2016-07-21 Method and device for sending and receiving repair packet and fault repair system

Country Status (2)

Country Link
CN (1) CN107645404B (en)
WO (1) WO2018014695A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111833799B (en) * 2019-04-15 2022-04-05 杭州海康威视数字技术股份有限公司 LED receiving assembly and receiving card switching method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873726A (en) * 2010-07-01 2010-10-27 华为终端有限公司 Upgrading method of wireless repeater and wireless access equipment
CN103442041A (en) * 2013-08-14 2013-12-11 深圳市同洲电子股份有限公司 Method, device and system for upgrading firmware of embedded device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7478147B2 (en) * 2005-07-21 2009-01-13 International Business Machines Corporation Method and apparatus for a secure network install
CN101820387B (en) * 2010-02-08 2012-12-12 北京航空航天大学 Method for rapidly deploying extensible cluster
CN103200271B (en) * 2013-04-17 2016-03-16 北京百度网讯科技有限公司 The method of ARM server and automation installation system thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873726A (en) * 2010-07-01 2010-10-27 华为终端有限公司 Upgrading method of wireless repeater and wireless access equipment
CN103442041A (en) * 2013-08-14 2013-12-11 深圳市同洲电子股份有限公司 Method, device and system for upgrading firmware of embedded device

Also Published As

Publication number Publication date
WO2018014695A1 (en) 2018-01-25
CN107645404A (en) 2018-01-30

Similar Documents

Publication Publication Date Title
US9525648B2 (en) Method for acquiring physical address of virtual machine
EP2477361B1 (en) Ip address automatic assignment method, equipment and system
CN102299932B (en) Backup method for DHCP (Dynamic Host Configuration Protocol) server and DHCP server
US20090279454A1 (en) Method for configuring a dhcp server using dhcp option 82
US9882802B2 (en) Auto management of a virtual device context enabled network infrastructure
CN103546315B (en) The standby system of a kind of Dynamic Host Configuration Protocol server, method and apparatus
CN104506372B (en) A kind of method and system for realizing active/standby server switching
US20210119965A1 (en) Address Management Method and Apparatus
CN103297353A (en) Access method and system of customer premise equipment and broadband network gateway
CN102123105B (en) Method and equipment for switching between standard VRRP (Virtual Router Redundancy Protocol) and load balancing VRRP
CN104038376A (en) Method and device for managing real servers and LVS clustering system
EP2704403A1 (en) Method and device for controlling address configuration manner
WO2020042899A1 (en) Duplicate address detection method and device, and computer readable storage medium
CN104754070A (en) Method and device for learning address resolution protocol table entries and network device
CN107645404B (en) Method and device for sending and receiving repair packet and fault repair system
CN104618943A (en) OMCH (Operation Maintenance Channel) fault treatment method, device and system
CN106412146B (en) The method and apparatus that a kind of dhcp client updates IP
CN102859947B (en) Method, apparatus and system for neighbor discovery
CN103414642A (en) Maintaining method and device of information forwarding
CN110958124B (en) Multicast group management method, device, readable storage medium and computer
CN106506236A (en) The methods, devices and systems that a kind of WAP is declared automatically
CN110881143B (en) Set top box management method, device and equipment and computer readable storage medium
CN106603743A (en) Broadcast request response method based on DHCP protocol customization, system and terminal thereof
CN104158694B (en) The hot spare method and device of DHCPv6 servers
CN108259636B (en) Message processing method and device

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
GR01 Patent grant
GR01 Patent grant