I'm setting the routers with a config to use 802.11r.....
So, there some common settings (ieee80211r, mobility_domain, pmk_r1_push) which go in one common template.....and router specific settings (nasid, r1_key_holder) which go in a seperate template for that router.
Now, my question is: when setting these templates, which are object properties under wireless access point, I have to enter radio and ssid settings under both templates (and considering there is a third generic template for wireless settings).....that's 3 templates with radio/ssid settings. Thats 3 templates that HAVE to match....and any mistake will cause a problem.Am I doing something wrong? Or is there a better way of doing it?
(FYI.....my 3 templates do match.....and the resulting configuration does meet expectations)
{ "interfaces": [ { "name": "wlan0", "type": "wireless",
"wireless": { "mode": "access_point", "radio": "radio0", "ssid": "testap",
"ieee80211r": true, "mobility_domain": "e614", "pmk_r1_push": true } } ]}
{ "interfaces": [ { "name": "wlan0", "type": "wireless",
"wireless": { "mode": "access_point", "radio": "radio0", "ssid": "testap", "nasid": "123456789012", "r1_key_holder": "123456789012" } }
]}
OK, Glad to know i was doing something right....I was just about to ask how to order the templates, when I saw on the configuration page, in small letters at the bottom.....drag and drop the order....Perhaps this could be made a bit bolder....
I kept the ints instead of boolean because the documentation i read elsewhere was using int's......i'll change to boolean and try it...
As for optimization......how possible is it to have 'inherited' templates.....so, in my example, Template Router Specific would inherit from Template Roaming..... and therefor not (theoretically) need the duplicate radio and ssid settings.....
Also, I havent found anywhere where I can duplicate/copy a template.....is this possible?
ok, roaming is setup, and initial testing looks extremely promising.....However, in setting up the access points, some keys need to be added to the wifi-iface section, and i'm not sure how/if it can be done in openwisp....
the keys are in the form of:list r0kh '.......'list r1kh '.......As i can tell, using openwisp we can only insert 'option' keys??
I cant quite see it :DThe link appears to be for openwisp, not openwisp2....Unless its the same??
I think i should be editing schema.py in /env/lib/python3.5/site-packages/netjsonconfig/backends/openwrtAm I along the right lines?
The UCI i need is:list r0kh '12:34:56:78:90:12,123456789012,8a7fcc966ed0691ff2809e1f38c16996'list r0kh 'AB:CD:EF:FE:DC:BA,ABCDEFFEDCBA,8a7fcc966ed0691ff2809e1f38c16996'list r1kh '12:34:56:78:90:12,12:34:56:78:90:12,8a7fcc966ed0691ff2809e1f38c16996'list r1kh 'AB:CD:EF:FE:DC:BA,AB:CD:EF:FE:DC:BA,8a7fcc966ed0691ff2809e1f38c16996'
{ "interfaces": [ { "type": "wireless", "name": "wlan0", "wireless": { "network": [ "lan" ],
"mode": "access_point", "radio": "radio0",
"ssid": "somewhere", "hidden": false, "wds": false, "macfilter": "disable", "isolate": false, "wmm": true, "nasid": "123456789012", "ieee80211r": true, "r1_key_holder": "123456789012", "pmk_r1_push": true, "mobility_domain": "dead", "r0kh": [ "12:34:56:78:90:12,123456789012,8a7fcc966ed0691ff2809e1f38c16996",
"AB:CD:EF:FE:DC:BA,ABCDEFFEDCBA,8a7fcc966ed0691ff2809e1f38c16996"
], "r1kh": [ "12:34:56:78:90:12,12:34:56:78:90:12,8a7fcc966ed0691ff2809e1f38c16996",
"AB:CD:EF:FE:DC:BA,AB:CD:EF:FE:DC:BA,8a7fcc966ed0691ff2809e1f38c16996"
], "encryption": { "disabled": false, "protocol": "wpa2_personal", "key": "doesitmatter", "cipher": "auto" } } } ]}
config wifi-iface 'wifi_wlan0' option device 'radio0' option encryption 'psk2'
option hidden '0' option ieee80211r '1'
option ifname 'wlan0'
option isolate '0' option key 'doesitmatter'
option macfilter 'disable' option mobility_domain 'dead' option mode 'ap' option nasid '123456789012' option network 'lan' option pmk_r1_push '1'
list r0kh '12:34:56:78:90:12,123456789012,8a7fcc966ed0691ff2809e1f38c16996' list r0kh 'AB:CD:EF:FE:DC:BA,ABCDEFFEDCBA,8a7fcc966ed0691ff2809e1f38c16996'
option r1_key_holder '123456789012'
list r1kh '12:34:56:78:90:12,12:34:56:78:90:12,8a7fcc966ed0691ff2809e1f38c16996' list r1kh 'AB:CD:EF:FE:DC:BA,AB:CD:EF:FE:DC:BA,8a7fcc966ed0691ff2809e1f38c16996'
option ssid 'somewhere' option wds '0' option wmm '1'
Just to add another question into the same thread...... nasid, r1_key_holder, and the parts of r0kh/r1kh are the router's BSSID......any way to automate/generate those entries automatically?
--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ok, That works fine.I've just noticed how to do that via the gui...... You add an object properties as an array..... ;)
2 points i'd like to make from this:1. If you add the array/items via NetJSON, after you've saved it, and reopen the template....The array/items appear in the template, but not in object properties.....by design or bug?
2. If you add an object in one template, would it be possible/useful for that object to be available in all templates?
Oh.. I know what's happening, that's the object properties button for the encryption settings, look for the button for the wireless settings.
Annoying.. A better JSON-schema autogenerated UI would be very helpful.
--
When using multiple templates, their order is important. Templates coming after override templates that come first (I just noticed I did not explain this properly in the netjsonconfig documentation).