blob: a711519ecdfd5ad9f625e2d7e68fb94501e34bb0 [file] [log] [blame]
Matus Fabian7801ca22017-08-03 00:58:05 -07001create packet-generator interface pg0
2create packet-generator interface pg1
3
Matus Fabian475f0552016-10-19 06:17:52 -07004packet-generator new {
5 name f1
6 limit 1000000
7 node ip4-input
8 size 64-64
9 no-recycle
Matus Fabian7801ca22017-08-03 00:58:05 -070010 interface pg0
Matus Fabian475f0552016-10-19 06:17:52 -070011 data {
12 UDP: 10.0.0.3 -> 172.16.1.2
13 UDP: 3000 -> 3001
14 length 128 checksum 0 incrementing 1
15 }
16}
17
18
19packet-generator new {
20 name f2
21 limit 1000000
22 node ip4-input
23 size 64-64
24 no-recycle
Matus Fabian7801ca22017-08-03 00:58:05 -070025 interface pg0
Matus Fabian475f0552016-10-19 06:17:52 -070026 data {
27 UDP: 10.0.0.3 -> 172.16.1.2
28 UDP: 3005 -> 3006
29 length 128 checksum 0 incrementing 1
30 }
31}
32
33snat add address 172.16.1.3
Matus Fabian475f0552016-10-19 06:17:52 -070034set int ip address pg0 10.0.0.1/24
Matus Fabian7801ca22017-08-03 00:58:05 -070035set int ip address pg1 172.16.1.1/24
36set int state pg0 up
37set int state pg1 up
38set ip arp static pg0 10.0.0.3 abcd.abcd.abcd
39set ip arp static pg0 10.0.0.4 abcd.abcd.abcd
40set ip arp static pg1 172.16.1.2 cdef.abcd.abcd
41set int snat in pg0 out pg1