On Tue, Apr 7, 2015 at 10:35 PM, Ruchika Luthra < h2013...@pilani.bits-pilani.ac.in> wrote:
> I am trying to modify a header field by using set_action instruction. I > have been able to successfully add a flow table entry corresponding to > this. But how can I actually verify if the change has taken place > successfully in the packet. > > I have tried doing this: > > sudo dpctl unix:/tmp/s1 flow-mod cmd=add,table=0 > in_port=1,eth_dst=00:00:00:00:00:02 apply:output=2,set_field=eth_type=0x8848 > > The flow table entry has been successfully inserted. But how to make sure > that the change has been successfully applied? > Primarily the way that you would see this change is via a tap on the output port or running tcpdump on the end host in question. However, what you are asking the datapath to do is undefined, and, by the rules of the MPLS spec, illegal. You are asking the datapath to match any packet incoming on port 1 with a specific destination MAC, and to change the ethertype of this packet. How do you imagine this will work? Obviously the incoming packet has a specific format based on the original ethertype - do you imagine that the datapath will do whatever magic mapping is necessary to convert the packet? It most certainly will not do this - it will, at best (assuming it does not just drop the packet), simply overwrite the 16 bits of the ethertype field with your new value, essentially corrupting your packet. Also, 0x8848 is reserved for MPLS packets that are carried in multicast ethernet frames, but your match specifies a destination MAC address that is *not* multicast and thus would create a packet that will get dropped by any legacy MPLS hardware in your path (including host NICs, in a lot of cases). Perhaps you need to step back and explain what you are trying to accomplish at a high level, before asking how very specific things work. -- Nick
_______________________________________________ openflow-discuss mailing list openflow-discuss@lists.stanford.edu https://mailman.stanford.edu/mailman/listinfo/openflow-discuss