Skip to content

Anonymous-cheese/LLDP-Neighbor-Viewer-tshark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

LLDP Neighbor Viewer (tshark)

This project provides a lightweight Windows GUI application for discovering LLDP neighbors using tshark (part of Wireshark). It is designed as a simple, dependency-free tool that can be double-clicked and run as a .pyw script without requiring additional Python libraries.

Features

  • GUI-based LLDP scanning using tkinter
  • No third-party Python dependencies
  • Automatically detects available network interfaces
  • Clean, readable LLDP neighbor summary (Chassis MAC, Port ID, Port Description, System Name)
  • Friendly interface naming (e.g., "Ethernet 2")
  • Custom capture duration (default: 30 seconds)
  • Progress bar showing scan progress
  • No console window during scanning
  • Uses tshark with verbose LLDP decoding
  • Fallback parsing for devices that do not follow strict LLDP formatting
  • Fully self-contained script suitable for packaging or portable use

Requirements

  • Windows 10 or later
  • Python 3.10+
  • Wireshark installed (for tshark)
  • Default expected path for tshark:
    C:\Program Files\Wireshark\tshark.exe
    

If tshark is installed elsewhere, update the TSHARK_PATH variable in the script.

Usage

1. Place the Script

Copy LLDP.pyw anywhere on your system, for example:

C:\Users\<username>\Desktop\LLDP.pyw

2. Run the Script

Double-click LLDP.pyw to launch the GUI.

3. Select Interface

Choose the network interface you want to scan from the dropdown list.

4. Configure Duration

Enter the desired scan time (default is 30 seconds).
LLDP frames typically broadcast every 30 seconds.

5. Start Scan

Press Start LLDP Scan.

During scanning:

  • The progress bar will fill representing elapsed time
  • The GUI remains responsive
  • No console window appears

When complete, LLDP neighbors will be summarized in an easy-to-read text section.

LLDP Output Format

Each discovered neighbor is shown as:

Neighbor N:
  Chassis MAC : <MAC>
  Port ID      : <Port Identifier>
  Port Desc    : <Port Description>
  System Name  : <System Name>

If fields are missing, the parser uses fallbacks such as the Ethernet source MAC address.

Customization

You can modify the following in the script:

  • TSHARK_PATH
  • Default capture duration
  • Regex patterns for LLDP field extraction
  • GUI labels and styling

Troubleshooting

"tshark not found"

Ensure Wireshark is installed and tshark.exe exists at the expected path.

No LLDP neighbors shown

Possible reasons:

  • Interface not connected to an LLDP-speaking device
  • NIC does not support capturing L2 frames
  • Switch sends LLDP infrequently
  • VLAN tagging or network isolation

Try increasing capture duration to 45–60 seconds.

Fields appear as <unknown>

Different vendors output LLDP details variably.
Improve detection by extending regexes in _parse_lldp_verbose().

License

This project is provided as-is without warranty.
You may use, modify, and distribute freely.

About

GUI application for discovering LLDP neighbors

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages