bgp_prefix_sid_postman_collection.json revision fe9af79a
1{
2	"info": {
3		"_postman_id": "3e4d9bae-66c9-2fff-bbf0-084a2dc5f825",
4		"name": "Hc2vpp2 BGP Prefix SID calls",
5		"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",
6		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
7	},
8	"item": [
9		{
10			"_postman_id": "796ded75-d3fa-483e-bb17-2a8c6f623178",
11			"name": "Add loop0 interface ",
12			"request": {
13				"method": "PUT",
14				"header": [
15					{
16						"key": "Authorization",
17						"value": "Basic YWRtaW46YWRtaW4="
18					},
19					{
20						"key": "Content-Type",
21						"value": "application/json"
22					}
23				],
24				"body": {
25					"mode": "raw",
26					"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}"
27				},
28				"url": {
29					"raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/loop0",
30					"protocol": "http",
31					"host": [
32						"localhost"
33					],
34					"port": "8183",
35					"path": [
36						"restconf",
37						"config",
38						"ietf-interfaces:interfaces",
39						"interface",
40						"loop0"
41					]
42				},
43				"description": "We need an interface for our MPLS traffic. Our example uses loopback for simplicity."
44			},
45			"response": []
46		},
47		{
48			"_postman_id": "9b2bdadc-4de7-4897-ab19-d36194105f2c",
49			"name": "Enable mpls on loop0 interface",
50			"request": {
51				"method": "PUT",
52				"header": [
53					{
54						"key": "Authorization",
55						"value": "Basic YWRtaW46YWRtaW4="
56					},
57					{
58						"key": "Content-Type",
59						"value": "application/json"
60					}
61				],
62				"body": {
63					"mode": "raw",
64					"raw": "{\n  \"interface\": [\n    {\n      \"name\": \"loop0\",\n      \"config\": {\n        \"enabled\": \"true\"\n      }\n    }\n  ]\n}"
65				},
66				"url": {
67					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/interface/loop0",
68					"protocol": "http",
69					"host": [
70						"localhost"
71					],
72					"port": "8183",
73					"path": [
74						"restconf",
75						"config",
76						"hc2vpp-ietf-routing:routing",
77						"hc2vpp-ietf-mpls:mpls",
78						"interface",
79						"loop0"
80					]
81				}
82			},
83			"response": []
84		},
85		{
86			"_postman_id": "1e97f3cb-062b-4fa8-a140-f76a18ab2931",
87			"name": "Add application peer",
88			"request": {
89				"method": "PUT",
90				"header": [
91					{
92						"key": "Content-Type",
93						"value": "application/json"
94					},
95					{
96						"key": "Authorization",
97						"value": "Basic YWRtaW46YWRtaW4="
98					}
99				],
100				"body": {
101					"mode": "raw",
102					"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}"
103				},
104				"url": {
105					"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",
106					"protocol": "http",
107					"host": [
108						"localhost"
109					],
110					"port": "8183",
111					"path": [
112						"restconf",
113						"config",
114						"openconfig-network-instance:network-instances",
115						"network-instance",
116						"global-bgp",
117						"openconfig-network-instance:protocols",
118						"protocol",
119						"openconfig-policy-types:BGP",
120						"hc-bgp-instance",
121						"bgp",
122						"bgp-openconfig-extensions:neighbors",
123						"neighbor",
124						"192.0.2.11"
125					]
126				},
127				"description": "BGP HC borrows application peer concept for route programming.\n\nLet's configure an instance that supports BGP LU."
128			},
129			"response": []
130		},
131		{
132			"_postman_id": "3ce48f21-d660-4300-9f66-968e4ddebfc1",
133			"name": "Push single MPLS label",
134			"request": {
135				"method": "PUT",
136				"header": [
137					{
138						"key": "Authorization",
139						"value": "Basic YWRtaW46YWRtaW4="
140					},
141					{
142						"key": "Content-Type",
143						"value": "application/json"
144					}
145				],
146				"body": {
147					"mode": "raw",
148					"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}"
149				},
150				"url": {
151					"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",
152					"protocol": "http",
153					"host": [
154						"localhost"
155					],
156					"port": "8183",
157					"path": [
158						"restconf",
159						"config",
160						"hc2vpp-ietf-routing:routing",
161						"hc2vpp-ietf-mpls:mpls",
162						"hc2vpp-ietf-mpls-static:static-lsps",
163						"static-lsp",
164						"192.0.2.11"
165					]
166				},
167				"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"
168			},
169			"response": []
170		},
171		{
172			"_postman_id": "1fc508a1-53d9-4af0-a7ea-edeb4ebf36cc",
173			"name": "Add IPv4 labeled unicast route",
174			"request": {
175				"method": "PUT",
176				"header": [
177					{
178						"key": "Content-Type",
179						"value": "application/json"
180					},
181					{
182						"key": "Authorization",
183						"value": "Basic YWRtaW46YWRtaW4="
184					}
185				],
186				"body": {
187					"mode": "raw",
188					"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}"
189				},
190				"url": {
191					"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",
192					"protocol": "http",
193					"host": [
194						"localhost"
195					],
196					"port": "8183",
197					"path": [
198						"restconf",
199						"config",
200						"bgp-rib:application-rib",
201						"192.0.2.11",
202						"tables",
203						"bgp-types:ipv4-address-family",
204						"bgp-labeled-unicast:labeled-unicast-subsequent-address-family",
205						"bgp-labeled-unicast:labeled-unicast-routes",
206						"labeled-unicast-route",
207						"bgp-lu-route",
208						"1"
209					]
210				},
211				"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"
212			},
213			"response": []
214		},
215		{
216			"_postman_id": "64fae898-b1c7-47c8-9015-c4de01d2dd5d",
217			"name": "Show IPv4 labeled unicast route (cfg)",
218			"request": {
219				"method": "GET",
220				"header": [
221					{
222						"key": "Content-Type",
223						"value": "application/xml"
224					},
225					{
226						"key": "Authorization",
227						"value": "Basic YWRtaW46YWRtaW4="
228					}
229				],
230				"body": {
231					"mode": "raw",
232					"raw": ""
233				},
234				"url": {
235					"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",
236					"protocol": "http",
237					"host": [
238						"localhost"
239					],
240					"port": "8183",
241					"path": [
242						"restconf",
243						"config",
244						"bgp-rib:application-rib",
245						"192.0.2.11",
246						"tables",
247						"bgp-types:ipv4-address-family",
248						"bgp-labeled-unicast:labeled-unicast-subsequent-address-family",
249						"bgp-labeled-unicast:labeled-unicast-routes",
250						"labeled-unicast-route",
251						"bgp-lu-route",
252						"1"
253					]
254				}
255			},
256			"response": []
257		},
258		{
259			"_postman_id": "1c09c372-ddfb-40b4-87ba-53f11b8fe0f8",
260			"name": "Delete IPv4 labeled unicast route (cfg)",
261			"request": {
262				"method": "DELETE",
263				"header": [
264					{
265						"key": "Content-Type",
266						"value": "application/xml"
267					},
268					{
269						"key": "Authorization",
270						"value": "Basic YWRtaW46YWRtaW4="
271					}
272				],
273				"body": {
274					"mode": "raw",
275					"raw": ""
276				},
277				"url": {
278					"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",
279					"protocol": "http",
280					"host": [
281						"localhost"
282					],
283					"port": "8183",
284					"path": [
285						"restconf",
286						"config",
287						"bgp-rib:application-rib",
288						"192.0.2.11",
289						"tables",
290						"bgp-types:ipv4-address-family",
291						"bgp-labeled-unicast:labeled-unicast-subsequent-address-family",
292						"bgp-labeled-unicast:labeled-unicast-routes",
293						"labeled-unicast-route",
294						"bgp-lu-route",
295						"1"
296					]
297				}
298			},
299			"response": []
300		},
301		{
302			"_postman_id": "16261cc9-8b65-4b55-a615-2d6ecdce4af1",
303			"name": "Show Loc-RIB",
304			"request": {
305				"method": "GET",
306				"header": [
307					{
308						"key": "Content-Type",
309						"value": "application/xml"
310					},
311					{
312						"key": "Authorization",
313						"value": "Basic YWRtaW46YWRtaW4="
314					}
315				],
316				"body": {
317					"mode": "raw",
318					"raw": "<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>"
319				},
320				"url": {
321					"raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/loc-rib",
322					"protocol": "http",
323					"host": [
324						"localhost"
325					],
326					"port": "8183",
327					"path": [
328						"restconf",
329						"operational",
330						"bgp-rib:bgp-rib",
331						"rib",
332						"hc-bgp-instance",
333						"loc-rib"
334					]
335				},
336				"description": "To check if route was programmed."
337			},
338			"response": []
339		}
340	]
341}