From 2948cae3ba1a75eb3192273d64b81b176357855f Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Fri, 5 Oct 2018 12:54:04 +0200 Subject: Update BGP user guide and related postman collection Change-Id: I0777af5b67847eff5bf29b34bd47d1dab232251b Signed-off-by: Michal Cmarada --- bgp/inet/bgp_inet_postman_collection.json | 76 ++-- .../user_guide/bgp_in_honeycomb_user_guide.adoc | 455 ++++++++++----------- 2 files changed, 256 insertions(+), 275 deletions(-) diff --git a/bgp/inet/bgp_inet_postman_collection.json b/bgp/inet/bgp_inet_postman_collection.json index 03f8fdba9..e1bf9fe4d 100644 --- a/bgp/inet/bgp_inet_postman_collection.json +++ b/bgp/inet/bgp_inet_postman_collection.json @@ -1,13 +1,12 @@ { "info": { - "_postman_id": "4092bf75-52e9-d793-36ab-c78696e33253", + "_postman_id": "33515a05-1b90-4460-b444-797c58f68eda", "name": "Hc2vpp BGP RESTCONF calls", "description": "Examples of BGP configration based on \nhttp://docs.opendaylight.org/en/stable-nitrogen/user-guide/bgp-user-guide.html", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { - "_postman_id": "f3e0f4e3-1faa-43e8-aeb2-3ac1525de40b", "name": "show hc-bgp-instance", "request": { "method": "GET", @@ -23,7 +22,7 @@ ], "body": { "mode": "raw", - "raw": "\n 192.0.2.1\n \n \n 90\n 10\n \n \n \n \n 179\n false\n \n \n \n INTERNAL\n \n" + "raw": "" }, "url": { "raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance", @@ -44,7 +43,6 @@ "response": [] }, { - "_postman_id": "7407ceb8-f112-4ac0-b40a-c07da58ff698", "name": "add bgp peer", "request": { "method": "PUT", @@ -60,7 +58,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"neighbor\": {\n \"neighbor-address\": \"127.0.0.2\",\n \"config\": {\n \"peer-type\": \"INTERNAL\"\n },\n \"timers\": {\n \"config\": {\n \"connect-retry\": 10,\n \"hold-time\": 90\n }\n },\n \"transport\": {\n \"config\": {\n \"remote-port\": 17900,\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 }\n}\n}" + "raw": "{ \n \"neighbor\":{ \n \"neighbor-address\":\"127.0.0.2\",\n \"config\":{ \n \"peer-type\":\"INTERNAL\"\n },\n \"timers\":{ \n \"config\":{ \n \"connect-retry\":10,\n \"hold-time\":90\n }\n },\n \"transport\":{ \n \"config\":{ \n \"remote-port\":17900,\n \"passive-mode\":false\n }\n },\n \"afi-safis\":{ \n \"afi-safi\":[ \n { \n \"afi-safi-name\":\"openconfig-bgp-types:IPV4-UNICAST\"\n }\n ]\n }\n }\n}" }, "url": { "raw": "http://localhost:8183/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/127.0.0.2", @@ -89,7 +87,6 @@ "response": [] }, { - "_postman_id": "99c2a219-4942-43d8-af21-437f9d8ae0c2", "name": "read network instance (config)", "request": { "method": "GET", @@ -105,7 +102,7 @@ ], "body": { "mode": "raw", - "raw": "\n 192.0.2.1\n \n \n 90\n 10\n \n \n \n \n 179\n false\n \n \n \n INTERNAL\n \n" + "raw": "" }, "url": { "raw": "http://localhost:8183/restconf/config/openconfig-network-instance:network-instances/", @@ -125,7 +122,6 @@ "response": [] }, { - "_postman_id": "10da8355-7d52-45f6-8b8e-fb5020f52b88", "name": "show 127.0.0.2 peer state", "request": { "method": "GET", @@ -141,7 +137,7 @@ ], "body": { "mode": "raw", - "raw": "\n 192.0.2.1\n \n \n 90\n 10\n \n \n \n \n 179\n false\n \n \n \n INTERNAL\n \n" + "raw": "" }, "url": { "raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/peer/bgp:%2F%2F127.0.0.2", @@ -164,7 +160,6 @@ "response": [] }, { - "_postman_id": "20661906-559e-46c5-8fa0-afa5b010b004", "name": "add application peer", "request": { "method": "PUT", @@ -180,10 +175,10 @@ ], "body": { "mode": "raw", - "raw": "{\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 }\n }\n}" + "raw": "{\n \"neighbor\": {\n \"neighbor-address\": \"127.0.0.1\",\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 }\n ]\n }\n }\n}" }, "url": { - "raw": "http://localhost:8183/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", + "raw": "http://localhost:8183/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/127.0.0.1", "protocol": "http", "host": [ "localhost" @@ -202,15 +197,14 @@ "bgp", "bgp-openconfig-extensions:neighbors", "neighbor", - "10.25.1.9" + "127.0.0.1" ] } }, "response": [] }, { - "_postman_id": "b33d307d-ff95-4ed5-ab59-22ed0e88e6aa", - "name": "show 10.25.1.9 app peer state", + "name": "show 127.0.0.1 app peer state", "request": { "method": "GET", "header": [ @@ -225,10 +219,10 @@ ], "body": { "mode": "raw", - "raw": "\n 192.0.2.1\n \n \n 90\n 10\n \n \n \n \n 179\n false\n \n \n \n INTERNAL\n \n" + "raw": "" }, "url": { - "raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/peer/bgp:%2F%2F10.25.1.9", + "raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/peer/bgp:%2F%2F127.0.0.1", "protocol": "http", "host": [ "localhost" @@ -241,14 +235,13 @@ "rib", "hc-bgp-instance", "peer", - "bgp:%2F%2F10.25.1.9" + "bgp:%2F%2F127.0.0.1" ] } }, "response": [] }, { - "_postman_id": "2c3d280e-a98a-4b98-9204-a775124107bf", "name": "add ipv4unicast route", "request": { "method": "PUT", @@ -267,7 +260,7 @@ "raw": "\n 10.0.0.11/32\n 0\n 10.0.0.11/32\n \n \n \n igp\n \n \n 100\n \n \n 10.11.1.1\n \n \n" }, "url": { - "raw": "http://localhost:8183/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.0.0.11%2F32/0", + "raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/127.0.0.1/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.11%2F32/0", "protocol": "http", "host": [ "localhost" @@ -277,7 +270,7 @@ "restconf", "config", "bgp-rib:application-rib", - "10.25.1.9", + "127.0.0.1", "tables", "bgp-types:ipv4-address-family", "bgp-types:unicast-subsequent-address-family", @@ -291,7 +284,6 @@ "response": [] }, { - "_postman_id": "436ccd51-3548-4d3e-967e-74ffb9a5e601", "name": "show 127.0.0.2 peer's adj-rib-out", "request": { "method": "GET", @@ -307,7 +299,7 @@ ], "body": { "mode": "raw", - "raw": "\n 192.0.2.1\n \n \n 90\n 10\n \n \n \n \n 179\n false\n \n \n \n INTERNAL\n \n" + "raw": "" }, "url": { "raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/peer/bgp:%2F%2F127.0.0.2/adj-rib-out/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes", @@ -335,7 +327,6 @@ "response": [] }, { - "_postman_id": "bf72955c-8d25-41c0-a34c-25bf909a65e7", "name": "show speeker's Loc-RIB", "request": { "method": "GET", @@ -351,7 +342,7 @@ ], "body": { "mode": "raw", - "raw": "\n 10.25.1.9\n \n application-peers\n \n" + "raw": "" }, "url": { "raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/loc-rib", @@ -373,7 +364,6 @@ "response": [] }, { - "_postman_id": "2d83d868-e8f6-40dc-aa6e-401a7fa61a36", "name": "add another ipv4unicast route", "request": { "method": "PUT", @@ -392,7 +382,7 @@ "raw": "\n 10.0.0.12/32\n 0\n 10.0.0.12/32\n \n \n \n igp\n \n \n 100\n \n \n 10.11.1.1\n \n \n" }, "url": { - "raw": "http://localhost:8183/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.0.0.12%2F32/0", + "raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/127.0.0.1/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.12%2F32/0", "protocol": "http", "host": [ "localhost" @@ -402,7 +392,7 @@ "restconf", "config", "bgp-rib:application-rib", - "10.25.1.9", + "127.0.0.1", "tables", "bgp-types:ipv4-address-family", "bgp-types:unicast-subsequent-address-family", @@ -416,7 +406,6 @@ "response": [] }, { - "_postman_id": "9a436548-aa9e-4389-a4a9-1b5cfb89aaa3", "name": "get VPP IPv4 routes", "request": { "method": "GET", @@ -432,10 +421,10 @@ ], "body": { "mode": "raw", - "raw": "{\n \"routing-instance\":\n {\n \"name\":\"routing-1\",\n \"enabled\":\"true\",\n \"router-id\":\"192.168.2.1\",\n \"description\":\"Test routing instance\",\n \"routing-protocols\":{\n \"routing-protocol\":[\n {\n \"name\":\"test-routing-protocol\",\n \"description\":\"Test routing protocol\",\n \"enabled\":\"true\",\n \"type\":\"static\",\n \"static-routes\":{\n \"ipv4\":{\n \"route\":[\n {\n \"id\":1,\n \"description\":\"Test static route\",\n \"destination-prefix\":\"192.168.2.3/32\",\n \"next-hop\":\"192.168.2.8\"\n }\n ]\n }\n }\n } \n ]\n }\n } \n}" + "raw": "" }, "url": { - "raw": "http://localhost:8183/restconf/operational/hc2vpp-ietf-routing:routing-state/routing-instance/vpp-routing-instance/routing-protocols/routing-protocol/learned-protocol-0/static-routes/hc2vpp-ietf-ipv4-unicast-routing:ipv4", + "raw": "http://localhost:8183/restconf/operational/hc2vpp-ietf-routing:routing/control-plane-protocols/control-plane-protocol/hc2vpp-ietf-routing:static/learned-protocol-0/static-routes/ipv4", "protocol": "http", "host": [ "localhost" @@ -444,21 +433,19 @@ "path": [ "restconf", "operational", - "hc2vpp-ietf-routing:routing-state", - "routing-instance", - "vpp-routing-instance", - "routing-protocols", - "routing-protocol", + "hc2vpp-ietf-routing:routing", + "control-plane-protocols", + "control-plane-protocol", + "hc2vpp-ietf-routing:static", "learned-protocol-0", "static-routes", - "hc2vpp-ietf-ipv4-unicast-routing:ipv4" + "ipv4" ] } }, "response": [] }, { - "_postman_id": "bb9ae871-9ca1-4456-be14-2d9a1d2ef152", "name": "update second ipv4unicast route", "request": { "method": "PUT", @@ -477,7 +464,7 @@ "raw": "\n 10.0.0.12/32\n 0\n 10.0.0.12/32\n \n \n \n igp\n \n \n 102\n \n \n 10.11.1.1\n \n \n" }, "url": { - "raw": "http://localhost:8183/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.0.0.12%2F32/0", + "raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/127.0.0.1/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.12%2F32/0", "protocol": "http", "host": [ "localhost" @@ -487,7 +474,7 @@ "restconf", "config", "bgp-rib:application-rib", - "10.25.1.9", + "127.0.0.1", "tables", "bgp-types:ipv4-address-family", "bgp-types:unicast-subsequent-address-family", @@ -501,7 +488,6 @@ "response": [] }, { - "_postman_id": "7acec3bd-ff58-46ca-b3d4-2d5c91a507cc", "name": "remove second ipv4unicast route", "request": { "method": "DELETE", @@ -520,7 +506,7 @@ "raw": "" }, "url": { - "raw": "http://localhost:8183/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.0.0.12%2F32/0", + "raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/127.0.0.1/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.12%2F32/0", "protocol": "http", "host": [ "localhost" @@ -530,7 +516,7 @@ "restconf", "config", "bgp-rib:application-rib", - "10.25.1.9", + "127.0.0.1", "tables", "bgp-types:ipv4-address-family", "bgp-types:unicast-subsequent-address-family", @@ -544,7 +530,6 @@ "response": [] }, { - "_postman_id": "fa920481-50f0-4754-8260-929bbe1e86ae", "name": "update bgp peer", "request": { "method": "PUT", @@ -560,7 +545,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"neighbor\": {\n \"neighbor-address\": \"127.0.0.2\",\n \"config\": {\n \"peer-type\": \"INTERNAL\"\n },\n \"timers\": {\n \"config\": {\n \"connect-retry\": 10,\n \"hold-time\": 91\n }\n },\n \"transport\": {\n \"config\": {\n \"remote-port\": 17900,\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 }\n}\n}" + "raw": "{\n \"neighbor\": {\n \"neighbor-address\": \"127.0.0.2\",\n \"config\": {\n \"peer-type\": \"INTERNAL\"\n },\n \"timers\": {\n \"config\": {\n \"connect-retry\": 10,\n \"hold-time\": 91\n }\n },\n \"transport\": {\n \"config\": {\n \"remote-port\": 17900,\n \"passive-mode\": false\n }\n },\n \"afi-safis\": {\n \"afi-safi\": [\n {\n \"afi-safi-name\": \"openconfig-bgp-types:IPV4-UNICAST\"\n }\n ]\n }\n}\n}" }, "url": { "raw": "http://localhost:8183/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/127.0.0.2", @@ -589,7 +574,6 @@ "response": [] }, { - "_postman_id": "dfd36e6b-95bc-4b17-84fd-a72672e1e075", "name": "delete bgp peer", "request": { "method": "DELETE", diff --git a/release-notes/src/main/asciidoc/user_guide/bgp_in_honeycomb_user_guide.adoc b/release-notes/src/main/asciidoc/user_guide/bgp_in_honeycomb_user_guide.adoc index 3917943b5..fe7769f5e 100644 --- a/release-notes/src/main/asciidoc/user_guide/bgp_in_honeycomb_user_guide.adoc +++ b/release-notes/src/main/asciidoc/user_guide/bgp_in_honeycomb_user_guide.adoc @@ -43,7 +43,7 @@ Use config/bgp.json to configure BGP server: "bgp-binding-address": "127.0.0.1", "bgp-port": 1790, "bgp-as-number": 65000, - "bgp-receive-multiple-paths": "true", + "bgp-receive-multiple-paths": "false", "bgp-send-max-paths": 0, "bgp-network-instance-name": "global-bgp", "bgp-protocol-instance-name": "hc-bgp-instance", @@ -58,10 +58,14 @@ NOTE: bgp-binding-address is also used as identifier of BGP speaker. After enabling BGP modules and configuring BGP server, link:user_running_honeycomb.html#_starting_honeycomb_agent[start honeycomb]. -BGP server configuration can be verified using RESTCONF/NETCONF. We +BGP server configuration can be verified using RESTCONF/NETCONF. curl -u admin:admin http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance +NOTE: You can format the output using "python -m json.tool" in terminal: + + curl -u admin:admin http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance | python -m json.tool + [source,json] ---- { @@ -98,10 +102,10 @@ Here is a sample basic neighbor configuration: [source,json] ---- { - "neighbor": { - "neighbor-address": "127.0.0.2", - "config": { - "peer-type": "INTERNAL" + "neighbor": { + "neighbor-address": "127.0.0.2", + "config": { + "peer-type": "INTERNAL" }, "timers": { "config": { @@ -118,9 +122,7 @@ Here is a sample basic neighbor configuration: "afi-safis": { "afi-safi": [ { - "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST", - "receive": true, - "send-max": 0 + "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST" } ] } @@ -157,27 +159,9 @@ The RIBs can be checked via REST: "peer": [ { "peer-id": "bgp://127.0.0.2", - "supported-tables": [ - { - "afi": "bgp-types:ipv4-address-family", - "safi": "bgp-types:unicast-subsequent-address-family", - "send-receive": "both" - }, - { - "afi": "bgp-linkstate:linkstate-address-family", - "safi": "bgp-linkstate:linkstate-subsequent-address-family" - } - ], + "peer-role": "ibgp", "effective-rib-in": { "tables": [ - { - "afi": "bgp-linkstate:linkstate-address-family", - "safi": "bgp-linkstate:linkstate-subsequent-address-family", - "bgp-linkstate:linkstate-routes": {}, - "attributes": { - "uptodate": true - } - }, { "afi": "bgp-types:ipv4-address-family", "safi": "bgp-types:unicast-subsequent-address-family", @@ -185,81 +169,54 @@ The RIBs can be checked via REST: "ipv4-route": [ { "path-id": 5, - "prefix": "1.1.1.1/31", + "route-key": "1.1.1.2/31", + "prefix": "1.1.1.2/31", "attributes": { - "as-path": {}, "origin": { "value": "egp" }, - "local-pref": { - "pref": 100 - }, "ipv4-next-hop": { "global": "127.1.1.1" }, "multi-exit-disc": { "med": 0 - } + }, + "local-pref": { + "pref": 100 + }, + "as-path": {} } }, { "path-id": 5, - "prefix": "1.1.1.2/31", + "route-key": "1.1.1.1/31", + "prefix": "1.1.1.1/31", "attributes": { - "as-path": {}, "origin": { "value": "egp" }, - "local-pref": { - "pref": 100 - }, "ipv4-next-hop": { "global": "127.1.1.1" }, "multi-exit-disc": { "med": 0 - } + }, + "local-pref": { + "pref": 100 + }, + "as-path": {} } } ] }, - "attributes": { - "uptodate": true - } - } - ] - }, - "adj-rib-out": { - "tables": [ - { - "afi": "bgp-linkstate:linkstate-address-family", - "safi": "bgp-linkstate:linkstate-subsequent-address-family", - "bgp-linkstate:linkstate-routes": {}, - "attributes": { - "uptodate": false - } - }, - { - "afi": "bgp-types:ipv4-address-family", - "safi": "bgp-types:unicast-subsequent-address-family", - "bgp-inet:ipv4-routes": {}, "attributes": { "uptodate": false } } ] }, - "peer-role": "ibgp", "adj-rib-in": { "tables": [ - { - "afi": "bgp-linkstate:linkstate-address-family", - "safi": "bgp-linkstate:linkstate-subsequent-address-family", - "bgp-linkstate:linkstate-routes": {}, - "attributes": { - "uptodate": true - } - }, { "afi": "bgp-types:ipv4-address-family", "safi": "bgp-types:unicast-subsequent-address-family", @@ -267,46 +224,67 @@ The RIBs can be checked via REST: "ipv4-route": [ { "path-id": 5, - "prefix": "1.1.1.1/31", + "route-key": "1.1.1.2/31", + "prefix": "1.1.1.2/31", "attributes": { - "as-path": {}, "origin": { "value": "egp" }, - "local-pref": { - "pref": 100 - }, "ipv4-next-hop": { "global": "127.1.1.1" }, "multi-exit-disc": { "med": 0 - } + }, + "local-pref": { + "pref": 100 + }, + "as-path": {} } }, { "path-id": 5, - "prefix": "1.1.1.2/31", + "route-key": "1.1.1.1/31", + "prefix": "1.1.1.1/31", "attributes": { - "as-path": {}, "origin": { "value": "egp" }, - "local-pref": { - "pref": 100 - }, "ipv4-next-hop": { "global": "127.1.1.1" }, "multi-exit-disc": { "med": 0 - } + }, + "local-pref": { + "pref": 100 + }, + "as-path": {} } } ] }, "attributes": { - "uptodate": true + "uptodate": false + } + } + ] + }, + "supported-tables": [ + { + "afi": "bgp-types:ipv4-address-family", + "safi": "bgp-types:unicast-subsequent-address-family", + "send-receive": "both" + } + ], + "adj-rib-out": { + "tables": [ + { + "afi": "bgp-types:ipv4-address-family", + "safi": "bgp-types:unicast-subsequent-address-family", + "bgp-inet:ipv4-routes": {}, + "attributes": { + "uptodate": false } } ] @@ -324,7 +302,7 @@ This concept allows user to originate new routes and advertise them to all conne Following configuration sample show a way to configure the Application Peer: -*URL:* http://localhost:8183/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 +*URL:* http://localhost:8183/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/127.0.0.1 *Method:* PUT @@ -334,16 +312,14 @@ Following configuration sample show a way to configure the Application Peer: ---- { "neighbor": { - "neighbor-address": "10.25.1.9", + "neighbor-address": "127.0.0.1", "config": { "peer-group": "application-peers" }, "afi-safis": { "afi-safi": [ { - "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST", - "receive": true, - "send-max": 0 + "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST" } ] } @@ -353,7 +329,7 @@ Following configuration sample show a way to configure the Application Peer: The Application Peer presence can be verified via REST: -*URL:* http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/peer/bgp:%2F%2F10.25.1.9 +*URL:* http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/peer/bgp:%2F%2F127.0.0.1 *Method:* GET @@ -364,7 +340,7 @@ The Application Peer presence can be verified via REST: { "peer": [ { - "peer-id": "bgp://10.25.1.9", + "peer-id": "bgp://127.0.0.1", "effective-rib-in": { "tables": [ { @@ -399,7 +375,7 @@ The Application Peer presence can be verified via REST: Next example shows how to inject a route into the programmable RIB. -*URL:* http://localhost:8183/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.0.0.11%2F32/0 +*URL:* http://localhost:8183/restconf/config/bgp-rib:application-rib/127.0.0.1/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.11%2F32/0 *Method:* PUT @@ -408,6 +384,7 @@ Next example shows how to inject a route into the programmable RIB. [source,xml] ---- + 10.0.0.11/32 0 10.0.0.11/32 @@ -441,27 +418,9 @@ and it advertised routes to local BGP system, routes are stored in peer’s RIBs "peer": [ { "peer-id": "bgp://127.0.0.2", - "supported-tables": [ - { - "afi": "bgp-types:ipv4-address-family", - "safi": "bgp-types:unicast-subsequent-address-family", - "send-receive": "both" - }, - { - "afi": "bgp-linkstate:linkstate-address-family", - "safi": "bgp-linkstate:linkstate-subsequent-address-family" - } - ], + "peer-role": "ibgp", "effective-rib-in": { "tables": [ - { - "afi": "bgp-linkstate:linkstate-address-family", - "safi": "bgp-linkstate:linkstate-subsequent-address-family", - "bgp-linkstate:linkstate-routes": {}, - "attributes": { - "uptodate": true - } - }, { "afi": "bgp-types:ipv4-address-family", "safi": "bgp-types:unicast-subsequent-address-family", @@ -469,79 +428,97 @@ and it advertised routes to local BGP system, routes are stored in peer’s RIBs "ipv4-route": [ { "path-id": 5, - "prefix": "1.1.1.1/31", + "route-key": "1.1.1.2/31", + "prefix": "1.1.1.2/31", "attributes": { - "as-path": {}, "origin": { "value": "egp" }, - "local-pref": { - "pref": 100 - }, "ipv4-next-hop": { "global": "127.1.1.1" }, "multi-exit-disc": { "med": 0 - } + }, + "local-pref": { + "pref": 100 + }, + "as-path": {} } }, { "path-id": 5, - "prefix": "1.1.1.2/31", + "route-key": "1.1.1.1/31", + "prefix": "1.1.1.1/31", "attributes": { - "as-path": {}, "origin": { "value": "egp" }, - "local-pref": { - "pref": 100 - }, "ipv4-next-hop": { "global": "127.1.1.1" }, "multi-exit-disc": { "med": 0 - } + }, + "local-pref": { + "pref": 100 + }, + "as-path": {} } } ] }, "attributes": { - "uptodate": true + "uptodate": false } } ] }, - "adj-rib-out": { + "adj-rib-in": { "tables": [ - { - "afi": "bgp-linkstate:linkstate-address-family", - "safi": "bgp-linkstate:linkstate-subsequent-address-family", - "bgp-linkstate:linkstate-routes": {}, - "attributes": { - "uptodate": false - } - }, { "afi": "bgp-types:ipv4-address-family", "safi": "bgp-types:unicast-subsequent-address-family", "bgp-inet:ipv4-routes": { "ipv4-route": [ { - "path-id": 1, - "prefix": "10.0.0.11/32", + "path-id": 5, + "route-key": "1.1.1.2/31", + "prefix": "1.1.1.2/31", "attributes": { - "as-path": {}, "origin": { - "value": "igp" + "value": "egp" + }, + "ipv4-next-hop": { + "global": "127.1.1.1" + }, + "multi-exit-disc": { + "med": 0 }, "local-pref": { "pref": 100 }, + "as-path": {} + } + }, + { + "path-id": 5, + "route-key": "1.1.1.1/31", + "prefix": "1.1.1.1/31", + "attributes": { + "origin": { + "value": "egp" + }, "ipv4-next-hop": { - "global": "10.11.1.1" - } + "global": "127.1.1.1" + }, + "multi-exit-disc": { + "med": 0 + }, + "local-pref": { + "pref": 100 + }, + "as-path": {} } } ] @@ -552,64 +529,41 @@ and it advertised routes to local BGP system, routes are stored in peer’s RIBs } ] }, - "peer-role": "ibgp", - "adj-rib-in": { + "supported-tables": [ + { + "afi": "bgp-types:ipv4-address-family", + "safi": "bgp-types:unicast-subsequent-address-family", + "send-receive": "both" + } + ], + "adj-rib-out": { "tables": [ - { - "afi": "bgp-linkstate:linkstate-address-family", - "safi": "bgp-linkstate:linkstate-subsequent-address-family", - "bgp-linkstate:linkstate-routes": {}, - "attributes": { - "uptodate": true - } - }, { "afi": "bgp-types:ipv4-address-family", "safi": "bgp-types:unicast-subsequent-address-family", "bgp-inet:ipv4-routes": { "ipv4-route": [ { - "path-id": 5, - "prefix": "1.1.1.1/31", + "path-id": 0, + "route-key": "10.0.0.11/32", + "prefix": "10.0.0.11/32", "attributes": { - "as-path": {}, "origin": { - "value": "egp" - }, - "local-pref": { - "pref": 100 + "value": "igp" }, "ipv4-next-hop": { - "global": "127.1.1.1" - }, - "multi-exit-disc": { - "med": 0 - } - } - }, - { - "path-id": 5, - "prefix": "1.1.1.2/31", - "attributes": { - "as-path": {}, - "origin": { - "value": "egp" + "global": "10.11.1.1" }, "local-pref": { "pref": 100 }, - "ipv4-next-hop": { - "global": "127.1.1.1" - }, - "multi-exit-disc": { - "med": 0 - } + "as-path": {} } } ] }, "attributes": { - "uptodate": true + "uptodate": false } } ] @@ -632,66 +586,80 @@ Also the same route should appeared in Loc-RIB now: { "loc-rib": { "tables": [ + { + "afi": "bgp-types:ipv6-address-family", + "safi": "bgp-types:unicast-subsequent-address-family", + "bgp-inet:ipv6-routes": {}, + "attributes": { + "uptodate": false + } + }, { "afi": "bgp-types:ipv4-address-family", "safi": "bgp-types:unicast-subsequent-address-family", "bgp-inet:ipv4-routes": { "ipv4-route": [ { - "path-id": 1, - "prefix": "10.0.0.11/32", + "path-id": 0, + "route-key": "1.1.1.1/31", + "prefix": "1.1.1.1/31", "attributes": { - "as-path": {}, "origin": { - "value": "igp" + "value": "egp" + }, + "ipv4-next-hop": { + "global": "127.1.1.1" + }, + "multi-exit-disc": { + "med": 0 }, "local-pref": { "pref": 100 }, - "ipv4-next-hop": { - "global": "10.11.1.1" - } + "as-path": {} } }, { - "path-id": 1, - "prefix": "1.1.1.1/31", + "path-id": 0, + "route-key": "1.1.1.2/31", + "prefix": "1.1.1.2/31", "attributes": { - "as-path": {}, "origin": { "value": "egp" }, - "local-pref": { - "pref": 100 - }, "ipv4-next-hop": { "global": "127.1.1.1" }, "multi-exit-disc": { "med": 0 - } + }, + "local-pref": { + "pref": 100 + }, + "as-path": {} } }, { - "path-id": 1, - "prefix": "1.1.1.2/31", + "path-id": 0, + "route-key": "10.0.0.11/32", + "prefix": "10.0.0.11/32", "attributes": { - "as-path": {}, "origin": { - "value": "egp" + "value": "igp" + }, + "ipv4-next-hop": { + "global": "10.11.1.1" }, "local-pref": { "pref": 100 }, - "ipv4-next-hop": { - "global": "127.1.1.1" - }, - "multi-exit-disc": { - "med": 0 - } + "as-path": {} } } ] + }, + "attributes": { + "uptodate": false } } ] @@ -715,7 +683,7 @@ in distribution dir (/opt/honeycomb in case honeycomb was installed from package Let's add route using Application Peer: -*URL:* http://localhost:8183/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.0.0.12%2F32/0 +*URL:* http://localhost:8183/restconf/config/bgp-rib:application-rib/127.0.0.1/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.12%2F32/0 *Method:* PUT @@ -724,6 +692,7 @@ Let's add route using Application Peer: [source,xml] ---- + 10.0.0.12/32 0 10.0.0.12/32 @@ -743,7 +712,7 @@ Let's add route using Application Peer: Also the same route should appeared in VPP now: -*URL:* http://localhost:8183/restconf/operational/hc2vpp-ietf-routing:routing-state/routing-instance/vpp-routing-instance/routing-protocols/routing-protocol/learned-protocol-0/static-routes/hc2vpp-ietf-ipv4-unicast-routing:ipv4 +*URL:* http://localhost:8183/restconf/operational/hc2vpp-ietf-routing:routing/control-plane-protocols/control-plane-protocol/hc2vpp-ietf-routing:static/learned-protocol-0/static-routes/ipv4 *Method:* GET @@ -755,46 +724,74 @@ Also the same route should appeared in VPP now: "hc2vpp-ietf-ipv4-unicast-routing:ipv4": { "route": [ { - "id": 0, - "vpp-ipv4-route-state": {}, - "next-hop": "0.0.0.0", - "destination-prefix": "0.0.0.0/0" + "destination-prefix": "1.1.1.2/31", + "vpp-ipv4-unicast-routing:vpp-ipv4-route": {}, + "next-hop": { + "next-hop-address": "127.1.1.1" + } + }, + { + "destination-prefix": "255.255.255.255/32", + "vpp-ipv4-unicast-routing:vpp-ipv4-route": {}, + "next-hop": { + "special-next-hop-enum": "blackhole" + } + }, + { + "destination-prefix": "1.1.1.1/31", + "vpp-ipv4-unicast-routing:vpp-ipv4-route": {}, + "next-hop": { + "next-hop-address": "127.1.1.1" + } + }, + { + "destination-prefix": "10.0.0.12/32", + "vpp-ipv4-unicast-routing:vpp-ipv4-route": {}, + "next-hop": { + "next-hop-address": "10.11.1.1" + } }, { - "id": 1, - "vpp-ipv4-route-state": {}, - "next-hop": "0.0.0.0", - "destination-prefix": "0.0.0.0/32" + "destination-prefix": "127.1.1.1/32", + "vpp-ipv4-unicast-routing:vpp-ipv4-route": {}, + "next-hop": { + "special-next-hop-enum": "blackhole" + } }, { - "id": 7, - "vpp-ipv4-route-state": {}, - "next-hop": "10.11.1.1", - "destination-prefix": "10.0.0.12/32" + "destination-prefix": "224.0.0.0/4", + "vpp-ipv4-unicast-routing:vpp-ipv4-route": {}, + "next-hop": { + "special-next-hop-enum": "blackhole" + } }, { - "id": 8, - "vpp-ipv4-route-state": {}, - "next-hop": "0.0.0.0", - "destination-prefix": "10.11.1.1/32" + "destination-prefix": "0.0.0.0/0", + "vpp-ipv4-unicast-routing:vpp-ipv4-route": {}, + "next-hop": { + "special-next-hop-enum": "blackhole" + } }, { - "id": 2, - "vpp-ipv4-route-state": {}, - "next-hop": "0.0.0.0", - "destination-prefix": "224.0.0.0/4" + "destination-prefix": "0.0.0.0/32", + "vpp-ipv4-unicast-routing:vpp-ipv4-route": {}, + "next-hop": { + "special-next-hop-enum": "blackhole" + } }, { - "id": 3, - "vpp-ipv4-route-state": {}, - "next-hop": "0.0.0.0", - "destination-prefix": "240.0.0.0/4" + "destination-prefix": "240.0.0.0/4", + "vpp-ipv4-unicast-routing:vpp-ipv4-route": {}, + "next-hop": { + "special-next-hop-enum": "blackhole" + } }, { - "id": 4, - "vpp-ipv4-route-state": {}, - "next-hop": "0.0.0.0", - "destination-prefix": "255.255.255.255/32" + "destination-prefix": "10.11.1.1/32", + "vpp-ipv4-unicast-routing:vpp-ipv4-route": {}, + "next-hop": { + "special-next-hop-enum": "blackhole" + } } ] } -- cgit 1.2.3-korg