[pox-dev] add rules proactively - send flow to two or more ports
Lucas Brasilino
lrbbs at cin.ufpe.br
Wed May 15 12:04:23 PDT 2013
Hi
> I´m using mininet and POX and I have two questions:
> II) How do I add a flow_mod without being involved in an event? I want to
> install proactively rules in the switches, but I only have achieved this
> when listening events. I didn't find any such thing on Internet. When I make
> simple applications like the one below, it works, but I need to install
> rules proactively.
I didn't try to do so (yet), but I think you can use Timer interface to do
what you want.
https://openflow.stanford.edu/display/ONL/POX+Wiki#POXWiki-ThreadsTasksandTimerspoxlibrecoco
> that? I tried as above, which works weel when I have two ports, but when I
> need to install rules that sends flows to one and more ports together :
> ...
> self._install(event.connection.dpid,2,(1,3))
> self._install(event.connection.dpid,1,2))
[...]
> File "/home/mininet/pox/ext/swbasico2.py", line 46, in _install
> for i in range(len(out_port)):
> TypeError: object of type 'int' has no len()
>
> Please, could you help me with that?
Try pass a tuple to the _install method, just like:
self._install(event.connection.dpid,1,(2))
or
self._install(event.connection.dpid,2,(1,2))
or something alike.
Att
Lucas Brasilino
MSc Student @ Federal University of Pernambuco (UFPE)
twitter: @lucas_brasilino
More information about the pox-dev
mailing list