Home > SystemAdmin > Nmap to find PCs up on Network.

Nmap to find PCs up on Network.

Like any other Linux Admin I prefer bash scripts for my routine jobs.
One fine day admin dept manager asked me to find systems left powered ON during night, so that they can instruct users to power OFF their systems before leaving.

Initially I wrote script using PING command, this script was scheduled to run mid-night.
Since I was using PING command script was taking long time to complete. Well, time was not my concern. Lately I found many of my developers were leaving Windows Firewall ON to avoid ping. which result in incomplete data.

I have used nmap to find running services & was aware of ping option in it. Unless I read this I wasn’t sure nmap will be able to detect system even if firewall is ON, because I was under impression ICMP is used to detect local systems.

Below you can find command I used to scan my network.


nmap -sP 192.168.2.1-254

Starting Nmap 5.00 ( http://nmap.org ) at 2009-10-27 14:52 IST
Host 192.168.2.2 is up (0.028s latency).
MAC Address: 00:26:5E:7D:F6:77 (Unknown)
Host 192.168.2.10 is up (0.032s latency).
MAC Address: 0C:60:76:0B:BC:85 (Unknown)
Host 192.168.2.14 is up (0.067s latency).
MAC Address: 0C:60:76:3F:0F:58 (Unknown)
Host 192.168.2.150 is up (0.014s latency).
MAC Address: 00:26:5E:7D:ED:53 (Unknown)
Nmap done: 254 IP addresses (4 hosts up) scanned in 4.66 seconds
  • Stumbleupon
  • Delicious
Google Buzz
Share and Enjoy:
  • Digg
  • Twitter
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Yahoo! Buzz
  • Reddit
  • BlinkList
  • del.icio.us
  • DZone
  • email
  • IndianPad
  • LinkedIn
  • Live
  • Print
  • Technorati
  1. No comments yet.
  1. No trackbacks yet.