CN103581020B - The method of a kind of message forwarding, Apparatus and system - Google Patents

The method of a kind of message forwarding, Apparatus and system Download PDF

Info

Publication number
CN103581020B
CN103581020B CN201310493059.4A CN201310493059A CN103581020B CN 103581020 B CN103581020 B CN 103581020B CN 201310493059 A CN201310493059 A CN 201310493059A CN 103581020 B CN103581020 B CN 103581020B
Authority
CN
China
Prior art keywords
query
forwarding
identified
flow table
forwarding flow
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.)
Expired - Fee Related
Application number
CN201310493059.4A
Other languages
Chinese (zh)
Other versions
CN103581020A (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

Landscapes

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

Abstract

Embodiments provide method, device that a kind of message forwards, relate to the communications field, in order to improve the performance of system.Described method, including: obtain an ID of service message, determine whether the inquiry phase that a described ID identifies was higher than before the inquiry phase that an ID identifies, the inquiry phase that the 2nd ID of acquisition identifies;If it is determined that the inquiry phase that an ID identifies was higher than before the inquiry phase that an ID identifies, the inquiry phase that the 2nd ID of acquisition identifies, then according to an ID, determine the first forwarding flow table;The inquiry mode identified according to an ID, obtains a key;According to a key, search the first forwarding flow table, determine whether described first forwarding flow table has and mate list item with a described key matches;If it is determined that the first forwarding flow table has coupling list item, then in coupling list item, obtain the first process data, and process data according to first, process service message.

Description

Method, device and system for forwarding message
Technical Field
The present invention relates to the field of communications, and in particular, to a method, an apparatus, and a system for forwarding a packet.
Background
With the development of the mobile internet, users have more and more demands on services. To meet the needs of users, Software Defined Networking (SDN) is proposed. The core technology of the SDN is to separate a control plane and a forwarding plane of a network device by using OpenFlow (OpenFlow), thereby implementing flexible control of network traffic and providing a good platform for innovation of a core network and application. On the forwarding plane, an open control interface is provided for the control plane through hardware standardization and abstraction of forwarding capability, and an operator or a third party can conveniently control forwarding equipment, namely, the forwarding equipment is programmable for a user, so that new services can be rapidly developed.
OpenFlow is a protocol for providing an interface between a control plane and a forwarding plane of an SDN, and provides a standard way for controlling forwarding devices in the SDN. OpenFlow implements forwarding of the forwarding device based on the flow table.
In the prior art, because the identifier of the next flow table to be queried can be recorded in each flow table, the next flow table can be found according to the identifier. However, the identifier of the flow table is only used to identify the type of the flow table, and does not identify the query stage, and in order to satisfy the provision that only backward lookup can be performed in the OpenFlow protocol, an additional mechanism must be used to ensure the lookup sequence, thereby increasing the complexity of forwarding the service packet.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, and a system for forwarding a message, so as to ensure normal forwarding of a service message and reduce complexity of forwarding the service message when forwarding the service message.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for forwarding a packet, including: acquiring a first identification ID of a service message, wherein the ID is used for identifying an inquiry stage and an inquiry mode of the service message; determining whether the query phase identified by the first ID is higher than the query phase identified by a second ID obtained before the query phase identified by the first ID; if the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, determining a first forwarding flow table according to the first ID; acquiring a first keyword key according to the query mode identified by the first ID; searching a 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; if the first forwarding flow table is determined to have a matching table entry matched with the first key, first processing data is obtained from the matching table entry, and the service message is processed according to the first processing data.
In a first possible implementation manner of the first aspect, the first processing data includes: a third ID of the service packet; wherein the third ID is the ID of the next query stage after the query stage identified by the first ID; the obtaining of the first processing data from the matching table entry, and according to the first processing data, processing the service packet includes: acquiring a third ID of the service message from the matching table entry; determining whether the query phase identified by the third ID is higher than the query phase identified by the first ID; if the query stage identified by the third ID is higher than the query stage identified by the first ID, determining a second forwarding flow table according to the third ID of the service message; acquiring a second key according to the query mode identified by the third ID; searching a second forwarding flow table according to the second key, and determining whether a matching table item matched with the second key exists in the second forwarding flow table; if the second forwarding flow table is determined to have a matching table entry matched with the second key, second processing data is obtained from the matching table entry, and the service message is processed according to the second processing data.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the querying manner identified by the third ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the first processing data includes: processing the instruction; the obtaining of the first processing data from the matching table entry, and according to the first processing data, processing the service packet includes: and acquiring the processing instruction from the matching table entry, and processing the service message according to the processing instruction.
With reference to the first aspect, or any one of the first to third possible implementation manners of the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes: if it is determined that there is no matching entry matched with the first key in the first forwarding flow table, sending the service message to a controller, so that the controller determines a forwarding flow of the service message; and receiving the related information of the new entry of the first forwarding flow table sent by the controller.
With reference to the first aspect or any one of the first to fourth possible implementation manners of the first aspect, in a fifth possible implementation manner of the first aspect, the query manner identified by the first ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
In a second aspect, an embodiment of the present invention provides a method for forwarding a packet, including: acquiring a first identification ID of the service message, wherein the ID is used for identifying the query stage and the query mode of the service message; determining whether the query phase identified by the first ID is higher than the query phase identified by a second ID obtained before the query phase identified by the first ID; if the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, determining a first forwarding flow table according to the first ID; acquiring a first keyword key according to the query mode of the first forwarding flow table identified by the first ID; searching a 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; if it is determined that there is no matching entry matching the first key in the first forwarding flow table, establishing a new entry matching the first key in the first forwarding flow table according to the service packet; first processing data is recorded in the new table entry; and sending the related information of the new entry of the first forwarding flow table to forwarding equipment, so that the forwarding equipment forwards the service message according to the new entry of the first forwarding flow table.
In a first possible implementation manner of the second aspect, when the first forwarding flow table is not a last forwarding flow table searched when the service packet is forwarded in a forwarding process of the service packet, the first processing data includes: a third ID of the service packet; the third ID is the ID that identifies the next query phase after the query phase identified by the first ID.
With reference to the second aspect, in a second possible implementation manner of the second aspect, when the first forwarding flow table is a last forwarding flow table searched when the service packet is forwarded in a forwarding process of the service packet, the first processing data includes: the instructions are processed.
With reference to the second aspect, or the first or second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, before the obtaining the first identifier ID of the service packet, the method further includes: receiving a service message sent by forwarding equipment; analyzing the service message, and acquiring configuration information of the service message; and identifying the forwarding process of forwarding the service message in the configuration information.
With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the obtaining the first identifier ID of the service packet includes: and acquiring a first identification ID of the service message according to the configuration information of the service message.
With reference to the second aspect, or any one of the first to fourth possible implementation manners of the second aspect, in a fifth possible implementation manner of the second aspect, the obtaining the first identifier ID of the service packet includes: and acquiring the first ID in the information recorded in the table entry of the third forwarding flow table.
With reference to the second aspect, or any one of the first to fifth possible implementation manners of the second aspect, in a sixth possible implementation manner of the second aspect, the method further includes: if the matching table entry matched with the first key is determined in the first forwarding flow table, first processing data is obtained from the matching table entry, and the service message is processed according to the first processing data.
With reference to the sixth possible implementation manner of the second aspect, in a seventh possible implementation manner of the second aspect, the first processing data includes: a third ID of the service packet; the obtaining of the first processing data from the matching table entry, and according to the first processing data, processing the service packet includes: acquiring a third ID of the service message from the matching table entry; determining whether the query phase identified by the third ID is higher than the query phase identified by the first ID; if the query stage identified by the third ID is higher than the query stage identified by the first ID, determining a second forwarding flow table according to the third ID of the service message; acquiring a second key according to the query mode identified by the third ID; searching a second forwarding flow table according to the second key, and determining whether a matching table item matched with the second key exists in the second forwarding flow table; and if the matched table entry is found, acquiring second processing data in the matched table entry, and processing the service message according to the second processing data.
With reference to the seventh possible implementation manner of the second aspect, in an eighth possible implementation manner of the second aspect, the query manner identified by the third ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
With reference to the sixth possible implementation manner of the second aspect, in a ninth possible implementation manner of the second aspect, the first processing data includes: processing the instruction; the obtaining of the first processing data from the matching table entry, and according to the first processing data, processing the service packet includes: and acquiring the processing instruction from the matching table entry, and processing the service message according to the processing instruction.
With reference to the second aspect, or any one of the first to ninth possible implementation manners of the second aspect, in a tenth possible implementation manner of the second aspect, the query manner identified by the first ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
In a third aspect, an embodiment of the present invention provides a forwarding device, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first identification ID of a service message, and the ID is used for identifying the query stage and the query mode of the service message; a determining unit, configured to determine whether the query phase identified by the first ID acquired by the acquiring unit is higher than a query phase identified by a second ID acquired before the query phase identified by the first ID; the determining unit is further configured to determine a first forwarding flow table according to the first ID if it is determined that the query stage identified by the first ID is higher than the query stage identified by the second ID obtained before the query stage identified by the first ID; the acquiring unit is further configured to acquire a first keyword key according to the query mode identified by the first ID; the determining unit is further configured to search a first forwarding flow table according to the first key acquired by the acquiring unit, and determine whether a matching entry matching the first key exists in the first forwarding flow table; and the processing unit is used for acquiring first processing data from the matching table entry under the condition that the determining unit determines that the first forwarding flow table has the matching table entry matched with the first key, and processing the service message according to the first processing data.
In a first possible implementation manner of the third aspect, the first processing data includes: a third ID of the service packet; wherein the third ID is the ID of the next query stage after the query stage identified by the first ID; the processing unit is specifically configured to trigger the obtaining unit to obtain a third ID of the service packet in the matching entry; triggering the determining unit to determine whether the query phase identified by the third ID acquired by the acquiring unit is higher than the query phase identified by the first ID; triggering the determining unit to determine a second forwarding flow table according to the third ID of the service packet under the condition that the query stage identified by the third ID is higher than the query stage identified by the first ID; triggering the acquisition unit to acquire a second key according to the query mode identified by the third ID; triggering the determining unit to search a second forwarding flow table according to the second key acquired by the acquiring unit, and determining whether a matching table entry matched with the second key exists in the second forwarding flow table; and if the determining unit determines that the second forwarding flow table has a matching table entry matched with the second key, acquiring second processing data from the matching table entry, and processing the service packet according to the second processing data.
With reference to the third aspect, in a second possible implementation manner of the third aspect, the first processing data includes: processing the instruction; the processing unit is specifically configured to obtain the processing instruction from the matching entry, and process the service packet according to the processing instruction.
With reference to the third aspect, or the first or second possible implementation manner of the third aspect, in a third possible implementation manner of the third aspect, the method further includes: a receiving unit; the processing unit is further configured to, if the determining unit determines that there is no matching entry matching the first key in the first forwarding flow table, send the service packet to a controller, so that the controller determines a forwarding flow of the service packet; the receiving unit is configured to receive the relevant information of the new entry of the first forwarding flow table sent by the controller.
With reference to the third aspect, or any one of the first to third possible implementation manners of the third aspect, in a fourth possible implementation manner of the third aspect, the querying manner identified by the first ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
In a fourth aspect, an embodiment of the present invention provides a controller, including: an obtaining unit, configured to obtain a first identifier ID of the service packet, where the ID is used to identify an inquiry stage and an inquiry mode of the service packet; a determining unit, configured to determine whether the query phase identified by the first ID acquired by the acquiring unit is higher than a query phase identified by a second ID acquired before the query phase identified by the first ID; the determining unit is further configured to determine a first forwarding flow table according to the first ID if it is determined that the query stage identified by the first ID is higher than the query stage identified by the second ID obtained before the query stage identified by the first ID; the obtaining unit is further configured to obtain a first keyword key according to the query mode of the first forwarding flow table identified by the first ID; the determining unit is further configured to search a first forwarding flow table according to the first key acquired by the acquiring unit, and determine whether a matching entry matching the first key exists in the first forwarding flow table; the processing unit is configured to, when the determining unit determines that there is no matching entry matching the first key in the first forwarding flow table, establish a new entry matching the first key in the first forwarding flow table according to the service packet; first processing data is recorded in the new table entry; a sending unit, configured to send relevant information of the new entry of the first forwarding flow table to a forwarding device, so that the forwarding device forwards the service packet according to the new entry of the first forwarding flow table.
In a first possible implementation manner of the fourth aspect, when the first forwarding flow table is not a last forwarding flow table searched when the service packet is forwarded in a forwarding process of the service packet, the first processing data includes: a third ID of the service packet; the third ID is the ID that identifies the next query phase after the query phase identified by the first ID.
With reference to the fourth aspect, in a second possible implementation manner of the fourth aspect, when the first forwarding flow table is a last forwarding flow table searched when the service packet is forwarded in a forwarding process of the service packet, the first processing data includes: the instructions are processed.
With reference to the fourth aspect, or the first or second possible implementation manner of the fourth aspect, in a third possible implementation manner of the fourth aspect, the method further includes: a receiving unit, configured to receive a service packet sent by a forwarding device; the acquiring unit is further configured to analyze the service packet received by the receiving unit, and acquire configuration information of the service packet; and identifying the forwarding process of forwarding the service message in the configuration information.
With reference to the third possible implementation manner of the fourth aspect, in a fourth possible implementation manner of the fourth aspect, the obtaining unit is specifically configured to obtain the first identifier ID of the service packet according to the configuration information of the service packet.
With reference to the fourth aspect or any one of the first to third possible implementation manners of the fourth aspect, in a fifth possible implementation manner of the fourth aspect, the obtaining unit is specifically configured to obtain the first ID from information recorded in an entry of the third forwarding flow table.
With reference to the fourth aspect or any one of the first to fifth possible implementation manners of the fourth aspect, in a sixth possible implementation manner of the fourth aspect, the processing unit is further configured to, when the determining unit determines that there is a matching entry matching the first key in the first forwarding flow table, obtain first processing data in the matching entry, and process the service packet according to the first processing data.
With reference to the sixth possible implementation manner of the fourth aspect, in a seventh possible implementation manner of the fourth aspect, the first processing data includes: a third ID of the service packet; the processing unit is specifically configured to trigger the obtaining unit to obtain a third ID of the service packet in the matching entry; triggering the determining unit to determine whether the query phase identified by the third ID acquired by the acquiring unit is higher than the query phase identified by the first ID; triggering the determining unit to determine a second forwarding flow table according to the third ID of the service packet when determining that the query stage identified by the third ID is higher than the query stage identified by the first ID; triggering the acquisition unit to acquire a second key according to the query mode identified by the third ID; triggering the determining unit to search a second forwarding flow table according to the second key acquired by the acquiring unit, and determining whether a matching table entry matched with the second key exists in the second forwarding flow table; and if the determining unit determines that the second forwarding flow table has a matching table entry matched with the second key, acquiring second processing data from the matching table entry, and processing the service packet according to the second processing data.
With reference to the sixth possible implementation manner of the fourth aspect, in an eighth possible implementation manner of the fourth aspect, the first processing data includes: processing the instruction; the processing unit is specifically configured to obtain the processing instruction from the matching entry, and process the service packet according to the processing instruction.
With reference to the fourth aspect or any one of the first to eighth possible implementation manners of the fourth aspect, in a ninth possible implementation manner of the fourth aspect, the query manner identified by the first ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
In a fifth aspect, an embodiment of the present invention provides a system for forwarding a packet, where the system includes: a forwarding device and a controller; the forwarding device is the forwarding device described in the above embodiment; the controller is the controller described in the above embodiments.
The embodiment of the invention provides a method, a device and a system for forwarding a message, which are used for acquiring a first ID of a service message, and determining whether an inquiry stage identified by the first ID is higher than an inquiry stage identified by a second ID acquired before the inquiry stage identified by the first ID; when the query stage identified by the first ID is higher than the query stage identified by the first ID and the query stage identified by the second ID is obtained before the query stage identified by the first ID, determining a first forwarding flow table according to the first ID, obtaining a first key according to the query mode of the first forwarding flow table identified by the first ID, searching the first forwarding flow table according to the first key, if the first forwarding flow table is determined to have a matching table entry matched with the first key, obtaining first processing data from the matching table entry, and processing the service message according to the first processing data. Therefore, when the forwarding device receives the service message, the forwarding device can acquire the first ID of the service message, so that whether the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID can be determined, and when the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, the forwarding device determines the first forwarding flow table according to the first ID and forwards the service message according to the first forwarding flow table. Therefore, in the process of forwarding the service message, the forwarding flow tables at different query stages are ensured to be queried only once, so that the normal forwarding of the service message is ensured when the service message is forwarded, and the searching sequence is ensured without using an additional mechanism, thereby reducing the complexity of forwarding the service message.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for forwarding a packet according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another method for forwarding a packet according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating another method for forwarding a packet according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of functions of a forwarding device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of functions of another forwarding device according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating the functionality of a controller according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of the functionality of another controller provided by an embodiment of the present invention;
fig. 8 is a schematic diagram of a structure of a forwarding device according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a structure of a controller according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a message forwarding system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a method for forwarding a packet, as shown in fig. 1, including:
101. and acquiring a first identification ID of the service message.
Wherein, the ID is used for identifying the query stage and the query mode of the service message.
Specifically, there are two situations when the forwarding device obtains the first ID of the service packet, which are as follows:
if the forwarding device receives the service message through the input interface, the forwarding device needs to analyze the service message at this time, so as to obtain the first ID of the service message. At this time, the first ID acquired by the forwarding device is an ID related to the first forwarding flow table to be searched in the process of forwarding the service packet.
If the forwarding device has already performed partial forwarding through the forwarding flow table before acquiring the first ID, at this time, the forwarding device may acquire the first ID through the forwarding flow table in the previous query stage.
Further, the query mode identified by the first ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
Wherein the arbitrary matching search comprises: the random matching search of the IPv4 (Internet Protocol Version4, fourth Version Internet Protocol) service packet and the random matching search of the IPv6 (Internet Protocol Version6, sixth Version Internet Protocol) service packet.
The longest match lookup includes: the longest matching search of the IPv4 service message and the longest matching search of the IPv6 service message.
The exact match lookup includes: and the accurate matching search of the IPv4 service message and the accurate matching search of the IPv6 service message.
It should be noted that the query mode marked by the first ID may also be other modes, and the present invention is not limited to this.
Furthermore, the method for identifying the query stage and the query mode of the service packet by the ID may be to indicate the first identification bit of the ID to the query stage of the service packet and indicate the second identification bit of the ID to the query mode.
For example, when the first identification bit of the first ID is 1, it indicates that the query stage is the first query stage, and when the second identification bit is 0, it indicates that the query mode is any matching lookup of the IPv4 service packet. When the second identification bit is 1, the indication query mode is any matching search of the IPv6 service message, and when the second identification bit is 2, the indication query mode is the longest matching search of the IPv4 service message. And when the second identification bit is 3, indicating that the query mode is the longest match search of the IPv6 service message. And when the second identification bit is 4, indicating that the query mode is the accurate matching search of the IPv4 service message. And when the second identification bit is 5, indicating that the query mode is the accurate matching search of the IPv6 service message. And when the second identification bit is 6, indicating that the query mode is that the service message is searched by a linear table.
102. Determining whether the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID.
Specifically, after the forwarding device obtains the first ID, it may obtain an inquiry stage identified by the first ID, and compare the inquiry stage identified by the first ID with an inquiry stage identified by the second ID obtained before the inquiry stage identified by the first ID, so as to determine that the inquiry stage that the forwarding device needs to perform at present is not the inquiry stage that has already been inquired.
It should be noted that, determining whether the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID, is to determine whether the query phase identified by the first ID is a query phase after the query phase identified by the second ID obtained before the query phase identified by the first ID.
Further, if the forwarding device obtains the first ID of the service packet by parsing the service packet, and the forwarding device does not forward the service packet at this time, the query phase identified by the second ID is set to null, and the query phase identified by the first ID is necessarily higher than the query phase identified by the second ID by the forwarding device at this time.
And if the forwarding device acquires the first ID through the forwarding flow table, recording the ID corresponding to the forwarding flow table of the first ID as a second ID. At this time, the forwarding device needs to determine whether the query phase identified by the first ID is a query phase after the query phase identified by the second ID.
If the query phase identified by the first ID is a query phase after the query phase identified by the second ID, the forwarding device may determine that the query phase identified by the first ID is higher than the query phase identified by the second ID. If the query phase identified by the first ID is not the query phase after the query phase identified by the second ID, the forwarding device may determine that the query phase identified by the first ID is not higher than the query phase identified by the second ID.
As an example, it is assumed that the forwarding process that the service packet needs to pass through is flow classification, three-layer forwarding, and two-layer forwarding. The flow classification is a first query phase, the three-layer forwarding is a second query phase, and the two-layer forwarding is a third query phase. If the forwarding device obtains the first ID of the service packet by parsing the service packet, the query stage identified by the first ID is a flow classification, which is the first query stage. Because the forwarding device obtains the first ID of the service packet by analyzing the service packet, and the query phase identified by the second ID obtained by the forwarding device is empty at this time, the forwarding device can detect whether the query phase identified by the first ID is higher than the query phase identified by the second ID.
If the query phase identified by the second ID is a flow classification, that is, a first query phase, and if the query phase identified by the first ID acquired by the forwarding device is three-layer forwarding, that is, a second query phase, the forwarding device may determine whether the query phase identified by the first ID is higher than the query phase identified by the first ID, and acquire the query phase identified by the second ID, that is, determine whether the query phase identified by the first ID is higher than the query phase identified by the second ID acquired before the query phase identified by the first ID.
103. And if the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, determining a first forwarding flow table according to the first ID.
Specifically, after determining that the query phase identified by the first ID is higher than the query phase identified by the first ID and the obtained query phase identified by the second ID, the forwarding device may determine, according to the first ID, a first forwarding flow table corresponding to the first ID.
It should be noted that, since the ID can identify the query stage and the query mode of the service forwarding packet, the first ID can identify the first query stage and the first query mode of the service packet. In each query stage, each query mode only corresponds to one forwarding flow table, so that the first forwarding flow table can be uniquely determined through the first ID.
104. And acquiring a first keyword key according to the query mode identified by the first ID.
Specifically, after determining the first ID, the forwarding device obtains, from the service message, a first key corresponding to the query mode identified by the first ID according to the query mode identified by the first ID.
Illustratively, if the service packet is an IPv4 service packet, and the query mode identified by the first ID is any matching lookup, the first key required by any matching lookup is a quintuple, including: source IP address (SrcIP), destination IP address (DstIP), source port number (SrcPort), destination port number (DstPort), and Protocol number (Protocol). When the forwarding device determines that the query mode identified by the first ID is any matching search, the forwarding device obtains a first key corresponding to the query mode identified by the first ID from the service message, that is, obtains a quintuple as the first key from the service message, and includes: a source IP address, a destination IP address, a source port number, a destination port number, and a protocol number.
105. And searching a first forwarding flow table according to the first key, and determining whether a matching table entry exists in the first forwarding flow table.
Specifically, after the forwarding device obtains the first key, the forwarding device may search the first forwarding flow table according to the key, so as to determine whether there is a matching entry in the first forwarding flow table.
As described in the above example, the first key obtained by the forwarding device is a five-tuple, and includes: and querying the first forwarding flow table according to the quintuple so as to determine whether a matching table item matched with the first key acquired from the service message exists in the first forwarding flow table. That is, it is determined whether there is a matching entry in the first forwarding flow table that matches the quintuple obtained from the service message.
Further, a first forwarding flow table is searched according to the first key, and if an entry matched with the first key is found in the first forwarding flow table, it is indicated that a matched entry exists in the first forwarding flow table. And if the entry matched with the first key is not found in the first forwarding flow table, indicating that no matched entry exists in the first forwarding flow table.
106. If the first forwarding flow table is determined to have a matching table entry matched with the first key, first processing data is obtained from the matching table entry, and the service message is processed according to the first processing data.
Specifically, when it is determined that the first forwarding flow table has a matching entry matching the first key, the forwarding device may obtain the first processing data from the matching entry. If the first forwarding flow table is not the last forwarding flow table for forwarding the service packet, the first processing data includes a third ID corresponding to a next forwarding flow table to be searched when the service packet is forwarded. That is, the first processing data includes: and after the query stage identified by the first ID is identified, the ID of the next query stage is the third ID.
Wherein the third ID is an ID identifying a next query phase after the query phase identified by the first ID.
If the first forwarding flow table is the last forwarding flow table for forwarding the service packet, the first processing data includes: the instructions are processed.
The forwarding device processes the service message differently according to different contents of the acquired first processing data.
If the first processing data acquired from the forwarding device includes: if the third ID of the service packet is the first processing data, the acquiring the first processing data from the matching entry, and processing the service packet according to the first processing data includes: acquiring a third ID of the service message from the matching table entry; determining whether the query phase identified by the third ID is higher than the query phase identified by the first ID; if the query stage identified by the third ID is higher than the query stage identified by the first ID, determining a second forwarding flow table according to the third ID of the service message; acquiring a second key according to the query mode identified by the third ID; searching a second forwarding flow table according to the second key, and determining whether a matching table item matched with the second key exists in the second forwarding flow table; and if the matched table entry is found, acquiring second processing data in the matched table entry, and processing the service message according to the second processing data.
That is, the first processing data that the forwarding device is acquiring includes: when the third ID of the service packet indicates that the forwarding device needs to forward the service packet according to the third ID, the forwarding device performs a process of forwarding the service packet according to the third ID, which may specifically refer to a process of forwarding the service packet by the forwarding device according to the first ID, and is not described herein again.
Further, the query manner identified by the third ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
The query mode identified by the third ID may be the same as the query mode identified by the first ID. Since the query phase identified by the first ID is different from the query phase identified by the third ID, the first forwarding flow table corresponding to the first ID and the second forwarding flow table corresponding to the third ID are different forwarding flow tables. If the query mode identified by the third ID is the same as the query mode identified by the first ID, it is determined that the first forwarding flow table and the second forwarding flow table are forwarding flow tables having the same query mode in different query stages.
Further, if the first identification bit of the ID identifies the query stage of the service packet and the second identification bit identifies the query mode of the service packet, the first identification bit of the first ID is different from the first identification bit of the third ID and the second identification bit is the same under the condition that the query mode identified by the third ID is the same as the query mode identified by the first ID. And under the condition that the query mode identified by the third ID is different from the query mode identified by the first ID, the first ID is different from the first identification position of the third ID, and the second identification position is different.
If the first processing data acquired from the forwarding device includes: if the instruction is processed, the obtaining first processing data from the matching table entry, and processing the service packet according to the first processing data includes: and acquiring the processing instruction from the matching table entry, and processing the service message according to the processing instruction.
That is, the first processing data acquired at the forwarding device includes: when the instruction is processed, the first forwarding flow table is the last forwarding flow table for forwarding the service packet, and at this time, the forwarding device may process the service packet according to the processing instruction included in the acquired first processing data, thereby completing forwarding of the service packet.
The embodiment of the invention provides a message forwarding method, which comprises the steps of obtaining a first ID of a service message, and determining whether a query stage identified by the first ID is higher than a query stage identified by a second ID obtained before the query stage identified by the first ID; when the query stage identified by the first ID is higher than the query stage identified by the first ID and the query stage identified by the second ID is obtained before the query stage identified by the first ID, determining a first forwarding flow table according to the first ID, obtaining a first key according to the query mode of the first forwarding flow table identified by the first ID, searching the first forwarding flow table according to the first key, if the first forwarding flow table is determined to have a matching table entry matched with the first key, obtaining first processing data from the matching table entry, and processing the service message according to the first processing data. Therefore, when the forwarding device receives the service message, the forwarding device can acquire the first ID of the service message, so that whether the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID can be determined, and when the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, the forwarding device determines the first forwarding flow table according to the first ID and forwards the service message according to the first forwarding flow table. Therefore, in the process of forwarding the service message, the forwarding flow tables at different query stages are ensured to be queried only once, so that the normal forwarding of the service message is ensured when the service message is forwarded, and the searching sequence is ensured without using an additional mechanism, thereby reducing the complexity of forwarding the service message.
An embodiment of the present invention provides a method for forwarding a packet, as shown in fig. 2, including:
201. and acquiring a first identification ID of the service message.
Wherein, the ID is used for identifying the query stage and the query mode of the service message.
Specifically, there are two situations when the controller acquires the first ID of the service packet, which are specifically as follows:
the controller may receive a service packet sent by the forwarding device, and analyze the service packet, so as to obtain a first ID of the service packet, where the first ID obtained by the controller is an ID related to a first forwarding flow table to be searched in a forwarding process of the service packet.
If the controller has already performed partial forwarding through the forwarding flow table before acquiring the first ID, at this time, the controller may acquire the first ID through the forwarding flow table in the previous query stage.
The forwarding flow table is stored in the control device, and is the same as the forwarding flow table stored in the forwarding device.
Further, the query mode identified by the first ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
Wherein the arbitrary matching search comprises: the random matching search of the IPv4 (Internet Protocol Version4, fourth Version Internet Protocol) service packet and the random matching search of the IPv6 (Internet Protocol Version6, sixth Version Internet Protocol) service packet.
The longest match lookup includes: the longest matching search of the IPv4 service message and the longest matching search of the IPv6 service message.
The exact match lookup includes: and the accurate matching search of the IPv4 service message and the accurate matching search of the IPv6 service message.
It should be noted that the query mode marked by the first ID may also be other modes, and the present invention is not limited to this.
Furthermore, the method for identifying the query stage and the query mode of the service packet by the ID may be to indicate the first identification bit of the ID to the query stage of the service packet and indicate the second identification bit of the ID to the query mode.
202. Determining whether the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID.
Specifically, after the controller acquires the first ID, the controller may acquire the query phase identified by the first ID, and compare the query phase identified by the first ID with the query phase identified by the second ID acquired before the query phase identified by the first ID, so as to determine that the query phase currently required to be performed by the controller is not the query phase already queried.
It should be noted that, determining whether the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID, is to determine whether the query phase identified by the first ID is a query phase after the query phase identified by the second ID obtained before the query phase identified by the first ID.
Further, if the controller obtains the first ID of the service packet by parsing the service packet, and the controller does not forward the service packet at this time, the query phase identified by the second ID is set to be null, and the query phase identified by the first ID is necessarily higher than the query phase identified by the second ID by the controller at this time.
And if the controller acquires the first ID through the forwarding flow table, recording the ID corresponding to the forwarding flow table of the first ID as a second ID. At this point, the controller needs to determine whether the polling stage identified by the first ID is a polling stage subsequent to the polling stage identified by the second ID.
If the query phase identified by the first ID is a query phase subsequent to the query phase identified by the second ID, the controller may determine that the query phase identified by the first ID is higher than the query phase identified by the second ID. If the query phase identified by the first ID is not a query phase subsequent to the query phase identified by the second ID, the controller may determine that the query phase identified by the first ID is not higher than the query phase identified by the second ID.
203. And if the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, determining a first forwarding flow table according to the first ID.
Specifically, after determining that the query phase identified by the first ID is higher than the query phase identified by the first ID and the obtained query phase identified by the second ID, the controller may determine, according to the first ID, a first forwarding flow table corresponding to the first ID.
It should be noted that, since the ID can identify the query stage and the query mode of the service forwarding packet, the first ID can identify the first query stage and the first query mode of the service packet. In each query stage, each query mode only corresponds to one forwarding flow table, so that the first forwarding flow table can be uniquely determined through the first ID.
204. And acquiring a first keyword key according to the query mode of the first forwarding flow table identified by the first ID.
Specifically, after determining the first ID, the controller acquires, from the service message, a first key corresponding to the query mode identified by the first ID according to the query mode identified by the first ID.
Illustratively, if the service packet is an IPv4 service packet, and the query mode identified by the first ID is any matching lookup, the first key required by any matching lookup is a quintuple, including: source IP address (SrcIP), destination IP address (DstIP), source port number (SrcPort), destination port number (DstPort), and Protocol number (Protocol). When the controller determines that the query mode identified by the first ID is any matching search, a first key corresponding to the query mode identified by the first ID is obtained from the service message, namely a quintuple serving as the first key is obtained from the service message, and the method comprises the following steps: a source IP address, a destination IP address, a source port number, a destination port number, and a protocol number.
205. And searching a first forwarding flow table according to the first key, and determining whether a matching table entry matched with the first key exists in the first forwarding flow table.
Specifically, after the controller acquires the first key, the controller may search the first forwarding flow table according to the key, so as to determine whether there is a matching entry in the first forwarding flow table.
As described in the above example, the first key acquired by the controller is a five-tuple including: and querying the first forwarding flow table according to the quintuple so as to determine whether a matching table item matched with the first key acquired from the service message exists in the first forwarding flow table. That is, it is determined whether there is a matching entry in the first forwarding flow table that matches the quintuple obtained from the service message.
Further, a first forwarding flow table is searched according to the first key, and if an entry matched with the first key is found in the first forwarding flow table, it is indicated that a matched entry exists in the first forwarding flow table. And if the entry matched with the first key is not found in the first forwarding flow table, indicating that no matched entry exists in the first forwarding flow table.
206. And if the fact that the first forwarding flow table does not have the matched table item matched with the first key is determined, establishing a new table item matched with the first key in the first forwarding flow table according to the service message.
And recording first processing data in the new table entry.
Specifically, when the controller determines that there is no matching entry matching the first key in the first forwarding flow table, a new entry matching the first key may be established in the first forwarding flow table, so that the subsequently received service packet may be forwarded according to the matching entry matching the first key in the first forwarding flow table.
Further, the controller establishes a new table entry in a different process according to whether the first forwarding flow table is the last forwarding flow table for forwarding the service packet. In particular, the method comprises the following steps of,
when the first forwarding flow table is not the last forwarding flow table searched when the service packet is forwarded in the forwarding process of the service packet, the first processing data includes: and the third ID of the service message.
Wherein the third ID is an ID identifying a next query phase after the query phase identified by the first ID.
Specifically, if the controller determines that no entry matched with the first key exists in the entries of the first forwarding flow table, it indicates that the existing forwarding flow table does not support forwarding of the service packet. At this time, the controller obtains the configuration information of the service packet by analyzing the service packet, so that the ID of the next query stage that needs to be performed after the first forwarding table is searched can be obtained according to the configuration information of the service packet, that is, the third ID is obtained. The controller establishes a matching table entry matched with the first key in the first forwarding flow table, and records the third ID as first processing data of the matching table entry in the matching table entry.
Further, the query phase identified by the third ID is higher than the query phase identified by the first ID.
When the first forwarding flow table is a last forwarding flow table searched when the service packet is forwarded in a forwarding process of the service packet, the first processing data includes: the instructions are processed.
Specifically, if the controller determines that no entry matched with the first key exists in the entries of the first forwarding flow table, it indicates that the existing forwarding flow table does not support forwarding of the service packet. At this time, the controller learns the configuration information of the service packet according to the service packet, so as to learn that the first forwarding flow table is the last forwarding flow table searched when forwarding the service packet in the forwarding process of the service packet according to the configuration information of the service packet, and learn a processing instruction for processing the service packet. At this time, the controller establishes a matching entry matched with the first key in the first forwarding flow table, and records the processing instruction as first processing data of the matching entry in the matching entry.
207. And sending the related information of the new entry of the first forwarding flow table to forwarding equipment, so that the forwarding equipment forwards the service message according to the new entry of the first forwarding flow table.
Specifically, after the controller establishes a new entry in the first forwarding flow table, the controller sends the related information of the established new entry to the forwarding device, so that the forwarding device can implement corresponding forwarding processing on the service packet according to the new entry.
The embodiment of the invention provides a message forwarding method.A controller acquires a first ID of a service message, and determines whether an inquiry stage identified by the first ID is higher than an inquiry stage identified by a second ID acquired before the inquiry stage identified by the first ID; when the query stage identified by the first ID is higher than the query stage identified by the first ID and the query stage identified by the second ID is obtained, determining a first forwarding flow table according to the first ID, obtaining a first key according to the query mode of the first forwarding flow table identified by the first ID, searching the first forwarding flow table according to the first key, and if the first forwarding flow table is determined to have no matched table entry matched with the first key, establishing a new table entry matched with the first key in the first forwarding flow table according to the service message; first processing data is recorded in the new table entry; and sending the related information of the new entry of the first forwarding flow table to forwarding equipment, so that the forwarding equipment forwards the service message according to the new entry of the first forwarding flow table. Thus, before establishing a matching table item matched with a first key, the controller needs to determine whether an inquiry stage of an acquired first ID is higher than an inquiry stage of a second ID acquired before the inquiry stage of the first ID, and only when the inquiry stage of the first ID is higher than the inquiry stage of the second ID acquired before the inquiry stage of the first ID, the controller detects that no matching item matched with the first key exists in a first forwarding flow table, establishes a matching table item matched with the first key, and sends related information of the newly established matching table item to the forwarding device, so that forwarding flow tables of different inquiry stages are only queried once in a service message forwarding process, normal forwarding of service messages is guaranteed when the service messages are forwarded, and a searching sequence is guaranteed without using an additional mechanism, thereby reducing the complexity of forwarding the service message.
An embodiment of the present invention provides a method for forwarding a packet, as shown in fig. 3, including:
301. the forwarding equipment acquires a first identification ID of the service message.
Wherein, the ID is used for identifying the query stage and the query mode of the service message.
Specifically, refer to step 101, which is not described herein again.
302. The forwarding device determines whether the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID.
Specifically, refer to step 102, which is not described herein again.
Further, if the forwarding device determines that the query phase identified by the first ID is not higher than the query phase identified by the first ID, the query phase identified by the obtained second ID is obtained, that is, the forwarding device determines that the query phase identified by the first ID is the query phase before the query phase identified by the obtained second ID before the query phase identified by the first ID, then in order to ensure that each query phase only searches the forwarding flow table once, the forwarding device may not process the service packet and return error information to the controller.
303. And if the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, the forwarding equipment determines a first forwarding flow table according to the first ID.
Specifically, refer to step 103, which is not described herein again.
304. And the forwarding equipment acquires the first keyword key according to the query mode identified by the first ID.
Specifically, refer to step 104, which is not described herein again.
305. And the forwarding equipment searches a first forwarding flow table according to the first key and determines whether a matching table item matched with the first key exists in the first forwarding flow table.
Specifically, refer to step 105, which is not described herein again.
It should be noted that, the forwarding device executes different steps according to different determined structures. If the forwarding device determines that there is a matching entry matching the first key in the first forwarding flow table, step 306a is executed. If the forwarding device determines that there is no matching entry matching the first key in the first forwarding flow table, step 306b, step 307-.
306a, if it is determined that there is a matching entry matching the first key in the first forwarding flow table, the forwarding device obtains first processing data in the matching entry, and processes the service packet according to the first processing data.
Specifically, refer to step 106, which is not described herein again.
306b, if no matching entry matched with the first key is found, the forwarding device sends the service message to a controller, so that the controller determines a forwarding flow of the service message, and the controller receives the service message sent by the forwarding device.
Specifically, when the forwarding device does not find a matching item matched with the first key in the first forwarding flow table, it indicates that the forwarding device does not forward the service packet through the first forwarding flow table, at this time, the forwarding device may forward the service packet to the controller, and the controller determines a forwarding process of the service packet. The controller may receive a service packet sent by the forwarding device.
307. And the controller analyzes the service message and acquires the configuration information of the service message.
Wherein, the configuration information identifies the forwarding process of forwarding the service message.
It should be noted that the identification of the forwarding process for forwarding the service packet in the configuration information refers to the identification of each query stage for forwarding the service packet configured by the user in the configuration information and the query mode in each query stage.
For example, the query phase for configuring the forwarding service packet by the user includes three phases: flow classification, three-layer forwarding and two-layer forwarding, and the query mode when the flow classification stage is configured is any matching query; the query mode in the query stage of three-layer forwarding is longest match query; the query mode in the query stage of the two-layer forwarding is an accurate matching query. At this time, the configuration information identifies the query stage and the query mode in the forwarding process of the service packet, that is, the configuration information identifies at least one ID corresponding to at least one forwarding flow table of the service packet.
It should be noted that the configuration information is obtained by the controller in the service message. The controller can obtain the forwarding flow table required for forwarding the service packet through the configuration information, that is, the controller associates each forwarding process with the forwarding flow table.
Specifically, after receiving the service packet, the controller parses the service packet, and may obtain configuration information of the service packet, so as to obtain query stages that need to be performed on the service packet and query modes of the query stages, that is, obtain forwarding flow tables that need to be searched for forwarding the service packet.
308. And the controller acquires a first identification ID of the service message.
Wherein, the ID is used for identifying the query stage and the query mode of the service message.
Specifically, the controller may receive a service packet sent by the forwarding device, and analyze the service packet, so as to obtain a first ID of the service packet, where the first ID obtained by the controller is an ID related to a first forwarding flow table to be searched in a process of forwarding the service packet. That is, the acquiring, by the controller, the first identifier ID of the service packet includes: and the controller acquires a first identification ID of the service message according to the configuration information of the service message.
If the controller has already performed partial forwarding through the forwarding flow table before acquiring the first ID, at this time, the controller may acquire the first ID through the forwarding flow table in the previous query stage. That is, the acquiring, by the controller, the first identifier ID of the service packet includes: the controller acquires the first ID from information recorded in an entry of the third forwarding flow table.
The third forwarding flow table is a forwarding flow table in a last query stage, at this time, the first ID is recorded in the entry of the third forwarding flow table, and the controller may obtain the first ID in the entry of the third flow table. Reference may be made to step 201.
The forwarding flow table is stored in the control device, and is the same as the forwarding flow table stored in the forwarding device.
309. The controller determines whether the first ID identified query phase is higher than a second ID identified query phase obtained prior to the first ID identified query phase.
Specifically, refer to step 202, which is not described herein again.
310. And if the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, the controller determines a first forwarding flow table according to the first ID.
Specifically, refer to step 203, which is not described herein again.
311. And the controller acquires a first keyword key according to the query mode of the first forwarding flow table identified by the first ID.
Specifically, refer to step 204, which is not described herein again.
312. The controller searches a first forwarding flow table according to the first key, and determines whether a matching table item matched with the first key exists in the first forwarding flow table.
Specifically, refer to step 205, which is not described herein again.
It should be noted that the controller executes different steps according to the determined matching result. If the controller determines that there is no matching entry in the first forwarding flow table that matches the first key, steps 313a-314a are performed. If the controller determines that there is a matching entry in the first forwarding flow table matching the first key, step 313b is executed.
313a, if it is determined that there is no matching entry matching the first key in the first forwarding flow table, the controller establishes a new entry matching the first key in the first forwarding flow table according to the service packet.
And recording first processing data in the new table entry.
Specifically, refer to step 206, which is not described herein again.
313b, if it is determined that there is a matching entry matching the first key in the first forwarding flow table, the controller obtains first processing data in the matching entry, and processes the service packet according to the first processing data.
Specifically, when it is determined that there is a matching entry matching the first key in the first forwarding flow table, the controller may obtain the first processing data from the matching entry. If the first forwarding flow table is not the last forwarding flow table for forwarding the service packet, the first processing data includes a third ID corresponding to a next forwarding flow table to be searched when the service packet is forwarded. That is, the first processing data includes: and after the query stage identified by the first ID is identified, the ID of the next query stage is the third ID.
Wherein the third ID is an ID identifying a next query phase after the query phase identified by the first ID.
If the first forwarding flow table is the last forwarding flow table for forwarding the service packet, the first processing data includes: the instructions are processed.
The controller processes the service message according to different contents of the acquired first processing data.
If the first processing data acquired in the controller comprises: if the third ID of the service packet is the first processing data, the acquiring the first processing data from the matching entry, and processing the service packet according to the first processing data includes: acquiring a third ID of the service message from the matching table entry; determining whether the query phase identified by the third ID is higher than the query phase identified by the first ID; if the query stage identified by the third ID is higher than the query stage identified by the first ID, determining a second forwarding flow table according to the third ID of the service message; acquiring a second key according to the query mode identified by the third ID; searching a second forwarding flow table according to the second key, and determining whether a matching table item matched with the second key exists in the second forwarding flow table; and if the matched table entry is found, acquiring second processing data in the matched table entry, and processing the service message according to the second processing data.
That is, the first process data that the controller is acquiring includes: when the third ID of the service packet indicates that the forwarding device needs to forward the service packet according to the third ID, the controller performs a process of forwarding the service packet according to the third ID, which may specifically refer to a process of forwarding the service packet according to the first ID by the controller, and is not described herein again.
Further, the query manner identified by the third ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
The query mode identified by the third ID may be the same as the query mode identified by the first ID. Since the query phase identified by the first ID is different from the query phase identified by the third ID, the first forwarding flow table corresponding to the first ID and the second forwarding flow table corresponding to the third ID are different forwarding flow tables. If the query mode identified by the third ID is the same as the query mode identified by the first ID, it is determined that the first forwarding flow table and the second forwarding flow table are forwarding flow tables having the same query mode in different query stages.
Further, if the first identification bit of the ID identifies the query stage of the service packet and the second identification bit identifies the query mode of the service packet, the first identification bit of the first ID is different from the first identification bit of the third ID and the second identification bit is the same under the condition that the query mode identified by the third ID is the same as the query mode identified by the first ID. And under the condition that the query mode identified by the third ID is different from the query mode identified by the first ID, the first ID is different from the first identification position of the third ID, and the second identification position is different.
If the first processing data acquired in the controller comprises: if the instruction is processed, the obtaining first processing data from the matching table entry, and processing the service packet according to the first processing data includes: and acquiring the processing instruction from the matching table entry, and preprocessing the service message according to the processing instruction.
That is, the first process data acquired at the controller includes: when the instruction is processed, the first forwarding flow table is the last forwarding flow table for forwarding the service message, and at this time, the controller can process the service message according to the processing instruction included in the acquired first processing data, so as to complete forwarding of the service message. Only the forwarding device can forward the service message.
314a, the controller sends the related information of the new entry of the first forwarding flow table to the forwarding device, so that the forwarding device forwards the service packet according to the new entry of the first forwarding flow table. And the forwarding equipment receives the related information of the new table entry of the first forwarding flow table sent by the controller.
Specifically, after the controller establishes a new entry in the first forwarding flow table, the controller sends the related information of the established new entry to the forwarding device, so that the forwarding device can implement corresponding forwarding processing on the service packet according to the new entry. And the forwarding equipment receives the relevant information of the new entry of the first forwarding flow table sent by the controller, and updates the first forwarding flow table according to the received relevant information of the new entry of the first forwarding flow table.
Illustratively, after the controller receives the service message and analyzes the service message, the configuration information of the service message can be acquired, so as to acquire the forwarding process of the service message. If the user configures the inquiry stage of forwarding the service message, the inquiry stage comprises three stages: flow classification, three-layer forwarding and two-layer forwarding, and the query mode when the flow classification stage is configured is any matching query; the query mode in the query stage of three-layer forwarding is longest match query; the query mode in the query stage of the two-layer forwarding is an accurate matching query. At this time, the configuration information identifies the query stage and the query mode in the forwarding process of the service packet, that is, the configuration information identifies at least one ID corresponding to at least one forwarding flow table of the service packet. The controller may obtain the first ID of the service packet according to the configuration information, where the first ID is assumed to be ID1, and the query stage identified by the obtained ID1 is flow classification, and the query mode is any matching query.
The controller first determines whether the query phase identified by ID1 is higher than the query phase identified by the second ID obtained before the query phase identified by ID 1. Since the query phase identified by the second ID is now empty, the controller determines that the query phase identified by ID1 must be higher than the query phase identified by the second ID. The controller determines the first forwarding flow table according to ID1, that is, in the flow classification query stage, the controller determines that the query mode is any forwarding flow table corresponding to the matching query, and it is assumed that flow table 1 is forwarded. The controller acquires the first key according to the query mode identified by the ID1, namely any matching query. The controller may query the forwarding flow table 1 according to the first key, and determine whether there is a matching entry in the forwarding flow table 1. If it is determined that there is a matching entry in the forwarding flow table 1, the information recorded in the matching entry may be used, and the next forwarding flow table to be searched is the forwarding flow table 2 corresponding to the three-layer forwarding, and the ID of the next forwarding flow table to be searched is the ID corresponding to the forwarding flow table 2, which is assumed to be ID 2.
The controller can learn that the query phase identified by the ID2 is three-layer forwarding according to the ID2 corresponding to the forwarding flow table 2. The controller needs to first determine if the polling period identified by ID2 is higher than the polling period identified by ID 1. Because the query stage identified by the ID2 is three-tier forwarding, the query stage identified by the ID1 is flow classification, and the three-tier forwarding is a query stage after the flow classification, the controller determines that the query stage identified by the ID2 is higher than the query stage identified by the ID1, and determines a second forwarding flow table according to the ID2, that is, the forwarding flow table corresponding to the longest matching query mode determined by the controller in the three-tier forwarding query stage, assuming that the flow table 2 is forwarded. The controller acquires a second key according to the query mode identified by the ID2, namely the longest match query. The controller may query the forwarding flow table 2 according to the second key, and determine whether there is a matching entry in the forwarding flow table 2. If it is determined that there is no matched entry in the forwarding flow table 2, the control device establishes a new entry matched with the second key in the forwarding flow table 2, where the ID corresponding to the next query stage, that is, the ID3, is used as the first processing data of the new entry, and is added to the new entry. And sending the related information of the new table entry established in the forwarding flow table 2 to the forwarding device, so that the forwarding device forwards the service packet according to the related information of the table entry.
After the entry corresponding to the second key in the forwarding flow table 2 is established, the control device learns that the query stage identified by the ID3 is two-layer forwarding according to the ID 3. The controller needs to first determine if the polling period identified by ID3 is higher than the polling period identified by ID 2. Because the query stage identified by the ID3 is two-layer forwarding, the query stage identified by the ID2 is three-layer forwarding, and the two-layer forwarding is a query stage after three-layer forwarding, the controller determines that the query stage identified by the ID3 is higher than the query stage identified by the ID2, and determines a third forwarding flow table according to the ID3, that is, the controller determines that the query mode is an accurate matching query of the forwarding flow table corresponding to the query in the two-layer forwarding query stage, assuming that the flow table 3 is forwarded. The controller acquires the third key according to the query mode identified by the ID3, namely the accurate matching query. And the controller searches the forwarding flow table 3 according to the third key, and determines whether an entry matched with the third key exists in the forwarding flow table 3. If it is determined that there is a matching entry in the forwarding flow table 3, the first processing data recorded in the matching entry in the forwarding flow table 3 is a processing instruction, and the controller can process the service packet according to the processing instruction, so that the forwarding process of the service packet can be performed in the controller in advance. Because the controller cannot forward the service message, the controller can send the message that the service message can be normally forwarded to the forwarding device, so that the forwarding device forwards the service message according to the stored forwarding flow table when receiving the service message.
The embodiment of the invention provides a message forwarding method, wherein forwarding equipment acquires a first ID of a service message, and determines whether the query stage identified by the first ID is higher than the query stage identified by a second ID acquired before the query stage identified by the first ID; when the query stage identified by the first ID is higher than the query stage identified by the first ID and the query stage identified by the second ID is obtained before the query stage identified by the first ID, determining a first forwarding flow table according to the first ID, obtaining a first key according to the query mode of the first forwarding flow table identified by the first ID, searching the first forwarding flow table according to the first key, if the first forwarding flow table is determined to have a matching table entry matched with the first key, obtaining first processing data from the matching table entry, and processing the service message according to the first processing data. And if the first forwarding flow table is determined to have no matching table entry matched with the first key, the service message is sent to the controller, and the controller acquires the relevant forwarding information of the service message. Therefore, when the forwarding device receives the service message, the forwarding device can acquire the first ID of the service message, so that whether the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID can be determined, and when the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, the forwarding device determines the first forwarding flow table according to the first ID and forwards the service message according to the first forwarding flow table. Therefore, in the process of forwarding the service message, the forwarding flow tables at different query stages are ensured to be queried only once, so that the normal forwarding of the service message is ensured when the service message is forwarded, and the searching sequence is ensured without using an additional mechanism, thereby reducing the complexity of forwarding the service message. When a new service message is received, the new service message can be sent to the controller, the controller can establish a corresponding new entry in the forwarding flow table according to the new service message, and send the related information of the entry of the newly established forwarding flow table to the forwarding device, so that the forwarding device processes the new service message according to the information recorded in the entry, the forwarding flow of the forwarding device does not need to be rewritten, the complexity of forwarding the service message is further reduced, and the performance of the system is improved.
As shown in fig. 4, which is a functional schematic diagram of a forwarding device provided in the present invention, referring to fig. 4, the forwarding device includes:
the obtaining unit 401 is configured to obtain a first identifier ID of a service packet.
Wherein, the ID is used for identifying the query stage and the query mode of the service message.
Specifically, the obtaining unit 401 is specifically configured to receive a service packet through an ingress interface, and analyze the service packet to obtain a first ID of the service packet. At this time, the acquired first ID is an ID related to the first forwarding flow table to be searched in the process of forwarding the service packet.
Alternatively, the first ID may be acquired by a forwarding flow table of the last stage of the query.
Further, the query mode identified by the first ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
Wherein the arbitrary matching search comprises: the random matching search of the IPv4 (Internet Protocol Version4, fourth Version Internet Protocol) service packet and the random matching search of the IPv6 (Internet Protocol Version6, sixth Version Internet Protocol) service packet.
The longest match lookup includes: the longest matching search of the IPv4 service message and the longest matching search of the IPv6 service message.
The exact match lookup includes: and the accurate matching search of the IPv4 service message and the accurate matching search of the IPv6 service message.
It should be noted that the query mode marked by the first ID may also be other modes, and the present invention is not limited to this.
Furthermore, the method for identifying the query stage and the query mode of the service packet by the ID may be to indicate the first identification bit of the ID to the query stage of the service packet and indicate the second identification bit of the ID to the query mode.
A determining unit 402, configured to determine whether the query phase identified by the first ID acquired by the acquiring unit 401 is higher than a query phase identified by a second ID acquired before the query phase identified by the first ID.
It should be noted that, determining whether the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID, is to determine whether the query phase identified by the first ID is a query phase after the query phase identified by the second ID obtained before the query phase identified by the first ID.
Specifically, the determining unit 402 is specifically configured to determine that the query phase identified by the first ID is higher than the query phase identified by the second ID when the obtaining unit 401 obtains the first ID of the service packet by analyzing the service packet, and the query phase identified by the second ID is empty.
If the obtaining unit 401 obtains the first ID through the forwarding flow table, and the ID corresponding to the forwarding flow table that records the first ID is the second ID, it needs to determine whether the query phase identified by the first ID is the query phase after the query phase identified by the second ID.
If the query phase identified by the first ID is a query phase after the query phase identified by the second ID, it may be determined that the query phase identified by the first ID is higher than the query phase identified by the second ID. If the query phase identified by the first ID is not the query phase after the query phase identified by the second ID, it may be determined that the query phase identified by the first ID is not higher than the query phase identified by the second ID.
The determining unit 402 is further configured to determine a first forwarding flow table according to the first ID if it is determined that the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID.
It should be noted that, since the ID can identify the query stage and the query mode of the service forwarding packet, the first ID can identify the first query stage and the first query mode of the service packet. In each query stage, each query mode only corresponds to one forwarding flow table, so that the first forwarding flow table can be uniquely determined through the first ID.
The obtaining unit 401 is further configured to obtain the first keyword key according to the query manner identified by the first ID.
Specifically, the obtaining unit 401 is specifically configured to, after obtaining the first ID, obtain, according to the query manner identified by the first ID, a first key corresponding to the query manner identified by the first ID from the service message.
Illustratively, if the service packet is an IPv4 service packet, and the query mode identified by the first ID is any matching lookup, the first key required by any matching lookup is a quintuple, including: source IP address (SrcIP), destination IP address (DstIP), source port number (SrcPort), destination port number (DstPort), and Protocol number (Protocol). When determining that the query mode identified by the first ID is any matching search, the obtaining unit 401 obtains the first key corresponding to the query mode identified by the first ID from the service message, that is, obtains the quintuple as the first key from the service message, and includes: a source IP address, a destination IP address, a source port number, a destination port number, and a protocol number.
The determining unit 402 is further configured to search a first forwarding flow table according to the first key acquired by the acquiring unit 401, and determine whether a matching entry matching the first key exists in the first forwarding flow table.
As described in the above example, the first key acquired by the determining unit 402 is a quintuple including: and querying the first forwarding flow table according to the quintuple so as to determine whether a matching table item matched with the first key acquired from the service message exists in the first forwarding flow table. That is, it is determined whether there is a matching entry in the first forwarding flow table that matches the quintuple obtained from the service message.
Further, a first forwarding flow table is searched according to the first key, and if an entry matched with the first key is found in the first forwarding flow table, it is indicated that a matched entry exists in the first forwarding flow table. And if the entry matched with the first key is not found in the first forwarding flow table, indicating that no matched entry exists in the first forwarding flow table.
A processing unit 403, configured to, when the determining unit 402 determines that there is a matching entry matching the first key in the first forwarding flow table, obtain first processing data in the matching entry, and process the service packet according to the first processing data.
Specifically, if the first forwarding flow table is not the last forwarding flow table for forwarding the service packet, the first processing data includes a third ID corresponding to a next forwarding flow table to be searched when the service packet is forwarded. That is, the first processing data includes: and after the query stage identified by the first ID is identified, the ID of the next query stage is the third ID.
Wherein the third ID is an ID identifying a next query phase after the query phase identified by the first ID.
If the first forwarding flow table is the last forwarding flow table for forwarding the service packet, the first processing data includes: the instructions are processed.
The processing unit 403 performs different processing actions on the service packet according to different acquired first processing data.
The processing unit 403 is specifically configured to, if the acquired first processing data includes: and triggering the obtaining unit 401 to obtain the third ID of the service packet in the matching entry if the third ID of the service packet is the third ID of the service packet. Triggering the determining unit 402 to determine whether the query phase identified by the third ID acquired by the acquiring unit 401 is higher than the query phase identified by the first ID. And triggering the determining unit 402 to determine a second forwarding flow table according to the third ID of the service packet when it is determined that the query phase identified by the third ID is higher than the query phase identified by the first ID. And triggering the acquiring unit 401 to acquire the second key according to the query mode identified by the third ID. Triggering the determining unit 402 to search a second forwarding flow table according to the second key acquired by the acquiring unit 401, and determining whether a matching entry matching with the second key exists in the second forwarding flow table. And if the determining unit 402 determines that there is a matching entry matching the second key in the second forwarding flow table, obtain second processing data in the matching entry, and process the service packet according to the second processing data.
That is, the first processing data acquired by the processing unit 403 includes: when the third ID of the service packet indicates that the service packet needs to be forwarded according to the third ID, the processing unit 403 triggers a process of forwarding the service packet according to the third ID, which may specifically refer to a process of forwarding the service packet according to the first ID, and is not described herein again.
Further, the query manner identified by the third ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
The query mode identified by the third ID may be the same as the query mode identified by the first ID. Since the query phase identified by the first ID is different from the query phase identified by the third ID, the first forwarding flow table corresponding to the first ID and the second forwarding flow table corresponding to the third ID are different forwarding flow tables. If the query mode identified by the third ID is the same as the query mode identified by the first ID, it is determined that the first forwarding flow table and the second forwarding flow table are forwarding flow tables having the same query mode in different query stages.
Further, if the first identification bit of the ID identifies the query stage of the service packet and the second identification bit identifies the query mode of the service packet, the first identification bit of the first ID is different from the first identification bit of the third ID and the second identification bit is the same under the condition that the query mode identified by the third ID is the same as the query mode identified by the first ID. And under the condition that the query mode identified by the third ID is different from the query mode identified by the first ID, the first ID is different from the first identification position of the third ID, and the second identification position is different.
If the acquired first processing data comprises: and processing the instruction, namely acquiring the processing instruction from the matching table entry, and processing the service message according to the processing instruction.
That is, the first processing data acquired by the processing unit 403 includes: when the instruction is processed, the first forwarding flow table is the last forwarding flow table for forwarding the service packet, and at this time, the processing unit 403 may process the service packet according to the processing instruction included in the acquired first processing data, thereby completing forwarding the service packet.
Further, as shown in fig. 5, the forwarding device further includes: a receiving unit 404.
The processing unit 404 is further configured to, if the determining unit 402 determines that there is no matching entry matching with the first key in the first forwarding flow table, send the service packet to a controller, so that the controller determines a forwarding flow of the service packet.
The receiving unit 404 is configured to receive the information related to the new entry of the first forwarding flow table sent by the controller.
The embodiment of the invention provides forwarding equipment, which is used for acquiring a first ID of a service message, and determining whether the query stage identified by the first ID is higher than the query stage identified by a second ID acquired before the query stage identified by the first ID; when the query stage identified by the first ID is higher than the query stage identified by the first ID and the query stage identified by the second ID is obtained before the query stage identified by the first ID, determining a first forwarding flow table according to the first ID, obtaining a first key according to the query mode of the first forwarding flow table identified by the first ID, searching the first forwarding flow table according to the first key, if the first forwarding flow table is determined to have a matching table entry matched with the first key, obtaining first processing data from the matching table entry, and processing the service message according to the first processing data. Therefore, when the forwarding device receives the service message, the forwarding device can acquire the first ID of the service message, so that whether the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID can be determined, and when the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, the forwarding device determines the first forwarding flow table according to the first ID and forwards the service message according to the first forwarding flow table. Therefore, in the process of forwarding the service message, the forwarding flow tables at different query stages are ensured to be queried only once, so that the normal forwarding of the service message is ensured when the service message is forwarded, and the searching sequence is ensured without using an additional mechanism, thereby reducing the complexity of forwarding the service message.
As shown in fig. 6, which is a functional schematic diagram of a controller provided by the present invention, referring to fig. 6, the controller includes:
an obtaining unit 601, configured to obtain a first identifier ID of the service packet.
Wherein, the ID is used for identifying the query stage and the query mode of the service message.
Specifically, the obtaining unit 601 is specifically configured to receive a service packet through an ingress interface, and analyze the service packet to obtain a first ID of the service packet. At this time, the acquired first ID is an ID related to the first forwarding flow table to be searched in the process of forwarding the service packet.
Alternatively, the first ID may be acquired by a forwarding flow table of the last stage of the query.
Further, the query mode identified by the first ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
Wherein the arbitrary matching search comprises: the random matching search of the IPv4 (Internet Protocol Version4, fourth Version Internet Protocol) service packet and the random matching search of the IPv6 (Internet Protocol Version6, sixth Version Internet Protocol) service packet.
The longest match lookup includes: the longest matching search of the IPv4 service message and the longest matching search of the IPv6 service message.
The exact match lookup includes: and the accurate matching search of the IPv4 service message and the accurate matching search of the IPv6 service message.
It should be noted that the query mode marked by the first ID may also be other modes, and the present invention is not limited to this.
Furthermore, the method for identifying the query stage and the query mode of the service packet by the ID may be to indicate the first identification bit of the ID to the query stage of the service packet and indicate the second identification bit of the ID to the query mode.
A determining unit 602, configured to determine whether the query phase identified by the first ID acquired by the acquiring unit 601 is higher than a query phase identified by a second ID acquired before the query phase identified by the first ID.
It should be noted that, determining whether the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID, is to determine whether the query phase identified by the first ID is a query phase after the query phase identified by the second ID obtained before the query phase identified by the first ID.
Specifically, the determining unit 602 is specifically configured to determine that the query phase identified by the first ID is higher than the query phase identified by the second ID when the obtaining unit 601 obtains the first ID of the service packet by analyzing the service packet, and the query phase identified by the second ID is empty.
If the obtaining unit 601 obtains the first ID through the forwarding flow table, and the ID corresponding to the forwarding flow table recording the first ID is the second ID, it needs to determine whether the query stage identified by the first ID is the query stage subsequent to the query stage identified by the second ID.
If the query phase identified by the first ID is a query phase after the query phase identified by the second ID, it may be determined that the query phase identified by the first ID is higher than the query phase identified by the second ID. If the query phase identified by the first ID is not the query phase after the query phase identified by the second ID, it may be determined that the query phase identified by the first ID is not higher than the query phase identified by the second ID.
The determining unit 602 is further configured to determine a first forwarding flow table according to the first ID if it is determined that the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID.
It should be noted that, since the ID can identify the query stage and the query mode of the service forwarding packet, the first ID can identify the first query stage and the first query mode of the service packet. In each query stage, each query mode only corresponds to one forwarding flow table, so that the first forwarding flow table can be uniquely determined through the first ID.
The obtaining unit 601 is further configured to obtain the first keyword key according to the query manner identified by the first ID.
Specifically, the obtaining unit 601 is specifically configured to, after obtaining the first ID, obtain, according to the query manner identified by the first ID, the first key corresponding to the query manner identified by the first ID from the service message.
Illustratively, if the service packet is an IPv4 service packet, and the query mode identified by the first ID is any matching lookup, the first key required by any matching lookup is a quintuple, including: source IP address (SrcIP), destination IP address (DstIP), source port number (SrcPort), destination port number (DstPort), and Protocol number (Protocol). When determining that the query mode identified by the first ID is any matching search, the obtaining unit 401 obtains the first key corresponding to the query mode identified by the first ID from the service message, that is, obtains the quintuple as the first key from the service message, and includes: a source IP address, a destination IP address, a source port number, a destination port number, and a protocol number.
The determining unit 602 is further configured to search a first forwarding flow table according to the first key acquired by the acquiring unit 601, and determine whether a matching entry matching the first key exists in the first forwarding flow table.
As described in the above example, the first key acquired by the determining unit 602 is a five-tuple including: and querying the first forwarding flow table according to the quintuple so as to determine whether a matching table item matched with the first key acquired from the service message exists in the first forwarding flow table. That is, it is determined whether there is a matching entry in the first forwarding flow table that matches the quintuple obtained from the service message.
Further, a first forwarding flow table is searched according to the first key, and if an entry matched with the first key is found in the first forwarding flow table, it is indicated that a matched entry exists in the first forwarding flow table. And if the entry matched with the first key is not found in the first forwarding flow table, indicating that no matched entry exists in the first forwarding flow table.
A processing unit 603, configured to, when the determining unit 602 determines that there is no matching entry matching the first key in the first forwarding flow table, establish a new entry matching the first key in the first forwarding flow table according to the service packet.
And recording first processing data in the new table entry.
Specifically, the process of establishing the new table entry is different according to whether the first forwarding flow table is the last forwarding flow table for forwarding the service packet. Wherein,
when the first forwarding flow table is not the last forwarding flow table searched when the service packet is forwarded in the forwarding process of the service packet, the first processing data includes: and the third ID of the service message.
Wherein the third ID is an ID identifying a next query phase after the query phase identified by the first ID.
Specifically, if it is determined that there is no entry matching with the first key in the entries of the first forwarding flow table, the processing unit 603 indicates that the existing forwarding flow table does not support forwarding of the service packet. At this time, the obtaining unit 601 obtains the configuration information of the service packet by analyzing the service packet, so that the ID of the next query stage that needs to be performed after the first forwarding flow table is searched can be obtained according to the configuration information of the service packet, that is, the third ID is obtained. The processing unit 603 establishes a matching entry matching the first key in the first forwarding flow table, and records the third ID as the first processing data of the matching entry in the matching entry.
Further, the query phase identified by the third ID is higher than the query phase identified by the first ID.
When the first forwarding flow table is a last forwarding flow table searched when the service packet is forwarded in a forwarding process of the service packet, the first processing data includes: the instructions are processed.
The specific processing unit 603 determines that no entry matching the first key exists in the entries of the first forwarding flow table, which indicates that the existing forwarding flow table does not support forwarding of the service packet. At this time, the obtaining unit 601 obtains the configuration information of the service packet according to the service packet, so that it can be obtained that the first forwarding flow table is the last forwarding flow table searched when forwarding the service packet in the forwarding process of the service packet according to the configuration information of the service packet, and obtain a processing instruction for processing the service packet. At this time, the processing unit 603 establishes a matching entry matching the first key in the first forwarding flow table, and records the processing instruction as the first processing data of the matching entry in the matching entry.
A sending unit 604, configured to send relevant information of the new entry of the first forwarding flow table to a forwarding device, so that the forwarding device forwards the service packet according to the new entry of the first forwarding flow table.
Further, as shown in fig. 7, the controller further includes:
a receiving unit 604, configured to receive a service packet sent by a forwarding device.
The obtaining unit 601 is further configured to analyze the service packet received by the receiving unit 604, and obtain configuration information of the service packet.
Wherein, the configuration information identifies the forwarding process of forwarding the service message.
At this time, the obtaining unit 601 is configured to obtain the first identifier ID of the service packet specifically as: the obtaining unit 601 is specifically configured to obtain the first identifier ID of the service packet according to the configuration information of the service packet. Alternatively, the obtaining unit 601 is specifically configured to obtain the first ID from information recorded in an entry of the third forwarding flow table.
Further, the processing unit 603 is further configured to, when the determining unit 602 determines that there is a matching entry matching with the first key in the first forwarding flow table, obtain first processing data in the matching entry, and process the service packet according to the first processing data.
Specifically, if the first forwarding flow table is not the last forwarding flow table for forwarding the service packet, the first processing data includes a third ID corresponding to a next forwarding flow table to be searched when the service packet is forwarded. That is, the first processing data includes: and after the query stage identified by the first ID is identified, the ID of the next query stage is the third ID.
Wherein the third ID is an ID identifying a next query phase after the query phase identified by the first ID.
If the first forwarding flow table is the last forwarding flow table for forwarding the service packet, the first processing data includes: the instructions are processed.
The processing unit 603 performs different processing actions on the service packet according to different acquired first processing data.
The processing unit 603 is specifically configured to, if the acquired first processing data includes: and triggering the obtaining unit 601 to obtain the third ID of the service packet in the matching entry if the third ID of the service packet is the third ID of the service packet. The determining unit 602 is triggered to determine whether the query phase identified by the third ID acquired by the acquiring unit 601 is higher than the query phase identified by the first ID. And triggering the determining unit 602 to determine a second forwarding flow table according to the third ID of the service packet when it is determined that the query phase identified by the third ID is higher than the query phase identified by the first ID. And triggering the acquiring unit 601 to acquire the second key according to the query mode identified by the third ID. Triggering the determining unit 602 to search a second forwarding flow table according to the second key acquired by the acquiring unit 601, and determining whether a matching entry matching with the second key exists in the second forwarding flow table. And if the determining unit 602 determines that there is a matching entry matching the second key in the second forwarding flow table, obtain second processing data in the matching entry, and process the service packet according to the second processing data.
That is, the first processing data acquired by the processing unit 603 includes: when the third ID of the service packet indicates that the service packet needs to be forwarded according to the third ID, the processing unit 603 triggers a process of forwarding the service packet according to the third ID, which may specifically refer to a process of forwarding the service packet according to the first ID, and is not described herein again.
Further, the query manner identified by the third ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
The query mode identified by the third ID may be the same as the query mode identified by the first ID. Since the query phase identified by the first ID is different from the query phase identified by the third ID, the first forwarding flow table corresponding to the first ID and the second forwarding flow table corresponding to the third ID are different forwarding flow tables. If the query mode identified by the third ID is the same as the query mode identified by the first ID, it is determined that the first forwarding flow table and the second forwarding flow table are forwarding flow tables having the same query mode in different query stages.
Further, if the first identification bit of the ID identifies the query stage of the service packet and the second identification bit identifies the query mode of the service packet, the first identification bit of the first ID is different from the first identification bit of the third ID and the second identification bit is the same under the condition that the query mode identified by the third ID is the same as the query mode identified by the first ID. And under the condition that the query mode identified by the third ID is different from the query mode identified by the first ID, the first ID is different from the first identification position of the third ID, and the second identification position is different.
If the acquired first processing data comprises: and processing the instruction, namely acquiring the processing instruction from the matching table entry, and processing the service message according to the processing instruction.
That is, the first processing data acquired by the processing unit 603 includes: when the instruction is processed, the first forwarding flow table is the last forwarding flow table for forwarding the service packet, and at this time, the processing unit 603 may process the service packet according to the processing instruction included in the acquired first processing data, thereby completing forwarding of the service packet.
The embodiment of the invention provides a controller, which is used for acquiring a first ID of a service message, and determining whether an inquiry stage identified by the first ID is higher than an inquiry stage identified by a second ID acquired before the inquiry stage identified by the first ID; when the query stage identified by the first ID is higher than the query stage identified by the first ID and the query stage identified by the second ID is obtained, determining a first forwarding flow table according to the first ID, obtaining a first key according to the query mode of the first forwarding flow table identified by the first ID, searching the first forwarding flow table according to the first key, and if the first forwarding flow table is determined to have no matched table entry matched with the first key, establishing a new table entry matched with the first key in the first forwarding flow table according to the service message; first processing data is recorded in the new table entry; and sending the related information of the new entry of the first forwarding flow table to forwarding equipment, so that the forwarding equipment forwards the service message according to the new entry of the first forwarding flow table. Thus, before establishing a matching table item matched with a first key, the controller needs to determine whether an inquiry stage of an acquired first ID is higher than an inquiry stage of a second ID acquired before the inquiry stage of the first ID, and only when the inquiry stage of the first ID is higher than the inquiry stage of the second ID acquired before the inquiry stage of the first ID, the controller detects that no matching item matched with the first key exists in a first forwarding flow table, establishes a matching table item matched with the first key, and sends related information of the newly established matching table item to the forwarding device, so that forwarding flow tables of different inquiry stages are only queried once in a service message forwarding process, normal forwarding of service messages is guaranteed when the service messages are forwarded, and a searching sequence is guaranteed without using an additional mechanism, thereby reducing the complexity of forwarding the service message.
As shown in fig. 8, which is a schematic structural diagram of a forwarding device provided in the present invention, referring to fig. 8, the forwarding device includes: a processor (processor) 801, a communication Interface (Communications Interface) 802, a memory 803, a communication bus 804, and a receiver 805; the processor 801, the communication interface 802, the receiver 805 and the memory 803 complete communication with each other through the communication bus 804.
The processor 801 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention.
The memory 803 is used to store program code, including computer operating instructions. The memory 803 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The processor 801 is used to call program code in the memory 803. The method specifically comprises the following steps:
the processor 801 is configured to obtain a first identifier ID of a service packet.
Wherein, the ID is used for identifying the query stage and the query mode of the service message.
Specifically, the processor 801 is specifically configured to receive a service packet through the ingress interface, analyze the service packet, and obtain a first ID of the service packet. At this time, the acquired first ID is an ID related to the first forwarding flow table to be searched in the process of forwarding the service packet.
Alternatively, the first ID may be acquired by a forwarding flow table of the last stage of the query.
Further, the query mode identified by the first ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
Wherein the arbitrary matching search comprises: the random matching search of the IPv4 (Internet Protocol Version4, fourth Version Internet Protocol) service packet and the random matching search of the IPv6 (Internet Protocol Version6, sixth Version Internet Protocol) service packet.
The longest match lookup includes: the longest matching search of the IPv4 service message and the longest matching search of the IPv6 service message.
The exact match lookup includes: and the accurate matching search of the IPv4 service message and the accurate matching search of the IPv6 service message.
It should be noted that the query mode marked by the first ID may also be other modes, and the present invention is not limited to this.
Furthermore, the method for identifying the query stage and the query mode of the service packet by the ID may be to indicate the first identification bit of the ID to the query stage of the service packet and indicate the second identification bit of the ID to the query mode.
The processor 801 is further configured to determine whether the query phase identified by the first ID is higher than a query phase identified by a second ID obtained before the query phase identified by the first ID.
It should be noted that, determining whether the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID, is to determine whether the query phase identified by the first ID is a query phase after the query phase identified by the second ID obtained before the query phase identified by the first ID.
Specifically, the processor 801 is specifically configured to determine that the query phase identified by the first ID is higher than the query phase identified by the second ID when the first ID of the service packet is acquired by analyzing the service packet, and the query phase identified by the second ID is empty.
If the processor 801 acquires the first ID through the forwarding flow table, if the ID corresponding to the forwarding flow table that records the first ID is the second ID, it needs to determine whether the query phase identified by the first ID is the query phase after the query phase identified by the second ID.
If the query phase identified by the first ID is a query phase after the query phase identified by the second ID, it may be determined that the query phase identified by the first ID is higher than the query phase identified by the second ID. If the query phase identified by the first ID is not the query phase after the query phase identified by the second ID, it may be determined that the query phase identified by the first ID is not higher than the query phase identified by the second ID.
The processor 801 is further configured to determine a first forwarding flow table according to the first ID if it is determined that the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID.
It should be noted that, since the ID can identify the query stage and the query mode of the service forwarding packet, the first ID can identify the first query stage and the first query mode of the service packet. In each query stage, each query mode only corresponds to one forwarding flow table, so that the first forwarding flow table can be uniquely determined through the first ID.
The processor 801 is further configured to obtain a first keyword key according to the query mode identified by the first ID.
Specifically, the processor 801 is specifically configured to, after acquiring the first ID, acquire, according to the query manner identified by the first ID, a first key corresponding to the query manner identified by the first ID from the service message.
Illustratively, if the service packet is an IPv4 service packet, and the query mode identified by the first ID is any matching lookup, the first key required by any matching lookup is a quintuple, including: source IP address (SrcIP), destination IP address (DstIP), source port number (SrcPort), destination port number (DstPort), and Protocol number (Protocol). When determining that the query mode identified by the first ID is any matching search, the obtaining unit 401 obtains the first key corresponding to the query mode identified by the first ID from the service message, that is, obtains the quintuple as the first key from the service message, and includes: a source IP address, a destination IP address, a source port number, a destination port number, and a protocol number.
The processor 801 is further configured to search a first forwarding flow table according to the first key, and determine whether a matching entry matching the first key exists in the first forwarding flow table.
As described in the above example, the first key obtained by the processor 801 is a five-tuple including: and querying the first forwarding flow table according to the quintuple so as to determine whether a matching table item matched with the first key acquired from the service message exists in the first forwarding flow table. That is, it is determined whether there is a matching entry in the first forwarding flow table that matches the quintuple obtained from the service message.
Further, a first forwarding flow table is searched according to the first key, and if an entry matched with the first key is found in the first forwarding flow table, it is indicated that a matched entry exists in the first forwarding flow table. And if the entry matched with the first key is not found in the first forwarding flow table, indicating that no matched entry exists in the first forwarding flow table.
The processor 801 is further configured to, when there is a matching entry matching the first key in the first forwarding flow table, obtain first processing data in the matching entry, and process the service packet according to the first processing data.
Specifically, if the first forwarding flow table is not the last forwarding flow table for forwarding the service packet, the first processing data includes a third ID corresponding to a next forwarding flow table to be searched when the service packet is forwarded. That is, the first processing data includes: and after the query stage identified by the first ID is identified, the ID of the next query stage is the third ID.
Wherein the third ID is an ID identifying a next query phase after the query phase identified by the first ID.
If the first forwarding flow table is the last forwarding flow table for forwarding the service packet, the first processing data includes: the instructions are processed.
The processor 801 performs different processing actions on the service packet according to different acquired first processing data.
The processor 801 is specifically configured to, if the acquired first processing data includes: and acquiring the third ID of the service message from the matching table entry according to the third ID of the service message. Determining whether the query phase identified by the third ID is higher than the query phase identified by the first ID. And under the condition that the query stage identified by the third ID is higher than the query stage identified by the first ID, determining a second forwarding flow table according to the third ID of the service message. And acquiring a second key according to the query mode identified by the third ID. And searching a second forwarding flow table according to the acquired second key, and determining whether a matching table entry matched with the second key exists in the second forwarding flow table. And if the second forwarding flow table is determined to have a matching table entry matched with the second key, second processing data is acquired from the matching table entry, and the service message is processed according to the second processing data.
That is, the first processing data acquired by the processor 801 includes: when the third ID of the service packet indicates that the service packet needs to be forwarded according to the third ID, the process of forwarding the service packet according to the third ID may specifically refer to the process of forwarding the service packet according to the first ID, and is not described herein again.
Further, the query manner identified by the third ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
The query mode identified by the third ID may be the same as the query mode identified by the first ID. Since the query phase identified by the first ID is different from the query phase identified by the third ID, the first forwarding flow table corresponding to the first ID and the second forwarding flow table corresponding to the third ID are different forwarding flow tables. If the query mode identified by the third ID is the same as the query mode identified by the first ID, it is determined that the first forwarding flow table and the second forwarding flow table are forwarding flow tables having the same query mode in different query stages.
Further, if the first identification bit of the ID identifies the query stage of the service packet and the second identification bit identifies the query mode of the service packet, the first identification bit of the first ID is different from the first identification bit of the third ID and the second identification bit is the same under the condition that the query mode identified by the third ID is the same as the query mode identified by the first ID. And under the condition that the query mode identified by the third ID is different from the query mode identified by the first ID, the first ID is different from the first identification position of the third ID, and the second identification position is different.
If the acquired first processing data comprises: and processing the instruction, namely acquiring the processing instruction from the matching table entry, and processing the service message according to the processing instruction.
That is, the first processing data acquired by the processor 801 includes: when the instruction is processed, the first forwarding flow table is the last forwarding flow table for forwarding the service packet, and at this time, the processor 801 may process the service packet according to the processing instruction included in the acquired first processing data, thereby completing forwarding of the service packet.
Further, the processor 801 is further configured to send the service packet to a controller if it is determined that there is no matching entry matching with the first key in the first forwarding flow table, so that the controller determines a forwarding flow of the service packet.
The receiver 805 is configured to receive information related to a new entry of the first forwarding flow table sent by the controller.
The embodiment of the invention provides forwarding equipment, which is used for acquiring a first ID of a service message, and determining whether the query stage identified by the first ID is higher than the query stage identified by a second ID acquired before the query stage identified by the first ID; when the query stage identified by the first ID is higher than the query stage identified by the first ID and the query stage identified by the second ID is obtained before the query stage identified by the first ID, determining a first forwarding flow table according to the first ID, obtaining a first key according to the query mode of the first forwarding flow table identified by the first ID, searching the first forwarding flow table according to the first key, if the first forwarding flow table is determined to have a matching table entry matched with the first key, obtaining first processing data from the matching table entry, and processing the service message according to the first processing data. Therefore, when the forwarding device receives the service message, the forwarding device can acquire the first ID of the service message, so that whether the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID can be determined, and when the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, the forwarding device determines the first forwarding flow table according to the first ID and forwards the service message according to the first forwarding flow table. Therefore, in the process of forwarding the service message, the forwarding flow tables at different query stages are ensured to be queried only once, so that the normal forwarding of the service message is ensured when the service message is forwarded, and the searching sequence is ensured without using an additional mechanism, thereby reducing the complexity of forwarding the service message.
As shown in fig. 9, which is a schematic structural diagram of a controller provided in the present invention, referring to fig. 9, the controller includes: a processor (processor) 901, a communication Interface 902, a memory 903, a communication bus 904, a transmitter 905, and a receiver 906; wherein, the processor 901, the communication interface 902, the receiver 906, the transmitter 905 and the memory 903 are communicated with each other through the communication bus 904.
The processor 901 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention.
The memory 903 is used to store program code, including computer operating instructions. The memory 903 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The processor 901 is used to call program code in the memory 903. The method specifically comprises the following steps:
the processor 901 is configured to obtain a first identifier ID of the service packet.
Wherein, the ID is used for identifying the query stage and the query mode of the service message.
Specifically, the processor 901 is specifically configured to receive a service packet through the ingress interface, and parse the service packet to obtain a first ID of the service packet. At this time, the acquired first ID is an ID related to the first forwarding flow table to be searched in the process of forwarding the service packet.
Alternatively, the first ID may be acquired by a forwarding flow table of the last stage of the query.
Further, the query mode identified by the first ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
Wherein the arbitrary matching search comprises: the random matching search of the IPv4 (Internet Protocol Version4, fourth Version Internet Protocol) service packet and the random matching search of the IPv6 (Internet Protocol Version6, sixth Version Internet Protocol) service packet.
The longest match lookup includes: the longest matching search of the IPv4 service message and the longest matching search of the IPv6 service message.
The exact match lookup includes: and the accurate matching search of the IPv4 service message and the accurate matching search of the IPv6 service message.
It should be noted that the query mode marked by the first ID may also be other modes, and the present invention is not limited to this.
Furthermore, the method for identifying the query stage and the query mode of the service packet by the ID may be to indicate the first identification bit of the ID to the query stage of the service packet and indicate the second identification bit of the ID to the query mode.
Processor 901 is further configured to determine whether the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID.
It should be noted that, determining whether the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID, is to determine whether the query phase identified by the first ID is a query phase after the query phase identified by the second ID obtained before the query phase identified by the first ID.
Specifically, the processor 901 is specifically configured to determine that the query phase identified by the first ID is higher than the query phase identified by the second ID when the first ID of the service packet is obtained by analyzing the service packet, and the query phase identified by the second ID is empty.
If the processor 901 obtains the first ID through the forwarding flow table, if the ID corresponding to the forwarding flow table recording the first ID is the second ID, it needs to determine whether the query phase identified by the first ID is the query phase after the query phase identified by the second ID.
If the query phase identified by the first ID is a query phase after the query phase identified by the second ID, it may be determined that the query phase identified by the first ID is higher than the query phase identified by the second ID. If the query phase identified by the first ID is not the query phase after the query phase identified by the second ID, it may be determined that the query phase identified by the first ID is not higher than the query phase identified by the second ID.
The processor 901 is further configured to determine a first forwarding flow table according to the first ID if it is determined that the query phase identified by the first ID is higher than the query phase identified by the second ID obtained before the query phase identified by the first ID.
It should be noted that, since the ID can identify the query stage and the query mode of the service forwarding packet, the first ID can identify the first query stage and the first query mode of the service packet. In each query stage, each query mode only corresponds to one forwarding flow table, so that the first forwarding flow table can be uniquely determined through the first ID.
The processor 901 is further configured to obtain a first keyword key according to the query mode identified by the first ID.
Specifically, the processor 901 is specifically configured to, after obtaining the first ID, obtain, according to the query manner identified by the first ID, a first key corresponding to the query manner identified by the first ID from the service message.
Illustratively, if the service packet is an IPv4 service packet, and the query mode identified by the first ID is any matching lookup, the first key required by any matching lookup is a quintuple, including: source IP address (SrcIP), destination IP address (DstIP), source port number (SrcPort), destination port number (DstPort), and Protocol number (Protocol). When determining that the query mode identified by the first ID is any matching search, the obtaining unit 401 obtains the first key corresponding to the query mode identified by the first ID from the service message, that is, obtains the quintuple as the first key from the service message, and includes: a source IP address, a destination IP address, a source port number, a destination port number, and a protocol number.
The processor 901 is further configured to search a first forwarding flow table according to the first key, and determine whether there is a matching entry matching with the first key in the first forwarding flow table.
As described in the above example, the first key acquired by the processor 901 is a five-tuple including: and querying the first forwarding flow table according to the quintuple so as to determine whether a matching table item matched with the first key acquired from the service message exists in the first forwarding flow table. That is, it is determined whether there is a matching entry in the first forwarding flow table that matches the quintuple obtained from the service message.
Further, a first forwarding flow table is searched according to the first key, and if an entry matched with the first key is found in the first forwarding flow table, it is indicated that a matched entry exists in the first forwarding flow table. And if the entry matched with the first key is not found in the first forwarding flow table, indicating that no matched entry exists in the first forwarding flow table.
The processor 901 is further configured to, when there is no matching entry matching the first key in the first forwarding flow table, establish a new entry matching the first key in the first forwarding flow table according to the service packet.
And recording first processing data in the new table entry.
Specifically, the process of establishing the new table entry is different according to whether the first forwarding flow table is the last forwarding flow table for forwarding the service packet. Wherein,
when the first forwarding flow table is not the last forwarding flow table searched when the service packet is forwarded in the forwarding process of the service packet, the first processing data includes: and the third ID of the service message.
Wherein the third ID is an ID identifying a next query phase after the query phase identified by the first ID.
Specifically, if it is determined that there is no entry matching with the first key in the entries of the first forwarding flow table, the processor 901 indicates that the existing forwarding flow table does not support forwarding of the service packet. At this time, the processor 901 obtains the configuration information of the service packet by analyzing the service packet, so that the ID of the next query stage that needs to be performed after searching the first forwarding flow table can be obtained according to the configuration information of the service packet, that is, the third ID is obtained. Processor 901 establishes a matching entry matching the first key in the first forwarding flow table, and records the third ID as the first processing data of the matching entry in the matching entry.
Further, the query phase identified by the third ID is higher than the query phase identified by the first ID.
When the first forwarding flow table is a last forwarding flow table searched when the service packet is forwarded in a forwarding process of the service packet, the first processing data includes: the instructions are processed.
Specifically, if it is determined that there is no entry matching with the first key in the entries of the first forwarding flow table, the processor 901 indicates that the existing forwarding flow table does not support forwarding of the service packet. At this time, the processor 901 obtains the configuration information of the service packet according to the service packet, so that it can obtain, according to the configuration information of the service packet, that the first forwarding flow table is the last forwarding flow table searched when forwarding the service packet in the forwarding process of the service packet, and obtain a processing instruction for processing the service packet. At this time, the processor 901 establishes a matching entry matching the first key in the first forwarding flow table, and records the processing instruction as the first processing data of the matching entry in the matching entry.
A transmitter 905, configured to send relevant information of the new entry of the first forwarding flow table to a forwarding device, so that the forwarding device forwards the service packet according to the new entry of the first forwarding flow table.
Further, the receiver 906 is configured to receive the service packet sent by the forwarding device.
The processor 901 is further configured to parse the service packet received by the receiver 906, and acquire configuration information of the service packet.
Wherein, the configuration information identifies the forwarding process of forwarding the service message.
At this time, the processor 901 is configured to obtain the first identifier ID of the service packet specifically as follows: the processor 901 is specifically configured to obtain a first identifier ID of the service packet according to the configuration information of the service packet. Or, the processor 901 is specifically configured to obtain the first ID from the information recorded in the entry of the third forwarding flow table.
Further, the processor 901 is further configured to, when it is determined that there is a matching entry matching with the first key in the first forwarding flow table, obtain first processing data in the matching entry, and process the service packet according to the first processing data.
Specifically, if the first forwarding flow table is not the last forwarding flow table for forwarding the service packet, the first processing data includes a third ID corresponding to a next forwarding flow table to be searched when the service packet is forwarded. That is, the first processing data includes: and after the query stage identified by the first ID is identified, the ID of the next query stage is the third ID.
Wherein the third ID is an ID identifying a next query phase after the query phase identified by the first ID.
If the first forwarding flow table is the last forwarding flow table for forwarding the service packet, the first processing data includes: the instructions are processed.
The processor 901 performs different processing actions on the service packet according to different acquired first processing data.
The processor 901 is specifically configured to, if the acquired first processing data includes: and acquiring the third ID of the service message from the matching table entry according to the third ID of the service message. Determining whether the query phase identified by the third ID is higher than the query phase identified by the first ID. And under the condition that the query stage identified by the third ID is higher than the query stage identified by the first ID, determining a second forwarding flow table according to the third ID of the service message. And acquiring a second key according to the query mode identified by the third ID. And searching a second forwarding flow table according to the second key, and determining whether a matching table item matched with the second key exists in the second forwarding flow table. And if the second forwarding flow table is determined to have a matching table entry matched with the second key, second processing data is acquired from the matching table entry, and the service message is processed according to the second processing data.
That is, the first processing data acquired by the processor 901 includes: when the third ID of the service packet indicates that the service packet needs to be forwarded according to the third ID, the processor 901 triggers a process of forwarding the service packet according to the third ID, which may specifically refer to a process of forwarding the service packet according to the first ID, and is not described herein again.
Further, the query manner identified by the third ID includes: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
The query mode identified by the third ID may be the same as the query mode identified by the first ID. Since the query phase identified by the first ID is different from the query phase identified by the third ID, the first forwarding flow table corresponding to the first ID and the second forwarding flow table corresponding to the third ID are different forwarding flow tables. If the query mode identified by the third ID is the same as the query mode identified by the first ID, it is determined that the first forwarding flow table and the second forwarding flow table are forwarding flow tables having the same query mode in different query stages.
Further, if the first identification bit of the ID identifies the query stage of the service packet and the second identification bit identifies the query mode of the service packet, the first identification bit of the first ID is different from the first identification bit of the third ID and the second identification bit is the same under the condition that the query mode identified by the third ID is the same as the query mode identified by the first ID. And under the condition that the query mode identified by the third ID is different from the query mode identified by the first ID, the first ID is different from the first identification position of the third ID, and the second identification position is different.
If the acquired first processing data comprises: and processing the instruction, namely acquiring the processing instruction from the matching table entry, and processing the service message according to the processing instruction.
That is, the first processing data acquired by the processor 901 includes: when the instruction is processed, the first forwarding flow table is the last forwarding flow table for forwarding the service packet, and at this time, the processor 901 may process the service packet according to the processing instruction included in the acquired first processing data, thereby completing forwarding of the service packet.
The embodiment of the invention provides a controller, which is used for acquiring a first ID of a service message, and determining whether an inquiry stage identified by the first ID is higher than an inquiry stage identified by a second ID acquired before the inquiry stage identified by the first ID; when the query stage identified by the first ID is higher than the query stage identified by the first ID and the query stage identified by the second ID is obtained, determining a first forwarding flow table according to the first ID, obtaining a first key according to the query mode of the first forwarding flow table identified by the first ID, searching the first forwarding flow table according to the first key, and if the first forwarding flow table is determined to have no matched table entry matched with the first key, establishing a new table entry matched with the first key in the first forwarding flow table according to the service message; first processing data is recorded in the new table entry; and sending the related information of the new entry of the first forwarding flow table to forwarding equipment, so that the forwarding equipment forwards the service message according to the new entry of the first forwarding flow table. Thus, before establishing a matching table item matched with a first key, the controller needs to determine whether an inquiry stage of an acquired first ID is higher than an inquiry stage of a second ID acquired before the inquiry stage of the first ID, and only when the inquiry stage of the first ID is higher than the inquiry stage of the second ID acquired before the inquiry stage of the first ID, the controller detects that no matching item matched with the first key exists in a first forwarding flow table, establishes a matching table item matched with the first key, and sends related information of the newly established matching table item to the forwarding device, so that forwarding flow tables of different inquiry stages are only queried once in a service message forwarding process, normal forwarding of service messages is guaranteed when the service messages are forwarded, and a searching sequence is guaranteed without using an additional mechanism, thereby reducing the complexity of forwarding the service message.
An embodiment of the present invention provides a system for forwarding a packet, as shown in fig. 10, including: a forwarding device 1001 and a controller 1002.
The forwarding device 1001 is the forwarding device described in the above embodiments.
The controller 1002 is the controller described in the above embodiments.
The embodiment of the invention provides a method, a device and a system for forwarding a message.A forwarding device acquires a first ID of a service message, and determines whether an inquiry stage identified by the first ID is higher than an inquiry stage identified by a second ID acquired before the inquiry stage identified by the first ID; when the query stage identified by the first ID is higher than the query stage identified by the first ID and the query stage identified by the second ID is obtained before the query stage identified by the first ID, determining a first forwarding flow table according to the first ID, obtaining a first key according to the query mode of the first forwarding flow table identified by the first ID, searching the first forwarding flow table according to the first key, if the first forwarding flow table is determined to have a matching table entry matched with the first key, obtaining first processing data from the matching table entry, and processing the service message according to the first processing data. And if the first forwarding flow table is determined to have no matching table entry matched with the first key, the service message is sent to the controller, and the controller acquires the relevant forwarding information of the service message. Therefore, when the forwarding device receives the service message, the forwarding device can acquire the first ID of the service message, so that whether the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID can be determined, and when the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, the forwarding device determines the first forwarding flow table according to the first ID and forwards the service message according to the first forwarding flow table. Therefore, in the process of forwarding the service message, the forwarding flow tables at different query stages are ensured to be queried only once, so that the normal forwarding of the service message is ensured when the service message is forwarded, and the searching sequence is ensured without using an additional mechanism, thereby reducing the complexity of forwarding the service message. When a new service message is received, the new service message can be sent to the controller, the controller can establish a corresponding new entry in the forwarding flow table according to the new service message, and send the related information of the entry of the newly established forwarding flow table to the forwarding device, so that the forwarding device processes the new service message according to the information recorded in the entry, the forwarding flow of the forwarding device does not need to be rewritten, the complexity of forwarding the service message is further reduced, and the performance of the system is improved.
In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be physically included alone, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (33)

1. A method for forwarding a message, comprising:
acquiring a first identification ID of a service message, wherein the ID is used for identifying an inquiry stage and an inquiry mode of the service message;
determining whether the query phase identified by the first ID is higher than the query phase identified by a second ID obtained before the query phase identified by the first ID;
if the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, determining a first forwarding flow table according to the first ID;
acquiring a first keyword key according to the query mode identified by the first ID;
searching a 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;
if the first forwarding flow table is determined to have a matching table entry matched with the first key, first processing data is obtained from the matching table entry, and the service message is processed according to the first processing data.
2. The method of claim 1, wherein the first processing data comprises: a third ID of the service packet; wherein the third ID is the ID of the next query stage after the query stage identified by the first ID;
the obtaining of the first processing data from the matching table entry, and according to the first processing data, processing the service packet includes:
acquiring a third ID of the service message from the matching table entry;
determining whether the query phase identified by the third ID is higher than the query phase identified by the first ID;
if the query stage identified by the third ID is higher than the query stage identified by the first ID, determining a second forwarding flow table according to the third ID of the service message;
acquiring a second key according to the query mode identified by the third ID;
searching a second forwarding flow table according to the second key, and determining whether a matching table item matched with the second key exists in the second forwarding flow table;
if the second forwarding flow table is determined to have a matching table entry matched with the second key, second processing data is obtained from the matching table entry, and the service message is processed according to the second processing data.
3. The method of claim 2, wherein the query identified by the third ID comprises: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
4. The method of claim 1, wherein the first processing data comprises: processing the instruction;
the obtaining of the first processing data from the matching table entry, and according to the first processing data, processing the service packet includes:
and acquiring the processing instruction from the matching table entry, and processing the service message according to the processing instruction.
5. The method according to any one of claims 1-4, further comprising:
if it is determined that there is no matching entry matched with the first key in the first forwarding flow table, sending the service message to a controller, so that the controller determines a forwarding flow of the service message;
and receiving the related information of the new entry of the first forwarding flow table sent by the controller.
6. The method of claim 1, wherein the query identified by the first ID comprises: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
7. A method for forwarding a message, comprising:
acquiring a first identification ID of a service message, wherein the ID is used for identifying an inquiry stage and an inquiry mode of the service message;
determining whether the query phase identified by the first ID is higher than the query phase identified by a second ID obtained before the query phase identified by the first ID;
if the query stage identified by the first ID is higher than the query stage identified by the second ID acquired before the query stage identified by the first ID, determining a first forwarding flow table according to the first ID;
acquiring a first keyword key according to the query mode of the first forwarding flow table identified by the first ID;
searching a 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;
if it is determined that there is no matching entry matching the first key in the first forwarding flow table, establishing a new entry matching the first key in the first forwarding flow table according to the service packet; first processing data is recorded in the new table entry;
and sending the related information of the new entry of the first forwarding flow table to forwarding equipment, so that the forwarding equipment forwards the service message according to the new entry of the first forwarding flow table.
8. The method of claim 7, wherein when the first forwarding flow table is not a last forwarding flow table searched for when forwarding a service packet in a forwarding process of the service packet, the first processing data comprises: a third ID of the service packet; the third ID is the ID that identifies the next query phase after the query phase identified by the first ID.
9. The method of claim 7, wherein when the first forwarding flow table is a last forwarding flow table searched for when forwarding the service packet in a forwarding process of the service packet, the first processing data comprises: the instructions are processed.
10. The method according to any one of claims 7 to 9, wherein before the obtaining the first identifier ID of the service packet, the method further comprises:
receiving a service message sent by forwarding equipment;
analyzing the service message, and acquiring configuration information of the service message; and identifying the forwarding process of forwarding the service message in the configuration information.
11. The method according to claim 10, wherein the obtaining the first identifier ID of the service packet comprises:
and acquiring a first identification ID of the service message according to the configuration information of the service message.
12. The method according to claim 10, wherein the obtaining the first identifier ID of the service packet comprises:
and acquiring the first ID in the information recorded in the table entry of the third forwarding flow table.
13. The method of claim 7, further comprising:
if the matching table entry matched with the first key is determined in the first forwarding flow table, first processing data is obtained from the matching table entry, and the service message is processed according to the first processing data.
14. The method of claim 13, wherein the first processing data comprises: a third ID of the service packet;
the obtaining of the first processing data from the matching table entry, and according to the first processing data, processing the service packet includes:
acquiring a third ID of the service message from the matching table entry;
determining whether the query phase identified by the third ID is higher than the query phase identified by the first ID;
if the query stage identified by the third ID is higher than the query stage identified by the first ID, determining a second forwarding flow table according to the third ID of the service message;
acquiring a second key according to the query mode identified by the third ID;
searching a second forwarding flow table according to the second key, and determining whether a matching table item matched with the second key exists in the second forwarding flow table;
and if the matched table entry is found, acquiring second processing data in the matched table entry, and processing the service message according to the second processing data.
15. The method of claim 14, wherein the query identified by the third ID comprises: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
16. The method of claim 13, wherein the first processing data comprises: processing the instruction;
the obtaining of the first processing data from the matching table entry, and according to the first processing data, processing the service packet includes:
and acquiring the processing instruction from the matching table entry, and processing the service message according to the processing instruction.
17. The method of claim 7, wherein the query identified by the first ID comprises: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
18. A forwarding device, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first identification ID of a service message, and the ID is used for identifying the query stage and the query mode of the service message;
a determining unit, configured to determine whether the query phase identified by the first ID acquired by the acquiring unit is higher than a query phase identified by a second ID acquired before the query phase identified by the first ID;
the determining unit is further configured to determine a first forwarding flow table according to the first ID if it is determined that the query stage identified by the first ID is higher than the query stage identified by the second ID obtained before the query stage identified by the first ID;
the acquiring unit is further configured to acquire a first keyword key according to the query mode identified by the first ID;
the determining unit is further configured to search a first forwarding flow table according to the first key acquired by the acquiring unit, and determine whether a matching entry matching the first key exists in the first forwarding flow table;
and the processing unit is used for acquiring first processing data from the matching table entry under the condition that the determining unit determines that the first forwarding flow table has the matching table entry matched with the first key, and processing the service message according to the first processing data.
19. The forwarding device of claim 18, wherein the first processing data comprises: a third ID of the service packet; wherein the third ID is the ID of the next query stage after the query stage identified by the first ID;
the processing unit is specifically configured to trigger the obtaining unit to obtain a third ID of the service packet in the matching entry;
triggering the determining unit to determine whether the query phase identified by the third ID acquired by the acquiring unit is higher than the query phase identified by the first ID;
triggering the determining unit to determine a second forwarding flow table according to the third ID of the service packet under the condition that the query stage identified by the third ID is higher than the query stage identified by the first ID;
triggering the acquisition unit to acquire a second key according to the query mode identified by the third ID;
triggering the determining unit to search a second forwarding flow table according to the second key acquired by the acquiring unit, and determining whether a matching table entry matched with the second key exists in the second forwarding flow table;
and if the determining unit determines that the second forwarding flow table has a matching table entry matched with the second key, acquiring second processing data from the matching table entry, and processing the service packet according to the second processing data.
20. The forwarding device of claim 18, wherein the first processing data comprises: processing the instruction;
the processing unit is specifically configured to obtain the processing instruction from the matching entry, and process the service packet according to the processing instruction.
21. The forwarding device of any one of claims 18-20, further comprising: a receiving unit;
the processing unit is further configured to, if the determining unit determines that there is no matching entry matching the first key in the first forwarding flow table, send the service packet to a controller, so that the controller determines a forwarding flow of the service packet;
the receiving unit is configured to receive the relevant information of the new entry of the first forwarding flow table sent by the controller.
22. The forwarding device of claim 18, wherein the query identified by the first ID comprises: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
23. A controller, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first identification ID of a service message, and the ID is used for identifying the query stage and the query mode of the service message;
a determining unit, configured to determine whether the query phase identified by the first ID acquired by the acquiring unit is higher than a query phase identified by a second ID acquired before the query phase identified by the first ID;
the determining unit is further configured to determine a first forwarding flow table according to the first ID if it is determined that the query stage identified by the first ID is higher than the query stage identified by the second ID obtained before the query stage identified by the first ID;
the obtaining unit is further configured to obtain a first keyword key according to the query mode of the first forwarding flow table identified by the first ID;
the determining unit is further configured to search a first forwarding flow table according to the first key acquired by the acquiring unit, and determine whether a matching entry matching the first key exists in the first forwarding flow table;
the processing unit is configured to, when the determining unit determines that there is no matching entry matching the first key in the first forwarding flow table, establish a new entry matching the first key in the first forwarding flow table according to the service packet; first processing data is recorded in the new table entry;
a sending unit, configured to send relevant information of the new entry of the first forwarding flow table to a forwarding device, so that the forwarding device forwards the service packet according to the new entry of the first forwarding flow table.
24. The controller according to claim 23, wherein when the first forwarding flow table is not a last forwarding flow table searched for when forwarding a service packet in a forwarding process of the service packet, the first processing data includes: a third ID of the service packet; the third ID is the ID that identifies the next query phase after the query phase identified by the first ID.
25. The controller according to claim 23, wherein when the first forwarding flow table is a last forwarding flow table searched when forwarding the service packet in a forwarding process of the service packet, the first processing data includes: the instructions are processed.
26. The controller according to any one of claims 23-25, further comprising:
a receiving unit, configured to receive a service packet sent by a forwarding device;
the acquiring unit is further configured to analyze the service packet received by the receiving unit, and acquire configuration information of the service packet; and identifying the forwarding process of forwarding the service message in the configuration information.
27. The controller of claim 26,
the obtaining unit is specifically configured to obtain a first identifier ID of the service packet according to the configuration information of the service packet.
28. The controller of claim 26,
the obtaining unit is specifically configured to obtain the first ID from information recorded in an entry of the third forwarding flow table.
29. The controller of claim 23,
the processing unit is further configured to, when the determining unit determines that there is a matching entry matching the first key in the first forwarding flow table, obtain first processing data in the matching entry, and process the service packet according to the first processing data.
30. The controller of claim 29,
the first processing data includes: a third ID of the service packet;
the processing unit is specifically configured to trigger the obtaining unit to obtain a third ID of the service packet in the matching entry;
triggering the determining unit to determine whether the query phase identified by the third ID acquired by the acquiring unit is higher than the query phase identified by the first ID;
triggering the determining unit to determine a second forwarding flow table according to the third ID of the service packet when determining that the query stage identified by the third ID is higher than the query stage identified by the first ID;
triggering the acquisition unit to acquire a second key according to the query mode identified by the third ID;
triggering the determining unit to search a second forwarding flow table according to the second key acquired by the acquiring unit, and determining whether a matching table entry matched with the second key exists in the second forwarding flow table;
and if the determining unit determines that the second forwarding flow table has a matching table entry matched with the second key, acquiring second processing data from the matching table entry, and processing the service packet according to the second processing data.
31. The controller of claim 29, wherein the first processing data comprises: processing the instruction;
the processing unit is specifically configured to obtain the processing instruction from the matching entry, and process the service packet according to the processing instruction.
32. The controller according to claim 23, wherein the query identified by the first ID comprises: an arbitrary match lookup, or a longest match lookup, or an exact match lookup, or a linear table lookup.
33. A system for forwarding a message, comprising: a forwarding device and a controller;
the forwarding device is the forwarding device of any one of claims 18-22;
the controller is as claimed in any one of claims 23 to 32.
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 CN103581020A (en) 2014-02-12
CN103581020B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099913B (en) * 2014-04-21 2018-07-20 新华三技术有限公司 A kind of message forwarding method and equipment
CN105490946A (en) * 2014-09-18 2016-04-13 中兴通讯股份有限公司 Flow table processing method and device, open flow controller, and open flow switch
CN107005478B (en) * 2014-12-09 2020-05-08 华为技术有限公司 Adaptive flow table processing method and device
CN105991444B (en) * 2015-08-06 2019-05-07 杭州迪普科技股份有限公司 The method and apparatus of business processing

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

Also Published As

Publication number Publication date
CN103581020A (en) 2014-02-12

Similar Documents

Publication Publication Date Title
US12015554B2 (en) Service routing packet processing method and apparatus, and network system
CN104022953B (en) Message forwarding method and device based on open flows Openflow
CN102938794B (en) ARP message forwarding method, switch and controller
US9444743B2 (en) Network system, switch and connected terminal detection method
CN105024985B (en) A kind of message processing method and device
CN110324245B (en) Method and device for forwarding message based on integrated flow table
CN106878194B (en) Message processing method and device
US20200403849A1 (en) Service fault locating method and apparatus
CN108737221B (en) Packet loss detection method and communication link system
EP3657742A1 (en) Method and apparatus for processing modified packet
CN106685827B (en) Downlink message forwarding method and AP (access point) equipment
CN103581020B (en) The method of a kind of message forwarding, Apparatus and system
EP3179687A1 (en) Network flow information statistics method and apparatus
US20180270152A1 (en) Packet processing
CN111614505B (en) Message processing method and gateway equipment
US8914503B2 (en) Detected IP link and connectivity inference
US9749262B2 (en) Packet processing method and forwarding element
CN112702254B (en) Message processing method and device and electronic equipment
US20230041395A1 (en) Method and Device for Processing Routing Table Entries
CN105515995A (en) Message processing method and apparatus, and flow table generation method and apparatus
CN110581792B (en) Message transmission method and device
CN108777654B (en) Message forwarding method and routing equipment
CN103607350A (en) Method and device for generating route
CN108574637B (en) Address self-learning method and device and switch
CN103841083B (en) Strengthen the method and device of message recognition capability

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