1 .. _pcep-developer-guide:
9 This section provides an overview of **feature odl-bgpcep-pcep-all** .
10 This feature will install everything needed for PCEP (Path Computation
11 Element Protocol) including establishing the connection, storing
12 information about LSPs (Label Switched Paths) and displaying data in
13 network-topology overview.
18 Each feature represents a module in the BGPCEP codebase. The following
19 diagram illustrates how the features are related.
21 .. figure:: ./images/bgpcep/pcep-dependency-tree.png
22 :alt: PCEP Dependency Tree
26 Key APIs and Interfaces
27 -----------------------
35 *32-pcep.xml* defines only pcep-dispatcher the parser should be using
36 (global-pcep-extensions), factory for creating session proposals (you
37 can create different proposals for different PCCs (Path Computation
43 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:impl">prefix:pcep-dispatcher-impl</type>
44 <name>global-pcep-dispatcher</name>
46 <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extensions</type>
47 <name>global-pcep-extensions</name>
49 <pcep-session-proposal-factory>
50 <type xmlns:pcep="urn:opendaylight:params:xml:ns:yang:controller:pcep">pcep:pcep-session-proposal-factory</type>
51 <name>global-pcep-session-proposal-factory</name>
52 </pcep-session-proposal-factory>
54 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-threadgroup</type>
55 <name>global-boss-group</name>
58 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-threadgroup</type>
59 <name>global-worker-group</name>
63 For user configuration of PCEP, check User Guide.
68 The base PCEP parser includes messages and attributes from
69 `RFC5441 <http://tools.ietf.org/html/rfc5441>`__,
70 `RFC5541 <http://tools.ietf.org/html/rfc5541>`__,
71 `RFC5455 <http://tools.ietf.org/html/rfc5455>`__,
72 `RFC5557 <http://tools.ietf.org/html/rfc5557>`__ and
73 `RFC5521 <http://tools.ietf.org/html/rfc5521>`__.
78 All parsers and serializers need to be registered into *Extension
79 provider*. This *Extension provider* is configured in initial
80 configuration of the parser-spi module (*32-pcep.xml*).
85 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">prefix:pcep-extensions-impl</type>
86 <name>global-pcep-extensions</name>
88 <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
89 <name>pcep-parser-base</name>
92 <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
93 <name>pcep-parser-ietf-stateful</name>
96 <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
97 <name>pcep-parser-ietf-initiated</name>
100 <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
101 <name>pcep-parser-sync-optimizations</name>
105 - *pcep-parser-base* - will register parsers and serializers
106 implemented in pcep-impl module
108 - *pcep-parser-ietf-stateful* - will register parsers and serializers
109 of draft-ietf-pce-stateful-pce-07 implementation
111 - *pcep-parser-ietf-initiated* - will register parser and serializer
112 of draft-ietf-pce-pce-initiated-lsp-00 implementation
114 - *pcep-parser-sync-optimizations* - will register parser and
115 serializers of draft-ietf-pce-stateful-sync-optimizations-03
118 Stateful module is a good example of a PCEP parser extension.
120 Configuration of PCEP parsers specifies one implementation of *Extension
121 provider* that will take care of registering mentioned parser
123 `SimplePCEPExtensionProviderContext <https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=blob;f=pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/pojo/SimplePCEPExtensionProviderContext.java;hb=refs/for/stable/boron>`__.
124 All registries are implemented in package
125 `pcep-spi <https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=tree;f=pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/pojo;hb=refs/for/stable/boron>`__.
130 Parsing of PCEP elements is mostly done equally to BGP, the only
131 exception is message parsing, that is described here.
133 In BGP messages, parsing of first-level elements (path-attributes) can
134 be validated in a simple way, as the attributes should be ordered
135 chronologically. PCEP, on the other hand, has a strict object order
136 policy, that is described in RBNF (Routing Backus-Naur Form) in each
137 RFC. Therefore the algorithm for parsing here is to parse all objects in
138 order as they appear in the message. The result of parsing is a list of
139 *PCEPObjects*, that is put through validation. *validate()* methods are
140 present in each message parser. Depending on the complexity of the
141 message, it can contain either a simple condition (checking the presence
142 of a mandatory object) or a full state machine.
144 In addition to that, PCEP requires sending error message for each
145 documented parsing error. This is handled by creating an empty list of
146 messages *errors* which is then passed as argument throughout whole
147 parsing process. If some parser encounters *PCEPDocumentedException*, it
148 has the duty to create appropriate PCEP error message and add it to this
149 list. In the end, when the parsing is finished, this list is examined
150 and all messages are sent to peer.
152 Better understanding provides this sequence diagram:
154 .. figure:: ./images/bgpcep/pcep-parsing.png
162 This section summarizes module pcep-ietf-stateful. The term *stateful*
164 `draft-ietf-pce-stateful-pce <http://tools.ietf.org/html/draft-ietf-pce-stateful-pce>`__
166 `draft-ietf-pce-pce-initiated-lsp <http://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp>`__
167 in versions draft-ietf-pce-stateful-pce-07 with
168 draft-ietf-pce-pce-initiated-lsp-00.
170 We will upgrade our implementation, when the stateful draft gets
173 The stateful module is implemented as extensions to pcep-base-parser.
174 The stateful draft declared new elements as well as additional fields or
175 TLVs (type,length,value) to known objects. All new elements are defined
176 in yang models, that contain augmentations to elements defined in
177 `pcep-types.yang <https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=blob;f=pcep/api/src/main/yang/pcep-types.yang;hb=refs/for/stable/boron>`__.
178 In the case of extending known elements, the *Parser* class merely
179 extends the base class and overrides necessary methods as shown in
182 .. figure:: ./images/bgpcep/validation.png
183 :alt: Extending existing parsers
185 Extending existing parsers
187 All parsers (including those for newly defined PCEP elements) have to be
188 registered via the *Activator* class. This class is present in both
191 In addition to parsers, the stateful module also introduces additional
192 session proposal. This proposal includes new fields defined in stateful
193 drafts for Open object.
195 PCEP segment routing (SR)
196 ~~~~~~~~~~~~~~~~~~~~~~~~~
198 PCEP Segment Routing is an extension of base PCEP and
199 pcep-ietf-stateful-07 extension. The pcep-segment-routing module
201 `draft-ietf-pce-segment-routing-01 <http://tools.ietf.org/html/draft-ietf-pce-segment-routing-01>`__.
203 The extension brings new SR-ERO (Explicit Route Object) and SR-RRO
204 (Reported Route Object) subobject composed of SID (Segment Identifier)
205 and/or NAI (Node or Adjacency Identifier). The segment Routing path is
206 carried in the ERO and RRO object, as a list of SR-ERO/SR-RRO subobjects
207 in an order specified by the user. The draft defines new TLV -
208 SR-PCE-CAPABILITY TLV, carried in PCEP Open object, used to negotiate
209 Segment Routing ability.
211 | The yang models of subobject, SR-PCE-CAPABILITY TLV and appropriate
212 augmentations are defined in
213 `odl-pcep-segment-routing.yang <https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=blob;f=pcep/segment-routing/src/main/yang/odl-pcep-segment-routing.yang;hb=refs/for/stable/boron>`__.
214 | The pcep-segment-routing module includes parsers/serializers for new
216 (`SrEroSubobjectParser <https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=blob;f=pcep/segment-routing/src/main/java/org/opendaylight/protocol/pcep/segment/routing/SrEroSubobjectParser.java;hb=refs/for/stable/boron>`__)
218 (`SrPceCapabilityTlvParser <https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=blob;f=pcep/segment-routing/src/main/java/org/opendaylight/protocol/pcep/segment/routing/SrPceCapabilityTlvParser.java;hb=refs/for/stable/boron>`__).
220 The pcep-segment-routing module implements
221 `draft-ietf-pce-lsp-setup-type-01 <http://tools.ietf.org/html/draft-ietf-pce-lsp-setup-type-01>`__,
222 too. The draft defines new TLV - Path Setup Type TLV, which value
223 indicate path setup signaling technique. The TLV may be included in
224 RP(Request Parameters)/SRP(Stateful PCE Request Parameters) object. For
225 the default RSVP-TE (Resource Reservation Protocol), the TLV is omitted.
226 For Segment Routing, PST = 1 is defined.
228 The Path Setup Type TLV is modeled with yang in module
229 `pcep-types.yang <https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=blob;f=pcep/api/src/main/yang/pcep-types.yang;hb=refs/for/stable/boron>`__.
230 A parser/serializer is implemented in
231 `PathSetupTypeTlvParser <https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=blob;f=pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/PathSetupTypeTlvParser.java;hb=refs/for/stable/boron>`__
232 and it is overriden in segment-routing module to provide the aditional
235 PCEP Synchronization Procedures Optimization
236 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238 Optimizations of Label Switched Path State Synchronization Procedures
239 for a Stateful PCE draft-ietf-pce-stateful-sync-optimizations-03
240 specifies following optimizations for state synchronization and the
241 corresponding PCEP procedures and extensions:
243 - **State Synchronization Avoidance:** To skip state synchronization if
244 the state has survived and not changed during session restart.
246 - **Incremental State Synchronization:** To do incremental (delta)
247 state synchronization when possible.
249 - **PCE-triggered Initial Synchronization:** To let PCE control the
250 timing of the initial state synchronization. The capability can be
251 applied to both full and incremental state synchronization.
253 - **PCE-triggered Re-synchronization:** To let PCE re-synchronize the
254 state for sanity check.
259 PCEP data is displayed only through one URL that is accessible from the
260 base network-topology URL:
262 *http://localhost:8181/restconf/operational/network-topology:network-topology/topology/pcep-topology*
264 Each PCC will be displayed as a node:
269 <path-computation-client>
270 <ip-address>42.42.42.42</ip-address>
271 <state-sync>synchronized</state-sync>
274 <initiation>true</initiation>
275 <lsp-update-capability>true</lsp-update-capability>
278 </path-computation-client>
279 <node-id>pcc://42.42.42.42</node-id>
283 If some tunnels are configured on the network, they would be displayed
284 on the same page, within a node that initiated the tunnel:
289 <path-computation-client>
290 <state-sync>synchronized</state-sync>
293 <initiation>true</initiation>
294 <lsp-update-capability>true</lsp-update-capability>
300 <operational>down</operational>
302 <ignore>false</ignore>
304 <create>false</create>
305 <administrative>true</administrative>
306 <remove>false</remove>
307 <delegate>true</delegate>
308 <processing-rule>false</processing-rule>
312 <ipv4-tunnel-sender-address>43.43.43.43</ipv4-tunnel-sender-address>
313 <ipv4-tunnel-endpoint-address>0.0.0.0</ipv4-tunnel-endpoint-address>
314 <ipv4-extended-tunnel-id>0.0.0.0</ipv4-extended-tunnel-id>
316 <tunnel-id>0</tunnel-id>
320 <path-name>Zm9v</path-name>
321 </symbolic-path-name>
325 <ip-address>43.43.43.43</ip-address>
326 </path-computation-client>
327 <node-id>pcc://43.43.43.43</node-id>
330 Note that, the *<path-name>* tag displays tunnel name in Base64
333 API Reference Documentation
334 ---------------------------
336 Javadocs are generated while creating mvn:site and they are located in
337 target/ directory in each module.