Search

CN-121984871-A - Lightweight network neighbor discovery method and related equipment

CN121984871ACN 121984871 ACN121984871 ACN 121984871ACN-121984871-A

Abstract

A method for discovering neighbor of lightweight network includes binding and monitoring preset UDP port by running a monitor process on all network devices, broadcasting a protocol discovery message to local area network by UDP port of current device when device needs to carry out discovery operation, receiving request by all device in network through bound UDP monitor port and replying device information by UDP response message after confirming that self meets reply condition. The scheme can efficiently and quickly identify and acquire the information of the equipment in the network in a local area network or special network environment with low cost, and can effectively overcome the problems existing in the prior art.

Inventors

  • WANG GE
  • LI YI
  • PENG SHUANGTING
  • CHEN SHAOCHUN
  • HE SHUANG

Assignees

  • 上海博达数据通信有限公司

Dates

Publication Date
20260505
Application Date
20260119

Claims (10)

  1. 1. The lightweight network neighbor discovery method is characterized by comprising the following steps of Running a monitoring process by all devices in the network, wherein the monitoring process is set to monitor a first UDP port and a second UDP port of the device, the first UDP port is set to be a port monitored by an active discovery end, and the second UDP port is set to be a port monitored by the discovery end; When the equipment in the network needs to perform discovery operation, broadcasting a protocol discovery message to the local area network through a first UDP port of the current equipment; All the devices in the network which receive the broadcast receive the request through the bound second UDP monitoring port, and reply the device information of the devices through the UDP response message after confirming that the devices meet the reply condition; The method comprises the steps of constructing an IP address mechanism of a connected access point in a network by equipment in a reverse check mode, firstly, initiating a primary query by the terminal equipment, sending a plurality of primary query messages through a wireless link, designating an operation code field in the messages as a terminal discovery AP mode LOOKUP_AP, filling a BSSID (service request message) into a TLV (packet value) field part of the messages, wherein the BSSID corresponds to a wireless network port MAC (media access control) address of an AP (access point) associated with the terminal equipment, then sending the query messages into a local area network through broadcasting; Based on the IP address mechanism of the access point connected by the equipment reversely check in the network, the equipment discovery can be carried out through the wireless terminal, after the wireless terminal inquires the IP address of the AP equipment, the AP equipment can be controlled to start discovery operation through a matched http interface, the AP equipment sends a QUERY message at a wired network port, meanwhile, a reply message of a response equipment is collected through a wired network, and after information of all the equipment is collected based on the wired network, the equipment information is uniformly transmitted to the wireless terminal through an http protocol.
  2. 2. The lightweight network neighbor discovery method according to claim 1, wherein the discovery method further constructs a fragment response mechanism, so that after receiving the broadcast, the device in the discovered network maps the delay time of the reply message to a preset fixed time slice through a hash algorithm as the packet sending delay.
  3. 3. The lightweight network neighbor discovery method according to claim 1, wherein discovery messages in the discovery method construct a message body in TLV format.
  4. 4. A lightweight network neighbor discovery method as recited in claim 3, wherein filtering conditions can be set in the discovery message, and only device responses in the network that meet the conditions are requested.
  5. 5. The method according to claim 1, wherein the terminal device in the IP address mechanism of the network device for back-checking the connected access point sends the active query message multiple times in an interval manner.
  6. 6. The lightweight network neighbor discovery method according to claim 1, wherein the discovery method further constructs a mechanism that the devices in the network use the access point to perform indirect discovery, and after the devices in the network performing the active discovery operation inquire the IP address of the directly connected access point through the APP, the devices in the network control the access point to perform discovery, so that the access point collects information of the devices in all the networks through the wired network, and then sends the result to the terminal performing the active discovery operation through a protocol with a retransmission mechanism.
  7. 7. A computer readable storage medium having stored thereon a program, wherein the program when executed by a processor implements the steps of the lightweight network neighbor discovery method as recited in any one of claims 1-6.
  8. 8. A processor for executing a program, wherein the program when executed performs the steps of the lightweight network neighbor discovery method as recited in any one of claims 1-6.
  9. 9. A terminal device comprising a processor, a memory and a program stored and executable on the processor, characterized in that the program is loaded and executed by the processor to implement the steps of the lightweight network neighbor discovery method as claimed in any one of claims 1 to 6.
  10. 10. A computer program product, characterized by being adapted to perform the steps of the lightweight network neighbor discovery method as recited in any one of claims 1-6, when executed on a data processing device.

Description

Lightweight network neighbor discovery method and related equipment Technical Field The invention belongs to the technical field of computer networks, and particularly relates to a discovery protocol technology suitable for equipment such as a multi-service router, an intelligent AP and the like. Background In modern communication networks, in order to realize visual management of the network and improve operation and maintenance efficiency, centralized software systems are generally adopted to perform unified monitoring and management on communication devices (such as routers, switches, wireless access points and the like) in the network. Therefore, how to quickly and accurately acquire the operation information and identity characteristics of the devices in the network becomes one of the key basic capabilities of the network management system. Particularly, in practical engineering application, a large number of network devices adopt embedded hardware platforms, and the devices are limited by processing capacity, memory and network bandwidth and cannot bear complex or heavy-level network discovery protocols (such as LLDP, SNMP and the like). Therefore, designing a set of lightweight, high-efficiency and low-resource-occupation device discovery mechanism is very important for the multi-service router, can not only improve the visualization capability, response efficiency and device compatibility of the whole network, but also play a clear role in practical application. Meanwhile, in order to meet the requirements of mobile and intelligent debugging and deployment, more and more scenes are currently used for network management work through mobile terminals (such as smart phones or tablets). There are a number of problems faced in current network management work by mobile terminals, two of which are most prominent: (1) In the current network architecture, after the mobile equipment accesses the wireless network, the mobile equipment can only obtain the IP address and the default gateway address allocated by the mobile equipment, and the real IP address or the equipment identification of the connected wireless access point can not be directly known, so that practical barriers are brought to operations such as network tuning, positioning, remote control and the like. (2) The mobile terminal directly initiates the device discovery and has the bottlenecks of packet loss and efficiency, namely if the device discovery is initiated by the mobile terminal, protocol messages are required to be broadcast and recovered through an air interface, and the common problem of high packet loss rate of a wireless network is faced, so that the integrity of a discovery result is seriously influenced, if a non-Acknowledgement (ACK) mechanism is adopted, a large amount of response information is easily lost, and if a confirmation mechanism is adopted, the problems of air interface occupation, bandwidth waste and the like are caused. Disclosure of Invention Aiming at the problems of the existing communication network equipment discovery technology in the aspects of efficiency, reliability and the like, the invention aims to provide a lightweight network neighbor discovery method which can realize the rapid identification and information acquisition of equipment in a network with high efficiency and low cost and can effectively overcome the problems in the prior art. In order to achieve the above object, the present invention provides a lightweight network neighbor discovery method, comprising Running a monitoring process by all devices in the network, wherein the monitoring process is set to monitor a first UDP port and a second UDP port of the device, the first UDP port is set to be a port monitored by an active discovery end, and the second UDP port is set to be a port monitored by the discovery end; When the equipment in the network needs to perform discovery operation, broadcasting a protocol discovery message to the local area network through a first UDP port of the current equipment; all the devices in the network which receive the broadcast receive the request through the bound second UDP monitoring port, and reply the device information of the devices through the UDP response message after confirming that the devices meet the reply condition. Further, the discovery method also constructs a fragment response mechanism, so that after receiving the broadcast, the device in the discovered network maps the delay time of the reply message to a preset fixed time slice through a hash algorithm, and the delay time is used as the packet sending delay. Further, the discovery message in the discovery method adopts a TLV format to construct a message body. Further, the discovery message can set a filtering condition, and only requests the response of the device in the network meeting the condition. Further, the discovery method also constructs an IP address mechanism of the connected access point by the device in the network, and the de