Skip to content

[change] When adding a Wireless config, should it add an interface? #289

Closed
@thiagohflima

Description

@thiagohflima

Scenario

Consider the following network configuration:

  • Two VLANs: 10 and 20
  • Bridges named vlan10 using eth0.10 and vlan20 using eth0.20

The goal is to create two SSIDs for each VLAN:

  • Wifi_VLAN10
  • Wifi_VLAN20

NetJSON Configuration

[
  {
    "wireless": {
      "network": ["vlan10"],
      "mode": "access_point",
      "radio": "radio0",
      "ssid": "WifiVLAN10"
    },
    "type": "wireless",
    "name": "wlan0"
  },
  {
    "wireless": {
      "network": ["vlan20"],
      "mode": "access_point",
      "radio": "radio0",
      "ssid": "WifiVLAN20"
    },
    "type": "wireless",
    "name": "wlan1"
  }
]

This configuration generates the following (showing only wireless-related settings):

Package Network

config device 'device_wlan0'
	option name 'wlan0'

config interface 'wlan0'
	option device 'wlan0'
	option proto 'none'

config device 'device_wlan1'
	option name 'wlan1'

config interface 'wlan1'
	option device 'wlan1'
	option proto 'none'

Package Wireless

config wifi-iface 'wifi_wlan0'
	option device 'radio0'
	option ifname 'wlan0'
	option mode 'ap'
	option network 'vlan10'
	option ssid 'WifiVLAN10'

config wifi-iface 'wifi_wlan1'
	option device 'radio0'
	option ifname 'wlan1'
	option mode 'ap'
	option network 'vlan20'
	option ssid 'WifiVLAN20'

When manually configuring in OpenWRT, it is simplified as follows:

Package Network

There's no config added in network

Package Wireless

config wifi-iface 'wifi_wlan0'
	option device 'radio0'
	option mode 'ap'
	option network 'vlan10'
	option ssid 'WifiVLAN10'

config wifi-iface 'wifi_wlan1'
	option device 'radio0'
	option mode 'ap'
	option network 'vlan20'
	option ssid 'WifiVLAN20'

As observed, the manual configuration lacks the ifname attribute in the wireless package, and no interfaces are created in the network package. While the current configuration works, there's a consideration about simplifying the OpenWisp-generated config. Does this simplification make sense?

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions