GithubHelp home page GithubHelp logo

Comments (14)

zhangzee avatar zhangzee commented on June 6, 2024

the mobilityDemo.py is like this: the remote controller(onos) cannot detect the s1 and s2 .so sta1 cannot ping h1 successfully.

#!/usr/bin/python

from mininet.net import Mininet
from mininet.node import Controller
from mininet.cli import CLI
from mininet.log import setLogLevel, info

#from mininet.node import OVSKernelSwitch, Controller ,OVSSwitch
#from mininet.link import TCLink

def emptyNet():

#net = Mininet( controller=Controller )
net = Mininet( listenPort = 6633,topo=None)

info( '*** Adding controller\n' )
mycontroller = RemoteController("onos",ip="172.21.6.219")
net.controllers = [mycontroller]
net.nameToNode["onos"] = mycontroller
#net.addController( 'mycontroller' )

info( '*** Adding controller\n' )
#net.addController( 'c0' )
info( '*** Adding hosts\n' )
h1 = net.addHost( 'h1', ip='192.168.0.6/24' )
h2 = net.addHost( 'h2', ip='192.168.0.5/24' )

info( '*** Adding switch\n' )
s1 = net.addSwitch( 's1' )
s2 = net.addSwitch( 's2' )

sta1 = net.addStation( 'sta1', mac='00:00:00:00:00:02', ip="192.168.0.1/24" ,range='20' )
ap1 = net.addAccessPoint( 'ap1', ssid= 'ap1-ssid', mode= 'g', channel= '1', position='30,50,0', range='30' )
ap2 = net.addAccessPoint( 'ap2', ssid= 'ap2-ssid', mode= 'g', channel= '1', position='90,50,0', range='30' )
ap3 = net.addAccessPoint( 'ap3', ssid= 'ap3-ssid', mode= 'g', channel= '1', position='130,50,0', range='30' )

print "*** Configuring wifi nodes"
net.configureWifiNodes()

net.addLink(s1, s2)
net.addLink(s1, h1)
net.addLink(s2, h2)
net.addLink(s1, ap1)
net.addLink(s1, ap2)
net.addLink(s2, ap3)

net.plotGraph(max_x=160, max_y=160)

net.startMobility(startTime=0, AC='ssf')
net.mobility(sta1, 'start', time=20, position='1,50,0')
net.mobility(sta1, 'stop', time=79, position='159,50,0')
net.stopMobility(stopTime=80) 

info( '*** Starting network\n')
net.start()

info( '*** Running CLI\n' )
CLI( net )

info( '*** Stopping network' )
net.stop()

if name == 'main':
setLogLevel( 'info' )
emptyNet()

from mininet-wifi.

zhangzee avatar zhangzee commented on June 6, 2024

a intresting question is that sta1 can ping h1 when it moved to ap3 ....but the ttl time is so long .

image
image

from mininet-wifi.

ramonfontes avatar ramonfontes commented on June 6, 2024

from mininet-wifi.

zhangzee avatar zhangzee commented on June 6, 2024

thank for you help @ramonfontes
when I changed the ap1 ,ap2,ap3 to ap3 ap4 ap5, the remote controller can indeed detect the s1 and s2. But there is no diffrent with define s1 to ap in this way. I want to know if I use the method net.addSwitch('s1') cannot add a normal switch not an ap ?? As we konw the method is add a normal OVSSwitch in mininet. if the mininet-wifi change the method??

from mininet-wifi.

ramonfontes avatar ramonfontes commented on June 6, 2024

net.addSwitch('s1') adds the same switch as Mininet does. So, we didn't change net.addSwitch().

You can add the parameter dpid when add switch and ap. For example:
net.addSwitch('s1',dpid='0000000100000001')
net.addAccessPoint('ap1',dpid='0000000100000002')

should work fine.

from mininet-wifi.

zhangzee avatar zhangzee commented on June 6, 2024

thank you for you help . It works.
But when sta1 ping h1 , the ttl time up to more than 10ms like the up picture which is correct or normal to simulate the real wireless network? when h1 ping h2 ,the ttl time is less than 0.05ms. can I change the wireless link bandwidth to reduce the ttl time . Thank you .

from mininet-wifi.

ramonfontes avatar ramonfontes commented on June 6, 2024

from mininet-wifi.

zhangzee avatar zhangzee commented on June 6, 2024

Is this manual ? But there is no this section "Customizing Equations" . And when I set the link bw to 100M It doesn't works.
image

from mininet-wifi.

ramonfontes avatar ramonfontes commented on June 6, 2024

from mininet-wifi.

ramonfontes avatar ramonfontes commented on June 6, 2024

Hello,

Did you solve the problem?

from mininet-wifi.

zhangzee avatar zhangzee commented on June 6, 2024

sorry, I can't find the method to setbw, loss, latency and delay. And I didn't get help from examples/wifiPropagationModel.py refered at page 15 . So can you give me a example to change these parameters ? Thank you .

from mininet-wifi.

ramonfontes avatar ramonfontes commented on June 6, 2024

from mininet-wifi.

zhangzee avatar zhangzee commented on June 6, 2024

perfect ! Thank you very much .
And my scenario can support mobility .
haha

from mininet-wifi.

ramonfontes avatar ramonfontes commented on June 6, 2024

Good. Please close the issue if it is solved.

from mininet-wifi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.