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