How often has a network support engineer had to deal with a remote connection without knowing where the device to be diagnosed is connected, whether the port is configured correctly or whether some fundamental parameter is missing, or how many connection errors, especially at the physical level, are occurring?
There's no way to ask the end user, who usually only knows how to log in to the device and manage their software.
This tool is intended to help locate the physical port in Cisco and Fortinet networks, and it has worked well for me in most cases.
A user-friendly graphical interface for tracing devices through networks by querying ARP and MAC address tables on Cisco and Fortinet devices.
- Intuitive Graphical Interface: Easy-to-use GUI for network path discovery
- Multi-vendor Support: Works with Cisco IOS, IOS-XE, NX-OS, and Fortinet devices
- Flexible Authentication: Support for both password and key-based SSH authentication
- Path Visualization: Visual and text-based network path diagrams
- Progress Tracking: Real-time progress tracking during operations
- Results Management: Save and load trace results in JSON or text format
- Cross-platform: Works on Windows 10/11 and Linux
[Add screenshots of the application interface and visualizations here]
- Python 3.6+
- Required Python packages:
- paramiko
- netmiko
- tkinter (usually comes with Python)
-
Clone this repository:
git clone https://github.com/yourusername/network-device-tracer.git cd network-device-tracer
-
Install required dependencies:
pip install paramiko netmiko
-
Run the application:
python GUI-tracker.py
pip install pyinstaller
pyinstaller --onefile --windowed GUI-tracker.py
The executable will be created in the dist
folder.
-
Configure Connection Settings:
- Enter the IP address of your starting device (typically a Layer 3 switch or router)
- Enter the target device IP address
- Provide authentication credentials (username and password or SSH key)
- Select display type (Full Path or End Port Only)
-
Start Tracing:
- Click "Trace Device" to begin the trace
- Watch real-time progress in the status bar
-
View Results:
- View text output with detailed hop information
- See visual network path diagram in the visualization tab
-
Save/Load Results:
- Save results as JSON for later visualization or as text reports
- Load previously saved trace results
-
Discovery Process: The tool uses standard network protocols to discover the path:
- ARP tables to find MAC addresses from IP addresses
- MAC address tables to find which port a device is connected to
- CDP/LLDP to find neighbor devices
-
Auto-detection: Automatically detects device types and adapts commands accordingly
-
Retry Logic: Implements exponential backoff for connection retries
-
JSON Serialization: All trace results can be serialized to JSON for integration with other tools
- Credentials are never stored persistently
- SSH connections use industry-standard security
- Consider using SSH keys instead of passwords for enhanced security
- The tool requires privileged access to network devices
python GUI-tracker.py --start-device 192.168.1.1 --target 10.0.0.5 --username admin
The core DeviceTracer
and NetworkDevice
classes can be imported and used in other Python applications:
from GUI-tracker import DeviceTracer, NetworkDevice
device = NetworkDevice(hostname="192.168.1.1", username="admin", password="password")
tracer = DeviceTracer()
path = tracer.trace_device(device, "10.0.0.5")
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Leonel Giovanny Pedroza Renteria
This tool is for network administrators and engineers. Always ensure you have proper authorization before querying network devices.