SDN Final
SDN Final
DATE:
i)Virtu albox/Mininet Environment for SDN-
http://mininet.org
ii) https://www.kathara.org iii) GNS3
AIM:
To Setup your own virtual SDN lab using one of the three options:
Virtualbox/Mininet, Kathara, or GNS3
PROCEDURE:
i) Virtual box/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 Open
Daylight, using the OpenFlow protocol. You can download and
install Open Daylight 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
DATE: VISUALIZE THE OPENFLOW MESSAGES SUCH AS OPENFLOW
FLOW MOD, PACKET IN, 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.
mininet> h1 ping -c 1 h2
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.
PROGRAM:
Install dependencies
ryu-manager ryu/app/simple_switch.py
Mininet Installation
def run():
net = Mininet(topo=SingleSwitchTopo(k=2), controller=lambda name:
RemoteController(name, ip='127.0.0.1', port=6633))
net.start()
print("Mininet is running. Use 'exit' to quit.")
CLI(net)
net.stop()
if __name__ == '__main__':
setLogLevel('info')
from mininet.cli import CLI
run()
ryu-manager ryu.app.simple_switch_13
Try ping
pingall
Wireshark Installation
In a new terminal
ip link show
ifconfig -a
If GUI still doesn’t show them, you can capture packets from CLI using
tcpdump:
Example:
Testing procedure
1. Trigger a Packet In
In Mininet, run:
h1 ping h2
Also in Mininet:
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.
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.
ryu-manager your_application.py
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.
AIM:
• Create a simple end-to-end network service with two VNFs using vim-
emu.
• Install OSM and onboard and orchestrate the network service.
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.
python
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()
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.
After installing OSM and onboarding the network service descriptor, you
should see your network service listed within OSM.
DATE:
AIM:
Install OSM and onboard and orchestrate the network service.
PROCEDURE:
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.
After installing OSM and onboarding the network service descriptor, you
should see your network service listed within OSM.