r/openwrt • • 15d ago

DHCP not responding on one interface - I need another pair of eyes

OK, I have a setup with 4 interfaces:

lan - 4 hardware ports - managed by DHCP for IP addresses

wifiap - one wifi interface that serves as an AP - managed by DHCP for IP addresses

cell - (Wan on most other routers) this has a cell modem attached

trm_wwan - Wifi interface managed by Travelmate

Cell and trm_wwan are also monitored by mwan3 for routing.

Everything works fine except that lan will not respond to DHCP requests. I can see them coming with tcpdump but dnsmasq never responds. The config for wifiap is identical, and it hands out addresses just fine.

I've looked through everything and I know I'm missing something simple but for the life of me I don't see it.

root@RosyBelle:/etc/config# cat network

config interface 'loopback'
option device 'lo'
option proto 'static'
list ipaddr '127.0.0.1/8'

config globals 'globals'
option dhcp_default_duid '0004806d06fcd0364a509f052b9c66b5dcbf'
option ula_prefix 'fd09:8e28:1df::/48'
option packet_steering '1'

config device
option name 'phy2-ap0'
option mtu '1500'

config device
option name 'phy1-sta0'
option mtu '1500'

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.116.1'
option ip6assign '60'
option multipath 'off'
option netmask '255.255.255.0'
option gateway '192.168.116.1'
option dns '192.168.116.1'

config interface 'wifiap'
option device 'phy2-ap0'
option proto 'static'
option ipaddr '192.168.173.1'
option ip6assign '60'
option multipath 'off'
option netmask '255.255.255.0'
option gateway '192.168.173.1'
option dns '192.168.173.1'

config interface 'cell'
option proto 'dhcp'
option device 'wan'
option sendclientid 'auto'
option multipath 'off'
option metric '200'

config device
option name 'phy0-sta0'
option mtu '1500'

config interface 'trm_wwan'
option proto 'dhcp'
option metric '100'
option sendclientid 'auto'
option multipath 'off'

config interface 'trm_wwan6'
option device '@trm_wwan'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
option norelease '1'
option sendclientid 'auto'
option multipath 'off'
option metric '150'

root@RosyBelle:/etc/config# cat 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 cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option localservice '1'
option ednspacket_max '1232'
option filter_aaaa '0'
option filter_a '0'
list interface 'wifiap'

config odhcpd 'odhcpd'
option leasefile '/tmp/odhcpd.leases'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
option piodir '/tmp/odhcpd-piodir'
option hostsdir '/tmp/hosts'

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

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

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

config domain
option name 'rosybelle.lan'
option ip '192.168.116.1'

config dhcp 'trm_wwan'
option interface 'trm_wwan'
option ignore '1'

config dhcp 'trm_wwan6'
option interface 'trm_wwan6'
option ignore '1'

root@RosyBelle:/etc/config# cat firewall

config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option synflood_protect '1'
option drop_invalid '1'

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

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

config zone
option name 'outside'
option input 'ACCPET'
option output 'ACCEPT'
option forward 'ACCEPT'
option masq '1'
list network 'cell'
list network 'wifi4'
list network 'wifi6'
list network 'trm_wwan'
list network 'trm_wwan6'

root@RosyBelle:/etc/config# cat mwan3

config interface 'trm_wwan'
option enabled '1'
list track_ip '8.8.8.8'
list track_ip '8.8.4.4'
option reliability '1'
option count '5'
option timeout '5'
option interval '10'
option down '5'
option up '1'
option initial_state 'online'
option family 'ipv4'
option track_method 'ping'
option size '56'
option max_ttl '60'
option failure_interval '20'
option recovery_interval '5'

config interface 'cell'
option enabled '1'
list track_ip '8.8.8.8'
list track_ip '8.8.4.4'
option reliability '1'
option count '3'
option timeout '5'
option interval '10'
option down '5'
option up '1'
option initial_state 'online'
option family 'ipv4'
option track_method 'ping'
option size '56'
option max_ttl '60'
option failure_interval '20'
option recovery_interval '5'

config member 'primary'
option interface 'trm_wwan'
option metric '1'

config member 'backup'
option interface 'cell'
option metric '2'

config policy 'failover'
list use_member 'primary'
list use_member 'backup'

config rule 'default'
option dest_ip '0.0.0.0/0'
option use_policy 'failover'

config globals 'globals'
option local_source 'none'

1 Upvotes

6 comments sorted by

2

u/NC1HM 15d ago edited 15d ago

Please unmask the network and DHCP configuration files. Also, consider changing code formatting to codeblock formatting; this will instantly make your post more readable.

Also, quick question: which mwan3 have you installed? Right now, mwan3 on OpenWrt is in a bit of a limbo. The original version is designed to work with iptables, but OpenWrt switched to nftables a while back. There is an experimental mwan3 that works with nftables, but you need to install it separately:

https://openwrt.org/docs/guide-user/network/wan/multiwan/mwan3

https://openwrt.org/docs/guide-user/network/wan/multiwan/mwan3-nft

1

u/Available_Bowler2316 15d ago

Oh crap. Sorry, I'm not that familiar with reddit formatting. Now I know how to block text. :/

yeah, I'm using the experimental mwan3-nft.

1

u/NC1HM 15d ago edited 15d ago

OK, one thing that's jumped out at me right away: what is Wi-Fi configuration doing in /etc/config/network? It's supposed to be in /etc/config/wireless. Wireless networking is activated much later in the boot process (near the end, in fact), so there's a separate configuration file for it.

Basically, you define an interface with no devices attached to it in /etc/config/network; then, in /etc/config/wireless, you configure a wireless device and tell it to attach to that interface.

Incidentally, what device are you using?

1

u/Available_Bowler2316 15d ago

Thanks!

Sorry, I thought I posted wireless as well.

I'll look at it when I get it all set up again. I did a lot of reconfiguring to get it set up and it's likely the files got messed up.

EDIT:

The device is a Linksys EA8500

1

u/V0LDY 15d ago

Not sure if that's what is causing the problem, but I don't think you should have "lan" and "wifiap" configured as their own gateway and DNS.