OpenDayLight SDN Controller Integreation Testing

advertisement
OpenDayLight SDN Controller
Integreation Testing &
Documentation with KaanalNet
By Bharath Ram Chandrasekar
Master of Science in Telecommunication System Management
SDN and NFV – Special Networking
Northeastern University Boston ,MA
Document Guidelines for integration
Document Guidelines:
1. setup overview
2. Installation
a. kaanalNet
b. ODL
3. Feature Tests
a. Topology overview
b. Configuration (ODL & KaanalNet)
c. functional steps
d. Logs
What is OpenDayLight Controller ?
Features of OpenDayLight :
• Java interfaces: Java Interfaces are used for event listening, specifications and
forming patterns. This is the main way in which specific bundles implement callback functions for events and also to indicate awareness of specific state. Many
of the interfaces are auto-generated using YANG tools.
• Maven: OpenDayLight uses Maven for easier build automation. Maven uses
pom.xml (Project Object Model for this bundle) to script the dependencies
between bundles and also to describe what bundles to load on start.
• OSGi: This framework in the backend of OpenDayLight allows dynamically loading
bundles and packaged Jar files, and binding bundles together for information
exchange.
• Karaf: Karaf is a small OSGi based runtime which provides a lightweight container
for loading different modules.
These are the four main features of OpenDayLight
Features of L2 switch
The following are the L2 learning switch features
Packet Handler
• Decodes the packets coming to the controller and dispatches them appropriately
Loop Remover
• Removes loops in the network
Arp Handler
• Handles the decoded ARP packets
Address Tracker
• Learns the Addresses (MAC and IP) of entities in the network OpenDaylight User Guide 51
Host Tracker
• Tracks the locations of hosts in the network
L2Switch Main
• Installs flows on each switch based on network traffic
ODL – Karaf features to be installed for L2
The advantage of having OpenDayLight installed is the ability to view the nodes in a WEB UI .
switch
For the matter we will have to install DLUX feature in karaf and also other features:
feature:install odl-mdsal-clustering
feature:install odl-restconf-all
feature:install odl-dlux-all
feature:install odl-l2switch-all
To list/install the features/applications
The below command list all the applications supported by ODL,
feature:list |more
To list installed applications
feature:list – i
To verify if application is installed or not
feature : list –i |grep <application name>
Basics Of STP and its operation
• Spanning tree is a function that suppresses occurrence of broadcast
streams in a network having a loop structure. Also, applying the original
function that is preventing the loop, it is used as a means to secure
network redundancy to automatically switch the path in case of a network
failure.
• Spanning Tree Protocol (STP: IEEE 802.1D) handles a network as a logical
tree and by setting the ports of each switch (sometimes called a bridge in
this section) to transfer frame or not it suppresses occurrence of broadcast
streams in a network having a loop structure.
• With STP, Bridge Protocol Data Unit (BPDU) packets are exchanged
between bridges to compare the bridge and port information and decide
whether or not frame transfer of each port is available.
Contd.
The following is facilitated for STP
1 Selecting the root bridge
The bridge having the smallest bridge ID is selected as the root bridge through BPDU packet exchange between bridges. After that,
only the root bridge sends the original BPDU packet and other bridges transfer BPDU packets received from the root bridge.
2.Deciding the role of ports
Based on the cost of each port to reach the root bridge, decide the role of the ports.
a.Root port
The port having the smallest cost among bridges to reach the root bridge. This port receives BPDU packets from the root bridge.
b.Designated ports
Ports at the side having the small cost to reach the root bridge of each link. These ports sends BPDU packets received from the root
bridge. Root bridge ports are all designated ports.
c.Non designated ports
Ports other than the root port and designated port. These ports suppress frame transfer.
3.Port state change
After the port role is decided (STP calculation is completed), each port becomes LISTEN state. After that, the state changes as shown
below and according to the role of each port, it eventually becomes FORWARD state or BLOCK state. Ports set as disabled ports in the
configuration become DISABLE state and after that the change of state does not take place.
Contd.
What is KaanalNet?
KaanalNet creates a Virtual Network Lab on your Laptop or Desktop or Cloud. It consists of Nodes(Hosts), Switches, Routers and Links. It is capable to
emulate a Traditional Networking Lab , Software Defined Networking(SDN).
"Kaanal"(கானல்) is a Tamil Word, It means Mirage in English.
Features :
•
REST API support
•
Traditional networking Topology support
•
SDN Networking Topology support
•
Link characteristics (bandwidth, latency, jitter, packet loss) support
•
Support for controlling the Devices (start, stop, delete the nodes)
•
Traffic Tests (icmp,udp,tcp) support
•
Multiple Link Aggregation support
•
OpenDayLight L2Switch, BGP, LACP integreation support
•
POX, RYU controller applications integreation support
•
KaanalNet uses the Linux Containers (LXC), openvswitch, linux bridge and ping,iperf(traffic utilities), Quagga, linux tc. KaanalNet is integreated and
tested with OpenDayLight, RYU and POX SDN controller.
•
Supported only on UBUNTU 14.04 OS.
Release
•
The current release is 0.2.0
Postman REST API client
Topology APIs are used for creating your Topology and get the status of the topology creation, and also destroying/deleting the topology.
•
POST /Topology
Creates a new Topology.
•
GET /Topology/:id
Get the Status of the Topology elements.
•
DELETE /Topology/:id
Deletes the Topology elements and cleans up
Device APIs
Device APIs are used for controlling the individual device present in the running topology.
•
GET /Topology/:id/Device/:did
Get the status of the specified device
•
PUT /Topology/:id/Device/:did/Stop
Stops the Device
•
PUT /Topology/:id/Device/:did/Start
Starts the Device
•
DELETE /Topology/:id/Device/:did
Deletes the Device
Test APIs
Test APIs are used for triggering the traffic tests (ping, tcp,udp) between the nodes in the topology and get the test results/reports.
•
POST /Topology/:id/Test
Starts the new Test
•
GET /Topology/:id/Test/:tid Get the Test Status and results.
Postman REST API client for STP
{
"name":"STP enabled feature in KaanalNet",
"switches":[
{ "name":"lanswitch01","type":"lan"},
{ "name":"lanswitch02","type":"lan"},
{ "name":"lanswitch03","type":"lan"}
],
"nodes":[
{ "name":"r011","type":"host"},
{ "name":"r022","type":"host"},
{ "name":"r033","type":"host"}
],
"links":[
{
"type":"lan",
"switches":[
{"name":"lanswitch02","connected_nodes":[{"name":"r011"}],"connected_switches":[{"name":"lanswitch03"},{"name":"lanswitch01"}]},
{"name":"lanswitch03","connected_nodes":[{"name":"r022"}],"connected_switches":[{"name":"lanswitch01"}]} ,
{"name":"lanswitch01","connected_nodes":[{"name":"r033"}] }
]
}
]
}
Checking WEB UI DLUX feature
• Once both ODL and KaanalNet has been started, we can go to web UI
to have a look at the L2 feature . Ping all the other nodes as well.
• Go to http://localhost:8181/index.html
http://
Checking Address Observations and host
address information
• Address Observations are added to the Inventory data tree.
• Host information is added to the Topology data tree.
• Host address
• Attachment point (link) to a node/switch
• This host information and attachment point information
can be checked either by means of a browser or a REST
Client.
• http://10.194.126.91:8181/restconf/operati
onal/opendaylight-inventory:nodes/
How to check nodes and address information
Checking STP status
Checking STP status using ODL
Alternately
• We can down any link and see if the flow is changed.
• Suppose link eth2 is down.
• The STP links will change and adjust itself .
• Logs can be checked at
• Configuration files are located in < ODL Directory
>/etc/opendaylight/karaf directory.
Example : distribution-karaf-0.3.2-Lithium-SR2/etc/opendaylight/karaf
• Config files are XML Files. Each application have their own specific
config files
Contributions to KaanalNet
Reference :
• https://github.com/sureshkvl/kaanalnet/
• www.Kaanalnet.org
• https://wiki.opendaylight.org/view/L2_Switch:Helium:User_Guide
• https://git.opendaylight.org/gerrit/#/q/project:l2switch
• https://osrg.github.io/ryu-book/en/html/spanning_tree.html
Download