list all hosts and ips with in subnet
Hi all,
I wanted to list all hosts that are in network for ex: (192.168.100.24/24). I tried using nmap scan but it only lists the hosts which are up.Can we somehow lists all the hosts that are up and down. I used the below Code:
nmap -sn 192.168.100.24/24 -oG output |
no, how do you think that? If the host is down it is not connected to anywhere, does not belong to any network.
Do you think if I bring 20 RPi's into the room they should be listed as well? |
Quote:
|
Quote:
Quote:
Quote:
Quote:
|
Quote:
|
Again, you cannot collect any information about hosts which are unavailable, down. Cannot read their configuration. They may or may not connect to the network. Also you may change DHCP, firewall, ... to enable/disable their access to that network.
|
Quote:
Only way i know is to get an initial list of all the devices that are on the network and then when you run nmap, you can compare that list against the known list. Normally though you should have a good idea what is not on the network because whatever its function is is no longer available which points you to the device. |
Quote:
|
Thanks for the suggestions.
|
DNS is not list-able, so
Code:
getent hosts But you can try the bash command Code:
getent hosts 192.168.100.{0..255} |
Quote:
Applicable at windows also(output at my localhost) Code:
$ /usr/bin/getent.exe hosts 103.244.124.{0..100} | /usr/bin/tail -n 10 |
You might use a network monitoring application running in a host on a span port and building historical data about any node that comes up on your subnet. It will ONLY detect nodes that have been turned on and on the subnet DURING ITS RUN-TIMES, so you will get a list going forward but no backward historical data.
I have used NAGIOS and ZABBIX in enterprise environments, but I suspect for a small network something smaller should serve better. Something based upon ipscanner, nmap, or other application level tools might be leveraged here. |
All times are GMT -5. The time now is 09:34 AM. |