Closed memran2 closed 4 years ago
from mn_wifi.cli import CLI
solves the issue
Many thanks dear sir, I followed your instructions the topology is created but sta1 does not ping sta2. I have attached the dump snapshot below: memran@Mininet-VM:~/Desktop/mininet-wifi/mininet_topologies$ sudo python test1.py Creating nodes Configuring wifi nodes Mac Address(es) of AP(s) is(are) being added into /etc/NetworkManager/NetworkManager.conf Restarting network-manager... Associating Stations Starting network Running CLI Starting CLI: mininet-wifi> sta1 ping sta2 PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data. From 10.0.0.1 icmp_seq=1 Destination Host Unreachable From 10.0.0.1 icmp_seq=2 Destination Host Unreachable From 10.0.0.1 icmp_seq=3 Destination Host Unreachable ^C --- 10.0.0.2 ping statistics --- 4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3067ms pipe 4 mininet-wifi> dump is also given below: mininet-wifi> dump <RemoteController c0: 127.0.0.1:6633 pid=13455> <Station sta1: sta1-wlan0:10.0.0.1,sta1-wlan0:None,sta1-wlan0:None pid=13439> <Station sta2: sta2-wlan0:10.0.0.2,sta2-wlan0:None,sta2-wlan0:None pid=13441> <Station sta3: sta3-wlan0:10.0.0.3,sta3-wlan0:None,sta3-wlan0:None pid=13443> <Station sta4: sta4-wlan0:10.0.0.4,sta4-wlan0:None,sta4-wlan0:None pid=13445> <OVSAP ap1: lo:127.0.0.1,ap1-wlan1:None pid=13450> mininet-wifi> I am using ryu controller as remote controller and it is already started: memran@Mininet-VM:~$ ryu-manager ryu.app.simple_switch_13 loading app ryu.app.simple_switch_13 loading app ryu.controller.ofp_handler instantiating app ryu.app.simple_switch_13 of SimpleSwitch13 instantiating app ryu.controller.ofp_handler of OFPHandler I have attached the code of this topology below also for your reference please: GNU nano 2.9.3 test1.py
'This example creates a simple network topology with 1 AP and 4 stations'
import sys from mininet.node import RemoteController from mininet.log import setLogLevel, info from mn_wifi.cli import CLI from mn_wifi.net import Mininet_wifi
def topology(): "Create a network." net = Mininet_wifi(controller=None) info("*** Creating nodes\n") sta1 = net.addStation('sta1') sta2 = net.addStation('sta2') sta3 = net.addStation('sta3') sta4 = net.addStation('sta4') ap1 = net.addAccessPoint('ap1', ssid="simplewifi", mode="g", channel="5") c0 = net.addController('c0', controller=RemoteController, ip='127.0.0.1', port=6633)
info("*** Configuring wifi nodes\n")
net.configureWifiNodes()
info("*** Associating Stations\n")
net.addLink(sta1, ap1)
net.addLink(sta2, ap1)
net.addLink(sta3, ap1)
net.addLink(sta4, ap1)
info("*** Starting network\n")
net.build()
c0.start()
ap1.start([c0])
info("*** Running CLI\n")
CLI(net)
info("*** Stopping network\n")
net.stop()
if name == 'main': setLogLevel('info') topology() Even when I exit from Mininet wifi it stopped properly mininet-wifi> exit Stopping network Stopping 1 controllers c0 Stopping 4 links .... Stopping switches/access points ap1 *** Stopping nodes sta1 sta2 sta3 sta4
Removing WiFi module and Configurations Killing mac80211_hwsim
*** Done
Did you check the associations?? Please read https://github.com/intrig-unicamp/mininet-wifi#note!
yes this command solved the problem: sudo systemctl stop network-manager Many thanks for your guidance sir i was struck here for last two days and was not able to progress in my course now I will make my topology and try to complete my experiment for my ph.d research article 2. Once again many thanks for your help and support and timely guidance Sincere regards
Many thanks it worked
sudo systemctl stop network-manager
Regards Emran
From: Ramon Fontes notifications@github.com Sent: Monday, May 4, 2020 12:42 AM To: intrig-unicamp/mininet-wifi mininet-wifi@noreply.github.com Cc: memran2 memran@hotmail.com; Author author@noreply.github.com Subject: Re: [intrig-unicamp/mininet-wifi] Error in Mininet-Wifi (#301)
Did you check the associations?? Please read https://github.com/intrig-unicamp/mininet-wifi#note!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/intrig-unicamp/mininet-wifi/issues/301#issuecomment-623186961, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACNI4IYZJBI6XDZCFDQUOWLRPXQMZANCNFSM4MX6IR5A.
Dear Sir,
I am running a python script (position2.py) and getting the following error, after showing below the error, I have pasted the python script also for your information. Please guide:
memran@Mininet-VM:~/mininet-wifi/mininet_topologies$ sudo python position2.py
Creating nodes
Configuring wifi nodes
Traceback (most recent call last):
File "position2.py", line 49, in
import sys
from mininet.node import RemoteController from mininet.log import setLogLevel, info from mn_wifi.cli import CLI from mn_wifi.net import Mininet_wifi
def topology(): "Create a network." net = Mininet_wifi(controller=None) info(" Creating nodes\n") sta1 = net.addStation('sta1', mac='00:00:00:00:00:02', ip='10.0.0.2/8', position='35,40,0') sta2 = net.addStation('sta2', mac='00:00:00:00:00:03', ip='10.0.0.3/8', position='65,90,0') sta3 = net.addStation('sta3', mac='00:00:00:00:00:04', ip='10.0.0.4/8', position='45,55,0') ap1 = net.addAccessPoint('ap1', ssid='ssid-ap1', mode='g', channel='1', position='55,30,0', range=30) c0 = net.addController('c0', controller=RemoteController, ip='127.0.0.1', port=6633) net.setPropagationModel(model="logDistance", exp=5) info(" Configuring wifi nodes\n") net.configureWifiNodes()
net.plotGraph(max_x=100, max_y=100)
net.setAssociationCtrl('ssf')
info("*** Starting network\n")
net.build()
c0.start()
ap1.start([c0])
info("*** Running CLI\n")
CLI(net)
info("*** Stopping network\n")
ap1 = net.addAccessPoint('ap1', ssid='ssid-ap1', mode='g', channel='1',
position='55,30,0', range=30)
c0 = net.addController('c0', controller=RemoteController, ip='127.0.0.1',
port=6633)
net.setPropagationModel(model="logDistance", exp=5)
info("*** Configuring wifi nodes\n")
net.configureWifiNodes()
net.plotGraph(max_x=100, max_y=100)
net.setAssociationCtrl('ssf')
info("*** Starting network\n")
net.build()
c0.start()
ap1.start([c0])
info("*** Running CLI\n")
CLI(net)
info("*** Stopping network\n")
net.stop()
if name == 'main': setLogLevel('info') topology()
I have created a custom topology, when I run it I get the following error: memran@Mininet-VM:/Desktop/mininet-wifi/mininet_topologies$ sudo python test1.py Traceback (most recent call last): File "test1.py", line 8, in from mn_wifi.cli import CLI_wifi ImportError: cannot import name CLI_wifi memran@Mininet-VM:/Desktop/mininet-wifi/mininet_topologies$
I first installed the mininet and then installed the mininet-wifi in the mininet-wifi folder. the test1.py topology code is given below: GNU nano 2.9.3 test1.py
'This example creates a simple network topology with 1 AP and 4 stations'
import sys from mininet.node import RemoteController from mininet.log import setLogLevel, info from mn_wifi.cli import CLI_wifi from mn_wifi.net import Mininet_wifi
def topology(): "Create a network." net = Mininet_wifi(controller=None) info("*** Creating nodes\n") sta1 = net.addStation('sta1') sta2 = net.addStation('sta2') sta3 = net.addStation('sta3') sta4 = net.addStation('sta4') ap1 = net.addAccessPoint('ap1', ssid="simplewifi", mode="g", channel="5") c0 = net.addController('c0', controller=RemoteController, ip='127.0.0.1', port=6633)
info("*** Configuring wifi nodes\n") net.configureWifiNodes()
info(" Associating Stations\n") net.addLink(sta1, ap1) net.addLink(sta2, ap1) net.addLink(sta3, ap1) net.addLink(sta4, ap1) info(" Starting network\n") net.build() c0.start() ap1.start([c0])
info("*** Running CLI\n") CLI_wifi(net)
info("*** Stopping network\n") net.stop() if name == 'main': setLogLevel('info') topology()
ramonfontes commented on 3 May : from mn_wifi.cli import CLI solves the issue****
but again error occure :
Traceback (most recent call last):
File "test1.py", line 46, in
All the examples you can find at /examples
import CLI
and not CLI_wifi
. Please refer to the sample files available at https://github.com/intrig-unicamp/mininet-wifi/tree/master/examples to build your own script.
I would like to ask when it is expected that LTE module will be added in to Mininet. As it would be a great help if LTE is included in to Mininet WIFI emulator. It would give a good platform for research community for cellular network research specially using SDN with LTE and WIFI. Sincere Regards, Emran
From: Ramon Fontes notifications@github.com Sent: Monday, December 7, 2020 9:52 PM To: intrig-unicamp/mininet-wifi mininet-wifi@noreply.github.com Cc: memran2 memran@hotmail.com; Author author@noreply.github.com Subject: Re: [intrig-unicamp/mininet-wifi] Error in Mininet-Wifi (#301)
All the examples you can find at /examples import CLI and not CLI_wifi. Please refer to the examples available https://github.com/intrig-unicamp/mininet-wifi/tree/master/examples to build your own script.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/intrig-unicamp/mininet-wifi/issues/301#issuecomment-740110124, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACNI4IZOQKZ3VP6BMATQ7YDSTUP7DANCNFSM4MX6IR5A.
thank you sir .problem solve
I have created a custom topology, when I run it I get the following error: memran@Mininet-VM:~/Desktop/mininet-wifi/mininet_topologies$ sudo python test1.py Traceback (most recent call last): File "test1.py", line 8, in
from mn_wifi.cli import CLI_wifi
ImportError: cannot import name CLI_wifi
memran@Mininet-VM:~/Desktop/mininet-wifi/mininet_topologies$
I first installed the mininet and then installed the mininet-wifi in the mininet-wifi folder. the test1.py topology code is given below: GNU nano 2.9.3 test1.py
!/usr/bin/python
'This example creates a simple network topology with 1 AP and 4 stations'
import sys from mininet.node import RemoteController from mininet.log import setLogLevel, info from mn_wifi.cli import CLI_wifi from mn_wifi.net import Mininet_wifi
def topology(): "Create a network." net = Mininet_wifi(controller=None) info("*** Creating nodes\n") sta1 = net.addStation('sta1') sta2 = net.addStation('sta2') sta3 = net.addStation('sta3') sta4 = net.addStation('sta4') ap1 = net.addAccessPoint('ap1', ssid="simplewifi", mode="g", channel="5") c0 = net.addController('c0', controller=RemoteController, ip='127.0.0.1', port=6633)
if name == 'main': setLogLevel('info') topology()