CN106105098A - Switch and the processing method of service request message - Google Patents

Switch and the processing method of service request message Download PDF

Info

Publication number
CN106105098A
CN106105098A CN201480020423.8A CN201480020423A CN106105098A CN 106105098 A CN106105098 A CN 106105098A CN 201480020423 A CN201480020423 A CN 201480020423A CN 106105098 A CN106105098 A CN 106105098A
Authority
CN
China
Prior art keywords
message
service request
request message
flow table
action
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.)
Granted
Application number
CN201480020423.8A
Other languages
Chinese (zh)
Other versions
CN106105098B (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 a kind of switch and the processing method of service request message, belongs to networking technology area.Including: receive initial service request message;Determine the predetermined fraction carried in instruction upset message header field and the coupling stream list item of the instruction to initial service request message execution deliberate action;The predetermined fraction in message header field according to coupling stream list item upset initial service request message, performs deliberate action according to coupling stream list item to initial service request message, obtains service response message;Send service response message.The present invention is after determining the coupling stream list item mated with initial service request message, according to the predetermined fraction in coupling stream list item upset message header field, and initial service request message is performed deliberate action, obtain service response message, make when obtaining service response message, can realize in switch this locality, the Business Processing efficiency between controller and switch can not only be improved, and the mutual cost between controller and switch can be reduced.

Description

The processing method of interchanger and service request message Technical field
The present invention relates to network technique field, the processing method of more particularly to a kind of interchanger and service request message.
Background technology
In order to lift flexibility and the manageability of network design, the network managing mode based on software defined network (Software Defined Network, SDN) is widely used.SDN decouples the control function of network element and forwarding capability, and the network element in network is divided into two parts of chain of command network element and forwarding surface network element.Open flows (OpenFlow) agreement is the major control agreement between current SDN chain of command and forwarding surface.Chain of command network element is referred to as OpenFlow Controller (i.e. OpenFlow controllers in OpenFlow agreements, hereinafter referred to as controller), forwarding surface network element is referred to as OpenFlow Switch (OpenFlow interchangers, hereinafter referred to as interchanger).In the business procession of interchanger, exchange opportunity receives many service request messages, and the transmitting terminal of many service request messages is required to just be further processed after service response message is obtained.In order to ensure the normal process of business, the processing method of service request message is most important.
In the service request message that interchanger is received, it is that the message header field of service request message is overturn to have a kind of service response message, and performs what is obtained after deliberate action to the service request message after the upset of message header field.Correlation technique handle such service request message when, the method used for:Interchanger receives service request message, and the service request message is sent to controller;Controller carries out message header field upset to the predetermined fraction of the message header field of service request message, and the service request message after being overturn to message header field performs deliberate action, obtain after service response message, service response message is sent to interchanger, the service response message is sent by interchanger.
During the present invention is realized, inventor has found that correlation technique at least has problems with:
Correlation technique interchanger handle such service request message when, interchanger receive such business please When seeking message, such service request message can be all sent to controller, the message header field of the service request message overturn by controller, and perform deliberate action, obtained after service response message, retransmit to interchanger.But, because the quantity of such service request message is relatively more, handled if these service messages are all sent to controller, the interface packets quantity between interchanger and controller can be caused excessive, so as to not only the business processing between controller and interchanger be made less efficient, and the interaction cost between controller and interchanger can be increased.
The content of the invention
In order to solve the problem of prior art is present, the embodiments of the invention provide the processing method of a kind of interchanger and service request message.The technical scheme is as follows:
First aspect includes there is provided a kind of interchanger, the interchanger:
Receiving module, for receiving initial service request message;
Determining module, for the matching flow table item for determining to match with the initial service request message, the matching flow table item is sent by controller in advance, and the matching flow table item carries the predetermined fraction for indicating to overturn in message header field and the instruction that deliberate action is performed to the initial service request message;
Flip module, for overturning the predetermined fraction in the message header field of the initial service request message according to the matching flow table item;
Performing module, for performing the deliberate action to the initial service request message according to the matching flow table item, obtains service response message;
Sending module, for sending the service response message.
With reference to first aspect, in the first possible implementation of first aspect, predetermined fraction in the message header field of the initial service request message of the flip module upset includes MAC (Media Access Control, medium education) address, IP (Internet Protocol, net association) address, UDP (User Datagram Protocol, UDP) at least one of port numbers or TCP (Transmission Control Protocol, transmission control protocol) port numbers.
With reference in a first aspect, in second of possible implementation of first aspect, the performing module is held Capable deliberate action at least includes one kind in the specific field modification action of message header field and message body modification action;
Wherein, the message header field specific field modification act for change the initial service request message message header field in specific field value;
The message body modification is acted for the message body of the initial service request message to be replaced with into the message body of service response message, and changes the length for replacing the service request message after message body.
With reference to second of possible implementation of first aspect, in the third possible implementation of first aspect, the performing module, including:
First execution unit, for when the deliberate action includes message body modification action, first other actions are performed to the initial service request message according to the matching flow table item, the first service request message is obtained, first other actions are the action in the deliberate action in addition to the message body modification is acted;
First control unit, for when it is determined that the first service request message needs to exit streamline, the first service request message to be jumped to preset group list item component by control, and the preset group list item component is cached with the message body of service response message;
First replacement unit, the message body for the message body of the first service request message to be replaced with to the service response message according to the preset group list item component;
First modification unit, the length of the service request message after message body is replaced for changing.
With reference to second of possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, the performing module, including:
Second execution unit, for when the deliberate action includes message body modification action, second other actions are performed to the initial service request message according to the matching flow table item, the second service request message is obtained, second other actions are the action before the action of message body modification described in the deliberate action;
Second control unit, for controlling the second service request message jumping to default context component, the default context component is cached with the message body of service response message;
Second replacement unit, the message body for the message body of the second service request message to be replaced with to the service response message;
Second modification unit, the length of the service request message after message body is replaced for changing, the 3rd service request message is obtained;
Returning unit, for the 3rd service request message to be back into streamline;
3rd execution unit, for continuing to perform the 3rd service request message the 3rd other actions, the 3rd other actions are the action after the action of message body modification described in the deliberate action.
Second aspect includes there is provided a kind of processing method of service request message, methods described:
Receive initial service request message;
It is determined that the matching flow table item matched with the initial service request message, the matching flow table item is sent by controller in advance, and the matching flow table item carries the predetermined fraction for indicating to overturn in message header field and the instruction that deliberate action is performed to the initial service request message;
The predetermined fraction in the message header field of the initial service request message is overturn according to the matching flow table item, and the deliberate action is performed to the initial service request message according to the matching flow table item, service response message is obtained;
Send the service response message.
With reference to second aspect, in the first possible implementation of second aspect, the predetermined fraction in the message header field of the initial service request message includes at least one of MAC Address, IP address, UDP port number or TCP port number.
With reference to second aspect, in second of possible implementation of second aspect, the deliberate action at least includes one kind in the specific field modification action of message header field and message body modification action;
Wherein, the message header field specific field modification act for change the initial service request message message header field in specific field value;
The message body modification is acted for the message body of the initial service request message to be replaced with into the message body of service response message, and changes at least one of length of service request message after replacement message body.
It is described that the deliberate action is performed to the initial service request message according to the matching flow table item in the third possible implementation of second aspect with reference to second of possible implementation of second aspect, including:
If the deliberate action is acted including the message body modification, first other actions are then performed to the initial service request message according to the matching flow table item, the first service request message is obtained, first other actions are the action in the deliberate action in addition to the message body modification is acted;
When it is determined that the first service request message needs to exit streamline, the first service request message is jumped to preset group list item component by control, and 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 to the message body of the service response message according to the preset group list item component, and changes the length for replacing the service request message after message body.
It is described that the deliberate action is performed to the initial service request message according to the matching flow table item in the 4th kind of possible implementation of second aspect with reference to second of possible implementation of second aspect, including:
If the deliberate action is acted including the message body modification, second other actions are then performed to the initial service request message according to the matching flow table item, the second service request message is obtained, second other actions are the action before the action of message body modification described in the deliberate action;
The second service request message is jumped to default context component by control, and the 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 to the message body of the service response message, and changes the length for replacing the service request message after message body, the 3rd service request message is obtained;
The 3rd service request message is back to streamline, and continues to perform the 3rd service request message the 3rd other actions, the 3rd other actions are the action after the action of message body modification described in the deliberate action.
The third aspect includes there is provided a kind of interchanger, the interchanger:
Receiver, for receiving initial service request message;
Processor, for the matching flow table item for determining to match with the initial service request message, the predetermined fraction in the message header field of the initial service request message is overturn according to the matching flow table item, and the deliberate action is performed to the initial service request message according to the matching flow table item, obtain service response message, the matching flow table item is sent by controller in advance, and the matching flow table item carries the predetermined fraction for indicating to overturn in message header field and the instruction that deliberate action is performed to the initial service request message;
Emitter, for sending the service response message.
With reference to the third aspect, in the first possible implementation of the third aspect, the predetermined fraction in the message header field of the initial service request message includes at least one of MAC Address, IP address, UDP port number or TCP port number.
With reference to the third aspect, in second of possible implementation of the third aspect, the deliberate action at least includes one kind in the specific field modification action of message header field and message body modification action;
Wherein, the message header field specific field modification act for change the initial service request message message header field in specific field value;
The message body modification is acted for the message body of the initial service request message to be replaced with into the message body of service response message, and changes the length for replacing the service request message after message body.
With reference to second of possible implementation of the third aspect, in the third possible implementation of the third aspect, the processor, if being additionally operable to the deliberate action to act including the message body modification, first other actions are then performed to the initial service request message according to the matching flow table item, the first service request message is obtained, first other actions are the action in the deliberate action in addition to the message body modification is acted;When it is determined that the first service request message needs to exit streamline, the first service request message is jumped to preset group list item component by control, and 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 to the message body of the service response message according to the preset group list item component, and changes the length for replacing the service request message after message body.
With reference to second of possible implementation of the third aspect, in the 4th kind of possible implementation of the third aspect, the processor is acted if being additionally operable to the deliberate action including the message body modification, Second other actions are performed to the initial service request message according to the matching flow table item, the second service request message are obtained, second other actions are the action before the action of message body modification described in the deliberate action;The second service request message is jumped to default context component by control, and the 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 to the message body of the service response message, and changes the length for replacing the service request message after message body, the 3rd service request message is obtained;The 3rd service request message is back to streamline, and continues to perform the 3rd service request message the 3rd other actions, the 3rd other actions are the action after the action of message body modification described in the deliberate action.
The beneficial effect of technical scheme provided in an embodiment of the present invention is:
By it is determined that after the matching flow table item matched with initial service request message, according to the predetermined fraction in the message header field of matching flow table item upset initial service request message, and deliberate action is performed to initial service request message, obtain service response message, so that when obtaining service response message, locally it can be achieved in interchanger, without being interacted with controller, interacted so as to reduce with controller, the business processing efficiency between controller and interchanger can not only be improved, and the interaction cost between controller and interchanger can be reduced.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, the accompanying drawing used required in being described below to embodiment is briefly described, apparently, drawings in the following description are only some embodiments of the present invention, for those of ordinary skill in the art, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of SDN configuration diagram that one embodiment of the invention is provided;
Fig. 2 is the Message processing process schematic between a kind of controller and interchanger that another embodiment of the present invention is provided;
Fig. 3 is the flow table structural representation in a kind of interchanger that another embodiment of the present invention is provided;
Fig. 4 is a kind of structural representation for interchanger that another embodiment of the present invention is provided;
Fig. 5 is a kind of flow chart of the processing method for service request message that another embodiment of the present invention is provided;
Fig. 6 is a kind of flow chart of the processing method for service request message that another embodiment of the present invention is provided;
Fig. 7 is a kind of flow chart of the processing method for service request message that another embodiment of the present invention is provided;
Fig. 8 is a kind of flow chart of the processing method for service request message that another embodiment of the present invention is provided;
Fig. 9 is a kind of flow chart of the processing method for service request message that another embodiment of the present invention is provided;
Figure 10 is a kind of structural representation for interchanger that another embodiment of the present invention is provided.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
With developing rapidly for network technology, in current network design, there is the network element of numerous complicated, such as router, gateway, interchanger, fire wall and all kinds of servers.These realize the network element of various network functions generally all comprising each independent control module, and this distributed control module causes the deployment of network extremely complex.On this basis, in order to implement the modification of some control function or introduce new characteristic, it is necessary to which numerous network elements are upgraded or replaced.To lift flexibility and the manageability of network design, the advantage of the network element management method based on SDN is protruded increasingly.Network design based on SDN, the control function of network element and forwarding capability can be decoupled, the network element in network is divided into two parts of chain of command and forwarding surface.Wherein, chain of command generally concentrates deployment, and forwarding surface often according to the actual requirements distributed deployment on multiple physical equipments.Chain of command for example route, exchanged, etc. by being controlled to forwarding surface so as to realizing various network functions.At present, SDN is becoming widely adopted in data center network and communication network.As shown in figure 1, it illustrates a kind of SDN network architecture schematic diagram, the network architecture includes controller 101 and interchanger 102.Wherein, multilevel flow table is potentially included inside interchanger 102.
As shown in Fig. 2 it illustrates the Message processing process schematic between a kind of controller 101 and interchanger 102.Wherein, the main behavior by flow table item control interchanger 102 of controller 101.As shown in Fig. 2 controller 101 is predefined carries out to which type of message for which type of operation, so as to generate the corresponding flow table item of flow tables at different levels of interchanger 102, and the corresponding flow table item of the flow tables at different levels of interchanger 102 is distinguished It is issued to the flow tables at different levels of interchanger 102.
Wherein, the corresponding flow table item of every grade of flow table includes flow table match information and flow table processing is acted.Flow table match information includes the combination of any information or any information in Ethernet frame head, IP headers, TCP/UDP port numbers and MAC information, and flow table processing action includes processing type and relevant parameter.Wherein, processing type is such as forwarded, abandons, changes, encapsulates, decapsulated.As shown in Fig. 2 the flow table item for belonging to different flow tables may be issued to the flow tables at different levels of interchanger 102 respectively by controller 101 by multiple stream mode message (Flow_Mod message).Interchanger 102 stores the corresponding flow table item of flow tables at different levels into corresponding flow table.After message reaches interchanger 102, interchanger 102 performs multilevel flow table matching, and the flow table processing carried in the corresponding flow table item of flow table of message execution matching is acted.
Fig. 3 shows the flow table structural representation in a kind of interchanger.Interchanger 102 is received after message, message is passed sequentially through flow tables at different levels as shown in Figure 3.Wherein, message enters after interchanger 102, can first be sent to 0 grade of flow table and be handled, and jumps to the n1 grades of flow tables of next stage flow table indicated in 0 grade of flow table result after the completion of processing again and proceeds processing, the n1 grades of flow table can be 1 grade of flow table or other grades of flow tables;The next stage flow table indicated in n1 grades of flow table results is jumped to again after the completion of n1 grades of flow table processing proceeds processing;By that analogy, until the message is sent to after message nn grades of flow tables of corresponding afterbody flow table are handled, the output port specified by controller exports the interchanger 102.The nn grades of flow table can be other grades of flow tables in afterbody flow table or interchanger 102 in interchanger 102.Wherein, the whole flow process referred to as streamline that message is handled in the flow tables at different levels of interchanger 102.
For the ease of understanding the present invention, the flow table match information in flow table item and flow table processing action are explained the content below in conjunction with flow table item.As shown in Table 1, the content in flow table item includes:Matching domain (Match Fields), priority (Priority), counter (Counters), instruction (Instructions), ageing time (Timeouts) and temporary file (Cookie), etc..Wherein, matching domain and instruction correspond to above-described flow table match information and flow table processing action respectively.
Table one
Match Fields Priority Counters Instructions Timeouts Cookies
Matching domain refers to the information such as various message header fields, receiving port number and the value specified progress Match somebody with somebody.Wherein, the various message header fields in message header field such as IP five-tuples (source IP address of IP messages, purpose IP address, protocol type, source port number, destination slogan), Ethernet frame head, such as source MAC, target MAC (Media Access Control) address.Here matching can be accurate matching or mask matches.For example, Match (SRC IP=1.1.1.1), represent accurately to match the source IP address of message, source IP address can be so that the match is successful for 1.1.1.1 message, Match (SRC IP/16=1.1.0.0) represents to match first 16 of IP address, institute's source IP address be the 1.1.0.0/16 network segments message can the match is successful.
Instruction in flow table item can have many kinds, for example, instruction can instruct (Goto-Table instructions) for action command (Action instructions), Pipeline control, measurement instruction (Meter instructions), write metadata instructions (Write-Metadata instructions), etc..Wherein, the Action instructions in OpenFlow are divided into two major classes, and a major class is the action performed at once, and corresponding instruction is Apply-Actions;Another major class is first to be stored in behavior aggregate, the action just performed at the end of streamline.The instruction that action is write into behavior aggregate is Write-Actions, and the instruction for removing everything in behavior aggregate is Clear-Actions.Whether the action performed at once, the action being still stored in behavior aggregate, all comprising plurality of classes.The action operated to message is e.g., including indicated how, such as forwards, abandon, change heading, encapsulate, decapsulate, being sent to controller and queue instruction (Set-Queue instructions), etc. is set.Goto-Table is instructed, and is indicated that message is redirected between flow table, i.e., is jumped to another flow table from a flow table.Meter instructions indicate that carrying out QoS (Quality of Service, service quality) to message using Meter tables is handled.
With reference to the above, being directed to service request message source needs just continue next step processing in the service response message for obtaining the transmission of interchanger 102, and a part of content in the message header field of service response message is that the simple upset of service request message, a part of content are fixed value, the message body of service response message is identical with service request message or is the service request message of fixed value, and the embodiments of the invention provide a kind of processing method for such service request message.
For convenience of description, in each embodiment of the invention, interchanger will be reached, and needs the service request message of switch processes to be referred to as initial service request message, the flow table item matched in interchanger with initial service request message is referred to as matching flow table item.Processing method each embodiment as described below of specific service request message:
Fig. 4 is a kind of structural representation of the interchanger provided according to an exemplary embodiment, and the interchanger is used for the processing method for performing the service request message that any embodiments of following Fig. 5 into embodiment illustrated in fig. 9 is provided.Referring to Fig. 4, the interchanger includes:
Receiving module 401, for receiving initial service request message;
Determining module 402, for the matching flow table item for determining to match with initial service request message, wherein, matching flow table item is sent by controller in advance, and matching flow table item carries the predetermined fraction for indicating to overturn in message header field and the instruction that deliberate action is performed to initial service request message;
Flip module 403, for the predetermined fraction in the message header field according to matching flow table item upset initial service request message;
Performing module 404, for performing deliberate action to initial service request message according to matching flow table item, obtains service response message;
Sending module 405, for sending service response message.
Alternatively, the predetermined fraction in the message header field for the initial service request message that flip module 403 is overturn includes at least one of MAC Address, IP address, UDP port number or TCP port number.
Alternatively, the deliberate action that performing module 404 is performed at least includes one kind in the specific field modification action of message header field and message body modification action;
Wherein, the modification of message header field specific field act for change initial service request message message header field in specific field value;
Message body modification is acted for the message body of initial service request message to be replaced with to the message body of service response message, and changes the length for replacing the service request message after message body.
Alternatively, performing module 404 includes:
First execution unit, for when deliberate action includes message body modification action, first other actions are performed to initial service request message according to matching flow table item, obtain the first service request message, wherein, first other actions are the action in deliberate action in addition to the modification of message body is acted;
First control unit, for when it is determined that the first service request message needs to exit streamline, control will First service 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, the message body for the message body of the first service request message to be replaced with to service response message according to preset group list item component;
First modification unit, the length of the service request message after message body is replaced for changing.
Alternatively, performing module 404 includes:
Second execution unit, for when deliberate action includes message body modification action, performing second other actions to initial service request message according to matching flow table item, obtaining the second service request message, wherein, second other actions are the action before message body modification action in deliberate action;
Second control unit, for controlling the second service request message jumping to default context component, wherein, default context component is cached with the message body of service response message;
Second replacement unit, the message body for the message body of the second service request message to be replaced with to service response message;
Second modification unit, the length of the service request message after message body is replaced for changing, the 3rd service request message is obtained;
Returning unit, for the 3rd service request message to be back into streamline;
3rd execution unit, for continuing to perform the 3rd other actions to the 3rd service request message, wherein, the 3rd other actions are the action after message body modification action in deliberate action.
Interchanger provided in an embodiment of the present invention, by after the matching flow table item that determining module determination is matched with initial service request message, flip module overturns the predetermined fraction in the message header field of initial service request message according to matching flow table item, and deliberate action is performed to initial service request message by performing module, obtain service response message, so that when obtaining service response message, locally it can be achieved in interchanger, without being interacted with controller, interacted so as to reduce with controller, the business processing efficiency between controller and interchanger can not only be improved, and the interaction cost between controller and interchanger can be reduced.
Fig. 5 is a kind of flow of the processing method of the service request message provided according to an exemplary embodiment Figure.As shown in figure 5, method flow provided in an embodiment of the present invention includes:
501:Receive initial service request message.
502:It is determined that the matching flow table item matched with initial service request message, wherein, matching flow table item is sent by controller in advance, and matching flow table item carries the predetermined fraction for indicating to overturn in message header field and the instruction that deliberate action is performed to initial service request message.
503:Deliberate action is performed to initial service request message according to the predetermined fraction in the message header field of matching flow table item upset initial service request message, and according to matching flow table item, service response message is obtained.
Alternatively, the predetermined fraction in the message header field of initial service request message includes at least one of MAC Address, IP address, UDP port number or TCP port number.
Alternatively, deliberate action at least includes one kind in the specific field modification action of message header field and message body modification action;
Wherein, the modification of message header field specific field act for change initial service request message message header field in specific field value;
Message body modification is acted for the message body of initial service request message to be replaced with to the message body of service response message, and changes at least one of length of service request message after replacement message body.
Alternatively, deliberate action is performed to initial service request message according to the matching flow table item, including:
If deliberate action is acted including the modification of message body, first other actions are then performed to initial service request message according to the matching flow table item, the first service request message is obtained, wherein, first other actions are the action in deliberate action in addition to the modification of message body is acted;
When it is determined that the first service request message needs to exit streamline, the first service request message is jumped to preset group list item component by control, 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 by the message body of service response message according to preset group list item component, and changes the length for replacing the service request message after message body.
Alternatively, deliberate action is performed to initial service request message according to matching flow table item, including:
If deliberate action is acted including the modification of message body, second other actions are performed to initial service request message according to matching flow table item, the second service request message is obtained, wherein, second other actions are pre- If the action in action before message body modification 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;
The message body of second service request message is replaced with into the message body of service response message, and changes the length for replacing the service request message after message body, the 3rd service request message is obtained;
3rd service request message is back to streamline, and continues to perform the 3rd other actions to the 3rd service request message, wherein, the 3rd other actions are the action after message body modification action in deliberate action.
504:Send service response message.
Method provided in an embodiment of the present invention, by it is determined that after the matching flow table item matched with initial service request message, according to the predetermined fraction in the message header field of matching flow table item upset initial service request message, and deliberate action is performed to initial service request message, obtain service response message, so that when obtaining service response message, locally it can be achieved in interchanger, without being interacted with controller, interacted so as to reduce with controller, the business processing efficiency between controller and interchanger can not only be improved, and the interaction cost between controller and interchanger can be reduced.
Fig. 6 is a kind of flow chart of the processing method of the service request message provided according to an exemplary embodiment.As shown in fig. 6, method flow provided in an embodiment of the present invention includes:
601:Receive the flow table item of simultaneously storage control generation.
Because controller controls the behavior of interchanger by flow table item, interchanger performs corresponding action for the flow table item of its generation according to controller to the message received.In order to determine to perform the message received what kind of action, interchanger needs to receive the flow table item of simultaneously storage control generation in advance.
602:Receive initial service request message.
Because interchanger is in processing business, many service request messages can be received, and many transmitting terminals for sending service request message are required to just carry out next step operation after service response message is obtained.Therefore, in order to ensure the normal process of business, interchanger, which needs to receive, simultaneously handles initial service request message.
Which equipment initial service request message on reception comes from, and the embodiment of the present invention does not make specific limit It is fixed.For example, initial service request message may be from other interchangers in SDN systems, it is also possible to come from controller.
In addition, the embodiment of the present invention is not defined to the particular type of business.During specific implementation, type of service can be ICMP (Internet Control Message Protocol, ICMP) business, can also be GTPU (GPRS Tunneling Protocol-User plane, GPRS Tunneling Protocol-User plane) business, etc..
603:It is determined that the matching flow table item matched with initial service request message, wherein, matching flow table item is sent by controller in advance, and matching flow table item carries the predetermined fraction for indicating to overturn in message header field and the instruction that deliberate action is performed to initial service request message.
In order to determine that the initial service request message received is handled by which flow table item, controller is it needs to be determined that the matching flow table item matched with initial service request message.The mode for the matching flow table item for determining to match with initial service request message on controller, includes but is not limited to the message header field in the message header field flow table item corresponding with all flow tables in initial service request message is compared to realize.
For example, interchanger is previously stored with 2 flow table items, and the match information that flow table item 1 is carried is respectively DST MAC=MAC1, the match information DST MAC=MAC2 that flow table item 2 is carried, if the DST MAC of initial service request message are MAC2, it is determined that matching flow table item is flow table item 2.
In addition, it is directed to and the message header field of service request message is overturn, and the service request message after being overturn to message header field performs the service response message obtained after deliberate action, in order to obtain this kind of service response message, matching flow table item, which is carried, indicates the predetermined fraction in upset message header field and the instruction to initial service request message execution deliberate action.
604:According to the predetermined fraction in the message header field of matching flow table item upset initial service request message.
Locally realized by interchanger to realize to change into the operation for obtaining service response message in correlation technique by controller realization, operation, which is performed, without controller can obtain service response message, it is necessary to be overturn to the predetermined fraction in the message header field of initial service request message.On the mode of the predetermined fraction in the message header field according to matching flow table item upset initial service request message, the embodiment of the present invention is not especially limited.When it is implemented, depending on needing the particular content that combination matching flow table item is carried.
For example, if indicated in the content of matching flow table item " source MAC and target MAC (Media Access Control) address of upset initial service request message; and overturn the source IP and purpose IP " of initial service request message, then according to the content of the matching flow table item, overturn the source IP and purpose IP in the source MAC and target MAC (Media Access Control) address in the message header field in initial service request message, and message header field in initial service request message.
It is including but not limited to MAC Address, at least one of IP address, UDP port number or TCP port number on the predetermined fraction in the message header field of initial service request message.
605:Deliberate action is performed to initial service request message according to matching flow table item, service response message is obtained.
Further, in order to obtain service response message, often also need to perform deliberate action to initial service request message.On the particular content of deliberate action, the embodiment of the present invention is not especially limited.When it is implemented, deliberate action at least includes one kind in the specific field modification action of message header field and message body modification action.Wherein, the modification of message header field specific field act for change initial service request message message header field in specific field value.Message body modification is acted for the message body of initial service request message to be replaced with to the message body of service response message, and changes the length for replacing the service request message after message body.
Certainly, deliberate action can also include other actions, be handled, etc. for example, controlling initial service request message jumping to the progress of next stage flow table, the embodiment of the present invention is not especially limited to this.
Wherein, when deliberate action is that the modification of message header field specific field is acted, the value of the specific field in the message header field by initial service request message that interchanger needs is revised as consistent with the value specified in matching flow table item.Wherein, it is revised as can be identified for that the field value that message is service response message, it is necessary to which message header field is got the bid and knows the field value that message is service request message to obtain service response message.
For example, if " ICMP code=8; ICMP type=0 " identify the message for service request message in the message header field of initial service request message, then in order to by perform deliberate action after initial service request message be changed into service response message, it is necessary to which the value of the field to be revised as to the value of service response message.If for example, " ICMP code=0, ICMP type=0 " can be identified for that message is service response message, then need " ICMP code=8, ICMP type=0 " are revised as " ICMP code=0, ICMP type=0 ".Certainly, when deliberate action is that the modification of message header field specific field is acted, heading can also be changed as needed The value of other fields in domain, 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 in interchanger, the deliberate action should at least include the modification of message header field specific field and act, and the specific field at least includes the field that identification message is service request message or service response message.
When deliberate action is when the modification of message body is acted, it is necessary to which the message body of initial service request message to be revised as to the value specified in matching flow table item.If for example, the message body of service response message is fixed value, needing the message body of initial service request message being revised as the fixed value.
Certainly, the above only for when deliberate action be respectively the modification of message header field specific field action, or the modification of message body action in it is a kind of when, how to the progress of initial service request message processing be illustrated.But, when deliberate action acts for the modification of message header field specific field, or during at least two combination in the action such as message body modification action, to the processing of initial service request message with when deliberate action for it is therein a kind of when handling principle it is consistent, will not be repeated here.
It should be noted that when deliberate action includes message body modification action, it can perform or perform in a pipeline when exiting streamline to perform message body modification action, and the embodiment of the present invention is not especially limited to this.Therefore, when deliberate action, which includes the modification of message body, to be acted, the mode of deliberate action is performed to initial service request message according to matching flow table item, includes but is not limited to have following two ways:
First way:Which is that message body modification action is performed when exiting streamline.Specifically, when the different flow table item of multiple flow table match informations has same treatment, a group list item component can be pre-established, to simplify the process that flow tables at different levels reprocess message so that the action handled in group list item component can seek unity of action when message exits streamline.Wherein, group list item component does not return again to streamline after handling message, and is directly forwarded by designated port.In embodiments of the present invention, the message body of service response message is cached with group list item component in advance.Therefore, when performing message body modification action, it can be realized by group list item component.On this basis, the specific implementation for message body replacement action being performed to initial service request message according to matching flow table item includes but is not limited to:First other actions are performed to initial service request message according to matching flow table item, the first service request message is obtained, wherein, first is other Act as other actions in deliberate action in addition to the modification of message body is acted;When it is determined that the first service request message needs to exit streamline, the first service request message is jumped to preset group list item component by control, 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 by the message body of service response message according to preset group list item component, and changes the length for replacing the service request message after message body.
Mode on performing first other actions to initial service request message according to matching flow table item, the embodiment of the present invention is not especially limited.Including but not limited to it is encapsulation, decapsulation, transmission to next stage flow table, etc. on the particular content of first other actions.
Wherein, when the first service request message is jumped to preset group list item component by control, include but is not limited to:It will handle the first obtained service request message sensing preset group list item to realize by the afterbody flow table by processing initial service request message.
On the mode for the message body that the message body of the first service request message is replaced with to service response message according to preset group list item component, include but is not limited to the value that the value of the message body of the first service request message is replaced with to the message body of the service response message of preset group list item component caching.If for example, the message body of the service response message of group list item component caching is fixed value, the message body of the first service request message is replaced with into the fixed value.
Further, due to performing after message body modification action, the message length of the first service request message may change, therefore, it is also desirable to change the length for replacing the service request message after message body.The mode of the length of the service request message after message body is replaced on modification, the embodiment of the present invention is not especially limited.
It should be noted that because this kind of mode is that message body modification action is performed when exiting streamline, therefore, service response message is just obtained after preset group list item has performed message body modification action.In order that the other interchangers or controller in SDN systems continue to handle service response message, interchanger needs to send service response message by designated port by preset group list item component.If it is to be noted, however, that obtained service response message needs to send from multiple ports, in foundation group list item component, it is necessary to generate a group list item component for each port.Wherein, it is the group of each port generation The content of the message body of the service response message of list item component caching is identical, and only output port is different.
The second way:Which is to perform message body modification action in a pipeline.In this way, can in flow table item cache business response message message body, therefore, the modification of message body action directly carried out in flow table.Furthermore it is possible to pre-establish a context component, and in the context component cache business response message message body.Therefore, when performing message body modification action, it can be performed in the context component.When the context component by pre-establishing the message body for being cached with service response message, and when message body modification action is performed by the context component, deliberate action is performed to initial service request message according to matching flow table item, includes but is not limited in the following way realize:Second other actions are performed to initial service request message according to matching flow table item, the second service request message is obtained, wherein, second other actions are other actions before message body modification action in deliberate action;Second service request message is jumped to default context component by control, wherein, default context component is cached with the message body of service response message;The message body of second service request message is replaced with into the message body of service response message, and changes the length for replacing the service request message after message body, the 3rd service request message is obtained;3rd service request message is back to streamline, and continues to perform the 3rd other actions to the 3rd service request message, wherein, the 3rd other actions are other actions after message body modification action in deliberate action.
Wherein, the particular content on the second other actions and the 3rd other actions, the embodiment of the present invention is equally not especially limited.When it is implemented, the second other act with the 3rd other actions can also be encapsulation, decapsulation, transmission to next stage flow table, etc..
It should be noted that when the action specified during second other actions is matching flow table items, default context component is jumped to from matching flow table by the second service request message.When second other actions include pointing to the action of other flow tables, default context component is jumped to from other flow tables by the second service request message.In addition, if the first element that message body modification action is specified for matching flow table item, then second other actions can not also include any action, and directly perform message body modification action by default context component.
On the principle for the message body that the message body of the second service request message is replaced with to service response message, and the principle for the length for replacing the service request message after message body is changed, with basis in above-mentioned first way Preset group list item component replaces with the message body of the first service request message the principle of the message body of service response message, and the principle of the length of the service request message after modification replacement message body is consistent, the content in above-mentioned first way is for details, reference can be made to, be will not be repeated here.
The message body that the message body of the second service request message is replaced with to service response message is realized by this kind of mode, and change the length for replacing the service request message after message body, so as to obtain after the 3rd service request message, need that the 3rd service request message is back into streamline again, so as to be continued to perform the 3rd other actions to the 3rd service request message by each flow table.Wherein, the 3rd other actions are other actions after message body modification action in deliberate action.If however, indicating to obtain in matching flow table item not perform any action to the 3rd service request message after the 3rd service request message, but directly exiting streamline, then now without performing the 3rd other actions to the 3rd service request message again.That is, the 3rd other actions now can not include any action.
With reference to the above, proceed processing due to needing the 3rd service request message being back to streamline, therefore, compared with above-mentioned first way, which need not set up preset group list item component for different port, therefore, it is possible to save switch memory.
Pass through the message body of the cache business response message in default context component, so that when the different flow table item of multiple flow table match informations has same treatment, i.e. when the different flow table item of multiple flow table match informations, which includes the modification of message body, to be acted, it can be realized by pointing to the default context component, so that the message body of service response message need not be buffered in flow tables at different levels, so as to save switch memory.
It should be noted that the message body of the second service request message is replaced with the message body of service response message by above content only in default context component, and change and replace the length of the service request message after message body and illustrated.But, in the specific implementation, context component can not also be pre-established, and directly cache the message body of service response message into a certain flow table for needing to perform message body modification action, and the message body of the second service request message is replaced with into the message body of service response message in the flow table, and change the length for replacing the service request message after message body.The message body of the second service request message is replaced when using this kind of mode to realize, and changes the principle for the length for replacing the service request message after message body, with the message body of the second service request message is replaced with into service response report in default context component The principle of the message body of text, and the principle for changing the length for replacing the service request message after message body is unanimously, no longer illustrates herein.However, this kind of mode needs, in the message body of the equal cache business response message of flow tables at different levels of interchanger, to compare committed memory.
In addition, if the flow table processing action in matching flow table item includes sending initial service request message into the content for the next stage flow table specified into matching flow table item, the next stage flow table for then performing the possibility of deliberate action to initial service request message to specify in matching flow table and matching flow table item, next stage flow table specified in the corresponding flow table item of next stage flow table even also including being specified in matching flow table item, etc..In a word, in the embodiment of the present invention and subsequent embodiment, it would be desirable to which handling all flow tables, preset group list item component or the default context component of initial service request message needs the summation referred to as deliberate action of the action to the execution of initial service request message.
It should be noted that step 604 and step 605 only with elder generation according to matching flow table item upset initial service request message message header field in predetermined fraction, after according to matching flow table item to initial service request message perform deliberate action illustrated.However, in the specific implementation, first can also perform deliberate action to initial service request message according to matching flow table item, further according to the predetermined fraction in the message header field of matching flow table item upset initial service request message, the embodiment of the present invention is not especially limited to this.
606:Send service response message.
After service response message is obtained, in order that initial service request message source can continue with business, service response message can be sent by designated port.Wherein, the designated port can be the port for receiving initial service request message, or other ports, the embodiment of the present invention is not especially limited to this.Equipment on receiving the service response message, can be the interchanger for sending initial service request message, 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 it is determined that after the matching flow table item matched with initial service request message, according to the predetermined fraction in the message header field of matching flow table item upset initial service request message, and deliberate action is performed to initial service request message, obtain service response message so that when obtaining service response message, locally can be achieved in interchanger, without being interacted with controller, so as to reduce with The interaction of controller, can not only improve the business processing efficiency between controller and interchanger, and can reduce 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.For convenience of description, in embodiments of the present invention, the embodiment of the present invention is explained so that initial service request message is ICMP retroeflection request messages as an example.Wherein, the message body of ICMP retroeflection response message is identical with the message body of ICMP retroeflection request messages;Source address in the message header field of ICMP retroeflection response messages is the source address that destination address in the destination address of ICMP retroeflection request messages, the message header field of ICMP retroeflection response messages is ICMP retroeflection request messages.In addition, in embodiments of the present invention, illustrated so that the flow table item in flow table 1 is matching flow table item as an example, i.e., interchanger overturns the predetermined fraction in the message header field of ICMP retroeflection request messages in flow table 1, and to the execution deliberate action of ICMP retroeflection request messages.As shown in fig. 7, method flow provided in an embodiment of the present invention includes:
701:Interchanger receives the corresponding flow table item 1 of flow table 1 that controller is sent, wherein, it is the ICMP retroeflection request messages of itself that the flow table match information of flow table item 1, which includes matching destination address,;Flow table processing action includes the predetermined fraction in the message header field of upset matching ICMP retroeflection request messages, and performs deliberate action to ICMP retroeflection request message.
Wherein, the flow table match information of flow table item 1 is in addition to the ICMP retroeflection request messages including matching destination address for Self address, port numbers, protocol type, the source MAC of message, target MAC (Media Access Control) address and source IP, purpose IP of incoming message, etc. can also be included.
For example, the content of flow table item 1 can be:
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 table item 1 is carried, and the second row content is the flow table processing action that flow table item 1 is carried.The content of the flow table item 1 is interpreted as:Matching purpose IP is itself, IP protocol number is 1 (ICMP agreements), ICMP code=8 and ICMP type=0 (ICMP retroeflection request message), the message inputted from port 1.Flow table processing is acted:The message of upset matching ICMP retroeflection request messages The source MAC and target MAC (Media Access Control) address (Swap MAC head) of header field, the source IP and purpose IP (Swap IP head) of upset matching ICMP retroeflection request messages, set ICMP code=0 (retroeflection request message is changed into retroeflection response message), and from port 1 (out port=1) transmission processing after message.
Wherein, in the citing, the predetermined fraction in message header field is the source MAC and target MAC (Media Access Control) address, source IP and purpose IP of the message header field of ICMP retroeflection request messages.Deliberate action includes setting ICMPcode=0.
702:ICMP retroeflection request message reaches the flow table 1 of interchanger.
703:Flow table 1 is matched according to flow table item 1 to ICMP retroeflection request messages, and after the match is successful, the predetermined fraction in the message header field of ICMP retroeflection request messages is overturn according to correspondence flow table item 1, and performs the deliberate action specified in flow table item 1, ICMP retroeflection response messages are obtained.
With reference to the content of flow table item 1 in above-mentioned steps 701, if flow table 1 determine to indicate in the message match information of the ICMP retroeflection request messages received the message be inputted from port 1, purpose IP be itself, IP protocol number be that 1, type of message is ICMP retroeflection request messages, it is determined that the ICMP retroeflection request message received is matched with the flow table item 1 prestored.Therefore, the source MAC and target MAC (Media Access Control) address of the message header field of the upset of flow table 1 ICMP request messages, overturns the source IP and purpose IP of ICMP retroeflection request messages;ICMP code=0 are set, so that ICMP retroeflection request messages are changed into ICMP retroeflection response messages.
Because the flow table processing action in flow table item 1 is not comprising the content for jumping to other grades of flow tables, therefore, in embodiments of the present invention, upset message header field is handled by flow table 1, and ICMP retroeflection request message is performed after deliberate action, obtain ICMP retroeflection response messages.
704:Flow table 1 sends the ICMP retroeflection response messages from designated port.
With reference to the content of above-mentioned flow table item 1, due to indicating that flow table 1 needs to send the ICMP retroeflection request message after processing by port 0 in flow table item 1, therefore, flow table 1 sends the ICMP retroeflection response messages by port 1.
Method provided in an embodiment of the present invention, by it is determined that after the matching flow table item matched with ICMP retroeflection service request messages, the default portion in the message header field of ICMP retroeflection request messages is overturn according to matching stream item Point, and deliberate action is performed to ICMP retroeflection request message, obtain ICMP retroeflection response messages, so that when obtaining ICMP retroeflection response messages, it locally can be achieved, without being interacted with controller, interacted so as to reduce with controller in interchanger, the business processing efficiency between controller and interchanger can not only be improved, and the interaction cost between controller and interchanger can be reduced.
Fig. 8 is a kind of flow chart of the processing method of the service request message provided according to an exemplary embodiment.For convenience of description, in embodiments of the present invention, the embodiment of the present invention is explained so that service request message is GTPU retroeflection request messages as an example.Wherein, the source address in the message header field of GTPU retroeflection response message is the destination address of GTPU retroeflection request messages, and the destination address in the message header field of GTPU retroeflection response messages is the source address of GTPU retroeflection request messages;The message body of GTPU retroeflection response messages is different from the message body of GTPU retroeflection request messages, but is fixed value.In addition, in embodiments of the present invention, the processing method to service request message provided in an embodiment of the present invention exemplified by replacing the message body of the service request message after the upset of message header field, matching flow table item at the end of in streamline in preset group list item component (Group) and be flow table item 1 is explained.As shown in figure 8, method flow provided in an embodiment of the present invention includes:
801:Preset group list item component in interchanger receives the message body for the GTPU retroeflection response messages that controller is sent.
Because the message body of GTPU retroeflection response messages is fixed value, therefore, the message body for the GTPU retroeflection response messages sent by controller that preset group list item component is received is fixed value.Preset group list item component is received after the message body of GTPU retroeflection response messages, is buffered in correspondence memory, so as to when subsequently exiting streamline, perform message body modification action.
802:Flow tables at different levels receive the corresponding flow table item that controller is sent, wherein, it is the GTPU retroeflection request messages of itself that the flow table match information of flow table item 1, which includes matching destination address, flow table processing action includes the predetermined fraction in the message header field of upset matching GTPU retroeflection request messages, and performs deliberate action to GTPU retroeflection request message.
The flow table match information of flow table item 1 including matching destination address for the ICMP retroeflection of itself except asking Outside message, port numbers, protocol type, the source MAC of message, target MAC (Media Access Control) address and source IP, purpose IP of incoming message, etc. can also be included.
For example, the content of flow table item 1 can be: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, it is unrequited go out flow table item 1 flow table match information particular content, during specific implementation, the flow table match information of flow table item 1 can be identical with the particular content of the flow table match information of flow table item 1 in above-mentioned embodiment illustrated in fig. 7, no longer illustrates herein.
In the citing, predetermined fraction in message header field for the message header field of ICMP retroeflection request messages source IP and purpose IP, and UDP source port number and destination slogan.Deliberate action includes setting type of message to be response message (Set message type=response), and 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).
803:GTPU retroeflection request message reaches the flow table 1 of interchanger.
804:Flow table 1 is matched according to flow table item 1 to GTPU retroeflection request messages, and after the match is successful, the flow table processing performed according to correspondence flow table item 1 to GTPU retroeflection request message in flow table item 1 is acted.
The principle matched on flow table 1 according to flow table item 1 to GTPU retroeflection request messages, the principle matched with flow table in step 703 1 according to flow table item 1 to ICMP retroeflection request messages is consistent, for details, reference can be made to the content of above-mentioned steps 703, will not be repeated here.
Sent with reference to controller in step 801 to the content of the flow table item 1 of flow table 1, after the match is successful, flow table 1 upset GTPU retroeflection request messages message header field in source IP and purpose IP, and UDP source port number and destination slogan.Further, flow table 1 will go to a group list item A processing and be added in set of actions (Action set【Goto group A】), and jump to flow table 2, by flow table 2 according to 2 pairs of the corresponding flow table item prestored by flow table 1 handle after GTPU retroeflection request messages match, and perform the action specified in flow table item 2.On 2 pairs of flow table by flow table 1 handle after GTPU retroeflection request messages Matched, and perform the mode for the action specified in flow table item 2, the embodiment of the present invention is not especially limited.
The action of flow table 2 is jumped to due to being carried in the flow table processing action of flow table item 1, therefore, after the flow table processing in flow table 1 in corresponding flow table item is completed, the GTPU retroeflection request messages after the processing of flow table 1 jump to flow table 2, as shown in phantom in Figure 8.In addition, in embodiments of the present invention, illustrated exemplified by exiting streamline after flow table 2 has been handled GTPU retroeflection request messages, therefore, flow table 2 has been handled after GTPU retroeflection request messages, GTPU retroeflection request messages after flow table 2 is handled are sent to preset group list item component, and performing message body modification by preset group list item component acts.
805:When it is determined that needing to exit streamline by the GTPU retroeflection request messages after flow tables at different levels processing, the GTPU retroeflection request messages after being handled by flow tables at different levels are controlled to jump to preset group list item component.
On determining to need to exit the mode of streamline by the GTPU retroeflection request messages after flow tables at different levels processing, the embodiment of the present invention is not especially limited.During specific implementation, it can be determined not include the action for jumping to other flow tables in corresponding flow table item by the afterbody flow table for handling the GTPU retroeflection request messages, and during instruction including jumping to group list item A, it is determined that by flow tables at different levels handle after GTPU retroeflection request messages need to exit streamline.
On controlling the mode by preset group list item component is jumped to by the GTPU retroeflection request messages after flow tables at different levels processing, the GTPU retroeflection request message after being handled by flow tables at different levels is including but not limited to controlled to point to preset group list item component.
806:Preset group list item component performs message body modification action, obtains GTPU retroeflection response messages.
Principle on preset group list item component, with in above-mentioned steps 606 when deliberate action include the modification of message body act when, it is consistent according to the principle that matching flow table item performs the first way in deliberate action to initial service request message, the content in above-mentioned steps 606 is for details, reference can be made to, be will not be repeated here.
807:Send GTPU retroeflection response messages.
After preset group list item component performs message body modification action, you can obtain GTPU retroeflection response messages.After the processing of preset group list item component, message is no longer back to streamline, therefore, and GTPU retroeflection response messages send out interchanger by designated port.Wherein, the designated port can connect for interchanger Receive the port of GTPU retroeflection request messages, or other ports, the embodiment of the present invention is not especially limited to this.
Method provided in an embodiment of the present invention, by it is determined that after the matching flow table item matched with GTPU retroeflection request messages, according to the predetermined fraction in the message header field of matching flow table item upset GTPU retroeflection request messages, and deliberate action is performed to GTPU retroeflection request message, obtain GTPU retroeflection response messages, so that when obtaining GTPU retroeflection response messages, locally it can be achieved in interchanger, without being interacted with controller, interacted so as to reduce with controller, the business processing efficiency between controller and interchanger can not only be improved, and the interaction cost between controller and interchanger can be reduced.
Fig. 9 is a kind of flow chart of the processing method of the service request message provided according to an exemplary embodiment.For convenience of description, in embodiments of the present invention, still the embodiment of the present invention is explained so that service request message is GTPU retroeflection request messages as an example.The difference of the embodiment and embodiment illustrated in fig. 8 is, performs message body modification action and is performed between streamline, and performs message body replacement action by default context component (context).In addition, in embodiments of the present invention, still being illustrated exemplified by matching flow table item and being the corresponding flow table item 1 of flow table 1.As shown in figure 9, method flow provided in an embodiment of the present invention includes:
901:Default context component in interchanger receives the message body for the GTPU retroeflection response messages that controller is sent.
Because the message body of GTPU retroeflection response messages is fixed value, therefore, the message body for presetting the GTPU retroeflection response messages sent by controller that context component is received is fixed value.Default context component is received after the message body of GTPU retroeflection response messages, is buffered in correspondence memory, so as to subsequently perform message body modification action in a pipeline.
Wherein, presetting the message body of the GTPU retroeflection response messages for the controller transmission that context component is received can be realized by receiving following content:
Context table modify (A, buffered message body).
902:Flow tables at different levels receive the corresponding flow table item that controller is sent, wherein, the flow table of flow table item 1 It is the GTPU retroeflection request messages of itself to include matching destination address with information, and flow table processing action includes the predetermined fraction in the message header field of upset matching GTPU retroeflection request messages, and performs deliberate action to GTPU retroeflection request message.
The flow table match information of flow table item 1 can also include port numbers, protocol type, the source MAC of message, target MAC (Media Access Control) address and source IP, purpose IP of incoming message, etc. in addition to being the GTPU retroeflection request messages of itself including matching destination address.
For example, the content of flow table item 1 can be: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, it is unrequited go out flow table item 1 flow table match information particular content, during specific implementation, the flow table match information of flow table item 1 can be identical with the particular content of the flow table match information of flow table item 1 in above-mentioned embodiment illustrated in fig. 7, no longer illustrates herein.
In the citing, predetermined fraction in message header field for the message header field of GTPU retroeflection request messages source IP and purpose IP, and UDP source port number and destination slogan.Deliberate action includes setting type of message to be response message (Set message type=response), go to context A (Goto context A) and carry out message body modification action, and jump to flow table 2 (Goto table2).
903:GTPU retroeflection request message reaches the flow table 1 of interchanger.
904:Flow table 1 is matched according to flow table item 1 to GTPU retroeflection request messages, and after the match is successful, the flow table processing performed according to correspondence flow table item 1 to GTPU retroeflection request message in flow table item 1 is acted.
The principle matched on flow table 1 according to flow table item 1 to GTPU retroeflection request messages, the principle matched with flow table in step 703 1 according to flow table item 1 to ICMP retroeflection request messages is consistent, for details, reference can be made to the content of above-mentioned steps 703, will not be repeated here.
Sent with reference to controller in step 902 to the content of the flow table item 1 of flow table 1, after the match is successful, flow table 1 upset GTPU retroeflection request messages message header field in source IP and purpose IP, and UDP source port number and destination slogan.Further, as shown in figure 9, flow table 1 returns the GTPU after processing Penetrate request message to send to default context component, performing the modification of message body by default context component acts.Then, GTPU retroeflection request messages after default context component replaces message body are back to flow table 1, the GTPU request messages replaced after message body are sent to flow table 2 by flow table 1,2 pairs of GTPU retroeflection request messages replaced after message body of flow table proceed processing, after needing the afterbody flow table for handling the GTPU retroeflection request messages to handle the GTPU retroeflection request messages, GTPU retroeflection response messages are obtained.As shown in figure 9, in this embodiment, being illustrated by taking afterbody flow table of the flow table 2 for processing GTPU retroeflection request messages as an example.Therefore, after the processing of flow table 2 GTPU retroeflection request messages, GTPU retroeflection request messages are obtained.
905:Send GTPU retroeflection request messages.
After GTPU retroeflection response messages are obtained, the GTPU retroeflection response messages can be sent out by interchanger by designated port.Wherein, the designated port can receive the port of GTPU retroeflection request messages for interchanger, or other ports, the embodiment of the present invention is not especially limited to this.
Method provided in an embodiment of the present invention, by it is determined that after the matching flow table item matched with GTPU retroeflection request messages, according to the predetermined fraction in the message header field of matching flow table item upset GTPU retroeflection request messages, and deliberate action is performed to GTPU retroeflection request message, obtain GTPU retroeflection messages, so that when obtaining GTPU retroeflection response messages, locally it can be achieved in interchanger, without being interacted with controller, interacted so as to reduce with controller, the business processing efficiency between controller and interchanger can not only be improved, and the interaction cost between controller and interchanger can be reduced.
Figure 10 is a kind of structural representation of the interchanger provided according to an exemplary embodiment, and the interchanger is used for the processing method for performing above-mentioned Fig. 5 service request messages that any embodiment is provided into Fig. 9.Referring to Figure 10, the interchanger includes:
Receiver 1001, for receiving initial service request message;
Processor 1002, for the matching flow table item for determining to match with initial service request message, according to the predetermined fraction in the message header field of matching flow table item upset initial service request message, and deliberate action is performed to initial service request message according to matching flow table item, obtain service response message, wherein, matching flow table item is advance Sent by controller, and matching flow table item carries and indicates the predetermined fraction in upset message header field and the instruction to initial service request message execution deliberate action;
Emitter, for sending service response message.
Alternatively, the predetermined fraction in the message header field of initial service request message includes at least one of MAC Address, IP address, UDP port number or TCP port number.
Alternatively, deliberate action at least includes one kind in the specific field modification action of message header field and message body modification action;
Wherein, the modification of message header field specific field acts the value of the specific field in the message header field for the first service request message of modification;
Message body modification is acted for the message body of initial service request message to be replaced with to the message body of service response message, and changes the length for replacing the service request message after message body.
Alternatively, processor 1002, if being additionally operable to deliberate action to act including the modification of message body, first other actions are then performed to initial service request message according to the matching flow table item, obtain the first service request message, wherein, first other actions are the action in deliberate action in addition to the modification of message body is acted;When it is determined that the first service request message needs to exit streamline, the first service request message is jumped to preset group list item component by control, 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 by the message body of service response message according to preset group list item component, and changes the length for replacing the service request message after message body.
Alternatively, processor 1002, if being additionally operable to deliberate action to act including the modification of message body, second other actions are then performed to initial service request message according to matching flow table item, obtain the second service request message, wherein, second other actions are the action before message body modification action 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;The message body of second service request message is replaced with into the message body of service response message, and changes the length for replacing the service request message after message body, the 3rd service request message is obtained;3rd service request message is back to streamline, and continues to perform the 3rd other actions to the 3rd service request message, wherein, the 3rd other actions are the action after message body modification action in deliberate action.
Interchanger provided in an embodiment of the present invention, by it is determined that after the matching flow table item matched with initial service request message, according to the predetermined fraction in the message header field of matching stream item upset initial service request message, and deliberate action is performed to initial service request message, obtain service response message, so that when obtaining service response message, locally it can be achieved in interchanger, without being interacted with controller, interacted so as to reduce with controller, the business processing efficiency between controller and interchanger can not only be improved, and the interaction cost between controller and interchanger can be reduced.
It should be noted that:The interchanger that above-described embodiment is provided is in processing business request message, only it is illustrated with the division of above-mentioned each functional module, in practical application, it can as needed and by above-mentioned functions distribute and be completed by different functional modules, the internal structure of equipment is divided into different functional modules, to complete all or part of function described above.In addition, the processing method embodiment for the interchanger and service request message that above-described embodiment is provided belongs to same design, it implements process and refers to embodiment of the method, repeats no more here.
One of ordinary skill in the art will appreciate that realizing all or part of step of above-described embodiment can be completed by hardware, the hardware of correlation can also be instructed to complete by program, described program can be stored in a kind of computer-readable recording medium, storage medium mentioned above can be read-only storage, disk or CD etc..
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the invention, within the spirit and principles of the invention, any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.

Claims (15)

  1. A kind of interchanger, it is characterised in that the interchanger includes:
    Receiving module, for receiving initial service request message;
    Determining module, for the matching flow table item for determining to match with the initial service request message, the matching flow table item is sent by controller in advance, and the matching flow table item carries the predetermined fraction for indicating to overturn in message header field and the instruction that deliberate action is performed to the initial service request message;
    Flip module, for overturning the predetermined fraction in the message header field of the initial service request message according to the matching flow table item;
    Performing module, for performing the deliberate action to the initial service request message according to the matching flow table item, obtains service response message;
    Sending module, for sending the service response message.
  2. Interchanger according to claim 1, characterized in that, the predetermined fraction in the message header field of the initial service request message of the flip module upset includes at least one of MAC address, net association IP address, UDP UDP port number or transmission control protocol TCP port numbers.
  3. Interchanger according to claim 1, it is characterised in that the deliberate action that the performing module is performed at least includes one kind in the specific field modification action of message header field and message body modification action;
    Wherein, the message header field specific field modification act for change the initial service request message message header field in specific field value;
    The message body modification is acted for the message body of the initial service request message to be replaced with into the message body of service response message, and changes the length for replacing the service request message after message body.
  4. Interchanger according to claim 3, it is characterised in that the performing module, including:
    First execution unit, for when the deliberate action includes message body modification action, first other actions are performed to the initial service request message according to the matching flow table item, the first service request message is obtained, first other actions are the action in the deliberate action in addition to the message body modification is acted;
    First control unit, for when it is determined that the first service request message needs to exit streamline, the first service request message to be jumped to preset group list item component by control, and the preset group list item component is cached with the message body of service response message;
    First replacement unit, the message body for the message body of the first service request message to be replaced with to the service response message according to the preset group list item component;
    First modification unit, the length of the service request message after message body is replaced for changing.
  5. Interchanger according to claim 3, it is characterised in that the performing module, including:
    Second execution unit, for when the deliberate action includes message body modification action, second other actions are performed to the initial service request message according to the matching flow table item, the second service request message is obtained, second other actions are the action before the action of message body modification described in the deliberate action;
    Second control unit, for controlling the second service request message jumping to default context component, the default context component is cached with the message body of service response message;
    Second replacement unit, the message body for the message body of the second service request message to be replaced with to the service response message;
    Second modification unit, the length of the service request message after message body is replaced for changing, the 3rd service request message is obtained;
    Returning unit, for the 3rd service request message to be back into streamline;
    3rd execution unit, for continuing to perform the 3rd service request message the 3rd other actions, the 3rd other actions are the action after the action of message body modification described in the deliberate action.
  6. A kind of processing method of service request message, it is characterised in that methods described includes:
    Receive initial service request message;
    It is determined that the matching flow table item matched with the initial service request message, the matching flow table item is sent by controller in advance, and the matching flow table item carries the predetermined fraction for indicating to overturn in message header field and the instruction that deliberate action is performed to the initial service request message;
    The predetermined fraction in the message header field of the initial service request message is overturn according to the matching flow table item, and the deliberate action is performed to the initial service request message according to the matching flow table item, service response message is obtained.
    Send the service response message.
  7. Method according to claim 6, characterized in that, the predetermined fraction in the message header field of the initial service request message includes at least one of MAC address, net association IP address, UDP UDP port number or transmission control protocol TCP port numbers.
  8. Method according to claim 6, it is characterised in that the deliberate action at least includes one kind in the specific field modification action of message header field and message body modification action;
    Wherein, the message header field specific field modification act for change the initial service request message message header field in specific field value;
    The message body modification is acted for the message body of the initial service request message to be replaced with into the message body of service response message, and changes the length for replacing the service request message after message body.
  9. Method according to claim 8, it is characterised in that described that the deliberate action is performed to the initial service request message according to the matching flow table item, including:
    If the deliberate action is acted including the message body modification, first other actions are then performed to the initial service request message according to the matching flow table item, the first service request message is obtained, first other actions are the action in the deliberate action in addition to the message body modification is acted;
    When it is determined that the first service request message needs to exit streamline, the first service request message is jumped to preset group list item component by control, and 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 to the message body of the service response message according to the preset group list item component, and changes the length for replacing the service request message after message body.
  10. Method according to claim 8, it is characterised in that described that the deliberate action is performed to the initial service request message according to the matching flow table item, including:
    If the deliberate action is acted including the message body modification, second other actions are then performed to the initial service request message according to the matching flow table item, the second service request message is obtained, second other actions are the action before the action of message body modification described in the deliberate action;
    The second service request message is jumped to default context component by control, and the 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 to the message body of the service response message, and changes the length for replacing the service request message after message body, the 3rd service request message is obtained;
    The 3rd service request message is back to streamline, and continues to perform the 3rd service request message the 3rd other actions, the 3rd other actions are the action after the action of message body modification described in the deliberate action.
  11. A kind of interchanger, it is characterised in that the interchanger includes:
    Receiver, for receiving initial service request message;
    Processor, for the matching flow table item for determining to match with the initial service request message, the predetermined fraction in the message header field of the initial service request message is overturn according to the matching flow table item, and the deliberate action is performed to the initial service request message according to the matching flow table item, obtain service response message, the matching flow table item is sent by controller in advance, and the matching flow table item carries the predetermined fraction for indicating to overturn in message header field and the instruction that deliberate action is performed to the initial service request message;
    Emitter, for sending the service response message.
  12. Interchanger according to claim 11, characterized in that, the predetermined fraction in the message header field of the initial service request message includes at least one of MAC address, net association IP address, UDP UDP port number or transmission control protocol TCP port numbers.
  13. Interchanger according to claim 11, it is characterised in that the deliberate action at least includes one kind in the specific field modification action of message header field and message body modification action;
    Wherein, the message header field specific field modification act for change the initial service request message message header field in specific field value;
    The message body modification is acted for the message body of the initial service request message to be replaced with into the message body of service response message, and changes the length for replacing the service request message after message body.
  14. Interchanger according to claim 13, it is characterized in that, the processor, if being additionally operable to the deliberate action to act including the message body modification, first other actions are then performed to the initial service request message according to the matching flow table item, the first service request message is obtained, first other actions are the action in the deliberate action in addition to the message body modification is acted;When it is determined that the first service request message needs to exit streamline, the first service request message is jumped to preset group list item component by control, and 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 to the message body of the service response message according to the preset group list item component, and changes the length for replacing the service request message after message body.
  15. Interchanger according to claim 13, it is characterized in that, the processor, if being additionally operable to the deliberate action to act including the message body modification, second other actions are then performed to the initial service request message according to the matching flow table item, the second service request message is obtained, second other actions are the action before the action of message body modification described in the deliberate action;Control described second Service request message jumps to default context component, and the 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 to the message body of the service response message, and changes the length for replacing the service request message after message body, the 3rd service request message is obtained;The 3rd service request message is back to streamline, and continues to perform the 3rd service request message the 3rd other actions, the 3rd other actions are the action after the action of message body modification described in the deliberate action.
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 true CN106105098A (en) 2016-11-09
CN106105098B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650154A (en) * 2018-06-29 2018-10-12 新华三技术有限公司 Flow control methods and device
CN109617997A (en) * 2019-01-02 2019-04-12 广州品唯软件有限公司 Matching process, device and the computer readable storage medium of service request
CN109995725A (en) * 2017-12-29 2019-07-09 中移(苏州)软件技术有限公司 A kind of implementation method and device of cloud computing status firewall

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110324245B (en) 2018-03-31 2021-03-23 华为技术有限公司 Method and device for forwarding message based on integrated flow table
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 (5)

* 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
US20140204948A1 (en) * 2011-12-22 2014-07-24 Telefonaktiebolaget L M Ericsson (Publ) Flexible and extensible flow processing in software-defined networks
CN104022953A (en) * 2013-02-28 2014-09-03 杭州华三通信技术有限公司 Message forwarding method and device based on Open Flow

Family Cites Families (4)

* 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
CN102946325B (en) * 2012-11-14 2015-06-03 中兴通讯股份有限公司 Network diagnosis method, system and equipment based on software defined network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140204948A1 (en) * 2011-12-22 2014-07-24 Telefonaktiebolaget L M Ericsson (Publ) Flexible and extensible flow processing in software-defined networks
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

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109995725A (en) * 2017-12-29 2019-07-09 中移(苏州)软件技术有限公司 A kind of implementation method and device of cloud computing status firewall
CN109995725B (en) * 2017-12-29 2021-08-06 中移(苏州)软件技术有限公司 Method and device for realizing cloud computing state firewall
CN108650154A (en) * 2018-06-29 2018-10-12 新华三技术有限公司 Flow control methods and device
CN108650154B (en) * 2018-06-29 2020-11-27 新华三技术有限公司 Flow control method and device
CN109617997A (en) * 2019-01-02 2019-04-12 广州品唯软件有限公司 Matching process, device and the computer readable storage medium of service request
CN109617997B (en) * 2019-01-02 2022-01-11 广州品唯软件有限公司 Service request matching method and device and computer readable storage medium

Also Published As

Publication number Publication date
WO2016045056A1 (en) 2016-03-31
CN106105098B (en) 2019-05-31

Similar Documents

Publication Publication Date Title
EP3709573A1 (en) Satisfying service level agreement metrics for unknown applications
CN106105098A (en) Switch and the processing method of service request message
EP3069484B1 (en) Shortening of service paths in service chains in a communications network
CN107948076B (en) Method and device for forwarding message
CN104618194B (en) Software defined network monitoring messages method and SDN controllers, switching equipment
US11418405B2 (en) Systems and methods for determining a topology of a network comprising a plurality of intermediary devices and paths
CN109952746A (en) Physics and virtual network function are integrated in business chain network environment
CN109361606B (en) Message processing system and network equipment
EP3331205B1 (en) Data packet transmission method utilized in ipv6 network and device utilizing same
CN106878194B (en) Message processing method and device
US9967177B2 (en) Control apparatus, communication system, switch control method and program
EP3091708B1 (en) Processing rule modification method and apparatus
CN104601467A (en) Method and device for sending messages
US20190260679A1 (en) Service function chaining congestion tracking
WO2018049691A1 (en) Session persistence method and apparatus, and storage medium
CN108353022A (en) A kind of processing method of data message, apparatus and system
WO2023024416A1 (en) Data transmission method, apparatus and device based on load balancing, and storage medium
CN107547346A (en) A kind of message transmitting method and device
CN109246016B (en) Cross-VXLAN message processing method and device
CN104471538B (en) A kind of data flow processing method, equipment and system
CN110391984B (en) Message forwarding method and device
JP2015164295A (en) Information transmission system, information communication apparatus, information transmission apparatus, and program
CN110166375A (en) A kind of message forwarding method and device
CN104838624B (en) The method, apparatus and system that a kind of control business data forward in virtual network
US10320661B2 (en) Communication device and communication method

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