Can't get DHCP on WiFi

Hi everyone.

I was configuring my Archer C6 with OpenWrt.
I have some VLANs and they work perfectly by cable. But by WiFi I can't get DHCP. I saw a similar issue here, but it was solved by restarting "dnsmasq". Well, that didn't work.

I'm sending my config files below.

cat /etc/config/firewall

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

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

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'

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'

config zone
	option name 'zone_own'
	list network 'INT_OWN'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'

config zone
	option name 'zone_iot'
	option forward 'REJECT'
	list network 'INT_IOT'
	option input 'ACCEPT'
	option output 'ACCEPT'

config zone
	option name 'zone_guest'
	option forward 'REJECT'
	list network 'INT_GUEST'
	option input 'REJECT'
	option output 'ACCEPT'

config forwarding
	option src 'zone_own'
	option dest 'wan'

config forwarding
	option src 'zone_own'
	option dest 'zone_iot'

config forwarding
	option src 'zone_guest'
	option dest 'lan'

config rule
	option name 'Allow-GUEST_DHCP'
	option src 'zone_guest'
	option dest_port '67-68'
	option target 'ACCEPT'

config rule
	option name 'Allow-GUEST_DNS'
	option src 'zone_guest'
	option dest_port '53'
	option target 'ACCEPT'

config rule
	option name 'Block-GUEST_Private'
	option src 'zone_guest'
	option dest 'lan'
	option target 'DROP'

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 ula_prefix '*'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0.1'
	option ipv6 '0'

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

config interface 'wan'
	option device 'eth0.2'
	option proto 'dhcp'

config interface 'wan6'
	option device 'eth0.2'
	option proto 'dhcpv6'

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

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '1'
	option description 'MGMT'
	option ports '0t 2 3 4 5t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '0t 1'
	option vid '2'
	option description 'WAN'

config device
	option type 'bridge'
	option name 'br-iot'
	option mtu '1500'
	option macaddr '*'
	list ports 'eth0.30'
	option ipv6 '0'

config device
	option type 'bridge'
	option name 'br-guest'
	option mtu '1500'
	option macaddr '*'
	list ports 'eth0.40'
	list ports 'wlan0'
	list ports 'wlan1'
	option ipv6 '0'

config device
	option type 'bridge'
	option name 'br-own'
	option mtu '1500'
	option macaddr '*'
	list ports 'eth0.88'
	list ports 'br-lan.88'
	option ipv6 '0'

config interface 'INT_IOT'
	option proto 'static'
	option ipaddr '172.16.0.254'
	option netmask '255.255.255.0'
	option device 'eth0.30'
	option type 'bridge'

config interface 'INT_GUEST'
	option proto 'static'
	option ipaddr '192.168.1.254'
	option netmask '255.255.255.0'
	option device 'eth0.40'
	option type 'bridge'

config interface 'INT_OWN'
	option proto 'static'
	option ipaddr '172.16.88.254'
	option netmask '255.255.255.0'
	option device 'eth0.88'
	option type 'bridge'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option vid '30'
	option description 'IOT'
	option ports '0t 5t'

config switch_vlan
	option device 'switch0'
	option vlan '4'
	option vid '40'
	option description 'GUEST'
	option ports '0t 5t'

config switch_vlan
	option device 'switch0'
	option vlan '5'
	option vid '88'
	option description 'OWN'
	option ports '0t 5t'

config device
	option type '8021q'
	option ifname 'eth0'
	option vid '30'
	option name 'eth0.30'
	option ipv6 '0'

config device
	option name 'eth0.40'
	option type '8021q'
	option ifname 'eth0'
	option vid '40'
	option ipv6 '0'

config device
	option name 'wlan0'
	option ipv6 '0'

config device
	option name 'eth0'
	option ipv6 '0'

config device
	option name 'eth0.1'
	option type '8021q'
	option ifname 'eth0'
	option vid '1'
	option ipv6 '0'

config device
	option name 'eth0.2'
	option type '8021q'
	option ifname 'eth0'
	option vid '2'
	option ipv6 '0'

config device
	option name 'eth0.88'
	option type '8021q'
	option ifname 'eth0'
	option vid '88'
	option ipv6 '0'

config device
	option name 'wlan1'
	option ipv6 '0'

Thank you in advance.

UPDATE:
Thank you Lleachii. Forgot those. Although, I think It might be a firewall problem.

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'
	option confdir '/tmp/dnsmasq.d'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

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'

config dhcp 'INT_IOT'
	option interface 'INT_IOT'
	option limit '150'
	option leasetime '12h'
	option start '50'

config dhcp 'INT_OWN'
	option interface 'INT_OWN'
	option limit '150'
	option leasetime '12h'
	option start '50'

config dhcp 'INT_GUEST'
	option interface 'INT_GUEST'
	option limit '150'
	option leasetime '12h'
	option start '50'

config host
	option name 'TL-SG108E'
	option dns '1'
	option mac '*'
	option ip '10.10.88.253'

cat /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'pci0000:00/0000:00:00.0'
	option channel '36'
	option band '5g'
	option htmode 'VHT80'
	option cell_density '0'
	option disabled '1'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'platform/ahb/18100000.wmac'
	option band '2g'
	option htmode 'HT40'
	option channel '6'
	option country 'PT'
	option cell_density '1'
	option txpower '5'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option mode 'ap'
	option ssid 'Orangee'
	option encryption 'psk2'
	option key '!8aMb2G973k83P2G36@b'
	option network 'INT_GUEST'
	option disabled '1'

config wifi-iface 'wifinet2'
	option device 'radio1'
	option mode 'ap'
	option ssid 'OHome'
	option encryption 'psk2'
	option key '9F*^T3^j*&#4CU^ej432'
	option ieee80211r '1'
	option mobility_domain '123f'
	option ft_over_ds '0'
	option ft_psk_generate_local '1'
	option network 'INT_OWN'

config wifi-iface 'wifinet3'
	option device 'radio0'
	option mode 'ap'
	option ssid 'OHome5g'
	option encryption 'psk2'
	option key '9F*^T3^j*&#4CU^ej432'
	option network 'INT_OWN'
	option disabled '1'

cat /etc/config/dhcp
cat /etc/config/wireless

?

2 Likes

wlan should not be specified in the network config file... only in wireless.

Meanwhile, you appear to be mixing DSA and swconfig based configuration syntax

The bridge type declaration does not belong in the network interface definition.

There's quite a bit to clean up... I would actually suggest resetting to defaults and then setting up just a single additional network to start. We can help you get that running correctly, and then you can use that as a prototype for creating more, as needed.

1 Like

I used LuCi for almost every aspect of my configuration. That's why everything is on those files.
I'll give it another go then.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.