CN106105098B - The processing method of interchanger and service request message - Google Patents

The processing method of interchanger and service request message Download PDF

Info

Publication number
CN106105098B
CN106105098B CN201480020423.8A CN201480020423A CN106105098B CN 106105098 B CN106105098 B CN 106105098B CN 201480020423 A CN201480020423 A CN 201480020423A CN 106105098 B CN106105098 B CN 106105098B
Authority
CN
China
Prior art keywords
message
service request
request message
movement
flow entry
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
CN201480020423.8A
Other languages
Chinese (zh)
Other versions
CN106105098A (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 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
Publication of CN106105098A publication Critical patent/CN106105098A/en
Application granted granted Critical
Publication of CN106105098B publication Critical patent/CN106105098B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/40Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using virtualisation of network functions or resources, e.g. SDN or NFV entities

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the present invention provides the processing method of a kind of interchanger and service request message, belongs to network technique field.It include: to receive initial service request message;Determine the matching flow entry of the predetermined fraction carried in instruction overturning message header field and the instruction that deliberate action is executed to initial service request message;According to the predetermined fraction in the message header field of matching flow entry overturning initial service request message, deliberate action is executed to initial service request message according to matching flow entry, obtains service response message;Send service response message.The present invention is after the determining matching flow entry with initial service request message matching, according to the predetermined fraction in matching flow entry overturning message header field, and deliberate action is executed to initial service request message, obtain service response message, make when obtaining service response message, it locally can be realized in interchanger, the business processing efficiency between controller and interchanger can not only be improved, and can be reduced the interaction cost between controller and interchanger.

Description

The processing method of interchanger and service request message
Technical field
The present invention relates to network technique field, in particular to the processing method of a kind of interchanger and service request message.
Background technique
In order to promote the flexibility and manageability of network deployment, it is based on software defined network (Software Defined Network, SDN) network managing mode be widely used.SDN decouples the control function of network element and forwarding capability, by network In network element be divided into two parts of control plane network element and forwarding surface network element.Open flows (OpenFlow) agreement is current SDN Main control protocol between control plane and forwarding surface.Control plane network element is known as OpenFlow in OpenFlow agreement Controller (i.e. OpenFlow controller, hereinafter referred to as controller), is known as OpenFlow Switch for forwarding surface network element (OpenFlow interchanger, hereinafter referred to as interchanger).In the business procession of interchanger, exchange opportunity receives many industry Be engaged in request message, and the transmitting terminal of many service request messages be required to just carry out after obtaining service response message it is next Step processing.In order to guarantee the normal processing of business, the processing method of service request message is most important.
In the received service request message of interchanger, having a kind of service response message is the message to service request message Header field is overturn, and is obtained after executing deliberate action to the service request message after the overturning of message header field.The relevant technologies exist When handling such service request message, used method are as follows: interchanger receives service request message, and by the service request report Text is sent to controller;Controller carries out the overturning of message header field to the predetermined fraction of the message header field of service request message, and right Service request message after the overturning of message header field executes deliberate action, and after obtaining service response message, service response message is sent out It send to interchanger, which is sent by interchanger.
In the implementation of the present invention, inventor find the relevant technologies the prior art has at least the following problems:
For the relevant technologies interchanger when handling such service request message, interchanger is receiving such service request message When, all such service request message can be sent to controller, be carried out by message header field of the controller to the service request message Overturning, and deliberate action is executed, after obtaining service response message, retransmit to interchanger.However, due to such service request report The quantity of text is relatively more, handles if these service messages are all sent to controller, will lead to interchanger and controller Between interface packets quantity it is excessive, to can not only make the business processing efficiency between controller and interchanger lower, but also It will increase the interaction cost between controller and interchanger.
Summary of the invention
Of the existing technology in order to solve the problems, such as, the embodiment of the invention provides a kind of interchanger and service request messages Processing method.The technical solution is as follows:
In a first aspect, providing a kind of interchanger, the interchanger includes:
Receiving module, for receiving initial service request message;
Determining module, for the determining matching flow entry with the initial service request message matching, the matching flow table Item is sent by controller in advance, and the matching flow entry carries the predetermined fraction indicated overturn in message header field and to described first Beginning of the school year business request message executes the instruction of deliberate action;
Flip module, for being overturn in the message header field of the initial service request message according to the matching flow entry Predetermined fraction;
Execution module, it is described default dynamic for being executed according to the matching flow entry to the initial service request message Make, obtains service response message;
Sending module, for sending the service response message.
With reference to first aspect, in the first possible implementation of the first aspect, the institute of the flip module overturning Stating the predetermined fraction in the message header field of initial service request message includes MAC (Media Access Control, media access Control) address, IP (Internet Protocol, net association) address, UDP (User Datagram Protocol, user data Datagram protocol) in port numbers or TCP (Transmission Control Protocol, transmission control protocol) port numbers at least It is a kind of.
With reference to first aspect, in the second possible implementation of the first aspect, what the execution module executed is pre- If movement includes at least one of the specific field modification movement of message header field and message body modification movement;
Wherein, the message header field specific field modification acts the heading for modifying the initial service request message The value of specific field in domain;
The message body modification movement is rung for the message body of the initial service request message to be replaced with business The message body of message is answered, and modifies the length of the service request message after replacement message body.
The possible implementation of second with reference to first aspect, in the third possible implementation of first aspect In, the execution module, comprising:
First execution unit, for when the deliberate action include the message body modification movement when, according to described It matches flow entry and first other movements is executed to the initial service request message, obtain the first service request message, described the One other movements are the movement in the deliberate action in addition to message body modification movement;
First control unit, for controlling institute when determining that the first service request message needs to exit assembly line It states the first service request message and jumps to preset group list item component, the preset group list item component is cached with service response message Message body;
First replacement unit, for according to the preset group list item component by the message body of the first service request message Replace with the message body of the service response message;
First modification unit, for modifying the length of the service request message after replacing message body.
The possible implementation of second with reference to first aspect, in the 4th kind of possible implementation of first aspect In, the execution module, comprising:
Second execution unit, for when the deliberate action include the message body modification movement when, according to described It matches flow entry and second other movements is executed to the initial service request message, obtain the second service request message, described the Two other movements are the movement before message body modification described in the deliberate action acts;
The second service request message is jumped to default context component for controlling by the second control unit, described Default context component is cached with the message body of service response message;
Second replacement unit, for the message body of the second service request message to be replaced with the service response message Message body;
Second modification unit obtains third business and asks for modifying the length of the service request message after replacing message body Seek message;
Return unit, for the third service request message to be back to assembly line;
Third execution unit executes the other movements of third, the third to the third service request message for continuing Other movements are the movement after the movement of message body modification described in the deliberate action.
Second aspect provides a kind of processing method of service request message, which comprises
Receive initial service request message;
The determining matching flow entry with the initial service request message matching, the matching flow entry is in advance by controller It sends, and the matching flow entry carries the predetermined fraction indicated overturn in message header field and to the initial service request message Execute the instruction of deliberate action;
The predetermined fraction in the message header field of the initial service request message, and root are overturn according to the matching flow entry The deliberate action is executed to the initial service request message according to the matching flow entry, obtains service response message;
Send the service response message.
In conjunction with second aspect, in the first possible implementation of the second aspect, the initial service request message Message header field in predetermined fraction include at least one of MAC Address, IP address, UDP port number or TCP port number.
In conjunction with second aspect, in a second possible implementation of the second aspect, the deliberate action is included at least One of the specific field modification movement of message header field and message body modification movement;
Wherein, the message header field specific field modification acts the heading for modifying the initial service request message The value of specific field in domain;
The message body modification movement is rung for the message body of the initial service request message to be replaced with business The message body of message is answered, and modifies at least one of the length of the service request message after replacement message body.
In conjunction with second of possible implementation of second aspect, in the third possible implementation of second aspect In, it is described that the deliberate action is executed to the initial service request message according to the matching flow entry, comprising:
If the deliberate action includes the message body modification movement, according to the matching flow entry to described Initial service request message executes first other movements, obtains the first service request message, first other movements are described Movement in deliberate action in addition to message body modification movement;
When determining that the first service request message needs to exit assembly line, control the first service request message Preset group list item component is jumped to, the preset group list item component is cached with the message body of service response message;
The message body of the first service request message the business is replaced with according to the preset group list item component to ring The message body of message is answered, and modifies the length of the service request message after replacement message body.
In conjunction with second of possible implementation of second aspect, in the 4th kind of possible implementation of second aspect In, it is described that the deliberate action is executed to the initial service request message according to the matching flow entry, comprising:
If the deliberate action includes the message body modification movement, according to the matching flow entry to described Initial service request message executes second other movements, obtains the second service request message, second other movements are described Movement before the modification of message body described in deliberate action movement;
The second service request message is jumped to default context component, the default context component caching by control There is the message body of service response message;
The message body of the second service request message is replaced with to the message body of the service response message, and modifies and replaces The length of service request message after changing message body obtains third service request message;
The third service request message is back to assembly line, and continues to execute the to the third service request message Three other movements, the other movements of third are the movement after the movement of message body modification described in the deliberate action.
The third aspect, provides a kind of interchanger, and the interchanger includes:
Receiver, for receiving initial service request message;
Processor is flowed for the determining matching flow entry with the initial service request message matching according to the matching List item overturns the predetermined fraction in the message header field of the initial service request message, and according to the matching flow entry to described Initial service request message executes the deliberate action, obtains service response message, the matching flow entry is in advance by controller It sends, and the matching flow entry carries the predetermined fraction indicated overturn in message header field and to the initial service request message Execute the instruction of deliberate action;
Transmitter, for sending the service response message.
In conjunction with the third aspect, in the first possible implementation of the third aspect, the initial service request message Message header field in predetermined fraction include at least one of MAC Address, IP address, UDP port number or TCP port number.
In conjunction with the third aspect, in the second possible implementation of the third aspect, the deliberate action is included at least One of the specific field modification movement of message header field and message body modification movement;
Wherein, the message header field specific field modification acts the heading for modifying the initial service request message The value of specific field in domain;
The message body modification movement is rung for the message body of the initial service request message to be replaced with business The message body of message is answered, and modifies the length of the service request message after replacement message body.
In conjunction with second of possible implementation of the third aspect, in the third possible implementation of the third aspect In, the processor, if being also used to the deliberate action includes the message body modification movement, according to the matching Flow entry executes first other movements to the initial service request message, obtains the first service request message, described first its It is acted as the movement in the deliberate action in addition to message body modification movement;Determining that first business asks When message being asked to need to exit assembly line, the first service request message is jumped to preset group list item component by control, described pre- If group list item component is cached with the message body of service response message;First business is asked according to the preset group list item component It asks the message body of message to replace with the message body of the service response message, and modifies the service request message after replacement message body Length.
In conjunction with second of possible implementation of the third aspect, in the 4th kind of possible implementation of the third aspect In, the processor, if being also used to the deliberate action includes the message body modification movement, according to the matching flow table Item executes second other movements to the initial service request message, obtains the second service request message, and described second is other dynamic As the movement before the movement of message body modification described in the deliberate action;It controls the second service request message Default context component is jumped to, the default context component is cached with the message body of service response message;By described second The message body of service request message replaces with the message body of the service response message, and the business modified after replacement message body is asked The length for seeking message obtains third service request message;The third service request message is back to assembly line, and is continued pair The third service request message executes the other movements of third, and the other movements of third are message described in the deliberate action Movement after body modification movement.
The beneficial effect of technical solution provided in an embodiment of the present invention is:
By being overturn according to matching flow entry initial after the determining matching flow entry with initial service request message matching Predetermined fraction in the message header field of service request message, and deliberate action is executed to initial service request message, obtain business Response message, so that locally can be realized when obtaining service response message in interchanger, without being handed over controller Mutually, so as to reduce the interaction with controller, the business processing efficiency between controller and interchanger can not only be improved, and And it can be reduced the interaction cost between controller and interchanger.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is a kind of SDN network configuration diagram that one embodiment of the invention provides;
Fig. 2 be another embodiment of the present invention provides a kind of controller and interchanger between the signal of Message processing process Figure;
Fig. 3 be another embodiment of the present invention provides a kind of interchanger in flow table structural schematic diagram;
Fig. 4 be another embodiment of the present invention provides a kind of interchanger structural schematic diagram;
Fig. 5 be another embodiment of the present invention provides a kind of service request message processing method flow chart;
Fig. 6 be another embodiment of the present invention provides a kind of service request message processing method flow chart;
Fig. 7 be another embodiment of the present invention provides a kind of service request message processing method flow chart;
Fig. 8 be another embodiment of the present invention provides a kind of service request message processing method flow chart;
Fig. 9 be another embodiment of the present invention provides a kind of service request message processing method flow chart;
Figure 10 be another embodiment of the present invention provides a kind of interchanger structural schematic diagram.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
With the rapid development of network technology, in current network deployment, there are the network elements of numerous complicated, such as route Device, gateway, interchanger, firewall and all kinds of servers etc..These realize the network element of various network functions usually all comprising respective Independent control module, this distributed control module cause the deployment of network extremely complex.On this basis, in order to implement The modification of some control function perhaps introduces new characteristic and needs that numerous network elements are upgraded or replaced.To promote network The flexibility and manageability of deployment, the advantage of the network element management method based on SDN are increasingly prominent.Network deployment based on SDN, The control function of network element and forwarding capability can be decoupled, the network element in network is divided into two portions of control plane and forwarding surface Point.Wherein, control plane generally concentrates deployment, and forwarding surface often according to actual needs distributed deployment in multiple physical equipments On.Control plane realizes various network functions, such as routing, exchange, etc. by carrying out control to forwarding surface.Mesh Before, SDN is becoming widely adopted in data center network and telecommunication network.As shown in Figure 1, it illustrates the nets of SDN a kind of Network configuration diagram, the network architecture include controller 101 and interchanger 102.Wherein, it may include inside interchanger 102 more Grade flow table.
As shown in Fig. 2, it illustrates the Message processing process schematics between a kind of controller 101 and interchanger 102.Its In, the main behavior that interchanger 102 is controlled by flow entry of controller 101.As shown in Fig. 2, controller 101 is predefined to assorted Which type of operation the message of sample carries out, to generate the corresponding flow entry of flow tables at different levels of interchanger 102, and by interchanger The 102 corresponding flow entry of flow tables at different levels is issued to the flow tables at different levels of interchanger 102 respectively.
Wherein, the corresponding flow entry of every grade of flow table includes flow table match information and flow table processing movement.Flow table match information Combination including any information or any information in Ethernet frame head, IP information, TCP/UDP port numbers and MAC information, flow table Processing movement includes processing type and relevant parameter.Wherein, processing type is such as forwarded, abandons, modifies, encapsulates, is decapsulated.Such as Shown in Fig. 2, controller 101 may will belong to the flow entry point of different flow tables by multiple stream mode message (Flow_Mod message) It is not issued to the flow tables at different levels of interchanger 102.Interchanger 102 stores the corresponding flow entry of flow tables at different levels to corresponding flow table In.After message reaches interchanger 102, interchanger 102 executes multilevel flow table matching, and it is corresponding to execute matched flow table to message Flow entry in carry flow table processing movement.
Fig. 3 shows the flow table structural schematic diagram in a kind of interchanger.After interchanger 102 receives message, make message according to It is secondary to pass through flow tables at different levels as shown in Figure 3.Wherein, after message enters interchanger 102, it can first be sent to 0 grade of flow table and be handled, It jumps to the n1 grades of flow tables of next stage flow table indicated in 0 grade of flow table processing result again after the completion of processing to continue to handle, the n1 Grade flow table can be 1 grade of flow table, be also possible to other grades of flow tables;N1 grades of flow table processing are jumped to after the completion of n1 grades of flow table processing again As a result the next stage flow table indicated in continues to handle;And so on, until to be sent to the message corresponding last for the message After nn grades of flow tables of level-one flow table are handled, which is exported by the output port that controller is specified.The nn grades of flow table It can be afterbody flow table in interchanger 102, be also possible to other grades of flow tables in interchanger 102.Wherein, message is in interchanger The whole flow process that 102 flow tables at different levels are handled is known as assembly line.
To facilitate the understanding of the present invention, below in conjunction with the content of flow entry to the flow table match information and flow table in flow entry Processing movement is explained.As shown in Table 1, the content in flow entry include: matching domain (Match Fields), it is preferential Grade (Priority), counter (Counters), instruction (Instructions), ageing time (Timeouts) and temporary file (Cookie), etc..Wherein, matching domain and instruction respectively correspond above-described flow table match information and flow table processing movement.
Table one
Match Fields Priority Counters Instructions Timeouts Cookies
Matching domain, which refers to, matches the information such as various message header fields, receiving port number with specified value.Its In, message header field such as IP five-tuple (source IP address, purpose IP address, protocol type, source port number, the destination port of IP packet Number), the various message header fields in Ethernet frame head, such as source MAC, target MAC (Media Access Control) address.Here matching can be accurately Matching, is also possible to mask matches.For example, Match (SRC IP=1.1.1.1), indicates to carry out essence to the source IP address of message Really matching, the message that source IP address is 1.1.1.1 can be indicated with successful match, Match (SRC IP/16=1.1.0.0) First 16 of IP address are matched, institute's source IP address is that the message of 1.1.0.0/16 network segment can successful match.
Instruction in flow entry can there are many kinds of, for example, instruction can be action command (Action instruction), assembly line Control instruction (Goto-Table instruction), measurement instruction (Meter instruction), writing metadata instructions, (Write-Metadata refers to Enable), etc..Wherein, the Action instruction in OpenFlow is divided into two major class, and a major class is the movement executed at once, right The instruction answered is Apply-Actions;Another major class is first to be stored in behavior aggregate, is just executed at the end of assembly line Movement.The instruction that movement is write into behavior aggregate is Write-Actions, and the instruction for removing everything in behavior aggregate is Clear- Actions.Whether the movement executed at once, the movement being still stored in behavior aggregate all include plurality of classes.For example, packet The movement for indicating how to be operated to message is included, such as forwarding abandons, modification heading, encapsulation, decapsulates, is sent to control Device and setting queue instruction (Set-Queue instruction), etc..Goto-Table instruction, instruction message are jumped between flow table Turn, i.e., jumps to another flow table from a flow table.Meter instruction instruction carries out QoS (Quality to message using Meter table Of Service, service quality) processing.
In conjunction with above content, it is directed to service request message source and needs to ring in the business for obtaining the transmission of interchanger 102 Answering message just can continue to handle in next step, and a part of content in the message header field of service response message is service request message It is simple overturning, a part of content be fixed value, the message body of service response message is identical as service request message or is solid The service request message of definite value, the embodiment of the invention provides a kind of processing methods for such service request message.
For ease of description, in each embodiment of the present invention, interchanger will be reached, and needs the business of switch processes Request message is referred to as initial service request message, will in interchanger with the flow entry of initial service request message matching be referred to as With flow entry.Processing method each embodiment as described below of specific service request message:
Fig. 4 is a kind of structural schematic diagram of the interchanger provided according to an exemplary embodiment, and the interchanger is for executing The processing method for the service request message that any embodiment of following Fig. 5 into embodiment illustrated in fig. 9 provides.Referring to fig. 4, the friendship It changes planes and includes:
Receiving module 401, for receiving initial service request message;
Determining module 402, for the determining matching flow entry with initial service request message matching, wherein matching flow table Item is sent by controller in advance, and is matched flow entry and carried the predetermined fraction in instruction overturning message header field and ask to initial service Message is asked to execute the instruction of deliberate action;
Flip module 403, for default in the message header field according to matching flow entry overturning initial service request message Part;
Execution module 404 obtains business for executing deliberate action to initial service request message according to matching flow entry Response message;
Sending module 405, for sending service response message.
Optionally, the predetermined fraction in the message header field for the initial service request message that flip module 403 is overturn includes MAC At least one of address, IP address, UDP port number or TCP port number.
Optionally, the deliberate action that execution module 404 executes includes at least the specific field modification of message header field and acts and report One of literary message body modification movement;
Wherein, the finger in message header field of the message header field specific field modification movement for modifying initial service request message Determine the value of field;
Message body modification is acted for the message body of initial service request message to be replaced with service response message Message body, and modify the length of the service request message after replacement message body.
Optionally, execution module 404 includes:
First execution unit, for when deliberate action include message body modification movement when, according to matching flow entry pair Initial service request message executes first other movements, obtains the first service request message, wherein first other movements are default Movement in movement in addition to message body modification movement;
First control unit, for controlling the first industry when determining that the first service request message needs to exit assembly line Business request message jumps to preset group list item component, wherein preset group list item component is cached with the message body of service response message;
First replacement unit, for the message body of the first service request message to be replaced with industry according to preset group list item component The message body of business response message;
First modification unit, for modifying the length of the service request message after replacing message body.
Optionally, execution module 404 includes:
Second execution unit, for when deliberate action include message body modification movement when, according to matching flow entry pair Initial service request message executes second other movements, obtains the second service request message, wherein second other movements are default Movement in movement before message body modification movement;
Second service request message is jumped to default context component for controlling, wherein default by the second control unit Context component is cached with the message body of service response message;
Second replacement unit, for the message body of the second service request message to be replaced with to the message of service response message Body;
Second modification unit obtains third business and asks for modifying the length of the service request message after replacing message body Seek message;
Return unit, for third service request message to be back to assembly line;
Third execution unit executes the other movements of third to third service request message for continuing, wherein third is other Movement is the movement in deliberate action after message body modification movement.
Interchanger provided in an embodiment of the present invention, by determining with initial service request message matching of determining module After flow entry, flip module overturns the predetermined fraction in the message header field of initial service request message according to matching flow entry, And deliberate action is executed to initial service request message by execution module, service response message is obtained, so that ringing in the business of acquisition It when answering message, locally can be realized in interchanger, without being interacted with controller, so as to reduce the friendship with controller Mutually, the business processing efficiency between controller and interchanger can not only be improved, and can be reduced between controller and interchanger Interaction cost.
Fig. 5 is a kind of flow chart of the processing method of the service request message provided according to an exemplary embodiment.Such as Fig. 5 Shown, method flow provided in an embodiment of the present invention includes:
501: receiving initial service request message.
502: the determining matching flow entry with initial service request message matching, wherein matching flow entry is in advance by controlling Device is sent, and is matched flow entry and carried the predetermined fraction in instruction overturning message header field and execute to initial service request message pre- If the instruction of movement.
503: according to matching flow entry overturning initial service request message message header field in predetermined fraction, and according to Deliberate action is executed to initial service request message with flow entry, obtains service response message.
Optionally, the predetermined fraction in the message header field of initial service request message includes MAC Address, IP address, the end UDP At least one of slogan or TCP port number.
Optionally, deliberate action includes at least in the specific field modification movement of message header field and message body modification movement One kind;
Wherein, the finger in message header field of the message header field specific field modification movement for modifying initial service request message Determine the value of field;
Message body modification is acted for the message body of initial service request message to be replaced with service response message Message body, and modify at least one of the length of the service request message after replacement message body.
Optionally, deliberate action is executed to initial service request message according to the matching flow entry, comprising:
If deliberate action includes message body modification movement, according to the matching flow entry to initial service request Message executes first other movements, obtains the first service request message, wherein first other movements are that message is removed in deliberate action Movement except message body modification movement;
When determining that the first service request message needs to exit assembly line, control jumps to the first service request message pre- If organizing list item component, wherein preset group list item component is cached with the message body of service response message;
The message body of first service request message is replaced with to the message of service response message according to preset group list item component Body, and modify the length of the service request message after replacement message body.
Optionally, deliberate action is executed to initial service request message according to matching flow entry, comprising:
If deliberate action includes message body modification movement, according to matching flow entry to initial service request message Second other movements are executed, the second service request message is obtained, wherein second other movements are message body in deliberate action Movement before modification movement;
Second service request message is sent to default context component, wherein default context component is cached with business The message body of response message;
The message body of second service request message is replaced with into the message body of service response message, and modifies replacement message body The length of service request message afterwards obtains third service request message;
Third service request message is back to assembly line, and is continued other to third service request message execution third dynamic Make, wherein the other movements of third are the movement in deliberate action after message body modification movement.
504: sending service response message.
Method provided in an embodiment of the present invention, by the determining matching flow entry with initial service request message matching Afterwards, according to the predetermined fraction in the message header field of matching flow entry overturning initial service request message, and to initial service request Message executes deliberate action, obtains service response message so that when obtaining service response message, interchanger locally can be real It is existing, without interacting with controller, so as to reduce the interaction with controller, controller and exchange can not only be improved Business processing efficiency between machine, and can be reduced the interaction cost between controller and interchanger.
Fig. 6 is a kind of flow chart of the processing method of the service request message provided according to an exemplary embodiment.Such as Fig. 6 Shown, method flow provided in an embodiment of the present invention includes:
601: receiving and storing the flow entry of controller generation.
Since controller is by the behavior of flow entry control interchanger, interchanger is according to the flow entry that controller is that it is generated Corresponding movement is executed to the message received.In order to determine that, to what kind of movement the message received executes, interchanger needs The flow entry of controller generation is received and stored in advance.
602: receiving initial service request message.
Since interchanger is in processing business, many service request messages, and many transmission service request reports can be received The transmitting terminal of text is required to just carry out next step operation after obtaining service response message.Therefore, in order to guarantee business Normal processing, interchanger need to receive and process initial service request message.
Which equipment is come from about received initial service request message, the embodiment of the present invention is not especially limited.For example, Initial service request message may be from other interchangers in SDN system, it is also possible to from controller.
In addition, the embodiment of the present invention is not defined the concrete type of business.When it is implemented, type of service can be ICMP (Internet Control Message Protocol, Internet Control Message Protocol) business, or GTPU (GPRS Tunneling Protocol-User plane, GPRS Tunneling Protocol-User plane) business, etc..
603: the determining matching flow entry with initial service request message matching, wherein matching flow entry is in advance by controlling Device is sent, and is matched flow entry and carried the predetermined fraction in instruction overturning message header field and execute to initial service request message pre- If the instruction of movement.
In order to determination the initial service request message received is handled by which flow entry, controller it needs to be determined that With the matching flow entry of initial service request message matching.About the determining matching with initial service request message matching of controller The mode of flow entry, including but not limited to by the message header field flow entry corresponding with all flow tables in initial service request message In message header field be compared to realize.
For example, interchanger is previously stored with 2 flow entrys, the match information that flow entry 1 carries is respectively DST MAC= MAC1, the match information DST MAC=MAC2 that flow entry 2 carries, if the DST MAC of initial service request message is MAC2, Then determine that matching flow entry is flow entry 2.
The message header field of service request message is overturn in addition, being directed to, and to the business after the overturning of message header field Request message executes the service response message obtained after deliberate action, in order to obtain this kind of service response message, matches flow entry It carries the predetermined fraction in instruction overturning message header field and executes the instruction of deliberate action to initial service request message.
604: according to the predetermined fraction in the message header field of matching flow entry overturning initial service request message.
The operation for obtaining service response message in the related technology is changed by controller realization by interchanger in order to realize Local to realize, executing operation without controller can be obtained service response message, need to initial service request message Predetermined fraction in message header field is overturn.About the message header field according to matching flow entry overturning initial service request message In predetermined fraction mode, the embodiment of the present invention is not especially limited.When it is implemented, needing that matching flow entry is combined to carry Particular content depending on.
For example, if instruction " overturns the source MAC and purpose of initial service request message in the content of matching flow entry MAC Address, and overturn the source IP and destination IP of initial service request message ", then according to the content of the matching flow entry, overturning is just The beginning of the school year is engaged in the source MAC and target MAC (Media Access Control) address and initial service request message in the message header field in request message Source IP and destination IP in message header field.
It is including but not limited to MAC Address, IP about the predetermined fraction in the message header field of initial service request message At least one of location, UDP port number or TCP port number.
605: deliberate action being executed to initial service request message according to matching flow entry, obtains service response message.
Further, service response message, past contact need to execute initial service request message default dynamic in order to obtain Make.About the particular content of deliberate action, the embodiment of the present invention is not especially limited.When it is implemented, deliberate action is at least wrapped Include one of the specific field modification movement of message header field and message body modification movement.Wherein, message header field specific field The value of specific field in message header field of the modification movement for modifying initial service request message.Message body modification movement For the message body of initial service request message to be replaced with to the message body of service response message, and modify replacement message body after The length of service request message.
Certainly, deliberate action can also include other movements, for example, control initial service request message is jumped to it is next Grade flow table handle, etc., and the present invention is not especially limit this.
Wherein, when deliberate action is that the specific field modification of message header field acts, interchanger is needed initial service request The value of specific field in the message header field of message is revised as consistent with the value specified in matching flow entry.Wherein, in order to obtain Service response message, the field value that knowledge message is service request message that needs to get the bid message header field are revised as can be identified for that message For the field value of service response message.
For example, " ICMP code=8, ICMP type=0 " mark if in the message header field of initial service request message The message is service request message, then becomes service response report to execute the initial service request message after deliberate action Text needs for the value of the field to be revised as the value of service response message.For example, if " ICMP code=0, ICMP type= 0 " can be identified for that message is service response message, then needs " ICMP code=8, ICMP type=0 " are revised as " ICMP Code=0, ICMP type=0 ".It certainly, can also basis when deliberate action is that the specific field modification of message header field acts Need to modify the value of other fields in message header field, the embodiment of the present invention is not especially limited.
It should be noted that in order to enable switch to locally obtain service response message, the deliberate action in interchanger The specific field modification of message header field should be included at least to act, and it is service request report that the specific field, which includes at least identification message, The field of text or service response message.
When deliberate action is that the modification of message body acts, the message body by initial service request message is needed to be revised as Match the value specified in flow entry.For example, needing to ask initial service if the message body of service response message is fixed value The message body of message is asked to be revised as the fixed value.
Certainly, it is above only for when deliberate action be respectively message header field specific field modification movement or message When one of body modification movement, how processing is carried out to initial service request message and be illustrated.However, working as deliberate action For message header field specific field modification movement or message body modification movement etc. movement at least two combination when, It is consistent with the handling principle when deliberate action is one such to the processing of initial service request message, it is no longer superfluous herein It states.
It should be noted that it is dynamic to execute the modification of message body when deliberate action includes message body modification movement It can be the execution when exiting assembly line, be also possible to execute in a pipeline, the embodiment of the present invention does not limit this specifically It is fixed.Therefore, when deliberate action includes message body modification movement, initial service request message is held according to matching flow entry The mode of row deliberate action includes but is not limited to have following two ways:
First way: which is that message body modification movement is executed when exiting assembly line.Specifically, when multiple When the different flow entry of flow table match information has same treatment, a group list item component can be pre-established, it is at different levels with simplification Flow table reprocesses the process of message, allows the movement handled in group list item component unified when message exits assembly line It executes.Wherein, group list item component does not return again to assembly line after handling message, and is directly transferred by designated port It goes.In embodiments of the present invention, the message body for being cached with service response message in list item component in advance is organized.Therefore, report is being executed When literary message body modification acts, it can be realized by group list item component.On this basis, initial service is asked according to matching flow entry Ask message execute the replacement of message body movement specific implementation include but is not limited to are as follows: according to matching flow entry to initial Service request message executes first other movements, obtains the first service request message, wherein first other movements are deliberate action In except message body modification movement in addition to other movements;When determining that the first service request message needs to exit assembly line, First service request message is jumped to preset group list item component by control, wherein preset group list item component is cached with service response The message body of message;The message body of the first service request message is replaced with into service response message according to preset group list item component Message body, and modify the length of the service request message after replacement message body.
About the mode for executing first other movements to initial service request message according to matching flow entry, the present invention is implemented Example is not especially limited.About the particular content of first other movements, including but not limited to encapsulate, decapsulate, be sent to down Level-one flow table, etc..
Wherein, when the first service request message is jumped to preset group list item component by control, including but not limited to: passing through Preset group table is directed toward by the first service request message that the afterbody flow table of processing initial service request message obtains processing It realizes.
The message body of the first service request message is replaced with into service response message about according to preset group list item component The value of the message body of first service request message is including but not limited to replaced with preset group list item component and delayed by the mode of message body The value of the message body for the service response message deposited.For example, if the message body of the service response message of group list item component caching is The message body of first service request message is then replaced with the fixed value by fixed value.
Further, after due to executing message body modification movement, the message length of the first service request message may It changes, therefore, it is also desirable to modify the length of the service request message after replacement message body.After replacing message body about modification Service request message length mode, the embodiment of the present invention is not especially limited.
It should be noted that since this kind of mode is to execute message body modification movement when exiting assembly line, when pre- If group list item just obtains service response message after having executed message body modification movement.It is other in SDN system in order to make Interchanger or controller continue to handle service response message, and interchanger needs to ring business by preset group list item component Message is answered to send by designated port.It is to be noted, however, that if obtained service response message is needed from multiple Port is sent, then in foundation group list item component, needs to generate a group list item component for each port.It wherein, is every The content of the message body of the service response message for the group list item component caching that a port generates is identical, and only output port is different.
The second way: which is to execute message body modification movement in a pipeline.It in this way, can be with The message body of cache business response message in flow entry, therefore, message body modification movement is directly carried out in flow table 's.Furthermore it is possible to pre-establish a context component, and in the context component cache business response message message Body.Therefore, it when executing message body modification movement, can be executed in the context component.When slow by pre-establishing There is the context component of the message body of service response message, and the modification of message body is executed by the context component and is moved When making, deliberate action is executed to initial service request message according to matching flow entry, is including but not limited to come in the following way It realizes: second other movements being executed to initial service request message according to matching flow entry, obtain the second service request message, In, second other movements are other movements in deliberate action before message body modification movement;The second business is asked in control Message is asked to jump to default context component, wherein default context component is cached with the message body of service response message;By The message body of two service request messages replaces with the message body of service response message, and modifies the service request after replacement message body The length of message obtains third service request message;Third service request message is back to assembly line, and is continued to third industry Business request message executes the other movements of third, wherein the other movements of third are that message body modification acts it in deliberate action Other movements afterwards.
Wherein, the particular content about the second other movements and the other movements of third, the embodiment of the present invention are not made equally to have Body limits.When it is implemented, second other movements and the other movements of third may be to encapsulate, decapsulate, being sent to next stage Flow table, etc..
It should be noted that when second other movements for specified in matching flow entry movement when, from matching flow table by the Two service request messages jump to default context component.When second other movements include being directed toward the movement of other flow tables, from Second service request message is jumped to default context component by other flow tables.In addition, if message body modification movement is Matching the specified first element of flow entry, then second other movements can not also include any movement, and by presetting context Component directly executes message body modification movement.
About the principle for the message body that the message body of the second service request message is replaced with to service response message, and modify The principle of the length of service request message after replacing message body is incited somebody to action with above-mentioned first way according to preset group list item component After the message body of first service request message replaces with the principle of the message body of service response message, and modification replacement message body Service request message length principle it is consistent, for details, reference can be made to the contents in above-mentioned first way, and details are not described herein.
Realize that the message body by the second service request message replaces with the message body of service response message by this kind of mode, And the length of the service request message after replacement message body is modified, to again will be needed after obtaining third service request message Third service request message is back to assembly line, to be continued by each flow table other to third service request message execution third dynamic Make.Wherein, the other movements of third are other movements in deliberate action after message body modification movement.However, if Show to obtain third service request message later i.e. not to any movement of third service request message execution with flow entry middle finger, but Assembly line directly is exited, then no longer needs to execute the other movements of third to third service request message at this time.That is, at this time The other movements of third can not include any movement.
In conjunction with above content, continue to handle due to needing third service request message being back to assembly line, Compared with above-mentioned first way, which is not necessarily to establish preset group list item component for different port, therefore, can save friendship It changes planes memory.
By the message body of the cache business response message in default context component, so that working as multiple flow table match informations When different flow entrys has same treatment, i.e., when the different flow entry of multiple flow table match informations includes that message body is repaired When change is made, it can be realized by being directed toward the default context component, so that the message body of service response message is without slow There are in flow tables at different levels, so as to save switch memory.
It should be noted that the above content only in default context component by the message of the second service request message Body replaces with the message body of service response message, and the length for modifying the service request message after replacement message body has carried out specifically Explanation.However, in the specific implementation, context component can not also be pre-established, and directly by the message of service response message Body is cached into a certain flow table for needing to be implemented message body modification movement, and by the second service request message in the flow table Message body replace with the message body of service response message, and modify replacement message body after service request message length. As the message body for using this kind of mode to realize the second service request message of replacement, and modify the service request report after replacement message body The message body of second service request message is replaced with service response report in default context component by the principle of the length of text The principle of the message body of text, and the principle for modifying the length of the service request message after replacement message body is consistent, no longer has herein Body explanation.However, this kind of mode needs to compare occupancy in the message body of the equal cache business response message of the flow tables at different levels of interchanger Memory.
In addition, if the flow table processing movement in matching flow entry includes that initial service request message is sent to matching stream The content for the next stage flow table specified in list item, the then possibility for executing deliberate action to initial service request message are matching flow table And the next stage flow table specified in matching flow entry, or even further include by the corresponding stream of the next stage flow table specified in matching flow entry The next stage flow table, etc. specified in list item.In short, will need to handle initial in the embodiment of the present invention and subsequent embodiment All flow tables, preset group list item component or the default context component of service request message need to hold initial service request message The summation of capable movement is referred to as deliberate action.
It should be noted that step 604 and step 605 only overturn initial service request message according to matching flow entry with elder generation Message header field in predetermined fraction, after according to matching flow entry to initial service request message execute deliberate action lifted Example explanation.However, in the specific implementation, can also first be executed according to matching flow entry to initial service request message default dynamic Make, further according to the predetermined fraction in the message header field of matching flow entry overturning initial service request message, the embodiment of the present invention pair This is not especially limited.
606: sending service response message.
It, can in order to allow initial service request message source to continue with business after obtaining service response message Service response message to be sent by designated port.Wherein, which can be reception initial service request report The port of text, or other ports, the present invention is not especially limit this.About the reception service response message Equipment, can for send initial service request message interchanger, or other interchangers, can also be controller, Etc., the embodiment of the present invention is not especially limited.
Method provided in an embodiment of the present invention, by the determining matching flow entry with initial service request message matching Afterwards, according to the predetermined fraction in the message header field of matching flow entry overturning initial service request message, and to initial service request Message executes deliberate action, obtains service response message so that when obtaining service response message, interchanger locally can be real It is existing, without interacting with controller, so as to reduce the interaction with controller, controller and exchange can not only be improved Business processing efficiency between machine, and can be reduced the interaction cost between controller and interchanger.
Fig. 7 is a kind of flow chart of the processing method of the service request message provided according to an exemplary embodiment.In order to Convenient for explanation, in embodiments of the present invention, to of the invention real by taking initial service request message is ICMP retroeflection request message as an example Example is applied to be explained.Wherein, the message body of ICMP retroeflection response message is identical as the message body of ICMP retroeflection request message; Source address in the message header field of ICMP retroeflection response message is the destination address of ICMP retroeflection request message, ICMP retroeflection response Destination address in the message header field of message is the source address of ICMP retroeflection request message.In addition, in embodiments of the present invention, with Flow entry in flow table 1 is to be illustrated for matching flow entry, i.e., interchanger overturns ICMP retroeflection request message in flow table 1 Message header field in predetermined fraction, and to the execution deliberate action of ICMP retroeflection request message.As shown in fig. 7, the present invention is real Applying the method flow that example provides includes:
701: interchanger receives the corresponding flow entry 1 of flow table 1 that controller is sent, wherein the flow table of flow entry 1 matches letter Breath includes the ICMP retroeflection request message that matching destination address is itself;Flow table processing movement includes that overturning matching ICMP retroeflection is asked The predetermined fraction in the message header field of message is sought, and deliberate action is executed to ICMP retroeflection request message.
Wherein, the flow table match information of flow entry 1 is in addition to including that the ICMP retroeflection that matching destination address is Self address is asked Ask except message, can also include the port numbers of incoming message, protocol type, the source MAC of message, target MAC (Media Access Control) address with And source IP, destination IP, etc..
For example, the content of flow entry 1 can be with are as follows:
Match (DIP=Self, IP protocol=1, ICMP code=8, type=0, Input Port=1);
Action List (Swap MAC head, Swap IP head, Set ICMP code=0, out port=1)
Wherein, the content of the first row is the flow table match information that flow entry 1 carries, and the second row content is the carrying of flow entry 1 Flow table processing movement.The content paraphrase of the flow entry 1 are as follows: matching destination IP is itself, IP protocol number be 1 (ICMP agreement), ICMP code=8 and ICMP type=0 (ICMP retroeflection request message), the message inputted from port 1.Flow table processing movement Are as follows: the source MAC and target MAC (Media Access Control) address (Swap MAC head) of the message header field of overturning matching ICMP retroeflection request message, The source IP and destination IP (Swap IP head) of overturning matching ICMP retroeflection request message, are arranged ICMP code=0 (by retroeflection Request message becomes retroeflection response message), and treated message is sent from port 1 (out port=1).
Wherein, in the citing, the predetermined fraction in message header field is the source of the message header field of ICMP retroeflection request message MAC Address and target MAC (Media Access Control) address, source IP and destination IP.Deliberate action includes setting ICMP code=0.
The flow table 1 of 702:ICMP retroeflection request message arrival interchanger.
703: flow table 1 matches ICMP retroeflection request message according to flow entry 1, and after successful match, according to right It answers flow entry 1 to overturn the predetermined fraction in the message header field of ICMP retroeflection request message, and executes specified in flow entry 1 preset Movement, obtains ICMP retroeflection response message.
In conjunction with the content of flow entry 1 in above-mentioned steps 701, if flow table 1 determines received ICMP retroeflection request message Indicated in message matching information the message be inputted from port 1, destination IP be itself, IP protocol number 1, type of message are ICMP retroeflection request message, it is determined that the ICMP retroeflection request message received is matched with pre-stored flow entry 1.Therefore, Flow table 1 overturns the source MAC and target MAC (Media Access Control) address of the message header field of ICMP request message, overturns ICMP retroeflection request message Source IP and destination IP;ICMP code=0 is set, so that ICMP retroeflection request message is become ICMP retroeflection response message.
Since the flow table processing movement in flow entry 1 does not include the content for jumping to other grades of flow tables, in the present invention In embodiment, by flow table 1 handle overturning message header field, and to ICMP retroeflection request message execute deliberate action after, obtain ICMP Retroeflection response message.
704: flow table 1 sends the ICMP retroeflection response message from designated port.
In conjunction with the content of above-mentioned flow entry 1, due to indicating the needs of flow table 1 in flow entry 1, by treated, ICMP retroeflection is asked Message is asked to send by port 0, therefore, flow table 1 sends the ICMP retroeflection response message by port 1.
Method provided in an embodiment of the present invention, by the determining matching flow table with ICMP retroeflection service request message matching Xiang Hou according to the predetermined fraction in the message header field of matching stream item overturning ICMP retroeflection request message, and requests ICMP retroeflection Message executes deliberate action, obtains ICMP retroeflection response message, so that when obtaining ICMP retroeflection response message, in interchanger sheet Ground can be realized, and without interacting with controller, so as to reduce the interaction with controller, can not only improve control Business processing efficiency between device and interchanger, and can be reduced the interaction cost between controller and interchanger.
Fig. 8 is a kind of flow chart of the processing method of the service request message provided according to an exemplary embodiment.In order to Convenient for explanation, in embodiments of the present invention, to the embodiment of the present invention by taking service request message is GTPU retroeflection request message as an example It is explained.Wherein, the source address in the message header field of GTPU retroeflection response message is the mesh of GTPU retroeflection request message Address, the destination address in the message header field of GTPU retroeflection response message is the source address of GTPU retroeflection request message;GTPU The message body of retroeflection response message is different from the message body of GTPU retroeflection request message, but is fixed value.In addition, of the invention real It applies in example, with service request at the end of assembly line in preset group list item component (Group) after the overturning of replacement message header field The message body of message, matching flow entry are the processing side for flow entry 1 to service request message provided in an embodiment of the present invention Method is explained.As shown in figure 8, method flow provided in an embodiment of the present invention includes:
801: the preset group list item component in interchanger receives the message body for the GTPU retroeflection response message that controller is sent.
Since the message body of GTPU retroeflection response message is fixed value, preset group list item component is received by controlling The message body for the GTPU retroeflection response message that device is sent is fixed value.Preset group list item component receives GTPU retroeflection response message After message body, be buffered in correspondence memory, so as to it is subsequent exit assembly line when, it is dynamic to execute the modification of message body Make.
802: flow tables at different levels receive the correspondence flow entry that controllers are sent, wherein the flow table match information of flow entry 1 includes The GTPU retroeflection request message that destination address is itself is matched, flow table processing movement includes overturning matching GTPU retroeflection request message Message header field in predetermined fraction, and to GTPU retroeflection request message execute deliberate action.
The flow table match information of flow entry 1 in addition to include matching destination address be itself ICMP retroeflection request message it It outside, can also include port numbers, protocol type, the source MAC of message, target MAC (Media Access Control) address and the source IP, mesh of incoming message IP, etc..
For example, the content of flow entry 1 can be with are as follows: and flow table modify (match[], Action List[Swap IP head, Swap UDP port, Set message type=response], Goto table2, Action set[Goto group A】)。
Wherein, in the citing, the particular content of the unlisted flow table match information of flow entry 1 out, when it is implemented, stream The flow table match information of list item 1 can be with the particular content phase of the flow table match information of flow entry 1 in above-mentioned embodiment illustrated in fig. 7 Together, it no longer illustrates herein.
In the citing, the predetermined fraction in message header field is the source IP and mesh of the message header field of ICMP retroeflection request message IP and UDP source port number and destination slogan.Deliberate action includes that setting type of message is response message (Set Message type=response), the processing that will go to a group list item A (group A) is added in set of actions (Action Set[Goto group A]), and jump to flow table 2 (Goto table2).
The flow table 1 of 803:GTPU retroeflection request message arrival interchanger.
804: flow table 1 matches GTPU retroeflection request message according to flow entry 1, and after successful match, according to right The flow table processing for answering flow entry 1 to be executed in flow entry 1 to GTPU retroeflection request message acts.
Matched principle is carried out to GTPU retroeflection request message according to flow entry 1 about flow table 1, with flow table 1 in step 703 It is consistent that matched principle carried out to ICMP retroeflection request message according to flow entry 1, for details, reference can be made to the content of above-mentioned steps 703, Details are not described herein.
The content of the flow entry 1 of flow table 1 is sent in conjunction with controller in step 801, after successful match, flow table 1 is overturn The source port number and destination slogan of source IP and destination IP and UDP in the message header field of GTPU retroeflection request message.Into one Step ground, flow table 1 will go to a group processing of list item A and be added in set of actions (Action set[Goto group A]), and jump Go to flow table 2, by the corresponding flow entry 2 according to the pre-stored data of flow table 2 to by treated the GTPU retroeflection request message of flow table 1 into Row matching, and execute the movement specified in flow entry 2.About flow table 2 to by treated the GTPU retroeflection request message of flow table 1 into Row matching, and the mode for the movement specified in flow entry 2 is executed, the embodiment of the present invention is not especially limited.
The movement of flow table 2 is jumped to due to carrying in the flow table processing movement of flow entry 1, corresponding stream in flow table 1 After flow table processing in list item is completed, treated that GTPU retroeflection request message jumps to flow table 2 for flow table 1, such as dotted line in Fig. 8 It is shown.In addition, in embodiments of the present invention, exiting assembly line after having handled with flow table 2 GTPU retroeflection request message is Example is illustrated, therefore, after flow table 2 has handled GTPU retroeflection request message, by treated the GTPU retroeflection request report of flow table 2 Text is sent to preset group list item component, executes message body modification movement by preset group list item component.
805: when determine by flow tables at different levels treated GTPU retroeflection request message needs to exit assembly line when, control will be by Treated that GTPU retroeflection request message jumps to preset group list item component for flow tables at different levels.
About determining by the mode of flow tables at different levels treated GTPU retroeflection request message needs to exit assembly line, the present invention Embodiment is not especially limited.When it is implemented, can be determined by the afterbody flow table for handling the GTPU retroeflection request message It does not include jumping to the movement of other flow tables, and when the instruction including jumping to group list item A, determine by each in corresponding flow entry Treated that GTPU retroeflection request message needs to exit assembly line for grade flow table.
It will be by the side of flow tables at different levels treated GTPU retroeflection request message jumps to preset group list item component about control Formula, including but not limited to control will be directed toward preset group list item component by flow tables at different levels treated GTPU retroeflection request message.
806: preset group list item component executes message body modification movement, obtains GTPU retroeflection response message.
About in the principle of preset group list item component, with above-mentioned steps 606 when deliberate action include message body modification When movement, the principle for executing the first way in deliberate action to initial service request message according to matching flow entry is consistent, For details, reference can be made to the contents in above-mentioned steps 606, and details are not described herein.
807: sending GTPU retroeflection response message.
After preset group list item component executes message body modification movement, GTPU retroeflection response message can be obtained. After the processing of preset group list item component, message is no longer back to assembly line, and therefore, GTPU retroeflection response message passes through designated ends Mouth sends out interchanger.Wherein, which can receive the port of GTPU retroeflection request message for interchanger, or Other ports, the present invention is not especially limit this.
Method provided in an embodiment of the present invention, by the determining and matched matching flow entry of GTPU retroeflection request message Afterwards, according to the predetermined fraction in the message header field of matching flow entry overturning GTPU retroeflection request message, and GTPU retroeflection is requested Message executes deliberate action, obtains GTPU retroeflection response message, so that when obtaining GTPU retroeflection response message, in interchanger sheet Ground can be realized, and without interacting with controller, so as to reduce the interaction with controller, can not only improve control Business processing efficiency between device and interchanger, and can be reduced the interaction cost between controller and interchanger.
Fig. 9 is a kind of flow chart of the processing method of the service request message provided according to an exemplary embodiment.In order to Convenient for explanation, in embodiments of the present invention, still the present invention is implemented so that service request message is GTPU retroeflection request message as an example Example is explained.The embodiment and embodiment illustrated in fig. 8 the difference is that, executing message body modification movement is to flow It is executed between waterline, and message body replacement movement is executed by default context component (context).In addition, in this hair In bright embodiment, still it is illustrated for matching flow entry and being the corresponding flow entry 1 of flow table 1.As shown in figure 9, the present invention is real Applying the method flow that example provides includes:
901: the default context component in interchanger receives the message body for the GTPU retroeflection response message that controller is sent.
Since the message body of GTPU retroeflection response message is fixed value, it is received by controlling to preset context component The message body for the GTPU retroeflection response message that device is sent is fixed value.Default context component receives GTPU retroeflection response message It after message body, is buffered in correspondence memory, so as to execute message body modification movement in a pipeline subsequent.
Wherein, the message body for presetting the GTPU retroeflection response message that the received controller of context component is sent can pass through Following content is received to realize:
Context table modify (A, buffered message body).
902: flow tables at different levels receive the correspondence flow entry that controllers are sent, wherein the flow table match information of flow entry 1 includes The GTPU retroeflection request message that destination address is itself is matched, flow table processing movement includes overturning matching GTPU retroeflection request message Message header field in predetermined fraction, and to GTPU retroeflection request message execute deliberate action.
The flow table match information of flow entry 1 in addition to include matching destination address be itself GTPU retroeflection request message it It outside, can also include port numbers, protocol type, the source MAC of message, target MAC (Media Access Control) address and the source IP, mesh of incoming message IP, etc..
For example, the content of flow entry 1 can be with are as follows: and flow table modify (match[], Action list[Swap IP head, Swap UDP port, Set message type=response, Goto context A], Goto table2)。
Wherein, in the citing, the particular content of the unlisted flow table match information of flow entry 1 out, when it is implemented, stream The flow table match information of list item 1 can be with the particular content phase of the flow table match information of flow entry 1 in above-mentioned embodiment illustrated in fig. 7 Together, it no longer illustrates herein.
In the citing, the predetermined fraction in message header field is the source IP and mesh of the message header field of GTPU retroeflection request message IP and UDP source port number and destination slogan.Deliberate action includes that setting type of message is response message (Set Message type=response), it goes to context A (Goto context A) and carries out message body modification movement, and jump To flow table 2 (Goto table2).
The flow table 1 of 903:GTPU retroeflection request message arrival interchanger.
904: flow table 1 matches GTPU retroeflection request message according to flow entry 1, and after successful match, according to right The flow table processing for answering flow entry 1 to be executed in flow entry 1 to GTPU retroeflection request message acts.
Matched principle is carried out to GTPU retroeflection request message according to flow entry 1 about flow table 1, with flow table 1 in step 703 It is consistent that matched principle carried out to ICMP retroeflection request message according to flow entry 1, for details, reference can be made to the content of above-mentioned steps 703, Details are not described herein.
The content of the flow entry 1 of flow table 1 is sent in conjunction with controller in step 902, after successful match, flow table 1 is overturn The source port number and destination slogan of source IP and destination IP and UDP in the message header field of GTPU retroeflection request message.Into one Step ground, as shown in figure 9, flow table 1 is by treated, GTPU retroeflection request message is sent to default context component, above and below default Component text executes message body modification movement.Then, context component is preset to request the replaced GTPU retroeflection of message body Message is back to flow table 1, the GTPU request message after replacing message body is sent to flow table 2 by flow table 1,2 pairs of replacements of flow table disappear GTPU retroeflection request message after breath body continues to handle, until needing to handle the afterbody of the GTPU retroeflection request message After flow table has handled the GTPU retroeflection request message, GTPU retroeflection response message is obtained.As shown in figure 9, in this embodiment, It is illustrated so that flow table 2 is the afterbody flow table for handling GTPU retroeflection request message as an example.Therefore, flow table 2 is handled After GTPU retroeflection request message, GTPU retroeflection request message is obtained.
905: sending GTPU retroeflection request message.
After obtaining GTPU retroeflection response message, which can be sent out by friendship by designated port It changes planes.Wherein, which can receive the port of GTPU retroeflection request message for interchanger, or other ports, The present invention is not especially limit this.
Method provided in an embodiment of the present invention, by the determining and matched matching flow entry of GTPU retroeflection request message Afterwards, according to the predetermined fraction in the message header field of matching flow entry overturning GTPU retroeflection request message, and GTPU retroeflection is requested Message executes deliberate action, GTPU retroeflection message is obtained, so that being locally in interchanger when obtaining GTPU retroeflection response message Can be achieved, without being interacted with controller, so as to reduce the interaction with controller, can not only improve controller and Business processing efficiency between interchanger, and can be reduced the interaction cost between controller and interchanger.
Figure 10 is a kind of structural schematic diagram of the interchanger provided according to an exemplary embodiment, and the interchanger is for executing The processing method of above-mentioned Fig. 5 service request message that any embodiment provides into Fig. 9.Referring to Figure 10, which includes:
Receiver 1001, for receiving initial service request message;
Processor 1002, for the determining matching flow entry with initial service request message matching, according to matching flow entry The predetermined fraction in the message header field of initial service request message is overturn, and according to matching flow entry to initial service request message Deliberate action is executed, service response message is obtained, wherein matching flow entry is sent by controller in advance, and is matched flow entry and taken Execute with the predetermined fraction in instruction overturning message header field and to initial service request message the instruction of deliberate action;
Transmitter, for sending service response message.
Optionally, the predetermined fraction in the message header field of initial service request message includes MAC Address, IP address, the end UDP At least one of slogan or TCP port number.
Optionally, deliberate action includes at least in the specific field modification movement of message header field and message body modification movement One kind;
Wherein, the finger in message header field of the message header field specific field modification movement for modifying the first service request message Determine the value of field;
Message body modification is acted for the message body of initial service request message to be replaced with service response message Message body, and modify the length of the service request message after replacement message body.
Optionally, processor 1002, if being also used to deliberate action includes message body modification movement, according to Match flow entry to initial service request message execute first other movements, obtain the first service request message, wherein first its It is acted as the movement in deliberate action in addition to message body modification movement;Determine the first service request message needs move back Out when assembly line, the first service request message is jumped to preset group list item component by control, wherein preset group list item component caching There is the message body of service response message;The message body of the first service request message is replaced with into business according to preset group list item component The message body of response message, and modify the length of the service request message after replacement message body.
Optionally, processor 1002, if being also used to deliberate action includes message body modification movement, according to matching Flow entry executes second other movements to initial service request message, obtains the second service request message, wherein second is other dynamic As the movement before message body modification movement in deliberate action;Second service request message is sent to default context Component, wherein default context component is cached with the message body of service response message;By the message body of the second service request message The message body of service response message is replaced with, and modifies the length of the service request message after replacement message body, obtains third industry Business request message;Third service request message is back to assembly line, and continue to third service request message execute third its It is acted, wherein the other movements of third are the movement in deliberate action after message body modification movement.
Interchanger provided in an embodiment of the present invention, by the determining matching flow entry with initial service request message matching Afterwards, according to the predetermined fraction in the message header field of matching stream item overturning initial service request message, and to initial service request report Text executes deliberate action, obtains service response message so that when obtaining service response message, interchanger locally can be real It is existing, without interacting with controller, so as to reduce the interaction with controller, controller and exchange can not only be improved Business processing efficiency between machine, and can be reduced the interaction cost between controller and interchanger.
It should be understood that interchanger provided by the above embodiment is in processing business request message, only with above-mentioned each function Can module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different functions Module is completed, i.e., the internal structure of equipment is divided into different functional modules, described above all or part of to complete Function.In addition, the processing method embodiment of interchanger provided by the above embodiment and service request message belongs to same design, Specific implementation process is detailed in embodiment of the method, and which is not described herein again.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (15)

1. a kind of interchanger, which is characterized in that the interchanger includes:
Receiving module, for receiving initial service request message;
Determining module, for the determining matching flow entry with the initial service request message matching, the matching flow entry is pre- It is first sent by controller, and the matching flow entry carries the predetermined fraction indicated overturn in message header field and to the just beginning of the school year The instruction for request message execution deliberate action of being engaged in;
Flip module, it is default in the message header field of the initial service request message for being overturn according to the matching flow entry Part;
Execution module is obtained for executing the deliberate action to the initial service request message according to the matching flow entry To service response message;
Sending module, for sending the service response message.
2. interchanger according to claim 1, which is characterized in that the initial service request of the flip module overturning Predetermined fraction in the message header field of message includes MAC address, net association IP address, User Datagram Protocol At least one of UDP port number or transmission control protocol TCP port numbers.
3. interchanger according to claim 1, which is characterized in that the deliberate action that the execution module executes includes at least One of the specific field modification movement of message header field and message body modification movement;
Wherein, in message header field of the message header field specific field modification movement for modifying the initial service request message Specific field value;
The message body modification movement is for replacing with service response report for the message body of the initial service request message The message body of text, and modify the length of the service request message after replacement message body.
4. interchanger according to claim 3, which is characterized in that the execution module, comprising:
First execution unit, for when the deliberate action include the message body modification movement when, according to the matching Flow entry executes first other movements to the initial service request message, obtains the first service request message, described first its It is acted as the movement in the deliberate action in addition to message body modification movement;
First control unit, for when determining that the first service request message needs to exit assembly line, control is by described the One service request message jumps to preset group list item component, and the preset group list item component is cached with the message of service response message Body;
First replacement unit, for being replaced the message body of the first service request message according to the preset group list item component For the message body of the service response message;
First modification unit, for modifying the length of the service request message after replacing message body.
5. interchanger according to claim 3, which is characterized in that the execution module, comprising:
Second execution unit, for when the deliberate action include the message body modification movement when, according to the matching Flow entry executes second other movements to the initial service request message, obtains the second service request message, described second its It acts the movement before being the movement of message body modification described in the deliberate action;
The second service request message is jumped to default context component for controlling by the second control unit, described default Context component is cached with the message body of service response message;
Second replacement unit, for the message body of the second service request message to be replaced with disappearing for the service response message Cease body;
Second modification unit obtains third service request report for modifying the length of the service request message after replacing message body Text;
Third execution unit executes the other movements of third to the third service request message for continuing, and the third is other Movement is the movement after the movement of message body modification described in the deliberate action.
6. a kind of processing method of service request message, which is characterized in that the described method includes:
Receive initial service request message;
The determining matching flow entry with the initial service request message matching, the matching flow entry are sent out by controller in advance It send, and the matching flow entry carries the predetermined fraction in instruction overturning message header field and holds to the initial service request message The instruction of row deliberate action;
The predetermined fraction in the message header field of the initial service request message is overturn according to the matching flow entry, and according to institute It states matching flow entry and the deliberate action is executed to the initial service request message, obtain service response message;
Send the service response message.
7. according to the method described in claim 6, it is characterized in that, pre- in the message header field of the initial service request message If part includes MAC address, net association IP address, User Datagram Protocol UDP port number or passes transport control protocol Discuss at least one of TCP port number.
8. according to the method described in claim 6, it is characterized in that, the deliberate action includes at least message header field specific field One of modification movement and message body modification movement;
Wherein, in message header field of the message header field specific field modification movement for modifying the initial service request message Specific field value;
The message body modification movement is for replacing with service response report for the message body of the initial service request message The message body of text, and modify the length of the service request message after replacement message body.
9. according to the method described in claim 8, it is characterized in that, it is described according to the matching flow entry to the initial service Request message executes the deliberate action, comprising:
If the deliberate action includes the message body modification movement, according to the matching flow entry to described initial Service request message executes first other movements, obtains the first service request message, first other movements are described default Movement in movement in addition to message body modification movement;
When determining that the first service request message needs to exit assembly line, control jumps the first service request message To preset group list item component, the preset group list item component is cached with the message body of service response message;
The message body of the first service request message is replaced with into the service response report according to the preset group list item component The message body of text, and modify the length of the service request message after replacement message body.
10. according to the method described in claim 8, it is characterized in that, it is described according to the matching flow entry to it is described just the beginning of the school year Business request message executes the deliberate action, comprising:
If the deliberate action includes the message body modification movement, according to the matching flow entry to described initial Service request message executes second other movements, obtains the second service request message, second other movements are described default Movement before the modification of message body described in movement movement;
The second service request message is jumped to default context component by control, and the default context component is cached with industry The message body of business response message;
The message body of the second service request message is replaced with to the message body of the service response message, and modifies replacement and disappears The length of service request message after ceasing body, obtains third service request message;
Continue to execute the third service request message the other movements of third, the other movements of third are the deliberate action Described in message body modification movement after movement.
11. a kind of interchanger, which is characterized in that the interchanger includes:
Receiver, for receiving initial service request message;
Processor, for the determining matching flow entry with the initial service request message matching, according to the matching flow entry The predetermined fraction in the message header field of the initial service request message is overturn, and according to the matching flow entry to described initial Service request message executes the deliberate action, obtains service response message, and the matching flow entry is sent by controller in advance, And the matching flow entry carries the predetermined fraction in instruction overturning message header field and executes to the initial service request message The instruction of deliberate action;
Transmitter, for sending the service response message.
12. interchanger according to claim 11, which is characterized in that in the message header field of the initial service request message Predetermined fraction include MAC address, net association IP address, User Datagram Protocol UDP port number or transmission control At least one of Protocol TCP port number processed.
13. interchanger according to claim 11, which is characterized in that the deliberate action is specified including at least message header field One of field modification movement and message body modification movement;
Wherein, in message header field of the message header field specific field modification movement for modifying the initial service request message Specific field value;
The message body modification movement is for replacing with service response report for the message body of the initial service request message The message body of text, and modify the length of the service request message after replacement message body.
14. interchanger according to claim 13, which is characterized in that the processor, if be also used to described default dynamic Make to include that the message body modification acts, then according to the matching flow entry to initial service request message execution the One other movements obtain the first service request message, and first other movements are in the deliberate action except the message disappears Cease the movement except body modification movement;When determining that the first service request message needs to exit assembly line, control will be described First service request message jumps to preset group list item component, and the preset group list item component is cached with disappearing for service response message Cease body;The message body of the first service request message is replaced with into the service response report according to the preset group list item component The message body of text, and modify the length of the service request message after replacement message body.
15. interchanger according to claim 13, which is characterized in that the processor, if be also used to described default dynamic Make to include that the message body modification acts, then according to the matching flow entry to initial service request message execution the Two other movements obtain the second service request message, and second other movements are message described in the deliberate action Movement before body modification movement;The second service request message is jumped to default context component by control, described default Context component is cached with the message body of service response message;The message body of the second service request message is replaced with described The message body of service response message, and the length of the service request message after replacement message body is modified, obtain third service request Message;Continue to execute the third service request message the other movements of third, the other movements of third are described default dynamic Movement after the modification of message body described in work movement.
CN201480020423.8A 2014-09-25 2014-09-25 The processing method of interchanger and service request message Active CN106105098B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/087439 WO2016045056A1 (en) 2014-09-25 2014-09-25 Switch and service request packet processing method

Publications (2)

Publication Number Publication Date
CN106105098A CN106105098A (en) 2016-11-09
CN106105098B true CN106105098B (en) 2019-05-31

Family

ID=55580104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201480020423.8A Active CN106105098B (en) 2014-09-25 2014-09-25 The processing method of interchanger and service request message

Country Status (2)

Country Link
CN (1) CN106105098B (en)
WO (1) WO2016045056A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109995725B (en) * 2017-12-29 2021-08-06 中移(苏州)软件技术有限公司 Method and device for realizing cloud computing state firewall
CN110324245B (en) 2018-03-31 2021-03-23 华为技术有限公司 Method and device for forwarding message based on integrated flow table
CN108650154B (en) * 2018-06-29 2020-11-27 新华三技术有限公司 Flow control method and device
CN109617997B (en) * 2019-01-02 2022-01-11 广州品唯软件有限公司 Service request matching method and device and computer readable storage medium
CN115150420B (en) * 2021-03-29 2024-04-09 中移(上海)信息通信科技有限公司 Service processing method and device and related equipment
CN114268669A (en) * 2022-03-01 2022-04-01 阿里云计算有限公司 Access processing method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401777A (en) * 2013-08-21 2013-11-20 中国人民解放军国防科学技术大学 Parallel search method and system of Openflow
CN103685058A (en) * 2012-09-11 2014-03-26 北京信息科技大学 Method for controlling QoS (Quality of Service) of stream data, and OpenFlow controller
CN103747026A (en) * 2013-10-29 2014-04-23 盛科网络(苏州)有限公司 Alarm method and alarm device of openflow flow table
CN104022953A (en) * 2013-02-28 2014-09-03 杭州华三通信技术有限公司 Message forwarding method and device based on Open Flow

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101257447A (en) * 2008-03-14 2008-09-03 华为技术有限公司 Method, system and routing apparatus of load sharing
CN101494610B (en) * 2009-03-12 2011-06-22 福建星网锐捷网络有限公司 Method for processing message and switch
CN101984598B (en) * 2010-11-04 2012-11-07 成都市华为赛门铁克科技有限公司 Message forwarding method and deep packet inspection (DPI) device
US8718064B2 (en) * 2011-12-22 2014-05-06 Telefonaktiebolaget L M Ericsson (Publ) Forwarding element for flexible and extensible flow processing software-defined networks
CN102946325B (en) * 2012-11-14 2015-06-03 中兴通讯股份有限公司 Network diagnosis method, system and equipment based on software defined network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685058A (en) * 2012-09-11 2014-03-26 北京信息科技大学 Method for controlling QoS (Quality of Service) of stream data, and OpenFlow controller
CN104022953A (en) * 2013-02-28 2014-09-03 杭州华三通信技术有限公司 Message forwarding method and device based on Open Flow
CN103401777A (en) * 2013-08-21 2013-11-20 中国人民解放军国防科学技术大学 Parallel search method and system of Openflow
CN103747026A (en) * 2013-10-29 2014-04-23 盛科网络(苏州)有限公司 Alarm method and alarm device of openflow flow table

Also Published As

Publication number Publication date
WO2016045056A1 (en) 2016-03-31
CN106105098A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN106105098B (en) The processing method of interchanger and service request message
CN105379218B (en) Processing method, device and the equipment of Business Stream
KR101473783B1 (en) Method and apparatus for control of dynamic service chaining by using tunneling
US8059650B2 (en) Hardware based parallel processing cores with multiple threads and multiple pipeline stages
CN104737507B (en) Ensure arbitrarily to arrive the method and device of any accessibility with the 3rd layer of forwarding of chance in large-scale data center environment
CN104301451B (en) A kind of cross-network segment host communication method, apparatus and system
CN108259237A (en) Network access accelerated method, cloud dns server, CE and cloud IP accelerate network system
CN109952746A (en) Physics and virtual network function are integrated in business chain network environment
CN105122741B (en) The business chain control method and device of Business Stream
EP2509262B1 (en) Unaddressed device communication from within an MPLS network
CN108471629A (en) The control method of business service quality, equipment and system in transmission network
US20200244486A1 (en) Dynamic customer vlan identifiers in a telecommunications network
US10715426B2 (en) Processing rule modification method, apparatus and device
CN103888928A (en) Business strategy control method and system
KR101460048B1 (en) Method and apparatus for control of dynamic service chaining by using tagging
CN105577416B (en) Service function chain operation, management and maintenance method and node equipment
CN109861913A (en) A kind of prefix mark notifying method and device across Interior Gateway Protocol
CN104601467A (en) Method and device for sending messages
CN108882305A (en) A kind of shunt method and device of data packet
US10644985B1 (en) Device-contained data plane validation
WO2016049926A1 (en) Data packet processing apparatus and method
WO2015165249A1 (en) Method and device for establishing service path
CN106656807A (en) Message forwarding method and SDN switch
CN107347085A (en) A kind of information acquisition method and device
CN104471538B (en) A kind of data flow processing method, equipment and system

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