CN106034133B - A kind of openflow processing method, message treatment method, controller and interchanger - Google Patents

A kind of openflow processing method, message treatment method, controller and interchanger Download PDF

Info

Publication number
CN106034133B
CN106034133B CN201510122496.4A CN201510122496A CN106034133B CN 106034133 B CN106034133 B CN 106034133B CN 201510122496 A CN201510122496 A CN 201510122496A CN 106034133 B CN106034133 B CN 106034133B
Authority
CN
China
Prior art keywords
field
flow
oxm
structural body
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510122496.4A
Other languages
Chinese (zh)
Other versions
CN106034133A (en
Inventor
杨永强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201510122496.4A priority Critical patent/CN106034133B/en
Publication of CN106034133A publication Critical patent/CN106034133A/en
Application granted granted Critical
Publication of CN106034133B publication Critical patent/CN106034133B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a kind of openflow processing methods, for realizing the expression of range in the case where guaranteeing compatibility.In openflow processing method provided in an embodiment of the present invention, controller determines the range in object matching domain;OFPT_FLOW_MOD message is generated, includes the range in the object matching domain in the target flow match field structural body of the OFPT_FLOW_MOD message;The OFPT_FLOW_MOD message is sent to interchanger.The range in object matching domain can be indicated since a flow match field structural body can be used only in method provided in an embodiment of the present invention, without two flow match field structural bodies, therefore only needing to modify the corresponding flow match field structural body in object matching domain can be realized range expression, it does not need to increase flow match field structural body newly in ofp_match structural body, the size of ofp_match structural body is not changed, meet the specification of Openflow agreement, compatibility is preferably.The embodiment of the invention also provides relevant message treatment method, controller and interchangers.

Description

A kind of openflow processing method, message treatment method, controller and interchanger
Technical field
The present invention relates to internet area more particularly to a kind of openflow processing methods, message treatment method, controller With interchanger.
Background technique
Open flows (openflow) technology is a kind of south orientation agreement that Stanford University proposes, it uses for reference the development of IT industry Journey, by control and forward separating, the generalization of software implementation and forwarding hardware platform accelerates the change of network in domination set. Important equipment in OpenFlow technology includes controller and interchanger, and wherein interchanger is core component, is assisted by OpenFlow View, exit passageway and flow table three parts composition;Controller issues flow entry into the flow table of interchanger by exit passageway, exchange Machine is matched the operation such as (match) according to flow table.But the matching domain of traditional openflow agreement does not express range Support, when needing to complete range expression, openflow needs are expressed by refining, for example user wishes to 5000- 6000 ports access control, if being done using ACL, can be accomplished using 1 flow table;If with openflow come It does, because openflow does not support the expression of range, flow entry can only be configured by accurate expression, need 1000 essences Really expression, generates 1000 flow entrys.Thus waste limited flow table resource.
Openflow agreement is that interchanger flow table is configured by OFPT_FLOW_MOD message, and OFPT_FLOW_MOD disappears It include match structural body (i.e. ofp_match structural body) and action structural body in breath, wherein ofp_match structural body is used for The compatible portion of flow table is described.Ofp_match structural body includes multiple flow match field structural bodies, in order to realize range Expression, generally increase new flow match field structural body in ofp_match structural body in technology at this stage, and Using the corresponding flow match field structural body of matching domain and newly-increased flow match field structural body, to distinguish Indicate the initial value and end value of the range of matching domain.
But the size of the ofp_match structural body of Openflow specific protocol version is fixed, technology at this stage Used method has changed the structure of ofp_match structural body, does not meet the specification of Openflow agreement, destroys controller Compatibility between interchanger, can not backward compatibility.
Summary of the invention
The embodiment of the invention provides a kind of openflow processing methods, for realizing model in the case where guaranteeing compatibility The expression enclosed.
The first aspect of the embodiment of the present invention provides a kind of open flows openflow processing method, comprising:
Determine the range in object matching domain, bitmask bitmask is not supported in the object matching domain;
OFPT_FLOW_MOD message is generated, the OFPT_FLOW_MOD message includes ofp_match structural body, described Ofp_match structural body includes and one or more matching domains one or more flow match field structure correspondingly Body includes target flow corresponding with the object matching domain in one or more of flow match field structural bodies Match field structural body includes the range in the object matching domain in the target flow match field structural body;
The OFPT_FLOW_MOD message is sent to interchanger.
In conjunction with the embodiment of the present invention in a first aspect, in the first implementation of the first aspect of the embodiment of the present invention, It include head and body in each flow match field structural body, the head includes oxm_hasmask field, When the value of the oxm_hasmask field is 1, the body includes oxm_mask field and oxm_value field;
In the target flow match field structural body, the value of oxm_hasmask field is 1, oxm_mask word Segment table shows that the initial value of the range in the object matching domain, oxm_value field indicate the knot of the range in the object matching domain Beam value;
Or,
In the target flow match field structural body, the value of oxm_hasmask field is 1, oxm_mask word Segment table shows that the end value of the range in the object matching domain, oxm_value field indicate rising for the range in the object matching domain Initial value.
In conjunction with the first aspect of the embodiment of the present invention or the first implementation of first aspect, the of the embodiment of the present invention In second of implementation of one side, the object matching domain includes: the domain OXM_OF_TCP_SRC, OXM_OF_TCP_DST Domain, the domain OFPXMT_OFB_UDP_SRC, the domain OFPXMT_OFB_UDP_DST, the domain OFPXMT_OFB_SCTP_SRC or OFPXMT_ The domain OFB_SCTP_DST.
The second aspect of the embodiment of the present invention provides a kind of open flows openflow processing method, comprising:
Determine the range in object matching domain;
The first OFPT_FLOW_MOD message is generated, the first OFPT_FLOW_MOD message includes ofp_match structure Body, the ofp_match structural body include and one or more matching domains one or more flow match correspondingly Field structural body includes corresponding with the object matching domain in one or more of flow match field structural bodies First object flow match field structural body, the first object flow match field structural body includes the target The initial value of the range of matching domain;
The first OFPT_FLOW_MOD message is sent to interchanger;
The 2nd OFPT_FLOW_MOD message is generated, the 2nd OFPT_FLOW_MOD message includes ofp_match structure Body, the ofp_match structural body include and one or more matching domains one or more flow match correspondingly Field structural body includes corresponding with the object matching domain in one or more of flow match field structural bodies Second target flow match field structural body, the second target flow match field structural body includes the target The end value of the range of matching domain;
The 2nd OFPT_FLOW_MOD message is sent to interchanger.
In conjunction with the second aspect of the embodiment of the present invention, in the first implementation of the second aspect of the embodiment of the present invention, Each flow match field structural body includes head and body, and the head includes oxm_hasmask field, when When the value of the oxm_hasmask field is 1, the body includes oxm_mask field and oxm_value field;
In the first object flow match field structural body, the value of oxm_hasmask is 1, oxm_mask word The value of section is the initial value for the range that complete 1, oxm_value field indicates the object matching domain;The second target flow In match field, the value of oxm_hasmask field is that the value of 1, oxm_mask field is complete 1, oxm_value field Indicate the end value of the range in the object matching domain.
The third aspect of the embodiment of the present invention provides a kind of message treatment method, comprising:
The OFPT_FLOW_MOD message that controller is sent is received, the OFPT_FLOW_MOD message includes ofp_match Structural body, the ofp_match structural body include and one or more matching domains one or more flow correspondingly Match field structural body includes corresponding with object matching domain in one or more of flow match field structural bodies Target flow match field structural body, include the object matching in the target flow match field structural body The range in domain, wherein do not support bitmask bitmask in the object matching domain;
According to the target flow match field structural body, the range in the object matching domain is determined.
In conjunction with the third aspect of the embodiment of the present invention, in the first implementation of the third aspect of the embodiment of the present invention, It include head and body in each flow match field structural body, the head includes oxm_hasmask field, The value of the oxm_hasmask field of the target flow match field structural body is 1, the target flow match The body of field structural body includes oxm_mask field and oxm_value field;
It is described according to the target flow match field structural body, determine that the range in the object matching domain includes:
Using the oxm_mask field of the target flow match field structural body as the model in the object matching domain The initial value enclosed, using oxm_value field as the end value of the range in the object matching domain;
Or,
Using the oxm_mask field of the target flow match field structural body as the model in the object matching domain The end value enclosed, using oxm_value field as the initial value of the range in the object matching domain.
In conjunction with the third aspect of the embodiment of the present invention or the first implementation of the third aspect, the of the embodiment of the present invention In second of implementation of three aspects, the object matching domain includes: the domain OXM_OF_TCP_SRC, OXM_OF_TCP_DST Domain, the domain OFPXMT_OFB_UDP_SRC, the domain OFPXMT_OFB_UDP_DST, the domain OFPXMT_OFB_SCTP_SRC or OFPXMT_ The domain OFB_SCTP_DST.
The fourth aspect of the embodiment of the present invention provides a kind of message treatment method, comprising:
The first OFPT_FLOW_MOD message that controller is sent is received, the first OFPT_FLOW_MOD message includes Ofp_match structural body, the ofp_match structural body include one or more correspondingly with one or more matching domains Flow match field structural body includes and object matching domain in one or more of flow match field structural bodies Corresponding first object flow match field structural body, the first object flow match field structural body includes institute State the initial value of the range in object matching domain;
The starting of the range in the object matching domain is obtained from the first object flow match field structural body Value;
The 2nd OFPT_FLOW_MOD message that controller is sent is received, the 2nd OFPT_FLOW_MOD message includes Ofp_match structural body, the ofp_match structural body include one or more correspondingly with one or more matching domains Flow match field structural body includes and object matching domain in one or more of flow match field structural bodies Corresponding second target flow match field structural body, the second target flow match field structural body includes institute State the end value of the range in object matching domain;
The end of the range in the object matching domain is obtained from the second target flow match field structural body Value.
In conjunction with the fourth aspect of the embodiment of the present invention, in the first implementation of the fourth aspect of the embodiment of the present invention, Each flow match field structural body includes head and body, and the head includes oxm_hasmask field, institute It states in first object flow match field structural body and the second target flow match field structural body: oxm_ The value of hasmask field is 1, body includes oxm_mask field and oxm_value field, wherein oxm_mask field Value is complete 1;
The range that the object matching domain is obtained from the first object flow match field structural body Initial value includes: using the oxm_value field of the first object flow match field structural body as the target The initial value of range with domain;
The range that the object matching domain is obtained from the second target flow match field structural body End value includes: using the oxm_value field of the second target flow match field structural body as the target The end value of range with domain.
In conjunction with the first implementation of the fourth aspect of the embodiment of the present invention, the of the fourth aspect of the embodiment of the present invention In two kinds of implementations, after the first OFPT_FLOW_MOD message for receiving controller transmission further include:
By in one or more of flow match field structural bodies, the value of the oxm_hasmask field on head It is 1, and the flow match field structural body that the value of body oxm_mask field is complete 1, is determined as first object Flow match field structural body, and the corresponding matching domain of the first object flow match field structural body is determined For object matching domain;
Before the 2nd OFPT_FLOW_MOD message for receiving controller transmission further include:
If in the OFPT_FLOW_MOD message that the controller is sent, flow corresponding with the object matching domain The value of the oxm_hasmask field on the head of match field structural body is 1, and the value of body oxm_mask field It is complete 1, then the OFPT_FLOW_MOD message that the controller is sent is determined as the 2nd OFPT_FLOW_MOD message;
Or,
After the 2nd OFPT_FLOW_MOD message for receiving controller transmission further include:
By in one or more of flow match field structural bodies, the value of the oxm_hasmask field on head It is 1, and the flow match field structural body that the value of body oxm_mask field is complete 1, is determined as the second target Flow match field structural body, and the corresponding matching domain of the second target flow match field structural body is determined For object matching domain;
Before the first OFPT_FLOW_MOD message for receiving controller transmission further include:
If in the OFPT_FLOW_MOD message that the controller is sent, flow corresponding with the object matching domain The value of the oxm_hasmask field on the head of match field structural body is 1, and the value of body oxm_mask field It is complete 1, then the OFPT_FLOW_MOD message that the controller is sent is determined as the first OFPT_FLOW_MOD message.
5th aspect of the embodiment of the present invention provides a kind of controller, comprising:
Range determination module, for determining the range in object matching domain, bitmask is not supported in the object matching domain bitmask;
Message generating module, for generating OFPT_FLOW_MOD message, the OFPT_FLOW_MOD message includes ofp_ Match structural body, the ofp_match structural body include and one or more matching domains one or more flow correspondingly Match field structural body includes and the object matching domain in one or more of flow match field structural bodies Corresponding target flow match field structural body includes the target in the target flow match field structural body The range of matching domain;
Message transmission module, for the OFPT_FLOW_MOD message to be sent to interchanger.
In conjunction with the embodiment of the present invention the 5th aspect, the embodiment of the present invention the 5th aspect the first implementation in, It include head and body in each flow match field structural body, the head includes oxm_hasmask field, When the value of the oxm_hasmask field is 1, the body includes oxm_mask field and oxm_value field;
In the target flow match field structural body, the value of oxm_hasmask field is 1, oxm_mask word Segment table shows that the initial value of the range in the object matching domain, oxm_value field indicate the knot of the range in the object matching domain Beam value;
Or,
In the target flow match field structural body, the value of oxm_hasmask field is 1, oxm_mask word Segment table shows that the end value of the range in the object matching domain, oxm_value field indicate rising for the range in the object matching domain Initial value.
In conjunction with the 5th aspect of the embodiment of the present invention or the first implementation of the 5th aspect, the of the embodiment of the present invention In second of implementation of five aspects, the object matching domain includes: the domain OXM_OF_TCP_SRC, OXM_OF_TCP_DST Domain, the domain OFPXMT_OFB_UDP_SRC, the domain OFPXMT_OFB_UDP_DST, the domain OFPXMT_OFB_SCTP_SRC or OFPXMT_ The domain OFB_SCTP_DST.
6th aspect of the embodiment of the present invention provides a kind of controller, comprising:
Range module is determined, for determining the range in object matching domain;
Message module is generated, for generating the first OFPT_FLOW_MOD message, the first OFPT_FLOW_MOD message Including ofp_match structural body, the ofp_match structural body include with one or more matching domains it is one-to-one one or Multiple flow match field structural bodies include and the mesh in one or more of flow match field structural bodies Mark the corresponding first object flow match field structural body of matching domain, the first object flow match field structure Body includes the initial value of the range in the object matching domain;
Message module is sent, for the first OFPT_FLOW_MOD message to be sent to interchanger;
The generation message module is also used to generate the 2nd OFPT_FLOW_MOD message, the 2nd OFPT_FLOW_ MOD message includes ofp_match structural body, and the ofp_match structural body includes corresponding with one or more matching domains One or more flow match field structural bodies, include in one or more of flow match field structural bodies The second target flow match field structural body corresponding with the object matching domain, the second target flow match Field structural body includes the end value of the range in the object matching domain;
The transmission message module is also used to the 2nd OFPT_FLOW_MOD message being sent to interchanger.
In conjunction with the embodiment of the present invention the 6th aspect, the embodiment of the present invention the 6th aspect the first implementation in, Each flow match field structural body includes head and body, and the head includes oxm_hasmask field, when When the value of the oxm_hasmask field is 1, the body includes oxm_mask field and oxm_value field;
In the first object flow match field structural body, the value of oxm_hasmask is 1, oxm_mask word The value of section is the initial value for the range that complete 1, oxm_value field indicates the object matching domain;The second target flow In match field, the value of oxm_hasmask field is that the value of 1, oxm_mask field is complete 1, oxm_value field Indicate the end value of the range in the object matching domain.
7th aspect of the embodiment of the present invention provides a kind of interchanger, comprising:
Message reception module, for receiving the OFPT_FLOW_MOD message of controller transmission, the OFPT_FLOW_MOD Message includes ofp_match structural body, and the ofp_match structural body includes and one or more matching domains one-to-one one A or multiple flow match field structural bodies include and mesh in one or more of flow match field structural bodies The corresponding target flow match field structural body of matching domain is marked, includes in the target flow match field structural body The range in the object matching domain, wherein do not support bitmask bitmask in the object matching domain;
Message processing module, for determining the object matching according to the target flow match field structural body The range in domain.
In conjunction with the embodiment of the present invention the 7th aspect, the embodiment of the present invention the 7th aspect the first implementation in, It include head and body in each flow match field structural body, the head includes oxm_hasmask field, The value of the oxm_hasmask field of the target flow match field structural body is 1, the target flow match The body of field structural body includes oxm_mask field and oxm_value field;
The message processing module is specifically used for: by the oxm_mask word of the target flow match field structural body The initial value of the range in object matching domain described in Duan Zuowei, using oxm_value field as the range in the object matching domain End value;Or, using the oxm_mask field of the target flow match field structural body as the object matching domain The end value of range, using oxm_value field as the initial value of the range in the object matching domain.
In conjunction with the 7th aspect of the embodiment of the present invention or the first implementation of the 7th aspect, the of the embodiment of the present invention In second of implementation of seven aspects, the object matching domain includes: the domain OXM_OF_TCP_SRC, OXM_OF_TCP_DST Domain, the domain OFPXMT_OFB_UDP_SRC, the domain OFPXMT_OFB_UDP_DST, the domain OFPXMT_OFB_SCTP_SRC or OFPXMT_ The domain OFB_SCTP_DST.
The eighth aspect of the embodiment of the present invention provides a kind interchanger, comprising:
Message module is received, for receiving the first OFPT_FLOW_MOD message of controller transmission, the first OFPT_ FLOW_MOD message includes ofp_match structural body, the ofp_match structural body include with one or more matching domains one by one Corresponding one or more flow match field structural body, in one or more of flow match field structural bodies Including first object flow match field structural body corresponding with object matching domain, the first object flow match Field structural body includes the initial value of the range in the object matching domain;
Message module is handled, for obtaining the target from the first object flow match field structural body The initial value of range with domain;
The message module that receives is also used to: the 2nd OFPT_FLOW_MOD message that reception controller is sent, and described second OFPT_FLOW_MOD message includes ofp_match structural body, and the ofp_match structural body includes matching with one or more One or more flow match field structural body, one or more of flow match field are tied correspondingly in domain It include the second target flow match field structural body corresponding with object matching domain, the second target flow in structure body Match field structural body includes the end value of the range in the object matching domain;
The processing message module is also used to: described in obtaining from the second target flow match field structural body The end value of the range in object matching domain.
In conjunction with the eighth aspect of the embodiment of the present invention, in the first implementation of the eighth aspect of the embodiment of the present invention, Each flow match field structural body includes head and body, and the head includes oxm_hasmask field, institute It states in first object flow match field structural body and the second target flow match field structural body: oxm_ The value of hasmask field is 1, body includes oxm_mask field and oxm_value field, wherein oxm_mask field Value is complete 1;
The processing message module is specifically used for: by the oxm_ of the first object flow match field structural body Initial value of the value field as the range in the object matching domain;By the second target flow match field structure End value of the oxm_value field of body as the range in the object matching domain.
In conjunction with the first implementation of the eighth aspect of the embodiment of the present invention, the of the eighth aspect of the embodiment of the present invention In two kinds of implementations, the processing message module is gone back after receiving the first OFPT_FLOW_MOD message that controller is sent For: by one or more of flow match field structural bodies, the value of the oxm_hasmask field on head is 1, And the flow match field structural body that the value of body oxm_mask field is complete 1, it is determined as first object flow Match field structural body, and the corresponding matching domain of the first object flow match field structural body is determined as mesh Mark matching domain;The processing message module is also used to before receiving the 2nd OFPT_FLOW_MOD message that controller is sent: if In the OFPT_FLOW_MOD message that the controller is sent, flow match field knot corresponding with the object matching domain The value of the oxm_hasmask field on the head of structure body is 1, and the value of body oxm_mask field is complete 1, then will be described The OFPT_FLOW_MOD message that controller is sent is determined as the 2nd OFPT_FLOW_MOD message;
Or, the processing message module is also used to after receiving the 2nd OFPT_FLOW_MOD message that controller is sent: By in one or more of flow match field structural bodies, the value of the oxm_hasmask field on head is 1, and body The flow match field structural body that the value of body portion oxm_mask field is complete 1, is determined as the second target flow match Field structural body, and the corresponding matching domain of the second target flow match field structural body is determined as object matching Domain;The processing message module is also used to before receiving the first OFPT_FLOW_MOD message that controller is sent: if the control In the OFPT_FLOW_MOD message that device processed is sent, flow match field structural body corresponding with the object matching domain The value of the oxm_hasmask field on head is 1, and the value of body oxm_mask field is complete 1, then by the controller The OFPT_FLOW_MOD message of transmission is determined as the first OFPT_FLOW_MOD message.
In openflow processing method provided in an embodiment of the present invention, controller determines the range in object matching domain;It generates OFPT_FLOW_MOD message, the OFPT_FLOW_MOD message include ofp_match structural body, and ofp_match structural body includes Multiple flow match field structural bodies include that object matching domain is corresponding in multiple flow match field structural body Target flow match field structural body includes the object matching domain in target flow match field structural body Range;The OFPT_FLOW_MOD message is sent to interchanger.Since method provided in an embodiment of the present invention can be used only One flow match field structural body can indicate the range in object matching domain, without two flow match Field structural body, therefore only need to modify the corresponding flow match field structural body in object matching domain and range can be realized Expression does not need to increase flow match field structural body newly in ofp_match structural body, does not change ofp_match knot The size of structure body meets the specification of Openflow agreement, and compatibility is preferably.
Detailed description of the invention
Fig. 1 is the basic structure of ofp_match structural body in Openflow agreement;
Fig. 2 is openflow processing method one embodiment flow chart in the embodiment of the present invention;
Fig. 3 is message treatment method one embodiment flow chart in the embodiment of the present invention;
Fig. 4 is another embodiment flow chart of openflow processing method in the embodiment of the present invention;
Fig. 5 is another embodiment flow chart of message treatment method in the embodiment of the present invention;
Fig. 6 is controller one embodiment structure chart in the embodiment of the present invention;
Fig. 7 is interchanger one embodiment structure chart in the embodiment of the present invention;
Fig. 8 is another example structure figure of controller in the embodiment of the present invention;
Fig. 9 is another example structure figure of interchanger in the embodiment of the present invention;
Figure 10 is controller or interchanger another example structure figure in the embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides a kind of openflow processing methods, for realizing model in the case where guaranteeing compatibility The expression enclosed.The embodiment of the invention also provides relevant controller and interchangers, will be described respectively below.
Openflow agreement is that interchanger flow table is configured by OFPT_FLOW_MOD message, and OFPT_FLOW_MOD disappears It include match structural body (i.e. ofp_match structural body) and action structural body in breath, wherein ofp_match structural body is used for The compatible portion of flow table is described, it includes multiple flow match that basic structure, which please refers to Fig. 1: ofp_match structural body, Field structural body, each flow match field structural body are TLV (Type Length Value) format, and one corresponding Matching domain.Each flow match field structural body includes head and body.Wherein, head includes oxm_class, oxm_ Field, oxm_hasmask and oxm_length field, oxm_class field and oxm_field field have codetermined matching The type in domain, oxm_hasmask field indicate whether have bitmask (bitmask) in body, and oxm_length field indicates The length of body.When oxm_hasmask field is 0, there was only oxm_value field in body, for indicating the matching domain Exact value;When oxm_hasmask field is 1, in addition to oxm_value field in body, there is also a length with The same oxm_mask field of oxm_value field, oxm_mask field is for indicating bitmask.
At this stage in matching domain as defined in openflow agreement, some matching domains support bitmask, some matching domains not to prop up Bitmask is held, such as the domain OXM_OF_TCP_SRC, the domain OXM_OF_TCP_DST, the domain OFPXMT_OFB_UDP_SRC, OFPXMT_ The domain OFB_UDP_DST, the domain OFPXMT_OFB_SCTP_SRC or the domain OFPXMT_OFB_SCTP_DST etc..For not supporting For the corresponding ofp_match structural body of the matching domain of bitmask, oxm_hasmask field and oxm_mask field are without real Border meaning.And in openflow agreement at this stage, demand of the matching domain of bitmask without range expression is supported, only There is the matching domain for not supporting bitmask may require that and carries out range expression.Therefore, do not support the matching domain of bitmask corresponding Oxm_hasmask field and oxm_mask field can be used to implement the expression of range.
On the basis of above-mentioned discussion, the embodiment of the invention provides a kind of openflow processing method, basic procedures Referring to Fig. 2, specifically including that
201, the range in object matching domain is determined;
The range expression in object matching domain may be implemented in method provided in this embodiment.Firstly, controller is it needs to be determined that mesh Mark matching domain and object matching domain range to be expressed.Wherein, bitmask is not supported in object matching domain.
202, OFPT_FLOW_MOD message is generated;
Controller generates OFPT_FLOW_MOD message, which includes ofp_match structural body, Ofp_match structural body includes that one or more flow match field is tied correspondingly with one or more matching domains again Structure body.It wherein, include object matching domain, flow match corresponding with object matching domain in the one or more matching domain Field structural body is known as target flow match field structural body, wherein wraps in target flow match field structural body Include the range in object matching domain.Wherein, target flow match field structural body can record target by many modes The range of matching domain, in the present embodiment without limitation.
203, OFPT_FLOW_MOD message is sent to interchanger.
The OFPT_FLOW_MOD message of generation is sent to interchanger by controller, allows interchanger according to the OFPT_ FLOW_MOD message knows the range in object matching domain, and then configures range flow table.
In openflow processing method provided in this embodiment, controller determines the range in object matching domain;Generate OFPT_ FLOW_MOD message, the OFPT_FLOW_MOD message include ofp_match structural body, and the ofp_match structural body includes The corresponding target flow match field structural body in object matching domain includes in target flow match field structural body The range in object matching domain;The OFPT_FLOW_MOD message is sent to interchanger.Due to side provided in an embodiment of the present invention A flow match field structural body, which can be used only, in method can indicate the range in object matching domain, without two Flow match field structural body, therefore only need to modify the corresponding flow match field structural body in object matching domain i.e. Range expression can be realized, do not need to increase flow match field structural body newly in ofp_match structural body, not change The size of dynamic ofp_match structural body meets the specification of Openflow agreement, and compatibility is preferably.
Oxm_ particularly as another embodiment of the invention, in target flow match field structural body Hasmask field is 1.Since bitmask is not supported in the object matching domain, the oxm_hasmask field in body and Oxm_mask field does not have practical significance, can be used to implement the expression of range.Specifically, can be indicated with oxm_mask field The initial value of the range in object matching domain, oxm_value field indicate the end value of the range in object matching domain, or use oxm_ Mask field indicates that the end value of the range in object matching domain, oxm_value field indicate the starting of the range in object matching domain Value, herein without limitation.
Above-described embodiment gives the specific method that controller carries out openflow expression, and the following examples work as description When controller uses above-mentioned openflow processing method, the corresponding message treatment method used of interchanger, basic procedure please join Read Fig. 3, comprising:
301, the OFPT_FLOW_MOD message that controller is sent is received;
Interchanger receives the OFPT_FLOW_MOD message that controller is sent, and includes ofp_ in OFPT_FLOW_MOD message Match structural body, ofp_match structural body include and one or more matching domains one or more flow correspondingly Match field structural body includes object matching domain in the one or more matching domain, which does not support bitmask.The corresponding flow match field structural body in object matching domain is known as target flow match field structural body, It wherein, include the range in object matching domain in target flow match field structural body.
302, according to target flow match field structural body, the range in object matching domain is determined.
Interchanger determines the range in object matching domain according to target flow match field structural body.Target has been determined After the range of matching domain, interchanger can configure range flow table according to the range in object matching domain.
In message treatment method provided in this embodiment, interchanger receives the OFPT_FLOW_MOD message that controller is sent, It wherein, include target flow match field structural body, target flow match field knot in OFPT_FLOW_MOD message It include the range in object matching domain in structure body.Interchanger determines object matching according to target flow match field structural body The range in domain.In method provided in this embodiment, interchanger is only known from a target flow match field structural body The range in object matching domain without two flow match field structural bodies, therefore is not needed in ofp_match structure It increases flow match field structural body in body newly, does not change the size of ofp_match structural body, meet Openflow agreement Specification, compatibility preferably.
Oxm_ particularly as another embodiment of the invention, in target flow match field structural body Hasmask field is 1.Since bitmask is not supported in object matching domain, oxm_hasmask field in body and Oxm_mask field does not have practical significance, can be used to implement the expression of range.Specifically, interchanger can be by oxm_ The flow match field structural body that hasmask field is 1 is determined as flow match field structural body, and by target Initial value of the oxm_mask field of flow match field structural body as the range in object matching domain, by oxm_value End value of the field as the range in object matching domain;Interchanger can also be by target flow match field structural body End value of the oxm_mask field as the range in object matching domain, using oxm_value field as the range in object matching domain Initial value, in the present embodiment without limitation, but interchanger is to the regulation of the meaning of oxm_mask field, oxm_value field It should be consistent with the regulation of corresponding controller.
In above-described embodiment, bitmask is not supported in object matching domain, due to propping up in openflow agreement at this stage Demand of the matching domain of bitmask without range expression is held, the matching domain of bitmask is not only supported to may require that carry out range It expresses, in the corresponding ofp_match structural body of matching domain without supporting bitmask, oxm_hasmask field and oxm_mask Field does not have a practical significance, thus by the corresponding oxm_hasmask field in object matching domain and oxm_mask field for realizing The expression of range.If but evolution occurs for future openflow agreement, does not support the matching domain of bitmask to be also possible to support originally Bitmask causes the domain for supporting bitmask to be also required to carry out range expression.For this potential demand, the present invention provides another A kind of openflow processing method, basic procedure is referring to Fig. 4, specifically include that
401, the range in object matching domain is determined;
The range expression in object matching domain may be implemented in method provided in this embodiment.Firstly, controller is it needs to be determined that mesh Mark matching domain and object matching domain range to be expressed.In the present embodiment, object matching domain can support bitmask, can also Not support bitmask, in the present embodiment without limitation.
402, the first OFPT_FLOW_MOD message is generated;
Controller generates the first OFPT_FLOW_MOD message, and the first OFPT_FLOW_MOD message includes ofp_match Structural body, ofp_match structural body include and one or more matching domains one or more flow match correspondingly again Field structural body.It wherein, include object matching domain, flow corresponding with object matching domain in the one or more matching domain Match field structural body is known as first object flow match field structural body, first object flow match field The initial value of range in structural body including object matching domain.
403, the first OFPT_FLOW_MOD message is sent to interchanger;
First OFPT_FLOW_MOD message of generation is sent to interchanger by controller, allows interchanger according to this First OFPT_FLOW_MOD message knows the initial value of the range in object matching domain.
404, the 2nd OFPT_FLOW_MOD message is generated;
Controller generates the 2nd OFPT_FLOW_MOD message, and the 2nd OFPT_FLOW_MOD message has and first The similar structure of OFPT_FLOW_MOD message, specifically includes ofp_match structural body, and ofp_match structural body includes and one again A or multiple matching domains one or more flow match field structural body correspondingly.Wherein, the one or more With, including object matching domain, flow match field structural body corresponding with object matching domain is known as the second target flow in domain Match field structural body includes the end of the range in object matching domain in the second target flow match field structural body Value.
405, the 2nd OFPT_FLOW_MOD message is sent to interchanger.
2nd OFPT_FLOW_MOD message of generation is sent to interchanger by controller, allows interchanger according to this 2nd OFPT_FLOW_MOD message knows the end value of the range in object matching domain.
Wherein, step 404 and/or 405 can also be located at step 402 or 403 before, in the present embodiment without limitation.Its In, after interchanger receives first and second OFPT_FLOW_MOD message, so that it may know the starting of the range in object matching domain Value and end value, and then configure range flow table.
In openflow processing method provided in this embodiment, controller determines the range in object matching domain;Generate first OFPT_FLOW_MOD message, the first OFPT_FLOW_MOD message include the initial value of the range in object matching domain;Controller First OFPT_FLOW_MOD message is sent to interchanger;Generate the 2nd OFPT_FLOW_MOD message, the 2nd OFPT_ FLOW_MOD message includes the end value of the range in object matching domain;Controller sends out the 2nd OFPT_FLOW_MOD message Interchanger is given, interchanger is enabled to know the range in object matching domain.Method provided in an embodiment of the present invention is used only two OFPT_FLOW_MOD message expresses the range in object matching domain, and only changes mesh in every OFPT_FLOW_MOD message The corresponding flow match field structural body of matching domain is marked, does not need to increase flow newly in ofp_match structural body Match field structural body, does not change the size of ofp_match structural body, therefore meets the specification of Openflow agreement, simultaneous Capacitive is preferable.
In embodiment shown in Fig. 4, object matching domain can support bitmask, and when bitmask is supported in object matching domain When, the oxm_hasmask field in the corresponding flow match field structural body in object matching domain is 1, oxm_mask field Indicate bitmask, and oxm_mask field cannot be complete 1, therefore the table of range can be realized with complete 1 oxm_mask field It reaches.Specifically, as another embodiment of the invention, in first object flow match field structural body, oxm_ The value of hasmask is that the value of 1, oxm_mask field is the model that complete 1, oxm_value field indicates the object matching domain The initial value enclosed;In second target flow match field, the value of oxm_hasmask field is 1, oxm_mask field Value is the end value for the range that complete 1, oxm_value field indicates the object matching domain.
Embodiment shown in Fig. 4 gives the specific method that controller carries out openflow expression, and the following examples will Description is when controller uses the openflow processing method, the corresponding message treatment method used of interchanger, basic procedure Referring to Fig. 5, including:
501, the first OFPT_FLOW_MOD message that controller is sent is received;
Interchanger receives the first OFPT_FLOW_MOD message that controller is sent, the first OFPT_FLOW_MOD message package Ofp_match structural body is included, ofp_match structural body includes one or more correspondingly with one or more matching domains again Flow match field structural body.It wherein, include object matching domain in the one or more matching domain, with object matching domain pair The flow match field structural body answered is known as first object flow match field structural body, first object flow The initial value of range in match field structural body including object matching domain.
502, the initial value of the range in object matching domain is obtained from first object flow match field structural body;
Interchanger obtains institute from the first object flow match field structural body in the first OFPT_FLOW_MOD State the initial value of the range in object matching domain.
503, the 2nd OFPT_FLOW_MOD message that controller is sent is received;
Interchanger receives the 2nd OFPT_FLOW_MOD message that controller is sent, the 2nd OFPT_FLOW_MOD message tool There is structure similar with the first OFPT_FLOW_MOD message, specifically includes ofp_match structural body, ofp_match structural body is again Including with one or more matching domains one or more flow match field structural body correspondingly.Wherein, this Or include object matching domain in multiple matching domains, flow match field structural body corresponding with object matching domain is known as second Target flow match field structural body includes the model in object matching domain in the second target flow match field structural body The end value enclosed.
504, the end value of the range in object matching domain is obtained from the second target flow match field structural body.
Interchanger obtains institute from the second target flow match field structural body in the 2nd OFPT_FLOW_MOD State the end value of the range in object matching domain.
Wherein, step 503 and/or 504 can also be located at step 501 or 502 before, in the present embodiment without limitation.
Wherein, after interchanger has known the initial value and end value in object matching domain, so that it may according to object matching domain Range configures range flow table.
In message treatment method provided in this embodiment, interchanger receives the first OFPT_FLOW_MOD that controller is sent Message, and from first object flow match field structural body obtain object matching domain range initial value;Receive control The 2nd OFPT_FLOW_MOD message that device processed is sent, and target is obtained from the second target flow match field structural body The end value of the range of matching domain, such interchanger can know the expression range in object matching domain.The embodiment of the present invention mentions The method of confession expresses the range in object matching domain, and every OFPT_FLOW_MOD using only two OFPT_FLOW_MOD message The corresponding flow match field structural body in object matching domain is only changed in message, does not need to tie in ofp_match It increases flow match field structural body in structure body newly, does not change the size of ofp_match structural body, therefore meet The specification of Openflow agreement, compatibility is preferably.
In embodiment shown in fig. 5, object matching domain can support bitmask, and when bitmask is supported in object matching domain When, the oxm_hasmask field in the corresponding flow match field structural body in object matching domain is 1, oxm_mask field Indicate bitmask, and oxm_mask field cannot be complete 1, therefore the table of range can be realized with complete 1 oxm_mask field It reaches.Specifically, as another embodiment of the invention, first object flow match field structural body and the second target In flow match field structural body: the value of oxm_hasmask field is 1, body include oxm_mask field with Oxm_value field, wherein the value of oxm_mask field is complete 1, and interchanger ties first object flow match field Initial value of the oxm_value field of structure body as the range in object matching domain ties the second target flow match field End value of the oxm_value field of structure body as the range in object matching domain.
Wherein, in order to the range in determining object matching domain, interchanger is needed from a plurality of OFPT_FLOW_ received In MOD message, determination includes the initial value in object matching domain and two OFPT_FLOW_MOD message of end value.With exchange Machine first receives the first OFPT_FLOW_MOD message, then for receiving the 2nd OFPT_FLOW_MOD message, specific: if interchanger OFPT_FLOW_MOD message is had received, there is the oxm_ on the head of a flow match field structural body in the message The value of hasmask field is 1, and the value of body oxm_mask field is complete 1, then interchanger is by the flow match The corresponding matching domain of field structural body is determined as object matching domain, due to not having to save the range in object matching domain in interchanger Initial value, old friend change planes determine the flow match field structural body be first object flow match field structure Body, the OFPT_FLOW_MOD message are the first OFPT_FLOW_MOD message.Interchanger determines first object flow match In field structural body, oxm_value field is the initial value of the range in object matching domain, and saves rising for the object matching domain Initial value.When controller receives OFPT_FLOW_MOD message again, and in the OFPT_FLOW_MOD message with object matching domain The value of the oxm_hasmask field on the head of corresponding flow match field structural body is 1, and body oxm_mask When the value of field is complete 1, since interchanger has saved the initial value of the range in object matching domain, so interchanger will again The secondary OFPT_FLOW_MOD message received is determined as the 2nd OFPT_FLOW_MOD message, and by the 2nd OFPT_FLOW_MOD In message, the oxm_value field in the corresponding flow match field structural body in object matching domain is as object matching domain Range end value.When interchanger first receives the 2nd OFPT_FLOW_MOD message, then receives the first OFPT_FLOW_MOD and disappear When breath, the method for determining the first OFPT_FLOW_MOD message is similar with the above method, is not repeated herein.
Above-described embodiment in order to facilitate understanding is described by taking the concrete application scene of above-described embodiment as an example below.
Application scenarios one:
User informs that controller carries out safe control to the port 5000-6000 in the domain OXM_OF_TCP_SRC by operational order System, controller determines that the domain OXM_OF_TCP_SRC is object matching domain, and the expression range in the determining domain OXM_OF_TCP_SRC is 5000-6000.Controller generates OFPT_FLOW_MOD message, in the message, the domain OXM_OF_TCP_SRC according to the expression range Oxm_hasmask field in corresponding flow match field structural body is that the value of 1, oxm_mask field is both port of origination The value of 5000, oxm_value fields is to terminate port 6000.The OFPT_FLOW_MOD message is sent to interchanger by controller.
Interchanger receives the OFPT_FLOW_MOD message, and determines that oxm_hasmask field is 1 OXM_OF_TCP_ The domain SRC is the object matching domain for needing to carry out range expression.Interchanger is by the corresponding flow match in the domain OXM_OF_TCP_SRC In field structural body, the initial value of the value 5000 of oxm_mask field as the range in the domain OXM_OF_TCP_SRC, by oxm_ End value of the value 6000 of value field as the range in the domain OXM_OF_TCP_SRC.Then, interchanger has determined OXM_OF_ The range in the domain TCP_SRC is 5000-6000, and according to the range formation range flow table in the domain OXM_OF_TCP_SRC.
Application scenarios two:
User informs that controller controls the port 5000-6000 by operational order, and controller determines OXM_OF_ The domain TCP_SRC is object matching domain, and determines that the expression range in the domain OXM_OF_TCP_SRC is 5000-6000.Controller according to The expression range generates the first OFPT_FLOW_MOD message and the 2nd OFPT_FLOW_MOD message, the first OFPT_FLOW_MOD In message, the oxm_hasmask field in the corresponding flow match field structural body in the domain OXM_OF_TCP_SRC is 1, The value of oxm_mask field is that the value of complete 1, oxm_value field is both port of origination 5000.2nd OFPT_FLOW_MOD message In, the oxm_hasmask field in the corresponding flow match field structural body in the domain OXM_OF_TCP_SRC is 1, oxm_ The value of mask field is that the value of complete 1, oxm_value field is to terminate port 6000.Controller is first by the first OFPT_FLOW_MOD Message is sent to interchanger, then the 2nd OFPT_FLOW_MOD message is sent to interchanger.
Interchanger first receives the first OFPT_FLOW_MOD message, and determines that oxm_hasmask field is 1, and oxm_mask The domain OXM_OF_TCP_SRC that the value of field is complete 1 is the object matching domain for needing to carry out range expression.Due to not having in interchanger There is the initial value for the range for saving the domain OXM_OF_TCP_SRC, old friend, which changes planes, is determined as object matching for the domain OXM_OF_TCP_SRC Domain, and by the corresponding flow match field structural body in the domain OXM_OF_TCP_SRC, the value 5000 of oxm_value field is made For the initial value of the range in the domain OXM_OF_TCP_SRC, and save the initial value 5000 of the range in the domain OXM_OF_TCP_SRC.It hands over OFPT_FLOW_MOD message is received again after changing planes, wherein the corresponding flow match in the domain OXM_OF_TCP_SRC Oxm_hasmask field is 1 in field structural body and the value of oxm_mask field is complete 1.Since interchanger has saved The initial value of the range in the domain OXM_OF_TCP_SRC, old friend's OFPT_FLOW_MOD message that will be received again of changing planes are determined as 2nd OFPT_FLOW_MOD message, and by the 2nd OFPT_FLOW_MOD message, the corresponding flow in the domain OXM_OF_TCP_SRC End value of the value 6000 of oxm_value field in match field structural body as the range in the domain OXM_OF_TCP_SRC. Then, interchanger has determined that the range in the domain OXM_OF_TCP_SRC is 5000-6000, and according to the model in the domain OXM_OF_TCP_SRC Enclose formation range flow table.
The embodiment of the invention also provides relevant controller and interchangers, for realizing side described in above-described embodiment Method.The basic structure of controller provided in an embodiment of the present invention is referring to Fig. 6, specifically include that
Range determination module 601, for determining the range in object matching domain, wherein bitmask is not supported in object matching domain bitmask;
Message generating module 602, for generating OFPT_FLOW_MOD message, wherein OFPT_FLOW_MOD message includes Ofp_match structural body, the ofp_match structural body include one or more correspondingly with one or more matching domains Flow match field structural body includes and object matching domain pair in one or more flow match field structural body The target flow match field structural body answered includes the object matching in target flow match field structural body The range in domain;
Message transmission module 603, for the OFPT_FLOW_MOD message to be sent to interchanger.
In controller provided in this embodiment, range determination module 601 determines the range in object matching domain;Message generates mould Block 602 generates OFPT_FLOW_MOD message, and the OFPT_FLOW_MOD message includes ofp_match structural body, the ofp_ Match structural body includes the corresponding target flow match field structural body in object matching domain, target flow match It include the range in object matching domain in field structural body;Message transmission module 603 sends the OFPT_FLOW_MOD message To interchanger.Since a flow match field structural body can be used only in controller provided in an embodiment of the present invention The range for indicating object matching domain, without two flow match field structural bodies, therefore only needs to modify target Range expression can be realized with the corresponding flow match field structural body in domain, do not need in ofp_match structural body In increase newly flow match field structural body, do not change the size of ofp_match structural body, meet Openflow agreement Specification, compatibility is preferably.
Oxm_ particularly as another embodiment of the invention, in target flow match field structural body Hasmask field is 1.Since bitmask is not supported in the object matching domain, the oxm_hasmask field in body and Oxm_mask field does not have practical significance, can be used to implement the expression of range.Specifically, can be indicated with oxm_mask field The initial value of the range in object matching domain, oxm_value field indicate the end value of the range in object matching domain, or use oxm_ Mask field indicates that the end value of the range in object matching domain, oxm_value field indicate the starting of the range in object matching domain Value, herein without limitation.
Above-described embodiment gives the basic structure of controller, and the following examples will describe to match with the controller Interchanger structure, referring to Fig. 7, including:
Message reception module 701, for receiving the OFPT_FLOW_MOD message of controller transmission, the OFPT_FLOW_MOD Message includes ofp_match structural body, ofp_match structural body include with one or more matching domains it is one-to-one one or Multiple flow match field structural bodies include and object matching in one or more flow match field structural body The corresponding target flow match field structural body in domain includes the target in target flow match field structural body Range with domain, wherein do not support bitmask bitmask in object matching domain;
Message processing module 702, for determining the model in object matching domain according to target flow match field structural body It encloses.
In interchanger provided in this embodiment, message reception module 701 receives the OFPT_FLOW_MOD that controller is sent and disappears Breath, wherein include target flow match field structural body, target flow match in OFPT_FLOW_MOD message It include the range in object matching domain in field structural body.Message processing module 702 is according to target flow match field structure Body determines the range in object matching domain.Interchanger provided in this embodiment is only from a target flow match field structure The range that object matching domain is known in body without two flow match field structural bodies, therefore is not needed in ofp_ It increases flow match field structural body in match structural body newly, does not change the size of ofp_match structural body, meet The specification of Openflow agreement, compatibility is preferably.
Oxm_ particularly as another embodiment of the invention, in target flow match field structural body Hasmask field is 1.Since bitmask is not supported in object matching domain, oxm_hasmask field in body and Oxm_mask field does not have practical significance, can be used to implement the expression of range.Specifically, message processing module 702 can incite somebody to action The flow match field structural body that oxm_hasmask field is 1 is determined as flow match field structural body, and by mesh Initial value of the oxm_mask field of mark flow match field structural body as the range in object matching domain, by oxm_ End value of the value field as the range in object matching domain;Interchanger can also be by target flow match field structure End value of the oxm_mask field of body as the range in object matching domain, using oxm_value field as object matching domain The initial value of range, in the present embodiment without limitation, but interchanger is to the meaning of oxm_mask field, oxm_value field Regulation should be consistent with the regulation of corresponding controller.
In above-described embodiment, bitmask is not supported in object matching domain, due to propping up in openflow agreement at this stage Demand of the matching domain of bitmask without range expression is held, the matching domain of bitmask is not only supported to may require that carry out range It expresses, in the corresponding ofp_match structural body of matching domain without supporting bitmask, oxm_hasmask field and oxm_mask Field does not have a practical significance, thus by the corresponding oxm_hasmask field in object matching domain and oxm_mask field for realizing The expression of range.If but evolution occurs for future openflow agreement, does not support the matching domain of bitmask to be also possible to prop up originally Bitmask is held, the matching domain for supporting bitmask is caused to be also required to carry out range expression.For this potential demand, the present invention is mentioned Another controller and interchanger are supplied, wherein the structure of controller is referring to Fig. 8, specifically include that
Range module 801 is determined, for determining the range in object matching domain;
Message module 802 is generated, for generating the first OFPT_FLOW_MOD message, the first OFPT_FLOW_MOD message Including ofp_match structural body, which includes one-to-one one or more with one or more matching domains A flow match field structural body includes and object matching domain in one or more flow match field structural body Corresponding first object flow match field structural body, first object flow match field structural body includes target The initial value of range with domain;
Message module 803 is sent, for the first OFPT_FLOW_MOD message to be sent to interchanger;
It generates message module 802 and is also used to generate the 2nd OFPT_FLOW_MOD message, wherein the 2nd OFPT_FLOW_MOD Message includes ofp_match structural body, which includes one-to-one one with one or more matching domains Or multiple flow match field structural bodies, include and target in one or more flow match field structural body With the corresponding second target flow match field structural body in domain, the second target flow match field structural body includes mesh Mark the end value of the range of matching domain;
Message module 803 is sent to be also used to the 2nd OFPT_FLOW_MOD message being sent to interchanger.
In controller provided in this embodiment, determine that range module 801 determines the range in object matching domain;Generate message mould Block 802 generates the first OFPT_FLOW_MOD message, and the first OFPT_FLOW_MOD message includes the range in object matching domain Initial value;It sends message module 803 and the oneth OFPT_FLOW_MOD message is sent to interchanger;It is raw to generate message module 802 At the 2nd OFPT_FLOW_MOD message, the 2nd OFPT_FLOW_MOD message includes that rising for the range in object matching domain terminates Value;It sends message module 803 and the 2nd OFPT_FLOW_MOD message is sent to interchanger, interchanger is enabled to know mesh Mark the range of matching domain.Controller provided in an embodiment of the present invention expresses target using only two OFPT_FLOW_MOD message The range of matching domain, and the corresponding flow match in object matching domain is only changed in every OFPT_FLOW_MOD message Field structural body does not need to increase flow match field structural body newly in ofp_match structural body, does not change ofp_ The size of match structural body, therefore meet the specification of Openflow agreement, compatibility is preferably.
In embodiment shown in Fig. 8, object matching domain can support bitmask, and when bitmask is supported in object matching domain When, the oxm_hasmask field in the corresponding flow match field structural body in object matching domain is 1, oxm_mask field Indicate bitmask, and oxm_mask field cannot be complete 1, therefore the table of range can be realized with complete 1 oxm_mask field It reaches.Specifically, as another embodiment of the invention, in first object flow match field structural body, oxm_ The value of hasmask is that the value of 1, oxm_mask field is the model that complete 1, oxm_value field indicates the object matching domain The initial value enclosed;In second target flow match field, the value of oxm_hasmask field is 1, oxm_mask field Value is the end value for the range that complete 1, oxm_value field indicates the object matching domain.
Embodiment shown in Fig. 8 gives another structure of controller, and the following examples will describe and the controller The structure of matching used interchanger, referring to Fig. 9, including:
Message module 901 is received, for receiving the first OFPT_FLOW_MOD message of controller transmission, the first OFPT_ FLOW_MOD message includes ofp_match structural body, which includes a pair of with one or more matching domains one The one or more flow match field structural bodies answered include in one or more flow match field structural body First object flow match field structural body corresponding with object matching domain, first object flow match field structure Body includes the initial value of the range in the object matching domain;
Message module 902 is handled, for obtaining object matching domain from first object flow match field structural body Range initial value;
The 2nd OFPT_FLOW_MOD message that message module 901 is also used to receive controller transmission is received, this second OFPT_FLOW_MOD message includes ofp_match structural body, which includes and one or more matching domains One-to-one one or more flow match field structural body, one or more flow match field structural body In include the second target flow match field structural body corresponding with object matching domain, the second target flow match Field structural body includes the end value of the range in the object matching domain;
Processing message module 902 is also used to obtain object matching domain from the second target flow match field structural body Range end value.
In interchanger provided in this embodiment, receives message module 901 and receive the first OFPT_FLOW_ that controller is sent MOD message, processing message module 902 obtain the range in object matching domain from first object flow match field structural body Initial value;It receives message module 901 and receives the 2nd OFPT_FLOW_MOD message that controller is sent, handle message module 902 The end value of the range in object matching domain is obtained from the second target flow match field structural body, such interchanger can To know the expression range in object matching domain.Interchanger provided in an embodiment of the present invention is used only two OFPT_FLOW_MOD and disappears Breath only changes object matching domain corresponding one to determine the range in object matching domain in every OFPT_FLOW_MOD message A flow match field structural body does not need to increase flow match field structural body newly in ofp_match structural body, The size of ofp_match structural body is not changed, therefore meets the specification of Openflow agreement, compatibility is preferably.
In embodiment shown in Fig. 9, object matching domain can support bitmask, and when bitmask is supported in object matching domain When, the oxm_hasmask field in the corresponding flow match field structural body in object matching domain is 1, oxm_mask field Indicate bitmask, and oxm_mask field cannot be complete 1, therefore the table of range can be realized with complete 1 oxm_mask field It reaches.Specifically, as another embodiment of the invention, first object flow match field structural body and the second target In flow match field structural body: the value of oxm_hasmask field is 1, body include oxm_mask field with Oxm_value field, wherein the value of oxm_mask field is complete 1, handles message module 902 for first object flow match Initial value of the oxm_value field of field structural body as the range in object matching domain, by the second target flow match End value of the oxm_value field of field structural body as the range in object matching domain.
Wherein, in order to the range in determining object matching domain, interchanger is needed from a plurality of OFPT_FLOW_ received In MOD message, determination includes the initial value in object matching domain and two OFPT_FLOW_MOD message of end value.With exchange Machine first receives the first OFPT_FLOW_MOD message, then for receiving the 2nd OFPT_FLOW_MOD message, specific: if interchanger Reception message module 901 have received OFPT_FLOW_MOD message, have a flow match field structure in the message The value of the oxm_hasmask field on the head of body is 1, and the value of body oxm_mask field is complete 1, then handles message The corresponding matching domain of flow match field structural body is determined as object matching domain by module 902, due to not having in interchanger There is the initial value for the range for saving object matching domain, therefore handles message module 902 and determine the flow match field structural body For first object flow match field structural body, which is the first OFPT_FLOW_MOD message. It handles message module 902 to determine in first object flow match field structural body, oxm_value field is object matching domain Range initial value, and save the initial value in the object matching domain.OFPT_ is received again when receiving message module 901 FLOW_MOD message, and flow match field structural body corresponding with object matching domain in the OFPT_FLOW_MOD message Head oxm_hasmask field value be 1, and the value of body oxm_mask field be complete 1 when, due to processing disappear Breath module 902 has saved the initial value of the range in object matching domain, so processing message module 902 will receive again OFPT_FLOW_MOD message is determined as the 2nd OFPT_FLOW_MOD message, and by the 2nd OFPT_FLOW_MOD message, target The end of range of the oxm_value field as object matching domain in the corresponding flow match field structural body of matching domain Value.When interchanger first receives the 2nd OFPT_FLOW_MOD message, then receives the first OFPT_FLOW_MOD message, first is determined The method of OFPT_FLOW_MOD message is similar with the above method, is not repeated herein.
Above-described embodiment in order to facilitate understanding is described by taking the concrete application scene of above-described embodiment as an example below.
Application scenarios three:
User informs that controller carries out safe control to the port 5000-6000 in the domain OXM_OF_TCP_SRC by operational order System, the range determination module of controller determines that the domain OXM_OF_TCP_SRC is object matching domain, and determines OXM_OF_TCP_SRC The expression range in domain is 5000-6000.The message generating module of controller generates OFPT_FLOW_MOD according to the expression range and disappears It ceases, in the message, the oxm_hasmask field in the corresponding flow match field structural body in the domain OXM_OF_TCP_SRC is The value of 1, oxm_mask field is both port of origination 5000, and the value of oxm_value field is to terminate port 6000.The message of controller The OFPT_FLOW_MOD message is sent to interchanger by sending module.
The message reception module that interchanger connects receives the OFPT_FLOW_MOD message, and message processing module determines oxm_ The domain OXM_OF_TCP_SRC that hasmask field is 1 is the object matching domain for needing to carry out range expression.Message processing module will In the corresponding flow match field structural body in the domain OXM_OF_TCP_SRC, the value 5000 of oxm_mask field is used as OXM_ The initial value of the range in the domain OF_TCP_SRC, the range by the value 6000 of oxm_value field as the domain OXM_OF_TCP_SRC End value.Then, interchanger has determined that the range in the domain OXM_OF_TCP_SRC is 5000-6000, and according to OXM_OF_TCP_ The range formation range flow table in the domain SRC.
Application scenarios two:
User informs that controller controls the port 5000-6000 by operational order, the determination range mould of controller Block determines that the domain OXM_OF_TCP_SRC is object matching domain, and determines that the expression range in the domain OXM_OF_TCP_SRC is 5000- 6000.The generation message module of controller generates the first OFPT_FLOW_MOD message and the 2nd OFPT_ according to the expression range FLOW_MOD message, in the first OFPT_FLOW_MOD message, the corresponding flow match field knot in the domain OXM_OF_TCP_SRC Oxm_hasmask field in structure body be 1, oxm_mask field value be complete 1, oxm_value field value be both port of origination 5000.In 2nd OFPT_FLOW_MOD message, in the corresponding flow match field structural body in the domain OXM_OF_TCP_SRC Oxm_hasmask field be 1, oxm_mask field value be complete 1, oxm_value field value be end port 6000.Control First OFPT_FLOW_MOD message is first sent to interchanger by the transmission message module of device, then the 2nd OFPT_FLOW_MOD is disappeared Breath is sent to interchanger.
The reception message module of interchanger first receives the first OFPT_FLOW_MOD message, and processing message module determines oxm_ Hasmask field is 1, and the domain OXM_OF_TCP_SRC that the value of oxm_mask field is complete 1 is to need to carry out range expression Object matching domain.Due to there is no to save the initial value of the range in the domain OXM_OF_TCP_SRC in interchanger, therefore handle message module The domain OXM_OF_TCP_SRC is determined as object matching domain, and by the corresponding flow match field in the domain OXM_OF_TCP_SRC In structural body, the initial value of the value 5000 of oxm_value field as the range in the domain OXM_OF_TCP_SRC, and save OXM_ The initial value 5000 of the range in the domain OF_TCP_SRC.OFPT_FLOW_ is received after the reception message module of interchanger again MOD message, wherein oxm_hasmask field is 1 in the corresponding flow match field structural body in the domain OXM_OF_TCP_SRC And the value of oxm_mask field is complete 1.Since interchanger has saved the initial value of the range in the domain OXM_OF_TCP_SRC, therefore Processing message module is determined as the 2nd OFPT_FLOW_ for the OFPT_FLOW_MOD message that message module receives again is received MOD message, and by the 2nd OFPT_FLOW_MOD message, the corresponding flow match field in the domain OXM_OF_TCP_SRC is tied End value of the value 6000 of oxm_value field in structure body as the range in the domain OXM_OF_TCP_SRC.Then, interchanger is true The range for having determined the domain OXM_OF_TCP_SRC is 5000-6000, and according to the range formation range stream in the domain OXM_OF_TCP_SRC Table.
The controller in the embodiment of the present invention is described from the angle of blocking functional entity above, below from hard The controller in the embodiment of the present invention is described in the angle of part processing, referring to Fig. 10, the control in the embodiment of the present invention Another embodiment of device 1000 includes:
Input unit 1001, output device 1002, processor 1003 and (the wherein place in controller 1000 of memory 1004 The quantity for managing device 1003 can be one or more, in Figure 10 by taking a processor 1003 as an example).In some embodiments of the present invention In, input unit 1001, output device 1002, processor 1003 and memory 1004 can be connected by bus or other means, Wherein, in Figure 10 for being connected by bus.
Wherein, by the operational order for calling memory 1004 to store, processor 1003 is for executing following steps:
Determine the range in object matching domain, bitmask bitmask is not supported in the object matching domain;
OFPT_FLOW_MOD message is generated, the OFPT_FLOW_MOD message includes ofp_match structural body, described Ofp_match structural body includes and one or more matching domains one or more flow match field structure correspondingly Body includes target flow corresponding with the object matching domain in one or more of flow match field structural bodies Match field structural body includes the range in the object matching domain in the target flow match field structural body;
The OFPT_FLOW_MOD message is sent to interchanger.
It include head and body in each flow match field structural body in some embodiments of the present invention Portion, the head include oxm_hasmask field, when the value of the oxm_hasmask field is 1, the body packet Include oxm_mask field and oxm_value field;
In the target flow match field structural body, the value of oxm_hasmask field is 1, oxm_mask word Segment table shows that the initial value of the range in the object matching domain, oxm_value field indicate the knot of the range in the object matching domain Beam value;
Or,
In the target flow match field structural body, the value of oxm_hasmask field is 1, oxm_mask word Segment table shows that the end value of the range in the object matching domain, oxm_value field indicate rising for the range in the object matching domain Initial value.
In some embodiments of the present invention, the object matching domain includes: the domain OXM_OF_TCP_SRC, OXM_OF_TCP_ The domain DST, the domain OFPXMT_OFB_UDP_SRC, the domain OFPXMT_OFB_UDP_DST, the domain OFPXMT_OFB_SCTP_SRC or The domain OFPXMT_OFB_SCTP_DST.
The interchanger provided in the embodiment of the present invention is described from the angle of hardware handles below, please referring still to figure 10, another embodiment of interchanger 1000 in the embodiment of the present invention includes:
Input unit 1001, output device 1002, processor 1003 and (the wherein place in interchanger 1000 of memory 1004 The quantity for managing device 1003 can be one or more, in Figure 10 by taking a processor 1003 as an example).In some embodiments of the present invention In, input unit 1001, output device 1002, processor 1003 and memory 1004 can be connected by bus or other means, Wherein, in Figure 10 for being connected by bus.
Wherein, by the operational order for calling memory 1004 to store, processor 1003 is for executing following steps:
The OFPT_FLOW_MOD message that controller is sent is received, the OFPT_FLOW_MOD message includes ofp_match Structural body, the ofp_match structural body include and one or more matching domains one or more flow correspondingly Match field structural body includes corresponding with object matching domain in one or more of flow match field structural bodies Target flow match field structural body, include the object matching in the target flow match field structural body The range in domain, wherein do not support bitmask bitmask in the object matching domain;
According to the target flow match field structural body, the range in the object matching domain is determined.
It include head and body in each flow match field structural body in some embodiments of the present invention Portion, the head include oxm_hasmask field, the oxm_hasmask word of the target flow match field structural body The value of section is 1, and the body of the target flow match field structural body includes oxm_mask field and oxm_value Field;
It is described according to the target flow match field structural body, determine that the range in the object matching domain includes:
Using the oxm_mask field of the target flow match field structural body as the model in the object matching domain The initial value enclosed, using oxm_value field as the end value of the range in the object matching domain;
Or,
Using the oxm_mask field of the target flow match field structural body as the model in the object matching domain The end value enclosed, using oxm_value field as the initial value of the range in the object matching domain.
In some embodiments of the present invention, the object matching domain includes: the domain OXM_OF_TCP_SRC, OXM_OF_TCP_ The domain DST, the domain OFPXMT_OFB_UDP_SRC, the domain OFPXMT_OFB_UDP_DST, the domain OFPXMT_OFB_SCTP_SRC or The domain OFPXMT_OFB_SCTP_DST.
Another controller provided in the embodiment of the present invention is described from the angle of hardware handles below, is please still joined Figure 10 is read, another embodiment of controller 1000 in the embodiment of the present invention includes:
Input unit 1001, output device 1002, processor 1003 and (the wherein place in controller 1000 of memory 1004 The quantity for managing device 1003 can be one or more, in Figure 10 by taking a processor 1003 as an example).In some embodiments of the present invention In, input unit 1001, output device 1002, processor 1003 and memory 1004 can be connected by bus or other means, Wherein, in Figure 10 for being connected by bus.
Wherein, by the operational order for calling memory 1004 to store, processor 1003 is for executing following steps:
Determine the range in object matching domain;
The first OFPT_FLOW_MOD message is generated, the first OFPT_FLOW_MOD message includes ofp_match structure Body, the ofp_match structural body include and one or more matching domains one or more flow match correspondingly Field structural body includes corresponding with the object matching domain in one or more of flow match field structural bodies First object flow match field structural body, the first object flow match field structural body includes the target The initial value of the range of matching domain;
The first OFPT_FLOW_MOD message is sent to interchanger;
The 2nd OFPT_FLOW_MOD message is generated, the 2nd OFPT_FLOW_MOD message includes ofp_match structure Body, the ofp_match structural body include and one or more matching domains one or more flow match correspondingly Field structural body includes corresponding with the object matching domain in one or more of flow match field structural bodies Second target flow match field structural body, the second target flow match field structural body includes the target The end value of the range of matching domain;
The 2nd OFPT_FLOW_MOD message is sent to interchanger.
In some embodiments of the present invention, each flow match field structural body includes head and body, The head includes oxm_hasmask field, and when the value of the oxm_hasmask field is 1, the body includes Oxm_mask field and oxm_value field;
In the first object flow match field structural body, the value of oxm_hasmask is 1, oxm_mask word The value of section is the initial value for the range that complete 1, oxm_value field indicates the object matching domain;The second target flow In match field, the value of oxm_hasmask field is that the value of 1, oxm_mask field is complete 1, oxm_value field Indicate the end value of the range in the object matching domain.
Another interchanger provided in the embodiment of the present invention is described from the angle of hardware handles below, is please still joined Figure 10 is read, another embodiment of interchanger 1000 in the embodiment of the present invention includes:
Input unit 1001, output device 1002, processor 1003 and (the wherein place in interchanger 1000 of memory 1004 The quantity for managing device 1003 can be one or more, in Figure 10 by taking a processor 1003 as an example).In some embodiments of the present invention In, input unit 1001, output device 1002, processor 1003 and memory 1004 can be connected by bus or other means, Wherein, in Figure 10 for being connected by bus.
Wherein, by the operational order for calling memory 1004 to store, processor 1003 is for executing following steps:
The first OFPT_FLOW_MOD message that controller is sent is received, the first OFPT_FLOW_MOD message includes Ofp_match structural body, the ofp_match structural body include one or more correspondingly with one or more matching domains Flow match field structural body includes and object matching domain in one or more of flow match field structural bodies Corresponding first object flow match field structural body, the first object flow match field structural body includes institute State the initial value of the range in object matching domain;
The starting of the range in the object matching domain is obtained from the first object flow match field structural body Value;
The 2nd OFPT_FLOW_MOD message that controller is sent is received, the 2nd OFPT_FLOW_MOD message includes Ofp_match structural body, the ofp_match structural body include one or more correspondingly with one or more matching domains Flow match field structural body includes and object matching domain in one or more of flow match field structural bodies Corresponding second target flow match field structural body, the second target flow match field structural body includes institute State the end value of the range in object matching domain;
The end of the range in the object matching domain is obtained from the second target flow match field structural body Value.
In some embodiments of the present invention, each flow match field structural body includes head and body, The head includes oxm_hasmask field, the first object flow match field structural body and the second target flow In match field structural body: the value of oxm_hasmask field is 1, and body includes oxm_mask field and oxm_ Value field, wherein the value of oxm_mask field is complete 1;
Processor 1003 is also executed the following steps: the oxm_ of the first object flow match field structural body Initial value of the value field as the range in the object matching domain;
Processor 1003 is also executed the following steps: the oxm_ of the second target flow match field structural body End value of the value field as the range in the object matching domain.
In some embodiments of the present invention, processor 1003 is also executed the following steps:
By in one or more of flow match field structural bodies, the value of the oxm_hasmask field on head It is 1, and the flow match field structural body that the value of body oxm_mask field is complete 1, is determined as first object Flow match field structural body, and the corresponding matching domain of the first object flow match field structural body is determined For object matching domain;If in the OFPT_FLOW_MOD message that the controller is sent, flow corresponding with the object matching domain The value of the oxm_hasmask field on the head of match field structural body is 1, and the value of body oxm_mask field It is complete 1, then the OFPT_FLOW_MOD message that the controller is sent is determined as the 2nd OFPT_FLOW_MOD message;
Or, the oxm_hasmask field on head takes by one or more of flow match field structural bodies Value is 1, and the flow match field structural body that the value of body oxm_mask field is complete 1, is determined as the second target Flow match field structural body, and the corresponding matching domain of the second target flow match field structural body is determined For object matching domain;If in the OFPT_FLOW_MOD message that the controller is sent, flow corresponding with the object matching domain The value of the oxm_hasmask field on the head of match field structural body is 1, and the value of body oxm_mask field It is complete 1, then the OFPT_FLOW_MOD message that the controller is sent is determined as the first OFPT_FLOW_MOD message.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.

Claims (22)

1. a kind of open flows openflow processing method characterized by comprising
Determine the range in object matching domain, bitmask bitmask is not supported in the object matching domain;
OFPT_FLOW_MOD message is generated, the OFPT_FLOW_MOD message includes ofp_match structural body, the ofp_ Match structural body include with one or more matching domains one or more flow match field structural body correspondingly, It include target flow corresponding with the object matching domain in one or more of flow match field structural bodies Match field structural body includes the range in the object matching domain in the target flow match field structural body, In, it include head and body in the target flow match field structural body, the body includes oxm_mask word Section and oxm_value field, the oxm_mask field and the oxm_value field are for realizing the object matching domain The expression of range;
The OFPT_FLOW_MOD message is sent to interchanger.
2. openflow processing method according to claim 1, which is characterized in that each flow match field It include head and body in structural body, the head includes oxm_hasmask field, when the oxm_hasmask field When value is 1, the body includes oxm_mask field and oxm_value field;
In the target flow match field structural body, the value of oxm_hasmask field is 1, oxm_mask field list Show that the initial value of the range in the object matching domain, oxm_value field indicate the end value of the range in the object matching domain;
Or,
In the target flow match field structural body, the value of oxm_hasmask field is 1, oxm_mask field list Show that the end value of the range in the object matching domain, oxm_value field indicate the initial value of the range in the object matching domain.
3. openflow processing method according to claim 1 or 2, which is characterized in that the object matching domain includes: The domain OXM_OF_TCP_SRC, the domain OXM_OF_TCP_DST, the domain OFPXMT_OFB_UDP_SRC, the domain OFPXMT_OFB_UDP_DST, The domain OFPXMT_OFB_SCTP_SRC or the domain OFPXMT_OFB_SCTP_DST.
4. a kind of open flows openflow processing method characterized by comprising
Determine the range in object matching domain;
The first OFPT_FLOW_MOD message is generated, the first OFPT_FLOW_MOD message includes ofp_match structural body, institute Stating ofp_match structural body includes that one or more flow match field is tied correspondingly with one or more matching domains Structure body includes first object corresponding with the object matching domain in one or more of flow match field structural bodies Flow match field structural body, the first object flow match field structural body include the object matching domain The initial value of range;
The first OFPT_FLOW_MOD message is sent to interchanger;
The 2nd OFPT_FLOW_MOD message is generated, the 2nd OFPT_FLOW_MOD message includes ofp_match structural body, institute Stating ofp_match structural body includes that one or more flow match field is tied correspondingly with one or more matching domains Structure body includes the second target corresponding with the object matching domain in one or more of flow match field structural bodies Flow match field structural body, the second target flow match field structural body includes the object matching domain The end value of range;
The 2nd OFPT_FLOW_MOD message is sent to interchanger.
5. openflow processing method according to claim 4, which is characterized in that each flowmatch field Structural body includes head and body, and the head includes oxm_hasmask field, when taking for the oxm_hasmask field When value is 1, the body includes oxm_mask field and oxm_value field;
In the first object flow match field structural body, the value of oxm_hasmask is 1, oxm_mask field Value is the initial value for the range that complete 1, oxm_value field indicates the object matching domain;The second target flow In match field, the value of oxm_hasmask field is that the value of 1, oxm_mask field is complete 1, oxm_value field Indicate the end value of the range in the object matching domain.
6. a kind of message treatment method characterized by comprising
The OFPT_FLOW_MOD message that controller is sent is received, the OFPT_FLOW_MOD message includes ofp_match structure Body, the ofp_match structural body include and one or more matching domains one or more flow match correspondingly Field structural body includes target corresponding with object matching domain in one or more of flow match field structural bodies Flow match field structural body includes the model in the object matching domain in the target flow match field structural body It encloses, wherein bitmask bitmask is not supported in the object matching domain, is wrapped in the target flow match field structural body Include head and body, the body includes oxm_mask field and oxm_value field, the oxm_mask field and institute Oxm_value field is stated for realizing the expression of the range in the object matching domain;
According to the target flow match field structural body, the range in the object matching domain is determined.
7. message treatment method according to claim 6, which is characterized in that each flow match field structure It include head and body in body, the head includes oxm_hasmask field, the target flow match field structure The value of the oxm_hasmask field of body is 1, and the body of the target flowmatch field structural body includes oxm_ Mask field and oxm_value field;
It is described according to the target flow match field structural body, determine that the range in the object matching domain includes:
Using the oxm_mask field of the target flow match field structural body as the range in the object matching domain Initial value, using oxm_value field as the end value of the range in the object matching domain;
Or,
Using the oxm_mask field of the target flow match field structural body as the range in the object matching domain End value, using oxm_value field as the initial value of the range in the object matching domain.
8. message treatment method according to claim 6 or 7, which is characterized in that the object matching domain includes: OXM_ The domain OF_TCP_SRC, the domain OXM_OF_TCP_DST, the domain OFPXMT_OFB_UDP_SRC, the domain OFPXMT_OFB_UDP_DST, The domain OFPXMT_OFB_SCTP_SRC or the domain OFPXMT_OFB_SCTP_DST.
9. a kind of message treatment method characterized by comprising
The first OFPT_FLOW_MOD message that controller is sent is received, the first OFPT_FLOW_MOD message includes ofp_ Match structural body, the ofp_match structural body include and one or more matching domains one or more flow correspondingly Match field structural body includes corresponding with object matching domain in one or more of flow match field structural bodies First object flowmatch field structural body, the first object flow match field structural body includes the mesh Mark the initial value of the range of matching domain;
The initial value of the range in the object matching domain is obtained from the first object flow match field structural body;
The 2nd OFPT_FLOW_MOD message that controller is sent is received, the 2nd OFPT_FLOW_MOD message includes ofp_ Match structural body, the ofp_match structural body include and one or more matching domains one or more flow correspondingly Match field structural body includes corresponding with object matching domain in one or more of flow match field structural bodies The second target flowmatch field structural body, the second target flow match field structural body includes the mesh Mark the end value of the range of matching domain;
The end value of the range in the object matching domain is obtained from the second target flow match field structural body.
10. message treatment method according to claim 9, which is characterized in that each flowmatch field structure Body includes head and body, and the head includes oxm_hasmask field, the first object flow match field knot In structure body and the second target flow match field structural body: the value of oxm_hasmask field is 1, and body includes Oxm_mask field and oxm_value field, wherein the value of oxm_mask field is complete 1;
The starting of the range that the object matching domain is obtained from the first object flow match field structural body Value includes: using the oxm_value field of the first object flow match field structural body as the object matching domain Range initial value;
The end of the range that the object matching domain is obtained from the second target flow match field structural body Value includes: using the oxm_value field of the second target flow match field structural body as the object matching domain Range end value.
11. message treatment method according to claim 10, which is characterized in that first for receiving controller and sending After OFPT_FLOW_MOD message further include:
By in one or more of flow match field structural bodies, the value of the oxm_hasmask field on head is 1, And the flow match field structural body that the value of body oxm_mask field is complete 1, it is determined as first object flow Match field structural body, and the corresponding matching domain of the first object flow match field structural body is determined as mesh Mark matching domain;
Before the 2nd OFPT_FLOW_MOD message for receiving controller transmission further include:
If in the OFPT_FLOW_MOD message that the controller is sent, flow match corresponding with the object matching domain The value of the oxm_hasmask field on the head of field structural body is 1, and the value of body oxm_mask field is complete 1, The OFPT_FLOW_MOD message that the controller is sent then is determined as the 2nd OFPT_FLOW_MOD message;
Or,
After the 2nd OFPT_FLOW_MOD message for receiving controller transmission further include:
By in one or more of flow match field structural bodies, the value of the oxm_hasmask field on head is 1, And the flow match field structural body that the value of body oxm_mask field is complete 1, it is determined as the second target flow Match field structural body, and the corresponding matching domain of the second target flow match field structural body is determined as mesh Mark matching domain;
Before the first OFPT_FLOW_MOD message for receiving controller transmission further include:
If in the OFPT_FLOW_MOD message that the controller is sent, flow match corresponding with the object matching domain The value of the oxm_hasmask field on the head of field structural body is 1, and the value of body oxm_mask field is complete 1, The OFPT_FLOW_MOD message that the controller is sent then is determined as the first OFPT_FLOW_MOD message.
12. a kind of controller characterized by comprising
Range determination module, for determining the range in object matching domain, bitmask bitmask is not supported in the object matching domain;
Message generating module, for generating OFPT_FLOW_MOD message, the OFPT_FLOW_MOD message includes ofp_match Structural body, the ofp_match structural body include and one or more matching domains one or more flow correspondingly Match field structural body includes and the object matching domain in one or more of flow match field structural bodies Corresponding target flowmatch field structural body includes the target in the target flow match field structural body The range of matching domain, wherein include head and body, the body in the target flow match field structural body Including oxm_mask field and oxm_value field, the oxm_mask field and the oxm_value field are for realizing institute State the expression of the range in object matching domain;
Message transmission module, for the OFPT_FLOW_MOD message to be sent to interchanger.
13. controller according to claim 12, which is characterized in that in each flow match field structural body Including head and body, the head includes oxm_hasmask field, when the value of the oxm_hasmask field is 1 When, the body includes oxm_mask field and oxm_value field;
In the target flow match field structural body, the value of oxm_hasmask field is 1, oxm_mask field list Show that the initial value of the range in the object matching domain, oxm_value field indicate the end value of the range in the object matching domain;
Or,
In the target flow match field structural body, the value of oxm_hasmask field is 1, oxm_mask field list Show that the end value of the range in the object matching domain, oxm_value field indicate the initial value of the range in the object matching domain.
14. controller according to claim 12 or 13, which is characterized in that the object matching domain includes: OXM_OF_ The domain TCP_SRC, the domain OXM_OF_TCP_DST, the domain OFPXMT_OFB_UDP_SRC, the domain OFPXMT_OFB_UDP_DST, OFPXMT_ The domain OFB_SCTP_SRC or the domain OFPXMT_OFB_SCTP_DST.
15. a kind of controller characterized by comprising
Range module is determined, for determining the range in object matching domain;
Message module is generated, for generating the first OFPT_FLOW_MOD message, the first OFPT_FLOW_MOD message includes Ofp_match structural body, the ofp_match structural body include one or more correspondingly with one or more matching domains Flow match field structural body includes and the target in one or more of flow match field structural bodies With the corresponding first object flow match field structural body in domain, the first object flow match field structural body packet Include the initial value of the range in the object matching domain;
Message module is sent, for the first OFPT_FLOW_MOD message to be sent to interchanger;
The generation message module, is also used to generate the 2nd OFPT_FLOW_MOD message, and the 2nd OFPT_FLOW_MOD disappears Breath includes ofp_match structural body, and the ofp_match structural body includes one-to-one one with one or more matching domains Or multiple flow match field structural bodies, include in one or more of flow match field structural bodies with it is described The corresponding second target flow match field structural body in object matching domain, the second target flow match field knot Structure body includes the end value of the range in the object matching domain;
The transmission message module is also used to the 2nd OFPT_FLOW_MOD message being sent to interchanger.
16. controller according to claim 15, which is characterized in that each flow match field structural body packet Head and body are included, the head includes oxm_hasmask field, when the value of the oxm_hasmask field is 1, The body includes oxm_mask field and oxm_value field;
In the first object flow match field structural body, the value of oxm_hasmask is 1, oxm_mask field Value is the initial value for the range that complete 1, oxm_value field indicates the object matching domain;The second target flow In match field, the value of oxm_hasmask field is that the value of 1, oxm_mask field is complete 1, oxm_value field Indicate the end value of the range in the object matching domain.
17. a kind of interchanger characterized by comprising
Message reception module, for receiving the OFPT_FLOW_MOD message of controller transmission, the OFPT_FLOW_MOD message Including ofp_match structural body, the ofp_match structural body include with one or more matching domains it is one-to-one one or Multiple flow match field structural bodies include and target in one or more of flow match field structural bodies It include described in the target flow match field structural body with the corresponding target flow match field structural body in domain The range in object matching domain, wherein do not support bitmask bitmask, the target flow match in the object matching domain It include head and body in field structural body, the body includes oxm_mask field and oxm_value field, described Oxm_mask field is with the oxm_value field for realizing the expression of the range in the object matching domain;
Message processing module, for determining the object matching domain according to the target flow match field structural body Range.
18. interchanger according to claim 17, which is characterized in that in each flow match field structural body Including head and body, the head includes oxm_hasmask field, the target flow match field structural body The value of oxm_hasmask field is 1, and the body of the target flow match field structural body includes oxm_mask word Section and oxm_value field;
The message processing module is specifically used for: the oxm_mask field of the target flow match field structural body is made For the initial value of the range in the object matching domain, using oxm_value field as the end of the range in the object matching domain Value;Or, using the oxm_mask field of the target flow match field structural body as the range in the object matching domain End value, using oxm_value field as the initial value of the range in the object matching domain.
19. interchanger described in 7 or 18 according to claim 1, which is characterized in that the object matching domain includes: OXM_OF_ The domain TCP_SRC, the domain OXM_OF_TCP_DST, the domain OFPXMT_OFB_UDP_SRC, the domain OFPXMT_OFB_UDP_DST, OFPXMT_ The domain OFB_SCTP_SRC or the domain OFPXMT_OFB_SCTP_DST.
20. a kind of interchanger characterized by comprising
Message module is received, for receiving the first OFPT_FLOW_MOD message of controller transmission, the first OFPT_FLOW_ MOD message includes ofp_match structural body, and the ofp_match structural body includes corresponding with one or more matching domains One or more flow match field structural bodies, include in one or more of flow match field structural bodies First object flow match field structural body corresponding with object matching domain, the first object flow match field Structural body includes the initial value of the range in the object matching domain;
Message module is handled, for obtaining the object matching domain from the first object flow match field structural body Range initial value;
The message module that receives is also used to: the 2nd OFPT_FLOW_MOD message that reception controller is sent, and described second OFPT_FLOW_MOD message includes ofp_match structural body, and the ofp_match structural body includes matching with one or more One or more flow match field structural body, one or more of flow match field are tied correspondingly in domain It include the second target flow match field structural body corresponding with object matching domain, the second target flow in structure body Match field structural body includes the end value of the range in the object matching domain;
The processing message module is also used to: obtaining the target from the second target flow match field structural body The end value of the range of matching domain.
21. interchanger according to claim 20, which is characterized in that each flow match field structural body packet Head and body are included, the head includes oxm_hasmask field, the first object flow match field structural body In the second target flow match field structural body: the value of oxm_hasmask field is 1, and body includes oxm_ Mask field and oxm_value field, wherein the value of oxm_mask field is complete 1;
The processing message module is specifically used for: by the oxm_value of the first object flow match field structural body Initial value of the field as the range in the object matching domain;By the second target flow match field structural body End value of the oxm_value field as the range in the object matching domain.
22. interchanger according to claim 21, which is characterized in that the processing message module is receiving controller transmission The first OFPT_FLOW_MOD message after be also used to: by one or more of flow match field structural bodies, head The value of the oxm_hasmask field in portion is 1, and the flow match that the value of body oxm_mask field is complete 1 Field structural body, is determined as first object flow match field structural body, and by the first object flow match The corresponding matching domain of field structural body is determined as object matching domain;The processing message module is in receive that controller sends the It is also used to before two OFPT_FLOW_MOD message: if in the OFPT_FLOW_MOD message that the controller is sent, with the mesh The value for marking the oxm_hasmask field on the head of the corresponding flow match field structural body of matching domain is 1, and body The value of oxm_mask field is complete 1, then the OFPT_FLOW_MOD message that the controller is sent is determined as the 2nd OFPT_ FLOW_MOD message;
Or, the processing message module is also used to after receiving the 2nd OFPT_FLOW_MOD message that controller is sent: by institute It states in one or more flow match field structural bodies, the value of the oxm_hasmask field on head is 1, and body The flow match field structural body that the value of oxm_mask field is complete 1, is determined as the second target flow match Field structural body, and the corresponding matching domain of the second target flow match field structural body is determined as object matching Domain;The processing message module is also used to before receiving the first OFPT_FLOW_MOD message that controller is sent: if the control In the OFPT_FLOW_MOD message that device processed is sent, flow match field structural body corresponding with the object matching domain The value of the oxm_hasmask field on head is 1, and the value of body oxm_mask field is complete 1, then by the controller The OFPT_FLOW_MOD message of transmission is determined as the first OFPT_FLOW_MOD message.
CN201510122496.4A 2015-03-19 2015-03-19 A kind of openflow processing method, message treatment method, controller and interchanger Active CN106034133B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510122496.4A CN106034133B (en) 2015-03-19 2015-03-19 A kind of openflow processing method, message treatment method, controller and interchanger

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510122496.4A CN106034133B (en) 2015-03-19 2015-03-19 A kind of openflow processing method, message treatment method, controller and interchanger

Publications (2)

Publication Number Publication Date
CN106034133A CN106034133A (en) 2016-10-19
CN106034133B true CN106034133B (en) 2019-05-28

Family

ID=57149439

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510122496.4A Active CN106034133B (en) 2015-03-19 2015-03-19 A kind of openflow processing method, message treatment method, controller and interchanger

Country Status (1)

Country Link
CN (1) CN106034133B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6105056A (en) * 1995-12-19 2000-08-15 International Business Machines Corporation Object oriented mail server framework mechanism
CN103368851A (en) * 2013-07-22 2013-10-23 武汉烽火网络有限责任公司 Openflow flow table storage and optimization method based on resource reuse
CN103997414A (en) * 2013-02-18 2014-08-20 华为技术有限公司 Configuration information generation method and network control unit
CN104009877A (en) * 2014-06-22 2014-08-27 陈桂芳 Method for achieving visualization of SDN flow table
CN104158745A (en) * 2013-05-13 2014-11-19 中兴通讯股份有限公司 Data packet forwarding method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6105056A (en) * 1995-12-19 2000-08-15 International Business Machines Corporation Object oriented mail server framework mechanism
CN103997414A (en) * 2013-02-18 2014-08-20 华为技术有限公司 Configuration information generation method and network control unit
CN104158745A (en) * 2013-05-13 2014-11-19 中兴通讯股份有限公司 Data packet forwarding method and system
CN103368851A (en) * 2013-07-22 2013-10-23 武汉烽火网络有限责任公司 Openflow flow table storage and optimization method based on resource reuse
CN104009877A (en) * 2014-06-22 2014-08-27 陈桂芳 Method for achieving visualization of SDN flow table

Also Published As

Publication number Publication date
CN106034133A (en) 2016-10-19

Similar Documents

Publication Publication Date Title
US10091090B2 (en) Packet forwarding in software defined networking
CN106664261B (en) A kind of methods, devices and systems configuring flow entry
CN108377671B (en) Method and computer equipment for processing message
CN109981457A (en) A kind of method of Message processing, network node and system
JP2017212726A5 (en)
CN109450852A (en) Network communication encrypting and decrypting method and electronic equipment
US11337211B2 (en) Operation request generating method, device, and system
CN106161335A (en) A kind for the treatment of method and apparatus of network packet
WO2016086670A1 (en) Vxlan packet transmission method and apparatus, and storage medium
CN104378299B (en) Flow table item processing method and device
CN106878194A (en) A kind of message processing method and device
CN106664235B (en) Method and device for fusing software defined network and traditional network
WO2018006305A1 (en) Method for generating forwarding table, and forwarding device
US10298508B2 (en) Communication system, receiving-side apparatus and transmission-side apparatus
CN109005116B (en) Message forwarding method and device
GB2592315A (en) Methods and systems for sending packets through a plurality of tunnels
CN106789229A (en) A kind of middleware towards industrial SDN, system and its implementation
CN108738078A (en) A kind of transmission side data subtraction unit, equipment and readable storage medium storing program for executing
CN106716974B (en) Access distribution method, device and system
CN109936566A (en) A kind of data transmission method system, device and computer readable storage medium
CN106034133B (en) A kind of openflow processing method, message treatment method, controller and interchanger
CN105471756A (en) Data packet processing method and data packet processing device
CN105939404B (en) The acquisition methods and device of NAT resource
WO2017173601A1 (en) Traffic control method and apparatus in software defined network
CN106789695A (en) Message processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220216

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee after: Huawei Cloud Computing Technologies Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.