1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Lan equivalent of wl ?

Discussion in 'Asuswrt-Merlin' started by calzor suzay, May 29, 2020.

  1. calzor suzay

    calzor suzay Regular Contributor

    Joined:
    Sep 20, 2016
    Messages:
    75
    I have a script that checks for the 'presence' of mine and other devices on the network via MAC address.
    It works really well and updates my home automation that myself or other people are home etc.

    I recently added a powerline extender with WiFi to the back of the house to 'hard wire' some kit in which works really will, I bought a powerline with WiFi so I could extend the range into and onto the bottom of the garden. Again this works really well.

    The problem is on the WiFi in the garden I then appear via the LAN connection and my script using wl searching on the 2.4 & 5ghz range doesn't find me and says I'm out the house triggering lots of automated stuff.

    I waffled but to summarize is there a LAN equivalent of wl I can search for my MAC addresses?
     
  2. calzor suzay

    calzor suzay Regular Contributor

    Joined:
    Sep 20, 2016
    Messages:
    75
    BTW the command I run is wl -i eth1 assoclist which gives a very specific of MACs only.
     
  3. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    12,101
    Location:
    UK
    Vexira likes this.
  4. calzor suzay

    calzor suzay Regular Contributor

    Joined:
    Sep 20, 2016
    Messages:
    75
    Rabbit warren of links trying to fix a re-occurring issue :mad:

    Why is arp not reliable?
    I tried arp -a | grep -c -E 'xx:xx:xx:xx:xx:xx' and it seemed to work with my iPhone, not instant but good enough to a few seconds.
     
  5. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    12,101
    Location:
    UK
    It's probably "fairly" reliable depending on the specific client's behaviour.

    A client can be physically unplugged from the network but that won't be reflected in the arp table until the entry expires. Conversely an arp entry might expire because the client has gone to sleep, but technically it's still connected to the network.
     
  6. calzor suzay

    calzor suzay Regular Contributor

    Joined:
    Sep 20, 2016
    Messages:
    75
    The crontab job runs once a minute so with the arp table updating lag etc it seems to work so far from a quick join/leave the WiFi move between access points.
    Only time will tell :)
     
  7. calzor suzay

    calzor suzay Regular Contributor

    Joined:
    Sep 20, 2016
    Messages:
    75
    Would using nmap be a better method?
     
  8. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    12,101
    Location:
    UK
    nmap still requires arp table entries to function. I guess you could use nmap to do a ping scan of the entire address space in an attempt to reactivate devices that had gone to sleep. That sounds like bad idea as you don't really want devices like PCs, printers and phones constantly waking up shortly after going to sleep.