Tuesday, April 26, 2011

Find alive hosts in a network with ICMP nmap

Introduction

If you want to know which servers or hosts are alive and responding to ping in your local network, you can use nmap

Using nmap to discover ‘alive’ machines on a Network

To use this command and get an effective response, the servers or hosts you are pinging need to respond to it, today a lot of hosts by default have a firewall, and will not respond to pings, so be aware of that.

The command is:

nmap -sP 10.1.1.*
This will have a response like this:

Nmap scan report for 10.1.1.1
Host is up (0.0060s latency).
Nmap scan report for 10.1.1.192
Host is up (0.0023s latency).
Nmap scan report for 10.1.1.193
Host is up (0.061s latency).
Nmap scan report for 10.1.1.198
Host is up (0.0046s latency).
Nmap scan report for 10.1.1.200
Host is up (0.0044s latency).
Nmap scan report for 10.1.1.254
Host is up (0.030s latency).
Nmap done: 256 IP addresses (6 hosts up) scanned in 2.94 seconds
Those are the machines on, in a holy day at my office.

No comments: