7 The ALTO project is aimed to provide support for **Application Layer
8 Traffic Optimization** services defined in `RFC
9 7285 <https://tools.ietf.org/html/rfc7285>`__ in OpenDaylight.
11 This user guide will introduce the three basic services (namely
12 ``simple-ird``, ``manual-maps`` and ``host-tracker``) which are
13 implemented since the Beryllium release, and give instructions on how to
14 configure them to provide corresponding ALTO services.
16 A new feature named ``simple-pce`` (**Simple Path Computation Engine**)
17 is added into Boron release as an ALTO extension service.
19 How to Identify ALTO Resources
20 ------------------------------
22 Each ALTO resource can be uniquely identified by a tuple . For each
23 resource, a *version-tag* is used to support historical look-ups.
25 The formats of *resource-id* and *version-tag* are defined in `section
26 10.2 <https://tools.ietf.org/html/rfc7285#section-10.2>`__ and `section
27 10.3 <https://tools.ietf.org/html/rfc7285#section-10.3>`__ respectively.
28 The *context-id* is not part of the protocol and we choose the same
29 format as a *universal unique identifier* (UUID) which is defined in
30 `RFC 4122 <http://tools.ietf.org/html/rfc4122>`__.
32 A context is like a namespace for ALTO resources, which eliminates
33 *resource-id* collisions. For simplicity, we also provide a default
34 context with the id **000000000000-0000-0000-0000-00000000**.
39 The simple IRD feature provides a simple *information resource
40 directory* (IRD) service defined in `RFC
41 7285 <https://tools.ietf.org/html/rfc7285#section-9>`__.
46 To enable simple IRD, run the following command in the karaf CLI:
50 karaf > feature:install odl-alto-simpleird
52 After the feature is successfully installed, a special context will be
53 created for all simple IRD resources. The id for this context can be
54 seen by executing the following command in a terminal:
58 curl -X GET -u admin:admin http://localhost:8181/restconf/operational/alto-simple-ird:information/
63 To create a new IRD resource, two fields MUST be provided:
65 - Field **instance-id**: the *resource-id* of the IRD resource;
67 - Field **entry-context**: the context-id for non-IRD entries managed
70 Using the following script, one can create an empty IRD resource:
75 # filename: ird-create
80 CONTEXT_ID="00000000-0000-0000-0000-000000000000"
82 URL="`http://localhost:8181/restconf/config/alto-simple-ird:ird-instance-configuration/"$INSTANCE_ID"/[`http://localhost:8181/restconf/config/alto-simple-ird:ird-instance-configuration/"$INSTANCE_ID"/`]`"
84 | sed 's/\$1/'$CONTEXT_ID'/g' \
85 | sed 's/\$2/'$INSTANCE_ID'/g')
86 curl -4 -D - -X PUT -u admin:admin \
87 -H "Content-Type: application/json" -d "$(echo $DATA)"\
90 For example, the following command will create a new IRD named *ird*
91 which can accept entries with the default context-id:
95 $ ./ird-create ird 000000000000-0000-0000-0000-00000000
97 And below is the what the template file looks like:
102 "ird-instance-configuration": {
103 "entry-context": "/alto-resourcepool:context[alto-resourcepool:context-id='$1']",
111 To remove an existing IRD (and all the entries in it), one can use the
112 following command in a terminal:
116 curl -X DELETE -u admin:admin http://localhost:8181/restconf/config/alto-simple-ird:ird-instance-configuration/$INSTANCE_ID
121 There are several ways to add entries to an IRD and in this section we
122 introduce only the simplest method. Using the following script, one can
123 add a new entry to the target IRD.
125 For each new entry, four parameters MUST be provided:
127 - Parameter *ird-id*: the *resource-id* of the target IRD;
129 - Parameter *entry-id*: the *resource-id* of the ALTO service to be
132 - Parameter *context-id*: the *context-id* of the ALTO service to be
133 added, which MUST be identical to the target IRD’s *entry-context*;
135 - Parameter *location*: either a URI or a relative path to the ALTO
138 The following script can be used to add one entry to the target IRD,
139 where the relative path is used:
144 # filename: ird-add-entry
149 URL="`http://localhost:8181/restconf/config/alto-simple-ird:ird-instance-configuration/"$IRD_ID"/ird-configuration-entry/"$ENTRY_ID"/"
150 DATA=$(cat template \
151 | sed 's/\$1/'$ENTRY_ID'/g' \
152 | sed 's/\$2/'$CONTEXT_ID'/g' \
153 | sed 's/\$3/'$BASE_URL'/g' )
154 curl -4 -D - -X PUT -u admin:admin \
155 -H "Content-Type: application/json" -d "$(echo $DATA)" \
158 For example, the following command will add a new resource named
159 *networkmap*, whose context-id is the default context-id and the base
160 URL is /alto/networkmap, to the IRD named *ird*:
164 $ ./ird-add-entry ird networkmap 000000000000-0000-0000-0000-00000000 /alto/networkmap
166 And below is the template file:
171 "ird-configuration-entry": {
173 "instance": "/alto-resourcepool:context[alto-resourcepool:context-id='$2']/alto-resourcepool:resource[alto-resourcepool:resource-id='$1']",
181 To remove an entry from an IRD, one can use the following one-line
186 curl -X DELETE -u admin:admin http://localhost:8181/restconf/config/alto-simple-ird:ird-instance-configuration/$IRD_ID/ird-configuration-entry/$ENTRY_ID/
188 How to Use Host-tracker-based ECS
189 ---------------------------------
191 As a real instance of ALTO services, ***alto-hosttracker*** reads data
192 from ***l2switch*** and generates a network map with resource id
193 ***hosttracker-network-map*** and a cost map with resource id
194 ***hostracker-cost-map***. It can only work with OpenFlow-enabled
197 After installing the ***odl-alto-hosttracker*** feature, the
198 corresponding network map and cost map will be inserted into the data
201 Managing Resource with ``alto-resourcepool``
202 --------------------------------------------
204 After installing ``odl-alto-release`` feature in Karaf,
205 ``alto-resourcepool`` feature will be installed automatically. And you
206 can manage all resources in ALTO via RESTCONF APIs provided by
207 ``alto-resourcepool``.
209 With the example bash script below you can get any resource infomation
219 CONTEXT_ID="00000000-0000-0000-0000-000000000000"
221 URL="http://localhost:8181/restconf/operational/alto-resourcepool:context/"$CONTEXT_ID"/alto-resourcepool:resource/"$RESOURCE_ID
222 curl -X GET -u admin:admin $URL | python -m json.tool | sed -n '/default-tag/p' | sed 's/.*:.*\"\(.*\)\".*/\1/g'
230 After installing ``odl-alto-release`` feature in Karaf, it is possible
231 to manage network-maps and cost-maps using RESTCONF. Take a look at all
232 the operations provided by ``resource-config`` at the API service page
233 which can be found at
234 ``http://localhost:8181/apidoc/explorer/index.html``.
236 The easiest method to operate network-maps and cost-maps is to modify
237 data broker via RESTCONF API directly.
242 The ``resource-config`` package also provides a query RPC to config the
243 resources. You can CREATE, UPDATE and DELETE **network-maps** and
244 **cost-maps** via query RPC.
246 Simple Path Computation Engine
247 ------------------------------
249 The ``simple-pce`` module provides a simple path computation engine for
250 ALTO and other projects. It supports basic CRUD (create, read, update,
251 delete) operations to manage L2 and L3 routing with/without rate
252 limitation. This module is an independent feature, so you can follow the
253 instruction below to install it independently.
257 karaf > feature:install odl-alto-extenstion
261 The rate limitation meter requires OpenFlow 1.3 support.
263 Basic Usage with RESTCONF API
264 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
266 You can use the simple path computation engine with RESTCONF API, which
267 is defined in the YANG model
268 `here <https://git.opendaylight.org/gerrit/gitweb?p=alto.git;a=blob;f=alto-extensions/simple-pce/api/src/main/yang/alto-spce.yang;h=f5bbe6744f7dfba493edd275aa18114e363727ab;hb=refs/heads/stable/boron>`__.
276 One of the key use case for ALTO is server selection. For example, a
277 client (with IP address 10.0.0.1) sends a data transferring request to
278 Data Transferring Service (DTS). And there are three data replica
279 servers (with IP address 10.60.0.1, 10.60.0.2 and 10.60.0.3) which can
280 response the request. In this case, DTS can send a query request to ALTO
281 server to make server selection decision.
283 Following is an example ALTO query:
287 POST /alto/endpointcost HTTP/1.1
289 Content-Type: application/alto-endpointcostparams+json
290 Accept: application/alto-endpointcost+json,application/alto-error+json
293 "cost-mode": "ordinal",
294 "cost-metric": "hopcount"
297 "srcs": [ "ipv4:10.0.0.1" ],