CN114363394A - Edge equipment discovery method based on BUSYBOX - Google Patents

Edge equipment discovery method based on BUSYBOX Download PDF

Info

Publication number
CN114363394A
CN114363394A CN202111591408.7A CN202111591408A CN114363394A CN 114363394 A CN114363394 A CN 114363394A CN 202111591408 A CN202111591408 A CN 202111591408A CN 114363394 A CN114363394 A CN 114363394A
Authority
CN
China
Prior art keywords
service
whoami
busybox
edge device
discovery method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111591408.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.)
Hangzhou Arcvideo Technology Co ltd
Original Assignee
Hangzhou Arcvideo 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 Arcvideo Technology Co ltd filed Critical Hangzhou Arcvideo Technology Co ltd
Priority to CN202111591408.7A priority Critical patent/CN114363394A/en
Publication of CN114363394A publication Critical patent/CN114363394A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a BUSYBOX-based edge device discovery method, which comprises the following steps of: s10, scanning a whoami service operation port; s20, if the operation port is opened, recording the IP of the corresponding device; if not, S10 continues scanning; s21, forming a device list; s30, judging whether the scanning is finished; s40, if yes, accessing the whoami service of the device list; otherwise, returning to S10 to continue scanning; and S50, recording the output information of the whoami service. The method realizes the discovery of the edge device by providing customized self introduction to a visitor in a service mode through realizing the linux-like whoami function; the invention also includes a method for discovering devices by a user.

Description

Edge equipment discovery method based on BUSYBOX
Technical Field
The invention belongs to the technical field of edge calculation, and relates to an edge device discovery method based on BUSYBOX.
Background
In recent years, edge computing technology has been rapidly developed, and more edge devices are put into use. However, as the number of edge devices increases, some of the problems therewith also become apparent. At present, when a large amount of edge equipment works, a DHCP mode is adopted, no fixed IP address is available or a static IP address is used, but the IP deployed at an edge end is often modified, so that the IP of the equipment is changed after the equipment runs for a period of time, and when the equipment needs to be maintained, the specific position of the corresponding equipment cannot be quickly positioned, and the operation and maintenance efficiency is influenced.
Disclosure of Invention
In order to solve the problems, the invention realizes the rapid discovery of the running edge computing equipment based on BUSYBOX, and unlike the traditional equipment discovery scheme that the equipment is relied on to periodically and actively send network packets, the invention does not actively send broadcast packets to the network, and provides the linux-like whoami function realized like the self introduction of user output in a passive mode.
The technical scheme of the invention is an edge equipment discovery method based on BUSYBOX, which comprises the following steps:
s10, scanning a whoami service operation port;
s20, if the operation port is opened, recording the IP of the corresponding device; if not, S10 continues scanning;
s21, forming a device list;
s30, judging whether the scanning is finished;
s40, if yes, accessing the whoami service of the device list; otherwise, returning to S10 to continue scanning;
and S50, recording the output information of the whoami service.
Preferably, the whoami service runs on the edge device in a TCP/IP network service manner, and the implementation subject is a bash program named readme.
Preferably, the output information includes: device hardware ID, device SN, device location, device IP, and device time.
Preferably, the readme.sh realizes self introduction of the edge device, and the output format of the readme.sh is txt text or an HTML page or a JSON string.
Preferably, the start of said whoami service is solely dependent on BUSYBOX.
Preferably, the whoami service restricts access concurrency, supporting only one client access at a time.
Preferably, the whoami service is provided with a service period protection mechanism, and the default is 2 seconds, that is, if the edge device has just made a self-introduction service, the next access is allowed after 2 seconds.
Preferably, after the information is output by the whoami service, the connection with the client is immediately closed, and the whoami service is not affected by any operation of the client.
The invention has at least the following beneficial effects:
(1) the realization is simple: only the bad is needed to test the readme.sh, and the relevant information of the edge device hardware is output;
(2) the universality is strong: the BUSYBOX provides a relatively perfect environment, is suitable for any small embedded system, and is basically supported on edge computing equipment under the similar unix environment, and the method starts the whoami service based on the BUSYBOX without introducing other dependence;
(3) safe and reliable: in the invention, the contents output by the whoami service only depend on whether the connection is established, and the input of the user is not processed, so that the input of the user is not influenced, and the risk of attack is avoided; meanwhile, according to the characteristic that large concurrency cannot occur under the normal condition of the service, only one access is allowed at the same time, so that malicious attack is effectively prevented;
(4) the performance is excellent: after the information is output, the whoami service immediately closes the connection with the client, so that the system resource occupation is very little;
(5) the use is flexible and simple: sh output format is controlled, so that a character stream based on TCP can be output, various formats such as hypertext based on HTTP and JSON strings can be output, and the diversity of output formats enables a user to select a flexible range path according to needs, such as access through a browser.
Drawings
FIG. 1 is a flowchart illustrating the steps of a BUSYBOX-based edge device discovery method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a BUSYBOX-based edge device discovery method in accordance with an embodiment of the present invention;
fig. 3 is a schematic diagram of the edge device result of the BUSYBOX-based edge device discovery method according to the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
On the contrary, the invention is intended to cover alternatives, modifications, equivalents and alternatives which may be included within the spirit and scope of the invention as defined by the appended claims. Furthermore, in the following detailed description of the present invention, certain specific details are set forth in order to provide a better understanding of the present invention. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details.
Referring to fig. 1, a technical solution of the present invention, which is an embodiment of the present invention, is a flowchart of steps of a BUSYBOX-based edge device discovery method, including the following steps:
s10, scanning a whoami service operation port;
s20, if the operation port is opened, recording the IP of the corresponding device; if not, S10 continues scanning;
s21, forming a device list;
s30, judging whether the scanning is finished;
s40, if yes, accessing the whoami service of the device list; otherwise, returning to S10 to continue scanning;
and S50, recording the output information of the whoami service.
The method comprises the steps that a whomami service runs on edge equipment in a TCP/IP network service mode, and a bash program is used as a main body and named as readme. The output information includes: device hardware ID, device SN, device location, device IP, and device time. Sh realizes self introduction of the edge device, and the output format of the edge device is txt text or HTML page or JSON string. The start of the whoami service depends only on BUSYBOX.
In a specific embodiment, the allocated TCP/IP port is 28039, and the user finds the running device list through the service port 28039, accesses the whoami service of the device list, and acquires the "self-introduction" information of the corresponding edge device. The whoami service is only associated with the service port 28039, ignores all other inputs from the user, and outputs are only associated with the device itself, providing high security for the edge device.
The whoami service limits access concurrency, supporting only one client access at a time.
The whoami service is provided with a service period protection mechanism, with a default of 2 seconds, i.e. if the edge device has just made a self-introduction service, the next access is allowed after 2 seconds.
After the information is output by the whoami service, the connection with the client is immediately closed, and the whoami service is not influenced by any operation of the client.
Referring to fig. 2, which is a frame diagram in a specific embodiment of the method, the client mentioned above may be similar to the operation and maintenance terminal 30 in fig. 2, and implement scanning to find the running edge device, obtain the device list, and obtain the device detailed information for the edge device 10 through the network device 20.
Referring to fig. 3, a schematic diagram of a result of discovering an edge device by the method includes device time, device Serial Number (SN), device mac address, and device IP address, and the device information that can be obtained by the method is not limited to the types described in the specific embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (8)

1. A BUSYBOX-based edge device discovery method is characterized by comprising the following steps:
s10, scanning a whoami service operation port;
s20, if the operation port is opened, recording the IP of the corresponding device; if not, S10 continues scanning;
s21, forming a device list;
s30, judging whether the scanning is finished;
s40, if yes, accessing the whoami service of the device list; otherwise, returning to S10 to continue scanning;
and S50, recording the output information of the whoami service.
2. The BUSYBOX-based edge device discovery method according to claim 1, wherein the whoami service is operated on the edge device in a TCP/IP network service manner, and the implementation subject is a bash program named readme.
3. The BUSYBOX-based edge device discovery method of claim 1, wherein the outputting information comprises: device hardware ID, device SN, device location, device IP, and device time.
4. The BUSYBOX-based edge device discovery method according to claim 2, wherein the readme.sh realizes self-introduction of the edge device with an output format of txt text or HTML page or JSON string.
5. The busybax-based edge device discovery method of claim 1, wherein the launch of the whoami service is dependent only on busybax.
6. The BUSYBOX-based edge device discovery method of claim 1, wherein the whoami service limits access concurrency, supporting only one client access at a time.
7. The BUSYBOX-based edge device discovery method of claim 4, wherein the whoami service is provided with a service period protection mechanism, default is 2 seconds, that is, if the edge device has just made a self-introduction service, the next access is allowed after 2 seconds.
8. The BUSYBOX-based edge device discovery method according to claim 1, wherein the whoami service closes the connection with the client immediately after outputting the information, without being affected by any operation of the client.
CN202111591408.7A 2021-12-23 2021-12-23 Edge equipment discovery method based on BUSYBOX Pending CN114363394A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111591408.7A CN114363394A (en) 2021-12-23 2021-12-23 Edge equipment discovery method based on BUSYBOX

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111591408.7A CN114363394A (en) 2021-12-23 2021-12-23 Edge equipment discovery method based on BUSYBOX

Publications (1)

Publication Number Publication Date
CN114363394A true CN114363394A (en) 2022-04-15

Family

ID=81101192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111591408.7A Pending CN114363394A (en) 2021-12-23 2021-12-23 Edge equipment discovery method based on BUSYBOX

Country Status (1)

Country Link
CN (1) CN114363394A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060056306A1 (en) * 2004-09-10 2006-03-16 Konica Minolta Business Technologies, Inc. Communication device suitable for setting IP address of server connected to network, network parameter setting method and network parameter setting program product
JP2011186571A (en) * 2010-03-05 2011-09-22 Hitachi Ltd Server and client system
KR20150078806A (en) * 2013-12-31 2015-07-08 고려대학교 산학협력단 Method and system for indirectness branch monitoring of program
CN105657040A (en) * 2016-02-17 2016-06-08 深圳市贝美互动科技有限公司 Inter-device intranet communication method and system
CN106231006A (en) * 2016-08-31 2016-12-14 珠海市魅族科技有限公司 Network system, the network equipment and the method obtaining IP address of equipment in real time
CN106301909A (en) * 2016-08-11 2017-01-04 杭州华三通信技术有限公司 A kind of port detection method and device
CN113114798A (en) * 2021-04-22 2021-07-13 荣耀终端有限公司 Method for acquiring Internet protocol IP address and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060056306A1 (en) * 2004-09-10 2006-03-16 Konica Minolta Business Technologies, Inc. Communication device suitable for setting IP address of server connected to network, network parameter setting method and network parameter setting program product
JP2011186571A (en) * 2010-03-05 2011-09-22 Hitachi Ltd Server and client system
KR20150078806A (en) * 2013-12-31 2015-07-08 고려대학교 산학협력단 Method and system for indirectness branch monitoring of program
CN105657040A (en) * 2016-02-17 2016-06-08 深圳市贝美互动科技有限公司 Inter-device intranet communication method and system
CN106301909A (en) * 2016-08-11 2017-01-04 杭州华三通信技术有限公司 A kind of port detection method and device
CN106231006A (en) * 2016-08-31 2016-12-14 珠海市魅族科技有限公司 Network system, the network equipment and the method obtaining IP address of equipment in real time
CN113114798A (en) * 2021-04-22 2021-07-13 荣耀终端有限公司 Method for acquiring Internet protocol IP address and electronic equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
GO语言中文社区: ""shell?Busybox单个可执行文件中的Busybox小乔但功能强大Linux Shell和工具"", Retrieved from the Internet <URL:《https://coder55.com/article/129427》> *
KUBESPHERE: "在kubernetes Pod中如何获取客户端的真实IP", Retrieved from the Internet <URL:《https://juejin.cn/post/6937108793427771429》> *
赵秋, 胡华平, 余海燕: "IPID隐蔽网络扫描的原理与实现", 计算机应用, no. 04 *

Similar Documents

Publication Publication Date Title
US10860567B2 (en) Storing state in a dynamic content routing network
Agababov et al. Flywheel:{Google’s} Data Compression Proxy for the Mobile Web
US7127720B2 (en) Storing state in a dynamic content routing network
US8326923B1 (en) Smart prefetching of data over a network
US9032096B2 (en) Reducing the impact of network latency on application performance
US8726338B2 (en) Dynamic threat protection in mobile networks
US8527631B1 (en) Web site reputation service using proxy auto-configuration
CN108156267B (en) Method for improving website access time delay by using cache in fog computing architecture
US6993591B1 (en) Method and apparatus for prefetching internet resources based on estimated round trip time
JP6256896B2 (en) Page redirection method, routing device, terminal device and system
US8631499B2 (en) Platform for analyzing the security of communication protocols and channels
JP5162240B2 (en) A technique for distributing individual contents via a real-time distribution network
US8856325B2 (en) Network element failure detection
US7231665B1 (en) Prevention of operating system identification through fingerprinting techniques
US9065725B1 (en) Techniques for virtual environment-based web client management
CN113328972B (en) Equipment monitoring method, device, equipment and storage medium
CN106789413B (en) Method and device for detecting proxy internet surfing
US9602330B1 (en) Two-stage TCP handshake
CN103269313A (en) Method for achieving embedded linux home gateway captive portal
CN108989420A (en) The method and system of registration service, the method and system for calling service
CN114363394A (en) Edge equipment discovery method based on BUSYBOX
US20090077226A1 (en) Method and system of auto-monitoring network ports
US11457023B2 (en) Chunk-scanning of web application layer requests to reduce delays
Cisco Commands LO through SH
CN111787028A (en) Network access control method, equipment and 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