CN105765922A - Flow entry processing method and apparatus - Google Patents

Flow entry processing method and apparatus Download PDF

Info

Publication number
CN105765922A
CN105765922A CN201480040608.5A CN201480040608A CN105765922A CN 105765922 A CN105765922 A CN 105765922A CN 201480040608 A CN201480040608 A CN 201480040608A CN 105765922 A CN105765922 A CN 105765922A
Authority
CN
China
Prior art keywords
flow
entry
matching
unit
flow table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201480040608.5A
Other languages
Chinese (zh)
Other versions
CN105765922B (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.)
Honor Device Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN105765922A publication Critical patent/CN105765922A/en
Application granted granted Critical
Publication of CN105765922B publication Critical patent/CN105765922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A flow entry processing method and apparatus relate to the technical field of communications, and are used for solving the problem that a flow entry of a software unit in an OpenFlow switch is inconsistent with a flow entry of a hardware unit. The method includes: (S101) receiving, by an OpenFlow switch, routing information sent by a controller; (S102) converting the routing information into a newly-built flow entry; (S103) matching a matching domain of the newly built flow entry with a matching domain of a stored data flow, and determining a matching domain of a data flow forwarded by using the newly-built flow entry, wherein the matching domain of the stored data flow is a matching domain of a data flow forwarded via a flow entry stored by a hardware unit; and (S104) when the matching domain of the data flow forwarded by using the newly-built flow entry is determined, adding the newly-built flow entry into the hardware unit. The flow entry processing method and apparatus can be applied to an OpenFlow switch having a higher requirement on data transmission performance.

Description

Flow table entry processing method and device Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a flow table entry processing method and device.
Background
The OpenFlow technology separates two functional modules of data forwarding and routing control of a network transmission device (such as a Switch, a router, and the like), and manages and configures an OpenFlow Switch (OpenFlow Switch) through a centralized Controller (Controller).
In the prior art, for data transmission based on the OpenFlow technology, a transmission device usually adopts a three-unit data processing architecture, which is a software unit, an adaptation unit, and a hardware unit. The controller configures a route for the transmission data stream and issues the route information to the software unit of the transmission device. The routing information of the data flow is recorded in a data flow table (FlowTable) of the software unit, the data flow table is composed of flow table entries of a hierarchical structure, and each flow table entry corresponds to a routing forwarding rule.
The flow table entry includes a Match field (Match Fields) for recording an identification of the flow table entry and an instruction (Actions) for recording an operation that should be performed by the data flow that matches the identification of the flow table entry. In the data transmission process, a transmission data flow reaches an OpenFlow switch, the OpenFlow switch searches a flow table item matched with the data flow in a hardware unit at first, when the flow table item cannot be searched, the data flow is reported to a software unit, the flow table item matched with the data flow is searched in the software unit, and the searched flow table item is mapped to the hardware unit through an adaptation unit, so that the data flow is forwarded in the hardware unit.
However, if the hardware unit has a flow entry matching the transmission data flow, the transmission data cannot be reported to the software unit, and the OpenFlow switch cannot search the flow entry matching the transmission data flow in the software unit, so that other flow entries matching the transmission data flow issued to the software unit by the controller cannot be issued to the hardware unit continuously, and take effect in the hardware unit. For example, table 1 is an exemplary hardware unit stream table entry, and as can be seen from table 1, the priority of a data stream with matching ethtype ═ 0x0800, dstip ═ 2.1.2.2, and srcip ═ 2.1.2.1 is 1. Table 2 is an exemplary table of the software unit stream entries, and as can be seen from table 2, the data stream with inport equal to 1 has a priority of 2. Wherein, the larger the priority value, the higher the priority value. When a data flow with matching ethtpype of 0x0800, dstip of 2.1.2.2, srcip of 2.1.2.1, and inport of 1 arrives at the OpenFlow switch, because the flow table entry shown in table 1 is already in effect in the hardware unit, the OpenFlow switch directly forwards the data flow according to the flow table entry shown in table 1, and does not report the data flow to the software unit, the flow table entry shown in table 2 cannot be in effect in the hardware unit.
TABLE 1 exemplary hardware Unit flow entry Table
TABLE 2 exemplary software Unit flow entry Table
Matching domains Instructions Priority level
inport:1 output:2 2
It can be seen that the above flow entry processing method has a problem that the flow entry of the software unit and the flow entry of the hardware unit are not consistent.
Disclosure of Invention
Embodiments of the present invention provide a flow entry processing method and apparatus, so as to solve a problem that a flow entry of a software unit in an OpenFlow switch is inconsistent with a flow entry of a hardware unit.
In order to achieve the above purpose, the following technical solutions are adopted in the embodiments of the present invention
In a first aspect, an embodiment of the present invention provides a flow entry processing method, which is applied to an OpenFlow switch for OpenFlow, where the OpenFlow switch includes a hardware unit, and the hardware unit is configured to store a flow entry of a data flow directly forwarded by a hardware interface of the OpenFlow switch, and the method includes:
the OpenFlow switch receives routing information sent by the controller;
converting the routing information into a new flow table entry;
matching the matching domain of the newly-built flow table entry by using the matching domain of the stored data flow, and determining the matching domain of the data flow forwarded by using the newly-built flow table entry; wherein, the matching field of the stored data flow is the matching field of the data flow forwarded by the flow table entry stored by the hardware unit;
and when the matching domain of the data flow forwarded by using the newly-built flow entry is determined, adding the newly-built flow entry into the hardware unit of the OpenFlow switch.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the OpenFlow switch further includes: a software unit for converting the routing information into a flow table entry and storing the flow table entry; and an adaptation unit for converting the format of the flow table entry converted by the software unit into the format recognized by the hardware unit;
further, the converting the routing information into a newly-created flow entry includes: the software unit converts the routing information into a new flow table entry in a first format;
further, the adding the new flow entry to the hardware unit of the OpenFlow switch includes:
the adaptation unit converts the new flow table entry in the first format into a new flow table entry in a second format that can be recognized by the hardware unit;
adding the newly created flow entry in the second format to the hardware unit of the OpenFlow switch.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner, the method further includes:
matching the matching domain of the flow table entry stored in the software unit by using the determined matching domain of the data flow to obtain a matching flow table entry in a first format;
the adaptation unit converts the matching flow table entry in the first format into a matching flow table entry in a second format;
and deleting the matching flow table entry in the second format in the hardware unit.
With reference to the first aspect, or the second possible implementation manner of the first aspect, in a third possible implementation manner, the priority of the newly-created flow entry is higher than the priority of the matching flow entry.
With reference to the first aspect, or the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, or the third possible implementation manner of the first aspect, in a fourth possible implementation manner, the matching domain includes: at least one of message type, port number, source hardware access control MAC address, destination MAC address, source internet protocol IP address, destination IP address, and VLAN information.
In a second aspect, an embodiment of the present invention provides a flow entry processing apparatus, which is applied to an OpenFlow switch for OpenFlow, where the OpenFlow switch includes a hardware unit, and the hardware unit is configured to store a flow entry of a data flow directly forwarded by a hardware interface of the OpenFlow switch, where the apparatus includes:
the receiving module is used for receiving the routing information sent by the controller;
the conversion module is used for converting the routing information into a new flow table entry;
the matching module is used for matching the matching domain of the newly-built flow table entry by using the matching domain of the stored data flow and determining the matching domain of the data flow forwarded by using the newly-built flow table entry; wherein, the matching field of the stored data flow is the matching field of the data flow forwarded by the flow table entry stored by the hardware unit;
and the adding module is used for adding the newly-built flow entry into the hardware unit of the OpenFlow switch when the matching domain of the data flow forwarded by using the newly-built flow entry is determined.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the OpenFlow switch further includes: a software unit for converting the routing information into a flow table entry and storing the flow table entry; and an adaptation unit for converting the format of the flow table entry converted by the software unit into the format recognized by the hardware unit;
further, the software unit is specifically configured to convert the routing information into a new flow entry in a first format;
further, the adaptation unit is specifically configured to convert the new flow entry in the first format into a new flow entry in a second format that can be recognized by the hardware unit;
the adding module is specifically configured to add the newly-created flow entry in the second format to the hardware unit of the OpenFlow switch.
With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner, the matching module is further configured to match the matching field of the flow entry stored in the software unit with the determined matching field of the data flow, so as to obtain a matching flow entry in a first format;
the adaptation unit specifically converts the matching flow entry in the first format into a matching flow entry in a second format;
the apparatus further includes a deletion module configured to delete the matching flow entry in the second format in the hardware unit.
With reference to the second aspect, or the second possible implementation manner of the second aspect, in a third possible implementation manner, the priority of the new flow entry is higher than the priority of the matching flow entry.
With reference to the second aspect or the first possible implementation manner of the second aspect, or the second possible implementation manner of the second aspect, or the third possible implementation manner of the second aspect, in a fourth possible implementation manner, the matching domain includes: at least one of message type, port number, source hardware access control MAC address, destination MAC address, source internet protocol IP address, destination IP address, and VLAN information.
According to the technical scheme provided by the embodiment of the invention, after receiving routing information sent by a controller, an OpenFlow switch converts the routing information into a newly-built flow table item, and determines a matching domain of a data flow forwarded by using the newly-built flow table item by matching a matching domain of a stored data flow with a matching domain of the newly-built flow table item.
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 flowchart of a first embodiment of a method for processing flow entries according to the present invention;
FIG. 2 is a schematic diagram of an embodiment of a system for processing flow entries provided by the present invention;
FIG. 3 is a flowchart of a second embodiment of a flow entry processing method according to the present invention;
FIG. 4 is a flowchart illustrating a first embodiment of generating description information of a data stream in a description unit according to the present invention;
fig. 5 is a flowchart of a third embodiment of a flow entry processing method according to the present invention;
fig. 6 is a flowchart of a fourth embodiment of the flow entry processing method according to the present invention;
FIG. 7 is a flowchart of a second embodiment of generating description information of a data stream in a description unit according to the present invention;
fig. 8 is a schematic structural diagram of an embodiment of a flow entry processing apparatus according to the present invention;
fig. 9 is a schematic structural diagram of an embodiment of a flow entry processing device 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.
The flow table item processing method provided by the embodiment of the invention can be applied to an OpenFlow switch, wherein the OpenFlow switch comprises a hardware unit, and the hardware unit is used for storing the flow table item of the data flow directly forwarded by a hardware interface of the OpenFlow switch.
Fig. 1 is a flowchart of a first embodiment of a flow entry processing method according to the present invention, and as shown in fig. 1, the method of this embodiment may include the following steps.
And S101, the OpenFlow switch receives the routing information sent by the controller.
The route configuration of the transmission data flow is executed by the controller, and the controller can configure the route for the transmission data flow or update the route according to the network topology and send the route information to the switch so as to enable the switch to execute the data transmission.
S102, converting the routing information into a new flow table entry.
The routing information of the data flow is stored in the data flow table of the software unit in the form of flow table entries, and each flow table entry corresponds to one routing forwarding rule.
S103, matching the matching domain of the newly-built flow table entry by using the matching domain of the stored data flow, and determining the matching domain of the data flow forwarded by using the newly-built flow table entry, wherein the matching domain of the stored data flow is the matching domain of the data flow forwarded by using the flow table entry stored in the hardware unit.
In a specific application, by adding a description unit for storing description information of a data flow (for example, a matching field of the data flow) in an OpenFlow switch, the description information of the data flow matching with a flow table entry in a hardware unit is stored in the description unit, so that the flow table entry of a software unit and the flow table entry of the hardware unit are consistent through a bridge function of the description unit.
And S104, when the matching domain of the data flow forwarded by using the newly-built flow table entry is determined, adding the newly-built flow table entry into a hardware unit of the OpenFlow switch.
In the data transmission process, the OpenFlow switch firstly searches a flow table item matched with the data flow in the hardware unit, so that when the fact that the flow table item relevant to the newly-built flow table item exists in the hardware unit is determined, the newly-built flow table item is added into the hardware unit to ensure that the data flow is transmitted according to the latest routing information. Preferably, the priority of the newly created flow entry is higher than the priority of the matching flow entry.
In this embodiment, after receiving the routing information sent by the controller, the OpenFlow switch converts the routing information into a newly-created flow entry, and determines a matching field of the data flow forwarded by using the newly-created flow entry by matching a matching field of the stored data flow with a matching field of the newly-created flow entry, where the matching field of the stored data flow is a matching field of the data flow forwarded by using the flow entry stored in the hardware unit, and thus after determining the matching field of the data flow forwarded by using the newly-created flow entry, the newly-created flow entry is further added to the hardware unit of the OpenFlow switch, so that consistency between the flow entry of the software unit in the OpenFlow switch and the flow entry of the hardware unit is achieved.
The method as described above, wherein the OpenFlow switch further includes: a software unit for converting the routing information into a flow table entry and storing the flow table entry; and an adaptation unit for converting the format of the flow table entry converted by the software unit into a format recognized by the hardware unit. Further, converting the routing information into a newly created flow entry includes: the software unit converts the routing information into a new flow table entry in a first format, wherein the new flow table entry in the first format is a flow table entry recognizable by the software unit. Still further, adding the new flow entry to the hardware unit of the OpenFlow switch includes: the adaptation unit converts the new flow table entry in the first format into a new flow table entry in a second format, wherein the new flow table entry in the second format is a flow table entry recognizable by the hardware unit. And further, updating the latest routing information of the transmission data flow into the flow entry of the hardware unit in the OpenFlow switch by adding the newly-built flow entry in the second format into the hardware unit of the OpenFlow switch.
Fig. 2 is a schematic diagram of an embodiment of a flow entry processing system provided in the present invention. As shown in fig. 2, the system of the present embodiment may include: the controller and the OpenFlow switch, the OpenFlow switch is connected with other transmission equipment and communicates. The OpenFlow switch of this embodiment adopts a four-layer data processing architecture, and includes, in order from top to bottom, a software unit, a description unit, an adaptation unit, and a hardware unit. An explanation will now be made regarding possible operations involved in the system of the present embodiment. S201, the OpenFlow switch receives data flow messages from other transmission equipment through an input Port In Port; s202, the OpenFlow switch finds no flow table item matched with the data flow message in the hardware unit, and reports the data flow message to the software unit; s203, the OpenFlow switch does not find the flow table item matched with the data flow message in the software unit, and reports the data flow message to the controller; s204, the controller configures a route for the data flow message according to the network topology and issues route information to a software unit of the OpenFlow switch; s205, after the OpenFlow switch generates a flow entry of the data flow message according to the routing information issued by the controller, the description unit is triggered to request the software unit to obtain the flow entry of the data flow message; s206, the OpenFlow switch issues the flow table item of the data flow message to the description unit through the software unit; s207, the OpenFlow switch issues the flow table items of the data flow message to the adaptation unit through the description unit; s208, the OpenFlow switch maps the flow items of the data flow message to the hardware unit through the adaptation unit; and S209, after the hardware unit finds the flow table entry matched with the data flow message, the OpenFlow switch sends the data flow message to other transmission equipment through an output Port.
The method as described above, optionally, the method further comprising: matching the matching domain of the flow table entry stored in the software unit by using the determined matching domain of the data flow to obtain a matching flow table entry in a first format; the adaptation unit converts the matching flow table item in the first format into a matching flow table item in a second format; the matching flow entry in the second format is deleted in the hardware unit.
Fig. 3 is a flowchart of a second embodiment of a flow entry processing method according to the present invention, and as shown in fig. 3, the method of this embodiment may include the following contents.
And S301, the OpenFlow switch receives the routing information of the first data flow sent by the controller.
The first data flow may be any transmission data flow, the route configuration of the transmission data flow is executed by the controller, and the controller may configure a route or update a route for the transmission data flow according to the network topology, and send the route information to the OpenFlow switch, so that the OpenFlow switch executes data transmission.
It should be noted that the first data stream, the second data stream, and the third data stream in this document may be the same data stream, a part of the same data stream, or completely different data streams.
And S302, the OpenFlow switch generates a first flow table item of the first data flow according to the routing information, and records the first flow table item in a data flow table of the software unit.
The routing information of the data flow is recorded in the data flow table of the software unit in the form of flow table entries, and each flow table entry corresponds to one routing forwarding rule.
S303, the OpenFlow switch searches for description information of a second data flow matched with the first flow entry in the description unit, where the description unit includes description information of a data flow matched with the flow entry in the hardware unit, and the second data flow is matched with the second flow entry in the hardware unit.
The second data stream is any transmission data stream, and the process of mapping the flow table entry in the software unit to the hardware unit requires intervention of the data stream, so that the problem that the flow table entry of the software unit is inconsistent with the flow table entry of the hardware unit exists. And a description unit is arranged between the software unit and the adaptation unit, and description information of the data flow matched with the flow table item which is mapped to the hardware unit by the software unit and still exists in the hardware unit is recorded in the description unit so as to enable the flow table item of the software unit and the flow table item of the hardware unit to be consistent through the bridge action of the description unit.
And S304, the OpenFlow switch searches a third flow entry matched with the second data flow in the software unit.
And S305, the OpenFlow switch issues the third flow table item to the hardware unit through the adaptation unit.
And S306, deleting the second flow table item by the OpenFlow switch.
Specifically, a first flow entry of a first data flow corresponds to the latest routing information of the first data flow, the OpenFlow switch finds, in the description unit, description information of a second data flow that matches the first flow entry, and learns a second flow entry that matches the second data flow in the hardware unit, and since the second flow entry corresponds to outdated routing information, the second flow entry in the hardware unit needs to be deleted. In order not to affect the data stream being transmitted, it is therefore necessary to further search for a third flow entry matching the second data stream in the software unit, and delete the second flow entry in the hardware unit after the third flow entry is issued to the hardware unit through the adaptation unit.
In this embodiment, after receiving the routing information of the first data flow sent by the controller, the OpenFlow switch generates a first flow entry of the first data flow according to the routing information of the first data flow, and searches for description information of a second data flow matched with the first flow entry in the description unit, because the description unit includes the description information of the data flow matched with the flow entry in the hardware unit, a second flow entry matched with the second data flow in the hardware unit can be obtained, and then, by searching for a third flow entry matched with the second data flow in the software unit, and after issuing the third flow entry to the hardware unit through the adaptation unit, the second flow entry in the hardware unit is deleted, so that consistency between the flow entry of the software unit and the flow entry of the hardware unit is achieved. Therefore, the flow entry processing method provided by the embodiment of the present invention solves the problem that the flow entry of the software unit and the flow entry of the hardware unit in the network OpenFlow switch are not consistent, and ensures that the data flow is transmitted according to the latest routing information.
Fig. 4 is a flowchart of a first embodiment of generating description information of a data stream in a description unit according to the present invention. In this embodiment, the description unit is located between the software unit and the adaptation unit, and as shown in fig. 4, the generation of the description information of the data stream in the description unit may include:
and S401, the OpenFlow switch receives a third data flow sent by other transmission equipment.
The third data stream may be any transport data stream.
And S402, the OpenFlow switch searches a fourth flow table item matched with the third data flow in the hardware unit.
And S403, when the OpenFlow switch cannot find the fourth flow table item in the hardware unit, reporting the third data flow to the software unit.
In the data transmission process, the OpenFlow switch searches a flow table item matched with the data flow in a hardware unit at first, and reports the data flow to a software unit when the flow table item is not searched.
And S404, the OpenFlow switch searches a fourth flow table item in the software unit.
And the OpenFlow switch searches a fourth flow table item matched with the third data flow in the software unit, if the fourth flow table item cannot be searched in the software unit, the third data flow can be further reported to the controller, the controller configures a route for the third data flow and sends route information to the software unit of the OpenFlow switch, and the OpenFlow switch generates a flow table item of the third data flow according to the route information and records the flow table item in the data flow table of the software unit.
And S405, the OpenFlow switch issues the fourth flow table item found by the software unit to the hardware unit through the adaptation unit, and records the description information of the third data flow to the description unit.
And the OpenFlow switch records the description information of the third data flow to the description unit while mapping the fourth flow entry to the hardware unit through the adaptation unit, so that the description information of the data flow matched with the flow entry in the hardware unit is included in the description unit.
In this embodiment, a description unit is disposed between the software unit and the adaptation unit, and when mapping a flow entry in the software unit to the hardware unit, description information of a data flow matched with the flow entry is recorded in the description unit, so that consistency between the flow entry of the software unit and the flow entry of the hardware unit can be achieved through a bridge function of the description unit.
Fig. 5 is a flowchart of a third embodiment of the flow entry processing method according to the present invention. As shown in fig. 5, the method of this embodiment may include:
s501, the OpenFlow switch receives the routing information of the first data flow sent by the controller.
And S502, the OpenFlow switch generates a first flow table item of the first data flow according to the routing information, and records the first flow table item in the data flow table of the software unit.
S503, the OpenFlow switch searches for description information of a second data flow matched with the first flow entry in the description unit, where the description unit includes description information of a data flow matched with the flow entry in the hardware unit, and the second data flow is matched with the second flow entry in the hardware unit.
The execution methods of S501-S503 are similar to the execution methods of S301-S303 in the second embodiment, and are not described again here.
And S504, when the priority value in the first flow table entry in the software unit is greater than the priority of the second data flow in the description unit, the OpenFlow switch searches for a third flow table entry matched with the second data flow in the software unit.
And S505, the OpenFlow switch issues the third flow table item to the hardware unit through the adaptation unit.
And S506, deleting the second flow table item by the OpenFlow switch.
Specifically, a first flow entry of a first data flow corresponds to the latest routing information of the first data flow, the OpenFlow switch finds, in the description unit, description information of a second data flow matched with the first flow entry, and learns a second flow entry matched with the second data flow in the hardware unit, a priority value in the flow entry represents a priority of the data flow matched with the flow entry, and the larger the priority value is, the higher the priority is. Preferably, by further comparing the priority value in the first flow table entry with the priority of the second data flow, when the priority value in the first flow table entry is smaller than the priority of the second data flow, the first data flow is selected to continue to be transmitted according to the routing information in the second flow table entry; and when the priority value in the first flow table entry is greater than the priority of the second data flow, deleting the second flow table entry in the hardware unit, and further realizing transmission of the first data flow according to the routing information in the first flow table entry. In order not to affect the data stream being transmitted, it is therefore necessary to further search for a third flow entry matching the second data stream in the software unit, and delete the second flow entry in the hardware unit after the third flow entry is issued to the hardware unit through the adaptation unit.
In this embodiment, after receiving the routing information of the first data flow sent by the controller, the OpenFlow switch generates a first flow entry of the first data flow according to the routing information of the first data flow, further searches, in the description unit, description information of a second data flow matched with the first data flow, compares a priority value in the first flow entry with a priority of the second data flow, when the priority value in the first flow entry is greater than the priority of the second data flow, further searches, in the software unit, a third flow entry matched with the second data flow, and after sending the third flow entry to the hardware unit through the adaptation unit, deletes the second flow entry in the hardware unit, thereby implementing transmission of the first data flow according to a high priority.
In the method, preferably, the description information of the data stream in the description unit is recorded in a classified manner according to the packet type of the data stream, and the description information of the data stream with the same packet type is recorded in the data stream information table of the same type. The description information of the data stream in the description unit includes matching domain information of the data stream and priority of the data stream, and the matching domain information of the data stream includes: at least one of a packet type of the data flow, an ingress port number of the data flow, a source MAC address of the data flow, a destination MAC address of the data flow, a source IP address of the data flow, a destination IP address of the data flow, and VLAN information of the data flow.
For example, the packet types of the data flow are: ARP, IPV4, IPV4-TCP, IPV4-UDP, IPV4-ICMP, IPV4-MPLS, IPV6, IPV6-TCP, IPV6-UDP, IPV6-ICMP and IPV6-MPLS, according to the message type of the data flow, the type of the flow table item information table can be divided into: ARP, IPV4, IPV4-TCP, IPV4-UDP, IPV4-ICMP, IPV4-MPLS, IPV6, IPV6-TCP, IPV6-UDP, IPV6-ICMP and IPV 6-MPLS. Table 3 is an exemplary table of flow entry information. As shown in table 3, each row of the flow entry information table corresponds to information of one flow entry, and for the flow entry information table of ARP type, the packet type of the data flow matching the flow entry therein is ARP. Similarly, the packet type of the data flow matching the flow table entry of the IPV4 type flow table is IPV4, the packet type of the data flow matching the flow table entry of the IPV4-TCP type flow table entry is IPV4-TCP, the packet type of the data flow matching the flow table entry of the IPV4-UDP type flow table entry is IPV4-UDP, the packet type of the data flow matching the flow table entry of the IPV4-ICMP type flow table entry is IPV4-ICMP, the packet type of the data flow matching the flow table entry of the IPV4-MPLS type flow table entry is IPV4-MPLS, the packet type of the data flow matching the flow table entry of the IPV6 type flow table entry is IPV6, the packet type of the data flow matching the flow table entry of the IPV6-TCP type flow table entry is IPV 45-MPLS, and the packet type of the flow table entry of the IPV 8536 is IPV 8273736, and the packet type of the data flow matching the flow table entry of the IPV4-ICMP type flow table entry is IPV 8536 In the UDP, the message type of the data flow matched with the flow table entry of the flow table entry information table of the IPV6-ICMP type is IPV6-ICMP, and the message type of the data flow matched with the flow table entry of the flow table entry information table of the IPV6-MPLS type is IPV 6-MPLS. Each row in the table field corresponds to matching field information of one flow table entry, and may also be considered as matching identification information of a data flow matching the flow table entry.
Table 3 exemplary table of information items of flow
Figure PCTCN2014090273-APPB-000002
Figure PCTCN2014090273-APPB-000003
Figure PCTCN2014090273-APPB-000004
Figure PCTCN2014090273-APPB-000005
Fig. 6 is a flowchart of a fourth embodiment of the flow entry processing method according to the present invention. As shown in fig. 6, the method of the present embodiment may include the following.
And S601, the OpenFlow switch receives the flow entry addition message sent by the controller.
The new message sent by the controller includes the information of the route configured for the transmission data flow.
And S602, the OpenFlow switch generates a new flow-adding table item according to the message sent by the controller.
The routing information of the data flow is recorded in the data flow table of the software unit in the form of flow table entries, and each flow table entry corresponds to one routing forwarding rule.
S603, the OpenFlow switch searches the description information of the data flow in the description unit and judges whether the hardware unit has the flow table entry with the same matching domain condition as the newly added flow table entry.
For example, whether the description information of the data flow matching with the newly added flow table entry exists is searched in the description unit.
If yes, go to S604; if not, go to S605.
And S604, deleting the flow table entry which is identical to the matching domain condition of the newly added flow table entry in the hardware unit by the OpenFlow switch.
And S605, ending.
In this embodiment, the OpenFlow switch deletes the coherent flow entry in the hardware unit, so that when the data flow matched with the coherent flow entry is transmitted, the data flow is reported to the software unit, a new flow addition entry is found in the software unit, and the new flow addition entry is mapped to the hardware unit through the adaptation unit, thereby implementing the transmission of the data flow according to the routing information in the new flow addition entry.
Fig. 7 is a flowchart of a second embodiment of generating description information of a data stream in a description unit according to the present invention. As shown in fig. 7, the generation of the description information of the data stream in the description unit may include:
and S701, the OpenFlow switch receives data streams sent by other OpenFlow switches.
S702, the OpenFlow switch searches whether a flow table item matched with the data flow exists in the hardware unit.
If not, executing S703; if so, then S706 is performed.
And S703, reporting the data stream to the software unit.
In the data transmission process, the OpenFlow switch searches a flow table item matched with the data flow in a hardware unit at first, and reports the data flow to a software unit when the flow table item is not searched.
And S704, the OpenFlow switch finds the flow table item matched with the data flow in the software unit.
The OpenFlow switch searches a flow table item matched with the data flow in the software unit, if the flow table item cannot be searched in the software unit, the data flow can be further reported to the controller, the controller configures a route for the data flow and sends the route information to the software unit of the OpenFlow switch, and the OpenFlow switch generates the flow table item of the data flow according to the route information and records the flow table item in the data flow table of the software unit.
S705, the OpenFlow switch maps the flow entry found in the software unit to the hardware unit, and stores the description information of the data flow matching the flow entry in the description unit.
The OpenFlow switch maps the flow table items to the hardware unit through the adaptation unit, and meanwhile saves the description information of the data flow matched with the flow table items to the description unit, so that the description information of the data flow matched with the flow table items in the hardware unit is included in the description unit.
And S706, the OpenFlow switch transmits the data flow according to the flow table item matched with the data flow in the hardware unit.
In this embodiment, a description unit is disposed between the software unit and the adaptation unit, and when mapping a flow entry in the software unit to the hardware unit, description information of a data flow matched with the flow entry is stored in the description unit, so that the description unit includes description information of a data flow matched with the flow entry in the hardware unit, and consistency between a flow entry of the software unit and a flow entry of the hardware unit can be achieved through a bridge function of the description unit.
Fig. 8 is a schematic structural diagram of the flow entry processing device according to the embodiment of the present invention. The device can be applied to an OpenFlow switch with an open flow, wherein the OpenFlow switch comprises a hardware unit, and the hardware unit is used for storing flow table items of data flows directly forwarded by a hardware interface of the OpenFlow switch. As shown in fig. 8, the flow entry processing device of the present embodiment may include: a receiving module 801, a converting module 802, a matching module 803, and an adding module 804. The receiving module 801 is configured to receive routing information sent by a controller; the conversion module 802 is configured to convert the routing information into a new flow entry; the matching module 803 is configured to match the matching field of the newly created flow entry with the matching field of the stored data flow, and determine the matching field of the data flow forwarded by using the newly created flow entry; wherein, the matching field of the stored data flow is the matching field of the data flow forwarded by the flow table entry stored by the hardware unit; the adding module 804 is configured to add the newly-created flow entry to the hardware unit of the OpenFlow switch when the matching domain of the data flow forwarded by using the newly-created flow entry is determined.
The apparatus of this embodiment may be used to perform the method of the embodiment of the method shown in fig. 1, and the implementation principle and the technical effect to be achieved are similar, and are not described herein again.
The apparatus as described above, wherein the OpenFlow switch further comprises: a software unit for converting the routing information into a flow table entry and storing the flow table entry; and an adaptation unit for converting the format of the flow table entry converted by the software unit into the format recognized by the hardware unit; further, the software unit is specifically configured to convert the routing information into a new flow entry in a first format; further, the adaptation unit is specifically configured to convert the new flow entry in the first format into a new flow entry in a second format that can be recognized by the hardware unit; the adding module 804 may be specifically configured to add the newly created flow entry in the second format to the hardware unit of the OpenFlow switch. The matching field may be: at least one of message type, port number, source hardware access control MAC address, destination MAC address, source internet protocol IP address, destination IP address, and VLAN information. Preferably, the priority of the newly-created flow entry is higher than the priority of the matching flow entry.
The apparatus as described above, wherein the matching module 803 may further be configured to match the matching field of the flow entry stored in the software unit with the determined matching field of the data flow, so as to obtain a matching flow entry in a first format; the adaptation unit specifically converts the matching flow entry in the first format into a matching flow entry in a second format. Optionally, the apparatus may further include a deleting module 805, and the deleting module 805 may be configured to delete the matching flow entry in the second format in the hardware unit.
Fig. 9 is a schematic structural diagram of an embodiment of a flow entry processing device according to an embodiment of the present invention. The apparatus may be an OpenFlow switch, and as shown in fig. 9, the flow entry processing apparatus includes at least one processor 901 (e.g., CPU), a memory 903, and at least one communication bus 904 for enabling connection communication between devices. The processor 901 is for executing executable modules, e.g. computer programs, stored in the memory 903. The Memory 903 may comprise a high-speed Random Access Memory (RAM) and may also comprise a non-volatile Memory, such as at least one disk Memory.
In some embodiments, the memory 903 stores a program 905, and the program 905 is executable by the processor 901 and includes executing a method of processing a flow entry, the method including:
the OpenFlow switch receives the routing information sent by the controller;
converting the routing information into a new flow table entry;
matching the matching domain of the new flow table entry by using the matching domain of the stored data flow, and determining the matching domain of the data flow forwarded by using the new flow table entry; the matching domain of the stored data flow is the matching domain of the data flow forwarded by the flow table entry stored by the hardware unit;
and when the matching domain of the data flow forwarded by using the newly-built flow entry is determined, adding the newly-built flow entry into a hardware unit of the OpenFlow switch.
In the above-described program for executing the flow table item processing method, it is preferable that the OpenFlow switch further includes: a software unit for converting the routing information into a flow table entry and storing the flow table entry; and an adaptation unit for converting the format of the flow table entry converted by the software unit into the format recognized by the hardware unit;
further, the converting the routing information into a newly-created flow entry includes: the software unit converts the routing information into a new flow table entry in a first format;
further, the adding the new flow entry to the hardware unit of the OpenFlow switch includes:
the adaptation unit converts the new flow table entry in the first format into a new flow table entry in a second format that can be recognized by the hardware unit;
adding the newly created flow entry in the second format to the hardware unit of the OpenFlow switch.
The above-described program for executing the flow entry processing method preferably further includes:
matching the matching domain of the flow table entry stored in the software unit by using the determined matching domain of the data flow to obtain a matching flow table entry in a first format;
the adaptation unit converts the matching flow table entry in the first format into a matching flow table entry in a second format;
and deleting the matching flow table entry in the second format in the hardware unit.
In the above program for executing the flow entry processing method, preferably, the priority of the new flow entry is higher than the priority of the matching flow entry.
In the above program for executing the flow entry processing method, the matching field preferably includes: at least one of message type, port number, source hardware access control MAC address, destination MAC address, source internet protocol IP address, destination IP address, and VLAN information.
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 the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

  1. A flow table item processing method is applied to an OpenFlow switch, wherein the OpenFlow switch comprises a hardware unit, and the hardware unit is used for storing a flow table item of a data flow directly forwarded by a hardware interface of the OpenFlow switch, and the method comprises the following steps:
    the OpenFlow switch receives routing information sent by the controller;
    converting the routing information into a new flow table entry;
    matching the matching domain of the newly-built flow table entry by using the matching domain of the stored data flow, and determining the matching domain of the data flow forwarded by using the newly-built flow table entry; wherein, the matching field of the stored data flow is the matching field of the data flow forwarded by the flow table entry stored by the hardware unit;
    and when the matching domain of the data flow forwarded by using the newly-built flow entry is determined, adding the newly-built flow entry into the hardware unit of the OpenFlow switch.
  2. The method of claim 1, wherein the OpenFlow switch further comprises: a software unit for converting the routing information into a flow table entry and storing the flow table entry; and an adaptation unit for converting the format of the flow table entry converted by the software unit into the format recognized by the hardware unit;
    further, the converting the routing information into a newly-created flow entry includes: the software unit converts the routing information into a new flow table entry in a first format;
    further, the adding the new flow entry to the hardware unit of the OpenFlow switch includes:
    the adaptation unit converts the new flow table entry in the first format into a new flow table entry in a second format that can be recognized by the hardware unit;
    adding the newly created flow entry in the second format to the hardware unit of the OpenFlow switch.
  3. The method of claim 2, further comprising:
    matching the matching domain of the flow table entry stored in the software unit by using the determined matching domain of the data flow to obtain a matching flow table entry in a first format;
    the adaptation unit converts the matching flow table entry in the first format into a matching flow table entry in a second format;
    and deleting the matching flow table entry in the second format in the hardware unit.
  4. The method of claim 3, wherein the new flow entry has a higher priority than the matching flow entry.
  5. The method according to any of claims 1 to 4, wherein the matching field comprises: at least one of message type, port number, source hardware access control MAC address, destination MAC address, source internet protocol IP address, destination IP address, and VLAN information.
  6. A flow entry processing apparatus applied to an OpenFlow switch, the OpenFlow switch including a hardware unit configured to store a flow entry of a data flow directly forwarded by a hardware interface of the OpenFlow switch, the apparatus comprising:
    the receiving module is used for receiving the routing information sent by the controller;
    the conversion module is used for converting the routing information into a new flow table entry;
    the matching module is used for matching the matching domain of the newly-built flow table entry by using the matching domain of the stored data flow and determining the matching domain of the data flow forwarded by using the newly-built flow table entry; wherein, the matching field of the stored data flow is the matching field of the data flow forwarded by the flow table entry stored by the hardware unit;
    and the adding module is used for adding the newly-built flow entry into the hardware unit of the OpenFlow switch when the matching domain of the data flow forwarded by using the newly-built flow entry is determined.
  7. The apparatus of claim 6, wherein the OpenFlow switch further comprises: a software unit for converting the routing information into a flow table entry and storing the flow table entry; and an adaptation unit for converting the format of the flow table entry converted by the software unit into the format recognized by the hardware unit;
    further, the software unit is specifically configured to convert the routing information into a new flow entry in a first format;
    further, the adaptation unit is specifically configured to convert the new flow entry in the first format into a new flow entry in a second format that can be recognized by the hardware unit;
    the adding module is specifically configured to add the newly-created flow entry in the second format to the hardware unit of the OpenFlow switch.
  8. The apparatus of claim 7,
    the matching module is further used for matching the matching domain of the flow table entry stored in the software unit by using the determined matching domain of the data flow to obtain a matching flow table entry in a first format;
    the adaptation unit specifically converts the matching flow entry in the first format into a matching flow entry in a second format;
    the device further comprises:
    and the deleting module is used for deleting the matching flow table entry in the second format in the hardware unit.
  9. The apparatus of claim 8, wherein the newly created flow entry has a higher priority than the matching flow entry.
  10. The apparatus of any of claims 6 to 9, wherein the matching field comprises: at least one of message type, port number, source hardware access control MAC address, destination MAC address, source internet protocol IP address, destination IP address, and VLAN information.
CN201480040608.5A 2014-11-04 2014-11-04 Flow entry treating method and apparatus Active CN105765922B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/090273 WO2016070332A1 (en) 2014-11-04 2014-11-04 Flow entry processing method and apparatus

Publications (2)

Publication Number Publication Date
CN105765922A true CN105765922A (en) 2016-07-13
CN105765922B CN105765922B (en) 2019-06-07

Family

ID=55908354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201480040608.5A Active CN105765922B (en) 2014-11-04 2014-11-04 Flow entry treating method and apparatus

Country Status (2)

Country Link
CN (1) CN105765922B (en)
WO (1) WO2016070332A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786461A (en) * 2016-08-25 2018-03-09 中国电信股份有限公司 Realize the method and controller of flow table switching
CN110430138A (en) * 2019-07-26 2019-11-08 新华三技术有限公司合肥分公司 Forwarding data flow state recording method and the network equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110365599B (en) * 2019-07-12 2023-05-23 中国电信集团工会上海市委员会 Openflow switch forwarding channel rapid updating system and method thereof
CN112511438B (en) * 2020-11-19 2022-12-13 锐捷网络股份有限公司 Method and device for forwarding message by using flow table and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957603A (en) * 2012-11-09 2013-03-06 盛科网络(苏州)有限公司 Multilevel flow table-based Openflow message forwarding method and system
CN103259718A (en) * 2013-04-18 2013-08-21 华为技术有限公司 Flow table conversion method and device
CN103326943A (en) * 2012-03-23 2013-09-25 日电(中国)有限公司 Data stream rerouting method and controller
US20140269683A1 (en) * 2013-03-14 2014-09-18 International Business Machines Corporation Synchronization of OpenFlow controller devices via OpenFlow switching devices

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103326943A (en) * 2012-03-23 2013-09-25 日电(中国)有限公司 Data stream rerouting method and controller
CN102957603A (en) * 2012-11-09 2013-03-06 盛科网络(苏州)有限公司 Multilevel flow table-based Openflow message forwarding method and system
US20140269683A1 (en) * 2013-03-14 2014-09-18 International Business Machines Corporation Synchronization of OpenFlow controller devices via OpenFlow switching devices
CN103259718A (en) * 2013-04-18 2013-08-21 华为技术有限公司 Flow table conversion method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786461A (en) * 2016-08-25 2018-03-09 中国电信股份有限公司 Realize the method and controller of flow table switching
CN107786461B (en) * 2016-08-25 2021-06-29 中国电信股份有限公司 Method and controller for realizing flow table switching
CN110430138A (en) * 2019-07-26 2019-11-08 新华三技术有限公司合肥分公司 Forwarding data flow state recording method and the network equipment
CN110430138B (en) * 2019-07-26 2022-02-22 新华三技术有限公司合肥分公司 Data flow forwarding state recording method and network equipment

Also Published As

Publication number Publication date
WO2016070332A1 (en) 2016-05-12
CN105765922B (en) 2019-06-07

Similar Documents

Publication Publication Date Title
US20150131666A1 (en) Apparatus and method for transmitting packet
US10541920B2 (en) Communication system, communication device, controller, and method and program for controlling forwarding path of packet flow
US9225641B2 (en) Communication between hetrogenous networks
CN107547243B (en) Message forwarding method and device
US10645006B2 (en) Information system, control apparatus, communication method, and program
JPWO2011162215A1 (en) COMMUNICATION SYSTEM, CONTROL DEVICE, NODE CONTROL METHOD, AND PROGRAM
WO2021226948A1 (en) Data packet processing method and device based on open virtual switch (ovs)
JPWO2012133060A1 (en) Network system and VLAN tag information acquisition method
CN104518967A (en) Routing method, equipment and system
CN106331206B (en) Domain name management method and device
US9385939B2 (en) Method and a controller system for configuring a software-defined network
JP6323547B2 (en) COMMUNICATION SYSTEM, CONTROL DEVICE, COMMUNICATION CONTROL METHOD, AND PROGRAM
US9467374B2 (en) Supporting multiple IEC-101/IEC-104 masters on an IEC-101/IEC-104 translation gateway
US10404598B1 (en) Managing next hop groups in routers
JP6260285B2 (en) Control device and transfer control method
CN105765922A (en) Flow entry processing method and apparatus
WO2017084448A1 (en) Network system and network operating method
US7860027B2 (en) Extending an IP everywhere network over a plurality of flooding domains
CN104486227A (en) System and method for achieving IPv6 flexible arrangement through VxLAN technique
US10523629B2 (en) Control apparatus, communication system, communication method, and program
CN109981456A (en) The intelligent buffer for being used to be grouped rearrangement of dummy node in network equipment
US20150381775A1 (en) Communication system, communication method, control apparatus, control apparatus control method, and program
WO2016173196A1 (en) Method and apparatus for learning address mapping relationship
US9853891B2 (en) System and method for facilitating communication
JP6367732B2 (en) Transfer device and transfer method

Legal Events

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

Effective date of registration: 20210429

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Device Co.,Ltd.

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

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right