Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


Flow ID, Flow name, Cookie and Cookie mask

asked 2015-03-02 12:40:49 -0700

rolecram gravatar image

Hi guys: Someone can me explain the difference between these attributes in a flow JSON structure?

Flow ID (Is a mandatory attribute and must be unique?)

Flow Name (Is a mandatory attribute and must be unique?)

Cookie (Is an optional attribute and it is not passed to the switch, the principal goal is to group flows? In that case, can I send a DELETE flow command with a cookie value and all the flows with that cookie value will be deleted?

Cookie Mask (Is an optional attribute and lets to subgroup group flows?)

Is that correct?

Thank you in advance, marcelo

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-03-02 22:11:14 -0700

Vishal Thapar gravatar image

FlowID: Unique identifier for flow and must be unique for each flow. FlowName: Should be unique but am not sure if mandatory, I always use it.

Cookie: It is actually passed to the switch as it is one of the core fields of OpenFlow FlowMod message. It is OpenFlow specification way of identifying flows for modify/delete operations. Principal goal is to identify flows because there is no concept of FlowId or FlowName in OpenFlow. You can consider cookie the OF counterpart of ODL's FlowID, only that it need not be unique.

Switch will not use the cookie field when matching data packets in flow table so it doesn't need to reside in hardware [or kernel space for OVS]. Cookie is used only as a filter for get-stats, flow modifications and flow deletions.

Cookie Mask: Is an optional attribute that can be used to perform group operations on flows. This allows more options in how you use cookie.

e.g. Let us say I add flows where I use first 16bits of cookie to identify the tenant, next 16 for particular application/NSF in ODL and then rest of32bits for individual port [e.g. tap port in case of openstack VMs]. Now, if I want to delete all flows for a given tenant with tenant-id 0xfefe0000, I can use cookie/cookie-mask to do that with a 0xfefe000000000000/0xffff000000000000. Similarly, to delete all flows for port-id 0x11223344 of same tenant, I can use 0xfefe000011223344/0xffff0000ffffffff

Hope that helps.

edit flag offensive delete publish link more


Thanks a lot Vishal Thapar. Excelent answer.

rolecram ( 2015-03-03 07:39:30 -0700 )edit

Thanks Vishal for the answer, what is the criteria behind the generation of cookies? what factors or fields it will consider during generation

sunilkumarms ( 2017-08-21 22:17:23 -0700 )edit
Login/Signup to Answer

Question Tools



Asked: 2015-03-02 12:40:49 -0700

Seen: 2,278 times

Last updated: Mar 02 '15