What's new

Getting Name->Mac Address List from Router

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

eglons

New Around Here
Hi folks, my 86u has had some problems and Amazon are replacing it for me. Once the new one comes I need to set it up and one of the jobs I'm not looking forward to is adding the names for all the mac addresses which connect to it via wifi. I've taken a few exports from the client list but that just shows active devices. If I go into the parental control screens it shows "Offline client list" (by name not mac address) which tells me that somewhere it remembers the mac->name mapping for all devices.

Is there a way to get that list so I don't spend hours checking device mac addresses and manually configuring them in my new router?
 
Hi folks, my 86u has had some problems and Amazon are replacing it for me. Once the new one comes I need to set it up and one of the jobs I'm not looking forward to is adding the names for all the mac addresses which connect to it via wifi. I've taken a few exports from the client list but that just shows active devices. If I go into the parental control screens it shows "Offline client list" (by name not mac address) which tells me that somewhere it remembers the mac->name mapping for all devices.

Is there a way to get that list so I don't spend hours checking device mac addresses and manually configuring them in my new router?
If you already have DHCP Static List reservations defined in the current router, you can use the dhcpstaticlist.sh script to export the list to a file. You can then import the list to the new router.

upload_2019-7-3_18-57-46.png


Write up @ https://github.com/Xentrk/Asuswrt-Merlin-Linux-Shell-Scripts#dhcpstaticlistsh
 
If you already have DHCP Static List reservations defined in the current router, you can use the dhcpstaticlist.sh script to export the list to a file. You can then import the list to the new router.

View attachment 18513

Write up @ https://github.com/Xentrk/Asuswrt-Merlin-Linux-Shell-Scripts#dhcpstaticlistsh

I'm a bit new to SSH but have been using Merlins firmware for years. Is there any chance you could tell me how you are executing this command? I have 5 AC5300 and I would like to copy the DHCP list from the main one to the rest of them. I have tried several things on that write up but can't seem to get it to work.

I'm using putty, and have successfully SSH'd into the router.

Any help is greatly appriciated, and thanks in advanced!
 
I'm a bit new to SSH but have been using Merlins firmware for years. Is there any chance you could tell me how you are executing this command? I have 5 AC5300 and I would like to copy the DHCP list from the main one to the rest of them. I have tried several things on that write up but can't seem to get it to work.

I'm using putty, and have successfully SSH'd into the router.

Any help is greatly appriciated, and thanks in advanced!
There are a few ways to execute a script. You can change to the /jffs/scripts directory using the command cd /jffs/scripts. You can the run the script one of two ways:
Code:
./dhcpstaticlist.sh
sh dhcpstaticlist.sh

If you are in another directory, you will need to provide the full path:
Code:
sh /jffs/scripts/dhcpstaticlist.sh
 
Xentrk

Thanks a bunch for getting back to my, and sorry for taking so long to reply! I just got around to trying the above out but was unable to get it to work fully. I did manage to change the directory as you instructed however when I tried either of the two commands listed bellow I got two different messages.

./dhcpstaticlist.sh not found
sh dhcpstaticlist.sh can't open

I'm logging in properly and it registers that I am logged in properly but I can't seem to execute either of those commands. I am currently running firmware 384.14-2. Could this be a Putty issue?
 
Xentrk

Thanks a bunch for getting back to my, and sorry for taking so long to reply! I just got around to trying the above out but was unable to get it to work fully. I did manage to change the directory as you instructed however when I tried either of the two commands listed bellow I got two different messages.

./dhcpstaticlist.sh not found
sh dhcpstaticlist.sh can't open

I'm logging in properly and it registers that I am logged in properly but I can't seem to execute either of those commands. I am currently running firmware 384.14-2. Could this be a Putty issue?
The file is not in the directory or it's not executable. You can list the directory contents using the "ls" command. The download script places the file in /jffs/scripts directory. e.g. cd /jffs/scripts

Code:
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/Xentrk/Asuswrt-Merlin-Linux-Shell-Scripts/master/dhcpstaticlist.sh" -o "/jffs/scripts/dhcpstaticlist.sh" && chmod 755 /jffs/scripts/dhcpstaticlist.sh && sh /jffs/scripts/dhcpstaticlist.sh

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12415  100 12415    0     0  12195      0  0:00:01  0:00:01 --:--:-- 14503

Use this utility to save or restore dhcp_staticlist and dhcp_hostnames nvram values

[1] - Save nvram dhcp_staticlist and dhcp_hostnames to /opt/tmp/
[2] - Restore nvram dhcp_staticlist and dhcp_hostnames from /opt/tmp/
[3] - Preview dhcp_staticlist and dhcp_hostnames in dnsmasq format
[4] - Append dhcp_staticlist and dhcp_hostnames to dnsmasq.conf.add & Disable DHCP Manual Assignment
[5] - Disable DHCP Manual Assignment
[6] - Enable DHCP Manual Assignment
[7] - Backup nvram dhcp_staticlist and dhcp_hostnames to /opt/tmp/ and clear nvram values
[8] - Display character size of dhcp_staticlist and dhcp_hostnames (2999 is the limit)
[e] - Exit

==>

Code:
ls -al /jffs/scripts/dhcp*

-rwxr-xr-x    1 xentrk   root         12415 Jan  4 14:15 dhcpstaticlist.sh
 
Last edited:
Similar threads

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top