-
Notifications
You must be signed in to change notification settings - Fork 2
SERM_configuration
The SE-RM configuration can be changed in set of files in ''conf/'' directory. Below the description of each configuration file is given.
This configuration file contains a list of ports on Stitching Element that are under SE-RM management. For each port the VLANs that take part in translating can be specified or alternatively, the remote endpoint label of static link. Besides, the transport VLAN setting can be chosen (QinQ, VLAN translation). The configuration also contains SE-RM Rspec specific parameters like, URN identifiers or link capacity. Please note that this configuration is a YAML file and suggested syntax for YAML files is to use two spaces for indentation however YAML follows whatever indentation system is employed. In the following an example configuration file is presented.
organisation: psnc
dpid: 00:00:00:00:00:00:00:01
vlan_trans: true
qinq: false
capacity: 1G
interfaces:
"1":
remote_endpoints:
-
name: urn:publicid:IDN+fms:i2cat:tnrm+stp+urn:publicid:IDN+openflow:ocf:i2cat:ofam+datapath+00:10:00:00:00:00:00:05_10
type: vlan_trans
vlans:
- 1000
"2":
remote_endpoints:
-
name: urn:publicid:IDN+openflow:ocf:i2cat:ofam+datapath+00:10:00:00:00:00:00:05_6
type: static_link
vlans:
- 1001
-
flask.conf
This file contains the properties of the FLASK XML-RPC Server [Flask] like IP address, port or debug mode.
[general]
host = 0.0.0.0
port = 8447
debug = True
[fcgi]
# Development server
enabled = False
port = 8450
[certificates]
force_client_certificate = True
-
geniv3.conf
This file contains parameters of the RSpec validation mode and directory to the certificates.
[general]
rspec_validation = True
[certificates]
cert_root = cert/trusted
-
log.conf
This file contains the Logger parameters like logging format, level or output filename.
[general]
name = stitching-entity
level = logging.DEBUG
format = %(asctime)s [%(levelname)s] - %(message)s
file = stitching-entity.log
The SE-RM can be tested as a standalone application without RO thanks to compatibilty with a 3rd party command line tool Omni [Omni]. This tool is shipped with GENI Control Framework (GCF) software package and allows to communicate with all FELIX RMs to make list the resources or make the reservations. To use the Omni tool the Clearing House (CH) should be installed and deployed. In addition, the certificate keys should be exchanged between the Clearing House, Omni and SE-RM.
To list resources from running SE-RM enter the Omni directory and run command:
$ python src/omni.py -o -a https://127.0.0.1:8447/xmlrpc/geni/3/ -V 3 --debug \
-c ~/.gcf/omni_config --no-compress --available listresources
As a successful result the RSpec Manifest will be saved in the same directory and the summary will appear on on console output:
......
Wrote rspecs from 1 aggregate(s) to 1 file(s)
Saved listresources RSpec from 'unspecified_AM_URN'
(url 'https://127.0.0.1:8447/xmlrpc/geni/3/')
to file rspec-127-0-0-1-8447-xmlrpc-geni-3.xml;
To allocate resources from running SE-RM enter the Omni directory and run command:
$ python src/omni.py -o -a https://127.0.0.1:8447/xmlrpc/geni/3/ -V 3 -c ~/.gcf/omni_config \
--no-compress --available allocate example_slice_name \
request_rspec_example.xml --end-time 201502312200
$ python src/omni.py -o -a https://127.0.0.1:8447/xmlrpc/geni/3/ -V 3 -c ~/.gcf/omni_config \
--no-compress --available delete example_slice_name
example_slice_name - urn name for allocated slice
request_rspec_example.xml - example Rspec request slivers
<?xml version="1.1" encoding="UTF-8"?>
<rspec type="request"
xmlns="http://www.geni.net/resources/rspec/3"
xmlns:sharedvlan="http://www.geni.net/resources/rspec/ext/shared-vlan/1"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xmlns:felix="http://ict-felix.eu/serm_request"
xs:schemaLocation="http://www.geni.net/resources/rspec/3/request.xsd
http://www.geni.net/resources/rspec/ext/shared-vlan/1/request.xsd">
<node client_id="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01"
component_manager_id="urn:publicid:IDN+fms:psnc:serm+authority+cm">
<interface client_id="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_1">
<sharedvlan:link_shared_vlan name="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_1+vlan"
vlantag="1000"/>
</interface>
<interface client_id="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_2">
<sharedvlan:link_shared_vlan name="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_2+vlan"
vlantag="2000"/>
</interface>
<interface client_id="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_1">
<sharedvlan:link_shared_vlan name="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_1+vlan"
vlantag="3100"/>
</interface>
<interface client_id="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_4">
<sharedvlan:link_shared_vlan name="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_4+vlan"
vlantag="4000"/>
</interface>
</node>
<link client_id="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_1_00:00:00:00:00:00:00:01_2">
<component_manager name="urn:publicid:IDN+AIST+authority+serm"/>
<link_type name="urn:felix+vlan_trans"/>
<interface_ref client_id="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_1" felix:vlan="1000"/>
<interface_ref client_id="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_2" felix:vlan="2000"/>
</link>
<link client_id="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_1_00:00:00:00:00:00:00:01_4">
<component_manager name="urn:publicid:IDN+AIST+authority+serm"/>
<link_type name="urn:felix+vlan_trans"/>
<interface_ref client_id="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_1" felix:vlan="3100"/>
<interface_ref client_id="urn:publicid:IDN+fms:psnc:serm+datapath+00:00:00:00:00:00:00:01_4" felix:vlan="4000"/>
</link>
</rspec>
SE-RM-OF-CTRL is a Stitching Element Resource Manager OpenFlow Controller entity. The module is responsible for provisioning OpenFlow resources in the SDN network. SE-RM-OF-CTRL build upon Ryu OF Controller configures OpenFlow switch and provides REST API interface towards SE-RM.
Ryu REST API app documentation
##Installation
The following prerequisites are needed priot to install Ryu:
- python-eventlet
- python-routes
- python-webob
- python-paramiko
$ pip install ryu
Or install from the source code:
$ git clone git://github.com/osrg/ryu.git
$ cd ryu; python setup.py install
##How to run SE-RM-OF-CTRL
$ ~/ryu\> PYTHONPATH=. ./bin/ryu-manager --verbose ryu/app/ofctl_rest.py
Or
ryu-manager --ofp-tcp-listen-port <SEC_CHNL> /opt/ryu/ryu/app/ofctl_rest.py --wsapi-port <RST_PORT>
Where SEC_CHNL is the port to connect to the secure channel of the switch and <REST_PORT> is the port where the SERM Ryu controller is contacted (typically 8080).
Note: ofctl_rest is one of the built-in Ryu application.
###REST API interface
ryu.app.ofctl_rest provides REST APIs for retrieving the switch stats and Updating the switch stats. This application helps you debug your application and get various statistics. This application supports OpenFlow version 1.0, 1.2 and 1.3. Ryu rest Api
##Example of use
To check connection from Ryu controller to switch and obtain information:
# Obtain dpids of connected switches
# curl -X GET http://localhost:8080/stats/switches
[1153054187959163328]
# Obtain description of a given dpid
# curl -X GET http://localhost:8080/stats/desc/1153054187959163328
{"1153054187959163328": {"dp_desc": "None", "sw_desc": "VER 1.0", "hw_desc": "BTTF", "serial_num": "None", "mfr_desc": "HP Networking"}}
To add flowmod which translates VLAN_ID=333 on in_port=12 to VLAN_ID=555 on out_port=13:
$ curl -X POST -d \
'{"dpid":110533270894679, "cookie":1, "cookie_mask":1, "table_id":0, "idle_timeout":30, \
"hard_timeout":30, "priority":1, "flags":1, \
"match": {"dl_vlan":333, "in_port":12}, \
"actions":[{"type":"SET_VLAN_VID","vlan_vid":555},{"type":"OUTPUT","port":13}]}' \
http://localhost:8080/stats/flowentry/add
To verify the flows installed in the switch:
# curl -X GET http://localhost:8080/stats/flow/1153054187959163328
{"1153054187959163328": []}
To delete above flowmod:
$ curl -X POST -d \
'{"dpid":110533270894679, "cookie":1, "cookie_mask":1, "table_id":0, "idle_timeout":30, \
"hard_timeout":30, "priority":1, "flags":1, "match":{"dl_vlan":333, "in_port":12}, \
"actions":[{"type":"SET_VLAN_VID","vlan_vid":555},{"type":"OUTPUT","port":13}]}' \
http://localhost:8080/stats/flowentry/delete
##Deployment
SE-RM-OF-CTRL is deployed on VM(KVM) with ubuntu 13.04. In PSNC SDN testbed SE-RM-OF-CTRL provision OF resources into Juniper MX80 (Junos 12.3 with OpenFlow v1.0).
###Slice configuration
$ fvctl add-slice {slice_name} tcp:{of_contorller_ipv4:port} admin@{slice_name}
$ fvctl add-flowspace {flowspace_name} {dpid} 1 in_port={number} {slice_name}=7
.....
##Ryu SE-RM REST plugin
The SE-RM component uses the Ryu REST application to install and delete the flows. The plugins' configuration file is located in: modules/resource/manager/stitching-entity/conf/ryu-config.yaml
and looks like:
host: 127.0.0.1
rest_port: 8080
dpid : 0x0000000000000001
After the proper configuration the plugin is connecting to Ryu controller using the REST API and provisions the flows.
- General info
- Administering
- Contributing
- Experimenting