/testing/guestbin/swan-prep
east #
 ip addr show dev eth0 | grep 192.0.200.254 || ip addr add 192.0.200.254/24 dev eth0:1
east #
 ip addr show dev eth0 | grep 192.0.201.254 || ip addr add 192.0.201.254/24 dev eth0:1
east #
 ip route show scope global | grep 192.0.100.0 || ip route add 192.0.100.0/24 via 192.1.2.45  dev eth1
east #
 ip route show scope global | grep 192.0.101.0 || ip route add 192.0.101.0/24 via 192.1.2.45  dev eth1
east #
 ipsec start
Redirecting to: [initsystem]
east #
 ../../guestbin/wait-until-pluto-started
east #
 ipsec auto --add westnet-eastnet-ikev2a
002 "westnet-eastnet-ikev2a": added IKEv2 connection
east #
 ipsec auto --add westnet-eastnet-ikev2b
002 "westnet-eastnet-ikev2b": added IKEv2 connection
east #
 ipsec auto --add westnet-eastnet-ikev2c
002 "westnet-eastnet-ikev2c": added IKEv2 connection
east #
 echo "initdone"
initdone
east #
 ipsec status |grep STATE_
000 #12: "westnet-eastnet-ikev2a":500 STATE_V2_ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; newest IPSEC; eroute owner; isakmp#8; idle;
000 #13: "westnet-eastnet-ikev2b":500 STATE_V2_ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; newest IPSEC; eroute owner; isakmp#8; idle;
000 #8: "westnet-eastnet-ikev2c":500 STATE_V2_ESTABLISHED_IKE_SA (established IKE SA); REKEY in XXs; newest ISAKMP; idle;
000 #14: "westnet-eastnet-ikev2c":500 STATE_V2_ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; newest IPSEC; eroute owner; isakmp#8; idle;
east #
 # there should be only one IKE_INIT exchange
east #
 grep "PARENT_I1 with STF_OK" /tmp/pluto.log
east #
 grep "PARENT_R1 with status STF_OK" /tmp/pluto.log
| #1 complete_v2_state_transition() PARENT_R0->PARENT_R1 with status STF_OK
east #
 
