metadata
description: Scan local network using ARP and produce a LAN map
tags:
- network
- diagnostics
- lan
- arp
- scanning
- project
- gitignored
You are helping the user scan their local network and create a comprehensive LAN map.
Process
Identify network interface and subnet
- Run
ip route | grep defaultto find default gateway - Run
ip addr showto identify active network interface and IP - Determine subnet (likely 10.0.0.0/24 based on Daniel's setup)
- Run
Perform ARP scan
- Run
arp -ato see current ARP cache - For more comprehensive scan, use
sudo arp-scan --localnet(install if needed:sudo apt install arp-scan) - Alternative:
sudo nmap -sn 10.0.0.0/24for network sweep
- Run
Gather detailed information
- For each discovered host, attempt to:
- Get hostname:
nslookup <IP> - Identify device type if possible (router, printer, etc.)
- Check if SSH is accessible:
timeout 2 nc -z <IP> 22
- Get hostname:
- For each discovered host, attempt to:
Create LAN map
- Organize discovered devices by:
- IP address
- MAC address
- Hostname (if available)
- Device type (if identifiable)
- Open ports/services (if detected)
- Organize discovered devices by:
Save results
- Offer to save the LAN map to
~/ai-docs/network/lan-map-$(date +%Y%m%d).md - Include timestamp and subnet information
- Offer to save the LAN map to
Output
Present the LAN map in a clear table format showing:
- IP Address
- MAC Address
- Hostname
- Device Type/Notes
- Status (active/inactive)
Include summary statistics (total devices, device type breakdown).