Matus Fabian | 066f034 | 2017-02-10 03:48:01 -0800 | [diff] [blame] | 1 | create packet-generator interface pg0 |
| 2 | create packet-generator interface pg1 |
| 3 | |
| 4 | packet-generator new { |
| 5 | name f1 |
| 6 | limit 1000000 |
| 7 | node ip4-input |
| 8 | size 64-64 |
Matus Fabian | 066f034 | 2017-02-10 03:48:01 -0800 | [diff] [blame] | 9 | worker 0 |
| 10 | interface pg0 |
| 11 | 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 | |
| 19 | packet-generator new { |
| 20 | name f2 |
| 21 | limit 1000000 |
| 22 | node ip4-input |
| 23 | size 64-64 |
Matus Fabian | 066f034 | 2017-02-10 03:48:01 -0800 | [diff] [blame] | 24 | worker 1 |
| 25 | interface pg0 |
| 26 | 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 | |
| 33 | |
| 34 | packet-generator new { |
| 35 | name f3 |
| 36 | limit 1000000 |
| 37 | node ip4-input |
| 38 | size 64-64 |
Matus Fabian | 066f034 | 2017-02-10 03:48:01 -0800 | [diff] [blame] | 39 | worker 0 |
| 40 | interface pg1 |
| 41 | data { |
| 42 | UDP: 172.16.1.2 -> 1.1.1.2 |
| 43 | UDP: 3001 -> 1141 |
| 44 | length 128 checksum 0 incrementing 1 |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | |
| 49 | packet-generator new { |
| 50 | name f4 |
| 51 | limit 1000000 |
| 52 | node ip4-input |
| 53 | size 64-64 |
Matus Fabian | 066f034 | 2017-02-10 03:48:01 -0800 | [diff] [blame] | 54 | worker 1 |
| 55 | interface pg1 |
| 56 | data { |
| 57 | UDP: 172.16.1.2 -> 1.1.1.2 |
| 58 | UDP: 3006 -> 1146 |
| 59 | length 128 checksum 0 incrementing 1 |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | |
| 64 | packet-generator new { |
| 65 | name f5 |
| 66 | limit 1000000 |
| 67 | node ip4-input |
| 68 | size 64-64 |
Matus Fabian | 066f034 | 2017-02-10 03:48:01 -0800 | [diff] [blame] | 69 | worker 2 |
| 70 | interface pg0 |
| 71 | data { |
| 72 | UDP: 10.0.0.4 -> 172.16.1.2 |
| 73 | UDP: 3005 -> 3006 |
| 74 | length 128 checksum 0 incrementing 1 |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | |
| 79 | packet-generator new { |
| 80 | name f6 |
| 81 | limit 1000000 |
| 82 | node ip4-input |
| 83 | size 64-64 |
Matus Fabian | 066f034 | 2017-02-10 03:48:01 -0800 | [diff] [blame] | 84 | worker 1 |
| 85 | interface pg1 |
| 86 | data { |
| 87 | UDP: 172.16.1.2 -> 1.1.1.2 |
| 88 | UDP: 3006 -> 1177 |
| 89 | length 128 checksum 0 incrementing 1 |
| 90 | } |
| 91 | } |
| 92 | |
Matus Fabian | 2ba92e3 | 2017-08-21 07:05:03 -0700 | [diff] [blame] | 93 | nat44 deterministic add in 10.0.0.0/21 out 1.1.1.2/32 |
Matus Fabian | 066f034 | 2017-02-10 03:48:01 -0800 | [diff] [blame] | 94 | set int ip address pg0 10.0.0.1/24 |
| 95 | set int ip address pg1 172.16.1.1/24 |
| 96 | set int state pg0 up |
| 97 | set int state pg1 up |
ShivaShankarK | b0f956c | 2020-03-18 15:34:11 +0530 | [diff] [blame^] | 98 | set ip neighbor static pg0 10.0.0.3 abcd.abcd.abcd |
| 99 | set ip neighbor static pg0 10.0.0.4 abcd.abcd.abcd |
| 100 | set ip neighbor static pg1 172.16.1.2 cdef.abcd.abcd |
Matus Fabian | 2ba92e3 | 2017-08-21 07:05:03 -0700 | [diff] [blame] | 101 | set int nat44 in pg0 out pg1 |
Matus Fabian | 066f034 | 2017-02-10 03:48:01 -0800 | [diff] [blame] | 102 | trace add pg-input 10 |