blob: 55cd914c4f75cc3ef47246e9345cd00253c40230 [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
Benoît Gannebe954442019-04-29 16:05:46 +020021create ipsec tunnel local-ip 10.0.0.1 remote-ip 10.0.0.2 local-spi 100 remote-spi 101 local-crypto-key 6541686776336961656264656f6f6579 remote-crypto-key 6541686776336961656264656f6f6579 crypto-alg aes-cbc-128
Neale Rannsfd060842019-03-04 13:44:42 +000022
23set int state ipsec0 up
24set int unnum ipsec0 use pg0
25
Benoît Gannebe954442019-04-29 16:05:46 +020026create ipsec tunnel local-ip 10.0.0.2 remote-ip 10.0.0.1 local-spi 101 remote-spi 100 tx-table 1 local-crypto-key 6541686776336961656264656f6f6579 remote-crypto-key 6541686776336961656264656f6f6579 crypto-alg aes-cbc-128
Neale Rannsfd060842019-03-04 13:44:42 +000027
28set int state ipsec1 up
29set int ip table ipsec1 1
30set int unnum ipsec1 use pg1
31
32ip route add 192.168.1.0/24 via ipsec0
ShivaShankarKb0f956c2020-03-18 15:34:11 +053033set ip neighbor pg1 192.168.1.2 00:11:22:33:44:55
Neale Rannsfd060842019-03-04 13:44:42 +000034ip route add table 1 192.168.0.0/24 via ipsec1
ShivaShankarKb0f956c2020-03-18 15:34:11 +053035set ip neighbor pg0 192.168.0.2 00:11:22:33:44:66
Neale Rannsfd060842019-03-04 13:44:42 +000036
37trace add pg-input 100
38
39packet-generator new {
40 name ipsec1
41 limit 1
42 rate 1e4
43 node ip4-input
44 interface pg0
45 size 100-100
46 data {
47 UDP: 192.168.0.2 -> 192.168.1.2
48 UDP: 4321 -> 1234
49 length 72
50 incrementing 100
51 }
52}
53packet-generator new {
54 name ipsec2
55 limit 1
56 rate 1e4
57 node ip4-input
58 interface pg1
59 size 100-100
60 data {
61 UDP: 192.168.1.2 -> 192.168.0.2
62 UDP: 4321 -> 1234
63 length 72
64 incrementing 100
65 }
66}