summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2016-05-06 19:43:32 +0200
committerFlorin Coras <fcoras@cisco.com>2016-05-06 19:48:32 +0200
commitabfb56e73fed33d0b2f738ace59ae5b37cd2b60d (patch)
tree9ecca3ce8ba3cc62ecd29f2c235d12584d99f6ce
parent6011ef8e7f484f47ada0efb1c5519cf9cc2b0b87 (diff)
Add files that support simple overlay setup tutorial
Change-Id: Idee1f549f602fcabcc8e793a0bc0544ad9bd11a5 Signed-off-by: Florin Coras <fcoras@cisco.com>
-rw-r--r--tutorial/odl-one-config.json.postman_collection222
-rwxr-xr-xtutorial/setup_lisp_topo.sh86
-rw-r--r--tutorial/vpp1-mapping.json29
-rw-r--r--tutorial/vpp1.conf13
-rw-r--r--tutorial/vpp2-mapping.json29
-rw-r--r--tutorial/vpp2.conf13
6 files changed, 392 insertions, 0 deletions
diff --git a/tutorial/odl-one-config.json.postman_collection b/tutorial/odl-one-config.json.postman_collection
new file mode 100644
index 0000000..77b7a1b
--- /dev/null
+++ b/tutorial/odl-one-config.json.postman_collection
@@ -0,0 +1,222 @@
+{
+ "id": "9188d064-9f2c-428e-b2ac-3cb23c2c2c9c",
+ "name": "odl-one-config",
+ "description": "",
+ "order": [
+ "dd1486aa-b505-7283-040a-a9b10e84deab",
+ "ef79a9f8-6632-a45c-1fc5-e18fe03cfbfe",
+ "4fff5c68-693e-6434-9c09-db0f667f4fc9",
+ "db3be588-5613-adb8-231c-4e303721735f",
+ "7df30743-9b84-d286-35b0-c83a91367eff",
+ "4cc4b528-b5d6-920a-0285-3344c10d9504",
+ "78a38a5a-13ed-bd6d-f234-bfac485bfc93",
+ "89d3fa45-5a45-2b26-70c8-80a2269d171e",
+ "dcaff37a-0e5e-3b7f-d472-86486de75737",
+ "cb5ee691-c14b-9a6c-5754-2c900d1cf3fb"
+ ],
+ "folders": [],
+ "timestamp": 1462539295345,
+ "owner": 0,
+ "remoteLink": "",
+ "public": false,
+ "requests": [
+ {
+ "id": "4cc4b528-b5d6-920a-0285-3344c10d9504",
+ "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+ "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/operations/odl-mappingservice:add-mapping",
+ "preRequestScript": "",
+ "pathVariables": {},
+ "method": "POST",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": "",
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1461867914203,
+ "name": "vpp2 add IP6 mapping",
+ "description": "",
+ "collectionId": "9188d064-9f2c-428e-b2ac-3cb23c2c2c9c",
+ "responses": [],
+ "rawModeData": "{\n \"input\": {\n \"mapping-record\": {\n \"recordTtl\": 1440,\n \"action\": \"NoAction\",\n \"authoritative\": true,\n \"eid\": {\n \"address-type\": \"ietf-lisp-address-types:ipv6-prefix-afi\",\n \"ipv6-prefix\": \"6:0:4::0/48\"\n },\n \"LocatorRecord\": [\n {\n \"locator-id\": \"ISP1\",\n \"priority\": 1,\n \"weight\": 1,\n \"multicastPriority\": 255,\n \"multicastWeight\": 0,\n \"localLocator\": true,\n \"rlocProbed\": false,\n \"routed\": false,\n \"rloc\": {\n \"address-type\": \"ietf-lisp-address-types:ipv6-afi\",\n \"ipv6\": \"6:0:3::3\"\n }\n }\n ]\n }\n }\n}"
+ },
+ {
+ "id": "4fff5c68-693e-6434-9c09-db0f667f4fc9",
+ "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+ "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/operations/odl-mappingservice:remove-mapping",
+ "preRequestScript": "",
+ "pathVariables": {},
+ "method": "POST",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": "",
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1459253662086,
+ "name": "vpp1 remove IP4 mapping",
+ "description": "",
+ "collectionId": "9188d064-9f2c-428e-b2ac-3cb23c2c2c9c",
+ "responses": [],
+ "rawModeData": "{\n \"input\": {\n \"eid\": {\n \"address-type\": \"ietf-lisp-address-types:ipv4-prefix-afi\",\n \"ipv4-prefix\": \"6.0.2.0/24\"\n }\n }\n}"
+ },
+ {
+ "id": "78a38a5a-13ed-bd6d-f234-bfac485bfc93",
+ "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+ "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/operations/odl-mappingservice:remove-mapping",
+ "preRequestScript": "",
+ "pathVariables": {},
+ "method": "POST",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": "",
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1462547160218,
+ "name": "vpp1 remove IP6 mapping",
+ "description": "",
+ "collectionId": "9188d064-9f2c-428e-b2ac-3cb23c2c2c9c",
+ "responses": [],
+ "rawModeData": "{\n \"input\": {\n \"eid\": {\n \"address-type\": \"ietf-lisp-address-types:ipv6-prefix-afi\",\n \"ipv6-prefix\": \"6:0:2::0/48\"\n }\n }\n}"
+ },
+ {
+ "id": "7df30743-9b84-d286-35b0-c83a91367eff",
+ "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+ "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/operations/odl-mappingservice:add-mapping",
+ "preRequestScript": "",
+ "pathVariables": {},
+ "method": "POST",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": "",
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1461867909699,
+ "name": "vpp1 add IP6 mapping",
+ "description": "",
+ "collectionId": "9188d064-9f2c-428e-b2ac-3cb23c2c2c9c",
+ "responses": [],
+ "rawModeData": "{\n \"input\": {\n \"mapping-record\": {\n \"recordTtl\": 1440,\n \"action\": \"NoAction\",\n \"authoritative\": true,\n \"eid\": {\n \"address-type\": \"ietf-lisp-address-types:ipv6-prefix-afi\",\n \"ipv6-prefix\": \"6:0:2::0/48\"\n },\n \"LocatorRecord\": [\n {\n \"locator-id\": \"ISP1\",\n \"priority\": 1,\n \"weight\": 1,\n \"multicastPriority\": 255,\n \"multicastWeight\": 0,\n \"localLocator\": true,\n \"rlocProbed\": false,\n \"routed\": false,\n \"rloc\": {\n \"address-type\": \"ietf-lisp-address-types:ipv6-afi\",\n \"ipv6\": \"6:0:3::1\"\n }\n }\n ]\n }\n }\n}"
+ },
+ {
+ "id": "89d3fa45-5a45-2b26-70c8-80a2269d171e",
+ "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+ "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/operations/odl-mappingservice:remove-mapping",
+ "preRequestScript": "",
+ "pathVariables": {},
+ "method": "POST",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": "",
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1462547182513,
+ "name": "vpp2 remove IP6 mapping",
+ "description": "",
+ "collectionId": "9188d064-9f2c-428e-b2ac-3cb23c2c2c9c",
+ "responses": [],
+ "rawModeData": "{\n \"input\": {\n \"eid\": {\n \"address-type\": \"ietf-lisp-address-types:ipv6-prefix-afi\",\n \"ipv6-prefix\": \"6:0:4::0/48\"\n }\n }\n}"
+ },
+ {
+ "id": "cb5ee691-c14b-9a6c-5754-2c900d1cf3fb",
+ "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+ "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/odl-mappingservice:mapping-database/",
+ "preRequestScript": "",
+ "pathVariables": {},
+ "method": "DELETE",
+ "data": [],
+ "dataMode": "params",
+ "version": 2,
+ "tests": "",
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1456844497219,
+ "name": "Delete ALL database content",
+ "description": "",
+ "collectionId": "9188d064-9f2c-428e-b2ac-3cb23c2c2c9c",
+ "responses": []
+ },
+ {
+ "id": "db3be588-5613-adb8-231c-4e303721735f",
+ "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+ "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/operations/odl-mappingservice:remove-mapping",
+ "preRequestScript": "",
+ "pathVariables": {},
+ "method": "POST",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": "",
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1456844374347,
+ "name": "vpp2 remove IP4 mapping ",
+ "description": "",
+ "collectionId": "9188d064-9f2c-428e-b2ac-3cb23c2c2c9c",
+ "responses": [],
+ "rawModeData": "{\n \"input\": {\n \"eid\": {\n \"address-type\": \"ietf-lisp-address-types:ipv4-prefix-afi\",\n \"ipv4-prefix\": \"6.0.4.0/24\"\n }\n }\n}"
+ },
+ {
+ "id": "dcaff37a-0e5e-3b7f-d472-86486de75737",
+ "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+ "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/odl-mappingservice:mapping-database/",
+ "preRequestScript": "",
+ "pathVariables": {},
+ "method": "GET",
+ "data": [],
+ "dataMode": "params",
+ "version": 2,
+ "tests": "",
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1456844481383,
+ "name": "Get ALL database content",
+ "description": "",
+ "collectionId": "9188d064-9f2c-428e-b2ac-3cb23c2c2c9c",
+ "responses": []
+ },
+ {
+ "id": "dd1486aa-b505-7283-040a-a9b10e84deab",
+ "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+ "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/operations/odl-mappingservice:add-mapping",
+ "preRequestScript": "",
+ "pathVariables": {},
+ "method": "POST",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": "",
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1459253642412,
+ "name": "vpp1 add IP4 mapping",
+ "description": "",
+ "collectionId": "9188d064-9f2c-428e-b2ac-3cb23c2c2c9c",
+ "responses": [],
+ "rawModeData": "{\n \"input\": {\n \"mapping-record\": {\n \"recordTtl\": 1440,\n \"action\": \"NoAction\",\n \"authoritative\": true,\n \"eid\": {\n \"address-type\": \"ietf-lisp-address-types:ipv4-prefix-afi\",\n \"ipv4-prefix\": \"6.0.2.0/24\"\n },\n \"LocatorRecord\": [\n {\n \"locator-id\": \"ISP1\",\n \"priority\": 1,\n \"weight\": 1,\n \"multicastPriority\": 255,\n \"multicastWeight\": 0,\n \"localLocator\": true,\n \"rlocProbed\": false,\n \"routed\": true,\n \"rloc\": {\n \"address-type\": \"ietf-lisp-address-types:ipv4-afi\",\n \"ipv4\": \"6.0.3.1\"\n }\n }\n ]\n }\n }\n}"
+ },
+ {
+ "id": "ef79a9f8-6632-a45c-1fc5-e18fe03cfbfe",
+ "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+ "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/operations/odl-mappingservice:add-mapping",
+ "preRequestScript": "",
+ "pathVariables": {},
+ "method": "POST",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": "",
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1462556371382,
+ "name": "vpp2 add IP4 mapping",
+ "description": "",
+ "collectionId": "9188d064-9f2c-428e-b2ac-3cb23c2c2c9c",
+ "responses": [],
+ "rawModeData": "{\n \"input\": {\n \"mapping-record\": {\n \"recordTtl\": 1440,\n \"action\": \"NoAction\",\n \"authoritative\": true,\n \"eid\": {\n \"address-type\": \"ietf-lisp-address-types:ipv4-prefix-afi\",\n \"ipv4-prefix\": \"6.0.4.0/24\"\n },\n \"LocatorRecord\": [\n {\n \"locator-id\": \"ISP1\",\n \"priority\": 1,\n \"weight\": 1,\n \"multicastPriority\": 255,\n \"multicastWeight\": 0,\n \"localLocator\": true,\n \"rlocProbed\": false,\n \"routed\": true,\n \"rloc\": {\n \"address-type\": \"ietf-lisp-address-types:ipv4-afi\",\n \"ipv4\": \"6.0.3.2\"\n }\n }\n ]\n }\n }\n}"
+ }
+ ]
+} \ No newline at end of file
diff --git a/tutorial/setup_lisp_topo.sh b/tutorial/setup_lisp_topo.sh
new file mode 100755
index 0000000..a0dd747
--- /dev/null
+++ b/tutorial/setup_lisp_topo.sh
@@ -0,0 +1,86 @@
+# path to vpp executable and configurations folder
+VPP_LITE_BIN=/vpp/build-root/install-vpp_lite_debug-native/vpp/bin/vpp
+VPP_LITE_CONF=/etc/vpp/lite/
+
+# make sure there are no vpp instances running
+pkill vpp
+
+# delete previous incarnations if they exist
+ip netns exec intervppns ifconfig vppbr down
+ip netns exec intervppns brctl delbr vppbr
+ip link del dev veth_vpp1 &> /dev/null
+ip link del dev veth_vpp2 &> /dev/null
+ip link del dev veth_intervpp1 &> /dev/null
+ip link del dev veth_intervpp2 &> /dev/null
+ip link del dev veth_odl &> /dev/null
+ip netns del vppns1 &> /dev/null
+ip netns del vppns2 &> /dev/null
+ip netns del intervppns &> /dev/null
+
+if [ "$1" == "clean" ] ; then
+ exit 0;
+fi
+
+# create vpp to clients and inter-vpp namespaces
+ip netns add vppns1
+ip netns add vppns2
+ip netns add intervppns
+
+# create vpp and odl interfaces and set them in intervppns
+ip link add veth_intervpp1 type veth peer name intervpp1
+ip link add veth_intervpp2 type veth peer name intervpp2
+ip link add veth_odl type veth peer name odl
+ip link set dev intervpp1 up
+ip link set dev intervpp2 up
+ip link set dev odl up
+ip link set dev veth_intervpp1 up netns intervppns
+ip link set dev veth_intervpp2 up netns intervppns
+ip link set dev veth_odl up netns intervppns
+
+# create bridge in intervppns and add vpp and odl interfaces
+ip netns exec intervppns brctl addbr vppbr
+ip netns exec intervppns brctl addif vppbr veth_intervpp1
+ip netns exec intervppns brctl addif vppbr veth_intervpp2
+ip netns exec intervppns brctl addif vppbr veth_odl
+ip netns exec intervppns ifconfig vppbr up
+
+# create and configure 1st veth client to vpp pair
+ip link add veth_vpp1 type veth peer name vpp1
+ip link set dev vpp1 up
+ip link set dev veth_vpp1 up netns vppns1
+
+ip netns exec vppns1 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6.0.2.2/24 dev veth_vpp1
+ ip route add 6.0.4.0/24 via 6.0.2.1
+"
+
+# create and configure 2nd veth client to vpp pair
+ip link add veth_vpp2 type veth peer name vpp2
+ip link set dev vpp2 up
+ip link set dev veth_vpp2 up netns vppns2
+
+ip netns exec vppns2 \
+ bash -c "
+ ip link set dev lo up
+ ip addr add 6.0.4.4/24 dev veth_vpp2
+ ip route add 6.0.2.0/24 via 6.0.4.1
+"
+
+# set odl iface ip and disable checksum offloading
+ifconfig odl 6.0.3.100/24
+ethtool --offload odl rx off tx off
+
+# start vpp1 and vpp2 in separate chroot
+sudo $VPP_LITE_BIN \
+ unix { log /tmp/vpp1.log cli-listen \
+ localhost:5002 full-coredump \
+ exec $VPP_LITE_CONF/vpp1.conf } \
+ api-trace { on } chroot {prefix xtr1}
+
+sudo $VPP_LITE_BIN \
+ unix { log /tmp/vpp2.log cli-listen \
+ localhost:5003 full-coredump \
+ exec $VPP_LITE_CONF/vpp2.conf} \
+ api-trace { on } chroot {prefix xtr2}
diff --git a/tutorial/vpp1-mapping.json b/tutorial/vpp1-mapping.json
new file mode 100644
index 0000000..ae4e6f5
--- /dev/null
+++ b/tutorial/vpp1-mapping.json
@@ -0,0 +1,29 @@
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
+ "ipv4-prefix": "6.0.2.0/24"
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.1"
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/tutorial/vpp1.conf b/tutorial/vpp1.conf
new file mode 100644
index 0000000..a9d3b07
--- /dev/null
+++ b/tutorial/vpp1.conf
@@ -0,0 +1,13 @@
+create host-interface name vpp1
+set int state host-vpp1 up
+set int ip address host-vpp1 6.0.2.1/24
+
+create host-interface name intervpp1
+set int state host-intervpp1 up
+set int ip address host-intervpp1 6.0.3.1/24
+
+lisp gpe enable
+
+lisp locator-set add ls1 iface host-intervpp1 p 1 w 1
+lisp eid-table add eid 6.0.2.0/24 locator-set ls1
+lisp map-resolver add 6.0.3.100
diff --git a/tutorial/vpp2-mapping.json b/tutorial/vpp2-mapping.json
new file mode 100644
index 0000000..f86925e
--- /dev/null
+++ b/tutorial/vpp2-mapping.json
@@ -0,0 +1,29 @@
+{
+ "input": {
+ "mapping-record": {
+ "recordTtl": 1440,
+ "action": "NoAction",
+ "authoritative": true,
+ "eid": {
+ "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
+ "ipv4-prefix": "6.0.4.0/24"
+ },
+ "LocatorRecord": [
+ {
+ "locator-id": "ISP1",
+ "priority": 1,
+ "weight": 1,
+ "multicastPriority": 255,
+ "multicastWeight": 0,
+ "localLocator": true,
+ "rlocProbed": false,
+ "routed": true,
+ "rloc": {
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "6.0.3.2"
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/tutorial/vpp2.conf b/tutorial/vpp2.conf
new file mode 100644
index 0000000..eb17927
--- /dev/null
+++ b/tutorial/vpp2.conf
@@ -0,0 +1,13 @@
+create host-interface name vpp2
+set int state host-vpp2 up
+set int ip address host-vpp2 6.0.4.1/24
+
+create host-interface name intervpp2
+set int state host-intervpp2 up
+set int ip address host-intervpp2 6.0.3.2/24
+
+lisp gpe enable
+
+lisp locator-set add ls1 iface host-intervpp2 p 1 w 1
+lisp eid-table add eid 6.0.4.0/24 locator-set ls1
+lisp map-resolver add 6.0.3.100