Benoît Ganne | 4af1a7f | 2019-03-01 14:14:10 +0100 | [diff] [blame] | 1 | create packet-generator interface pg0 |
| 2 | set int ip address pg0 192.168.1.1/24 |
| 3 | set int ip address pg0 192:168:1::1/64 |
ShivaShankarK | b0f956c | 2020-03-18 15:34:11 +0530 | [diff] [blame] | 4 | set ip neighbor pg0 192.168.1.2 1:2:3:4:5:6 static |
| 5 | set ip neighbor pg0 192:168:1::2 1:2:3:4:5:6 static |
Benoît Ganne | 4af1a7f | 2019-03-01 14:14:10 +0100 | [diff] [blame] | 6 | set int state pg0 up |
| 7 | |
| 8 | create packet-generator interface pg1 |
| 9 | set int ip address pg1 192.168.2.1/24 |
| 10 | set int ip address pg1 192:168:2::1/64 |
ShivaShankarK | b0f956c | 2020-03-18 15:34:11 +0530 | [diff] [blame] | 11 | set ip neighbor pg1 192.168.2.2 6:5:4:3:2:1 static |
| 12 | set ip neighbor pg1 192:168:2::2 6:5:4:3:2:1 static |
Benoît Ganne | 4af1a7f | 2019-03-01 14:14:10 +0100 | [diff] [blame] | 13 | set int state pg1 up |
| 14 | |
Damjan Marion | 3153f00 | 2022-05-14 00:14:02 +0200 | [diff] [blame] | 15 | packet-generator new { \ |
| 16 | name v4-1-to-2 \ |
| 17 | limit -1 \ |
| 18 | node ip4-input \ |
| 19 | size 64-64 \ |
| 20 | interface pg0 \ |
| 21 | data { \ |
| 22 | UDP: 192.168.1.2 -> 192.168.2.2 \ |
| 23 | UDP: 4321 -> 1234 \ |
| 24 | length 128 checksum 0 incrementing 1 \ |
| 25 | } \ |
Benoît Ganne | 4af1a7f | 2019-03-01 14:14:10 +0100 | [diff] [blame] | 26 | } |
| 27 | |
Damjan Marion | 3153f00 | 2022-05-14 00:14:02 +0200 | [diff] [blame] | 28 | packet-generator new { \ |
| 29 | name v4-2-to-1 \ |
| 30 | limit -1 \ |
| 31 | node ip4-input \ |
| 32 | size 64-64 \ |
| 33 | interface pg0 \ |
| 34 | data { \ |
| 35 | UDP: 192.168.2.2 -> 192.168.1.2 \ |
| 36 | UDP: 1234 -> 4321 \ |
| 37 | length 128 checksum 0 incrementing 1 \ |
| 38 | } \ |
Benoît Ganne | 4af1a7f | 2019-03-01 14:14:10 +0100 | [diff] [blame] | 39 | } |
| 40 | |
Damjan Marion | 3153f00 | 2022-05-14 00:14:02 +0200 | [diff] [blame] | 41 | packet-generator new { \ |
| 42 | name v6-1-to-2 \ |
| 43 | limit -1 \ |
| 44 | node ip6-input \ |
| 45 | size 64-64 \ |
| 46 | interface pg0 \ |
| 47 | data { \ |
| 48 | UDP: 192:168:1::2 -> 192:168:2::2 \ |
| 49 | UDP: 4321 -> 1234 \ |
| 50 | length 128 checksum 0 incrementing 1 \ |
| 51 | } \ |
Benoît Ganne | 4af1a7f | 2019-03-01 14:14:10 +0100 | [diff] [blame] | 52 | } |
| 53 | |
Damjan Marion | 3153f00 | 2022-05-14 00:14:02 +0200 | [diff] [blame] | 54 | packet-generator new { \ |
| 55 | name v6-2-to-1 \ |
| 56 | limit -1 \ |
| 57 | node ip6-input \ |
| 58 | size 64-64 \ |
| 59 | interface pg0 \ |
| 60 | data { \ |
| 61 | UDP: 192:168:2::2 -> 192:168:1::2 \ |
| 62 | UDP: 1234 -> 4321 \ |
| 63 | length 128 checksum 0 incrementing 1 \ |
| 64 | } \ |
Benoît Ganne | 4af1a7f | 2019-03-01 14:14:10 +0100 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | packet-generator enable |