Hey y'all, long time user, first time poster ...
I'm being quite verbose, but hey, I know you'd be asking to see the configs ... and I tried to quantify the issue as well.
The Problem
I recently set-up segregated networks at home. I followed the MarcOneFifty videos, and a couple different blogs posts. It eventually worked, but I did struggle a fair bit if I'm being honest.
I noticed ping/latency is abnormally high in some circumstances.
Pinging a WiFi device from one of the routers (or from a wired device going through the router) ... latency is in the hundreds of milliseconds.
Pinging a router (or wired device going through the router) from a wifi device, response time is a normal handful of milliseconds.
The asymmetry between the two is the weirdest part, IMHO.
What makes a difference
- Wifi power savings modes
- Disabled power savings on the linux box
- keeping the macbook plugged in / screen active
Fix attempts
Future fix attempts
- Try with only two networks/VLANs
- Try not creating VLANs manually, but rely on the Bridge VLAN Filtering tab alone
- Try a 23.03 build
The Setup
I crunched some numbers. Unless noted, all numbers are for the same VLAN/Network
-
main
akagateway-main
Main router, shares internet, serves DHCP. in the living room
connects togateway-office
on port 1, VLANs all tagged. -
office
akagateway-office
"dumb AP" in the office, bridges wifi
connects togateway-main
on the WAN port, VLANs all tagged. -
lappy
, laptop on WIFI 5g
connected togateway-office
, onBASE-ac
network/default VLAN -
pixie
, android phone on wifi
pixieoffice
was in the office for test,pixiemain
was in the living room for test -
mbp
, macbook on WIFI
connected togateway-office
AP, onBASE-wasteland
network / non-default VLAN
5Ghz or 2.4Ghz apparently makes no difference.
The Data
Median and 90th percentiles of PING latency from source
to destination
. Numbers are in seconds.
median 90th % stdev
source destination
# low ping from wifi device pinging the closest AP/router
lappy main 0.001630 0.002340 0.019351
lappy office 0.002840 0.003071 0.012343
mbp main 0.006730 0.008353 0.005245
# high ping from router to wifi
main lappy 0.195661 0.288046 0.090850
main pixieoffice 0.269358 0.486387 0.139119 # mobile phone in office
main pixiemain 0.320505 0.503115 0.143422 # mobile phone in living-room
main mbp 0.499502 0.831642 0.241500 # The worst: cross-vlan (100 to 103)
office lappy 0.178548 0.283351 0.078241
office pixie 0.309794 0.498318 0.133470
office mbp 0.515910 0.852934 0.243132 # The worst: cross-vlan (100 to 103)
# low ping between wired devices
main desky 0.000539 0.001804 0.000734
main office 0.000369 0.000384 0.000013
office desky 0.000554 0.001850 0.000734
This network runs off of two WRT1900ACS, running 22.03.2
.
Current configuration
gateway-main
/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 'fd83:d1c7:b026::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config interface 'lan'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '10.99.0.1'
option delegate '0'
option device 'br-lan.100'
config device
option name 'wan'
option macaddr 'REMOVED'
config interface 'wan'
option device 'wan'
option proto 'pppoe'
option username 'REMOVED'
option password 'REMOVED'
option ipv6 'auto'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
config route
option target '10.99.1.0/24'
option gateway '10.99.0.3'
option metric '0'
option interface 'lan'
config interface 'wg0'
option proto 'wireguard'
option private_key 'REMOVED!'
option listen_port '55000'
list addresses '10.99.2.1/32'
list addresses '10.99.2.0/24'
config wireguard_wg0
option description 'external-node'
option public_key 'REMOVED!'
list allowed_ips '10.99.2.5/32'
list allowed_ips '10.99.1.0/24'
list allowed_ips '10.99.2.0/24'
config wireguard_wg0
option description 'pixie'
option public_key 'REMOVED!'
list allowed_ips '10.99.2.2/32'
list allowed_ips '10.99.2.0/24'
list allowed_ips '10.99.100.0/24'
list allowed_ips '10.99.101.0/24'
list allowed_ips '10.99.102.0/24'
list allowed_ips '10.99.103.0/24'
list allowed_ips '10.99.0.0/24'
list allowed_ips '10.99.1.0/24'
config wireguard_wg0
option description 'lappy'
option public_key 'REMOVED!'
list allowed_ips '10.99.2.6/32'
list allowed_ips '10.99.0.0/24'
list allowed_ips '10.99.1.0/24'
config device
option type '8021q'
option ifname 'br-lan'
option vid '100'
option name 'br-lan.100'
option mtu '1496'
config device
option type '8021q'
option ifname 'br-lan'
option vid '101'
option name 'br-lan.101'
option mtu '1496'
config device
option type '8021q'
option ifname 'br-lan'
option vid '102'
option name 'br-lan.102'
option mtu '1496'
config bridge-vlan
option device 'br-lan'
option vlan '100'
list ports 'lan1:u*'
list ports 'lan2:u*'
list ports 'lan3:u*'
list ports 'lan4:u*'
config bridge-vlan
option device 'br-lan'
option vlan '101'
list ports 'lan1:t'
config bridge-vlan
option device 'br-lan'
option vlan '102'
list ports 'lan1:t'
config interface 'guest'
option proto 'static'
option device 'br-lan.101'
option netmask '255.255.255.0'
option ipaddr '10.99.101.1'
config interface 'iot'
option proto 'static'
option device 'br-lan.102'
option ipaddr '10.99.102.1'
option netmask '255.255.255.0'
config device
option type '8021q'
option ifname 'br-lan'
option vid '103'
option name 'br-lan.103'
option mtu '1496'
config interface 'wasteland'
option proto 'static'
option device 'br-lan.103'
option ipaddr '10.99.103.1'
option netmask '255.255.255.0'
config bridge-vlan
option device 'br-lan'
option vlan '103'
list ports 'lan1:t'
/etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
option band '5g'
option htmode 'VHT80'
option country 'US'
option cell_density '0'
option channel '161'
config wifi-device 'radio1'
option type 'mac80211'
option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
option channel '1'
option band '2g'
option htmode 'HT20'
option country 'CN'
option legacy_rates '1'
option cell_density '0'
config wifi-iface 'wifinet0'
option device 'radio0'
option mode 'ap'
option ssid 'BASE-ac'
option network 'lan'
option key 'REMOVED!'
option encryption 'psk2'
option ieee80211r '1'
option ft_over_ds '0'
option ft_psk_generate_local '1'
config wifi-iface 'wifinet2'
option device 'radio1'
option mode 'ap'
option ssid 'BASE'
option encryption 'psk2'
option key 'REMOVED!'
option network 'lan'
config wifi-iface 'wifinet3'
option device 'radio0'
option mode 'ap'
option ssid 'BASE-Guest'
option encryption 'psk2'
option key 'REMOVED!'
option network 'guest'
config wifi-iface 'wifinet4'
option device 'radio0'
option mode 'ap'
option ssid 'BASE-IOT'
option encryption 'psk2'
option key 'REMOVED!'
option network 'iot'
config wifi-iface 'wifinet5'
option device 'radio0'
option mode 'ap'
option ssid 'BASE-Wasteland'
option encryption 'psk2'
option network 'wasteland'
option key 'REMOVED!'
option ieee80211r '1'
option ft_over_ds '0'
option ft_psk_generate_local '1'
/etc/config/dhcp
config dnsmasq
option domainneeded '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option localservice '1'
option ednspacket_max '1232'
option local '/REMOVED/'
option domain 'REMOVED'
list server '/REMOVED/10.99.1.1'
list address '/REMOVED/10.99.1.11'
option nonegcache '1'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
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'
config domain
option name 'REMOVED'
option ip 'REMOVED'
config host
option name 'REMOVED'
option mac 'REMOVED'
option ip '10.99.0.3'
config host
option name 'desky'
option dns '1'
option mac 'REMOVED'
option ip '10.99.0.101'
config host
option name 'gateway-office'
option dns '1'
option mac 'REMOVED'
option ip '10.99.0.2'
config dhcp 'guest'
option interface 'guest'
option start '100'
option limit '150'
option leasetime '12h'
config dhcp 'iot'
option interface 'iot'
option start '100'
option limit '150'
option leasetime '12h'
config dhcp 'wasteland'
option interface 'wasteland'
option start '100'
option limit '150'
option leasetime '12h'
/etc/config/firewall
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan6'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
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 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 zone
option name 'WG'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'wg0'
config forwarding
option src 'WG'
option dest 'lan'
config forwarding
option src 'WG'
option dest 'wan'
config rule
option name 'Allow-Wireguard'
option src 'wan'
option dest_port '55000'
option target 'ACCEPT'
list proto 'udp'
config forwarding
option src 'lan'
option dest 'WG'
config zone
option name 'guest'
option input 'ACCEPT'
option output 'ACCEPT'
list network 'guest'
option forward 'REJECT'
config forwarding
option src 'guest'
option dest 'wan'
config rule
option name 'Allow-Guest-DHCP'
list proto 'udp'
option src 'guest'
option dest_port '67'
option target 'ACCEPT'
config rule
option name 'Allog-Guest-DNS'
list proto 'udp'
option src 'guest'
option dest_port '53'
option target 'ACCEPT'
config zone
option name 'iot'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'iot'
config forwarding
option src 'iot'
option dest 'wan'
config zone
option name 'wasteland'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'wasteland'
config forwarding
option src 'wasteland'
option dest 'wan'
config forwarding
option src 'lan'
option dest 'guest'
config forwarding
option src 'lan'
option dest 'iot'
config forwarding
option src 'lan'
option dest 'wasteland'
config forwarding
option src 'WG'
option dest 'guest'
config forwarding
option src 'WG'
option dest 'iot'
config forwarding
option src 'WG'
option dest 'wasteland'
gateway-office
/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 'fd93:1b21:c16a::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
list ports 'wan'
config interface 'lan'
option proto 'static'
option ipaddr '10.99.0.2'
option netmask '255.255.255.0'
option device 'br-lan.100'
config device
option name 'wan'
option macaddr 'REMOVED'
config interface 'fallback'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.100.1'
option device 'br-lan'
config device
option type '8021q'
option ifname 'br-lan'
option vid '100'
option name 'br-lan.100'
option mtu '1496'
config device
option type '8021q'
option ifname 'br-lan'
option vid '101'
option name 'br-lan.101'
option mtu '1496'
config device
option type '8021q'
option ifname 'br-lan'
option vid '102'
option name 'br-lan.102'
option mtu '1496'
config device
option type '8021q'
option ifname 'br-lan'
option vid '103'
option name 'br-lan.103'
option mtu '1496'
config interface 'guest'
option device 'br-lan.101'
option proto 'static'
option ipaddr '10.99.101.2'
option netmask '255.255.255.0'
config interface 'iot'
option device 'br-lan.102'
option proto 'static'
option ipaddr '10.99.102.2'
option netmask '255.255.255.0'
config interface 'wasteland'
option device 'br-lan.103'
option proto 'static'
option ipaddr '10.99.103.2'
option netmask '255.255.255.0'
config bridge-vlan
option device 'br-lan'
option vlan '100'
list ports 'lan1:u*'
list ports 'lan2:u*'
list ports 'lan3:u*'
list ports 'lan4:u*'
list ports 'wan:t*'
config bridge-vlan
option device 'br-lan'
option vlan '101'
list ports 'wan:t'
config bridge-vlan
option device 'br-lan'
option vlan '102'
list ports 'wan:t'
config bridge-vlan
option device 'br-lan'
option vlan '103'
list ports 'wan:t'
/etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
option band '5g'
option htmode 'VHT80'
option cell_density '0'
option country 'US'
option channel '161'
config wifi-device 'radio1'
option type 'mac80211'
option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
option band '2g'
option htmode 'HT20'
option cell_density '0'
option country 'US'
option channel 'auto'
config wifi-iface 'wifinet2'
option device 'radio0'
option mode 'ap'
option key 'REMOVED'
option network 'lan'
option ssid 'BASE-ac'
option encryption 'psk2'
option ieee80211r '1'
option ft_over_ds '0'
option ft_psk_generate_local '1'
config wifi-iface 'wifinet4'
option device 'radio1'
option mode 'ap'
option encryption 'psk-mixed'
option key 'REMOVED'
option network 'lan'
option ssid 'BASE'
config wifi-iface 'wifinet5'
option device 'radio0'
option mode 'ap'
option ssid 'BASE-Guest'
option encryption 'psk2'
option key 'REMOVED'
option network 'guest'
config wifi-iface 'wifinet6'
option device 'radio0'
option mode 'ap'
option ssid 'BASE-IOT'
option encryption 'psk2'
option key 'REMOVED'
option network 'iot'
config wifi-iface 'wifinet7'
option device 'radio0'
option mode 'ap'
option ssid 'BASE-Wasteland'
option encryption 'psk2'
option network 'wasteland'
option key 'REMOVED'
option ieee80211r '1'
option ft_over_ds '0'
option ft_psk_generate_local '1'
/etc/config/dhcp
The config exists, but it's disabled on all interfaces, and the service is disabled at boot.
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 readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option localservice '1'
option ednspacket_max '1232'
list notinterface 'br-lan'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
option ra 'hybrid'
option dhcpv6 'hybrid'
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/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'
list network 'lan'
list network 'fallback'
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 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 'ssh'
list proto 'tcp'
option src 'wan'
option dest_port '22'
option target 'ACCEPT'
config rule
option name 'luci'
list proto 'tcp'
option src 'wan'
option dest_port '80'
option target 'ACCEPT'
config zone
option name 'guest'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'guest'
config forwarding
option src 'guest'
option dest 'wan'
config zone
option name 'iot'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'iot'
config zone
option name 'wasteland'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
list network 'wasteland'