0% found this document useful (0 votes)
10 views7 pages

C2_346

The document outlines an evaluation project for implementing a 4-router network topology using Mininet, focusing on packet forwarding through OpenFlow rules. It includes programming tasks for handling mobility scenarios and user association with access points. The document also provides code for setting up the network and visual representations of network performance metrics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views7 pages

C2_346

The document outlines an evaluation project for implementing a 4-router network topology using Mininet, focusing on packet forwarding through OpenFlow rules. It includes programming tasks for handling mobility scenarios and user association with access points. The document also provides code for setting up the network and visual representations of network performance metrics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

School of Computer Science & Engineering

Computer Networks Lab


(20ECSP305)

Evaluation -2
Implementation of a given topology using
Mininet

Submitted By

Name USN Roll No Division


Sameer S 01FE21BCS060 346 C
Chakalabbi

Under the guidance of


Dr. M.M. Raikar

School of Computer Science & Engineering


KLE Technological University
Problem statement:
Consider the 4-router network shown below, where packet forwarding is
controlled by flow tables. Suppose we want the following forwarding behaviour
of packets to be implemented:
Packets coming from the source network attached to s1 and destined to the
network attached to s4 should be forwarded along the path: s1 -> s3 -> s4.

1. Write the OpenFlow rules for the given topology given.


2. Write the program for handover scenario, provide the keyboard interface as
below for the stations.
On the key press of ‘s’ / ‘S’ the station need to start mobility.
On the key press of ‘t’ / ‘T’ the station need to stop mobility.
3. Write the program for user association to the access point with and without
authentication.

Code for the above problem statement:


from mininet.node import Controller
from mininet.log import setLogLevel
from mininet.net import Mininet
from mininet.wifi.node import OVSKernelAP, Station
from mininet.wifi.link import TCLink
def topology(): net = Mininet(controller=Controller,
accessPoint=OVSKernelAP, station=Station, link=TCLink)
ap1 = net.addAccessPoint('ap1', ssid='ssid-ap1', mode='g', channel='1',
position='10,50,0')

ap2 = net.addAccessPoint('ap2', ssid='ssid-ap2', mode='g', channel='1',


position='60,50,0')

sta1 = net.addStation('sta1', position='20,40,0')

sta2 = net.addStation('sta2', position='40,40,0')

sta3 = net.addStation('sta3', position='70,40,0')

sta4 = net.addStation('sta4', position='90,40,0')

# Add hosts

h1 = net.addHost('h1', ip='192.168.0.1/24', mac='00:00:00:00:00:01')

h2 = net.addHost('h2', ip='192.168.0.2/24', mac='00:00:00:00:00:02')

h3 = net.addHost('h3', ip='192.168.0.3/24', mac='00:00:00:00:00:03')

h4 = net.addHost('h4', ip='192.168.0.4/24', mac='00:00:00:00:00:04')

net.addLink(ap1, ap2)

net.addLink(sta1, ap1)

net.addLink(sta2, ap1)

net.addLink(sta3, ap2)

net.addLink(sta4, ap2)

net.addLink(h1, ap1)

net.addLink(h2, ap1)
net.addLink(h3, ap2)

net.addLink(h4, ap2)
net.build()
net.start()
net.staticArp()
print("* Running CLI")
CLI(net)
print("* Stopping network")
net.stop()

if _name_ == '_main_':

setLogLevel('info')

topology()

Screenshots:
Mobility graph:

Throughput graph:
Roundtrip Time graph:

Flowgraph:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy