Asset discovery is an important aspect of network management and security. It involves identifying and cataloging all the devices and systems connected to a network.
Problem #
Simple method to get a list of all devices on the network.
Assumptions #
- All network segments are accessible from the device running Nmap.
- Ping or ICMP packets are allowed unrestricted inside the network.
Solution #
Run the following command:
nmap -sn 192.168.1.0/24
Usually, the default gateway is known and can be excluded from the scan:
nmap -sn 192.168.1.0/24 --exclude 192.168.1.1
Explanation #
This is a simple way to discover devices on a network using Nmap. The -sn option tells Nmap to perform a ping scan, which is faster than a full port scan.
last updated: