Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a list of all valid IP addresses in a local network? [closed]

Tags:

networking

ip

Is there a way to get a list of all valid IP addresses in a local network?

I mean all IP addresses that each user is using in the network.

like image 689
M.J.Ahmadi Avatar asked Dec 02 '12 13:12

M.J.Ahmadi


People also ask

How do I find unused IP addresses on my network?

Probably the best way is to use NMAP (http://nmap.org/) in ARP Ping scan mode. The usage will be something like nmap -sP -PR 192.168. 0. * (or whatever your network is).

How can I see all IP addresses on my network using CMD?

From the desktop, navigate through; Start > Run> type "cmd.exe". A command prompt window will appear. At the prompt, type "ipconfig /all". All IP information for all network adapters in use by Windows will be displayed.

How do I find out how many IP addresses possible?

The formulas and rules are discussed below. To calculate the number of possible subnets, use the formula 2n, where n equals the number of host bits borrowed. For example, if three host bits are borrowed, then n=3. 23 = 8, so eight subnets are possible if three host bits are borrowed.


2 Answers

Install nmap,

sudo apt-get install nmap 

then

nmap -sP 192.168.1.* 

or more commonly

nmap -sn 192.168.1.0/24 

will scan the entire .1 to .254 range

This does a simple ping scan in the entire subnet to see which hosts are online.

like image 119
Sunil Bojanapally Avatar answered Sep 19 '22 09:09

Sunil Bojanapally


Try following steps:

  1. Type ipconfig (or ifconfig on Linux) at command prompt. This will give you the IP address of your own machine. For example, your machine's IP address is 192.168.1.6. So your broadcast IP address is 192.168.1.255.
  2. Ping your broadcast IP address ping 192.168.1.255 (may require -b on Linux)
  3. Now type arp -a. You will get the list of all IP addresses on your segment.
like image 26
Virendra Avatar answered Sep 22 '22 09:09

Virendra