What's new

Saving and loading the wireless mac filter lists

  • 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!

mightyoakbob

Regular Contributor
I've made a lot of progress this morning with working out how to load and save various bits of the nvram settings. I would also like to be able to save load the mac filter list.

I have have discovered that the 2.4 GHz mac filter list can be obtained with this...

nvram get wl0_maclist_x > /mnt/Home/Bob/24maclist.txt

This works EVEN for ME!!

But the 5.0 GHz list seems to be in two variables and these are..

wl1_maclist_x AND wl_maclist_x

Which should I use to restore the settings after a factory reset?

Another question about restoring the data.. I've read and seen two methods of doing this will both work as well as each other?

nvram set varname="'cat /mnt/Home/Bob/filename'"
And
nvram set varname=$(cat /mnt/Home/Bob/filename

Are both of the above the same and is my syntax correct?

Am I correct in thinking I need to use nvram commit with either of them?


Thanks everyone. You can probably see I am at last starting to get to grips with this now. Nearly there at last.


Cheers.

Bob.
 
I've made a lot of progress this morning with working out how to load and save various bits of the nvram settings. I would also like to be able to save load the mac filter list.

I have have discovered that the 2.4 GHz mac filter list can be obtained with this...

nvram get wl0_maclist_x > /mnt/Home/Bob/24maclist.txt

This works EVEN for ME!!

But the 5.0 GHz list seems to be in two variables and these are..

wl1_maclist_x AND wl_maclist_x

Which should I use to restore the settings after a factory reset?

Another question about restoring the data.. I've read and seen two methods of doing this will both work as well as each other?

nvram set varname="'cat /mnt/Home/Bob/filename'"
And
nvram set varname=$(cat /mnt/Home/Bob/filename

Are both of the above the same and is my syntax correct?

Am I correct in thinking I need to use nvram commit with either of them?


Thanks everyone. You can probably see I am at last starting to get to grips with this now. Nearly there at last.


Cheers.

Bob.

I can't specifically answer your questions (I use the first syntax you mention, and decided to save/restore BOTH of those variables), but here is another example of what you're trying to do which may help.

http://forums.smallnetbuilder.com/showpost.php?p=100529&postcount=4
 
I've made a lot of progress this morning with working out how to load and save various bits of the nvram settings. I would also like to be able to save load the mac filter list.

I have have discovered that the 2.4 GHz mac filter list can be obtained with this...

nvram get wl0_maclist_x > /mnt/Home/Bob/24maclist.txt

This works EVEN for ME!!

But the 5.0 GHz list seems to be in two variables and these are..

wl1_maclist_x AND wl_maclist_x

Which should I use to restore the settings after a factory reset?

The firmware uses what I call "settings instancing". Basically, the web interface lets you edit the content of wl_xxx. When you save your settings, the web interface writes all its wl_xxx settings to the flash. Then, the router checks if you just edited the 2.4 GHz settings or 5 GHz settings, and it will copy the wl_xxx settings you just saved to either to wl0_xxx (2.4 GHz) or wl1_xxx (5 GHz).

So when settings exist in blah_xxx, blah0_xxx and blah1_xxx form, you only need the numbered instance - the unnumbered one is just a temporary save location used by the web interface.

Instancing is used with wifi (wl_), wan (wan_), OpenVPN (vpn_server_ and vpn_client_), and a few other areas.
 
So when settings exist in blah_xxx, blah0_xxx and blah1_xxx form, you only need the numbered instance - the unnumbered one is just a temporary save location used by the web interface.

Brilliant absolutely brilliant, a complete and full explanation which incredibly I actually understand and can use.

Thanks Merlin you are a star.


Cheers,

Bob.
 

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