LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-24-2012, 04:19 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
can a laptop "discover" its siblings on the same wifi LAN


I have several closely related laptops (and desktops &c) that join and leave the same wifi LAN. Is there some way that a laptop can reach out onto a LAN and "discover" others that are "closely related?"

It is okay for each workstation to run some software prepared to respond to a suitable inquiry. Some sort of "I found ___" or "___ was here" cache might have value, too.

It is not okay for any workstation to act as a central store (local DNS) or other clearing house for who is around. Also, I don't want workstations to ask any sort of central repository.

It seems that this might be a use for some sort of LAN-based network broadcast "I'm here!" or "Anyone else here?" followed by a suitable reply and some scripting to make appropriate notes.

It would be s-wonderful, s-marvelous if there is already some app suite or daemon that does this sort of thing.

Thanks in advance,
~~~ 8d;-/ Dan
 
Old 01-24-2012, 05:25 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Isn't Avahi responsible for network(ed) resource reconnaissance?
 
1 members found this post helpful.
Old 01-25-2012, 08:04 PM   #3
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
(grinning) I dunno...

Now, I get to find out (bwa, ha, hah) ...

After some reading, AVAHI seems to be exactly what I'm looking for, see Avahi Project Page for more details.

I want each workstation to "publish" a list of "services" that are available to the LAN in such a way that its siblings can browse for and use those services.
That seems to be the whole intent of the AVAHI project.

Sadly, I see a lot of chatter about folks wanting to disable and remove AVAHI so I need to explore if that is due to a lack of need, a desire to reduce workstation background overhead, or component defects.

Hee, HEE, hee, hee ... I'll report back as I learn more.
Additional comments from folks who know about AVAHI would be welcome and appreciated.

Thanks,
~~~ 0;-Dan
 
Old 01-25-2012, 08:40 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Doesn't arp do that all the time?
 
Old 01-26-2012, 03:36 PM   #5
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
You are technically correct.

The Address Resolution Protocol, or 'ARP' plays a role in learning and remembering names and addresses and where they reside on a given ethernet. See ARP -- An Overview for more details. As described in the article, ARP is pretty low level: ethernet broadcast of an IP address -- essentially asking "Does any host who gets this broadcast own the named IP address?" A router using Proxy ARP recognizes ARP requests for hosts on the "other side" of the router that can't reply for themselves. The router answers for those addresses with an ARP reply matching the remote IP address with the router's Ethernet address (in essence, a lie).


Given two workstations, 'wilma' and 'fred' on the same LAN, that want to interact, there is quite a dance.
Once each workstation has an IP address (usually using DHCP) things happen:
  • each workstation must inquire then learn the IP address of the other
  • for convenience, a human-readable name might be nice to have
  • each workstation must inquire then learn about services and resources provided by the other
  • for each interesting service or resource, a workstation must take appropriate actions to connect with and make the remote services and resources available locally
It appears that Avahi handles a major part of this dance. With no other workstations on the LAN,
my local workstation reports:
Code:
avahi-browse -at
+  wlan0 IPv4 Officejet 6500 E710n-z [0ECB6E]               PDL Printer          local
+  wlan0 IPv4 Officejet 6500 E710n-z [0ECB6E]               Internet Printer     local
+  wlan0 IPv4 Officejet 6500 E710n-z [0ECB6E]               Web Site             local
+  wlan0 IPv4 Officejet 6500 E710n-z [0ECB6E]               _scanner._tcp        local
+  wlan0 IPv4 Officejet 6500 E710n-z [0ECB6E]               _http-alt._tcp       local
+  wlan0 IPv6 kaywine                                       Remote Disk Management local
+  wlan0 IPv6 kaywine [64:80:99:4e:67:28]                   Workstation          local
+  wlan0 IPv4 kaywine                                       Remote Disk Management local
+  wlan0 IPv4 kaywine [64:80:99:4e:67:28]                   Workstation          local
Notice that there are details from the workstation itself and for a network printer. The printer appears to be an all-in-one with both printing and scanning services. According to the little I've read so far, I should be able to access any avahi-equipped workstation by name using "{hostname}.local".

More to learn,
~~~ 0;-Dan
 
Old 01-27-2012, 12:27 PM   #6
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by SaintDanBert View Post

Sadly, I see a lot of chatter about folks wanting to disable and remove AVAHI so I need to explore if that is due to a lack of need, a desire to reduce workstation background overhead, or component defects.
I think a lot of people think that disabling avahi will give them some sort of security advantage; that is, if you don't publish that some service is available, no one will try to exploit it. This is probably an excessively optimistic assessment of the virtues of obscurity.

Certainly, you don't lose a big percentage of your network bandwidth with it (ok, ok, over a network with a reasonable bandwidth to start with) and it shouldn't be a big drain on cpu resources with a modern cpu, so you probably won't gain a noticeable amount of performance from disabling it, unless you need to guarantee sub-millisecond real time response - which, I suppose you might, if you are running the network for a trading floor, but for everyone else, it will be irrelevant. Doesn't hit the average response time in any noticeable way, but in the one-in-a-thousand, or one-in-a-ten-thousand case when there is a contention, it probably is technically measurable, but that's not the same as noticeable to a normal user.

Mostly, the way Avahi is used is that the servers announce the services have available (eg, 'I have a printer'), but there is no reason that this can't be used by workstations, I just don't know how much messing around there is to get this going, and, what you have to do at an application level to ensure that the announced list is always correct.
 
Old 01-27-2012, 02:35 PM   #7
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
In my case, having a network name that everyone can see and use it a huge step forward
over: what is my IP, tell you -- what is your IP, tell me -- edit /etc/hosts or similar -- la-dee-dah. At least AVAHI lets me enter {hostname}.local into services like web browsers, FTP clients, SSH clients, NFS clients and so on. (I'd like something other than "dot-local" but that is just me.)

Its a good start,
~~~ 8d;-/ Dan
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Keep laptop running on lid close?" + "ssh via crossover cable?" FatalKeystroke Linux - Laptop and Netbook 7 03-11-2011 07:53 AM
Connect two wifi-routers for "meeting room" LAN SaintDanBert Linux - Networking 3 11-10-2009 02:24 PM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 07:11 PM
Chinese laptop "Founder"," unichrome Pro" graph card drivers? Sirr Linux - Laptop and Netbook 3 07-14-2007 01:31 AM
Problem with "3Com", "3CRSHPW_96 Wireless LAN PC Card " Adil_uk Linux - Wireless Networking 0 12-18-2005 05:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration