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!