blob: 5d186c87cb919efa6c27c046d4340f0597e1dae6 [file] [log] [blame]
Neale Rannsfd060842019-03-04 13:44:42 +00001
2create packet-generator interface pg0
3create packet-generator interface pg1
4
5pipe create
6
7ip table add 1
8set int ip table pg1 1
9set int ip table pipe0.1 1
10
11set int ip address pg0 192.168.0.1/24
12set int ip address pg1 192.168.1.1/24
13
14set int ip address pipe0.0 10.0.0.1/24
15set int ip address pipe0.1 10.0.0.2/24
16
17set int state pg0 up
18set int state pg1 up
19set int state pipe0 up
20
Ray Kinsella6db19a92022-03-01 09:00:17 +000021ipsec sa add 20 spi 200 crypto-key 6541686776336961656264656f6f6579 crypto-alg aes-cbc-128
22ipsec sa add 30 spi 300 crypto-key 6541686776336961656264656f6f6579 crypto-alg aes-cbc-128
Neale Rannsfd060842019-03-04 13:44:42 +000023
Ray Kinsella6db19a92022-03-01 09:00:17 +000024create ipip tunnel src 10.0.0.1 dst 10.0.0.2
25create ipip tunnel src 10.0.0.2 dst 10.0.0.1 outer-table-id 1
Neale Rannsfd060842019-03-04 13:44:42 +000026
Ray Kinsella6db19a92022-03-01 09:00:17 +000027ipsec tunnel protect ipip0 sa-in 20 sa-out 30
28ipsec tunnel protect ipip1 sa-in 30 sa-out 20
Neale Rannsfd060842019-03-04 13:44:42 +000029
Ray Kinsella6db19a92022-03-01 09:00:17 +000030set int state ipip0 up
31set int unnum ipip0 use pg0
Neale Rannsfd060842019-03-04 13:44:42 +000032
Ray Kinsella6db19a92022-03-01 09:00:17 +000033set int state ipip1 up
34set int ip table ipip1 1
35set int unnum ipip1 use pg1
36
37ip route add 192.168.1.0/24 via ipip0
ShivaShankarKb0f956c2020-03-18 15:34:11 +053038set ip neighbor pg1 192.168.1.2 00:11:22:33:44:55
Ray Kinsella6db19a92022-03-01 09:00:17 +000039ip route add table 1 192.168.0.0/24 via ipip1
ShivaShankarKb0f956c2020-03-18 15:34:11 +053040set ip neighbor pg0 192.168.0.2 00:11:22:33:44:66
Neale Rannsfd060842019-03-04 13:44:42 +000041
42trace add pg-input 100
43
Damjan Marion3153f002022-05-14 00:14:02 +020044packet-generator new { \
45 name ipsec1 \
46 limit 1 \
47 rate 1e4 \
48 node ip4-input \
49 interface pg0 \
50 size 100-100 \
51 data { \
52 UDP: 192.168.0.2 -> 192.168.1.2 \
53 UDP: 4321 -> 1234 \
54 length 72 \
55 incrementing 100 \
56 } \
Neale Rannsfd060842019-03-04 13:44:42 +000057}
Damjan Marion3153f002022-05-14 00:14:02 +020058packet-generator new { \
59 name ipsec2 \
60 limit 1 \
61 rate 1e4 \
62 node ip4-input \
63 interface pg1 \
64 size 100-100 \
65 data { \
66 UDP: 192.168.1.2 -> 192.168.0.2 \
67 UDP: 4321 -> 1234 \
68 length 72 \
69 incrementing 100 \
70 } \
Neale Rannsfd060842019-03-04 13:44:42 +000071}