A multi-protocol compatible link layer neighbor discovery method and a handheld network detection device
Patent Information
- Application Number
- CN202611087282.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-22
- Publication Date
- 2026-09-15
AI Technical Summary
1) 协议支持种类较少,普遍仅支持 LLDP、CDP、EDP 等部分协议,对多厂商私有协议的兼容能力较弱;
Smart Images

Figure CN122764883A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with application number 202610351686.1, application date March 22, 2026, entitled "A multi-protocol compatible link layer neighbor discovery method and handheld network detection device". Technical Field
[0002] This invention relates to the field of network testing technology, specifically to a parsing method for supporting multi-vendor neighbor discovery protocols and a handheld network testing device. Background Technology
[0003] In network operation and maintenance and on-site construction, it is often necessary to quickly identify the device ports connected to Ethernet lines and related information in order to complete line troubleshooting, port location, and fault handling. Currently, mainstream network equipment manufacturers all use their own standard or proprietary link-layer neighbor discovery protocols, such as standard protocols LLDP, Cisco CDP, Huawei / H3C NDP, Nortel / ExtremeEngine EDP, Foundry / Brocade FDP, D-Link DDP, etc.
[0004] Existing handheld network testers have the following shortcomings: 1) Limited protocol support, generally only supporting some protocols such as LLDP, CDP, and EDP, with weak compatibility with proprietary protocols from multiple vendors; 2) High-end equipment is expensive, while low-cost equipment generally lacks complete multi-protocol parsing capabilities; 3) It is difficult to simultaneously support the proprietary protocols of multiple manufacturers on a single handheld device.
[0005] Therefore, there is an urgent need for a handheld network detection solution that can simultaneously support multiple vendor protocols, has a decoupled architecture, is low-cost, and is easily scalable. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a multi-protocol compatible link layer neighbor discovery method and a handheld network detection device, which can simultaneously parse six protocols, LLDP, CDP, NDP, DDP, FDP and EDP, on a single handheld hardware device, and realize the automatic identification and display of ports and related information of multiple vendors' devices.
[0007] This invention employs a three-layer decoupled software architecture: 1) Hardware driver layer: responsible for Ethernet interface-related drivers, as well as the capture, reception, and buffering of Ethernet packets; 2) Protocol parsing layer: contains six independent protocol parsing sub-modules, corresponding to the six protocols LLDP, CDP, NDP, DDP, FDP, and EDP respectively; 3) Application display layer: responsible for displaying the parsing results, user operation interaction and function control.
[0008] Each protocol module is compiled, loaded, and does not interfere with each other, which facilitates subsequent separate expansion, maintenance, and upgrades. Detailed Implementation
[0010] In this embodiment, the handheld network detection device includes: Ethernet PHY / MAC interface circuit Embedded main control processing unit memory LCD display and keypad circuit Power Management Module The software adopts a three-tier architecture: (1) The hardware driver layer is responsible for Ethernet interface initialization, link status monitoring, raw Ethernet packet capture, packet filtering and caching.
[0011] (2) The protocol parsing layer contains six independent protocol parsing modules: LLDP parsing module CDP parsing module NDP parsing module DDP parsing module FDP parsing module EDP parsing module Each module only processes the corresponding protocol messages and outputs data in a unified format, including but not limited to device ID, port ID, device name, management IP address, VLAN information, etc.
[0012] (3) Application display layer The results output from the receiving protocol parsing layer are displayed on the display module, including but not limited to: Switch Name Port number / Port description VLAN information Manage IP address Equipment Model After capturing a message, the protocol identification and distribution rule system identifies the protocol based on the following characteristics: (1) LLDP message: Ethernet type is 0x88cc, destination MAC address is 01:80:c2:00:00:0e; (2) CDP message: Ethernet type is 0x2000, destination MAC address is 01:00:0c:cc:cc:cc; (3) NDP message: Ethernet type is 0x88a7, destination MAC address is 01:80:c2:00:00:0a; (4) DDP message: No dedicated Ethernet type is used. It is transmitted in the form of ordinary UDP broadcast message. The destination MAC address is ff:ff:ff:ff:ff:ff:ff. When the device has a management IP address set, the source IP address is the management IP address. When the management IP address is not set, the source IP address is 0.0.0.0 and the destination IP address is 255.255.255.255. It is identified as D-Link device discovery protocol through a specific UDP port (source port 62992, destination port 62976). (5) FDP message: Ethernet type is 0x2000, destination MAC address is 01:e0:52:cc:cc:cc; (6) EDP message: Ethernet type is 0x00bb, destination MAC address is 00:e0:2b:00:00:00.
[0013] Once the identification is complete, the corresponding message will be distributed to the appropriate independent parsing module for processing.
[0014] Analysis process Initialize the Ethernet interface and enable link layer listening mode; Real-time capture of network packets and filtering of neighbor discovery protocol packets; The protocol type is identified by combining the Ethernet type, destination MAC address, and UDP port number. The identified messages are distributed to the corresponding independent protocol parsing modules; Each module parses the message TLV or private fields to extract port and device-related information; The parsed results are formatted and output to the application display layer. Displays device name, port number, VLAN, management IP, and other information on the handheld device. Attached Figure Description
[0015] Figure 1 is a schematic diagram of the three-layer software architecture of the present invention; The layers are: 100 - Application Display Layer, 200 - Protocol Parsing Layer, and 300 - Hardware Driver Layer. The Protocol Parsing Layer 200 contains six independent parsing sub-modules: LLDP, CDP, NDP, DDP, FDP, and EDP. The Hardware Driver Layer 300 transmits message data to the Protocol Parsing Layer 200, and the Protocol Parsing Layer 200 transmits the parsed data to the Application Display Layer 100.
[0016] Figure 2 is a flowchart of the multi-protocol identification and parsing process of the present invention.
[0017] Beneficial effects Compared with the prior art, the present invention has the following advantages: 1) Extremely compatible, supporting six protocols: LLDP, CDP, NDP, DDP, FDP, and EDP, fully covering network equipment from mainstream manufacturers such as Cisco, Huawei / H3C, D-Link, Foundry / Brocade, Nortel / Extreme.
[0018] 2) Advanced and easy-to-maintain architecture: It adopts a three-layer decoupled software architecture. Each protocol parsing module is independent and uncoupled, and can be upgraded, expanded and replaced individually, which facilitates long-term maintenance.
[0019] 3) Low cost and suitable for mass production: It can be implemented on a general-purpose embedded hardware platform with a price of around 100 yuan, without the need for a high-end processor. The hardware cost is low, making it suitable for mass production and promotion.
[0020] 4) Simple to use and highly efficient on-site: It can automatically identify and display device port information by simply connecting a single Ethernet line. No additional configuration or computer connection is required, making it suitable for rapid on-site maintenance scenarios.
[0021] 5) Complete Scope of Protection: This invention simultaneously protects the multi-protocol compatible link-layer neighbor discovery method and the handheld network detection device, effectively preventing others from imitating it and protecting core technological achievements.
Claims
1. A link layer neighbor discovery method applied to a handheld network detection device, characterized in that, include: Capture link-layer packets via Ethernet interface; Based on the protocol identifier characteristics of the message, identify the link layer neighbor discovery protocol type corresponding to the message; The protocol identification features include one or more of the following: the Ethernet type of the message, the destination MAC address, and the UDP port number; The protocol parsing module matching the protocol type is invoked to parse the message and extract the identity information and / or port information of the sending device; the identity information and / or port information is converted into a unified format and displayed on the device's display module.
2. The method of claim 1, wherein, The link-layer neighbor discovery protocol includes any one or more of LLDP, CDP, NDP, DDP, FDP, and EDP.
3. The method of claim 1, wherein, The method is implemented using a three-tier architecture, including: Hardware driver layer: responsible for capturing, filtering, and buffering Ethernet packets; Protocol parsing layer: contains independent protocol parsing submodules corresponding to each protocol type; Application display layer: responsible for displaying the parsed results, human-computer interaction, and data output; Each layer interacts through standardized interfaces, and the protocol parsing submodule can be loaded, upgraded, and replaced independently.
4. The method of claim 1, wherein, Different protocol types correspond to different Ethernet types, destination MAC addresses, or UDP port number characteristics.
5. The method of claim 1, wherein, Each protocol parsing module, based on the content and format provided by its own protocol, parses one or more of the following information from the message: device name, switch port number, VLAN information, and management IP address.
6. The method of claim 1, wherein, The method supports simultaneous listening and parsing of multiple protocol messages, and outputs and displays valid device and port information in the order of message reception.
7. A hand-held network detection device, characterized in that include: Ethernet interface circuit, processor, memory, and display module; The memory stores a computer program that, when executed by a processor, implements the link-layer neighbor discovery method as described in any one of claims 1-6. The device listens for and identifies at least one link-layer neighbor discovery protocol message through an Ethernet interface, and outputs device information and port-related information on the display module.
8. The apparatus of claim 7, wherein, The device is a handheld hardware that can operate independently without relying on switch configuration or host computer assistance, and can detect and display port and related device information of devices from multiple manufacturers.
9. The apparatus according to claim 7, characterized in that, Each protocol parsing module is an independent software unit that can be maintained, expanded, and upgraded independently.
10. The apparatus according to claim 7, characterized in that, The device also includes one or more of the following: a PoE detection module, a port blink control module, a network cable length measurement module, a network cable sequencing module, and a cable tracing module.