0% found this document useful (0 votes)
47 views

SDN LAB RECORD

The document outlines the curriculum and practical laboratory exercises for the Software Defined Networks course at Jeppiaar Institute of Technology. It includes the institution's vision and mission, departmental goals, and specific lab exercises involving the setup of SDN environments, application development, and network service orchestration. The document serves as a guide for students to complete their practical examinations and gain hands-on experience in SDN technologies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

SDN LAB RECORD

The document outlines the curriculum and practical laboratory exercises for the Software Defined Networks course at Jeppiaar Institute of Technology. It includes the institution's vision and mission, departmental goals, and specific lab exercises involving the setup of SDN environments, application development, and network service orchestration. The document serves as a guide for students to complete their practical examinations and gain hands-on experience in SDN technologies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

JEPPIAAR INSTITUTE OF TECHNOLOGY

SELF BELIEF | SELF DISCIPLINE | SELF RESPECT


(AN AUTONOMOUS INSTITUTION)

KUNNAM, SUNGUVARCHATRAM, SRIPERUMBUDUR, CHENNAI - 631 604

DEPARTMENT OF COMPUTER SCIENCE AND BUSINESS


SYSTEMS

CCS365 – SOFTWARE DEFINED NETWORKS


LABORATORY

NAME :
REG NO :
YEAR :
SEMESTER :
BRANCH :
JEPPIAAR INSTITUTE OF TECHNOLOGY
SELF BELIEF | SELF DISCIPLINE | SELF RESPECT
KUNNAM, SUNGUVARCHATRAM, SRIPERUMBUDUR, CHENNAI - 631 604.

BONAFIDE CERTIFICATE

This is a certified Bonafide Record Work of Mr./Ms.

Register No.

submitted for the University Practical Examination held on

in CCS365 – SOFTWARE DEFINED NETWORKS LABORATORY during the year


2024-2025.

Signature of the Lab In-charge Head of the Department

Internal Examiner External Examiner

Date
VISION OF THE INSTITUTION
Jeppiaar Institute of Technology aspires to provide technical education in
futuristic technologies with the perspective of innovative, industrial and
social application for the betterment of humanity.

MISSION OF THE INSTITUTION

• To produce competent and disciplined high-quality professionals with the


practical skills necessary to excel as innovative professionals and
entrepreneurs for the benefit of the society.
• To improve the quality of education through excellence in teaching and
learning, research, leadership and by promoting the principles of scientific
analysis, and creative thinking.
• To provide excellent infrastructure, serene and stimulating environment
that is most conducive to learning.
• To strive for productive partnership between the Industry and the Institute
for research and development in the emerging fields and creating
opportunities for employability.
• To serve the global community by instilling ethics, values and life skills
among the students needed to enrich their lives.

VISION OF THE DEPARTMENT

• To be the most preferred destination in the country for imparting education in


Computer Science and Business Systems, at the undergraduate level.
• To transform learners into industry ready professionals at the global level to
provide solutions for business problem and contribute to the society at large.

MISSION OF THE DEPARTMENT

• To provide an infrastructure and adopt creative teaching techniques to promote


participatory learning.
• To develop high personal and professional values, business competence and a
spirit of innovation and entrepreneurship.
• To encourage the desire for higher learning and research, to address global
challenges.
• To collaborate with industry to inculcate varied skill sets that meets industry
standards and to practice moral values.
PEO’s OF THE DEPARTMENT
I. To ensure graduates will be proficient in utilizing the fundamental knowledge
of basic sciences, mathematics, Computer Science and Business systems for the
applications relevant to various streams of Engineering and Technology.

II. To enrich graduates with the core competencies necessary for applying
knowledge of computer science and Data analytics tools to store, retrieve,
implement and analyze data in the context of business enterprise

III. To enable graduates to gain employment in organizations and establish


themselves as professionals by applying their technical skills and leadership
qualities to solve real world problems and meet the diversified needs of
industry, academia and research

IV. To equip the graduates with entrepreneurial skills and qualities which help them
to perceive the functioning of business, diagnose business problems, explore the
entrepreneurial opportunities and prepare them to manage business efficiently
CONTENTS

EX.NO DATE NAME OF THE PAGE MARKS FACULTY


EXPERIMENTS NO SIGNATURE

Setup your own virtual SDN lab


1 i)VirtualBox/Mininet Environment
for SDN - http://mininet.org
ii) https://www.kathara.org
iii) GNS3

Create a simple mininet topology with


SDN controller and use Wireshark to
capture and visualize the OpenFlow
2
messages such as OpenFlow FLOW
MOD, PACKET IN, PACKET OUT
etc.

Create a SDN application that uses the


Northbound API to program flow table
3
rules on the switch for various use
cases like L2 learning switch, Traffic
Engineering, Firewall etc

Create a simple end-to-end network


service with two VNFs using vim-emu
4 https://github.com/containernet/vim-
emu

Install OSM and onboard and


5 orchestrate network service.
Setup your own virtual SDN lab
EX.NO: 1 i) Virtualbox/Mininet Environment for SDN - http://mininet.org
ii) https://www.kathara.org
DATE:
iii) GNS3

AIM:

To Setup your own virtual SDN lab using one of the three options:
Virtualbox/Mininet, Kathara, or GNS3

PROCEDURE:

i) Virtualbox/Mininet Environment for SDN - http://mininet.org

1. Download and install Virtualbox from its [official website].


2. Download and install Mininet from its [official website]. You can
choose to install Mininet as a virtual machine image, a native
installation, or a source code installation.
3. Launch Mininet and create a virtual network using the command line
interface or the graphical user interface. You can also use predefined
network topologies or custom scripts to create your network.
4. Connect your virtual network to an SDN controller, such as
OpenDaylight, using the OpenFlow protocol. You can download and
install OpenDaylight from its [official website].
5. Test and run different SDN applications and scenarios on your virtual
network using the Mininet commands or the SDN controller
interface.
OUTPUT:

RESULT:

Thus, the setup of VirtualBox/Mininet Environment for SDN was installed


successfully.
EX.NO:2 Create a simple mininet topology with SDN controller and use Wireshark to capture
and visualize the OpenFlow messages such as OpenFlow FLOW MOD, PACKET IN,
DATE: PACKET OUT etc,.

AIM:

1. Create a simple Mininet network with an SDN controller (Ryu).


2. Capture OpenFlow messages, including FLOW_MOD, PACKET_IN, and
PACKET_OUT, using Wireshark.
3. Visualize the captured OpenFlow messages for analysis.

PROCEDURE:

1. Install Mininet:
Ensure you have Mininet installed on your system. You can use a Linux distribution for
this task.
2. Install Ryu SDN Controller:
Install Ryu, a popular SDN controller, using pip:
pip install ryu
3. Create the Mininet Topology:
Create a Python script (e.g., `mininet_topology.py`) to define your Mininet network
topology and start Mininet with the Ryu controller. Here's an example topology with a
single switch and two hosts:
```python
from mininet.net import Mininet
from mininet.topo import SingleSwitchTopo
from mininet.node import RemoteController
# Create a Mininet instance
net = Mininet(topo=SingleSwitchTopo(2), controller=RemoteController)
# Start Mininet
net.start()
```
4. Start the Ryu Controller:
In a separate terminal, start the Ryu controller:
```
ryu-manager
```
5. Capture OpenFlow Messages with Wireshark:
• Start Wireshark and select your network interface (e.g., `eth0`).
• Apply a display filter to capture only OpenFlow messages. Use the filter
expression: `of`.
• Begin capturing packets by clicking the "Start" button in Wireshark.

6. Generate OpenFlow Messages:


In the Mininet terminal, you can use the Mininet CLI to generate OpenFlow messages. For
example, you can add a flow rule (FLOW_MOD) or generate traffic (PACKET_OUT).
To add a flow rule (FLOW_MOD):
```
mininet> h1 ovs-ofctl add-flow s1 in_port=1,actions=output:2
```
To generate traffic (PACKET_OUT):
```
mininet> h1 ping -c 1 h2
```
7. Stop Wireshark Capture:
Stop capturing packets in Wireshark when you've generated enough OpenFlow messages.

OUTPUT:

• The Wireshark capture should display OpenFlow messages exchanged between the
Ryu controller and the Mininet switch. You will see messages like FLOW_MOD,
PACKET_IN, and PACKET_OUT, along with their details.

• Use Wireshark's visualization tools to analyze and inspect the captured OpenFlow
messages. You can filter, sort, and drill down into specific messages to understand the
communication between the controller and switches.

RESULT:

This setup allows you to observe and analyze the OpenFlow messaging in a simple SDN
network. You can further customize the Mininet topology and generate more complex
OpenFlow scenarios for testing and analysis.
EX.NO: 3 Create a SDN application that uses the Northbound API to program flow table rules
on the switch for various use cases like L2 learning switch, Traffic Engineering,
DATE: Firewall etc

AIM:
Develop an SDN application that uses the Northbound API to program flow table
rules on SDN switches for different use cases: L2 learning switch, Traffic Engineering, and
Firewall.

PROCEDURE:

1. Set Up the Development Environment:


Install the Ryu SDN controller and any necessary Python libraries.

2. Create the Ryu SDN Application:


Create a Python script for your Ryu SDN application, which will implement the
Northbound API to program flow rules.

3. L2 Learning Switch Use Case:


In your Ryu application, use the Northbound API to program flow rules for basic L2
learning. For example, when a packet arrives, add a flow entry to the switch's flow table
based on the source MAC address and port.

4. Traffic Engineering Use Case:


Implement traffic engineering rules using the Northbound API. For instance, you can
define flow rules to optimize traffic paths or prioritize specific traffic based on application
requirements.

5. Firewall Use Case:


Implement firewall rules using the Northbound API to drop or allow specific traffic based
on criteria such as source/destination IP addresses, ports, or protocols.

6. Run the SDN Application:


Start your Ryu SDN application with the Ryu manager using the following command:
```
ryu-manager your_application.py
```

7. Test the SDN Application:


Create a virtual network or use a Mininet topology for testing your SDN application.
Generate traffic to see how the application programs the flow table rules.
OUTPUT:

• For the L2 learning switch use case, the application should program flow rules that
enable the switch to learn and forward traffic based on MAC addresses.

• In the traffic engineering use case, the application should optimize traffic paths or
prioritize certain types of traffic as per your defined rules.

• In the firewall use case, the application should allow or block traffic based on your
defined criteria.

• The application's output should include log messages or other forms of feedback,
showing that it is functioning correctly.

RESULT:

The result is a working SDN application that leverages the Northbound API to program flow
table rules on SDN switches for different use cases. The application should effectively
control network traffic based on the specified policies and rules.
EX.NO: 4 Create a simple end-to-end network service with two VNFs using vim-emu
https://github.com/containernet/vim-emu
DATE:

AIM:
• Create a simple end-to-end network service with two VNFs using vim-emu.

PROCEDURE:

1. Set Up the Environment:


Make sure you have a Linux system. You can set up a virtual machine or a dedicated
system.
- Install the required dependencies, including Docker and Docker Compose.

2. Install vim-emu:
Follow the instructions in the vim-emu GitHub repository
(https://github.com/containernet/vim-emu) to install vim-emu.

3. Create Network Topology:


Define a network topology using vim-emu. You can create a Python script that specifies
the network, VNFs, and their interconnections. For example, create a file named
`network_topology.py`:

```python
from mininet.net import Containernet
rom mininet.node import Docker
from mininet.link import TCLink
from mininet.cli import CLI

net = Containernet()

vnf1 = net.addDocker('vnf1', dimage="vnf1_image")


vnf2 = net.addDocker('vnf2', dimage="vnf2_image")

net.addLink(vnf1, vnf2, cls=TCLink)

net.start()
CLI(net)
net.stop()
```

4. Create VNF Docker Images:


Build Docker images for your VNFs. Create a `Dockerfile` for each VNF, specifying its
requirements and configurations. Build the images using Docker commands.
5. Launch the Network Topology:
Run your network topology with vim-emu:

```
sudo python network_topology.py
```

This will start the network and deploy the VNFs.


OUTPUT:

When running the network topology script with vim-emu, you should see the network and
VNFs being deployed. You can test connectivity and traffic between VNFs.

RESULT:

The result is a fully orchestrated end-to-end network service with two VNFs, established
using vim-emu. The network service is now ready to accept and process traffic as specified
in your descriptor.
EX.NO:2
5) Install OSM and onboard and orchestrate network service.
DATE:

AIM:
Install OSM and onboard and orchestrate the network service

PROCEDURE:

1. Install OSM:
Follow the instructions on the OSM GitHub repository (https://osm.etsi.org) to install
OSM, which includes installing the OSM client and server components.

2. Onboard the Network Service:


Use the OSM client to onboard your network service. You'll need to provide a descriptor
(e.g., a TOSCA YAML file) for your service.

```
osm ns-create <your_network_service_descriptor_file>
```

3.Instantiate the Network Service:


Instantiate the network service using OSM:

```
osm ns-instantiate <ns-instance-name> <your_network_service_name>
```

Replace `<ns-instance-name>` with a suitable name for your instantiated service.


OUTPUT:

After installing OSM and onboarding the network service descriptor, you should see your
network service listed within OSM.

When instantiating the network service, OSM will orchestrate the deployment of the VNFs
and connect them according to your descriptor.

RESULT:

The result is a fully orchestrated end-to-end network service with OSM. The network
service is now ready to accept and process traffic as specified in your descriptor.

You might also like