On Nov 21, 2012, at 12:37 PM, Liyuan Wang wrote:
>     print "install flow for switch1"
>     msg.command = of.OFPFC_ADD
>     # msg.hard_timeout = LIFE
>     msg.flags = of.OFPFF_SEND_FLOW_REM
>     msg.match.in_port=packet_in.in_port
>     msg.match.dl_type = packet.type 
> 
> With the above line, I got entries like:
> 
> <image.png>
> 
> I want the above two entries to be in one entry.
> 
I think it's foggy in the OpenFlow 1.0 specification, but my understanding is 
that the "accepted" reading (and the one used by Open vSwitch) is that you 
can't specify IP addresses without specifying a specific ethertype that uses IP 
addresses.  Which is to say that what you want simply can't be done.  Instead, 
you need to install two flows.  If you're doing this to gather statistics and 
you want them together, you'll have to merge the two on the controller when you 
get the stats replies back (identify ones with matching IP ranges and sum the 
counters or whatever).  If you're doing this because you don't want to suffer 
the latency for installing a flow for ARP and then having to wait another round 
trip to the controller to install one for IP, you can just install them both at 
the same time.  If you want to do this to save table entries, I think you're 
out of luck.

>     msg.wildcards = of.OFPFW_NW_DST_SHIFT#+of.OFPFW_DL_TYPE+of.OFPFW_NW_PROTO
> 
I should make this clearer in the docs, I guess, but you should pretty much 
never set wildcards manually in POX.  I don't even know what the above line 
will do.  Delete it.

> I'm not quite sure what kind of switch I'm using. I'm using mininet to 
> generate the network by typing: sudo mn --custom ~/mininet/custom/example.py 
> --topo mytopo
Okay, knowing that you're using Mininet from the tutorial is enough.

> Where can I see the version of POX? I just downloaded it according to the 
> instructions on Openflow tutorial.
Again, that's enough to be helpful.


-- Murphy

Reply via email to