What's new
  • 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!

GNP NVRAM setting question and Script advice

kstamand

Regular Contributor
Looking for scripting advice on how best to parse the Guest Network Pro (GNP) nvram vlan_rl value??

nvram vlan_rl value question
My setup has 3 custom GNP VLAN where the nvram setting vlan_rl has the value <1>52>0><2>53>0><3>54>0>
My understanding is that vlan_rl consists of columns of information >> SDN # (1, 2, or 3 in my case), Bridge Interface number (52, 53, or 54), and I'm not sure what the third field is for (0)
Question 1 - what is the third column of information in the nvram setting vlan_rl in each of the three SDN (0 in my case)?

Script question/advice, related to the nvram vlan_rl setting
My understanding is that the SDN number can be 1 - 2 characters, as can the Bridge Interface number, and I'm going to assume that third value can be 1 - 2 characters as well. I also understand there can be a variable number of SDN (1 - 9 or more)
Question 2 (I'm not sure how best to ask, but ..), is there some pattern matching magic that allows me to dynamically loop through the nvram vlan_rl string and pull out each SDN combination of information (SDN #, Bridge Interface #, third ??) into an array or separate variables - Something like SDN#: value, BR#: value, XX#, value??

Goal is to have a "somewhat" dynamic DNSMASQ-SDN.POSTCONF for dnsmasq customizations
Currently, my dnsmasq-sdn.postconf has hard coded SDN# references for adding different domain names (and potential other information) for each VLAN (e.g., vlan 1 = home.lan, vlan 2 = adults.lan, ...) and it's working well.
I'm just looking to enhance my scripting skills.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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