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 |
| 4 | set ip arp pg0 192.168.1.2 1:2:3:4:5:6 static |
| 5 | set ip6 neighbor pg0 192:168:1::2 1:2:3:4:5:6 static |
| 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 |
| 11 | set ip arp pg1 192.168.2.2 6:5:4:3:2:1 static |
| 12 | set ip6 neighbor pg1 192:168:2::2 6:5:4:3:2:1 static |
| 13 | set int state pg1 up |
| 14 | |
| 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 | } |
| 26 | } |
| 27 | |
| 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 | } |
| 39 | } |
| 40 | |
| 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 | } |
| 52 | } |
| 53 | |
| 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 | } |
| 65 | } |
| 66 | |
| 67 | packet-generator enable |