CN103581020A - Message forwarding method, message forwarding device and message forwarding system - Google Patents

Message forwarding method, message forwarding device and message forwarding system Download PDF

Info

Publication number
CN103581020A
CN103581020A CN201310493059.4A CN201310493059A CN103581020A CN 103581020 A CN103581020 A CN 103581020A CN 201310493059 A CN201310493059 A CN 201310493059A CN 103581020 A CN103581020 A CN 103581020A
Authority
CN
China
Prior art keywords
service message
flow table
forwarding
identifies
inquiry
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
CN201310493059.4A
Other languages
Chinese (zh)
Other versions
CN103581020B (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
Priority to CN201310493059.4A priority Critical patent/CN103581020B/en
Publication of CN103581020A publication Critical patent/CN103581020A/en
Application granted granted Critical
Publication of CN103581020B publication Critical patent/CN103581020B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the invention provides a message forwarding method, a message forwarding device and a message forwarding system, and relates to the communication field. The message forwarding method is used for improving performance of the system. The message forwarding method includes the first step of obtaining a first ID of a service message, determining whether a query phase labeled by the first ID is higher than a query phase labeled by an obtained second ID before the query phase labeled by the first ID, the second step of determining a first forwarding flow table according to the first ID if the query phase labeled by the first ID is determined to be higher than the query phase labeled by the obtained second ID before the query phase labeled by the first ID, the third step of obtaining a first key according to the query mode labeled by the first ID, the fourth step of searching for the first forwarding flow table according to the first key and determining whether a matching table item matched with the first key exists in the first forwarding flow table, and the fifth step of obtaining first processing data in the matching table item if the matching table item existing in the first forwarding flow table is determined, and processing the service message according to the first processing data.

Description

A kind of method of message repeating, Apparatus and system
Technical field
The present invention relates to the communications field, relate in particular to a kind of method, Apparatus and system of message repeating.
Background technology
Along with the development of mobile Internet, user is more and more to the demand of business.In order to meet user's demand, software defined network (Software Defined Networking, SDN) is suggested.The core technology of SDN is to utilize OpenFlow(open flows) by network equipment chain of command and forwarding face are separated, thus realized the flexible control of network traffics, for the innovation of core network and application provides good platform.And on Forwarding plane, abstract by standardization and the transfer capability of hardware, for chain of command provides open control interface, operator or third party can control forwarding unit easily, be user-programmable, thus can the new business of fast Development.
A kind of agreement of the chain of command that OpenFlow is to provide SDN and the face of forwarding interface, provides a kind of mode of standard for controlling forwarding unit in SDN.OpenFlow realizes the forwarding of forwarding unit based on stream table.
In the prior art, owing to can recording the next sign that needs the stream table of inquiry in each stream table, according to this sign, can find next stream table.But the sign of stream table is only used for identifying the type of stream table, do not identify inquiry phase, in order to meet the regulation that can only search backward in OpenFlow agreement, the order that must use extra mechanism to search, thus increased the complexity of forwarding service message.
Summary of the invention
Embodiments of the invention provide a kind of method, Apparatus and system of message repeating, in order to when carrying out service message forwarding, ensure the normal forwarding of service message, and reduce the complexity of forwarding service message.
For achieving the above object, embodiments of the invention adopt following technical scheme:
First aspect, the embodiment of the present invention provides a kind of method of message repeating, comprising: obtain the first sign ID of service message, wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message; Determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies; The inquiry phase that a described ID identifies if determine is higher than before the inquiry phase identifying at a described ID, and the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table; The inquiry mode identifying according to a described ID, obtains the first keyword key; According to a described key, search the first forwarding flow table, determine in described the first forwarding flow table, whether there is the list item that mates matching with a described key; If determine in described the first forwarding flow table and have the list item that mates matching with a described key, obtain the first deal with data in described coupling list item, and according to described the first deal with data, process described service message.
In the possible implementation of the first of first aspect, described the first deal with data comprises: the 3rd ID of described service message; Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase; Describedly in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message and comprise: the 3rd ID that obtains described service message in described coupling list item; Determine the inquiry phase whether inquiry phase that described the 3rd ID identifies identifies higher than an ID; The inquiry phase that the inquiry phase that described the 3rd ID identifies if determine identifies higher than an ID,, according to the 3rd ID of described service message, determines the second forwarding flow table; The inquiry mode identifying according to described the 3rd ID, obtains the 2nd key; According to described the 2nd key, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key; If determine in described the second forwarding flow table and have the list item that mates matching with described the 2nd key, obtain the second deal with data in described coupling list item, and according to described the second deal with data, process described service message.
In conjunction with the possible implementation of the first of first aspect, in the possible implementation of the second of first aspect, the inquiry mode that described the 3rd ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
In conjunction with first aspect, in the third possible implementation of first aspect, described the first deal with data comprises: processing instruction; Describedly in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message and comprise: in described coupling list item, obtain described processing instruction, and according to described processing instruction, process described service message.
In conjunction with first aspect, or first to the 3rd any possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, also comprise: the list item that mates not matching with a described key in described the first forwarding flow table if determine, described service message is sent to controller, so that described controller is determined the forwarding process of described service message; Receive the relevant information of the new list item of described the first forwarding flow table that described controller sends.
In conjunction with first aspect, or first to fourth any possible implementation of first aspect, in the 5th kind of possible implementation of first aspect, the inquiry mode that a described ID identifies comprises: any matched and searched, or the longest matched and searched, or exact-match lookup, or linear list is searched.
Second aspect, the embodiment of the present invention provides a kind of method of forwarding of message, comprising: obtain the first sign ID of described service message, wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message; Determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies; The inquiry phase that a described ID identifies if determine is higher than before the inquiry phase identifying at a described ID, and the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table; The inquiry mode of described the first forwarding flow table identifying according to a described ID, obtains the first keyword key; According to a described key, search the first forwarding flow table, determine in described the first forwarding flow table, whether there is the list item that mates matching with a described key; The list item that mates not matching with a described key in described the first forwarding flow table if determine according to described service message, is set up the new list item matching with a described key in described the first forwarding flow table; In described new list item, record the first deal with data; The relevant information of the new list item of described the first forwarding flow table is sent to forwarding unit, so that described forwarding unit forwards described service message according to the new list item of described the first forwarding flow table.
In the possible implementation of the first of second aspect, at described the first forwarding flow table, not in the repeating process at service message, while forwarding described service message, search last forwarding flow table time, described the first deal with data comprises: the 3rd ID of described service message; Described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
In conjunction with second aspect, in the possible implementation of the second of second aspect, at described the first forwarding flow table, be in the repeating process at service message, during last forwarding flow table of searching while forwarding described service message, described the first deal with data comprises: processing instruction.
In conjunction with second aspect, or the possible implementation of first or the second of second aspect, in the third possible implementation of second aspect, before described the first sign ID that obtains service message, also comprise: receive the service message that forwarding unit sends; Resolve described service message, obtain the configuration information of described service message; In described configuration information, identify the repeating process that forwards described service message.
The third possible implementation in conjunction with second aspect, in the 4th kind of possible implementation of second aspect, described the first sign ID that obtains service message comprises: according to the configuration information of described service message, obtain the first sign ID of described service message.
In conjunction with second aspect, or first to fourth any possible implementation of second aspect, in the 5th kind of possible implementation of second aspect, described in obtain service message the first sign ID comprise: in the information of the list item record of the 3rd forwarding flow table, obtain an ID.
In conjunction with second aspect, or first to the 5th any possible implementation of second aspect, in the 6th kind of possible implementation of second aspect, also comprise: if determine, in described the first forwarding flow table, have the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.
In conjunction with the 6th kind of possible implementation of second aspect, in the 7th kind of possible implementation of second aspect, described the first deal with data comprises: the 3rd ID of described service message; Describedly in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message and comprise: the 3rd ID that obtains described service message in described coupling list item; Determine the inquiry phase whether inquiry phase that described the 3rd ID identifies identifies higher than an ID; The inquiry phase that the inquiry phase that described the 3rd ID identifies if determine identifies higher than an ID,, according to the 3rd ID of described service message, determines the second forwarding flow table; The inquiry mode identifying according to described the 3rd ID, obtains the 2nd key; According to described the 2nd key, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key; If find coupling list item, in described coupling list item, obtain the second deal with data, and according to described the second deal with data, process described service message.
The 7th kind of possible implementation in conjunction with second aspect, in the 8th kind of possible implementation of second aspect, the inquiry mode that described the 3rd ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
In conjunction with the 6th kind of possible implementation of second aspect, in the 9th kind of possible implementation of second aspect, described the first deal with data comprises: processing instruction; Describedly in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message and comprise: in described coupling list item, obtain described processing instruction, and according to described processing instruction, process described service message.
In conjunction with second aspect, or first to the 9th any possible implementation of second aspect, in the tenth kind of possible implementation of second aspect, the inquiry mode that a described ID identifies comprises: any matched and searched, or the longest matched and searched, or exact-match lookup, or linear list is searched.
The third aspect, the embodiment of the present invention provides a kind of forwarding unit, comprising: acquiring unit, for obtaining the first sign ID of service message, wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message; Determining unit, for determining that whether inquiry phase that a described ID that described acquiring unit obtains identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies; Described determining unit, if also for determining inquiry phase that a described ID identifies higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table; Described acquiring unit, also the inquiry mode for identifying according to a described ID, obtains the first keyword key; Described determining unit, also the described key for obtaining according to described acquiring unit, searches the first forwarding flow table, determines in described the first forwarding flow table, whether there is the list item that mates matching with a described key; Processing unit, be used in the situation that described determining unit determines that described the first forwarding flow table has the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.
In the possible implementation of the first of the third aspect, described the first deal with data comprises: the 3rd ID of described service message; Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase; Described processing unit obtains the 3rd ID of described service message in described coupling list item specifically for triggering described acquiring unit; Trigger the inquiry phase whether inquiry phase that described the 3rd ID that described determining unit determines that described acquiring unit obtains identifies identifies higher than an ID; Trigger described determining unit in the situation that determine the inquiry phase that inquiry phase that described the 3rd ID identifies identifies higher than an ID, the 3rd ID according to described service message, determines the second forwarding flow table; Trigger the inquiry mode that described acquiring unit identifies according to described the 3rd ID, obtain the 2nd key; Trigger described the 2nd key that described determining unit is obtained according to described acquiring unit, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key; And determine in described the second forwarding flow table have the list item that mates matching with described the 2nd key in described determining unit, in described coupling list item, obtain the second deal with data, and according to described the second deal with data, process described service message.
In conjunction with the third aspect, in the possible implementation of the second of the third aspect, described the first deal with data comprises: processing instruction; Described processing unit, specifically for obtain described processing instruction in described coupling list item, and according to described processing instruction, processes described service message.
In conjunction with the third aspect, or the possible implementation of first or the second of the third aspect, in the third possible implementation of the third aspect, also comprise: receiving element; Described processing unit, also for determining that in described determining unit described the first forwarding flow table the list item that mates not matching with a described key, described service message is sent to controller, so that described controller is determined the forwarding process of described service message; Described receiving element, for receiving the relevant information of the new list item of described the first forwarding flow table that described controller sends.
In conjunction with the third aspect, or first to the 3rd any possible implementation of the third aspect, in the 4th kind of possible implementation of the third aspect, the inquiry mode that a described ID identifies comprises: any matched and searched, or the longest matched and searched, or exact-match lookup, or linear list is searched.
Fourth aspect, the embodiment of the present invention provides a kind of controller, comprising: acquiring unit, for obtaining the first sign ID of described service message, wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message; Determining unit, for determining that whether inquiry phase that a described ID that described acquiring unit obtains identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies; Described determining unit, if also for determining inquiry phase that a described ID identifies higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table; Described acquiring unit, also, for the inquiry mode of described the first forwarding flow table of identifying according to a described ID, obtains the first keyword key; Described determining unit, also the described key for obtaining according to described acquiring unit, searches the first forwarding flow table, determines in described the first forwarding flow table, whether there is the list item that mates matching with a described key; Processing unit, in described determining unit, determine that described the first forwarding flow table do not match with a described key mate list item time, according to described service message, in described the first forwarding flow table, set up the new list item matching with a described key; In described new list item, record the first deal with data; Transmitting element, for the relevant information of the new list item of described the first forwarding flow table is sent to forwarding unit, so that described forwarding unit forwards described service message according to the new list item of described the first forwarding flow table.
In the possible implementation of the first of fourth aspect, at described the first forwarding flow table, not in the repeating process at service message, while forwarding described service message, search last forwarding flow table time, described the first deal with data comprises: the 3rd ID of described service message; Described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
In conjunction with fourth aspect, in the possible implementation of the second of fourth aspect, at described the first forwarding flow table, be in the repeating process at service message, during last forwarding flow table of searching while forwarding described service message, described the first deal with data comprises: processing instruction.
In conjunction with fourth aspect, or the possible implementation of first or the second of fourth aspect, in the third possible implementation of fourth aspect, also comprise: receiving element, the service message sending for receiving forwarding unit; Described acquiring unit, also, for resolving the described service message of described receiving element reception, obtains the configuration information of described service message; In described configuration information, identify the repeating process that forwards described service message.
In conjunction with the third possible implementation of fourth aspect, in the 4th kind of possible implementation of fourth aspect, described acquiring unit, specifically for according to the configuration information of described service message, obtains the first sign ID of described service message.
In conjunction with fourth aspect, or first to the 3rd any possible implementation of fourth aspect, in the 5th kind of possible implementation of fourth aspect, described acquiring unit, obtains an ID in the information specifically for the list item record at the 3rd forwarding flow table.
In conjunction with fourth aspect, or first to the 5th any possible implementation of fourth aspect, in the 6th kind of possible implementation of fourth aspect, described processing unit, also in described determining unit, determine described the first forwarding flow table have match with a described key mate list item time, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.
In conjunction with the 6th kind of possible implementation of fourth aspect, in the 7th kind of possible implementation of fourth aspect, described the first deal with data comprises: the 3rd ID of described service message; Described processing unit obtains the 3rd ID of described service message in described coupling list item specifically for triggering described acquiring unit; Trigger the inquiry phase whether inquiry phase that described the 3rd ID that described determining unit determines that described acquiring unit obtains identifies identifies higher than an ID; Trigger described determining unit when determining the inquiry phase that inquiry phase that described the 3rd ID identifies identifies higher than an ID, the 3rd ID according to described service message, determines the second forwarding flow table; Trigger the inquiry mode that described acquiring unit identifies according to described the 3rd ID, obtain the 2nd key; Trigger described the 2nd key that described determining unit is obtained according to described acquiring unit, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key; And determine in described the second forwarding flow table have the list item that mates matching with described the 2nd key in described determining unit, in described coupling list item, obtain the second deal with data, and according to described the second deal with data, process described service message.
In conjunction with the 6th kind of possible implementation of fourth aspect, in the 8th kind of possible implementation of fourth aspect, described the first deal with data comprises: processing instruction; Described processing unit, specifically for obtain described processing instruction in described coupling list item, and according to described processing instruction, processes described service message.
In conjunction with fourth aspect, or first to the 8th any possible implementation of fourth aspect, in the 9th kind of possible implementation of fourth aspect, the inquiry mode that a described ID identifies comprises: any matched and searched, or the longest matched and searched, or exact-match lookup, or linear list is searched.
The 5th aspect, provides a kind of system of message repeating in the embodiment of the present invention, comprising: forwarding unit and controller; Described forwarding unit is the forwarding unit described in above-described embodiment; Described controller is the controller described in above-described embodiment.
The embodiment of the present invention provides a kind of method, Apparatus and system of message repeating, obtain an ID of service message, determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, determine inquiry phase that a described ID identifies higher than the inquiry phase identifying at a described ID before, during inquiry phase that the 2nd ID obtaining identifies, according to an ID, determine the first forwarding flow table, the inquiry mode of described the first forwarding flow table that the one ID identifies, obtain a key, according to a key, search the first forwarding flow table, if determine in described the first forwarding flow table and have the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.Like this, forwarding unit is when receiving service message, can obtain an ID of this service message, thereby can determine the inquiry phase whether inquiry phase that an ID identifies identifies higher than the 2nd ID obtaining before identifying inquiry phase at an ID, when having determined the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID obtaining before an ID identifies inquiry phase, according to an ID, determine the first forwarding flow table, and forward according to the first forwarding flow table.Thereby in service message repeating process, the forwarding flow table that guarantees different inquiry phase is only queried once, and then when carrying out service message forwarding, ensure the normal forwarding of service message, and without the order of using extra mechanism to search, thereby reduced the complexity of forwarding service message.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The schematic flow sheet of the method for a kind of message repeating that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet of the method for the another kind of message repeating that Fig. 2 provides for the embodiment of the present invention;
The schematic flow sheet of the method for the another kind of message repeating that Fig. 3 provides for the embodiment of the present invention.
The schematic diagram of the function of a kind of forwarding unit that Fig. 4 provides for the embodiment of the present invention;
The schematic diagram of the function of the another kind of forwarding unit that Fig. 5 provides for the embodiment of the present invention;
The schematic diagram of the function of a kind of controller that Fig. 6 provides for the embodiment of the present invention;
The schematic diagram of the function of the another kind of controller that Fig. 7 provides for the embodiment of the present invention;
The schematic diagram of the structure of a kind of forwarding unit that Fig. 8 provides for the embodiment of the present invention;
The schematic diagram of the structure of a kind of controller that Fig. 9 provides for the embodiment of the present invention;
The schematic diagram of the system of a kind of message repeating that Figure 10 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of method of message repeating, as shown in Figure 1, comprising:
101, obtain the first sign ID of service message.
Wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message.
Concrete, the ID that forwarding unit obtains service message has two kinds of situations, specific as follows:
If forwarding unit receives service message by incoming interface, now forwarding unit need to connect parsing service message, thereby obtains an ID of service message.Now, the ID that forwarding unit obtains is that service message carries out in repeating process, the relevant ID of first forwarding flow table searching to needs.
If forwarding unit is before obtaining an ID, by forwarding flow table, undertaken partly forwarding, now, forwarding unit can obtain by the forwarding flow table of a upper inquiry phase ID.
Further, the inquiry mode that a described ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
Wherein, matched and searched comprises arbitrarily: IPv4(Internet Protocol Version4, Internet Protocol version 4) any matched and searched of service message and IPv6(Internet Protocol Version6, Internet Protocol version 6) any matched and searched of service message.
The longest matched and searched comprises: the longest matched and searched of IPv4 service message and the longest matched and searched of IPv6 service message.
Exact-match lookup comprises: the exact-match lookup of the exact-match lookup of IPv4 service message and IPv6 service message.
It should be noted that, the inquiry mode that an ID marks, goes back other modes, and the present invention does not limit this.
Further, ID identifies the inquiry phase of described service message and the method for inquiry mode can be by the inquiry phase of the first flag indicating services report message of ID, by the second flag indication inquiry mode of ID.
For example, the first flag of an ID is 1 o'clock, and indicating inquiry phase is the first inquiry phase, and the second flag is 0 o'clock, and indication inquiry mode is any matched and searched of IPv4 service message.The second flag is 1 o'clock, and indication inquiry mode is any matched and searched of IPv6 service message. the second flag is 2 o'clock, and indication inquiry mode is the longest matched and searched of IPv4 service message.The second flag is 3 o'clock, and indication inquiry mode is the longest matched and searched of IPv6 service message.The second flag is 4 o'clock, and indication inquiry mode is the exact-match lookup of IPv4 service message.The second flag is 5 o'clock, and indication inquiry mode is the exact-match lookup of IPv6 service message.The second flag is 6 o'clock, and indication inquiry mode is that service message is that linear list is searched.
102, determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies.
Concrete, forwarding unit is after having obtained an ID, can know the inquiry phase that this ID identifies, and before the inquiry phase that an ID is identified and the inquiry phase that identifies at a described ID, the inquiry phase that the 2nd ID obtaining identifies compares, to determine that inquiry phase that the current needs of forwarding unit carry out is not the inquiry phase of having inquired about.
It should be noted that, determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, be and determine that whether inquiry phase that an ID identifies is before the inquiry phase identifying at a described ID, the inquiry phase after the inquiry phase that the 2nd ID obtaining identifies.
Further, if forwarding unit is by resolving service message, while obtaining an ID of service message, now forwarding unit does not forward service message, inquiry phase that the 2nd ID identifies is set for empty, the inquiry phase that the inquiry phase that now forwarding unit identifies an ID necessarily identifies higher than the 2nd ID.
If forwarding unit obtains an ID by forwarding flow table, ID corresponding to forwarding flow table that records an ID is the 2nd ID.Now, forwarding unit need to determine that whether inquiry phase that an ID identifies is the inquiry phase after the inquiry phase that identifies of the 2nd ID.
If the inquiry phase after the inquiry phase that the inquiry phase that an ID identifies is the 2nd ID to be identified, forwarding unit can be determined the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID.If the inquiry phase after the inquiry phase that the inquiry phase that an ID identifies is not the 2nd ID to be identified, forwarding unit can be determined the inquiry phase that inquiry phase that an ID identifies or not higher than the 2nd ID.
Exemplary, suppose that the repeating process that service message need to pass through is, traffic classification, three layers of forwarding, two layers of forwarding.Traffic classification is the first inquiry phase, and three layers of forwarding are the second inquiry phase, and two layers of forwarding are the 3rd inquiry phase.If forwarding unit is by resolving service message, while obtaining an ID of service message, the inquiry phase that an ID identifies is traffic classification, is the first inquiry phase.Because forwarding unit is by resolving service message, obtain an ID of service message, the inquiry phase that the 2nd ID that now forwarding unit obtains identifies is for empty, and forwarding unit can detect the inquiry phase whether inquiry phase that an ID identifies identifies higher than the 2nd ID.
Suppose that the inquiry phase that the 2nd ID identifies is traffic classification, be the first inquiry phase, if the inquiry phase that the ID that forwarding unit obtains identifies is three layers of forwarding, be the second inquiry phase, forwarding unit can determine that whether inquiry phase that an ID identifies is higher than before the inquiry phase identifying at an ID, the inquiry phase that the 2nd ID obtaining identifies, be and determine that whether the second inquiry phase that an ID identifies is higher than before the inquiry phase identifying at an ID, the first inquiry phase that the 2nd ID obtaining identifies.
If 103 determine inquiry phase that a described ID identifies higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table.
Concrete, forwarding unit determine inquiry phase that a described ID identifies higher than the inquiry phase identifying at a described ID before, after the inquiry phase that the 2nd ID obtaining identifies, can, according to an ID, determine the first corresponding forwarding flow table of an ID therewith.
It should be noted that, because ID can identify inquiry phase and the inquiry mode that business E-Packets, an ID can identify the first inquiry phase and first inquiry mode of service message.The only corresponding forwarding flow table of each inquiry mode in each inquiry phase, so, can be by the unique first forwarding flow table of determining of an ID.
104, the inquiry mode identifying according to a described ID, obtains the first keyword key.
Concrete, forwarding unit is after determining an ID, and the inquiry mode identifying according to an ID obtains a key corresponding to inquiry mode identifying with an ID from service message.
Exemplary, if this service message is IPv4 service message, and the inquiry mode that an ID identifies is any matched and searched, the required key of matched and searched is five-tuple arbitrarily, comprising: source IP address (SrcIP), object IP address (DstIP), source port number (SrcPort), destination slogan (DstPort) and protocol number (Protocol).When forwarding unit is determined inquiry mode that an ID identifies and is any matched and searched, from service message, obtain a key corresponding to inquiry mode identifying with an ID, be the five-tuple obtaining as a key from service message, comprise: source IP address, object IP address, source port number, destination slogan and protocol number.
105, according to a described key, search the first forwarding flow table, determine in described the first forwarding flow table whether have coupling list item.
Concrete, forwarding unit, after having obtained a key, can be searched the first forwarding flow table according to this key, thereby can determine in the first forwarding flow table whether have coupling list item.
As above described in example, the key that forwarding unit obtains is five-tuple, comprise: source IP address, object IP address, source port number, destination slogan and protocol number, can inquire about the first forwarding flow table according to five-tuple, thereby determine in the first forwarding flow table whether have the list item that mates matching with a key who obtains from service message.Be and determine in the first forwarding flow table whether have the list item that mates matching with the five-tuple obtaining from service message.
Further, according to a key, search the first forwarding flow table, if find the list item matching with a key in the first forwarding flow table, illustrate in the first forwarding flow table and have coupling list item.If do not find the list item matching with a key in the first forwarding flow table, illustrate in the first forwarding flow table and do not mate list item.
If 106 determine in described the first forwarding flow table have the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.
Concrete, forwarding unit in determining the first forwarding flow table, have match with a key mate list item time, can from coupling list item, obtain the first deal with data.Wherein, if the first forwarding flow table is not last forwarding flow table of forwarding service message, when the first deal with data comprises forwarding service message, the 3rd ID corresponding to next forwarding flow table that need to search.That is to say, the first deal with data comprises: identify after the inquiry phase of an ID sign, the ID of next inquiry phase, is the 3rd ID.
Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
If the first forwarding flow table is last forwarding flow table of forwarding service message, the first deal with data comprises: processing instruction.
Forwarding unit is different according to the content of the first deal with data of obtaining, and the method for processing service message is different.
If the first deal with data of obtaining in forwarding unit comprises: the 3rd ID of described service message,, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message and comprise: the 3rd ID that obtains described service message in described coupling list item; Determine the inquiry phase whether inquiry phase that described the 3rd ID identifies identifies higher than an ID; The inquiry phase that the inquiry phase that described the 3rd ID identifies if determine identifies higher than an ID,, according to the 3rd ID of described service message, determines the second forwarding flow table; The inquiry mode identifying according to described the 3rd ID, obtains the 2nd key; According to described the 2nd key, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key; If find coupling list item, in described coupling list item, obtain the second deal with data, and according to described the second deal with data, process described service message.
That is to say, forwarding unit comprises in the first deal with data of obtaining: during the 3rd ID of described service message, illustrate that forwarding unit need to carry out forwarding service message according to the 3rd ID, forwarding unit carries out the flow process of forwarding service message according to the 3rd ID, concrete can, with reference to forwarding unit according to the process of an ID forwarding service message, not repeat them here.
Further, the inquiry mode that described the 3rd ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
Wherein, the inquiry mode that the 3rd ID identifies can be identical with the inquiry mode that an ID identifies.The inquiry phase identifying due to an ID is different from the inquiry phase that the 3rd ID identifies, so the second corresponding forwarding flow table of the first forwarding flow table corresponding from an ID and the 3rd ID is different forwarding flow table.If the inquiry mode that the 3rd ID identifies is identical with the inquiry mode that an ID identifies, illustrate that the first forwarding flow table and the second forwarding flow table are the forwarding flow tables with same queries mode in different inquiry phase.
Further, if the first flag of ID identifies the inquiry phase of service message, the second flag identifies the inquiry mode of service message, in the situation that the inquiry mode that the 3rd ID identifies is identical with the inquiry mode that an ID identifies, the one ID is different from the first flag of the 3rd ID, and the second flag is identical.In the situation that the inquiry mode that the 3rd ID identifies is not identical with the inquiry mode that an ID identifies, an ID is different from the first flag of the 3rd ID, and the second flag is not identical.
If the first deal with data of obtaining in forwarding unit comprises: processing instruction,, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, processing described service message comprises: in described coupling list item, obtain described processing instruction, and according to described processing instruction, process described service message.
That is to say, the first deal with data of obtaining at forwarding unit comprises: during processing instruction, the first forwarding flow table is last forwarding flow table of forwarding service message, now, the processing instruction that forwarding unit can comprise according to the first deal with data of obtaining, process service message, thus the forwarding of finishing service message.
The embodiment of the present invention provides a kind of method of message repeating, obtains an ID of service message, determines that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, determine inquiry phase that a described ID identifies higher than the inquiry phase identifying at a described ID before, during inquiry phase that the 2nd ID obtaining identifies, according to an ID, determine the first forwarding flow table, the inquiry mode of described the first forwarding flow table that the one ID identifies, obtain a key, according to a key, search the first forwarding flow table, if determine in described the first forwarding flow table and have the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.Like this, forwarding unit is when receiving service message, can obtain an ID of this service message, thereby can determine the inquiry phase whether inquiry phase that an ID identifies identifies higher than the 2nd ID obtaining before identifying inquiry phase at an ID, when having determined the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID obtaining before an ID identifies inquiry phase, according to an ID, determine the first forwarding flow table, and forward according to the first forwarding flow table.Thereby in service message repeating process, the forwarding flow table that guarantees different inquiry phase is only queried once, and then when carrying out service message forwarding, ensure the normal forwarding of service message, and without the order of using extra mechanism to search, thereby reduced the complexity of forwarding service message.
The embodiment of the present invention provides a kind of method of message repeating, as shown in Figure 2, comprising:
201, obtain the first sign ID of described service message.
Wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message.
Concrete, the ID that controller obtains service message has two kinds of situations, specific as follows:
Controller can receive the service message that forwarding unit sends, and resolve service message, thus an ID of this service message can be obtained, now, the ID that controller obtains is that service message carries out in repeating process, the relevant ID of first forwarding flow table searching to needs.
If controller is before obtaining an ID, by forwarding flow table, undertaken partly forwarding, now, controller can obtain by the forwarding flow table of a upper inquiry phase ID.
It should be noted that, in control appliance, store forwarding flow table, and identical with the forwarding flow table of storing in forwarding unit.
Further, the inquiry mode that a described ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
Wherein, matched and searched comprises arbitrarily: IPv4(Internet Protocol Version4, Internet Protocol version 4) any matched and searched of service message and IPv6(Internet Protocol Version6, Internet Protocol version 6) any matched and searched of service message.
The longest matched and searched comprises: the longest matched and searched of IPv4 service message and the longest matched and searched of IPv6 service message.
Exact-match lookup comprises: the exact-match lookup of the exact-match lookup of IPv4 service message and IPv6 service message.
It should be noted that, the inquiry mode that an ID marks, goes back other modes, and the present invention does not limit this.
Further, ID identifies the inquiry phase of described service message and the method for inquiry mode can be by the inquiry phase of the first flag indicating services report message of ID, by the second flag indication inquiry mode of ID.
202, determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies.
Concrete, controller is after having obtained an ID, can know the inquiry phase that this ID identifies, and before the inquiry phase that an ID is identified and the inquiry phase that identifies at a described ID, the inquiry phase that the 2nd ID obtaining identifies compares, to determine that inquiry phase that the current needs of controller carry out is not the inquiry phase of having inquired about.
It should be noted that, determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, be and determine that whether inquiry phase that an ID identifies is before the inquiry phase identifying at a described ID, the inquiry phase after the inquiry phase that the 2nd ID obtaining identifies.
Further, if controller is by resolving service message, while obtaining an ID of service message, this Time Controller does not forward service message, inquiry phase that the 2nd ID identifies is set for empty, the inquiry phase that the inquiry phase that this Time Controller identifies an ID necessarily identifies higher than the 2nd ID.
If controller obtains an ID by forwarding flow table, ID corresponding to forwarding flow table that records an ID is the 2nd ID.Now, controller need to determine that whether inquiry phase that an ID identifies is the inquiry phase after the inquiry phase that identifies of the 2nd ID.
If the inquiry phase after the inquiry phase that the inquiry phase that an ID identifies is the 2nd ID to be identified, controller can be determined the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID.If the inquiry phase after the inquiry phase that the inquiry phase that an ID identifies is not the 2nd ID to be identified, controller can be determined the inquiry phase that inquiry phase that an ID identifies or not higher than the 2nd ID.
If 203 determine inquiry phase that a described ID identifies higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table.
Concrete, controller determine inquiry phase that a described ID identifies higher than the inquiry phase identifying at a described ID before, after the inquiry phase that the 2nd ID obtaining identifies, can, according to an ID, determine the first corresponding forwarding flow table of an ID therewith.
It should be noted that, because ID can identify inquiry phase and the inquiry mode that business E-Packets, an ID can identify the first inquiry phase and first inquiry mode of service message.The only corresponding forwarding flow table of each inquiry mode in each inquiry phase, so, can be by the unique first forwarding flow table of determining of an ID.
The inquiry mode of described the first forwarding flow table 204, identifying according to a described ID, obtains the first keyword key.
Concrete, controller is after determining an ID, and the inquiry mode identifying according to an ID obtains a key corresponding to inquiry mode identifying with an ID from service message.
Exemplary, if this service message is IPv4 service message, and the inquiry mode that an ID identifies is any matched and searched, the required key of matched and searched is five-tuple arbitrarily, comprising: source IP address (SrcIP), object IP address (DstIP), source port number (SrcPort), destination slogan (DstPort) and protocol number (Protocol).When controller is determined inquiry mode that an ID identifies and is any matched and searched, from service message, obtain a key corresponding to inquiry mode identifying with an ID, be the five-tuple obtaining as a key from service message, comprise: source IP address, object IP address, source port number, destination slogan and protocol number.
205, according to a described key, search the first forwarding flow table, determine in described the first forwarding flow table, whether there is the list item that mates matching with a described key.
Concrete, controller, after having obtained a key, can be searched the first forwarding flow table according to this key, thereby can determine in the first forwarding flow table whether have coupling list item.
As above described in example, the key that controller obtains is five-tuple, comprise: source IP address, object IP address, source port number, destination slogan and protocol number, can inquire about the first forwarding flow table according to five-tuple, thereby determine in the first forwarding flow table whether have the list item that mates matching with a key who obtains from service message.Be and determine in the first forwarding flow table whether have the list item that mates matching with the five-tuple obtaining from service message.
Further, according to a key, search the first forwarding flow table, if find the list item matching with a key in the first forwarding flow table, illustrate in the first forwarding flow table and have coupling list item.If do not find the list item matching with a key in the first forwarding flow table, illustrate in the first forwarding flow table and do not mate list item.
If 206 determine the list item that mates not matching with a described key in described the first forwarding flow table, according to described service message, in described the first forwarding flow table, set up the new list item matching with a described key.
Wherein, in described new list item, record the first deal with data.
Concrete, controller determine in the first forwarding flow table match with a described key mate list item time, can in the first forwarding flow table, set up the new list item matching with a key, so that the service message of follow-up reception can forward according to the list item that mates matching with a key in the first forwarding flow table.
Further, whether controller is last forwarding flow table difference of forwarding service message according to the first forwarding flow table, and the process of setting up new list item is different.Concrete,
At described the first forwarding flow table, be not in the repeating process at service message, during last forwarding flow table of searching while forwarding described service message, described the first deal with data comprises: the 3rd ID of described service message.
Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
The list item concrete, controller does not match with a key in the list item of determining the first forwarding flow table, illustrates that existing forwarding flow table do not support the forwarding of this service message.Now, controller passes through to resolve service message, knows the configuration information of service message, thereby can be informed in and search after the first forwarding flow table according to the configuration information of service message, and the ID of the next inquiry phase that need to carry out, is and knows the 3rd ID.Controller is set up the list item that mates matching with a key in the first forwarding flow table, and the first deal with data using the 3rd ID as coupling list item, is recorded in coupling list item.
Further, the inquiry phase that the inquiry phase that the 3rd ID identifies identifies higher than an ID.
At described the first forwarding flow table, be in the repeating process at service message, during last forwarding flow table of searching while forwarding described service message, described the first deal with data comprises: processing instruction.
The list item concrete, controller does not match with a key in the list item of determining the first forwarding flow table, illustrates that existing forwarding flow table do not support the forwarding of this service message.Now, controller is according to service message, know the configuration information of service message, thereby can be according to the configuration information of service message, know that the first forwarding flow table is in the repeating process of service message, last forwarding flow table of searching while forwarding described service message, and know the processing instruction of processing service message.Now, controller is set up the list item that mates matching with a key in the first forwarding flow table, and the first deal with data using processing instruction as coupling list item, is recorded in coupling list item.
207, the relevant information of the new list item of described the first forwarding flow table is sent to forwarding unit, so that described forwarding unit forwards described service message according to the new list item of described the first forwarding flow table.
Concrete, controller has been set up after new list item in the first forwarding flow table, the relevant information of the new list item of setting up is sent to forwarding unit, so that forwarding unit can, according to this new list item, be realized corresponding forward process to service message.
The embodiment of the present invention provides a kind of method of message repeating, controller obtains an ID of service message, determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, determine inquiry phase that a described ID identifies higher than the inquiry phase identifying at a described ID before, during inquiry phase that the 2nd ID obtaining identifies, according to an ID, determine the first forwarding flow table, the inquiry mode of described the first forwarding flow table that the one ID identifies, obtain a key, according to a key, search the first forwarding flow table, the list item that mates not matching with a described key in described the first forwarding flow table if determine, according to described service message, in described the first forwarding flow table, set up the new list item matching with a described key, in described new list item, record the first deal with data, the relevant information of the new list item of described the first forwarding flow table is sent to forwarding unit, so that described forwarding unit forwards described service message according to the new list item of described the first forwarding flow table.Like this, controller set up match with a key mate list item before, need to first determine the inquiry phase whether inquiry phase that the ID that obtains identifies identifies higher than the 2nd ID obtaining before identifying inquiry phase at an ID, during inquiry phase that the inquiry phase only identifying at an ID identifies higher than the 2nd ID obtaining before an ID identifies inquiry phase, just in detecting the first forwarding flow table, there is no the occurrence matching with a key, set up the list item that mates matching with a key, and the relevant information of newly-established coupling list item is sent to forwarding unit, thereby in service message repeating process, the forwarding flow table that guarantees different inquiry phase is only queried once, and then when carrying out service message forwarding, ensure the normal forwarding of service message, and without the order of using extra mechanism to search, thereby reduced the complexity of forwarding service message.
The embodiment of the present invention provides a kind of method of message repeating, as shown in Figure 3, comprising:
301, forwarding unit obtains the first sign ID of service message.
Wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message.
Concrete, can refer step 101, do not repeat them here.
302, forwarding unit determines that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies.
Concrete, can refer step 102, do not repeat them here.
Further, if forwarding unit is determined inquiry phase that an ID identifies not higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, being forwarding unit, to determine inquiry phase that an ID identifies be before the inquiry phase identifying at a described ID, inquiry phase before the inquiry phase that the 2nd ID obtaining identifies, in order to guarantee that each inquiry phase only searches forwarding flow table one time, now forwarding unit can no longer be processed this service message, and returns to error message to controller.
If 303 determine inquiry phase that a described ID identifies higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, forwarding unit, according to a described ID, is determined the first forwarding flow table.
Concrete, can refer step 103, do not repeat them here.
304, the inquiry mode that forwarding unit identifies according to a described ID, obtains the first keyword key.
Concrete, can refer step 104, do not repeat them here.
305, forwarding unit, according to a described key, is searched the first forwarding flow table, determines in described the first forwarding flow table, whether there is the list item that mates matching with a described key.
Concrete, can refer step 105, do not repeat them here.
It should be noted that, forwarding unit is different according to definite structure, and the step of execution is different.If forwarding unit is determined in the first forwarding flow table, there is the list item that mates matching with a key, perform step 306a.If forwarding unit is determined the list item that mates not matching with a key in the first forwarding flow table, perform step 306b, 307-313b, or execution step 306b, 307-314a.
If 306a determines in described the first forwarding flow table, have the list item that mates matching with a described key, forwarding unit obtains the first deal with data in described coupling list item, and according to described the first deal with data, processes described service message.
Concrete, can refer step 106, do not repeat them here.
If 306b does not find the list item that mates matching with a described key, forwarding unit is sent to controller by described service message, so that described controller is determined the forwarding process of described service message, controller receives the service message that described forwarding unit sends.
Concrete, when forwarding unit does not find the occurrence matching with a key in the first forwarding flow table, illustrate that forwarding unit is not by the first forwarding flow table forwarding service message, now forwarding unit can be forwarded to controller by this service message, is determined the repeating process of service message by controller.Controller can receive the service message that forwarding unit sends.
307, controller is resolved described service message, obtains the configuration information of described service message.
Wherein, in described configuration information, identify the repeating process that forwards described service message.
It should be noted that, in configuration information, identify the repeating process that forwards described service message, refer to each inquiry phase that identifies user configured forwarding service message in configuration information, and the inquiry mode in each inquiry phase.
For example, the inquiry phase that user configures forwarding service message comprised for three stages: traffic classification, and three layers forward and two layers of forwarding, and to have configured the inquiry mode of traffic classification during the stage be any matching inquiry; The inquiry mode during inquiry phase of three layers of forwarding is the longest matching inquiry; The inquiry mode during inquiry phase of two layers of forwarding is exact matching inquiry.Now, in configuration information, identify inquiry phase and inquiry mode in the repeating process of service message, be the ID that identifies corresponding at least one of at least one forwarding flow table of service message in configuration information.
It should be noted that, configuration information is that controller obtains in service message.Controller can be known and be forwarded the required forwarding flow table of this service message by configuration information, be each forward process and forwarding flow table are associated.
Concrete, controller is after receiving service message, resolve this service message, can get the configuration information of service message, thereby can know inquiry phase that this service message need to carry out and the inquiry mode of each inquiry phase, be and know and forward each forwarding flow table that this service message need to be searched.
308, controller obtains the first sign ID of described service message.
Wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message.
Concrete, controller can receive the service message that forwarding unit sends, and resolves service message, thereby can obtain an ID of this service message, now, the ID that controller obtains is that service message carries out in repeating process, the relevant ID of first forwarding flow table searching to needs.Be, the first sign ID that described controller obtains service message comprises: controller, according to the configuration information of described service message, obtains the first sign ID of described service message.
If controller is before obtaining an ID, by forwarding flow table, undertaken partly forwarding, now, controller can obtain by the forwarding flow table of a upper inquiry phase ID.Be, the first sign ID that described controller obtains service message comprises: controller obtains an ID in the information of the list item record of the 3rd forwarding flow table.
Wherein, the 3rd forwarding flow table is the forwarding flow table of a upper inquiry phase, now in the list item of the 3rd forwarding flow table, records an ID, and controller can, in the list item of the 3rd stream table, obtain an ID.Can refer step 201.
It should be noted that, in control appliance, store forwarding flow table, and identical with the forwarding flow table of storing in forwarding unit.
309, controller determines that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies.
Concrete, can refer step 202, do not repeat them here.
If 310 determine inquiry phase that a described ID identifies higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, controller, according to a described ID, is determined the first forwarding flow table.
Concrete, can refer step 203, do not repeat them here.
The inquiry mode of described the first forwarding flow table that 311, controller identifies according to a described ID, obtains the first keyword key.
Concrete, can refer step 204, do not repeat them here.
312, controller, according to a described key, is searched the first forwarding flow table, determines in described the first forwarding flow table, whether there is the list item that mates matching with a described key.
Concrete, can refer step 205, do not repeat them here.
It should be noted that, controller is different according to definite matching result, and the step of execution is different.If controller is determined the list item that mates not matching with a described key in the first forwarding flow table, perform step 313a-314a.If controller is determined in the first forwarding flow table, there is the list item that mates matching with a described key, perform step 313b.
If 313a determines the list item that mates not matching with a described key in described the first forwarding flow table, controller, according to described service message, is set up the new list item matching with a described key in described the first forwarding flow table.
Wherein, in described new list item, record the first deal with data.
Concrete, can refer step 206, do not repeat them here.
If 313b determines in described the first forwarding flow table, have the list item that mates matching with a described key, controller obtains the first deal with data in described coupling list item, and according to described the first deal with data, processes described service message.
Concrete, controller in determining the first forwarding flow table, have match with a key mate list item time, can from coupling list item, obtain the first deal with data.Wherein, if the first forwarding flow table is not last forwarding flow table of forwarding service message, when the first deal with data comprises forwarding service message, the 3rd ID corresponding to next forwarding flow table that need to search.That is to say, the first deal with data comprises: identify after the inquiry phase of an ID sign, the ID of next inquiry phase, is the 3rd ID.
Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
If the first forwarding flow table is last forwarding flow table of forwarding service message, the first deal with data comprises: processing instruction.
Controller is different according to the content of the first deal with data of obtaining, and the method for processing service message is different.
If the first deal with data of obtaining in controller comprises: the 3rd ID of described service message,, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message and comprise: the 3rd ID that obtains described service message in described coupling list item; Determine the inquiry phase whether inquiry phase that described the 3rd ID identifies identifies higher than an ID; The inquiry phase that the inquiry phase that described the 3rd ID identifies if determine identifies higher than an ID,, according to the 3rd ID of described service message, determines the second forwarding flow table; The inquiry mode identifying according to described the 3rd ID, obtains the 2nd key; According to described the 2nd key, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key; If find coupling list item, in described coupling list item, obtain the second deal with data, and according to described the second deal with data, process described service message.
That is to say, controller comprises in the first deal with data of obtaining: during the 3rd ID of described service message, illustrate that forwarding unit need to carry out forwarding service message according to the 3rd ID, controller carries out the flow process of forwarding service message according to the 3rd ID, concrete can reference controller according to the process of an ID forwarding service message, do not repeat them here.
Further, the inquiry mode that described the 3rd ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
Wherein, the inquiry mode that the 3rd ID identifies can be identical with the inquiry mode that an ID identifies.The inquiry phase identifying due to an ID is different from the inquiry phase that the 3rd ID identifies, so the second corresponding forwarding flow table of the first forwarding flow table corresponding from an ID and the 3rd ID is different forwarding flow table.If the inquiry mode that the 3rd ID identifies is identical with the inquiry mode that an ID identifies, illustrate that the first forwarding flow table and the second forwarding flow table are the forwarding flow tables with same queries mode in different inquiry phase.
Further, if the first flag of ID identifies the inquiry phase of service message, the second flag identifies the inquiry mode of service message, in the situation that the inquiry mode that the 3rd ID identifies is identical with the inquiry mode that an ID identifies, the one ID is different from the first flag of the 3rd ID, and the second flag is identical.In the situation that the inquiry mode that the 3rd ID identifies is not identical with the inquiry mode that an ID identifies, an ID is different from the first flag of the 3rd ID, and the second flag is not identical.
If the first deal with data of obtaining in controller comprises: processing instruction,, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, processing described service message comprises: in described coupling list item, obtain described processing instruction, and according to described processing instruction, service message described in preliminary treatment.
That is to say, the first deal with data of obtaining at controller comprises: during processing instruction, the first forwarding flow table is last forwarding flow table of forwarding service message, now, the processing instruction that controller can comprise according to the first deal with data of obtaining, process service message, thereby the forwarding of finishing service message, like this, in controller side, service message has been carried out to repeating process one time, but controller does not really forward service message, just service message is once forwarded in advance, determine whether service message to be forwarded.Only have forwarding unit service message can be forwarded.
314a, controller are sent to forwarding unit by the relevant information of the new list item of described the first forwarding flow table, so that described forwarding unit forwards described service message according to the new list item of described the first forwarding flow table.Forwarding unit receives the relevant information of the new list item of described the first forwarding flow table that described controller sends.
Concrete, controller has been set up after new list item in the first forwarding flow table, the relevant information of the new list item of setting up is sent to forwarding unit, so that forwarding unit can, according to this new list item, be realized corresponding forward process to service message.The relevant information of the new list item of described the first forwarding flow table that forwarding unit reception controller sends, and according to the relevant information of the new list item of the first forwarding flow table receiving, upgrade the first forwarding flow table.
Exemplary, controller receives after service message, resolves after service message, can obtain the configuration information of this service message, thereby know the repeating process of service message.If configuring the inquiry phase of forwarding service message, user comprised for three stages: traffic classification, and three layers forward and two layers of forwarding, and to have configured the inquiry mode of traffic classification during the stage be any matching inquiry; The inquiry mode during inquiry phase of three layers of forwarding is the longest matching inquiry; The inquiry mode during inquiry phase of two layers of forwarding is exact matching inquiry.Now, in configuration information, identify inquiry phase and inquiry mode in the repeating process of service message, be the ID that identifies corresponding at least one of at least one forwarding flow table of service message in configuration information.Controller can obtain an ID of service message according to configuration information, is assumed to be ID1, and the inquiry phase of the ID1 obtaining sign is traffic classification, and inquiry mode is any matching inquiry.
First controller determines that whether inquiry phase that ID1 identifies is higher than before the inquiry phase identifying at described ID1, the inquiry phase that the 2nd ID obtaining identifies.Because inquiry phase that now the 2nd ID identifies is for empty, so controller is determined the inquiry phase that inquiry phase that ID1 identifies necessarily identifies higher than the 2nd ID.Controller is determined the first forwarding flow table according to ID1, is controller in traffic classification inquiry phase, and determining inquiry mode is the forwarding flow table that any matching inquiry is corresponding, is assumed to be and has forwarded stream table 1.Controller the inquiry mode identifying according to ID1 are any matching inquiry, obtain a key.Controller can be according to a key, and inquiry forwarding flow table 1 determines in forwarding flow table 1, whether there is coupling list item.If determine the list item that has coupling in forwarding flow table 1, can mate the information recording in list item according to this, and the next forwarding flow table that need to search is three layers and forwards corresponding forwarding flow table 2, the ID of the forwarding flow table that the next one of knowing need to be searched is the ID of forwarding flow table 2 correspondence, is assumed to be ID2.
Controller can know that according to the ID2 of forwarding flow table 2 correspondence the inquiry phase that ID2 identifies is three layers of forwarding.Controller need to first be determined the inquiry phase whether inquiry phase that ID2 identifies identifies higher than ID1.The inquiry phase identifying due to ID2 is three layers of forwarding, the inquiry phase that ID1 identifies is traffic classification, three layers of forwarding are the inquiry phase after traffic classification, controller is determined the inquiry phase that inquiry phase that ID2 identifies identifies higher than ID1, controller, according to ID2, is determined the second forwarding flow table, is controller at three layers of forwarding inquiries in the stage, determining inquiry mode is forwarding flow table corresponding to the longest matching inquiry, is assumed to be and has forwarded stream table 2.Controller the inquiry mode identifying according to ID2 are the longest matching inquiry, obtain the 2nd key.Controller can be according to the 2nd key, and inquiry forwarding flow table 2 determines in forwarding flow table 2, whether there is coupling list item.Suppose, determine the list item not matching in forwarding flow table 2, control appliance is set up the new list item matching with the 2nd key in forwarding flow table 2, wherein, by ID corresponding to next inquiry phase, be ID3 as the first deal with data of new list item, be added in new list item.And the relevant information of the new list item of setting up in forwarding flow table 2 is sent to forwarding unit, and so that forwarding unit is according to the relevant information of this list item, forwarding service message.
Control appliance after the list item corresponding with the 2nd key, knows that according to ID3 the inquiry phase that ID3 identifies is two layers of forwarding in having set up forwarding flow table 2.Controller need to first be determined the inquiry phase whether inquiry phase that ID3 identifies identifies higher than ID2.The inquiry phase identifying due to ID3 is two layers of forwarding, the inquiry phase that ID2 identifies is three layers of forwarding, two layers of forwarding are the inquiry phase after three layers of forwarding, controller is determined the inquiry phase that inquiry phase that ID3 identifies identifies higher than ID2, controller, according to ID3, is determined the 3rd forwarding flow table, is controller at two layers of forwarding inquiries in the stage, determining inquiry mode is that exact matching is inquired about corresponding forwarding flow table, is assumed to be and has forwarded stream table 3.Controller the inquiry mode identifying according to ID3 are exact matching inquiry, obtain the 3rd key.Controller, according to the 3rd key, is searched forwarding flow table 3, determines in forwarding flow table 3, whether there is the list item matching with the 3rd key.Suppose to determine and in forwarding flow table 3, have coupling list item, the first deal with data of the record of the coupling list item in forwarding flow table 3 is processing instruction, controller can be processed service message according to this processing instruction, can carry out in advance the repeating process of service message like this in controller.Owing to service message cannot being forwarded in controller, the message that controller can normally forward at this service message is sent to forwarding unit, so that forwarding unit is when receiving service message, according to the forwarding flow table of having stored, forwarding service message.
The embodiment of the present invention provides a kind of method of message repeating, forwarding unit obtains an ID of service message, determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, determine inquiry phase that a described ID identifies higher than the inquiry phase identifying at a described ID before, during inquiry phase that the 2nd ID obtaining identifies, according to an ID, determine the first forwarding flow table, the inquiry mode of described the first forwarding flow table that the one ID identifies, obtain a key, according to a key, search the first forwarding flow table, if determine in described the first forwarding flow table and have the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.The list item that mates not matching with a key in the first forwarding flow table if determine, is sent to controller by service message, by controller, obtains the relevant forwarding information of this service message.Like this, forwarding unit is when receiving service message, can obtain an ID of this service message, thereby can determine the inquiry phase whether inquiry phase that an ID identifies identifies higher than the 2nd ID obtaining before identifying inquiry phase at an ID, when having determined the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID obtaining before an ID identifies inquiry phase, according to an ID, determine the first forwarding flow table, and forward according to the first forwarding flow table.Thereby in service message repeating process, the forwarding flow table that guarantees different inquiry phase is only queried once, and then when carrying out service message forwarding, ensure the normal forwarding of service message, and without the order of using extra mechanism to search, thereby reduced the complexity of forwarding service message.And when receiving new service message, can be sent to controller, controller can be according to new service message, in forwarding flow table, set up corresponding new list item, and the relevant information of the list item of newly-established forwarding flow table is sent to forwarding unit, make forwarding unit according to this new business message of the information processing of recording in this list item, without the forwarding process of again writing forwarding unit, further reduce the complexity of forwarding service message, thereby improved the performance of system.
As shown in Figure 4, its functional schematic that is a kind of forwarding unit provided by the invention, shown in figure 4, described forwarding unit, comprising:
Acquiring unit 401, for obtaining the first sign ID of service message.
Wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message.
Concrete, acquiring unit 401, specifically for receiving service message by incoming interface, and resolves service message, obtains an ID of service message.Now, an ID who obtains is that service message carries out in repeating process, the relevant ID of first forwarding flow table searching to needs.
Or, can obtain by the forwarding flow table of a upper inquiry phase ID.
Further, the inquiry mode that a described ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
Wherein, matched and searched comprises arbitrarily: IPv4(Internet Protocol Version4, Internet Protocol version 4) any matched and searched of service message and IPv6(Internet Protocol Version6, Internet Protocol version 6) any matched and searched of service message.
The longest matched and searched comprises: the longest matched and searched of IPv4 service message and the longest matched and searched of IPv6 service message.
Exact-match lookup comprises: the exact-match lookup of the exact-match lookup of IPv4 service message and IPv6 service message.
It should be noted that, the inquiry mode that an ID marks, goes back other modes, and the present invention does not limit this.
Further, ID identifies the inquiry phase of described service message and the method for inquiry mode can be by the inquiry phase of the first flag indicating services report message of ID, by the second flag indication inquiry mode of ID.
Determining unit 402, for determining that whether inquiry phase that a described ID that described acquiring unit 401 obtains identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies.
It should be noted that, determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, be and determine that whether inquiry phase that an ID identifies is before the inquiry phase identifying at a described ID, the inquiry phase after the inquiry phase that the 2nd ID obtaining identifies.
Concrete, described determining unit 402, specifically for passing through to resolve service message at acquiring unit 401, while obtaining an ID of service message, the inquiry phase that the 2nd ID identifies is for empty, determines the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID.
At acquiring unit 401, by forwarding flow table, obtain an ID, ID corresponding to forwarding flow table that records an ID is the 2nd ID, needs to determine that whether inquiry phase that an ID identifies is the inquiry phase after the inquiry phase that identifies of the 2nd ID.
Wherein, if the inquiry phase after the inquiry phase that the inquiry phase that an ID identifies is the 2nd ID to be identified can be determined the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID.If the inquiry phase after the inquiry phase that the inquiry phase that an ID identifies is not the 2nd ID to be identified, can determine the inquiry phase that inquiry phase that an ID identifies or not higher than the 2nd ID.
Described determining unit 402, if also for determining inquiry phase that a described ID identifies higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table.
It should be noted that, because ID can identify inquiry phase and the inquiry mode that business E-Packets, an ID can identify the first inquiry phase and first inquiry mode of service message.The only corresponding forwarding flow table of each inquiry mode in each inquiry phase, so, can be by the unique first forwarding flow table of determining of an ID.
Described acquiring unit 401, also the inquiry mode for identifying according to a described ID, obtains the first keyword key.
Concrete, described acquiring unit 401, specifically for after obtaining an ID, the inquiry mode identifying according to an ID obtains a key corresponding to inquiry mode identifying with an ID from service message.
Exemplary, if this service message is IPv4 service message, and the inquiry mode that an ID identifies is any matched and searched, the required key of matched and searched is five-tuple arbitrarily, comprising: source IP address (SrcIP), object IP address (DstIP), source port number (SrcPort), destination slogan (DstPort) and protocol number (Protocol).When acquiring unit 401 is determined inquiry mode that an ID identifies and is any matched and searched, from service message, obtain a key corresponding to inquiry mode identifying with an ID, be the five-tuple obtaining as a key from service message, comprise: source IP address, object IP address, source port number, destination slogan and protocol number.
Described determining unit 402, also the described key for obtaining according to described acquiring unit 401, searches the first forwarding flow table, determines in described the first forwarding flow table, whether there is the list item that mates matching with a described key.
As above described in example, the key that determining unit 402 is obtained is five-tuple, comprise: source IP address, object IP address, source port number, destination slogan and protocol number, can inquire about the first forwarding flow table according to five-tuple, thereby determine in the first forwarding flow table whether have the list item that mates matching with a key who obtains from service message.Be and determine in the first forwarding flow table whether have the list item that mates matching with the five-tuple obtaining from service message.
Further, according to a key, search the first forwarding flow table, if find the list item matching with a key in the first forwarding flow table, illustrate in the first forwarding flow table and have coupling list item.If do not find the list item matching with a key in the first forwarding flow table, illustrate in the first forwarding flow table and do not mate list item.
Processing unit 403, be used in the situation that described determining unit 402 determines that described the first forwarding flow table has the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.
Concrete, if the first forwarding flow table is not last forwarding flow table of forwarding service message, when the first deal with data comprises forwarding service message, the 3rd ID corresponding to next forwarding flow table that need to search.That is to say, the first deal with data comprises: identify after the inquiry phase of an ID sign, the ID of next inquiry phase, is the 3rd ID.
Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
If the first forwarding flow table is last forwarding flow table of forwarding service message, the first deal with data comprises: processing instruction.
Processing unit 403 is according to the difference of the first deal with data of obtaining, also different to the processing action of service message.
Described processing unit 403, if comprise specifically for the first deal with data of obtaining: the 3rd ID of described service message, triggers the 3rd ID that described acquiring unit 401 obtains described service message in described coupling list item.Trigger the inquiry phase whether inquiry phase that described the 3rd ID that described determining unit 402 determines that described acquiring unit 401 obtains identifies identifies higher than an ID.Trigger described determining unit 402 in the situation that determine the inquiry phase that inquiry phase that described the 3rd ID identifies identifies higher than an ID, the 3rd ID according to described service message, determines the second forwarding flow table.Trigger the inquiry mode that described acquiring unit 401 identifies according to described the 3rd ID, obtain the 2nd key.Trigger described the 2nd key that described determining unit 402 is obtained according to described acquiring unit 401, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key.And determine in described the second forwarding flow table have the list item that mates matching with described the 2nd key in described determining unit 402, in described coupling list item, obtain the second deal with data, and according to described the second deal with data, process described service message.
That is to say, processing unit 403 comprises in the first deal with data of obtaining: during the 3rd ID of described service message, explanation need to be carried out forwarding service message according to the 3rd ID, processing unit 403 triggers the flow process of carrying out forwarding service message according to the 3rd ID, concrete can, with reference to according to the process of an ID forwarding service message, not repeat them here.
Further, the inquiry mode that described the 3rd ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
Wherein, the inquiry mode that the 3rd ID identifies can be identical with the inquiry mode that an ID identifies.The inquiry phase identifying due to an ID is different from the inquiry phase that the 3rd ID identifies, so the second corresponding forwarding flow table of the first forwarding flow table corresponding from an ID and the 3rd ID is different forwarding flow table.If the inquiry mode that the 3rd ID identifies is identical with the inquiry mode that an ID identifies, illustrate that the first forwarding flow table and the second forwarding flow table are the forwarding flow tables with same queries mode in different inquiry phase.
Further, if the first flag of ID identifies the inquiry phase of service message, the second flag identifies the inquiry mode of service message, in the situation that the inquiry mode that the 3rd ID identifies is identical with the inquiry mode that an ID identifies, the one ID is different from the first flag of the 3rd ID, and the second flag is identical.In the situation that the inquiry mode that the 3rd ID identifies is not identical with the inquiry mode that an ID identifies, an ID is different from the first flag of the 3rd ID, and the second flag is not identical.
If the first deal with data of obtaining comprises: processing instruction obtains described processing instruction, and according to described processing instruction, processes described service message in described coupling list item.
That is to say, processing unit 403 comprises in the first deal with data of obtaining: during processing instruction, the first forwarding flow table is last forwarding flow table of forwarding service message, now, the processing instruction that processing unit 403 can comprise according to the first deal with data of obtaining, process service message, thus the forwarding of finishing service message.
Further, described forwarding unit, as shown in Figure 5, also comprises: receiving element 404.
Wherein, described processing unit 404, also for determining that in described determining unit 402 described the first forwarding flow table the list item that mates not matching with a described key, is sent to controller by described service message, so that described controller is determined the forwarding process of described service message.
Described receiving element 404, for receiving the relevant information of the new list item of described the first forwarding flow table that described controller sends.
The embodiment of the present invention provides a kind of forwarding unit, obtains an ID of service message, determines that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, determine inquiry phase that a described ID identifies higher than the inquiry phase identifying at a described ID before, during inquiry phase that the 2nd ID obtaining identifies, according to an ID, determine the first forwarding flow table, the inquiry mode of described the first forwarding flow table that the one ID identifies, obtain a key, according to a key, search the first forwarding flow table, if determine in described the first forwarding flow table and have the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.Like this, forwarding unit is when receiving service message, can obtain an ID of this service message, thereby can determine the inquiry phase whether inquiry phase that an ID identifies identifies higher than the 2nd ID obtaining before identifying inquiry phase at an ID, when having determined the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID obtaining before an ID identifies inquiry phase, according to an ID, determine the first forwarding flow table, and forward according to the first forwarding flow table.Thereby in service message repeating process, the forwarding flow table that guarantees different inquiry phase is only queried once, and then when carrying out service message forwarding, ensure the normal forwarding of service message, and without the order of using extra mechanism to search, thereby reduced the complexity of forwarding service message.
As shown in Figure 6, its functional schematic that is a kind of controller provided by the invention, shown in figure 6, described controller, comprising:
Acquiring unit 601, for obtaining the first sign ID of described service message.
Wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message.
Concrete, acquiring unit 601, specifically for receiving service message by incoming interface, and resolves service message, obtains an ID of service message.Now, an ID who obtains is that service message carries out in repeating process, the relevant ID of first forwarding flow table searching to needs.
Or, can obtain by the forwarding flow table of a upper inquiry phase ID.
Further, the inquiry mode that a described ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
Wherein, matched and searched comprises arbitrarily: IPv4(Internet Protocol Version4, Internet Protocol version 4) any matched and searched of service message and IPv6(Internet Protocol Version6, Internet Protocol version 6) any matched and searched of service message.
The longest matched and searched comprises: the longest matched and searched of IPv4 service message and the longest matched and searched of IPv6 service message.
Exact-match lookup comprises: the exact-match lookup of the exact-match lookup of IPv4 service message and IPv6 service message.
It should be noted that, the inquiry mode that an ID marks, goes back other modes, and the present invention does not limit this.
Further, ID identifies the inquiry phase of described service message and the method for inquiry mode can be by the inquiry phase of the first flag indicating services report message of ID, by the second flag indication inquiry mode of ID.
Determining unit 602, for determining that whether inquiry phase that a described ID that described acquiring unit 601 obtains identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies.
It should be noted that, determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, be and determine that whether inquiry phase that an ID identifies is before the inquiry phase identifying at a described ID, the inquiry phase after the inquiry phase that the 2nd ID obtaining identifies.
Concrete, described determining unit 602, specifically for passing through to resolve service message at acquiring unit 601, while obtaining an ID of service message, the inquiry phase that the 2nd ID identifies is for empty, determines the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID.
At acquiring unit 601, by forwarding flow table, obtain an ID, ID corresponding to forwarding flow table that records an ID is the 2nd ID, needs to determine that whether inquiry phase that an ID identifies is the inquiry phase after the inquiry phase that identifies of the 2nd ID.
Wherein, if the inquiry phase after the inquiry phase that the inquiry phase that an ID identifies is the 2nd ID to be identified can be determined the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID.If the inquiry phase after the inquiry phase that the inquiry phase that an ID identifies is not the 2nd ID to be identified, can determine the inquiry phase that inquiry phase that an ID identifies or not higher than the 2nd ID.
Described determining unit 602, if also for determining inquiry phase that a described ID identifies higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table.
It should be noted that, because ID can identify inquiry phase and the inquiry mode that business E-Packets, an ID can identify the first inquiry phase and first inquiry mode of service message.The only corresponding forwarding flow table of each inquiry mode in each inquiry phase, so, can be by the unique first forwarding flow table of determining of an ID.
Described acquiring unit 601, also the inquiry mode for identifying according to a described ID, obtains the first keyword key.
Concrete, described acquiring unit 601, specifically for after obtaining an ID, the inquiry mode identifying according to an ID obtains a key corresponding to inquiry mode identifying with an ID from service message.
Exemplary, if this service message is IPv4 service message, and the inquiry mode that an ID identifies is any matched and searched, the required key of matched and searched is five-tuple arbitrarily, comprising: source IP address (SrcIP), object IP address (DstIP), source port number (SrcPort), destination slogan (DstPort) and protocol number (Protocol).When acquiring unit 401 is determined inquiry mode that an ID identifies and is any matched and searched, from service message, obtain a key corresponding to inquiry mode identifying with an ID, be the five-tuple obtaining as a key from service message, comprise: source IP address, object IP address, source port number, destination slogan and protocol number.
Described determining unit 602, also the described key for obtaining according to described acquiring unit 601, searches the first forwarding flow table, determines in described the first forwarding flow table, whether there is the list item that mates matching with a described key.
As above described in example, the key that determining unit 602 is obtained is five-tuple, comprise: source IP address, object IP address, source port number, destination slogan and protocol number, can inquire about the first forwarding flow table according to five-tuple, thereby determine in the first forwarding flow table whether have the list item that mates matching with a key who obtains from service message.Be and determine in the first forwarding flow table whether have the list item that mates matching with the five-tuple obtaining from service message.
Further, according to a key, search the first forwarding flow table, if find the list item matching with a key in the first forwarding flow table, illustrate in the first forwarding flow table and have coupling list item.If do not find the list item matching with a key in the first forwarding flow table, illustrate in the first forwarding flow table and do not mate list item.
Processing unit 603, for in described determining unit 602, determine that described the first forwarding flow table do not match with a described key mate list item time, according to described service message, in described the first forwarding flow table, set up the new list item matching with a described key.
Wherein, in described new list item, record the first deal with data.
Concrete, whether processing unit 603 is last forwarding flow table difference of forwarding service message according to the first forwarding flow table, the process of setting up new list item is different.Wherein,
At described the first forwarding flow table, be not in the repeating process at service message, during last forwarding flow table of searching while forwarding described service message, described the first deal with data comprises: the 3rd ID of described service message.
Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
The list item concrete, processing unit 603 does not match with a key in the list item of determining the first forwarding flow table, illustrates that existing forwarding flow table do not support the forwarding of this service message.Now, acquiring unit 601 passes through to resolve service message, knows the configuration information of service message, thereby can be informed in and search after the first forwarding flow table according to the configuration information of service message, and the ID of the next inquiry phase that need to carry out, is and knows the 3rd ID.Processing unit 603 is set up the list item that mates matching with a key in the first forwarding flow table, and the first deal with data using the 3rd ID as coupling list item, is recorded in coupling list item.
Further, the inquiry phase that the inquiry phase that the 3rd ID identifies identifies higher than an ID.
At described the first forwarding flow table, be in the repeating process at service message, during last forwarding flow table of searching while forwarding described service message, described the first deal with data comprises: processing instruction.
The list item that concrete processing unit 603 does not match with a key in the list item of determining the first forwarding flow table, illustrates that existing forwarding flow table do not support the forwarding of this service message.Now, acquiring unit 601 is according to service message, know the configuration information of service message, thereby can be according to the configuration information of service message, know that the first forwarding flow table is in the repeating process of service message, last forwarding flow table of searching while forwarding described service message, and know the processing instruction of processing service message.Now, processing unit 603 is set up the list item that mates matching with a key in the first forwarding flow table, and the first deal with data using processing instruction as coupling list item, is recorded in coupling list item.
Transmitting element 604, for the relevant information of the new list item of described the first forwarding flow table is sent to forwarding unit, so that described forwarding unit forwards described service message according to the new list item of described the first forwarding flow table.
Further, described controller, as shown in Figure 7, also comprises:
Receiving element 604, the service message sending for receiving forwarding unit.
Described acquiring unit 601, also, for resolving the described service message of described receiving element 604 receptions, obtains the configuration information of described service message.
Wherein, in described configuration information, identify the repeating process that forwards described service message.
Now, acquiring unit 601, is specially for obtaining the first sign ID of described service message: described acquiring unit 601, specifically for according to the configuration information of described service message, obtains the first sign ID of described service message.Or described acquiring unit 601, obtains an ID in the information specifically for the list item record at the 3rd forwarding flow table.
Further, processing unit 603, also in the situation that described determining unit 602 determines that described the first forwarding flow table has the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.
Concrete, if the first forwarding flow table is not last forwarding flow table of forwarding service message, when the first deal with data comprises forwarding service message, the 3rd ID corresponding to next forwarding flow table that need to search.That is to say, the first deal with data comprises: identify after the inquiry phase of an ID sign, the ID of next inquiry phase, is the 3rd ID.
Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
If the first forwarding flow table is last forwarding flow table of forwarding service message, the first deal with data comprises: processing instruction.
Processing unit 603 is according to the difference of the first deal with data of obtaining, also different to the processing action of service message.
Described processing unit 603, if comprise specifically for the first deal with data of obtaining: the 3rd ID of described service message, triggers the 3rd ID that described acquiring unit 601 obtains described service message in described coupling list item.Trigger the inquiry phase whether inquiry phase that described the 3rd ID that described determining unit 602 determines that described acquiring unit 601 obtains identifies identifies higher than an ID.Trigger described determining unit 602 in the situation that determine the inquiry phase that inquiry phase that described the 3rd ID identifies identifies higher than an ID, the 3rd ID according to described service message, determines the second forwarding flow table.Trigger the inquiry mode that described acquiring unit 601 identifies according to described the 3rd ID, obtain the 2nd key.Trigger described the 2nd key that described determining unit 602 is obtained according to described acquiring unit 601, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key.And determine in described the second forwarding flow table have the list item that mates matching with described the 2nd key in described determining unit 602, in described coupling list item, obtain the second deal with data, and according to described the second deal with data, process described service message.
That is to say, processing unit 603 comprises in the first deal with data of obtaining: during the 3rd ID of described service message, explanation need to be carried out forwarding service message according to the 3rd ID, processing unit 603 triggers the flow process of carrying out forwarding service message according to the 3rd ID, concrete can, with reference to according to the process of an ID forwarding service message, not repeat them here.
Further, the inquiry mode that described the 3rd ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
Wherein, the inquiry mode that the 3rd ID identifies can be identical with the inquiry mode that an ID identifies.The inquiry phase identifying due to an ID is different from the inquiry phase that the 3rd ID identifies, so the second corresponding forwarding flow table of the first forwarding flow table corresponding from an ID and the 3rd ID is different forwarding flow table.If the inquiry mode that the 3rd ID identifies is identical with the inquiry mode that an ID identifies, illustrate that the first forwarding flow table and the second forwarding flow table are the forwarding flow tables with same queries mode in different inquiry phase.
Further, if the first flag of ID identifies the inquiry phase of service message, the second flag identifies the inquiry mode of service message, in the situation that the inquiry mode that the 3rd ID identifies is identical with the inquiry mode that an ID identifies, the one ID is different from the first flag of the 3rd ID, and the second flag is identical.In the situation that the inquiry mode that the 3rd ID identifies is not identical with the inquiry mode that an ID identifies, an ID is different from the first flag of the 3rd ID, and the second flag is not identical.
If the first deal with data of obtaining comprises: processing instruction obtains described processing instruction, and according to described processing instruction, processes described service message in described coupling list item.
That is to say, processing unit 603 comprises in the first deal with data of obtaining: during processing instruction, the first forwarding flow table is last forwarding flow table of forwarding service message, now, the processing instruction that processing unit 603 can comprise according to the first deal with data of obtaining, process service message, thus the forwarding of finishing service message.
The embodiment of the present invention provides a kind of controller, obtains an ID of service message, determines that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, determine inquiry phase that a described ID identifies higher than the inquiry phase identifying at a described ID before, during inquiry phase that the 2nd ID obtaining identifies, according to an ID, determine the first forwarding flow table, the inquiry mode of described the first forwarding flow table that the one ID identifies, obtain a key, according to a key, search the first forwarding flow table, the list item that mates not matching with a described key in described the first forwarding flow table if determine, according to described service message, in described the first forwarding flow table, set up the new list item matching with a described key, in described new list item, record the first deal with data, the relevant information of the new list item of described the first forwarding flow table is sent to forwarding unit, so that described forwarding unit forwards described service message according to the new list item of described the first forwarding flow table.Like this, controller set up match with a key mate list item before, need to first determine the inquiry phase whether inquiry phase that the ID that obtains identifies identifies higher than the 2nd ID obtaining before identifying inquiry phase at an ID, during inquiry phase that the inquiry phase only identifying at an ID identifies higher than the 2nd ID obtaining before an ID identifies inquiry phase, just in detecting the first forwarding flow table, there is no the occurrence matching with a key, set up the list item that mates matching with a key, and the relevant information of newly-established coupling list item is sent to forwarding unit, thereby in service message repeating process, the forwarding flow table that guarantees different inquiry phase is only queried once, and then when carrying out service message forwarding, ensure the normal forwarding of service message, and without the order of using extra mechanism to search, thereby reduced the complexity of forwarding service message.
As shown in Figure 8, it is the structural representation of a kind of forwarding unit provided by the invention, shown in figure 8, this forwarding unit comprises: processor (processor) 801, communication interface (Communications Interface) 802, memory (memory) 803, communication bus 804 and receiver 805; Wherein, described processor 801, described communication interface 802, described receiver 805 and described memory 803 complete mutual communicating by letter by described communication bus 804.
Processor 801 can be a central processor CPU, or specific integrated circuit ASIC(Application Specific Integrated Circuit), or be configured to implement one or more integrated circuits of the embodiment of the present invention.
Memory 803 is for depositing program code, and described program code comprises computer-managed instruction.Memory 803 may comprise high-speed RAM memory, also may also comprise nonvolatile memory (non-volatile memory), for example at least one magnetic disc store.Processor 801 is for calling the program code of memory 803.Be specially:
Processor 801, for obtaining the first sign ID of service message.
Wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message.
Concrete, processor 801, specifically for receiving service message by incoming interface, and resolves service message, obtains an ID of service message.Now, an ID who obtains is that service message carries out in repeating process, the relevant ID of first forwarding flow table searching to needs.
Or, can obtain by the forwarding flow table of a upper inquiry phase ID.
Further, the inquiry mode that a described ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
Wherein, matched and searched comprises arbitrarily: IPv4(Internet Protocol Version4, Internet Protocol version 4) any matched and searched of service message and IPv6(Internet Protocol Version6, Internet Protocol version 6) any matched and searched of service message.
The longest matched and searched comprises: the longest matched and searched of IPv4 service message and the longest matched and searched of IPv6 service message.
Exact-match lookup comprises: the exact-match lookup of the exact-match lookup of IPv4 service message and IPv6 service message.
It should be noted that, the inquiry mode that an ID marks, goes back other modes, and the present invention does not limit this.
Further, ID identifies the inquiry phase of described service message and the method for inquiry mode can be by the inquiry phase of the first flag indicating services report message of ID, by the second flag indication inquiry mode of ID.
Processor 801, also for determining that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies.
It should be noted that, determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, be and determine that whether inquiry phase that an ID identifies is before the inquiry phase identifying at a described ID, the inquiry phase after the inquiry phase that the 2nd ID obtaining identifies.
Concrete, described processor 801, specifically for by resolving service message, while obtaining an ID of service message, the inquiry phase that the 2nd ID identifies is for empty, determines the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID.
At processor 801, by forwarding flow table, obtain an ID, ID corresponding to forwarding flow table that records an ID is the 2nd ID, needs to determine that whether inquiry phase that an ID identifies is the inquiry phase after the inquiry phase that identifies of the 2nd ID.
Wherein, if the inquiry phase after the inquiry phase that the inquiry phase that an ID identifies is the 2nd ID to be identified can be determined the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID.If the inquiry phase after the inquiry phase that the inquiry phase that an ID identifies is not the 2nd ID to be identified, can determine the inquiry phase that inquiry phase that an ID identifies or not higher than the 2nd ID.
Described processor 801, if also for determining inquiry phase that a described ID identifies higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table.
It should be noted that, because ID can identify inquiry phase and the inquiry mode that business E-Packets, an ID can identify the first inquiry phase and first inquiry mode of service message.The only corresponding forwarding flow table of each inquiry mode in each inquiry phase, so, can be by the unique first forwarding flow table of determining of an ID.
Described processor 801, also the inquiry mode for identifying according to a described ID, obtains the first keyword key.
Concrete, described processor 801, specifically for after obtaining an ID, the inquiry mode identifying according to an ID obtains a key corresponding to inquiry mode identifying with an ID from service message.
Exemplary, if this service message is IPv4 service message, and the inquiry mode that an ID identifies is any matched and searched, the required key of matched and searched is five-tuple arbitrarily, comprising: source IP address (SrcIP), object IP address (DstIP), source port number (SrcPort), destination slogan (DstPort) and protocol number (Protocol).When acquiring unit 401 is determined inquiry mode that an ID identifies and is any matched and searched, from service message, obtain a key corresponding to inquiry mode identifying with an ID, be the five-tuple obtaining as a key from service message, comprise: source IP address, object IP address, source port number, destination slogan and protocol number.
Described processor 801, also, for according to a described key, searches the first forwarding flow table, determines in described the first forwarding flow table, whether there is the list item that mates matching with a described key.
As above described in example, the key that processor 801 obtains is five-tuple, comprise: source IP address, object IP address, source port number, destination slogan and protocol number, can inquire about the first forwarding flow table according to five-tuple, thereby determine in the first forwarding flow table whether have the list item that mates matching with a key who obtains from service message.Be and determine in the first forwarding flow table whether have the list item that mates matching with the five-tuple obtaining from service message.
Further, according to a key, search the first forwarding flow table, if find the list item matching with a key in the first forwarding flow table, illustrate in the first forwarding flow table and have coupling list item.If do not find the list item matching with a key in the first forwarding flow table, illustrate in the first forwarding flow table and do not mate list item.
Processor 801 also, in the situation that described the first forwarding flow table has the list item that mates matching with a described key, obtains the first deal with data, and according to described the first deal with data, processes described service message in described coupling list item.
Concrete, if the first forwarding flow table is not last forwarding flow table of forwarding service message, when the first deal with data comprises forwarding service message, the 3rd ID corresponding to next forwarding flow table that need to search.That is to say, the first deal with data comprises: identify after the inquiry phase of an ID sign, the ID of next inquiry phase, is the 3rd ID.
Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
If the first forwarding flow table is last forwarding flow table of forwarding service message, the first deal with data comprises: processing instruction.
Processor 801 is according to the difference of the first deal with data of obtaining, also different to the processing action of service message.
Described processor 801, if comprise specifically for the first deal with data of obtaining: the 3rd ID of described service message obtains the 3rd ID of described service message in described coupling list item.Determine the inquiry phase whether inquiry phase that described the 3rd ID identifies identifies higher than an ID.In the situation that determine the inquiry phase that inquiry phase that described the 3rd ID identifies identifies higher than an ID, the 3rd ID according to described service message, determines the second forwarding flow table.The inquiry mode identifying according to described the 3rd ID, obtains the 2nd key.Described the 2nd key according to obtaining, searches the second forwarding flow table, determines in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key.And have the list item that mates matching with described the 2nd key in determining described the second forwarding flow table, in described coupling list item, obtain the second deal with data, and according to described the second deal with data, process described service message.
That is to say, processor 801 comprises in the first deal with data of obtaining: during the 3rd ID of described service message, explanation need to be carried out forwarding service message according to the 3rd ID, according to the 3rd ID, carry out the flow process of forwarding service message, concrete can, with reference to according to the process of an ID forwarding service message, not repeat them here.
Further, the inquiry mode that described the 3rd ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
Wherein, the inquiry mode that the 3rd ID identifies can be identical with the inquiry mode that an ID identifies.The inquiry phase identifying due to an ID is different from the inquiry phase that the 3rd ID identifies, so the second corresponding forwarding flow table of the first forwarding flow table corresponding from an ID and the 3rd ID is different forwarding flow table.If the inquiry mode that the 3rd ID identifies is identical with the inquiry mode that an ID identifies, illustrate that the first forwarding flow table and the second forwarding flow table are the forwarding flow tables with same queries mode in different inquiry phase.
Further, if the first flag of ID identifies the inquiry phase of service message, the second flag identifies the inquiry mode of service message, in the situation that the inquiry mode that the 3rd ID identifies is identical with the inquiry mode that an ID identifies, the one ID is different from the first flag of the 3rd ID, and the second flag is identical.In the situation that the inquiry mode that the 3rd ID identifies is not identical with the inquiry mode that an ID identifies, an ID is different from the first flag of the 3rd ID, and the second flag is not identical.
If the first deal with data of obtaining comprises: processing instruction obtains described processing instruction, and according to described processing instruction, processes described service message in described coupling list item.
That is to say, processor 801 comprises in the first deal with data of obtaining: during processing instruction, the first forwarding flow table is last forwarding flow table of forwarding service message, now, the processing instruction that processor 801 can comprise according to the first deal with data of obtaining, process service message, thus the forwarding of finishing service message.
Further, described processor 801, also for determining that described the first forwarding flow table the list item that mates not matching with a described key, is sent to controller by described service message, so that described controller is determined the forwarding process of described service message.
Described receiver 805, for receiving the relevant information of the new list item of described the first forwarding flow table that described controller sends.
The embodiment of the present invention provides a kind of forwarding unit, obtains an ID of service message, determines that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, determine inquiry phase that a described ID identifies higher than the inquiry phase identifying at a described ID before, during inquiry phase that the 2nd ID obtaining identifies, according to an ID, determine the first forwarding flow table, the inquiry mode of described the first forwarding flow table that the one ID identifies, obtain a key, according to a key, search the first forwarding flow table, if determine in described the first forwarding flow table and have the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.Like this, forwarding unit is when receiving service message, can obtain an ID of this service message, thereby can determine the inquiry phase whether inquiry phase that an ID identifies identifies higher than the 2nd ID obtaining before identifying inquiry phase at an ID, when having determined the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID obtaining before an ID identifies inquiry phase, according to an ID, determine the first forwarding flow table, and forward according to the first forwarding flow table.Thereby in service message repeating process, the forwarding flow table that guarantees different inquiry phase is only queried once, and then when carrying out service message forwarding, ensure the normal forwarding of service message, and without the order of using extra mechanism to search, thereby reduced the complexity of forwarding service message.
As shown in Figure 9, it is the structural representation of a kind of controller provided by the invention, shown in figure 9, this controller comprises: processor (processor) 901, communication interface (Communications Interface) 902, memory (memory) 903, communication bus 904, reflector 905 and receiver 906; Wherein, described processor 901, described communication interface 902, described receiver 906, described reflector 905 and described memory 903 complete mutual communicating by letter by described communication bus 904.
Processor 901 can be a central processor CPU, or specific integrated circuit ASIC(Application Specific Integrated Circuit), or be configured to implement one or more integrated circuits of the embodiment of the present invention.
Memory 903 is for depositing program code, and described program code comprises computer-managed instruction.Memory 903 may comprise high-speed RAM memory, also may also comprise nonvolatile memory (non-volatile memory), for example at least one magnetic disc store.Processor 901 is for calling the program code of memory 903.Be specially:
Processor 901, for obtaining the first sign ID of described service message.
Wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message.
Concrete, processor 901, specifically for receiving service message by incoming interface, and resolves service message, obtains an ID of service message.Now, an ID who obtains is that service message carries out in repeating process, the relevant ID of first forwarding flow table searching to needs.
Or, can obtain by the forwarding flow table of a upper inquiry phase ID.
Further, the inquiry mode that a described ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
Wherein, matched and searched comprises arbitrarily: IPv4(Internet Protocol Version4, Internet Protocol version 4) any matched and searched of service message and IPv6(Internet Protocol Version6, Internet Protocol version 6) any matched and searched of service message.
The longest matched and searched comprises: the longest matched and searched of IPv4 service message and the longest matched and searched of IPv6 service message.
Exact-match lookup comprises: the exact-match lookup of the exact-match lookup of IPv4 service message and IPv6 service message.
It should be noted that, the inquiry mode that an ID marks, goes back other modes, and the present invention does not limit this.
Further, ID identifies the inquiry phase of described service message and the method for inquiry mode can be by the inquiry phase of the first flag indicating services report message of ID, by the second flag indication inquiry mode of ID.
Processor 901, also for determining that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies.
It should be noted that, determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, be and determine that whether inquiry phase that an ID identifies is before the inquiry phase identifying at a described ID, the inquiry phase after the inquiry phase that the 2nd ID obtaining identifies.
Concrete, described processor 901, specifically for by resolving service message, while obtaining an ID of service message, the inquiry phase that the 2nd ID identifies is for empty, determines the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID.
At processor 901, by forwarding flow table, obtain an ID, ID corresponding to forwarding flow table that records an ID is the 2nd ID, needs to determine that whether inquiry phase that an ID identifies is the inquiry phase after the inquiry phase that identifies of the 2nd ID.
Wherein, if the inquiry phase after the inquiry phase that the inquiry phase that an ID identifies is the 2nd ID to be identified can be determined the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID.If the inquiry phase after the inquiry phase that the inquiry phase that an ID identifies is not the 2nd ID to be identified, can determine the inquiry phase that inquiry phase that an ID identifies or not higher than the 2nd ID.
Described processor 901, if also for determining inquiry phase that a described ID identifies higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table.
It should be noted that, because ID can identify inquiry phase and the inquiry mode that business E-Packets, an ID can identify the first inquiry phase and first inquiry mode of service message.The only corresponding forwarding flow table of each inquiry mode in each inquiry phase, so, can be by the unique first forwarding flow table of determining of an ID.
Described processor 901, also the inquiry mode for identifying according to a described ID, obtains the first keyword key.
Concrete, described processor 901, specifically for after obtaining an ID, the inquiry mode identifying according to an ID obtains a key corresponding to inquiry mode identifying with an ID from service message.
Exemplary, if this service message is IPv4 service message, and the inquiry mode that an ID identifies is any matched and searched, the required key of matched and searched is five-tuple arbitrarily, comprising: source IP address (SrcIP), object IP address (DstIP), source port number (SrcPort), destination slogan (DstPort) and protocol number (Protocol).When acquiring unit 401 is determined inquiry mode that an ID identifies and is any matched and searched, from service message, obtain a key corresponding to inquiry mode identifying with an ID, be the five-tuple obtaining as a key from service message, comprise: source IP address, object IP address, source port number, destination slogan and protocol number.
Described processor 901, also, for according to a described key, searches the first forwarding flow table, determines in described the first forwarding flow table, whether there is the list item that mates matching with a described key.
As above described in example, the key that processor 901 obtains is five-tuple, comprise: source IP address, object IP address, source port number, destination slogan and protocol number, can inquire about the first forwarding flow table according to five-tuple, thereby determine in the first forwarding flow table whether have the list item that mates matching with a key who obtains from service message.Be and determine in the first forwarding flow table whether have the list item that mates matching with the five-tuple obtaining from service message.
Further, according to a key, search the first forwarding flow table, if find the list item matching with a key in the first forwarding flow table, illustrate in the first forwarding flow table and have coupling list item.If do not find the list item matching with a key in the first forwarding flow table, illustrate in the first forwarding flow table and do not mate list item.
Processor 901, also at described the first forwarding flow table, do not match with a described key mate list item time, according to described service message, in described the first forwarding flow table, set up the new list item matching with a described key.
Wherein, in described new list item, record the first deal with data.
Concrete, whether processor 901 is last forwarding flow table difference of forwarding service message according to the first forwarding flow table, the process of setting up new list item is different.Wherein,
At described the first forwarding flow table, be not in the repeating process at service message, during last forwarding flow table of searching while forwarding described service message, described the first deal with data comprises: the 3rd ID of described service message.
Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
The list item concrete, processor 901 does not match with a key in the list item of determining the first forwarding flow table, illustrates that existing forwarding flow table do not support the forwarding of this service message.Now, processor 901 passes through to resolve service message, knows the configuration information of service message, thereby can be informed in and search after the first forwarding flow table according to the configuration information of service message, and the ID of the next inquiry phase that need to carry out, is and knows the 3rd ID.Processor 901 is set up the list item that mates matching with a key in the first forwarding flow table, and the first deal with data using the 3rd ID as coupling list item, is recorded in coupling list item.
Further, the inquiry phase that the inquiry phase that the 3rd ID identifies identifies higher than an ID.
At described the first forwarding flow table, be in the repeating process at service message, during last forwarding flow table of searching while forwarding described service message, described the first deal with data comprises: processing instruction.
The list item concrete, processor 901 does not match with a key in the list item of determining the first forwarding flow table, illustrates that existing forwarding flow table do not support the forwarding of this service message.Now, processor 901 is according to service message, know the configuration information of service message, thereby can be according to the configuration information of service message, know that the first forwarding flow table is in the repeating process of service message, last forwarding flow table of searching while forwarding described service message, and know the processing instruction of processing service message.Now, processor 901 is set up the list item that mates matching with a key in the first forwarding flow table, and the first deal with data using processing instruction as coupling list item, is recorded in coupling list item.
Reflector 905, for the relevant information of the new list item of described the first forwarding flow table is sent to forwarding unit, so that described forwarding unit forwards described service message according to the new list item of described the first forwarding flow table.
Further, receiver 906, the service message sending for receiving forwarding unit.
Described processor 901, also, for resolving the described service message of described receiver 906 receptions, obtains the configuration information of described service message.
Wherein, in described configuration information, identify the repeating process that forwards described service message.
Now, processor 901, is specially for obtaining the first sign ID of described service message: described processor 901, specifically for according to the configuration information of described service message, obtains the first sign ID of described service message.Or described processor 901, obtains an ID in the information specifically for the list item record at the 3rd forwarding flow table.
Further, processor 901 also, in the situation that definite described the first forwarding flow table has the list item that mates matching with a described key, obtains the first deal with data in described coupling list item, and according to described the first deal with data, process described service message.
Concrete, if the first forwarding flow table is not last forwarding flow table of forwarding service message, when the first deal with data comprises forwarding service message, the 3rd ID corresponding to next forwarding flow table that need to search.That is to say, the first deal with data comprises: identify after the inquiry phase of an ID sign, the ID of next inquiry phase, is the 3rd ID.
Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
If the first forwarding flow table is last forwarding flow table of forwarding service message, the first deal with data comprises: processing instruction.
Processor 901 is according to the difference of the first deal with data of obtaining, also different to the processing action of service message.
Described place processor 901, if comprise specifically for the first deal with data of obtaining: the 3rd ID of described service message obtains the 3rd ID of described service message in described coupling list item.Determine the inquiry phase whether inquiry phase that described the 3rd ID identifies identifies higher than an ID.In the situation that determine the inquiry phase that inquiry phase that described the 3rd ID identifies identifies higher than an ID, the 3rd ID according to described service message, determines the second forwarding flow table.The inquiry mode identifying according to described the 3rd ID, obtains the 2nd key.According to described the 2nd key, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key.And have the list item that mates matching with described the 2nd key in determining described the second forwarding flow table, in described coupling list item, obtain the second deal with data, and according to described the second deal with data, process described service message.
That is to say, processor 901 comprises in the first deal with data of obtaining: during the 3rd ID of described service message, explanation need to be carried out forwarding service message according to the 3rd ID, processor 901 triggers the flow process of carrying out forwarding service message according to the 3rd ID, concrete can, with reference to according to the process of an ID forwarding service message, not repeat them here.
Further, the inquiry mode that described the 3rd ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
Wherein, the inquiry mode that the 3rd ID identifies can be identical with the inquiry mode that an ID identifies.The inquiry phase identifying due to an ID is different from the inquiry phase that the 3rd ID identifies, so the second corresponding forwarding flow table of the first forwarding flow table corresponding from an ID and the 3rd ID is different forwarding flow table.If the inquiry mode that the 3rd ID identifies is identical with the inquiry mode that an ID identifies, illustrate that the first forwarding flow table and the second forwarding flow table are the forwarding flow tables with same queries mode in different inquiry phase.
Further, if the first flag of ID identifies the inquiry phase of service message, the second flag identifies the inquiry mode of service message, in the situation that the inquiry mode that the 3rd ID identifies is identical with the inquiry mode that an ID identifies, the one ID is different from the first flag of the 3rd ID, and the second flag is identical.In the situation that the inquiry mode that the 3rd ID identifies is not identical with the inquiry mode that an ID identifies, an ID is different from the first flag of the 3rd ID, and the second flag is not identical.
If the first deal with data of obtaining comprises: processing instruction obtains described processing instruction, and according to described processing instruction, processes described service message in described coupling list item.
That is to say, processor 901 comprises in the first deal with data of obtaining: during processing instruction, the first forwarding flow table is last forwarding flow table of forwarding service message, now, the processing instruction that processor 901 can comprise according to the first deal with data of obtaining, process service message, thus the forwarding of finishing service message.
The embodiment of the present invention provides a kind of controller, obtains an ID of service message, determines that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, determine inquiry phase that a described ID identifies higher than the inquiry phase identifying at a described ID before, during inquiry phase that the 2nd ID obtaining identifies, according to an ID, determine the first forwarding flow table, the inquiry mode of described the first forwarding flow table that the one ID identifies, obtain a key, according to a key, search the first forwarding flow table, the list item that mates not matching with a described key in described the first forwarding flow table if determine, according to described service message, in described the first forwarding flow table, set up the new list item matching with a described key, in described new list item, record the first deal with data, the relevant information of the new list item of described the first forwarding flow table is sent to forwarding unit, so that described forwarding unit forwards described service message according to the new list item of described the first forwarding flow table.Like this, controller set up match with a key mate list item before, need to first determine the inquiry phase whether inquiry phase that the ID that obtains identifies identifies higher than the 2nd ID obtaining before identifying inquiry phase at an ID, during inquiry phase that the inquiry phase only identifying at an ID identifies higher than the 2nd ID obtaining before an ID identifies inquiry phase, just in detecting the first forwarding flow table, there is no the occurrence matching with a key, set up the list item that mates matching with a key, and the relevant information of newly-established coupling list item is sent to forwarding unit, thereby in service message repeating process, the forwarding flow table that guarantees different inquiry phase is only queried once, and then when carrying out service message forwarding, ensure the normal forwarding of service message, and without the order of using extra mechanism to search, thereby reduced the complexity of forwarding service message.
The embodiment of the present invention provides a kind of system of message repeating, as shown in figure 10, comprising: forwarding unit 1001 and controller 1002.
Wherein, described forwarding unit 1001 is the forwarding unit described in above-described embodiment.
Described controller 1002 is the controller described in above-described embodiment.
The embodiment of the present invention provides a kind of method, Apparatus and system of message repeating, forwarding unit obtains an ID of service message, determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies, determine inquiry phase that a described ID identifies higher than the inquiry phase identifying at a described ID before, during inquiry phase that the 2nd ID obtaining identifies, according to an ID, determine the first forwarding flow table, the inquiry mode of described the first forwarding flow table that the one ID identifies, obtain a key, according to a key, search the first forwarding flow table, if determine in described the first forwarding flow table and have the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.The list item that mates not matching with a key in the first forwarding flow table if determine, is sent to controller by service message, by controller, obtains the relevant forwarding information of this service message.Like this, forwarding unit is when receiving service message, can obtain an ID of this service message, thereby can determine the inquiry phase whether inquiry phase that an ID identifies identifies higher than the 2nd ID obtaining before identifying inquiry phase at an ID, when having determined the inquiry phase that inquiry phase that an ID identifies identifies higher than the 2nd ID obtaining before an ID identifies inquiry phase, according to an ID, determine the first forwarding flow table, and forward according to the first forwarding flow table.Thereby in service message repeating process, the forwarding flow table that guarantees different inquiry phase is only queried once, and then when carrying out service message forwarding, ensure the normal forwarding of service message, and without the order of using extra mechanism to search, thereby reduced the complexity of forwarding service message.And when receiving new service message, can be sent to controller, controller can be according to new service message, in forwarding flow table, set up corresponding new list item, and the relevant information of the list item of newly-established forwarding flow table is sent to forwarding unit, make forwarding unit according to this new business message of the information processing of recording in this list item, without the forwarding process of again writing forwarding unit, further reduce the complexity of forwarding service message, thereby improved the performance of system.
In the several embodiment that provide in the application, should be understood that, disclosed system, apparatus and method, can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described unit, be only that a kind of logic function is divided, during actual realization, can have other dividing mode, for example a plurality of unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit comprises, also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form that also can adopt hardware to add SFU software functional unit realizes.
The integrated unit that the above-mentioned form with SFU software functional unit realizes, can be stored in a computer read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, comprise some instructions with so that computer equipment (can be personal computer, server, or the network equipment etc.) carry out the part steps of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (Read-Only Memory, be called for short ROM), the various media that can be program code stored such as random access memory (Random Access Memory is called for short RAM), magnetic disc or CD.
Finally it should be noted that: above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or part technical characterictic is wherein equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (33)

1. a method for message repeating, is characterized in that, comprising:
The the first sign ID that obtains service message, wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message;
Determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies;
The inquiry phase that a described ID identifies if determine is higher than before the inquiry phase identifying at a described ID, and the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table;
The inquiry mode identifying according to a described ID, obtains the first keyword key;
According to a described key, search the first forwarding flow table, determine in described the first forwarding flow table, whether there is the list item that mates matching with a described key;
If determine in described the first forwarding flow table and have the list item that mates matching with a described key, obtain the first deal with data in described coupling list item, and according to described the first deal with data, process described service message.
2. method according to claim 1, is characterized in that, described the first deal with data comprises: the 3rd ID of described service message; Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase;
Describedly in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message and comprise:
In described coupling list item, obtain the 3rd ID of described service message;
Determine the inquiry phase whether inquiry phase that described the 3rd ID identifies identifies higher than an ID;
The inquiry phase that the inquiry phase that described the 3rd ID identifies if determine identifies higher than an ID,, according to the 3rd ID of described service message, determines the second forwarding flow table;
The inquiry mode identifying according to described the 3rd ID, obtains the 2nd key;
According to described the 2nd key, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key;
If determine in described the second forwarding flow table and have the list item that mates matching with described the 2nd key, obtain the second deal with data in described coupling list item, and according to described the second deal with data, process described service message.
3. method according to claim 2, is characterized in that, the inquiry mode that described the 3rd ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
4. method according to claim 1, is characterized in that, described the first deal with data comprises: processing instruction;
Describedly in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message and comprise:
In described coupling list item, obtain described processing instruction, and according to described processing instruction, process described service message.
5. according to the method described in claim 1-4 any one, it is characterized in that, also comprise:
The list item that mates not matching with a described key in described the first forwarding flow table if determine, is sent to controller by described service message, so that described controller is determined the forwarding process of described service message;
Receive the relevant information of the new list item of described the first forwarding flow table that described controller sends.
6. according to the method described in claim 1-5 any one, it is characterized in that, the inquiry mode that a described ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
7. a method for message repeating, is characterized in that, comprising:
The the first sign ID that obtains described service message, wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message;
Determine that whether inquiry phase that a described ID identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies;
The inquiry phase that a described ID identifies if determine is higher than before the inquiry phase identifying at a described ID, and the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table;
The inquiry mode of described the first forwarding flow table identifying according to a described ID, obtains the first keyword key;
According to a described key, search the first forwarding flow table, determine in described the first forwarding flow table, whether there is the list item that mates matching with a described key;
The list item that mates not matching with a described key in described the first forwarding flow table if determine according to described service message, is set up the new list item matching with a described key in described the first forwarding flow table; In described new list item, record the first deal with data;
The relevant information of the new list item of described the first forwarding flow table is sent to forwarding unit, so that described forwarding unit forwards described service message according to the new list item of described the first forwarding flow table.
8. method according to claim 7, it is characterized in that, at described the first forwarding flow table, be not in the repeating process at service message, during last forwarding flow table of searching while forwarding described service message, described the first deal with data comprises: the 3rd ID of described service message; Described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
9. method according to claim 7, is characterized in that, at described the first forwarding flow table, is in the repeating process at service message, and during last forwarding flow table of searching while forwarding described service message, described the first deal with data comprises: processing instruction.
10. according to the method described in claim 7-9 any one, it is characterized in that, described obtain service message first sign ID before, also comprise:
Receive the service message that forwarding unit sends;
Resolve described service message, obtain the configuration information of described service message; In described configuration information, identify the repeating process that forwards described service message.
11. methods according to claim 10, is characterized in that, described in obtain service message first sign ID comprise:
According to the configuration information of described service message, obtain the first sign ID of described service message.
12. according to the method described in claim 7-10 any one, it is characterized in that, described in obtain service message first sign ID comprise:
In the information of the list item record of the 3rd forwarding flow table, obtain an ID.
13. according to the method described in claim 7-12 any one, it is characterized in that, also comprises:
If determine in described the first forwarding flow table, there is the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.
14. methods according to claim 13, is characterized in that, described the first deal with data comprises: the 3rd ID of described service message;
Describedly in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message and comprise:
In described coupling list item, obtain the 3rd ID of described service message;
Determine the inquiry phase whether inquiry phase that described the 3rd ID identifies identifies higher than an ID;
The inquiry phase that the inquiry phase that described the 3rd ID identifies if determine identifies higher than an ID,, according to the 3rd ID of described service message, determines the second forwarding flow table;
The inquiry mode identifying according to described the 3rd ID, obtains the 2nd key;
According to described the 2nd key, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key;
If find coupling list item, in described coupling list item, obtain the second deal with data, and according to described the second deal with data, process described service message.
15. methods according to claim 14, is characterized in that, the inquiry mode that described the 3rd ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
16. methods according to claim 13, is characterized in that, described the first deal with data comprises: processing instruction;
Describedly in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message and comprise:
In described coupling list item, obtain described processing instruction, and according to described processing instruction, process described service message.
17. according to the method described in claim 7-16 any one, it is characterized in that, the inquiry mode that a described ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
18. 1 kinds of forwarding units, is characterized in that, comprising:
Acquiring unit, for obtaining the first sign ID of service message, wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message;
Determining unit, for determining that whether inquiry phase that a described ID that described acquiring unit obtains identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies;
Described determining unit, if also for determining inquiry phase that a described ID identifies higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table;
Described acquiring unit, also the inquiry mode for identifying according to a described ID, obtains the first keyword key;
Described determining unit, also the described key for obtaining according to described acquiring unit, searches the first forwarding flow table, determines in described the first forwarding flow table, whether there is the list item that mates matching with a described key;
Processing unit, be used in the situation that described determining unit determines that described the first forwarding flow table has the list item that mates matching with a described key, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.
19. forwarding units according to claim 18, is characterized in that, described the first deal with data comprises: the 3rd ID of described service message; Wherein, described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase;
Described processing unit obtains the 3rd ID of described service message in described coupling list item specifically for triggering described acquiring unit;
Trigger the inquiry phase whether inquiry phase that described the 3rd ID that described determining unit determines that described acquiring unit obtains identifies identifies higher than an ID;
Trigger described determining unit in the situation that determine the inquiry phase that inquiry phase that described the 3rd ID identifies identifies higher than an ID, the 3rd ID according to described service message, determines the second forwarding flow table;
Trigger the inquiry mode that described acquiring unit identifies according to described the 3rd ID, obtain the 2nd key;
Trigger described the 2nd key that described determining unit is obtained according to described acquiring unit, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key;
And determine in described the second forwarding flow table have the list item that mates matching with described the 2nd key in described determining unit, in described coupling list item, obtain the second deal with data, and according to described the second deal with data, process described service message.
20. forwarding units according to claim 18, is characterized in that, described the first deal with data comprises: processing instruction;
Described processing unit, specifically for obtain described processing instruction in described coupling list item, and according to described processing instruction, processes described service message.
21. according to the forwarding unit described in claim 18-20 any one, it is characterized in that, also comprises: receiving element;
Described processing unit, also for determining that in described determining unit described the first forwarding flow table the list item that mates not matching with a described key, described service message is sent to controller, so that described controller is determined the forwarding process of described service message;
Described receiving element, for receiving the relevant information of the new list item of described the first forwarding flow table that described controller sends.
22. according to the forwarding unit described in claim 18-21 any one, it is characterized in that, the inquiry mode that a described ID identifies comprises: matched and searched, or the longest matched and searched arbitrarily, or exact-match lookup, or linear list is searched.
23. 1 kinds of controllers, is characterized in that, comprising:
Acquiring unit, for obtaining the first sign ID of described service message, wherein, described ID is for identifying inquiry phase and the inquiry mode of described service message;
Determining unit, for determining that whether inquiry phase that a described ID that described acquiring unit obtains identifies is higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies;
Described determining unit, if also for determining inquiry phase that a described ID identifies higher than before the inquiry phase identifying at a described ID, the inquiry phase that the 2nd ID obtaining identifies,, according to a described ID, determines the first forwarding flow table;
Described acquiring unit, also, for the inquiry mode of described the first forwarding flow table of identifying according to a described ID, obtains the first keyword key;
Described determining unit, also the described key for obtaining according to described acquiring unit, searches the first forwarding flow table, determines in described the first forwarding flow table, whether there is the list item that mates matching with a described key;
Processing unit, in described determining unit, determine that described the first forwarding flow table do not match with a described key mate list item time, according to described service message, in described the first forwarding flow table, set up the new list item matching with a described key; In described new list item, record the first deal with data;
Transmitting element, for the relevant information of the new list item of described the first forwarding flow table is sent to forwarding unit, so that described forwarding unit forwards described service message according to the new list item of described the first forwarding flow table.
24. controllers according to claim 23, it is characterized in that, at described the first forwarding flow table, be not in the repeating process at service message, during last forwarding flow table of searching while forwarding described service message, described the first deal with data comprises: the 3rd ID of described service message; Described the 3rd ID is after the inquiry phase of sign the one ID sign, the ID of next inquiry phase.
25. controllers according to claim 23, is characterized in that, at described the first forwarding flow table, are in the repeating process at service message, and during last forwarding flow table of searching while forwarding described service message, described the first deal with data comprises: processing instruction.
26. according to the controller described in claim 23-25 any one, it is characterized in that, also comprises:
Receiving element, the service message sending for receiving forwarding unit;
Described acquiring unit, also, for resolving the described service message of described receiving element reception, obtains the configuration information of described service message; In described configuration information, identify the repeating process that forwards described service message.
27. controllers according to claim 26, is characterized in that,
Described acquiring unit, specifically for according to the configuration information of described service message, obtains the first sign ID of described service message.
28. according to the controller described in claim 23-26 any one, it is characterized in that,
Described acquiring unit, obtains an ID in the information specifically for the list item record at the 3rd forwarding flow table.
29. according to the controller described in claim 23-28 any one, it is characterized in that,
Described processing unit, also in described determining unit, determine described the first forwarding flow table have match with a described key mate list item time, in described coupling list item, obtain the first deal with data, and according to described the first deal with data, process described service message.
30. controllers according to claim 29, is characterized in that,
Described the first deal with data comprises: the 3rd ID of described service message;
Described processing unit obtains the 3rd ID of described service message in described coupling list item specifically for triggering described acquiring unit;
Trigger the inquiry phase whether inquiry phase that described the 3rd ID that described determining unit determines that described acquiring unit obtains identifies identifies higher than an ID;
Trigger described determining unit when determining the inquiry phase that inquiry phase that described the 3rd ID identifies identifies higher than an ID, the 3rd ID according to described service message, determines the second forwarding flow table;
Trigger the inquiry mode that described acquiring unit identifies according to described the 3rd ID, obtain the 2nd key;
Trigger described the 2nd key that described determining unit is obtained according to described acquiring unit, search the second forwarding flow table, determine in described the second forwarding flow table, whether there is the list item that mates matching with described the 2nd key;
And determine in described the second forwarding flow table have the list item that mates matching with described the 2nd key in described determining unit, in described coupling list item, obtain the second deal with data, and according to described the second deal with data, process described service message.
31. controllers according to claim 29, is characterized in that, described the first deal with data comprises: processing instruction;
Described processing unit, specifically for obtain described processing instruction in described coupling list item, and according to described processing instruction, processes described service message.
32. according to described in claim 23-31 any one controller, it is characterized in that, the inquiry mode that a described ID identifies comprises: arbitrarily matched and searched, or the longest matched and searched, or exact-match lookup, or linear list is searched.
The system of 33. 1 kinds of message repeatings, is characterized in that, comprising: turn method, apparatus and controller;
Described forwarding unit is the forwarding unit described in claim 18-22 any one; Described controller is the controller described in claim 23-32 any one.
CN201310493059.4A 2013-10-18 2013-10-18 The method of a kind of message forwarding, Apparatus and system Expired - Fee Related CN103581020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310493059.4A CN103581020B (en) 2013-10-18 2013-10-18 The method of a kind of message forwarding, Apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310493059.4A CN103581020B (en) 2013-10-18 2013-10-18 The method of a kind of message forwarding, Apparatus and system

Publications (2)

Publication Number Publication Date
CN103581020A true CN103581020A (en) 2014-02-12
CN103581020B CN103581020B (en) 2016-08-10

Family

ID=50051982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310493059.4A Expired - Fee Related CN103581020B (en) 2013-10-18 2013-10-18 The method of a kind of message forwarding, Apparatus and system

Country Status (1)

Country Link
CN (1) CN103581020B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015161780A1 (en) * 2014-04-21 2015-10-29 Hangzhou H3C Technologies Co., Ltd. Forwarding data packets
CN105490946A (en) * 2014-09-18 2016-04-13 中兴通讯股份有限公司 Flow table processing method and device, open flow controller, and open flow switch
CN105991444A (en) * 2015-08-06 2016-10-05 杭州迪普科技有限公司 Business processing method and business processing apparatus
CN107005478A (en) * 2014-12-09 2017-08-01 华为技术有限公司 A kind of processing method and processing device of adaptive flow table

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102164080A (en) * 2011-03-29 2011-08-24 华为技术有限公司 Routing address inquiry method and device
CN102546351A (en) * 2012-03-15 2012-07-04 北京邮电大学 System and method for interconnecting openflow network and conventional Internet protocol (IP) network
EP2544409A1 (en) * 2011-07-04 2013-01-09 Telefonaktiebolaget L M Ericsson AB (Publ) Generic monitoring packet handling mechanism for OpenFlow 1.1
WO2013031175A1 (en) * 2011-08-29 2013-03-07 Nec Corporation Communication system, control device, node, node control method, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102164080A (en) * 2011-03-29 2011-08-24 华为技术有限公司 Routing address inquiry method and device
EP2544409A1 (en) * 2011-07-04 2013-01-09 Telefonaktiebolaget L M Ericsson AB (Publ) Generic monitoring packet handling mechanism for OpenFlow 1.1
WO2013031175A1 (en) * 2011-08-29 2013-03-07 Nec Corporation Communication system, control device, node, node control method, and program
CN102546351A (en) * 2012-03-15 2012-07-04 北京邮电大学 System and method for interconnecting openflow network and conventional Internet protocol (IP) network

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015161780A1 (en) * 2014-04-21 2015-10-29 Hangzhou H3C Technologies Co., Ltd. Forwarding data packets
US10305801B2 (en) 2014-04-21 2019-05-28 Hewlett Packard Enterprise Development Lp Forwarding data packets
CN105490946A (en) * 2014-09-18 2016-04-13 中兴通讯股份有限公司 Flow table processing method and device, open flow controller, and open flow switch
CN107005478A (en) * 2014-12-09 2017-08-01 华为技术有限公司 A kind of processing method and processing device of adaptive flow table
US10485015B2 (en) 2014-12-09 2019-11-19 Huawei Technologies Co., Ltd. Method and apparatus for processing adaptive flow table
CN107005478B (en) * 2014-12-09 2020-05-08 华为技术有限公司 Adaptive flow table processing method and device
CN105991444A (en) * 2015-08-06 2016-10-05 杭州迪普科技有限公司 Business processing method and business processing apparatus
CN105991444B (en) * 2015-08-06 2019-05-07 杭州迪普科技股份有限公司 The method and apparatus of business processing

Also Published As

Publication number Publication date
CN103581020B (en) 2016-08-10

Similar Documents

Publication Publication Date Title
US9923819B2 (en) Systems and methods for routing information in an information handling system using extended L3 lookup tables
US9444743B2 (en) Network system, switch and connected terminal detection method
CN108259347B (en) Message transmission method and device
US20160352578A1 (en) System and method for adaptive paths locator for virtual network function links
CN111600797B (en) Data transmission method, node and system
CN113132503B (en) Address allocation method and device
CN103560951A (en) Message processing method and physical transmitting device
CN103581020A (en) Message forwarding method, message forwarding device and message forwarding system
CN105814843A (en) Method and apparatus for generating flow table
EP3534577B1 (en) Forwarding multicast packets through an extended bridge
CN104205745B (en) Method and device for processing message
CN103825824A (en) Message processing method and message processing device
US10142177B2 (en) Mechanisms to identify mismatches in layer 3 configuration in a network
CN105207904A (en) Message processing method, device and router
CN101577660B (en) Method and device for acquiring label forwarding list item and forwarding message
US20150109945A1 (en) On-demand transmission path providing system and method
CN112351050A (en) Method, device, communication equipment and storage medium for mirroring data stream
US20150109957A1 (en) Transmission path control system
CN103841083A (en) Method and apparatus for enhancing message identification capability
CN111125493B (en) High-speed data query system and method based on protocol non-perception forwarding
CN106059810B (en) Message notification method and system
CN112866208B (en) Table item configuration method, message processing method, device, equipment and storage medium
CN108418709B (en) Port aggregation method and device
CN104935505A (en) Message forwarding and assistance forwarding method and apparatus, and relay
CN111050339B (en) High-speed data updating system and method based on protocol non-perception forwarding

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160810

Termination date: 20171018