Benoît Ganne | 8e22054 | 2019-03-01 14:19:55 +0100 | [diff] [blame] | 1 | create packet-generator interface pg0 |
| 2 | create packet-generator interface pg1 |
| 3 | set int ip address pg1 192.168.2.1/24 |
ShivaShankarK | b0f956c | 2020-03-18 15:34:11 +0530 | [diff] [blame] | 4 | set ip neighbor pg1 192.168.2.2 6:5:4:3:2:1 static |
Benoît Ganne | 8e22054 | 2019-03-01 14:19:55 +0100 | [diff] [blame] | 5 | create gre tunnel dst 192.168.2.2 src 192.168.2.1 teb |
| 6 | |
| 7 | set int state pg0 up |
| 8 | set int state pg1 up |
| 9 | set int state gre0 up |
| 10 | set int l2 xconnect pg0 gre0 |
| 11 | set int l2 xconnect gre0 pg0 |
| 12 | |
Damjan Marion | 3153f00 | 2022-05-14 00:14:02 +0200 | [diff] [blame] | 13 | packet-generator new { \ |
| 14 | name tx \ |
| 15 | limit -1 \ |
| 16 | node ethernet-input \ |
| 17 | size 64-64 \ |
| 18 | interface pg0 \ |
| 19 | data { \ |
| 20 | 0x8881: 4:4:4:4:4:4 -> 5:5:5:5:5:5 \ |
| 21 | incrementing 100 \ |
| 22 | } \ |
Benoît Ganne | 8e22054 | 2019-03-01 14:19:55 +0100 | [diff] [blame] | 23 | } |
| 24 | |
Damjan Marion | 3153f00 | 2022-05-14 00:14:02 +0200 | [diff] [blame] | 25 | packet-generator new { \ |
| 26 | name rx \ |
| 27 | limit -1 \ |
| 28 | node ip4-input \ |
| 29 | size 72-72 \ |
| 30 | interface pg1 \ |
| 31 | data { \ |
| 32 | GRE: 192.168.2.2 -> 192.168.2.1 \ |
| 33 | teb \ |
| 34 | 0x8881: 4:4:4:4:4:4 -> 5:5:5:5:5:5 \ |
| 35 | incrementing 100 \ |
| 36 | } \ |
Benoît Ganne | 8e22054 | 2019-03-01 14:19:55 +0100 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | packet-generator enable |