This seems to be much more of a mininet question than a NOX question, and you 
should probably be asking about it somewhere else.  For example, there is a 
mininet mailing list at:
https://mailman.stanford.edu/mailman/listinfo/mininet-discuss

That said, the problem here is that the value you pass in as "controller" in 
the Mininet constructor is later used by addController() to actually construct 
the controller object.  In your case, your lambda function only takes one 
parameter -- the name.  Thus, the port parameter is meaningless.  You could fix 
up the function you pass into the Mininet constructor (to take keyword 
arguments and pass them along to the NOX constructor), but I don't think it's 
really necessary.  I think you can just do:

net = Mininet()
c1 = net.addController("c1", NOX, noxArgs="myswitch", port=6633)

noxArgs just gets spliced into the commandline for NOX.

You should be able to create multiple controllers this way, but as far as I 
know, for this to be useful, you'll also need to subclass a switch class (e.g., 
OVSKernelSwitch) or pass in a factory to the Mininet constructor which actually 
assigns different switches to different controllers.  I believe as it is, 
switches are always just given to the first controller (if anyone knows me to 
be wrong on that, I'd be interested in knowing).

As for why pinging doesn't work -- your controller is broken or you don't have 
the proper links in place.  If you start with mininet's emptynet.py example, 
switch it to use the controller-adding code given above, but specify the normal 
"pyswitch" component -- you should find that pinging works.

-- Murphy

On Jan 31, 2012, at 6:45 AM, Baraki Halefom wrote:

> Dear all,
> I have built a simple custom topology network in mininet. and want to use a 
> my own controller in the topology. as
> follows;
>   
>  net = Mininet(controller= lambda name: NOX(name ,'myswitch'))  # where 
> 'myswitch' is a learning switch component
>  
>   also to add multiple controllers to the topology I did the following 
> additions
>  
>  c1 = net.addController('c1', port = 6633)
>  c2 = net.addController('c2', port = 6634)
> 
> when I run the topology  I got the following error
> controller_new = controller(name,**kwargs)
> TypeError:<lambda>() got an unexpected key word argument 'port'
> 
> in addition pinging between hosts attached to different switches is not 
> working. How can I resolve this?
> 
> Sincerely,
> 
> 
> -- 
> 
> 
> Baraki H. Abay
> Department of Math and Computer science
> North Carolina Central University 
> Durham, 27707 NC
> 
> _______________________________________________
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev

_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to