On Jul 2, 2013, at 12:50 AM, Silvia Fichera wrote: > This is a problem because I have only 2 weeks to do it... > > - Where can I find Nicira extensions?
They're in pox.openflow.nicira (which has a fair bit of documentation in it -- you might find reading some of the comments/docstrings helpful). Also see the l2_nx and l2_nx_self_learning components for some examples. I'm actually not sure where the best source of Nicira Extensions documentation is. Something to do with Open vSwitch, no doubt (I just refer to the nicira-ext.h header file from OVS). The Nicira Extensible Match (NXM) -- which you'll need to do IPv6 matching -- is also pretty similar to The OpenFlow Extensible Match (OXM) which is described in the OpenFlow 1.2 and 1.3 specs. POX actually has some magic intended to make it pretty easy to use NXM. You should be able to make an IPv6 flow_mod doing something like... msg = nx.nx_flow_mod() # Use Nicira flow_mod msg.match.eth_type = ethernet.IPV6_TYPE msg.match.ipv6_src = IPAddr6(...) msg.match.ipv6_dst = IPAddr6(...) msg.actions.append(...) You need to specify match prerequisites, and you need to specify them in the correct order. For example, you can't match on ipv6_src (which corresponds to NXM type NXM_NX_IPV6_SRC) without first setting eth_type to IPv6 (NXM_OF_ETH_TYPE). Likewise, if you want to match TCP port numbers, you'd need to specify eth_type as IPv6, then ip_proto as TCP, and *then* the TCP port numbers. Exactly what is a prerequisite for what is a slightly sticky topic. I don't know of any OVS-specific documentation for it except for the code (though that doesn't mean it doesn't exist). The issue is discussed some in the context of OXM in the OpenFlow spec (at least in 1.3), and Open vSwitch/NXM should be similar. A good rule of thumb is that if you're doing a match for some layer N protocol "P", you should have matched for something in layer N-1 first that indicates that the packet actually contains protocol P (which is what my IPv6 and TCP examples above were getting at). It'd be nice if POX took care of this automatically, but it doesn't currently. It may never support it when using NXM or OXM directly -- I have played around a bit with an alternative match API which works for both OpenFlow 1.0 and NXM/OXM, and both orders prerequisites and can sometimes infer them. I'm not sure it's ready for prime time, though. :) > - I know that IPv6 uses NDP instead of ARP. I have the branch carp, so in > pox.lib.packet I've got ipv6.py and icmpv6.py but I haven't found nothing > about NDP... It's quite possible that it should be moved to its own file (feel free to submit a patch! ;) ), but the NDP stuff is in icmpv6.py. It's probably rough around the edges since it's all really new. If it gives you problems, let me know. -- Murphy