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