/testing/guestbin/swan-prep
road #
 ipsec start
Redirecting to: [initsystem]
road #
 ../../guestbin/wait-until-pluto-started
road #
 ipsec whack --impair suppress_retransmits
road #
 ipsec auto --add road
"road": added IKEv2 connection
road #
 echo "initdone"
initdone
road #
 ipsec auto --up road
"road"[1] 192.1.2.23 #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"road"[1] 192.1.2.23 #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"road"[1] 192.1.2.23 #1: 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
"road"[1] 192.1.2.23 #1: sent IKE_AUTH request to 192.1.2.23:UDP/500
"road"[1] 192.1.2.23 #1: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
"road"[1] 192.1.2.23 #2: received INTERNAL_IP4_ADDRESS 192.0.2.1
"road"[1] 192.1.2.23 #2: received INTERNAL_IP4_DNS 1.2.3.4
"road"[1] 192.1.2.23 #2: received INTERNAL_IP4_DNS 8.8.8.8
"road"[1] 192.1.2.23 #2: up-client output: updating resolvconf
"road"[1] 192.1.2.23 #2: initiator established Child SA using #1; IPsec tunnel [192.0.2.1/32===0.0.0.0/0] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
road #
 ping -n -q -c 2 192.0.2.254
PING 192.0.2.254 (192.0.2.254) 56(84) bytes of data.
--- 192.0.2.254 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time XXXX
rtt min/avg/max/mdev = 0.XXX/0.XXX/0.XXX/0.XXX ms
road #
 ipsec whack --trafficstatus
#2: "road"[1] 192.1.2.23, type=ESP, add_time=1234567890, inBytes=168, outBytes=168, maxBytes=2^63B, id='@east', lease=192.0.2.1/32
road #
 ipsec auto --down westnet-eastnet-ipv4-psk-ikev2
no connection or alias named "westnet-eastnet-ipv4-psk-ikev2"'
road #
 echo done
done
road #
 ip addr show dev lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
road #
 ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
    link/ether 12:00:00:ab:cd:02 brd ff:ff:ff:ff:ff:ff
    inet 192.1.3.209/24 scope global eth0
       valid_lft forever preferred_lft forever
road #
 ip addr show dev ipsec1
X: ipsec1@eth0: <NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN
    inet 192.0.2.1/32 scope global ipsec1
       valid_lft forever preferred_lft forever
road #
 ip -s link show ipsec1
X: ipsec1@eth0: <NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN
    RX:  bytes packets errors dropped  missed   mcast           
           168       2      0       0       0       0 
    TX:  bytes packets errors dropped carrier collsns           
           168       2      0       0       0       0 
road #
 ip rule show
0:	from all lookup local
100:	from all fwmark 0x1 lookup 50
32766:	from all lookup main
32767:	from all lookup default
road #
 ip route show
0.0.0.0/1 dev ipsec1 scope link src 192.0.2.1
default via 192.1.3.254 dev eth0
128.0.0.0/1 dev ipsec1 scope link src 192.0.2.1
192.1.3.0/24 dev eth0 proto kernel scope link src 192.1.3.209
road #
 ip route show table 50
192.1.2.23 via 192.1.3.254 dev eth0
road #
 
