blob: 6dc4dd7b780848854a3ac3950a8c067386a6be2b [file] [log] [blame]
Neale Rannsc87b66c2019-02-07 07:26:12 -08001
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
21ipsec 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
23
24create ipip tunnel src 10.0.0.1 dst 10.0.0.2
BenoƮt Ganne27632ca2020-11-06 10:55:22 +010025create ipip tunnel src 10.0.0.2 dst 10.0.0.1 outer-table-id 1
Neale Rannsc87b66c2019-02-07 07:26:12 -080026
27ipsec tunnel protect ipip0 sa-in 20 sa-out 30
28ipsec tunnel protect ipip1 sa-in 30 sa-out 20
29
30set int state ipip0 up
31set int unnum ipip0 use pg0
32
33set 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
Neale Rannsc87b66c2019-02-07 07:26:12 -080039ip 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 Rannsc87b66c2019-02-07 07:26:12 -080041
42trace add pg-input 100
43
44packet-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 }
57}
58packet-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 }
71}