Cyclone only preferred the cellular default route when dhcpcd removed
its route on enp2s0. A primary WAN that kept its route but could not
reach the internet, or an IPv4LL default route installed by dhcpcd
during a flap, still won over cellular.
Added a wanFailover module under modules/networking and enabled it on
cyclone. A service pings 1.1.1.1, 8.8.8.8 and 9.9.9.9 bound to enp2s0
every 5 seconds, starting each round at the next target in turn; a
round passes if any target answers. After 3 consecutive failed rounds
it installs a metric 100 default route via cellular, and after 12
consecutive passed rounds it removes it again. Source NAT conntrack
entries are flushed on each switch, and the current state is read back
from the routing table on start.
Probing bound to enp2s0 keeps the primary measurable while cellular is
preferred, and the asymmetric thresholds with counters reset on any
opposing result prevent a flapping primary from bouncing traffic.
Test plan:
CI
Deploy to cyclone and confirm wan-failover starts on enp2s0
Drop outbound ICMP on enp2s0 with nft and confirm failover to
cellular, then remove the rule and confirm failback after ~1 minute
Cyclone only preferred the cellular default route when dhcpcd removed
its route on enp2s0. A primary WAN that kept its route but could not
reach the internet, or an IPv4LL default route installed by dhcpcd
during a flap, still won over cellular.
Added a wanFailover module under modules/networking and enabled it on
cyclone. A service pings 1.1.1.1, 8.8.8.8 and 9.9.9.9 bound to enp2s0
every 5 seconds, starting each round at the next target in turn; a
round passes if any target answers. After 3 consecutive failed rounds
it installs a metric 100 default route via cellular, and after 12
consecutive passed rounds it removes it again. Source NAT conntrack
entries are flushed on each switch, and the current state is read back
from the routing table on start.
Probing bound to enp2s0 keeps the primary measurable while cellular is
preferred, and the asymmetric thresholds with counters reset on any
opposing result prevent a flapping primary from bouncing traffic.
Test plan:
- CI
- Deploy to cyclone and confirm wan-failover starts on enp2s0
- Drop outbound ICMP on enp2s0 with nft and confirm failover to
cellular, then remove the rule and confirm failback after ~1 minute
Cyclone only preferred the cellular default route when dhcpcd removed
its route on enp2s0. A primary WAN that kept its route but could not
reach the internet, or an IPv4LL default route installed by dhcpcd
during a flap, still won over cellular.
Added a wanFailover module under modules/networking and enabled it on
cyclone. A service pings 1.1.1.1, 8.8.8.8 and 9.9.9.9 bound to enp2s0
every 5 seconds, starting each round at the next target in turn; a
round passes if any target answers. After 3 consecutive failed rounds
it installs a metric 100 default route via cellular, and after 12
consecutive passed rounds it removes it again. Source NAT conntrack
entries are flushed on each switch, and the current state is read back
from the routing table on start.
Probing bound to enp2s0 keeps the primary measurable while cellular is
preferred, and the asymmetric thresholds with counters reset on any
opposing result prevent a flapping primary from bouncing traffic.
Test plan:
- CI
- Deploy to cyclone and confirm wan-failover starts on enp2s0
- Drop outbound ICMP on enp2s0 with nft and confirm failover to
cellular, then remove the rule and confirm failback after ~1 minute
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Cyclone only preferred the cellular default route when dhcpcd removed
its route on enp2s0. A primary WAN that kept its route but could not
reach the internet, or an IPv4LL default route installed by dhcpcd
during a flap, still won over cellular.
Added a wanFailover module under modules/networking and enabled it on
cyclone. A service pings 1.1.1.1, 8.8.8.8 and 9.9.9.9 bound to enp2s0
every 5 seconds, starting each round at the next target in turn; a
round passes if any target answers. After 3 consecutive failed rounds
it installs a metric 100 default route via cellular, and after 12
consecutive passed rounds it removes it again. Source NAT conntrack
entries are flushed on each switch, and the current state is read back
from the routing table on start.
Probing bound to enp2s0 keeps the primary measurable while cellular is
preferred, and the asymmetric thresholds with counters reset on any
opposing result prevent a flapping primary from bouncing traffic.
Test plan:
cellular, then remove the rule and confirm failback after ~1 minute
bb68079e92to36a8f06b0c