/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
002 "road": added IKEv2 connection
road #
 echo "initdone"
initdone
road #
 ipsec auto --up road
1v2 "road"[1] 192.1.2.23 #1: initiating IKEv2 connection
1v2 "road"[1] 192.1.2.23 #1: sent IKE_SA_INIT request
1v2 "road"[1] 192.1.2.23 #1: sent IKE_AUTH request {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=MODP2048}
003 "road"[1] 192.1.2.23 #1: established IKE SA; authenticated using authby=secret and peer ID_FQDN '@east'
002 "road"[1] 192.1.2.23 #2: received INTERNAL_IP4_ADDRESS 192.0.2.1
002 "road"[1] 192.1.2.23 #2: received INTERNAL_IP4_DNS 1.2.3.4
002 "road"[1] 192.1.2.23 #2: received INTERNAL_IP4_DNS 8.8.8.8
002 "road"[1] 192.1.2.23 #2: up-client output: updating resolvconf
004 "road"[1] 192.1.2.23 #2: established Child SA; IPsec tunnel [192.0.2.1-192.0.2.1:0-65535 0] -> [0.0.0.0-255.255.255.255:0-65535 0] {ESP=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE NATOA=none NATD=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
006 #2: "road"[1] 192.1.2.23, type=ESP, add_time=1234567890, inBytes=168, outBytes=168, id='@east', lease=192.0.2.1/32
road #
 ipsec auto --down 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 50 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 overrun 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 #
 
