Search code examples
openwrt

Why can't I access the OpenWRT Web UI in Access Point Only Mode?


I have a main router with a dhcp and dns service.

An additional router, a Netgear R7800 Nighthawk X4S, is connected over wire to the main router which I will use to extend the wireless coverage.

Because I have a relatively small simultaneous device count (home network), I decided to use the main router's DHCP and DNS services.

On the additional (aux) router, I stopped the dhcp service and the dns:

/etc/init.d/dnsmasq disable && /etc/init.d/dnsmasq stop
/etc/init.d/firewall disable && /etc/init.d/firewall stop

I disabled the WAN settings:

#config interface 'wan'
#        option ifname 'eth0'
#        option proto 'dhcp'

#config interface 'wan6'
#        option ifname 'eth0'
#        option proto 'dhcpv6'

I adjusted the switch to include the WAN port (unsure why ports 0 and 5 are WAN and not just 0) THIS STEP COULD BE MY MISTAKE:

#config switch
#        option name 'switch0'
#        option reset '1'
#        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 4 5 6' # added WAN ports 0 and 5

#config switch_vlan
#        option device 'switch0'
#        option vlan '2'
#        option ports '5 0'

The 'lan' interface looks like this:

config interface 'lan'
        option ifname 'eth1 switch0'
        option type 'bridge'
        option proto 'static'
        option ipaddr '10.0.1.3' # MAC reservation on main router
        option netmask '255.255.255.0'

I could connect and get an IP from the main router, but I could not ping my new router, nor access it over SSH or access the Web UI. What am I missing?


Solution

  • Well, turned out to be the stupidest thing.

    While this line in my lan configuration appears flawed:

        option ifname 'eth1 switch0'
    

    and is now just

        option ifname 'eth1'
    

    The issue has to do with MAC addresses of two physical ethernet devices on the Netgear R7800. My router's dhcp server had a static ip address reserved for the eth0 device and not for eth1.

    I opened a follow-up question to tackle the MAC address disambiguation problem here: https://unix.stackexchange.com/q/479231/33386

    To get things working for the time being, I just left the WAN eth0 CPU interface on its own line. I added a new static ip address reservation on the main router for eth1 (keeping the one for eth0 just in case I need it again). I moved the wired connection from WAN to one of the LAN ports and set up the LAN ports as a simple access point only (no DHCP or firewall).