Merge "Genius Release Notes"
[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 MD5 authentication configuration
132 ''''''''''''''''''''''''''''''''
133 The OpenDaylight PCEP implementation is supporting TCP MD5 for authentication.
134 Sample configuration below shows how to set authentication password for a particular PCC.
135 It is required to install ``odl-netconf-connector-ssh`` feature first.
136
137 **URL:** ``/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-pcep-topology-provider-cfg:pcep-topology-provider/pcep-topology``
138
139 **Method:** ``PUT``
140
141 **Content-Type:** ``application/xml``
142
143 **Request Body:**
144
145 .. code-block:: xml
146    :linenos:
147    :emphasize-lines: 26,27
148
149     <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
150         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">x:pcep-topology-provider</type>
151         <name>pcep-topology</name>
152         <data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
153             <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-async-data-broker</type>
154             <name>pingpong-binding-data-broker</name>
155         </data-provider>
156         <dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
157             <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:pcep">x:pcep-dispatcher</type>
158             <name>global-pcep-dispatcher</name>
159         </dispatcher>
160         <rpc-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
161             <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-rpc-registry</type>
162             <name>binding-rpc-broker</name>
163         </rpc-registry>
164         <scheduler xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
165             <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:programming:spi">x:instruction-scheduler</type>
166             <name>global-instruction-scheduler</name>
167         </scheduler>
168         <stateful-plugin xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
169             <type>pcep-topology-stateful</type>
170             <name>stateful07</name>
171         </stateful-plugin>
172         <topology-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">pcep-topology</topology-id>
173         <client xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
174             <address>43.43.43.43</address>
175             <password>topsecret</password>
176         </client>
177     </module>
178
179 @line 26: **address** - A PCC IP address.
180
181 @line 27: **password** - MD5 authentication phrase.
182
183 .. warning:: The PCE (*pcep-topology-provider*) configuration is going to be changed in Carbon release - moving to configuration datastore.
184
185 LSP State Database
186 ^^^^^^^^^^^^^^^^^^
187 The *LSP State Database* (LSP-DB) contains an information about all LSPs and their attributes.
188 The LSP state is synchronized between the PCC and PCE.
189 First, initial LSP state synchronization is performed once the session between PCC and PCE is established in order to learn PCC's LPSs.
190 This step is a prerequisite to following LSPs manipulation operations.
191
192
193 .. figure:: ./images/bgpcep/pcep-sync.png
194    :align: center
195    :alt: LSP State synchronization
196
197    LSP State Synchronization.
198
199 LSP-DB API
200 ''''''''''
201
202 .. code-block:: console
203
204    path-computation-client
205       +--ro reported-lsp* [name]
206          +--ro name        string
207          +--ro path* [lsp-id]
208          |  +--ro lsp-id                      rsvp:lsp-id
209          |  +--ro ero
210          |  |  +--ro processing-rule?   boolean
211          |  |  +--ro ignore?            boolean
212          |  |  +--ro subobject*
213          |  |     +--ro loose         boolean
214          |  |     +--ro (subobject-type)?
215          |  |        +--:(as-number-case)
216          |  |        |  +--ro as-number
217          |  |        |     +--ro as-number    inet:as-number
218          |  |        +--:(ip-prefix-case)
219          |  |        |  +--ro ip-prefix
220          |  |        |     +--ro ip-prefix    inet:ip-prefix
221          |  |        +--:(label-case)
222          |  |        |  +--ro label
223          |  |        |     +--ro uni-directional             boolean
224          |  |        |     +--ro (label-type)?
225          |  |        |        +--:(type1-label-case)
226          |  |        |        |  +--ro type1-label
227          |  |        |        |     +--ro type1-label    uint32
228          |  |        |        +--:(generalized-label-case)
229          |  |        |        |  +--ro generalized-label
230          |  |        |        |     +--ro generalized-label    binary
231          |  |        |        +--:(waveband-switching-label-case)
232          |  |        |           +--ro waveband-switching-label
233          |  |        |              +--ro end-label      uint32
234          |  |        |              +--ro start-label    uint32
235          |  |        |              +--ro waveband-id    uint32
236          |  |        +--:(srlg-case)
237          |  |        |  +--ro srlg
238          |  |        |     +--ro srlg-id    srlg-id
239          |  |        +--:(unnumbered-case)
240          |  |        |  +--ro unnumbered
241          |  |        |     +--ro router-id       uint32
242          |  |        |     +--ro interface-id    uint32
243          |  |        +--:(exrs-case)
244          |  |        |  +--ro exrs
245          |  |        |     +--ro exrs*
246          |  |        |        +--ro mandatory?    boolean
247          |  |        |        +--ro attribute     enumeration
248          |  |        |        +--ro (subobject-type)?
249          |  |        |           +--:(as-number-case)
250          |  |        |           |  +--ro as-number
251          |  |        |           |     +--ro as-number    inet:as-number
252          |  |        |           +--:(ip-prefix-case)
253          |  |        |           |  +--ro ip-prefix
254          |  |        |           |     +--ro ip-prefix    inet:ip-prefix
255          |  |        |           +--:(label-case)
256          |  |        |           |  +--ro label
257          |  |        |           |     +--ro uni-directional             boolean
258          |  |        |           |     +--ro (label-type)?
259          |  |        |           |        +--:(type1-label-case)
260          |  |        |           |        |  +--ro type1-label
261          |  |        |           |        |     +--ro type1-label    uint32
262          |  |        |           |        +--:(generalized-label-case)
263          |  |        |           |        |  +--ro generalized-label
264          |  |        |           |        |     +--ro generalized-label    binary
265          |  |        |           |        +--:(waveband-switching-label-case)
266          |  |        |           |           +--ro waveband-switching-label
267          |  |        |           |              +--ro end-label      uint32
268          |  |        |           |              +--ro start-label    uint32
269          |  |        |           |              +--ro waveband-id    uint32
270          |  |        |           +--:(srlg-case)
271          |  |        |           |  +--ro srlg
272          |  |        |           |     +--ro srlg-id    srlg-id
273          |  |        |           +--:(unnumbered-case)
274          |  |        |              +--ro unnumbered
275          |  |        |                 +--ro router-id       uint32
276          |  |        |                 +--ro interface-id    uint32
277          |  |        +--:(path-key-case)
278          |  |           +--ro path-key
279          |  |              +--ro pce-id      pce-id
280          |  |              +--ro path-key    path-key
281          |  +--ro lspa
282          |  |  +--ro processing-rule?            boolean
283          |  |  +--ro ignore?                     boolean
284          |  |  +--ro hold-priority?              uint8
285          |  |  +--ro setup-priority?             uint8
286          |  |  +--ro local-protection-desired?   boolean
287          |  |  +--ro label-recording-desired?    boolean
288          |  |  +--ro se-style-desired?           boolean
289          |  |  +--ro session-name?               string
290          |  |  +--ro include-any?                attribute-filter
291          |  |  +--ro exclude-any?                attribute-filter
292          |  |  +--ro include-all?                attribute-filter
293          |  |  +--ro tlvs
294          |  |     +--ro vendor-information-tlv*
295          |  |        +--ro enterprise-number?   iana:enterprise-number
296          |  |        +--ro (enterprise-specific-information)?
297          |  +--ro bandwidth
298          |  |  +--ro processing-rule?   boolean
299          |  |  +--ro ignore?            boolean
300          |  |  +--ro bandwidth?         netc:bandwidth
301          |  +--ro reoptimization-bandwidth
302          |  |  +--ro processing-rule?   boolean
303          |  |  +--ro ignore?            boolean
304          |  |  +--ro bandwidth?         netc:bandwidth
305          |  +--ro metrics*
306          |  |  +--ro metric
307          |  |     +--ro processing-rule?   boolean
308          |  |     +--ro ignore?            boolean
309          |  |     +--ro metric-type        uint8
310          |  |     +--ro bound?             boolean
311          |  |     +--ro computed?          boolean
312          |  |     +--ro value?             ieee754:float32
313          |  +--ro iro
314          |  |  +--ro processing-rule?   boolean
315          |  |  +--ro ignore?            boolean
316          |  |  +--ro subobject*
317          |  |     +--ro loose         boolean
318          |  |     +--ro (subobject-type)?
319          |  |        +--:(as-number-case)
320          |  |        |  +--ro as-number
321          |  |        |     +--ro as-number    inet:as-number
322          |  |        +--:(ip-prefix-case)
323          |  |        |  +--ro ip-prefix
324          |  |        |     +--ro ip-prefix    inet:ip-prefix
325          |  |        +--:(label-case)
326          |  |        |  +--ro label
327          |  |        |     +--ro uni-directional             boolean
328          |  |        |     +--ro (label-type)?
329          |  |        |        +--:(type1-label-case)
330          |  |        |        |  +--ro type1-label
331          |  |        |        |     +--ro type1-label    uint32
332          |  |        |        +--:(generalized-label-case)
333          |  |        |        |  +--ro generalized-label
334          |  |        |        |     +--ro generalized-label    binary
335          |  |        |        +--:(waveband-switching-label-case)
336          |  |        |           +--ro waveband-switching-label
337          |  |        |              +--ro end-label      uint32
338          |  |        |              +--ro start-label    uint32
339          |  |        |              +--ro waveband-id    uint32
340          |  |        +--:(srlg-case)
341          |  |        |  +--ro srlg
342          |  |        |     +--ro srlg-id    srlg-id
343          |  |        +--:(unnumbered-case)
344          |  |        |  +--ro unnumbered
345          |  |        |     +--ro router-id       uint32
346          |  |        |     +--ro interface-id    uint32
347          |  |        +--:(exrs-case)
348          |  |        |  +--ro exrs
349          |  |        |     +--ro exrs*
350          |  |        |        +--ro mandatory?    boolean
351          |  |        |        +--ro attribute     enumeration
352          |  |        |        +--ro (subobject-type)?
353          |  |        |           +--:(as-number-case)
354          |  |        |           |  +--ro as-number
355          |  |        |           |     +--ro as-number    inet:as-number
356          |  |        |           +--:(ip-prefix-case)
357          |  |        |           |  +--ro ip-prefix
358          |  |        |           |     +--ro ip-prefix    inet:ip-prefix
359          |  |        |           +--:(label-case)
360          |  |        |           |  +--ro label
361          |  |        |           |     +--ro uni-directional             boolean
362          |  |        |           |     +--ro (label-type)?
363          |  |        |           |        +--:(type1-label-case)
364          |  |        |           |        |  +--ro type1-label
365          |  |        |           |        |     +--ro type1-label    uint32
366          |  |        |           |        +--:(generalized-label-case)
367          |  |        |           |        |  +--ro generalized-label
368          |  |        |           |        |     +--ro generalized-label    binary
369          |  |        |           |        +--:(waveband-switching-label-case)
370          |  |        |           |           +--ro waveband-switching-label
371          |  |        |           |              +--ro end-label      uint32
372          |  |        |           |              +--ro start-label    uint32
373          |  |        |           |              +--ro waveband-id    uint32
374          |  |        |           +--:(srlg-case)
375          |  |        |           |  +--ro srlg
376          |  |        |           |     +--ro srlg-id    srlg-id
377          |  |        |           +--:(unnumbered-case)
378          |  |        |              +--ro unnumbered
379          |  |        |                 +--ro router-id       uint32
380          |  |        |                 +--ro interface-id    uint32
381          |  |        +--:(path-key-case)
382          |  |           +--ro path-key
383          |  |              +--ro pce-id      pce-id
384          |  |              +--ro path-key    path-key
385          |  +--ro rro
386          |  |  +--ro processing-rule?   boolean
387          |  |  +--ro ignore?            boolean
388          |  |  +--ro subobject*
389          |  |     +--ro protection-available?   boolean
390          |  |     +--ro protection-in-use?      boolean
391          |  |     +--ro (subobject-type)?
392          |  |        +--:(ip-prefix-case)
393          |  |        |  +--ro ip-prefix
394          |  |        |     +--ro ip-prefix    inet:ip-prefix
395          |  |        +--:(label-case)
396          |  |        |  +--ro label
397          |  |        |     +--ro uni-directional             boolean
398          |  |        |     +--ro (label-type)?
399          |  |        |     |  +--:(type1-label-case)
400          |  |        |     |  |  +--ro type1-label
401          |  |        |     |  |     +--ro type1-label    uint32
402          |  |        |     |  +--:(generalized-label-case)
403          |  |        |     |  |  +--ro generalized-label
404          |  |        |     |  |     +--ro generalized-label    binary
405          |  |        |     |  +--:(waveband-switching-label-case)
406          |  |        |     |     +--ro waveband-switching-label
407          |  |        |     |        +--ro end-label      uint32
408          |  |        |     |        +--ro start-label    uint32
409          |  |        |     |        +--ro waveband-id    uint32
410          |  |        |     +--ro global?                     boolean
411          |  |        +--:(unnumbered-case)
412          |  |        |  +--ro unnumbered
413          |  |        |     +--ro router-id       uint32
414          |  |        |     +--ro interface-id    uint32
415          |  |        +--:(path-key-case)
416          |  |           +--ro path-key
417          |  |              +--ro pce-id      pce-id
418          |  |              +--ro path-key    path-key
419          |  +--ro xro
420          |  |  +--ro processing-rule?   boolean
421          |  |  +--ro ignore?            boolean
422          |  |  +--ro flags              bits
423          |  |  +--ro subobject*
424          |  |     +--ro mandatory?    boolean
425          |  |     +--ro attribute     enumeration
426          |  |     +--ro (subobject-type)?
427          |  |        +--:(as-number-case)
428          |  |        |  +--ro as-number
429          |  |        |     +--ro as-number    inet:as-number
430          |  |        +--:(ip-prefix-case)
431          |  |        |  +--ro ip-prefix
432          |  |        |     +--ro ip-prefix    inet:ip-prefix
433          |  |        +--:(label-case)
434          |  |        |  +--ro label
435          |  |        |     +--ro uni-directional             boolean
436          |  |        |     +--ro (label-type)?
437          |  |        |        +--:(type1-label-case)
438          |  |        |        |  +--ro type1-label
439          |  |        |        |     +--ro type1-label    uint32
440          |  |        |        +--:(generalized-label-case)
441          |  |        |        |  +--ro generalized-label
442          |  |        |        |     +--ro generalized-label    binary
443          |  |        |        +--:(waveband-switching-label-case)
444          |  |        |           +--ro waveband-switching-label
445          |  |        |              +--ro end-label      uint32
446          |  |        |              +--ro start-label    uint32
447          |  |        |              +--ro waveband-id    uint32
448          |  |        +--:(srlg-case)
449          |  |        |  +--ro srlg
450          |  |        |     +--ro srlg-id    srlg-id
451          |  |        +--:(unnumbered-case)
452          |  |           +--ro unnumbered
453          |  |              +--ro router-id       uint32
454          |  |              +--ro interface-id    uint32
455          |  +--ro of
456          |  |  +--ro processing-rule?   boolean
457          |  |  +--ro ignore?            boolean
458          |  |  +--ro code               of-id
459          |  |  +--ro tlvs
460          |  |     +--ro vendor-information-tlv*
461          |  |        +--ro enterprise-number?   iana:enterprise-number
462          |  |        +--ro (enterprise-specific-information)?
463          |  +--ro class-type
464          |     +--ro processing-rule?   boolean
465          |     +--ro ignore?            boolean
466          |     +--ro class-type         class-type
467          +--ro metadata
468          +--ro lsp
469          |  +--ro processing-rule?   boolean
470          |  +--ro ignore?            boolean
471          |  +--ro tlvs
472          |  |  +--ro lsp-error-code
473          |  |  |  +--ro error-code?   uint32
474          |  |  +--ro lsp-identifiers
475          |  |  |  +--ro lsp-id?      rsvp:lsp-id
476          |  |  |  +--ro tunnel-id?   rsvp:tunnel-id
477          |  |  |  +--ro (address-family)?
478          |  |  |     +--:(ipv4-case)
479          |  |  |     |  +--ro ipv4
480          |  |  |     |     +--ro ipv4-tunnel-sender-address      inet:ipv4-address
481          |  |  |     |     +--ro ipv4-extended-tunnel-id         rsvp:ipv4-extended-tunnel-id
482          |  |  |     |     +--ro ipv4-tunnel-endpoint-address    inet:ipv4-address
483          |  |  |     +--:(ipv6-case)
484          |  |  |        +--ro ipv6
485          |  |  |           +--ro ipv6-tunnel-sender-address      inet:ipv6-address
486          |  |  |           +--ro ipv6-extended-tunnel-id         rsvp:ipv6-extended-tunnel-id
487          |  |  |           +--ro ipv6-tunnel-endpoint-address    inet:ipv6-address
488          |  |  +--ro rsvp-error-spec
489          |  |  |  +--ro (error-type)?
490          |  |  |     +--:(rsvp-case)
491          |  |  |     |  +--ro rsvp-error
492          |  |  |     +--:(user-case)
493          |  |  |        +--ro user-error
494          |  |  +--ro symbolic-path-name
495          |  |  |  +--ro path-name?   symbolic-path-name
496          |  |  o--ro vs-tlv
497          |  |  |  +--ro enterprise-number?   iana:enterprise-number
498          |  |  |  +--ro (vendor-payload)?
499          |  |  +--ro vendor-information-tlv*
500          |  |  |  +--ro enterprise-number?   iana:enterprise-number
501          |  |  |  +--ro (enterprise-specific-information)?
502          |  |  +--ro path-binding
503          |  |     x--ro binding-type?      uint8
504          |  |     x--ro binding-value?     binary
505          |  |     +--ro (binding-type-value)?
506          |  |        +--:(mpls-label)
507          |  |        |  +--ro mpls-label?        netc:mpls-label
508          |  |        +--:(mpls-label-entry)
509          |  |           +--ro label?             netc:mpls-label
510          |  |           +--ro traffic-class?     uint8
511          |  |           +--ro bottom-of-stack?   boolean
512          |  |           +--ro time-to-live?      uint8
513          |  +--ro plsp-id?           plsp-id
514          |  +--ro delegate?          boolean
515          |  +--ro sync?              boolean
516          |  +--ro remove?            boolean
517          |  +--ro administrative?    boolean
518          |  +--ro operational?       operational-status
519          +--ro path-setup-type
520             +--ro pst?   uint8
521
522 -----
523
524 The LSP-DB is accessible via RESTCONF.
525 The PCC's LSPs are stored in the ``pcep-topology`` while the session is active.
526 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*).
527
528 **URL:** ``/restconf/operational/network-topology:network-topology/topology/pcep-topology/node/pcc:%2F%2F43.43.43.43``
529
530 **Method:** ``GET``
531
532 **Response Body:**
533
534 .. code-block:: xml
535    :linenos:
536    :emphasize-lines: 2,4,5,8,12,14,15,16,17,18,20,24,25,26,28,29,32,36
537
538    <node>
539       <node-id>pcc://43.43.43.43</node-id>
540       <path-computation-client>
541          <ip-address>43.43.43.43</ip-address>
542          <state-sync>synchronized</state-sync>
543          <stateful-tlv>
544             <stateful>
545                <lsp-update-capability>true</lsp-update-capability>
546             </stateful>
547          </stateful-tlv>
548          <reported-lsp>
549             <name>foo</name>
550             <lsp>
551                <operational>up</operational>
552                <sync>true</sync>
553                <plsp-id>1</plsp-id>
554                <create>false</create>
555                <administrative>true</administrative>
556                <remove>false</remove>
557                <delegate>true</delegate>
558                <tlvs>
559                   <lsp-identifiers>
560                      <ipv4>
561                         <ipv4-tunnel-sender-address>43.43.43.43</ipv4-tunnel-sender-address>
562                         <ipv4-tunnel-endpoint-address>39.39.39.39</ipv4-tunnel-endpoint-address>
563                         <ipv4-extended-tunnel-id>39.39.39.39</ipv4-extended-tunnel-id>
564                      </ipv4>
565                      <tunnel-id>1</tunnel-id>
566                      <lsp-id>1</lsp-id>
567                   </lsp-identifiers>
568                   <symbolic-path-name>
569                      <path-name>Zm9v</path-name>
570                   </symbolic-path-name>
571                </tlvs>
572             </lsp>
573             <ero>
574                <subobject>
575                   <loose>false</loose>
576                   <ip-prefix>
577                      <ip-prefix>201.20.160.40/32</ip-prefix>
578                   </ip-prefix>
579                </subobject>
580                <subobject>
581                   <loose>false</loose>
582                   <ip-prefix>
583                      <ip-prefix>195.20.160.39/32</ip-prefix>
584                   </ip-prefix>
585                </subobject>
586                <subobject>
587                   <loose>false</loose>
588                   <ip-prefix>
589                      <ip-prefix>39.39.39.39/32</ip-prefix>
590                   </ip-prefix>
591                </subobject>
592             </ero>
593          </reported-lsp>
594       </path-computation-client>
595    </node>
596
597 @line 2: **node-id** The PCC identifier.
598
599 @line 4: **ip-address** IP address of the PCC.
600
601 @line 5: **state-sync** Synchronization status of the PCC's LSPs. The *synchronized* indicates the State Synchronization is done.
602
603 @line 8: **lsp-update-capability** - Indicates that PCC allows LSP modifications.
604
605 @line 12: **name** - Textual representation of LPS's name.
606
607 @line 14: **operational** - Represent operational status of the LSP:
608
609    * *down* - not active.
610    * *up* - signaled.
611    * *active* - up and carrying traffic.
612    * *going-down* - LSP is being torn down, resources are being released.
613    * *going-up* - LSP is being signaled.
614
615 @line 15: **sync** - The flag set by PCC during LSPs State Synchronization.
616
617 @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.
618
619 @line 17: **create** - The *false* indicates that LSP is PCC-initiated.
620
621 @line 18: **administrative** - The flag indicates target operational status of the LSP.
622
623 @line 20: **delegate** - The delegate flag indicates that the PCC is delegating the LSP to the PCE.
624
625 @line 24: **ipv4-tunnel-sender-address** - Contains the sender node's IP address.
626
627 @line 25: **ipv4-tunnel-endpoint-address** - Contains the egress node's IP address.
628
629 @line 26: **ipv4-extended-tunnel-id** - The *Extended Tunnel ID* identifier.
630
631 @line 28: **tunnel-id** - The *Tunnel ID* identifier.
632
633 @line 29: **lsp-id** - The *LSP ID* identifier.
634
635 @line 32: **path-name** - The symbolic name for the LSP.
636
637 @line 36: **ero** - The *Explicit Route Object* is encoding the path of the TE LSP through the network.
638
639 LSP Delegation
640 ''''''''''''''
641 The LSP control delegations is an mechanism, where PCC grants to a PCE the temporary right in order to modify LSP attributes.
642 The PCC can revoke the delegation or the PCE may waive the delegation at any time.
643 The LSP control is delegated to at most one PCE at the same time.
644
645 .. figure:: ./images/bgpcep/pcep-delegation-return.png
646    :align: center
647    :alt: Returning a Delegation
648
649    Returning a Delegation.
650
651 -----
652
653 Following RPC example illustrates a request for the LSP delegation give up:
654
655 **URL:** ``/restconf/operations/network-topology-pcep:update-lsp``
656
657 **Method:** ``POST``
658
659 **Content-Type:** ``application/xml``
660
661 **Request Body:**
662
663 .. code-block:: xml
664    :linenos:
665    :emphasize-lines: 2,3,6,10
666
667    <input>
668       <node>pcc://43.43.43.43</node>
669       <name>foo</name>
670       <arguments>
671          <lsp xmlns:stateful="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
672             <delegate>false</delegate>
673             <administrative>true</administrative>
674             <tlvs>
675                <symbolic-path-name>
676                   <path-name>Zm9v</path-name>
677                </symbolic-path-name>
678             </tlvs>
679          </lsp>
680       </arguments>
681       <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>
682    </input>
683
684 @line 2: **node** The PCC identifier.
685
686 @line 3: **name** The name of the LSP.
687
688 @line 6: **delegate** - Delegation flag set *false* in order to return the LSP delegation.
689
690 @line 10: **path-name** - The Symbolic Path Name TLV must be present when sending a request to give up the delegation.
691
692 LSP Update
693 ''''''''''
694 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.
695 In order to update LSP, the PCE must hold a LSP delegation.
696 The LSP update is done in *make-before-break* fashion - first, new LSP is initiated and then the old LSP is torn down.
697
698 .. figure:: ./images/bgpcep/pcep-update.png
699    :align: center
700    :alt: Active Stateful PCE LSP Update
701
702    Active Stateful PCE LSP Update.
703
704 -----
705
706 Following RPC example shows a request for the LSP update:
707
708 **URL:** ``/restconf/operations/network-topology-pcep:update-lsp``
709
710 **Method:** ``POST``
711
712 **Content-Type:** ``application/xml``
713
714 **Request Body:**
715
716 .. code-block:: xml
717    :linenos:
718    :emphasize-lines: 2,3,6,7,9
719
720    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
721       <node>pcc://43.43.43.43</node>
722       <name>foo</name>
723       <arguments>
724          <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
725             <delegate>true</delegate>
726             <administrative>true</administrative>
727          </lsp>
728          <ero>
729             <subobject>
730                <loose>false</loose>
731                <ip-prefix>
732                   <ip-prefix>200.20.160.41/32</ip-prefix>
733                </ip-prefix>
734             </subobject>
735             <subobject>
736                <loose>false</loose>
737                <ip-prefix>
738                   <ip-prefix>196.20.160.39/32</ip-prefix>
739                </ip-prefix>
740             </subobject>
741             <subobject>
742                <loose>false</loose>
743                <ip-prefix>
744                   <ip-prefix>39.39.39.39/32</ip-prefix>
745                </ip-prefix>
746             </subobject>
747          </ero>
748       </arguments>
749       <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>
750    </input>
751
752 @line 2: **node** The PCC identifier.
753
754 @line 3: **name** The name of the LSP to be updated.
755
756 @line 6: **delegate** - Delegation flag set *true* in order to keep the LSP control.
757
758 @line 7: **administrative** - Desired administrative status of the LSP is active.
759
760 @line 9: **ero** - This LSP attribute is changed.
761
762 PCE-initiated LSP Setup
763 ^^^^^^^^^^^^^^^^^^^^^^^
764 The PCEP Extension for PCE-initiated LSP Setup allows PCE to request a creation and deletion of LSPs.
765
766 Configuration
767 '''''''''''''
768 This capability is enabled by default. No additional configuration is required.
769
770 LSP Instantiation
771 '''''''''''''''''
772 The PCE can request LSP creation.
773 The LSP instantiation is done by sending an LSP Initiate Message to PCC.
774 The PCC assign delegation to PCE which triggered creation.
775 PCE-initiated LSPs are identified by *Create* flag.
776
777 .. figure:: ./images/bgpcep/pcep-initiate.png
778    :align: center
779    :alt: LSP instantiation
780
781    LSP instantiation.
782
783 -----
784
785 Following RPC example shows a request for the LSP initiation:
786
787 **URL:** ``/restconf/operations/network-topology-pcep:add-lsp``
788
789 **Method:** ``POST``
790
791 **Content-Type:** ``application/xml``
792
793 **Request Body:**
794
795 .. code-block:: xml
796    :linenos:
797    :emphasize-lines: 2,3,8,14
798
799    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
800       <node>pcc://43.43.43.43</node>
801       <name>update-tunel</name>
802          <arguments>
803             <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
804                <delegate>true</delegate>
805                <administrative>true</administrative>
806             </lsp>
807             <endpoints-obj>
808                <ipv4>
809                   <source-ipv4-address>43.43.43.43</source-ipv4-address>
810                   <destination-ipv4-address>39.39.39.39</destination-ipv4-address>
811                </ipv4>
812             </endpoints-obj>
813             <ero>
814                <subobject>
815                   <loose>false</loose>
816                   <ip-prefix>
817                      <ip-prefix>201.20.160.40/32</ip-prefix>
818                   </ip-prefix>
819                </subobject>
820                <subobject>
821                   <loose>false</loose>
822                   <ip-prefix>
823                      <ip-prefix>195.20.160.39/32</ip-prefix>
824                   </ip-prefix>
825                </subobject>
826                <subobject>
827                   <loose>false</loose>
828                   <ip-prefix>
829                      <ip-prefix>39.39.39.39/32</ip-prefix>
830                   </ip-prefix>
831                </subobject>
832             </ero>
833          </arguments>
834       <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>
835    </input>
836
837 @line 2: **node** The PCC identifier.
838
839 @line 3: **name** The name of the LSP to be created.
840
841 @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.
842
843 @line 14: **ero** - The *ERO* object is mandatory for LSP initiation request.
844
845 LSP Deletion
846 ''''''''''''
847 The PCE may request a deletion of PCE-initiated LSPs.
848 The PCE must be delegation holder for this particular LSP.
849
850 .. figure:: ./images/bgpcep/pcep-deletion.png
851    :align: center
852    :alt: LSP deletion.
853
854    LSP deletion.
855
856 -----
857
858 Following RPC example shows a request for the LSP deletion:
859
860 **URL:** ``/restconf/operations/network-topology-pcep:remove-lsp``
861
862 **Method:** ``POST``
863
864 **Content-Type:** ``application/xml``
865
866 **Request Body:**
867
868 .. code-block:: xml
869    :linenos:
870    :emphasize-lines: 2,3
871
872    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
873       <node>pcc://43.43.43.43</node>
874       <name>update-tunel</name>
875       <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>
876    </input>
877
878 @line 2: **node** The PCC identifier.
879
880 @line 3: **name** The name of the LSP to be removed.
881
882 PCE-initiated LSP Delegation
883 ''''''''''''''''''''''''''''
884 The PCE-initiated LSP control is delegated to the PCE which requested the initiation.
885 The PCC cannot revoke delegation of PCE-initiated LSP.
886 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.
887 The PCE may ask for a delegation of the orphan LSP.
888
889 .. figure:: ./images/bgpcep/pcep-revoke-delegation.png
890    :align: center
891    :alt: LSP re-delegation
892
893    Orphan PCE-initiated LSP - control taken by PCE.
894
895 -----
896
897 Following RPC example illustrates a request for the LSP delegation:
898
899 **URL:** ``/restconf/operations/network-topology-pcep:update-lsp``
900
901 **Method:** ``POST``
902
903 **Content-Type:** ``application/xml``
904
905 **Request Body:**
906
907 .. code-block:: xml
908    :linenos:
909    :emphasize-lines: 2,3,6,10
910
911    <input>
912       <node>pcc://43.43.43.43</node>
913       <name>update-tunel</name>
914       <arguments>
915          <lsp xmlns:stateful="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
916             <delegate>true</delegate>
917             <administrative>true</administrative>
918             <tlvs>
919                <symbolic-path-name>
920                   <path-name>dXBkYXRlLXR1bmVs</path-name>
921                </symbolic-path-name>
922             </tlvs>
923          </lsp>
924       </arguments>
925       <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>
926    </input>
927
928 @line 2: **node** The PCC identifier.
929
930 @line 3: **name** The name of the LSP.
931
932 @line 6: **delegate** - *Delegation* flag set *true* in order to take the LSP delegation.
933
934 @line 10: **path-name** - The *Symbolic Path Name* TLV must be present when sending a request to take a delegation.
935
936 Segment Routing
937 ^^^^^^^^^^^^^^^
938 The PCEP Extensions for Segment Routing (SR) allow a stateful PCE to compute and initiate TE paths in SR networks.
939 The SR path is defined as an order list  of *segments*.
940 Segment Routing architecture can be directly applied to the MPLS forwarding plane without changes.
941 Segment Identifier (SID) is encoded as a MPLS label.
942
943 Configuration
944 '''''''''''''
945 This capability is enabled by default.
946 In PCEP-SR draft version 6, SR Explicit Route Object/Record Route Object subobjects IANA code points change was proposed.
947 In order to use the latest code points, a configuration should be changed in following way:
948
949 **URL:** ``/restconf/config/pcep-segment-routing-app-config:pcep-segment-routing-app-config``
950
951 **Method:** ``PUT``
952
953 **Content-Type:** ``application/xml``
954
955 **Request Body:**
956
957 .. code-block:: xml
958    :linenos:
959
960    <pcep-segment-routing-config xmlns="urn:opendaylight:params:xml:ns:yang:controller:pcep:segment-routing-app-config">
961       <iana-sr-subobjects-type>true</iana-sr-subobjects-type>
962    </pcep-segment-routing-config>
963
964 LSP Operations for PCEP SR
965 ''''''''''''''''''''''''''
966 The PCEP SR extension defines new ERO subobject - *SR-ERO subobject* capable of carrying a SID.
967
968 .. code-block:: console
969
970    sr-ero-type
971       +---- c-flag?                boolean
972       +---- m-flag?                boolean
973       +---- sid-type?              sid-type
974       +---- sid?                   uint32
975       +---- (nai)?
976          +--:(ip-node-id)
977          |  +---- ip-address             inet:ip-address
978          +--:(ip-adjacency)
979          |  +---- local-ip-address       inet:ip-address
980          |  +---- remote-ip-address      inet:ip-address
981          +--:(unnumbered-adjacency)
982             +---- local-node-id          uint32
983             +---- local-interface-id     uint32
984             +---- remote-node-id         uint32
985             +---- remote-interface-id    uint32
986
987 -----
988
989 Following RPC example illustrates a request for the SR-TE LSP creation:
990
991 **URL:** ``/restconf/operations/network-topology-pcep:add-lsp``
992
993 **Method:** ``POST``
994
995 **Content-Type:** ``application/xml``
996
997 **Request Body:**
998
999 .. code-block:: xml
1000    :linenos:
1001    :emphasize-lines: 16,21,22,23
1002
1003    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
1004       <node>pcc://43.43.43.43</node>
1005       <name>sr-path</name>
1006       <arguments>
1007          <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
1008             <delegate>true</delegate>
1009             <administrative>true</administrative>
1010          </lsp>
1011          <endpoints-obj>
1012             <ipv4>
1013                <source-ipv4-address>43.43.43.43</source-ipv4-address>
1014                <destination-ipv4-address>39.39.39.39</destination-ipv4-address>
1015             </ipv4>
1016          </endpoints-obj>
1017          <path-setup-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
1018             <pst>1</pst>
1019          </path-setup-type>
1020          <ero>
1021             <subobject>
1022                <loose>false</loose>
1023                <sid-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">ipv4-node-id</sid-type>
1024                <m-flag xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">true</m-flag>
1025                <sid xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">24001</sid>
1026                <ip-address xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">39.39.39.39</ip-address>
1027            </subobject>
1028          </ero>
1029       </arguments>
1030       <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>
1031    </input>
1032
1033 @line 16: **path-setup-type** - Set *1* for SR-TE LSP
1034
1035 @line 21: **ipv4-node-id** - The SR-ERO subobject represents *IPv4 Node ID* NAI.
1036
1037 @line 22: **m-flag** - The SID value represents an MPLS label.
1038
1039 @line 23: **sid** - The Segment Identifier.
1040
1041 -----
1042
1043 Following RPC example illustrates a request for the SR-TE LSP update including modified path:
1044
1045 **URL:** ``/restconf/operations/network-topology-pcep:update-lsp``
1046
1047 **Method:** ``POST``
1048
1049 **Content-Type:** ``application/xml``
1050
1051 **Request Body:**
1052
1053 .. code-block:: xml
1054    :linenos:
1055
1056    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
1057       <node>pcc://43.43.43.43</node>
1058       <name>update-tunnel</name>
1059       <arguments>
1060          <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
1061             <delegate>true</delegate>
1062             <administrative>true</administrative>
1063          </lsp>
1064          <path-setup-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
1065             <pst>1</pst>
1066          </path-setup-type>
1067          <ero>
1068             <subobject>
1069                <loose>false</loose>
1070                <sid-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">ipv4-node-id</sid-type>
1071                <m-flag xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">true</m-flag>
1072                <sid xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">24002</sid>
1073                <ip-address xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">200.20.160.41</ip-address>
1074             </subobject>
1075             <subobject>
1076                <loose>false</loose>
1077                <sid-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">ipv4-node-id</sid-type>
1078                <m-flag xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">true</m-flag>
1079                <sid xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">24001</sid>
1080                <ip-address xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">39.39.39.39</ip-address>
1081             </subobject>
1082          </ero>
1083       </arguments>
1084       <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>
1085    </input>
1086
1087 LSP State Synchronization Optimization Procedures
1088 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1089 This extension bring optimizations for state synchronization:
1090
1091 * State Synchronization Avoidance
1092 * Incremental State Synchronization
1093 * PCE-triggered Initial Synchronization
1094 * PCE-triggered Re-synchronization
1095
1096 Configuration
1097 '''''''''''''
1098 This capability is enabled by default. No additional configuration is required.
1099
1100 State Synchronization Avoidance
1101 '''''''''''''''''''''''''''''''
1102 The State Synchronization Avoidance procedure is intended to skip state synchronization if the state has survived and not changed during session restart.
1103
1104 .. figure:: ./images/bgpcep/pcep-sync-skipped.png
1105    :align: center
1106    :alt: Sync skipped
1107
1108    State Synchronization Skipped.
1109
1110 Incremental State Synchronization
1111 '''''''''''''''''''''''''''''''''
1112 The Incremental State Synchronization procedure is intended to do incremental (delta) state synchronization when possible.
1113
1114 .. figure:: ./images/bgpcep/pcep-sync-incremental.png
1115    :align: center
1116    :alt: Sync incremental
1117
1118    Incremental Synchronization Procedure.
1119
1120 PCE-triggered Initial Synchronization
1121 '''''''''''''''''''''''''''''''''''''
1122 The PCE-triggered Initial Synchronization procedure is intended to do let PCE control the timing of the initial state synchronization.
1123
1124 .. figure:: ./images/bgpcep/pcep-sync-initial.png
1125    :align: center
1126    :alt: Initial Sync
1127
1128    PCE-triggered Initial State Synchronization Procedure.
1129
1130 -----
1131
1132 Following RPC example illustrates a request for the initial synchronization:
1133
1134 **URL:** ``/restconf/operations/network-topology-pcep:trigger-sync``
1135
1136 **Method:** ``POST``
1137
1138 **Content-Type:** ``application/xml``
1139
1140 **Request Body:**
1141
1142 .. code-block:: xml
1143    :linenos:
1144
1145    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
1146       <node>pcc://43.43.43.43</node>
1147       <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>
1148    </input>
1149
1150 PCE-triggered Re-synchronization
1151 ''''''''''''''''''''''''''''''''
1152 The PCE-triggered Re-synchronization: To let PCE re-synchronize the state for sanity check.
1153
1154 .. figure:: ./images/bgpcep/pcep-re-sync.png
1155    :align: center
1156    :alt: Re-sync
1157
1158    PCE-triggered Re-synchronization Procedure.
1159
1160 -----
1161
1162 Following RPC example illustrates a request for the LSP re-synchronization:
1163
1164 **URL:** ``/restconf/operations/network-topology-pcep:trigger-sync``
1165
1166 **Method:** ``POST``
1167
1168 **Content-Type:** ``application/xml``
1169
1170 **Request Body:**
1171
1172 .. code-block:: xml
1173    :linenos:
1174    :emphasize-lines: 3
1175
1176    <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
1177       <node>pcc://43.43.43.43</node>
1178       <name>update-lsp</name>
1179       <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>
1180    </input>
1181
1182 @line 3: **name** - The LSP name. If this parameter is omitted, re-synchronization is requested for all PCC's LSPs.
1183
1184 Test tools
1185 ----------
1186 PCC Mock
1187 ^^^^^^^^
1188 The PCC Mock is a stand-alone Java application purposed to simulate a PCC(s).
1189 The simulator is capable to report sample LSPs, respond to delegation, LSP management operations and synchronization optimization procedures.
1190 This application is not part of the OpenDaylight Karaf distribution, however it can be downloaded from OpenDaylight's Nexus (use latest release version):
1191
1192 ``https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/bgpcep/pcep-pcc-mock``
1193
1194 Usage
1195 '''''
1196 The application can be run from command line:
1197
1198 .. code-block:: console
1199
1200    java -jar pcep-pcc-mock-*-executable.jar
1201
1202
1203 with optional input parameters:
1204
1205 .. code-block:: console
1206
1207    --local-address <Address:Port> (optional, default 127.0.0.1)
1208       The first PCC IP address. If more PCCs are required, the IP address will be incremented. Port number can be optionally specified.
1209
1210    --remote-address <Address1:Port1,Address2:Port2,Address3:Port3,...> (optional, default 127.0.0.1:4189)
1211       The list of IP address for the PCE servers. Port number can be optionally specified, otherwise default port number 4189 is used.
1212
1213    --pcc <N> (optional, default 1)
1214       Number of mocked PCC instances.
1215
1216    --lsp <N> (optional, default 1)
1217       Number of tunnels (LSPs) reported per PCC, might be zero.
1218
1219    --pcerr (optional flag)
1220       If the flag is present, response with PCErr, otherwise PCUpd.
1221
1222    --log-level <LEVEL> (optional, default INFO)
1223       Set logging level for pcc-mock.
1224
1225    -d, --deadtimer <0..255> (optional, default 120)
1226       DeadTimer value in seconds.
1227
1228    -ka, --keepalive <0.255> (optional, default 30)
1229       KeepAlive timer value in seconds.
1230
1231    --password <password> (optional)
1232       If the password is present, it is used in TCP MD5 signature, otherwise plain TCP is used.
1233
1234    --reconnect <seconds> (optional)
1235       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.
1236       The number of reconnect attempts is unlimited. If the argument is omitted, pcc-mock is not trying to reconnect.
1237
1238    --redelegation-timeout <seconds> (optional, default 0)
1239       The timeout starts when LSP delegation is returned or PCE fails, stops when LSP is re-delegated to PCE.
1240       When timeout expires, LSP delegation is revoked and held by PCC.
1241
1242    --state-timeout <seconds> (optional, default -1 (disabled))
1243       The timeout starts when LSP delegation is returned or PCE fails, stops when LSP is re-delegated to PCE.
1244       When timeout expires, PCE-initiated LSP is removed.
1245
1246    --state-sync-avoidance <disconnect_after_x_seconds> <reconnect_after_x_seconds> <dbVersion>
1247       Synchronization avoidance capability enabled.
1248          - disconnect_after_x_seconds: seconds that will pass until disconnections is forced. If set to smaller number than 1, disconnection wont be performed.
1249          - reconnect_after_x_seconds: seconds that will pass between disconnection and new connection attempt. Only happens if disconnection has been performed.
1250          - dbVersion: dbVersion used in new Open and must be always equal or bigger than LSP. If equal than LSP skip synchronization will be performed,
1251            if not full synchronization will be performed taking in account new starting dbVersion desired.
1252     --incremental-sync-procedure <disconnect_after_x_seconds> <reconnect_after_x_seconds> <dbVersion>
1253       Incremental synchronization capability enabled.
1254          - 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.
1255
1256     --triggered-initial-sync
1257       PCE-triggered synchronization capability enabled. Can be combined combined with state-sync-avoidance/incremental-sync-procedure.
1258
1259     --triggered-re-sync
1260       PCE-triggered re-synchronization capability enabled.
1261
1262 Data Change Counter Tool
1263 ^^^^^^^^^^^^^^^^^^^^^^^^
1264
1265 Data Change Counter tool registers a Data Change Listener to a specified topology's subtree.
1266 This will allow us to know the quantity of changes produced under it, with each data change event counter will be incremented.
1267
1268 Installation
1269 ''''''''''''
1270 Installing data change counter tool
1271
1272 .. code-block:: console
1273
1274    feature:install odl-restconf odl-bgpcep-data-change-counter
1275
1276 Configuration
1277 '''''''''''''
1278 Once we set the configuration, a new data change counter will be created and registers to example-linkstate-topology.
1279
1280 .. important:: **Clustering** - Each Counter Identifier should be unique.
1281
1282 **URL:** ``/restconf/config/odl-data-change-counter-config:data-change-counter-config/data-change-counter``
1283
1284 **Method:** ``PUT``
1285
1286 **Content-Type:** ``application/xml``
1287
1288 **Request Body:**
1289
1290 .. code-block:: xml
1291    :linenos:
1292    :emphasize-lines: 2,3
1293
1294    <data-change-counter-config xmlns="urn:opendaylight:params:xml:ns:yang:bgpcep:data-change-counter-config">
1295        <counter-id>data-change-counter</counter-id>
1296        <topology-name>example-linkstate-topology</topology-name>
1297    </data-change-counter-config>
1298
1299 @line 2: **Counter Id** - Unique counter change identifier.
1300
1301 @line 3: **Topology Name** - An identifier for a topology.
1302
1303 Usage
1304 '''''
1305
1306 Counter state for topology
1307
1308 **URL:** ``/restconf/operational/data-change-counter:data-change-counter/counter/data-change-counter``
1309
1310 **Method:** ``GET``
1311
1312 **Response Body:**
1313
1314 .. code-block:: xml
1315    :linenos:
1316    :emphasize-lines: 2,3
1317
1318    <counter xmlns="urn:opendaylight:params:xml:ns:yang:bgp-data-change-counter">
1319        <id>data-change-counter</id>
1320        <count>0</count>
1321    </counter>
1322
1323 @line 2: **Counter Id** - Unique counter change identifier.
1324
1325 @line 3: **Count** - Number of changes under registered topology's subtree.
1326
1327 Troubleshooting
1328 ---------------
1329 This section offers advices in a case OpenDaylight PCEP plugin is not working as expected.
1330
1331 .. contents:: Contents
1332    :depth: 2
1333    :local:
1334
1335 PCEP is not working...
1336 ^^^^^^^^^^^^^^^^^^^^^^
1337 * First of all, ensure that all required features are installed, local PCE and remote PCC configuration is correct.
1338
1339   To list all installed features in OpenDaylight use the following command at the Karaf console:
1340
1341   .. code-block:: console
1342
1343      feature:list -i
1344
1345 * Check OpenDaylight Karaf logs:
1346
1347   From Karaf console:
1348
1349   .. code-block:: console
1350
1351      log:tail
1352
1353   or open log file: ``data/log/karaf.log``
1354
1355   Possibly, a reason/hint for a cause of the problem can be found there.
1356
1357 * Try to minimize effect of other OpenDaylight features, when searching for a reason of the problem.
1358
1359 * Try to set DEBUG severity level for PCEP logger via Karaf console commands, in order to collect more information:
1360
1361   .. code-block:: console
1362
1363      log:set DEBUG org.opendaylight.protocol.pcep
1364
1365   .. code-block:: console
1366
1367      log:set DEBUG org.opendaylight.bgpcep.pcep
1368
1369 Bug reporting
1370 ^^^^^^^^^^^^^
1371 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.
1372
1373 Write an e-mail to bgpcep-users@lists.opendaylight.org and provide following information:
1374
1375 #. State OpenDaylight version
1376
1377 #. Describe your use-case and provide as much details related to PCEP as possible
1378
1379 #. Steps to reproduce
1380
1381 #. Attach Karaf log files, optionally packet captures, REST input/output
1382
1383 References
1384 ----------
1385 * `A Path Computation Element (PCE)-Based Architecture <https://tools.ietf.org/html/rfc4655>`_
1386 * `Path Computation Element (PCE) Communication Protocol Generic Requirements <https://tools.ietf.org/html/rfc4657>`_
1387 * `Unanswered Questions in the Path Computation Element Architecture <https://tools.ietf.org/html/rfc7399>`_
1388 * `A PCE-Based Architecture for Application-Based Network Operations <https://tools.ietf.org/html/rfc7491>`_
1389 * `Framework for PCE-Based Inter-Layer MPLS and GMPLS Traffic Engineering <https://tools.ietf.org/html/rfc5623>`_
1390 * `Applicability of a Stateful Path Computation Element (PCE) <https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-app-07>`_