summaryrefslogtreecommitdiffstats
path: root/examples/docker/bgp_demo
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-04-30 09:03:13 +0200
committerMarek Gradzki <mgradzki@cisco.com>2018-04-30 09:03:13 +0200
commite4c58493ce5265ea0d1e17d160c339401c406186 (patch)
tree4f7ac75773ad305b04982737e0500d613f24603e /examples/docker/bgp_demo
parent2e96f3423a2619cd2aa9d188de513723416c15e6 (diff)
Move docker files to examples directory
Change-Id: Ib2eb3dbae76a1e9b5d98ce9e0d5eea9adba280cf Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'examples/docker/bgp_demo')
-rw-r--r--examples/docker/bgp_demo/Readme.txt42
-rwxr-xr-xexamples/docker/bgp_demo/build_topology.sh27
-rwxr-xr-xexamples/docker/bgp_demo/init/init.sh44
-rw-r--r--examples/docker/bgp_demo/init/io-fd-hc2vpp-integration_vpp-integration-distribution_1-18-01-SNAPSHOT-module-config27
-rw-r--r--examples/docker/bgp_demo/init/io-fd-honeycomb_minimal-distribution_1-18-01-SNAPSHOT-module-config24
-rw-r--r--examples/docker/bgp_demo/init/vpp1.cmd4
-rw-r--r--examples/docker/bgp_demo/init/vpp2.cmd4
-rw-r--r--examples/docker/bgp_demo/postman_collection.json299
-rwxr-xr-xexamples/docker/bgp_demo/run_terminals.sh9
9 files changed, 480 insertions, 0 deletions
diff --git a/examples/docker/bgp_demo/Readme.txt b/examples/docker/bgp_demo/Readme.txt
new file mode 100644
index 000000000..896a6f7c8
--- /dev/null
+++ b/examples/docker/bgp_demo/Readme.txt
@@ -0,0 +1,42 @@
+BGP demo
+---------------------------------------------------
+
+Provides examples of BGP config using Honeycomb
+two VPP nodes (docker containers).
+
+Configuration was tested using VPP 18.01 and hc2vpp 1.18.01.
+
+1) Create & start containers (requires hc2vpp image)
+sudo ./build_topology.sh
+
+3) Run vpp and honeycomb with preconfigured veth interfaces
+
+Either manually connect
+docker exec -it vpp1 bash
+docker exec -it vpp2 bash
+
+and then run vpp and honeycomb on vpp1 and vpp2 respectively:
+/hc2vpp/mpls_demo/init/vpp.sh 1
+/hc2vpp/mpls_demo/init/vpp.sh 2
+
+or run everything via script (uses xfce4-terminal):
+./run_terminals.sh
+
+After vpp and honeycomb stars,
+you should be able to ping vpp2 from vpp1.
+
+Either using vppctl:
+vppctl ping 10.12.1.2
+
+or directly (we are using tuntap):
+ping 10.12.1.2
+
+4) Use postman_collection.json for BGP configuration examples
+
+First configure loop0 interface on vpp2.
+
+Then configure eBGP peers on vpp1 and vpp2
+and program route to loop0 using application peer from vpp2.
+
+Now loop0 is reachable from vpp1:
+vppctl ping 10.100.1.1
diff --git a/examples/docker/bgp_demo/build_topology.sh b/examples/docker/bgp_demo/build_topology.sh
new file mode 100755
index 000000000..c532916a3
--- /dev/null
+++ b/examples/docker/bgp_demo/build_topology.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+source ../utils.sh
+
+if [[ $UID != 0 ]]; then
+ echo "Please run this script with sudo:"
+ echo "sudo $0 $*"
+ exit 1
+fi
+
+# Cleanup
+../remove_hc2vpp_containers.sh
+
+# Create directory for storing network namespaces
+mkdir -p /var/run/netns
+
+# Build topology
+#
+# vpp1 – vpp2
+#
+create_container vpp1 hc2vpp
+create_container vpp2 hc2vpp
+
+start_container vpp1
+start_container vpp2
+
+# Connect containers using veth interfaces
+create_link vpp1 veth12 veth21 vpp2
diff --git a/examples/docker/bgp_demo/init/init.sh b/examples/docker/bgp_demo/init/init.sh
new file mode 100755
index 000000000..8ed4cd25c
--- /dev/null
+++ b/examples/docker/bgp_demo/init/init.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# Starts and initializes vpp.
+# Then starts honeycomb
+#
+
+NODE_ID=$1
+NODE_NAME=vpp$1
+
+echo "Enable tuntap interface in startup.conf"
+echo -e "tuntap {\n enable\n}\n" >> /etc/vpp/startup.conf
+
+/hc2vpp/vpp/start.sh & VPP_PID=$!
+echo "Waiting 5s for vpp to start"
+sleep 5
+VPP_VERSION=$(vppctl show version)
+if [ "${VPP_VERSION}" != "" ]
+then
+ echo "VPP started successfully. Version:"
+ echo "${VPP_VERSION}"
+else
+ echo "VPP failed to start. Stopping initialization script."
+ exit 1
+fi
+
+# Configure veth interfaces using VPP CLI
+# (not fully supported by hc2vpp 18.01)
+echo "Configuring vpp"
+vppctl exec /hc2vpp/bgp_demo/init/$NODE_NAME.cmd
+
+# Update address of interface BGP is listening on
+IP="10.12.1.${NODE_ID}"
+jshon -s $IP -i "bgp-binding-address" -I -F /opt/honeycomb/config/bgp.json
+
+# Set AS number
+AS_NUMBER=$((65000+NODE_ID))
+jshon -n $AS_NUMBER -i "bgp-as-number" -I -F /opt/honeycomb/config/bgp.json
+
+# Update module configuration
+# Enables BGP and disables some of the modules not used in the example
+cp /hc2vpp/bgp_demo/init/*-module-config /opt/honeycomb/modules
+
+echo "Starting honeycomb"
+/hc2vpp/honeycomb/start.sh
diff --git a/examples/docker/bgp_demo/init/io-fd-hc2vpp-integration_vpp-integration-distribution_1-18-01-SNAPSHOT-module-config b/examples/docker/bgp_demo/init/io-fd-hc2vpp-integration_vpp-integration-distribution_1-18-01-SNAPSHOT-module-config
new file mode 100644
index 000000000..f236d4eab
--- /dev/null
+++ b/examples/docker/bgp_demo/init/io-fd-hc2vpp-integration_vpp-integration-distribution_1-18-01-SNAPSHOT-module-config
@@ -0,0 +1,27 @@
+// This is list of hc2vpp modules based on configuration file from /opt/honeycomb/modules
+//
+// BGP modules (disabled by default) were enabled.
+// Modules not used in the demo were disabled to reduce footprint.
+//
+io.fd.hc2vpp.common.integration.VppCommonModule
+io.fd.hc2vpp.management.VppManagementModule
+// io.fd.hc2vpp.lisp.LispModule
+// io.fd.hc2vpp.lisp.gpe.GpeModule
+io.fd.hc2vpp.v3po.V3poModule
+// io.fd.hc2vpp.iface.role.InterfaceRoleModule
+io.fd.hc2vpp.l3.InterfaceL3Module
+io.fd.hc2vpp.l3.SubInterfaceL3Module
+// io.fd.hc2vpp.l3.ProxyArpModule
+io.fd.hc2vpp.vpp.classifier.VppClassifierModule
+// io.fd.hc2vpp.vpp.classifier.InterfaceClassifierAclModule
+// io.fd.hc2vpp.vpp.classifier.SubInterfaceClassifierAclModule
+// io.fd.hc2vpp.nat.NatModule
+io.fd.hc2vpp.routing.RoutingModule
+// io.fd.hc2vpp.acl.AclModule
+// io.fd.hc2vpp.dhcp.DhcpModule
+// io.fd.hc2vpp.policer.PolicerModule
+io.fd.hc2vpp.mpls.MplsModule
+// io.fd.hc2vpp.vppnsh.impl.VppNshModule
+// io.fd.hc2vpp.vppioam.impl.VppIoamModule
+io.fd.hc2vpp.bgp.inet.BgpInetModule
+io.fd.hc2vpp.bgp.prefix.sid.BgpPrefixSidModule \ No newline at end of file
diff --git a/examples/docker/bgp_demo/init/io-fd-honeycomb_minimal-distribution_1-18-01-SNAPSHOT-module-config b/examples/docker/bgp_demo/init/io-fd-honeycomb_minimal-distribution_1-18-01-SNAPSHOT-module-config
new file mode 100644
index 000000000..476a1a1a5
--- /dev/null
+++ b/examples/docker/bgp_demo/init/io-fd-honeycomb_minimal-distribution_1-18-01-SNAPSHOT-module-config
@@ -0,0 +1,24 @@
+// This is list of honeycomb modules based on configuration file from /opt/honeycomb/modules
+//
+// BGP modules (disabled by default) used in the demo were enabled.
+//
+io.fd.honeycomb.infra.distro.schema.YangBindingProviderModule
+io.fd.honeycomb.infra.distro.schema.SchemaModule
+io.fd.honeycomb.infra.distro.data.ConfigAndOperationalPipelineModule
+io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule
+io.fd.honeycomb.infra.distro.initializer.InitializerPipelineModule
+io.fd.honeycomb.northbound.CredentialsModule
+io.fd.honeycomb.northbound.netconf.NetconfModule
+io.fd.honeycomb.northbound.netconf.NetconfReadersModule
+io.fd.honeycomb.northbound.restconf.RestconfModule
+io.fd.honeycomb.infra.distro.cfgattrs.CfgAttrsModule
+io.fd.honeycomb.infra.bgp.BgpModule
+io.fd.honeycomb.infra.bgp.BgpReadersModule
+io.fd.honeycomb.infra.bgp.BgpWritersModule
+// io.fd.honeycomb.northbound.bgp.extension.EvpnModule
+io.fd.honeycomb.northbound.bgp.extension.InetModule
+// io.fd.honeycomb.northbound.bgp.extension.L3VpnV4Module
+// io.fd.honeycomb.northbound.bgp.extension.L3VpnV6Module
+io.fd.honeycomb.northbound.bgp.extension.LabeledUnicastModule
+// io.fd.honeycomb.northbound.bgp.extension.LinkstateModule
+// io.fd.honeycomb.footprint.FootprintModule \ No newline at end of file
diff --git a/examples/docker/bgp_demo/init/vpp1.cmd b/examples/docker/bgp_demo/init/vpp1.cmd
new file mode 100644
index 000000000..5760f167b
--- /dev/null
+++ b/examples/docker/bgp_demo/init/vpp1.cmd
@@ -0,0 +1,4 @@
+create host-interface name veth12
+set int state host-veth12 up
+set int ip address host-veth12 10.12.1.1/24
+set interface unnumbered tuntap-0 use host-veth12
diff --git a/examples/docker/bgp_demo/init/vpp2.cmd b/examples/docker/bgp_demo/init/vpp2.cmd
new file mode 100644
index 000000000..07f2005e0
--- /dev/null
+++ b/examples/docker/bgp_demo/init/vpp2.cmd
@@ -0,0 +1,4 @@
+create host-interface name veth21
+set int state host-veth21 up
+set int ip address host-veth21 10.12.1.2/24
+set interface unnumbered tuntap-0 use host-veth21
diff --git a/examples/docker/bgp_demo/postman_collection.json b/examples/docker/bgp_demo/postman_collection.json
new file mode 100644
index 000000000..545a9d78c
--- /dev/null
+++ b/examples/docker/bgp_demo/postman_collection.json
@@ -0,0 +1,299 @@
+{
+ "id": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "name": "Hc2vpp2 BGP configuration examples",
+ "description": "Examples of BGP configration based on \nhttp://docs.opendaylight.org/en/stable-boron/user-guide/bgp-user-guide.html",
+ "order": [],
+ "folders": [
+ {
+ "id": "87048983-134d-ae10-16a1-c28b3e6cfe67",
+ "name": "vpp1",
+ "description": "",
+ "order": [
+ "1af04e52-88fe-eda0-c175-203d6cdd6ea8",
+ "6c8a9854-1eec-bdcd-2a7e-fb2dadd79f1d",
+ "33d6cc8b-80d7-4493-ab29-a5d4df4f9709",
+ "fc913f70-aaa5-fed6-fe00-dc93ed59ffb2",
+ "36627e62-925f-3de7-7943-d10402ceb160"
+ ],
+ "owner": 0
+ },
+ {
+ "id": "f294a1aa-4a81-0271-3d70-db7627278200",
+ "name": "vpp2",
+ "description": "",
+ "order": [
+ "e5d0baab-866f-4327-8c45-53587edb8e42",
+ "6dd77ec0-b213-adcc-9456-6e27b6455496",
+ "e3954b49-2f90-4868-a388-2c58b7951afe",
+ "79912b82-12fb-9210-6257-bbf0f4c05a7e",
+ "2026a32e-3f9e-3da4-1e68-6a659d91b557",
+ "b7339b36-1c6a-bad6-707a-cc010e5d8e7d",
+ "53b4f9f5-54e6-cd98-cec5-ad925d6c561d",
+ "90d5c0b1-572b-924e-2ccb-e5cd61b8e1e0"
+ ],
+ "owner": 0,
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46"
+ }
+ ],
+ "timestamp": 1515051953592,
+ "owner": 0,
+ "public": false,
+ "requests": [
+ {
+ "id": "1af04e52-88fe-eda0-c175-203d6cdd6ea8",
+ "headers": "Content-Type: application/json\nAuthorization: Basic YWRtaW46YWRtaW4=\n",
+ "url": "https://172.17.0.2:8445/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/hc-bgp-instance/bgp/bgp-openconfig-extensions:neighbors/neighbor/10.12.1.2",
+ "preRequestScript": null,
+ "pathVariables": {},
+ "method": "PUT",
+ "data": [],
+ "dataMode": "raw",
+ "tests": null,
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1515414858820,
+ "name": "Add eBGP peer configured on vpp2",
+ "description": "Based on http://docs.opendaylight.org/en/stable-nitrogen/user-guide/bgp-user-guide.html#external-peering-configuration",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "responses": [],
+ "rawModeData": "{\n \"neighbor\": {\n \"neighbor-address\": \"10.12.1.2\",\n \"timers\": {\n \"config\": {\n \"hold-time\": 90,\n \"connect-retry\": 10\n }\n },\n \"config\": {\n \"peer-type\": \"EXTERNAL\",\n \"peer-as\": \"65002\"\n },\n \"transport\": {\n \"config\": {\n \"remote-port\": 1790,\n \"passive-mode\": true\n }\n },\n \"afi-safis\": {\n \"afi-safi\": [\n {\n \"afi-safi-name\": \"openconfig-bgp-types:IPV4-UNICAST\",\n \"receive\": true,\n \"send-max\": 0\n },\n {\n \"afi-safi-name\": \"openconfig-bgp-types:IPV4-LABELLED-UNICAST\",\n \"receive\": true,\n \"send-max\": 0\n }\n ]\n }\n }\n}"
+ },
+ {
+ "id": "2026a32e-3f9e-3da4-1e68-6a659d91b557",
+ "headers": "Content-Type: application/json\nAuthorization: Basic YWRtaW46YWRtaW4=\n",
+ "url": "https://172.17.0.3:8445/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/hc-bgp-instance/bgp/bgp-openconfig-extensions:neighbors/neighbor/10.25.1.9",
+ "preRequestScript": null,
+ "pathVariables": {},
+ "method": "PUT",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": null,
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1515415282689,
+ "name": "Add application peer",
+ "description": "",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "responses": [],
+ "rawModeData": "{\n \"neighbor\": {\n \"neighbor-address\": \"10.25.1.9\",\n \"config\": {\n \"peer-group\": \"application-peers\"\n },\n \"afi-safis\": {\n \"afi-safi\": [\n {\n \"afi-safi-name\": \"openconfig-bgp-types:IPV4-UNICAST\",\n \"receive\": true,\n \"send-max\": 0\n },\n {\n \"afi-safi-name\": \"openconfig-bgp-types:IPV4-LABELLED-UNICAST\",\n \"receive\": true,\n \"send-max\": 0\n }\n ]\n }\n }\n}"
+ },
+ {
+ "id": "33d6cc8b-80d7-4493-ab29-a5d4df4f9709",
+ "headers": "Content-Type: application/xml\nAuthorization: Basic YWRtaW46YWRtaW4=\n",
+ "url": "https://172.17.0.2:8445/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/loc-rib",
+ "pathVariables": {},
+ "preRequestScript": null,
+ "method": "GET",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "data": [],
+ "dataMode": "raw",
+ "name": "Show Loc-RIB of vpp1",
+ "description": "",
+ "descriptionFormat": "html",
+ "time": 1515415010644,
+ "version": 2,
+ "responses": [],
+ "tests": null,
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "folder": "87048983-134d-ae10-16a1-c28b3e6cfe67",
+ "rawModeData": "<neighbor xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions\">\n <neighbor-address>10.25.1.9</neighbor-address>\n <config>\n <peer-group>application-peers</peer-group>\n </config>\n</neighbor>"
+ },
+ {
+ "id": "36627e62-925f-3de7-7943-d10402ceb160",
+ "headers": "Content-Type: application/xml\nAuthorization: Basic YWRtaW46YWRtaW4=\n",
+ "url": "https://172.17.0.2:8445/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance",
+ "preRequestScript": null,
+ "pathVariables": {},
+ "method": "GET",
+ "data": [],
+ "dataMode": "raw",
+ "tests": null,
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1515417781413,
+ "name": "Show HC BGP state on vpp1",
+ "description": "",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "rawModeData": "<neighbor xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions\">\n <neighbor-address>192.0.2.1</neighbor-address>\n <timers>\n <config>\n <hold-time>90</hold-time>\n <connect-retry>10</connect-retry>\n </config>\n </timers>\n <transport>\n <config>\n <remote-port>179</remote-port>\n <passive-mode>false</passive-mode>\n </config>\n </transport>\n <config>\n <peer-type>INTERNAL</peer-type>\n </config>\n</neighbor>"
+ },
+ {
+ "id": "53b4f9f5-54e6-cd98-cec5-ad925d6c561d",
+ "headers": "Content-Type: application/xml\nAuthorization: Basic YWRtaW46YWRtaW4=\n",
+ "url": "https://172.17.0.3:8445/restconf/config/openconfig-network-instance:network-instances/",
+ "preRequestScript": null,
+ "pathVariables": {},
+ "method": "GET",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": null,
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1515417814797,
+ "name": "Show BGP configuration on vpp2",
+ "description": "",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "responses": [],
+ "rawModeData": "<neighbor xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions\">\n <neighbor-address>192.0.2.1</neighbor-address>\n <timers>\n <config>\n <hold-time>90</hold-time>\n <connect-retry>10</connect-retry>\n </config>\n </timers>\n <transport>\n <config>\n <remote-port>179</remote-port>\n <passive-mode>false</passive-mode>\n </config>\n </transport>\n <config>\n <peer-type>INTERNAL</peer-type>\n </config>\n</neighbor>"
+ },
+ {
+ "id": "6c8a9854-1eec-bdcd-2a7e-fb2dadd79f1d",
+ "headers": "Content-Type: application/xml\nAuthorization: Basic YWRtaW46YWRtaW4=\n",
+ "url": "https://172.17.0.2:8445/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/peer/bgp:%2F%2F10.12.1.2",
+ "preRequestScript": null,
+ "pathVariables": {},
+ "method": "GET",
+ "data": [],
+ "dataMode": "raw",
+ "tests": null,
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1515414946071,
+ "name": "Show vpp2 peer state",
+ "description": "",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "responses": [],
+ "rawModeData": "<neighbor xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions\">\n <neighbor-address>192.0.2.1</neighbor-address>\n <timers>\n <config>\n <hold-time>90</hold-time>\n <connect-retry>10</connect-retry>\n </config>\n </timers>\n <transport>\n <config>\n <remote-port>179</remote-port>\n <passive-mode>false</passive-mode>\n </config>\n </transport>\n <config>\n <peer-type>INTERNAL</peer-type>\n </config>\n</neighbor>"
+ },
+ {
+ "id": "6dd77ec0-b213-adcc-9456-6e27b6455496",
+ "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+ "url": "https://172.17.0.3:8445/restconf/operational/ietf-interfaces:interfaces-state/interface/loop0",
+ "preRequestScript": "",
+ "pathVariables": {},
+ "method": "GET",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": "",
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1515419116647,
+ "name": "Show loop0 state",
+ "description": "",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "responses": [],
+ "rawModeData": "{\n \"interface\": [\n {\n \"name\": \"loop0\",\n \"enabled\": true,\n \"type\": \"v3po:loopback\",\n \"ietf-ip:ipv4\": {\n \"address\": [\n {\n \"ip\": \"10.100.1.1\",\n \"prefix-length\": 24\n }\n ]\n },\n \"v3po:ethernet\": {\n \"mtu\": 9216\n }\n }\n ]\n}"
+ },
+ {
+ "id": "79912b82-12fb-9210-6257-bbf0f4c05a7e",
+ "headers": "Content-Type: application/xml\nAuthorization: Basic YWRtaW46YWRtaW4=\n",
+ "url": "https://172.17.0.3:8445/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/peer/bgp:%2F%2F10.12.1.1",
+ "preRequestScript": null,
+ "pathVariables": {},
+ "method": "GET",
+ "data": [],
+ "dataMode": "raw",
+ "tests": null,
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1515414975231,
+ "name": "Show vpp1 peer state",
+ "description": "",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "responses": [],
+ "rawModeData": "<neighbor xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions\">\n <neighbor-address>192.0.2.1</neighbor-address>\n <timers>\n <config>\n <hold-time>90</hold-time>\n <connect-retry>10</connect-retry>\n </config>\n </timers>\n <transport>\n <config>\n <remote-port>179</remote-port>\n <passive-mode>false</passive-mode>\n </config>\n </transport>\n <config>\n <peer-type>INTERNAL</peer-type>\n </config>\n</neighbor>"
+ },
+ {
+ "id": "90d5c0b1-572b-924e-2ccb-e5cd61b8e1e0",
+ "headers": "Content-Type: application/xml\nAuthorization: Basic YWRtaW46YWRtaW4=\n",
+ "url": "https://172.17.0.3:8445/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance",
+ "preRequestScript": null,
+ "pathVariables": {},
+ "method": "GET",
+ "data": [],
+ "dataMode": "raw",
+ "tests": null,
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1515417838727,
+ "name": "Show HC BGP state on vpp2",
+ "description": "",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "rawModeData": "<neighbor xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions\">\n <neighbor-address>192.0.2.1</neighbor-address>\n <timers>\n <config>\n <hold-time>90</hold-time>\n <connect-retry>10</connect-retry>\n </config>\n </timers>\n <transport>\n <config>\n <remote-port>179</remote-port>\n <passive-mode>false</passive-mode>\n </config>\n </transport>\n <config>\n <peer-type>INTERNAL</peer-type>\n </config>\n</neighbor>"
+ },
+ {
+ "id": "b7339b36-1c6a-bad6-707a-cc010e5d8e7d",
+ "headers": "Content-Type: application/json\nAuthorization: Basic YWRtaW46YWRtaW4=\n",
+ "url": "https://172.17.0.3:8445/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.100.1.1%2F24/0",
+ "preRequestScript": null,
+ "pathVariables": {},
+ "method": "PUT",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": null,
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1515419061792,
+ "name": "Announce route to loop0",
+ "description": "",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "responses": [],
+ "rawModeData": "{\n \"bgp-inet:ipv4-route\": [\n {\n \"prefix\": \"10.100.1.1/24\",\n \"path-id\": 0,\n \"attributes\": {\n \"origin\": {\n \"value\": \"igp\"\n },\n \"as-path\": {},\n \"local-pref\": {\n \"pref\": 100\n },\n \"ipv4-next-hop\": {\n \"global\": \"10.12.1.2\"\n }\n }\n }\n ]\n}"
+ },
+ {
+ "id": "e3954b49-2f90-4868-a388-2c58b7951afe",
+ "headers": "Content-Type: application/json\nAuthorization: Basic YWRtaW46YWRtaW4=\n",
+ "url": "https://172.17.0.3:8445/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/hc-bgp-instance/bgp/bgp-openconfig-extensions:neighbors/neighbor/10.12.1.1",
+ "preRequestScript": null,
+ "pathVariables": {},
+ "method": "PUT",
+ "data": [],
+ "dataMode": "raw",
+ "tests": null,
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1515414866281,
+ "name": "Add eBGP peer configured on vpp1",
+ "description": "Based on http://docs.opendaylight.org/en/stable-nitrogen/user-guide/bgp-user-guide.html#external-peering-configuration",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "responses": [],
+ "rawModeData": "{\n \"neighbor\": {\n \"neighbor-address\": \"10.12.1.1\",\n \"timers\": {\n \"config\": {\n \"hold-time\": 90,\n \"connect-retry\": 10\n }\n },\n \"config\": {\n \"peer-type\": \"EXTERNAL\",\n \"peer-as\": \"65001\"\n },\n \"transport\": {\n \"config\": {\n \"remote-port\": 1790,\n \"passive-mode\": false\n }\n },\n \"afi-safis\": {\n \"afi-safi\": [\n {\n \"afi-safi-name\": \"openconfig-bgp-types:IPV4-UNICAST\",\n \"receive\": true,\n \"send-max\": 0\n },\n {\n \"afi-safi-name\": \"openconfig-bgp-types:IPV4-LABELLED-UNICAST\",\n \"receive\": true,\n \"send-max\": 0\n }\n ]\n }\n }\n}"
+ },
+ {
+ "id": "e5d0baab-866f-4327-8c45-53587edb8e42",
+ "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+ "url": "https://172.17.0.3:8445/restconf/config/ietf-interfaces:interfaces/interface/loop0",
+ "preRequestScript": "",
+ "pathVariables": {},
+ "method": "PUT",
+ "data": [],
+ "dataMode": "raw",
+ "version": 2,
+ "tests": "",
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "time": 1515420990010,
+ "name": "Configure loop0",
+ "description": "",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "responses": [],
+ "rawModeData": "{\n \"interface\": [\n {\n \"name\": \"loop0\",\n \"enabled\": true,\n \"type\": \"v3po:loopback\",\n \"ietf-ip:ipv4\": {\n \"address\": [\n {\n \"ip\": \"10.100.1.1\",\n \"prefix-length\": 24\n }\n ]\n },\n \"loopback\": {\n \"mac\" : \"aa:bb:cc:dd:ee:ff\"\n }\n }\n ]\n}"
+ },
+ {
+ "id": "fc913f70-aaa5-fed6-fe00-dc93ed59ffb2",
+ "headers": "Content-Type: application/xml\nAuthorization: Basic YWRtaW46YWRtaW4=\n",
+ "url": "https://172.17.0.2:8445/restconf/config/openconfig-network-instance:network-instances/",
+ "pathVariables": {},
+ "preRequestScript": null,
+ "method": "GET",
+ "collectionId": "c632c61d-2681-b9ea-23b7-124a1f228e46",
+ "data": [],
+ "dataMode": "raw",
+ "name": "Show BGP configuration on vpp1",
+ "description": "",
+ "descriptionFormat": "html",
+ "time": 1515415028428,
+ "version": 2,
+ "responses": [],
+ "tests": null,
+ "currentHelper": "normal",
+ "helperAttributes": {},
+ "folder": "87048983-134d-ae10-16a1-c28b3e6cfe67",
+ "rawModeData": "<neighbor xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions\">\n <neighbor-address>192.0.2.1</neighbor-address>\n <timers>\n <config>\n <hold-time>90</hold-time>\n <connect-retry>10</connect-retry>\n </config>\n </timers>\n <transport>\n <config>\n <remote-port>179</remote-port>\n <passive-mode>false</passive-mode>\n </config>\n </transport>\n <config>\n <peer-type>INTERNAL</peer-type>\n </config>\n</neighbor>"
+ }
+ ]
+} \ No newline at end of file
diff --git a/examples/docker/bgp_demo/run_terminals.sh b/examples/docker/bgp_demo/run_terminals.sh
new file mode 100755
index 000000000..e2f7e3e12
--- /dev/null
+++ b/examples/docker/bgp_demo/run_terminals.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Opens connections to hc2vpp containers
+
+xfce4-terminal --title=vpp1 --command="docker exec -it vpp1 \
+ bash -c '/hc2vpp/bgp_demo/init/init.sh 1; exec $SHELL'"
+
+xfce4-terminal --title=vpp2 --command="docker exec -it vpp2 \
+ bash -c '/hc2vpp/bgp_demo/init/init.sh 2; exec $SHELL'"