1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
|
{
"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": "<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>"
},
"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": []
}
]
}
|