Skip to content

Instantly share code, notes, and snippets.

@dmarion
Created March 17, 2020 13:46
Show Gist options
  • Save dmarion/fba628a80e949608df44026d36a58654 to your computer and use it in GitHub Desktop.
Save dmarion/fba628a80e949608df44026d36a58654 to your computer and use it in GitHub Desktop.

startup.vpp

trace add avf-input 50
pipe create
create interface avf 0000:86:02.0 name eth0
create interface avf 0000:86:0a.0 name eth1

ip table add 1
set int ip table eth1 1
set int ip table pipe0.1 1

set int ip address eth0 172.16.0.1/24
set int ip address eth1 172.16.1.1/24
set int ip address pipe0.0 10.0.0.1/24
set int ip address pipe0.1 10.0.0.2/24
set int state eth0 up
set int state eth1 up
set int state pipe0 up

create ipsec tunnel local-ip 10.0.0.1 remote-ip 10.0.0.2 local-spi 100 remote-spi 101 salt 0x12345678 crypto-alg aes-gcm-128 local-crypto-key f0e1d2c3b4a5968778695a4b3c2d1e0f remote-crypto-key f0e1d2c3b4a5968778695a4b3c2d1e0f use-esn use-anti-replay
create ipsec tunnel local-ip 10.0.0.2 remote-ip 10.0.0.1 local-spi 101 remote-spi 100 salt 0x12345678 crypto-alg aes-gcm-128 local-crypto-key f0e1d2c3b4a5968778695a4b3c2d1e0f remote-crypto-key f0e1d2c3b4a5968778695a4b3c2d1e0f use-esn use-anti-replay tx-table 1
set int state ipip0 up
set int state ipip1 up
set int ip table ipip1 1
set int unnum ipip0 use eth0
set int unnum ipip1 use eth1

ip route add 172.16.1.0/24 via ipip0
ip route add 172.16.0.0/24 table 1 via ipip1
set interface rx-placement eth1 worker 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment