Thanks for the info but i think i (finally) found the right way to do what 
i want.

So the target was to make a template for multiple SSIDs (separated by 
vlans) for a openwrt as dump AP.

* I dont touch the default LAN bridge (linked to eth0.1), here i configure 
the fixed or static IP for the dump AP so i can do the management.

The dump AP is connected to a smart switch. There is always 1 untagged 
subnet (the untagged subnet is different by location..)and different tagged 
subnets on the uplink to the dump ap.
The subnets are:
10.30.52.0/24 - vlanid: 52 - (wifi1)
10.30.53.0/24 - vlanid: 53 - (wifi2)
10.30.54.0/24 - vlanid: 54 - (wifi3)
10.30.55.0/24 - vlanid: 55 - (wifi4)
10.30.50.0/24 - vlanid: 50 - (wifi5)
192.168.1.0/24 - vlanid: 192 - (wifi6)

Right now i have 3 locations.
Location1: UT 10.30.52.0/24 and the rest is tagged
Location2: UT 192.168.1.1/24 and the rest is tagged
Location3: UT 10.30.52.53/24 and the rest tagged.

Its a bit of a shame the locations have different untagged subnets, because 
now we need double templates.

So every subnet has 2 templates because the subnet can be untagged or 
tagged depending on location.
example template for the 10.30.52.0/24 subnet on location3

when tagged:
{
    "interfaces": [
        {
            "type": "bridge",
            "bridge_members": [
                "eth0.52"                                 #this is the 
"Software Vlan comming from the switch VID"
            ],
            "name": "wlan52",                     #wlan interface name
            "autostart": true,
            "network": "vif_vlan_52",         #(Bridge) Interface name
            "disabled": false,
            "addresses": [],
            "wireless": {
                "mode": "access_point",
                "radio": "radio0",
                "ssid": "Wifi1",
                "encryption": {
                    "key": "**********",
                    "protocol": "wpa2_personal",
                    "cipher": "ccmp"
                },
                "isolate": false,
                "wmm": true,
                "wpa_disable_eapol_key_retries": true
            },
            "delegate": 0,
            "force_link": 1
        }
    ],
    "switch": [
        {
            "name": "switch0",
            "enable_vlan": true,
            "reset": true,
            "vlan": [
                {
                    "ports": "0t 1t 2t 3t 4t",
                    "vlan": 5,
                    "device": "switch0",
                    "vid": "52",
                    "id": "switch0_vlan52"
                }
            ]
        }
    ]
}

So we create a WLAN, switch vlan and bridge them together in vif_vlan_52.

This template works great when vlan52 is tagged on the uplink of the dump 
AP.

When vlan52 is configured as primary vlan (like location 1) on the uplink 
we don't need to create a switch config and need to add vlan1 in the 
wireless bridge, like his:

{
    "interfaces": [
        {
            "type": "bridge",
            "bridge_members": [
                "eth0.1"
            ],
            "name": "wlan52",
            "autostart": true,
            "network": "vif_vlan_52",
            "disabled": false,
            "addresses": [],
            "wireless": {
                "mode": "access_point",
                "radio": "radio0",
                "ssid": "Wifi1",
                "encryption": {
                    "key": ""**********"*",
                    "protocol": "wpa2_personal",
                    "cipher": "ccmp"
                },
                "isolate": false,
                "wmm": true,
                "wpa_disable_eapol_key_retries": true
            },
            "delegate": 0,
            "force_link": 1
        }
    ]
}

We just change the Software Vlan to eth0.1 in the bridge.

I would be great if we can change/override some template settings on device 
level! That way i can use the first template but override the bridge config 
when the AP is linked on a different PVID.

I took me way too long to figure this out so maybe it can help someone in 
the future.




Op zaterdag 22 september 2018 20:43:35 UTC+2 schreef Oliver Kraitschy:

    On Sat, Sep 22, 2018 at 08:48:28AM -0700, JeroenR wrote:
    > Hi Guys,
    >
    > Awesome project!
    >
    > Why can't we create a wifi-iface without an interface?
     
    Hi,

    this is rather an OpenWrt question than an OpenWISP question :-)

    I would argue that you need an interface because most services use an
    interface, not a wifi interface :-)

    The documentation on wifi interfaces

    https://openwrt.org/docs/guide-user/network/wifi/basic#wifi_interfaces

    states that the option network (OpenWISP uses the option ifname instead)
    is required for a wifi interface. Which is what you mentioned - you need
    to reference an interface for this wifi interface.

    Additionally, you need an interface anyway to configure the IP address,
    may it be a static address or assigned via DHCP.

    Greetings,
    Oliver 

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to