The Tomato default route cache can create route affinity in a multi-wan environment.
Disparate devices to the same destination may follow the kernel route cache creating a lack of load-balancing
across the multi-wan environment. The proposed resolution is to adjust the route cache garbage collector to prune
the route cache and allow for proper load balancing across multiple WAN circuits.
Based on: https://bitbucket.org/pl_shibby/tomato-arm/issues/193/multiwan-route-cache-creates-route
Note: no change for SDK6 BUT for SDK7 !!!
fix for SDK7 SRC path (SDK6 path was used to build the SDK7 utils for example --> not OK)
OLD: -I/home/tomato/tomato/release/src-rt-6.x.4708/shared/bcmwifi/include
NEW: -I/home/tomato/tomato/release/src-rt-7.x.main/src/shared/bcmwifi/include -I/home/tomato/tomato/release/src-rt-7.x.main/src/wl/olpc/include -I/home/tomato/tomato/release/src-rt-7.x.main/src/wl/ppr/include
Note: sync SDK6 and SDK7
Note: no change for SDK6 BUT for SDK7 !!!
fix for SDK7 SRC path (SDK6 path was used to build the SDK7 utils for example --> not OK)
OLD: -I/home/tomato/tomato/release/src-rt-6.x.4708/shared/bcmwifi/include
NEW: -I/home/tomato/tomato/release/src-rt-7.x.main/src/shared/bcmwifi/include -I/home/tomato/tomato/release/src-rt-7.x.main/src/wl/olpc/include -I/home/tomato/tomato/release/src-rt-7.x.main/src/wl/ppr/include
Note: right now only On/Off at GUI (keep it simple). tested with dual-core arm and apple device (iOS 14)
Control parameter can be adjusted via nvram variables (no GUI yet, tbd.). For basic infos, have a look at https://www.smallnetbuilder.com/wireless/wireless-howto/32653-asus-rt-ac3200-smart-connect-the-missing-manual?start=0
For default config see (or nvram variables) // [Example from SDK6 router]
root@Tomato-ARM:/tmp/home/root# bsd -i
=== Basic info ===
max_ifnum: 2
mode: 2
role: 3
helper: 192.168.1.232[9877]
primary: 192.168.1.231[9878]
status_poll: 5
counter_poll: 0
idle_rate: 10
prefer_5g: 1
scheme: 2[3]
steer_timeout: 15
sta_timeout: 120
maclist_timeout: 3
probe_timeout: 3600
probe_gap: 30
poll_interval: 1
slowest_at_ratio: 40
phyrate_delta: 200
=== intf_info ===
idx: 0
idx=0 band=2 remote=0 enabled=1 steering_flags=0x2
Steer Policy:
max=0 period=5 cnt=3 rssi=-52 phyrate_high=110 phyrate_low=0 flags=0x22 state=3
Rule Logic: OR
RSSI: Greater than
VHT: Allowed
NON VHT: Allowed
NEXT RF: NO
PHYRATE (HIGH): Greater than or Equal to
LOAD BALANCE: NO
STA NUM BALANCE: NO
PHYRATE (LOW): Less than
N ONLY: NO
Interface Qualify Policy:
min_bw=0 rssi=-75 flags=0x0
Rule Logic: OR
VHT: Allowed
NON VHT: Allowed
ifidx=0 bssidx=0 ifnames=eth1 valid=1:
prefix=wl0_ ssid=MM24-Test idx=0x0 bssid=f0:70:60:7f:50:01 rclass=0x4 chanspec=0x1001 prio=0x0 video_idle=0
steer_prefix=wl1_ [1][0]
policy=3[6]
algo=0[2]
Sta Select Policy: defined=YES:
idle_rate=10 rssi=-52 phyrate_high=110 phyrate_low=0 wprio=0 wrssi=1 wphy_rate=1 wtx_failures=0 wtx_rate=0 wrx_rate=0 flags=0x122
Rule Logic: OR
RSSI: Greater than
VHT: Allowed
NON VHT: Allowed
NEXT RF: NO
PHYRATE (HIGH): Greater than or Equal to
LOAD BALANCE: NO
SINGLE BAND: No Preference
DUAL BAND: Prefered
ACTIVE STA: Can't be Selected
PHYRATE (LOW): Less than
N ONLY: NO
bssinfo to list:
ifname=eth1, intf_info->idx=0
ifidx=1 bssidx=0 to_ifidx=1 ifnames=eth2 prefix=wl1_
idx: 1
idx=1 band=1 remote=0 enabled=1 steering_flags=0x0
Steer Policy:
max=80 period=5 cnt=3 rssi=-82 phyrate_high=0 phyrate_low=0 flags=0x20 state=2
Rule Logic: OR
RSSI: Less than or Equal to
VHT: Allowed
NON VHT: Allowed
NEXT RF: NO
PHYRATE (HIGH): Greater than or Equal to
LOAD BALANCE: NO
STA NUM BALANCE: NO
PHYRATE (LOW): Less than
N ONLY: NO
Interface Qualify Policy:
min_bw=60 rssi=-75 flags=0x0
Rule Logic: OR
VHT: Allowed
NON VHT: Allowed
ifidx=1 bssidx=0 ifnames=eth2 valid=1:
prefix=wl1_ ssid=MM24-Test idx=0x0 bssid=f0:70:60:7f:50:04 rclass=0x7 chanspec=0xe06a prio=0x0 video_idle=0
steer_prefix=wl0_ [0][0]
policy=2[6]
algo=0[2]
Sta Select Policy: defined=YES:
idle_rate=10 rssi=-82 phyrate_high=0 phyrate_low=0 wprio=0 wrssi=1 wphy_rate=1 wtx_failures=0 wtx_rate=0 wrx_rate=0 flags=0x20
Rule Logic: OR
RSSI: Less than or Equal to
VHT: Allowed
NON VHT: Allowed
NEXT RF: NO
PHYRATE (HIGH): Greater than or Equal to
LOAD BALANCE: NO
SINGLE BAND: No Preference
DUAL BAND: No Preference
ACTIVE STA: Can't be Selected
PHYRATE (LOW): Less than
N ONLY: NO
bssinfo to list:
ifname=eth2, intf_info->idx=1
ifidx=0 bssidx=0 to_ifidx=0 ifnames=eth1 prefix=wl0_
root@Tomato-ARM:/tmp/home/root#
Further Note: to save nvram space --> feature turned off for dir868l
Note: right now only On/Off at GUI (keep it simple). tested with dual-core arm and apple device (iOS 14)
Control parameter can be adjusted via nvram variables (no GUI yet, tbd.). For basic infos, have a look at https://www.smallnetbuilder.com/wireless/wireless-howto/32653-asus-rt-ac3200-smart-connect-the-missing-manual?start=0
For default config see (or nvram variables)
root@Tomato-ARM:/tmp/home/root# bsd -i
=== Basic info ===
max_ifnum: 2
mode: 2
role: 3
helper: 192.168.1.232[9877]
primary: 192.168.1.231[9878]
status_poll: 5
counter_poll: 0
idle_rate: 10
prefer_5g: 1
scheme: 2[3]
steer_timeout: 15
sta_timeout: 120
maclist_timeout: 3
probe_timeout: 3600
probe_gap: 30
poll_interval: 1
slowest_at_ratio: 40
phyrate_delta: 200
=== intf_info ===
idx: 0
idx=0 band=2 remote=0 enabled=1 steering_flags=0x2
Steer Policy:
max=0 period=5 cnt=3 rssi=-52 phyrate_high=110 phyrate_low=0 flags=0x22 state=3
Rule Logic: OR
RSSI: Greater than
VHT: Allowed
NON VHT: Allowed
NEXT RF: NO
PHYRATE (HIGH): Greater than or Equal to
LOAD BALANCE: NO
STA NUM BALANCE: NO
PHYRATE (LOW): Less than
N ONLY: NO
Interface Qualify Policy:
min_bw=0 rssi=-75 flags=0x0
Rule Logic: OR
VHT: Allowed
NON VHT: Allowed
ifidx=0 bssidx=0 ifnames=eth1 valid=1:
prefix=wl0_ ssid=MM24-Test idx=0x0 bssid=f0:70:60:7f:50:01 rclass=0x4 chanspec=0x1001 prio=0x0 video_idle=0
steer_prefix=wl1_ [1][0]
policy=3[6]
algo=0[2]
Sta Select Policy: defined=YES:
idle_rate=10 rssi=-52 phyrate_high=110 phyrate_low=0 wprio=0 wrssi=1 wphy_rate=1 wtx_failures=0 wtx_rate=0 wrx_rate=0 flags=0x122
Rule Logic: OR
RSSI: Greater than
VHT: Allowed
NON VHT: Allowed
NEXT RF: NO
PHYRATE (HIGH): Greater than or Equal to
LOAD BALANCE: NO
SINGLE BAND: No Preference
DUAL BAND: Prefered
ACTIVE STA: Can't be Selected
PHYRATE (LOW): Less than
N ONLY: NO
bssinfo to list:
ifname=eth1, intf_info->idx=0
ifidx=1 bssidx=0 to_ifidx=1 ifnames=eth2 prefix=wl1_
idx: 1
idx=1 band=1 remote=0 enabled=1 steering_flags=0x0
Steer Policy:
max=80 period=5 cnt=3 rssi=-82 phyrate_high=0 phyrate_low=0 flags=0x20 state=2
Rule Logic: OR
RSSI: Less than or Equal to
VHT: Allowed
NON VHT: Allowed
NEXT RF: NO
PHYRATE (HIGH): Greater than or Equal to
LOAD BALANCE: NO
STA NUM BALANCE: NO
PHYRATE (LOW): Less than
N ONLY: NO
Interface Qualify Policy:
min_bw=60 rssi=-75 flags=0x0
Rule Logic: OR
VHT: Allowed
NON VHT: Allowed
ifidx=1 bssidx=0 ifnames=eth2 valid=1:
prefix=wl1_ ssid=MM24-Test idx=0x0 bssid=f0:70:60:7f:50:04 rclass=0x7 chanspec=0xe06a prio=0x0 video_idle=0
steer_prefix=wl0_ [0][0]
policy=2[6]
algo=0[2]
Sta Select Policy: defined=YES:
idle_rate=10 rssi=-82 phyrate_high=0 phyrate_low=0 wprio=0 wrssi=1 wphy_rate=1 wtx_failures=0 wtx_rate=0 wrx_rate=0 flags=0x20
Rule Logic: OR
RSSI: Less than or Equal to
VHT: Allowed
NON VHT: Allowed
NEXT RF: NO
PHYRATE (HIGH): Greater than or Equal to
LOAD BALANCE: NO
SINGLE BAND: No Preference
DUAL BAND: No Preference
ACTIVE STA: Can't be Selected
PHYRATE (LOW): Less than
N ONLY: NO
bssinfo to list:
ifname=eth2, intf_info->idx=1
ifidx=0 bssidx=0 to_ifidx=0 ifnames=eth1 prefix=wl0_
root@Tomato-ARM:/tmp/home/root#
Further Note: to save nvram space --> feature turned off for dir868l