[pox-dev] Bind POX to Multiple IP Interfaces

Anton Matsiuk anton.matsiuk at gmail.com
Fri Nov 8 05:45:58 PST 2013


Thank you! It works!

At least I tested it with L2_Switch without problems. In this case first
address to listen on should be specified as argument in def launch() of
of_01.py and the second - as CLI argument when launching pox. The only
warning appears from core about registering 'of_01" multiple times (see
debug below).

We run multiple concurrent OpenFlow_01_Tasks in this case, and the
performance might be slower than one task binding multiple listeners,
right?

mininet at mininet-vm:~/pox$ ./pox.py --unthreaded_sh log.level --DEBUG
openflow.of_01 --address=192.168.20.1 l2sw
POX 0.3.0 (dart) / Copyright 2011-2013 James McCauley, et al.
WARNING:core:Warning: Registered 'of_01' multipled times
DEBUG:core:POX 0.3.0 (dart) going up...
DEBUG:core:Running on CPython (2.7.3/Sep 26 2012 21:51:14)
DEBUG:core:Platform is
Linux-3.5.0-17-generic-x86_64-with-Ubuntu-13.04-raring
INFO:core:POX 0.3.0 (dart) is up.
DEBUG:openflow.of_01:Listening on 192.168.20.1:6633
DEBUG:openflow.of_01:Listening on 192.168.10.1:6633
INFO:openflow.of_01:[00-00-00-00-00-02 1] connected
INFO:l2sw:Controlling conID=1, dpid=2
INFO:openflow.of_01:[00-00-00-00-00-01 2] connected
INFO:l2sw:Controlling conID=2, dpid=1


On 7 November 2013 20:56, Murphy McCauley <murphy.mccauley at gmail.com> wrote:

> I think this MIGHT be as easy as making the launcher for of_01
> multi-instance aware.  I don't have time to actually check, but here's a
> hacked version which at least doesn't crash immediately. :)  Maybe you can
> give it a shot?
>
> def launch (port=6633, address="0.0.0.0", name=None, __INSTANCE__=None):
>   if name is None:
>     basename = "of_01"
>     counter = 1
>     name = basename
>     while core.hasComponent(name):
>       counter += 1
>       name = "%s-%s" % (basename, counter)
>
>   if core.hasComponent(name):
>     log.warn("of_01 '%s' already started", name)
>     return None
>
>   global deferredSender
>   if not deferredSender:
>     deferredSender = DeferredSender()
>
>   if of._logger is None:
>     of._logger = core.getLogger('libopenflow_01')
>
>   l = OpenFlow_01_Task(port = int(port), address = address)
>   core.register(name, l)
>   return l
>
> -- Murphy
>
> On Nov 7, 2013, at 5:30 AM, Anton Matsiuk <anton.matsiuk at gmail.com> wrote:
>
> > Dear Murphy,
> >
> > I am asking about possibility to bind POX Controller to listen for OF
> messages on multiple IP Interfaces. In my case, I need to bind it to 2
> interfaces: listening from Open vSwitch through Loopback, and Hardware
> switch from external eth, but, of course, the quantity doesn't mater.
> >
> > As I understood there is no possibility to run 2 instances of
> OpenFlow_01_Task concurrently (and to register them both on core) or to
> bind one instance of Task to 2 different IP's.
> >
> > I know that it is possible to solve the problem by proxying through
> iptables, but I am looking for a possibility to do it with POX in a
> straightforward and scalable way.
> >
> > --
> > Best regards,
> > Anton Matsiuk
>
>


-- 
Best regards,
Anton Matsiuk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noxrepo.org/pipermail/pox-dev-noxrepo.org/attachments/20131108/a490988c/attachment-0002.htm>


More information about the pox-dev mailing list