Router not assigning IP addresses with DHCP on wireless

When I plug in to the router via Ethernet I get ipv4 and v6 addresses, however I will not get assigned anything when I connect via WiFi.

I am not sure where to start here. I tried editing the share interfaces in the wireless section, but that didn't work either.

/etc/config/dhcp

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

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.auto'
	option localservice '1'
	list server '8.8.8.8'

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

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'

/etc/config/network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdce:aa25:2612::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device 'lan_eth0_dev'
	option name 'eth0'
	option macaddr '04:d4:c4:63:f9:90'

config interface 'wan'
	option proto 'dhcp'
	option type 'bridge'
	option ifname 'eth0 eth1'

config device 'wan_eth1_dev'
	option name 'eth1'
	option macaddr '04:d4:c4:63:f9:94'

config interface 'wan6'
	option ifname 'eth1'
	option proto 'dhcpv6'
	option type 'bridge'

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

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '1 2 3 4 0'

/etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option path 'platform/soc/a000000.wifi'
	option htmode 'HT20'
	option channel 'auto'

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

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11a'
	option path 'platform/soc/a800000.wifi'
	option htmode 'VHT80'
	option channel 'auto'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option mode 'ap'
	option key 'redacted'
	option ssid 'redacted'
	option encryption 'psk2'
	option network 'lan wan6 wan'

I solved my issue. I was assigning multiple interfaces to the WiFi interfaces, I should have only selected the LAN interface.

2 Likes

And you bridged WAN to LAN.

2 Likes

I think I am, but I'm not 100% sure. I have a modem and it is directly connected to my router.

Remove the Bridge interfaces check and choose eth1

2 Likes

@StealthBadger747

As @LGA1150 pointed out, you shouldn't bridge WAN and LAN. That's incorrect and is a security threat.

@Hegabo @LGA1150
Thanks for the advice. I will do that soon.

I'm not sure why it was the default setting though.

@Hegabo @LGA1150
Does this look correct?


2 Likes

Also on a side note, how do I go about using IPv6? As far as I can tell it is enabled, but what really is wan6?

It is the wan interface responsible for IPv6. Check with ifstatus wan6 if it has acquired the settings from upstream.

2 Likes