Wire SimpleEvpnNlriRegistry statically
[bgpcep.git] / docs / bgp / bgp-user-guide-operational-state.rst
1 .. _bgp-user-guide-operational-state:
2
3 Operational State
4 =================
5
6 The OpenDaylight BGP implementation provides a set of APIs (described below), that give its operational state refreshed periodically, by default every 5 seconds.
7 The following APIs describe what is available starting with how to change the default refresh rate.
8
9 .. contents:: Contents
10    :depth: 2
11    :local:
12
13 Operational State Configuration
14 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15
16 **URL:** ``/restconf/config/bgp-state-config:bgp-state-config``
17
18 **RFC8040 URL:** ``/rests/data/bgp-state-config:bgp-state-config``
19
20 **Method:** ``PUT``
21
22 .. tabs::
23
24    .. tab:: XML
25
26       **Content-Type:** ``application/xml``
27
28       **Request Body:**
29
30       .. code-block:: xml
31          :linenos:
32          :emphasize-lines: 3
33
34          <bgp-state-config xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
35              <config-name xmlns="urn:opendaylight:params:xml:ns:yang:bgp-state-config">operationalState</config-name>
36              <timer xmlns="urn:opendaylight:params:xml:ns:yang:bgp-state-config">1</timer>
37          </bgp-state-config>
38
39       @line 3: Time in seconds between operational state update.
40
41    .. tab:: JSON
42
43       **Method:** ``PUT``
44
45       **Content-Type:** ``application/json``
46
47       **Request Body:**
48
49       .. code-block:: json
50          :linenos:
51          :emphasize-lines: 4
52
53          {
54              "bgp-state-config": {
55                  "config-name": "operationalState",
56                  "timer": 1
57              }
58          }
59
60       @line 4: Time in seconds between operational state update.
61
62 BGP RIB Operational State
63 ^^^^^^^^^^^^^^^^^^^^^^^^^
64
65 **URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/global/state``
66
67 **Method:** ``GET``
68
69 .. tabs::
70
71    .. tab:: XML
72
73       **Content-Type:** ``application/xml``
74
75       **Response Body:**
76
77       .. code-block:: xml
78          :linenos:
79          :emphasize-lines: 2,3,4,5
80
81          <state xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
82              <as>65000</as>
83              <router-id>192.0.2.2</router-id>
84              <total-paths>0</total-paths>
85              <total-prefixes>0</total-prefixes>
86          </state>
87
88       @line 2: AS number of the remote peer.
89
90       @line 3: The unique protocol instance identifier.
91
92       @line 4: Total number of Paths installed on RIB (Loc-RIB)
93
94       @line 5: Total number of Prefixes installed on RIB (Loc-RIB)
95
96    .. tab:: JSON
97
98       **Content-Type:** ``application/json``
99
100       **Response Body:**
101
102       .. code-block:: json
103          :linenos:
104          :emphasize-lines: 3,4,5,6
105
106          {
107              "bgp-openconfig-extensions:state": {
108                  "as": 65000,
109                  "router-id": "192.0.2.2",
110                  "total-paths": 0,
111                  "total-prefixes": 0
112              }
113          }
114
115       @line 3: AS number of the remote peer.
116
117       @line 4: The unique protocol instance identifier.
118
119       @line 5: Total number of Paths installed on RIB (Loc-RIB)
120
121       @line 6: Total number of Prefixes installed on RIB (Loc-RIB)
122
123 BGP RIB Families Operational State
124 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125
126 **URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/global/afi-safis``
127
128 **Method:** ``GET``
129
130 .. tabs::
131
132    .. tab:: XML
133
134       **Content-Type:** ``application/xml``
135
136       **Response Body:**
137
138       .. code-block:: xml
139          :linenos:
140          :emphasize-lines: 3,5,6
141
142          <afi-safis xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
143              <afi-safi>
144                  <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
145                  <state>
146                      <total-paths>0</total-paths>
147                      <total-prefixes>0</total-prefixes>
148                  </state>
149              </afi-safi>
150              <afi-safi>
151                  <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
152                  <state>
153                      <total-paths>0</total-paths>
154                      <total-prefixes>0</total-prefixes>
155                  </state>
156              </afi-safi>
157              ....
158          </afi-safis>
159
160       @line 3: Family Identifier.
161
162       @line 5: Total number of Paths installed on RIB (Loc-RIB) per specific family.
163
164       @line 6: Total number of Prefixes installed on RIB (Loc-RIB) per specific family.
165
166    .. tab:: JSON
167
168       **Content-Type:** ``application/json``
169
170       **Response Body:**
171
172       .. code-block:: json
173          :linenos:
174          :emphasize-lines: 5,7,8
175
176          {
177              "bgp-openconfig-extensions:afi-safis": {
178                  "afi-safi": [
179                      {
180                          "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST",
181                          "state": {
182                              "total-paths": 0,
183                              "total-prefixes": 0
184                          },
185                          "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST",
186                          "state": {
187                              "total-paths": 0,
188                              "total-prefixes": 0
189                          }
190                      }
191                  ]
192              }
193          }
194
195       @line 5: Family Identifier.
196
197       @line 7: Total number of Paths installed on RIB (Loc-RIB) per specific family.
198
199       @line 8: Total number of Prefixes installed on RIB (Loc-RIB) per specific family.
200
201 BGP Neighbors Operational State
202 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
203
204 **URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors``
205
206 **Method:** ``GET``
207
208 .. tabs::
209
210    .. tab:: XML
211
212       **Content-Type:** ``application/xml``
213
214       **Response Body:**
215
216       .. code-block:: xml
217          :linenos:
218          :emphasize-lines: 3
219
220          <neighbors xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
221              <neighbor>
222                  <neighbor-address>192.0.2.1</neighbor-address>
223                  .....
224              </neighbor>
225              <neighbor>
226                  <neighbor-address>192.0.2.2</neighbor-address>
227                  .....
228              </neighbor>
229          </neighbors>
230
231       @line 3: IP address of the remote BGP peer. Also serves as an unique identifier of a neighbor in a list of neighbors.
232
233    .. tab:: JSON
234
235       **Content-Type:** ``application/json``
236
237       **Response Body:**
238
239       .. code-block:: json
240          :linenos:
241          :emphasize-lines: 5
242
243          {
244              "bgp-openconfig-extensions:neighbors": {
245                  "neighbor": [
246                      {
247                          "neighbor-address": "192.0.2.1"
248                      },
249                      {
250                          "neighbor-address": "192.0.2.2"
251                      }
252                  ]
253              }
254          }
255
256       @line 5: IP address of the remote BGP peer. Also serves as an unique identifier of a neighbor in a list of neighbors.
257
258 BGP Neighbor Operational State
259 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
260
261 .. note:: Supported Capabilities only provided when session has been established.
262
263 **URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/127.0.0.2/state``
264
265 **Method:** ``GET``
266
267 .. tabs::
268
269    .. tab:: XML
270
271       **Content-Type:** ``application/xml``
272
273       **Response Body:**
274
275       .. code-block:: xml
276          :linenos:
277          :emphasize-lines: 2,3,4,7,8,11,12
278
279          <state xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
280              <session-state>ESTABLISHED</session-state>
281              <supported-capabilities xmlns:x="http://openconfig.net/yang/bgp-types">x:ASN32</supported-capabilities>
282              <supported-capabilities xmlns:x="http://openconfig.net/yang/bgp-types">x:MPBGP</supported-capabilities>
283              <messages>
284                  <sent>
285                      <UPDATE>0</UPDATE>
286                      <NOTIFICATION>0</NOTIFICATION>
287                  </sent>
288                  <received>
289                      <UPDATE>4</UPDATE>
290                      <NOTIFICATION>0</NOTIFICATION>
291                  </received>
292              </messages>
293          </state>
294
295       @line 2: Session status
296
297       @line 3-4: BGP capabilities supported ( ASN32 / MPBGP / ROUTE_REFRESH / GRACEFUL_RESTART / ADD_PATHS)
298
299       @line 7: Total count of Update Messages sent
300
301       @line 8: Total count of Notification Messages sent
302
303       @line 11: Total count of Update Messages received
304
305       @line 12: Total count of Notification Messages received
306
307    .. tab:: JSON
308
309       **Content-Type:** ``application/json``
310
311       **Response Body:**
312
313       .. code-block:: json
314          :linenos:
315          :emphasize-lines: 3,4,7,10,11,14,15
316
317          {
318              "bgp:openconfig-extensions:state": {
319                  "session-state": "ESTABLISHED",
320                  "supported-capabilities": [
321                      "openconfig-bgp-types:ASN32",
322                      "openconfig-bgp-types:MPBGP"
323                  ],
324                  "messages": {
325                      "sent": {
326                          "UPDATE": 0,
327                          "NOTIFICATION": 0
328                      },
329                      "received": {
330                          "UPDATE": 4,
331                          "NOTIFICATION": 0
332                      }
333                  }
334              }
335          }
336
337       @line 3: Session status
338
339       @line 4-7: BGP capabilities supported ( ASN32 / MPBGP / ROUTE_REFRESH / GRACEFUL_RESTART / ADD_PATHS)
340
341       @line 10: Total count of Update Messages sent
342
343       @line 11: Total count of Notification Messages sent
344
345       @line 14: Total count of Update Messages received
346
347       @line 15: Total count of Notification Messages received
348
349 BGP Neighbor Families Operational State
350 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
351
352 **URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/192.0.2.1/afi-safis``
353
354 **Method:** ``GET``
355
356 .. tabs::
357
358    .. tab:: XML
359
360       **Content-Type:** ``application/xml``
361
362       **Response Body:**
363
364       .. code-block:: xml
365          :linenos:
366          :emphasize-lines: 3,5,7,9,10,11,12,13
367
368          <afi-safis xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
369               <afi-safi>
370                   <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
371                   <state>
372                       <active>false</active>
373                   </state>
374                   <graceful-restart>
375                      <state>
376                          <received>true</received>
377                          <ll-received>true</ll-received>
378                          <ll-advertised>true</ll-advertised>
379                          <ll-stale-timer>180</ll-stale-timer>
380                          <advertised>true</advertised>
381                      </state>
382                  </graceful-restart>
383               </afi-safi>
384               <afi-safi>
385                   <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-UNICAST</afi-safi-name>
386                   <state>
387                       <active>false</active>
388                   </state>
389                   <graceful-restart>
390                      <state>
391                          <received>true</received>
392                          <ll-received>true</ll-received>
393                          <ll-advertised>true</ll-advertised>
394                          <ll-stale-timer>100</ll-stale-timer>
395                          <advertised>true</advertised>
396                      </state>
397                  </graceful-restart>
398               </afi-safi>
399          </afi-safis>
400
401       @line 3: Family Identifier.
402
403       @line 5: True if family is advertized by peer.
404
405       @line 7: Graceful Restart Operational State per specific family.
406
407       @line 9: True if the peer supports graceful restart.
408
409       @line 10: True if peer supports Long-Lived graceful restart.
410
411       @line 11: True if we supports Long-Lived graceful restart.
412
413       @line 12: Value of Long-Lived stale timer in seconds for specific family
414
415       @line 13: True if we support graceful restart.
416
417    .. tab:: JSON
418
419       **Content-Type:** ``application/json``
420
421       **Response Body:**
422
423       .. code-block:: json
424          :linenos:
425          :emphasize-lines: 5,7,9,11,12,13,14,15
426
427          {
428              "bgp-openconfig-extensions:afi-safis": {
429                  "afi-safi": [
430                      {
431                          "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST",
432                          "state": {
433                              "active": false
434                          },
435                          "graceful-restart": {
436                              "state": {
437                                  "received": true,
438                                  "ll-received": true,
439                                  "ll-advertised": true,
440                                  "ll-stale-timer": 180,
441                                  "advertised": true
442                              }
443                          }
444                      },
445                      {
446                          "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST",
447                          "state": {
448                              "active": false
449                          },
450                          "graceful-restart": {
451                              "state": {
452                                  "received": true,
453                                  "ll-received": true,
454                                  "ll-advertised": true,
455                                  "ll-stale-timer": 100,
456                                  "advertised": true
457                              }
458                          }
459                      }
460                  ]
461              }
462          }
463
464       @line 5: Family Identifier.
465
466       @line 7: True if family is advertized by peer.
467
468       @line 9: Graceful Restart Operational State per specific family.
469
470       @line 11: True if the peer supports graceful restart.
471
472       @line 12: True if peer supports Long-Lived graceful restart.
473
474       @line 13: True if we supports Long-Lived graceful restart.
475
476       @line 14: Value of Long-Lived stale timer in seconds for specific family
477
478       @line 15: True if we support graceful restart.
479
480 BGP Neighbor Family Operational State
481 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
482
483 .. note:: Prefixes state is only provided once session is established.
484
485 **URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/192.0.2.1/afi-safis/afi-safi/openconfig-bgp-types:IPV4%2DUNICAST``
486
487 **Method:** ``GET``
488
489 .. tabs::
490
491    .. tab:: XML
492
493       **Content-Type:** ``application/xml``
494
495       **Response Body:**
496
497       .. code-block:: xml
498          :linenos:
499          :emphasize-lines: 2,4,6,7,8
500
501          <afi-safi xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
502              <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
503              <state>
504                  <active>true</active>
505                  <prefixes>
506                      <installed>3</installed>
507                      <sent>0</sent>
508                      <received>3</received>
509                  </prefixes>
510              </state>
511              <graceful-restart>
512                  <state>
513                      <received>true</received>
514                      <ll-received>true</ll-received>
515                      <ll-advertised>true</ll-advertised>
516                      <ll-stale-timer>180</ll-stale-timer>
517                      <advertised>true</advertised>
518                  </state>
519              </graceful-restart>
520          </afi-safi>
521
522       @line 2: Family Identifier.
523
524       @line 4: True if family is advertized to and by peer.
525
526       @line 6: Total count of prefixes advertized by peer and installed (effective-rib-in).
527
528       @line 7: Total count of prefixes advertized to peer (adj-rib-out).
529
530       @line 8: Total count of prefixes advertized by peer (adj-rib-in).
531
532    .. tab:: JSON
533
534       **Content-Type:** ``application/json``
535
536       **Response Body:**
537
538       .. code-block:: json
539          :linenos:
540          :emphasize-lines: 3,5,8,9,10
541
542          {
543              "bgp-openconfig-extensions:afi-safi": [
544                  {
545                      "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST",
546                      "state": {
547                          "active": true,
548                          "prefixes": {
549                              "installed": 3, 
550                              "sent": 0 ,
551                              "received": 3
552                          }
553                      },
554                      "graceful-restart": {
555                          "state": {
556                              "received": true,
557                              "ll-received": true,
558                              "ll-advertised": true,
559                              "ll-stale-timer": 180,
560                              "advertised": true
561                          }
562                      }
563                  }
564              ]
565          }
566
567       @line 3: Family Identifier.
568
569       @line 5: True if family is advertized to and by peer.
570
571       @line 8: Total count of prefixes advertized by peer and installed (effective-rib-in).
572
573       @line 9: Total count of prefixes advertized to peer (adj-rib-out).
574
575       @line 10: Total count of prefixes advertized by peer (adj-rib-in).
576
577 BGP Neighbor Timers Operational State
578 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
579
580 .. note:: State is only provided once session is established.
581
582 **URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/192.0.2.1/timers``
583
584 **Method:** ``GET``
585
586 .. tabs::
587
588    .. tab:: XML
589
590       **Content-Type:** ``application/xml``
591
592       **Response Body:**
593
594       .. code-block:: xml
595          :linenos:
596          :emphasize-lines: 3,4
597
598          <timers xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
599              <state>
600                  <negotiated-hold-time>180</negotiated-hold-time>
601                  <uptime>1580676</uptime>
602              </state>
603          </timers>
604
605       @line 3: The negotiated hold-time for the BGP session in seconds.
606
607       @line 4: Session duration since establishment in timeticks (hundredths of a second).
608
609    .. tab:: JSON
610
611       **Content-Type:** ``application/json``
612
613       **Response Body:**
614
615       .. code-block:: json
616          :linenos:
617          :emphasize-lines: 4,5
618
619          {
620              "bgp:openconfig-extensions:timers": {
621                  "state": {
622                      "negotiated-hold-time": 180,
623                      "uptime": 1580676
624                  }
625              }
626          }
627
628       @line 4: The negotiated hold-time for the BGP session in seconds.
629
630       @line 5: Session duration since establishment in timeticks (hundredths of a second).
631
632 BGP Neighbor Transport Operational State
633 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
634
635 .. note:: State is only provided once session is established.
636
637 **URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/192.0.2.1/transport``
638
639 **Method:** ``GET``
640
641 .. tabs::
642
643    .. tab:: XML
644
645       **Content-Type:** ``application/xml``
646
647       **Response Body:**
648
649       .. code-block:: xml
650          :linenos:
651          :emphasize-lines: 3,4,5
652
653          <transport xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
654              <state>
655                  <remote-address>127.0.0.2</remote-address>
656                  <remote-port>44718</remote-port>
657                  <local-port>1790</local-port>
658              </state>
659          </transport>
660
661       @line 3: IP address of the remote BGP peer.
662
663       @line 4: Port of the remote BGP peer.
664
665       @line 5: Local port.
666
667    .. tab:: JSON
668
669       **Content-Type:** ``application/json``
670
671       **Response Body:**
672
673       .. code-block:: json
674          :linenos:
675          :emphasize-lines: 4,5,6
676
677          {
678              "bgp:openconfig-extensions:transport": {
679                  "state": {
680                      "remote-address": "127.0.0.2",
681                      "remote-port": 44718,
682                      "local-port": 1790
683                  }
684              }
685          }
686
687       @line 4: IP address of the remote BGP peer.
688
689       @line 5: Port of the remote BGP peer.
690
691       @line 6: Local port.
692
693 BGP Neighbor Error Handling Operational State
694 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
695
696 .. note:: State is only provided once session is established.
697 .. note:: Error handling not supported yet. Planned for Carbon.
698
699 **URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/192.0.2.1/error-handling``
700
701 **Method:** ``GET``
702
703 .. tabs::
704
705    .. tab:: XML
706
707       **Content-Type:** ``application/xml``
708
709       **Response Body:**
710
711       .. code-block:: xml
712          :linenos:
713          :emphasize-lines: 3
714
715          <error-handling xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
716              <state>
717                  <erroneous-update-messages>0</erroneous-update-messages>
718              </state>
719          </error-handling>
720
721       @line 3: The number of BGP UPDATE messages for which the treat-as-withdraw mechanism has been applied based on
722       erroneous message contents
723
724    .. tab:: JSON
725
726       **Content-Type:** ``application/json``
727
728       **Response Body:**
729
730       .. code-block:: json
731          :linenos:
732          :emphasize-lines: 4
733
734          {
735              "bgp-openconfig-extensions:error-handling": {
736                  "state": {
737                      "erroneous-update-messages": 0
738                  }
739              }
740          }
741
742       @line 4: The number of BGP UPDATE messages for which the treat-as-withdraw mechanism has been applied based on
743       erroneous message contents
744
745 BGP Neighbor Graceful Restart Operational State
746 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
747
748 .. note:: Graceful Restart not supported yet. Planned for Carbon.
749
750 **URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors/neighbor/192.0.2.1/graceful-restart``
751
752 **Method:** ``GET``
753
754 .. tabs::
755
756    .. tab:: XML
757
758       **Content-Type:** ``application/xml``
759
760       **Response Body:**
761
762       .. code-block:: xml
763          :linenos:
764          :emphasize-lines: 3,4,5,6
765
766          <graceful-restart xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
767              <state>
768                  <peer-restarting>false</peer-restarting>
769                  <local-restarting>false</local-restarting>
770                  <peer-restart-time>5</peer-restart-time>
771                  <mode>BILATERAL</mode>
772              </state>
773          </graceful-restart>
774
775       @line 3: This flag indicates whether the remote neighbor is currently in the process of restarting, and hence
776       received routes are currently stale.
777
778       @line 4: This flag indicates whether the local neighbor is currently restarting. The flag is unset after all NLRI
779       have been advertised to the peer, and the End-of-RIB (EOR) marker has been unset.
780
781       @line 5: The period of time (advertised by the peer) in seconds that the peer expects a restart of a BGP session to take.
782
783       @line 6: Mode of Graceful Restart operation, depending on family support advertising to peer and receiving from peer can be HELPER-ONLY (only remote peers support some families), REMOTE-HELPER (only we advertise support), BILATERAL (two-side support).
784
785    .. tab:: JSON
786
787       **Content-Type:** ``application/json``
788
789       **Response Body:**
790
791       .. code-block:: json
792          :linenos:
793          :emphasize-lines: 4,5,6,7
794
795          {
796              "bgp-openconfig-extensions:graceful-restart": {
797                  "state": {
798                      "peer-restarting": false,
799                      "local-restarting": false,
800                      "peer-restart-time": 0,
801                      "mode": "HELPER-ONLY"
802                  }
803              }
804          }
805
806       @line 4: This flag indicates whether the remote neighbor is currently in the process of restarting, and hence
807       received routes are currently stale.
808
809       @line 5: This flag indicates whether the local neighbor is currently restarting. The flag is unset after all NLRI
810       have been advertised to the peer, and the End-of-RIB (EOR) marker has been unset.
811
812       @line 6: The period of time (advertised by the peer) in seconds that the peer expects a restart of a BGP session to take.
813
814       @line 7: Mode of Graceful Restart operation, depending on family support advertising to peer and receiving from peer can be HELPER-ONLY (only remote peers support some families), REMOTE-HELPER (only we advertise support), BILATERAL (two-side support).
815
816 BGP Peer Groups Operational State
817 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
818
819 **URL:** ``/restconf/operational/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/peer-groups``
820
821 **Method:** ``GET``
822
823 .. tabs::
824
825    .. tab:: XML
826
827       **Content-Type:** ``application/xml``
828
829       **Response Body:**
830
831       .. code-block:: xml
832          :linenos:
833          :emphasize-lines: 3,5,6
834
835          <peer-groups>
836              <peer-group>
837                  <peer-group-name>application-peers</peer-group-name>
838                  <state>
839                      <total-paths>0</total-paths>
840                      <total-prefixes>0</total-prefixes>
841                  </state>
842              </peer-group>
843          </peer-groups>
844
845       @line 3: Peer Group Identifier.
846
847       @line 5: At this moment the cost for count path under effect-rib-in is to high. Therefore the value is the same as total prefixes.
848
849       @line 6: Total Prefixes installed under by peers pertaining to this peer group (effective-rib-in).
850       This count doesn't differentiate repeated prefixes.
851
852    .. tab:: JSON
853
854       **Content-Type:** ``application/json``
855
856       **Response Body:**
857
858       .. code-block:: json
859          :linenos:
860          :emphasize-lines: 4,6,7
861
862          {
863              "peer-groups": {
864                  "peer-group": {
865                      "peer-group-name": "application-peers",
866                      "state": {
867                          "total-paths": 0,
868                          "total-prefixes": 0
869                      }
870                  }
871              }
872          }
873
874       @line 4: Peer Group Identifier.
875
876       @line 6: At this moment the cost for count path under effect-rib-in is to high. Therefore the value is the same as total prefixes.
877
878       @line 7: Total Prefixes installed under by peers pertaining to this peer group (effective-rib-in).
879       This count doesn't differentiate repeated prefixes.
880
881 CLI
882 ---
883
884 BGP Karaf Console (odl-bgpcep-bgp-cli) provides a CLI feature to read operational state per RIB, Neighbor and Peer Group.
885
886 .. code-block:: bash
887    :linenos:
888
889    opendaylight-user@root> bgp:operational-state -rib example-bgp-rib
890
891 .. code-block:: bash
892    :linenos:
893
894    opendaylight-user@root> bgp:operational-state -rib example-bgp-rib -neighbor 192.0.2.1
895
896 .. code-block:: bash
897    :linenos:
898
899    opendaylight-user@root> bgp:operational-state -rib -peer-group application-peers