How to list all devices on the Windows or Linux home network

I had never heard of "Avahi" before.

formatting link

Apple originated the idea - as "Rendezvous" or "Bonjour" in 1997. The idea was for those times when two people met somewhere, and wanted to trade files without having a real network available. See the original version of draft-ietf-zeroconf-ipv4-linklocal-01.txt from November

2000.

Microsoft thought the concept was great, as it allowed systems to work when the MSCE (or the average user) had so screwed up the network configurations that even windoze wouldn't work - and this was added to win98. Microsoft joined the linklocal working group in 2001 so that their version would be considered.

Sun (actually Sun Germany) joined later still, but it appears they were adding sanity checking. Compare the linklocal-04 and linklocal-07 releases of the draft. For what it's worth, there were other companies represented on the linklocal working group, such as Motorola. The main result of this collaboration was RFC3927.

3927 Dynamic Configuration of IPv4 Link-Local Addresses. S. Cheshire, B. Aboba, E. Guttman. May 2005. (Format: TXT=83102 bytes) (Status: PROPOSED STANDARD)

But this didn't deal with name resolution. For that, Apple and microsoft came up with incompatible solutions, using different IP addresses and port numbers[1] and even different packet formats. These were documented in two additional draft families - draft-ietf-dnsext-mdns from microsoft went through (at least) 47 releases before being introduced as an INFORMATION RFC (RFC4795 - which describes how it works, but doesn't specify anything meant as a standard), while Apple worked on draft-cheshire-dnsext-multicastdns which went through six releases before disappearing). Avahi is one of several free implementations of the Apple proposal, and therefore isn't compatible with the windoze version (you'd need to be running Samba and NETBIOS name resolution for windoze). Both Apple and microsoft warn that the name service is insecure, suggest different name limitations[2] though intentionally ignoring those limits, and then drop the fireball into your lap by saying that you should use some other security mechanism, but neither bother to include ANY such mechanism.

Old guy [1] Apple used 224.0.0.251 or its IPv6 equivalent FF02::FB and port

5353, while microsoft uses 224.0.0.252 or its IPv6 equivalent FF02::1:3 and port 5355. [2] Apple proposed limiting name resolution to names ending in .local ONLY, while microsoft proposed using "single-label names" (which is win-babble for names without a 'dot'). Neither actually implemented these limitations because they knew lusers would not follow these limits even if they were aware of them.
Reply to
Anda Lucite
Loading thread data ...

More on Avahi.

formatting link

avahi is installed by default on Debian and Ubuntu systems, but few people seem to use it to any extent. It's supposed to be a service auto- discovery, but what services exactly is it set up to discover? I decided to take a look and figure out if I could actually make it do something I wanted.

avahi runs mDNS plus DNS-SD: that is, multicast DNS plus DNS service discovery. Multicast DNS means that each equipped host stores its own DNS records. A multicast address (224.0.0.251) is used by clients wishing to get the IP address of a given hostname, and that host responds to the client request with its IP address. DNS-SD uses the same technology, but in addition to regular DNS information, hosts also publish service instance information: they announce what services they provide and how to contact those services. All of this is intended to mean that hosts and services can connect to one another without requiring any user configuration: known as Zeroconf sharing. Great for those who aren't comfortable doing manual setup -- or who are just lazy!

In truth, as yet there isn't that much Linux software that really uses mDNS. Apple have made rather more use of it: their software is called Bonjour, and handles printer setup, music sharing via iTunes, photo sharing via iPhoto, Skype, iChat, and an array of other software services. However, in terms of the technical implementation, avahi is an excellent piece of software, and capable of doing everything that Bonjour does. It's been suggested that the Debian/Ubuntu dev teams are actually trying to help give mDNS a bit of encouragement with the inclusion of avahi.

So, what can you do with avahi on your Linux box? One possibility is to use it for networked music sharing. In particular, if some of your music is on laptops that appear and disappear from the network as they are moved around and shut down or booted up, auto music discovery is very handy. This is the same tech that Apple uses for iTunes. Since I have a Mac laptop and a couple of Debian desktops which live in another room, this sounded promising.

Reply to
Anda Lucite

When DHCP assigns addresses, it assigns them out of a pool of addresses. As devices or OSes disappear, the DHCP server remembers some of the assignments, and won't (immediately) reuse the number. It's just pretty amazing that it used 1,2,3,4,5,6,7,8 to assign eight of them in a row. My DHCP here, I can't rely on them being in order (there should be a bit more fragmentation). There would be "holes", as my machines run more than one OS, and the assignment is going to change (or even screw up) if I boot a different OS. For example, sometimes I have address conflicts, and have to "release" and "renew" the DHCP lease.

Paul

Reply to
Paul

(snip)

Why would the DHCP server see the machine's network interface differently after a reboot (whether into a different OS or not)?

Surely all it sees is a request to assign an IP address from a MAC address (of the NIC). In that case it simply checks the pool and unexpired leases, and if it finds a MAC-match it renews that old assignment with a fresh expiry. That is my experience.

Reply to
pedro

This brings up a good question which has always bothered me in the back of my head.

Whenever we have "network" issues, the support personal invariable suggest that we power everything down, and then we connect everything back up, one by one, 30 seconds per device, starting at the wall.

That is, they suggestion something like this:

  1. Power everything down (pulling the actual power cord out).
  2. Power up the modem (waiting a full 30 seconds at a minimum).
  3. Power up the router (waiting the full 30 seconds or more to boot).
  4. Power up each wired device in turn (desktop & printer & ooma) individually.
  5. Also individually power up the wireless devices (laptop & phones & ipads).

It seems that, after doing that countless times, sometimes the devices get the old IP address; sometimes they get a new IP address; and sometimes I see (usually on the wired desktop) a message that there is an IP address conflict.

Does any of that make sense to you from a networking standpoint.

Reply to
Anda Lucite

It seems that there are versions of the Fing app available for desktop operating systems too . The 'Fing for Linux' option lists

RPM 64 Bit or 32 Bit DEB 64 Bit or 32 Bit TGZ 64 Bit or 32 Bit

there may already be a 'build' of the tarball for your distro (possibly in the 'testing' or 'user-contributed' or other 'unofficial' repositories).

Reply to
Whiskers

There isn't in Linux Mint 17.3 Cinnamon. I was hoping. But I can download the deb sure.

Reply to
Big Al

And why should there be? It is operating down at a low level where all distros are the same. The important thing is your package manager. If it uses deb, then use the DEB package.

>
Reply to
William Unruh

The web page was nicely set up in that it provided the URL: $ wget "

formatting link
"

$ ls -l

-rw------- 1 anda anda 6813808 Feb 21 12:58 download?plat=lx64&ext=deb

$ file down* download?plat=lx64&ext=deb: Debian binary package (format 2.0)

$ md5sum dow*

438145234207ffd08bb42a808d798eea download?plat=lx64&ext=deb

$ sudo dpkg -i download?plat=lx64 dpkg: error processing archive download?plat=lx64 (--install): cannot access archive: No such file or directory Errors were encountered while processing: download?plat=lx64

$ mv "download?plat=lx64&ext=deb" fing_lx64.deb $ sudo dpkg -i ./fing_lx64.deb Selecting previously unselected package fing. (Reading database ... 363292 files and directories currently installed.) Preparing to unpack ./fing_lx64.deb ... Unpacking fing (3.0) ... Setting up fing (3.0) ...

$ which fing /usr/bin/fing

$ file $(which fing) /usr/bin/fing: POSIX shell script, ASCII text executable

$ cat $(which fing) #!/bin/sh # # Copyright 2015 by Overlook

export LD_LIBRARY_PATH="/usr/local/lib/fing" export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH

ulimit -n 1024 ulimit -c unlimited

/usr/local/lib/fing/fing.bin $@

$ fing Fing init error while creating folder: boost::filesystem::create_directory: Permission denied: "/var/log/fing" Fing init error while creating folders and conf: boost::filesystem::create_directory: Permission denied: "/etc/fing" [overlook.util.logging.FileHandler] unable to open output file Error: no network interface detected please make sure you have administrative rights.

$ sudo fing

13:08:37 > Discovery profile: Default discovery profile 13:08:37 > Discovery class: data-link (data-link layer) 13:08:37 > Discovery on: 192.168.1.0/24

13:08:37 > Discovery round starting.

13:08:37 > Discovery error: unable to select a valid network interface to use

------ control c -------

$ man fing No manual entry for fing See 'man 7 undocumented' for help when manual pages are not available.

$ fing --help

=== overlook fing 3.0 -

formatting link
===

Command line options: -h [ --help ] show this help message -v [ --version ] show fing version -i [ --info ] show network informations -n [ --netdiscover ] arg run network discovery -s [ --servicescan ] arg run service scan on host/network -o [ --output ] arg use output setup for discovery/scan/ping -P [ --profile ] arg use specific discovery/scan/ping profile -d [ --rdns ] arg enable/disable reverse DNS lookups -r [ --rounds ] arg number of rounds (network discovery) --session arg use specific discovery session file --silent force to silent mode --interactive start the interactive mode -p [ --ping ] arg run icmp ping on the hosts --sentinel run Fingbox Sentinel -w [ --wol ] arg send wake on lan on targets

Error: no network interface detected please make sure you have administrative rights.

$ sudo fing -n Error: required parameter is missing in 'netdiscover' INFO 2016/02/21 13:14:07 fing graceful exit.

$ sudo fing -I wlan0 Error: unknown option -I INFO 2016/02/21 13:13:37 fing graceful exit.

$ sudo fing -s Error: required parameter is missing in 'servicescan' INFO 2016/02/21 13:15:05 fing graceful exit.

$ sudo fing -s localhost

13:15:51 > Service scan on: localhost (127.0.0.1)

13:15:51 > Service scan starting.

13:15:51 > Detected service: 53 (domain) 13:15:51 > Detected service: 22 (ssh) 13:15:51 > Detected service: 21 (ftp) 13:15:52 > Detected service: 119 (nntp) 13:15:52 > Detected service: 139 (netbios-ssn) 13:15:52 > Detected service: 445 (microsoft-ds) 13:15:52 > Detected service: 631 (ipp) 13:15:52 > Detected service: 953 (rndc) 13:15:52 > Detected service: 8118 (privoxy) 13:15:52 > Service scan completed in 0.049 seconds.

------------------------------------------------------------------------------- | Scan result for localhost (127.0.0.1) | |-----------------------------------------------------------------------------| | Port | Service | Description | |-----------------------------------------------------------------------------| | 21 | ftp | File Transfer Protocol | | 22 | ssh | SSH Secure Shell | | 53 | domain | Domain Name Server | | 119 | nntp | Network News Transfer Protocol | | 139 | netbios-ssn | NETBIOS Session Service | | 445 | microsoft-ds | SMB directly over IP | | 631 | ipp | Internet Printing Protocol -- for one implementat | | 953 | rndc | RNDC is used by BIND 9 (& probably other NS) | | 8118 | privoxy | Privoxy,

formatting link
|

-------------------------------------------------------------------------------

$ sudo fing -n localhost Error: in provided network: invalid argument Please provide network in format: address/len. E.g.: 192.168.0.1/24 which is a common class C LAN range. E.g.:

formatting link
which is an internet class C LAN range.

$ sudo fing -n 192.168.1.1/24

13:17:29 > Discovery profile: Default discovery profile 13:17:29 > Discovery class: data-link (data-link layer) 13:17:29 > Discovery on: 192.168.1.0/24

13:17:29 > Discovery round starting.

13:17:29 > Discovery error: unable to select a valid network interface to use

--------control c---------

Well, I'm getting nowhere so, I'll ask how to use it and google some too.

How do I use fing on a typical linux computer on a home network?

Reply to
Anda Lucite

Many many errors that could have been avoided but he finally learned.

So the key file is in /usr/local/lib/fing/fing.bin

What does route -n tell you? Does network 192.168.1.0/24 exist? What does ifconfig -a say?

It cannot find your network. That could mean many things. It could be incompetently written. It could be you have no network.

Note it worked for me-- wired network

It would be a lot better if it actually had source code. One could figure out what it was doing.

Reply to
William Unruh

It works now that I have the syntax figured out!

formatting link

Linux FINALLY matches what Android & iOS reported all along! Thanks for suggesting Fing on Linux/Windows for listing out all the connected network devices.

Not a single other Linux or Windows command worked to date.

$ sudo fing -n 192.168.1.0/24 -r 1

15:30:03 > Discovery profile: Default discovery profile 15:30:03 > Discovery class: data-link (data-link layer) 15:30:03 > Discovery on: 192.168.1.0/24 15:30:03 > Discovery round starting. 15:30:03 > Host is up: 192.168.1.11 HW Address: 00:80:05:AA:43:55 (CACTUS COMPUTER) Hostname: anda 15:30:03 > Host is up: 192.168.1.1 HW Address: 84:1B:5E:CC:A3:FF (Netgear) Hostname: router 15:30:04 > Discovery progress 25% 15:30:05 > Discovery progress 50% 15:30:06 > Discovery progress 75% 15:30:03 > Host is up: 192.168.1.3 HW Address: 00:18:61:00:A4:CE (Ooma) 15:30:03 > Host is up: 192.168.1.9 HW Address: F8:D0:AC:DD:5A:FF (Sony) 15:30:03 > Host is up: 192.168.1.10 HW Address: 00:14:22:FF:56:31 (Dell) 15:30:03 > Host is up: 192.168.1.5 HW Address: 40:B0:FA:88:33:A1 15:30:03 > Host is up: 192.168.1.8 HW Address: 40:B0:FA:88:33:A1 15:30:03 > Host is up: 192.168.1.2 HW Address: 5C:0A:5B:C4:22:51 (Samsung) 15:30:03 > Host is up: 192.168.1.4 HW Address: 00:1F:3B:AA:D0:4A (Intel) 15:30:04 > Host is up: 192.168.1.116 HW Address: 00:10:83:00:8A:FF (HP) 15:30:04 > Host is up: 192.168.1.200 HW Address: 00:16:B6:53:66:91 (Cisco-Linksys)

--------------------------------------------------------------- | State | Host | MAC Address | Last change | |-------------------------------------------------------------| | UP | 192.168.1.1 | 84:1B:5E:CC:A3:FF | | | UP | 192.168.1.2 | 5C:0A:5B:C4:22:51 | | | UP | 192.168.1.3 | 00:18:61:00:A4:CE | | | UP | 192.168.1.4 | 00:1F:3B:AA:D0:4A | | | UP | 192.168.1.5 | 40:B0:FA:88:33:A1 | | | UP | 192.168.1.8 | 40:B0:FA:88:33:A1 | | | UP | 192.168.1.9 | F8:D0:AC:DD:5A:FF | | | UP | 192.168.1.10 | 00:14:22:FF:56:31 | | | UP | 192.168.1.11 | 00:80:05:AA:43:55 | | | UP | 192.168.1.116 | 00:10:83:00:8A:FF | | | UP | 192.168.1.200 | 00:16:B6:53:66:91 | |

---------------------------------------------------------------

15:30:49 > Discovery round completed in 45.527 seconds. 15:30:49 > Network 192.168.1.0/24 has 11/11 hosts up. 15:30:17 > Host is up: 192.168.1.6 HW Address: 8C:29:37:AA:21:22

Notice that Android phone (192.168.1.5 & 192.168.1.8) has two IP addresses!

Here is the fing result on the phone at the same time!

formatting link

Finally they match!

Reply to
Anda Lucite

I'd be glad to use an open-source program, if it just did the job of listing *all* the devices on the network.

Since both the following FAILED to list all known devices, you can't trust them to list ANY devices. $ sudo netdiscover -i wlan0 -r 192.168.1.0/24 $ sudo arp-scan --interface=wlan0 --localnet

If there was a better program than Fing on Linux/Windows for listing all devices, it's not known what it is.

Reply to
Anda Lucite

If there was a better program than Fing on Linux/Windows for listing all devices, it's not known what it is.

Reply to
Anda Lucite

Obviously, my info is dated.

That being said, Fing isn't the answer for me. I'm not interested in monitoring the network. I'm interested in file management across the network. In my case, I'm using an Android tablet.

Reply to
Ken Springer

DHCP requests nay include a hostname, and probably other details.

Reply to
Jasen Betts

A lot may depend on what you mean by file management.

For me, when I am on Windows or Linux and I want to access files on Android or on iOS, what I do is start a freeware FTP server on Android or on iOS, which then allows the File Explorer on Linux (Dolphin or Nautilus, for example) and on Windows (Windows Explorer I think it's called) to see the entire mobile device in the file explorer GUI.

Reply to
Anda Lucite

I prefer to have things networked, so I can open Windows Explorer, Finder (OS X), or ?????? on the tablet, and just move/copy/store/ etc. as I wish.

All I have to do is start the system, nothing extra.

Reply to
Ken Springer

If you have that working, it's better than what I have working, because what I have working is that I have to manually start the FTP server on the iOS or Android mobile device first - and only after doing that - then I can access any file on Android and any "available" file on iOS from either the Linus or Windows default graphical file explorer.

So how do *you* manage to do what I do, but automatically? What software are you using on which platform?

Reply to
Anda Lucite

All my computers that I normally use are networked, so I can move files among them as I please, using any of the computers. In the case of this Mac, it's a PITA to get working, and I actually just mapped the drives I wanted to use. I never have figured out how to open the Mac in Windows Explorer, even though the Mac shows up under Network in Windows Explorer.

My tablet is a Nexus 7, Marshmallow 6.0.1 When everything was fully working like I would like, I was running Kit Kat 4.4. But 5 and newer broke my Bluetooth mouse. I've switched file management programs on the tablet. When I was using ????????? on the tablet, I could move files between the Mac and tablet no problem. But I found out that file manager calls home, so I dumped it and installed X-Plore. It has never been able to talk to the Mac, and I even reported it to the author. I like this program because it uses a treeview, not just a list of items that take some sleuthing to figure out where what is.

To get around that issue, I found a program called Android File Transfer for the Mac. Worked great until Google broke it with an update.

My uses for the tablet have diminished to the point where the problems created by updating don't really bother me, so I've not made any effort into tracking down the problem.

But I had it backwards in my original post. I can't see the tablet on the Windows computers, that's why the tablet needs to be rooted. But every windows computer is there, and I can copy/move/etc. between tablet and computer till the cows come home.

Reply to
Ken Springer

If you run a freeware FTP program, on Windows or Linux you can easily explore Android or iOS file systems using the normal Windows or Linux point-and-click graphical file explorer.

There's nothing to it.

(I don't have a Mac so I can't tell you anything about the Mac.)

Reply to
Anda Lucite

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.