Matus Fabian | 7801ca2 | 2017-08-03 00:58:05 -0700 | [diff] [blame] | 1 | create packet-generator interface pg0 |
| 2 | create packet-generator interface pg1 |
| 3 | |
Damjan Marion | 3153f00 | 2022-05-14 00:14:02 +0200 | [diff] [blame] | 4 | packet-generator new { \ |
| 5 | name f1 \ |
| 6 | limit 1000000 \ |
| 7 | node ip4-input \ |
| 8 | size 64-64 \ |
| 9 | interface pg0 \ |
| 10 | data { \ |
| 11 | UDP: 10.0.0.3 -> 172.16.1.2 \ |
| 12 | UDP: 3000 -> 3001 \ |
| 13 | length 128 checksum 0 incrementing 1 \ |
| 14 | } \ |
Matus Fabian | 475f055 | 2016-10-19 06:17:52 -0700 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | |
Damjan Marion | 3153f00 | 2022-05-14 00:14:02 +0200 | [diff] [blame] | 18 | packet-generator new { \ |
| 19 | name f2 \ |
| 20 | limit 1000000 \ |
| 21 | node ip4-input \ |
| 22 | size 64-64 \ |
| 23 | interface pg0 \ |
| 24 | data { \ |
| 25 | UDP: 10.0.0.3 -> 172.16.1.2 \ |
| 26 | UDP: 3005 -> 3006 \ |
| 27 | length 128 checksum 0 incrementing 1 \ |
| 28 | } \ |
Matus Fabian | 475f055 | 2016-10-19 06:17:52 -0700 | [diff] [blame] | 29 | } |
| 30 | |
Matus Fabian | 2ba92e3 | 2017-08-21 07:05:03 -0700 | [diff] [blame] | 31 | nat44 add address 172.16.1.3 |
Matus Fabian | 475f055 | 2016-10-19 06:17:52 -0700 | [diff] [blame] | 32 | set int ip address pg0 10.0.0.1/24 |
Matus Fabian | 7801ca2 | 2017-08-03 00:58:05 -0700 | [diff] [blame] | 33 | set int ip address pg1 172.16.1.1/24 |
| 34 | set int state pg0 up |
| 35 | set int state pg1 up |
ShivaShankarK | b0f956c | 2020-03-18 15:34:11 +0530 | [diff] [blame] | 36 | set ip neighbor static pg0 10.0.0.3 abcd.abcd.abcd |
| 37 | set ip neighbor static pg0 10.0.0.4 abcd.abcd.abcd |
| 38 | set ip neighbor static pg1 172.16.1.2 cdef.abcd.abcd |
Matus Fabian | 2ba92e3 | 2017-08-21 07:05:03 -0700 | [diff] [blame] | 39 | set int nat44 in pg0 out pg1 |