How to Display IP Addresses on a Network

Save

Every Local Area Network (LAN) of computers assigns a unique Internet Protocol (IP) address to each computer connected to it. All those addresses fall within the same interval of the global IP address space; each LAN is configured to use a specific such interval. However, some addresses will be unused at any given time. You can display the IP addresses currently present in your LAN.

  • Log into a computer connected to the LAN.

  • Find out a sample IP address and the network mask for your LAN. How to do that depends on the operating system. For example, on Linux, type the following command on a shell:

    ifconfig

    Press "Enter." Make a note of the sample IP address (after "inet addr:"), and of the mask (after "Mask:").

  • Convert the mask to binary, one number at a time. For example, if the mask is "255.255.240.0", it is "11111111.11111111.11110000.00000000" in binary.

  • Count the number of ones in the binary mask. For example, for "11111111.11111111.11110000.00000000," the number of ones is 20.

  • Invoke the "Nmap" tool to probe all addresses in the LAN's interval, and filter the addresses currently being used from the output. For example, on Linux, type on a shell:

    nmap -v -sP 192.168.2.47/20 | grep "appears to be up"

    Replace "192.168.2.47" by the sample LAN IP address obtained in step 2. Replace "20" by the number of ones counted in step 4. Press "Enter." The command will display a list with all IP addresses being used in the LAN.

References

  • Photo Credit Hemera Technologies/AbleStock.com/Getty Images
Promoted By Zergnet

Comments

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!