Access DumbAP when main AP goes down

Okay so it looks like this now.

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option packet_steering '1'
	option ula_prefix 'fdf0:6942:ae67::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'
	list ports 'wlan0'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option device 'wan'
	option proto 'dhcp'

config interface 'wan6'
	option device 'wan'
	option proto 'dhcpv6'

config interface 'wwan'
	option proto 'static'
	option device 'wlan1'
	option netmask '255.255.255.0'
	option gateway '192.168.2.1'
	list dns '192.168.2.1'
	option ipaddr '192.168.2.2'

config interface 'repeater_bridge'
	option proto 'relay'
	list network 'lan'
	list network 'wwan'

Does that seem correct?

So like this?

config device
    option name 'br-lan'
    option type 'bridge'
    list ports 'lan1'
    list ports 'lan2'
    list ports 'lan3'

config device
  option name 'br-mgmt'
  option type 'bridge'
  list ports 'lan4'

config interface 'management'
  option br-mgmt'
  option proto 'static'
  option ipaddr '192.168.5.1'
  option netmask '255.255.255.0'

Firewall zone for this network:

config zone
  option name 'management'
  option input 'ACCEPT'
  option output 'ACCEPT'
  option forward 'ACCEPT'
  list network 'management'

How would I enable DHCP for this?

Ideally I could do this wirelessly, say with another virtual AP on wlan0. I have the repeater in a relatively difficult place to access and connecting a wire to it is not convenient.

I have for example a smart thermostat and a Chromecast that I want to be able to control if I am connected to the primary AP or the repeater. So I need things to be on the same subnet to avoid the hassle with changing connections as I walk from one side of the building to the other.

I would likely use the package you mentioned if that were the case.

Add this to your dhcp file:

config dhcp 'management'
    option interface 'lan'
    option start '100'
    option limit '150'
    option leasetime '12h'
    option dhcpv4 'server'

Okay great so lan management interface works fine now with the following network configs. Maybe I wasn't accessing properly before. I set computer ethernet to 192.168.1.2 with gateway 192.168.1.1 and plugged into a lan port.

> config interface 'loopback'
> 	option device 'lo'
> 	option proto 'static'
> 	option ipaddr '127.0.0.1'
> 	option netmask '255.0.0.0'
> 
> config globals 'globals'
> 	option packet_steering '1'
> 	option ula_prefix 'fdf0:6942:ae67::/48'
> 
> config device
> 	option name 'br-lan'
> 	option type 'bridge'
> 	list ports 'lan1'
> 	list ports 'lan2'
> 	list ports 'lan3'
> 	list ports 'lan4'
> 
> config interface 'lan'
> 	option device 'br-lan'
> 	option proto 'static'
> 	option ipaddr '192.168.1.1'
> 	option netmask '255.255.255.0'
> 	option ip6assign '60'
> 
> config interface 'wan'
> 	option device 'wan'
> 	option proto 'dhcp'
> 
> config interface 'wan6'
> 	option device 'wan'
> 	option proto 'dhcpv6'
> 
> config interface 'wwan'
> 	option proto 'static'
> 	option device 'wlan1'
> 	option netmask '255.255.255.0'
> 	option gateway '192.168.2.1'
> 	list dns '192.168.2.1'
> 	option ipaddr '192.168.2.2'
> 
> config interface 'repeater_bridge'
> 	option proto 'relay'
> 	list network 'lan'
> 	list network 'wwan'
> 	option ipaddr '192.168.2.2'

I suppose that's good enough. It'd be great to have wifi management access though.

Do you think that's possible?

Since the management network is a bridge, you can add additional physical ports to it either wired or wifi. The wifi should be on the radio that does not have a STA interface though, since the whole radio stops while a STA is unable to link to its AP.

Okay, so I want this wifi network to be the one that I set for wifi management.

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'wifi_SSID'
	option encryption 'psk2'
	option key 'wifi_password'

Would I do something like this in network?

config device
    option name 'br-mgmt'
    option type 'bridge'
    list ports 'radio0'

config interface 'management'
    option br-mgmt'
    option proto 'static'
    option ipaddr '192.168.5.1'
    option netmask '255.255.255.0'

Do not refer to wireless interfaces in /etc/config/network. Use option network in /etc/config/wireless. option network 'management' will ultimately include the wifi AP in br-mgmt. (If there are no Ethernet ports in the bridge, there would be no ports listed in the br-mgmt definition in /etc/config/network) You can confirm this by running brctl show to display the bridges that exist.

I have tried exactly what you describe and what happens is it works fine until the wireless is disconnected.

Two key things:

  • When a wifi STA mode interface loses contact with its AP, all other interfaces on the same radio will shut down.
  • When using relayd, the upstream network is required to serve DHCP. If contact with the upstream network is lost, the relayed network will become inaccessible.

When you say this by relayed network do you mean the 192.168.2.0/24 subnet? It's fine if I can't access the main AP, I just want to be able to configure the router wirelessly.

Also to address the issue you mention about a "wifi STA mode interface" losing contact with its AP, could this be a solution where the STA router would reboot if the hotspot went down?

There are still a couple of questions I have about my current setup.

Keep in mind I currently connect the STA with radio1 to the AP, and I use radio0 to broadcast that network.

Can I have radio0 wlan0-1 broadcasting a different network than wlan0? So wlan0 would be getting IP addresses from the main AP (192.168.2.0/24) and wlan0-1 would be the wireless management interface on a different subnet (192.168.1.0/24).

Is there an alternative to relayd? Main AP is Broadcom STA is MTK so WPA is not an option.

Your PC will be stuck waiting for the broken network to deliver a DHCP IP, so it can't reach anything.

Which is why myself and others suggested a separate network and dedicated Ethernet port and / or wifi SSID for administrative purposes. That network would be complete with a local DHCP server so you can always log in.

Can I have radio0 wlan0-1 broadcasting a different network than wlan0? So wlan0 would be getting IP addresses from the main AP (192.168.2.0/24) and wlan0-1 would be the wireless management interface on a different subnet (192.168.1.0/24).

I'm having trouble figuring out how to configure this in networking.

Yes, you could have multiple SSIDs running on the same radio. This works as long as radio0 does not also have the upstream (wwan) connection -- based on your configuration, it looks like radio1 is used for the sta mode operation, so using radio0 should be not be affected if radio1 goes down.