Responses inline.

On Mar 28, 2012, at 8:21 PM, bbs wrote:

> Problem 1:
> when I set the actions of the flow to send the packets to the NOX, as 
> actions=[openflow.OFPAT_OUTPUT, [0, openflow.OFPP_CONTROLLER], and the flow 
> sent to the NOX had no packet but only the BufferID of the packet, and when I 
> used the command of "dpctl dump-flows ****" to see the flows in the 
> openflow-switch, the flow's action, which was "output:controller:ALL", was 
> all right.

If you want to get the entire packet, you want to use a large value like 65535, 
not 0.  0 does exactly what it sounds like it should -- it sends 0 bytes of the 
packet to the controller.  In some older versions of OpenFlow, 0 had the 
special meaning of "send the whole packet", but that is no longer the case.


> Problem 2:
> when I set the actions of the flow to discard some packets, and the NOX 
> received some errors from the openflow-switch, the errors are as follows: 
> ERR: received OpenFlow error packet from dpid:********, type=2, code=4, 80 
> bytes of data.

I think type2/code4 is OFPET_BAD_ACTION/OFPBAC_BAD_OUT_PORT.  In other words, 
you seem to be sending an output action with a bad port number.  How are you 
attempting to discard the packet?  By sending an output action to OFPP_NONE, 
maybe?  Don't do that.  If you want to drop a packet, just don't set any 
actions at all.


> Problem 3:
> when I want to  extract the dhcp packet from the packet sent to the NOX, the 
> details of what I had done are as follows:
> #1 def packet_in_callback(dpid, inport, reason, len, bufferid, packet)
> #2     if not packet.parsed:
> #3         log.msg('Incomplete packet')
> #4     dhpacket = packet.find('dhcp')
> #5     if dhpacket:
> #6         .............................
> The function only execute to the 5th line, and the wireshark captured the 
> flow that included the dhcp packet. How the function could not find the dhcp 
> packet?

Can you provide a pcap capture of such a packet?


As a sidenote, if you're developing a Python-only application in NOX, you might 
want to take a look at POX.  Python support in NOX is being phased out for the 
foreseeable future.


-- Murphy

Reply via email to