is there a command (through ssh) I can get a list of all connected devies (lan and wlan), like I can get through the tomato admin page (-> devices)?
My goal is to send an email every time a client connects to the lan / network through that router.
"wl assoclist" actually gives me so response, while the website does.
Maybe I should check the website code.
Running "wl assoclist" gives me MAC of my Main ddwrt router wireless AP where my tomato is connected. Current connection is "wireless ethernet bridge" and using static IP for my tomato router.
What danger is in "wl assoclist"?
wl assoclist shows only wireless client. when you use the sealion's arp, you'll see all! arp arp arp!
Tomato has "arp -a" which is identical to "arp".
At least with static LAN IP's.
IOW, arp gives no information about which clients are actually active, at least for WL clients — it always shows all of them, indiscriminately!
For WL clients, one can do what I suggested.
I have no experience with wired clients — anyone who does have wired clients can easily check whether arp does or does not show static LAN IP clients that are not connected.
Another information tool may be to look in the message log for dhcp.
Someone who is interested could similarly look in their message log to see what happens when a wired client (dis)connects.
They might even show their data. All of the above for
Tomato v1.28.7494 MIPSR2-Toastman-VLAN-RT K26
For wired clients the dynamic arp table only holds info about IP/MAC address pairings that have actively been used in about the last 5 minutes, which is why the "device list" also contains info from active dhcp leases. I don't know what happens when 'arp-binding' is used, if this adds static entries to the arp table they could always appear in the "device list". In same theme I learned in http://www.linksysinfo.org/index.php?threads/display-of-ethernet-connection-speed-in-device-list.37842/ that you can use robocfg to find which Ethernet port devices are connected to, and the connection speed of that port from the Broadcom switch driver
my compile of robocfg is still available on http://mymwi.comli.com/Tomtest/
root@wrt54gs:/tmp/home/root# wget http://mymwi.comli.com/Tomtest/robocfg Connecting to mymwi.comli.com (22.214.171.124:80) root@wrt54gs:/tmp/home/root# chmod +x robocfg root@wrt54gs:/tmp/home/root# robocfg show Switch: enabled Port 0: 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00 Port 1: 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 2: 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 3: 100HD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 4: 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 5: 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 VLANs: BCM5325/535x enabled mac_check mac_hash 0: vlan0: 1 2 3 4 5t 1: vlan1: 0 5t 2: vlan2: 3: vlan3: 4: vlan4: 5: vlan5: 6: vlan6: 7: vlan7: 8: vlan8: 9: vlan9: 10: vlan10: 11: vlan11: 12: vlan12: 13: vlan13: 14: vlan14: 15: vlan15: root@wrt54gs:/tmp/home/root# robocfg showmacs ...
It appears that in current tusb lan mac addresses that have static dhcp assignments also get static arp entries. The timer used to control arp cache expiry can be accessed with
cat root@RTN16:/tmp/home/root# cat /proc/sys/net/ipv4/neigh/br0/gc_stale_time 120 root@RTN16:/tmp/home/root# echo 1200 >/proc/sys/net/ipv4/neigh/br0/gc_stale_time root@RTN16:/tmp/home/root# cat /proc/sys/net/ipv4/neigh/br0/gc_stale_time 1200
There's more than one timer involved hence the about 5 minute comment above.
root@RTN16:/tmp/home/root# for f in /proc/sys/net/ipv4/neigh/default/*; do echo $f:$(cat $f);done /proc/sys/net/ipv4/neigh/default/anycast_delay:100 /proc/sys/net/ipv4/neigh/default/app_solicit:0 /proc/sys/net/ipv4/neigh/default/base_reachable_time:60 /proc/sys/net/ipv4/neigh/default/base_reachable_time_ms:60000 /proc/sys/net/ipv4/neigh/default/delay_first_probe_time:10 /proc/sys/net/ipv4/neigh/default/gc_interval:30 /proc/sys/net/ipv4/neigh/default/gc_stale_time:120 /proc/sys/net/ipv4/neigh/default/gc_thresh1:128 /proc/sys/net/ipv4/neigh/default/gc_thresh2:512 /proc/sys/net/ipv4/neigh/default/gc_thresh3:1024 /proc/sys/net/ipv4/neigh/default/locktime:100 /proc/sys/net/ipv4/neigh/default/mcast_solicit:6 /proc/sys/net/ipv4/neigh/default/proxy_delay:80 /proc/sys/net/ipv4/neigh/default/proxy_qlen:64 /proc/sys/net/ipv4/neigh/default/retrans_time:500 /proc/sys/net/ipv4/neigh/default/retrans_time_ms:5000 /proc/sys/net/ipv4/neigh/default/ucast_solicit:6 /proc/sys/net/ipv4/neigh/default/unres_qlen:3
More info on when IP/MACs last seen can be obtained from
"ip -s neigh"
The times for an entry show "last used"/"last confirmed"/"last updated"