[26-06-22 06:41:48] START switch_route3 scenario: cases/switch_route3.sh header : validate forwarding and route reachability via sw2 topology: sw1 VIP 10.251.0.11 | output | sw2 VIP 10.251.0.12 | output + static routes | sw3 reaches sw1/sw2 loopback VIPs through nexthops topology: # Topology: topology: # - Diagram: topology: # sw1 VIP 10.251.0.11 topology: # ^ topology: # | output topology: # sw2 VIP 10.251.0.12 topology: # ^ topology: # | output + static routes topology: # sw3 reaches sw1/sw2 loopback VIPs through nexthops topology: # - Docker mgmt network: 100.100.0.0/24 topology: # sw1=100.100.0.241, sw2=100.100.0.242, sw3=100.100.0.243. topology: # - OpenLAN service network "example": 192.51.0.0/24 topology: # sw1=192.51.0.1, sw2=192.51.0.2, sw3=192.51.0.3. topology: # - Loopback VIPs: topology: # sw1 lo=10.251.0.11/32, sw2 lo=10.251.0.12/32. topology: # - Forwarding and route design: topology: # sw2 -> sw1 output, sw3 -> sw2 output; topology: # sw3 routes 10.251.0.11 via 192.51.0.1 and 10.251.0.12 via 192.51.0.2. topology: # Validation: topology: # (see scenario assertions in this case) Started switch pause container: tests-sw-route1-pause Started switch frr container: tests-sw-route1-frr Started switch ipsec container: tests-sw-route1-ipsec Started switch container: tests-sw-route1 [26-06-22 06:41:48][ASSERT#0001][expect] at cases/switch_route3.sh:68 fn=setup_sw1 retry=30 cmd="docker logs -f tests-sw-route1" expect="Http.Start" 2026/06/22 06:41:49 INFO|root|Wait: ... 2026/06/22 06:41:49 INFO|root|UdpServer.Listen: udp://0.0.0.0:10002 2026/06/22 06:41:49 INFO|root|TcpServer.Listen: tcp://0.0.0.0:10002 2026/06/22 06:41:49 INFO|root|Http.Start 0.0.0.0:10000 [26-06-22 06:41:49][ASSERT#0001][OK] cost=1.030s [26-06-22 06:41:49][ASSERT#0002][cmd] at cases/switch_route3.sh:70 fn=setup_sw1 cmd="docker exec tests-sw-route1 openlan network --name example add --address 192.51.0.1/24" [26-06-22 06:41:50][ASSERT#0002][OK] cost=0.253s [26-06-22 06:41:50][ASSERT#0003][cmd] at cases/switch_route3.sh:71 fn=setup_sw1 cmd="docker exec tests-sw-route1 openlan router address add --device lo --address 10.251.0.11/32" [26-06-22 06:41:50][ASSERT#0003][OK] cost=0.059s [26-06-22 06:41:50][ASSERT#0004][cmd] at cases/switch_route3.sh:72 fn=setup_sw1 cmd="docker exec tests-sw-route1 openlan user add --name edge1@example --password 123456" # total 1 username password role lease edge1@example 123456 guest 2027-06-22T06 [26-06-22 06:41:50][ASSERT#0004][OK] cost=0.065s Started switch pause container: tests-sw-route2-pause Started switch frr container: tests-sw-route2-frr Started switch ipsec container: tests-sw-route2-ipsec Started switch container: tests-sw-route2 [26-06-22 06:41:51][ASSERT#0005][expect] at cases/switch_route3.sh:90 fn=setup_sw2 retry=30 cmd="docker logs -f tests-sw-route2" expect="Http.Start" 2026/06/22 06:41:51 INFO|root|Http.LoadToken: file:/etc/openlan/switch/token does not exist 2026/06/22 06:41:51 INFO|root|UdpServer.Listen: udp://0.0.0.0:10002 2026/06/22 06:41:51 INFO|root|TcpServer.Listen: tcp://0.0.0.0:10002 2026/06/22 06:41:51 INFO|root|Http.Start 0.0.0.0:10000 [26-06-22 06:41:52][ASSERT#0005][OK] cost=1.034s [26-06-22 06:41:52][ASSERT#0006][cmd] at cases/switch_route3.sh:92 fn=setup_sw2 cmd="docker exec tests-sw-route2 openlan network --name example add --address 192.51.0.2/24" [26-06-22 06:41:52][ASSERT#0006][OK] cost=0.254s [26-06-22 06:41:52][ASSERT#0007][cmd] at cases/switch_route3.sh:93 fn=setup_sw2 cmd="docker exec tests-sw-route2 openlan router address add --device lo --address 10.251.0.12/32" [26-06-22 06:41:52][ASSERT#0007][OK] cost=0.070s [26-06-22 06:41:52][ASSERT#0008][cmd] at cases/switch_route3.sh:94 fn=setup_sw2 cmd="docker exec tests-sw-route2 openlan user add --name edge2@example --password 123457" # total 1 username password role lease edge2@example 123457 guest 2027-06-22T06 [26-06-22 06:41:52][ASSERT#0008][OK] cost=0.060s [26-06-22 06:41:52][ASSERT#0009][cmd] at cases/switch_route3.sh:96 fn=setup_sw2 cmd="docker exec tests-sw-route2 openlan network --name example output add --remote 100.100.0.241 --protocol tcp --secret edge1@example:123456 --crypt aes-128:ea64d5b0c96c" [26-06-22 06:41:52][ASSERT#0009][OK] cost=0.076s Started switch pause container: tests-sw-route3-pause Started switch frr container: tests-sw-route3-frr Started switch ipsec container: tests-sw-route3-ipsec Started switch container: tests-sw-route3 [26-06-22 06:41:53][ASSERT#0010][expect] at cases/switch_route3.sh:114 fn=setup_sw3 retry=30 cmd="docker logs -f tests-sw-route3" expect="Http.Start" 2026/06/22 06:41:54 INFO|root|Http.LoadToken: file:/etc/openlan/switch/token does not exist 2026/06/22 06:41:54 INFO|root|UdpServer.Listen: udp://0.0.0.0:10002 2026/06/22 06:41:54 INFO|root|TcpServer.Listen: tcp://0.0.0.0:10002 2026/06/22 06:41:54 INFO|root|Http.Start 0.0.0.0:10000 [26-06-22 06:41:54][ASSERT#0010][OK] cost=1.031s [26-06-22 06:41:54][ASSERT#0011][cmd] at cases/switch_route3.sh:116 fn=setup_sw3 cmd="docker exec tests-sw-route3 openlan network --name example add --address 192.51.0.3/24" [26-06-22 06:41:54][ASSERT#0011][OK] cost=0.263s [26-06-22 06:41:54][ASSERT#0012][cmd] at cases/switch_route3.sh:118 fn=setup_sw3 cmd="docker exec tests-sw-route3 openlan network --name example output add --remote 100.100.0.242 --protocol tcp --secret edge2@example:123457 --crypt aes-128:ea64d5b0c96c" [26-06-22 06:41:54][ASSERT#0012][OK] cost=0.067s [26-06-22 06:41:54][ASSERT#0013][cmd] at cases/switch_route3.sh:121 fn=setup_sw3 cmd="docker exec tests-sw-route3 openlan network --name example route add --prefix 10.251.0.11/32 --nexthop 192.51.0.1" [26-06-22 06:41:54][ASSERT#0013][OK] cost=0.066s [26-06-22 06:41:54][ASSERT#0014][cmd] at cases/switch_route3.sh:122 fn=setup_sw3 cmd="docker exec tests-sw-route3 openlan network --name example route add --prefix 10.251.0.12/32 --nexthop 192.51.0.2" [26-06-22 06:41:54][ASSERT#0014][OK] cost=0.056s [26-06-22 06:41:54][ASSERT#0015][match] at cases/switch_route3.sh:137 fn=test_route retry=60 cmd="docker exec tests-sw-route2 openlan network --name example output ls" expect="state: authenticated" protocol: tcp remote: 100.100.0.241 secret: edge1@example:123456 state: authenticated [26-06-22 06:41:54][ASSERT#0015][OK] cost=0.079s [26-06-22 06:41:55][ASSERT#0016][match] at cases/switch_route3.sh:138 fn=test_route retry=60 cmd="docker exec tests-sw-route3 openlan network --name example output ls" expect="state: authenticated" protocol: tcp remote: 100.100.0.242 secret: edge2@example:123457 state: authenticated [26-06-22 06:41:57][ASSERT#0016][OK] cost=2.194s [26-06-22 06:41:57][ASSERT#0017][match] at cases/switch_route3.sh:126 fn=test_route_once retry=1 cmd="docker exec tests-sw-route3 ip route show" expect="10.251.0.11" default via 100.100.0.1 dev eth0 10.251.0.11 via 192.51.0.1 dev hi-example metric 660 10.251.0.12 via 192.51.0.2 dev hi-example metric 660 100.100.0.0/24 dev eth0 proto kernel scope link src 100.100.0.243 192.51.0.0/24 dev hi-example proto kernel scope link src 192.51.0.3 [26-06-22 06:41:57][ASSERT#0017][OK] cost=0.066s [26-06-22 06:41:57][ASSERT#0018][match] at cases/switch_route3.sh:127 fn=test_route_once retry=1 cmd="docker exec tests-sw-route3 ip route show" expect="10.251.0.12" default via 100.100.0.1 dev eth0 10.251.0.11 via 192.51.0.1 dev hi-example metric 660 10.251.0.12 via 192.51.0.2 dev hi-example metric 660 100.100.0.0/24 dev eth0 proto kernel scope link src 100.100.0.243 192.51.0.0/24 dev hi-example proto kernel scope link src 192.51.0.3 [26-06-22 06:41:57][ASSERT#0018][OK] cost=0.068s [26-06-22 06:41:57][ASSERT#0019][cmd] at cases/switch_route3.sh:129 fn=test_route_once cmd="docker exec tests-sw-route3 ip neigh flush dev hi-example" [26-06-22 06:41:57][ASSERT#0019][OK] cost=0.057s [26-06-22 06:41:57][ASSERT#0020][match] at cases/switch_route3.sh:130 fn=test_route_once retry=25 cmd="docker exec tests-sw-route3 ping -c 3 192.51.0.1" expect="bytes from" PING 192.51.0.1 (192.51.0.1) 56(84) bytes of data. 64 bytes from 192.51.0.1: icmp_seq=1 ttl=64 time=2047 ms 64 bytes from 192.51.0.1: icmp_seq=2 ttl=64 time=1028 ms 64 bytes from 192.51.0.1: icmp_seq=3 ttl=64 time=3.53 ms --- 192.51.0.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2043ms [26-06-22 06:41:59][ASSERT#0020][OK] cost=2.110s [26-06-22 06:41:59][ASSERT#0021][match] at cases/switch_route3.sh:131 fn=test_route_once retry=25 cmd="docker exec tests-sw-route3 ping -c 3 192.51.0.2" expect="bytes from" PING 192.51.0.2 (192.51.0.2) 56(84) bytes of data. 64 bytes from 192.51.0.2: icmp_seq=1 ttl=64 time=0.786 ms 64 bytes from 192.51.0.2: icmp_seq=2 ttl=64 time=1.13 ms 64 bytes from 192.51.0.2: icmp_seq=3 ttl=64 time=1.11 ms --- 192.51.0.2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms [26-06-22 06:42:01][ASSERT#0021][OK] cost=2.083s [26-06-22 06:42:01][ASSERT#0022][match] at cases/switch_route3.sh:132 fn=test_route_once retry=25 cmd="docker exec tests-sw-route3 ping -c 3 10.251.0.11" expect="bytes from" PING 10.251.0.11 (10.251.0.11) 56(84) bytes of data. 64 bytes from 10.251.0.11: icmp_seq=1 ttl=64 time=0.862 ms 64 bytes from 10.251.0.11: icmp_seq=2 ttl=64 time=1.80 ms 64 bytes from 10.251.0.11: icmp_seq=3 ttl=64 time=1.95 ms --- 10.251.0.11 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2033ms [26-06-22 06:42:03][ASSERT#0022][OK] cost=2.106s [26-06-22 06:42:03][ASSERT#0023][match] at cases/switch_route3.sh:133 fn=test_route_once retry=25 cmd="docker exec tests-sw-route3 ping -c 3 10.251.0.12" expect="bytes from" PING 10.251.0.12 (10.251.0.12) 56(84) bytes of data. 64 bytes from 10.251.0.12: icmp_seq=1 ttl=64 time=0.510 ms 64 bytes from 10.251.0.12: icmp_seq=2 ttl=64 time=0.561 ms 64 bytes from 10.251.0.12: icmp_seq=3 ttl=64 time=0.971 ms --- 10.251.0.12 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2066ms [26-06-22 06:42:05][ASSERT#0023][OK] cost=2.127s [26-06-22 06:42:05][ASSERT#0024][cmd] at cases/switch_route3.sh:142 fn=test_route cmd="docker exec tests-sw-route1 openlan reload --save" Save configuraion ... success # reloading pid:45 .... PID 45 CMD: /usr/bin/openlan-switch -conf:dir /etc/openlan/switch -log:level 20 # max wait 60s... # during 1s, new pid:469 ... PID 469 CMD: /usr/bin/openlan-switch -conf:dir /etc/openlan/switch -log:level 20 [26-06-22 06:42:06][ASSERT#0024][OK] cost=1.078s [26-06-22 06:42:06][ASSERT#0025][cmd] at cases/switch_route3.sh:143 fn=test_route cmd="docker exec tests-sw-route2 openlan reload --save" Save configuraion ... success # reloading pid:45 .... PID 45 CMD: /usr/bin/openlan-switch -conf:dir /etc/openlan/switch -log:level 20 # max wait 60s... # during 1s, new pid:501 ... PID 501 CMD: /usr/bin/openlan-switch -conf:dir /etc/openlan/switch -log:level 20 [26-06-22 06:42:08][ASSERT#0025][OK] cost=1.070s [26-06-22 06:42:08][ASSERT#0026][cmd] at cases/switch_route3.sh:144 fn=test_route cmd="docker exec tests-sw-route3 openlan reload --save" Save configuraion ... success # reloading pid:45 .... PID 45 CMD: /usr/bin/openlan-switch -conf:dir /etc/openlan/switch -log:level 20 # max wait 60s... # during 1s, new pid:568 ... PID 568 CMD: /usr/bin/openlan-switch -conf:dir /etc/openlan/switch -log:level 20 [26-06-22 06:42:09][ASSERT#0026][OK] cost=1.064s [26-06-22 06:42:09][ASSERT#0027][match] at cases/switch_route3.sh:146 fn=test_route retry=60 cmd="docker exec tests-sw-route2 openlan network --name example output ls" expect="state: authenticated" remote: 100.100.0.241 rxBytes: 756 secret: edge1@example:123456 state: authenticated txBytes: 1338 [26-06-22 06:42:15][ASSERT#0027][OK] cost=6.479s [26-06-22 06:42:15][ASSERT#0028][match] at cases/switch_route3.sh:147 fn=test_route retry=60 cmd="docker exec tests-sw-route3 openlan network --name example output ls" expect="state: authenticated" remote: 100.100.0.242 rxBytes: 1896 secret: edge2@example:123457 state: authenticated txBytes: 1543 [26-06-22 06:42:15][ASSERT#0028][OK] cost=0.066s [26-06-22 06:42:15][ASSERT#0029][match] at cases/switch_route3.sh:126 fn=test_route_once retry=1 cmd="docker exec tests-sw-route3 ip route show" expect="10.251.0.11" default via 100.100.0.1 dev eth0 10.251.0.11 via 192.51.0.1 dev hi-example metric 660 10.251.0.12 via 192.51.0.2 dev hi-example metric 660 100.100.0.0/24 dev eth0 proto kernel scope link src 100.100.0.243 192.51.0.0/24 dev hi-example proto kernel scope link src 192.51.0.3 [26-06-22 06:42:15][ASSERT#0029][OK] cost=0.056s [26-06-22 06:42:15][ASSERT#0030][match] at cases/switch_route3.sh:127 fn=test_route_once retry=1 cmd="docker exec tests-sw-route3 ip route show" expect="10.251.0.12" default via 100.100.0.1 dev eth0 10.251.0.11 via 192.51.0.1 dev hi-example metric 660 10.251.0.12 via 192.51.0.2 dev hi-example metric 660 100.100.0.0/24 dev eth0 proto kernel scope link src 100.100.0.243 192.51.0.0/24 dev hi-example proto kernel scope link src 192.51.0.3 [26-06-22 06:42:15][ASSERT#0030][OK] cost=0.064s [26-06-22 06:42:15][ASSERT#0031][cmd] at cases/switch_route3.sh:129 fn=test_route_once cmd="docker exec tests-sw-route3 ip neigh flush dev hi-example" [26-06-22 06:42:15][ASSERT#0031][OK] cost=0.048s [26-06-22 06:42:15][ASSERT#0032][match] at cases/switch_route3.sh:130 fn=test_route_once retry=25 cmd="docker exec tests-sw-route3 ping -c 3 192.51.0.1" expect="bytes from" PING 192.51.0.1 (192.51.0.1) 56(84) bytes of data. 64 bytes from 192.51.0.1: icmp_seq=1 ttl=64 time=2056 ms 64 bytes from 192.51.0.1: icmp_seq=2 ttl=64 time=1027 ms 64 bytes from 192.51.0.1: icmp_seq=3 ttl=64 time=3.39 ms --- 192.51.0.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2053ms [26-06-22 06:42:17][ASSERT#0032][OK] cost=2.114s [26-06-22 06:42:17][ASSERT#0033][match] at cases/switch_route3.sh:131 fn=test_route_once retry=25 cmd="docker exec tests-sw-route3 ping -c 3 192.51.0.2" expect="bytes from" PING 192.51.0.2 (192.51.0.2) 56(84) bytes of data. 64 bytes from 192.51.0.2: icmp_seq=1 ttl=64 time=0.874 ms 64 bytes from 192.51.0.2: icmp_seq=2 ttl=64 time=0.590 ms 64 bytes from 192.51.0.2: icmp_seq=3 ttl=64 time=1.16 ms --- 192.51.0.2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2032ms [26-06-22 06:42:20][ASSERT#0033][OK] cost=2.103s [26-06-22 06:42:20][ASSERT#0034][match] at cases/switch_route3.sh:132 fn=test_route_once retry=25 cmd="docker exec tests-sw-route3 ping -c 3 10.251.0.11" expect="bytes from" PING 10.251.0.11 (10.251.0.11) 56(84) bytes of data. 64 bytes from 10.251.0.11: icmp_seq=1 ttl=64 time=0.846 ms 64 bytes from 10.251.0.11: icmp_seq=2 ttl=64 time=1.76 ms 64 bytes from 10.251.0.11: icmp_seq=3 ttl=64 time=2.29 ms --- 10.251.0.11 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2012ms [26-06-22 06:42:22][ASSERT#0034][OK] cost=2.085s [26-06-22 06:42:22][ASSERT#0035][match] at cases/switch_route3.sh:133 fn=test_route_once retry=25 cmd="docker exec tests-sw-route3 ping -c 3 10.251.0.12" expect="bytes from" PING 10.251.0.12 (10.251.0.12) 56(84) bytes of data. 64 bytes from 10.251.0.12: icmp_seq=1 ttl=64 time=0.516 ms 64 bytes from 10.251.0.12: icmp_seq=2 ttl=64 time=0.667 ms 64 bytes from 10.251.0.12: icmp_seq=3 ttl=64 time=1.11 ms --- 10.251.0.12 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2054ms [26-06-22 06:42:24][ASSERT#0035][OK] cost=2.126s [26-06-22 06:42:24] END switch_route3 status=PASS cost=36.882s