Merge "Migrate ALTO user docs to rst"
[docs.git] / docs / user-guide / pcep-user-guide.rst
1 PCEP User Guide
2 ===============
3
4 Overview
5 --------
6
7 The OpenDaylight Karaf distribution comes preconfigured with baseline
8 PCEP configuration.
9
10 -  **32-pcep.xml** (basic PCEP configuration, including session
11    parameters)
12
13 -  **39-pcep-provider.xml** (configuring for PCEP provider)
14
15 Configuring PCEP
16 ----------------
17
18 The default shipped configuration will start a PCE server on
19 0.0.0.0:4189. You can change this behavior in **39-pcep-provider.xml**:
20
21 .. code:: xml
22
23     <module>
24      <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">prefix:pcep-topology-provider</type>
25      <name>pcep-topology</name>
26      <listen-address>192.168.122.55</listen-address>
27      <listen-port>4189</listen-port>
28     ...
29     </module>
30
31 -  **listen-address** - adress on which PCE will be started and listen
32
33 -  **listen-port** - port on which the address will be started and
34    listen
35
36 PCEP default configuration is set to conform stateful PCEP extensions:
37
38 -  `draft-ietf-pce-stateful-pce-07 <http://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07>`__
39    - PCEP Extensions for Stateful PCE
40
41 -  `draft-ietf-pce-pce-initiated-lsp-00 <https://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp-00>`__
42    - PCEP Extensions for PCE-initiated LSP Setup in a Stateful PCE Model
43
44 -  `draft-ietf-pce-stateful-sync-optimizations-03 <https://tools.ietf.org/html/draft-ietf-pce-stateful-sync-optimizations-03>`__
45    - Optimizations of Label Switched Path State Synchronization
46    Procedures for a Stateful PCE
47
48 PCEP Segment Routing
49 ~~~~~~~~~~~~~~~~~~~~
50
51 Conforms
52 `draft-ietf-pce-segment-routing <http://tools.ietf.org/html/draft-ietf-pce-segment-routing-01>`__
53 - PCEP extension for Segment Routing
54
55 The default configuration file is located in etc/opendaylight/karaf.
56
57 -  **33-pcep-segment-routing.xml** - You don’t need to edit this file.
58
59 Tunnel Management
60 -----------------
61
62 Programming tunnels through PCEP is one of the key features of PCEP
63 implementation in OpenDaylight. User can create, update and delete
64 tunnel via RESTCONF calls. Tunnel (LSP - Label Switched Path) arguments
65 are passed through RESTCONF and generate a PCEP message that is sent to
66 PCC (which is also specified via RESTCONF call). PCC sends a response
67 back to OpenDaylight. The response is then interpreted and sent to
68 RESTCONF, where, in case of success, the new LSP is displayed.
69
70 The PCE Segment Routing Extends draft-ietf-pce-stateful-pce-07 and
71 draft-ietf-pce-pce-initiated-lsp-00, brings new Segment Routing Explicit
72 Route Object (SR-ERO) subobject composed of SID (Segment Identifier)
73 and/or NAI (Node or Adjacency Identifier). Segment Routing path is
74 carried in the ERO object, as a list of SR-ERO subobjects ordered by
75 user. The draft redefines format of messages (PCUpd, PCRpt, PCInitiate)
76 - along with common header, they can hold SPR, LSP and SR-ERO
77 (containing only SR-ERO subobjects) objects.
78
79 Creating LSP
80 ~~~~~~~~~~~~
81
82 An LSP in PCEP can be created in one or two steps. Making an add-lsp
83 operation will trigger a PcInitiate message to PCC.
84
85 **URL:**
86 http://localhost:8181/restconf/operations/network-topology-pcep:add-lsp
87
88 **Method:** POST
89
90 **Content-Type:** application/xml
91
92 **Body:**
93
94 **PCE Active Stateful:**
95
96 .. code:: xml
97
98     <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
99      <node>pcc://43.43.43.43</node>
100      <name>update-tunel</name>
101      <arguments>
102       <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
103        <delegate>true</delegate>
104        <administrative>true</administrative>
105       </lsp>
106       <endpoints-obj>
107        <ipv4>
108         <source-ipv4-address>43.43.43.43</source-ipv4-address>
109         <destination-ipv4-address>39.39.39.39</destination-ipv4-address>
110        </ipv4>
111       </endpoints-obj>
112       <ero>
113        <subobject>
114         <loose>false</loose>
115         <ip-prefix><ip-prefix>201.20.160.40/32</ip-prefix></ip-prefix>
116        </subobject>
117        <subobject>
118         <loose>false</loose>
119         <ip-prefix><ip-prefix>195.20.160.39/32</ip-prefix></ip-prefix>
120        </subobject>
121        <subobject>
122         <loose>false</loose>
123         <ip-prefix><ip-prefix>39.39.39.39/32</ip-prefix></ip-prefix>
124        </subobject>
125       </ero>
126      </arguments>
127      <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>
128     </input>
129
130 **PCE Segment Routing:**
131
132 .. code:: xml
133
134     <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
135      <node>pcc://43.43.43.43</node>
136      <name>update-tunnel</name>
137      <arguments>
138       <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
139        <delegate>true</delegate>
140        <administrative>true</administrative>
141       </lsp>
142       <endpoints-obj>
143        <ipv4>
144         <source-ipv4-address>43.43.43.43</source-ipv4-address>
145         <destination-ipv4-address>39.39.39.39</destination-ipv4-address>
146        </ipv4>
147       </endpoints-obj>
148       <path-setup-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
149        <pst>1</pst>
150       </path-setup-type>
151       <ero>
152        <subobject>
153         <loose>false</loose>
154         <sid-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">ipv4-node-id</sid-type>
155         <m-flag xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">true</m-flag>
156         <sid xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">12</sid>
157         <ip-address xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">39.39.39.39</ip-address>
158        </subobject>
159       </ero>
160      </arguments>
161      <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>
162     </input>
163
164 Updating LSP
165 ~~~~~~~~~~~~
166
167 Making an update-lsp operation will trigger a PCUpd message to PCC.
168 Updating can be used to change or add additional information to the LSP.
169
170 You can only successfully update an LSP if you own the delegation. You
171 automatically own the delegation, if you’ve created the LSP. You don’t
172 own it, if another PCE created this LSP. In this case PCC is only
173 reporting this LSP for you, as read-only (you’ll see
174 ``<delegate>false</delegate>``). However OpenDaylight won’t restrict you
175 from trying to modify the LSP, but you will be stopped by receiving a
176 PCErr message from PCC.
177
178 To revoke delegation, don’t forget to set ``<delegate>`` to true.
179
180 **URL:**
181 http://localhost:8181/restconf/operations/network-topology-pcep:update-lsp
182
183 **Method:** POST
184
185 **Content-Type:** application/xml
186
187 **Body:**
188
189 **PCE Active Stateful:**
190
191 .. code:: xml
192
193     <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
194      <node>pcc://43.43.43.43</node>
195      <name>update-tunel</name>
196      <arguments>
197       <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
198        <delegate>true</delegate>
199        <administrative>true</administrative>
200       </lsp>
201       <ero>
202        <subobject>
203         <loose>false</loose>
204         <ip-prefix><ip-prefix>200.20.160.41/32</ip-prefix></ip-prefix>
205        </subobject>
206        <subobject>
207         <loose>false</loose>
208         <ip-prefix><ip-prefix>196.20.160.39/32</ip-prefix></ip-prefix>
209        </subobject>
210        <subobject>
211         <loose>false</loose>
212         <ip-prefix><ip-prefix>39.39.39.39/32</ip-prefix></ip-prefix>
213        </subobject>
214       </ero>
215      </arguments>
216      <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>
217     </input>
218
219 **PCE Segment Routing:**
220
221 .. code:: xml
222
223     <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
224      <node>pcc://43.43.43.43</node>
225      <name>update-tunnel</name>
226      <arguments>
227       <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
228        <delegate>true</delegate>
229        <administrative>true</administrative>
230       </lsp>
231       <path-setup-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
232        <pst>1</pst>
233       </path-setup-type>
234       <ero>
235        <subobject>
236         <loose>false</loose>
237         <sid-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">ipv4-node-id</sid-type>
238         <m-flag xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">true</m-flag>
239         <sid xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">11</sid>
240         <ip-address xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">200.20.160.41</ip-address>
241        </subobject>
242        <subobject>
243         <loose>false</loose>
244         <sid-type xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">ipv4-node-id</sid-type>
245         <m-flag xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">true</m-flag>
246         <sid xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">12</sid>
247         <ip-address xmlns="urn:opendaylight:params:xml:ns:yang:pcep:segment:routing">39.39.39.39</ip-address>
248        </subobject>
249       </ero>
250      </arguments>
251      <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>
252     </input>
253
254 Removing LSP
255 ~~~~~~~~~~~~
256
257 Removing LSP from PCC is done via following RESTCONF URL. Making a
258 remove-lsp operation will trigger a PCInitiate message to PCC, with
259 remove-flag in SRP set to true.
260
261 You can only successfully remove an LSP if you own the delegation. You
262 automatically own the delegation, if you’ve created the LSP. You don’t
263 own it, if another PCE created this LSP. In this case PCC is only
264 reporting this LSP for you, as read-only (you’ll see
265 ``<delegate>false</delegate>``). However OpenDaylight won’t restrict you
266 from trying to remove the LSP, but you will be stopped by receiving a
267 PCErr message from PCC.
268
269 To revoke delegation, don’t forget to set ``<delegate>`` to true.
270
271 **URL:**
272 http://localhost:8181/restconf/operations/network-topology-pcep:remove-lsp
273
274 **Method:** POST
275
276 **Content-Type:** application/xml
277
278 **Body:**
279
280 .. code:: xml
281
282     <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
283      <node>pcc://43.43.43.43</node>
284      <name>update-tunel</name>
285      <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>
286     </input>
287
288 PCE-triggered Initial Synchronization
289 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
290
291 Making an trigger-sync operation will trigger a PCUpd message to PCC
292 with PLSP-ID = 0 and SYNC = 1 in order to trigger the LSP-DB
293 synchronization process.
294
295 **URL:**
296 http://localhost:8181/restconf/operations/network-topology-pcep:trigger-sync
297
298 **Method:** POST
299
300 **Content-Type:** application/xml
301
302 **Body:**
303
304 .. code:: xml
305
306     <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
307      <node>pcc://43.43.43.43</node>
308      <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>
309     </input>
310
311 PCE-triggered Re-synchronization
312 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
313
314 Making an trigger-resync operation will trigger a PCUpd message to PCC.
315 The PCE can choose to re-synchronize its entire LSP database or a single
316 LSP.
317
318 **URL:**
319 http://localhost:8181/restconf/operations/network-topology-pcep:trigger-sync
320
321 **Method:** POST
322
323 **Content-Type:** application/xml
324
325 **Body:**
326
327 .. code:: xml
328
329     <input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
330      <node>pcc://43.43.43.43</node>
331      <name>re-sync-lsp</name>
332      <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>
333     </input>
334
335 PCE-triggered LSP database Re-synchronization
336 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
337
338 PCE-triggered LSP database Re-synchronization works same as in
339 PCE-triggered Initial Synchronization.
340