/testing/guestbin/swan-prep --nokeys
Creating empty NSS database
north #
 ../../guestbin/ip.sh link set ipsec2 down 2>/dev/null && ../../guestbin/ip.sh link del ipsec2 2>/dev/null
north #
 ../../guestbin/ip.sh link set ipsec3 down 2>/dev/null && ../../guestbin/ip.sh link del ipsec3 2>/dev/null
north #
 ipsec start
Redirecting to: [initsystem]
north #
 ../../guestbin/wait-until-pluto-started
north #
 ipsec auto --add north-east
"north-east": created ipsec-interface ipsec3@eth1
"north-east": added IKEv2 connection
north #
 ipsec auto --add north-west
"north-west": created ipsec-interface ipsec2@eth1
"north-west": added IKEv2 connection
north #
 echo "initdone"
initdone
north #
 ipsec auto --up north-west
"north-west" #1: initiating IKEv2 connection to 192.1.2.45 using UDP
"north-west" #1: sent IKE_SA_INIT request to 192.1.2.45:UDP/500
"north-west" #1: processed IKE_SA_INIT response from 192.1.2.45:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"north-west" #1: sent IKE_AUTH request to 192.1.2.45:UDP/500
"north-west" #1: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@west'
"north-west" #2: route-client output: leftsubnet == rightsubnet = 0.0.0.0/0 cannot add route
"north-west" #2: initiator established Child SA using #1; IPsec tunnel [0.0.0.0/0===0.0.0.0/0] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
north #
 ../../guestbin/ip.sh -s link show ipsec2
X: ipsec2@eth1: <NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN
    RX:  bytes packets errors dropped  missed   mcast           
             0       0      0       0       0       0 
    TX:  bytes packets errors dropped carrier collsns           
             0       0      0       0       0       0 
north #
 ../../guestbin/ip.sh route add 192.0.1.0/24 dev ipsec2
north #
 ping -n -q -w 4 -c 4 192.0.1.254
PING 192.0.1.254 (192.0.1.254) 56(84) bytes of data.
--- 192.0.1.254 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time XXXX
rtt min/avg/max/mdev = 0.XXX/0.XXX/0.XXX/0.XXX ms
north #
 ../../guestbin/ip.sh -s link show ipsec2
X: ipsec2@eth1: <NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN
    RX:  bytes packets errors dropped  missed   mcast           
           336       4      0       0       0       0 
    TX:  bytes packets errors dropped carrier collsns           
           336       4      0       0       0       0 
north #
 ipsec trafficstatus
#2: "north-west", type=ESP, add_time=1234567890, inBytes=336, outBytes=336, maxBytes=2^63B, id='@west'
north #
 # second connection will fail
north #
 ipsec auto --up north-east
"north-east" #3: initiating IKEv2 connection to 192.1.2.23 using UDP
"north-east" #3: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"north-east" #3: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"north-east" #3: sent IKE_AUTH request to 192.1.2.23:UDP/500
"north-east" #3: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
"north-east" #4: initiator established Child SA using #3; IPsec tunnel [0.0.0.0/0===0.0.0.0/0] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
north #
 ../../guestbin/ip.sh -s link show ipsec2
X: ipsec2@eth1: <NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN
    RX:  bytes packets errors dropped  missed   mcast           
           336       4      0       0       0       0 
    TX:  bytes packets errors dropped carrier collsns           
           336       4      0       0       0       0 
north #
 ../../guestbin/ip.sh route add 192.0.2.0/24 dev ipsec3
north #
 ../../guestbin/ping-once.sh --up 192.0.2.254
up
north #
 ../../guestbin/ip.sh -s link show ipsec3
X: ipsec3@eth1: <NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN
    RX:  bytes packets errors dropped  missed   mcast           
            84       1      0       0       0       0 
    TX:  bytes packets errors dropped carrier collsns           
            84       1      0       0       0       0 
north #
 ipsec trafficstatus
#4: "north-east", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
#2: "north-west", type=ESP, add_time=1234567890, inBytes=336, outBytes=336, maxBytes=2^63B, id='@west'
north #
 echo "initdone"
initdone
north #
 ipsec whack --trafficstatus
#4: "north-east", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
#2: "north-west", type=ESP, add_time=1234567890, inBytes=336, outBytes=336, maxBytes=2^63B, id='@west'
north #
 
