Added JSON and XML payloads tabs with RFC 8040 URL
[bgpcep.git] / docs / bgp / bgp-user-guide-mvpn-family.rst
1 .. _bgp-user-guide-mvpn-family:
2
3 MCAST-VPN Family
4 ================
5 The BGP Multicast VPN(BGP MCAST-VPN) Multiprotocol extension can be used for MVPN auto-discovery, advertising MVPN to Inclusive P-Multicast Service
6 Interface (I-PMSI) tunnel binding, advertising (C-S,C-G) to Selective PMSI (S-PMSI) tunnel binding, VPN customer multicast routing
7 information exchange among Provider Edge routers (PEs), choosing a single forwarder PE, and for procedures in support of co-locating a
8 Customer Rendezvous Point (C-RP) on a PE.
9
10 .. contents:: Contents
11    :depth: 2
12    :local:
13
14 Configuration
15 ^^^^^^^^^^^^^
16 This section shows a way to enable MCAST-VPN family in BGP speaker and peer configuration.
17
18 BGP Speaker
19 '''''''''''
20 To enable MCAST-VPN support in BGP plugin, first configure BGP speaker instance:
21
22 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
23
24 **RFC8040 URL:** ``/rests/data/openconfig-network-instance:network-instances/network-instance=global-bgp/protocols``
25
26 **Method:** ``POST``
27
28 .. tabs::
29
30    .. tab:: XML
31
32       **Content-Type:** ``application/xml``
33
34       **Request Body:**
35
36       .. code-block:: xml
37
38          <protocol xmlns="http://openconfig.net/yang/network-instance">
39              <name>bgp-example</name>
40              <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
41              <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
42                  <global>
43                      <config>
44                          <router-id>192.0.2.2</router-id>
45                          <as>65000</as>
46                      </config>
47                      <afi-safis>
48                          <afi-safi>
49                              <afi-safi-name>IPV4-MCAST-VPN</afi-safi-name>
50                          </afi-safi>
51                          <afi-safi>
52                              <afi-safi-name>IPV6-MCAST-VPN</afi-safi-name>
53                          </afi-safi>
54                      </afi-safis>
55                  </global>
56              </bgp>
57          </protocol>
58
59    .. tab:: JSON
60
61       **Content-Type:** ``application/json``
62
63       **Request Body:**
64
65       .. code-block:: json
66
67          {
68              "protocol": [
69                  {
70                      "identifier": "openconfig-policy-types:BGP",
71                      "name": "bgp-example",
72                      "bgp-openconfig-extensions:bgp": {
73                          "global": {
74                              "config": {
75                                  "router-id": "192.0.2.2",
76                                  "as": 65000
77                              },
78                              "afi-safis": {
79                                  "afi-safi": [
80                                      {
81                                          "afi-safi-name": "IPV4-MCAST-VPN"
82                                      },
83                                      {
84                                          "afi-safi-name": "IPV6-MCAST-VPN"
85                                      }
86                                  ]
87                              }
88                          }
89                      }
90                  }
91              ]
92          }
93
94 BGP Peer
95 ''''''''
96 Here is an example for BGP peer configuration with enabled IPV4 MCAST-VPN family.
97
98 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors``
99
100 **Method:** ``POST``
101
102 .. tabs::
103
104    .. tab:: XML
105
106       **Content-Type:** ``application/xml``
107
108       **Request Body:**
109
110       .. code-block:: xml
111
112          <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
113              <neighbor-address>192.0.2.1</neighbor-address>
114              <afi-safis>
115                  <afi-safi>
116                      <afi-safi-name>IPV4-MCAST-VPN</afi-safi-name>
117                  </afi-safi>
118              </afi-safis>
119          </neighbor>
120
121    .. tab:: JSON
122
123       **Content-Type:** ``application/json``
124
125       **Request Body:**
126
127       .. code-block:: json
128
129          {
130              "neighbor": [
131                  {
132                      "neighbor-address": "192.0.2.1",
133                      "afi-safis": {
134                          "afi-safi": [
135                              {
136                                  "afi-safi-name": "IPV4-MCAST-VPN"
137                              }
138                          ]
139                      }
140                  }
141              ]
142          }
143
144 Ipv4 MCAST-VPN Route API
145 ^^^^^^^^^^^^^^^^^^^^^^^^
146 Following tree illustrates the BGP MCAST-VPN route structure.
147
148 .. code-block:: console
149
150    :(mvpn-routes-ipv4-case)
151       +--ro mvpn-routes-ipv4
152          +--ro mvpn-route* [route-key path-id]
153             +--ro (mvpn-choice)
154                +--:(intra-as-i-pmsi-a-d-case)
155                |  +--ro intra-as-i-pmsi-a-d
156                +--:(inter-as-i-pmsi-a-d-case)
157                |  +--ro inter-as-i-pmsi-a-d
158                |     +--ro source-as    inet:as-number
159                +--:(s-pmsi-a-d-case)
160                |  +--ro s-pmsi-a-d
161                |     +--ro multicast-source             inet:ip-address
162                |     +--ro (multicast-group)?
163                |        +--:(c-g-address-case)
164                |        |  +--ro c-g-address?           inet:ip-address
165                |        +--:(ldp-mp-opaque-value-case)
166                |           +--ro ldp-mp-opaque-value
167                |              +--ro opaque-type             uint8
168                |              +--ro opaque-extended-type?   uint16
169                |              +--ro opaque                  yang:hex-string
170                +--:(leaf-a-d-case)
171                |  +--ro leaf-a-d
172                |     +--ro (leaf-a-d-route-key)
173                |        +--:(inter-as-i-pmsi-a-d-case)
174                |        |  +--ro inter-as-i-pmsi-a-d
175                |        |     +--ro source-as    inet:as-number
176                |        +--:(s-pmsi-a-d-case)
177                |           +--ro s-pmsi-a-d
178                |              +--ro multicast-source             inet:ip-address
179                |              +--ro (multicast-group)?
180                |                 +--:(c-g-address-case)
181                |                 |  +--ro c-g-address?           inet:ip-address
182                |                 +--:(ldp-mp-opaque-value-case)
183                |                    +--ro ldp-mp-opaque-value
184                |                       +--ro opaque-type             uint8
185                |                       +--ro opaque-extended-type?   uint16
186                |                       +--ro opaque                  yang:hex-string
187                +--:(source-active-a-d-case)
188                |  +--ro source-active-a-d
189                |     +--ro multicast-source    inet:ip-address
190                |     +--ro multicast-group     inet:ip-address
191                +--:(shared-tree-join-case)
192                |  +--ro shared-tree-join
193                |     +--ro c-multicast
194                |        +--ro multicast-source             inet:ip-address
195                |        +--ro source-as                    inet:as-number
196                |        +--ro (multicast-group)?
197                |           +--:(c-g-address-case)
198                |           |  +--ro c-g-address?           inet:ip-address
199                |           +--:(ldp-mp-opaque-value-case)
200                |              +--ro ldp-mp-opaque-value
201                |                 +--ro opaque-type             uint8
202                |                 +--ro opaque-extended-type?   uint16
203                |                 +--ro opaque                  yang:hex-string
204                +--:(source-tree-join-case)
205                   +--ro source-tree-join
206                      +--ro c-multicast
207                         +--ro multicast-source             inet:ip-address
208                         +--ro source-as                    inet:as-number
209                         +--ro (multicast-group)?
210                            +--:(c-g-address-case)
211                            |  +--ro c-g-address?           inet:ip-address
212                            +--:(ldp-mp-opaque-value-case)
213                               +--ro ldp-mp-opaque-value
214                                  +--ro opaque-type             uint8
215                                  +--ro opaque-extended-type?   uint16
216                                  +--ro opaque                  yang:hex-string
217                      ...
218
219 Ipv6 MCAST-VPN Route API
220 ^^^^^^^^^^^^^^^^^^^^^^^^
221
222 Following tree illustrates the BGP MCAST-VPN route structure.
223
224 .. code-block:: console
225
226    :(mvpn-routes-ipv6-case)
227       +--ro mvpn-routes-ipv6
228          +--ro mvpn-route* [route-key path-id]
229             +--ro (mvpn-choice)
230                +--:(intra-as-i-pmsi-a-d-case)
231                |  +--ro intra-as-i-pmsi-a-d
232                +--:(inter-as-i-pmsi-a-d-case)
233                |  +--ro inter-as-i-pmsi-a-d
234                |     +--ro source-as    inet:as-number
235                +--:(s-pmsi-a-d-case)
236                |  +--ro s-pmsi-a-d
237                |     +--ro multicast-source             inet:ip-address
238                |     +--ro (multicast-group)?
239                |        +--:(c-g-address-case)
240                |        |  +--ro c-g-address?           inet:ip-address
241                |        +--:(ldp-mp-opaque-value-case)
242                |           +--ro ldp-mp-opaque-value
243                |              +--ro opaque-type             uint8
244                |              +--ro opaque-extended-type?   uint16
245                |              +--ro opaque                  yang:hex-string
246                +--:(leaf-a-d-case)
247                |  +--ro leaf-a-d
248                |     +--ro (leaf-a-d-route-key)
249                |        +--:(inter-as-i-pmsi-a-d-case)
250                |        |  +--ro inter-as-i-pmsi-a-d
251                |        |     +--ro source-as    inet:as-number
252                |        +--:(s-pmsi-a-d-case)
253                |           +--ro s-pmsi-a-d
254                |              +--ro multicast-source             inet:ip-address
255                |              +--ro (multicast-group)?
256                |                 +--:(c-g-address-case)
257                |                 |  +--ro c-g-address?           inet:ip-address
258                |                 +--:(ldp-mp-opaque-value-case)
259                |                    +--ro ldp-mp-opaque-value
260                |                       +--ro opaque-type             uint8
261                |                       +--ro opaque-extended-type?   uint16
262                |                       +--ro opaque                  yang:hex-string
263                +--:(source-active-a-d-case)
264                |  +--ro source-active-a-d
265                |     +--ro multicast-source    inet:ip-address
266                |     +--ro multicast-group     inet:ip-address
267                +--:(shared-tree-join-case)
268                |  +--ro shared-tree-join
269                |     +--ro c-multicast
270                |        +--ro multicast-source             inet:ip-address
271                |        +--ro source-as                    inet:as-number
272                |        +--ro (multicast-group)?
273                |           +--:(c-g-address-case)
274                |           |  +--ro c-g-address?           inet:ip-address
275                |           +--:(ldp-mp-opaque-value-case)
276                |              +--ro ldp-mp-opaque-value
277                |                 +--ro opaque-type             uint8
278                |                 +--ro opaque-extended-type?   uint16
279                |                 +--ro opaque                  yang:hex-string
280                +--:(source-tree-join-case)
281                   +--ro source-tree-join
282                      +--ro c-multicast
283                         +--ro multicast-source             inet:ip-address
284                         +--ro source-as                    inet:as-number
285                         +--ro (multicast-group)?
286                            +--:(c-g-address-case)
287                            |  +--ro c-g-address?           inet:ip-address
288                            +--:(ldp-mp-opaque-value-case)
289                               +--ro ldp-mp-opaque-value
290                                  +--ro opaque-type             uint8
291                                  +--ro opaque-extended-type?   uint16
292                                  +--ro opaque                  yang:hex-string
293                      ...
294
295 Usage
296 ^^^^^
297 The Ipv4 Multicast VPN table in an instance of the speaker's Loc-RIB can be verified via REST:
298
299 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv4-address-family/bgp-mvpn:mcast-vpn-subsequent-address-family/bgp-mvpn-ipv4:mvpn-routes``
300
301 **Method:** ``GET``
302
303 .. tabs::
304
305    .. tab:: XML
306
307       **Response Body:**
308
309       .. code-block:: xml
310
311          <mvpn-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp:mvpn:ipv4">
312             <mvpn-route>
313                <route-key>flow1</route-key>
314                <path-id>0</path-id>
315                <intra-as-i-pmsi-a-d>
316                   <route-distinguisher>172.16.0.44:101</route-distinguisher>
317                   <orig-route-ip>192.168.100.1</orig-route-ip>
318                </intra-as-i-pmsi-a-d>
319                <attributes>
320                   <ipv4-next-hop>
321                      <global>199.20.166.41</global>
322                   </ipv4-next-hop>
323                   <as-path/>
324                   <origin>
325                      <value>igp</value>
326                   </origin>
327                </attributes>
328             </mvpn-route>
329          </mvpn-routes>
330
331    .. tab:: JSON
332
333       **Response Body:**
334
335       .. code-block:: json
336
337          {
338              "bgp:mvpn:ipv4:mvpn-routes": {
339                  "mvpn-route": {
340                      "route-key": "flow1",
341                      "path-id": 0,
342                      "intra-as-i-pmsi-a-d": {
343                          "route-distinguisher": "172.16.0.44:101",
344                          "orig-route-ip": "192.168.100.1"
345                      },
346                      "attributes": {
347                          "origin": {
348                              "value": "igp"
349                          },
350                          "ipv4-next-hop": {
351                              "global": "199.20.166.41"
352                          }
353                      }
354                  }
355              }
356          }
357
358 The Ipv6 Multicast VPN table in an instance of the speaker's Loc-RIB can be verified via REST:
359
360 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-types:ipv4-address-family/bgp-mvpn:mcast-vpn-subsequent-address-family/bgp-mvpn-ipv6:mvpn-routes``
361
362 **Method:** ``GET``
363
364 .. tabs::
365
366    .. tab:: XML
367
368       **Response Body:**
369
370       .. code-block:: xml
371
372          <mvpn-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp:mvpn:ipv6">
373             <mvpn-route>
374                <route-key>flow1</route-key>
375                <path-id>0</path-id>
376                <intra-as-i-pmsi-a-d>
377                   <route-distinguisher>172.16.0.44:101</route-distinguisher>
378                   <orig-route-ip>192.168.100.1</orig-route-ip>
379                </intra-as-i-pmsi-a-d>
380                <attributes>
381                   <ipv6-next-hop>
382                      <global>2001:db8:1::6</global>
383                   </ipv6-next-hop>
384                   <as-path/>
385                   <origin>
386                      <value>igp</value>
387                   </origin>
388                </attributes>
389             </mvpn-route>
390          </mvpn-routes>
391
392    .. tab:: JSON
393
394       **Response Body:**
395
396       .. code-block:: json
397
398          {
399              "bgp:mvpn:ipv6:mvpn-routes": {
400                  "mvpn-route": {
401                      "route-key": "flow1",
402                      "path-id": 0,
403                      "intra-as-i-pmsi-a-d": {
404                          "route-distinguisher": "172.16.0.44:101",
405                          "orig-route-ip": "192.168.100.1"
406                      },
407                      "attributes": {
408                          "origin": {
409                              "value": "igp"
410                          },
411                          "ipv6-next-hop": {
412                             "global": "2001:db8:1::6"
413                          }
414                      }
415                  }
416              }
417          }
418
419 Programming
420 ^^^^^^^^^^^
421 These examples show how to originate and remove MCAST-VPN routes via programmable RIB.
422 There are seven different types of MCAST-VPN routes, and multiples extended communities.
423 Routes can be used for variety of use-cases supported by BGP/MPLS MCAST-VPN.
424 Make sure the *Application Peer* is configured first.
425
426 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-mvpn:mcast-vpn-subsequent-address-family/bgp-mvpn-ipv4:mvpn-routes``
427
428 **Method:** ``POST``
429
430 .. tabs::
431
432    .. tab:: XML
433
434       **Content-Type:** ``application/xml``
435
436       **Request Body:**
437
438       .. code-block:: xml
439          :linenos:
440          :emphasize-lines: 4,17
441
442          <mvpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp:mvpn:ipv4">
443             <route-key>mvpn</route-key>
444             <path-id>0</path-id>
445             <intra-as-i-pmsi-a-d>
446                <route-distinguisher>172.16.0.44:101</route-distinguisher>
447                <orig-route-ip>192.168.100.1</orig-route-ip>
448             </intra-as-i-pmsi-a-d>
449             ....
450             <attributes>
451                <ipv4-next-hop>
452                   <global>199.20.166.41</global>
453                </ipv4-next-hop>
454                <as-path/>
455                <origin>
456                   <value>igp</value>
457                </origin>
458                <extended-communities>
459                   ....
460                </extended-communities>
461             </attributes>
462          </mvpn-route>
463
464       @line 4: One of the MCAST-VPN route must be set here.
465
466       @line 15: In some cases, specific extended community presence is required.
467
468    .. tab:: JSON
469
470       **Content-Type:** ``application/json``
471
472       **Request Body:**
473
474       .. code-block:: json
475          :linenos:
476          :emphasize-lines: 5,16
477
478          {
479              "mvpn-route": {
480                  "route-key": "mvpn",
481                  "path-id": 0,
482                  "intra-as-i-pmsi-a-d": {
483                      "route-distinguisher": "172.16.0.44:101",
484                      "orig-route-ip": "192.168.100.1"
485                  },
486                  "attributes": {
487                      "origin": {
488                          "value": "igp"
489                      },
490                      "ipv4-next-hop": {
491                          "global": "199.20.166.41"
492                      },
493                      "extended-communities": "..."
494                  }
495              }
496          }
497
498       @line 5: One of the MCAST-VPN route must be set here.
499
500       @line 16: In some cases, specific extended community presence is required.
501
502 -----
503
504 **MVPN Routes:**
505
506 * **Intra-AS I-PMSI A-D**
507
508 .. tabs::
509
510    .. tab:: XML
511
512       .. code-block:: xml
513
514          <intra-as-i-pmsi-a-d>
515              <route-distinguisher>0:5:3</route-distinguisher>
516              <orig-route-ip>10.10.10.10</orig-route-ip>
517          </intra-as-i-pmsi-a-d>
518
519    .. tab:: JSON
520
521       .. code-block:: json
522
523          {
524              "intra-as-i-pmsi-a-d" : {
525                  "route-distinguisher": "1.2.3.4:258",
526                  "orig-route-ip": "10.10.10.10"
527              }
528          }
529
530 * **Inter-AS I-PMSI A-D**
531
532 .. tabs::
533
534    .. tab:: XML
535
536       .. code-block:: xml
537
538          <inter-as-i-pmsi-a-d>
539              <route-distinguisher>1.2.3.4:258</route-distinguisher>
540              <source-as>64496</source-as>
541          </inter-as-i-pmsi-a-d>
542
543    .. tab:: JSON
544
545       .. code-block:: json
546
547          {
548              "inter-as-i-pmsi-a-d" : {
549                  "route-distinguisher": "1.2.3.4:258",
550                  "source-as": 64496
551              }
552          }
553
554 * **S-PMSI A-D**
555
556 .. tabs::
557
558    .. tab:: XML
559
560       .. code-block:: xml
561
562          <s-pmsi-a-d>
563              <route-distinguisher>1.2.3.4:258</route-distinguisher>
564              <multicast-source>10.0.0.10</multicast-source>
565              <c-g-address>12.0.0.12</c-g-address>
566              <orig-route-ip>1.0.0.1</orig-route-ip>
567          </s-pmsi-a-d>
568
569    .. tab:: JSON
570
571       .. code-block:: json
572
573          {
574              "s-pmsi-a-d" : {
575                  "route-distinguisher": "1.2.3.4:258",
576                  "multicast-source": "10.0.0.10",
577                  "c-g-address": "12.0.0.12",
578                  "orig-route-ip": "1.0.0.1"
579              }
580          }
581
582 .. tabs::
583
584    .. tab:: XML
585
586       .. code-block:: xml
587
588          <s-pmsi-a-d>
589              <route-distinguisher>1.2.3.4:258</route-distinguisher>
590              <multicast-source>10.0.0.10</multicast-source>
591              <ldp-mp-opaque-value>
592                  <opaque-type>1</opaque-type>
593                  <opaque-extended-type>0</opaque-extended-type>
594                  <opaque>das75das48bvxc</opaque>
595              </ldp-mp-opaque-value>
596              <orig-route-ip>1.0.0.1</orig-route-ip>
597          </s-pmsi-a-d>
598
599    .. tab:: JSON
600
601       .. code-block:: json
602
603          {
604              "s-pmsi-a-d" : {
605                  "route-distinguisher": "1.2.3.4:258",
606                  "multicast-source": "10.0.0.10",
607                  "ldp-mp-opaque-value": {
608                      "opaque-type": 1,
609                      "opaque-extended-type": 0,
610                      "opaque": "das75das48bvxc"
611                  },
612                  "orig-route-ip": "1.0.0.1"
613              }
614          }
615
616 * **Leaf A-D**
617
618 .. tabs::
619
620    .. tab:: XML
621
622       .. code-block:: xml
623
624          <leaf-a-d>
625              <inter-as-i-pmsi-a-d>
626                  <route-distinguisher>1.2.3.4:258</route-distinguisher>
627                  <source-as>1</source-as>
628              </inter-as-i-pmsi-a-d>
629              <orig-route-ip>1.0.0.1</orig-route-ip>
630          </leaf-a-d>
631
632    .. tab:: JSON
633
634       .. code-block:: json
635
636          {
637              "leaf-a-d" : {
638                  "inter-as-i-pmsi-a-d": {
639                      "route-distinguisher": "1.2.3.4:258",
640                      "source-as": "1"
641                  },
642                  "orig-route-ip": "1.0.0.1"
643              }
644          }
645
646 .. tabs::
647
648    .. tab:: XML
649
650       .. code-block:: xml
651
652          <leaf-a-d>
653              <s-pmsi-a-d>
654                  <route-distinguisher>1.2.3.4:258</route-distinguisher>
655                  <multicast-source>10.0.0.10</multicast-source>
656                  <ldp-mp-opaque-value>
657                      <opaque-type>1</opaque-type>
658                      <opaque-extended-type>0</opaque-extended-type>
659                      <opaque>das75das48bvxc</opaque>
660                  </ldp-mp-opaque-value>
661                  <orig-route-ip>1.0.0.1</orig-route-ip>
662              </s-pmsi-a-d>
663              <orig-route-ip>1.0.0.1</orig-route-ip>
664          </leaf-a-d>
665
666    .. tab:: JSON
667
668       .. code-block:: json
669
670          {
671              "leaf-a-d" : {
672                  "s-pmsi-a-d": {
673                      "route-distinguisher": "1.2.3.4:258",
674                      "multicast-source": "10.0.0.10",
675                      "ldp-mp-opaque-value": {
676                          "opaque-type": 1,
677                          "opaque-extended-type": 0,
678                          "opaque": "das75das48bvxc"
679                      },
680                      "orig-route-ip": "1.0.0.1"
681                  },
682                  "orig-route-ip": "1.0.0.1"
683              }
684          }
685
686 * **Source Active A-D**
687
688 .. tabs::
689
690    .. tab:: XML
691
692       .. code-block:: xml
693
694          <source-active-a-d>
695              <route-distinguisher>1.2.3.4:258</route-distinguisher>
696              <multicast-source>1.0.0.1</multicast-source>
697              <multicast-group>2.0.0.2</multicast-group>
698          </source-active-a-d>
699
700    .. tab:: JSON
701
702       .. code-block:: json
703
704          {
705              "source-active-a-d" : {
706                  "route-distinguisher": "1.2.3.4:258",
707                  "multicast-source": "1.0.0.1",
708                  "multicast-group": "2.0.0.2"
709              }
710          }
711
712 * **Shared Tree Join**
713
714 .. tabs::
715
716    .. tab:: XML
717
718       .. code-block:: xml
719
720          <shared-tree-join>
721              <c-multicast>
722                 <route-distinguisher>1.2.3.4:258</route-distinguisher>
723                 <source-as>64415</source-as>
724                 <multicast-source>1.0.0.1</multicast-source>
725                 <c-g-address>2.0.0.2</c-g-address>
726              </c-multicast>
727          </shared-tree-join>
728
729    .. tab:: JSON
730
731       .. code-block:: json
732
733          {
734              "shared-tree-join" : {
735                  "c-multicast": {
736                      "route-distinguisher": "1.2.3.4:258",
737                      "source-as": 64415,
738                      "multicast-source": "1.0.0.1",
739                      "c-g-address": "2.0.0.2"
740                  }
741              }
742          }
743
744 .. tabs::
745
746    .. tab:: XML
747
748       .. code-block:: xml
749
750          <shared-tree-join>
751              <c-multicast>
752                 <route-distinguisher>1.2.3.4:258</route-distinguisher>
753                 <source-as>64415</source-as>
754                 <multicast-source>1.0.0.1</multicast-source>
755                 <ldp-mp-opaque-value>
756                     <opaque-type>1</opaque-type>
757                     <opaque-extended-type>0</opaque-extended-type>
758                     <opaque>das75das48bvxc</opaque>
759                 </ldp-mp-opaque-value>
760              </c-multicast>
761          </shared-tree-join>
762
763    .. tab:: JSON
764
765       .. code-block:: json
766
767          {
768              "shared-tree-join" : {
769                  "c-multicast": {
770                      "route-distinguisher": "1.2.3.4:258",
771                      "source-as": 64415,
772                      "multicast-source": "1.0.0.1",
773                      "ldp-mp-opaque-value": {
774                          "opaque-type": 1,
775                          "opaque-extended-type": 0,
776                          "opaque": "das75das48bvxc"
777                      }
778                  }
779              }
780          }
781
782 * **Source Tree Join**
783
784 .. tabs::
785
786    .. tab:: XML
787
788       .. code-block:: xml
789
790          <source-tree-join>
791              <c-multicast>
792                  <route-distinguisher>1.2.3.4:258</route-distinguisher>
793                  <source-as>64415</source-as>
794                  <multicast-source>1.0.0.1</multicast-source>
795                  <c-g-address>2.0.0.2</c-g-address>
796              </c-multicast>
797          </source-tree-join>
798
799    .. tab:: JSON
800
801       .. code-block:: json
802
803          {
804              "source-tree-join" : {
805                  "c-multicast": {
806                      "route-distinguisher": "1.2.3.4:258",
807                      "source-as": 64415,
808                      "multicast-source": "1.0.0.1",
809                      "c-g-address": "2.0.0.2"
810                  }
811              }
812          }
813
814 .. tabs::
815
816    .. tab:: XML
817
818       .. code-block:: xml
819
820          <source-tree-join>
821              <c-multicast>
822                  <route-distinguisher>1.2.3.4:258</route-distinguisher>
823                  <source-as>64415</source-as>
824                  <multicast-source>1.0.0.1</multicast-source>
825                  <ldp-mp-opaque-value>
826                      <opaque-type>1</opaque-type>
827                      <opaque-extended-type>0</opaque-extended-type>
828                      <opaque>das75das48bvxc</opaque>
829                  </ldp-mp-opaque-value>
830              </c-multicast>
831          </source-tree-join>
832
833    .. tab:: JSON
834
835       .. code-block:: json
836
837          {
838              "source-tree-join" : {
839                  "c-multicast": {
840                      "route-distinguisher": "1.2.3.4:258",
841                      "source-as": 64415,
842                      "multicast-source": "1.0.0.1",
843                      "ldp-mp-opaque-value": {
844                          "opaque-type": 1,
845                          "opaque-extended-type": 0,
846                          "opaque": "das75das48bvxc"
847                      }
848                  }
849              }
850          }
851
852 **Attributes:**
853
854 .. include:: bgp-user-guide-pmsi-attribute.rst
855
856 * **PE Distinguisher Labels Attribute**
857
858 .. tabs::
859
860    .. tab:: XML
861
862       .. code-block:: xml
863
864          <pe-distinguisher-labels-attribute>
865              <pe-distinguisher-label-attribute>
866                  <pe-address>10.10.10.1</pe-address>
867                  <mpls-label>20024</mpls-label>
868              </pe-distinguisher-label-attribute>
869              <pe-distinguisher-label-attribute>
870                  <pe-address>10.10.20.2</pe-address>
871                  <mpls-label>20028</mpls-label>
872              </pe-distinguisher-label-attribute>
873          </pe-distinguisher-labels-attribute>
874
875    .. tab:: JSON
876
877       .. code-block:: json
878
879          {
880              "pe-distinguisher-labels-attribute" : {
881                  "pe-distinguisher-label-attribute": [
882                      {
883                          "pe-address": "10.10.10.1",
884                          "mpls-label": "20024"
885                      },
886                      {
887                          "pe-address": "10.10.20.2",
888                          "mpls-label": "20028"
889                      }
890                  ]
891              }
892          }
893
894 **Extended Communities:**
895
896 * **Source AS Extended Community**
897
898 .. tabs::
899
900    .. tab:: XML
901
902       .. code-block:: xml
903
904          <extended-communities>
905              <transitive>true</transitive>
906              <source-as-extended-community>
907                  <global-administrator>65</global-administrator>
908              </source-as-extended-community>
909          </extended-communities>
910
911    .. tab:: JSON
912
913       .. code-block:: json
914
915          {
916              "extended-communities" : {
917                  "transitive": true,
918                  "source-as-extended-community": {
919                      "global-administrator": 65
920                  }
921              }
922          }
923
924 * **Source AS 4 Octets Extended Community**
925
926 .. tabs::
927
928    .. tab:: XML
929
930       .. code-block:: xml
931
932          <extended-communities>
933              <transitive>true</transitive>
934              <source-as-4-extended-community>
935                  <global-administrator>65555</global-administrator>
936              </source-as-4-extended-community>
937          </extended-communities>
938
939    .. tab:: JSON
940
941       .. code-block:: json
942
943          {
944              "extended-communities" : {
945                  "transitive": true,
946                  "source-as-4-extended-community": {
947                      "global-administrator": 65555
948                  }
949              }
950          }
951
952 * **ES-Import Route Target**
953
954 .. tabs::
955
956    .. tab:: XML
957
958       .. code-block:: xml
959
960          <extended-communities>
961              <transitive>true</transitive>
962              <vrf-route-import-extended-community>
963                  <inet4-specific-extended-community-common>
964                      <global-administrator>10.0.0.1</global-administrator>
965                      <local-administrator>123=</local-administrator>
966                  </inet4-specific-extended-community-common>
967              </vrf-route-import-extended-community>
968          </extended-communities>
969
970    .. tab:: JSON
971
972       .. code-block:: json
973
974          {
975              "extended-communities" : {
976                  "transitive": true,
977                      "vrf-route-import-extended-community": {
978                      "inet4-specific-extended-community-common": {
979                          "global-administrator": "10.0.0.1",
980                          "local-administrator": "123="
981                      }
982                  }
983              }
984          }
985
986 -----
987
988 To remove the route added above, following request can be used:
989
990 **URL:** ``/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-mvpn:mcast-vpn-subsequent-address-family/bgp-mvpn-ipv4:mvpn-routes/mvpn-route/mvpn/0``
991
992 **Method:** ``DELETE``
993
994 References
995 ^^^^^^^^^^
996 * `Multicast in MPLS/BGP IP VPNs <https://tools.ietf.org/html/rfc6513>`_
997 * `BGP Encodings and Procedures for Multicast in MPLS/BGP IP VPNs <https://tools.ietf.org/html/rfc6514>`_
998 * `IPv4 and IPv6 Infrastructure Addresses in BGP Updates for Multicast VPN <https://tools.ietf.org/html/rfc6515>`_