BK User Guide 20160221
BK User Guide 20160221
BK User Guide 20160221
User Guide
Beryllium (February 21, 2016)
OpenDaylight User Guide February 21, 2016 Beryllium
ii
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
I. Getting Started with OpenDaylight .............................................................................. 1
1. OpenDaylight Controller Overview ...................................................................... 2
2. Using the OpenDaylight User Interface (DLUX) .................................................... 3
Getting Started with DLUX ............................................................................. 3
Logging In ...................................................................................................... 3
Working with DLUX ........................................................................................ 3
Viewing Network Statistics .............................................................................. 4
Viewing Network Topology ............................................................................. 4
Interacting with the YANG-based MD-SAL datastore ....................................... 5
3. Running XSQL Console Commands and Queries ................................................. 12
XSQL Overview .............................................................................................. 12
Installing XSQL .............................................................................................. 12
XSQL Console Commands .............................................................................. 12
XSQL Queries ................................................................................................ 13
4. Setting Up Clustering ........................................................................................ 15
Clustering Overview ...................................................................................... 15
Single Node Clustering .................................................................................. 15
Multiple Node Clustering ............................................................................... 16
II. Applications and Plugins ............................................................................................ 21
5. ALTO User Guide ............................................................................................... 22
Overview ....................................................................................................... 22
ALTO Architecture ......................................................................................... 22
Configuring ALTO ......................................................................................... 22
Administering or Managing ALTO ................................................................. 23
6. Authentication and Authorization Services ........................................................ 26
Authentication Service ................................................................................... 26
Administering OpenDaylight Authentication Services ..................................... 32
OpenDaylight Authorization Service .............................................................. 33
7. Armoury ............................................................................................................ 34
Overview ....................................................................................................... 34
Armoury Architecture .................................................................................... 34
Armoury Catalog ........................................................................................... 34
Armoury Workload Manager ......................................................................... 35
Armoury Driver Registry ................................................................................ 35
Tutorials ........................................................................................................ 35
8. BGP User Guide ................................................................................................. 37
Overview ....................................................................................................... 37
Configuring BGP ............................................................................................ 37
Configuration through RESTCONF ................................................................. 41
Tutorials ........................................................................................................ 45
9. CAPWAP User Guide ......................................................................................... 49
Overview ....................................................................................................... 49
CAPWAP Architecture ................................................................................... 49
Scope of CAPWAP Project ............................................................................. 49
Installing CAPWAP ........................................................................................ 49
Configuring CAPWAP .................................................................................... 49
Administering or Managing CAPWAP ............................................................ 50
Tutorials ........................................................................................................ 50
iii
OpenDaylight User Guide February 21, 2016 Beryllium
iv
OpenDaylight User Guide February 21, 2016 Beryllium
v
OpenDaylight User Guide February 21, 2016 Beryllium
vi
OpenDaylight User Guide February 21, 2016 Beryllium
vii
OpenDaylight User Guide February 21, 2016 Beryllium
List of Figures
2.1. DLUX Modules ......................................................................................................... 4
2.2. Topology Module ..................................................................................................... 5
2.3. Yang UI .................................................................................................................... 6
2.4. Yang API Specification .............................................................................................. 7
2.5. Yang UI API Specification ......................................................................................... 8
2.6. DLUX Yang Topology ............................................................................................... 9
2.7. DLUX List Elements ................................................................................................ 10
2.8. DLUX List Warnings ................................................................................................ 10
2.9. DLUX List Button1 .................................................................................................. 11
11.1. Intent System Process and Policy Surfaces ............................................................. 53
11.2. GBP Access Model Terminology - Endpoints, EndpointGroups, Contract ................. 55
11.3. GBP Access Model Terminology - Subject, Classifier, Action .................................... 56
11.4. GBP Forwarding Model Terminology - L3 Context, L2 Bridge Context, L2 Flood
Context/Domain, Subnet ............................................................................................... 57
11.5. GBP Access (or Core) Model ................................................................................. 58
11.6. GBP Forwarding Model ......................................................................................... 59
11.7. GBP Endpoints, EndpointGroups and Contracts ..................................................... 60
11.8. GBP Endpoints and the Forwarding Model ............................................................ 61
11.9. GBP High Level Beryllium Architecture .................................................................. 62
11.10. GBP High Level Beryllium Architecture - adding a renderer ................................... 63
11.11. GBP High Level Beryllium Architecture - adding a renderer ................................... 63
11.12. Basic view ........................................................................................................... 70
11.13. Governance view ................................................................................................ 71
11.14. Expressed policy .................................................................................................. 72
11.15. Delivered policy .................................................................................................. 73
11.16. Subject detail ...................................................................................................... 73
11.17. EPG detail ........................................................................................................... 74
11.18. Renderer state .................................................................................................... 75
11.19. Navigation menu ................................................................................................ 76
11.20. CRUD operations ................................................................................................ 77
11.21. L2/L3 Topology ................................................................................................... 78
11.22. Config Topology ................................................................................................. 78
11.23. Wizard ................................................................................................................ 83
11.24. Neutron Port ...................................................................................................... 85
11.25. Neutron Network ............................................................................................... 85
11.26. Neutron Subnet .................................................................................................. 86
11.27. Neutron Security Group and Rules ...................................................................... 86
11.28. Neutron Router .................................................................................................. 87
11.29. Neutron network mapping ................................................................................. 88
11.30. Neutron subnet mapping .................................................................................... 89
11.31. Neutron port mapping ....................................................................................... 89
11.32. OfOverlay within GBP ......................................................................................... 91
11.33. OfOverlay expanded view: .................................................................................. 92
11.34. OfOverlay Flow Pipeline ...................................................................................... 93
11.35. GBP and SFC integration environment ............................................................... 103
11.36. GBP and SFC symmetric chain environment ....................................................... 104
11.37. GBP and SFC assymmetric chain environment .................................................... 104
12.1. Address Observations .......................................................................................... 114
viii
OpenDaylight User Guide February 21, 2016 Beryllium
ix
OpenDaylight User Guide February 21, 2016 Beryllium
List of Tables
3.1. Supported XSQL Console Commands ...................................................................... 12
3.2. Supported XSQL Query Criteria Operators .............................................................. 13
15.1. LISP Address Formats .......................................................................................... 133
15.2. Nodes in the tutorial .......................................................................................... 135
25.1. Table Transport Ingress ....................................................................................... 241
25.2. Table Path Mapper ............................................................................................. 242
25.3. Table Next Hop .................................................................................................. 242
25.4. Table Transport Egress ........................................................................................ 242
x
Part I. Getting Started with OpenDaylight
This first part of the user guide covers the basic user operations of the OpenDaylight Release using the
generic base functionality.
OpenDaylight User Guide February 21, 2016 Beryllium
• Maven: OpenDaylight uses Maven for easier build automation. Maven uses pom.xml
(Project Object Model) to script the dependencies between bundle and also to describe
what bundles to load and start.
• JAVA interfaces: Java interfaces are used for event listening, specifications, and forming
patterns. This is the main way in which specific bundles implement call-back functions for
events and also to indicate awareness of specific state.
• REST APIs: These are northbound APIs such as topology manager, host tracker, flow
programmer, static routing, and so on.
The controller exposes open northbound APIs which are used by applications. The OSGi
framework and bidirectional REST are supported for the northbound APIs. The OSGi
framework is used for applications that run in the same address space as the controller
while the REST (web-based) API is used for applications that do not run in the same address
space (or even the same system) as the controller. The business logic and algorithms reside
in the applications. These applications use the controller to gather network intelligence, run
its algorithm to do analytics, and then orchestrate the new rules throughout the network.
On the southbound, multiple protocols are supported as plugins, e.g. OpenFlow 1.0,
OpenFlow 1.3, BGP-LS, and so on. The OpenDaylight controller starts with an OpenFlow 1.0
southbound plugin. Other OpenDaylight contributors begin adding to the controller code.
These modules are linked dynamically into a Service Abstraction Layer (SAL).
The SAL exposes services to which the modules north of it are written. The SAL figures
out how to fulfill the requested service irrespective of the underlying protocol used
between the controller and the network devices. This provides investment protection to
the applications as OpenFlow and other protocols evolve over time. For the controller
to control devices in its domain, it needs to know about the devices, their capabilities,
reachability, and so on. This information is stored and managed by the Topology Manager.
The other components like ARP handler, Host Tracker, Device Manager, and Switch
Manager help in generating the topology database for the Topology Manager.
For a more detailed overview of the OpenDaylight controller, see the OpenDaylight
Developer Guide.
2
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Getting Started with DLUX ............................................................................................. 3
Logging In ...................................................................................................................... 3
Working with DLUX ........................................................................................................ 3
Viewing Network Statistics .............................................................................................. 4
Viewing Network Topology ............................................................................................. 4
Interacting with the YANG-based MD-SAL datastore ....................................................... 5
This section introduces you to the OpenDaylight User Experience (DLUX) application.
Logging In
To log in to DLUX, after installing the application:
Note
OpenDaylight’s default credentials are admin for both the username and
password.
Note
To make sure topology displays all the details, enable the odl-l2switch-switch
feature in Karaf.
DLUX has other applications such as node, yang UI and those apps won’t show up, until
you enable their features odl-dlux-node and odl-dlux-yangui respectively in the Karaf
distribution.
3
OpenDaylight User Guide February 21, 2016 Beryllium
Note
If you install your application in dlux, they will also show up on the left hand
navigation after browser page refresh.
1. Select Nodes on the left pane. The right pane displays atable that lists all the nodes,
node connectors and the statistics.
3. Click on the Node Connector number to view details such as port ID, port name, number
of ports per switch, MAC Address, and so on.
4. Click Flows in the Statistics column to view Flow Table Statistics for the particular node
like table ID, packet match, active flows and so on.
5. Click Node Connectors to view Node Connector Statistics for the particular node ID.
4
OpenDaylight User Guide February 21, 2016 Beryllium
Note
DLUX does not allow for editing or adding topology information. The
topology is generated and edited in other modules, e.g., the OpenFlow plugin.
OpenDaylight stores this information in the MD-SAL datastore where DLUX can
read and display it.
1. Select Topology on the left pane. You will view the graphical representation on the right
pane. In the diagram blue boxes represent the switches, the black represents the hosts
available, and lines represents how the switches and hosts are connected.
2. Hover your mouse on hosts, links, or switches to view source and destination ports.
3. Zoom in and zoom out using mouse scroll to verify topology for larger topologies.
5
OpenDaylight User Guide February 21, 2016 Beryllium
1. Select Yang UI on the left pane. The right pane is divided in two parts.
2. The top part displays a tree of APIs, subAPIs, and buttons to call possible functions (GET,
POST, PUT, and DELETE).
Note
Not every subAPI can call every function. For example, subAPIs in the
operational store have GET functionality only.
Inputs can be filled from OpenDaylight when existing data from OpenDaylight is
displayed or can be filled by user on the page and sent to OpenDaylight.
Buttons under the API tree are variable. It depends on subAPI specifications. Common
buttons are:
You must specify the xpath for all these operations. This path is displayed in the same
row before buttons and it may include text inputs for specific path element identifiers.
6
OpenDaylight User Guide February 21, 2016 Beryllium
3. The bottom part of the right pane displays inputs according to the chosen subAPI.
• Lists are handled as a special case. For example, a device can store multiple flows. In
this case "flow" is name of the list and every list element is identified by a unique key
value. Elements of a list can, in turn, contain other lists.
• In Yang UI, each list element is rendered with the name of the list it belongs to, its key,
its value, and a button for removing it from the list.
7
OpenDaylight User Guide February 21, 2016 Beryllium
4. After filling in the relevant inputs, click the Show Preview button under the API tree to
display request that will be sent to OpenDaylight. A pane is displayed on the right side
with text of request when some input is filled.
8
OpenDaylight User Guide February 21, 2016 Beryllium
1. To add a new list element with empty inputs use the plus icon-button + that is provided
after list name.
2. To remove several list elements, use the X button that is provided after every list
element.
9
OpenDaylight User Guide February 21, 2016 Beryllium
3. In the YANG-based data store all elements of a list must have a unique key. If you try to
assign two or more elements the same key, a warning icon ! is displayed near their name
buttons.
4. When the list contains at least one list element, after the + icon, there are buttons to
select each individual list element. You can choose one of them by clicking on it. In
10
OpenDaylight User Guide February 21, 2016 Beryllium
addition, to the right of the list name, there is a button which will display a vertically
scrollable pane with all the list elements.
11
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
XSQL Overview ............................................................................................................. 12
Installing XSQL .............................................................................................................. 12
XSQL Console Commands .............................................................................................. 12
XSQL Queries ................................................................................................................ 13
XSQL Overview
XSQL is an XML-based query language that describes simple stored procedures which parse
XML data, query or update database tables, and compose XML output. XSQL allows you to
query tree models like a sequential database. For example, you could run a query that lists
all of the ports configured on a particular module and their attributes.
The following sections cover the XSQL installation process, supported XSQL commands, and
the way to structure queries.
Installing XSQL
To run commands from the XSQL console, you must first install XSQL on your system:
2. Start Karaf:
./bin/karaf
3. Install XSQL:
feature:install odl-mdsal-xsql
The following table describes the commands supported in this OpenDaylight release.
12
OpenDaylight User Guide February 21, 2016 Beryllium
list vtables Lists the schema node containers that are currently installed. Whenever an
OpenDaylight module is installed, its YANG model is placed in the schema context.
At that point, the XSQL receives a notification, confirms that the module’s YANG
model resides in the schema context and then maps the model to XSQL by setting
up the necessary vtables and vfields. This command is useful when you need to
determine vtable information for a query.
list vfields <vtable name> Lists the vfields present in a specific vtable. This command is useful when you need
to determine vfields information for a query.
jdbc <ip address> When the ODL server is behind a firewall, and the JDBC client cannot connect to
the JDBC server, run this command to start the client as a server and establish a
connection.
exit Closes the console.
tocsv Enables or disables the forwarding of query output as a .csv file.
filename <filename> Specifies the .tocsv file to which the query data is exported. If you do not specify a
value for this option when the toccsv option is enabled, the filename for the query
data file is generated automatically.
XSQL Queries
You can run a query to extract information that meets the criteria you specify using the
information provided by the list vtables and list vfields <vtable name> commands. Any
query you run should be structured as follows:
select <vfields you want to search for, separated by a comma and a space> from <vtables
you want to search in, separated by a comma and a space> where <criteria> *<criteria
operator>;*
For example, if you want to search the nodes/node ID field in the nodes/node-connector
table and find every instance of the Hardware-Address object that contains BA in its text
string, enter the following query:
select nodes/node.ID from nodes/node-connector where Hardware-Address like
'%BA%';
13
OpenDaylight User Guide February 21, 2016 Beryllium
• Network Element 1
• Module 1, Type XX
• Port 1
• Port 2
• Module 2, Type YY
• Port 1
• Port 2
If you specify Module.Type=YY in your query criteria, the ports associated with module 1.1
will not be returned since its parent module is type XX. Instead, enter Module.Type=YY or
skip Module!=YY. This tells XSQL to disregard any parent module data that does not meet
the type YY criteria and collect results for any matching child modules. In this example, you
are instructing the query to skip module 1 and collect the relevant data from module 1.1.
14
OpenDaylight User Guide February 21, 2016 Beryllium
4. Setting Up Clustering
Table of Contents
Clustering Overview ...................................................................................................... 15
Single Node Clustering .................................................................................................. 15
Multiple Node Clustering ............................................................................................... 16
Clustering Overview
Clustering is a mechanism that enables multiple processes and programs to work together
as one entity. For example, when you search for something on google.com, it may seem
like your search request is processed by only one web server. In reality, your search request
is processed by may web servers connected in a cluster. Similarly, you can have multiple
instances of OpenDaylight working together as one entity.
• Scaling: If you have multiple instances of OpenDaylight running, you can potentially do
more work and store more data than you could with only one instance. You can also
break up your data into smaller chunks (shards) and either distribute that data across the
cluster or perform certain operations on certain members of the cluster.
• High Availability: If you have multiple instances of OpenDaylight running and one of
them crashes, you will still have the other instances working and available.
• Data Persistence: You will not lose any data stored in OpenDaylight after a manual
restart or a crash.
The following sections describe how to set up clustering on both individual and multiple
OpenDaylight instances.
feature:install odl-mdsal-clustering
Note
This will enabled the cluster-ready version of the MD-SAL data store, but will
not actually create a cluster of multiple instances. The result is that you will get
data persistence, but not the scaling or high availability advantages.
15
OpenDaylight User Guide February 21, 2016 Beryllium
Deployment Considerations
To implement clustering, the deployment considerations are as follows:
• To set up a cluster with multiple nodes, we recommend that you use a minimum of three
machines. You can set up a cluster with just two nodes. However, if one of the two
nodes fail, the cluster will not be operational.
Note
This is because clustering in OpenDaylight requires a majority of the nodes to
be up and one node cannot be a majority of two nodes.
• Every device that belongs to a cluster needs to have an identifier. OpenDaylight uses the
node’s role for this purpose. After you define the first node’s role as member-1 in the
akka.conf file, OpenDaylight uses member-1 to identify that node.
• Data shards are used to contain all or a certain segment of a OpenDaylight’s MD-SAL
datastore. For example, one shard can contain all the inventory data while another shard
contains all of the topology data.
If you do not specify a module in the modules.conf file and do not specify a shard
in module-shards.conf, then (by default) all the data is placed in the default
shard (which must also be defined in module-shards.conf file). Each shard has
replicas configured. You can specify the details of where the replicas reside in module-
shards.conf file.
• If you have a three node cluster and would like to be able to tolerate any single node
crashing, a replica of every defined data shard must be running on all three cluster
nodes.
Note
This is because OpenDaylight’s clustering implementation requires a majority
of the defined shard replicas to be running in order to function. If you define
data shard replicas on two of the cluster nodes and one of those nodes goes
down, the corresponding data shards will not function.
• If you have a three node cluster and have defined replicas for a data shard on each
of those nodes, that shard will still function even if only two of the cluster nodes are
running. Note that if one of those remaining two nodes goes down, the shard will not be
operational.
• It is recommended that you have multiple seed nodes configured. After a cluster member
is started, it sends a message to all of its seed nodes. The cluster member then sends a
join command to the first seed node that responds. If none of its seed nodes reply, the
cluster member repeats this process until it successfully establishes a connection or it is
shut down.
16
OpenDaylight User Guide February 21, 2016 Beryllium
• After a node is unreachable, it remains down for configurable period of time (10
seconds, by default). Once a node goes down, you need to restart it so that it can rejoin
the cluster. Once a restarted node joins a cluster, it will synchronize with the lead node
automatically.
First, determine the three machines that will make up the cluster. After that, do the
following on each machine:
• configuration/initial/akka.conf
• configuration/initial/module-shards.conf
a. Find every instance of the following lines and replace 127.0.0.1 with the hostname or
IP address of the machine on which this file resides and OpenDaylight will run:
netty.tcp {
hostname = "127.0.0.1"
Note
The value you need to specify will be different for each node in the
cluster.
b. Find the following lines and replace 127.0.0.1 with the hostname or IP address of any
of the machines that will be part of the cluster:
cluster {
seed-nodes = ["akka.tcp://[email protected]:2550"]
c. Find the following section and specify the role for each member node. Here we assign
the first node with the member-1 role, the second node with the member-2 role, and
the third node with the member-3 role:
roles = [
"member-1"
]
Note
This step should use a different role on each node.
17
OpenDaylight User Guide February 21, 2016 Beryllium
replicas = [
"member-1",
"member-2",
"member-3"
]
7. Enable clustering by running the following command at the Karaf command line:
feature:install odl-mdsal-clustering
OpenDaylight should now be running in a three node cluster. You can use any of the three
member nodes to access the data residing in the datastore.
metric-capture-enabled = true
akka {
loglevel = "DEBUG"
loggers = ["akka.event.slf4j.Slf4jLogger"]
actor {
provider = "akka.cluster.ClusterActorRefProvider"
serializers {
java = "akka.serialization.JavaSerializer"
proto = "akka.remote.serialization.ProtobufSerializer"
}
serialization-bindings {
"com.google.protobuf.Message" = proto
}
}
remote {
log-remote-lifecycle-events = off
netty.tcp {
hostname = "10.194.189.96"
port = 2550
maximum-frame-size = 419430400
18
OpenDaylight User Guide February 21, 2016 Beryllium
send-buffer-size = 52428800
receive-buffer-size = 52428800
}
}
cluster {
seed-nodes = ["akka.tcp://[email protected]:2550"]
auto-down-unreachable-after = 10s
roles = [
"member-1"
]
}
}
}
odl-cluster-rpc {
bounded-mailbox {
mailbox-type = "org.opendaylight.controller.cluster.common.actor.
MeteredBoundedMailbox"
mailbox-capacity = 1000
mailbox-push-timeout-time = 100ms
}
metric-capture-enabled = true
akka {
loglevel = "INFO"
loggers = ["akka.event.slf4j.Slf4jLogger"]
actor {
provider = "akka.cluster.ClusterActorRefProvider"
}
remote {
log-remote-lifecycle-events = off
netty.tcp {
hostname = "10.194.189.96"
port = 2551
}
}
cluster {
seed-nodes = ["akka.tcp://[email protected]:2551"]
auto-down-unreachable-after = 10s
}
}
}
module-shards = [
{
name = "default"
shards = [
{
name="default"
19
OpenDaylight User Guide February 21, 2016 Beryllium
replicas = [
"member-1",
"member-2",
"member-3"
]
}
]
},
{
name = "topology"
shards = [
{
name="topology"
replicas = [
"member-1",
"member-2",
"member-3"
]
}
]
},
{
name = "inventory"
shards = [
{
name="inventory"
replicas = [
"member-1",
"member-2",
"member-3"
]
}
]
},
{
name = "toaster"
shards = [
{
name="toaster"
replicas = [
"member-1",
"member-2",
"member-3"
]
}
]
}
]
20
Part II. Applications and Plugins
This second part of the user guide covers project specific usage instructions.
OpenDaylight User Guide February 21, 2016 Beryllium
Overview
The ALTO project provides support for Application Layer Traffic Optimization services
defined in RFC 7285.
In the Lithium release, ALTO uses the YANG model described in this draft.
ALTO Architecture
There are three kinds of ALTO packages in OpenDaylight.
b. Utilities:
Configuring ALTO
There are three packages that require their own configuration files, including alto-
provider, alto-hosttracker and simple-impl. However, the only configurable
option is the type of the data broker in all three configuration files.
22
OpenDaylight User Guide February 21, 2016 Beryllium
With the example input below you can insert a network map into the data store, either by
filling the form in the API doc page, or by using tools such as curl.
HOST_IP=localhost # IP address of the controller
CREDENTIAL=admin:admin # username and password for authentication
BASE_URL=$HOST_IP:8181/restconf/config
SERVICE_PATH=alto-service:resources/alto-service:network-maps/alto-
service:network-map
RESOURCE_ID=test_odl # Should match the one in the input file
curl -X PUT -H "content-type:application/yang.data+json" \
-d @example-input.json -u $CREDENTIAL \
http://$BASE_URL/$SERVICE_PATH/$RESOURCE_ID
{
"alto-service:network-map": [
{
"alto-service:map": [
{
"alto-service:endpoint-address-group": [
{
"alto-service:address-type": "ipv4",
"alto-service:endpoint-prefix": [
"192.0.2.0/24",
"198.51.100.0/25"
]
}
],
"alto-service:pid": "PID1"
},
{
"alto-service:endpoint-address-group": [
{
"alto-service:address-type": "ipv4",
"alto-service:endpoint-prefix": [
"198.51.100.128/25"
]
}
],
"alto-service:pid": "PID2"
},
{
23
OpenDaylight User Guide February 21, 2016 Beryllium
"alto-service:endpoint-address-group": [
{
"alto-service:address-type": "ipv4",
"alto-service:endpoint-prefix": [
"0.0.0.0/0"
]
},
{
"alto-service:address-type": "ipv6",
"alto-service:endpoint-prefix": [
"::/0"
]
}
],
"alto-service:pid": "PID3"
}
],
"alto-service:resource-id": "test_odl",
"alto-service:tag": "da65eca2eb7a10ce8b059740b0b2e3f8eb1d4785"
}
]
}
Use DELETE method to remove the data from the data store.
HOST_IP=localhost # IP address of the controller
CREDENTIAL=admin:admin # username and password for authentication
BASE_URL=$HOST_IP:8181/restconf/config
SERVICE_PATH=alto-service:resources/alto-service:network-maps/alto-
service:network-map
RESOURCE_ID=test_odl
curl -X DELETE -H "content-type:application/yang.data+json" \
-u $CREDENTIAL http://$BASE_URL/$SERVICE_PATH/$RESOURCE_ID
Using alto-manager
The alto-manager package provides a karaf command line tool which wraps up the
functions described in the last section.
karaf > alto-create <type> <resource-file>
karaf > alto-delete <type> <resource-id>
Currently only network-map and cost-map are supported. Also the resource files used in
alto-manager follow the RFC7285-compatible format instead of RESTCONF format.
The following example shows how to use alto-manager to put a network map into the
data store.
karaf > alto-create network-map example-rfc7285-networkmap.json
24
OpenDaylight User Guide February 21, 2016 Beryllium
{
"meta" : {
"resource-id": "test_odl",
"tag": "da65eca2eb7a10ce8b059740b0b2e3f8eb1d4785"
},
"network-map" : {
"PID1" : {
"ipv4": [
"192.0.2.0/24",
"192.51.100.0/25"
]
},
"PID2": {
"ipv4": [
"192.51.100.128/25"
]
},
"PID3": {
"ipv4": [
"0.0.0.0/0"
],
"ipv6": [
"::/0"
]
}
}
}
Using alto-hosttracker
As a real instance of ALTO services, alto-hosttracker reads data from l2switch
and generates a network map with resource id hosttracker-network-map and a cost
map with resource id hostracker-cost-map. It can only work with OpenFlow-enabled
networks.
25
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Authentication Service ................................................................................................... 26
Administering OpenDaylight Authentication Services ..................................................... 32
OpenDaylight Authorization Service .............................................................................. 33
Authentication Service
Authentication uses the credentials presented by a user to identify the user.
Note
The Authentication user store provided in the Lithium release does not fully
support a clustered node deployment. Specifically, the AAA user store provided
by the H2 database needs to be synchronized using out of band means. The
AAA Token cache is however cluster-capable.
• Provides credentials
Domain A group of resources, direct or indirect, physical, logical, or virtual, for the
purpose of access control
User A person who either owns or has access to a resource or group of resources
on the controller
Claim A data set of validated assertions regarding a user, e.g. the role, domain,
name, etc.
26
OpenDaylight User Guide February 21, 2016 Beryllium
Authentication methods
There are three ways a user may authenticate in OpenDaylight:
• Token-based Authentication
Associated with the user account are user credentials, initially created by the
administrator. OpenDaylight supports only username/password credentials. By
default, an administrator account is present in OpenDaylight out-of-the-box with the
default username and password being admin/admin. In addition to creating the user
account, the controller administrator also assigns roles to that account on one or more
27
OpenDaylight User Guide February 21, 2016 Beryllium
domain. By default, there are two user roles; admin, and user, and there is only one
domain; sdn.
2. The user presents credentials in a token request to the token service within a domain.
4. The controller token endpoint uses the credential authentication entity which returns a
claim for the client.
5. The controller token entity transforms the claim (user, domain, and roles) into a token
which it then provides to the user.
The user is authenticated by the trusted IdP and a claim is returned to the OpenDaylight
authentication service. The claim is transformed into an OpenDaylight claim and
successively into a token that is passed on to the user.
• Webconsole
• Using RESTCONF
Note
Configurations for AAA are all dynamic and require no restart.
Configuring Authentication
To configure features from the Web console:
28
OpenDaylight User Guide February 21, 2016 Beryllium
Note
When token’s are expired, they are lazily removed from the cache.
2. Use the Custom HTTP Headers or Custom HTTP Attributes fields to specify the HTTP
headers or attributes for federated authentication. Normally, additional specification
beyond the default is not required.
Note
As the changes you make to the configurations are automatically committed
when they are saved, no restart of the Authentication service is required.
1. Set up an Apache front-end and Apache mods for the OpenDaylight controller.
1. The Apache web server which fronts OpenDaylight AAA sends data to SssdAuthFilter.
29
OpenDaylight User Guide February 21, 2016 Beryllium
Operational model
The mapping model works as follows:
2. A sequence of rules is applied, and the first rule which returns success is considered a
match.
• The mapped values are taken from the local variables set during the rule execution.
• The definition of the rules and mapped results are expressed in JSON notation.
Mapping Users
A JSON Object acts as a mapping template to produce the final associative array of name/
value pairs. The value in a name/value pair can be a constant or a variable. An example of a
mapping template and rule variables in JSON: Template:
{
"organization": "BigCorp.com",
"user: "$subject",
"roles": "$roles"
}
Local variables:
30
OpenDaylight User Guide February 21, 2016 Beryllium
{
"subject": "Sally",
"roles": ["user", "admin"]
}
Example: Splitting a fully qualified username into user and realm components
Some IdPs return a fully qualified username (for example, principal or subject). The fully
qualified username is the concatenation of the user name, separator, and realm name.
The following example shows the mapped result that returns the user and realm as
independent values for the fully qualified username is [email protected] .
Also, users may be granted roles based on their membership in certain groups.
The Authentication Service allows white lists for users with specific roles. The white lists
ensure that users are unconditionally accepted and authorized with specific roles. Users
who must be unconditionally denied access can be placed in a black list.
31
OpenDaylight User Guide February 21, 2016 Beryllium
OpenDaylight resource users Resource users do not need to authenticate: they can access
resources if they are given an access tokens by the resource owner. The default timeout for
access tokens is 1 hour (This duration is configurable.). An OpenDaylight resource user does
the following:
• Gets access tokens either from a resource owner or the controller administrator
System Components
IdmLight Identity manager Stores local user authentication and authorization data,
provides an Admin REST API for CRUD operations.
32
OpenDaylight User Guide February 21, 2016 Beryllium
on the users/roles/domains database. The IdmLight REST API is by default accessed via
the {controller baseURI:8181}/auth/v1/ API end point. Access to the API is restricted to
authenticated clients only, or those possessing a token:
The following document contains a detailed list of supported CRUD operations allowed by
the API:
https://wiki.opendaylight.org/images/a/ad/AAA_Idmlight_REST_APIs.xlsx
33
OpenDaylight User Guide February 21, 2016 Beryllium
7. Armoury
Table of Contents
Overview ....................................................................................................................... 34
Armoury Architecture .................................................................................................... 34
Armoury Catalog ........................................................................................................... 34
Armoury Workload Manager ........................................................................................ 35
Armoury Driver Registry ................................................................................................ 35
Tutorials ........................................................................................................................ 35
This section describes how to use the Armoury feature in OpenDaylight and contains
contains configuration, administration, and management sections for the feature.
Overview
Just as compute needs to make requests to the controller to get networking resources in
order to provide its services, so too does the controller sometimes need to make requests of
the workload manager to get compute resources and/or network function (NF) (physical or
virtual) orchestration to provide its services.
Armoury Architecture
There are mainly three components :
• Armoury Workload Manager The most minimal possible API to allow applications to
request that the workload manager start/stop/etc the NF and some information from
the workload manager/nf orchestrator about the state of the NF.
Armoury Catalog
The NF Catalog contains metadata describing a NF.
34
OpenDaylight User Guide February 21, 2016 Beryllium
Tutorials
Below are tutorials for Armoury.
Overview
TBD: An overview of the Armoury Catalog tutorial
Prerequisites
TBD: Provide any prerequisite information, assumed knowledge, or environment required
to execute the use case.
Target Environment
TBD: Include any topology requirement for the use case.
35
OpenDaylight User Guide February 21, 2016 Beryllium
Instructions
TBD: Step by step procedure for using Armoury Catalog.
Overview
TBD: An overview of the Armoury Workload Manager tutorial
Prerequisites
TBD: Provide any prerequisite information, assumed knowledge, or environment required
to execute the use case.
Target Environment
TBD: Include any topology requirement for the use case.
Instructions
TBD: Step by step procedure for using Armoury Workload Manager.
Overview
TBD: An overview of the Armoury Driver Registry tutorial
Prerequisites
TBD: Provide any prerequisite information, assumed knowledge, or environment required
to execute the use case.
Target Environment
TBD: Include any topology requirement for the use case.
Instructions
TBD: Step by step procedure for using Armoury Driver Registry.
36
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ....................................................................................................................... 37
Configuring BGP ............................................................................................................ 37
Configuration through RESTCONF ................................................................................. 41
Tutorials ........................................................................................................................ 45
Overview
The OpenDaylight Karaf distribution comes pre-configured with baseline BGP
configuration. You can find it in the etc/opendaylight/karaf directory and it consists of two
files:
The next sections will describe how to configure BGP manually or using RESTCONF.
Configuring BGP
RIB
<module>
<type>prefix:rib-impl</type>
<name>example-bgp-rib</name>
<rib-id>example-bgp-rib</rib-id>
<local-as>64496</local-as>
<bgp-id>192.0.2.2</bgp-id>
<cluster-id>192.0.2.3</cluster-id>
...
</module>
• rib-id - BGP RIB Identifier, in this configuration file you can specify more BGP RIBs by
copy-pasting the above module. These RIBs must have a unique rib-id and name.
• local-as - Our local AS number (where OpenDaylight is deployed), we use this in best
path selection
• bgp-id - Our local BGP identifier (the IP of the VM where OpenDaylight is deployed), we
use this in best path selection.
• cluster-id - Cluster Identifier, non-mandatory, if not specified, BGP Identifier will be used
MIGHT NOT BE NEEDED: depending on your BGP router, you might need to switch from
linkstate attribute type 99 to 29. Check with your router vendor. Change the field iana-
37
OpenDaylight User Guide February 21, 2016 Beryllium
linkstate-attribute-type to true if your router supports type 29. This snippet is located in 31-
bgp.xml file.
<module>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate">prefix:bgp-
linkstate</type>
<name>bgp-linkstate</name>
<iana-linkstate-attribute-type>true</iana-linkstate-attribute-type>
</module>
• iana-linkstate-attribute-type - IANA has issued an early allocation for the BGP Linkstate
path attribute (=29). To preserve (TYPE = 99) set value bellow to false; to use IANA
assigned type set the value to true or remove it as it’s true by default.
BGP Peer
The initial configuration is written so that it will be ignored to prevent the client from
starting with default configuration. Therefore the first step is to uncomment the module
containing bgp-peer.
<module>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-
peer</type>
<name>example-bgp-peer</name>
<host>192.0.2.1</host>
<holdtimer>180</holdtimer>
<peer-role>ibgp</peer-role>
<rib>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:rib-
instance</type>
<name>example-bgp-rib</name>
</rib>
...
</module>
• name - BGP Peer name, in this configuration file you can specify more BGP Peers by copy-
pasting the above module. These peers must have a unique name.
• host - IP address or hostname of BGP speaker (IP where OpenDaylight should connect to
gather topology)
• peer-role - If peer role is not present, default value "ibgp" will be used (allowed values are
also "ebgp" and "rr-client"). This field is case-sensitive.
38
OpenDaylight User Guide February 21, 2016 Beryllium
• connect-time - How long we should wait (miliseconds) for the TCP connect attempt,
overrides default connection timeout dictated by TCP retransmits
<module>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-
acceptor</type>
<name>bgp-peer-server</name>
<!--Default parameters-->
<!--<binding-address>0.0.0.0</binding-address>-->
<!--<binding-port>1790</binding-port>-->
...
<!--Drops or accepts incoming BGP connection, every BGP Peer that should
be accepted needs to be added to this registry-->
<peer-registry>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-
registry</type>
<name>global-bgp-peer-registry</name>
</peer-registry>
</module>
39
OpenDaylight User Guide February 21, 2016 Beryllium
To add BGP Peer configuration into the registry, it is necessary to configure regular BGP
peer just like in example in 41-bgp-example.xml. Notice that the BGP peer depends on the
same bgp-peer-registry as bgp-speaker:
<module>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-
peer</type>
<name>example-bgp-peer</name>
<host>192.0.2.1</host>
...
<peer-registry>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-
registry</type>
<name>global-bgp-peer-registry</name>
</peer-registry>
...
</module>
The BGP peer registers itself into the registry, which allows incoming BGP connections
handled by the bgp-speaker. (Config attribute peer-registry is optional for now to preserve
backwards compatibility). With this configuration, the connection to 192.0.2.1 is initiated
by OpenDaylight but will also be accepted from 192.0.2.1. In case both connections are
being established, only one of them will be preserved and the other will be dropped.
The connection initiated from device with lower bgp id will be dropped by the registry.
Each BGP peer must be configured in its own module. Note, that the name of the module
needs to be unique, so if you are configuring more peers, when changing the host, change
also the name. There is a way to configure the peer only for incoming connections (The
connection will not be initiated by the OpenDaylight, OpenDaylight will only wait for
incoming connection from the peer. The peer is identified by its IP address). To configure
peer only for incoming connection add attribute initiate-connection to peer’s configuration:
<module>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-
peer</type>
<name>example-bgp-peer</name>
<host>192.0.2.1</host> // IP address or hostname
of the speaker
<holdtimer>180</holdtimer>
<initiate-connection>false</initiate-connection> // Connection will not
be initiated by ODL
...
</module>
40
OpenDaylight User Guide February 21, 2016 Beryllium
• initiate-connection - if set to false OpenDaylight will not initiate connection to this peer.
Default value is true for all peers.
• bgp-peer-id - Our local BGP identifier (the IP of the VM where OpenDaylight is deployed),
we use this in best path selection
• application-rib-id - RIB ID of local application RIB (all the routes that you put to
OpenDaylight will be displayed here)
feature:install odl-netconf-connector-all
To check what modules you have currently configured, check following link: http://
localhost:8181/restconf/config/network-topology:network-topology/topology/topology-
netconf/node/controller-config/yang-ext:mount/config:modules/ This URL is also used to
POST new configuration. If you want to change any other configuration that is listed here,
make sure you include the correct namespaces. RESTCONF will tell you if some namespace
is wrong.
To update an existing configuration use PUT and give the full path to the element you wish
to update.
It is vital that you respect the order of steps described in user guide.
41
OpenDaylight User Guide February 21, 2016 Beryllium
RIB
First, configure RIB. This module is already present in the configuration, therefore we
change only the parameters we need. In this case, it’s bgp-rib-id and local-as.
URL: _ http://127.0.0.1:8181/restconf/config/network-topology:network-topology/
topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/
module/odl-bgp-rib-impl-cfg:rib-impl/example-bgp-rib
PUT:
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-impl</
type>
<name>example-bgp-rib</name>
<session-reconnect-strategy xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">x:reconnect-
strategy-factory</type>
<name>example-reconnect-strategy-factory</name>
</session-reconnect-strategy>
<rib-id xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">example-bgp-
rib</rib-id>
<extensions xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</
type>
<name>global-rib-extensions</name>
</extensions>
<codec-tree-factory xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-
codec-tree-factory</type>
<name>runtime-mapping-singleton</name>
</codec-tree-factory>
<tcp-reconnect-strategy xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">x:reconnect-
strategy-factory</type>
<name>example-reconnect-strategy-factory</name>
</tcp-reconnect-strategy>
<data-provider xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-
async-data-broker</type>
<name>pingpong-binding-data-broker</name>
</data-provider>
<local-as xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">64496</local-as>
<bgp-dispatcher xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
42
OpenDaylight User Guide February 21, 2016 Beryllium
<type>bgp-dispatcher</type>
<name>global-bgp-dispatcher</name>
</bgp-dispatcher>
<dom-data-provider xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-
broker</type>
<name>pingpong-broker</name>
</dom-data-provider>
<local-table xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type>bgp-table-type</type>
<name>ipv4-unicast</name>
</local-table>
<local-table xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type>bgp-table-type</type>
<name>ipv6-unicast</name>
</local-table>
<local-table xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type>bgp-table-type</type>
<name>linkstate</name>
</local-table>
<local-table xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type>bgp-table-type</type>
<name>flowspec</name>
</local-table>
<bgp-rib-id xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">192.0.2.2</bgp-
rib-id>
</module>
Important
MIGHT NOT BE NEEDED depending on your BGP router, you might need a
switch from linkstate attribute type 99 to 29. Check with your router vendor.
Switch the field to true if your router supports type 29.
URL: http://127.0.0.1:8181/restconf/config/network-topology:network-topology/
topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/
module/odl-bgp-linkstate-cfg:bgp-linkstate/bgp-linkstate
PUT:
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate">x:bgp-
linkstate</type>
<name>bgp-linkstate</name>
<iana-linkstate-attribute-type xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate">true</iana-
linkstate-attribute-type>
</module>
43
OpenDaylight User Guide February 21, 2016 Beryllium
BGP Peer
We also need to add new module to configuration (bgp-peer). In this case, the whole
module needs to be configured. Please change values host, holdtimer and peer-role (if
necessary).
POST:
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-peer</
type>
<name>example-bgp-peer</name>
<host xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">192.0.2.1</host>
<holdtimer xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">180</holdtimer>
<peer-role xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">ibgp</peer-role>
<rib xmlns"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-instance</
type>
<name>example-bgp-rib</name>
</rib>
<peer-registry xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-peer-
registry</type>
<name>global-bgp-peer-registry</name>
</peer-registry>
<advertized-table xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-
type</type>
<name>ipv4-unicast</name>
</advertized-table>
<advertized-table xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-
type</type>
<name>ipv6-unicast</name>
</advertized-table>
<advertized-table xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-
type</type>
<name>linkstate</name>
</advertized-table>
<advertized-table xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-
type</type>
<name>flowspec</name>
44
OpenDaylight User Guide February 21, 2016 Beryllium
</advertized-table>
</module>
This is all necessary information that you need to get ODL connect to your speaker.
POST:
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-
application-peer</type>
<name>example-bgp-peer-app</name>
<bgp-peer-id xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">10.25.1.9</bgp-
peer-id> <!-- Your local BGP-ID that will be used in BGP Best Path Selection
algorithm -->
<target-rib xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-instance</
type>
<name>example-bgp-rib</name>
</target-rib>
<application-rib-id xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">example-app-
rib</application-rib-id>
<data-broker xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-
broker</type>
<name>pingpong-broker</name>
</data-broker>
</module>
Tutorials
Viewing BGP Topology
This section summarizes how data from BGP can be viewed through RESTCONF. Currently it
is the only way to view the data.
Important
From Helium release the port changed from 8080 to 8181.
45
OpenDaylight User Guide February 21, 2016 Beryllium
BGP data as were sent from BGP speaker are listed in three topologies (if all three are
configured):
http://localhost:8181/restconf/operational/network-topology:network-topology/
topology/example-linkstate-topology
http://localhost:8181/restconf/operational/network-topology:network-topology/
topology/example-ipv4-topology
http://localhost:8181/restconf/operational/network-topology:network-topology/
topology/example-ipv6-topology
http://localhost:8181/restconf/operational/bgp-rib:bgp-rib/
• AdjRibsIn (per Peer) : Adjacency RIBs In, BGP routes as they come from BGP Peer
• LocRib (per RIB) : Local RIB, BGP routes from all peers
• AdjRibsOut (per Peer) : BGP routes that will be advertizes, after applying Export policies
This is how the output looks like, when address families for IPv4 and Linkstate were
configured:
46
OpenDaylight User Guide February 21, 2016 Beryllium
<loc-rib>
<tables>
</attributes>
<safi>x:linkstate-subsequent-address-family</safi>
<afi>x:linkstate-address-family</afi>
</linkstate-routes>
</tables>
<tables>
</attributes>
<safi>x:unicast-subsequent-address-family</safi>
<afi>x:ipv4-address-family</afi>
</ipv4-routes>
</tables>
</loc-rib>
You can see details for each AFI by expanding the RESTCONF link:
IPv4 : http://localhost:8181/restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-
rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/ipv4-
routes
Linkstate : http://localhost:8181/restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-
rib/loc-rib/tables/bgp-linkstate:linkstate-address-family/bgp-linkstate:linkstate-subsequent-
address-family/linkstate-routes
Populate RIB
If your peer is configured, you can populate the RIB by making following POST call to
RESTCONF:
URL: http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/
bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/
• where example-app-rib is your application RIB id (that you specified in the configuration)
and tables specifies AFI and SAFI of the data that you want to add.
POST:
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
<ipv4-route>
<prefix>200.20.160.1/32</prefix>
<attributes>
<ipv4-next-hop>
<global>199.20.160.41</global>
</ipv4-next-hop><as-path/>
<multi-exit-disc>
<med>0</med>
</multi-exit-disc>
<local-pref>
<pref>100</pref>
</local-pref>
<originator-id>
<originator>41.41.41.41</originator>
</originator-id>
47
OpenDaylight User Guide February 21, 2016 Beryllium
<origin>
<value>igp</value>
</origin>
<cluster-id>
<cluster>40.40.40.40</cluster>
</cluster-id>
</attributes>
</ipv4-route>
</ipv4-routes>
48
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ....................................................................................................................... 49
CAPWAP Architecture ................................................................................................... 49
Scope of CAPWAP Project ............................................................................................. 49
Installing CAPWAP ........................................................................................................ 49
Configuring CAPWAP .................................................................................................... 49
Administering or Managing CAPWAP ............................................................................ 50
Tutorials ........................................................................................................................ 50
This document describes how to use the Control And Provisioning of Wireless Access Points
(CAPWAP) feature in OpenDaylight. This document contains configuration, administration,
and management sections for the feature.
Overview
CAPWAP feature fills the gap OpenDaylight Controller has with respect to managing
CAPWAP compliant wireless termination point (WTP) network devices present in enterprise
networks. Intelligent applications (e.g. centralized firmware management, radio planning)
can be developed by tapping into the WTP network device’s operational states via REST
APIs.
CAPWAP Architecture
The CAPWAP feature is implemented as an MD-SAL based provider module, which helps
discover WTP devices and update their states in MD-SAL operational datastore.
Installing CAPWAP
To install CAPWAP, download OpenDaylight and use the Karaf console to install the
following feature:
odl-capwap-ac-rest
Configuring CAPWAP
As of Lithium, there are no configuration requirements.
49
OpenDaylight User Guide February 21, 2016 Beryllium
Tutorials
Viewing Discovered WTPs
Overview
This tutorial can be used as a walk through to understand the steps for starting the
CAPWAP feature, detecting CAPWAP WTPs, accessing the operational states of WTPs.
Prerequisites
It is assumed that user has access to at least one hardware/software based CAPWAP
compliant WTP. These devices should be configured with OpenDaylight controller IP
address as a CAPWAP Access Controller (AC) address. It is also assumed that WTPs and
OpenDaylight controller share the same ethernet broadcast domain.
Instructions
1. Run the OpenDaylight distribution and install odl-capwap-ac-rest from the Karaf console.
2. Go to http://${ipaddress}:8181/apidoc/explorer/index.html
3. Expand capwap-impl
4. Click /operational/capwap-impl:capwap-ac-root/
6. The above step should display list of WTPs discovered using ODL CAPWAP feature.
50
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ....................................................................................................................... 51
DIDM Architecture ........................................................................................................ 51
Overview
The Device Identification and Driver Management (DIDM) project addresses the need to
provide device-specific functionality. Device-specific functionality is code that performs a
feature, and the code is knowledgeable of the capability and limitations of the device.
For example, configuring VLANs and adjusting FlowMods are features, and there may
be different implementations for different device types. Device-specific functionality is
implemented as Device Drivers. Device Drivers need to be associated with the devices they
can be used with. To determine this association requires the ability to identify the device
type.
DIDM Architecture
The DIDM project creates the infrastructure to support the following functions:
• Discovery - Determination that a device exists in the controller management domain and
connectivity to the device can be established. For devices that support the OpenFlow
protocol, the existing discovery mechanism in OpenDaylight suffices. Devices that do
not support OpenFlow will be discovered through manual means such as the operator
entering device information via GUI or REST API.
• Data Models for Common Features – Data models will be defined to perform common
features such as VLAN configuration. For example, applications can configure a VLAN by
writing the VLAN data to the data store as specified by the common data model.
• RPCs for Common Features – Configuring VLANs and adjusting FlowMods are example
of features. RPCs will be defined that specify the APIs for these features. Drivers
implement features for specific devices and support the APIs defined by the RPCs. There
may be different Driver implementations for different device types.
51
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ....................................................................................................................... 52
GBP Base Architecture and Value Proposition ................................................................ 54
Using the GBP UX interface ........................................................................................... 70
Using the GBP API ......................................................................................................... 83
Using OpenStack with GBP ............................................................................................ 84
Using the GBP OpenFlow Overlay (OfOverlay) renderer ................................................. 90
Using the GBP eBPF IO Visor Agent renderer ............................................................... 101
Using the GBP FaaS renderer ....................................................................................... 101
Using Service Function Chaining (SFC) with GBP Neutron Mapper and OfOverlay .......... 102
Demo/Development environment ............................................................................... 107
Overview
OpenDaylight Group Based Policy allows users to express network configuration in a
declarative versus imperative way.
This is often described as asking for "what you want", rather than "how to do it".
An Intent System:
52
OpenDaylight User Guide February 21, 2016 Beryllium
• operational constraints provide policy for the usage of the system which modulates
how the system is consumed. For instance "All Financial applications must use a specific
encryption standard".
• capabilities and state are provided by renderers. Renderers dynamically provide their
capabilities to the core model, allowing the core model to remain non-domain specific.
• governance provides feedback on the delivery of the expressed intent. i.e. "Did we do
what you asked us?"
• automation of intent
Where one person’s concrete is another’s abstract, intent can be fulfilled through a
hierarchical implementation of non-domain specific policy resolution. Domain specifics
53
OpenDaylight User Guide February 21, 2016 Beryllium
are provided by the renderers, and exposed via the API, at each policy resolution
instance. For example:
• To DNS: The name "www.foo.com" is abstract, and it’s IPv4 address 10.0.0.10 is
concrete,
• To an optical network: The port maybe abstract, yet the optical wavelength is
concrete.
Note
This is a very domain specific analogy, tied to something most readers will
understand. It in no way implies the GBP should be implemented in an OSI type
fashion. The premise is that by implementing a full Intent System, the user is
freed from a lot of the constraints of how the expressed intent is realised.
It is important to show the overall philosophy of GBP as it sets the project’s direction.
The Access Model is the core of the GBP Intent System policy resolution process.
54
OpenDaylight User Guide February 21, 2016 Beryllium
55
OpenDaylight User Guide February 21, 2016 Beryllium
56
OpenDaylight User Guide February 21, 2016 Beryllium
• Endpoints:
• EndpointGroups:
• Contracts:
Contracts determine which endpoints can communicate and in what way. Contracts
between pairs of EndpointGroups are selected by the contract selectors defined
by the EndpointGroup. Contracts expose qualities, which are labels that can help
EndpointGroups to select contracts. Once the contract is selected, contracts have clauses
that can match against requirements and capabilities exposed by EndpointGroups, as
well as any conditions that may be set on endpoints, in order to activate subjects that
can allow specific kinds of communication. A contract is allowed to specify a parent
contract from which it inherits.
57
OpenDaylight User Guide February 21, 2016 Beryllium
• Subject
Subjects describe some aspect of how two endpoints are allowed to communicate.
Subjects define an ordered list of rules that will match against the traffic and perform
any necessary actions on that traffic. No communication is allowed unless a subject
allows that communication.
• Clause
Clauses are defined as part of a contract. Clauses determine how a contract should
be applied to particular endpoints and EndpointGroups. Clauses can match against
requirements and capabilities exposed by EndpointGroups, as well as any conditions that
may be set on endpoints. Matching clauses define some set of subjects which can be
applied to the communication between the pairs of endpoints.
58
OpenDaylight User Guide February 21, 2016 Beryllium
The classifier and action portions of the model can be thought of as hooks, with their
definition provided by each renderer about its domain specific capabilities. In GBP
Beryllium, there is one renderer, the OpenFlow Overlay renderer (OfOverlay).
These hooks are filled with definitions of the types of features the renderer can provide the
subject, and are called subject-feature-definitions.
This means an expressed intent can be fulfilled by, and across, multiple renderers
simultaneously, without any specific provisioning from the consumer of GBP.
Since GBP is implemented in OpenDaylight, which is an SDN controller, it also must address
networking. This is done via the forwarding model, which is domain specific to networking,
but could be applied to many different types of networking.
• subnet
• normal IP stack behaviour, where ARP is performed in subnet, and for out of subnet,
traffic is sent to default gateway.
• a subnet can be a child of any of the below forwarding model contexts, but typically
would be a child of a flood-domain
• L2 flood-domain
59
OpenDaylight User Guide February 21, 2016 Beryllium
• L2 bridge-domain
• is a layer2 namespace
• L3 context
• is a layer3 namespace
A simple example of how the access and forwarding models work is as follows:
In this example, the EPG:webservers is providing the web and ssh contracts. The EPG:client
is consuming those contracts. EPG:client is providing the any contract, which is consumed
by EPG:webservers.
The direction keyword is always from the perspective of the provider of the contract. In
this case contract web, being provided by EPG:webservers, with the classifier to match TCP
destination port 80, means:
• will be allowed.
60
OpenDaylight User Guide February 21, 2016 Beryllium
When the forwarding model is considered in the figure above, it can be seen that even
though all endpoints are communicating using a common set of contracts, their forwarding
is contained by the forwarding model contexts or namespaces. In the example shown,
the endpoints associated with a network-containment that has an ultimate parent of
L3Context:Sales can only communicate with other endpoints within this L3Context. In this
way L3VPN services can be implemented without any impact to the Intent of the contract.
61
OpenDaylight User Guide February 21, 2016 Beryllium
The major benefit of this architecture is that the mapping of the domain-specific-language
is completely separate and independent of the underlying renderer implementation.
For instance, using the Neutron Mapper, which maps the Neutron API to the GBP core
model, any contract automatically generated from this mapping can be augmented via
the UX to use Service Function Chaining, a capability not currently available in OpenStack
Neutron.
When another renderer is added, for instance, NetConf, the same policy can now be
leveraged across NetConf devices simultaneously:
62
OpenDaylight User Guide February 21, 2016 Beryllium
As other domain-specific mappings occur, they too can leverage the same renderers, as the
renderers only need to implement the GBP access and forwarding models, and the domain-
specific mapping need only manage mapping to the access and forwarding models. For
instance:
63
OpenDaylight User Guide February 21, 2016 Beryllium
• separates concerns: the Expressed Intent is kept completely separated from the
underlying renderers.
• is cohesive: each part does it’s part and it’s part only
Policy Resolution
Contract Selection
The first step in policy resolution is to select the contracts that are in scope.
• named selector
• target selector.
Target selectors allow for additional flexibility by matching against qualities of the
contract’s target.
Match against a contract’s target with a quality matcher, and participate as a provider.
Match against a contract’s target with a quality matcher, and participate as a consumer.
To determine which contracts are in scope, contracts are found where either the source
EndpointGroup selects a contract as either a provider or consumer, while the destination
EndpointGroup matches against the same contract in the corresponding role. So if
endpoint x in EndpointGroup X is communicating with endpoint y in EndpointGroup Y, a
contract C is in scope if either X selects C as a provider and Y selects C as a consumer, or vice
versa.
64
OpenDaylight User Guide February 21, 2016 Beryllium
The details of how quality matchers work are described further in Matchers. Quality
matchers provide a flexible mechanism for contract selection based on labels.
The end result of the contract selection phase can be thought of as a set of tuples
representing selected contract scopes. The fields of the tuple are:
• Contract ID
• The name of the selector in the provider EndpointGroup that was used to select the
contract, called the matching provider selector.
• The name of the selector in the consumer EndpointGroup that was used to select the
contract, called the matching consumer selector.
Subject Selection
The second phase in policy resolution is to determine which subjects are in scope. The
subjects define what kinds of communication are allowed between endpoints in the
EndpointGroups. For each of the selected contract scopes from the contract selection
phase, the subject selection procedure is applied.
Labels called, capabilities, requirements and conditions are matched against to bring a
Subject into scope. EndpointGroups have capabilities and requirements, while endpoints
have conditions.
When acting as a consumer, EndpointGroups expose requirements, which are labels that
represent that the EndpointGroup requires some specific piece of functionality.
Note that in this example the requirement and capability have the same name, but the user
need not follow this convention.
The matching provider selector (that was used by the provider EndpointGroup to select the
contract) is examined to determine the capabilities exposed by the provider EndpointGroup
for this contract scope.
65
OpenDaylight User Guide February 21, 2016 Beryllium
The provider selector will have a list of capabilities either directly included in the provider
selector or inherited from a parent selector or parent EndpointGroup. (See Inheritance).
Conditions
Endpoints can have conditions, which are labels representing some relevant piece of
operational state related to the endpoint.
Clauses
Clauses perform the actual selection of subjects. A clause has lists of matchers in two
categories. In order for a clause to become active, all lists of matchers must match. A
matching clause will select all the subjects referenced by the clause. Note that an empty list
of matchers counts as a match.
The first category is the consumer matchers, which match against the consumer
EndpointGroup and endpoints. The consumer matchers are:
Label based criteria for matching against endpoints. In Beryllium this can be used to label
endpoints based on IpPrefix.
The second category is the provider matchers, which match against the provider
EndpointGroup and endpoints. The provider matchers are:
66
OpenDaylight User Guide February 21, 2016 Beryllium
Label based criteria for matching against endpoints. In Beryllium this can be used to label
endpoints based on IpPrefix.
Clauses have a list of subjects that apply when all the matchers in the clause match. The
output of the subject selection phase logically is a set of subjects that are in scope for any
particular pair of endpoints.
Rule Application
Now subjects have been selected that apply to the traffic between a particular set of
endpoints, policy can be applied to allow endpoints to communicate. The applicable
subjects from the previous step will each contain a set of rules.
Rules consist of a set of classifiers and a set of actions. Classifiers match against traffic
between two endpoints. An example of a classifier would be something that matches
against all TCP traffic on port 80, or one that matches against HTTP traffic containing a
particular cookie. Actions are specific actions that need to be taken on the traffic before it
reaches its destination. Actions could include tagging or encapsulating the traffic in some
way, redirecting the traffic, or applying a service function chain.
Rules, subjects, and actions have an order parameter, where a lower order value means
that a particular item will be applied first. All rules from a particular subject will be applied
before the rules of any other subject, and all actions from a particular rule will be applied
before the actions from another rule. If more than item has the same order parameter, ties
are broken with a lexicographic ordering of their names, with earlier names having logically
lower order.
Matchers
Matchers specify a set of labels (which include requirements, capabilities, conditions, and
qualities) to match against. There are several kinds of matchers that operate similarly:
• Quality matchers
used in target selectors during the contract selection phase. Quality matchers provide a
more advanced and flexible way to select contracts compared to a named selector.
used in clauses during the subject selection phase to match against requirements and
capabilities on EndpointGroups
• Condition matchers
used in clauses during the subject selection phase to match against conditions on
endpoints
67
OpenDaylight User Guide February 21, 2016 Beryllium
A matcher is, at its heart, fairly simple. It will contain a list of label names, along with a
match type. The match type can be either:
• "all"
which means the matcher matches when all of its labels match
• "any"
which means the matcher matches when any of its labels match,
• "none"
which means the matcher matches when none of its labels match.
Note a match all matcher can be made by matching against an empty set of labels with a
match type of "all."
Additionally each label to match can optionally include a relevant name field. For quality
matchers, this is a target name. For capability and requirement matchers, this is a selector
name. If the name field is specified, then the matcher will only match against targets or
selectors with that name, rather than any targets or selectors.
Inheritance
Some objects in the system include references to parents, from which they will inherit
definitions. The graph of parent references must be loop free. When resolving names, the
resolution system must detect loops and raise an exception. Objects that are part of these
loops may be considered as though they are not defined at all. Generally, inheritance works
by simply importing the objects in the parent into the child object. When there are objects
with the same name in the child object, then the child object will override the parent object
according to rules which are specific to the type of object. We’ll next explore the detailed
rules for inheritance for each type of object
EndpointGroups
EndpointGroups will inherit all their selectors from their parent EndpointGroups. Selectors
with the same names as selectors in the parent EndpointGroups will inherit their behavior
as defined below.
Selectors
Selectors include provider named selectors, provider target selectors, consumer named
selectors, and consumer target selectors. Selectors cannot themselves have parent selectors,
but when selectors have the same name as a selector of the same type in the parent
EndpointGroup, then they will inherit from and override the behavior of the selector in the
parent EndpointGroup.
Named Selectors
Named selectors will add to the set of contract IDs that are selected by the parent named
selector.
Target Selectors
68
OpenDaylight User Guide February 21, 2016 Beryllium
A target selector in the child EndpointGroup with the same name as a target selector in the
parent EndpointGroup will inherit quality matchers from the parent. If a quality matcher
in the child has the same name as a quality matcher in the parent, then it will inherit as
described below under Matchers.
Contracts
Contracts will inherit all their targets, clauses and subjects from their parent contracts.
When any of these objects have the same name as in the parent contract, then the
behavior will be as defined below.
Targets
Targets cannot themselves have a parent target, but it may inherit from targets with the
same name as the target in a parent contract. Qualities in the target will be inherited from
the parent. If a quality with the same name is defined in the child, then this does not have
any semantic effect except if the quality has its inclusion-rule parameter set to "exclude." In
this case, then the label should be ignored for the purpose of matching against this target.
Subjects
Subjects cannot themselves have a parent subject, but it may inherit from a subject with
the same name as the subject in a parent contract. The order parameter in the child
subject, if present, will override the order parameter in the parent subject. The rules in the
parent subject will be added to the rules in the child subject. However, the rules will not
override rules of the same name. Instead, all rules in the parent subject will be considered
to run with a higher order than all rules in the child; that is all rules in the child will run
before any rules in the parent. This has the effect of overriding any rules in the parent
without the potentially-problematic semantics of merging the ordering.
Clauses
Clauses cannot themselves have a parent clause, but it may inherit from a clause with the
same name as the clause in a parent contract. The list of subject references in the parent
clause will be added to the list of subject references in the child clause. This is just a union
operation. A subject reference that refers to a subject name in the parent contract might
have that name overridden in the child contract. Each of the matchers in the clause are
also inherited by the child clause. Matchers in the child of the same name and type as a
matcher from the parent will inherit from and override the parent matcher. See below
under Matchers for more information.
Matchers
69
OpenDaylight User Guide February 21, 2016 Beryllium
• Basic view
• Governance view
• Wizard view
Basic view
Basic view contains 5 navigation buttons which switch user to the desired section of
application:
• Governance – switch to the Governance view (middle of graphic has the same function)
• Renderer configuration – switch to the Policy expression view with Renderers section
expanded
• Policy expression – switch to the Policy expression view with Policy section expanded
70
OpenDaylight User Guide February 21, 2016 Beryllium
Governance view
Governance view consists from three columns.
In the left column is Health section with Exception and Conflict buttons with no
functionality yet. This is a placeholder for development in further releases.
In the top half of this section is select box with list of tenants for select. Once the tenant
is selected, all sub sections in application operate and display data with actual selected
tenant.
Below the select box are buttons which display Expressed or Delivered policy of Governance
section. In the bottom half of this section is select box with list of renderers for select. There
is currently only OfOverlay renderer available.
Below the select box is Renderer configuration button, which switch the app into the
Policy expression view with Renderers section expanded for performing CRUD operations.
Renderer state button display Renderer state view.
In the bottom part of the right section of Governance view is Home button which switch
the app to the Basic view.
In the top part is situated navigation menu with four main sections.
Policy expression button expand/collapse sub menu with three main parts of Policy
expression. By clicking on sub menu buttons, user will be switched into the Policy
expressions view with appropriate section expanded for performing CRUD operations.
71
OpenDaylight User Guide February 21, 2016 Beryllium
Renderer configuration button switches user into the Policy expressions view.
Governance button expand/collapse sub menu with four main parts of Governance section.
Sub menu buttons of Governance section display appropriate section of Governance view.
Below the menu is place for view info section which displays info about actual selected
element from the topology (explained below).
In this view are displayed contracts with their consumed and provided EndpointGroups of
actual selected tenant, which can be changed in select box in the upper left corner.
By single-clicking on any contract or EPG, the data of actual selected element will be shown
in the right column below the menu. A Manage button launches a display wizard window
for managing configuration of items such as Service Function Chaining.
Governance view – Delivered policy In this view are displayed subjects with their
consumed and provided EndpointGroups of actual selected tenant, which can be changed
in select box in the upper left corner.
By single-clicking on any subject or EPG, the data of actual selected element will be shown
in the right column below the menu.
By double-click on subject the subject detail view will be displayed with subject’s rules of
actual selected subject, which can be changed in select box in the upper left corner.
By single-clicking on rule or subject, the data of actual selected element will be shown in the
right column below the menu.
72
OpenDaylight User Guide February 21, 2016 Beryllium
By double-clicking on EPG in Delivered policy view, the EPG detail view will be displayed
with EPG’s endpoints of actual selected EPG, which can be changed in select box in the
upper left corner.
By single-clicking on EPG or endpoint the data of actual selected element will be shown in
the right column below the menu.
73
OpenDaylight User Guide February 21, 2016 Beryllium
In this part are displayed Subject feature definition data with two main parts: Action
definition and Classifier definition.
By clicking on names of children nodes is possible to select desired node and node’s data
will be displayed.
74
OpenDaylight User Guide February 21, 2016 Beryllium
Right column of this view contains four parts. At the top of this column are displayed
breadcrumbs with actual position in the application.
Below the breadcrumbs is select box with list of tenants for select. In the middle part is
situated navigation menu, which allows switch to the desired section for performing CRUD
operations.
At the bottom is quick navigation menu with Access Model Wizard button which display
Wizard view, Home button which switch application to the Basic view and occasionally Back
button, which switch application to the upper section.
To open Policy expression, select Policy expression from the GBP Home screen.
In the top of navigation box you can select the tenant from the tenants list to activate
features addicted to selected tenant.
In the right menu, by default, the Policy menu section is expanded. Subitems of this
section are modules for CRUD (creating, reading, updating and deleting) of tenants,
EndpointGroups, contracts, L2/L3 objects.
• Section Endpoints contains CRUD forms for Endpoint and L3 prefix endpoint.
75
OpenDaylight User Guide February 21, 2016 Beryllium
76
OpenDaylight User Guide February 21, 2016 Beryllium
77
OpenDaylight User Guide February 21, 2016 Beryllium
78
OpenDaylight User Guide February 21, 2016 Beryllium
In this part are described basic flows for viewing, adding, editing and deleting system
elements like tenants, EndpointGroups etc.
Tenants
To edit tenant objects click the Tenants button in the right menu. You can see the CRUD
form containing tenants list and control buttons.
To add new tenant, click the Add button This will display the form for adding a new
tenant. After filling tenant attributes Name and Description click Save button. Saving of
any object can be performed only if all the object attributes are filled correctly. If some
attribute doesn’t have correct value, exclamation mark with mouse-over tooltip will be
displayed next to the label for the attribute. After saving of tenant the form will be closed
and the tenants list will be set to default value.
To view an existing tenant, select the tenant from the select box Tenants list. The view form
is read-only and can be closed by clicking cross mark in the top right of the form.
To edit selected tenant, click the Edit button, which will display the edit form for selected
tenant. After editing the Name and Description of selected tenant click the Save button to
save selected tenant. After saving of tenant the edit form will be closed and the tenants list
will be set to default value.
To delete tenant select the tenant from the Tenants list and click Delete button.
To return to the Policy expression click Back button on the bottom of window.
EndpointGroups
For managing EndpointGroups (EPG) the tenant from the top Tenants list must be selected.
To add new EPG click Add button and after filling required attributes click Save button.
After adding the EPG you can edit it and assign Consumer named selector or Provider
named selector to it.
To edit EPG click the Edit button after selecting the EPG from Group list.
To add new Consumer named selector (CNS) click the Add button next to the Consumer
named selectors list. While CNS editing you can set one or more contracts for current CNS
pressing the Plus button and selecting the contract from the Contracts list. To remove the
contract, click on the cross mark next to the contract. Added CNS can be viewed, edited
or deleted by selecting from the Consumer named selectors list and clicking the Edit and
Delete buttons like with the EPG or tenants.
To add new Provider named selector (PNS) click the Add button next to the Provider
named selectors list. While PNS editing you can set one or more contracts for current PNS
pressing the Plus button and selecting the contract from the Contracts list. To remove the
contract, click on the cross mark next to the contract. Added PNS can be viewed, edited or
deleted by selecting from the Provider named selectors list and clicking the Edit and Delete
buttons like with the EPG or tenants.
To delete EPG, CNS or PNS select it in selectbox and click the Delete button next to the
selectbox.
79
OpenDaylight User Guide February 21, 2016 Beryllium
Contracts
For managing contracts the tenant from the top Tenants list must be selected.
To add new Contract click Add button and after filling required fields click Save button.
After adding the Contract user can edit it by selecting in the Contracts list and clicking Edit
button.
To add new Clause click Add button next to the Clause list while editing the contract. While
editing the Clause after selecting clause from the Clause list user can assign clause subjects
by clicking the Plus button next to the Clause subjects label. Adding and editing action must
be submitted by pressing Save button. To manage Subjects you can use CRUD form like
with the Clause list.
L2/L3
For managing L2/L3 the tenant from the top Tenants list must be selected.
To add L3 Context click the Add button next to the L3 Context list ,which will display the
form for adding a new L3 Context. After filling L3 Context attributes click Save button.
After saving of L3 Context, form will be closed and the L3 Context list will be set to default
value.
To view an existing L3 Context, select the L3 Context from the select box L3 Context list.
The view form is read-only and can be closed by clicking cross mark in the top right of the
form.
If user wants to edit selected L3 Context, click the Edit button, which will display the
edit form for selected L3 Context. After editing click the Save button to save selected L3
Context. After saving of L3 Context, the edit form will be closed and the L3 Context list will
be set to default value.
To delete L3 Context, select it from the L3 Context list and click Delete button.
To add L2 Bridge Domain, click the Add button next to the L2 Bridge Domain list. This
will display the form for adding a new L2 Bridge Domain. After filling L2 Bridge Domain
attributes click Save button. After saving of L2 Bridge Domain, form will be closed and the
L2 Bridge Domain list will be set to default value.
To view an existing L2 Bridge Domain, select the L2 Bridge Domain from the select box L2
Bridge Domain list. The view form is read-only and can be closed by clicking cross mark in
the top right of the form.
If user wants to edit selected L2 Bridge Domain, click the Edit button, which will display
the edit form for selected L2 Bridge Domain. After editing click the Save button to save
selected L2 Bridge Domain. After saving of L2 Bridge Domain the edit form will be closed
and the L2 Bridge Domain list will be set to default value.
To delete L2 Bridge Domain select it from the L2 Bridge Domain list and click Delete button.
To add L3 Flood Domain, click the Add button next to the L3 Flood Domain list. This
will display the form for adding a new L3 Flood Domain. After filling L3 Flood Domain
80
OpenDaylight User Guide February 21, 2016 Beryllium
attributes click Save button. After saving of L3 Flood Domain, form will be closed and the
L3 Flood Domain list will be set to default value.
To view an existing L3 Flood Domain, select the L3 Flood Domain from the select box L3
Flood Domain list. The view form is read-only and can be closed by clicking cross mark in the
top right of the form.
If user wants to edit selected L3 Flood Domain, click the Edit button, which will display the
edit form for selected L3 Flood Domain. After editing click the Save button to save selected
L3 Flood Domain. After saving of L3 Flood Domain the edit form will be closed and the L3
Flood Domain list will be set to default value.
To delete L3 Flood Domain select it from the L3 Flood Domain list and click Delete button.
To add Subnet click the Add button next to the Subnet list. This will display the form for
adding a new Subnet. After filling Subnet attributes click Save button. After saving of
Subnet, form will be closed and the Subnet list will be set to default value.
To view an existing Subnet, select the Subnet from the select box Subnet list. The view form
is read-only and can be closed by clicking cross mark in the top right of the form.
If user wants to edit selected Subnet, click the Edit button, which will display the edit form
for selected Subnet. After editing click the Save button to save selected Subnet. After
saving of Subnet the edit form will be closed and the Subnet list will be set to default value.
To delete Subnet select it from the Subnet list and click Delete button.
Classifiers
To add Classifier, click the Add button next to the Classifier list. This will display the form for
adding a new Classifier. After filling Classifier attributes click Save button. After saving of
Classifier, form will be closed and the Classifier list will be set to default value.
To view an existing Classifier, select the Classifier from the select box Classifier list. The view
form is read-only and can be closed by clicking cross mark in the top right of the form.
If you want to edit selected Classifier, click the Edit button, which will display the edit form
for selected Classifier. After editing click the Save button to save selected Classifier. After
saving of Classifier the edit form will be closed and the Classifier list will be set to default
value.
To delete Classifier select it from the Classifier list and click Delete button.
Actions
To add Action, click the Add button next to the Action list. This will display the form for
adding a new Action. After filling Action attributes click Save button. After saving of
Action, form will be closed and the Action list will be set to default value.
To view an existing Action, select the Action from the select box Action list. The view form
is read-only and can be closed by clicking cross mark in the top right of the form.
If user wants to edit selected Action, click the Edit button, which will display the edit form
for selected Action. After editing click the Save button to save selected Action. After saving
of Action the edit form will be closed and the Action list will be set to default value.
81
OpenDaylight User Guide February 21, 2016 Beryllium
To delete Action select it from the Action list and click Delete button.
Endpoint
To add Endpoint, click the Add button next to the Endpoint list. This will display the form
for adding a new Endpoint. To add EndpointGroup assignment click the Plus button
next to the label EndpointGroups. To add Condition click Plus button next to the label
Condition. To add L3 Address click the Plus button next to the L3 Addresses label. After
filling Endpoint attributes click Save button. After saving of Endpoint, form will be closed
and the Endpoint list will be set to default value.
To view an existing Endpoint just, the Endpoint from the select box Endpoint list. The view
form is read-only and can be closed by clicking cross mark in the top right of the form.
If you want to edit selected Endpoint, click the Edit button, which will display the edit form
for selected Endpoint. After editing click the Save button to save selected Endpoint. After
saving of Endpoint the edit form will be closed and the Endpoint list will be set to default
value.
To delete Endpoint select it from the Endpoint list and click Delete button.
L3 prefix endpoint
To add L3 prefix endpoint, click the Add button next to the L3 prefix endpoint list. This
will display the form for adding a new Endpoint. To add EndpointGroup assignment, click
the Plus button next to the label EndpointGroups. To add Condition, click Plus button next
to the label Condition. To add L2 gateway click the Plus button next to the L2 gateways
label. To add L3 gateway, click the Plus button next to the L3 gateways label. After filling
L3 prefix endpoint attributes click Save button. After saving of L3 prefix endpoint, form will
be closed and the Endpoint list will be set to default value.
To view an existing L3 prefix endpoint, select the Endpoint from the select box L3 prefix
endpoint list. The view form is read-only and can be closed by clicking cross mark in the top
right of the form.
If you want to edit selected L3 prefix endpoint, click the Edit button, which will display
the edit form for selected L3 prefix endpoint. After editing click the Save button to save
selected L3 prefix endpoint. After saving of Endpoint the edit form will be closed and the
Endpoint list will be set to default value.
To delete Endpoint select it from the L3 prefix endpoint list and click Delete button.
Wizard
Wizard provides quick method to send basic data to controller necessary for basic usage of
GBP application. It is useful in the case that there aren’t any data in controller. In the first
tab is form for create tenant. The second tab is for CRUD operations with contracts and
their sub elements such as subjects, rules, clauses, action refs and classifier refs. The last tab
is for CRUD operations with EndpointGroups and their CNS and PNS. Created structure of
data is possible to send by clicking on Submit button.
82
OpenDaylight User Guide February 21, 2016 Beryllium
• Policy Resolution
• Forwarding Model
• Neutron mapper
• the UX
If the REST API must be used, and the above resources are not sufficient:
• feature:install odl-dlux-yangui
83
OpenDaylight User Guide February 21, 2016 Beryllium
Neutron Mapper has the following dependencies that are automatically loaded:
odl-neutron-service
Base GBP feature set, such as policy resolution, data model etc.
odl-groupbasedpolicy-ofoverlay
REST calls from OpenStack Neutron are by the Neutron NorthBound project.
Features
List of supported Neutron entities:
• Port
• Network
• Standard Internal
• Subnet
• Security-groups
• Routers
• FloatingIP NAT
• IPv4/IPv6 support
84
OpenDaylight User Guide February 21, 2016 Beryllium
Neutron Port
Neutron Network
85
OpenDaylight User Guide February 21, 2016 Beryllium
To represent this, a Neutron Network is mapped to multiple GBP entities. The first mapping
is to an L2 flood-domain to reflect that the Neutron network is one flooding or broadcast
domain. An L2-bridge-domain is then associated as the parent of L2 flood-domain. This
reflects both the L2 transmission domain as well as the L2 addressing namespace.
The third mapping is to L3-context, which represents the distinct L3 address space. The L3-
context is the parent of L2-bridge-domain.
Neutron Subnet
Neutron subnet is associated with a Neutron network. The Neutron subnet is mapped to a
GBP subnet where the parent of the subnet is L2-flood-domain representing the Neutron
network.
86
OpenDaylight User Guide February 21, 2016 Beryllium
Infrastructure EndpointGroups
This is the most involved amongst all the mappings because Neutron security-group-
rules are mapped to contracts with clauses, subjects, rules, action-refs, classifier-refs, etc.
Contracts are used between EndpointGroups representing Neutron Security Groups. For
simplification it is important to note that Neutron security-group-rules are similar to a GBP
rule containing:
• action of allow.
Neutron Routers
This allows for multiple routers per tenant with complete isolation.
The mapping of the router to an endpoint represents the router’s interface or gateway
port.
87
OpenDaylight User Guide February 21, 2016 Beryllium
Neutron FloatingIP
When associated with a Neutron Port, this leverages the OfOverlay renderer’s NAT
capabilities.
A dedicated external interface on each Nova compute host allows for disitributed external
access. Each Nova instance associated with a FloatingIP address can access the external
network directly without having to route via the Neutron controller, or having to enable
any form of Neutron distributed routing functionality.
Assuming the gateway provisioned in the Neutron Subnet command for the external
network is reachable, the combination of GBP Neutron Mapper and OfOverlay renderer
will automatically ARP for this default gateway, requiring no user intervention.
Logging level for the mapping functionality can be set for package
org.opendaylight.groupbasedpolicy.neutron.mapper. An example of enabling TRACE
logging level on Karaf console:
As an example for mapping can be used creation of Neutron network, subnet and port.
When a Neutron network is created 3 GBP entities are created: l2-flood-domain, l2-bridge-
domain, l3-context.
88
OpenDaylight User Guide February 21, 2016 Beryllium
If an Neutron port is created in the subnet an endpoint and l3-endpoint are created. The
endpoint has key composed from l2-bridge-domain and MAC address from Neutron port. A
key of l3-endpoint is compesed from l3-context and IP address. The network containment
of endpoint and l3-endpoint points to the subnet.
More information about configuration can be found in our DevStack demo environment on
the GBP wiki.
89
OpenDaylight User Guide February 21, 2016 Beryllium
The mapped policies can be augmented via the GBP UX, to:
Tutorials
A DevStack demo environment can be found on the GBP wiki.
This renderer is designed to work with OpenVSwitch (OVS) 2.1+ (although 2.3 is strongly
recommended) and OpenFlow 1.3.
When used in conjunction with the Neutron Mapper feature no extra OfOverlay specific
setup is required.
When this feature is loaded "standalone", the user is required to configure infrastructure,
such as
The GBP OfOverlay renderer also supports a table offset option, to offset the pipeline post-
table 0. The value of table offset is stored in the config datastore and it may be rewritten at
runtime.
PUT http://{{controllerIp}}:8181/restconf/config/ofoverlay:of-overlay-config
90
OpenDaylight User Guide February 21, 2016 Beryllium
{
"of-overlay-config": {
"gbp-ofoverlay-table-offset": 6
}
}
in file: distribution-karaf/target/assembly/etc/opendaylight/karaf/15-groupbasedpolicy-
ofoverlay.xml
To avoid overwriting runtime changes, the default value is used only when the OfOverlay
renderer starts and no other value has been written before.
91
OpenDaylight User Guide February 21, 2016 Beryllium
OfOverlay Renderer
Policy Resolver
Policy resolution is completely domain independent, and the OfOverlay leverages process
policy information internally. See Policy Resolution process.
It listens to inputs to the Tenants configuration datastore, validates tenant input, then
writes this to the Tenants operational datastore.
Endpoint Manager
The endpoint repository operates in orchestrated mode. This means the user is responsible
for the provisioning of endpoints via:
• UX/GUI
• REST API
Note
When using the Neutron mapper feature, everything is managed transparently
via Neutron.
92
OpenDaylight User Guide February 21, 2016 Beryllium
The Endpoint Manager is responsible for listening to Endpoint repository updates and
notifying the Switch Manager when a valid Endpoint has been registered.
Switch Manager
• DISCONNECTED
• PREPARING
• READY
Preparing simply means the switch has a controller connection but is missing one of the
above complete and necessary conditions
93
OpenDaylight User Guide February 21, 2016 Beryllium
Port Security
Table 0 of the OpenFlow pipeline. Responsible for ensuring that only valid connections can
send packets into the pipeline:
cookie=0x0, <snip> , priority=200,in_port=3 actions=goto_table:2
cookie=0x0, <snip> , priority=200,in_port=1 actions=goto_table:1
cookie=0x0, <snip> ,
priority=121,arp,in_port=5,dl_src=fa:16:3e:d5:b9:8d,arp_spa=10.1.1.3
actions=goto_table:2
cookie=0x0, <snip> ,
priority=120,ip,in_port=5,dl_src=fa:16:3e:d5:b9:8d,nw_src=10.1.1.3
actions=goto_table:2
cookie=0x0, <snip> ,
priority=115,ip,in_port=5,dl_src=fa:16:3e:d5:b9:8d,nw_dst=255.255.255.255
actions=goto_table:2
cookie=0x0, <snip> , priority=112,ipv6 actions=drop
cookie=0x0, <snip> , priority=111, ip actions=drop
cookie=0x0, <snip> , priority=110,arp actions=drop
cookie=0x0, <snip> ,in_port=5,dl_src=fa:16:3e:d5:b9:8d actions=goto_table:2
cookie=0x0, <snip> , priority=1 actions=drop
Series of DROP tables with priority set to capture any non-specific traffic that should have
matched above:
cookie=0x0, <snip> , priority=112,ipv6 actions=drop
cookie=0x0, <snip> , priority=111, ip actions=drop
cookie=0x0, <snip> , priority=110,arp actions=drop
94
OpenDaylight User Guide February 21, 2016 Beryllium
Drop Flow:
cookie=0x0, <snip> , priority=1 actions=drop
Table offset+1.
Source Mapper
Table offset+2.
• EndpointGroup(s) it belongs to
• Forwarding context
Ingress Tunnel established at remote node with VNID Ordinal that maps to Source EPG,
Forwarding Context etc:
cookie=0x0, <snip>, priority=150,tun_id=0xd,in_port=3 actions=load:0xc-
>NXM_NX_REG0[],load:0xffffff->NXM_NX_REG1[],load:0x4->NXM_NX_REG4[],load:0x5-
>NXM_NX_REG5[],load:0x7->NXM_NX_REG6[],goto_table:3
Maps endpoint to Source EPG, Forwarding Context based on ingress port, and MAC:
cookie=0x0, <snip> , priority=100,in_port=5,dl_src=fa:16:3e:b4:b4:b1
actions=load:0xc->NXM_NX_REG0[],load:0x1->NXM_NX_REG1[],load:0x4-
>NXM_NX_REG4[],load:0x5->NXM_NX_REG5[],load:0x7->NXM_NX_REG6[],load:0xd-
>NXM_NX_TUN_ID[0..31],goto_table:3
Generic drop:
cookie=0x0, duration=197.622s, table=2, n_packets=0, n_bytes=0, priority=1
actions=drop
Destination Mapper
95
OpenDaylight User Guide February 21, 2016 Beryllium
Table offset+3.
• EndpointGroup(s) it belongs to
• Forwarding context
Manages routing based on valid ingress nodes ARP’ing for their default gateway, and
matches on either gateway MAC or destination endpoint MAC.
Layer2 destination matching flows, designed to be caught only after last IP flow (lowest
priority IP flow is 100):
cookie=0x0, duration=323.203s, table=3, n_packets=4, n_bytes=168,
priority=50,reg4=0x4,dl_dst=fa:16:3e:58:c3:dd actions=load:0x2-
>NXM_NX_REG2[],load:0x1->NXM_NX_REG3[],load:0x2->NXM_NX_REG7[],goto_table:4
Policy Enforcer
Table offset+4.
Once the Source and Destination EndpointGroups are assigned, policy is enforced based on
resolved rules.
In the case of Service Function Chaining, the encapsulation and destination for traffic
destined to a chain, is discovered and enforced.
96
OpenDaylight User Guide February 21, 2016 Beryllium
Table offset+5.
Performs NAT function before Egressing OVS instance to the underlay network.
External Mapper
Table offset+6.
Manages post-policy enforcement for endpoint specific destination effects. Specifically for
Service Function Chaining, which is why we can support both symmetric and asymmetric
chains and distributed ingress/egress classification.
Generic allow:
cookie=0x0, <snip>, priority=100 actions=output:NXM_NX_REG7[]
Endpoint
POST http://{{controllerIp}}:8181/restconf/operations/endpoint:register-
endpoint
{
"input": {
"endpoint-group": "<epg0>",
"endpoint-groups" : ["<epg1>","<epg2>"],
"network-containment" : "<fowarding-model-context1>",
"l2-context": "<bridge-domain1>",
"mac-address": "<mac1>",
"l3-address": [
{
"ip-address": "<ipaddress1>",
"l3-context": "<l3_context1>"
}
],
"*ofoverlay:port-name*": "<ovs port name>",
"tenant": "<tenant1>"
}
}
Note
The usage of "port-name" preceded by "ofoverlay". In OpenDaylight, base
datastore objects can be augmented. In GBP, the base endpoint model has no
renderer specifics, hence can be leveraged across multiple renderers.
97
OpenDaylight User Guide February 21, 2016 Beryllium
PUT http://{{controllerIp}}:8181/restconf/config/opendaylight-inventory:nodes/
{
"opendaylight-inventory:nodes": {
"node": [
{
"id": "openflow:123456",
"ofoverlay:tunnel": [
{
"tunnel-type": "overlay:tunnel-type-vxlan",
"ip": "<ip_address_of_ovs>",
"port": 4789,
"node-connector-id": "openflow:123456:1"
}
]
},
{
"id": "openflow:654321",
"ofoverlay:tunnel": [
{
"tunnel-type": "overlay:tunnel-type-vxlan",
"ip": "<ip_address_of_ovs>",
"port": 4789,
"node-connector-id": "openflow:654321:1"
}
]
}
]
}
}
{
"policy:tenant": {
"contract": [
{
"clause": [
{
"name": "allow-http-clause",
"subject-refs": [
"allow-http-subject",
"allow-icmp-subject"
]
}
],
"id": "<id>",
"subject": [
{
"name": "allow-http-subject",
"rule": [
{
"classifier-ref": [
{
"direction": "in",
"name": "http-dest"
},
{
"direction": "out",
"name": "http-src"
}
98
OpenDaylight User Guide February 21, 2016 Beryllium
],
"action-ref": [
{
"name": "allow1",
"order": 0
}
],
"name": "allow-http-rule"
}
]
},
{
"name": "allow-icmp-subject",
"rule": [
{
"classifier-ref": [
{
"name": "icmp"
}
],
"action-ref": [
{
"name": "allow1",
"order": 0
}
],
"name": "allow-icmp-rule"
}
]
}
]
}
],
"endpoint-group": [
{
"consumer-named-selector": [
{
"contract": [
"<id>"
],
"name": "<name>"
}
],
"id": "<id>",
"provider-named-selector": []
},
{
"consumer-named-selector": [],
"id": "<id>",
"provider-named-selector": [
{
"contract": [
"<id>"
],
"name": "<name>"
}
]
}
],
"id": "<id>",
99
OpenDaylight User Guide February 21, 2016 Beryllium
"l2-bridge-domain": [
{
"id": "<id>",
"parent": "<id>"
}
],
"l2-flood-domain": [
{
"id": "<id>",
"parent": "<id>"
},
{
"id": "<id>",
"parent": "<id>"
}
],
"l3-context": [
{
"id": "<id>"
}
],
"name": "GBPPOC",
"subject-feature-instances": {
"classifier-instance": [
{
"classifier-definition-id": "<id>",
"name": "http-dest",
"parameter-value": [
{
"int-value": "6",
"name": "proto"
},
{
"int-value": "80",
"name": "destport"
}
]
},
{
"classifier-definition-id": "<id>",
"name": "http-src",
"parameter-value": [
{
"int-value": "6",
"name": "proto"
},
{
"int-value": "80",
"name": "sourceport"
}
]
},
{
"classifier-definition-id": "<id>",
"name": "icmp",
"parameter-value": [
{
"int-value": "1",
"name": "proto"
}
100
OpenDaylight User Guide February 21, 2016 Beryllium
]
}
],
"action-instance": [
{
"name": "allow1",
"action-definition-id": "<id>"
}
]
},
"subnet": [
{
"id": "<id>",
"ip-prefix": "<ip_prefix>",
"parent": "<id>",
"virtual-router-ip": "<ip address>"
},
{
"id": "<id>",
"ip-prefix": "<ip prefix>",
"parent": "<id>",
"virtual-router-ip": "<ip address>"
}
]
}
}
Tutorials
Comprehensive tutorials, along with a demonstration environment leveraging Vagrant can
be found on the GBP wiki
The renderer interacts with a IO Visor module from the Linux Foundation IO Visor project.
Installation details, usage, and other information for the IO Visor GBP module can be found
here: IO Visor github repo for IO Modules
101
OpenDaylight User Guide February 21, 2016 Beryllium
feature:install odl-groupbasedpolicy-faas
102
OpenDaylight User Guide February 21, 2016 Beryllium
In the topology above, a symmetrical chain between H35_2 and H36_3 could take path:
H35_2 to sw1 to sff1 to sf1 to sff1 to sff2 to sf2 to sff2 to sw6 to H36_3
103
OpenDaylight User Guide February 21, 2016 Beryllium
If asymmetric chaining was desired, the return path could be direct, or an entirely different
chain.
In the Subject Feature Instance section of the tenant config, we define the instances of the
classifier definitions for ICMP and HTTP:
"subject-feature-instances": {
"classifier-instance": [
104
OpenDaylight User Guide February 21, 2016 Beryllium
{
"name": "icmp",
"parameter-value": [
{
"name": "proto",
"int-value": 1
}
]
},
{
"name": "http-dest",
"parameter-value": [
{
"int-value": "6",
"name": "proto"
},
{
"int-value": "80",
"name": "destport"
}
]
},
{
"name": "http-src",
"parameter-value": [
{
"int-value": "6",
"name": "proto"
},
{
"int-value": "80",
"name": "sourceport"
}
]
}
],
Then the action instances to associate to traffic that matches classifiers are defined.
Note the SFC chain name must exist in SFC, and is validated against the datastore once
the tenant configuration is entered, before entering a valid tenant configuration into the
operational datastore (which triggers policy resolution).
"action-instance": [
{
"name": "chain1",
"parameter-value": [
{
"name": "sfc-chain-name",
"string-value": "SFCGBP"
}
]
},
{
"name": "allow1",
}
]
},
105
OpenDaylight User Guide February 21, 2016 Beryllium
"contract": [
{
"subject": [
{
"name": "icmp-subject",
"rule": [
{
"name": "allow-icmp-rule",
"order" : 0,
"classifier-ref": [
{
"name": "icmp"
}
],
"action-ref": [
{
"name": "allow1",
"order": 0
}
]
}
]
},
When HTTP is matched, in to the provider of the contract with a TCP destination port of
80 (HTTP) or the HTTP request. The chain action is triggered, and similarly out from the
provider for traffic with TCP source port of 80 (HTTP), or the HTTP response.
{
"name": "http-subject",
"rule": [
{
"name": "http-chain-rule-in",
"classifier-ref": [
{
"name": "http-dest",
"direction": "in"
}
],
"action-ref": [
{
"name": "chain1",
"order": 0
}
]
},
{
"name": "http-chain-rule-out",
"classifier-ref": [
{
"name": "http-src",
"direction": "out"
}
],
"action-ref": [
{
"name": "chain1",
"order": 0
106
OpenDaylight User Guide February 21, 2016 Beryllium
}
]
}
]
}
To enable asymmetrical chaining, for instance, the user desires that HTTP requests traverse
the chain, but the HTTP response does not, the HTTP response is set to allow instead of
chain:
{
"name": "http-chain-rule-out",
"classifier-ref": [
{
"name": "http-src",
"direction": "out"
}
],
"action-ref": [
{
"name": "allow1",
"order": 0
}
]
}
Demo/Development environment
The GBP project for Beryllium has two demo/development environments.
107
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 108
L2Switch Architecture .................................................................................................. 108
Configuring L2Switch ................................................................................................... 109
Configuring Loop Remover .......................................................................................... 109
Configuring Arp Handler ............................................................................................. 110
Configuring Address Tracker ........................................................................................ 111
Configuring L2Switch Main .......................................................................................... 111
Running the L2Switch project ...................................................................................... 113
Create a network using mininet .................................................................................. 113
Generating network traffic using mininet .................................................................... 113
Checking Address Observations ................................................................................... 113
Checking Hosts ............................................................................................................ 114
Checking STP status of each link .................................................................................. 115
Miscellaneous mininet commands ................................................................................ 116
Overview
The L2Switch project provides Layer2 switch functionality.
L2Switch Architecture
• Packet Handler
• Decodes the packets coming to the controller and dispatches them appropriately
• Loop Remover
• Arp Handler
• Address Tracker
• Host Tracker
• L2Switch Main
108
OpenDaylight User Guide February 21, 2016 Beryllium
Configuring L2Switch
This sections below give details about the configuration settings for the components that
can be configured.
• is-install-lldp-flow
• "true" means a flow that sends all LLDP packets to the controller will be installed on
each switch
• lldp-flow-table-id
• The LLDP flow will be installed on the specified flow table of each switch
• lldp-flow-priority
• lldp-flow-idle-timeout
• The LLDP flow will timeout (removed from the switch) if the flow doesn’t forward a
packet for x seconds
• lldp-flow-hard-timeout
• The LLDP flow will timeout (removed from the switch) after x seconds, regardless of
how many packets it is forwarding
• graph-refresh-delay
• A graph of the network is maintained and gets updated as network elements go up/
down (i.e. links go up/down and switches go up/down)
• A higher value has the advantage of doing less graph updates, at the potential cost
of losing some packets because the
109 graph didn’t update immediately.
OpenDaylight User Guide February 21, 2016 Beryllium
• A lower value has the advantage of handling network topology changes quicker, at
the cost of doing more computation.
• is-proactive-flood-mode
• "true" means that flood flows will be installed on each switch. With this flood flow,
each switch will flood a packet that doesn’t match any other flows.
• Advantage: Fewer packets are sent to the controller because those packets are
flooded to the network.
• "false" means the previously mentioned flood flows will not be installed. Instead an
ARP flow will be installed on each switch that sends all ARP packets to the controller.
• Disadvantage: The controller handles more packets (ARP requests & replies) and
the ARP process takes longer than if there were flood flows.
• flood-flow-table-id
• The flood flow will be installed on the specified flow table of each switch
• flood-flow-priority
• flood-flow-idle-timeout
• The flood flow will timeout (removed from the switch) if the flow doesn’t forward a
packet for x seconds
• flood-flow-hard-timeout
• The flood flow will timeout (removed from the switch) after x seconds, regardless of
how many packets it is forwarding
• arp-flow-table-id
110
OpenDaylight User Guide February 21, 2016 Beryllium
• The ARP flow will be installed on the specified flow table of each switch
• arp-flow-priority
• arp-flow-idle-timeout
• The ARP flow will timeout (removed from the switch) if the flow doesn’t forward a
packet for x seconds
• arp-flow-hard-timeout
• The ARP flow will timeout (removed from the switch) after arp-flow-hard-timeout
seconds, regardless of how many packets it is forwarding
• timestamp-update-interval
• A last-seen timestamp is associated with each address. This last-seen timestamp will
only be updated after timestamp-update-interval milliseconds.
• A higher value has the advantage of performing less writes to the database.
• A lower value has the advantage of knowing how fresh an address is.
• observe-addresses-from
• IP and MAC addresses can be observed/learned from ARP, IPv4, and IPv6 packets.
Set which packets to make these observations from.
• is-install-dropall-flow
• "true" means a drop-all flow will be installed on each switch, so the default action
will be to drop a packet instead of sending it to the controller
• dropall-flow-table-id
• The dropall flow will be installed on the specified flow table of each switch
• dropall-flow-priority
• dropall-flow-idle-timeout
• The dropall flow will timeout (removed from the switch) if the flow doesn’t forward
a packet for x seconds
• dropall-flow-hard-timeout
• The dropall flow will timeout (removed from the switch) after x seconds, regardless
of how many packets it is forwarding
• is-learning-only-mode
• "true" means that the L2Switch will only be learning addresses. No additional flows
to optimize network traffic will be installed.
• "false" means that the L2Switch will react to network traffic and install flows on the
switches to optimize traffic. Currently, MAC-to-MAC flows are installed.
• reactive-flow-table-id
• The reactive flow will be installed on the specified flow table of each switch
• reactive-flow-priority
• reactive-flow-idle-timeout
• The reactive flow will timeout (removed from the switch) if the flow doesn’t forward
a packet for x seconds
• reactive-flow-hard-timeout 112
OpenDaylight User Guide February 21, 2016 Beryllium
• The reactive flow will timeout (removed from the switch) after x seconds, regardless
of how many packets it is forwarding
feature:install odl-l2switch-switch-ui
The above command will create a virtual network consisting of 3 switches. Each switch will
connect to the controller located at the specified IP, i.e. 127.0.0.1
The above command has the "mac" option, which makes it easier to distinguish between
Host MAC addresses and Switch MAC addresses.
The above command will cause host1 (h1) to ping host2 (h2)
pingall
http://10.194.126.91:8080/restconf/operational/opendaylight-inventory:nodes/
node/openflow:1/node-connector/openflow:1:1
113
OpenDaylight User Guide February 21, 2016 Beryllium
Checking Hosts
Host information is added to the Topology data tree.
• Host address
This host information and attachment point information can be checked through a browser
or a REST Client.
http://10.194.126.91:8080/restconf/operational/network-topology:network-
topology/topology/flow:1/
114
OpenDaylight User Guide February 21, 2016 Beryllium
• A status of "forwarding" means the link is active and packets are flowing on it.
• A status of "discarding" means the link is inactive and packets are not sent over it.
The STP status of a link can be checked through a browser or a REST Client.
http://10.194.126.91:8080/restconf/operational/opendaylight-inventory:nodes/
node/openflow:1/node-connector/openflow:1:2
115
OpenDaylight User Guide February 21, 2016 Beryllium
This will bring the link between switch1 (s1) and switch2 (s2) down
link s1 s2 up
This will bring the link between switch1 (s1) and switch2 (s2) up
link s1 h1 down
This will bring the link between switch1 (s1) and host1 (h1) down
116
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 117
Modules & Interfaces .................................................................................................. 117
Provisioning Sequence & Sample Configurations .......................................................... 121
Overview
L3VPN Service in OpenDaylight provides a framework to create L3VPN based on BGP-MP. It
also helps to create Network Virtualization for DC Cloud environment.
2. BGP Manager : Configures BGP routing stack and provides interface to routing services
3. FIB Manager : Provides interface to FIB, creates and manages forwarding rules in
Dataplane
4. Nexthop Manager : Creates and manages nexthop egress pointer, creates egress rules in
Dataplane
5. Interface Manager : Creates and manages different type of network interfaces, e.g.,
VLAN, l3tunnel etc.,
6. Id Manager : Provides cluster-wide unique ID for a given key. Used by different modules
to get unique IDs for different entities.
7. MD-SAL Util : Provides interface to MD-SAL. Used by service modules to access MD-SAL
Datastore and services.
All the above modules can function independently and can be utilized by other services as
well.
Configuration Interfaces
The following modules expose configuration interfaces through which user can configure
L3VPN Service.
1. BGP Manager
2. VPN Manager
3. Interface Manager
117
OpenDaylight User Guide February 21, 2016 Beryllium
4. FIB Manager
a. Fields :
i. local-as-identifier
ii. local-as-number
a. Fields :
i. List of bgp-neighbor
a. Fields :
i. as-number
ii. ip-address
a. Fields :
i. List of vpn-instance
a. Fields :
i. name
ii. route-distinguisher
iii. import-route-policy
iv. export-route-policy
118
OpenDaylight User Guide February 21, 2016 Beryllium
a. Fields :
i. List of vpn-interface
a. Fields :
i. name
ii. vpn-instance-name
a. Fields :
i. ip-address
ii. mac-address
a. Fields :
i. name
ii. type
iii. enabled
iv. of-port-id
v. tenant-id
vi. base-interface
A. vlan-id
119
OpenDaylight User Guide February 21, 2016 Beryllium
A. stacked-vlan-id
A. tunnel-type
B. local-ip
C. remote-ip
D. gateway-ip
A. list labelStack
B. num-labels
a. Fields :
i. List of vrfTables
a. Fields :
i. route-distinguisher
A. destPrefix
B. label
C. nexthopAddress
a. Fields :
i. list ipv4Entry
A. destPrefix
B. nexthopAddress
120
OpenDaylight User Guide February 21, 2016 Beryllium
Pre-requisites:
1. BGP stack with VRF support needs to installed and configured
2. Create pairs of GRE/VxLAN Tunnels (using ovsdb/ovs-vsctl) between each switch and
between each switch to the Gateway node
121
OpenDaylight User Guide February 21, 2016 Beryllium
{
"interface": [
{
"name" : "GRE_192.168.57.101_192.168.57.102",
"type" : "odl-interface:l3tunnel",
"odl-interface:tunnel-type": "odl-interface:tunnel-type-gre",
"odl-interface:local-ip" : "192.168.57.101",
"odl-interface:remote-ip" : "192.168.57.102",
"odl-interface:portId" : "openflow:1:3",
"enabled" : "true"
}
]
}
{
"interface": [
{
"name" : "dpn1-dp1.2",
"type" : "l2vlan",
"odl-interface:of-port-id" : "openflow:1:2",
"odl-interface:vlan-id" : "1",
"enabled" : "true"
}
]
}
122
OpenDaylight User Guide February 21, 2016 Beryllium
3. If there are vpn-interface configurations for this VPN, corresponding action is taken as
defined in step 5
1. Create vpn-interface
REST API : PUT /config/l3vpn:vpn-interfaces/l3vpn:vpn-interface/
Note
name here is the name of VM interface created in step 3, 4
123
OpenDaylight User Guide February 21, 2016 Beryllium
its a list, user can define more than one adjacency on a vpn_interface
124
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 125
Link Aggregation Control Protocol Architecture ........................................................... 125
Configuring Link Aggregation Control Protocol ........................................................... 125
Administering or Managing Link Aggregation Control Protocol .................................... 126
Tutorials ...................................................................................................................... 126
Overview
This section contains information about how to use the LACP plugin project with
OpenDaylight, including configurations.
feature:install odl-lacp-ui
Note
1. Ensure that legacy (non-OpenFlow) switches are configured with LACP mode
active with a long timeout to allow for the LACP plugin in OpenDaylight to
respond to its messages.
125
OpenDaylight User Guide February 21, 2016 Beryllium
The group ID associated with the aggregator can be found inside the <lag-groupid>
XML tag.
The group table entry information for the <lag-groupid> added for the aggregator is
also available in the opendaylight-inventory node database.
Ports that are associated with an aggregator will have the tag <lacp-agg-ref>
updated with valid aggregator information.
Tutorials
The below tutorial demonstrates LACP LAG creation for a sample mininet topology.
The above command will create a virtual network consisting of a switch and a host. The
switch will be connected to the controller.
Once the topology is discovered, verify the presence of a flow entry with "dl_type" set to
"0x8809" to handle LACP packets using the below ovs-ofctl command:
ovs-ofctl -O OpenFlow13 dump-flows s1
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x300000000000001e, duration=60.067s, table=0, n_packets=0, n_bytes=0,
priority=5,dl_dst=01:80:c2:00:00:02,dl_type=0x8809 actions=CONTROLLER:65535
Configure an additional link between the switch (s1) and host (h1) using the below
command on mininet shell to aggregate 2 links:
126
OpenDaylight User Guide February 21, 2016 Beryllium
The LACP module will listen for LACP control packets that are generated from legacy switch
(non-OpenFlow enabled). In our example, host (h1) will act as a LACP packet generator. In
order to generate the LACP control packets, a bond interface has to be created on the host
(h1) with mode type set to LACP with long-timeout. To configure bond interface, create a
new file bonding.conf under the /etc/modprobe.d/ directory and insert the below lines in
this new file:
alias bond0 bonding
options bonding mode=4
Here mode=4 is referred to LACP and the default timeout is set to long.
Enable bond interface and associate both physical interface h1-eth0 & h1-eth1 as members
of the bond interface on host (h1) using the below commands on the mininet shell:
mininet> py net.get('h1').cmd('modprobe bonding')
mininet> py net.get('h1').cmd('ip link add bond0 type bond')
mininet> py net.get('h1').cmd('ip link set bond0 address <bond-mac-address>')
mininet> py net.get('h1').cmd('ip link set h1-eth0 down')
mininet> py net.get('h1').cmd('ip link set h1-eth0 master bond0')
mininet> py net.get('h1').cmd('ip link set h1-eth1 down')
mininet> py net.get('h1').cmd('ip link set h1-eth1 master bond0')
mininet> py net.get('h1').cmd('ip link set bond0 up')
Once the bond0 interface is up, the host (h1) will send LACP packets to the switch (s1). The
LACP Module will then create a LAG through exchange of LACP packets between the host
(h1) and switch (s1). To view the bond interface output on the host (h1) side:
mininet> py net.get('h1').cmd('cat /proc/net/bonding/bond0')
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
Aggregator ID: 1
Number of ports: 2
Actor Key: 33
Partner Key: 27
Partner Mac Address: 00:00:00:00:01:01
127
OpenDaylight User Guide February 21, 2016 Beryllium
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:00:00:00:00:12
Aggregator ID: 1
Slave queue ID: 0
A corresponding group table entry would be created on the OpenFlow switch (s1) with
"type" set to "select" to perform the LAG functionality. To view the group entries:
mininet>ovs-ofctl -O Openflow13 dump-groups s1
OFPST_GROUP_DESC reply (OF1.3) (xid=0x2):
group_id=60169,type=select,bucket=weight:0,actions=output:1,output:2
To apply the LAG functionality on the switches, the flows should be configured with action
set to GroupId instead of output port. A sample add-flow configuration with output action
set to GroupId:
sudo ovs-ofctl -O Openflow13 add-flow s1
dl_type=0x0806,dl_src=SRC_MAC,dl_dst=DST_MAC,actions=group:60169
128
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 129
LISP Flow Mapping Architecture .................................................................................. 130
Configuring LISP Flow Mapping ................................................................................... 131
Textual Conventions for LISP Address Formats ............................................................. 132
Karaf commands ......................................................................................................... 133
LISP Flow Mapping Karaf Features .............................................................................. 134
Tutorials ...................................................................................................................... 134
LISP Flow Mapping Support ........................................................................................ 140
Overview
Locator/ID Separation Protocol
Locator/ID Separation Protocol (LISP) is a technology that provides a flexible map-and-
encap framework that can be used for overlay network applications such as data center
network virtualization and Network Function Virtualization (NFV).
In a virtualization environment EIDs can be viewed as virtual address space and RLOCs can
be viewed as physical network address space.
The LISP framework decouples network control plane from the forwarding plane by
providing:
• A data plane that specifies how the virtualized network addresses are encapsulated in
addresses from the underlying physical network.
• A control plane that stores the mapping of the virtual-to-physical address spaces, the
associated forwarding policies and serves this information to the data plane on demand.
LISP data plane Tunnel Routers are available at LISPmob.org in the open source community
on the following platforms:
• Linux
• Android
129
OpenDaylight User Guide February 21, 2016 Beryllium
• OpenWRT
For more details and support for LISP data plane software please visit the LISPmob web
site.
The southbound LISP plugin supports the LISP control protocol (Map-Register, Map-
Request, Map-Reply messages), and can also be used to register mappings in the
OpenDaylight mapping service.
130
OpenDaylight User Guide February 21, 2016 Beryllium
• DAO (Data Access Object): This layer separates the LISP logic from the database, so that
we can separate the map server and map resolver from the specific implementation of
the mapping database. Currently we have an implementation of this layer with an in-
memory HashMap, but it can be switched to any other key/value store and you only
need to implement the ILispDAO interface.
• Map Server: This module processes the adding or registration of authentication tokens
(keys) and mappings. For a detailed specification of LISP Map Server, see LISP.
• Map Resolver: This module receives and processes the mapping lookup queries and
provides the mappings to requester. For a detailed specification of LISP Map Server, see
LISP.
• GUI: This module enables adding and querying the mapping service through a GUI based
on ODL DLUX.
• Neutron: This module implements the OpenDaylight Neutron Service APIs. It provides
integration between the LISP service and the OpenDaylight Neutron service, and thus
OpenStack.
• Java API: The API module exposes the Map Server and Map Resolver capabilities via a
Java API.
• LISP Proto: This module includes LISP protocol dependent data types and associated
processing.
• In Memory DB: This module includes the in memory database implementation of the
mapping service.
• LISP Southbound Plugin: This plugin enables data plane devices that support LISP
control plane protocol (see LISP) to register and query mappings to the LISP Flow
Mapping via the LISP control plane protocol.
131
OpenDaylight User Guide February 21, 2016 Beryllium
132
OpenDaylight User Guide February 21, 2016 Beryllium
The LISP Flow Mapping project in OpenDaylight implements support for many of these
different address formats, the full list being summarized in the following table. While
some of the address formats have well defined and widely used textual representation,
many don’t. It became necessary to define a convention to use for text rendering of
all implemented address types in logs, URLs, input fields, etc. The below table lists the
supported formats, along with their AFI number and LCAF type, including the prefix used
for disambiguation of potential overlap, and examples output.
Please note that the forward slash character / typically separating IPv4 and IPv6 addresses
from the mask length is transformed into %2f when used in a URL.
Karaf commands
In this section we will discuss two types of Karaf commands: built-in, and LISP specific.
Some built-in commands are quite useful, and are needed for the tutorial, so they will be
discussed here. A reference of all LISP specific commands, added by the LISP Flow Mapping
project is also included. They are useful mostly for debugging.
133
OpenDaylight User Guide February 21, 2016 Beryllium
log:set <level> <class> Set the log level for class to level. The default log
level for all classes is INFO. For debugging, or learning
about LISP internals it is useful to run log:set TRACE
org.opendaylight.lispflowmapping right after
Karaf starts up.
log:display Outputs the log file to the console, and returns control
to the user.
mappingservice:addkey Add the default password password for the IPv4 EID
prefix 0.0.0.0/0 (all addresses). This is useful when
experimenting with southbound devices, and using the
REST interface would be combersome for whatever
reason.
mappingservice:mappings Show the list of all mappings stored in the internal non-
persistent data store (the DAO), listing the full data
structure. The output is not human friendly, but can be
used for debugging.
odl-lispflowmapping-msmr This includes the core features required to use the LISP
Flow Mapping Service such as mapping service and the
LISP southbound plugin.
odl-lispflowmapping-ui This includes the GUI module for the LISP Mapping
Service.
Tutorials
This section provides a tutorial demonstrating various features in this service.
134
OpenDaylight User Guide February 21, 2016 Beryllium
Overview
The steps shown below will demonstrate setting up a LISP network between a client and
two servers, then performing a failover between the two "server" nodes.
Prerequisites
• OpenDaylight Beryllium
• The Postman Chrome App: the most convenient way to follow along this tutorial is to
use the Postman Chrome App to edit and send the requests. The project git repository
hosts a collection of the requests that are used in this tutorial in the resources/
tutorial/Beryllium_Tutorial.json.postman_collection file. You can
import this file to Postman by clicking Import at the top, choosing Download from link
and then entering the following URL: https://git.opendaylight.org/gerrit/
gitweb?p=lispflowmapping.git;a=blob_plain;f=resources/tutorial/
Beryllium_Tutorial.json.postman_collection;hb=refs/heads/stable/
beryllium. Alternatively, you can save the file on your machine, or if you have the
repository checked out, you can import from there. You will need to create a new
Postman Environment and define some variables within: controllerHost set to the
hostname or IP address of the machine running the ODL instance, and restconfPort
to 8181, if you didn’t modify the default controller settings.
• LISPmob version 0.5.x The README.md lists the dependencies needed to build it from
source.
• A virtualization platform
Target Environment
The three LISP data plane nodes and the LISP mapping system are assumed to be running
in Linux virtual machines, which have the eth0 interface in NAT mode to allow outside
internet access and eth1 connected to a host-only network, with the following IP
addresses (please adjust configuration files, JSON examples, etc. accordingly if you’re using
another addressing scheme):
Note
While the tutorial uses LISPmob as the data plane, it could be any LISP-enabled
hardware or software router (commercial/open source).
135
OpenDaylight User Guide February 21, 2016 Beryllium
Instructions
The below steps use the command line tool cURL to talk to the LISP Flow Mapping RPC
REST API. This is so that you can see the actual request URLs and body content on the page.
1. Install and run OpenDaylight Beryllium release on the controller VM. Please follow the
general OpenDaylight Beryllium Installation Guide for this step. Once the OpenDaylight
controller is running install the odl-lispflowmapping-msmr feature from the Karaf CLI:
feature:install odl-lispflowmapping-msmr
It takes quite a while to load and initialize all features and their dependencies. It’s worth
running the command log:tail in the Karaf console to see when the log output is
winding down, and continue with the tutorial after that.
2. Install LISPmob on the client, server1, server2, and service-node VMs following the
installation instructions from the LISPmob README file.
3. Configure the LISPmob installations from the previous step. Starting from the
lispd.conf.example file in the distribution, set the EID in each lispd.conf file
from the IP address space selected for your virtual/LISP network. In this tutorial the EID
of the client is set to 1.1.1.1/32, and that of server1 and server2 to 2.2.2.2/32.
4. Set the RLOC interface to eth1 in each lispd.conf file. LISP will determine the RLOC
(IP address of the corresponding VM) based on this interface.
5. Set the Map-Resolver address to the IP address of the controller, and on the client the
Map-Server too. On server1 and server2 set the Map-Server to something else, so that
it doesn’t interfere with the mappings on the controller, since we’re going to program
them manually.
6. Modify the "key" parameter in each lispd.conf file to a key/password of your choice
(password in this tutorial).
Note
The resources/tutorial directory in the stable/beryllium branch of the
project git repository has the files used in the tutorial checked in, so you can
just copy the files to /root/lispd.conf on the respective VMs. You will
also find the JSON files referenced below in the same directory.
7. Define a key and EID prefix association in OpenDaylight using the RPC REST API for the
client EID (1.1.1.1/32) to allow registration from the southbound. Since the mappings
for the server EID will be configured from the REST API, no such association is necessary.
Run the below command on the controller (or any machine that can reach controller, by
replacing localhost with the IP address of controller).
136
OpenDaylight User Guide February 21, 2016 Beryllium
{
"input": {
"eid": {
"address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
"ipv4-prefix": "1.1.1.1/32"
},
"mapping-authkey": {
"key-string": "password",
"key-type": 1
}
}
}
8. Verify that the key is added properly by requesting the following URL:
where the content of the get1.json file can be derived from the add-key.json file by
removing the mapping-authkey field. The output the above invocation should look like
this:
{"output":{"mapping-authkey":{"key-type":1,"key-string":"password"}}}
lispd -f /root/lispd.conf
10.The client LISPmob node should now register its EID-to-RLOC mapping in OpenDaylight.
To verify you can lookup the corresponding EIDs via the REST API
An alternative way for retrieving mappings from ODL using the southbound interface is
using the lig open source tool.
11.Register the EID-to-RLOC mapping of the server EID 2.2.2.2/32 to the controller, pointing
to server1 and server2 with a higher priority for server1
{
"input": {
"mapping-record": {
"recordTtl": 1440,
"action": "NoAction",
"authoritative": true,
"eid": {
"address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
137
OpenDaylight User Guide February 21, 2016 Beryllium
"ipv4-prefix": "2.2.2.2/32"
},
"LocatorRecord": [
{
"locator-id": "server1",
"priority": 1,
"weight": 1,
"multicastPriority": 255,
"multicastWeight": 0,
"localLocator": true,
"rlocProbed": false,
"routed": true,
"rloc": {
"address-type": "ietf-lisp-address-types:ipv4-afi",
"ipv4": "192.168.16.31"
}
},
{
"locator-id": "server2",
"priority": 2,
"weight": 1,
"multicastPriority": 255,
"multicastWeight": 0,
"localLocator": true,
"rlocProbed": false,
"routed": true,
"rloc": {
"address-type": "ietf-lisp-address-types:ipv4-afi",
"ipv4": "192.168.16.32"
}
}
]
}
}
}
Here the priority of the second RLOC (192.168.16.32 - server2) is 2, a higher numeric
value than the priority of 192.168.16.31, which is 1. This policy is saying that server1
is preferred to server2 for reaching EID 2.2.2.2/32. Note that lower priority value has
higher preference in LISP.
where get2.json can be derived from get1.json by changing the content of the
Ipv4Address field from 1.1.1.1 to 2.2.2.2.
13.Now the LISP network is up. To verify, log into the client VM and ping the server EID:
ping 2.2.2.2
14.Let’s test fail-over now. Suppose you had a service on server1 which became unavailable,
but server1 itself is still reachable. LISP will not automatically fail over, even if the
mapping for 2.2.2.2/32 has two locators, since both locators are still reachable and uses
the one with the higher priority (lowest priority value). To force a failover, we need to
138
OpenDaylight User Guide February 21, 2016 Beryllium
set the priority of server2 to a lower value. Using the file mapping.json above, swap the
priority values between the two locators (lines 14 and 28 in mapping.json) and repeat
the request from step 11. You can also repeat step 12 to see if the mapping is correctly
registered. If you leave the ping on, and monitor the traffic using wireshark, you can
see that the ping traffic to 2.2.2.2 will be diverted from the server1 RLOC to the server2
RLOC.
With the default OpenDaylight configuration the failover should be near instantaneous
(we observed 3 lost pings in the worst case), because of the LISP Solicit-Map-Request
(SMR) mechanism that can ask a LISP data plane element to update its mapping for
a certain EID (enabled by default). It is controlled by the lisp.smr variable in etc/
custom.porperties. When enabled, any mapping change from the RPC interface
will trigger an SMR packet to all data plane elements that have requested the mapping
in the last 24 hours (this value was chosen because it’s the default TTL of Cisco IOS xTR
mapping registrations). If disabled, ITRs keep their mappings until the TTL specified in
the Map-Reply expires.
15.To add a service chain into the path from the client to the server, we can use an Explicit
Locator Path, specifying the service-node as the first hop and server1 (or server2) as the
second hop. The following will achieve that:
{
"input": {
"mapping-record": {
"recordTtl": 1440,
"action": "NoAction",
"authoritative": true,
"eid": {
"address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
"ipv4-prefix": "2.2.2.2/32"
},
"LocatorRecord": [
{
"locator-id": "ELP",
"priority": 1,
"weight": 1,
"multicastPriority": 255,
"multicastWeight": 0,
"localLocator": true,
"rlocProbed": false,
"routed": true,
"rloc": {
"address-type": "ietf-lisp-address-types:explicit-
locator-path-lcaf",
"explicit-locator-path": {
"hop": [
{
"hop-id": "service-node",
"address": "192.168.16.33",
"lrs-bits": "strict"
139
OpenDaylight User Guide February 21, 2016 Beryllium
},
{
"hop-id": "server1",
"address": "192.168.16.31",
"lrs-bits": "strict"
}
]
}
}
}
]
}
}
}
After the mapping for 2.2.2.2/32 is updated with the above, the ICMP traffic from client
to server1 will flow through the service-node. You can confirm this in the LISPmob logs,
or by sniffing the traffic on either the service-node or server1. Note that service chains
are unidirectional, so unless another ELP mapping is added for the return traffic, packets
will go from server1 to client directly.
16.Suppose the service-node is actually a firewall, and traffic is diverted there to support
access control lists (ACLs). In this tutorial that can be emulated by using iptables
firewall rules in the service-node VM. To deny traffic on the service chain defined above,
the following rule can be added:
iptables -A OUTPUT --dst 192.168.16.31 -j DROP
In this case the ACL is done on the destination RLOC. There is an effort underway in the
LISPmob community to allow filtering on EIDs, which is the more logical place to apply
ACLs.
17.To delete the rule and restore connectivity on the service chain, delete the ACL by issuing
the following command:
iptables -D OUTPUT --dst 192.168.16.31 -j DROP
140
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 141
Architecture ................................................................................................................ 141
Administering or Managing Messaging4Transport ....................................................... 142
Overview
The OpenDaylight controller is based on an MD-SAL allows the modeling of data, RPCs,
and notifications. Because of this model basis, adding new northbound bindings to the
controller is simple, and everything modeled becomes exposed automatically. Currently
the MD-SAL has RESTCONF northbound bindings, while more bindings such as AMQP and
XMPP can easily be implemented and integrated. Messaging4Transport attempts to build
more northbound interfaces to MD-SAL, with message-oriented middleware protocols.
Messaging4Transport Beryllium offers an AMQP northbound to MD-SAL.
Architecture
Advanced Message Queuing Protocol (AMQP) is an open standard application layer
protocol for message-oriented middleware. Messaging4Transport adds AMQP bindings
to the MD-SAL, which would automatically make all MD-SAL APIs available via that
mechanism. Messaging4Transport is built as an independent Karaf feature, that exposes
the MD-SAL data tree, RPCs, and notifications via AMQP, when installed. While AMQP is
the focus for the Beryllium Release, other message-oriented transport protocols will be
considered for future releases.
A message broker internal or external to OpenDaylight receives the messages that are
published by the MD-SAL, and sends them to the subscribers. Hence, the broker functions
as an intermediary in messages from the controller to the listeners, and vice versa.
ActiveMQ has been chosen as the default external broker in the Messaging4Transport
Beryllium.
Since OpenDaylight Beryllium is built on Karaf 3.x, the instructions are given below to install
and activate ActiveMQ OSGi bundle into Karaf.
141
OpenDaylight User Guide February 21, 2016 Beryllium
hawtio provides a user-friendly web user interface, that can be installed optionally to work
with the project.
feature:repo-add hawtio 1.4.51
feature:install hawtio
You may further configure the broker by modifying the ActiveMQ configuration file
in ODL_INSTALLATION_DIR/karaf/target/assembly/etc/org.apache.activemq.server-
default.cfg
You may need to install/re-install the bundle after that and restart the container for the
changes to take effort.
The MD-SAL will be the publisher that publishes the MD-SAL data tree, RPCs, and
notifications via AMQP. The listener can be any consumer that consumes the data tree and
the other data published by MD-SAL via the AMQP binding.
Once configured, the ActiveMQ console can be accessed from the hawtio web console with
the credentials karaf/karaf.
142
OpenDaylight User Guide February 21, 2016 Beryllium
143
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 144
NEMO Engine Architecture .......................................................................................... 144
Configuring NEMO Engine ........................................................................................... 144
Administering or Managing NEMO Engine .................................................................. 144
Tutorials ...................................................................................................................... 144
This section describes how to use the NEMO feature in OpenDaylight and contains contains
configuration, administration, and management sections for the feature.
Overview
TBD: An overview of the NEMO feature and the use case and the audience who will use the
feature.
Tutorials
Below are tutorials for NEMO Engine.
Overview
TBD: An overview of the NEMO tutorial
Prerequisites
TBD: Provide any prerequisite information, assumed knowledge, or environment required
to execute the use case.
144
OpenDaylight User Guide February 21, 2016 Beryllium
Target Environment
TBD: Include any topology requirement for the use case.
Instructions
TBD: Step by step procedure for using NEMO Engine.
145
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 146
NetIDE API .................................................................................................................. 146
Overview
OpenDaylight’s NetIDE project allows users to run SDN applications written for different
SDN controllers, e.g., Floodlight or Ryu, on top of OpenDaylight managed infrastructure.
The NetIDE Network Engine integrates a client controller layer that executes the modules
that compose a Network Application and interfaces with a server SDN controller layer
that drives the underlying infrastructure. In addition, it provides a uniform interface to
common tools that are intended to allow the inspection/debug of the control channel and
the management of the network resources.
The Network Engine provides a compatibility layer capable of translating calls of the
network applications running on top of the client controllers, into calls for the server
controller framework. The communication between the client and the server layers is
achieved through the NetIDE intermediate protocol, which is an application-layer protocol
on top of TCP that transmits the network control/management messages from the client to
the server controller and vice-versa. Between client and server controller sits the Core Layer
which also speaks the intermediate protocol.
NetIDE API
Architecture and Design
The NetIDE engine follows the ONF’s proposed Client/Server SDN Application architecture.
146
OpenDaylight User Guide February 21, 2016 Beryllium
Core
The NetIDE Core is a message-based system that allows for the exchange of messages
between OpenDaylight and subscribed Client SDN Controllers
In the proposed approach, represented in the figure below, the task of pairing replies with
requests is performed by the Shim Layer which replaces the original xid of the OpenFlow
requests coming from the core with new unique xid values. The Shim also saves the original
OpenFlow xid value and the module id it finds in the NetIDE header. As the network
elements must use the same xid values in the replies, the Shim layer can easily pair a reply
with the correct request as it is using unique xid values.
The below figure shows how the Network Engine should handle the controller-to-switch
OpenFlow messages. The diagram shows the case of a request message sent by an
application module to a network element where the Backend inserts the module id of the
module in the NetIDE header (X in the Figure). For other messages generated by the client
controller platform (e.g. echo requests) or by the Backend, the module id of the Backend is
used (Y in the Figure).
147
OpenDaylight User Guide February 21, 2016 Beryllium
Configuration
Below are the configuration items which can be edited, including their default values.
• address: IP address where the controller listens for switch connections, default is
127.0.0.1
• port: Port where controller listens for switch connections, default: 6644
148
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 149
Network Intent Composition (NIC) Architecture ........................................................... 149
Configuring Network Intent Composition (NIC) ........................................................... 150
Administering or Managing Network Intent Composition (NIC) .................................... 150
Interactions ................................................................................................................. 150
NIC Usage Examples .................................................................................................... 151
Overview
Network Intent Composition (NIC) is an interface that allows clients to express a desired
state in an implementation-neutral form that will be enforced via modification of available
resources under the control of the OpenDaylight system.
The intent specification will be implemented by decomposing the intent and augmenting it
with implementation specifics that are driven by local implementation rules, policies, and/
or settings.
For the Lithium release, multiple, simultaneous renderers will not be supported. Instead
either the VTN or GBP renderer feature can be installed, but not both.
For the Litium release, the only actions supported are "ALLOW" and "BLOCK". The "ALLOW"
action indicates that traffic can flow between the source and destination end points, while
"BLOCK" prevents that flow; although it is possible that an given implementation may
augment the available actions with additional actions.
149
OpenDaylight User Guide February 21, 2016 Beryllium
Interactions
A user can interact with the Network Intent Composition (NIC) either through the RESTful
interface using standard RESTCONF operations and syntax or via the Karaf console CLI.
REST
Configuration
The Network Intent Composition (NIC) feature supports the following REST operations
against the configuration data store.
• POST - creates a new instance of an intent in the configuration store, which will trigger
the realization of that intent. An ID must be specified as part of this request as an
attribute of the intent.
• PUT - creates or updates an instance of an intent in the configuration store, which will
trigger the realization of that intent.
• DETELE - removes a configured intent from the configuration store, which triggers the
removal of the intent from the network.
Operational
The Network Intent Composition (NIC) feature supports the following REST operations
against the operational data store.
150
OpenDaylight User Guide February 21, 2016 Beryllium
Requirement
• Configure mininet and create a topology:
mininet> net
h1 h1-eth0:s2-eth1
h2 h2-eth0:s2-eth2
h3 h3-eth0:s3-eth1
h4 h4-eth0:s3-eth2
s1 lo: s1-eth1:s2-eth3 s1-eth2:s3-eth3
s2 lo: s2-eth1:h1-eth0 s2-eth2:h2-eth0 s2-eth3:s1-eth1
s3 lo: s3-eth1:h3-eth0 s3-eth2:h4-eth0 s3-eth3:s1-eth2
c0
Configuration
Please execute the following curl commands to test network intent using mininet:
• Create Intent
curl -v --user "admin":"admin" -H "Accept: application/json" -H
"Content-type: application/json" -X PUT http://localhost:8181/restconf/
151
OpenDaylight User Guide February 21, 2016 Beryllium
config/intent:intents/intent/b9a13232-525e-4d8c-be21-cd65e3436034 -d
'{ "intent:intent" : { "intent:id": "b9a13232-525e-4d8c-be21-cd65e3436034",
"intent:actions" : [ { "order" : 2, "allow" : {} } ], "intent:subjects" :
[ { "order":1 , "end-point-group" : {"name":"10.0.0.1"} }, { "order":2 ,
"end-point-group" : {"name":"10.0.0.2"}} ] } }'
Verification.
mininet> pingall
Ping: testing ping reachability
h1 -> h2 X X
h2 -> h1 h3 X
h3 -> X h2 X
h4 -> X X X
• Update an Intent
Verification.
mininet> pingall
Ping: testing ping reachability
h1 -> X X X
h2 -> X h3 X
h3 -> X h2 X
h4 -> X X X
Note
Old actions and hosts are replaced by the new action and hosts.
• Delete an Intent
Verification.
mininet> pingall
Ping: testing ping reachability
h1 -> X X X
h2 -> X X X
h3 -> X X X
h4 -> X X X
152
OpenDaylight User Guide February 21, 2016 Beryllium
Note
Ping between two hosts can also be done using MAC Address
153
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Introduction ................................................................................................................ 154
Components ................................................................................................................ 154
Troubleshooting .......................................................................................................... 154
Introduction
This user guide will help to setup the ODL-SDNi application for lithium release and contains
the examples configuration using ODL-BGPCEP.
Components
SDNiAggregator(controller), SDNi REST API(controller) and SDNiWrapper(bgpcep) are the
three components in ODL-SDNi App
• SDNi REST API: It is a part of controller northbound, which gives the required information
by quering SDNiAggregator through RESTCONF.
• SDNiWrapper: This component uses the SDNi REST API and gathers the information
required to be shared among controllers.
Troubleshooting
To work with multiple controllers, change some of the configuration in config.ini
file. For example change the listening port of one controller to 6653 and other
controller to 6663 in /root/controller/opendaylight/distribution/opendaylight/target/
distribution.opendaylight-osgipackage/opendaylight/configuration/config.ini (i.e
of.listenPort=6653).
OpenFlow related system parameters. TCP port on which the controller is listening
(default 6633) of.listenPort=6653
154
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview and Architecture .......................................................................................... 155
Tutorial / How-To ........................................................................................................ 157
Web / Graphical Interface ........................................................................................... 189
Command Line Interface ............................................................................................. 189
Programmatic Interface ............................................................................................... 193
Example flows ............................................................................................................. 193
Opendaylight OpenFlow Plugin: Troubleshooting ........................................................ 221
Scope
• Southbound plugin and integration of OpenFlow 1.0/1.3.x library project
• Connection Handling
• Session Management
155
OpenDaylight User Guide February 21, 2016 Beryllium
• State Management.
• Error Handling.
Design
Overall Architecture
156
OpenDaylight User Guide February 21, 2016 Beryllium
Coverage
Intro
This page is to catalog the things that have been tested and confirmed to work:
Coverage
Coverage has been moved to a GoogleDoc Spreadshee
OF 1.3 Considerations
The baseline model is a OF 1.3 model, and the coverage tables primarily deal with OF 1.3.
However for OF 1.0, we have a column to indicate either N/A if it doesn’t apply, or whether
its been confirmed working.
OF 1.0 Considerations
OF 1.0 is being considered as a switch with: * 1 Table * 0 Groups * 0 Meters * 1 Instruction
(Apply Actions) * and a limited vocabulary of matches and actions.
Tutorial / How-To
Running the controller with the new OpenFlow Plugin
Opendaylight Controller Plugin Options
• Run OpenDaylight controller with the new OpenFlow 1.0/1.3 plugin
There are 2 ways. In integration project the plugin version is controlled by startup
parameter. Or there is distribution build available directly in openflowplugin project.
157
OpenDaylight User Guide February 21, 2016 Beryllium
cd <extracted directory>/bin
./karaf
• and run
./karaf
How to start
There are all helium features (from features-openflowplugin) duplicated into features-
openflowplugin-li. The duplicates got suffix -li and provide Lithium codebase functionality.
• odl-openflowplugin-app-lldp-speaker-li
• odl-openflowplugin-flow-services-rest-li
• odl-openflowplugin-drop-test-li
feature:install odl-openflowplugin-app-lldp-speaker-li
• flow management
• group management
• meter management
• statistics polling
What to log
In order to see really low level messages enter these in karaf console:
158
OpenDaylight User Guide February 21, 2016 Beryllium
In order for topology to work (fill dataStore/operational with links) there must be LLDP
responses delivered back to controller. This requires table-miss-entries. Table-miss-entry
is a flow in table.id=0 with low priority, empty match and one output action = send to
controller. Having this flow installed on every node will enable for gathering and exporting
links between nodes into dataStore/operational. This is done if you use for example l2
switch application.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<barrier>false</barrier>
<cookie>54</cookie>
<flags>SEND_FLOW_REM</flags>
<flow-name>FooXf54</flow-name>
<hard-timeout>0</hard-timeout>
<id>4242</id>
<idle-timeout>0</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<apply-actions>
<action>
<output-action>
<max-length>65535</max-length>
<output-node-connector>CONTROLLER</output-node-
connector>
</output-action>
<order>0</order>
</action>
</apply-actions>
<order>0</order>
</instruction>
</instructions>
<match/>
<priority>0</priority>
<strict>false</strict>
<table_id>0</table_id>
</flow>
If you want to use RESTCONF with openflowplugin project, you have to install odl-restconf
feature to enable that. To install odl-restconf feature run the following command
karaf#>feature:install odl-restconf
If you want to access the Controller GUI, you have to install odl-dlux-core feature to enable
that. Run following command to install it
karaf#>feature:install odl-dlux-core
Once you enable the feature, access the Controller GUI using following URL
http://<controller-ip>:8181/dlux/index.html
Run OpenDaylight controller with the old OpenFlow 1.0-only (old) plugin
159
OpenDaylight User Guide February 21, 2016 Beryllium
There are 2 ways. In integration project the plugin version is controlled by startup
parameter. Or there is distribution build available directly in controller project.
./run.sh
cd opendaylight
160
OpenDaylight User Guide February 21, 2016 Beryllium
For whatever reason, at least on the Mac, NATed interfaces in VirtualBox don’t actually
seem to allow for connections from the host to the VM. Instead, you need to configure a
host-only network and set it up. Do this by:
• Go to the VM’s settings in VirtualBox then to network and add a second adapter
attached to "Host-only Adapter" (see the screenshot to the right)
• Edit the /etc/network/interfaces file to configure the adapter properly by adding these
two lines
auto eth1
iface eth1 inet dhcp
• Reboot the VM
At this point you should have two interfaces one which gives you NATed access to the
internet and another that gives you access between your mac and the VMs. At least for
me, the NATed interface gets a 10.0.2.x address and the the host-only interface gets a
192.168.56.x address.
161
OpenDaylight User Guide February 21, 2016 Beryllium
This will leave you sshed into a fully provisioned Ubuntu Trusty box with mininet-2.1.0 and
OVS 2.0 patches to work with OF 1.3.
• You can setup the switch as per the instructions given on the following URL
https://github.com/CPqD/ofsoftswitch13
ethX should not be associated with ip address and ipv6 should be disabled on it. If you are
installing the switch on your local machine, you can use following command (for Ubuntu)
to create virtual interface.
ip link add link ethX address 00:19:d1:29:d2:58 macvlan0 type macvlan
Or if you are using mininet VM for installing this switch, you can simply add one more
adaptor to your VM.
• Add Groups
• Create queue
162
OpenDaylight User Guide February 21, 2016 Beryllium
"dpctl" --help is not very intuitive, so please keep adding any new command you figured out
while your experiment with the switch.
The -X option in ssh will enable x-session over ssh so that the wireshark window can be
shown on your host machine’s display. when prompted, enter the password (mininet).
From the mininet vm shell, set the wireshark capture privileges (http://wiki.wireshark.org/
CaptureSetup/CapturePrivileges):
sudo chgrp mininet /usr/bin/dumpcap
sudo chmod 754 /usr/bin/dumpcap
sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap
To see only Openflow packets, you may want to apply the following filter in the Filter
window:
tcp.port == 6633 and tcp.flags.push == 1
163
OpenDaylight User Guide February 21, 2016 Beryllium
You will also need to use HTTP Basic Auth with username: admin password: admin.
for example
http://localhost:8181/restconf/operational/opendaylight-inventory:nodes/node/
openflow:1
Enter the URL. Click on the Headers button on the far right. Enter the Accept: header. Click
on the Basic Auth Tab at the top and setup the username and password. Send.
Known Bug
If you have not had any switches come up, and though no children for http://
localhost:8080/restconf/datastore/opendaylight-inventory:nodes/ and exception will be
thrown. I’m pretty sure I know how to fix this bug, just need to get to it :)
164
OpenDaylight User Guide February 21, 2016 Beryllium
Check inventory
• Run mininet with support for OF 1.3 as described in End to End Inventory
• Make sure you see the openflow:1 node come up as described in End to End Inventory
Flow Strategy
1. Create MD-SAL modeled flow and commit it into dataStore using two phase commit MD-
SAL FAQ
2. FRM gets notified and invokes corresponding rpc (addFlow) on particular service
provider (if suitable provider for given node registered)
3. The provider (plugin in this case) transforms MD-SAL modeled flow into OF-API modeled
flow
5. OFLibrary encodes flow into particular version of wire protocol and sends it to particular
switch
• With PostMan:
• Set headers:
• Content-Type: application/xml
• Accept: application/xml
• Authentication
• PUT
• Use Body:
165
OpenDaylight User Guide February 21, 2016 Beryllium
</ethernet-match>
<ipv4-destination>10.0.10.2/24</ipv4-destination>
</match>
<id>1</id>
<table_id>0</table_id>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
</flow>
*Note: If you want to try a different flow id or a different table, make sure the URL and the
body stay in sync. For example, if you wanted to try: table 2 flow 20 you’d change the URL
to:
"http://<controller IP>:8181/restconf/config/opendaylight-inventory:nodes/node/
openflow:1/table/2/flow/20"
but you would also need to update the 20 and 2 in the body of the XML.
Other caveat, we have a known bug with updates, so please only write to a given flow
id and table id on a given node once at this time until we resolve it. Or you can use the
DELETE method with the same URL in PostMan to delete the flow information on switch
and controller cache.
If you want to see the above information from the mininet prompt - use "sh" instead of
"sudo" i.e. use "sh ovs-ofctl -O OpenFlow13 dump-flows s1".
• GET
166
OpenDaylight User Guide February 21, 2016 Beryllium
Return Response:
{
"flow-node-inventory:table": [
{
"flow-node-inventory:id": 0,
"flow-node-inventory:flow": [
{
"flow-node-inventory:priority": 1,
"flow-node-inventory:id": "10b1a23c-5299-4f7b-83d6-563bab472754",
"flow-node-inventory:table_id": 0,
"flow-node-inventory:hard-timeout": 0,
"flow-node-inventory:idle-timeout": 0,
"flow-node-inventory:instructions": {
"flow-node-inventory:instruction": [
{
"flow-node-inventory:apply-actions": {
"flow-node-inventory:action": [
{
"flow-node-inventory:output-action": {
"flow-node-inventory:output-node-connector":
"openflow:1:1"
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:match": {
"flow-node-inventory:ethernet-match": {
"flow-node-inventory:ethernet-type": {
"flow-node-inventory:type": 2048
}
},
"flow-node-inventory:ipv4-destination": "10.0.0.2"
},
"flow-node-inventory:cookie": 0
},
{
"flow-node-inventory:priority": 1,
"flow-node-inventory:id": "020bf359-1299-4da6-b4f7-368bd83b5841",
"flow-node-inventory:table_id": 0,
"flow-node-inventory:hard-timeout": 0,
"flow-node-inventory:idle-timeout": 0,
"flow-node-inventory:instructions": {
"flow-node-inventory:instruction": [
{
"flow-node-inventory:apply-actions": {
"flow-node-inventory:action": [
{
"flow-node-inventory:output-action": {
"flow-node-inventory:output-node-connector":
"openflow:1:1"
},
"flow-node-inventory:order": 0
}
]
167
OpenDaylight User Guide February 21, 2016 Beryllium
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:match": {
"flow-node-inventory:ethernet-match": {
"flow-node-inventory:ethernet-type": {
"flow-node-inventory:type": 2048
}
},
"flow-node-inventory:ipv4-destination": "10.0.0.1"
},
"flow-node-inventory:cookie": 0
},
{
"flow-node-inventory:priority": 1,
"flow-node-inventory:id": "42172bfc-9142-4a92-9e90-ee62529b1e85",
"flow-node-inventory:table_id": 0,
"flow-node-inventory:hard-timeout": 0,
"flow-node-inventory:idle-timeout": 0,
"flow-node-inventory:instructions": {
"flow-node-inventory:instruction": [
{
"flow-node-inventory:apply-actions": {
"flow-node-inventory:action": [
{
"flow-node-inventory:output-action": {
"flow-node-inventory:output-node-connector":
"openflow:1:1"
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:match": {
"flow-node-inventory:ethernet-match": {
"flow-node-inventory:ethernet-type": {
"flow-node-inventory:type": 2048
}
},
"flow-node-inventory:ipv4-destination": "10.0.0.3"
},
"flow-node-inventory:cookie": 0
},
{
"flow-node-inventory:priority": 1,
"flow-node-inventory:id": "99bf566e-89f3-4c6f-ae9e-e26012ceb1e4",
"flow-node-inventory:table_id": 0,
"flow-node-inventory:hard-timeout": 0,
"flow-node-inventory:idle-timeout": 0,
"flow-node-inventory:instructions": {
"flow-node-inventory:instruction": [
{
"flow-node-inventory:apply-actions": {
"flow-node-inventory:action": [
168
OpenDaylight User Guide February 21, 2016 Beryllium
{
"flow-node-inventory:output-action": {
"flow-node-inventory:output-node-connector":
"openflow:1:1"
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:match": {
"flow-node-inventory:ethernet-match": {
"flow-node-inventory:ethernet-type": {
"flow-node-inventory:type": 2048
}
},
"flow-node-inventory:ipv4-destination": "10.0.0.4"
},
"flow-node-inventory:cookie": 0
},
{
"flow-node-inventory:priority": 1,
"flow-node-inventory:id": "019dcc2e-5b4f-44f0-90cc-de490294b862",
"flow-node-inventory:table_id": 0,
"flow-node-inventory:hard-timeout": 0,
"flow-node-inventory:idle-timeout": 0,
"flow-node-inventory:instructions": {
"flow-node-inventory:instruction": [
{
"flow-node-inventory:apply-actions": {
"flow-node-inventory:action": [
{
"flow-node-inventory:output-action": {
"flow-node-inventory:output-node-connector":
"openflow:1:2"
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:match": {
"flow-node-inventory:ethernet-match": {
"flow-node-inventory:ethernet-type": {
"flow-node-inventory:type": 2048
}
},
"flow-node-inventory:ipv4-destination": "10.0.0.5"
},
"flow-node-inventory:cookie": 0
},
{
"flow-node-inventory:priority": 1,
"flow-node-inventory:id": "968cf81e-3f16-42f1-8b16-d01ff719c63c",
169
OpenDaylight User Guide February 21, 2016 Beryllium
"flow-node-inventory:table_id": 0,
"flow-node-inventory:hard-timeout": 0,
"flow-node-inventory:idle-timeout": 0,
"flow-node-inventory:instructions": {
"flow-node-inventory:instruction": [
{
"flow-node-inventory:apply-actions": {
"flow-node-inventory:action": [
{
"flow-node-inventory:output-action": {
"flow-node-inventory:output-node-connector":
"openflow:1:2"
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:match": {
"flow-node-inventory:ethernet-match": {
"flow-node-inventory:ethernet-type": {
"flow-node-inventory:type": 2048
}
},
"flow-node-inventory:ipv4-destination": "10.0.0.8"
},
"flow-node-inventory:cookie": 0
},
{
"flow-node-inventory:priority": 1,
"flow-node-inventory:id": "1c14ea3c-9dcc-4434-b566-7e99033ea252",
"flow-node-inventory:table_id": 0,
"flow-node-inventory:hard-timeout": 0,
"flow-node-inventory:idle-timeout": 0,
"flow-node-inventory:instructions": {
"flow-node-inventory:instruction": [
{
"flow-node-inventory:apply-actions": {
"flow-node-inventory:action": [
{
"flow-node-inventory:output-action": {
"flow-node-inventory:output-node-connector":
"openflow:1:2"
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:match": {
"flow-node-inventory:ethernet-match": {
"flow-node-inventory:ethernet-type": {
"flow-node-inventory:type": 2048
}
170
OpenDaylight User Guide February 21, 2016 Beryllium
},
"flow-node-inventory:ipv4-destination": "10.0.0.6"
},
"flow-node-inventory:cookie": 0
},
{
"flow-node-inventory:priority": 1,
"flow-node-inventory:id": "ed9deeb2-be8f-4b84-bcd8-9d12049383d6",
"flow-node-inventory:table_id": 0,
"flow-node-inventory:hard-timeout": 0,
"flow-node-inventory:idle-timeout": 0,
"flow-node-inventory:instructions": {
"flow-node-inventory:instruction": [
{
"flow-node-inventory:apply-actions": {
"flow-node-inventory:action": [
{
"flow-node-inventory:output-action": {
"flow-node-inventory:output-node-connector":
"openflow:1:2"
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:order": 0
}
]
},
"flow-node-inventory:match": {
"flow-node-inventory:ethernet-match": {
"flow-node-inventory:ethernet-type": {
"flow-node-inventory:type": 2048
}
},
"flow-node-inventory:ipv4-destination": "10.0.0.7"
},
"flow-node-inventory:cookie": 0
}
]
}
]
}
Look for your flow stats in the controller operational data via
RESTCONF
• GET
Return Response:
171
OpenDaylight User Guide February 21, 2016 Beryllium
"flow-node-inventory:table": [
{
"flow-node-inventory:id": 0,
"flow-node-inventory:flow": [
{
"flow-node-inventory:id": "10b1a23c-5299-4f7b-83d6-563bab472754",
"opendaylight-flow-statistics:flow-statistics": {
"opendaylight-flow-statistics:cookie": 0,
"opendaylight-flow-statistics:duration": {
"opendaylight-flow-statistics:nanosecond": 886000000,
"opendaylight-flow-statistics:second": 2707
},
"opendaylight-flow-statistics:hard-timeout": 0,
"opendaylight-flow-statistics:byte-count": 784,
"opendaylight-flow-statistics:match": {
"opendaylight-flow-statistics:ethernet-match": {
"opendaylight-flow-statistics:ethernet-type": {
"opendaylight-flow-statistics:type": 2048
}
},
"opendaylight-flow-statistics:ipv4-destination": "10.0.0.2/32"
},
"opendaylight-flow-statistics:priority": 1,
"opendaylight-flow-statistics:packet-count": 8,
"opendaylight-flow-statistics:table_id": 0,
"opendaylight-flow-statistics:idle-timeout": 0,
"opendaylight-flow-statistics:instructions": {
"opendaylight-flow-statistics:instruction": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:apply-actions": {
"opendaylight-flow-statistics:action": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:output-action": {
"opendaylight-flow-statistics:output-node-
connector": "1",
"opendaylight-flow-statistics:max-length": 0
}
}
]
}
}
]
}
}
},
{
"flow-node-inventory:id": "020bf359-1299-4da6-b4f7-368bd83b5841",
"opendaylight-flow-statistics:flow-statistics": {
"opendaylight-flow-statistics:cookie": 0,
"opendaylight-flow-statistics:duration": {
"opendaylight-flow-statistics:nanosecond": 826000000,
"opendaylight-flow-statistics:second": 2711
},
"opendaylight-flow-statistics:hard-timeout": 0,
"opendaylight-flow-statistics:byte-count": 1568,
"opendaylight-flow-statistics:match": {
"opendaylight-flow-statistics:ethernet-match": {
"opendaylight-flow-statistics:ethernet-type": {
172
OpenDaylight User Guide February 21, 2016 Beryllium
"opendaylight-flow-statistics:type": 2048
}
},
"opendaylight-flow-statistics:ipv4-destination": "10.0.0.1/32"
},
"opendaylight-flow-statistics:priority": 1,
"opendaylight-flow-statistics:packet-count": 16,
"opendaylight-flow-statistics:table_id": 0,
"opendaylight-flow-statistics:idle-timeout": 0,
"opendaylight-flow-statistics:instructions": {
"opendaylight-flow-statistics:instruction": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:apply-actions": {
"opendaylight-flow-statistics:action": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:output-action": {
"opendaylight-flow-statistics:output-node-
connector": "1",
"opendaylight-flow-statistics:max-length": 0
}
}
]
}
}
]
}
}
},
{
"flow-node-inventory:id": "42172bfc-9142-4a92-9e90-ee62529b1e85",
"opendaylight-flow-statistics:flow-statistics": {
"opendaylight-flow-statistics:cookie": 0,
"opendaylight-flow-statistics:duration": {
"opendaylight-flow-statistics:nanosecond": 548000000,
"opendaylight-flow-statistics:second": 2708
},
"opendaylight-flow-statistics:hard-timeout": 0,
"opendaylight-flow-statistics:byte-count": 784,
"opendaylight-flow-statistics:match": {
"opendaylight-flow-statistics:ethernet-match": {
"opendaylight-flow-statistics:ethernet-type": {
"opendaylight-flow-statistics:type": 2048
}
},
"opendaylight-flow-statistics:ipv4-destination": "10.0.0.3/32"
},
"opendaylight-flow-statistics:priority": 1,
"opendaylight-flow-statistics:packet-count": 8,
"opendaylight-flow-statistics:table_id": 0,
"opendaylight-flow-statistics:idle-timeout": 0,
"opendaylight-flow-statistics:instructions": {
"opendaylight-flow-statistics:instruction": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:apply-actions": {
"opendaylight-flow-statistics:action": [
{
"opendaylight-flow-statistics:order": 0,
173
OpenDaylight User Guide February 21, 2016 Beryllium
"opendaylight-flow-statistics:output-action": {
"opendaylight-flow-statistics:output-node-
connector": "1",
"opendaylight-flow-statistics:max-length": 0
}
}
]
}
}
]
}
}
},
{
"flow-node-inventory:id": "99bf566e-89f3-4c6f-ae9e-e26012ceb1e4",
"opendaylight-flow-statistics:flow-statistics": {
"opendaylight-flow-statistics:cookie": 0,
"opendaylight-flow-statistics:duration": {
"opendaylight-flow-statistics:nanosecond": 296000000,
"opendaylight-flow-statistics:second": 2710
},
"opendaylight-flow-statistics:hard-timeout": 0,
"opendaylight-flow-statistics:byte-count": 1274,
"opendaylight-flow-statistics:match": {
"opendaylight-flow-statistics:ethernet-match": {
"opendaylight-flow-statistics:ethernet-type": {
"opendaylight-flow-statistics:type": 2048
}
},
"opendaylight-flow-statistics:ipv4-destination": "10.0.0.4/32"
},
"opendaylight-flow-statistics:priority": 1,
"opendaylight-flow-statistics:packet-count": 13,
"opendaylight-flow-statistics:table_id": 0,
"opendaylight-flow-statistics:idle-timeout": 0,
"opendaylight-flow-statistics:instructions": {
"opendaylight-flow-statistics:instruction": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:apply-actions": {
"opendaylight-flow-statistics:action": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:output-action": {
"opendaylight-flow-statistics:output-node-
connector": "1",
"opendaylight-flow-statistics:max-length": 0
}
}
]
}
}
]
}
}
},
{
"flow-node-inventory:id": "019dcc2e-5b4f-44f0-90cc-de490294b862",
"opendaylight-flow-statistics:flow-statistics": {
"opendaylight-flow-statistics:cookie": 0,
174
OpenDaylight User Guide February 21, 2016 Beryllium
"opendaylight-flow-statistics:duration": {
"opendaylight-flow-statistics:nanosecond": 392000000,
"opendaylight-flow-statistics:second": 2711
},
"opendaylight-flow-statistics:hard-timeout": 0,
"opendaylight-flow-statistics:byte-count": 1470,
"opendaylight-flow-statistics:match": {
"opendaylight-flow-statistics:ethernet-match": {
"opendaylight-flow-statistics:ethernet-type": {
"opendaylight-flow-statistics:type": 2048
}
},
"opendaylight-flow-statistics:ipv4-destination": "10.0.0.5/32"
},
"opendaylight-flow-statistics:priority": 1,
"opendaylight-flow-statistics:packet-count": 15,
"opendaylight-flow-statistics:table_id": 0,
"opendaylight-flow-statistics:idle-timeout": 0,
"opendaylight-flow-statistics:instructions": {
"opendaylight-flow-statistics:instruction": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:apply-actions": {
"opendaylight-flow-statistics:action": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:output-action": {
"opendaylight-flow-statistics:output-node-
connector": "2",
"opendaylight-flow-statistics:max-length": 0
}
}
]
}
}
]
}
}
},
{
"flow-node-inventory:id": "968cf81e-3f16-42f1-8b16-d01ff719c63c",
"opendaylight-flow-statistics:flow-statistics": {
"opendaylight-flow-statistics:cookie": 0,
"opendaylight-flow-statistics:duration": {
"opendaylight-flow-statistics:nanosecond": 344000000,
"opendaylight-flow-statistics:second": 2707
},
"opendaylight-flow-statistics:hard-timeout": 0,
"opendaylight-flow-statistics:byte-count": 784,
"opendaylight-flow-statistics:match": {
"opendaylight-flow-statistics:ethernet-match": {
"opendaylight-flow-statistics:ethernet-type": {
"opendaylight-flow-statistics:type": 2048
}
},
"opendaylight-flow-statistics:ipv4-destination": "10.0.0.8/32"
},
"opendaylight-flow-statistics:priority": 1,
"opendaylight-flow-statistics:packet-count": 8,
"opendaylight-flow-statistics:table_id": 0,
175
OpenDaylight User Guide February 21, 2016 Beryllium
"opendaylight-flow-statistics:idle-timeout": 0,
"opendaylight-flow-statistics:instructions": {
"opendaylight-flow-statistics:instruction": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:apply-actions": {
"opendaylight-flow-statistics:action": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:output-action": {
"opendaylight-flow-statistics:output-node-
connector": "2",
"opendaylight-flow-statistics:max-length": 0
}
}
]
}
}
]
}
}
},
{
"flow-node-inventory:id": "ed9deeb2-be8f-4b84-bcd8-9d12049383d6",
"opendaylight-flow-statistics:flow-statistics": {
"opendaylight-flow-statistics:cookie": 0,
"opendaylight-flow-statistics:duration": {
"opendaylight-flow-statistics:nanosecond": 577000000,
"opendaylight-flow-statistics:second": 2706
},
"opendaylight-flow-statistics:hard-timeout": 0,
"opendaylight-flow-statistics:byte-count": 784,
"opendaylight-flow-statistics:match": {
"opendaylight-flow-statistics:ethernet-match": {
"opendaylight-flow-statistics:ethernet-type": {
"opendaylight-flow-statistics:type": 2048
}
},
"opendaylight-flow-statistics:ipv4-destination": "10.0.0.7/32"
},
"opendaylight-flow-statistics:priority": 1,
"opendaylight-flow-statistics:packet-count": 8,
"opendaylight-flow-statistics:table_id": 0,
"opendaylight-flow-statistics:idle-timeout": 0,
"opendaylight-flow-statistics:instructions": {
"opendaylight-flow-statistics:instruction": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:apply-actions": {
"opendaylight-flow-statistics:action": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:output-action": {
"opendaylight-flow-statistics:output-node-
connector": "2",
"opendaylight-flow-statistics:max-length": 0
}
}
]
}
176
OpenDaylight User Guide February 21, 2016 Beryllium
}
]
}
}
},
{
"flow-node-inventory:id": "1c14ea3c-9dcc-4434-b566-7e99033ea252",
"opendaylight-flow-statistics:flow-statistics": {
"opendaylight-flow-statistics:cookie": 0,
"opendaylight-flow-statistics:duration": {
"opendaylight-flow-statistics:nanosecond": 659000000,
"opendaylight-flow-statistics:second": 2705
},
"opendaylight-flow-statistics:hard-timeout": 0,
"opendaylight-flow-statistics:byte-count": 784,
"opendaylight-flow-statistics:match": {
"opendaylight-flow-statistics:ethernet-match": {
"opendaylight-flow-statistics:ethernet-type": {
"opendaylight-flow-statistics:type": 2048
}
},
"opendaylight-flow-statistics:ipv4-destination": "10.0.0.6/32"
},
"opendaylight-flow-statistics:priority": 1,
"opendaylight-flow-statistics:packet-count": 8,
"opendaylight-flow-statistics:table_id": 0,
"opendaylight-flow-statistics:idle-timeout": 0,
"opendaylight-flow-statistics:instructions": {
"opendaylight-flow-statistics:instruction": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:apply-actions": {
"opendaylight-flow-statistics:action": [
{
"opendaylight-flow-statistics:order": 0,
"opendaylight-flow-statistics:output-action": {
"opendaylight-flow-statistics:output-node-
connector": "2",
"opendaylight-flow-statistics:max-length": 0
}
}
]
}
}
]
}
}
}
],
"opendaylight-flow-table-statistics:flow-table-statistics": {
"opendaylight-flow-table-statistics:active-flows": 8,
"opendaylight-flow-table-statistics:packets-matched": 97683,
"opendaylight-flow-table-statistics:packets-looked-up": 101772
}
}
]
}
177
OpenDaylight User Guide February 21, 2016 Beryllium
Using addMDFlow
From the
cd openflowplugin/distribution/base/target/distributions-openflowplugin-
base-0.0.1-SNAPSHOT-osgipackage/opendaylight
./run.sh
once you can see your node (probably openflow:1 if you’ve been following along) in the
inventory, at the OSGI command line try running:
addMDFlow openflow:1 f#
Where # is a number between 1 and 80. This will create one of 80 possible flows. You can
go confirm they were created on the switch.
• GET
• Accept: application/xml
• URL: "http://192.168.195.157:8181/restconf/config/opendaylight-inventory:nodes/
node/openflow:1/table/2/"
To see a full listing of the flows in table 2 (where they will be put). If you want to see a
particular flow, look at
• URL: "http://192.168.195.157:8181/restconf/config/opendaylight-inventory:nodes/
node/openflow:1/table/2/flow/#"
Where # is 123 + the f# you used. So for example, for f22, your url would be
• URL: "http://192.168.195.157:8181/restconf/config/opendaylight-inventory:nodes/
node/openflow:1/table/2/flow/145"
Note: You may have to trim out some of the sections like that contain bitfields and binary
types that are not correctly modeled.
Note: Before attempting to PUT a flow you have created via addMDFlow, please change
its URL and body to, for example, use table 1 instead of table 2 or another Flow Id, so you
don’t collide.
Note: There are several test command providers and the one handling flows is
OpenflowpluginTestCommandProvider. Methods, which can be use as commands in
OSGI-console have prefix _.
178
OpenDaylight User Guide February 21, 2016 Beryllium
Example Flows
Examples for XML for various flow matches, instructions & actions can be found in
following section here
2. Start mininet to use OF 1.3: OpenFlow 1.3 Enabled Software Switches / Environment
You will also need to use HTTP Basic Auth with username: admin password: admin.
for example
http://localhost:8080/restconf/operational/network-topology:network-topology/
topology/flow:1/
Enter the URL. Click on the Headers button on the far right. Enter the Accept: header. Click
on the Basic Auth Tab at the top and setup the username and password. Send.
179
OpenDaylight User Guide February 21, 2016 Beryllium
• http://openvswitch.org/releases/NEWS-2.0.0
• http://comments.gmane.org/gmane.linux.network.openvswitch.general/3251
For testing group feature please use for example CPQD virtual switch.
Instructions
Learn End to End for Inventory
End to End Inventory
Check inventory
Run CPqD with support for OF 1.3 as described in End to End Inventory
Make sure you see the openflow:1 node come up as described in End to End Inventory
Group Strategy
Current way to flush a group to switch looks like this:
1. create MD-SAL modeled group and commit it into dataStore using two phase commit
2. FRM gets notified and invokes corresponding rpc (addGroup) on particular service
provider (if suitable provider for given node registered)
3. the provider (plugin in this case) transforms MD-SAL modeled group into OF-API
modeled group
5. OFLibrary encodes group into particular version of wire protocol and sends it to
particular switch
• Set
• Content-Type: application/xml
• Accept: application/xml
180
OpenDaylight User Guide February 21, 2016 Beryllium
• PUT
• Use Body:
Note
If you want to try a different group id, make sure the URL and the body stay
in sync. For example, if you wanted to try: group-id 20 you’d change the URL
to "http://<ip-address>:8080/restconf/config/opendaylight-inventory:nodes/
node/openflow:1/group/20" but you would also need to update the <group-
id>20</group-id> in the body to match.
Note
<ip-address> :Provide the IP Address of the machine on which the controller is
running.
181
OpenDaylight User Guide February 21, 2016 Beryllium
SENDING:
stat_req{type="grp", flags="0x0", group="all"}
RECEIVED:
stat_repl{type="grp", flags="0x0", stats=[
{group="1", ref_cnt="0", pkt_cnt="0", byte_cnt="0", cntrs=[{pkt_cnt="0",
byte_cnt="0"}, {pkt_cnt="0", byte_cnt="0"}]}]}
• URL http://<ip-address>:8080/restconf/config/opendaylight-inventory:nodes/node/
openflow:1/group/1
• GET
• Note: <ip-address> :Provide the IP Address of the machine on which the controller is
running.
Look for your group stats in the controller operational data via RESTCONF
• See your operational group stats in POSTMAN with
• URL http://<ip-address>:8080/restconf/operational/opendaylight-inventory:nodes/
node/openflow:1/group/1
• GET
• Note: <ip-address> :Provide the IP Address of the machine on which the controller is
running.
Using addGroup
From the
cd openflowplugin/distribution/base/target/distributions-openflowplugin-
base-0.0.1-SNAPSHOT-osgipackage/opendaylight
./run.sh
once you can see your node (probably openflow:1 if you’ve been following along) in the
inventory, at the OSGI command line try running:
182
OpenDaylight User Guide February 21, 2016 Beryllium
addGroup openflow:1
This will install a group in the switch. You can check whether the group is installed or not.
• GET
• Accept: application/xml
• URL: "http://<ip-address>:8080/restconf/config/opendaylight-inventory:nodes/node/
openflow:1/group/1"
• Note: <ip-address> :Provide the IP Address of the machine on which the controller is
running.
Note
Before attempting to PUT a group you have created via addGroup, please
change its URL and body to, for example, use group 1 instead of group 2 or
another Group Id, so that they don’t collide.
Note
There are several test command providers and the one handling groups is
OpenflowpluginGroupTestCommandProvider. Methods, which can be use as
commands in OSGI-console have prefix _.
Example Group
Examples for XML for various Group Types can be found in the test-scripts bundle of the
plugin code with names g1.xml, g2.xml and g3.xml.
Check inventory
• Run mininet with support for OF 1.3 as described in End to End Inventory
• Make sure you see the openflow:1 node come up as described in End to End Inventory
Meter Strategy
1. create MD-SAL modeled flow and commit it into dataStore using two phase commit
183
OpenDaylight User Guide February 21, 2016 Beryllium
2. FRM gets notified and invokes corresponding rpc (addMeter) on particular service
provider (if suitable provider for given node registered)
3. the provider (plugin in this case) transforms MD-SAL modeled meter into OF-API
modeled meter
5. OFLibrary encodes meter into particular version of wire protocol and sends it to
particular switch
• Using PostMan:
• Content-Type: application/xml
• Accept: application/xml
• Method:PUT
• Request Body:
Note
If you want to try a different meter id, make sure the URL and the body stay
in sync. For example, if you wanted to try: meter-id 20 you’d change the
URL to "http://:8080/restconf/config/opendaylight-inventory:nodes/node/
184
OpenDaylight User Guide February 21, 2016 Beryllium
openflow:1/meter/20" but you would also need to update the 20 in the body
to match.
Note
:Provide the IP Address of the machine on which the controller is running.
SENDING:
stat_req{type="mconf", flags="0x0"{meter_id= ffffffff"}
RECEIVED:
stat_repl{type="mconf", flags="0x0", stats=[{meter= c"", flags="4", bands=
[{type = dscp_remark, rate="12", burst_size="5", prec_level="1"}]}]}
• URL "http://:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/
meter/1"
• Method: GET
• Note: :Provide the IP Address of the machine on which the controller is running.
Look for your meter stats in the controller operational data via
RESTCONF
• See your operational meter stats in POSTMAN with
• URL "http://:8080/restconfig/operational/opendaylight-inventory:nodes/node/
openflow:1/meter/1"
• Method: GET
• Note: :Provide the IP Address of the machine on which the controller is running.
185
OpenDaylight User Guide February 21, 2016 Beryllium
Using addMeter
From the
cd openflowplugin/distribution/base/target/distributions-openflowplugin-
base-0.0.1-SNAPSHOT-osgipackage/opendaylight
./run.sh
Once you can see your CPqD connected to the controller, at the OSGI command line try
running:
addMeter openflow:1
• GET
• Accept: application/xml
• URL: "http://:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/
meter/12"
• Note: :Provide the IP Address of the machine on which the controller is running.
Note
Before attempting to PUT a meter you have created via addMeter, please
change its URL and body to, for example, use meter 1 instead of meter 2 or
another Meter Id, so you don’t collide.
Note
There are several test command providers and the one handling Meter is
OpenflowpluginMeterTestCommandProvider. Methods, which can be used as
commands in OSGI-console have prefix _. Examples: addMeter, modifyMeter
and removeMeter.
Example Meter
Examples for XML for various Meter Types can be found in the test-scripts bundle of the
plugin code with names m1.xml, m2.xml and m3.xml.
Statistics
Overview
This page contains high level detail about the statistics collection mechanism in new
OpenFlow plugin.
186
OpenDaylight User Guide February 21, 2016 Beryllium
4. Port Statistics
5. Group Description
6. Group Statistics
7. Meter Configuration
8. Meter Statistics
9. Queue Statistics
10.Node Description
12.Port Description
13.Group Features
14.Meter Features
At a high level statistics collection mechanism is divided into following three parts
1. Statistics related YANG models, service APIs and notification interfaces are defined in the
MD-SAL.
2. Service APIs (RPCs) defined in yang models are implemented by OpenFlow plugin.
Notification interfaces are wired up by OpenFlow plugin to MD-SAL.
3. Statistics Manager Module: This module use service APIs implemented by OpenFlow
plugin to send statistics requests to all the connected OpenFlow enabled nodes. Module
also implements notification interfaces to receive statistics response from nodes. Once
it receives statistics response, it augment all the statistics data to the relevant element
of the node (like node-connector, flow, table,group, meter) and store it in MD-SAL
operational data store.
• Statistics mentioned in 10 to 14 are only fetched when any node connects to the
controller because these statistics are just static details about the respective elements.
• Whenever any new element is added to node (like flow, group, meter, queue) it sends
statistics request immediately to fetch the latest statistics and store it in the operational
data store.
• Whenever any element is deleted from the node, it immediately remove the relevant
statistics from operational data store.
187
OpenDaylight User Guide February 21, 2016 Beryllium
• Statistics data are augmented to their respective element stored in the configuration
data store. E.g Controller installed flows are stored in configuration data store.
Whenever Statistics Manager receive statistics data related to these flow, it search
the corresponding flow in the configuration data store and augment statistics in the
corresponding location in operational data store. Similar approach is used for other
elements of the node.
• All the unaccounted flows will be cleaned up periodically after every two cycle of flow
statistics collection, given that there is no update for these flows in the last two cycles.
• Statistics Manager only entertains statistics response for the request sent by itself. User
can write its own statistics collector using the statistics service APIs and notification
defined in yang models, it won’t effect the functioning of Statistics Manager.
• OpenFlow 1.0 don’t have concept of Meter and Group, so Statistics Manager don’t send
any group & meter related statistics request to OpenFlow 1.0 enabled switch.
• Queue Statistics
GET http://<controller-ip>:8080/restconf/operational/opendaylight-
inventory:nodes/node/{node-id}/node-connector/{node-connector-id}/queue/
{queue-id}
188
OpenDaylight User Guide February 21, 2016 Beryllium
Bugs
For more details and queuries, please send mail to openflowplugin-
[email protected] or [email protected] If you want to report any bug in
statistics collection, please use bugzilla.
AddFlow : addMDFlow
Run the controller by executing:
cd openflowplugin/distribution/base/target/distributions-openflowplugin-
base-0.0.1-SNAPSHOT-osgipackage/opendaylight
./run.sh
Once you see your node (probably openflow:1 if you’ve been following along) in the
inventory, at the OSGI command line try running:
addMDFlow openflow:1 f#
Where # is a number between 1 and 80 and openflow:1 is the of the switch. This will create
one of 80 possible flows. You can confirm that they were created on the switch.
RemoveFlow : removeMDFlow
Similar to addMDFlow, from the controller OSGi prompt, while your switch is connected to
the controller, try running:
189
OpenDaylight User Guide February 21, 2016 Beryllium
removeMDFlow openflow:1 f#
where # is a number between 1 and 80 and openflow:1 is the of the switch. The flow to be
deleted should have same flowid and Nodeid as used for flow add.
ModifyFlow : modifyMDFlow
Similar to addMDFlow, from the controller OSGi prompt, while your switch is connected to
the controller, try running:
modifyMDFlow openflow:1 f#
where # is a number between 1 and 80 and openflow:1 is the of the switch. The flow to be
deleted should have same flowid and Nodeid as used for flow add.
AddGroup : addGroup
Run the controller by executing:
cd openflowplugin/distribution/base/target/distributions-openflowplugin-
base-0.0.1-SNAPSHOT-osgipackage/opendaylight
./run.sh
Once you see your node (probably openflow:1 if you’ve been following along) in the
inventory, at the OSGI command line try running:
addGroup openflow:1 a# g#
Where # is a number between 1 and 4 for grouptype(g#) and 1 and 28 for actiontype(a#).
You can confirm that they were created on the switch.
RemoveGroup : removeGroup
Run the controller by executing:
cd openflowplugin/distribution/base/target/distributions-openflowplugin-
base-0.0.1-SNAPSHOT-osgipackage/opendaylight
./run.sh
Once you see your node (probably openflow:1 if you’ve been following along) in the
inventory, at the OSGI command line try running:
removeGroup openflow:1 a# g#
190
OpenDaylight User Guide February 21, 2016 Beryllium
Where # is a number between 1 and 4 for grouptype(g#) and 1 and 28 for actiontype(a#).
GroupId should be same as that used for adding the flow. You can confirm that it was
removed from the switch.
ModifyGroup : modifyGroup
Run the controller by executing:
cd openflowplugin/distribution/base/target/distributions-openflowplugin-
base-0.0.1-SNAPSHOT-osgipackage/opendaylight
./run.sh
Once you see your node (probably openflow:1 if you’ve been following along) in the
inventory, at the OSGI command line try running:
modifyGroup openflow:1 a# g#
Where # is a number between 1 and 4 for grouptype(g#) and 1 and 28 for actiontype(a#).
GroupId should be same as that used for adding the flow. You can confirm that it was
modified on the switch.
AddMeter : addMeter
Run the controller by executing:
cd openflowplugin/distribution/base/target/distributions-openflowplugin-
base-0.0.1-SNAPSHOT-osgipackage/opendaylight
./run.sh
Once you see your node (probably openflow:1 if you’ve been following along) in the
inventory, at the OSGI command line try running:
addMeter openflow:1
You can now confirm that meter has been created on the switch.
RemoveMeter : removeMeter
Run the controller by executing:
cd openflowplugin/distribution/base/target/distributions-openflowplugin-
base-0.0.1-SNAPSHOT-osgipackage/opendaylight
./run.sh
191
OpenDaylight User Guide February 21, 2016 Beryllium
Once you see your node (probably openflow:1 if you’ve been following along) in the
inventory, at the OSGI command line try running:
removeMeter openflow:1
The CLI takes care of using the same meterId and nodeId as used for meter add. You can
confirm that it was removed from the switch.
ModifyMeter : modifyMeter
Run the controller by executing:
cd openflowplugin/distribution/base/target/distributions-openflowplugin-
base-0.0.1-SNAPSHOT-osgipackage/opendaylight
./run.sh
Once you see your node (probably openflow:1 if you’ve been following along) in the
inventory, at the OSGI command line try running:
modifyMeter openflow:1
The CLI takes care of using the same meterId and nodeId as used for meter add. You can
confirm that it was modified on the switch.
Topology : Notification
Currently, the openflowplugin has a test-provider that allows you to get notifications for
the topology related events like Link-Discovered , Link-Removed events.
Point your mininet to the controller by giving the parameters --controller=remote,ip=. Once
the controller is connected to the switch, Link-Discovered event can be tested by initially
configuring the specific flows on the switch. For Link Discovered event either table-miss
flow or LLDP ether-type flow can be configured.
Once the table-miss flow is configured through above command, we can see the Link-
Discovered event in the debug logs on the controller console.
192
OpenDaylight User Guide February 21, 2016 Beryllium
Once the LLDP ether-type flow is configured through above command, we can see the Link-
Discovered event in the debug logs on the controller console.
Programmatic Interface
The API is documented in the model documentation under the section OpenFlow Services
at:
Example flows
Overview
The flow examples on this page are tested to work with OVS.
- Accept: application/xml
- Content-Type: application/xml
For example:
PUT http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/
openflow:1/table/2/flow/127
Make sure that the Table-# and Flow-# in the URL and in the XML match.
The format of the flow-programming XML is determined by by the grouping flow in the
opendaylight-flow-types yang model: MISSING LINK.
Match Examples
The format of the XML that describes OpenFlow matches is determined by the
opendaylight-match-types yang model: .
The RESTCONF documentation for the match-types yang model can be found at
opendaylight-match-types.html
193
OpenDaylight User Guide February 21, 2016 Beryllium
194
OpenDaylight User Guide February 21, 2016 Beryllium
<match>
<ethernet-match>
<ethernet-source>
<address>00:00:00:00:00:01</address>
</ethernet-source>
</ethernet-match>
</match>
<hard-timeout>12</hard-timeout>
<cookie>3</cookie>
<idle-timeout>34</idle-timeout>
<flow-name>FooXf3</flow-name>
<priority>2</priority>
<barrier>false</barrier>
</flow>
195
OpenDaylight User Guide February 21, 2016 Beryllium
Ethernet Src & Dest Addresses, IPv4 Src & Dest Addresses, Input Port
• Note that ethernet-type MUST be 34887 (0x8847)
Ethernet Src & Dest Addresses, IPv4 Src & Dest Addresses, IP
Protocol #, IP DSCP, IP ECN, Input Port
196
OpenDaylight User Guide February 21, 2016 Beryllium
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
<table_id>2</table_id>
<id>130</id>
<cookie_mask>255</cookie_mask>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>ff:ff:ff:ff:ff:aa</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
<ipv4-source>10.1.2.3/24</ipv4-source>
<ipv4-destination>20.4.5.6/16</ipv4-destination>
<ip-match>
<ip-protocol>56</ip-protocol>
<ip-dscp>15</ip-dscp>
<ip-ecn>1</ip-ecn>
</ip-match>
<in-port>0</in-port>
</match>
<hard-timeout>12000</hard-timeout>
<cookie>7</cookie>
<idle-timeout>12000</idle-timeout>
<flow-name>FooXf7</flow-name>
<priority>2</priority>
<barrier>false</barrier>
</flow>
Ethernet Src & Dest Addresses, IPv4 Src & Dest Addresses, TCP Src &
Dest Ports, IP DSCP, IP ECN, Input Port
197
OpenDaylight User Guide February 21, 2016 Beryllium
</instructions>
<table_id>2</table_id>
<id>131</id>
<cookie_mask>255</cookie_mask>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>ff:ff:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
<ipv4-source>17.1.2.3/8</ipv4-source>
<ipv4-destination>172.168.5.6/16</ipv4-destination>
<ip-match>
<ip-protocol>6</ip-protocol>
<ip-dscp>2</ip-dscp>
<ip-ecn>2</ip-ecn>
</ip-match>
<tcp-source-port>25364</tcp-source-port>
<tcp-destination-port>8080</tcp-destination-port>
<in-port>0</in-port>
</match>
<hard-timeout>1200</hard-timeout>
<cookie>8</cookie>
<idle-timeout>3400</idle-timeout>
<flow-name>FooXf8</flow-name>
<priority>2</priority>
<barrier>false</barrier>
</flow>
Ethernet Src & Dest Addresses, IPv4 Src & Dest Addresses, UDP Src &
Dest Ports, IP DSCP, IP ECN, Input Port
198
OpenDaylight User Guide February 21, 2016 Beryllium
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>20:14:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
<ipv4-source>19.1.2.3/10</ipv4-source>
<ipv4-destination>172.168.5.6/18</ipv4-destination>
<ip-match>
<ip-protocol>17</ip-protocol>
<ip-dscp>8</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<udp-source-port>25364</udp-source-port>
<udp-destination-port>8080</udp-destination-port>
<in-port>0</in-port>
</match>
<hard-timeout>1200</hard-timeout>
<cookie>9</cookie>
<idle-timeout>3400</idle-timeout>
<flow-name>FooXf9</flow-name>
<priority>2</priority>
<barrier>false</barrier>
Ethernet Src & Dest Addresses, IPv4 Src & Dest Addresses, ICMPv4
Type & Code, IP DSCP, IP ECN, Input Port
199
OpenDaylight User Guide February 21, 2016 Beryllium
<ethernet-destination>
<address>ff:ff:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
<ipv4-source>17.1.2.3/8</ipv4-source>
<ipv4-destination>172.168.5.6/16</ipv4-destination>
<ip-match>
<ip-protocol>1</ip-protocol>
<ip-dscp>27</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<icmpv4-match>
<icmpv4-type>6</icmpv4-type>
<icmpv4-code>3</icmpv4-code>
</icmpv4-match>
<in-port>0</in-port>
</match>
<hard-timeout>1200</hard-timeout>
<cookie>11</cookie>
<idle-timeout>3400</idle-timeout>
<flow-name>FooXf11</flow-name>
<priority>2</priority>
</flow>
Ethernet Src & Dest Addresses, ARP Operation, ARP Src & Target
Transport Addresses, ARP Src & Target Hw Addresses
200
OpenDaylight User Guide February 21, 2016 Beryllium
<address>ff:ff:ff:ff:FF:ff</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:FC:01:23:ae</address>
</ethernet-source>
</ethernet-match>
<arp-op>1</arp-op>
<arp-source-transport-address>192.168.4.1</arp-source-transport-
address>
<arp-target-transport-address>10.21.22.23</arp-target-transport-
address>
<arp-source-hardware-address>
<address>12:34:56:78:98:AB</address>
</arp-source-hardware-address>
<arp-target-hardware-address>
<address>FE:DC:BA:98:76:54</address>
</arp-target-hardware-address>
</match>
<hard-timeout>12</hard-timeout>
<cookie>14</cookie>
<idle-timeout>34</idle-timeout>
<flow-name>FooXf14</flow-name>
<priority>2</priority>
<barrier>false</barrier>
Ethernet Src & Dest Addresses, Ethernet Type, VLAN ID, VLAN PCP
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
<table_id>2</table_id>
<id>138</id>
<cookie_mask>255</cookie_mask>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>ff:ff:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
<vlan-match>
<vlan-id>
<vlan-id>78</vlan-id>
<vlan-id-present>true</vlan-id-present>
201
OpenDaylight User Guide February 21, 2016 Beryllium
</vlan-id>
<vlan-pcp>3</vlan-pcp>
</vlan-match>
</match>
<hard-timeout>1200</hard-timeout>
<cookie>15</cookie>
<idle-timeout>3400</idle-timeout>
<flow-name>FooXf15</flow-name>
<priority>2</priority>
<barrier>false</barrier>
</flow>
Ethernet Src & Dest Addresses, MPLS Label, MPLS TC, MPLS BoS
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<flow-name>FooXf17</flow-name>
<id>140</id>
<cookie_mask>255</cookie_mask>
<cookie>17</cookie>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<priority>2</priority>
<table_id>2</table_id>
<strict>false</strict>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>34887</type>
</ethernet-type>
<ethernet-destination>
<address>ff:ff:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
<protocol-match-fields>
<mpls-label>567</mpls-label>
<mpls-tc>3</mpls-tc>
<mpls-bos>1</mpls-bos>
</protocol-match-fields>
</match>
</flow>
202
OpenDaylight User Guide February 21, 2016 Beryllium
Metadata
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<flow-name>FooXf19</flow-name>
<id>142</id>
<cookie_mask>255</cookie_mask>
<cookie>19</cookie>
<table_id>2</table_id>
<priority>1</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
203
OpenDaylight User Guide February 21, 2016 Beryllium
<metadata>
<metadata>12345</metadata>
</metadata>
</match>
</flow>
IPv6 Src & Dest Addresses, Metadata, IP DSCP, IP ECN, UDP Src & Dest
Ports
• Note that ethernet-type MUST be 34525
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<flow-name>FooXf21</flow-name>
<id>144</id>
<cookie_mask>255</cookie_mask>
<cookie>21</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
204
OpenDaylight User Guide February 21, 2016 Beryllium
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>34525</type>
</ethernet-type>
</ethernet-match>
<ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
<ipv6-destination>fe80::2acf:e9ff:fe21:6431/128</ipv6-destination>
<metadata>
<metadata>12345</metadata>
</metadata>
<ip-match>
<ip-protocol>17</ip-protocol>
<ip-dscp>8</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<udp-source-port>25364</udp-source-port>
<udp-destination-port>8080</udp-destination-port>
</match>
</flow>
IPv6 Src & Dest Addresses, Metadata, IP DSCP, IP ECN, TCP Src & Dest
Ports
• Note that ethernet-type MUST be 34525
205
OpenDaylight User Guide February 21, 2016 Beryllium
<match>
<ethernet-match>
<ethernet-type>
<type>34525</type>
</ethernet-type>
</ethernet-match>
<ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
<ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
<metadata>
<metadata>12345</metadata>
</metadata>
<ip-match>
<ip-protocol>6</ip-protocol>
<ip-dscp>60</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<tcp-source-port>183</tcp-source-port>
<tcp-destination-port>8080</tcp-destination-port>
</match>
</flow>
IPv6 Src & Dest Addresses, Metadata, IP DSCP, IP ECN, TCP Src & Dest
Ports, IPv6 Label
• Note that ethernet-type MUST be 34525
206
OpenDaylight User Guide February 21, 2016 Beryllium
<metadata>
<metadata>12345</metadata>
</metadata>
<ipv6-label>
<ipv6-flabel>33</ipv6-flabel>
</ipv6-label>
<ip-match>
<ip-protocol>6</ip-protocol>
<ip-dscp>60</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<tcp-source-port>183</tcp-source-port>
<tcp-destination-port>8080</tcp-destination-port>
</match>
</flow>
Tunnel ID
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<flow-name>FooXf24</flow-name>
<id>147</id>
<cookie_mask>255</cookie_mask>
<cookie>24</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<tunnel>
<tunnel-id>2591</tunnel-id>
</tunnel>
</match>
</flow>
IPv6 Src & Dest Addresses, Metadata, IP DSCP, IP ECN, ICMPv6 Type &
Code, IPv6 Label
• Note that ethernet-type MUST be 34525
207
OpenDaylight User Guide February 21, 2016 Beryllium
<id>148</id>
<cookie_mask>255</cookie_mask>
<cookie>25</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>34525</type>
</ethernet-type>
</ethernet-match>
<ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
<ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
<metadata>
<metadata>12345</metadata>
</metadata>
<ipv6-label>
<ipv6-flabel>33</ipv6-flabel>
</ipv6-label>
<ip-match>
<ip-protocol>58</ip-protocol>
<ip-dscp>60</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<icmpv6-match>
<icmpv6-type>6</icmpv6-type>
<icmpv6-code>3</icmpv6-code>
</icmpv6-match>
</match>
</flow>
IPv6 Src & Dest Addresses, Metadata, IP DSCP, IP ECN, TCP Src & Dst
Ports, IPv6 Label, IPv6 Ext Header
• Note that ethernet-type MUST be 34525
208
OpenDaylight User Guide February 21, 2016 Beryllium
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>34525</type>
</ethernet-type>
</ethernet-match>
<ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
<ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
<metadata>
<metadata>12345</metadata>
</metadata>
<ipv6-label>
<ipv6-flabel>33</ipv6-flabel>
</ipv6-label>
<ipv6-ext-header>
<ipv6-exthdr>0</ipv6-exthdr>
</ipv6-ext-header>
<ip-match>
<ip-protocol>6</ip-protocol>
<ip-dscp>60</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<tcp-source-port>183</tcp-source-port>
<tcp-destination-port>8080</tcp-destination-port>
</match>
</flow>
Actions
The format of the XML that describes OpenFlow actions is determined by the opendaylight-
action-types yang model: .
The RESTCONF documentation for the match-types yang model can be found at
opendaylight-action-types.html
Apply Actions
Output to TABLE
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
209
OpenDaylight User Guide February 21, 2016 Beryllium
<flow-name>FooXf101</flow-name>
<id>256</id>
<cookie_mask>255</cookie_mask>
<cookie>101</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<output-action>
<output-node-connector>TABLE</output-node-connector>
<max-length>60</max-length>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>34525</type>
</ethernet-type>
</ethernet-match>
<ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
<ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
<metadata>
<metadata>12345</metadata>
</metadata>
<ip-match>
<ip-protocol>6</ip-protocol>
<ip-dscp>60</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<tcp-source-port>183</tcp-source-port>
<tcp-destination-port>8080</tcp-destination-port>
</match>
</flow>
Output to INPORT
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<flow-name>FooXf102</flow-name>
<id>257</id>
<cookie_mask>255</cookie_mask>
<cookie>102</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
210
OpenDaylight User Guide February 21, 2016 Beryllium
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<output-action>
<output-node-connector>INPORT</output-node-connector>
<max-length>60</max-length>
</output-action>
</action>
7 </apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>ff:ff:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
<ipv4-source>17.1.2.3/8</ipv4-source>
<ipv4-destination>172.168.5.6/16</ipv4-destination>
<ip-match>
<ip-protocol>6</ip-protocol>
<ip-dscp>2</ip-dscp>
<ip-ecn>2</ip-ecn>
</ip-match>
<tcp-source-port>25364</tcp-source-port>
<tcp-destination-port>8080</tcp-destination-port>
</match>
</flow>
211
OpenDaylight User Guide February 21, 2016 Beryllium
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>ff:ff:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
<ipv4-source>17.1.2.3/8</ipv4-source>
<ipv4-destination>172.168.5.6/16</ipv4-destination>
<ip-match>
<ip-protocol>6</ip-protocol>
<ip-dscp>2</ip-dscp>
<ip-ecn>2</ip-ecn>
</ip-match>
<tcp-source-port>25364</tcp-source-port>
<tcp-destination-port>8080</tcp-destination-port>
</match>
</flow>
Output to LOCAL
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<flow-name>FooXf104</flow-name>
<id>259</id>
<cookie_mask>255</cookie_mask>
<cookie>104</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<output-action>
<output-node-connector>LOCAL</output-node-connector>
<max-length>60</max-length>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>34525</type>
212
OpenDaylight User Guide February 21, 2016 Beryllium
</ethernet-type>
</ethernet-match>
<ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76</ipv6-source>
<ipv6-destination>fe80:2acf:e9ff:fe21::6431/94</ipv6-destination>
<metadata>
<metadata>12345</metadata>
</metadata>
<ip-match>
<ip-protocol>6</ip-protocol>
<ip-dscp>60</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<tcp-source-port>183</tcp-source-port>
<tcp-destination-port>8080</tcp-destination-port>
</match>
</flow>
Output to NORMAL
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<flow-name>FooXf105</flow-name>
<id>260</id>
<cookie_mask>255</cookie_mask>
<cookie>105</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<output-action>
<output-node-connector>NORMAL</output-node-connector>
<max-length>60</max-length>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>34525</type>
</ethernet-type>
</ethernet-match>
<ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/84</ipv6-source>
<ipv6-destination>fe80:2acf:e9ff:fe21::6431/90</ipv6-destination>
<metadata>
<metadata>12345</metadata>
</metadata>
<ip-match>
<ip-protocol>6</ip-protocol>
<ip-dscp>45</ip-dscp>
<ip-ecn>2</ip-ecn>
213
OpenDaylight User Guide February 21, 2016 Beryllium
</ip-match>
<tcp-source-port>20345</tcp-source-port>
<tcp-destination-port>80</tcp-destination-port>
</match>
</flow>
Output to FLOOD
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<flow-name>FooXf106</flow-name>
<id>261</id>
<cookie_mask>255</cookie_mask>
<cookie>106</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<output-action>
<output-node-connector>FLOOD</output-node-connector>
<max-length>60</max-length>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>34525</type>
</ethernet-type>
</ethernet-match>
<ipv6-source>1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/100</ipv6-source>
<ipv6-destination>fe80:2acf:e9ff:fe21::6431/67</ipv6-destination>
<metadata>
<metadata>12345</metadata>
</metadata>
<ip-match>
<ip-protocol>6</ip-protocol>
<ip-dscp>45</ip-dscp>
<ip-ecn>2</ip-ecn>
</ip-match>
<tcp-source-port>20345</tcp-source-port>
<tcp-destination-port>80</tcp-destination-port>
</match>
</flow>
Output to ALL
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
214
OpenDaylight User Guide February 21, 2016 Beryllium
<flow-name>FooXf107</flow-name>
<id>262</id>
<cookie_mask>255</cookie_mask>
<cookie>107</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<output-action>
<output-node-connector>ALL</output-node-connector>
<max-length>60</max-length>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>20:14:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
<ipv4-source>19.1.2.3/10</ipv4-source>
<ipv4-destination>172.168.5.6/18</ipv4-destination>
<ip-match>
<ip-protocol>17</ip-protocol>
<ip-dscp>8</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<udp-source-port>25364</udp-source-port>
<udp-destination-port>8080</udp-destination-port>
<in-port>0</in-port>
</match>
</flow>
Output to CONTROLLER
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<flow-name>FooXf108</flow-name>
<id>263</id>
<cookie_mask>255</cookie_mask>
<cookie>108</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
215
OpenDaylight User Guide February 21, 2016 Beryllium
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<output-action>
<output-node-connector>CONTROLLER</output-node-
connector>
<max-length>60</max-length>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>20:14:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
<ipv4-source>19.1.2.3/10</ipv4-source>
<ipv4-destination>172.168.5.6/18</ipv4-destination>
<ip-match>
<ip-protocol>17</ip-protocol>
<ip-dscp>8</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<udp-source-port>25364</udp-source-port>
<udp-destination-port>8080</udp-destination-port>
<in-port>0</in-port>
</match>
</flow>
Output to ANY
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<flow-name>FooXf109</flow-name>
<id>264</id>
<cookie_mask>255</cookie_mask>
<cookie>109</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
216
OpenDaylight User Guide February 21, 2016 Beryllium
<action>
<order>0</order>
<output-action>
<output-node-connector>ANY</output-node-connector>
<max-length>60</max-length>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>20:14:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
<ipv4-source>19.1.2.3/10</ipv4-source>
<ipv4-destination>172.168.5.6/18</ipv4-destination>
<ip-match>
<ip-protocol>17</ip-protocol>
<ip-dscp>8</ip-dscp>
<ip-ecn>3</ip-ecn>
</ip-match>
<udp-source-port>25364</udp-source-port>
<udp-destination-port>8080</udp-destination-port>
<in-port>0</in-port>
</match>
</flow>
Push VLAN
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<push-vlan-action>
<ethernet-type>33024</ethernet-type>
</push-vlan-action>
<order>0</order>
</action>
<action>
<set-field>
<vlan-match>
<vlan-id>
<vlan-id>79</vlan-id>
<vlan-id-present>true</vlan-id-present>
</vlan-id>
</vlan-match>
</set-field>
<order>1</order>
217
OpenDaylight User Guide February 21, 2016 Beryllium
</action>
<action>
<output-action>
<output-node-connector>5</output-node-connector>
</output-action>
<order>2</order>
</action>
</apply-actions>
</instruction>
</instructions>
<table_id>0</table_id>
<id>31</id>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>FF:FF:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:AE</address>
</ethernet-source>
</ethernet-match>
<in-port>1</in-port>
</match>
<flow-name>vlan_flow</flow-name>
<priority>2</priority>
</flow>
Push MPLS
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow
xmlns="urn:opendaylight:flow:inventory">
<flow-name>push-mpls-action</flow-name>
<instructions>
<instruction>
<order>3</order>
<apply-actions>
<action>
<push-mpls-action>
<ethernet-type>34887</ethernet-type>
</push-mpls-action>
<order>0</order>
</action>
<action>
<set-field>
<protocol-match-fields>
<mpls-label>27</mpls-label>
</protocol-match-fields>
</set-field>
<order>1</order>
</action>
<action>
<output-action>
<output-node-connector>2</output-node-connector>
</output-action>
<order>2</order>
</action>
218
OpenDaylight User Guide February 21, 2016 Beryllium
</apply-actions>
</instruction>
</instructions>
<strict>false</strict>
<id>100</id>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
</ethernet-match>
<in-port>1</in-port>
<ipv4-destination>10.0.0.4/32</ipv4-destination>
</match>
<idle-timeout>0</idle-timeout>
<cookie_mask>255</cookie_mask>
<cookie>401</cookie>
<priority>8</priority>
<hard-timeout>0</hard-timeout>
<installHw>false</installHw>
<table_id>0</table_id>
</flow>
Swap MPLS
• Note that ethernet-type MUST be 34887
219
OpenDaylight User Guide February 21, 2016 Beryllium
<in-port>1</in-port>
<protocol-match-fields>
<mpls-label>27</mpls-label>
</protocol-match-fields>
</match>
<idle-timeout>0</idle-timeout>
<cookie_mask>255</cookie_mask>
<cookie>401</cookie>
<priority>8</priority>
<hard-timeout>0</hard-timeout>
<installHw>false</installHw>
<table_id>0</table_id>
</flow>
Pop MPLS
• Note that ethernet-type MUST be 34887
220
OpenDaylight User Guide February 21, 2016 Beryllium
<installHw>false</installHw>
<hard-timeout>0</hard-timeout>
<priority>10</priority>
<table_id>0</table_id>
</flow>
221
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Introduction ................................................................................................................ 222
Agent Configuration ................................................................................................... 222
Endpoint Registration .................................................................................................. 224
Inspector ..................................................................................................................... 226
Introduction
agent-ovs is a policy agent that works with OVS to enforce a group-based policy
networking model with locally attached virtual machines or containers. The policy agent is
designed to work well with orchestration tools like OpenStack.
Agent Configuration
The agent configuration is handled using its config file which is by default found at "/etc/
opflex-agent-ovs/opflex-agent-ovs.conf"
"ssl": {
// SSL mode. Possible values:
// disabled: communicate without encryption
// encrypted: encrypt but do not verify peers
// secure: encrypt and verify peer certificates
"mode": "disabled",
222
OpenDaylight User Guide February 21, 2016 Beryllium
// specific CA certificate.
"ca-store": "/etc/ssl/certs/"
},
"inspector": {
// Enable the MODB inspector service, which allows
// inspecting the state of the managed object database.
// Default: enabled
"enabled": true,
223
OpenDaylight User Guide February 21, 2016 Beryllium
// "encap-iface": "team0"
// }
},
"endpoint-advertisements": {
// Enable generation of periodic ARP/NDP
// advertisements for endpoints. Default true.
"enabled": "true"
}
},
Endpoint Registration
The agent learns about endpoints using endpoint metadata files located by default in "/
var/lib/opflex-agent-ovs/endpoints".
These are JSON-format files such as the (unusually complex) example below:
224
OpenDaylight User Guide February 21, 2016 Beryllium
{
"uuid": "83f18f0b-80f7-46e2-b06c-4d9487b0c754",
"policy-space-name": "test",
"endpoint-group-name": "group1",
"interface-name": "veth0",
"ip": [
"10.0.0.1", "fd8f:69d8:c12c:ca62::1"
],
"dhcp4": {
"ip": "10.200.44.2",
"prefix-len": 24,
"routers": ["10.200.44.1"],
"dns-servers": ["8.8.8.8", "8.8.4.4"],
"domain": "example.com",
"static-routes": [
{
"dest": "169.254.169.0",
"dest-prefix": 24,
"next-hop": "10.0.0.1"
}
]
},
"dhcp6": {
"dns-servers": ["2001:4860:4860::8888", "2001:4860:4860::8844"],
"search-list": ["test1.example.com", "example.com"]
},
"ip-address-mapping": [
{
"uuid": "91c5b217-d244-432c-922d-533c6c036ab4",
"floating-ip": "5.5.5.1",
"mapped-ip": "10.0.0.1",
"policy-space-name": "common",
"endpoint-group-name": "nat-epg"
},
{
"uuid": "22bfdc01-a390-4b6f-9b10-624d4ccb957b",
"floating-ip": "fdf1:9f86:d1af:6cc9::1",
"mapped-ip": "fd8f:69d8:c12c:ca62::1",
"policy-space-name": "common",
"endpoint-group-name": "nat-epg"
}
],
"mac": "00:00:00:00:00:01",
"promiscuous-mode": false
}
policy-space-name The name of the policy space for the endpoint group.
225
OpenDaylight User Guide February 21, 2016 Beryllium
ip the IP address to return with DHCP. Must be one of the configured IPv4
addresses.
static-routes A list of static route configuration blocks, which contains a "dest", "dest-
prefix", and "next-hop" parameters to send as static routes to the end
host
mapped-ip the source IPv4 or IPv6 address; must be one of the IPs
assigned to the endpoint.
Inspector
The Opflex inspector is a useful command-line tool that will allow you to inspect the state
of the managed object database for the agent for debugging and diagnosis purposes.
226
OpenDaylight User Guide February 21, 2016 Beryllium
You can get information about the running system using one or more queries, which
consist of an object model class name and optionally the URI of a specific object. The
simplest query is to get a single object, nonrecursively:
# gbp_inspect -q DmtreeRoot
--* DmtreeRoot,/
# gbp_inspect -q GbpEpGroup
--* GbpEpGroup,/PolicyUniverse/PolicySpace/common/GbpEpGroup/nat-epg/
--* GbpEpGroup,/PolicyUniverse/PolicySpace/test/GbpEpGroup/group1/
# gbp_inspect -q GbpEpGroup,/PolicyUniverse/PolicySpace/common/GbpEpGroup/nat-
epg/
--* GbpEpGroup,/PolicyUniverse/PolicySpace/common/GbpEpGroup/nat-epg/
You can also display all the properties for each object:
# gbp_inspect -p -q GbpeL24Classifier
--* GbpeL24Classifier,/PolicyUniverse/PolicySpace/test/GbpeL24Classifier/
classifier4/
{
connectionTracking : 1 (reflexive)
dFromPort : 80
dToPort : 80
etherT : 2048 (ipv4)
name : classifier4
prot : 6
}
--* GbpeL24Classifier,/PolicyUniverse/PolicySpace/test/GbpeL24Classifier/
classifier3/
{
227
OpenDaylight User Guide February 21, 2016 Beryllium
You can also request to get the all the children of an object you query for:
# gbp_inspect -r -q GbpEpGroup,/PolicyUniverse/PolicySpace/common/GbpEpGroup/
nat-epg/
--* GbpEpGroup,/PolicyUniverse/PolicySpace/common/GbpEpGroup/nat-epg/
|-* GbpeInstContext,/PolicyUniverse/PolicySpace/common/GbpEpGroup/nat-epg/
GbpeInstContext/
`-* GbpEpGroupToNetworkRSrc,/PolicyUniverse/PolicySpace/common/GbpEpGroup/
nat-epg/GbpEpGroupToNetworkRSrc/
228
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 229
Configuring PCEP ......................................................................................................... 229
Overview
The OpenDaylight Karaf distribution comes preconfigured with baseline PCEP
configuration.
Configuring PCEP
The default shipped configuration will start a PCE server on 0.0.0.0:4189. You can change
this behavior in 39-pcep-provider.xml:
<module>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">prefix:pcep-
topology-provider</type>
<name>pcep-topology</name>
<listen-address>192.168.122.55</listen-address>
<listen-port>4189</listen-port>
...
</module>
229
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 230
PacketCable Components ............................................................................................ 230
Installing PacketCable .................................................................................................. 230
Explore and exercise the PacketCable REST API ............................................................ 230
Postman ...................................................................................................................... 231
Overview
These components introduce a DOCSIS QoS Gates management using the PCMM protocol.
The driver component is responsible for the PCMM/COPS/PDP functionality required to
service requests from PacketCable Provider and FlowManager. Requests are transposed
into PCMM Gate Control messages and transmitted via COPS to the CMTS. This plugin
adheres to the PCMM/COPS/PDP functionality defined in the CableLabs specification.
PacketCable solution is an MDSAL compliant component.
PacketCable Components
PacketCable is comprised of two OpenDaylight bundles:
Bundle Description
odl-packetcable-policy-server Plugin that provides PCMM model implementation based
on CMTS structure and COPS protocol.
odl-packetcable-policy-model The Model provided provides a direct mapping to the
underlying QoS Gates of CMTS.
Installing PacketCable
To install PacketCable, run the following feature:install command from the Karaf CLI
feature:install odl-packetcable-policy-server-all odl-restconf odl-mdsal-
apidocs
Replace localhost with the IP address or hostname where OpenDaylight is running if you
are not running OpenDaylight locally on your machine.
Note
Prior to setting any PCMM gates, a CCAP must first be added.
230
OpenDaylight User Guide February 21, 2016 Beryllium
Postman
Install the Chrome extension
231
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
OpenDaylight Service Function Chaining (SFC) Overiew ................................................ 232
SFC User Interface ....................................................................................................... 233
SFC Southbound REST Plugin ....................................................................................... 233
SFC-OVS integration .................................................................................................... 235
SFC Classifier User Guide ............................................................................................. 237
SFC OpenFlow Layer 2 Renderer User Guide ................................................................ 239
Service Function Scheduling Algorithms ....................................................................... 249
Service Function Load Balancing User Guide ................................................................ 261
List of acronyms:
• SF - Service Function
232
OpenDaylight User Guide February 21, 2016 Beryllium
SFC-UI Architecture
SFC-UI operates purely by using RESTCONF.
Configuring SFC-UI
Configuration steps
233
OpenDaylight User Guide February 21, 2016 Beryllium
3. Configure REST URIs for SF/SFF through SFC User Interface or RESTCONF (required
configuration steps can be found in the tutorial stated bellow)
234
OpenDaylight User Guide February 21, 2016 Beryllium
Tutorial
Comprehensive tutorial on how to use the Southbound REST Plugin and how to
control network devices with it can be found on: https://wiki.opendaylight.org/view/
Service_Function_Chaining:Main#SFC_101
SFC-OVS integration
Overview
SFC-OVS provides integration of SFC with Open vSwitch (OVS) devices. Integration is
realized through mapping of SFC objects (like SF, SFF, Classifier, etc.) to OVS objects
(like Bridge, TerminationPoint=Port/Interface). The mapping takes care of automatic
instantiation (setup) of corresponding object whenever its counterpart is created. For
example, when a new SFF is created, the SFC-OVS plugin will create a new OVS bridge and
when a new OVS Bridge is created, the SFC-OVS plugin will create a new SFF.
The feature is intended for SFC users willing to use Open vSwitch as underlying network
infrastructure for deploying RSPs (Rendered Service Paths).
SFC-OVS Architecture
SFC-OVS uses the OVSDB MD-SAL Southbound API for getting/writing information from/to
OVS devices. From the user perspective SFC-OVS acts as a layer between SFC DataStore and
OVSDB.
235
OpenDaylight User Guide February 21, 2016 Beryllium
Configuring SFC-OVS
Configuration steps:
1. Run ODL distribution (run karaf)
3. Configure Open vSwitch to use ODL as a manager, using following command: ovs-
vsctl set-manager tcp:<odl_ip_address>:6640
Tutorials
Verifying mapping from OVS to SFF
Overview
This tutorial shows the usual workflow when OVS configuration is transformed to
corresponding SFC objects (in this case SFF).
Prerequisities
• Open vSwitch installed (ovs-vsctl command available in shell)
Instructions
In shell execute:
1. ovs-vsctl set-manager tcp:<odl_ip_address>:6640
Verification
There should be SFF, which name will be ending with br1 and the SFF should containt two
DataPlane locators: br1 and testPort.
236
OpenDaylight User Guide February 21, 2016 Beryllium
Prerequisities
• Open vSwitch installed (ovs-vsctl command available in shell)
Instructions
Steps:
1. In shell execute: ovs-vsctl set-manager tcp:<odl_ip_address>:6640
Verification
In shell execute: ovs-vsctl show. There should be Bridge with name br-test and one
port/interface called br-test.
Also, corresponding SFF for this OVS Bridge should be configured, which can be verified
through SFC User Interface or RESTCONF as stated in previous tutorial.
1. OpenFlow Classifier
2. Iptables Classifier
OpenFlow Classifier
OpenFlow Classifier implements the classification criteria based on OpenFlow rules
deployed into an OpenFlow switch. An Open vSwitch will take the role of a classifier
and performs various encapsulations such NSH, VLAN, MPLS, etc. In the existing
237
OpenDaylight User Guide February 21, 2016 Beryllium
Classifier Architecture
The OVSDB Southbound interface is used to create an instance of a bridge in a specific
location (via IP address). This bridge contains the OpenFlow rules that perform the
classification of the packets and react accordingly. The OpenFlow Southbound interface is
used to translate the ACL information into OF rules within the Open vSwitch.
Note
in order to create the instance of the bridge that takes the role of a classifier,
an "empty" SFF must be created.
Configuring Classifier
1. An empty SFF must be created in order to host the ACL that contains the classification
information.
Iptables Classifier
Classifier manages everything from starting the packet listener to creation (and removal)
of appropriate ip(6)tables rules and marking received packets accordingly. Its functionality
is available only on Linux as it leverdges NetfilterQueue, which provides access to packets
matched by an iptables rule. Classifier requires root privileges to be able to operate.
So far it is capable of processing ACL for MAC addresses, ports, IPv4 and IPv6. Supported
protocols are TCP and UDP.
Classifier Architecture
Python code located in the project repository sfc-py/common/classifier.py.
Note
classifier assumes that Rendered Service Path (RSP) already exists in ODL when
an ACL referencing it is obtained
How it works:
1. sfc_agent receives an ACL and passes it for processing to the classifier
238
OpenDaylight User Guide February 21, 2016 Beryllium
2. the RSP (its SFF locator) referenced by ACL is requested from ODL
3. if the RSP exists in the ODL then ACL based iptables rules for it are applied
After this process is over, every packet successfully matched to an iptables rule (i.e.
successfully classified) will be NSH encapsulated and forwarded to a related SFF, which
knows how to traverse the RSP.
Rules are created using appropriate iptables command. If the Access Control Entry (ACE)
rule is MAC address related both iptables and ip6tabeles rules re issued. If ACE rule is IPv4
address related, only iptables rules are issued, same for IPv6.
Note
iptables raw table contains all created rules
Configuring Classifier
Classfier does’t need any configuration. Its only requirement is that the second (2) Netfilter
Queue is not used by any other process and is avalilable for the classifier.
• SF - Service Function
239
OpenDaylight User Guide February 21, 2016 Beryllium
registers itself to listen for RSP changes. When invoked, the SfcL2RspDataListener
processes the RSP and calls the SfcL2FlowProgrammerOFImpl to create the necessary
flows in the Service Function Forwarders configured in the RSP. Refer to the following
diagram for more details.
The OpenFlow Table Pipeline is intended to be generic to work for all of the different
encapsulations supported by SFC.
The SFFs (SFF1 and SFF2), SFs (SF1), and topology used for the flow tables in the following
sections are as described in the following diagram.
240
OpenDaylight User Guide February 21, 2016 Beryllium
Here is an example on SFF1, assuming VLAN is used for the SFF-SF, and the RSP tunnel is
MPLS:
Since most SF nodes wont support tunneling, the IP header DSCP field is used to store the
RSP Path Id. The RSP Path Id is written to the DSCP field in the Transport Egress table for
those packets sent to an SF.
241
OpenDaylight User Guide February 21, 2016 Beryllium
• The RSP Path 1 tunnel uses MPLS label 100 for ingress and 101 for egress
• The RSP Path 2 (symmetric downlink path) uses MPLS label 101 for ingress and 100 for
egress
Here is an example on SFF1, assuming SFF1 is connected to SFF2 and RSP Path 1 ingress
packets come from external to SFC, for which we don’t have the source MAC address
(MacSrc).
Here is an example on SFF1, assuming VLAN is used for the SFF-SF, and the RSP tunnel is
MPLS:
242
OpenDaylight User Guide February 21, 2016 Beryllium
Administering SFCOFL2
To use the SFC OpenFlow Renderer Karaf, at least the following Karaf features must be
installed.
• odl-openflowplugin-all
• odl-sfcofl2
• odl-sfc-ui (optional)
The following command can be used to view all of the currently installed Karaf features:
opendaylight-user@root>feature:list -i
Or, pipe the command to a grep to see a subset of the currently installed Karaf features:
SFCOFL2 Tutorial
Overview
The following Network Topology diagram shows how to configure SFC to create a Service
Chain.
243
OpenDaylight User Guide February 21, 2016 Beryllium
Prerequisites
To use this example, SFF OpenFlow switches must be created and connected as illustrated
above. Additionally, The SFs must be created and connected to the SFFs.
Target Environment
The target environment is not important, but this use-case was created and only tested on
Linux.
Instructions
The steps to use this tutorial are as follows. The referenced configuration in the steps is
listed in the following sections.
There are numerous ways to send the configuration. The following configuration chapters,
the appropriate curl command is shown for each configuration to be sent, including the
URL.
244
OpenDaylight User Guide February 21, 2016 Beryllium
Once the configuration has been successfully created, query the Rendered Service Paths
with either the SFC UI or via RESTCONF. Notice that the RSP is symetrical, so the following 2
RSPs will be created:
• sfc-path1
• sfc-path1-Reverse
At this point the Service Chains have been created, and the OpenFlow Switches are
programmed to steer traffic through the Service Chain. Traffic can now be injected from a
client into the Service Chain. To debug problems, the OpenFlow tables can be dumped with
the following commands, assuming SFF1 is called s1 and SFF2 is called s2.
sudo ovs-ofctl -O OpenFlow13 dump-flows s1
In all the following configuration sections, replace the ${JSON} string with the appropriate
JSON configuration. Also, change the localhost desintation in the URL accordingly.
SF configuration JSON.
{
"service-functions": {
"service-function": [
{
"name": "sf1",
"type": "service-function-type:http-header-enrichment",
"nsh-aware": false,
"ip-mgmt-address": "10.0.0.2",
"sf-data-plane-locator": [
{
"name": "sf1-sff1",
"mac": "00:00:08:01:02:01",
"vlan-id": 1000,
"transport": "service-locator:mac",
"service-function-forwarder": "sff1"
}
]
},
{
"name": "sf2",
"type": "service-function-type:firewall",
"nsh-aware": false,
"ip-mgmt-address": "10.0.0.3",
"sf-data-plane-locator": [
{
"name": "sf2-sff2",
245
OpenDaylight User Guide February 21, 2016 Beryllium
"mac": "00:00:08:01:03:01",
"vlan-id": 2000,
"transport": "service-locator:mac",
"service-function-forwarder": "sff2"
}
]
}
]
}
}
246
OpenDaylight User Guide February 21, 2016 Beryllium
"mac": "22:22:22:22:22:22",
"vlan-id": 1000,
"transport": "service-locator:mac"
},
"service-function-forwarder-ofs:ofs-port":
{
"port-id" : "3"
}
}
]
},
{
"name": "sff2",
"service-node": "openflow:3",
"sff-data-plane-locator": [
{
"name": "ulSff2Ingress",
"data-plane-locator":
{
"mpls-label": 101,
"transport": "service-locator:mpls"
},
"service-function-forwarder-ofs:ofs-port":
{
"mac": "44:44:44:44:44:44",
"port-id" : "1"
}
},
{
"name": "ulSff2Egress",
"data-plane-locator":
{
"mpls-label": 102,
"transport": "service-locator:mpls"
},
"service-function-forwarder-ofs:ofs-port":
{
"mac": "66:66:66:66:66:66",
"port-id" : "2"
}
}
],
"service-function-dictionary": [
{
"name": "sf2",
"type": "service-function-type:firewall",
"sff-sf-data-plane-locator":
{
"mac": "55:55:55:55:55:55",
"vlan-id": 2000,
"transport": "service-locator:mac"
},
"service-function-forwarder-ofs:ofs-port":
{
"port-id" : "3"
}
}
]
}
]
247
OpenDaylight User Guide February 21, 2016 Beryllium
}
}
The Service Function Chain configuration can be sent with the following command:
{
"service-function-chains": {
"service-function-chain": [
{
"name": "sfc-chain1",
"symmetric": true,
"sfc-service-function": [
{
"name": "hdr-enrich-abstract1",
"type": "service-function-type:http-header-enrichment"
},
{
"name": "firewall-abstract1",
"type": "service-function-type:firewall"
}
]
}
]
}
}
The Service Function Path configuration can be sent with the following command:
{
"service-function-paths": {
"service-function-path": [
{
"name": "sfc-path1",
"service-chain-name": "sfc-chain1",
"transport-type": "service-locator:mpls",
"symmetric": true
}
]
}
}
248
OpenDaylight User Guide February 21, 2016 Beryllium
{
"input": {
"name": "sfc-path1",
"parent-service-function-path": "sfc-path1",
"symmetric": true
}
}
The following command can be used to remove a Rendered Service Path called sfc-
path1:
The following command can be used to query all of the created Rendered Service Paths:
Architecture
The following figure illustrates the service function selection framework and algorithms.
249
OpenDaylight User Guide February 21, 2016 Beryllium
A user has three different ways to select one service function selection algorithm:
2. Command line tools. Command line tools such as curl or browser plugins such as
POSTMAN (for Google Chrome) and RESTClient (for Mozilla Firefox) could select
schedule algorithm by making RESTCONF calls.
3. SFC-UI. Now the SFC-UI provides an option for choosing a selection algorithm when
creating a Rendered Service Path.
The RESTCONF northbound SFC API provides GUI/RESTCONF interactions for choosing
the service function selection algorithm. MD-SAL data store provides all supported service
function selection algorithms, and provides APIs to enable one of the provided service
function selection algorithms. Once a service function selection algorithm is enabled, the
service function selection algorithm will work when creating a Rendered Service Path.
• Command line tools. Command line tools includes Linux commands curl or even
browser plugins such as POSTMAN(for Google Chrome) or RESTClient(for Mozilla
Firefox). In this case, the following JSON content is needed at the moment:
Service_function_schudule_type.json
250
OpenDaylight User Guide February 21, 2016 Beryllium
{
"service-function-scheduler-types": {
"service-function-scheduler-type": [
{
"name": "random",
"type": "service-function-scheduler-type:random",
"enabled": false
},
{
"name": "roundrobin",
"type": "service-function-scheduler-type:round-robin",
"enabled": true
},
{
"name": "loadbalance",
"type": "service-function-scheduler-type:load-balance",
"enabled": false
},
{
"name": "shortestpath",
"type": "service-function-scheduler-type:shortest-path",
"enabled": false
}
]
}
}
251
OpenDaylight User Guide February 21, 2016 Beryllium
• SFC-UI.SFC-UI provides a drop down menu for service function selection algorithm. Here
is a snapshot for the user interaction from SFC-UI when creating a Rendered Service Path.
Note
Some service function selection algorithms in the drop list are not implemented
yet. Only the first three algorithms are committed at the moment.
Random
Select Service Function from the name list randomly.
Overview
The Random algorithm is used to select one Service Function from the name list which it
gets from the Service Function Type randomly.
Prerequisites
Target Environment
The Random algorithm will work either no algorithm type is selected or the Random
algorithm is selected.
Instructions
Once the plugins are installed into Karaf successfully, a user can use his favorite method to
select the Random scheduling algorithm type. There are no special instructions for using the
Random algorithm.
252
OpenDaylight User Guide February 21, 2016 Beryllium
Round Robin
Select Service Function from the name list in Round Robin manner.
Overview
The Round Robin algorithm is used to select one Service Function from the name list
which it gets from the Service Function Type in a Round Robin manner, this will balance
workloads to all Service Functions. However, this method cannot help all Service Functions
load the same workload because it’s flow-based Round Robin.
Prerequisites
Target Environment
The Round Robin algorithm will work one the Round Robin algorithm is selected.
Instructions
Once the plugins are installed into Karaf successfully, a user can use his favorite method
to select the Round Robin scheduling algorithm type. There are no special instructions for
using the Round Robin algorithm.
Overview
The Load Balance Algorithm is used to select appropriate Service Function by actual CPU
utilization of service functions. The CPU utilization of service function obtained from
monitoring information reported via NETCONF.
Prerequisites
• NETCONF server.
• NETCONF client.
• Each VM has a NETCONF server and it could work with NETCONF client well.
Instructions
Set up VMs as Service Functions. enable NETCONF server in VMs. Ensure that you specify
them separately. For example:
253
OpenDaylight User Guide February 21, 2016 Beryllium
1 Setting up the VM
a. Set up 4 VMs include 2 SFs' type are Firewall, Others are Napt44. Name them as
firewall-1, firewall-2, napt44-1, napt44-2 as Service Function. The four VMs can run either
the same server or different servers.
b. Install NETCONF server on every VM and enable it. More information on NETCONF
can be found on the OpenDaylight wiki here: https://wiki.opendaylight.org/view/
OpenDaylight_Controller:Config:Examples:Netconf:Manual_netopeer_installation
c. Get Monitoring data from NETCONF server. These monitoring data should be get
from the NETCONF server which is running in VMs. The following static XML data is an
example:
254
OpenDaylight User Guide February 21, 2016 Beryllium
<port-id>2</port-id>
<bandwidth-utilization>30</bandwidth-utilization>
</port-bandwidth-utilization>
</SF-ports-bandwidth-utilization>
</resource-utilization>
</SF-monitoring-info>
</service-function-description-monitor-report>
2 Start SFC
b. Verify the Rendered Service Path to ensure the CPU utilization of the selected hop is
the minimum one among all the service functions with same type. The correct RSP is
firewall-1#napt44-2
Overview
The Shortest Path Algorithm is used to select appropriate Service Function by actual
topology.
Prerequisites
• Dijkstra’s algorithm. More information on Dijkstra’s algorithm can be found on the wiki
here: http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
Instructions
1 Start SFC
255
OpenDaylight User Guide February 21, 2016 Beryllium
service-function-forwarders.json:
{
"service-function-forwarders": {
"service-function-forwarder": [
{
"name": "SFF-br1",
"service-node": "OVSDB-test01",
"rest-uri": "http://localhost:5001",
"sff-data-plane-locator": [
{
"name": "eth0",
"service-function-forwarder-ovs:ovs-bridge": {
"uuid": "4c3778e4-840d-47f4-b45e-0988e514d26c",
"bridge-name": "br-tun"
},
"data-plane-locator": {
"port": 5000,
"ip": "192.168.1.1",
"transport": "service-locator:vxlan-gpe"
}
}
],
"service-function-dictionary": [
{
"sff-sf-data-plane-locator": {
"port": 10001,
"ip": "10.3.1.103"
},
"name": "napt44-1",
"type": "service-function-type:napt44"
},
{
"sff-sf-data-plane-locator": {
"port": 10003,
"ip": "10.3.1.102"
},
"name": "firewall-1",
"type": "service-function-type:firewall"
}
],
"connected-sff-dictionary": [
{
"name": "SFF-br3"
}
]
},
{
"name": "SFF-br2",
"service-node": "OVSDB-test01",
"rest-uri": "http://localhost:5002",
"sff-data-plane-locator": [
{
"name": "eth0",
"service-function-forwarder-ovs:ovs-bridge": {
"uuid": "fd4d849f-5140-48cd-bc60-6ad1f5fc0a1",
"bridge-name": "br-tun"
},
"data-plane-locator": {
"port": 5000,
256
OpenDaylight User Guide February 21, 2016 Beryllium
"ip": "192.168.1.2",
"transport": "service-locator:vxlan-gpe"
}
}
],
"service-function-dictionary": [
{
"sff-sf-data-plane-locator": {
"port": 10002,
"ip": "10.3.1.103"
},
"name": "napt44-2",
"type": "service-function-type:napt44"
},
{
"sff-sf-data-plane-locator": {
"port": 10004,
"ip": "10.3.1.101"
},
"name": "firewall-2",
"type": "service-function-type:firewall"
}
],
"connected-sff-dictionary": [
{
"name": "SFF-br3"
}
]
},
{
"name": "SFF-br3",
"service-node": "OVSDB-test01",
"rest-uri": "http://localhost:5005",
"sff-data-plane-locator": [
{
"name": "eth0",
"service-function-forwarder-ovs:ovs-bridge": {
"uuid": "fd4d849f-5140-48cd-bc60-6ad1f5fc0a4",
"bridge-name": "br-tun"
},
"data-plane-locator": {
"port": 5000,
"ip": "192.168.1.2",
"transport": "service-locator:vxlan-gpe"
}
}
],
"service-function-dictionary": [
{
"sff-sf-data-plane-locator": {
"port": 10005,
"ip": "10.3.1.104"
},
"name": "test-server",
"type": "service-function-type:dpi"
},
{
"sff-sf-data-plane-locator": {
"port": 10006,
"ip": "10.3.1.102"
257
OpenDaylight User Guide February 21, 2016 Beryllium
},
"name": "test-client",
"type": "service-function-type:dpi"
}
],
"connected-sff-dictionary": [
{
"name": "SFF-br1"
},
{
"name": "SFF-br2"
}
]
}
]
}
}
service-functions.json:
{
"service-functions": {
"service-function": [
{
"rest-uri": "http://localhost:10001",
"ip-mgmt-address": "10.3.1.103",
"sf-data-plane-locator": [
{
"name": "preferred",
"port": 10001,
"ip": "10.3.1.103",
"service-function-forwarder": "SFF-br1"
}
],
"name": "napt44-1",
"type": "service-function-type:napt44",
"nsh-aware": true
},
{
"rest-uri": "http://localhost:10002",
"ip-mgmt-address": "10.3.1.103",
"sf-data-plane-locator": [
{
"name": "master",
"port": 10002,
"ip": "10.3.1.103",
"service-function-forwarder": "SFF-br2"
}
],
"name": "napt44-2",
"type": "service-function-type:napt44",
"nsh-aware": true
},
{
"rest-uri": "http://localhost:10003",
"ip-mgmt-address": "10.3.1.103",
"sf-data-plane-locator": [
{
"name": "1",
"port": 10003,
258
OpenDaylight User Guide February 21, 2016 Beryllium
"ip": "10.3.1.102",
"service-function-forwarder": "SFF-br1"
}
],
"name": "firewall-1",
"type": "service-function-type:firewall",
"nsh-aware": true
},
{
"rest-uri": "http://localhost:10004",
"ip-mgmt-address": "10.3.1.103",
"sf-data-plane-locator": [
{
"name": "2",
"port": 10004,
"ip": "10.3.1.101",
"service-function-forwarder": "SFF-br2"
}
],
"name": "firewall-2",
"type": "service-function-type:firewall",
"nsh-aware": true
},
{
"rest-uri": "http://localhost:10005",
"ip-mgmt-address": "10.3.1.103",
"sf-data-plane-locator": [
{
"name": "3",
"port": 10005,
"ip": "10.3.1.104",
"service-function-forwarder": "SFF-br3"
}
],
"name": "test-server",
"type": "service-function-type:dpi",
"nsh-aware": true
},
{
"rest-uri": "http://localhost:10006",
"ip-mgmt-address": "10.3.1.103",
"sf-data-plane-locator": [
{
"name": "4",
"port": 10006,
"ip": "10.3.1.102",
"service-function-forwarder": "SFF-br3"
}
],
"name": "test-client",
"type": "service-function-type:dpi",
"nsh-aware": true
}
]
}
}
259
OpenDaylight User Guide February 21, 2016 Beryllium
• Verify the Rendered Service Path to ensure the selected hops are linked in one SFF. The
correct RSP is firewall-1#napt44-1 or firewall-2#napt44-2. The first SF type is Firewall in
Service Function Chain. So the algorithm will select first Hop randomly among all the SFs
type is Firewall. Assume the first selected SF is firewall-2. All the path from firewall-1 to SF
which type is Napt44 are list:
• Path2: firewall-2 # sff2 # sff3 # sff1 # napt44-1 The shortest path is Path1, so the
selected next hop is napt44-2.
260
OpenDaylight User Guide February 21, 2016 Beryllium
1. Service-Function-Group-Algorithm:
Service-Function-Group-Algorithms {
Service-Function-Group-Algorithm {
String name
String type
}
}
2. Service-Function-Group:
Service-Function-Groups {
Service-Function-Group {
String name
String serviceFunctionGroupAlgorithmName
String type
261
OpenDaylight User Guide February 21, 2016 Beryllium
String groupId
Service-Function-Group-Element {
String service-function-name
int index
}
}
}
Tutorials
This tutorial will explain how to create a simple SFC configuration, with SFG instead of SF. In
this example, the SFG will include two existing SF.
Setup SFC
For general SFC setup and scenarios, please see the SFC wiki page: https://
wiki.opendaylight.org/view/Service_Function_Chaining:Main#SFC_101
Create an algorithm
POST - http://127.0.0.1:8181/restconf/config/service-function-group-algorithm:service-
function-group-algorithms
{
"service-function-group-algorithm": [
{
"name": "alg1"
"type": "ALL"
}
]
}
Create a group
POST - http://127.0.0.1:8181/restconf/config/service-function-group:service-function-
groups
{
"service-function-group": [
{
"rest-uri": "http://localhost:10002",
"ip-mgmt-address": "10.3.1.103",
"algorithm": "alg1",
262
OpenDaylight User Guide February 21, 2016 Beryllium
"name": "SFG1",
"type": "service-function-type:napt44",
"sfc-service-function": [
{
"name":"napt44-104"
},
{
"name":"napt44-103-1"
}
]
}
]
}
263
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Installing Feature ......................................................................................................... 264
Northbound APIs ......................................................................................................... 264
Installing Feature
The SNMP Plugin can be installed using a single karaf feature: odl-snmp-plugin
Northbound APIs
There are two exposed northbound APIs: snmp-get & snmp-set
SNMP GET
Default URL: http://localhost:8181/restconf/operations/snmp:snmp-get
POST Input
Field Name Type Description Example Required?
ip-address Ipv4 Address The IPv4 Address of 10.86.3.13 Yes
the desired network
node
oid String The Object Identifier 1.3.6.1.2.1.1.1 Yes
of the desired MIB
table/object
get-type ENUM (GET, GET- The type of get GET-BULK Yes
NEXT, GET-BULK, GET- request to send
WALK)
community String The community string private No. (Default: public)
to use for the SNMP
request
Example.
{
"input": {
"ip-address": "10.86.3.13",
"oid" : "1.3.6.1.2.1.1.1",
"get-type" : "GET-BULK",
"community" : "private"
264
OpenDaylight User Guide February 21, 2016 Beryllium
}
}
POST Output
Field Name Type Description
results List of { "value" : String } pairs The results of the SNMP query
Example.
{
"snmp:results": [
{
"value": "Ethernet0/0/0",
"oid": "1.3.6.1.2.1.2.2.1.2.1"
},
{
"value": "FastEthernet0/0/0",
"oid": "1.3.6.1.2.1.2.2.1.2.2"
},
{
"value": "GigabitEthernet0/0/0",
"oid": "1.3.6.1.2.1.2.2.1.2.3"
}
]
}
SNMP SET
Default URL: http://localhost:8181/restconf/operations/snmp:snmp-set
POST Input
Field Name Type Description Example Required?
ip-address Ipv4 Address The Ipv4 address of 10.86.3.13 Yes
the desired network
node
oid String The Object Identifier 1.3.6.2.1.1.1 Yes
of the desired MIB
object
value String The value to set on "Hello World" Yes
the network device
community String The community string private No. (Default: public)
to use for the SNMP
request
Example.
{
"input": {
"ip-address": "10.86.3.13",
"oid" : "1.3.6.1.2.1.1.1.0",
"value" : "Sample description",
"community" : "private"
}
}
265
OpenDaylight User Guide February 21, 2016 Beryllium
POST Output
On a successful SNMP-SET, no output is presented, just a HTTP status of 200.
Errors
If any errors happen in the set request, you will be presented with an error message in the
output.
For example, on a failed set request you may see an error like:
{
"errors": {
"error": [
{
"error-type": "application",
"error-tag": "operation-failed",
"error-message": "SnmpSET failed with error status: 17, error
index: 1. StatusText: Not writable"
}
]
}
}
266
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 267
SXP Architecture .......................................................................................................... 267
Configuring SXP .......................................................................................................... 268
Administering or Managing SXP .................................................................................. 268
Overview
SXP (Source-Group Tag eXchange Protocol) project is an effort to enhance OpenDaylight
platform with IP-SGT (IP Address to Source Group Tag) bindings that can be learned from
connected SXP-aware network nodes. The current implementation supports SXP protocol
version 4 according to the Smith, Kandula - SXP IETF draft and grouping of peers and
creating filters based on ACL/Prefix-list syntax for filtering outbound and inbound IP-SGT
bindings. All protocol legacy versions 1-3 are supported as well. Additionally, version 4 adds
bidirectional connection type as an extension of a unidirectional one.
SXP Architecture
The SXP Server manages all connected clients in separate threads and a common SXP
protocol agreement is used between connected peers. Each SXP network peer is modelled
with its pertaining class, e.g., SXP Server represents the SXP Speaker, SXP Listener the
Client. The server program creates the ServerSocket object on a specified port and waits
until a client starts up and requests connect on the IP address and port of the server. The
client program opens a Socket that is connected to the server running on the specified host
IP address and port.
The SXP Listener maintains connection with its speaker peer. From an opened channel
pipeline, all incoming SXP messages are processed by various handlers. Message must be
decoded, parsed and validated.
The SXP Speaker is a counterpart to the SXP Listener. It maintains a connection with its
listener peer and sends composed messages.
The SXP Binding Handler extracts the IP-SGT binding from a message and pulls it into the
SXP-Database. If an error is detected during the IP-SGT extraction, an appropriate error
code and sub-code is selected and an error message is sent back to the connected peer. All
transitive messages are routed directly to the output queue of SXP Binding Dispatcher.
The IP-SGT Manager handles bindings from multiple connections. If a new data has been
added into or deleted from the SXP-Database, or binding’s contributor change is detected,
the manager performs an arbitration process above the SXP-Database to resolve the
binding duplicity and prevent possible information loops. Finally, it updates the IP-SGT-
Master database that consists only of valid and unique bindings, i.e., a single binding per IP
address.
267
OpenDaylight User Guide February 21, 2016 Beryllium
The IP-SGT Manager also contains RPCs that can be used by other OpenDaylight plugins, or
by making REST calls, to add, update or to delete bindings in or from the SXP-database.
The SXP Binding Dispatcher represents a selector that will decides how many data from
the SXP-database will be sent and when. It is responsible for message content composition
based on maximum message length.
The SXP Binding Filters handles filtering of outcoming and incoming IP-SGT bindings
according to BGP filtering using ACL and Prefix List syntax for specifiing filter.
Configuring SXP
The OpenDaylight Karaf distribution comes pre-configured with baseline SXP configuration.
<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<requested-node>0.0.0.100</requested-node>
</input>
<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<connections>
<connection>
<!--vpn>vpn1</vpn-->
<peer-address>172.20.161.50</peer-address>
<!--source-ip></source-ip-->
<tcp-port>64999</tcp-port>
<!-- Password setup: default | none -->
<password>default</password>
<!-- Mode: speaker/listener/both -->
<mode>speaker</mode>
<version>version4</version>
<description>Connection to ASR1K</description>
<!-- Timers setup: 0 to disable specific timer usability, the default value
will be used -->
<connection-timers>
<!-- Speaker -->
<hold-time-min-acceptable>45</hold-time-min-acceptable>
<keep-alive-time>30</keep-alive-time>
</connection-timers>
</connection>
<connection>
<!--vpn>vpn1</vpn-->
<peer-address>172.20.161.178</peer-address>
<!--source-ip></source-ip-->
268
OpenDaylight User Guide February 21, 2016 Beryllium
<tcp-port>64999</tcp-port>
<!-- Password setup: default | none -->
<password>default</password>
<!-- Mode: speaker/listener/both -->
<mode>listener</mode>
<version>version4</version>
<description>Connection to ISR</description>
<!-- Timers setup: 0 to disable specific timer usability, the default value
will be used -->
<connection-timers>
<!-- Listener -->
<!-- NON-CONFIGURABLE delete-hold-down-time -->
<reconciliation-time>120</reconciliation-time>
<hold-time>90</hold-time>
<hold-time-min>90</hold-time-min>
<hold-time-max>180</hold-time-max>
</connection-timers>
</connection>
</connections>
</input>
<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<peer-address>172.20.161.50</peer-address>
</input>
<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ip-prefix>192.168.2.1/32</ip-prefix>
<sgt>20</sgt >
</input>
<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<original-binding>
<ip-prefix>192.168.2.1/32</ip-prefix>
<sgt>20</sgt>
</original-binding>
<new-binding>
<ip-prefix>192.168.3.1/32</ip-prefix>
<sgt>30</sgt>
</new-binding>
</input>
<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ip-prefix>192.168.3.1/32</ip-prefix>
<sgt>30</sgt >
</input>
269
OpenDaylight User Guide February 21, 2016 Beryllium
This RPC gets particular device bindings. An SXP-aware node is identified with a unique
Node-ID. If a user requests bindings for a Speaker 20.0.0.2, the RPC will search for an
appropriate path, which contains 20.0.0.2 Node-ID, within locally learnt SXP data in the
SXP database and replies with associated bindings. POST http://127.0.0.1:8181/restconf/
operations/sxp-controller:get-node-bindings
<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<requested-node>20.0.0.2</requested-node>
</input>
<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ip-prefix>192.168.12.2/32</ip-prefix>
</input>
OpenDaylight based applications can take advantage of the IP-SGT binding information.
For example, access control can be defined by an operator in terms of policy groups, while
OpenDaylight can configure access control lists on network elements using IP addresses,
e.g., existing technology.
OpenDaylight can aggregate the binding information from many devices and communicate
it to a network element. For example, a firewall can use the IP-SGT binding information
to know how to handle IPs based on the group-based ACLs it has set. But to do this with
SXP alone, the firewall has to maintain a large number of network connections to get the
binding information. This incurs heavy overhead costs to maintain all of the SXP peering
and protocol information. OpenDaylight can aggregate the IP-group information so
that the firewall need only connect to OpenDaylight. By moving the information flow
outside of the network elements to a centralized position, we reduce the overhead of
the CPU consumption on the enforcement element. This is a huge savings - it allows the
enforcement point to only have to make one connection rather than thousands, so it can
concentrate on its primary job of forwarding and enforcing.
OpenDaylight can relay the binding information from one network element to others.
Changes in group membership can be propagated more readily through a centralized
model. For example, in a security application a particular host (e.g., user or IP Address) may
be found to be acting suspiciously or violating established security policies. The defined
response is to put the host into a different source group for remediation actions such as
a lower quality of service, restricted access to critical servers, or special routing conditions
270
OpenDaylight User Guide February 21, 2016 Beryllium
to ensure deeper security enforcement (e.g., redirecting the host’s traffic through an
IPS with very restrictive policies). Updated group membership for this host needs to be
communicated to multiple network elements as soon as possible; a very efficient and
effective method of propagation can be performed using OpenDaylight as a centralized
point for relaying the information.
OpenDayLight can create filters for exporting and recieving IP-SGTT bindings used on
specific peer groups, thus can provide more complex maintaining of policy groups.
Although the IP-SGT binding is only one specific piece of information, and although SXP is
implemented widely in a single vendor’s equipment, bringing the ability of OpenDaylight to
process and distribute the bindings, is a very specific immediate useful implementation of
policy groups. It would go a long way to develop both the usefulness of OpenDaylight and
of policy groups.
271
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 272
Configuring TCPMD5 manually .................................................................................... 272
Configuring TCPMD5 through RESTCONF .................................................................... 275
This user guide describes the configuration for Border Gateway Protocol (BGP) and Path
Computation Element Protocol (PCEP) using MD5 authentication. It is destined for users
who build applications using MD5 library.
Overview
The TCPMD5 library provides access to RFC-2385 MD5 Signature Option on operating
systems which support it in their TCP stack. This option has been historically used to protect
BGP sessions, but is equally useful for protecting PCEP sessions.
Important
Before you continue with steps in this user guide, make sure BGP and/or
PCEP is configured properly.
Caution
If the connection can not be established, there are no warnings or errors, so
be sure to double check your configuration and passwords.
To enable TCPMD5 for the BGP protocol, perform the following steps:
272
OpenDaylight User Guide February 21, 2016 Beryllium
<!--
Uncomment this block to enable TCPMD5 Signature support
-->
<md5-channel-factory>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-
channel-factory</type>
<name>md5-client-channel-factory</name>
</md5-channel-factory>
<md5-server-channel-factory>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-
server-channel-factory</type>
<name>md5-server-channel-factory</name>
</md5-server-channel-factory>
<!--
For TCPMD5 support, make sure the dispatcher associated with the rib has
"md5-channel-factory" attribute set and then add a "password" attribute
here.
Note that the peer has to have the same password configured, otherwise the
connection will not be established.
-->
<module>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-
peer</type>
<name>example-bgp-peer</name>
<host>10.25.2.27</host>
<holdtimer>180</holdtimer>
<rib>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:cfg">prefix:rib</
type>
<name>example-bgp-rib</name>
</rib>
<advertized-table>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-
table-type</type>
<name>ipv4-unicast</name>
</advertized-table>
<advertized-table>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-
table-type</type>
<name>ipv6-unicast</name>
</advertized-table>
<advertized-table>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-
table-type</type>
<name>linkstate</name>
</advertized-table>
<password>changeme</password>
</module>
273
OpenDaylight User Guide February 21, 2016 Beryllium
Note
Setting a password on other BGP devices is out of scope for this document.
PCEP
Important
Make sure your 20-tcpmd5.xml has its content uncommented.
<!--
Uncomment this block to enable TCPMD5 Signature support
-->
<md5-channel-factory>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-
channel-factory</type>
<name>md5-client-channel-factory</name>
</md5-channel-factory>
<md5-server-channel-factory>
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-
server-channel-factory</type>
<name>md5-server-channel-factory</name>
</md5-server-channel-factory>
<!--
For TCPMD5 support make sure the dispatcher has the "md5-server-channel-
factory"
attribute set and then set the appropriate client entries here. Note that
if this
option is configured, the PCCs connecting here must have the same password,
otherwise they will not be able to connect.
-->
<client>
<address>192.0.2.2</address>
<password>changeme</password>
</client>
Important
Change the <address> value to the address of PCC, the one that is advertized
to PCE and provide password matching the one set on PCC.
Note
Setting a password on PCC is out of scope for this document.
274
OpenDaylight User Guide February 21, 2016 Beryllium
feature:install odl-netconf-connector-all
• To check what modules you have currently configured, check following link: http://
localhost:8181/restconf/config/network-topology:network-topology/topology/topology-
netconf/node/controller-config/yang-ext:mount/config:modules/
• To check what services you have currently configured, check following link: http://
localhost:8181/restconf/config/network-topology:network-topology/topology/topology-
netconf/node/controller-config/yang-ext:mount/config:services/
These URLs are also used to POST new configuration. If you want to change any other
configuration that is listed here, make sure you include the correct namespaces. The correct
namespace for <module> is always urn:opendaylight:params:xml:ns:yang:controller:config.
The namespace for any other fields can be found by finding given module in configuration
yang files.
Note
RESTCONF will tell you if some namespace is wrong.
To enable TCPMD5 for either one of the protocols, enable TCPMD5 modules and services:
Caution
You have to make separate POST requests for each module/service!
*URL: http://localhost:8181/restconf/config/network-topology:network-topology/
topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/
POST:
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:jni:cfg">x:native-key-
access-factory</type>
<name>global-key-access-factory</name>
</module>
275
OpenDaylight User Guide February 21, 2016 Beryllium
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">x:md5-
client-channel-factory</type>
<name>md5-client-channel-factory</name>
<key-access-factory xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:cfg">x:key-access-
factory</type>
<name>global-key-access-factory</name>
</key-access-factory>
</module>
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-
server-channel-factory-impl</type>
<name>md5-server-channel-factory</name>
<server-key-access-factory xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:cfg">x:key-access-
factory</type>
<name>global-key-access-factory</name>
</server-key-access-factory>
</module>
URL: http://localhost:8181/restconf/config/network-topology:network-topology/
topology/topology-netconf/node/controller-config/yang-ext:mount/config:services/
POST:
<service xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:cfg">x:key-access-
factory</type>
<instance>
<name>global-key-access-factory</name>
<provider>/modules/module[type='native-key-access-factory'][name='global-
key-access-factory']</provider>
</instance>
</service>
<service xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">x:md5-
channel-factory</type>
<instance>
<name>md5-client-channel-factory</name>
<provider>/modules/module[type='md5-client-channel-factory'][name='md5-
client-channel-factory']</provider>
</instance>
</service>
276
OpenDaylight User Guide February 21, 2016 Beryllium
<service xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-
server-channel-factory</type>
<instance>
<name>md5-server-channel-factory</name>
<provider>/modules/module[type='md5-server-channel-factory-impl'][name='md5-
server-channel-factory']</provider>
</instance>
</service>
BGP
Caution
You have to introduce modules and services mentioned in the previous section.
Your BGP client needs to be ALREADY configured. Check User Guide for BGP.
Caution
You need to copy and paste FULL module in order to replace it. This guide
shows you part you need to change.
URL: http://localhost:8181/restconf/config/network-topology:network-topology/
topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/
odl-bgp-rib-impl-cfg:bgp-dispatcher-impl/global-bgp-dispatcher
PUT:
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-
dispatcher-impl</type>
<name>global-bgp-dispatcher</name>
<md5-channel-factory xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">x:md5-
channel-factory</type>
<name>md5-client-channel-factory</name>
</md5-channel-factory>
<md5-server-channel-factory xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">x:md5-
server-channel-factory</type>
<name>md5-server-channel-factory</name>
</md5-server-channel-factory>
...
</module>
Caution
You need to copy and paste FULL module in order to replace it. This guide
shows you part you need to change.
277
OpenDaylight User Guide February 21, 2016 Beryllium
1. Set password:
URL: http://localhost:8181/restconf/config/network-topology:network-topology/
topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/
odl-bgp-rib-impl-cfg:bgp-peer/example-bgp-peer
PUT:
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-peer</
type>
<name>example-bgp-peer</name>
<password xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">changeme</
password>
...
</module>
PCEP
Caution
You have to introduce modules and services mentioned in the previous section.
Caution
You need to copy and paste FULL module in order to replace it. This guide
shows you part you need to change.
URL: http://localhost:8181/restconf/config/network-topology:network-topology/
topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/
odl-pcep-impl-cfg:pcep-dispatcher-impl/global-pcep-dispatcher
PUT:
278
OpenDaylight User Guide February 21, 2016 Beryllium
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:pcep:impl">x:pcep-dispatcher-
impl</type>
<name>global-pcep-dispatcher</name>
<md5-channel-factory xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:pcep:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">x:md5-
channel-factory</type>
<name>md5-client-channel-factory</name>
</md5-channel-factory>
<md5-server-channel-factory xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:pcep:impl">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">x:md5-
server-channel-factory</type>
<name>md5-server-channel-factory</name>
</md5-server-channel-factory>
...
</module>
Caution
You need to copy and paste FULL module in order to replace it. This guide
shows you part you need to change.
1. Set password:
URL: http://localhost:8181/restconf/config/network-topology:network-topology/
topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/
odl-pcep-impl-cfg:pcep-topology-provider/pcep-topology
PUT:
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x=
"urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">x:pcep-
topology-provider</type>
<name>pcep-topology</name>
<client xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">
<address xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:pcep:topology:provider">192.0.
2.2</address> <!--CHANGE THE VALUE -->
<password>changeme</password> <!--CHANGE THE VALUE -->
</client>
...
</module>
279
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 280
TSDR Architecture ....................................................................................................... 280
Configuring TSDR with default datastore H2 ............................................................... 280
Administering or Managing TSDR with default datastore H2 ........................................ 280
This document describes how to use the embedded JPA datastore H2, which is the
default datastore (recommended for non-production use case) introduced as part of
OpenDaylight Time Series Data Respository(TSDR) project. This store captures the time
series data. This document contains configuration, administration, management, using, and
troubleshooting sections for the feature.
Overview
In the Lithium Release of Time Series Data Repository (TSDR), time series metrics
corresponding to the OpenFlow statistics are captured. For users trying out things on their
laptop or non-production environment, TSDR functionality can be enabled with default
datastore H2 by installing the feature odl-tsdr-all.
TSDR Architecture
The following wiki pages capture the TSDR Model/Architecture
a. https://wiki.opendaylight.org/view/
TSDR_Data_Storage_Service_and_Persistence_with_HBase_Plugin
b. https://wiki.opendaylight.org/view/TSDR_Data_Collection_Service
Note in Lithium the DataCollection Service is implemented just for OpenFlow Statistics
metrics.
280
OpenDaylight User Guide February 21, 2016 Beryllium
wherein
With TSDR functionality with default H2 datastore you get an additional command
tsdr:purgeAll
281
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 282
TSDR with HBase Data Store Architecture .................................................................... 282
Configuring TSDR with HBase Data Store .................................................................... 283
Administering or Managing TSDR HBase Data Store .................................................... 283
Tutorials ...................................................................................................................... 284
This document describes how to use HBase to capture time series data using Time Series
Data Repository (TSDR) feature in the OpenDaylight Lithium release. This document
contains configuration, administration, management, usage, and troubleshooting sections
for the feature.
Overview
The Time Series Data Repository (TSDR) project in OpenDaylight (ODL) creates a
framework for collecting, storing, querying, and maintaining time series data in then
OpenDaylight SDN controller. TSDR provides the framework for plugging in proper data
collectors to collect various time series data and store into TSDR data stores. With a
common data model and generic TSDR data persistence APIs, the user could choose various
data stores to be plugged into TSDR Persistence framework. In Lithium, two types of data
stores are supported: HBase NoSQL database and H2 relational database.
With the capabilities of data collection, storage, query, aggregation, and purging provided
by TSDR, network administrators could leverage various data driven appliations built on
top of TSDR for security risk detection, performance analysis, operational configuration
optimization, traffic engineering, and network analytics with automated intelligence.
Data Collection Service handles the collection of time series data into TSDR and hands it
over to Data Storage Service. Data Storage Service stores the data into TSDR through TSDR
Persistence Layer. TSDR Persistence Layer provides generic Service APIs allowing various
data stores to be plugged in. Data Aggregation Service aggregates time series fine-grained
raw data into course-grained roll-up data to control the size of the data. Data Purging
Service periodically purges both fine-grained raw data and course-granined aggregated
data according to user-defined schedules.
In Lithium, we implemented Data Collection Service, Data Storage Service, TSDR Persistence
Layer, TSDR HBase Data Store, and TSDR H2 Data Store. Among these services and
components, time series data is communicated using a common TSDR data model, which
is designed and implemented for the abstraction of time series data commonalities. With
these functions, TSDR will be able to collect the data from the data sources and store
282
OpenDaylight User Guide February 21, 2016 Beryllium
them into one of the TSDR data stores: either HBase Data Store or H2 Data Store. We also
provided a simple query command from Karaf console for the user to retrieve TSDR data
from the data stores.
A future release will contain Data Aggregation service, Data Purging Service, and a full-
fledged Data Query Service with Norghbound APIs.
Optionally, the user can configure TSDR HBase Data Store following HBase Data Store
Configuration Procedure.
After the configuration of HBase Data Store is complete, proceed with the installation of
HBase Data Store from Karaf console.
tsdr:list
Typing tab will get the context prompt of the arguments when typeing the command in
Karaf console.
283
OpenDaylight User Guide February 21, 2016 Beryllium
• Karaf logs Similar to other OpenDaylight components and features, TSDR HBase
Data Store writes logging information to Karaf logs. All the information messages,
warnings, error messages, and debug messages are written to Karaf logs.
• HBase logs For HBase system level logs, the user can check standard HBase server logs,
which is under <HBase-installation-directory>/logs.
Tutorials
How to use TSDR to collect, store, and view OpenFlow
Interface Statistics
Overview
This tutorial describes an example of using TSDR to collect, store, and view one type of time
series data in OpenDaylight environment.
Prerequisites
You would need to have the following as prerequisits: * One or multiple OpenFlow enabled
switches. Alternatively, you can use mininet to simulate such a switch. * Successfully
installed OpenDaylight Controller. * Successfully installed HBase Data Store following
TSDR HBase Data Store Installation Guide. * Connect the OpenFlow enabled switch(es) to
OpenDaylight Controller. ===== Target Environment HBase data store is only supported in
Linux operation system.
Instructions
• Start OpenDaylight controller.
**If using mininet, run the following commands from mininet command line:
**If using real switch(es), the OpenDaylight controller should be able to discover the
network toplogy containing the switches.
• feature:install odl-tsdr-hbase
• tsdr:list InterfaceStats
You should be able to see the interface statistics of the switch(es) from the HBase Data
Store. If there are too many rows, you can use "tsdr:list InterfaceStats|more" to view it
page by page.
284
OpenDaylight User Guide February 21, 2016 Beryllium
By tabbing after "tsdr:list", you will see all the supported data categories. For example,
"tsdr:list FlowStats" will output the Flow statistics data collected from the switch(es).
285
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 286
TTP CLI Tools Architecture ........................................................................................... 286
Overview
Table Type Patterns are a specification developed by the Open Networking Foundation
to enable the description and negotiation of subsets of the OpenFlow protocol. This is
particularly useful for hardware switches that support OpenFlow as it enables the to
describe what features they do (and thus also what features they do not) support. More
details can be found in the full specification listed on the OpenFlow specifications page.
286
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 287
USC Channel Architecture ............................................................................................ 287
Installing USC Channel ................................................................................................. 288
Configuring USC Channel ............................................................................................ 288
Administering or Managing USC Channel .................................................................... 288
Tutorials ...................................................................................................................... 288
This document describes how to use the Unified Secure Channel (USC) feature in
OpenDaylight. This document contains configuration, administration, and management
sections for the feature.
Overview
In enterprise networks, more and more controller and network management systems
are being deployed remotely, such as in the cloud. Additionally, enterprise networks are
becoming more heterogeneous - branch, IoT, wireless (including cloud access control).
Enterprise customers want a converged network controller and management system
solution. This feature is intended for device and network administrators looking to use
unified secure channels for their systems.
• The USC Agent provides proxy and agent functionality on top of all standard protocols
supported by the device. It initiates call-home with the controller, maintains live
connections with with the controller, acts as a demuxer/muxer for packets with the
USC header, and authenticates the controller.
• USC Plugin
• The USC Plugin is responsible for communication between the controller and the USC
agent . It responds to call-home with the controller, maintains live connections with
the devices, acts as a muxer/demuxer for packets with the USC header, and provides
support for TLS/DTLS.
• USC Manager
• The USC Manager handles configurations, high availability, security, monitoring, and
clustering support for USC.
• USC UI
• The USC UI is responsible for displaying a graphical user interface representing the
state of USC in the OpenDaylight DLUX UI.
287
OpenDaylight User Guide February 21, 2016 Beryllium
odl-usc-channel-ui
The USC configuration files for the Karaf distribution are located in distribution/karaf/
target/assembly/etc/usc
• certificates
• The certificates folder contains the client key, pem, and rootca files as is necessary for
security.
• akka.conf
• usc.properties
• This file contains configuration related to USC. Use this file to set the location of
certificates, define the source of additional akka configurations, and assign default
settings to the USC behavior.
Go to http://${ipaddress}:8181/index.html, sign in, and click on the USC side menu tab.
From there, users can view the state of USC channels.
Tutorials
Below are tutorials for USC Channel
288
OpenDaylight User Guide February 21, 2016 Beryllium
Overview
This tutorial walks users through the process of viewing the USC Channel environment
topology including established channels connecting the controllers and devices in the USC
topology.
Prerequisites
For this tutorial, we assume that a device running a USC agent is already installed.
Instructions
• Run the OpenDaylight distribution and install odl-usc-channel-ui from the Karaf console.
• Go to http://${ipaddress}:8181/apidoc/explorer/index.html
• {"input":{"channel":{"hostname":"127.0.0.1","port":1068,"remote":false}}}
• Go to http://${ipaddress}:8181/index.html
• The UI should display a table including the added channel from step 3.
289
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
VTN Overview ............................................................................................................. 290
VTN OpenStack Configuration ..................................................................................... 299
VTN Usage Examples ................................................................................................... 321
VTN Overview
OpenDaylight Virtual Tenant Network (VTN) is an application that provides multi-tenant
virtual network on an SDN controller.
Conventionally, huge investment in the network systems and operating expenses are
needed because the network is configured as a silo for each department and system. So,
various network appliances must be installed for each tenant and those boxes cannot be
shared with others. It is a heavy work to design, implement and operate the entire complex
network.
The uniqueness of VTN is a logical abstraction plane. This enables the complete separation
of logical plane from physical plane. Users can design and deploy any desired network
without knowing the physical network topology or bandwidth restrictions.
VTN allows the users to define the network with a look and feel of conventional L2/L3
network. Once the network is designed on VTN, it will automatically be mapped into
underlying physical network, and then configured on the individual switch leveraging
SDN control protocol. The definition of logical plane makes it possible not only to hide
the complexity of the underlying network but also to better manage network resources.
It achieves reducing reconfiguration time of network services and minimizing network
configuration errors.
290
OpenDaylight User Guide February 21, 2016 Beryllium
• VTN Manager
• VTN Coordinator
VTN Manager
An OpenDaylight Controller Plugin that interacts with other modules to implement
the components of the VTN model. It also provides a REST interface to configure VTN
components in ODL controller. VTN Manager is implemented as one plugin to the
OpenDaylight controller. This provides a REST interface to create/update/delete VTN
components. The user command in VTN Coordinator is translated as REST API to VTN
Manager by the ODC Driver component. In addition to the above mentioned role, it also
provides an implementation to the OpenStack L2 Network Functions API.
Features Overview
• odl-vtn-manager provides VTN Manager’s JAVA API.
REST API
VTN Manager provides REST API for virtual network functions.
291
OpenDaylight User Guide February 21, 2016 Beryllium
You can check the list of all tenants by executing the following command.
curl --user "admin":"admin" -H "Accept: application/json" -H \
"Content-type: application/json" -X GET \
http://localhost:8282/controller/nb/v2/vtn/default/vtns
VTN Coordinator
The VTN Coordinator is an external application that provides a REST interface for a
user to use the VTN Virtualization. It interacts with VTN Manager plugin to implement
the user configuration. It is also capable of multiple controller orchestration. It realizes
Virtual Tenant Network (VTN) provisioning in OpenDaylight Controllers (ODC). In
the OpenDaylight architecture VTN Coordinator is part of the network application,
orchestration and services layer. VTN Coordinator has been implemented as an external
application to the OpenDaylight controller. This component is responsible for the VTN
virtualization. VTN Coordinator will use the REST interface exposed by the VTN Manger to
realize the virtual network using the OpenDaylight controller. It uses OpenDaylight APIs
(REST) to construct the virtual network in ODCs. It provides REST APIs for northbound VTN
applications and supports virtual networks spanning across multiple ODCs by coordinating
across ODCs.
292
OpenDaylight User Guide February 21, 2016 Beryllium
The following figure shows an example of a constructed virtual network. VRT is defined as
the vRouter, BR1 and BR2 are defined as vBridges. interfaces of the vRouter and vBridges
are connected using vLinks.
293
OpenDaylight User Guide February 21, 2016 Beryllium
VTN can learn the terminal information from a terminal that is connected to a switch which
is mapped to VTN. Further, it is possible to refer that terminal information on the VTN.
• Learning terminal information VTN learns the information of a terminal that belongs to
VTN. It will store the MAC address and VLAN ID of the terminal in relation to the port of
the switch.
The following figure shows an example of mapping. An interface of BR1 is mapped to port
GBE0/1 of OFS1 using port mapping. Packets received from GBE0/1 of OFS1 are regarded
as those from the corresponding interface of BR1. BR2 is mapped to VLAN 200 using VLAN
mapping. Packets with VLAN tag 200 received from any ports of any OFSs are regarded as
those from an interface of BR2.
294
OpenDaylight User Guide February 21, 2016 Beryllium
vBridge Functions
The vBridge provides the bridge function that transfers a packet to the intended virtual
port according to the destination MAC address. The vBridge looks up the MAC address
table and transmits the packet to the corresponding virtual interface when the destination
MAC address has been learned. When the destination MAC address has not been learned,
it transmits the packet to all virtual interfaces other than the receiving port (flooding). MAC
addresses are learned as follows.
• MAC address learning The vBridge learns the MAC address of the connected host. The
source MAC address of each received frame is mapped to the receiving virtual interface,
and this MAC address is stored in the MAC address table created on a per-vBridge basis.
• MAC address aging The MAC address stored in the MAC address table is retained as long
as the host returns the ARP reply. After the host is disconnected, the address is retained
until the aging timer times out. To have the vBridge learn MAC addresses statically, you
can register MAC addresses manually.
vRouter Functions
The vRouter transfers IPv4 packets between vBridges. The vRouter supports routing, ARP
learning, and ARP aging functions. The following outlines the functions.
• Routing function When an IP address is registered with a virtual interface of the vRouter,
the default routing information for that interface is registered. It is also possible to
statically register routing information for a virtual interface.
• ARP learning function The vRouter associates a destination IP address, MAC address
and a virtual interface, based on an ARP request to its host or a reply packet for an
ARP request, and maintains this information in an ARP table prepared for each routing
domain. The registered ARP entry is retained until the aging timer, described later,
times out. The vRouter transmits an ARP request on an individual aging timer basis and
deletes the associated entry from the ARP table if no reply is returned. For static ARP
learning, you can register ARP entry information manually. *DHCP relay agent function
The vRouter also provides the DHCP relay agent function.
295
OpenDaylight User Guide February 21, 2016 Beryllium
• VLAN Priority
• Source IP address
• Destination IP address
• DSCP
• IP Protocol
• ICMP type
• ICMP code
The types of Action that can be applied on packets that match the Flow Filter conditions
are given in the following table. It is possible to make only those packets, which match
a particular condition, to pass through a particular server by specifying Redirection in
Action. E.g., path of flow can be changed for each packet sent from a particular terminal,
depending upon the destination IP address. VLAN priority control and DSCP marking are
also supported.
The following figure shows an example of how the flow filter function works.
If there is any matching condition specified by flow filter when a packet being transferred
within a virtual network goes through a virtual interface, the function evaluates the
matching condition to see whether the packet matches it. If the packet matches the
condition, the function applies the matching action specified by flow filter. In the example
shown in the figure, the function evaluates the matching condition at BR1 and discards the
packet if it matches the condition.
296
OpenDaylight User Guide February 21, 2016 Beryllium
VTN can be created on each SDN controller. If users would like to manage those multiple
VTNs with one policy, those VTNs can be integrated to a single VTN.
As a use case, this feature is deployed to multi data center environment. Even if those data
centers are geographically separated and controlled with different controllers, a single
policy virtual network can be realized with VTN.
Also, one can easily add a new SDN Controller to an existing VTN or delete a particular SDN
Controller from VTN.
In addition to this, one can define a VTN which covers both OpenFlow network and
Overlay network at the same time.
Flow Filter, which is set on the VTN, will be automatically applied on the newly added SDN
Controller.
297
OpenDaylight User Guide February 21, 2016 Beryllium
Function Outline
VTN provides following operations for various network resources.
Example usage
The following is an example of the usage to construct a virtual network.
• Create VTN
298
OpenDaylight User Guide February 21, 2016 Beryllium
-d '{"vtn":{"vtn_name":"VTN1"}}' http://172.1.0.1:8083/vtn-webapi/vtns.json
While OpenDaylight Controller provides several ways to integrate with OpenStack, this
guide focus on the way which uses VTN features available on OpenDaylight controller.In
the integration, VTN Manager work as network service provider for OpenStack.
VTN Manager features, enable OpenStack to work in pure OpenFlow environment in which
all switches in data plane are OpenFlow switch.
Requirements
To use OpenDaylight as Network Service Provider for OpenStack.
Components
• OpenDaylight Controller.
The VTN features support multiple OpenStack nodes. You can deploy multiple OpenStack
Compute Nodes. In management plane, OpenDaylight Controller, OpenStack nodes and
OpenFlow switches should communicate with each other. In data plane, Open vSwitches
299
OpenDaylight User Guide February 21, 2016 Beryllium
running in OpenStack nodes should communicate with each other through a physical or
logical OpenFlow switches. The core OpenFlow switches are not mandatory. Therefore, you
can directly connect to the Open vSwitch’s.
Note
Ubuntu 14.04 was used in both the nodes and Vsphere was used for this
howto.
Configuration
Server Preparation
• Install Ubuntu 14.04 LTS in two servers (OpenStack Control node and Compute node
respectively)
• While installing, Ubuntu mandates creation of a User, we created the user "stack"(We
will use the same user for running devstack) NOTE: You can also have multiple Compute
nodes. TIP: Please do minimal Install to avoid any issues in devstack bringup
300
OpenDaylight User Guide February 21, 2016 Beryllium
Network Settings - Checked the output of ifconfig -a, two interfaces were listed eth0
and eth1 as indicated in the image above. - We had connected eth0 interface to the
Network where OpenDaylight is reachable. - eth1 interface in both servers were connected
to a different network to act as data plane for the VM’s created using the OpenStack. -
Manually edited the file : sudo vim /etc/network/interfaces and made entries as follows
Note
Please ensure that the eth0 interface is the default route and it is able to reach
the ODL_IP_ADDRESS NOTE: The entries for eth1 are not mandatory, If not
set, we may have to manually do "ifup eth1" after the stacking is complete to
activate the interface
Finalize - reboot both nodes after the user and network settings to have the network
settings applied to the network - Login again and check the output of ifconfig to ensure
that both interfaces are listed
• These values will be set for the OpenvSwitch, in all the participating OpenStack nodes.
301
OpenDaylight User Guide February 21, 2016 Beryllium
• The values of the configuration parameters must be changed based on the user
environment.
• bridgename
• The name of the bridge in Open vSwitch, that will be created by OpenDaylight
Controller.
• It must be "br-int".
• portname
• The name of the port that will be created in the vbridge in Open vSwitch.
• This must be the same name of the interface of OpenStack Nodes which is used for
interconnecting OpenStack Nodes in data plane.(in our case:eth1)
• protocols
• failmode
Start OpenDaylight
• Please install the feature odl-vtn-manager-neutron that provides the integration with
Neutron interface.
feature:install odl-vtn-manager-neutron
Tip
After running OpenDaylight, please ensure OpenDaylight listens to the
ports:6633,6653, 6640 and 8080
Tip
Please allow the ports in firewall for the devstack to be able to communicate
with OpenDaylight.
302
OpenDaylight User Guide February 21, 2016 Beryllium
Note
* 6633/6653 - OpenFlow Ports * 6640 - Open vSwitch Manager Port * 8282 -
Port for REST API
Devstack Setup
VTN Devstack Script
• The local.conf is a user-maintained settings file. This allows all custom settings for
DevStack to be contained in a single file. This file is processed strictly in sequence. The
following datas are needed to be set in the local.conf file:
• Set FLOATING_RANGE to a range not used on the local network, i.e. 192.168.1.224/27.
This configures IP addresses ending in 225-254 to be used as floating IPs.
• Set FLAT_INTERFACE to the Ethernet interface that connects the host to your local
network. This is the interface that should be configured with the static IP address
mentioned above.
• If the *_PASSWORD variables are not set, we will be prompted to enter values during the
execution of stack.sh.
• Set ADMIN_PASSWORD . This password is used for the admin and demo accounts set up
as OpenStack users. We can login to the OpenStack GUI with this credentials only.
• Set the MYSQL_PASSWORD. The default here is a random hex string which is
inconvenient if you need to look at the database directly for anything.
• Set the RABBIT_PASSWORD. This is used by messaging services used by both the nodes.
• Set the service password. This is used by the OpenStack services (Nova, Glance, etc) to
authenticate with Keystone.
DevStack Control
local.conf(control)
#IP Details
HOST_IP=<CONTROL_NODE_MANAGEMENT_IF_IP_ADDRESS>#Please Add The Control Node IP
Address in this line
FLAT_INTERFACE=<FLAT_INTERFACE_NAME>
SERVICE_HOST=$HOST_IP
#Instance Details
MULTI_HOST=1
#config Details
RECLONE=yes #Make it "no" after stacking successfully the first time
VERBOSE=True
LOG_COLOR=True
LOGFILE=/opt/stack/logs/stack.sh.log
SCREEN_LOGDIR=/opt/stack/logs
#OFFLINE=True #Uncomment this after stacking successfully the first time
303
OpenDaylight User Guide February 21, 2016 Beryllium
#Passwords
ADMIN_PASSWORD=labstack
MYSQL_PASSWORD=supersecret
RABBIT_PASSWORD=supersecret
SERVICE_PASSWORD=supersecret
SERVICE_TOKEN=supersecrettoken
ENABLE_TENANT_TUNNELS=false
#Services
disable_service rabbit
enable_service qpid
enable_service quantum
enable_service n-cpu
enable_service n-cond
disable_service n-net
enable_service q-svc
enable_service q-dhcp
enable_service q-meta
enable_service horizon
enable_service quantum
enable_service tempest
ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch,n-novnc,n-cauth,n-
cauth,nova
ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch,c-bak
#ML2 Details
Q_PLUGIN=ml2
Q_ML2_PLUGIN_MECHANISM_DRIVERS=opendaylight
Q_ML2_TENANT_NETWORK_TYPE=local
Q_ML2_PLUGIN_TYPE_DRIVERS=local
disable_service n-net
enable_service q-svc
enable_service q-dhcp
enable_service q-meta
enable_service neutron
enable_service odl-compute
ODL_MGR_IP=<ODL_IP_ADDRESS> #Please Add the ODL IP Address in this line
OVS_PHYSICAL_BRIDGE=br-int
Q_OVS_USE_VETH=True
url=http://<ODL_IP_ADDRESS>:8080/controller/nb/v2/neutron #Please Add the ODL
IP Address in this line
username=admin
password=admin
DevStack Compute
local.conf(compute)
#IP Details
HOST_IP=<COMPUTE_NODE_MANAGEMENT_IP_ADDRESS> #Add the Compute node Management
IP Address
SERVICE_HOST=<CONTROLLEr_NODE_MANAGEMENT_IP_ADDRESS> #Add the cotnrol Node
Management IP Address here
#Instance Details
MULTI_HOST=1
#config Details
RECLONE=yes #Make thgis "no" after stacking successfully once
#OFFLINE=True #Uncomment this line after stacking successfuly first time.
VERBOSE=True
LOG_COLOR=True
LOGFILE=/opt/stack/logs/stack.sh.log
SCREEN_LOGDIR=/opt/stack/logs
304
OpenDaylight User Guide February 21, 2016 Beryllium
#Passwords
ADMIN_PASSWORD=labstack
MYSQL_PASSWORD=supersecret
RABBIT_PASSWORD=supersecret
SERVICE_PASSWORD=supersecret
SERVICE_TOKEN=supersecrettoken
#Services
ENABLED_SERVICES=n-cpu,rabbit,neutron
#ML2 Details
Q_PLUGIN=ml2
Q_ML2_PLUGIN_MECHANISM_DRIVERS=opendaylight
Q_ML2_TENANT_NETWORK_TYPE=local
Q_ML2_PLUGIN_TYPE_DRIVERS=local
enable_service odl-compute
ODL_MGR_IP=<ODL_IP_ADDRESS> #ADD ODL IP address here
OVS_PHYSICAL_BRIDGE=br-int
ENABLE_TENANT_TUNNELS=false
Q_OVS_USE_VETH=True
#Details of the Control node for various services
[[post-config|/etc/neutron/plugins/ml2/ml2_conf.ini]]
Q_HOST=$SERVICE_HOST
MYSQL_HOST=$SERVICE_HOST
RABBIT_HOST=$SERVICE_HOST
GLANCE_HOSTPORT=$SERVICE_HOST:9292
KEYSTONE_AUTH_HOST=$SERVICE_HOST
KEYSTONE_SERVICE_HOST=$SERVICE_HOST
NOVA_VNC_ENABLED=True
NOVNCPROXY_URL="http://<CONTROLLER_NODE_IP_ADDRESS>:6080/vnc_auto.html" #Add
Controller Node IP address
VNCSERVER_LISTEN=$HOST_IP
VNCSERVER_PROXYCLIENT_ADDRESS=$VNCSERVER_LISTEN
305
OpenDaylight User Guide February 21, 2016 Beryllium
306
OpenDaylight User Guide February 21, 2016 Beryllium
KEYSTONE_AUTH_HOST=$SERVICE_HOST
KEYSTONE_SERVICE_HOST=$SERVICE_HOST
[[post-config|/etc/neutron/plugins/ml2/ml2_conf.ini]]
[agent]
minimize_polling=True
Note
We have to comment OFFLINE=TRUE in local.conf files, this will make all the
installations to happen automatically. RECLONE=yes only when we set up the
DevStack environment from scratch.
• Get devstack
• cd devstack
Note
If you want to use stable/kilo Version branch, Please execute the below
command in devstack folder
Note
If you want to use stable/liberty Version branch, Please execute the below
command in devstack folder
• Copy the contents of local.conf for juno (devstack control node) from DevStack Control
and save it as "local.conf" in the "devstack".
• Copy the contents of local.conf for kilo and liberty (devstack control node) from
Devstack Kilo_Liberty Control Node and save it as "local.conf" in the "devstack".
307
OpenDaylight User Guide February 21, 2016 Beryllium
• Execute the command sudo ovs-vsctl show in the control node terminal and verify if the
bridge br-int is created.
• Copy the contents of local.conf for juno (devstack compute node) from DevStack
Compute and save it as "local.conf" in the "devstack".
• Copy the contents of local.conf file for kilo and liberty (devstack compute node) from
Devstack Kilo_Liberty Compute Node and save it as "local.conf" in the "devstack".
• Execute the command sudo ovs-vsctl show in the control node terminal and verify if the
bridge br-int is created.
• The output of the ovs-vsctl show will be similar to the one seen in control node.
Additional Verifications
• Please visit the OpenDaylight DLUX GUI after stacking all the nodes, http://
<ODL_IP_ADDRESS>:8181/dlux/index.html. The switches, topology and the ports that
are currently read can be validated.
Tip
If the interconnected between the Open vSwitch is not seen, Please bring up
the interface for the dataplane manually using the below comamnd
ifup <interface_name>
308
OpenDaylight User Guide February 21, 2016 Beryllium
Tip
Some versions of Open vSwitch, drop packets when there is a table-miss, So
please add the below flow to all the nodes with Open vSwitch version (>=2.1)
Tip
Please Accept Promiscuous mode in the networks involving the interconnect.
Enter the value for User Name as admin and enter the value for Password as labstack.
309
OpenDaylight User Guide February 21, 2016 Beryllium
• We should first ensure both the hypervisors(control node and compute node) are
mapped under hypervisors by clicking on Hpervisors tab.
310
OpenDaylight User Guide February 21, 2016 Beryllium
311
OpenDaylight User Guide February 21, 2016 Beryllium
• Create a sub network by giving Network Address and click Next button .
312
OpenDaylight User Guide February 21, 2016 Beryllium
• Specify the additional details for subnetwork (please refer the image for your reference).
313
OpenDaylight User Guide February 21, 2016 Beryllium
• Create VM Instance
314
OpenDaylight User Guide February 21, 2016 Beryllium
315
OpenDaylight User Guide February 21, 2016 Beryllium
• Click on Details tab to enter the VM details.For this demo we are creating Ten
VM’s(instances).
• In the Networking tab, we must select the network,for this we need to drag and drop
the Available networks to Selected Networks (i.e.,) Drag vtn1 we created from Available
networks to Selected Networks and click Launch to create the instances.
316
OpenDaylight User Guide February 21, 2016 Beryllium
317
OpenDaylight User Guide February 21, 2016 Beryllium
• Click on any VM displayed in the Instances tab and click the Console tab.
318
OpenDaylight User Guide February 21, 2016 Beryllium
319
OpenDaylight User Guide February 21, 2016 Beryllium
• Please visit the DLUX GUI to list the new nodes in every switch.
References
• http://devstack.org/guides/multinode-lab.html
• https://wiki.opendaylight.org/view/File:Vtn_demo_hackfest_2014_march.pdf
320
OpenDaylight User Guide February 21, 2016 Beryllium
Requirements
• Configure mininet and create a topology:
• mininet> net
Configuration
• Create a Controller
321
OpenDaylight User Guide February 21, 2016 Beryllium
• Create a VTN
Verification
Please verify whether the Host1 and Host3 are pinging. * Send packets from Host1 to Host3
|mininet> h1 ping h3
322
OpenDaylight User Guide February 21, 2016 Beryllium
Requirements
• Configure multiple controllers using the mininet script given below: https://
wiki.opendaylight.org/view/OpenDaylight_Virtual_Tenant_Network_%28VTN
%29:Scripts:Mininet#Network_with_Multiple_Paths_for_delivering_packets
Configuration
• Create a VTN
• Create two vBridges in the VTN like, vBridge1 in Controller1 and vBridge2 in Controller2
323
OpenDaylight User Guide February 21, 2016 Beryllium
Verification
Please verify whether Host h2 and Host h6 are pinging. * Send packets from h2 to h6
mininet> h2 ping h6
324
OpenDaylight User Guide February 21, 2016 Beryllium
Requirements
• Save the mininet script given below as vlan_vtn_test.py and run the mininet script in the
mininet environment where Mininet is installed.
Mininet Script
https://wiki.opendaylight.org/view/
OpenDaylight_Virtual_Tenant_Network_(VTN):Scripts:Mininet#Network_with_hosts_in_different_vlan
Configuration
Please follow the below steps to test a vlan map using mininet: * Create a controller
curl --user admin:adminpass -H 'content-type: application/json' -X POST -
d '{"controller": {"controller_id": "controllerone", "ipaddr":"10.0.0.2",
"type": "odc", "version": "1.0", "auditstatus":"enable"}}' http://127.0.0.
1:8083/vtn-webapi/controllers
• Create a VTN
325
OpenDaylight User Guide February 21, 2016 Beryllium
• Create a vBridge(vBridge1)
Verification
Ping all in mininet environment to view the host reachability.
mininet> pingall
Ping: testing ping reachability
h1 -> X h3 X h5 X
h2 -> X X h4 X h6
h3 -> h1 X X h5 X
h4 -> X h2 X X h6
h5 -> h1 X h3 X X
h6 -> X h2 X h4 X
326
OpenDaylight User Guide February 21, 2016 Beryllium
Requirement
• Configure mininet and create a topology:
• Generate traffic by pinging between hosts h1 and h2 after configuring the portmaps
respectively
mininet> h1 ping h2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_req=1 ttl=64 time=16.7 ms
64 bytes from 10.0.0.2: icmp_req=2 ttl=64 time=13.2 ms
Configuration
Create Controller.
curl -v --user admin:adminpass -H 'content-type: application/json' -X POST -
d '{"controller": {"controller_id": "controllerone", "ipaddr":"10.100.9.61",
"type": "odc", "version": "1.0", "auditstatus":"enable"}}' http://127.0.0.
1:8083/vtn-webapi/controllers.json
Create a VTN.
curl -v --user admin:adminpass -H 'content-type: application/json' -X POST -
d '{"vtn" : {"vtn_name":"vtn1","description":"test VTN" }}' http://127.0.0.
1:8083/vtn-webapi/vtns.json
327
OpenDaylight User Guide February 21, 2016 Beryllium
Verification
curl -v -X GET -H 'content-type: application/json' -H 'username: admin'
-H 'password: adminpass' "http://127.0.0.1:8083/vtn-webapi/vtnstations?
controller_id=controllerone&vtn_name=vtn1"
{
"vtnstations": [
{
"domain_id": "(DEFAULT)",
"interface": {},
"ipaddrs": [
"10.0.0.2"
],
"macaddr": "b2c3.06b8.2dac",
"no_vlan_id": "true",
"port_name": "s2-eth2",
"station_id": "178195618445172",
"switch_id": "00:00:00:00:00:00:00:02",
"vnode_name": "vBridge1",
"vnode_type": "vbridge",
"vtn_name": "vtn1"
},
{
"domain_id": "(DEFAULT)",
"interface": {},
"ipaddrs": [
328
OpenDaylight User Guide February 21, 2016 Beryllium
"10.0.0.1"
],
"macaddr": "ce82.1b08.90cf",
"no_vlan_id": "true",
"port_name": "s1-eth1",
"station_id": "206130278144207",
"switch_id": "00:00:00:00:00:00:00:01",
"vnode_name": "vBridge1",
"vnode_type": "vbridge",
"vtn_name": "vtn1"
}
]
}
Configuration
The same Configuration as Vlan Mapping Example(https://wiki.opendaylight.org/view/
OpenDaylight_Virtual_Tenant_Network_(VTN):VTN_Coordinator:RestApi:How_to_test_vlan-
map_in_Mininet_environment)
Verification
Get the VTN Dataflows information
{
"dataflows": [
{
"controller_dataflows": [
{
"controller_id": "controllerone",
"controller_type": "odc",
"egress_domain_id": "(DEFAULT)",
"egress_port_name": "s3-eth3",
"egress_station_id": "3",
"egress_switch_id": "00:00:00:00:00:00:00:03",
"flow_id": "29",
"ingress_domain_id": "(DEFAULT)",
"ingress_port_name": "s2-eth2",
"ingress_station_id": "2",
"ingress_switch_id": "00:00:00:00:00:00:00:02",
"match": {
"macdstaddr": [
"4298.0959.0e0b"
],
"macsrcaddr": [
"924c.e4a3.a743"
],
"vlan_id": [
329
OpenDaylight User Guide February 21, 2016 Beryllium
"300"
]
},
"pathinfos": [
{
"in_port_name": "s2-eth2",
"out_port_name": "s2-eth1",
"switch_id": "00:00:00:00:00:00:00:02"
},
{
"in_port_name": "s1-eth2",
"out_port_name": "s1-eth3",
"switch_id": "00:00:00:00:00:00:00:01"
},
{
"in_port_name": "s3-eth1",
"out_port_name": "s3-eth3",
"switch_id": "00:00:00:00:00:00:00:03"
}
]
}
],
"reason": "success"
}
]
}
Action Function
Pass Permits the packet to pass. As options, packet transfer
priority (set priority) and DSCP change (se t ip-dscp) is
specified.
Drop Discards the packet.
Redirect Redirects the packet to a desired virtual interface. As an
option, it is possible to change the MAC address when the
packet is transferred.
330
OpenDaylight User Guide February 21, 2016 Beryllium
• If the packet matches the condition, the flow-filter applies the flow-list matching action
specified in the flow-filter.
Requirements
To apply the packet filter, configure the following:
• Specify where to apply the flow-filter, for example VTN, vBridge, or interface of vBridge.
331
OpenDaylight User Guide February 21, 2016 Beryllium
h4 h4-eth0:s3-eth2
Configuration
• .Create a controller
• Create a VTN
• Create Flowlist
• Create Flowlistentry
332
OpenDaylight User Guide February 21, 2016 Beryllium
Verification
As we have applied the action type "drop" , ping should fail.
mininet> h1 ping h3
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
From 10.0.0.1 icmp_seq=1 Destination Host Unreachable
From 10.0.0.1 icmp_seq=2 Destination Host Unreachable
In controller you can see the DROP action type information as below, here action as DROP.
osgi> readflows 0000000000000003
[FlowOnNode[flow =Flow[match = Match [fields={DL_VLAN=DL_VLAN(0), IN_PORT=
IN_PORT(OF|1@OF|00:00:00:00:00:00:00:03), DL_DST=DL_DST(4e:08:1d:a6:05:08),
DL_SRC=DL_SRC(be:15:00:a4:96:13)}, matches=15], actions = [DROP],
priority = 10, id = 0, idleTimeout = 0, hardTimeout = 300], tableId =
0, sec = 18, nsec = 475000000, pkt = 20, byte = 1232], FlowOnNode[flow
=Flow[match = Match [fields={DL_VLAN=DL_VLAN(0), IN_PORT=IN_PORT(OF|
3@OF|00:00:00:00:00:00:00:03), DL_DST=DL_DST(be:15:00:a4:96:13), DL_SRC=
DL_SRC(4e:08:1d:a6:05:08)}, matches=15], actions = [OUTPUT[OF|1@OF|
00:00:00:00:00:00:00:03]], priority = 10, id = 0, idleTimeout = 0, hardTimeout
= 0], tableId = 0, sec = 18, nsec = 489000000, pkt = 10, byte = 812]]
Verification
mininet> h1 ping h3
PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data.
64 bytes from 10.0.0.3: icmp_req=1 ttl=64 time=0.984 ms
64 bytes from 10.0.0.3: icmp_req=2 ttl=64 time=0.110 ms
64 bytes from 10.0.0.3: icmp_req=3 ttl=64 time=0.098 ms
333
OpenDaylight User Guide February 21, 2016 Beryllium
In controller you can see the PASS action type information by executing the following
command:
osgi> readflows 0000000000000003
Requirement
• Save the mininet script given below as pathmap_test.py and run the mininet script in the
mininet environment where Mininet is installed.
334
OpenDaylight User Guide February 21, 2016 Beryllium
mininet> net
c0
s1 lo: s1-eth1:h1-eth0 s1-eth2:s2-eth1 s1-eth3:s4-eth1
s2 lo: s2-eth1:s1-eth2 s2-eth2:s3-eth1
s3 lo: s3-eth1:s2-eth2 s3-eth2:s4-eth2 s3-eth3:h2-eth0
s4 lo: s4-eth1:s1-eth3 s4-eth2:s3-eth2
h1 h1-eth0:s1-eth1
h2 h2-eth0:s3-eth3
• Generate traffic by pinging between hosts h1 and h2 before creating the portmaps
respectively
mininet> h1 ping h2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
From 10.0.0.1 icmp_seq=1 Destination Host Unreachable
From 10.0.0.1 icmp_seq=2 Destination Host Unreachable
From 10.0.0.1 icmp_seq=3 Destination Host Unreachable
From 10.0.0.1 icmp_seq=4 Destination Host Unreachable
Configuration
• Create Controller
• Create a VTN
335
OpenDaylight User Guide February 21, 2016 Beryllium
• Generate traffic by pinging between hosts h1 and h2 after creating the portmaps
respectively
mininet> h1 ping h2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_req=1 ttl=64 time=36.4 ms
64 bytes from 10.0.0.2: icmp_req=2 ttl=64 time=0.880 ms
64 bytes from 10.0.0.2: icmp_req=3 ttl=64 time=0.073 ms
64 bytes from 10.0.0.2: icmp_req=4 ttl=64 time=0.081 ms
Verification
• Before applying Path policy information in the VTN
336
OpenDaylight User Guide February 21, 2016 Beryllium
"pathinfos": [
{
"in_port_name": "s1-eth1",
"out_port_name": "s1-eth2",
"switch_id": "00:00:00:00:00:00:00:01"
},
{
"in_port_name": "s2-eth1",
"out_port_name": "s2-eth2",
"switch_id": "00:00:00:00:00:00:00:02"
},
{
"in_port_name": "s3-eth1",
"out_port_name": "s3-eth3",
"switch_id": "00:00:00:00:00:00:00:03"
}
]
}
{
"pathinfos": [
{
"in_port_name": "s1-eth1",
"out_port_name": "s1-eth3",
"switch_id": "00:00:00:00:00:00:00:01"
},
{
"in_port_name": "s4-eth1",
"out_port_name": "s4-eth2",
"switch_id": "00:00:00:00:00:00:00:04"
},
{
"in_port_name": "s3-eth2",
"out_port_name": "s3-eth3",
"switch_id": "00:00:00:00:00:00:00:03"
}
]
}
• VTN Coordinator.
• VTN Manager.
337
OpenDaylight User Guide February 21, 2016 Beryllium
and installs flow entries into OpenFlow switches to provide VTN Coordinator with virtual
network functions. The requirements for installing these two are different.Therefore, we
recommend that you install VTN Manager and VTN Coordinator in different machines.
After executing db_setup, you have encountered the error "Failed to setup database"?
The user who owns /usr/local/vtn/ directory and installs VTN Coordinator, can only start
db_setup. Example :
The directory should appear as below (assuming the user as "vtn"):
# ls -l /usr/local/
drwxr-xr-x. 12 vtn vtn 4096 Mar 14 21:53 vtn
If the user doesnot own /usr/local/vtn/ then, please run the below command
(assuming the username as vtn),
chown -R vtn:vtn /usr/local/vtn
• If the above steps do not solve the problem, please refer to the log file for the exact
problem
• Run the below command ensure the Coordinator daemons are running.
• Issue the curl command to fetch version and ensure the process is able to respond.
338
OpenDaylight User Guide February 21, 2016 Beryllium
How to debug a startup failure? The following activities take place in order during
startup
• Database server is started after setting virtual memory to required value,Any database
startup errors will be reflected in any of the below logs.
/usr/local/vtn/var/dbm/unc_db_script.log.
/usr/local/vtn/var/db/pg_log/postgresql-*.log (the pattern will have
the date)
• uncd daemon is kicked off, The daemon in turn kicks off the rest of the daemons.
After setting up the apache tomcat server, what are the aspects that should be
checked.
Please check if catalina is running.
The command ps -ef | grep catalina | grep -v grep should list a catalina
process
If you encounter an erroneous situation where the REST API is always failing.
Please ensure the firewall settings for port:8282(Lithium release) or
port:8083(Post Lithium release) and enable the same.
How to debug a REST API returning a failure message? Please check the /usr/share/
java/apache-tomcat-7.0.39/logs/core/core.log for failure details.
REST API for VTN configuration fails, how to debug? The default log level for all
daemons is "INFO", to debug the situation TRACE or DEBUG logs may be needed. To
increase the log level for individual daemons, please use the commands suggested below
/usr/local/vtn/bin/lgcnw_control loglevel trace -- upll daemon log
/usr/local/vtn/bin/phynw_control loglevel trace -- uppl daemon log
/usr/local/vtn/bin/unc_control loglevel trace -- uncd daemon log
/usr/local/vtn/bin/drvodc_control loglevel trace -- Driver daemon log
After setting the log levels, the operation can be repeated and the log files can be referred
for debugging.
Problems while Installing PostgreSQL due to openssl. Errors may occur when trying
to install postgreSQL rpms. Recently PostgreSQL has upgraded all their binaries to use
the latest openssl versions with fix for http://en.wikipedia.org/wiki/Heartbleed Please
upgrade the openssl package to the latest version and re-install. For RHEL 6.1/6.4 : If you
have subscription, Please use the same and update the rpms. The details are available in the
following link https://access.redhat.com/site/solutions/781793 ACCESS-REDHAT
rpm -Uvh http://mirrors.kernel.org/centos/6/os/x86_64/Packages/openssl-1.0.
1e-15.el6.x86_64.rpm
rpm -ivh http://mirrors.kernel.org/centos/6/os/x86_64/Packages/openssl-
devel-1.0.1e-15.el6.x86_64.rpm
For other linux platforms, Please do yum update, the public respositroes will have the latest
openssl, please install the same.
339
OpenDaylight User Guide February 21, 2016 Beryllium
• A SCVMM with VSEM Provider installed and a running VTN Coordinator and
OpenDaylight with VTN Feature installed.
• PF1000 virtual switch extension has been installed in the two Hyper-V servers as it
implements the OpenFlow capability in Hyper-V.
340
OpenDaylight User Guide February 21, 2016 Beryllium
• SCVMM
• VTN Coordinator
VTN Coordinator
OpenDaylight VTN as Network Service provider for SCVMM where VSEM provider is added
in the Network Service which will handle all requests from SCVMM and communicate
with the VTN Coordinator. It is used to manage the network virtualization provided by
OpenDaylight.
• Enter the command "yum install apr" in VTN Coordinator installed machine.
• Extract tomcat under "/usr/share/java" by using the below command "tar -xvf apache-
tomcat-7.0.56.tar.gz –C /usr/share/java".
Note
Please go through the bleow link to download apache-tomcat-7.0.56.tar.gz file,
https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.56/bin/
• Execute the following command "openssl req -x509 -days 365 -extensions v3_ca -newkey
rsa:2048 –out /etc/pki/CA/cacert.pem –keyout /etc/pki/CA/private/cakey.pem" in a
single line.
341
OpenDaylight User Guide February 21, 2016 Beryllium
Argument Description
Country Name Specify the country code. For example, JP
State or Province Name Specify the state or province. For example, Tokyo
Locality Name Locality Name For example, Chuo-Ku
Organization Name Specify the company.
Organizational Unit Name Specify the department, division, or the like.
Common Name Specify the host name.
Email Address Specify the e-mail address.
• Execute the following commands: "touch /etc/pki/CA/index.txt" and "echo 00 > /etc/pki/
CA/serial" in server after setting your CA’s private key.
• Execute the following command "openssl req -new -newkey rsa:2048 -out csr.pem –
keyout /usr/local/vtn/tomcat/conf/key.pem" in a single line.
• Enter the PEM pass phrase: Same password you have given in CA’s private key PEM pass
phrase.
Argument Description
Country Name Specify the country code. For example, JP
State or Province Name Specify the state or province. For example, Tokyo
Locality Name Locality Name For example, Chuo-Ku
Organization Name Specify the company.
Organizational Unit Name Specify the department, division, or the like.
Common Name Specify the host name.
Email Address Specify the e-mail address.
A challenge password Specify the challenge password.
An optional company name Specify an optional company name.
• Enter pass phrase for /etc/pki/CA/private/cakey.pem: Same password you have given in
CA’s private key PEM pass phrase.
• Open the server.xml file using "vim /usr/local/vtn/tomcat/conf/server.xml" and add the
below lines.
<Connector port="${vtn.port}" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
SSLCertificateFile="/usr/local/vtn/tomcat/conf/cert.pem"
SSLCertificateKeyFile="/usr/local/vtn/tomcat/conf/key.pem"
342
OpenDaylight User Guide February 21, 2016 Beryllium
SSLPassword=same password you have given in CA's private key PEM pass phrase
connectionTimeout="20000" />
• Copy the created CA certificate from cacert.pem to cacert.crt by using the following
command,
openssl x509 –in /etc/pki/CA/cacert.pem –out cacert.crt
• You can check the HTTP connection by using the following command:
curl -X GET -H 'contenttype:application/json' -H 'username:admin' -
H 'password:adminpass' http://<server IP address>:8083/vtn-webapi/
api_version.json
• You can check the HTTPS connection by using the following command:
curl -X GET -H 'contenttype:application/json' -H 'username:admin' -
H 'password:adminpass' https://<server IP address>:8083/vtn-webapi/
api_version.json --cacert /etc/pki/CA/cacert.pem
• The response should be like this for both HTTP and HTTPS:
{"api_version":{"version":"V1.2"}}
343
OpenDaylight User Guide February 21, 2016 Beryllium
• Failover Clustering
• Live Migration
Failover Clustering
A single Hyper-V can host a number of virtual machines. If the host were to fail then all of
the virtual machines that are running on it will also fail, thereby resulting in a major outage.
Failover clustering treats individual virtual machines as clustered resources. If a host were to
fail then clustered virtual machines are able to fail over to a different Hyper-V server where
they can continue to run.
Live Migration
Live Migration is used to migrate the running virtual machines from one Hyper-V server to
another Hyper-V server without any interruptions. Please go through the below video for
more details,
• https://youtu.be/34YMOTzbNJM
344
OpenDaylight User Guide February 21, 2016 Beryllium
345
OpenDaylight User Guide February 21, 2016 Beryllium
Table of Contents
Overview ..................................................................................................................... 346
Southbound (netconf-connector) ................................................................................. 346
Northbound (NETCONF servers) .................................................................................. 353
NETCONF testtool ....................................................................................................... 355
Overview
NETCONF is an XML based protocol used for configuration and monitoring of devices in the
network. The base NETCONF protocol is described in RFC-6241.
Southbound (netconf-connector)
NETCONF southbound plugin is capable of connecting to remote NETCONF devices and
expose their configuration/operational datastores, rpcs and notifications as MD-SAL mount
points. These mount points allow applications and remote users (over RESTCONF) to
interact with the mounted devices.
• RFC-6241,
• RFC-5277,
• RFC-6022,
Tip
NETCONF southbound can be activated by installing odl-netconf-
connector-all Karaf feature.
Netconf-connector configuration
There are 2 ways for configuring netconf-connector (as is for any other module) NETCONF
or RESTCONF. This guide focuses on using RESTCONF.
Default configuration
The default configuration contains all the necessary dependencies (file: 01-netconf.xml) and
a single instance of netconf-connector (file: 99-netconf-connector.xml) called controller-
346
OpenDaylight User Guide February 21, 2016 Beryllium
1. OpenDaylight is running
2. In Karaf, you must have the netconf-connector installed (at the Karaf prompt, type:
feature:install odl-netconf-connector-all); the loopback NETCONF mountpoint will be
automatically configured and activated
POST http://localhost:8181/restconf/config/network-topology:network-topology/
topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules
347
OpenDaylight User Guide February 21, 2016 Beryllium
</binding-registry>
<dom-registry xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-broker-
osgi-registry</type>
<name>dom-broker</name>
</dom-registry>
<client-dispatcher xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:config:netconf">prefix:netconf-
client-dispatcher</type>
<name>global-netconf-dispatcher</name>
</client-dispatcher>
<processing-executor xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:threadpool">prefix:threadpool</
type>
<name>global-netconf-processing-executor</name>
</processing-executor>
<keepalive-executor xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:threadpool">prefix:scheduled-
threadpool</type>
<name>global-netconf-ssh-scheduled-executor</name>
</keepalive-executor>
</module>
This spawns a new netconf-connector which tries to connect to (or mount) a NETCONF
device at 127.0.0.1 and port 830. You can check the configuration of config-subsystem’s
configuration datastore. The new netconf-connector will now be present there. Just invoke:
GET http://localhost:8181/restconf/config/network-topology:network-topology/topology/
topology-netconf/node/controller-config/yang-ext:mount/config:modules
Right after the new netconf-connector is created, it writes some useful metadata into the
datastore of MD-SAL under the network-topology subtree. This metadata can be found at:
GET http://localhost:8181/restconf/operational/network-topology:network-topology/
Information about connection status, device capabilities etc. can be found there.
348
OpenDaylight User Guide February 21, 2016 Beryllium
1. NETCONF device does not support ietf-netconf-monitoring but it does list all its YANG
models as capabilities in HELLO message
This could be a device that internally uses only ietf-inet-types YANG model with revision
2010-09-24. In the HELLO message that is sent from this device there is this capability
reported:
urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=
2010-09-24
For such devices you only need to put the schema into folder cache/schema inside your
Karaf distribution.
Important
The file with YANG schema for ietf-inet-types has to be called ietf-inet-
[email protected]. It is the required naming format of the cache.
2. NETCONF device does not support ietf-netconf-monitoring and it does NOT list its
YANG models as capabilities in HELLO message
Compared to device that lists its YANG models in HELLO message, in this case there
would be no capability with ietf-inet-types in the HELLO message. This type of device
basically provides no information about the YANG schemas it uses so its up to the user of
OpenDaylight to properly configure netconf-connector for this device.
Remember to also put the YANG schemas into the cache folder.
Note
For putting multiple capabilities, you just need to replicate the capability xml
element inside yang-module-capability element. Capability element is modeled
as a leaf-list. With this configuration, we would make the remote device report
usage of ietf-inet-types in the eyes of netconf-connector.
349
OpenDaylight User Guide February 21, 2016 Beryllium
configuration for the brand new netconf-connector after it was spawned. Using one
RESTCONF request, we will change both username and password for the netconf-
connector.
PUT http://localhost:8181/restconf/config/network-topology:network-topology/topology/
topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-
netconf-connector-cfg:sal-netconf-connector/new-netconf-device
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">prefix:sal-
netconf-connector</type>
<name>new-netconf-device</name>
<username xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">bob</
username>
<password xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">passwd</
password>
<tcp-only xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">false</
tcp-only>
<event-executor xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:netty">prefix:netty-event-
executor</type>
<name>global-event-executor</name>
</event-executor>
<binding-registry xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-
broker-osgi-registry</type>
<name>binding-osgi-broker</name>
</binding-registry>
<dom-registry xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-broker-
osgi-registry</type>
<name>dom-broker</name>
</dom-registry>
<client-dispatcher xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:config:netconf">prefix:netconf-
client-dispatcher</type>
<name>global-netconf-dispatcher</name>
</client-dispatcher>
<processing-executor xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:threadpool">prefix:threadpool</
type>
<name>global-netconf-processing-executor</name>
</processing-executor>
350
OpenDaylight User Guide February 21, 2016 Beryllium
<keepalive-executor xmlns=
"urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
<type xmlns:prefix=
"urn:opendaylight:params:xml:ns:yang:controller:threadpool">prefix:scheduled-
threadpool</type>
<name>global-netconf-ssh-scheduled-executor</name>
</keepalive-executor>
</module>
Since a PUT is a replace operation, the whole configuration must be specified along with
the new values for username and password. This should result in a 2xx response and
the instance of netconf-connector called new-netconf-device will be reconfigured to use
username bob and password passwd. New configuration can be verified by executing:
GET http://localhost:8181/restconf/config/network-topology:network-topology/topology/
topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-
netconf-connector-cfg:sal-netconf-connector/new-netconf-device
With new configuration, the old connection will be closed and a new one established.
DELETE http://localhost:8181/restconf/config/network-topology:network-topology/
topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/
module/odl-sal-netconf-connector-cfg:sal-netconf-connector/new-netconf-device
The last element of the URL is the name of the instance and its predecessor is the type of
that module (In our case the type is sal-netconf-connector and name new-netconf-device).
The type and name are actually the keys of the module list.
Netconf-connector utilisation
Once the connector is up and running, users can utilize the new Mount point instance. By
using RESTCONF or from their application code. This chapter deals with using RESTCONF
and more information for app developers can be found in the developers guide or in the
official tutorial application ncmount that can be found in the coretutorials project:
• https://github.com/opendaylight/coretutorials/tree/stable/lithium/ncmount
GET http://localhost:8080/restconf/operational/network-topology:network-topology/
topology/topology-netconf/node/new-netconf-device/yang-ext:mount/
This will return the entire content of operation datastore from the device. To view just the
configuration datastore, change operational in this URL to config.
351
OpenDaylight User Guide February 21, 2016 Beryllium
POST http://localhost:8181/restconf/config/network-topology:network-topology/
topology/topology-netconf/node/new-netconf-device/yang-ext:mount/Cisco-IOS-XR-ifmgr-
cfg:interface-configurations
<interface-configuration xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-
cfg">
<active>act</active>
<interface-name>mpls</interface-name>
<description>Interface description</description>
<bandwidth>32</bandwidth>
<link-status></link-status>
</interface-configuration>
Tip
This call is transformed into a couple of NETCONF RPCs. Resulting
NETCONF RPCs that go directly to the device can be found
in the OpenDaylight logs after invoking log:set TRACE
org.opendaylight.controller.sal.connect.netconf in the Karaf
shell. Seeing the NETCONF RPCs might help with debugging.
This request is very similar to the one where we spawned a new netconf device. That’s
because we used the loopback netconf-connector to write configuration data into config-
subsystem datastore and config-subsystem picked it up from there.
POST http://localhost:8181/restconf/operations/network-topology:network-topology/
topology/topology-netconf/node/new-netconf-device/yang-ext:mount/ietf-netconf-
monitoring:get-schema
<input xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
<identifier>ietf-yang-types</identifier>
<version>2013-07-15</version>
</input>
This call should fetch the source for ietf-yang-types YANG model from the mounted device.
Netconf-connector + Netopeer
Netopeer (an open-source NETCONF server) can be used for testing/exploring NETCONF
southbound in OpenDaylight.
352
OpenDaylight User Guide February 21, 2016 Beryllium
Netopeer installation
Docker container with netopeer will be used in this guid. To install docker and start the
netopeer image perform following steps:
3. Verify netopeer is running by invoking (netopeer should send its HELLO message right
away:
ssh root@localhost -p 1831 -s netconf
(password root)
Now just follow the chapter: Spawning netconf-connector. In the payload change the:
• ip to localhost
• port to 1831.
After netopeer is mounted successfully, its configuration can be read using RESTCONF by
invoking:
GET http://localhost:8181/restconf/config/network-topology:network-topology/topology/
topology-netconf/node/netopeer/yang-ext:mount/
• Serves as an alternative interface for MD-SAL (besides RESTCONF) and allows users
to read/write data from MD-SAL’s datastore and to invoke its rpcs (NETCONF
notifications are not available in the Lithium release of OpenDaylight)
353
OpenDaylight User Guide February 21, 2016 Beryllium
Note
The reason for having 2 NETCONF servers is that config-subsystem and MD-SAL
are 2 different components of OpenDaylight and require different approach
for NETCONF message handling and data translation. These 2 components will
probably merge in the future.
• RFC-6241,
• RFC-5277,
• RFC-6470
• RFC-6022,
• RFC-6241,
• RFC-6022,
Tip
Install NETCONF northbound for MD-SAL by installing feature: odl-netconf-
mdsal in karaf. Default binding port is 2830.
Configuration
The default configuration can be found in file: 08-netconf-mdsal.xml. The file contains the
configuration for all necessary dependencies and a single SSH endpoint starting on port
354
OpenDaylight User Guide February 21, 2016 Beryllium
2830. There is also a (by default disabled) TCP endpoint. It is possible to start multiple
endpoints at the same time either in the initial configuration file or while OpenDaylight is
running.
The credentials for SSH endpoint can also be configured here, the defaults are admin/
admin. Credentials in the SSH endpoint are not yet managed by the centralized AAA
component and have to be configured separately.
The server will respond by sending its HELLO message and can be used as a regular
NETCONF server from now on.
Now the MD-SAL’s datastore can be read over RESTCONF via NETCONF by invoking:
GET http://localhost:8181/restconf/operational/network-topology:network-topology/
topology/topology-netconf/node/controller-mdsal/yang-ext:mount
Note
This might not seem very useful, since MD-SAL can be accessed directly
from RESTCONF or from Application code, but the same method can be
used to mount and control other OpenDaylight instances by the "master
OpenDaylight".
NETCONF testtool
NETCONF testtool is a set of standalone runnable jars that can:
These jars are part of OpenDaylight’s controller project and are built from the NETCONF
codebase in OpenDaylight.
Tip
Download testtool from OpenDaylight Nexus at: http://
nexus.opendaylight.org/#nexus-search;quick~netconf-testtool
355
OpenDaylight User Guide February 21, 2016 Beryllium
Tip
Each executable tool provides help. Just invoke java -jar <name-of-the-
tool.jar> --help
356
OpenDaylight User Guide February 21, 2016 Beryllium
35. YANG-PUSH
Table of Contents
Overview ..................................................................................................................... 357
YANG-PUSH Architecture ............................................................................................. 358
YANG-PUSH Catalog .................................................................................................... 358
YANG-PUSH Workload Manager .................................................................................. 358
Configuring YANG-PUSH Workload Manager ............................................................... 358
Administering YANG-PUSH Workload Manager ........................................................... 359
Tutorials ...................................................................................................................... 359
This section describes how to use the YANG-PUSH feature in OpenDaylight and contains
contains configuration, administration, and management sections for the feature.
Overview
YANG PUBSUB project allows applications to place subscriptions upon targeted subtrees of
YANG datastores residing on remote devices. Changes in YANG objects within the remote
subtree can be pushed to an OpenDaylight MD-SAL and to the application as specified
without a requiring the controller to make a continuous set of fetch requests.
Support for static subscriptions: This will enable the receipt of subscription updates pushed
from publishing devices where no signaling from the controller has been used to establish
the subscriptions.
357
OpenDaylight User Guide February 21, 2016 Beryllium
Support for additional transports: NETCONF is not the only transport of interest to
OpenDaylight or the subscribed devices. Over time this code will support Restconf
and HTTP/2 transport requirements defined in {netconf-restconf-yang-push} [https://
tools.ietf.org/html/draft-voit-netconf-restconf-yang-push-01]
YANG-PUSH Architecture
The code architecture of Yang push consists of two main elements
The YANGPUSH Listener accepts update notifications from a device after they
have been de-encapsulated from the NETCONF transport. The YANGPUSH Listener
then passes these updates to MD-SAL. This function is implemented via the
YangpushDOMNotificationListener class within the “org.opendaylight.yangpush.listner”
Java package. Applications should monitor MD-SAL for the availability of newly pushed
subscription updates.
YANG-PUSH Catalog
The NF Catalog contains metadata describing a NF.
358
OpenDaylight User Guide February 21, 2016 Beryllium
Tutorials
Below are tutorials for YANG-PUSH.
Overview
TBD: An overview of the YANG-PUSH Catalog tutorial
Prerequisites
TBD: Provide any prerequisite information, assumed knowledge, or environment required
to execute the use case.
Target Environment
There are no topology requirement for using YANG-PUSH. A single node able interact
as per https://tools.ietf.org/html/draft-ietf-netconf-yang-push-00 is sufficient to use this
capability.
Instructions
TBD: Step by step procedure for using YANG-PUSH Catalog.
Overview
TBD: An overview of the YANG-PUSH Workload Manager tutorial
Prerequisites
TBD: Provide any prerequisite information, assumed knowledge, or environment required
to execute the use case.
Target Environment
TBD: Include any topology requirement for the use case.
359
OpenDaylight User Guide February 21, 2016 Beryllium
Instructions
TBD: Step by step procedure for using YANG-PUSH Workload Manager.
360