Update git submodules
[docs.git] / docs / user-guide / pcep-user-guide.rst
1 .. _pcep-user-guide:
2 PCEP User Guide
3 ===============
4 This guide contains information on how to use the OpenDaylight Path Computation Element Configuration Protocol (PCEP) plugin.
5 The user should learn about PCEP basic concepts, supported capabilities, configuration and operations.
6
7 .. contents:: Contents
8    :depth: 1
9    :local:
10
11 Overview
12 --------
13 This section provides a high-level overview of the PCEP, SDN use-cases and OpenDaylight implementation.
14
15 .. contents:: Contents
16    :depth: 2
17    :local:
18
19 Path Computation Element Communication Protocol
20 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21 The Path Computation Element (PCE) Communication Protocol (PCEP) is used for communication between a Path Computation Client (PCC) and a PCE in context of MPLS and GMPLS Traffic Engineering (TE) Label Switched Paths (LSPs).
22 This interaction include path computation requests and computation replies.
23 The PCE operates on a network graph, built from the (Traffic Engineering Database) TED, in order to compute paths based on the path computation request issued by the PCC.
24 The path computation request includes the source and destination of the path and set of constrains to be applied during the computation.
25 The PCE response contains the computed path or the computation failure reason.
26 The PCEP operates on top the TCP, which provides reliable communication.
27
28 .. figure:: ./images/bgpcep/pcep.png
29    :align: center
30    :alt: PCEP
31
32    PCE-based architecture.
33
34 PCEP in SDN
35 ^^^^^^^^^^^
36 The Path Computation Element perfectly fits into the centralized SDN controller architecture.
37 The PCE's knowledge of the availability of network resources (i.e. TED) and active LSPs awareness (LSP-DB) allows to perform automated application-driven network operations:
38
39 * LSP Re-optimization
40 * Resource defragmentation
41 * Link failure restoration
42 * Auto-bandwidth adjustment
43 * Bandwidth scheduling
44 * Shared Risk Link Group (SRLG) diversity maintenance
45
46 OpenDaylight PCEP plugin
47 ^^^^^^^^^^^^^^^^^^^^^^^^
48 The OpenDaylight PCEP plugin provides all basic service units necessary to build-up a PCE-based controller.
49 In addition, it offers LSP management functionality for Active Stateful PCE - the cornerstone for majority of PCE-enabled SDN solutions.
50 It consists of the following components:
51
52 * Protocol library
53 * PCEP session handling
54 * Stateful PCE LSP-DB
55 * Active Stateful PCE LSP Operations
56
57 .. figure:: ./images/bgpcep/pcep-plugin.png
58    :align: center
59    :alt: PCEP plugin
60
61    OpenDaylight PCEP plugin overview.
62
63 .. important:: The PCEP plugin does not provide path computational functionality and does not build TED.
64
65 List of supported capabilities
66 ''''''''''''''''''''''''''''''
67
68 * `RFC5440 <https://tools.ietf.org/html/rfc5440>`_ - Path Computation Element (PCE) Communication Protocol (PCEP)
69 * `RFC5455 <https://tools.ietf.org/html/rfc5455>`_ - Diffserv-Aware Class-Type Object for the Path Computation Element Communication Protocol
70 * `RFC5520 <https://tools.ietf.org/html/rfc5520>`_ - Preserving Topology Confidentiality in Inter-Domain Path Computation Using a Path-Key-Based Mechanism
71 * `RFC5521 <https://tools.ietf.org/html/rfc5521>`_ - Extensions to the Path Computation Element Communication Protocol (PCEP) for Route Exclusions
72 * `RFC5541 <https://tools.ietf.org/html/rfc5541>`_ - Encoding of Objective Functions in the Path Computation Element Communication Protocol (PCEP)
73 * `RFC5557 <https://tools.ietf.org/html/rfc5557>`_ - Path Computation Element Communication Protocol (PCEP) Requirements and Protocol Extensions in Support of Global Concurrent Optimization
74 * `RFC5886 <https://tools.ietf.org/html/rfc5886>`_ - A Set of Monitoring Tools for Path Computation Element (PCE)-Based Architecture
75 * `RFC7470 <https://tools.ietf.org/html/rfc7470>`_ - Conveying Vendor-Specific Constraints in the Path Computation Element Communication Protocol
76 * `RFC7896 <https://tools.ietf.org/html/rfc7896>`_ - Update to the Include Route Object (IRO) Specification in the Path Computation Element Communication Protocol (PCEP)
77 * `draft-ietf-pce-stateful-pce <https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-16>`_ - PCEP Extensions for Stateful PCE
78
79   * `draft-ietf-pce-pce-initiated-lsp <https://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp-07>`_ - PCEP Extensions for PCE-initiated LSP Setup in a Stateful PCE Model
80   * `draft-ietf-pce-segment-routing <https://tools.ietf.org/html/draft-ietf-pce-segment-routing-07>`_ - PCEP Extension for segment routing
81   * `draft-ietf-pce-lsp-setup-type <https://tools.ietf.org/html/draft-ietf-pce-lsp-setup-type-03>`_ - PCEP Extension for path setup type
82   * `draft-ietf-pce-stateful-sync-optimizations <https://tools.ietf.org/html/draft-ietf-pce-stateful-sync-optimizations-05>`_ - Optimizations of Label Switched Path State Synchronization Procedures for a Stateful PCE
83   * `draft-sivabalan-pce-binding-label-sid <https://tools.ietf.org/html/draft-sivabalan-pce-binding-label-sid-01>`_ - Carrying Binding Label/Segment-ID in PCE-based Networks
84
85 * `draft-ietf-pce-pceps <https://tools.ietf.org/html/draft-ietf-pce-pceps-10>`_ - Secure Transport for PCEP
86
87 Running PCEP
88 ------------
89 This section explains how to install PCEP plugin.
90
91 1. Install PCEP feature - ``odl-bgpcep-pcep``.
92    Also, for sake of this sample, it is required to install RESTCONF.
93    In the Karaf console, type command:
94
95    .. code-block:: console
96
97       feature:install odl-restconf odl-bgpcep-pcep
98
99 2. The PCEP plugin contains a default configuration, which is applied after the feature starts up.
100    One instance of PCEP plugin is created (named *pcep-topology*), and its presence can be verified via REST:
101
102    **URL:** ``restconf/operational/network-topology:network-topology/topology/pcep-topology``
103
104    **Method:** ``GET``
105
106    **Response Body:**
107
108    .. code-block:: xml
109
110       <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
111           <topology-id>pcep-topology</topology-id>
112           <topology-types>
113               <topology-pcep xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep"></topology-pcep>
114           </topology-types>
115       </topology>
116
117 Active Stateful PCE
118 -------------------
119 The PCEP extension for Stateful PCE brings a visibility of active LSPs to PCE, in order to optimize path computation, while considering individual LSPs and their interactions.
120 This requires state synchronization mechanism between PCE and PCC.
121 Moreover, Active Stateful PCE is capable to address LSP parameter changes to the PCC.
122
123 .. contents:: Contents
124    :depth: 2
125    :local:
126
127 Configuration
128 ^^^^^^^^^^^^^
129 This capability is enabled by default. No additional configuration is required.
130
131 Speaker Entity identifier
132 '''''''''''''''''''''''''
133 The Speaker Entity Identifier is an optional
134 TLV that may be included in the OPEN Object when a PCEP speaker
135 wishes to determine if state synchronization can be skipped when a
136 PCEP session is restarted.
137
138 **URL:** ``/restconf/config/network-topology:network-topology/topology/pcep-topology/node/43.43.43.43``
139
140 **Method:** ``PUT``
141
142 **Content-Type:** ``application/xml``
143
144 **Request Body:**
145
146 .. code-block:: xml
147    :linenos:
148    :emphasize-lines: 2,4
149
150
151     <node xmlns="urn:TBD:params:xml:ns:yang:network-topology">
152         <node-id>43.43.43.43</node-id>
153         <session-config xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep:config">
154             <speaker-entity-id-value xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep:sync:optimizations:config">AQIDBA==</speaker-entity-id-value>
155         </session-config>
156     </node>
157
158 @line 2: **address** - A PCC IP address.
159
160 @line 4: **Speaker Entity Identifier** - The Speaker Entity identifier assigned to PCEP Node.
161
162 MD5 authentication configuration
163 ''''''''''''''''''''''''''''''''
164 The OpenDaylight PCEP implementation supports TCP MD5 for authentication.
165 The sample configuration below shows how to set authentication password for a particular PCC.
166
167 **URL:** ``/restconf/config/network-topology:network-topology/topology/pcep-topology/node/43.43.43.43``
168
169 **Method:** ``PUT``
170
171 **Content-Type:** ``application/xml``
172
173 **Request Body:**
174
175 .. code-block:: xml
176    :linenos:
177    :emphasize-lines: 2,4
178
179
180     <node xmlns="urn:TBD:params:xml:ns:yang:network-topology">
181         <node-id>43.43.43.43</node-id>
182         <session-config xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep:config">
183             <password>topsecret</password>
184         </session-config>
185     </node>
186
187 @line 2: **address** - A PCC IP address.
188
189 @line 4: **password** - MD5 authentication phrase.
190
191 LSP State Database
192 ^^^^^^^^^^^^^^^^^^
193 The *LSP State Database* (LSP-DB) contains an information about all LSPs and their attributes.
194 The LSP state is synchronized between the PCC and PCE.
195 First, initial LSP state synchronization is performed once the session between PCC and PCE is established in order to learn PCC's LPSs.
196 This step is a prerequisite to following LSPs manipulation operations.
197
198
199 .. figure:: ./images/bgpcep/pcep-sync.png
200    :align: center
201    :alt: LSP State synchronization
202
203    LSP State Synchronization.
204
205 LSP-DB API
206 ''''''''''
207
208 .. code-block:: console
209
210    path-computation-client
211       +--ro reported-lsp* [name]
212          +--ro name        string
213          +--ro path* [lsp-id]
214          |  +--ro lsp-id                      rsvp:lsp-id
215          |  +--ro ero
216          |  |  +--ro processing-rule?   boolean
217          |  |  +--ro ignore?            boolean
218          |  |  +--ro subobject*
219          |  |     +--ro loose         boolean
220          |  |     +--ro (subobject-type)?
221          |  |        +--:(as-number-case)
222          |  |        |  +--ro as-number
223          |  |        |     +--ro as-number    inet:as-number
224          |  |        +--:(ip-prefix-case)
225          |  |        |  +--ro ip-prefix
226          |  |        |     +--ro ip-prefix    inet:ip-prefix
227          |  |        +--:(label-case)
228          |  |        |  +--ro label
229          |  |        |     +--ro uni-directional             boolean
230          |  |        |     +--ro (label-type)?
231          |  |        |        +--:(type1-label-case)
232          |  |        |        |  +--ro type1-label
233          |  |        |        |     +--ro type1-label    uint32
234          |  |        |        +--:(generalized-label-case)
235          |  |        |        |  +--ro generalized-label
236          |  |        |        |     +--ro generalized-label    binary
237          |  |        |        +--:(waveband-switching-label-case)
238          |  |        |           +--ro waveband-switching-label
239          |  |        |              +--ro end-label      uint32
240          |  |        |              +--ro start-label    uint32
241          |  |        |              +--ro waveband-id    uint32
242          |  |        +--:(srlg-case)
243          |  |        |  +--ro srlg
244          |  |        |     +--ro srlg-id    srlg-id
245          |  |        +--:(unnumbered-case)
246          |  |        |  +--ro unnumbered
247          |  |        |     +--ro router-id       uint32
248          |  |        |     +--ro interface-id    uint32
249          |  |        +--:(exrs-case)
250          |  |        |  +--ro exrs
251          |  |        |     +--ro exrs*
252          |  |        |        +--ro mandatory?    boolean
253          |  |        |        +--ro attribute     enumeration
254          |  |        |        +--ro (subobject-type)?
255          |  |        |           +--:(as-number-case)
256          |  |        |           |  +--ro as-number
257          |  |        |           |     +--ro as-number    inet:as-number
258          |  |        |           +--:(ip-prefix-case)
259          |  |        |           |  +--ro ip-prefix
260          |  |        |           |     +--ro ip-prefix    inet:ip-prefix
261          |  |        |           +--:(label-case)
262          |  |        |           |  +--ro label
263          |  |        |           |     +--ro uni-directional             boolean
264          |  |        |           |     +--ro (label-type)?
265          |  |        |           |        +--:(type1-label-case)
266          |  |        |           |        |  +--ro type1-label
267          |  |        |           |        |     +--ro type1-label    uint32
268          |  |        |           |        +--:(generalized-label-case)
269          |  |        |           |        |  +--ro generalized-label
270          |  |        |           |        |     +--ro generalized-label    binary
271          |  |        |           |        +--:(waveband-switching-label-case)
272          |  |        |           |           +--ro waveband-switching-label
273          |  |        |           |              +--ro end-label      uint32
274          |  |        |           |              +--ro start-label    uint32
275          |  |        |           |              +--ro waveband-id    uint32
276          |  |        |           +--:(srlg-case)
277          |  |        |           |  +--ro srlg
278          |  |        |           |     +--ro srlg-id    srlg-id
279          |  |        |           +--:(unnumbered-case)
280          |  |        |              +--ro unnumbered
281          |  |        |                 +--ro router-id       uint32
282          |  |        |                 +--ro interface-id    uint32
283          |  |        +--:(path-key-case)
284          |  |           +--ro path-key
285          |  |              +--ro pce-id      pce-id
286          |  |              +--ro path-key    path-key
287          |  +--ro lspa
288          |  |  +--ro processing-rule?            boolean
289          |  |  +--ro ignore?                     boolean
290          |  |  +--ro hold-priority?              uint8
291          |  |  +--ro setup-priority?             uint8
292          |  |  +--ro local-protection-desired?   boolean
293          |  |  +--ro label-recording-desired?    boolean
294          |  |  +--ro se-style-desired?           boolean
295          |  |  +--ro session-name?               string
296          |  |  +--ro include-any?                attribute-filter
297          |  |  +--ro exclude-any?                attribute-filter
298          |  |  +--ro include-all?                attribute-filter
299          |  |  +--ro tlvs
300          |  |     +--ro vendor-information-tlv*
301          |  |        +--ro enterprise-number?   iana:enterprise-number
302          |  |        +--ro (enterprise-specific-information)?
303          |  +--ro bandwidth
304          |  |  +--ro processing-rule?   boolean
305          |  |  +--ro ignore?            boolean
306          |  |  +--ro bandwidth?         netc:bandwidth
307          |  +--ro reoptimization-bandwidth
308          |  |  +--ro processing-rule?   boolean
309          |  |  +--ro ignore?            boolean
310          |  |  +--ro bandwidth?         netc:bandwidth
311          |  +--ro metrics*
312          |  |  +--ro metric
313          |  |     +--ro processing-rule?   boolean
314          |  |     +--ro ignore?            boolean
315          |  |     +--ro metric-type        uint8
316          |  |     +--ro bound?             boolean
317          |  |     +--ro computed?          boolean
318          |  |     +--ro value?             ieee754:float32
319          |  +--ro iro
320          |  |  +--ro processing-rule?   boolean
321          |  |  +--ro ignore?            boolean
322          |  |  +--ro subobject*
323          |  |     +--ro loose         boolean
324          |  |     +--ro (subobject-type)?
325          |  |        +--:(as-number-case)
326          |  |        |  +--ro as-number
327          |  |        |     +--ro as-number    inet:as-number
328          |  |        +--:(ip-prefix-case)
329          |  |        |  +--ro ip-prefix
330          |  |        |     +--ro ip-prefix    inet:ip-prefix
331          |  |        +--:(label-case)
332          |  |        |  +--ro label
333          |  |        |     +--ro uni-directional             boolean
334          |  |        |     +--ro (label-type)?
335          |  |        |        +--:(type1-label-case)
336          |  |        |        |  +--ro type1-label
337          |  |        |        |     +--ro type1-label    uint32
338          |  |        |        +--:(generalized-label-case)
339          |  |        |        |  +--ro generalized-label
340          |  |        |        |     +--ro generalized-label    binary
341          |  |        |        +--:(waveband-switching-label-case)
342          |  |        |           +--ro waveband-switching-label
343          |  |        |              +--ro end-label      uint32
344          |  |        |              +--ro start-label    uint32
345          |  |        |              +--ro waveband-id    uint32
346          |  |        +--:(srlg-case)
347          |  |        |  +--ro srlg
348          |  |        |     +--ro srlg-id    srlg-id
349          |  |        +--:(unnumbered-case)
350          |  |        |  +--ro unnumbered
351          |  |        |     +--ro router-id       uint32
352          |  |        |     +--ro interface-id    uint32
353          |  |        +--:(exrs-case)
354          |  |        |  +--ro exrs
355          |  |        |     +--ro exrs*
356          |  |        |        +--ro mandatory?    boolean
357          |  |        |        +--ro attribute     enumeration
358          |  |        |        +--ro (subobject-type)?
359          |  |        |           +--:(as-number-case)
360          |  |        |           |  +--ro as-number
361          |  |        |           |     +--ro as-number    inet:as-number
362          |  |        |           +--:(ip-prefix-case)
363          |  |        |           |  +--ro ip-prefix
364          |  |        |           |     +--ro ip-prefix    inet:ip-prefix
365          |  |        |           +--:(label-case)
366          |  |        |           |  +--ro label
367          |  |        |           |     +--ro uni-directional             boolean
368          |  |        |           |     +--ro (label-type)?
369          |  |        |           |        +--:(type1-label-case)
370          |  |        |           |        |  +--ro type1-label
371          |  |        |           |        |     +--ro type1-label    uint32
372          |  |        |           |        +--:(generalized-label-case)
373          |  |        |           |        |  +--ro generalized-label
374          |  |        |           |        |     +--ro generalized-label    binary
375          |  |        |           |        +--:(waveband-switching-label-case)
376          |  |        |           |           +--ro waveband-switching-label
377          |  |        |           |              +--ro end-label      uint32
378          |  |        |           |              +--ro start-label    uint32
379          |  |        |           |              +--ro waveband-id    uint32
380          |  |        |           +--:(srlg-case)
381          |  |        |           |  +--ro srlg
382          |  |        |           |     +--ro srlg-id    srlg-id
383          |  |        |           +--:(unnumbered-case)
384          |  |        |              +--ro unnumbered
385          |  |        |                 +--ro router-id       uint32
386          |  |        |                 +--ro interface-id    uint32
387          |  |        +--:(path-key-case)
388          |  |           +--ro path-key
389          |  |              +--ro pce-id      pce-id
390          |  |              +--ro path-key    path-key
391          |  +--ro rro
392          |  |  +--ro processing-rule?   boolean
393          |  |  +--ro ignore?            boolean
394          |  |  +--ro subobject*
395          |  |     +--ro protection-available?   boolean
396          |  |     +--ro protection-in-use?      boolean
397          |  |     +--ro (subobject-type)?
398          |  |        +--:(ip-prefix-case)
399          |  |        |  +--ro ip-prefix
400          |  |        |     +--ro ip-prefix    inet:ip-prefix
401          |  |        +--:(label-case)
402          |  |        |  +--ro label
403          |  |        |     +--ro uni-directional             boolean
404          |  |        |     +--ro (label-type)?
405          |  |        |     |  +--:(type1-label-case)
406          |  |        |     |  |  +--ro type1-label
407          |  |        |     |  |     +--ro type1-label    uint32
408          |  |        |     |  +--:(generalized-label-case)
409          |  |        |     |  |  +--ro generalized-label
410          |  |        |     |  |     +--ro generalized-label    binary
411          |  |        |     |  +--:(waveband-switching-label-case)
412          |  |        |     |     +--ro waveband-switching-label
413          |  |        |     |        +--ro end-label      uint32
414          |  |        |     |        +--ro start-label    uint32
415          |  |        |     |        +--ro waveband-id    uint32
416          |  |        |     +--ro global?                     boolean
417          |  |        +--:(unnumbered-case)
418          |  |        |  +--ro unnumbered
419          |  |        |     +--ro router-id       uint32
420          |  |        |     +--ro interface-id    uint32
421          |  |        +--:(path-key-case)
422          |  |           +--ro path-key
423          |  |              +--ro pce-id      pce-id
424          |  |              +--ro path-key    path-key
425          |  +--ro xro
426          |  |  +--ro processing-rule?   boolean
427          |  |  +--ro ignore?            boolean
428          |  |  +--ro flags              bits
429          |  |  +--ro subobject*
430          |  |     +--ro mandatory?    boolean
431          |  |     +--ro attribute     enumeration
432          |  |     +--ro (subobject-type)?
433          |  |        +--:(as-number-case)
434          |  |        |  +--ro as-number
435          |  |        |     +--ro as-number    inet:as-number
436          |  |        +--:(ip-prefix-case)
437          |  |        |  +--ro ip-prefix
438          |  |        |     +--ro ip-prefix    inet:ip-prefix
439          |  |        +--:(label-case)
440          |  |        |  +--ro label
441          |  |        |     +--ro uni-directional             boolean
442          |  |        |     +--ro (label-type)?
443          |  |        |        +--:(type1-label-case)
444          |  |        |        |  +--ro type1-label
445          |  |        |        |     +--ro type1-label    uint32
446          |  |        |        +--:(generalized-label-case)
447          |  |        |        |  +--ro generalized-label
448          |  |        |        |     +--ro generalized-label    binary
449          |  |        |        +--:(waveband-switching-label-case)
450          |  |        |           +--ro waveband-switching-label
451          |  |        |              +--ro end-label      uint32
452          |  |        |              +--ro start-label    uint32
453          |  |        |              +--ro waveband-id    uint32
454          |  |        +--:(srlg-case)
455          |  |        |  +--ro srlg
456          |  |        |     +--ro srlg-id    srlg-id
457          |  |        +--:(unnumbered-case)
458          |  |           +--ro unnumbered
459          |  |              +--ro router-id       uint32
460          |  |              +--ro interface-id    uint32
461          |  +--ro of
462          |  |  +--ro processing-rule?   boolean
463          |  |  +--ro ignore?            boolean
464          |  |  +--ro code               of-id
465          |  |  +--ro tlvs
466          |  |     +--ro vendor-information-tlv*
467          |  |        +--ro enterprise-number?   iana:enterprise-number
468          |  |        +--ro (enterprise-specific-information)?
469          |  +--ro class-type
470          |     +--ro processing-rule?   boolean
471          |     +--ro ignore?            boolean
472          |     +--ro class-type         class-type
473          +--ro metadata
474          +--ro lsp
475          |  +--ro processing-rule?   boolean
476          |  +--ro ignore?            boolean
477          |  +--ro tlvs
478          |  |  +--ro lsp-error-code
479          |  |  |  +--ro error-code?   uint32
480          |  |  +--ro lsp-identifiers
481          |  |  |  +--ro lsp-id?      rsvp:lsp-id
482          |  |  |  +--ro tunnel-id?   rsvp:tunnel-id
483          |  |  |  +--ro (address-family)?
484          |  |  |     +--:(ipv4-case)
485          |  |  |     |  +--ro ipv4
486          |  |  |     |     +--ro ipv4-tunnel-sender-address      inet:ipv4-address
487          |  |  |     |     +--ro ipv4-extended-tunnel-id         rsvp:ipv4-extended-tunnel-id
488          |  |  |     |     +--ro ipv4-tunnel-endpoint-address    inet:ipv4-address
489          |  |  |     +--:(ipv6-case)
490          |  |  |        +--ro ipv6
491          |  |  |           +--ro ipv6-tunnel-sender-address      inet:ipv6-address
492          |  |  |           +--ro ipv6-extended-tunnel-id         rsvp:ipv6-extended-tunnel-id
493          |  |  |           +--ro ipv6-tunnel-endpoint-address    inet:ipv6-address
494          |  |  +--ro rsvp-error-spec
495          |  |  |  +--ro (error-type)?
496          |  |  |     +--:(rsvp-case)
497          |  |  |     |  +--ro rsvp-error
498          |  |  |     +--:(user-case)
499          |  |  |        +--ro user-error
500          |  |  +--ro symbolic-path-name
501          |  |  |  +--ro path-name?   symbolic-path-name
502          |  |  o--ro vs-tlv
503          |  |  |  +--ro enterprise-number?   iana:enterprise-number
504          |  |  |  +--ro (vendor-payload)?
505          |  |  +--ro vendor-information-tlv*
506          |  |  |  +--ro enterprise-number?   iana:enterprise-number
507          |  |  |  +--ro (enterprise-specific-information)?
508          |  |  +--ro path-binding
509          |  |     x--ro binding-type?      uint8
510          |  |     x--ro binding-value?     binary
511          |  |     +--ro (binding-type-value)?
512          |  |        +--:(mpls-label)
513          |  |        |  +--ro mpls-label?        netc:mpls-label
514          |  |        +--:(mpls-label-entry)
515          |  |           +--ro label?             netc:mpls-label
516          |  |           +--ro traffic-class?     uint8
517          |  |           +--ro bottom-of-stack?   boolean
518          |  |           +--ro time-to-live?      uint8
519          |  +--ro plsp-id?           plsp-id
520          |  +--ro delegate?          boolean
521          |  +--ro sync?              boolean
522          |  +--ro remove?            boolean
523          |  +--ro administrative?    boolean
524          |  +--ro operational?       operational-status
525          +--ro path-setup-type
526             +--ro pst?   uint8
527
528 -----
529
530 The LSP-DB is accessible via RESTCONF.
531 The PCC's LSPs are stored in the ``pcep-topology`` while the session is active.
532 In a next example, there is one PCEP session with PCC identified by its IP address (*43.43.43.43*) and one reported LSP (*foo*).
533
534 **URL:** ``/restconf/operational/network-topology:network-topology/topology/pcep-topology/node/pcc:%2F%2F43.43.43.43``
535
536 **Method:** ``GET``
537
538 **Response Body:**
539
540 .. code-block:: xml
541    :linenos:
542    :emphasize-lines: 2,4,5,8,12,14,15,16,17,18,20,24,25,26,28,29,32,36
543
544    <node>
545       <node-id>pcc://43.43.43.43</node-id>
546       <path-computation-client>
547          <ip-address>43.43.43.43</ip-address>
548          <state-sync>synchronized</state-sync>
549          <stateful-tlv>
550             <stateful>
551                <lsp-update-capability>true</lsp-update-capability>
552             </stateful>
553          </stateful-tlv>
554          <reported-lsp>
555             <name>foo</name>
556             <lsp>
557                <operational>up</operational>
558                <sync>true</sync>
559                <plsp-id>1</plsp-id>
560                <create>false</create>
561                <administrative>true</administrative>
562                <remove>false</remove>
563                <delegate>true</delegate>
564                <tlvs>
565                   <lsp-identifiers>
566                      <ipv4>
567                         <ipv4-tunnel-sender-address>43.43.43.43</ipv4-tunnel-sender-address>
568                         <ipv4-tunnel-endpoint-address>39.39.39.39</ipv4-tunnel-endpoint-address>
569                         <ipv4-extended-tunnel-id>39.39.39.39</ipv4-extended-tunnel-id>
570                      </ipv4>
571                      <tunnel-id>1</tunnel-id>
572                      <lsp-id>1</lsp-id>
573                   </lsp-identifiers>
574                   <symbolic-path-name>
575                      <path-name>Zm9v</path-name>
576                   </symbolic-path-name>
577                </tlvs>
578             </lsp>
579             <ero>
580                <subobject>
581                   <loose>false</loose>
582                   <ip-prefix>
583                      <ip-prefix>201.20.160.40/32</ip-prefix>
584                   </ip-prefix>
585                </subobject>
586                <subobject>
587                   <loose>false</loose>
588                   <ip-prefix>
589                      <ip-prefix>195.20.160.39/32</ip-prefix>
590                   </ip-prefix>
591                </subobject>
592                <subobject>
593                   <loose>false</loose>
594                   <ip-prefix>
595                      <ip-prefix>39.39.39.39/32</ip-prefix>
596                   </ip-prefix>
597                </subobject>
598             </ero>
599          </reported-lsp>
600       </path-computation-client>
601    </node>
602
603 @line 2: **node-id** The PCC identifier.
604
605 @line 4: **ip-address** IP address of the PCC.
606
607 @line 5: **state-sync** Synchronization status of the PCC's LSPs. The *synchronized* indicates the State Synchronization is done.
608
609 @line 8: **lsp-update-capability** - Indicates that PCC allows LSP modifications.
610
611 @line 12: **name** - Textual representation of LPS's name.
612
613 @line 14: **operational** - Represent operational status of the LSP:
614
615    * *down* - not active.
616    * *up* - signaled.
617    * *active* - up and carrying traffic.
618    * *going-down* - LSP is being torn down, resources are being released.
619    * *going-up* - LSP is being signaled.
620
621 @line 15: **sync** - The flag set by PCC during LSPs State Synchronization.
622
623 @line 16: **plsp-id** - A PCEP-specific identifier for the LSP. It is assigned by PCC and it is constant for a lifetime of a PCEP session.
624
625 @line 17: **create** - The *false* indicates that LSP is PCC-initiated.
626
627 @line 18: **administrative** - The flag indicates target operational status of the LSP.
628
629 @line 20: **delegate** - The delegate flag indicates that the PCC is delegating the LSP to the PCE.
630
631 @line 24: **ipv4-tunnel-sender-address** - Contains the sender node's IP address.
632
633 @line 25: **ipv4-tunnel-endpoint-address** - Contains the egress node's IP address.
634
635 @line 26: **ipv4-extended-tunnel-id** - The *Extended Tunnel ID* identifier.
636
637 @line 28: **tunnel-id** - The *Tunnel ID* identifier.
638
639 @line 29: **lsp-id** - The *LSP ID* identifier.
640
641 @line 32: **path-name** - The symbolic name for the LSP.
642
643 @line 36: **ero** - The *Explicit Route Object* is encoding the path of the TE LSP through the network.
644
645 LSP Delegation
646 ''''''''''''''
647 The LSP control delegations is an mechanism, where PCC grants to a PCE the temporary right in order to modify LSP attributes.
648 The PCC can revoke the delegation or the PCE may waive the delegation at any time.
649 The LSP control is delegated to at most one PCE at the same time.
650
651 .. figure:: ./images/bgpcep/pcep-delegation-return.png
652    :align: center
653    :alt: Returning a Delegation
654
655    Returning a Delegation.
656
657 -----
658
659 Following RPC example illustrates a request for the LSP delegation give up:
660
661 **URL:** ``/restconf/operations/network-topology-pcep:update-lsp``
662
663 **Method:** ``POST``
664
665 **Content-Type:** ``application/xml``
666
667 **Request Body:**
668
669 .. code-block:: xml
670    :linenos:
671    :emphasize-lines: 2,3,6,10
672
673    <input>
674       <node>pcc://43.43.43.43</node>
675       <name>foo</name>
676       <arguments>
677          <lsp xmlns:stateful="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
678             <delegate>false</delegate>
679             <administrative>true</administrative>
680             <tlvs>
681                <symbolic-path-name>
682                   <path-name>Zm9v</path-name>
683                </symbolic-path-name>
684             </tlvs>
685          </lsp>
686       </arguments>
687       <network-topology-ref xmlns:topo="urn:TBD:params:xml:ns:yang:network-topology">/topo:network-topology/topo:topology[topo:topology-id="pcep-topology"]</network-topology-ref>
688    </input>
689
690 @line 2: **node** The PCC identifier.
691
692 @line 3: **name** The name of the LSP.
693
694 @line 6: **delegate** - Delegation flag set *false* in order to return the LSP delegation.
695
696 @line 10: **path-name** - The Symbolic Path Name TLV must be present when sending a request to give up the delegation.
697
698 LSP Update
699 ''''''''''
700 The LSP Update Request is an operation where a PCE requests a PCC to update attributes of an LSP and to rebuild the LSP with updated attributes.
701 In order to update LSP, the PCE must hold a LSP delegation.
702 The LSP update is done in *make-before-break* fashion - first, new LSP is initiated and then the old LSP is torn down.
703
704 .. figure:: ./images/bgpcep/pcep-update.png
705    :align: center
706    :alt: Active Stateful PCE LSP Update
707
708    Active Stateful PCE LSP Update.
709
710 -----
711
712 Following RPC example shows a request for the LSP update:
713
714 **URL:** ``/restconf/operations/network-topology-pcep:update-lsp``
715
716 **Method:** ``POST``
717
718 **Content-Type:** ``application/xml``
719
720 **Request Body:**
721
722 .. code-block:: xml
723    :linenos:
724    :emphasize-lines: 2,3,6,7,9
725
726    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
727       <node>pcc://43.43.43.43</node>
728       <name>foo</name>
729       <arguments>
730          <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
731             <delegate>true</delegate>
732             <administrative>true</administrative>
733          </lsp>
734          <ero>
735             <subobject>
736                <loose>false</loose>
737                <ip-prefix>
738                   <ip-prefix>200.20.160.41/32</ip-prefix>
739                </ip-prefix>
740             </subobject>
741             <subobject>
742                <loose>false</loose>
743                <ip-prefix>
744                   <ip-prefix>196.20.160.39/32</ip-prefix>
745                </ip-prefix>
746             </subobject>
747             <subobject>
748                <loose>false</loose>
749                <ip-prefix>
750                   <ip-prefix>39.39.39.39/32</ip-prefix>
751                </ip-prefix>
752             </subobject>
753          </ero>
754       </arguments>
755       <network-topology-ref xmlns:topo="urn:TBD:params:xml:ns:yang:network-topology">/topo:network-topology/topo:topology[topo:topology-id="pcep-topology"]</network-topology-ref>
756    </input>
757
758 @line 2: **node** The PCC identifier.
759
760 @line 3: **name** The name of the LSP to be updated.
761
762 @line 6: **delegate** - Delegation flag set *true* in order to keep the LSP control.
763
764 @line 7: **administrative** - Desired administrative status of the LSP is active.
765
766 @line 9: **ero** - This LSP attribute is changed.
767
768 PCE-initiated LSP Setup
769 ^^^^^^^^^^^^^^^^^^^^^^^
770 The PCEP Extension for PCE-initiated LSP Setup allows PCE to request a creation and deletion of LSPs.
771
772 Configuration
773 '''''''''''''
774 This capability is enabled by default. No additional configuration is required.
775
776 LSP Instantiation
777 '''''''''''''''''
778 The PCE can request LSP creation.
779 The LSP instantiation is done by sending an LSP Initiate Message to PCC.
780 The PCC assign delegation to PCE which triggered creation.
781 PCE-initiated LSPs are identified by *Create* flag.
782
783 .. figure:: ./images/bgpcep/pcep-initiate.png
784    :align: center
785    :alt: LSP instantiation
786
787    LSP instantiation.
788
789 -----
790
791 Following RPC example shows a request for the LSP initiation:
792
793 **URL:** ``/restconf/operations/network-topology-pcep:add-lsp``
794
795 **Method:** ``POST``
796
797 **Content-Type:** ``application/xml``
798
799 **Request Body:**
800
801 .. code-block:: xml
802    :linenos:
803    :emphasize-lines: 2,3,8,14
804
805    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
806       <node>pcc://43.43.43.43</node>
807       <name>update-tunel</name>
808          <arguments>
809             <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
810                <delegate>true</delegate>
811                <administrative>true</administrative>
812             </lsp>
813             <endpoints-obj>
814                <ipv4>
815                   <source-ipv4-address>43.43.43.43</source-ipv4-address>
816                   <destination-ipv4-address>39.39.39.39</destination-ipv4-address>
817                </ipv4>
818             </endpoints-obj>
819             <ero>
820                <subobject>
821                   <loose>false</loose>
822                   <ip-prefix>
823                      <ip-prefix>201.20.160.40/32</ip-prefix>
824                   </ip-prefix>
825                </subobject>
826                <subobject>
827                   <loose>false</loose>
828                   <ip-prefix>
829                      <ip-prefix>195.20.160.39/32</ip-prefix>
830                   </ip-prefix>
831                </subobject>
832                <subobject>
833                   <loose>false</loose>
834                   <ip-prefix>
835                      <ip-prefix>39.39.39.39/32</ip-prefix>
836                   </ip-prefix>
837                </subobject>
838             </ero>
839          </arguments>
840       <network-topology-ref xmlns:topo="urn:TBD:params:xml:ns:yang:network-topology">/topo:network-topology/topo:topology[topo:topology-id="pcep-topology"]</network-topology-ref>
841    </input>
842
843 @line 2: **node** The PCC identifier.
844
845 @line 3: **name** The name of the LSP to be created.
846
847 @line 8: **endpoints-obj** - The *END-POINT* Object is mandatory for an instantiation request of an RSVP-signaled LSP. It contains source and destination addresses for provisioning the LSP.
848
849 @line 14: **ero** - The *ERO* object is mandatory for LSP initiation request.
850
851 LSP Deletion
852 ''''''''''''
853 The PCE may request a deletion of PCE-initiated LSPs.
854 The PCE must be delegation holder for this particular LSP.
855
856 .. figure:: ./images/bgpcep/pcep-deletion.png
857    :align: center
858    :alt: LSP deletion.
859
860    LSP deletion.
861
862 -----
863
864 Following RPC example shows a request for the LSP deletion:
865
866 **URL:** ``/restconf/operations/network-topology-pcep:remove-lsp``
867
868 **Method:** ``POST``
869
870 **Content-Type:** ``application/xml``
871
872 **Request Body:**
873
874 .. code-block:: xml
875    :linenos:
876    :emphasize-lines: 2,3
877
878    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
879       <node>pcc://43.43.43.43</node>
880       <name>update-tunel</name>
881       <network-topology-ref xmlns:topo="urn:TBD:params:xml:ns:yang:network-topology">/topo:network-topology/topo:topology[topo:topology-id="pcep-topology"]</network-topology-ref>
882    </input>
883
884 @line 2: **node** The PCC identifier.
885
886 @line 3: **name** The name of the LSP to be removed.
887
888 PCE-initiated LSP Delegation
889 ''''''''''''''''''''''''''''
890 The PCE-initiated LSP control is delegated to the PCE which requested the initiation.
891 The PCC cannot revoke delegation of PCE-initiated LSP.
892 When PCE returns delegation for such LSP or PCE fails, then the LSP become orphan and can be removed by a PCC after some time.
893 The PCE may ask for a delegation of the orphan LSP.
894
895 .. figure:: ./images/bgpcep/pcep-revoke-delegation.png
896    :align: center
897    :alt: LSP re-delegation
898
899    Orphan PCE-initiated LSP - control taken by PCE.
900
901 -----
902
903 Following RPC example illustrates a request for the LSP delegation:
904
905 **URL:** ``/restconf/operations/network-topology-pcep:update-lsp``
906
907 **Method:** ``POST``
908
909 **Content-Type:** ``application/xml``
910
911 **Request Body:**
912
913 .. code-block:: xml
914    :linenos:
915    :emphasize-lines: 2,3,6,10
916
917    <input>
918       <node>pcc://43.43.43.43</node>
919       <name>update-tunel</name>
920       <arguments>
921          <lsp xmlns:stateful="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
922             <delegate>true</delegate>
923             <administrative>true</administrative>
924             <tlvs>
925                <symbolic-path-name>
926                   <path-name>dXBkYXRlLXR1bmVs</path-name>
927                </symbolic-path-name>
928             </tlvs>
929          </lsp>
930       </arguments>
931       <network-topology-ref xmlns:topo="urn:TBD:params:xml:ns:yang:network-topology">/topo:network-topology/topo:topology[topo:topology-id="pcep-topology"]</network-topology-ref>
932    </input>
933
934 @line 2: **node** The PCC identifier.
935
936 @line 3: **name** The name of the LSP.
937
938 @line 6: **delegate** - *Delegation* flag set *true* in order to take the LSP delegation.
939
940 @line 10: **path-name** - The *Symbolic Path Name* TLV must be present when sending a request to take a delegation.
941
942 Segment Routing
943 ^^^^^^^^^^^^^^^
944 The PCEP Extensions for Segment Routing (SR) allow a stateful PCE to compute and initiate TE paths in SR networks.
945 The SR path is defined as an order list  of *segments*.
946 Segment Routing architecture can be directly applied to the MPLS forwarding plane without changes.
947 Segment Identifier (SID) is encoded as a MPLS label.
948
949 Configuration
950 '''''''''''''
951 This capability is enabled by default. In order to disable it, a configuration should be changed as follows:
952
953 **URL:** ``/restconf/config/pcep-segment-routing-app-config:pcep-segment-routing-app-config``
954
955 **Method:** ``PUT``
956
957 **Content-Type:** ``application/xml``
958
959 **Request Body:**
960
961 .. code-block:: xml
962    :linenos:
963    :emphasize-lines: 2
964
965    <pcep-segment-routing-config xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:segment-routing-app-config">
966       <sr-capable>false</sr-capable>
967    </pcep-segment-routing-config>
968
969 @line 2: **sr-capable** - True if capability is supported.
970
971 IANA code points
972 ''''''''''''''''
973
974 In PCEP-SR draft version 6, SR Explicit Route Object/Record Route Object subobjects IANA code points change was proposed.
975 In order to use the latest code points, a configuration should be changed as follows:
976
977 **URL:** ``/restconf/config/pcep-segment-routing-app-config:pcep-segment-routing-config``
978
979 **Method:** ``PUT``
980
981 **Content-Type:** ``application/xml``
982
983 **Request Body:**
984
985 .. code-block:: xml
986    :linenos:
987    :emphasize-lines: 2
988
989    <pcep-segment-routing-config xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:segment-routing-app-config">
990       <iana-sr-subobjects-type>true</iana-sr-subobjects-type>
991    </pcep-segment-routing-config>
992
993 @line 2: **iana-sr-subobjects-type** - True if IANA code points should be used.
994
995 LSP Operations for PCEP SR
996 ''''''''''''''''''''''''''
997 The PCEP SR extension defines new ERO subobject - *SR-ERO subobject* capable of carrying a SID.
998
999 .. code-block:: console
1000
1001    sr-ero-type
1002       +---- c-flag?                boolean
1003       +---- m-flag?                boolean
1004       +---- sid-type?              sid-type
1005       +---- sid?                   uint32
1006       +---- (nai)?
1007          +--:(ip-node-id)
1008          |  +---- ip-address             inet:ip-address
1009          +--:(ip-adjacency)
1010          |  +---- local-ip-address       inet:ip-address
1011          |  +---- remote-ip-address      inet:ip-address
1012          +--:(unnumbered-adjacency)
1013             +---- local-node-id          uint32
1014             +---- local-interface-id     uint32
1015             +---- remote-node-id         uint32
1016             +---- remote-interface-id    uint32
1017
1018 -----
1019
1020 Following RPC example illustrates a request for the SR-TE LSP creation:
1021
1022 **URL:** ``/restconf/operations/network-topology-pcep:add-lsp``
1023
1024 **Method:** ``POST``
1025
1026 **Content-Type:** ``application/xml``
1027
1028 **Request Body:**
1029
1030 .. code-block:: xml
1031    :linenos:
1032    :emphasize-lines: 16,21,22,23
1033
1034    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
1035       <node>pcc://43.43.43.43</node>
1036       <name>sr-path</name>
1037       <arguments>
1038          <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
1039             <delegate>true</delegate>
1040             <administrative>true</administrative>
1041          </lsp>
1042          <endpoints-obj>
1043             <ipv4>
1044                <source-ipv4-address>43.43.43.43</source-ipv4-address>
1045                <destination-ipv4-address>39.39.39.39</destination-ipv4-address>
1046             </ipv4>
1047          </endpoints-obj>
1048          <path-setup-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
1049             <pst>1</pst>
1050          </path-setup-type>
1051          <ero>
1052             <subobject>
1053                <loose>false</loose>
1054                <sid-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">ipv4-node-id</sid-type>
1055                <m-flag xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">true</m-flag>
1056                <sid xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">24001</sid>
1057                <ip-address xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">39.39.39.39</ip-address>
1058            </subobject>
1059          </ero>
1060       </arguments>
1061       <network-topology-ref xmlns:topo="urn:TBD:params:xml:ns:yang:network-topology">/topo:network-topology/topo:topology[topo:topology-id="pcep-topology"]</network-topology-ref>
1062    </input>
1063
1064 @line 16: **path-setup-type** - Set *1* for SR-TE LSP
1065
1066 @line 21: **ipv4-node-id** - The SR-ERO subobject represents *IPv4 Node ID* NAI.
1067
1068 @line 22: **m-flag** - The SID value represents an MPLS label.
1069
1070 @line 23: **sid** - The Segment Identifier.
1071
1072 -----
1073
1074 Following RPC example illustrates a request for the SR-TE LSP update including modified path:
1075
1076 **URL:** ``/restconf/operations/network-topology-pcep:update-lsp``
1077
1078 **Method:** ``POST``
1079
1080 **Content-Type:** ``application/xml``
1081
1082 **Request Body:**
1083
1084 .. code-block:: xml
1085    :linenos:
1086
1087    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
1088       <node>pcc://43.43.43.43</node>
1089       <name>update-tunnel</name>
1090       <arguments>
1091          <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
1092             <delegate>true</delegate>
1093             <administrative>true</administrative>
1094          </lsp>
1095          <path-setup-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
1096             <pst>1</pst>
1097          </path-setup-type>
1098          <ero>
1099             <subobject>
1100                <loose>false</loose>
1101                <sid-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">ipv4-node-id</sid-type>
1102                <m-flag xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">true</m-flag>
1103                <sid xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">24002</sid>
1104                <ip-address xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">200.20.160.41</ip-address>
1105             </subobject>
1106             <subobject>
1107                <loose>false</loose>
1108                <sid-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">ipv4-node-id</sid-type>
1109                <m-flag xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">true</m-flag>
1110                <sid xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">24001</sid>
1111                <ip-address xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">39.39.39.39</ip-address>
1112             </subobject>
1113          </ero>
1114       </arguments>
1115       <network-topology-ref xmlns:topo="urn:TBD:params:xml:ns:yang:network-topology">/topo:network-topology/topo:topology[topo:topology-id="pcep-topology"]</network-topology-ref>
1116    </input>
1117
1118 LSP State Synchronization Optimization Procedures
1119 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1120 This extension bring optimizations for state synchronization:
1121
1122 * State Synchronization Avoidance
1123 * Incremental State Synchronization
1124 * PCE-triggered Initial Synchronization
1125 * PCE-triggered Re-synchronization
1126
1127 Configuration
1128 '''''''''''''
1129 This capability is enabled by default. No additional configuration is required.
1130
1131 State Synchronization Avoidance
1132 '''''''''''''''''''''''''''''''
1133 The State Synchronization Avoidance procedure is intended to skip state synchronization if the state has survived and not changed during session restart.
1134
1135 .. figure:: ./images/bgpcep/pcep-sync-skipped.png
1136    :align: center
1137    :alt: Sync skipped
1138
1139    State Synchronization Skipped.
1140
1141 Incremental State Synchronization
1142 '''''''''''''''''''''''''''''''''
1143 The Incremental State Synchronization procedure is intended to do incremental (delta) state synchronization when possible.
1144
1145 .. figure:: ./images/bgpcep/pcep-sync-incremental.png
1146    :align: center
1147    :alt: Sync incremental
1148
1149    Incremental Synchronization Procedure.
1150
1151 PCE-triggered Initial Synchronization
1152 '''''''''''''''''''''''''''''''''''''
1153 The PCE-triggered Initial Synchronization procedure is intended to do let PCE control the timing of the initial state synchronization.
1154
1155 .. figure:: ./images/bgpcep/pcep-sync-initial.png
1156    :align: center
1157    :alt: Initial Sync
1158
1159    PCE-triggered Initial State Synchronization Procedure.
1160
1161 -----
1162
1163 Following RPC example illustrates a request for the initial synchronization:
1164
1165 **URL:** ``/restconf/operations/network-topology-pcep:trigger-sync``
1166
1167 **Method:** ``POST``
1168
1169 **Content-Type:** ``application/xml``
1170
1171 **Request Body:**
1172
1173 .. code-block:: xml
1174    :linenos:
1175
1176    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
1177       <node>pcc://43.43.43.43</node>
1178       <network-topology-ref xmlns:topo="urn:TBD:params:xml:ns:yang:network-topology">/topo:network-topology/topo:topology[topo:topology-id="pcep-topology"]</network-topology-ref>
1179    </input>
1180
1181 PCE-triggered Re-synchronization
1182 ''''''''''''''''''''''''''''''''
1183 The PCE-triggered Re-synchronization: To let PCE re-synchronize the state for sanity check.
1184
1185 .. figure:: ./images/bgpcep/pcep-re-sync.png
1186    :align: center
1187    :alt: Re-sync
1188
1189    PCE-triggered Re-synchronization Procedure.
1190
1191 -----
1192
1193 Following RPC example illustrates a request for the LSP re-synchronization:
1194
1195 **URL:** ``/restconf/operations/network-topology-pcep:trigger-sync``
1196
1197 **Method:** ``POST``
1198
1199 **Content-Type:** ``application/xml``
1200
1201 **Request Body:**
1202
1203 .. code-block:: xml
1204    :linenos:
1205    :emphasize-lines: 3
1206
1207    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
1208       <node>pcc://43.43.43.43</node>
1209       <name>update-lsp</name>
1210       <network-topology-ref xmlns:topo="urn:TBD:params:xml:ns:yang:network-topology">/topo:network-topology/topo:topology[topo:topology-id="pcep-topology"]</network-topology-ref>
1211    </input>
1212
1213 @line 3: **name** - The LSP name. If this parameter is omitted, re-synchronization is requested for all PCC's LSPs.
1214
1215 Node session statistics
1216 ----------------------------
1217
1218 The PCEP statistics provides information about PCE <-> PCC session and its stateful listener (topology-provider).
1219
1220 Usage
1221 '''''
1222
1223 **URL:** ``/restconf/operational/network-topology:network-topology/topology/pcep-topology/node/pcc:%2F%2F43.43.43.43/pcep-session-state``
1224
1225 **Method:** ``GET``
1226
1227 **Response Body:**
1228
1229 .. code-block:: xml
1230    :linenos:
1231    :emphasize-lines: 3,4,5,6,7,8,9,10,13,14,15,16,19,20,21,22,25,26,27,28,31,32,33,35,36,37
1232
1233    <pcep-session-state xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep:stats">
1234       <messages>
1235          <last-received-rpt-msg-timestamp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">1512640592</last-received-rpt-msg-timestamp>
1236          <sent-upd-msg-count xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">0</sent-upd-msg-count>
1237          <received-rpt-msg-count xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">2</received-rpt-msg-count>
1238          <sent-init-msg-count xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">0</sent-init-msg-count>
1239          <sent-msg-count>0</sent-msg-count>
1240          <last-sent-msg-timestamp>0</last-sent-msg-timestamp>
1241          <unknown-msg-received>0</unknown-msg-received>
1242          <received-msg-count>2</received-msg-count>
1243          <error-messages>
1244             <last-sent-error></last-sent-error>
1245             <received-error-msg-count>0</received-error-msg-count>
1246             <sent-error-msg-count>0</sent-error-msg-count>
1247             <last-received-error></last-received-error>
1248          </error-messages>
1249          <reply-time>
1250             <average-time>0</average-time>
1251             <min-time>0</min-time>
1252             <max-time>0</max-time>
1253          </reply-time>
1254       </messages>
1255       <peer-pref>
1256          <keepalive>30</keepalive>
1257          <deadtimer>120</deadtimer>
1258          <ip-address>127.0.0.1</ip-address>
1259          <session-id>0</session-id>
1260       </peer-pref>
1261       <local-pref>
1262          <keepalive>30</keepalive>
1263          <deadtimer>120</deadtimer>
1264          <ip-address>127.0.0.1</ip-address>
1265          <session-id>0</session-id>
1266       </local-pref>
1267       <peer-capabilities>
1268          <stateful xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">true</stateful>
1269          <instantiation xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">true</instantiation>
1270          <active xmlns="urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats">true</active>
1271       </peer-capabilities>
1272       <session-duration>0:00:00:18</session-duration>
1273       <delegated-lsps-count>1</delegated-lsps-count>
1274       <synchronized>true</synchronized>
1275    </pcep-session-state>
1276
1277 @line 3: **last-received-rpt-msg-timestamp** - The timestamp of last received PCRpt message.
1278
1279 @line 4: **sent-upd-msg-count** - The number of sent PCUpd messages.
1280
1281 @line 5: **received-rpt-msg-count** - The number of received PcRpt messages.
1282
1283 @line 6: **sent-init-msg-count** - The number of sent PCInitiate messages.
1284
1285 @line 7: **sent-msg-count** - Total number of sent PCEP messages.
1286
1287 @line 8: **last-sent-msg-timestamp** - The timestamp of last sent message.
1288
1289 @line 9: **unknown-msg-received** - The number of received unknown messages.
1290
1291 @line 10: **received-msg-count** - Total number of received PCEP messages.
1292
1293 @line 13: **last-sent-error** - Type/value tuple of last sent error.
1294
1295 @line 14: **received-error-msg-count** - Total number of received PCErr messages.
1296
1297 @line 15: **sent-error-msg-count** - Total number of sent PCErr messages.
1298
1299 @line 16: **last-received-error** - Type/value tuple of last sent error.
1300
1301 @line 19: **keepalive** - Advertised keep-alive value.
1302
1303 @line 20: **deadtimer** - Advertised deadtimer value.
1304
1305 @line 21: **ip-address** - Peer's IP address.
1306
1307 @line 22: **session-id** - Peer's session identifier.
1308
1309 @line 25: **keepalive** - Advertised keep-alive value.
1310
1311 @line 26: **deadtimer** - Advertised deadtimer value.
1312
1313 @line 27: **ip-address** - Peer's IP address.
1314
1315 @line 28: **session-id** - Peer's session identifier.
1316
1317 @line 31: **stateful** - Represents peer's stateful/stateless capability.
1318
1319 @line 32: **instantiation** - Represents peer's instantiation capability.
1320
1321 @line 33: **active** - Represents peer's LSP update capability.
1322
1323 @line 35: **session-duration** - Elapsed time (in d:H:m:s) from session-up until last statistic update.
1324
1325 @line 36: **delegated-lsps-count** - The number of delegated LSPs (tunnels) from PCC.
1326
1327 @line 37: **synchronized** - Represents synchronization status.
1328
1329 CLI
1330 ---
1331
1332 PCEP Karaf Console (odl-bgpcep-pcep-cli) provides a CLI feature to read session statistics per node.
1333
1334 .. code-block:: bash
1335    :linenos:
1336
1337    opendaylight-user@root> pcep:node-state -topology-id pcep-topology -node-id pcc://43.43.43.43
1338
1339 Test tools
1340 ----------
1341 PCC Mock
1342 ^^^^^^^^
1343 The PCC Mock is a stand-alone Java application purposed to simulate a PCC(s).
1344 The simulator is capable to report sample LSPs, respond to delegation, LSP management operations and synchronization optimization procedures.
1345 This application is not part of the OpenDaylight Karaf distribution, however it can be downloaded from OpenDaylight's Nexus (use latest release version):
1346
1347 ``https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/bgpcep/pcep-pcc-mock``
1348
1349 Usage
1350 '''''
1351 The application can be run from command line:
1352
1353 .. code-block:: console
1354
1355    java -jar pcep-pcc-mock-*-executable.jar
1356
1357
1358 with optional input parameters:
1359
1360 .. code-block:: console
1361
1362    --local-address <Address:Port> (optional, default 127.0.0.1)
1363       The first PCC IP address. If more PCCs are required, the IP address will be incremented. Port number can be optionally specified.
1364
1365    --remote-address <Address1:Port1,Address2:Port2,Address3:Port3,...> (optional, default 127.0.0.1:4189)
1366       The list of IP address for the PCE servers. Port number can be optionally specified, otherwise default port number 4189 is used.
1367
1368    --pcc <N> (optional, default 1)
1369       Number of mocked PCC instances.
1370
1371    --lsp <N> (optional, default 1)
1372       Number of tunnels (LSPs) reported per PCC, might be zero.
1373
1374    --pcerr (optional flag)
1375       If the flag is present, response with PCErr, otherwise PCUpd.
1376
1377    --log-level <LEVEL> (optional, default INFO)
1378       Set logging level for pcc-mock.
1379
1380    -d, --deadtimer <0..255> (optional, default 120)
1381       DeadTimer value in seconds.
1382
1383    -ka, --keepalive <0.255> (optional, default 30)
1384       KeepAlive timer value in seconds.
1385
1386    --password <password> (optional)
1387       If the password is present, it is used in TCP MD5 signature, otherwise plain TCP is used.
1388
1389    --reconnect <seconds> (optional)
1390       If the argument is present, the value in seconds, is used as a delay before each new reconnect (initial connect or connection re-establishment) attempt.
1391       The number of reconnect attempts is unlimited. If the argument is omitted, pcc-mock is not trying to reconnect.
1392
1393    --redelegation-timeout <seconds> (optional, default 0)
1394       The timeout starts when LSP delegation is returned or PCE fails, stops when LSP is re-delegated to PCE.
1395       When timeout expires, LSP delegation is revoked and held by PCC.
1396
1397    --state-timeout <seconds> (optional, default -1 (disabled))
1398       The timeout starts when LSP delegation is returned or PCE fails, stops when LSP is re-delegated to PCE.
1399       When timeout expires, PCE-initiated LSP is removed.
1400
1401    --state-sync-avoidance <disconnect_after_x_seconds> <reconnect_after_x_seconds> <dbVersion>
1402       Synchronization avoidance capability enabled.
1403          - disconnect_after_x_seconds: seconds that will pass until disconnections is forced. If set to smaller number than 1, disconnection wont be performed.
1404          - reconnect_after_x_seconds: seconds that will pass between disconnection and new connection attempt. Only happens if disconnection has been performed.
1405          - dbVersion: dbVersion used in new Open and must be always equal or bigger than LSP. If equal than LSP skip synchronization will be performed,
1406            if not full synchronization will be performed taking in account new starting dbVersion desired.
1407     --incremental-sync-procedure <disconnect_after_x_seconds> <reconnect_after_x_seconds> <dbVersion>
1408       Incremental synchronization capability enabled.
1409          - dbVersion: dbVersion used in new Open and must be always bigger than LSP. Incremental synchronization will be performed taking in account new starting dbVersion desired.
1410
1411     --triggered-initial-sync
1412       PCE-triggered synchronization capability enabled. Can be combined combined with state-sync-avoidance/incremental-sync-procedure.
1413
1414     --triggered-re-sync
1415       PCE-triggered re-synchronization capability enabled.
1416
1417 Data Change Counter Tool
1418 ^^^^^^^^^^^^^^^^^^^^^^^^
1419
1420 Data Change Counter tool registers a Data Change Listener to a specified topology's subtree.
1421 This will allow us to know the quantity of changes produced under it, with each data change event counter will be incremented.
1422
1423 Installation
1424 ''''''''''''
1425 Installing data change counter tool
1426
1427 .. code-block:: console
1428
1429    feature:install odl-restconf odl-bgpcep-data-change-counter
1430
1431 Configuration
1432 '''''''''''''
1433 Once we set the configuration, a new data change counter will be created and registers to example-linkstate-topology.
1434
1435 .. important:: **Clustering** - Each Counter Identifier should be unique.
1436
1437 **URL:** ``/restconf/config/odl-data-change-counter-config:data-change-counter-config/data-change-counter``
1438
1439 **Method:** ``PUT``
1440
1441 **Content-Type:** ``application/xml``
1442
1443 **Request Body:**
1444
1445 .. code-block:: xml
1446    :linenos:
1447    :emphasize-lines: 2,3
1448
1449    <data-change-counter-config xmlns="urn:opendaylight:params:xml:ns:yang:bgpcep:data-change-counter-config">
1450        <counter-id>data-change-counter</counter-id>
1451        <topology-name>example-linkstate-topology</topology-name>
1452    </data-change-counter-config>
1453
1454 @line 2: **Counter Id** - Unique counter change identifier.
1455
1456 @line 3: **Topology Name** - An identifier for a topology.
1457
1458 Usage
1459 '''''
1460
1461 Counter state for topology
1462
1463 **URL:** ``/restconf/operational/data-change-counter:data-change-counter/counter/data-change-counter``
1464
1465 **Method:** ``GET``
1466
1467 **Response Body:**
1468
1469 .. code-block:: xml
1470    :linenos:
1471    :emphasize-lines: 2,3
1472
1473    <counter xmlns="urn:opendaylight:params:xml:ns:yang:bgp-data-change-counter">
1474        <id>data-change-counter</id>
1475        <count>0</count>
1476    </counter>
1477
1478 @line 2: **Counter Id** - Unique counter change identifier.
1479
1480 @line 3: **Count** - Number of changes under registered topology's subtree.
1481
1482 Troubleshooting
1483 ---------------
1484 This section offers advices in a case OpenDaylight PCEP plugin is not working as expected.
1485
1486 .. contents:: Contents
1487    :depth: 2
1488    :local:
1489
1490 PCEP is not working...
1491 ^^^^^^^^^^^^^^^^^^^^^^
1492 * First of all, ensure that all required features are installed, local PCE and remote PCC configuration is correct.
1493
1494   To list all installed features in OpenDaylight use the following command at the Karaf console:
1495
1496   .. code-block:: console
1497
1498      feature:list -i
1499
1500 * Check OpenDaylight Karaf logs:
1501
1502   From Karaf console:
1503
1504   .. code-block:: console
1505
1506      log:tail
1507
1508   or open log file: ``data/log/karaf.log``
1509
1510   Possibly, a reason/hint for a cause of the problem can be found there.
1511
1512 * Try to minimize effect of other OpenDaylight features, when searching for a reason of the problem.
1513
1514 * Try to set DEBUG severity level for PCEP logger via Karaf console commands, in order to collect more information:
1515
1516   .. code-block:: console
1517
1518      log:set DEBUG org.opendaylight.protocol.pcep
1519
1520   .. code-block:: console
1521
1522      log:set DEBUG org.opendaylight.bgpcep.pcep
1523
1524 Bug reporting
1525 ^^^^^^^^^^^^^
1526 Before you report a bug, check `BGPCEP Bugzilla <https://bugs.opendaylight.org/buglist.cgi?list_id=65849&product=bgpcep&resolution=--->`_ to ensure same/similar bug is not already filed there.
1527
1528 Write an e-mail to bgpcep-users@lists.opendaylight.org and provide following information:
1529
1530 #. State OpenDaylight version
1531
1532 #. Describe your use-case and provide as much details related to PCEP as possible
1533
1534 #. Steps to reproduce
1535
1536 #. Attach Karaf log files, optionally packet captures, REST input/output
1537
1538 References
1539 ----------
1540 * `A Path Computation Element (PCE)-Based Architecture <https://tools.ietf.org/html/rfc4655>`_
1541 * `Path Computation Element (PCE) Communication Protocol Generic Requirements <https://tools.ietf.org/html/rfc4657>`_
1542 * `Unanswered Questions in the Path Computation Element Architecture <https://tools.ietf.org/html/rfc7399>`_
1543 * `A PCE-Based Architecture for Application-Based Network Operations <https://tools.ietf.org/html/rfc7491>`_
1544 * `Framework for PCE-Based Inter-Layer MPLS and GMPLS Traffic Engineering <https://tools.ietf.org/html/rfc5623>`_
1545 * `Applicability of a Stateful Path Computation Element (PCE) <https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-app-07>`_