summaryrefslogtreecommitdiffstats
path: root/src/scripts/vnet
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-03-01 14:19:55 +0100
committerDamjan Marion <dmarion@me.com>2019-03-26 10:15:58 +0000
commit8e22054209ae9c4f08dae16f1aff910d8c8d0b76 (patch)
tree7cad03f6f2928b2582d103402708a5ef9576b901 /src/scripts/vnet
parent4af1a7f938207f713c249270ed98a0c12f72cd3f (diff)
Convert GRE nodes to new buffer APIs and multiarch
Change-Id: I3b3c8333287bb704ac7b0bbc81b3dbb059e8d2ac Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/scripts/vnet')
-rw-r--r--src/scripts/vnet/gre85
-rw-r--r--src/scripts/vnet/gre-teb39
2 files changed, 124 insertions, 0 deletions
diff --git a/src/scripts/vnet/gre b/src/scripts/vnet/gre
new file mode 100644
index 00000000000..9c2063db3fa
--- /dev/null
+++ b/src/scripts/vnet/gre
@@ -0,0 +1,85 @@
+comment { overlay interface }
+create packet-generator interface pg0
+set int ip address pg0 192.168.1.1/24
+set int ip address pg0 192:168:1::1/64
+set ip arp pg0 192.168.1.2 1:2:3:4:5:6 static
+set ip6 neighbor pg0 192:168:1::2 1:2:3:4:5:6 static
+set int state pg0 up
+
+comment { underlay interface }
+create packet-generator interface pg1
+set int ip address pg1 192.168.2.1/24
+set int ip address pg1 192:168:2::1/64
+set ip arp pg1 192.168.2.2 6:5:4:3:2:1 static
+set ip6 neighbor pg1 192:168:2::2 6:5:4:3:2:1 static
+set int state pg1 up
+
+comment { gre4 over ipv6 }
+create gre tunnel dst 192:168:2::2 src 192:168:2::1
+set int ip address gre0 127.1.0.1/32
+ip route add 192.168.3.0/24 via gre0
+set int state gre0 up
+
+comment { gre6 over ipv4 }
+create gre tunnel dst 192.168.2.2 src 192.168.2.1
+set int ip address gre1 ::2/128
+ip route add 192:168:3::0/64 via gre1
+set int state gre1 up
+
+packet-generator new {
+ name gre4-tx
+ limit -1
+ node ip4-input
+ size 64-64
+ interface pg0
+ data {
+ UDP: 192.168.1.2 -> 192.168.3.1
+ UDP: 4321 -> 1234
+ length 128 checksum 0 incrementing 1
+ }
+}
+
+packet-generator new {
+ name gre4-rx
+ limit -1
+ node ip6-input
+ size 72-72
+ interface pg1
+ data {
+ GRE: 192:168:2::2 -> 192:168:2::1
+ ip4
+ UDP: 192.168.3.1 -> 192.168.1.2
+ UDP: 1234 -> 4321
+ length 128 checksum 0 incrementing 1
+ }
+}
+
+packet-generator new {
+ name gre6-tx
+ limit -1
+ node ip6-input
+ size 64-64
+ interface pg0
+ data {
+ UDP: 192:168:1::2 -> 192:168:3::1
+ UDP: 4321 -> 1234
+ length 128 checksum 0 incrementing 1
+ }
+}
+
+packet-generator new {
+ name gre6-rx
+ limit -1
+ node ip4-input
+ size 72-72
+ interface pg1
+ data {
+ GRE: 192.168.2.2 -> 192.168.2.1
+ ip6
+ UDP: 192:168:3::1 -> 192:168:1::2
+ UDP: 1234 -> 4321
+ length 128 checksum 0 incrementing 1
+ }
+}
+
+packet-generator enable
diff --git a/src/scripts/vnet/gre-teb b/src/scripts/vnet/gre-teb
new file mode 100644
index 00000000000..ec0f6193e78
--- /dev/null
+++ b/src/scripts/vnet/gre-teb
@@ -0,0 +1,39 @@
+create packet-generator interface pg0
+create packet-generator interface pg1
+set int ip address pg1 192.168.2.1/24
+set ip arp pg1 192.168.2.2 6:5:4:3:2:1 static
+create gre tunnel dst 192.168.2.2 src 192.168.2.1 teb
+
+set int state pg0 up
+set int state pg1 up
+set int state gre0 up
+set int l2 xconnect pg0 gre0
+set int l2 xconnect gre0 pg0
+
+packet-generator new {
+ name tx
+ limit -1
+ node ethernet-input
+ size 64-64
+ interface pg0
+ data {
+ 0x8881: 4:4:4:4:4:4 -> 5:5:5:5:5:5
+ incrementing 100
+ }
+}
+
+packet-generator new {
+ name rx
+ limit -1
+ node ip4-input
+ size 72-72
+ interface pg1
+ data {
+ GRE: 192.168.2.2 -> 192.168.2.1
+ teb
+ 0x8881: 4:4:4:4:4:4 -> 5:5:5:5:5:5
+ incrementing 100
+ }
+}
+
+packet-generator enable