I am newish to the Flint 2, having replaced an aged ASUS RT3200. The old router exported the client list info (names, IPs, MACs, etc) to a CSV file which I kept a backup copy on hand for those times when I was suffering some networking issue and wanted to know “who” had which IP address. I’ve tried just copy and paste from the clients list page in the Flint 2 Client page, but the order of the info doesn’t make sense (device names don’t align with the rest of the info.) I’m not especially enamoured with CSV, but I would like some way to make a backup copy of my list of known devices. Maybe it could be as simple as rejiggering the current web page so a copy and paste works as expected.
Think what you’re after is /etc/config/dhcp
Either use a terminal session and either cat and then copy and paste, or copy the file or do a full backup via Luci and pull out the file from the backup archive.
.
config host
option mac 'xx:xx:5b:xx:xx:xx'
option ip '192.168.8.23'
option dns '1'
option tag 'Switch-Lounge-Camera'
config host
option mac 'xx:xx:5b:xx:xx:xx'
option ip '192.168.8.25'
option tag 'Retreat-Hub'
config host
option mac 'xx:xx:5b:xx:xx:xx'
option ip '192.168.8.26'
option tag 'Music-Hub'
That’s useful for the assigned IPs, but I also want the MAC info of all devices on my network, including those currently offline… (This info is in the web user interface.)
Pretty easy.
First, run this once:
opkg update && opkg install sqlite3-cli
Then you can get all devices by running this:
sqlite3 -header -column -cmd ".width 0" /etc/oui-tertf/client.db "SELECT mac, ip, datetime(seen, 'unixepoch', 'localtime') AS last_seen, iface FROM client ORDER BY seen DESC;"
I have not yet enabled Luci (or whatever the “advanced” mode is). Do I need to do it there, or I can just do it from the command line window I get from SSH’ing to the IP of the router? (I guess I could just try it, but I don’t want to break something unexpectedly.)
These are SSH commands, no luci involved.
Thanks for the help, I made a little tweak to include the device name, and it’s exactly what I wanted ![]()
`sqlite3 -header -column -cmd ".width 0" /etc/oui-tertf/client.db "SELECT name, mac, ip, datetime(seen, 'unixepoch', 'localtime') AS last_seen, iface FROM client ORDER BY seen DESC;"`