NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
SLK-Purdue
Mar 15, 2020Luminary
Script to load /etc/hosts, Static DHCP registrations, and Device name etc
I have developed a script to load /etc/hosts, set static DHCP reservations and update device name, and device type from a master excel spreadsheet. The script works well to create /etc/hosts and se...
ekhalil
Mar 15, 2020Master
Where do you change in the web ui and you don't see the changes on nvram? If I -for example- go to Attached Devices on the web ui and change the Device Name of a device I will see the changes directly on the parameter orbi_dev_namexx of that specific device.
It will be interesting if you can share the script that you are using.
SLK-Purdue wrote:......
Updated device information is not showing on the web ui. If I edit the information on the web ui, nothing changes in nvram. ......
SLK-Purdue
Mar 15, 2020Luminary
Here is an example:
Telnet ooutput
root@Ksander-ORBI:/# nvram show | grep -i A4:D5:78:13:69:7C
reservation76=192.168.1.210 A4:D5:78:13:69:7C sense
orbi_dev_name_v2_ntgr76=A4:D5:78:13:69:7C 17 Sense
access_control25=0 A4:D5:78:13:69:7C 1 65523 SENSE-M725000917 0 0
orbi_dev_name_ntgr76=A4:D5:78:13:69:7C 26 Sense
orbi_dev_type_ntgr76=A4:D5:78:13:69:7C 1 1
orbi_dev_name76=A4:D5:78:13:69:7C Sense
Web Page shows:
IP Address 192.168.1.210
MAC Address A4:D5:78:13:69:7C
Device Model ---
Device Name SENSE-M725000917
After I change Device Model and Name to Test Model and Test Name in web ui, nvram does change to
root@Ksander-ORBI:/# nvram show | grep -i A4:D5:78:13:69:7C
reservation76=192.168.1.210 A4:D5:78:13:69:7C sense
orbi_hid_mac=A4:D5:78:13:69:7C
orbi_dev_name_v2_ntgr76=A4:D5:78:13:69:7C 11 Test Model
access_control25=0 A4:D5:78:13:69:7C 1 24355 SENSE-M725000917 0 0
orbi_dev_type_ntgr76=A4:D5:78:13:69:7C 1 1
orbi_dev_name_ntgr76=A4:D5:78:13:69:7C 24 Test Model
orbi_dev_name76=A4:D5:78:13:69:7C Test Name
but the change is only 1 way (web ui to nvram). It I change nvram, commit, and/or reboot, the change is not reflected in the ui. Changed nvram back:
root@Ksander-ORBI:/# nvram show | grep -i A4:D5:78:13:69:7C
orbi_dev_name_v2_ntgr76=A4:D5:78:13:69:7C 17 Sense
access_control25=0 A4:D5:78:13:69:7C 1 24355 SENSE-M725000917 0 0
orbi_dev_type_ntgr76=A4:D5:78:13:69:7C 1 1
orbi_dev_name_ntgr76=A4:D5:78:13:69:7C 26 Sense
orbi_dev_name76=A4:D5:78:13:69:7C Sense
Web ui stays with Test Name
Having other issue with device type but let's solve one problem at a time.
If you are curious, Sense is a power line monitor. Cool device if you are into cool IoT things.
Thanks,
Scott
ps. happy to post the script if anyone interesting, Basically export master Excel file to cvs. Script run awk script on csv file. Output /etc/hosts and a command file with config set and nvram set. Finally edit dnsmasq.conf to read /etc/hosts, restarts dnsmasq and do the nvram and config commits.
- ekhalilMar 15, 2020Master
After commit, you either need to go in the web ui to >> ADVANCED >> Setup >> LAN Setup and click on Apply, or you need to reboot the router for the changes to take effect.
SLK-Purdue wrote:............ It I change nvram, commit, and/or reboot, the change is not reflected in the ui. ........
............
Yes, I would love to see your script please. Thank you
SLK-Purdue wrote:.............
ps. happy to post the script if anyone interesting, Basically export master Excel file to cvs. Script run awk script on csv file. Output /etc/hosts and a command file with config set and nvram set. Finally edit dnsmasq.conf to read /etc/hosts, restarts dnsmasq and do the nvram and config commits.
- SLK-PurdueMar 15, 2020Luminary
ADVANCED >> Setup >> LAN Setup idea didn't work. Changes made via nvram to name and mfgr where not inserted into web ui. Test Name was still there.
Info on my script is shared via Dropbox in attached file.
You can see the Excel format. Device type is a pulldown to get the varios indicies. Save as CVS and move to ORBI. Telnet session logs shows the rest. Let me know if you have questions.
Scott