Comments (13)
from mininet-wifi.
#!/usr/bin/python
"""
Setting the position of Nodes (only for Stations and Access Points) and providing mobility using mobility models.
"""
from mininet.net import Mininet
from mininet.node import Controller,OVSKernelSwitch
from mininet.link import TCLink
from mininet.cli import CLI
from mininet.log import setLogLevel, info
from mininet.node import Controller, RemoteController, OVSKernelSwitch, OVSSwitch
from mininet.wifiReplaying import replayingMobility
def topology():
"Create a network."
net = Mininet( listenPort = 6633,topo=None)
mycontroller = RemoteController("remoteController",ip="172.21.6.219")
net.controllers = [mycontroller]
net.nameToNode["remoteController"] = mycontroller
info( '*** Adding hosts\n' )
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' )
print "*** Creating nodes"
sta1 = net.addStation( 'sta1', mac='00:00:00:00:00:03', ip='192.168.0.3/24', speed=1 )
#sta2 = net.addStation( 'sta2', mac='00:00:00:00:00:03', ip='10.0.0.3/8' )
ap1 = net.addAccessPoint( 'ap1', ssid= 'new-ssid1', dpid='0000000100000001',mode= 'g', channel= '1', position='4,4,0', range='30' )
ap2 = net.addAccessPoint( 'ap2', ssid= 'new-ssid2', dpid='0000000100000002',mode= 'g', channel= '1', position='55,17,0', range='30' )
ap3 = net.addAccessPoint( 'ap3', ssid= 'new-ssid3', dpid='0000000100000003',mode= 'g', channel= '1', position='105,23,0', range='30' )
ap4 = net.addAccessPoint( 'ap4', ssid= 'new-ssid4', dpid='0000000100000004',mode= 'g', channel= '1', position='20,55,0', range='30' )
ap5 = net.addAccessPoint( 'ap5', ssid= 'new-ssid5', dpid='0000000100000005', mode= 'g', channel= '1', position='73,65,0', range='30' )
ap6 = net.addAccessPoint( 'ap6', ssid= 'new-ssid6', dpid='0000000100000006',mode= 'g', channel= '1', position='120,78,0', range='30' )
ap7 = net.addAccessPoint( 'ap7', ssid= 'new-ssid7', dpid='0000000100000007',mode= 'g', channel= '1', position='0,105,0', range='30' )
ap8 = net.addAccessPoint( 'ap8', ssid= 'new-ssid8', dpid='0000000100000008',mode= 'g', channel= '1', position='50,102,0', range='30' )
ap9 = net.addAccessPoint( 'ap9', ssid= 'new-ssid9', dpid='0000000100000009',mode= 'g', channel= '1', position='99,118,0', range='30' )
info( '*** Adding switch\n' )
s1 = net.addSwitch('s1',dpid='0000000100000010')
s2 = net.addSwitch('s2',dpid='0000000100000011')
s3 = net.addSwitch('s3',dpid='0000000100000012')
s4 = net.addSwitch('s4',dpid='0000000100000013')
s5 = net.addSwitch('s5',dpid='0000000100000014')
s6 = net.addSwitch('s6',dpid='0000000100000015')
s7 = net.addSwitch('s7',dpid='0000000100000016')
print "*** Configuring wifi nodes"
net.configureWifiNodes()
print "*** Associating and Creating links"
net.addLink(s1, s2,1 , 1)
net.addLink(s1, s3,2 , 3)
net.addLink(s1, s4,3 , 3)
net.addLink(s1, h1,5 , 1)
net.addLink(s1, s5,4 , 2)
net.addLink(s2, s6)
net.addLink(s2, s7)
#net.addLink(s2, h2)
net.addLink(s3, ap1, 1, 2)
net.addLink(s3, ap2, 2, 2)
net.addLink(s4, ap3)
net.addLink(s4, ap6)
net.addLink(s4, ap5)
net.addLink(s5, ap8)
net.addLink(s6, ap4)
net.addLink(s7, ap7)
net.addLink(s7, ap9)
net.addLink(s7, h2)
#set the bw loss delay and so on
net.setChannelEquation(bw='100', loss='0.04', delay='0', latency='0')
info( '*** Starting network\n')
net.start()
"""uncomment to plot graph"""
net.plotGraph(max_x=120, max_y=120)
getTrace(sta1, '/home/liangjun/mininet-wifi/examples/replaying/replayingMobility/node5.dat')
#getTrace(sta2, '/home/liangjun/mininet-wifi/examples/replaying/replayingMobility/node2.dat')
replayingMobility(net)
print "*** Running CLI"
CLI( net )
print "*** Stopping network"
net.stop()
def getTrace(sta, file):
file = open(file, 'r')
raw_data = file.readlines()
file.close()
sta.position = []
for data in raw_data:
line = data.split()
x = line[0] #First Column
y = line[1] #Second Column
sta.position.append('%s,%s,0' % (x, y))
if name == 'main':
setLogLevel( 'info' )
topology()
from mininet-wifi.
this is the experiment topology script , and the node5.dat is self-defined moving path among APs, And the whole network is controlled by the remote controller.
from mininet-wifi.
from mininet-wifi.
did you have a similar experiments? the reply support video clip ?
from mininet-wifi.
from mininet-wifi.
I donn't have dropbox, I think about this question . Thank you !
from mininet-wifi.
o , I guess the instability may be associated with the wifi access . Every access to wifi aps produces different access delay , so using the mininet-wifi as my experiment environment may be inappropriate unless I can fix the wifi access delay.
from mininet-wifi.
from mininet-wifi.
For example , there are three APs(ap1, ap2, ap3) and one mobile node(sta ). The sta handover from ap1 to ap2 and from ap2 to ap3 , I mean the wifi access time from ap1 to ap2 is different from the sta handover from ap2 to ap3 . I just mean the wireless access time is uncertain. Is it?
from mininet-wifi.
from mininet-wifi.
Can you give me a email address? I try to give you a video clip .
from mininet-wifi.
from mininet-wifi.
Related Issues (20)
- Ubuntu 22.04 - Installation Error HOT 2
- Station does not ping APs during handover. HOT 1
- AttributeError: 'Mininet_wifi' object has no attribute '_parseIperf' HOT 1
- About CSMA/CA HOT 1
- mininet-wifi in debian 11 bullseye , ModuleNotFoundError: No module named 'mn_wifi' HOT 2
- If Mininet-wifi supports CSMA/CA HOT 1
- Set range and antennaGain to Interfaces HOT 1
- E : package 'python-matplotlib' has no installation candidate HOT 2
- what is the routing protocol used in the example "vanet-sumo"? HOT 1
- Limits of values set in Mininet-WiFi HOT 1
- Execution of SDCD(Software_Defined_Storage_for_cooperative_Mobile_Edge_Computing_systems) code
- Matplotlib incompatible versions HOT 2
- CLI command via script HOT 6
- Unable ping in sdn-vanet when car moving HOT 5
- parameters min_v and max_v HOT 1
- Station takes more time between 2 points in mininet-wifi graph than expected. HOT 1
- Access point (AP) handover in WiFi HOT 1
- Communication problem between ap1 and sta1 HOT 1
- Learning documents as a reference HOT 1
- Combination of Mesh Wi-Fi and P4 access point(AP)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mininet-wifi.