[pox-dev] L2 and L3 calling from another

Murphy McCauley murphy.mccauley at gmail.com
Mon Nov 18 20:21:41 PST 2013


I think you may have to modify l2_multi a bit to get this to work with it -- it was designed with the assumption that it's in control of all the switches, and I think that will cause problems.

l2_learning, on the other hand, should be easy to run on individual switches.  And l2_pairs should be pretty easy too.

I'd suggest not doing it by writing your own PacketIn handler and demultiplexing it yourself.  Instead, just have your L2 stuff listen to PacketIns from some switches, and your L3 stuff listen to PacketIns from the others.  That is, you should make this decision in response to a ConnectionUp event instead of each PacketIn.  Something like...

from pox.forwarding.l2_learning import LearningSwitch

def _handle_ConnectionUp (event):
  if event.dpid == 1:
    LearningSwitch(event.connection, False)
  else:
    # initialize your L3 thing, binding its events to this connection


Hope that helps.

-- Murphy

On Nov 15, 2013, at 10:17 AM, Amer <amer7777 at hotmail.com> wrote:

> Hello,
> 
> 
> I want to create a handle packetin method, if the incoming packet is from specific switch run l2 if it from another run l3
> What I did
> 
> from pox.forearding.l2_multi import *
> 
> def H_P (event):
>   p = event.parsed
>   If (p.dpid == "1"):
>     sw= Switch()
>     sw._handle_PacketIn(event)
>   Else:
>      #. L3.learning
> 
> I have received this error:
> NoneType object has no Len()
> 
> Pox.py l2l3 openflow.discovery
> 
> Any help is appreciated
> 
> Best regards,
> Amer




More information about the pox-dev mailing list