Linux clients not shown in connected clients

Support section for FREESCO v0.4.x

Linux clients not shown in connected clients

Postby Peppe/Sweden » Wed Apr 13, 2011 4:26 am

Hello ,

I remeber that this has been asked and answered before but I can't seem to find the post .
A couple of years ago I only ran windows clients and today it's just linux and it is mostly debian but tiny core linux and some other brands is tested some times .
I remeber that windows clients always appered in Freesco , but I non of my linux clients appear in Freesco .
After some google I have only found that Debian sets host name under /etc/hostname and /etc/hosts .

Regards , Peter
[COLOR=blue] You mean that I don?t fly airplanes , I don?t have a grilfriend and don?t have a dog ? Buuh , I grow up to be a real loser! (The Kid , walt disney) [COLOR=blue]
User avatar
Peppe/Sweden
Junior Advanced Member
 
Posts: 161
Joined: Wed Feb 05, 2003 4:41 pm

Re: Linux clients not shown in connected clients

Postby Lightning » Wed Apr 13, 2011 8:47 pm

Host names is really only an issue with the computer names showing up in the connected clients. They still should show up IF they are actually sending or receiving information through the router. The reason for this is because the connected clients button just uses arp entries to monitor the connection and an arp connection is only live for five minutes until it must be renewed or it times out. In Windows clients they are unable to shut up so they are constantly talking on the network. Whereas Linux clients only talk when asked to talk with another machine and to become an arp entry they must talk with another machine on the Internet when FREESCO is configured as a router. It is possible to make a script that sends a single ping to all of the local IP addresses every five minutes from within FREESCO which would force the Linux clients to show up if they are running in the connected clients button. But past that there will always be issues knowing if a Linux machine is on or not if they are not browsing the Internet in some manor and the "connected clients" button was really designed to acknowledge internal machines that were currently using an external connection and it just so happened that Windows clients are always trying to talk with everyone unless they are off. But it was difficult to explain that on the face of a link.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12080
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Linux clients not shown in connected clients

Postby Peppe/Sweden » Sat Apr 16, 2011 3:33 am

Thanks for the detailed explantion .
I guessed before I first posted the first post that there was a simple fix either in the Freesco box or in the linux client .
Now I am thinkning of this is getting to be more like a new feature request to Freesco .
So the question is , would it be possible to present connected linux clients the same way windows cilents or in a seperate way from Freesco ?
I understand that this could both be "fixed" and the client side as well as in Freesco but it would be simpler if it would be done in Freesco so that one didn't have to modify every client .
A litte funny , I checked out dhcpd.leases and my accesspoint is in fact displayed ;
Code: Select all
lease 192.168.1.14 {
   starts 6 2011/04/16 03:40:37;
   ends 6 2011/04/16 21:27:17;
   hardware ethernet 90:e6:ba:d4:5a:6b;
}
lease 192.168.1.10 {
   starts 6 2011/04/16 00:51:30;
   ends 6 2011/04/16 18:38:10;
   hardware ethernet 00:14:6c:7c:d2:2c;
   uid 01:00:14:6c:7c:d2:2c;
   client-hostname "Cube";



One thing that I am thinking of is this ; If the linux client send the host name on short instance - would it be possible for Freesco to "catch" this in a entry somewhere (and the were would be no demand for a linux client list to be on the same list as a windows client list ) .

Regards , Peter
[COLOR=blue] You mean that I don?t fly airplanes , I don?t have a grilfriend and don?t have a dog ? Buuh , I grow up to be a real loser! (The Kid , walt disney) [COLOR=blue]
User avatar
Peppe/Sweden
Junior Advanced Member
 
Posts: 161
Joined: Wed Feb 05, 2003 4:41 pm

Re: Linux clients not shown in connected clients

Postby Lightning » Sat Apr 16, 2011 10:33 am

would it be possible for Freesco to "catch" this in a entry somewhere
Yes and no because the format and amount of what is sent in a DHCP lease is really just a configuration item and Linux clients can look just like Windows clients if they are fully configured. It just so happens that by default most Linux systems just use the minimum necessary to get a lease.

As for a fix/change to make the "connected clients" button work to indicate what internal machines are on rather than just showing what clients are going online. You could add this script to accomplish it.
cd /boot/bin
:>pingtest
chmod +x pingtest
edit pingtest
Code: Select all
#!/bin/sh

for i in `pidof pingtest`
do      [ $i = $$ ] && continue
          echo "Already running, exiting."
          exit
done

#Edit the STATIC_IPs variable with any IP that is not listed in the dhcpd.leases file.
# Use a space between each IP address
# Example   STATIC_IPs="192.168.1.10 192.168.1.11"
STATIC_IPs=""

while :
do   for IP in `cat /etc/dhcpd.leases | sed -n '/^lease/P' | sed 's/lease//;s/\{//'` $STATIC_IPs
       do     ping -c1 $IP
       done
       sleep 60
done

edit /rc/rc_user
Code: Select all
# Find and change this
     $star)    fn $0 $1 $SR
                  fork nice pingtest
                  = $?
                  ;;

rc_user start

The above scripting should work perfectly. But to make certain you understand I just wrote this off of the top of my head and did NOT test it in any way.

It would probably be best to run the pingtest command directly from the command line the first time just to confirm it all works correctly.
pingtest

Once it finishes a loop you can use "CTRL+c" to stop it and then use the rc_user script to fork it into the background.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12080
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Linux clients not shown in connected clients

Postby Peppe/Sweden » Tue Apr 26, 2011 11:28 am

Didn't do the trick .
My accesspoint and older clients turn up in the controlpanel - but none of the clients are displayed .
[COLOR=blue] You mean that I don?t fly airplanes , I don?t have a grilfriend and don?t have a dog ? Buuh , I grow up to be a real loser! (The Kid , walt disney) [COLOR=blue]
User avatar
Peppe/Sweden
Junior Advanced Member
 
Posts: 161
Joined: Wed Feb 05, 2003 4:41 pm

Re: Linux clients not shown in connected clients

Postby Lightning » Tue Apr 26, 2011 6:53 pm

There are several reasons for this to happen. But first it must be clear that all of the clients must get there DHCP lease from FREESCO, All of the clients connected through the access point will not show up because they are not directly connected to FREESCO and therefor do not have arp entries. Secondly make certain that when you run the "pingtest" command from the command line that it is actually including all of the IP addresses and that it is running correctly.
Also on a secondary note unless you manually add the host names into your Linux clients they will not by default show there name when they get a DHCP lease and all you will see is an IP address.

Thinking about your issues here and the fact that you are running an access point and I suspect that some of the issues are related to that specific piece of hardware and the fact that the wireless clients don't have arp entries because of the access point. It would be possible to to change the ping test script to indicate connected clients quite easily and even put it into the control panel if you wanted.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12080
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Linux clients not shown in connected clients

Postby Lightning » Tue Apr 26, 2011 10:53 pm

Here is a package with a modified pingtest script and control panel addons to most likely accomplish what you are wanting. Just be certain to REMMOVE any of the previous scripting because it is completely self supporting.
It is also a non released package to test out.
Code: Select all
pkg -i http://lewys-spot.dyndns.org/test/pingtest-1.0-lightning.pkg

To see the clients from the command line use

rc_pingtest list

Or in the control panel in the packages section Pintest-1.0 section under List.

[EDIT]
After testing the package it is obvious that neither the arp method or the ping method really work for everything. Newer Windows clients do NOT respond to pings depending on there security settings. But Linux clients show up fine, so I guess the end result is that you sort of have to use both methods to really get an accurate picture of the network and connected clients.

I may at some point make a combined version that includes all available methods for detecting clients. But not tonight :wink:
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12080
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Linux clients not shown in connected clients

Postby Peppe/Sweden » Tue May 03, 2011 1:18 pm

Sorry for the late reply , but I had to install tha package in the ramdrive and since I was a little dumb i took a while to get to it .
The format of the output looks great but it still doesn't do what I want ;
Code: Select all
Name:       192.168.1.20
Address:    192.168.1.20
------------------------
Name:       192.168.1.14
Address:    192.168.1.14
------------------------
Name:       Cube.inet
Address:    192.168.1.10


I'm starting to wounder if this has anything to to with Debian Squeeze - I have googled about this but nothing useful has come up .

Regards , Peter
[COLOR=blue] You mean that I don?t fly airplanes , I don?t have a grilfriend and don?t have a dog ? Buuh , I grow up to be a real loser! (The Kid , walt disney) [COLOR=blue]
User avatar
Peppe/Sweden
Junior Advanced Member
 
Posts: 161
Joined: Wed Feb 05, 2003 4:41 pm

Re: Linux clients not shown in connected clients

Postby Lightning » Tue May 03, 2011 7:47 pm

The format of the output looks great but it still doesn't do what I want ;
If you are talking about the name not being displayed then that is just a Linux configuration issue. For some reason new distributions do not show there name in DHCP and from memory all it takes is to edit the networking file to make it work. Perhaps this link will help a bit.
http://tdistler.com/2008/10/14/setting- ... e-on-linux
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12080
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: Linux clients not shown in connected clients

Postby bob selby » Wed May 04, 2011 5:10 am

I had a very similar problem with Ubuntu distro's - eventually I found a setting to get it to send the name with the DHCP request which solved the problem. From (my admittedly aging) memory it was only a check-box that needed changing.

The people on the Ubuntu forums seemed to view this as a positive security behavior. Blocking pings makes sense to me ... but I couldn't see the point in not sending the name.

Bob
bob selby
Advanced Member
 
Posts: 302
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK


Return to FREESCO Support for v0.4.x

Who is online

Users browsing this forum: No registered users and 5 guests

cron