NMAP is probably best port scanner and network exploration/security auditing tool what you can find for free.
So here is some really basic things how to use it.
There is many ways to scan with nmap:
Using wildcard mask: nmap 192.168.0.*
Scan’s 192.168.0.0 – 192.168.0.255
With range: nmap 192.168.0.1-100
Scan’s 192.168.0.1 – 192.168.0.100
Using notation: nmap 192.168.0.1/24
Scan’s 192.168.0.1- 192.168.0.255
Find out what operating systems this computer/devices are using:
sudo nmap 192.168.0.* -O
Do ping scan: sudo nmap 192.168.0.* -sP
TCP connect scan: sudo nmap 192.168.0.* -sT
SYN Stealh scan: sudo nmap 192.168.0.* -sS
UDP Scan: sudo nmap 192.168.0.* -sU
Verbose Mode: sudo nmap 192.168.0.* -sP -v
Verbose mode will give you more information about what NMAP is doing.
So if you example want to find DHCP servers from 192.168.0.1 – 192.168.0.255 ip range you can use nmap like this:
nmap -sU 192.168.0.1/24 -p 67-68
It goes thru all IP’s from 192.168.0.1 – 192.168.0.255 and check ports 67 and 68 from every client.
Your article was extremely helpful for me. Massive thumbs up for this blog post!