Greetings,
I've had a minor issue on my OpenWRT device that was odd but didn't bother me so I've kinda ignored it for some time. Recently I upgraded my tablet to Android 12 and now I'm about to go stark raving mad. :laugh:
What's the issue? Every once in a while (like once or twice a week across four devices), I connect to the wireless and get a DHCP IP...but absolutely no routing at all. I can't ping anything on the network. I can't ping the OpenWRT device. I mean...it's just nothing! I'm connected to the wireless. If I use another device, I can see that it communitcated to get a DHCP IP. By every metric I know about, it looks like a successful connection. But the device can't ping nor be pinged from others on the network even though it says it's connected. It's weird.
However, since the upgrade to Android 12, my tablet... It's about all it does. I have to simply let it sit and keep re-negotiating (sometimes for as long as three hours!!) before it connects in a way that allows it to talk to the network/internet. Android simply says that it is connected but has no internet (with a ! over the wifi symbol.)
For a (probably too long) detailed look at my setup, here's the discussion where I got help with setting up VLANs on my network. Including a diagram of what I set out to achieve.
The short of it is this. My hardware is an Archer C7 1750. My primary network that the family uses is VLAN 4. I try really hard not to break that network since the family uses it. To my knowledge, there is no issue at all on this network. My personal playground network is VLAN5. Attached to VLAN5 is a guest interface that has DHCP. This interface is the one with the troubles. This guest network was originally set up to provide internet only access to friends/family but because I've separated out VLAN5 for my playground and this network is on VLAN5 already I tend to use it with all my devices too.
I'd like to upgrade my other Android devices but there's no way I can deal with this issue happening on all of them. I need to get it fixed.
(also, if anyone spots why I have issues routing from the guest to VLAN4 I'd appreciate it though that's a small matter. If I attach to VLAN5, traffic is sent to the switch to route to VLAN4 which is exactly what I want, but while on the guest network, traffic hits the OpenWRT device then attempts to route to VLAN4 and that obviously fails. I don't know why it does that... everything else is sent to VLAN5. :shrug:)
But I've now been poking at this config for far too long and I'd greatly appreciate a second pair of eyes. Any errors or oddities someone spot, I'd be grateful for opinions on how to improve. Especially if in my tweaking I've made bad choices.
Thank you!
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 localservice '1'
option ednspacket_max '1232'
list server '10.0.5.103'
option noresolv '1'
option nohosts '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
config dhcp 'guest'
option interface 'guest'
option start '100'
option limit '15'
option leasetime '1h'
option netmask '255.255.255.0'
list dhcp_option '6,10.0.5.103'
list ra_flags 'none'
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 'fdd0:fe45:0c99::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
config device
option name 'eth0.2'
option macaddr 'd8:07:b6:74:13:d5'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config device
option type '8021q'
option ifname 'eth0'
option vid '4'
option name 'eth0.4'
option ipv6 '0'
config interface 'vlan4'
option proto 'static'
option netmask '255.255.255.0'
option device 'br-vlan4'
list dns '10.0.5.103' #Author note. Not a mistake. This is the DNS for everyone.
option ipaddr '10.0.4.102'
config switch_vlan
option device 'switch0'
option vlan '3'
option vid '4'
option ports '0t 1t 2 3'
config device
option type 'bridge'
option name 'br-vlan4'
list ports 'eth0.4'
config device
option type '8021q'
option ifname 'eth0'
option vid '5'
option name 'eth0.5'
option ipv6 '0'
config interface 'vlan5'
option proto 'static'
option netmask '255.255.255.0'
option device 'br-vlan5'
option ipaddr '10.0.5.102'
list dns '10.0.5.103'
option gateway '10.0.5.1'
config device
option type 'bridge'
option name 'br-vlan5'
list ports 'eth0.5'
config switch_vlan
option device 'switch0'
option vlan '4'
option vid '5'
option ports '0t 1t 4 5'
config interface 'guest'
option proto 'static'
option ipaddr '10.0.3.1'
option netmask '255.255.255.0'
list dns '10.0.5.103'
option delegate '0'
option device 'br-guest'
config device
option type 'bridge'
option name 'br-guest'
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'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
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 rule
option name 'Support-UDP-Traceroute'
option src 'wan'
option dest_port '33434:33689'
option proto 'udp'
option family 'ipv4'
option target 'REJECT'
option enabled 'false'
config include
option path '/etc/firewall.user'
config zone 'guest'
option name 'guest'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'guest'
config forwarding 'guest_wan'
option src 'guest'
option dest 'vlan5'
config rule 'guest_dns'
option name 'Allow-DNS-Guest'
option src 'guest'
option dest_port '53'
option proto 'tcp udp'
option target 'ACCEPT'
config rule 'guest_dhcp'
option name 'Allow-DHCP-Guest'
option src 'guest'
option dest_port '67-68'
option family 'ipv4'
option target 'ACCEPT'
config zone
option name 'vlan5'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'vlan5'
option masq '1'