/testing/guestbin/swan-prep
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec add ikev2-west-east
"ikev2-west-east": added IKEv2 connection
west #
 echo "initdone"
initdone
west #
 # unfortunately does not yet indicate it is using TCP
west #
 ipsec up ikev2-west-east
"ikev2-west-east" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"ikev2-west-east" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/4500
"ikev2-west-east" #1: processed IKE_SA_INIT response from 192.1.2.23:UDP/4500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"ikev2-west-east" #1: sent IKE_AUTH request to 192.1.2.23:UDP/4500
"ikev2-west-east" #1: initiator established IKE SA; authenticated peer using preloaded certificate '@east' and 2nnn-bit RSASSA-PSS with SHA2_512 digital signature
"ikev2-west-east" #2: initiator established Child SA using #1; IPsec transport [192.1.2.45/32===192.1.2.23/32] {ESPinTCP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23
PING 192.1.2.23 (192.1.2.23) 56(84) bytes of data.
--- 192.1.2.23 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
west #
 ipsec whack --trafficstatus
#2: "ikev2-west-east", type=ESP, add_time=1234567890, inBytes=64, outBytes=64, maxBytes=2^63B, id='@east'
west #
 # should show tcp being used
west #
 ../../guestbin/ipsec-look.sh 2>/dev/null | grep encap
	encap type espintcp sport 4500 dport EPHEM addr 0.0.0.0
	encap type espintcp sport EPHEM dport 4500 addr 0.0.0.0
west #
 ../../guestbin/ipsec-kernel-state.sh
src 192.1.2.23 dst 192.1.2.45
	proto esp spi 0xSPISPI reqid REQID mode transport
	replay-window 0 flag esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	encap type espintcp sport 4500 dport 42496 addr 0.0.0.0
	lastused YYYY-MM-DD HH:MM:SS
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 128, bitmap-length 4
	 00000000 00000000 00000000 XXXXXXXX 
	sel src 192.1.2.23/32 dst 192.1.2.45/32 
src 192.1.2.45 dst 192.1.2.23
	proto esp spi 0xSPISPI reqid REQID mode transport
	replay-window 0 flag esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	encap type espintcp sport 42496 dport 4500 addr 0.0.0.0
	lastused YYYY-MM-DD HH:MM:SS
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 128, bitmap-length 4
	 00000000 00000000 00000000 XXXXXXXX 
	sel src 192.1.2.45/32 dst 192.1.2.23/32 
west #
 ../../guestbin/ipsec-kernel-policy.sh
src 192.1.2.23/32 dst 192.1.2.45/32
	dir in priority PRIORITY ptype main
	tmpl src 0.0.0.0 dst 0.0.0.0
		proto esp reqid REQID mode transport
src 192.1.2.45/32 dst 192.1.2.23/32
	dir out priority PRIORITY ptype main
	tmpl src 0.0.0.0 dst 0.0.0.0
		proto esp reqid REQID mode transport
west #
 ipsec auto --down ikev2-west-east
"ikev2-west-east": terminating SAs using this connection
"ikev2-west-east" #1: deleting IKE SA (ESTABLISHED_IKE_SA) and sending notification
"ikev2-west-east" #2: ESP traffic information: in=64B out=64B
west #
 echo "done"
done
west #
 
