Choose style:

Author Topic: Search for LAN IP addresses  (Read 623 times)

0 Members and 1 Guest are viewing this topic.

Offline rmcellig

  • Member
  • ***
  • Posts: 205
  • Karma: 13
  • New Forum User
    • View Profile
Search for LAN IP addresses
« on: April 29, 2016, 04:25:59 pm »
What tool would I use to display the IP addresses of the computers hooked up to my LAN?

Online zebedeeboss

  • Global Moderator
  • Hero
  • *****
  • Posts: 2828
  • Karma: 524
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): P10 Beta / P9 Respin
Re: Search for LAN IP addresses
« Reply #1 on: April 29, 2016, 04:34:47 pm »
Hi rmcellig

Here is a little light reading https://www.linux.com/learn/who-and-what-my-network-probing-your-network-linux it should get you started until someone can point you in a better direction.
Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

Linux User #565092
P10 Beta x64 Desktop - i7-6700K @ 4.00GHz - 32Gb RAM - NVIDIA GTX1070ti 8Gb - 2 x 27" 4k 3840x2160 - 1 x 34" 5120x2160
P9 Respin x64 Laptop - i7-7700HQ @ 2.80GHz - 8Gb RAM - Nvidia GTX1050 4Gb - 15.6" HD 1920x1080

Offline GNULINUX

  • Trusted User
  • Member
  • *****
  • Posts: 987
  • Karma: 310
    • View Profile
  • Peppermint version(s): Peppermint Six (x64)
Re: Search for LAN IP addresses
« Reply #2 on: April 29, 2016, 06:21:40 pm »
Another possible way:
If you have access to your router you could look there. Most routers have a list of connected and previously connected devices.
There's extra info about each device (IP, MAC-address and name).

Run one of the following commands:
Code: [Select]
route -n
Code: [Select]
netstat -rn
Look for the line with UG and there you have your router IP under Gateway.

Example on my system:
Code: [Select]
peppermint@peppermint-home ~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0
peppermint@peppermint-home ~ $ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 wlan0
peppermint@peppermint-home ~ $
In my case my router IP is:
Code: [Select]
192.168.1.1
Now open a browser and surf to that IP, it should bring up the login page of your router.
Login and search for the list there, I can not advise under which tab/page it is since every router differs.
On my router it's the first page after login...

Good luck!  ;)
Peppermint 6  (x64)   -   Windows 7 Ultimate SP1  (x64)
Running different OS flavors in VirtualBox, just for fun!

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 23830
  • Karma: 2635
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Search for LAN IP addresses
« Reply #3 on: April 29, 2016, 08:16:17 pm »
if you know the first 3 octets of the LAN (such as 192.168.1.x), then you can use nmap to scan the 257 addresses in the last octec with:
Code: [Select]
nmap -sP 192.168.1.0/24
« Last Edit: April 29, 2016, 08:31:36 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rmcellig

  • Member
  • ***
  • Posts: 205
  • Karma: 13
  • New Forum User
    • View Profile
Re: Search for LAN IP addresses
« Reply #4 on: April 29, 2016, 09:41:53 pm »
Thanks for the info!!

It would be nice if the smbtree command displayed IP addresses along with the share names. I use this command a lot.