WO2016037442A1 - 流表老化方法、设备、系统及计算机可读介质 - Google Patents
流表老化方法、设备、系统及计算机可读介质 Download PDFInfo
- Publication number
- WO2016037442A1 WO2016037442A1 PCT/CN2014/094638 CN2014094638W WO2016037442A1 WO 2016037442 A1 WO2016037442 A1 WO 2016037442A1 CN 2014094638 W CN2014094638 W CN 2014094638W WO 2016037442 A1 WO2016037442 A1 WO 2016037442A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- flow table
- switch
- configuration message
- aging
- life cycle
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
- H04L43/0888—Throughput
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/0816—Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0895—Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/34—Signalling channels for network management communication
- H04L41/342—Signalling channels for network management communication between virtual entities, e.g. orchestrators, SDN or NFV entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/40—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using virtualisation of network functions or resources, e.g. SDN or NFV entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/50—Network service management, e.g. ensuring proper service fulfilment according to agreements
- H04L41/5003—Managing SLA; Interaction between SLA and QoS
- H04L41/5009—Determining service level performance parameters or violations of service level contracts, e.g. violations of agreed response time or mean time between failures [MTBF]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/16—Threshold monitoring
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/20—Arrangements for monitoring or testing data switching networks the monitoring system or the monitored elements being virtualised, abstracted or software-defined entities, e.g. SDN or NFV
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
Definitions
- the present invention relates to a Software Defined Network (SDN) technology, and in particular, to a flow table aging method, device, system and computer readable medium based on the OpenFlow OpenFlow protocol.
- SDN Software Defined Network
- the SDN architecture separates the control plane and the forwarding plane of the network device by using the OpenFlow protocol, and obtains a network controller (Controller) representing the control plane and a switch (Switch) indicating the forwarding plane.
- the method of forwarding data packets in the SDN network based on the OpenFlow protocol is to use the flow table to forward data packets.
- the specific control is to control multiple switches by using the standardized OpenFlow protocol, and send the flow table to each Switch.
- the flow table is saved. After receiving the data packet sent by the network, the Switch forwards the data according to the flow table saved by the switch.
- each flow table occupies a certain amount of memory space on the switch. If the switch accumulates the flow table for a long time, the memory will be exhausted. Therefore, each flow table has a life cycle, which is also called aging time.
- each flow table is aged according to the life cycle of the time.
- the service provider provides data services for users according to service traffic. Therefore, when the traffic is logged according to the service traffic, the flow table is aged out in the time period, which causes a large number of periodic query messages between the controller and the switch, and the controller and the switch communicate through the TCP connection. Not only will it cause a large amount of bandwidth consumption, but also the periodic query message will cause the accuracy of billing accuracy and real-time performance to be low when the traffic is used as the charging standard.
- the embodiment of the invention provides a flow table aging method, device, system and computer readable medium based on the OpenFlow protocol, which can reduce periodic query between the controller and the switch when the data traffic is used as the charging standard. Bandwidth consumption caused by messages, and improved accuracy of billing accuracy and real-time.
- an embodiment of the present invention provides a flow table aging method, where the method may include:
- the switch receives the flow table configuration message sent by the controller, where the flow table configuration message includes a data volume life cycle parameter value of the flow table;
- the switch When the switch reaches the data volume life cycle parameter value of the flow table by the amount of data matched by the flow table, the switch ages the flow table.
- the method further includes:
- the switch performs consistency detection and verification on the flow table configuration message
- the switch determines that the flow table configuration message is correct, the switch sets a data volume life cycle parameter value of the flow table according to the flow table configuration message.
- the method further includes:
- the switch sends an aging notification of the flow table to the controller, where the aging notification of the flow table includes The table is due to the aging reason that the matched data amount reaches the data volume life cycle parameter value of the flow table.
- the aging notification of the flow table further includes: a remaining data amount survival week of the flow table The period parameter value, the remaining maximum lifetime of the flow table, hard timeout, and the remaining idle time of the flow table, idle timeout.
- an embodiment of the present invention provides a flow table aging method, where the method includes:
- the controller encapsulates the data volume life cycle parameter value of the flow table to the flow table configuration message
- the controller sends the flow table configuration message to the switch; wherein the flow table configuration message is used by the switch to set the flow table.
- the method further includes:
- the controller receives an aging notification of the flow table sent by the switch, where the aging notification of the flow table includes a data volume life cycle parameter value configured to represent the flow table because the matched data amount reaches the flow table.
- Reason for aging
- the aging notification of the flow table further includes: a remaining data volume life cycle parameter value of the flow table, a remaining maximum lifetime hard timeout of the flow table, and an idle idle time idle timeout of the flow table.
- an embodiment of the present invention provides a switch, where the switch includes: a receiving unit, a flow table setting unit, and a flow table aging unit, where
- the receiving unit is configured to receive a flow table configuration message sent by the controller, where the flow table configuration message includes a data volume life cycle parameter value of the flow table;
- the flow table setting unit is configured to set a data volume life cycle parameter value of the flow table according to the flow table configuration message received by the receiving unit;
- the flow table aging unit is configured to age the flow table when the data amount matched by the switch reaches the data volume life cycle parameter value of the flow table.
- the switch further includes a verification unit configured to perform consistency detection and verification on the flow table configuration message;
- the flow table setting unit is triggered.
- the switch further includes a sending unit, configured to: when the flow table configuration message includes the aging notification indication information of the flow table, send an aging notification of the flow table to the controller, where
- the aging notification of the flow table includes an aging reason for characterizing the flow table because the matched data amount reaches the data volume life cycle parameter value of the flow table.
- the aging notification of the flow table further includes: a remaining data volume life cycle parameter value of the flow table, a remaining maximum lifetime hard timeout of the flow table, and an idle idle time idle timeout of the flow table.
- an embodiment of the present invention provides a controller, where the controller includes: a packaging unit and a sending unit, where
- the encapsulating unit is configured to encapsulate the data volume life cycle parameter value of the flow table to the flow table configuration message;
- the sending unit is configured to send the flow table configuration message encapsulated by the encapsulating unit to the switch, where the flow table configuration message is configured to set the flow table by the switch.
- the controller further includes: a receiving unit, configured to receive an aging notification of the flow table sent by the switch, where the aging notification of the flow table includes configuring to indicate that the flow table is reached due to matching data volume The reason for the aging of the data volume life cycle parameter value of the flow table.
- a receiving unit configured to receive an aging notification of the flow table sent by the switch, where the aging notification of the flow table includes configuring to indicate that the flow table is reached due to matching data volume The reason for the aging of the data volume life cycle parameter value of the flow table.
- the aging notification of the flow table further includes: a remaining data volume life cycle parameter value of the flow table, a remaining maximum lifetime hard timeout of the flow table, and an idle idle time idle timeout of the flow table.
- an embodiment of the present invention provides a flow table aging system based on the OpenFlow protocol, where the system includes a switch and a controller, where
- the switch is configured to receive a flow table configuration message sent by the controller, where the flow table configuration message includes a data volume life cycle parameter value of the flow table;
- the controller is configured to encapsulate the data volume life cycle parameter value of the flow table to the flow table configuration message;
- the embodiment of the invention further provides a computer readable medium, wherein the computer readable medium stores executable instructions, and the executable instructions are configured to perform any of the flow table aging methods described above.
- the embodiment of the present invention provides a flow table aging method, device, system, and computer readable medium, which can enable a switch by adding a data amount life cycle Packet count parameter with a data amount matched by a flow table as a metric value.
- the matching data volume is used as the other type of the life cycle of the flow table.
- FIG. 1 is a schematic structural diagram of a flow table currently used by a switch
- FIG. 2 is a schematic flowchart of a flow table aging method based on the OpenFlow protocol according to an embodiment of the present invention
- FIG. 3 is a schematic structural diagram of a flow table according to an embodiment of the present invention.
- FIG. 4 is a schematic flowchart of another method for aging a flow table based on the OpenFlow protocol according to an embodiment of the present disclosure
- FIG. 5 is a schematic flowchart of a flow table aging method based on the OpenFlow protocol according to an embodiment of the present disclosure
- FIG. 6 is a schematic structural diagram of a switch according to an embodiment of the present disclosure.
- FIG. 7 is a schematic structural diagram of another switch according to an embodiment of the present disclosure.
- FIG. 8 is a schematic structural diagram of a controller according to an embodiment of the present disclosure.
- FIG. 9 is a schematic structural diagram of a controller according to an embodiment of the present disclosure.
- FIG. 10 is a schematic structural diagram of a flow table aging system based on the OpenFlow protocol according to an embodiment of the present invention.
- the hard timeout parameter indicates the maximum lifetime of the flow entry
- the idle timeout parameter indicates the idle lifetime of the flow entry
- the parameter value of the hard timeout parameter of a flow entry is set to 30 seconds.
- the switch aging the flow entry after 30 seconds.
- the idle timeout parameter of a flow entry is set to 20 seconds, indicating that the switch does not receive a packet that matches the entry within 20 seconds.
- the aging of the entry is zero.
- the average value of the hardtimeout parameter and the idle timeout parameter of a flow entry is zero, indicating that the flow entry is permanently saved and will not be aged by the switch unless the controller sends an instruction to the switch to delete the flow entry.
- an existing data packet life cycle packet count parameter is obtained by using the data amount matched by the flow table as a metric value, so that the switch can use the matched data amount as the matching data amount.
- Another type of life cycle of the flow table is that the switch aging the flow table after the switch completes the fixed data volume matching by the flow table, and is therefore applicable to the scenario where the service provider charges the user through the service data traffic.
- a flow table aging method based on the OpenFlow protocol is provided in the embodiment of the present invention.
- the method is applicable to any switch based on the OpenFlow protocol, and the method may include:
- S201 The switch receives a flow table configuration message sent by the controller.
- the switch forwards data packets according to the flow table sent by the controller. Therefore, in this embodiment, the flow information sent by the controller is referred to as a “flow table”, and the flow table configuration message is used as a carrier for the flow table to be sent by the controller, and may include the composition of the flow table of the controller.
- the controller can send the data volume life cycle Packet count parameter value of the flow table, and the data volume life cycle Packet count parameter value of the flow table is the maximum data amount matched by the switch through the flow table.
- the flow table configuration message also includes the parameter values corresponding to the component parameters in the flow table structure shown in FIG. 1 . Since these parameters are common technical means for those skilled in the art, they are not described herein again.
- S202 The switch sets a data volume life cycle parameter value of the flow table according to the flow table configuration message.
- the flow table configuration message may also be consistently detected and verified; when the switch determines that the flow table configuration message is correct, the switch is configured according to the The flow table configuration message sets the data volume life cycle parameter value of the flow table.
- the flow table configuration message includes the parameter value corresponding to the component parameter in the flow table structure as shown in FIG. 1; therefore, the switch according to the flow
- the flow table structure set by the table configuration message is shown in Figure 3.
- the switch sets the flow table
- the data and the message can be matched according to the flow table, and the amount of data matched by the switch through the flow table is recorded in the matching process.
- the packet count parameter is similar to the hard timeout parameter and the idle timeout parameter of Timeouts, and belongs to a life cycle of the flow table. Therefore, when the data volume life cycle Packet count of the flow table comes, the switch needs to Aging it to reduce the storage space occupied by the flow meter;
- the switch aging the flow table through the packet count parameter of the data volume lifetime, so that the lifetime of the flow table is only related to the amount of data matched by the switch through the flow table, and is independent of the time that the flow table is saved in the switch. Therefore, the data volume life cycle Packet count parameter is more suitable for the data service that the service provider charges according to the traffic than the hard timeout parameter and the idle timeout parameter of the Timeouts.
- the aging notification indication information of the flow table may be further included, after the switch indicates that the switch aging the flow table, and notifying the controller of the aging reason;
- the switch when the flow table configuration message includes the aging notification indication information of the flow table, and the data amount matched by the switch through the flow table reaches the data volume life cycle parameter value of the flow table, the switch aging the flow table after the switch
- the switch may also send an aging notification of the flow table to the controller, where the aging notification of the flow table includes an aging reason for characterizing the flow table parameter value of the data table because the matched data amount reaches the flow table.
- the switch can also save the remaining maximum lifetime of the flow table hard timeout and the flow.
- the remaining idle time idle timeout of the table is encapsulated in the aging notification of the flow table, so that the controller can integrate the life cycle of the time dimension and the data dimension dimension, so as to be set as a reference for the later flow table;
- the switch can also encapsulate the remaining data volume lifetime parameter value of the flow table in the aging notification of the flow table.
- the aging notification of the flow table may further include: a remaining data volume life cycle parameter value of the flow table, a remaining maximum lifetime hard timeout of the flow table, and an idle idle time idle timeout of the flow table. It can be understood that when the aging of the flow table is due to the expiration of the data volume life cycle parameter, the remaining data volume life cycle parameter value of the flow table included in the aging notification of the flow table is zero.
- the embodiment of the invention provides a flow table aging method based on the OpenFlow protocol, which increases the data amount of the packet count parameter by using a data amount matched by the flow table as a metric value, so that the switch can match the data amount.
- the switch aging the flow table, which is applicable to the application scenario where the service provider charges the user through the service data traffic.
- FIG. 4 another method of aging the flow table based on the OpenFlow protocol is provided in the embodiment of the present invention.
- the method is applicable to any controller based on the OpenFlow protocol, and the method may include:
- S401 The controller encapsulates the data volume life cycle parameter value of the flow table into a flow table configuration message.
- the data volume lifetime of the flow table may be the maximum amount of data that the switch matches through the flow table.
- S402 The controller sends a flow table configuration message to the switch.
- the flow table configuration message is used by the switch to set the flow table.
- the switch forwards data packets according to the flow table sent by the controller.
- the flow information sent by the controller is referred to as a “flow table”
- the flow table configuration message is used as a carrier for the flow table to be sent by the controller, and may include a component parameter corresponding to the flow table of the controller.
- the flow table configuration message includes the parameter value corresponding to the component parameter in the flow table structure shown in FIG. 1 in addition to the data volume life cycle Packet count parameter value of the flow table, because these The parameters are common technical means for those skilled in the art, and are not described herein again.
- the flow table configuration message may further include an aging notification of the flow table.
- the indication information is used to instruct the switch to notify the controller of the reason for aging after aging the flow table;
- the controller may further receive an aging notification of the flow table sent by the switch, where the aging of the flow table
- the announcement includes an aging reason for characterizing the flow table because the amount of data matched matches the data volume life cycle parameter value of the flow table.
- the switch can also save the remaining maximum lifetime of the flow table hard timeout and the flow table remaining.
- the idle time of the idle time is encapsulated in the aging notification of the flow table.
- the switch can also save the remaining data volume life cycle parameters of the flow table. The value is encapsulated in the aging advertisement of the flow table.
- the aging notification of the flow table further includes: a remaining data volume life cycle parameter value of the flow table, a remaining maximum lifetime of the flow table, a hard timeout, and a remaining of the flow table.
- the idle time to idle timeout It can be understood that when the aging of the flow table is due to the expiration of the data volume life cycle parameter, the remaining data volume life cycle parameter value of the flow table included in the aging notification of the flow table is zero.
- An embodiment of the present invention provides another method for aging a flow table based on the OpenFlow protocol, by adding a data amount lifetime packet Packetcount parameter with a data amount matched by the flow table, so that the switch can match the data amount.
- the switch aging the flow table, which is applicable to the application scenario where the service provider charges the user through the service data traffic.
- FIG. 5 a detailed flow of a method for aging a flow table based on the OpenFlow protocol according to the embodiment of the present invention may be included, which may include:
- S501 The controller encapsulates the data volume life cycle parameter value of the flow table into a flow table configuration message.
- the flow table configuration message is used as a carrier for the flow table to be sent by the controller, which is a switch.
- the current flow table structure is as shown in FIG. 1 .
- the parameter value corresponding to the data count life cycle Packet count parameter is added, and the specific structure is as shown in FIG. 3 . Therefore, the flow table configuration message of this embodiment is also slightly different from the current flow table configuration message.
- the flow table configuration message OFPT_FLOW_MOD described in the C language is taken as an example, and the OFPT_FLOW_MOD message includes the flow to be set by the switch.
- the controller encapsulates the data volume life cycle parameter value of the flow table to the flow table configuration message OFPT_FLOW_MOD.
- S502 The controller sends a flow table configuration message to the switch.
- the flow table is configured for the switch because the flow table configuration message is used.
- the flow table configuration message may further include an aging notification indication information of the flow table, and is used to instruct the switch to notify the controller of the aging reason after aging the flow table.
- S503 The switch sets a data volume life cycle parameter value of the flow table according to the flow table configuration message.
- the parameter value corresponding to the component parameter in the flow table structure shown in FIG. 1 is included; therefore, the flow table structure set by the switch according to the flow table configuration message is as shown in FIG. 3 .
- the switch sets the flow table
- the data and the message can be matched according to the flow table, and the amount of data matched by the switch through the flow table is recorded in the matching process.
- S504 The switch aging the flow table when the amount of data matched by the switch reaches the data volume lifetime parameter of the flow table.
- the packet count parameter is similar to the hard timeout parameter and the idle timeout parameter of Timeouts, and belongs to a life cycle of the flow table. Therefore, when the data volume life cycle Packet count of the flow table comes, the switch needs to Aging it to reduce the storage space occupied by the flow meter;
- the switch when the OFPFF_SEND_FLOW_REM flag in the flow table is set, the switch needs to send an aging notification to the controller after the aging of the flow table, to notify the aging of the flow table. reason.
- the specific aging notification message is OFPT_FLOW_REMOVED, wherein the specific ofp_flow_removed structure for recording the advertised content is as follows:
- the reason for aging in the ofp_flow_removed structure uint8_t reason can be an enumeration Value, specifically:
- OFPRR_IDLE_TIMEOUT 0, /*Flow idle time exceeded idle_timeout.*/The idle time of the stream exceeds the defined idle-timeout threshold.
- OFPRR_HARD_TIMEOUT 1, /* stream time exceeds the defined hard_timeout time*/
- OFPRR_DELETE 2, /* Delete in streaming mode. */
- OFPRR_PACKET_COUNT 4, /* matches the amount of packet data exceeding the defined packet_count parameter value*/
- the aging reason for aging the flow table should be 4.
- the switch can also save the remaining maximum lifetime of the flow table hard timeout and the flow table.
- the remaining idle time idle timeout is encapsulated in the aging notification of the flow table.
- the switch can also save the remaining data volume life cycle of the flow table.
- the parameter value is encapsulated in the aging notification of the flow table.
- the aging notification of the flow table may further include: the remaining data volume life cycle parameter value of the flow table, the remaining maximum lifetime of the flow table, hard timeout, and the remaining idleness of the flow table.
- Survival time idle timeout Specifically, in the ofp_flow_removed structure of the aging notification OFPT_FLOW_REMOVED message, the three parameters uint64_t packet_count_overflow, uint16_t idle_timeout, and uint16_t hard_timeout are respectively assigned to the remaining data volume life cycle parameter values of the flow table, the remaining idle lifetime of the flow table, and the remaining flow table. Maximum survival time.
- the flow table The uint64_t packet_count_overflow parameter in the aging notification OFPT_FLOW_REMOVED message is assigned a value of zero.
- the switch aging the flow table by using the packet count parameter, so that the lifetime of the flow table is only related to the amount of data matched by the switch through the flow table. It is independent of the time that the flow table is saved in the switch. Therefore, the packet count parameter of the data volume life cycle is more suitable for the data service that the service provider performs charging according to the traffic than the hard timeout parameter and the idle timeout parameter of the Timeouts.
- the switch may include: a receiving unit 601, a flow table setting unit 602, and a flow table aging unit 603. ,among them,
- the receiving unit 601 is configured to receive a flow table configuration message sent by the controller, where the flow table configuration message includes a data volume life cycle parameter value of the flow table;
- the flow table setting unit 602 is configured to set a data volume life cycle parameter value of the flow table according to the flow table configuration message received by the receiving unit 601;
- the flow table aging unit 603 is configured to age the flow table when the data amount matched by the switch 60 reaches the data volume life cycle parameter value of the flow table.
- the switch 60 further includes a verification unit 604 configured to perform consistency detection and verification on the flow table configuration message;
- the flow table setting unit 602 is triggered.
- the switch 60 further includes a sending unit 605, configured to send an aging notification of the flow table to the controller when the flow table configuration message includes the aging notification indication information of the flow table.
- the aging notification of the flow table includes an aging reason for characterizing the flow table because the matched data amount reaches the data volume life cycle parameter value of the flow table.
- the aging notification of the flow table further includes: a remaining data amount survival week of the flow table The period parameter value, the remaining maximum lifetime of the flow table, hard timeout, and the remaining idle time of the flow table, idle timeout.
- the receiving unit 601 can be implemented by an interface board (also referred to as a board) in the switch, and the interface board is used to connect a user terminal or an interface board of other network devices.
- the interface board has various types of network communication interfaces, such as 100M bandwidth interface, 1000M bandwidth interface, 10G bandwidth interface, ATM interface, optical interface (connecting optical cable), electrical interface (connecting cable); flow table setting unit 602, flow table aging unit 603, and verification unit 604 can be processed by a processor in the switch (CPU) or logic programmable gate array (FPGA) implementation.
- This embodiment provides a switch 60, by adding a data volume lifetime packet count parameter that uses the amount of data matched by the flow table as a metric value, so that the switch 60 can use the matched data amount as another flow table.
- the switch 60 After the switch 60 performs the fixed data volume matching by the flow table, the switch aging the flow table, and is applicable to the application scenario in which the service provider charges the user through the service data traffic.
- the controller 80 may include: a packaging unit 801 and a sending unit 802, where
- the encapsulating unit 801 is configured to encapsulate the data volume life cycle parameter value of the flow table to the flow table configuration message;
- the sending unit 802 is configured to send the flow table configuration message encapsulated by the encapsulating unit to the switch, where the flow table configuration message is used by the switch to set the flow table.
- the controller 80 may further include: a receiving unit 803, configured to receive an aging announcement of the flow table sent by the switch, where the aging notification of the flow table includes a characterization flow table The reason for the aging of the data volume life cycle parameter value of the flow table is reached because the matched data amount.
- the aging notification of the flow table further includes: a remaining data volume life cycle parameter value of the flow table, a remaining maximum lifetime hard timeout of the flow table, and a remaining space of the flow table Free time idle timeout.
- the encapsulation unit 801 can be implemented by a microprocessor or a logic programmable gate array in the controller; the transmitting unit 802 and the receiving unit 803 can be implemented by an interface board (also referred to as a board) in the controller, and the interface board is used to connect to the user terminal or Interface boards of other network devices.
- the interface boards have various types of network communication interfaces, such as a 100M bandwidth interface, a 1000M bandwidth interface, a 10G bandwidth interface, an ATM interface, an optical interface (connecting optical cable), and an electrical interface (connecting cable).
- the embodiment of the present invention provides a controller 80, which can increase the amount of data matched by the flow table as a metric value of the data packet lifetime count Packet count parameter, so that the switch 60 can use the matched data amount as the flow table.
- a life cycle type is used when the switch 60 performs a fixed amount of data matching by using the flow table, and then aging the flow table. Therefore, the service provider is applicable to the application scenario in which the service provider charges the user through the service data traffic.
- an OpenFlow protocol-based flow table aging system 100 according to an embodiment of the present invention is provided, wherein the system 100 includes a switch 60 and a controller 80, where ,
- the switch 60 is configured to receive a flow table configuration message delivered by the controller 80, where the flow table configuration message includes a data volume life cycle parameter value of the flow table;
- the flow table is aged.
- the controller 80 is configured to encapsulate the data volume life cycle parameter value of the flow table to the flow table configuration message;
- the controller 80 is further configured to receive an aging notification of the flow table sent by the switch 60, where the aging notification of the flow table includes data for characterizing the flow table due to matching The reason for the aging of the data volume life cycle parameter value of the flow table is reached.
- the switch 60 is further configured to perform consistency detection and verification on the flow table configuration message; and, when determining that the flow table configuration message is correct, set the data volume of the flow table to survive according to the received flow table configuration message. Cycle parameter value.
- the switch 60 is further configured to: when the flow table configuration message includes the aging notification indication information of the flow table, send an aging notification of the flow table to the controller, where the flow table
- the aging notification includes an aging reason for characterizing the flow table because the amount of matched data reaches the data volume life cycle parameter value of the flow table.
- the aging notification of the flow table further includes: a remaining data volume life cycle parameter value of the flow table, a remaining maximum lifetime of the flow table, and an remaining idle time of the flow table.
- This embodiment provides a flow table aging system 100 based on the OpenFlow protocol, which enables the switch 60 to match data by adding a data amount lifetime count Packet count parameter with the data amount matched by the flow table as a metric value. The quantity is used as another type of life cycle of the flow table.
- embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明实施例公开了一种流表老化方法、设备、系统及计算机可读介质,该方法可以包括:交换机接收控制器下发的流表配置消息;所述交换机根据所述流表配置消息设置所述流表的数据量生存周期参数值;当所述交换机通过所述流表匹配的数据量达到所述流表的数据量生存周期参数值时,所述交换机将所述流表进行老化。
Description
本发明涉及软件定义网络(SDN,Software Defined Network)技术,尤其涉及一种基于开放流OpenFlow协议的流表老化方法、设备、系统及计算机可读介质。
SDN架构通过采用的OpenFlow协议将网络设备的控制面与转发面进行分离,分别得到表示控制面的网络控制器(Controller)和表示转发面的交换机(Switch)。在基于OpenFlow协议的SDN网络中转发数据报文的方法为利用流表进行数据报文转发,具体为:Controller通过标准化的OpenFlow协议控制多个Switch,并下发流表给各个Switch;Switch接收并保存流表;当Switch收到网络发来的数据报文后,根据自身保存的流表进行转发。
然而,每个流表都会占用Switch一定的内存空间,如果Switch长时间积累流表,那么会出现内存耗尽的现象,因此,每个流表都会有一个生存周期,也称之为老化时间。
目前,每个流表的生存周期都是以时间作为度量值的,因此每个流表都是以时间的生存周期进行老化,而通常服务提供商为用户提供数据业务是按照业务流量进行计费的,因此,当按照业务流量进行计费时,以时间的生存周期对流表进行老化,会引发Controller和Switch之间大量的周期性查询消息,而控制器和交换机之间是通过TCP连接进行通信不仅会造成大量的带宽消耗,而且周期性的查询消息在以流量为计费标准的情况下会造成计费精度和实时性的准确性不高。
发明内容
本发明实施例提供一种基于OpenFlow协议的流表老化方法、设备、系统及计算机可读介质,在以数据流量为计费标准的情况下,能够减少控制器和交换机之间进行周期性的查询消息造成的带宽消耗,并且提高了计费精度和实时性的准确性。
本发明实施例的技术方案是这样实现的:
第一方面,本发明实施例提供了流表老化方法,所述方法可以包括:
交换机接收控制器下发的流表配置消息;其中,所述流表配置消息包括流表的数据量生存周期参数值;
所述交换机根据所述流表配置消息设置所述流表的数据量生存周期参数值;
当所述交换机通过所述流表匹配的数据量达到所述流表的数据量生存周期参数值时,所述交换机将所述流表进行老化。
优选地,所述交换机接收控制器下发的流表配置消息之后,以及所述交换机根据所述流表配置消息设置所述流表的数据量生存周期参数值之前,所述方法还包括:
所述交换机对所述流表配置消息进行一致性检测和验证;
当所述交换机确定所述流表配置消息正确时,所述交换机根据所述流表配置消息设置所述流表的数据量生存周期参数值。
优选地,所述交换机将所述流表进行老化之后,所述方法还包括:
当所述流表配置消息包括所述流表的老化通告指示信息时,所述交换机向所述控制器发送所述流表的老化通告,其中,所述流表的老化通告包括用于表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老化理由。
优选地,所述流表的老化通告还包括:所述流表剩余的数据量生存周
期参数值、所述流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout。
第二方面,本发明实施例提供了一种流表老化方法,所述方法包括:
控制器将流表的数据量生存周期参数值封装至流表配置消息;
所述控制器向交换机下发所述流表配置消息;其中,所述流表配置消息用于所述交换机设置所述流表。
优选地,当所述流表配置消息包括所述流表的老化通告指示信息时,所述方法还包括:
所述控制器接收所述交换机发送的所述流表的老化通告,其中,所述流表的老化通告包括配置为表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老化理由。
优选地,所述流表的老化通告还包括:所述流表剩余的数据量生存周期参数值、所述流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout。
第三方面,本发明实施例提供了一种交换机,所述交换机包括:接收单元、流表设置单元和流表老化单元,其中,
所述接收单元,配置为接收控制器下发的流表配置消息;其中,所述流表配置消息包括流表的数据量生存周期参数值;
所述流表设置单元,配置为根据所述接收单元接收的流表配置消息设置所述流表的数据量生存周期参数值;
所述流表老化单元,配置为当所述交换机通过所述流表匹配的数据量达到所述流表的数据量生存周期参数值时,将所述流表进行老化。
优选地,所述交换机还包括验证单元,配置为对所述流表配置消息进行一致性检测和验证;
以及,当确定所述流表配置消息正确时,触发所述流表设置单元。
优选地,所述交换机还包括发送单元,配置为当所述流表配置消息包括所述流表的老化通告指示信息时,向所述控制器发送所述流表的老化通告,其中,所述流表的老化通告包括用于表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老化理由。
优选地,所述流表的老化通告还包括:所述流表剩余的数据量生存周期参数值、所述流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout。
第四方面,本发明实施例提供了一种控制器,所述控制器包括:封装单元和发送单元,其中,
所述封装单元,配置为将流表的数据量生存周期参数值封装至流表配置消息;
所述发送单元,配置为向交换机下发所述封装单元封装的流表配置消息;其中,所述流表配置消息配置为所述交换机设置所述流表。
优选地,所述控制器还包括:接收单元,配置为接收所述交换机发送的所述流表的老化通告,其中,所述流表的老化通告包括配置为表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老化理由。
优选地,所述流表的老化通告还包括:所述流表剩余的数据量生存周期参数值、所述流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout。
第五方面,本发明实施例提供了一种基于OpenFlow协议的流表老化系统,所述系统包括交换机和控制器,其中,
所述交换机配置为,接收控制器下发的流表配置消息;其中,所述流表配置消息包括流表的数据量生存周期参数值;以及,
根据所述流表配置消息设置所述流表的数据量生存周期参数值;以及,
当所述交换机通过所述流表匹配的数据量达到所述流表的数据量生存
周期参数值时,将所述流表进行老化;
所述控制器配置为,将流表的数据量生存周期参数值封装至流表配置消息;以及,
向所述交换机下发所述流表配置消息;其中,所述流表配置消息配置为所述交换机设置所述流表。
本发明实施例还提供一种计算机可读介质,所述计算机可读介质中存储有可执行指令,所述可执行指令配置为执行以上所述的任一种流表老化方法。
本发明实施例提供了一种流表老化方法、设备、系统及计算机可读介质,通过增加一种以流表所匹配的数据量为度量值的数据量生存周期Packet count参数,从而使交换机能够以匹配的数据量作为流表的另一种生存周期类型,当交换机通过流表完成固定的数据量匹配之后,对该流表进行老化,因此适用于服务运营商通过业务数据流量向用户计费的应用场景。
图1为交换机目前所使用的流表结构示意图;
图2为本发明实施例提供的一种基于OpenFlow协议的流表老化方法流程示意图;
图3为本发明实施例提供的一种流表结构示意图;
图4为本发明实施例提供的另一种基于OpenFlow协议的流表老化方法流程示意图;
图5为本发明实施例提供的一种基于OpenFlow协议的流表老化方法的详细流程示意图;
图6为本发明实施例提供的一种交换机的结构示意图;
图7为本发明实施例提供的另一种交换机的结构示意图;
图8为本发明实施例提供的一种控制器的结构示意图;
图9为本发明实施例提供的一种控制器的结构示意图;
图10为本发明实施例提供的一种基于OpenFlow协议的流表老化系统的结构示意图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。
在图1所示的交换机目前所使用的流表项结构中,包括匹配字段(Match Fields)、优先级(Priority)、计数器(Counters)、指令集(Instructions)、以时间为度量值的生存周期(Timeouts)、数据(Cookie)以及对流表条目进行操作和管理的标记(Flag)等组成参数,在图1所示的流表项结构中,各组成参数的具体功能为本领域技术人员的公知常识,需要值得注意的是,以时间为度量值的生存周期Timeouts用于表示该流表项在时间上所对应的生存周期,并且Timeouts可以包括:hard timeout参数和idle timeout参数。这两个参数的具体定义是:hard timeout参数表示流表项的最大生存时间;idle timeout参数表示流表项的空闲生存时间;比如,某流表项的hard timeout参数的参数值置为30秒,表示30秒后交换机将该流表项进行老化;某流表项的idle timeout参数置为20秒,表示20秒内交换机没有收到可以匹配到该表项的报文,那么交换机将该流表项进行老化;某流表项的hardtimeout参数和idle timeout参数均值零,表示该流表项被永久保存,不会被交换机老化,除非控制器向交换机发送删除该流表项的指令。
本发明实施例在现有的流表结构中,增加一种以流表所匹配的数据量为度量值的数据量生存周期分组计数(Packet count)参数,从而使交换机能够以匹配的数据量作为流表的另一种生存周期类型,当交换机通过流表完成固定的数据量匹配之后,对该流表进行老化,因此适用于服务运营商通过业务数据流量向用户计费的场景。
参见图2,其示出了本发明实施例提供的一种基于OpenFlow协议的流表老化方法,该方法适用于任意一个基于OpenFlow协议的交换机,该方法可以包括:
S201:交换机接收控制器下发的流表配置消息;
示例性的,在基于OpenFlow协议的SDN结构中,交换机根据控制器下发的流表进行数据报文的转发。因此,在本实施例中,控制器下发的流信息称为“流表”,而流表配置消息作为控制器进行流表下发的载体,可以包括所述控制器下发流表的组成参数对应的参数值,例如,控制器可以下发流表的数据量生存周期Packet count参数值,而流表的数据量生存周期Packet count参数值为交换机通过流表所匹配的最大数据量。
可以理解的,流表配置消息中还包括如图1所示的流表结构中的组成参数对应的参数值,由于这些参数为本领域技术人员的常用技术手段,在此不再赘述。
S202:交换机根据所述流表配置消息设置流表的数据量生存周期参数值;
示例性的,当交换机接收到流表配置消息之后,还可以对所述流表配置消息进行一致性检测和验证;当所述交换机确定所述流表配置消息正确时,所述交换机根据所述流表配置消息设置所述流表的数据量生存周期参数值。
需要说明的是,由于流表配置消息中除了包括流表的数据量生存周期参数值以外,还包括了如图1所示的流表结构中的组成参数对应的参数值;因此,交换机根据流表配置消息所设置的流表结构如图3所示。
可以理解的,当交换机设置完流表之后,就可以根据流表进行数据和报文的匹配,并且在匹配过程中记录交换机通过流表匹配的数据量。
S203:当交换机通过流表匹配的数据量达到流表的数据量生存周期参
数值时,交换机将流表进行老化;
示例性地,由于数据量生存周期Packet count参数与Timeouts的hard timeout参数和idle timeout参数类似,属于流表的一种生存周期,因此,当流表的数据量生存周期Packet count到来时,交换机需要将其进行老化,从而降低流表占用的存储空间;
还需要说明的是,交换机通过数据量生存周期Packet count参数对流表进行老化,可以使得流表的生存周期仅与交换机通过流表匹配的数据量有关,与流表在交换机中保存的时间无关,因此,数据量生存周期Packet count参数比Timeouts的hard timeout参数和idle timeout参数更加适合服务提供商根据流量进行计费的数据业务。
进一步需要说明的是,在流表配置消息中还可以包括流表的老化通告指示信息,用于指示交换机将流表进行老化之后,向控制器通告老化理由;
相应地,当所述流表配置消息包括所述流表的老化通告指示信息时,且交换机通过流表匹配的数据量达到流表的数据量生存周期参数值从而导致交换机将流表进行老化之后,交换机还可以向控制器发送流表的老化通告,其中,所述流表的老化通告包括用于表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老化理由。
此外,由于流表老化的原因是数据量生存周期参数到期,而并非Timeouts的hard timeout参数和idle timeout参数到期,因此,交换机还可以将流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout封装在流表的老化通告中,从而使得控制器能够综合时间维度与数据量维度的生存周期,以便于为以后的流表设置作为参考;
另外,当流表老化的原因是Timeouts的hard timeout参数或idle timeout参数到期时,交换机还可以将流表剩余的数据量生存周期参数值封装在流表的老化通告中;
所以,流表的老化通告还可以包括:流表剩余的数据量生存周期参数值、所述流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout。可以理解的,当流表老化的原因是数据量生存周期参数到期时,流表的老化通告中包括的流表剩余的数据量生存周期参数值为零。
本发明实施例提供了一种基于OpenFlow协议的流表老化方法,通过增加一种以流表所匹配的数据量为度量值的数据量生存周期Packet count参数,从而使交换机能够以匹配的数据量作为流表的另一种生存周期类型,当交换机通过流表完成固定的数据量匹配之后,对该流表进行老化,因此适用于服务运营商通过业务数据流量向用户计费的应用场景。
参见图4,其示出了本发明实施例提供的另一种基于OpenFlow协议的流表老化方法,该方法适用于任意一个基于OpenFlow协议的控制器,该方法可以包括:
S401:控制器将流表的数据量生存周期参数值封装至流表配置消息;
具体地,流表的数据量生存周期Packet count参数值可以是交换机通过流表所匹配的最大数据量。
S402:控制器向交换机下发流表配置消息;
示例性地,所述流表配置消息用于所述交换机设置所述流表。
具体需要说明的是,在基于OpenFlow协议的SDN结构中,交换机根据控制器下发的流表进行数据报文的转发。在本实施例中,控制器下发的流信息称为“流表”,而流表配置消息作为控制器进行流表下发的载体,可以包括所述控制器下发流表的组成参数对应的参数值,可以理解的,流表配置消息中除了流表的数据量生存周期Packet count参数值之外,还包括如图1所示的流表结构中的组成参数对应的参数值,由于这些参数为本领域技术人员的常用技术手段,在此不再赘述。
进一步需要说明的是,在流表配置消息中还可以包括流表的老化通告
指示信息,用于指示交换机将流表进行老化之后,向控制器通告老化理由;
相应地,当所述流表配置消息包括所述流表的老化通告指示信息时,所述控制器还可以接收所述交换机发送的所述流表的老化通告,其中,所述流表的老化通告包括用于表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老化理由。
由于流表老化的原因是数据量生存周期参数到期,而并非Timeouts的hard timeout参数和idle timeout参数到期,因此,交换机还可以将流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout封装在流表的老化通告中;另外,当流表老化的原因是Timeouts的hard timeout参数或idle timeout参数到期时,交换机还可以将流表剩余的数据量生存周期参数值封装在流表的老化通告中;所以,流表的老化通告还包括:所述流表剩余的数据量生存周期参数值、所述流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout。可以理解的,当流表老化的原因是数据量生存周期参数到期时,流表的老化通告中包括的流表剩余的数据量生存周期参数值为零。
本发明实施例提供了另一种基于OpenFlow协议的流表老化方法,通过增加一种以流表所匹配的数据量为度量值的数据量生存周期Packetcount参数,从而使交换机能够以匹配的数据量作为流表的另一种生存周期类型,当交换机通过流表完成固定的数据量匹配之后,对该流表进行老化,因此适用于服务运营商通过业务数据流量向用户计费的应用场景。
在前述实施例所描述的技术方案的基础上,参见图5,其示出了本发明实施例提供的一种基于OpenFlow协议的流表老化方法的详细流程,可以包括:
S501:控制器将流表的数据量生存周期参数值封装至流表配置消息;
示例性地,流表配置消息作为控制器进行流表下发的载体,是交换机
设置流表的依据,目前现有的流表结构如图1所示;但本实施例中的流表结构中,增加了数据量生存周期Packet count参数对应的参数值,具体结构如图3所示;所以本实施例的流表配置消息也会与目前现有的流表配置消息略有不同,以C语言描述的流表配置消息OFPT_FLOW_MOD为例,OFPT_FLOW_MOD消息中就包括了交换机所要设置的流表各组成参数的ofp_flow_mod结构;本实施例对此不作具体限定,本领域技术人员可以用其他计算机语言类型对本实施例所提出的各种消息、信息和结构进行描述。在本实施例中,具体的ofp_flow_mod结构如下所示:
struct ofp_flow_mod{
struct ofp_header header;
……
uint64_t packet_count;/*流表删除前的最大报文字节数,以M字节为单位。*/
……
};
在上述的具体ofp_flow_mod结构中,仅示出了流表的数据量生存周期Packet count参数以及数据量生存周期Packet count参数对应的参数值,而其他如图1所示的组成参数为本领域的现有技术,不再赘述。依据该具体的ofp_flow_mod结构,控制器将流表的数据量生存周期参数值封装至流表配置消息OFPT_FLOW_MOD。
S502:控制器向交换机下发流表配置消息;
示例性地,由于流表配置消息用于所述交换机设置所述流表。进一步需要说明的是,在流表配置消息中还可以包括流表的老化通告指示信息,用于指示交换机将流表进行老化之后,向控制器通告老化理由。
S503:交换机根据流表配置消息设置流表的数据量生存周期参数值;
示例性地,由于流表配置消息中除了包括流表的数据量生存周期参数
值以外,还包括了如图1所示的流表结构中的组成参数对应的参数值;因此,交换机根据流表配置消息所设置的流表结构如图3所示。
可以理解的,当交换机设置完流表之后,就可以根据流表进行数据和报文的匹配,并且在匹配过程中记录交换机通过流表匹配的数据量。
S504:当交换机通过流表匹配的数据量达到流表的数据量生存周期参数值时,交换机将流表进行老化;
示例性地,由于数据量生存周期Packet count参数与Timeouts的hard timeout参数和idle timeout参数类似,属于流表的一种生存周期,因此,当流表的数据量生存周期Packet count到来时,交换机需要将其进行老化,从而降低流表占用的存储空间;
S505:交换机将流表进行老化之后,向控制器发送流表的老化通告;
具体在本实施例中,本领域技术人员可以理解的,当流表中的OFPFF_SEND_FLOW_REM标记被置位时,说明交换机在对流表进行老化后需要向控制器发送老化通告,用于通知流表的老化理由。
在本实施例中,具体的老化通告消息为OFPT_FLOW_REMOVED,其中,具体的用于记录通告内容的ofp_flow_removed结构如下所示:
struct ofp_flow_removed{
struct ofp_header header;
……
uint8_t reason;/*老化理由*/
uint16_t idle_timeout;/*剩余的idle time时间*/
uint16_t hard_timeout;/*剩余的hard time时间*/
uint64_t packet_count_overflow;/*剩余的数据量计数*/
……
};
而ofp_flow_removed结构中的老化理由uint8_t reason可以是一个枚举
值,具体为:
enum ofp_flow_removed_reason{
OFPRR_IDLE_TIMEOUT=0,/*Flow idle time exceeded idle_timeout.*/流的空闲时间超过了定义的idle-timeout阈值。
OFPRR_HARD_TIMEOUT=1,/*流的时间超过了定义的hard_timeout时间*/
OFPRR_DELETE=2,/*流模式下的删除。*/
OFPRR_GROUP_DELETE=3,/*组已经被移除*/
OFPRR_PACKET_COUNT=4,/*匹配的报文数据量超过了定义的packet_count参数值*/
};
由上述的具体枚举值可以得知,当交换机通过流表完成固定的数据量匹配之后,对该流表进行老化的老化理由取值应该是4。
另外由于流表老化的原因是数据量生存周期参数到期,而并非Timeouts的hard timeout参数和idle timeout参数到期,因此,交换机还可以将流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout封装在流表的老化通告中;另外,当流表老化的原因是Timeouts的hard timeout参数或idle timeout参数到期时,交换机还可以将流表剩余的数据量生存周期参数值封装在流表的老化通告中;所以,流表的老化通告还可以包括:流表剩余的数据量生存周期参数值、所述流表剩余的最大生存时间hard timeout和流表剩余的空闲生存时间idle timeout。具体在老化通告OFPT_FLOW_REMOVED消息的ofp_flow_removed结构中,uint64_t packet_count_overflow、uint16_t idle_timeout和uint16_t hard_timeout这三个参数分别对应赋值为流表剩余的数据量生存周期参数值、流表剩余的空闲生存时间和流表剩余的最大生存时间。
可以理解的,当流表老化的原因是数据量生存周期参数到期时,流表
的老化通告OFPT_FLOW_REMOVED消息中的uint64_t packet_count_overflow参数赋值为零。
本实施例提供的基于OpenFlow协议的流表老化方法的详细流程,交换机通过数据量生存周期Packet count参数对流表进行老化,可以使得流表的生存周期仅与交换机通过流表匹配的数据量有关,与流表在交换机中保存的时间无关,因此,数据量生存周期Packet count参数比Timeouts的hard timeout参数和idle timeout参数更加适合服务提供商根据流量进行计费的数据业务。
基于前述实施例相同的技术构思,参见图6,其示出了本发明实施例提供的一种交换机60的结构,该交换机可以包括:接收单元601、流表设置单元602和流表老化单元603,其中,
所述接收单元601,配置为接收控制器下发的流表配置消息;其中,所述流表配置消息包括流表的数据量生存周期参数值;
所述流表设置单元602,配置为根据所述接收单元601接收的流表配置消息设置所述流表的数据量生存周期参数值;
所述流表老化单元603,配置为当所述交换机60通过所述流表匹配的数据量达到所述流表的数据量生存周期参数值时,将所述流表进行老化。
示例性地,参见图7,交换机60还包括验证单元604,配置为对所述流表配置消息进行一致性检测和验证;
以及,当确定所述流表配置消息正确时,触发所述流表设置单元602。
示例性地,参见图7,交换机60还包括发送单元605,配置为当所述流表配置消息包括所述流表的老化通告指示信息时,向所述控制器发送所述流表的老化通告,其中,所述流表的老化通告包括用于表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老化理由。
优选地,所述流表的老化通告还包括:所述流表剩余的数据量生存周
期参数值、所述流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout。
实际应用中,接收单元601可由交换机中的接口板(也称为板卡)实现,接口板用于连接用户终端或者其他网络设备的接口板,接口板有各种不同类型的网络通信接口,比如100M带宽接口、1000M带宽接口、10G带宽接口、ATM接口、光口(连接光缆)、电口(连接电缆);流表设置单元602、流表老化单元603、验证单元604可由交换机中的处理器(CPU)或逻辑可编程门阵列(FPGA)实现。
本实施例提供了一种交换机60,通过增加一种以流表所匹配的数据量为度量值的数据量生存周期Packet count参数,从而使交换机60能够以匹配的数据量作为流表的另一种生存周期类型,当交换机60通过流表完成固定的数据量匹配之后,对该流表进行老化,因此适用于服务运营商通过业务数据流量向用户计费的应用场景。
参见图8,其示出了本发明实施例提供的一种控制器80的结构,控制器80可以包括:封装单元801和发送单元802,其中,
所述封装单元801,配置为将流表的数据量生存周期参数值封装至流表配置消息;
所述发送单元802,配置为向交换机下发所述封装单元封装的流表配置消息;其中,所述流表配置消息用于所述交换机设置所述流表。
示例性地,参见图9,控制器80还可以包括:接收单元803,配置为接收所述交换机发送的所述流表的老化通告,其中,所述流表的老化通告包括用于表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老化理由。
优选地,所述流表的老化通告还包括:所述流表剩余的数据量生存周期参数值、所述流表剩余的最大生存时间hard timeout和所述流表剩余的空
闲生存时间idle timeout。
封装单元801可由控制器中的微处理器或逻辑可编程门阵列实现;发送单元802和接收单元803可由控制器中的接口板(也称为板卡)实现,接口板用于连接用户终端或者其他网络设备的接口板,接口板有各种不同类型的网络通信接口,比如100M带宽接口、1000M带宽接口、10G带宽接口、ATM接口、光口(连接光缆)、电口(连接电缆)。
本实施例提供了一种控制器80,通过增加一种以流表所匹配的数据量为度量值的数据量生存周期Packet count参数,从而使交换机60能够以匹配的数据量作为流表的另一种生存周期类型,当交换机60通过流表完成固定的数据量匹配之后,对该流表进行老化,因此适用于服务运营商通过业务数据流量向用户计费的应用场景。
基于前述实施例相同的技术构思,参见图10,其示出了本发明实施例提供的一种基于OpenFlow协议的流表老化系统100,其中,所述系统100包括交换机60和控制器80,其中,
所述交换机60配置为,接收控制器80下发的流表配置消息;其中,所述流表配置消息包括流表的数据量生存周期参数值;以及,
根据所述流表配置消息设置所述流表的数据量生存周期参数值;以及,
当所述交换机60通过所述流表匹配的数据量达到所述流表的数据量生存周期参数值时,将所述流表进行老化。
所述控制器80配置为,将流表的数据量生存周期参数值封装至流表配置消息;以及,
向所述交换机60下发所述流表配置消息;其中,所述流表配置消息用于所述交换机60设置所述流表。
作为一个实施方式,控制器80还配置为接收交换机60发送的流表的老化通告,其中,所述流表的老化通告包括用于表征流表由于匹配的数据
量达到所述流表的数据量生存周期参数值的老化理由。
作为一个实施方式,交换机60还配置为对流表配置消息进行一致性检测和验证;以及,当确定所述流表配置消息正确时,根据接收的流表配置消息设置所述流表的数据量生存周期参数值。
作为一个实施方式,交换机60还配置为当所述流表配置消息包括所述流表的老化通告指示信息时,向所述控制器发送所述流表的老化通告,其中,所述流表的老化通告包括用于表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老化理由。
作为一个实施方式,所述流表的老化通告还包括:所述流表剩余的数据量生存周期参数值、所述流表剩余的最大生存时间和所述流表剩余的空闲生存时间。
本实施例提供了一种基于OpenFlow协议的流表老化系统100,通过增加一种以流表所匹配的数据量为度量值的数据量生存周期Packet count参数,从而使交换机60能够以匹配的数据量作为流表的另一种生存周期类型,当交换机60通过流表完成固定的数据量匹配之后,对该流表进行老化,因此适用于服务运营商通过业务数据流量向用户计费的应用场景。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、
嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。
Claims (17)
- 一种流表老化方法,所述方法包括:交换机接收控制器下发的流表配置消息;其中,所述流表配置消息包括流表的数据量生存周期参数值;所述交换机根据所述流表配置消息设置所述流表的数据量生存周期参数值;当所述交换机通过所述流表匹配的数据量达到所述流表的数据量生存周期参数值时,所述交换机将所述流表进行老化。
- 根据权利要求1所述的方法,其中,所述交换机接收控制器下发的流表配置消息之后,以及所述交换机根据所述流表配置消息设置所述流表的数据量生存周期参数值之前,所述方法还包括:所述交换机对所述流表配置消息进行一致性检测和验证;当所述交换机确定所述流表配置消息正确时,所述交换机根据所述流表配置消息设置所述流表的数据量生存周期参数值。
- 根据权利要求1所述的方法,其中,所述交换机将所述流表进行老化之后,所述方法还包括:当所述流表配置消息包括所述流表的老化通告指示信息时,所述交换机向所述控制器发送所述流表的老化通告,其中,所述流表的老化通告包括用于表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老化理由。
- 根据权利要求3所述的方法,其中,所述流表的老化通告还包括:所述流表剩余的数据量生存周期参数值、所述流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout。
- 一种流表老化方法,所述方法包括:控制器将流表的数据量生存周期参数值封装至流表配置消息;所述控制器向交换机下发所述流表配置消息;其中,所述流表配置消息用于所述交换机设置所述流表。
- 根据权利要求5所述的方法,其中,当所述流表配置消息包括所述流表的老化通告指示信息时,所述方法还包括:所述控制器接收所述交换机发送的所述流表的老化通告,其中,所述流表的老化通告包括用于表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老化理由。
- 根据权利要求6所述的方法,其中,所述流表的老化通告还包括:所述流表剩余的数据量生存周期参数值、所述流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout。
- 一种交换机,所述交换机包括:接收单元、流表设置单元和流表老化单元,其中,所述接收单元,配置为接收控制器下发的流表配置消息;其中,所述流表配置消息包括流表的数据量生存周期参数值;所述流表设置单元,配置为根据所述接收单元接收的流表配置消息设置所述流表的数据量生存周期参数值;所述流表老化单元,配置为当所述交换机通过所述流表匹配的数据量达到所述流表的数据量生存周期参数值时,将所述流表进行老化。
- 根据权利要求8所述的交换机,其中,所述交换机还包括验证单元,配置为对所述流表配置消息进行一致性检测和验证;以及,当确定所述流表配置消息正确时,触发所述流表设置单元。
- 根据权利要求8所述的交换机,其中,所述交换机还包括发送单元,配置为当所述流表配置消息包括所述流表的老化通告指示信息时,向所述控制器发送所述流表的老化通告,其中,所述流表的老化通告包括用于表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老 化理由。
- 根据权利要求10所述的交换机,其中,所述流表的老化通告还包括:所述流表剩余的数据量生存周期参数值、所述流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout。
- 一种控制器,所述控制器包括:封装单元和发送单元,其中,所述封装单元,配置为将流表的数据量生存周期参数值封装至流表配置消息;所述发送单元,配置为向交换机下发所述封装单元封装的流表配置消息;其中,所述流表配置消息配置为所述交换机设置所述流表。
- 根据权利要求12所述的控制器,其中,所述控制器还包括:接收单元,配置为接收所述交换机发送的所述流表的老化通告,其中,所述流表的老化通告包括用于表征流表由于匹配的数据量达到所述流表的数据量生存周期参数值的老化理由。
- 根据权利要求13所述的控制器,其中,所述流表的老化通告还包括:所述流表剩余的数据量生存周期参数值、所述流表剩余的最大生存时间hard timeout和所述流表剩余的空闲生存时间idle timeout。
- 一种基于开放流OpenFlow协议的流表老化系统,所述系统包括交换机和控制器,其中,所述交换机配置为,接收控制器下发的流表配置消息;其中,所述流表配置消息包括流表的数据量生存周期参数值;以及,根据所述流表配置消息设置所述流表的数据量生存周期参数值;以及,当所述交换机通过所述流表匹配的数据量达到所述流表的数据量生存周期参数值时,将所述流表进行老化;所述控制器配置为,将流表的数据量生存周期参数值封装至流表配置消息;以及,向所述交换机下发所述流表配置消息;其中,所述流表配置消息用于所述交换机设置所述流表。
- 一种计算机可读介质,所述计算机可读介质中存储有可执行指令,所述可执行指令配置为执行权利要求1至4任一项所述的流表老化方法。
- 一种计算机可读介质,所述计算机可读介质中存储有可执行指令,所述可执行指令配置为执行权利要求5至7任一项所述的流表老化方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP14901469.8A EP3193483B1 (en) | 2014-09-10 | 2014-12-23 | Flow table ageing method, device and system and computer-readable medium |
US15/510,472 US20170289004A1 (en) | 2014-09-10 | 2014-12-23 | Flow table ageing method, device and system and computer-readable medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410457670.6A CN105407073A (zh) | 2014-09-10 | 2014-09-10 | 一种基于开放流OpenFlow协议的流表老化方法、设备和系统 |
CN201410457670.6 | 2014-09-10 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016037442A1 true WO2016037442A1 (zh) | 2016-03-17 |
Family
ID=55458306
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/094638 WO2016037442A1 (zh) | 2014-09-10 | 2014-12-23 | 流表老化方法、设备、系统及计算机可读介质 |
Country Status (4)
Country | Link |
---|---|
US (1) | US20170289004A1 (zh) |
EP (1) | EP3193483B1 (zh) |
CN (1) | CN105407073A (zh) |
WO (1) | WO2016037442A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106789697A (zh) * | 2016-12-01 | 2017-05-31 | 北京锐安科技有限公司 | 一种提高大批量网络流表老化效率的方法及装置 |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10659351B2 (en) * | 2015-12-16 | 2020-05-19 | Hewlett Packard Enterprise Development Lp | Dataflow consistency verification |
CN105897624A (zh) * | 2016-04-01 | 2016-08-24 | 浪潮电子信息产业股份有限公司 | 一种客户端、流表配置管理的方法和系统 |
US10200922B2 (en) * | 2017-06-09 | 2019-02-05 | Space Systems/Loral, Llc | Satellite network switching |
JP2020005051A (ja) * | 2018-06-26 | 2020-01-09 | 富士通株式会社 | 制御プログラム、制御装置、及び制御方法 |
CN113114570B (zh) * | 2020-01-13 | 2023-04-07 | 阿里巴巴集团控股有限公司 | 流表项的控制方法、装置及系统 |
CN112134806B (zh) * | 2020-09-30 | 2022-04-01 | 新华三大数据技术有限公司 | 一种流表老化时间调整方法、装置及存储介质 |
CN115150179B (zh) * | 2022-04-25 | 2024-01-02 | 深圳星云智联科技有限公司 | 软硬生命老化控制方法和相关装置、芯片、介质和程序 |
CN114915587B (zh) * | 2022-05-10 | 2023-12-22 | 深圳星云智联科技有限公司 | 流表老化管理方法及相关设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101370016A (zh) * | 2008-10-17 | 2009-02-18 | 成都市华为赛门铁克科技有限公司 | 一种数据流表的老化方法、装置和系统 |
CN101702680A (zh) * | 2009-11-26 | 2010-05-05 | 福建星网锐捷网络有限公司 | 媒体接入控制地址的老化方法、装置和通信设备 |
CN102710448A (zh) * | 2012-06-12 | 2012-10-03 | 清华大学 | Savi交换机过滤表生存期参数自适应调整方法 |
CN102780641A (zh) * | 2012-08-17 | 2012-11-14 | 北京傲天动联技术有限公司 | 快速转发引擎的流表老化方法、装置以及交换机 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8300525B1 (en) * | 2009-01-30 | 2012-10-30 | Juniper Networks, Inc. | Managing a flow table |
WO2014040240A1 (zh) * | 2012-09-12 | 2014-03-20 | 华为技术有限公司 | 一种在线计费方法、设备及网络系统 |
-
2014
- 2014-09-10 CN CN201410457670.6A patent/CN105407073A/zh not_active Withdrawn
- 2014-12-23 WO PCT/CN2014/094638 patent/WO2016037442A1/zh active Application Filing
- 2014-12-23 US US15/510,472 patent/US20170289004A1/en not_active Abandoned
- 2014-12-23 EP EP14901469.8A patent/EP3193483B1/en not_active Not-in-force
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101370016A (zh) * | 2008-10-17 | 2009-02-18 | 成都市华为赛门铁克科技有限公司 | 一种数据流表的老化方法、装置和系统 |
CN101702680A (zh) * | 2009-11-26 | 2010-05-05 | 福建星网锐捷网络有限公司 | 媒体接入控制地址的老化方法、装置和通信设备 |
CN102710448A (zh) * | 2012-06-12 | 2012-10-03 | 清华大学 | Savi交换机过滤表生存期参数自适应调整方法 |
CN102780641A (zh) * | 2012-08-17 | 2012-11-14 | 北京傲天动联技术有限公司 | 快速转发引擎的流表老化方法、装置以及交换机 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3193483A4 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106789697A (zh) * | 2016-12-01 | 2017-05-31 | 北京锐安科技有限公司 | 一种提高大批量网络流表老化效率的方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
EP3193483A1 (en) | 2017-07-19 |
EP3193483B1 (en) | 2019-02-27 |
US20170289004A1 (en) | 2017-10-05 |
EP3193483A4 (en) | 2017-08-16 |
CN105407073A (zh) | 2016-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2016037442A1 (zh) | 流表老化方法、设备、系统及计算机可读介质 | |
US11606297B2 (en) | Congestion control method and network device | |
US9407560B2 (en) | Software defined network-based load balancing for physical and virtual networks | |
US8976664B2 (en) | Facilitating network flows | |
US9306858B2 (en) | Network apparatus, communication system, abnormal traffic detection method, and program | |
EP2681871B1 (en) | In-service throughput testing in distributed router/switch architectures | |
US9167477B2 (en) | Transmission device, transmission method and computer program | |
CN108521371B (zh) | 报文转发方法及装置 | |
CN112787902B (zh) | 报文封装方法及装置、报文解封装方法及装置 | |
CN102148768A (zh) | 报文转发方法和报文转发设备 | |
WO2022001482A1 (zh) | 流量计费方法、网络设备及存储介质 | |
US20150236955A1 (en) | Congestion Notification in a Network | |
CN105656800A (zh) | 一种传输报文的方法及装置 | |
US10050856B2 (en) | Communication device, network available bandwidth estimation method in communication device, and storage medium on which network available bandwidth estimation program has been recorded | |
US20140023069A1 (en) | Method and apparatus for packet buffering measurement | |
EP3381218A1 (en) | Setting a lifetime limit of a data packet to minimize congestion and contention | |
CN111510394A (zh) | 一种报文调度方法、相关设备及计算机存储介质 | |
CN102685014B (zh) | 用于测量业务流的性能指标的方法和发送端设备 | |
US20230057487A1 (en) | Data packet format to communicate across different networks | |
CN116614481A (zh) | 一种多媒体数据传输方法、装置、设备及存储介质 | |
JP2017098660A (ja) | ネットワークシステム、及びスイッチ | |
EP3220671A1 (en) | Group resource update processing method, device and system, and cse | |
KR20210002548A (ko) | 멀티캐스트 패킷 처리 방법 및 네트워크 디바이스 | |
CN103580959A (zh) | 一种分布式统计上报的实现方法 | |
CN114079652A (zh) | 数据处理方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14901469 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 15510472 Country of ref document: US |
|
REEP | Request for entry into the european phase |
Ref document number: 2014901469 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2014901469 Country of ref document: EP |