Not getting IP Address from OpenWrt Router when connected through WiFi Range Extender

Hello All.

I'm a newbie to OpenWRT, still learning how to configure and use it... I am facing a problem with configuring my WiFi Range Extender with the base router.. I tried to find a solution through many forums, but nothing worked... any help is highly appreciated.

I have a Netgear WNDR-3700v1 router (Atheros AR7161) installed with OpenWRT 18.06.2 as my base router, which is connected to my cable modem. Its working perfectly fine with my laptops and mobiles when connected directly through Lan Cable or WiFi.

I have a TP-Link TL-WA855RE v4 Wi-Fi Range Extender in my living room, which is connected to this Netgear base router.

But the Range Extender was not identifying internet. In one of the forums, I found a solution to this - to disable DHCP in the TP Link Range Extender. Without the DHCP in the TP-Link Range Extender, I am able to connect my laptops to the network and connect to internet as well. I get the base routers DHCP IPs on the laptops also.

But my Android mobile devices are not getting the IP address when connected through the Range Extender. I tried almost all permutation combination of the settings in the Range Extender, but nothing worked.

Please help me with a solution.

Below are my /etc/config/network, firewall and wireless settings in OpenWRT.

/etc/config/network


config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '192.168.3.1'
	option netmask '255.255.255.255'
	option gateway '192.168.3.1'

config globals 'globals'
	option ula_prefix 'fdbd:4972:0142::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr '192.168.3.1'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option gateway '192.168.3.1'

config interface 'wan'
	option ifname 'eth1'
	option proto 'dhcp'
	option enabled '1'
	list track_ip '8.8.4.4'
	list track_ip '8.8.8.8'
	option reliability '1'
	option count '1'
	option timeout '12'
	option interval '45'
	option down '5'
	option up '2'
	option metric '10'

config interface 'wanb'
	option proto 'dhcp'
	option enabled '1'
	list track_ip '8.8.4.4'
	list track_ip '8.8.8.8'
	option reliability '1'
	option count '1'
	option timeout '12'
	option interval '45'
	option down '5'
	option up '2'
	option metric '20'
	option ifname 'eth0'
	
config interface 'wan6'
	option ifname 'eth1'
	option proto 'dhcpv6'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'
	option blinkrate '2'
	option enable_vlan4k '1'

config switch_vlan 'eth0_1'
	option device 'switch0'
	option vlan '1'
	option ports '0 1 2 5t'

config switch_vlan 'eth0_2'
	option device 'switch0'
	option vlan '2'
	option ports '3t 5'

config switch_port
	option device 'switch0'
	option port '1'
	option led '6'

config switch_port
	option device 'switch0'
	option port '2'
	option led '9'

config switch_port
	option device 'switch0'
	option port '5'
	option led '2'

/etc/config/firewall


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

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

config zone
	option name 'wan'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'
	option network 'wan wan6 wan2 wanb'

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 src_ip 'fc00::/6'
	option dest_ip 'fc00::/6'
	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 include
	option path '/etc/firewall.user'


/etc/config/wireless


config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'pci0000:00/0000:00:11.0'
	option htmode 'HT20'
	option country 'US'
	option legacy_rates '1'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'xxxxx'
	option encryption 'psk-mixed'
	option key 'xxxxxxxxxxxx'

config wifi-device 'radio1'
	option type 'mac80211'
	option channel '36'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:12.0'
	option htmode 'HT20'
	option disabled '1'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

This one is wrong, revert to original setting:

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '192.168.3.1'
	option netmask '255.255.255.255'
	option gateway '192.168.3.1'

Here you cannot have gateway address the same as the IP.Leave it blanc:

config interface 'lan'
	option gateway '192.168.3.1'

This one also is not correct:

config interface 'wanb'
	option ifname 'eth0'

You have a switch connected to eth0, so you need to use vlans associated with physical ports.

You've changed a lot of things there that don't make sense. This network should work with nearly a default configuration in the main router. Reset it then set up a wifi AP and use it in its most basic settings. If the WAN IP you get from the cable modem is 192.168.1.X you will need to change your LAN IP to something in a different range. Just change the IP not anything else.

Also when your network is IPv4 only, turn off the IPv6 DHCP server to reduce confusion.

Range extenders do a strange thing with forwarding DHCP requests between their two networks. It doesn't always work. If you don't need a seamless LAN, let the range extender run a DHCP server to assign IP addresses to its clients (in a different network) and NAT them to your main network for Internet access. If you do need a seamless LAN look at running OpenWrt on both the main router and the extender so you can use WDS.

3 Likes

Thankyou @trendy and @mk24 for your inputs. I made those updates/changes in the network config to setup multiwan inorder to add my dsl wan connection as a standby to the router. I followed the steps as mentioned in the below documentation:

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

VLANs
https://oldwiki.archive.openwrt.org/doc/uci/network

So you may see some of those entries as mentioned in the above links... I will try by replacing them with the default values and post the updates... My Netgear Router IP address is 192.168.3.1

Surprising fact is that, with all the above settings, everything works good if there is no Range Extender. But through Range Extender, things start failing. :frowning_face:

May I suggest trying "Relayd"
https://oldwiki.archive.openwrt.org/doc/recipes/relayclient
Just scroll to the very bottom of the page there is instructions for setting up a relayd using the Luci GUI.

If i am right, this package is required to be installed in the Range Extender?... For this I should be changing the firmware of the TP-Link Range Extender to OpenWrt?

An update... if I set static IP address for my mobile devices, the connectivity through the Range Extender also works fine... In DHCP mode in mobile devices, they are failing to get the IP addresses if connected through the TP-Link TL-WA855RE v4 Wi-Fi Range Extender (with DHCP off) to my base router running OpenWRT.

Is the extender blocking the dhcp packets somehow?
If static IP works then I see no other explanation.

Double bridging for wireless is a nightmare. I would assume - DHCP server replies to a device MAC with unicast but openwrt or the range extender ignores it, while after addressing is established IP gets casted using ports’ arp table. Or one of the boxes does not get arp tables flushed upon client connect.

What I would do to work around it:
Range extender:
Assign a new subnet (make sure the address range does not overlap with main) and let it manage it and run dhcp on it. No NAT (double NAT is another great source of issues)
OpenWRT box:
-Create a static DHCP entry for range extender.
-Create a static route to this subnet via the range extender.
-Update firewall if needed

@trendy This is the same issue i was talking about in this post Devices cant get an IP on repeater wifi

In my case if i remove the password of the repeater's wifi it the devices can get an IP from the repeater. Its a pain give static IPs cause those same devices connects with the main router and create weird issues. How do i fix this.