This example follows the tests/cases/switch_route3.sh scenario.
It demonstrates three switches connected in a chain. sw3 reaches loopback VIPs on sw1 and sw2 through OpenLAN outputs and static routes.
sw1 VIP 10.251.0.11
^
| output
sw2 VIP 10.251.0.12
^
| output + static routes
sw3 reaches sw1/sw2 loopback VIPs through nexthops
100.100.0.0/24sw1=100.100.0.241, sw2=100.100.0.242, sw3=100.100.0.243example=192.51.0.0/24sw1=192.51.0.1, sw2=192.51.0.2, sw3=192.51.0.3sw1=10.251.0.11/32, sw2=10.251.0.12/32aes-128:ea64d5b0c96csw1openlan network --name example add --address 192.51.0.1/24
openlan router address add --device lo --address 10.251.0.11/32
openlan user add --name edge1@example --password 123456
sw2openlan network --name example add --address 192.51.0.2/24
openlan router address add --device lo --address 10.251.0.12/32
openlan user add --name edge2@example --password 123457
openlan network --name example output add \
--remote 100.100.0.241 \
--protocol tcp \
--secret edge1@example:123456 \
--crypt aes-128:ea64d5b0c96c
sw3openlan network --name example add --address 192.51.0.3/24
openlan network --name example output add \
--remote 100.100.0.242 \
--protocol tcp \
--secret edge2@example:123457 \
--crypt aes-128:ea64d5b0c96c
openlan network --name example route add \
--prefix 10.251.0.11/32 \
--nexthop 192.51.0.1
openlan network --name example route add \
--prefix 10.251.0.12/32 \
--nexthop 192.51.0.2
sw3 should have routes for both VIPs:
ip route show
# 10.251.0.11 ...
# 10.251.0.12 ...
Reachability checks from sw3:
ping -c 3 192.51.0.1
ping -c 3 192.51.0.2
ping -c 3 10.251.0.11
ping -c 3 10.251.0.12
The case also runs openlan reload --save on all three switches and verifies that output authentication and route reachability survive reload.