Access DumbAP when main AP goes down

Hi there,

I've followed this relay_configuration (https://openwrt.org/docs/guide-user/network/wifi/relay_configuration) and have it working as expected. I have essentially the same network topology shown in the diagram.

However the issue I'm trying to resolve is that I do not have a way to wirelessly access the DumbAP/relay bridge router when the main router goes down.

Is there a simple way to set that up? I've tried to create a new interface with a new wifi network on the dumb ap but must have some of the configs wrong.

I'd recommend a wired configuration to do this... depending on the specific hardware you are using, the radios on the relay device may be down as a function of the the upstream wifi network not being available. A wired connection will still work, provided that you give it a static IP address (you could even create a unique management subnet for this device).

if your openwrt device is dualband i think you can do that using a fixed ip adrress on your pc. dhcp is disabled on lan to make relay work.
so if your openwrt device is 192.168.2.1, use static address 192.168.2.2 on your pc.
that should work.

If you're running AP and STA on the same radio, the AP will shut down when the STA loses contact with its AP. This is because the radio resources are directed to scanning channels trying to re-establish contact. The travelmate package can be used to work around this. It will disable the STA and allow the local AP to function until the upstream AP is detected again.

2 Likes

I've tried to do this but I'm not sure what I need to change.

I tried adding a new interface for one of the lan ports but that didn't work when the wireless connection was lost.

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

Will the travelmate package allow me to be on the same subnet as the primary AP? If I use this package do I just not configure the relayd method that I used before or do they work together?

An issue with the travelmate package that conflicts with my current setup is that it does not allow me to make "Master" stations on the radio that I'm using for the uplink.

root@OpenWrt:~# cat /etc/config/network

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'

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'

config interface 'trm_wwan'
        option proto 'dhcp'
        option metric '100'

config interface 'trm_wwan6'
        option device '@trm_wwan'
        option proto 'dhcpv6'

root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option band '2g'
        option htmode 'HT20'
        option channel 'auto'
        option cell_density '0'
        option country 'US'

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

config wifi-device 'radio1'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
        option band '5g'
        option htmode 'VHT80'


config wifi-iface 'wifinet3'
        option device 'radio1'
        option mode 'sta'
        option network 'wwan'
        option ssid 'H5'
        option encryption 'psk2'


config wifi-iface 'wifinet2'
        option device 'radio0'
        option mode 'ap'
        option ssid 'Hd'
        option encryption 'psk2'
        option network 'lan'

config wifi-iface 'wifinet4'
        option device 'radio1'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
        option disabled '1'

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'

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

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

root@OpenWrt:~# cat /etc/config/firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'
        list network 'wwan'

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan6'
        list network 'trm_wwan'
        list network 'trm_wwan6'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

So if you plug into the ethernet port and try to access via 192.168.1.1, does it work? Keep in mind, your computer may still have an IP address on the 192.168.2.0/24 network, so you may have to set a static IP address on your computer (for example, 192.168.1.5 with subnet 255.255.255.0)

Yes it works as you describe if the wireless connection between the two routers is maintained, but if I disconnect the wireless connection then I lose all ability to access and have to go through a TFTP recovery process.

What about wired from the repeater to your computer? Set your computer to a static IP as I suggested earlier (on the ethernet interface):

Yes I have been trying to answer that question. I have tried exactly what you describe and what happens is it works fine until the wireless is disconnected.

For instance if I turn off the wifi on my computer, set the ethernet port on my computer to static 192.168.1.5 and subnet 255.255.255.0 then I can access OpenWrt from the computer until I disconnect the wireless link between the two routers.

make sure your computer is not using wifi. Turn wifi off entirely.

Yes, I turn off wifi on the computer entirely.

I wonder if the issue is the bridge.

try removing lan4 from br-lan.

Then create a new bridge and interface

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'

create a new firewall zone for this network

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

Then plug your computer into lan4 and set the ethernet to a static IP in that network (192.168.5.5 as an example).

Keep in mind that it should be physical port lan4, but there is always a possibility that the logical ports and physical ports may be labeled differently -- so if it doesn't work, try the other ports.

set pc ip 192.168.1.2
when you are done you can use dhcp on your pc

How can I do this? I don't see any options in luci and don't know how to do it with uci.

set pc ip 192.168.1.2
when you are done you can use dhcp on your pc

This doesn't work when the wireless link goes down.

really, i did that all the time, i'm not using relay right now for testing

Okay, I removed lan4 from br-lan using vi to open /etc/config/network and editing that file. In the process of trying the rest.

After trying this:

try removing lan4 from br-lan.

Then create a new bridge and interface

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'

create a new firewall zone for this network

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

Then plug your computer into lan4 and set the ethernet to a static IP in that network (192.168.5.5 as an example).

Keep in mind that it should be physical port lan4, but there is always a possibility that the logical ports and physical ports may be labeled differently -- so if it doesn't work, try the other ports.

I could no longer access the device (tried all lan ports and manually set Ethernet port) and had to go through the TFTP recovery, OpenWrt factory install, upgrade, and restore.

For reference I have this device (Cudy WR1300 v1 (mt7621 subtarget) MediaTek MT7603E, MediaTek MT7612E