Closed SuhaibKhan7 closed 5 years ago
sir it is the integrated feature of mininet wifi to support vanet having vanet-sumo.cfg.py and vanet.py i am trying to select ryu controller instead default one, neither the change in parameters(Speed ,total nodes) have any effect on the OUTPUT.
Sorry, I didn't comprehended your question.
'Simple idea around Vehicular Ad Hoc Networks - VANETs'
import os import random
from mininet.node import Controller from mininet.log import setLogLevel, info from mn_wifi.cli import CLI_wifi from mn_wifi.net import Mininet_wifi from mn_wifi.link import wmediumd from mn_wifi.wmediumdConnector import interference
def topology():
"Create a network."
net = Mininet_wifi(controller=Controller,
link=wmediumd, wmediumd_mode=interference)
info("*** Creating nodes\n")
cars = []
for x in range(0, 10):
cars.append(x)
for x in range(0, 10):
min_ = random.randint(20, 30)
max_ = random.randint(40, 70)
cars[x] = net.addCar('car%s' % (x + 1), wlans=1,
ip='10.0.0.%s/8'% (x + 1), min_speed=min_,
max_speed=max_)
rsu11 = net.addAccessPoint('RSU11', ssid='RSU11', mode='g',
channel='1')
rsu12 = net.addAccessPoint('RSU12', ssid='RSU12', mode='g',
channel='6')
rsu13 = net.addAccessPoint('RSU13', ssid='RSU13', mode='g',
channel='11')
rsu14 = net.addAccessPoint('RSU14', ssid='RSU14', mode='g',
channel='11')
c1 = net.addController('c1')
This is the partial code of VANET.py ...i just want to know how to use remote controller(like Ryu) .
Well, you should set the controller as RemoteController.
sir i tried it before it is showing global name RemoteController not defined .. then i tried to edit net.py and import RemoteController and in def init(self, topo=None, switch=OVSKernelSwitch, accessPoint=OVSKernelAP, host=Host, station=Station, car=Car, controller=DefaultController, .... and i set controller=RemoteController but it is also not working
Sorry, but what do you mean about "not working"? The controller is running on port 6653, right? So, there is no reason for such issue.
thankyou sir , it works now ..i import RemoteController class in main Vanet.py ... I appreciate your help and patience.
thankyou sir , it works now ..i import RemoteController class in main Vanet.py ... I appreciate your help and patience.
Sir ةI am facing a similar problem can you please share the part of code in which you replaced the default controller with a remote one
Closed! No description provided. Nevertheless, the issue seems to be related to SUMO.