In the present time, a number of advanced users want to get the list all of the hosts on a network, some time for IP discovery. They want to find the list of all hosts of the network to connect with the remote machine, or some other computer system administration or network admin purpose. So for the user’s convenience, we are providing one of the easiest ways to find all hosts and the host IP addresses on a network is by using an amazing tool that is called the Nmap.

How to get the Nmap tool on MacOS?

The best thing is the Nmap tool; it is compatible with each of the primary operating system such as- Mac OS, Windows, and Linux. Therefore,  it does not come pre-installed by default in MacOS. If you want to use it then you will need to install Homebrew and then need to install Nmap. Apart from this, you can also install Nmap on a Mac directly without a package manager.

However, we are discussing on how to use the Nmap feature to get and list all hosts on a network, and we’re assuming that you are already using the nmap on your Mac system. If you do not have the nmap for whatever reason, you may find viewing IP addresses of LAN devices with arp. It is useful tool instead as an alternative solution.

Steps to Find All Hosts on Network with Nmap:-

So are you ready to list all hosts IP addresses on a network using the Nmap tool?. However, It’s no so so tricky. For this, you will need to follow some steps which are the mentioned below:-

  1. Open the Terminal first, if you have not done it already.
  2. Then, enter the following command string Nmap -sn 192.168.1.0/24 to replace your network IP and range as appropriate:
  3. Click on Return button and wait for few seconds to see the detected hosts on the network.
  4. After that, the command output of Nmap will see you something like the following, where host IP addresses of found devices and hardware on the network are detected and shown below:
  • % Nmap -sP 192.168.1.0/20
  • Starting Nmap ( https://nmap.org ) at 2022-06-15 16:24 PDT
  • Nmap scan report for 192.168.1.11
  • Nmap scan report for 192.168.1.1
  • Nmap did: 4096 IP addresses (7 hosts up) scanned in 43.67 seconds
  • Nmap scan report for 192.168.1.2
  • A host is up (0.019s latency).
  • A host is up (0.0051s latency).
  • A host is up (0.0063s latency).
  • Nmap scan report for 192.168.1.25
  • Nmap scan report for 192.168.1.9
  • Nmap scan report for 192.168.1.15
  • A host is up (0.024s latency).
  • A host is up (0.021s latency).
  • A host is up (0.0211s latency).
  • Nmap scan report for 192.168.1.12
  • A host is up (0.022s latency).

Although, it is also important that how the Nmap tries to find the host IP range on the network to see if they exist. In case, if they do and respond that they are returned in the Nmap results, and if they don’t or do not respond that means they will not be listed.

Alternately, you can also use the -sP flag, that may perform on the older Nmap versions, if -sn fails. The result should be the same regardless: Nmap -sP 192.168.1.0/24

Source  : https://keyactivation.net/blog/how-to-find-all-hosts-on-network-using-nmap-tool/

arrow
arrow
    全站熱搜

    John Smith 發表在 痞客邦 留言(0) 人氣()