blob: f66c13ce99f65f3ba0b6b1eefad715d4fd2d7ba7 [file] [log] [blame]
Matus Fabiana6110b62018-06-13 05:39:07 -07001create 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 pg1
12 data {
13 UDP: 172.16.1.11 -> 172.16.1.3
14 UDP: 3001 -> 3000
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.10 -> 172.16.1.3
30 UDP: 3001 -> 3000
31 length 128 checksum 0 incrementing 1
32 }
33}
34
35nat44 add address 172.16.1.3
36nat44 add load-balancing static mapping protocol udp external 172.16.1.3:3000 local 10.0.0.10:30000 probability 25 local 10.0.0.11:30000 probability 25 local 10.0.0.12:30000 probability 25 local 10.0.0.13:30000 probability 25
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.10 abcd.abcd.abcd
42set ip arp static pg0 10.0.0.11 abcd.abcd.abce
43set ip arp static pg0 10.0.0.12 abce.abcd.abcd
44set ip arp static pg0 10.0.0.13 abce.abcd.abce
45set ip arp static pg1 172.16.1.10 cdef.abcd.abcd
46set ip arp static pg1 172.16.1.11 cdef.abcd.abce
47set int nat44 in pg0 out pg1
48trace add pg-input 10