No DHCP for WAN adapter on reboot (19.07, TP-LINK Archer C7 V2.0)

OpenWRT Version: 19.07.5 r11257-5090152ae3
Router: TP-Link Archer C7 V2.0 (US) (AC1750)

New user here. I was setting up OpenWRT, had some problems, and had to flash back to default via TFTP to undo all my changes and start over. Now, everything works fine until I hard or soft reboot the router. After I reboot, none of the devices on my network can connect to the internet.

They can talk to each other over the LAN, and I can connect to the internet if I bypass the router and plug my PC directly into the modem. I can connect to the router via both LuCI and SSH.

Weirdly, if I 1) unplug the modem ethernet cable from the router, 2) restart both WAN and WAN6 interfaces via LuCI and 3) plug the modem ethernet cable back into the router (in that order), both WAN and WAN6 interfaces will connect to DHCP and all my devices suddenly get internet. This takes about 10-30 seconds after 3) is complete.

The same thing happens if I unplug the modem and plug it back in. However, here it takes about 3 minutes for WAN and WAN6 to get DHCP assigned IP addresses.

Here is a system log of that happening:

Tue Dec 29 20:00:55 2020 daemon.notice netifd: wan (1562): udhcpc: sending select for 192.168.100.20
Tue Dec 29 20:00:55 2020 daemon.notice netifd: wan (1562): udhcpc: lease of 192.168.100.20 obtained, lease time 122
Tue Dec 29 20:00:56 2020 daemon.notice netifd: Interface 'wan' is now up
Tue Dec 29 20:00:57 2020 daemon.info dnsmasq[1677]: read /etc/hosts - 4 addresses
Tue Dec 29 20:00:57 2020 daemon.info dnsmasq[1677]: read /tmp/hosts/odhcpd - 1 addresses
Tue Dec 29 20:00:57 2020 daemon.info dnsmasq[1677]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Tue Dec 29 20:00:57 2020 daemon.info dnsmasq-dhcp[1677]: read /etc/ethers - 0 addresses
Tue Dec 29 20:01:56 2020 daemon.notice netifd: wan (1562): udhcpc: sending renew to 192.168.100.1
Tue Dec 29 20:02:26 2020 daemon.notice netifd: wan (1562): udhcpc: sending renew to 0.0.0.0
Tue Dec 29 20:02:41 2020 daemon.notice netifd: wan (1562): udhcpc: sending renew to 0.0.0.0
Tue Dec 29 20:02:48 2020 daemon.notice netifd: wan (1562): udhcpc: sending renew to 0.0.0.0
Tue Dec 29 20:02:51 2020 daemon.notice netifd: wan (1562): udhcpc: sending renew to 0.0.0.0
Tue Dec 29 20:02:52 2020 daemon.notice netifd: wan (1562): udhcpc: sending renew to 0.0.0.0
Tue Dec 29 20:02:52 2020 daemon.notice netifd: wan (1562): udhcpc: lease lost, entering init state
Tue Dec 29 20:02:52 2020 daemon.notice netifd: Interface 'wan' has lost the connection
Tue Dec 29 20:02:52 2020 daemon.notice netifd: wan (1562): udhcpc: sending select for 76.99.160.103
Tue Dec 29 20:02:54 2020 daemon.info dnsmasq[1677]: read /etc/hosts - 4 addresses
Tue Dec 29 20:02:54 2020 daemon.info dnsmasq[1677]: read /tmp/hosts/odhcpd - 1 addresses
Tue Dec 29 20:02:54 2020 daemon.info dnsmasq[1677]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Tue Dec 29 20:02:54 2020 daemon.info dnsmasq-dhcp[1677]: read /etc/ethers - 0 addresses
Tue Dec 29 20:02:55 2020 daemon.notice netifd: wan (1562): udhcpc: sending select for 76.99.160.103
Tue Dec 29 20:02:55 2020 daemon.notice netifd: wan (1562): udhcpc: lease of 76.99.160.103 obtained, lease time 315361
Tue Dec 29 20:02:55 2020 daemon.notice netifd: Interface 'wan' is now up
Tue Dec 29 20:02:55 2020 daemon.info dnsmasq[1677]: reading /tmp/resolv.conf.auto
Tue Dec 29 20:02:55 2020 daemon.info dnsmasq[1677]: using local addresses only for domain test
Tue Dec 29 20:02:55 2020 daemon.info dnsmasq[1677]: using local addresses only for domain onion
Tue Dec 29 20:02:55 2020 daemon.info dnsmasq[1677]: using local addresses only for domain localhost
Tue Dec 29 20:02:55 2020 daemon.info dnsmasq[1677]: using local addresses only for domain local
Tue Dec 29 20:02:55 2020 daemon.info dnsmasq[1677]: using local addresses only for domain invalid
Tue Dec 29 20:02:55 2020 daemon.info dnsmasq[1677]: using local addresses only for domain bind
Tue Dec 29 20:02:55 2020 daemon.info dnsmasq[1677]: using local addresses only for domain lan
Tue Dec 29 20:02:55 2020 daemon.info dnsmasq[1677]: using nameserver 75.75.75.75#53
Tue Dec 29 20:02:55 2020 daemon.info dnsmasq[1677]: using nameserver 75.75.76.76#53
Tue Dec 29 20:02:57 2020 daemon.info dnsmasq[1677]: read /etc/hosts - 4 addresses
Tue Dec 29 20:02:57 2020 daemon.info dnsmasq[1677]: read /tmp/hosts/odhcpd - 1 addresses
Tue Dec 29 20:02:57 2020 daemon.info dnsmasq[1677]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Tue Dec 29 20:02:57 2020 daemon.info dnsmasq-dhcp[1677]: read /etc/ethers - 0 addresses
Tue Dec 29 20:03:25 2020 daemon.notice netifd: Interface 'wan6' is now up
Tue Dec 29 20:03:25 2020 daemon.info dnsmasq[1677]: reading /tmp/resolv.conf.auto
Tue Dec 29 20:03:25 2020 daemon.info dnsmasq[1677]: using local addresses only for domain test
Tue Dec 29 20:03:25 2020 daemon.info dnsmasq[1677]: using local addresses only for domain onion
Tue Dec 29 20:03:25 2020 daemon.info dnsmasq[1677]: using local addresses only for domain localhost
Tue Dec 29 20:03:25 2020 daemon.info dnsmasq[1677]: using local addresses only for domain local
Tue Dec 29 20:03:25 2020 daemon.info dnsmasq[1677]: using local addresses only for domain invalid
Tue Dec 29 20:03:25 2020 daemon.info dnsmasq[1677]: using local addresses only for domain bind
Tue Dec 29 20:03:25 2020 daemon.info dnsmasq[1677]: using local addresses only for domain lan
Tue Dec 29 20:03:25 2020 daemon.info dnsmasq[1677]: using nameserver 75.75.75.75#53
Tue Dec 29 20:03:25 2020 daemon.info dnsmasq[1677]: using nameserver 75.75.76.76#53
Tue Dec 29 20:03:25 2020 daemon.info dnsmasq[1677]: using nameserver 2001:558:feed::1#53
Tue Dec 29 20:03:25 2020 daemon.info dnsmasq[1677]: using nameserver 2001:558:feed::2#53
Tue Dec 29 20:03:25 2020 user.notice firewall: Reloading firewall due to ifup of wan6 (eth0.2)
Tue Dec 29 20:22:35 2020 daemon.warn odhcpd[1201]: A default route is present but there is no public prefix on lan thus we don't announce a default route!

Network Config File:

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 'fda4:2632:a22a::/48'

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

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'
	option disabled '0'

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'
	option disabled '0'

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

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

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '6t 1'
	option vid '2'

Thank you for any help!

It looks to me that there is some conflict in your network. In the first case you got a private IP, in the second a public IP. Make sure there is no other DHCP server running between your modem and the OpenWrt, and that the modem is properly setup.

Hmm, that is interesting. I'm not sure where it could be because at the time, the only things on the network were the router, the modem, and my one PC (everything else is wireless and wifi was off).

Also, everything worked yesterday without any conflicts. It wasn't until this morning when I had to revert the firmware that it started going haywire.

I flashed back to a clean install of the same version, then that didn't work so I went back to OEM, and then I flashed back to another clean install. OEM didn't have any conflicts and worked right out of the box, unconfigured.

Thank you though! I'll look into that avenue and see if there isn't something misconfigured.

1 Like

So, not to necrothread or anything, but I have somewhat of a resolution here.

I recently switched from Comcast Xfinity to Verizon Fios, and the problem has vanished with the new setup. I am still using the same router with no configuration changes.

In fact, the router worked right away after plugging it into the shiny new Verizon telecom box, as should be expected.

I have since unplugged and resituated the router several times, with no issues whatsoever. My internet is zippy, although not as zippy as the advertised 900 down 800 up. I guess that's also to be expected.

I can only conclude that the previous issue was some bad interplay between Comcast, my cable modem, and the router.

Thanks to everyone who looked at this and scratched their head!

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