Help with possible dns/dhcp issue

Hi all.
@ahasbini or anyone else.
You offered to help me with my setup.
I didn't post yesterday because I thought I'd fixed it, as I'd missed some settings from the Dumb Access point guide.
But I'm not too sure I have now as some things still seem to load on the slow side even though speed tests come back at 70mb ( my max is 80mb).
So my setup is a Draytek Modem/router with Wi-Fi disabled and 2 x Netgear WAC104's hard wired with Cat5e one upstairs and one downstairs.
Openwrt firmware : 22.03.2 r19803-9a599fee93 / LuCI openwrt-22.03 branch git-22.288.45147-96ec0cd
I have disabled the firewall, dnsmasq, and odhcpd from startup as well as selecting ignore interface in the DHCP server tab.
I'm just curious if my settings look ok as theres so many additional options in the LAN & DHCP like Dynamic DHCP should i untick that lol.
Thanks
Network Settings:

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 'fd54:ff24:1c85::/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.49'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        list dns '192.168.1.1'

Wireless Settings:

config wifi-device 'radio0'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option band '5g'
        option htmode 'VHT80'
        option channel '100'
        option country 'GB'
        option cell_density '0'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid '*********'
        option encryption 'psk2'
        option key '**********'
        option ieee80211r '1'
        option mobility_domain 'ab12'
        option ft_over_ds '0'
        option ft_psk_generate_local '1'

DHCP Settings:

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'
        option dhcpv6 'disabled'
        option ra 'disabled'

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'
1 Like

Looks sane to me, and most isn't relevant, since you've stopped the services.

Read this post + links about channel selection Netgear WAX202 on 22.0.3.2 - #4 by lleachii

3 Likes

Thanks for that.
Good to know my settings aren't far off,
I'll try adjusting the channels I did do the scan and selected quieter channels.
Would it be best having both access points on the same channel at the moment ones on 80 and the other 100 I think.

I have my both APs running on the same chan, I belive it helps the client roaming between them,
but I've never tried separating them, it works flawlessly, as it is, with 802.11r enabled.

AFAIK there's no chan 80, and 100 is a bad one, check the graphics in the other thread.

100 < 102 < 106 < 114

2 Likes

Thanks I was just guessing at the channels I couldn't remember I've just logged on and they are on 60 and 100.
From what I can tell I'm not getting the option of selecting a 80mhz channel all the ones listed are 20mhz aren't they ?



80 is the channel width, not the actual frequency, why only 20MHz frequencies are
available, I don't know, but it might be due to hw limitations ... It's a AC1200 device, after all.

1 Like

Ah yeah that makes sense.
I was on the edge of buying some ubiquiti access points as the WiFi hasn't been great in our house but I thought I'd try Openwrt with these access points first and it does seem far more reliable just them odd few moments, plus I can only get 80mb max in my town anyway :disappointed_relieved:

See: https://www.silextechnology.com/unwired/changes-to-the-5ghz-wi-fi-band-in-the-uk

Correct, you always configure the base 20 MHz channel. Maybe this picture will help better - here's a 40 MHz example:

screen201

So 100 should work.

BTW, did you see this?

screen202

It seems OK.

1 Like

Thanks for that, yeah I saw it said 80MHz which confused me even more.
I was looking on the Netgear and someone said "WAC104 doesn't support channel 100-144 (DFS channels)" so I'm guessing this device wouldn't be able to use the new available channels.
I can't find any kind of data sheet at the moment so I set them to the next one down 64MHz and set to 20MHz width.
And on the channel scan I see the message about 40MHz intolerant on my other access point.

My apologies, I wasn't aware you intentionally wanred a 20 MHz channel. OK.

I'm not sure how your other AP is relaated.

Hlad you got it working.

I was only putting it onto 20Mhz as I thought the AP didn't support 80mhz.
But with you pointing out the 80 listed in the channel search I've changed them both back to 64 channel 80 wide.
Thanks

1 Like

Hi, to start off I got a couple of them running and using all the time with my family and they are very good once I made a solid setup. I have them running with 21.02.3, but knowing that the 22.03.X is mostly a change with the firewall, I don't think the version difference will be a big deal (unless mentioned otherwise). Also my main internet router is a Openwrt x86_64 box.

This will be quite a long post, I'll share my config with reasons behind certain decisions, and quote some of the posts above in hopes of finding where the slowness is. I do like to mention (but please take it with a grain of salt) that at times the netgear does behave slow in terms of loading the luci and logging into it only when then network around is down, I noticed this slowness early on when I got them and was working on them with flashing and configuring them (connected over ethernet not WiFi), but after I completed the configuration and got everything connected everything became really smooth and I never felt slow while loading luci or logging in. In case you're seeing the same slowness (like luci taking about 20 or 30 seconds or more to load the status page), then it may indicate that something is still not properly configured.

Here's my /etc/config/network. It is very similar to yours except for one thing which is I'm leaving the interface 'lan' to have a static IP only without the dns and gateway, and then I added a macvlan which will get the IP address automatically from the main router, the reason behind this is beneficial for having control on the DHCP settings and using hostnames instead of IP addresses for accessing the dumb APs. I highly recommend to try it, what will happen is the netgear will sort of have two IPs, one that is static and another that is dynamic from DHCP and it will be accessible from either, it will still act as a dumb AP with no problems and also access the internet for downloading packages/updates for itself (over the macvlan). Note: To setup the macvlan, first install kmod-macvlan before modifying /etc/config/network (opkg update && opkg install kmod-macvlan), then modify /etc/config/network as per the below.

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 'fd54:ff24:1c85::/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 netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.1.15'

config device
        option type 'macvlan'
        option ifname 'br-lan'
        option mode 'bridge'
        option name 'br-lanmac0'
        option acceptlocal '1'

config interface 'macvlan'
        option proto 'dhcp'
        option device 'br-lanmac0'

Here's my /etc/config/wireless (snippet of important parts, don't focus on the fast roaming for now). The netgear has two WiFi modules, the 2.4GHz (option band '2g') and 5GHz (option band '5g'). It is best to choose a channel with least amount of interference, plus the dumb APs should have different channels so not cause interference on each other, on first AP I choose channel 1 and 36 for 2.4GHz and 5GHz respectively, on second AP I choose channel 6 and 44. For the width I choose 20MHz for 2.4Ghz and 40MHz for 5GHz. I did quite some research on both the width and channel and have some points to tell you about:

  1. Choose a bigger/higher width number for 5GHz but not too big so to not cause interference with APs, also bigger width will have higher speed with WiFi. 80MHz is like the sweet spot for 5GHz so long there isn't much other APs on the same channel (I didn't choose it though cause of interference), 40MHz will be more than fine because your internet speed 80Mb. If your APs are gonna overlap when using 80Mhz, then switch to 40MHz to minimize the overlap/interference.
  2. I read about certain channels in 5Ghz (DFS and non-DFS, radars and such, picture and article for reference), I decided to use green ones which are between 36 and 48. IIRC the channels between 149 and 165 are not supported by netgear wac104 (I at least remember that if I select an unsupported channel the WiFi does not broadcast the SSID at all). So best to stick to 36 to 48, it may be tricky but try.
  3. Don't choose 40MHz for 2.4GHz, many mention that it is rarely optimal.
  4. It is a really good idea to also look at Ubiquiti WiFiMan app on iOS/Android, its very helpful to compare with the scans from openwrt. Look for a spot in the room with the least interference and see if you could place your AP there while maintaining range/coverage.

In your config I could expect that that there may be quite some interference and bad roaming going on which could cause some intermittent disconnections and such. Try to remove the fast roaming parts and configure your channels and bandwidth again, then test it for a while (day or two).

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

config wifi-device 'radio1'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option channel '36'
        option band '5g'
        option cell_density '0'
        option htmode 'VHT40'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'SSID_5G'
        option encryption 'psk2'
        option key 'KEY'

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

Your /etc/config/dhcp matches mine. In case your going to use the macvlan then add the below:

config dhcp 'macvlan'
        option interface 'macvlan'
        option ignore '1'
        list ra_flags 'none'

Last but not the least, though I believe that you have already applied them from the dumb AP guide but just incase, disable firewall, odhcpd, dnsmasq and reboot (very important to reboot):

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

Add the below to the /etc/rc.local for persisting changes after OpenWrt upgrades:

# these services do not run on dumb APs
for i in firewall dnsmasq odhcpd; do
  if /etc/init.d/"$i" enabled; then
    /etc/init.d/"$i" disable
    /etc/init.d/"$i" stop
  fi
done

You can check if they are disabled from luci GUI or using the below (should output inactive):

/etc/init.d/dnsmasq status
/etc/init.d/odhcpd status
/etc/init.d/firewall status

When you could, share with us your ping times and nslookup times from one of the dumb APs:

ping -c 6 8.8.8.8
time nslookup openwrt.org
time nslookup openwrt.org 8.8.8.8

Hope this help! :smile:

1 Like

You already chose 100 while trying, and it broadcasted the SSID, so it is supported.

2 Likes

Thanks for all that info that's great I'll fill through all that tomorrow as it's getting late here now.
I can't say I've noticed any lag when loading the luci UI it's actually been quite smooth on both APs.
Do you happen to have a link on all the SSH commands available to use to get the info, I tried looking in the docs but couldn't see anything.
Today I've been quite happy with how things have been with decent speeds and things snappy etc.
But literally 5 mins ago I was on the Twitter app and clicked on one of the trends and non of the profile picture thumbnails loaded or the video wouldn't play so I turned wi-fi off and onto mobile data and they loaded straight away.
And now WiFi's back on its loading things fine again.
But I'll go through your suggestions tomorrow, I'm wondering wether it's my phone now as I've not experienced it yet on my laptop.
Thanks for the help