{ "info": { "_postman_id": "3e4d9bae-66c9-2fff-bbf0-084a2dc5f825", "name": "Hc2vpp2 BGP Prefix SID calls", "description": "Examples of requests for testing advertising and receiving BGP Prefix SID.\nMore info:\nhttps://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-07#section-4.1\n\nhttps://tools.ietf.org/html/draft-ietf-spring-segment-routing-msdc-08#section-4.2.2", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "_postman_id": "796ded75-d3fa-483e-bb17-2a8c6f623178", "name": "Add loop0 interface ", "request": { "method": "PUT", "header": [ { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"interface\": [\n {\n \"name\": \"loop0\",\n \"description\": \"for testing purposes\",\n \"type\": \"v3po:loopback\",\n \"loopback\": {\n \"mac\": \"00:ff:ff:ff:ff:ff\"\n }\n }\n ]\n}" }, "url": { "raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/loop0", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "ietf-interfaces:interfaces", "interface", "loop0" ] }, "description": "We need an interface for our MPLS traffic. Our example uses loopback for simplicity." }, "response": [] }, { "_postman_id": "9b2bdadc-4de7-4897-ab19-d36194105f2c", "name": "Enable mpls on loop0 interface", "request": { "method": "PUT", "header": [ { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"interface\": [\n {\n \"name\": \"loop0\",\n \"config\": {\n \"enabled\": \"true\"\n }\n }\n ]\n}" }, "url": { "raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/interface/loop0", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "hc2vpp-ietf-routing:routing", "hc2vpp-ietf-mpls:mpls", "interface", "loop0" ] } }, "response": [] }, { "_postman_id": "1e97f3cb-062b-4fa8-a140-f76a18ab2931", "name": "Add application peer", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "{\n \"neighbor\": {\n \"neighbor-address\": \"192.0.2.11\",\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}" }, "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/192.0.2.11", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "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", "192.0.2.11" ] }, "description": "BGP HC borrows application peer concept for route programming.\n\nLet's configure an instance that supports BGP LU." }, "response": [] }, { "_postman_id": "3ce48f21-d660-4300-9f66-968e4ddebfc1", "name": "Push single MPLS label", "request": { "method": "PUT", "header": [ { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"static-lsp\": [\n {\n \"name\": \"192.0.2.11\",\n \"config\": {\n \"in-segment\": {\n \"ip-prefix\": \"192.0.2.11/32\"\n },\n \"operation\": \"impose-and-forward\",\n \"outgoing-label\": 3,\n \"outgoing-interface\": \"loop0\"\n }\n }\n ]\n}" }, "url": { "raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/hc2vpp-ietf-mpls-static:static-lsps/static-lsp/192.0.2.11", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "hc2vpp-ietf-routing:routing", "hc2vpp-ietf-mpls:mpls", "hc2vpp-ietf-mpls-static:static-lsps", "static-lsp", "192.0.2.11" ] }, "description": "HC translates BGP LU updates to recursive routes with outgoing label.\nTo teach VPP how to resolve them we need non-recursive one.\n\nVPP can't recursively resolve a route that has out labels via a route that does not have out labels,\nso we cnfigure implicit null(3) (no more labels will be added to the package).\n\nCLI equivalent:\nip route add 192.0.2.11/32 via loop0 out-labels 3" }, "response": [] }, { "_postman_id": "1fc508a1-53d9-4af0-a7ea-edeb4ebf36cc", "name": "Add IPv4 labeled unicast route", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "{\n \"bgp-labeled-unicast:labeled-unicast-route\": [\n {\n \"path-id\": 1,\n \"route-key\": \"bgp-lu-route\",\n \"attributes\": {\n \"local-pref\": {\n \"pref\": 100\n },\n \"bgp-prefix-sid\": {\n \"bgp-prefix-sid-tlvs\": [\n {\n \"label-index-tlv\": 11\n },\n {\n \"srgb-value\": [\n {\n \"range\": 8000,\n \"base\": 16000\n }\n ]\n }\n ]\n },\n \"ipv4-next-hop\": {\n \"global\": \"192.0.2.11\"\n },\n \"as-path\": {},\n \"origin\": {\n \"value\": \"igp\"\n }\n },\n \"label-stack\": [\n {\n \"label-value\": 16011\n }\n ],\n \"prefix\": \"10.10.10.10/24\"\n }\n ]\n}" }, "url": { "raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/192.0.2.11/tables/bgp-types:ipv4-address-family/bgp-labeled-unicast:labeled-unicast-subsequent-address-family/bgp-labeled-unicast:labeled-unicast-routes/labeled-unicast-route/bgp-lu-route/1", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "bgp-rib:application-rib", "192.0.2.11", "tables", "bgp-types:ipv4-address-family", "bgp-labeled-unicast:labeled-unicast-subsequent-address-family", "bgp-labeled-unicast:labeled-unicast-routes", "labeled-unicast-route", "bgp-lu-route", "1" ] }, "description": "Configures BGP LU update for 10.10.10.10/24 via 192.0.2.11 with label 16011 and label-index 11.\n\nVerify presence of 3 FIB entries (MPLS non-eos, eos, IP) using CLI:\n\nvpp# show mpls fib 16011\n\nvpp# show ip fib 10.10.10.10" }, "response": [] }, { "_postman_id": "64fae898-b1c7-47c8-9015-c4de01d2dd5d", "name": "Show IPv4 labeled unicast route (cfg)", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/192.0.2.11/tables/bgp-types:ipv4-address-family/bgp-labeled-unicast:labeled-unicast-subsequent-address-family/bgp-labeled-unicast:labeled-unicast-routes/labeled-unicast-route/bgp-lu-route/1", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "bgp-rib:application-rib", "192.0.2.11", "tables", "bgp-types:ipv4-address-family", "bgp-labeled-unicast:labeled-unicast-subsequent-address-family", "bgp-labeled-unicast:labeled-unicast-routes", "labeled-unicast-route", "bgp-lu-route", "1" ] } }, "response": [] }, { "_postman_id": "1c09c372-ddfb-40b4-87ba-53f11b8fe0f8", "name": "Delete IPv4 labeled unicast route (cfg)", "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/192.0.2.11/tables/bgp-types:ipv4-address-family/bgp-labeled-unicast:labeled-unicast-subsequent-address-family/bgp-labeled-unicast:labeled-unicast-routes/labeled-unicast-route/bgp-lu-route/1", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "bgp-rib:application-rib", "192.0.2.11", "tables", "bgp-types:ipv4-address-family", "bgp-labeled-unicast:labeled-unicast-subsequent-address-family", "bgp-labeled-unicast:labeled-unicast-routes", "labeled-unicast-route", "bgp-lu-route", "1" ] } }, "response": [] }, { "_postman_id": "16261cc9-8b65-4b55-a615-2d6ecdce4af1", "name": "Show Loc-RIB", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "\n 10.25.1.9\n \n application-peers\n \n" }, "url": { "raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/loc-rib", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "operational", "bgp-rib:bgp-rib", "rib", "hc-bgp-instance", "loc-rib" ] }, "description": "To check if route was programmed." }, "response": [] } ] }