0% found this document useful (0 votes)
9 views9 pages

Ex - 5 SDN Lab

The document outlines a procedure to design and implement the ability to view and manage flow table rules using OpenFlow vSwitch in a Linux environment. It details the necessary software, step-by-step commands for creating, checking, and deleting flow entries, and instructions for using Mininet's graphical user interface. The result confirms the successful execution of the designed capability.
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)
9 views9 pages

Ex - 5 SDN Lab

The document outlines a procedure to design and implement the ability to view and manage flow table rules using OpenFlow vSwitch in a Linux environment. It details the necessary software, step-by-step commands for creating, checking, and deleting flow entries, and instructions for using Mininet's graphical user interface. The result confirms the successful execution of the designed capability.
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/ 9

EX.

NO: 5 ABILITY TO VIEW READ/WRITE FLOW TABLE RULES USING


Date: OPENFLOW VSWITCH

AIM: To design and implement the ability to view read/write flow table rules using openflow
vswitch using in CLI is to start a Linux terminal.

SOFTWARE REQUIRED:
Ubuntu 23.0.3 version.
Mininet virtual OS
VMware
PROCEDURE:
Step 1:To start enter the command as sudo mn --topo=single,3 --controller=none --mac
Step 2:Enter the password
Step 3:To see how switch s1 ports map to OpenFlow Port (OFP) number command as
sh ovs-ofctl show s1
Step 4: To create the first flow entry enter the command as
sh ovs-ofctl add-flow s1 action=normal
Step 5: Enter pingall to check the packet reachability
Step 6: Now enter the command to check the flows sh ovs-ofctl dump-flows s1
Step 7: To delete the entry (the flow) using sh ovs-ofctl del-flows s1
Step 8: Again enter the command sh ovs-ofctl dump-flows s1
Step 9: Enter pingall to check the packet reachability
USING LAYER 1 DATA
Step 10:To check the switch s1 from OpenFlow Port 1 is sent out to OpenFlow Port 2 enter a
command
sh ovs-ofctl add-flow s1 priority=500,in_port=1,actions=output:2 and sh ovs-
ofctl add-flow s1 priority=500,in_port=2,actions=output:1
Step 11: Now enter the command to check the flows sh ovs-ofctl dump-flows s1
Step 12: To add another flow enter a command as
sh ovs-ofctl add-flow s1 priority=32768,action=drop
Step 13: Now eliminate such the command enter a command as
sh ovs-ofctl del-flows s1 –strict
Step 14: Enter pingall to check the packet reachability
USING LAYER 2 DATA
Step 15: To execute with MAC address enter a command as
sh ovs-ofctl add-flow s1 dl_src=00:00:00:00:00:01, dl_dst=00:00:00:00:00:02,
actions=output:2 and enter sh ovs-ofctl add-flow s1
dl_src=00:00:00:00:00:02,dl_dst=00:00:00:00:00:01,actions=output:1
Step 16: To ARP is a broadcast protocol so we need to add another rule
sh ovs-ofctl add-flow s1 dl_type=0x806,nw_proto=1,action=flood
Step 17: Enter pingall to check the packet reachability
USING LAYER 3 DATA
Step 18: To modify packet contents enter the command
sh ovs-ofctl add-flow s1
priority=500,dl_type=0x800,nw_src=10.0.0.0/24,nw_dst=10.0.0.0/24,actions=no
rmal sh ovs-ofctl add-flow s1
priority=800,dl_type=0x800,nw_src=10.0.0.3,nw_dst=10.0.0.0/24,actions=mod_
nw_tos:184,normal
Step 19: To enable ARP again enter the command as
sh ovs-ofctl add-flow s1 arp,nw_dst=10.0.0.1,actions=output:1 sh
ovs-ofctl add-flow s1 arp,nw_dst=10.0.0.2,actions=output:2 sh
ovs-ofctl add-flow s1 arp,nw_dst=10.0.0.3,actions=output:3
Step 20: Enter pingall to check the packet reachability.

USING MININET’S GRAPHICAL USER INTERFACE

Step 1: To get library files of python3, enter command cd /usr/lib/python3/dist


packages/mininet/examples.
Step 2: To open Mininet, enter command python3 miniedit.py.
Step 3: Create tree topology in MiniEdit.
Step 4: To configure the controller Right-click on each controller and select Properties from
the menu that appears. The default port number for each controller is 6633. Change
this so the port numbers used by controllers c0, c1, and c2 are 6633, 6634, and 6635,
respectively.
Step 5: To set MiniEdit preferences, use the MiniEdit menu command, Edit →
Preferences. If you want to be able to use the Mininet CLI when a simulation is
running, check the Start CLI box.
Step 6: To save the Mininet Topology (*.mn) file, click on File in the top menu bar and
select Save from the drop-down menu. Type in a file name and save the file.
Step 7: To save the Mininet Custom Topology (*.py) file, click on File in the top menu bar
and select Save Level 2 Script from the drop-down menu. Type in the file name and
save the file.
Step 8: To start the simulation scenario, click the Run button on the MiniEdit GUI.
Step 9: To view open v switch, run the MiniEdit menu command, run → Show OVS
Summary to see a listing of switch configurations.
Step 10: To view the flow tables of some of the switches, use MiniEdit to open an xterm by
using the MiniEdit menu command, Run → Root Terminal
RESULT:
Thus, the ability to view read/write flow table rules using openflow vswitch
was designed and executed successfully.

You might also like