1 == PCEP Developer Guide
4 This section provides an overview of *feature odl-bgpcep-pcep-all* . This
5 feature will install everything needed for PCEP (Path Computation Element
6 Protocol) including establishing the connection, storing information about LSPs
7 (Label Switched Paths) and displaying data in network-topology overview.
10 Each feature represents a module in the BGPCEP codebase. The following diagram
11 illustrates how the features are related.
13 image::bgpcep/pcep-dependency-tree.png[height="450px",width="550px",title="PCEP Dependency Tree"]
15 === Key APIs and Interfaces
19 ===== Session handling
21 _32-pcep.xml_ defines only pcep-dispatcher the parser should be
22 using (global-pcep-extensions), factory for creating session proposals
23 (you can create different proposals for different PCCs (Path Computation Clients)).
28 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:impl">prefix:pcep-dispatcher-impl</type>
29 <name>global-pcep-dispatcher</name>
31 <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extensions</type>
32 <name>global-pcep-extensions</name>
34 <pcep-session-proposal-factory>
35 <type xmlns:pcep="urn:opendaylight:params:xml:ns:yang:controller:pcep">pcep:pcep-session-proposal-factory</type>
36 <name>stateful07-proposal</name>
37 </pcep-session-proposal-factory>
39 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-threadgroup</type>
40 <name>global-boss-group</name>
43 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-threadgroup</type>
44 <name>global-worker-group</name>
49 For user configuration of PCEP, check User Guide.
53 The base PCEP parser includes messages and attributes from
54 http://tools.ietf.org/html/rfc5441[RFC5441],
55 http://tools.ietf.org/html/rfc5541[RFC5541],
56 http://tools.ietf.org/html/rfc5455[RFC5455],
57 http://tools.ietf.org/html/rfc5557[RFC5557] and
58 http://tools.ietf.org/html/rfc5521[RFC5521].
62 All parsers and serializers need to be registered
63 into _Extension provider_. This _Extension provider_ is configured in
64 initial configuration of the parser-spi module (_32-pcep.xml_).
69 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">prefix:pcep-extensions-impl</type>
70 <name>global-pcep-extensions</name>
72 <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
73 <name>pcep-parser-base</name>
76 <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
77 <name>pcep-parser-ietf-stateful07</name>
80 <type xmlns:pcepspi="urn:opendaylight:params:xml:ns:yang:controller:pcep:spi">pcepspi:extension</type>
81 <name>pcep-parser-ietf-initiated00</name>
86 * _pcep-parser-base_ - will register parsers and serializers
87 implemented in pcep-impl module
89 * _pcep-parser-ietf-stateful07_ - will register parsers and
90 serializers implemented in stateful07 module
92 Stateful07 module is a good example of a PCEP parser extension.
94 Configuration of PCEP parsers specifies one implementation of _Extension
95 provider_ that will take care of registering mentioned parser
97 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/lithium[SimplePCEPExtensionProviderContext].
98 All registries are implemented in package
99 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/lithium[pcep-spi].
103 Parsing of PCEP elements is mostly done equally to BGP,
104 the only exception is message parsing, that is described here.
106 In BGP messages, parsing of first-level elements (path-attributes)
107 can be validated in a simple way, as the attributes should be ordered
108 chronologically. PCEP, on the other hand, has a strict object order
109 policy, that is described in RBNF (Routing Backus-Naur Form) in each RFC.
110 Therefore the algorithm for parsing here is to parse all objects in order
111 as they appear in the message. The result of parsing is a list of _PCEPObjects_,
112 that is put through validation. _validate()_ methods are present in each
113 message parser. Depending on the complexity of the message, it can
114 contain either a simple condition (checking the presence of a mandatory
115 object) or a full state machine.
117 In addition to that, PCEP requires sending error message for each
118 documented parsing error. This is handled by creating an empty list of
119 messages _errors_ which is then passed as argument throughout whole
120 parsing process. If some parser encounters _PCEPDocumentedException_,
121 it has the duty to create appropriate PCEP error message and add it to
122 this list. In the end, when the parsing is finished, this list is
123 examined and all messages are sent to peer.
125 Better understanding provides this sequence diagram:
127 image::bgpcep/pcep-parsing.png[height="450px",width="550px",title="Parsing"]
129 ==== PCEP IETF stateful
131 This section summarizes module pcep-ietf-stateful07. The term
133 http://tools.ietf.org/html/draft-ietf-pce-stateful-pce[draft-ietf-pce-stateful-pce]
135 http://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp[draft-ietf-pce-pce-initiated-lsp]
136 in versions draft-ietf-pce-stateful-pce-07 with draft-ietf-pce-pce-initiated-lsp-00.
138 We will upgrade our implementation, when the stateful draft gets
141 The stateful module is implemented as extensions to pcep-base-parser.
142 The stateful draft declared new elements as well as additional fields or
143 TLVs (type,length,value) to known objects. All new elements are defined in yang models, that
144 contain augmentations to elements defined in
145 https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=blob;f=pcep/api/src/main/yang/pcep-types.yang;hb=refs/for/stable/lithium[pcep-types.yang].
146 In the case of extending known elements, the _Parser_ class merely extends
147 the base class and overrides necessary methods as shown in following
150 image::bgpcep/validation.png[height="450px",width="550px",title="Extending existing parsers"]
152 All parsers (including those for newly defined PCEP elements) have to be
153 registered via the _Activator_ class. This class is present in both modules.
155 In addition to parsers, the stateful module also introduces additional session
156 proposal. This proposal includes new fields defined in stateful drafts
159 ==== PCEP segment routing (SR)
161 PCEP Segment Routing is an extension of base PCEP and
162 pcep-ietf-stateful-07 extension. The pcep-segment-routing module
164 http://tools.ietf.org/html/draft-ietf-pce-segment-routing-01[draft-ietf-pce-segment-routing-01].
166 The extension brings new SR-ERO (Explicit Route Object) and SR-RRO (Reported Route Object)
167 subobject composed of SID (Segment Identifier) and/or NAI (Node or Adjacency Identifier).
168 The segment Routing path is carried in the ERO and RRO object, as a list of
169 SR-ERO/SR-RRO subobjects in an order specified by the user. The draft defines new TLV -
170 SR-PCE-CAPABILITY TLV, carried in PCEP Open object, used to negotiate Segment
173 The yang models of subobject, SR-PCE-CAPABILITY TLV and appropriate
174 augmentations are defined in
175 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/lithium[odl-pcep-segment-routing.yang]. +
176 The pcep-segment-routing module includes parsers/serializers for new
178 (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/lithium[SrEroSubobjectParser])
180 (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/lithium[SrPceCapabilityTlvParser]).
182 The pcep-segment-routing module implements
183 http://tools.ietf.org/html/draft-ietf-pce-lsp-setup-type-01[draft-ietf-pce-lsp-setup-type-01],
184 too. The draft defines new TLV - Path Setup Type TLV, which value
185 indicate path setup signaling technique. The TLV may be included in
186 RP(Request Parameters)/SRP(Stateful PCE Request Parameters) object.
187 For the default RSVP-TE (Resource Reservation Protocol), the TLV is omitted.
188 For Segment Routing, PST = 1 is defined.
190 The Path Setup Type TLV is modeled with yang in module
191 https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=blob;f=pcep/api/src/main/yang/pcep-types.yang;hb=refs/for/stable/lithium[pcep-types.yang].
192 A parser/serializer is implemented in
193 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/lithium[PathSetupTypeTlvParser]
194 and it is overriden in segment-routing module to provide the aditional
199 PCEP data is displayed only through one URL that is accessible from the base network-topology URL:
201 _http://localhost:8181/restconf/operational/network-topology:network-topology/topology/pcep-topology_
203 Each PCC will be displayed as a node:
208 <path-computation-client>
209 <ip-address>42.42.42.42</ip-address>
210 <state-sync>synchronized</state-sync>
213 <initiation>true</initiation>
214 <lsp-update-capability>true</lsp-update-capability>
217 </path-computation-client>
218 <node-id>pcc://42.42.42.42</node-id>
223 If some tunnels are configured on the network, they would be displayed on the same page, within a node that initiated the tunnel:
228 <path-computation-client>
229 <state-sync>synchronized</state-sync>
232 <initiation>true</initiation>
233 <lsp-update-capability>true</lsp-update-capability>
239 <operational>down</operational>
241 <ignore>false</ignore>
243 <create>false</create>
244 <administrative>true</administrative>
245 <remove>false</remove>
246 <delegate>true</delegate>
247 <processing-rule>false</processing-rule>
251 <ipv4-tunnel-sender-address>43.43.43.43</ipv4-tunnel-sender-address>
252 <ipv4-tunnel-endpoint-address>0.0.0.0</ipv4-tunnel-endpoint-address>
253 <ipv4-extended-tunnel-id>0.0.0.0</ipv4-extended-tunnel-id>
255 <tunnel-id>0</tunnel-id>
259 <path-name>Zm9v</path-name>
260 </symbolic-path-name>
264 <ip-address>43.43.43.43</ip-address>
265 </path-computation-client>
266 <node-id>pcc://43.43.43.43</node-id>
270 Note that, the _<path-name>_ tag displays tunnel name in Base64 encoding.
272 === API Reference Documentation
273 Javadocs are generated while creating mvn:site
274 and they are located in target/ directory in each module.