blob: 8fe48bffaaaf15e9a0b83094cefba5bf658f71e4 [file] [log] [blame]
Matus Fabian49331682016-12-01 01:32:03 -08001create packet-generator interface pg0
2create packet-generator interface pg1
3
4packet-generator new {
5 name f1
6 limit 1000000
7 node ip4-input
8 size 64-64
9 no-recycle
10 worker 0
11 interface pg0
12 data {
13 UDP: 10.0.0.3 -> 172.16.1.2
14 UDP: 3000 -> 3001
15 length 128 checksum 0 incrementing 1
16 }
17}
18
19
20packet-generator new {
21 name f2
22 limit 1000000
23 node ip4-input
24 size 64-64
25 no-recycle
26 worker 1
27 interface pg1
28 data {
29 UDP: 172.16.1.2 -> 172.16.1.3
30 UDP: 3001 -> 3000
31 length 128 checksum 0 incrementing 1
32 }
33}
34
35snat add address 172.16.1.3
36snat add static mapping local 10.0.0.3 external 172.16.1.3
37set int ip address pg0 10.0.0.1/24
38set int ip address pg1 172.16.1.1/24
39set int state pg0 up
40set int state pg1 up
41set ip arp static pg0 10.0.0.3 abcd.abcd.abcd
42set ip arp static pg1 172.16.1.2 cdef.abcd.abcd
43set int snat in pg0 out pg1
44trace add pg-input 10