All ip assigned within a network

Many a time you wanted to know the assigned ip addresses in your LAN. My use cases:

I was working on nano pi neo cheapest things can be!!

You don’t want to move from your ass but this is more of a reason when you already know how to do this 🙂

Okay so on windows you have Advanced ip scanner. You can even log into your router and get to see the client list this is always the easiest way but (ohh but again)..   what if you have reset your router password. Most of the time you will forgot it!! It is not often that you need to login into your router so reset password means forgot. Do you want to reset the router password now just for this with router’s reset button. Or you are in office or you don’t own the router.

Anyway whatever your cause is here is a very easy command to get the list of all assigned ip using linux system:


sudo apt-get install nmap


:~$ sudo nmap 192.168.100.5/24 -sP

Starting Nmap 6.40 ( http://nmap.org ) at 2017-01-04 18:23 IST
Nmap scan report for domain.name.dlink.com (192.168.100.1)
Host is up (0.00024s latency).
MAC Address: 1C:5F:2B:4D:05:71 (Unknown)
Nmap scan report for 192.168.100.26
Host is up (0.00028s latency).
MAC Address: FA:7B:DE:ED:46:55 (Unknown)
Nmap scan report for 192.168.100.4
Host is up.
Nmap done: 256 IP addresses (3 hosts up) scanned in 3.27 seconds

If there are not much of machines in your LAN you will figure out which machine has what ip or you can ssh to each to verify. Without nmpa also you can ping all the ip and get the list but nmpa also tells you the friendly name of the machine.
 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s