BenoƮt Ganne | 8e22054 | 2019-03-01 14:19:55 +0100 | [diff] [blame^] | 1 | comment { overlay interface } |
| 2 | create packet-generator interface pg0 |
| 3 | set int ip address pg0 192.168.1.1/24 |
| 4 | set int ip address pg0 192:168:1::1/64 |
| 5 | set ip arp pg0 192.168.1.2 1:2:3:4:5:6 static |
| 6 | set ip6 neighbor pg0 192:168:1::2 1:2:3:4:5:6 static |
| 7 | set int state pg0 up |
| 8 | |
| 9 | comment { underlay interface } |
| 10 | create packet-generator interface pg1 |
| 11 | set int ip address pg1 192.168.2.1/24 |
| 12 | set int ip address pg1 192:168:2::1/64 |
| 13 | set ip arp pg1 192.168.2.2 6:5:4:3:2:1 static |
| 14 | set ip6 neighbor pg1 192:168:2::2 6:5:4:3:2:1 static |
| 15 | set int state pg1 up |
| 16 | |
| 17 | comment { gre4 over ipv6 } |
| 18 | create gre tunnel dst 192:168:2::2 src 192:168:2::1 |
| 19 | set int ip address gre0 127.1.0.1/32 |
| 20 | ip route add 192.168.3.0/24 via gre0 |
| 21 | set int state gre0 up |
| 22 | |
| 23 | comment { gre6 over ipv4 } |
| 24 | create gre tunnel dst 192.168.2.2 src 192.168.2.1 |
| 25 | set int ip address gre1 ::2/128 |
| 26 | ip route add 192:168:3::0/64 via gre1 |
| 27 | set int state gre1 up |
| 28 | |
| 29 | packet-generator new { |
| 30 | name gre4-tx |
| 31 | limit -1 |
| 32 | node ip4-input |
| 33 | size 64-64 |
| 34 | interface pg0 |
| 35 | data { |
| 36 | UDP: 192.168.1.2 -> 192.168.3.1 |
| 37 | UDP: 4321 -> 1234 |
| 38 | length 128 checksum 0 incrementing 1 |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | packet-generator new { |
| 43 | name gre4-rx |
| 44 | limit -1 |
| 45 | node ip6-input |
| 46 | size 72-72 |
| 47 | interface pg1 |
| 48 | data { |
| 49 | GRE: 192:168:2::2 -> 192:168:2::1 |
| 50 | ip4 |
| 51 | UDP: 192.168.3.1 -> 192.168.1.2 |
| 52 | UDP: 1234 -> 4321 |
| 53 | length 128 checksum 0 incrementing 1 |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | packet-generator new { |
| 58 | name gre6-tx |
| 59 | limit -1 |
| 60 | node ip6-input |
| 61 | size 64-64 |
| 62 | interface pg0 |
| 63 | data { |
| 64 | UDP: 192:168:1::2 -> 192:168:3::1 |
| 65 | UDP: 4321 -> 1234 |
| 66 | length 128 checksum 0 incrementing 1 |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | packet-generator new { |
| 71 | name gre6-rx |
| 72 | limit -1 |
| 73 | node ip4-input |
| 74 | size 72-72 |
| 75 | interface pg1 |
| 76 | data { |
| 77 | GRE: 192.168.2.2 -> 192.168.2.1 |
| 78 | ip6 |
| 79 | UDP: 192:168:3::1 -> 192:168:1::2 |
| 80 | UDP: 1234 -> 4321 |
| 81 | length 128 checksum 0 incrementing 1 |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | packet-generator enable |