CONTROL DEVICE, TRANSFER DEVICE, AND CONTROL METHOD
A control device that controls a transfer device, includes a memory and a processor coupled to the memory and configured to evaluate, for each of a plurality of processing rules to be used to process a packet in the transfer device, a processing load caused upon identification of a packet matching the processing rule, based on the type of an application requirement identifying the packet to which the processing rule is applied, generate, as a table to be used by the transfer device, a rule table storing the plurality of processing rules in order from the lowest processing load to the highest processing load, and transmit, to the transfer device, a control packet to request the transfer device to set the rule table.
Latest FUJITSU LIMITED Patents:
This application is a continuation application of International Application PCT/JP2018/000275 filed on Jan. 10, 2018 and designated the U.S., the entire contents of which are incorporated herein by reference. The International Application PCT/JP2018/000275 is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2017-013801, filed on Jan. 30, 2017, the entire contents of which are incorporated herein by reference.
FIELDThe embodiments relate to a control device, a transfer device, and a control method.
BACKGROUNDIn recent years, attention has been focused on network functions virtualization (NFV) that virtualizes network functions. According to NFV, network functions are enabled by applications executed in general-purpose servers. Thus, the cost of a network device for a system using NFV may be reduced, compared with a system in which each network function is enabled by a dedicated device. In addition, NFV may improve the flexibility and functionality of a network service.
However, when a network function is virtualized, the processing performance of the network function may vary depending on a virtualization environment or set details used to enable the network function. For example, the maximum throughput of a network function, which is a firewall, a router, or the like and executes a process of searching for a table, depends on the number of times that the table is searched for upon a packet process. For example, when a general-purpose server operates as a firewall, the general-purpose server repeatedly executes a process of comparing information included in a header of a received packet with matching requirements included in a rule table until a matching requirement applicable to the received packet is identified. As the number of times that the determination of whether a matching requirement is applicable to the received packet is made is larger, a processing load of the server operating as the firewall is higher and a delay of the transfer of the packet is longer. A packet filter has been proposed, which migrates matching requirements included in a table so that a matching requirement that more frequently matches a received data packet is migrated to a position closer to the top of the table in order of matching requirement and that a matching requirement that less frequently matches a received data packet is migrated to a position closer to the bottom of the table in order of matching requirement (refer to, for example, Japanese Laid-open Patent Publication No. 2000-174808 and the like).
As a related technique, a rule control device has been proposed, which evaluates multiple rules in predetermined order, determines a rule to be applied to a packet, and generates a second rule based on the number of times that the rule has been applied and characteristic information of a first rule evaluated last (refer to, for example, Japanese Laid-open Patent Publication No. 2009-77030 and the like). In the rule control device, the second rule is set to be evaluated before the first rule.
For example, as related art, Japanese Laid-open Patent Publication No. 2000-174808, Japanese Laid-open Patent Publication No. 2009-77030, and the like have been disclosed.
Loads to be applied due to processing executed to determine whether multiple rules to be used for a process to be executed on a packet are applicable may not the same. In a process of reducing a processing load of a server, a difference between processing loads caused by the determination of whether multiple rules are applicable is not considered. A certain processing rule set in a region close to the top of a rule table is to be searched for in a search for a process executed on a packet to which a processing rule registered after the certain processing rule is applied. Thus, it is assumed that requirements are migrated so that as a requirement more frequently matches a received data packet, the requirement is migrated to a position closer to the top of a rule table in order of matching requirement. Even in this case, when a load applied due to the determination of a processing rule set in a region close to the top of the rule table is high, a processing load caused by a process of searching for the table may not be reduced.
Under such circumstances, it is desirable to reduce a processing load caused by a process of searching for a table.
SUMMARYAccording to an aspect of the embodiments, a control device that controls a transfer device, includes a memory and a processor coupled to the memory and configured to evaluate, for each of a plurality of processing rules to be used to process a packet in the transfer device, a processing load caused upon identification of a packet matching the processing rule, based on the type of an application requirement identifying the packet to which the processing rule is applied, generate, as a table to be used by the transfer device, a rule table storing the plurality of processing rules in order from the lowest processing load to the highest processing load, and transmit, to the transfer device, a control packet to request the transfer device to set the rule table.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention.
Case C1 indicates an example of multiple rules applicable to a process to be executed on a packet. Case C1 indicates three rules A, B, and C. It is assumed that a value of a destination Internet Protocol (IP) address of a packet is specified as an application requirement of the rule A and that values of destination port numbers of packets are specified as application requirements of the rules B and C. In this case, a processing load applied due to the determination of whether the rule A is applied to a packet to be processed is the sum of a processing load applied due to the reading of the destination IP address from an IP header of the packet and a processing load applied due to a process of comparing the read destination IP address with the application requirement. A processing load applied due to the determination of whether the rule B or the rule C is applied to a packet to be processed is the sum of a processing load applied due to the reading of a destination port number from a payload of the packet and a processing load applied due to the comparison of the read destination port number with an application requirement.
A processing load applied due to access to information that is a destination IP address or the like and included in an IP header is lower than a processing load applied due to access to information that is a port number or the like and included in a payload in many cases. It may be said that a processing load applied due to the destination of whether the rule A is applied to a packet to be processed is lower than a processing load applied due to the determination of whether the rule B or the rule C is applied to a packet to be processed. In addition, as a load applied due to processing is lower, a time period for the processing is shorter. Thus, it is estimated that a time period for determining whether the rule A is applied to a packet to be processed is shorter than a time period for determining whether the rule B or the rule C is applied to a packet to be processed. A time period for identifying a processing rule to be applied to a packet is the sum of time periods for a process of determining whether processing rules are applicable to the packet. Thus, the time period for identifying the processing rule to be applied to the packet varies depending on the order in which processing rules are stored in a rule table.
For example, a device that uses a rule table indicated in a table T1 determines whether the rules A, B, and C are applicable to a packet in the order of the rules A, C, and B. A device that uses a rule table indicated by table T2 determines whether the rules A, B, and C are applicable to a packet in the order of the rules B, C, and A. It is assumed that a packet to which the rule C is applied is to be processed. In this case, the device that uses the table T1 determines whether the rule A is applied, and determines whether the rule C is applied. Thus, the device that uses the table T1 determines that the rule C is applied to the packet to be processed. A time period for determining the rule to be applied to the packet to be processed in accordance with the rule C is the sum of a time period for determining whether the rule A is applied and a time period for determining whether the rule C is applied. Since the device that uses the table T2 determines whether the rule B is applied, and determines whether the rule C is applied. Thus, a time period for determining a rule to be applied to a packet to be processed in accordance with the rule C is the sum of a time period for determining whether the rule B is applied and a time period for determining whether the rule C is applied. The time period for determining whether the rule A is applied is shorter than the time period for determining whether the rule B is applied. Thus, the device that uses the table T1 may more quickly process a packet to which the rule C has been applied than the device that uses the table T2. A device according to each of embodiments sorts processing rules within a rule table in order from the lowest processing load to the highest processing load.
The processing device according to each of the embodiments acquires information of rule types for processing rules included in the rule table (in step S101). The “rule types” are types of parameters to be used to specify application requirements for the processing rules. Combinations of information elements to be used to specify the application requirements are combinations of multiple information items such as combinations of destination IP addresses and destination port numbers or the like and are acquired as the rule types for the processing rules in which the application requirements are specified. After that, the processing device calculates a processing load for each of the rule types (in step S102). Then, the processing device sorts the processing rules included in the rule table in order from the lowest processing load to the highest processing load (in step S103).
In this manner, the processing device sorts the processing rules included in the rule table in order from the lowest processing load to the highest processing load. Thus, a processing load caused by a search for a processing rule to be applied in the processing device is low, compared with the case where a table in which the number of processing rules to be subjected to the determination of whether the processing rules are applicable is the same and the processing rules are not sorted in order from the lowest processing load to the highest processing load is used. The processing device according to each of the embodiments may be a control device that sets a rule table in a transfer device installed in a network. Alternatively, the processing according to each of the embodiments may be a transfer device that sets multiple processing rules acquired from a control device in a rule table.
First EmbodimentA first embodiment describes, as an example, the case where a control device that sets a rule table in a transfer device installed in a network sets the order of processing rules included in the rule table.
The storage section 30 stores a performance profile table 31 and a rule table 32. In the rule table 32, information that is set in transfer devices is associated with the transfer devices to be controlled by the control device 10 and is recorded. Examples of the performance profile table 31 and rule table 32 are described later.
The control section 20 includes an evaluating section 21, a generating section 22, and a packet processing section 23. Upon acquiring processing rules from the rule table 32, the evaluating section 21 uses the performance profile table 31 to calculate a processing load for each of rule types to be used to set application requirements of the processing rules. The performance profile table 31 is information with which processing loads are associated for the rule types to be used to set the application requirements of the processing rules set in the rule table 32. The generating section 22 generates the rule table 32 by sorting the processing rules in order from the lowest processing load applied due to a process of determining whether a packet matches an application requirement. The packet processing section 23 processes a received packet and generates a packet to be transmitted. For example, the packet processing section 23 generates a control packet to be used to notify information included in the rule table 32 or the like to a transfer device in which the rule table 32 is to be set.
In the control device 10, the processor 101 operates as the control section 20 and the memory 102 operates as the storage section 30. In the control device 10, the network connection device 104 operates as the communication section 11.
The first embodiment separately describes the acquisition of the performance profile table 31, an example of the calculation of a time period for processing a packet, and the setting of processing rules. A performance profile indicates a time period for determining whether one processing rule in which an application requirement for a certain rule type is set is applied.
(1) Acquisition of Performance Profile Table 31
A network N1 illustrated in
The measurer 70 holds the rule table 6 in advance. In the generation of the packet to be transmitted to the transfer device 5, the measurer 70 recognizes the order that the processing rule that is applied to the generated packet to be transmitted is stored in the rule table 6. In the rule table 6 illustrated in
The measurer 70 transmits, for each of numbers indicating setting order during a predetermined time period, multiple packets to which a processing rule with setting order indicated by the number are applied, and analyzes the packets received from the transfer device 5, thereby calculating the maximum throughput for the packets for each of the numbers indicating the setting order. For example, it is assumed that the measurer 70 transmits multiple packets with the destination IP address=a to the transfer device 5 during the predetermined time period. The transfer device 5 references the rule table 6 and determines that the processing rule with the setting order=1 is applied to the received packets. Then, the transfer device 5 executes a process of transferring the packets in accordance with the processing rule with the setting order=1 (refer to an arrow A3). After that, the measurer 70 receives the packets transferred by the transfer device 5 via a route indicated by the arrow A2, thereby calculating the maximum throughput for the packets to which the processing rule with the setting order=1 has been applied.
Similarly, it is assumed that the measurer 70 transmits packets with the destination IP address=x to the transfer device 5 during a predetermined time period. The transfer device 5 references the rule table 6 and determines whether each of the processing rules is applicable to the received packets in the order indicated by the setting order of the processing rules. As a result, after the transfer device 5 determines that the processing rule with the setting order=200 is applied to the packets with the destination IP address=x, the transfer device 5 executes a process of transferring the packets with the destination IP address=x in accordance with the processing rule with the setting order=200 (refer to an arrow A4). In this case, the measurer 70 receives the packets transferred by the transfer device 5 via the route indicated by the arrow A2, thereby calculating the maximum throughput for the packets to which the processing rule with the setting order=200 has been applied. The measurer 70 calculates throughput for packets to which the other processing rules with the other setting order are applied after the transfer device 5 executes the process of transferring the packets.
a indicated in a graph G1 illustrated in
β indicated in the graph G1 illustrated in
A model M2 uses an equation to indicate a time period Pn for processing a packet in the case where a processing rule to be applied is determined by executing a determination process to determine whether processing rules of the same rule type are applied a number n of times. As described with reference to
A model M3 uses an equation to indicate maximum throughput Tn obtained in the case where the time period for processing a packet is indicated by the model M2. The maximum throughput is indicated by the number of packets to be processed by the transfer device 5 per second, while the model M2 indicates the time period for processing each of the packets. Thus, the maximum throughput Tn=1/(a+b×n). Each of the values b indicated in the models M2 and M3 is any of bdip, bsip, bdp, and bsp depending on a type of information to be used to specify an application requirement.
The measurer 70 uses the equation indicated in the model M3 illustrated in
The measurer 70 reads the rule table 32 to be set by the control device 10 and determines the number (N) of types of combinations of parameters included as application requirements in processing rules included in the rule table 32 (in step S1). For example, it is assumed that all processing rules used to generate the graphs of α to δ illustrated in
When the variable n is equal to or larger than the fixed value N (No in step S4), the measurer 70 executes the fitting to calculate performance profiles (in step S6). For example, the measurer 70 calculates, for each of the rule types, a time period (performance profile) b for determining whether a single processing rule is applied, and the measurer 70 calculates, for each of the rule types, a time period a for transmitting and receiving a packet. When the measurement results are the graph G1 illustrated in
(2) Example of Calculation of Time Period for Processing Packet
A time period for processing a packet may be calculated using the performance profile table 31 and setting order of the processing rules included in the rule table 32.
In this case, a time period P1 for processing a packet to which the first processing rule is applied is the sum of a time period a for transmitting and receiving the packet and a time period bdp for executing the process of determining whether the first processing rule is applied. A time period P2 for processing a packet to which the second processing rule is applied is the sum of a time period a for transmitting and receiving the packet, a time period bdp for the process of determining whether the first processing rule is applied, and a time period bdip for executing the process of determining whether the second processing rule is applied. Similarly, a time period P3 for processing a packet to which the third processing rule is applied is a+bdp+bdip+bsp. In addition, a time period P4 for processing a packet to which the fourth processing rule is applied is a+bdp+bdip+bsp+bdip. A time period P5 for processing a packet to which the fifth processing rule is applied is a+bdp+bdip+bsp+bdip+bdip. Furthermore, a time period P6 for processing a packet to which the sixth processing rule is applied is a+bdp+bdip+bsp+bdip+bdip+bsip.
(3) Setting of Processing Rules
As described with reference to
When the performance profile table 31 is set in the control device 10 by the measurer 70, the evaluating section 21 identifies processing rules to be set in the rule table 32 (in step S11). The evaluating section 21 sets the variable m to 1 (in step S12). After that, the evaluating section 21 determines processing loads for the processing rules for each of the types (rule types) of the combinations of parameters included as the application requirements in the processing rules. The generating section 22 sets, in the rule table 32, a processing rule of a rule type for which an m-th lowest processing load has been obtained (in step S13). In this case, multiple processing rules for which the m-th lowest processing load has been obtained may exist. When the multiple processing rules for which the m-th lowest processing load has been obtained exist, all the processing rules for which the m-th lowest processing load has been obtained are set in step S13. After that, the generating section 22 determines whether the variable m is smaller than the fixed value N (in step S14). When the variable m is smaller than the fixed value N (Yes in step S14), the generating section 22 increments the variable m by 1 and causes a process illustrated in
The evaluating section 21 acquires rule types from the processing rules indicated by R1 and evaluates a processing load for each of the rule types. Setting order of the processing rules indicated by R1 is used as rule numbers of the processing rules in order to clarify a process of setting the rules. For example, a processing rule having a rule number=1 specifies that a packet with a destination port number=a is to be discarded, and a processing rule having a rule number=3 specifies that a packet with a destination IP address=c is to be transferred.
In the example illustrated in
The generating section 22 identifies the order of values of bdp, bsip, and bdip using the performance profile table 31 (illustrated in
When the rule table 32 is generated, the packet processing section 23 included in the control device 10 generates a control packet to set information of the rule table 32 in the transfer device 5. The packet processing section 23 transmits the generated control packet to the transfer device 5 via the transmitter 12. As the control packet, an arbitrary packet available to notify the processing rules to the transfer device 5 may be used. For example, the control packet may be an OpenFlow FlowMod message. Upon receiving the control packet, the transfer device 5 stores the notified processing rules as the rule table 6 and processes a data packet received after the reception of the control packet in accordance with the rule table 6.
Case C11 indicates an example in which the rule table 32 is generated in the control device 10 in accordance with the method according to the first embodiment and the rule table 6 of the transfer device 5 is set in accordance with the rule table 32. It is assumed that the rule table 32 generated in case C11 and the rule table 6 set in the transfer device 5 are indicated by a table T11. A time period for executing the determination process on an application requirement set using a destination IP address is shorter than a time period for executing the determination process on an application requirement set using a destination port number. Thus, in the table T11, application requirements are set using destination IP addresses in 1st to 100th processing rules from the top of the rule table. In the table T11, application requirements are set using destination port numbers in 101st and later processing rules from the top of the rule table.
Case C12 indicates an example in which a rule table generated in accordance with a method different from the method according to the first embodiment is used in the transfer device 5. It is assumed that the rule table used in case C12 is indicated by a table T12. In the table T12, application requirements are set using destination port numbers in 1st to 100th processing rules from the top of the rule table, and application requirements are set using destination IP addresses in 101st and later processing rules from the top of the rule table.
A graph G11 indicates relationships between setting order of processing rules included in a rule table used in the transfer device 5 and maximum throughput obtained by a process executed on packets to which the processing rules are applied in each of cases C11 and C12. In case C12, since the table T12 is used, whether processing rules, which are to be determined to be applicable or to not be applicable using destination port numbers, are applicable is determined first. Thus, as indicated by a graph indicated by C12 in the graph G11, the maximum throughput in case C12 is lower than the maximum throughput in case C11 even for processing rules that have setting order=20 to 100 in the rule table and are to be determined to be applied or to not be applied at relatively early stages.
In case C11, whether processing rules to be determined to be applicable or to not be applicable using destination IP addresses are applicable is determined first as indicated by the table T11 in the first embodiment. Thus, as indicated by a graph indicated by C11 in the graph G11, the maximum throughput in case C11 is higher than the maximum throughput in case C12 for the processing rules that have the setting order=20 to 100 in the rule table and are to be determined to be applied or not be applied at the relatively early stages. In addition, since a time period for determining whether the processing rules with the setting order=1 to 100 are applicable in case C11 is shorter than a time period for determining whether the processing rules with the setting order=1 to 100 are applicable in case C12, a time period for processing packets to which the 101st and later processing rules to be determined to be applicable or to not be applicable using destination port numbers are applied in case C11 is shorter than that in case C12. Thus, the maximum throughput for packets to which the 101st to 199th processing rules are applied in case C11 is higher than the maximum throughput for the packets to which the 101st to 199th processing rules are applied in case C12.
In this manner, according to the first embodiment, the processing rules included in the rule table are sorted in order from the lowest processing load to the highest processing load. When the rule table is used and set in the first embodiment, the throughput is high, compared with the case where a table in which the number of processing rules to be subjected to the determination of whether the processing rules are applicable is the same and the processing rules are not set in order from the lowest processing load to the highest processing load is used. In addition, in the first embodiment, since the throughput is high, a processing load caused by a search for a processing rule in a transfer device 5 may be reduced.
Second EmbodimentA second embodiment describes a process to be executed in the case where a rule table is optimized using processing loads for processing rules and traffic of packets to which the processing rules are applied. The second embodiment describes, as an example, the case where a control device 40 sets the rule table in a transfer device 5 to be controlled by the control device 40. A network including the control device 40 and the transfer device 5 is the same as or similar to the network illustrated in
The acquiring section 51 acquires, for each of application requirements, the amount of a packet processed by the transfer device 5 during a predetermined time period from the transfer device 5, which is to be controlled by the control device 40, via the communication section 11. As a packet to be used by the acquiring section 51 in order to acquire the amount of a packet processed by the transfer device 5 during the predetermined time period for each of the application requirements, an arbitrary packet available upon the acquisition of traffic by the transfer device 5 to be controlled by the control device 40 may be applied. The acquiring section 51 stores the acquired information as the traffic information 61 in the storage section 60. The candidate identifying section 52 calculates the order of multiple processing rules included in the rule table 32 as available candidates for setting order in the case where the processing rules are set in different order from the order of the processing rules included in the current rule table 32. The calculating section 53 calculates an evaluation value serving as an index of a processing load applied in the transfer device 5 for each of the candidates calculated by the candidate identifying section 52 in the case where the rule table in which processing rules are set in order indicated by the candidate and traffic is indicated by the traffic information 61. The evaluation values serve as the indices for evaluating loads applied to the transfer device 5 that processes packets using processing time periods for rule types.
The generating section 22 updates the rule table 32 based on the evaluation values calculated by the calculating section 53. In the rule table 32, the rule table 6 held in one or more transfer devices 5 to be controlled by the control device 40 is associated with information identifying the one or more transfer devices 5 and is recorded. When the rule table 32 is updated, the packet processing section 23 generates a control packet to change the rule table held in the one or more transfer devices 5 so that information of the rule table 6 held in the one or more transfer devices 5 matches information of the rule table 32. The packet processing section 23 transmits, via the communication section 11, the generated control packet to the one or more transfer devices 5 to be controlled. Then, the one or more transfer devices 5 update the rule table 6 based on the control packet.
A method of generating an example of an evaluation value and an equation indicating the evaluation value are described below. A processing load (WL) applied to a transfer device 5 is expressed by Equation (1).
In Equation (1), Pn indicates maximum throughput of the transfer device 5 for an n-th (n is in a range of 1 to N) rule registered in the rule table 6. The maximum throughput may be measured by the measurer 70 in a process that is the same as or similar to the process described with reference to
The following Equation (4) is obtained by transforming Equation (3).
In each of Equations (2) to (4), a indicates a time period for transmitting and receiving a single packet by the transfer device 5. In each of Equations (2) to (4), bi indicates a performance profile determined based on a combination (rule types) of parameters specified as application requirements in an i-th processing rule registered in the rule table 6 from the top of the rule table 6. For example, it is assumed that rule types of processing rules included in the rule table 6 are four rule types, a rule for only destination IP addresses, a rule for only source IP addresses, a rule for only destination port numbers, and a rule for only source port numbers. In this case, since bi is determined based on the rule type of the i-th registered processing rule, bi is any of bdip, bsip, bdp, and bsp.
The first term on the right side of Equation (4) is a fixed value regardless of the order of the rules. It may be said that, as a value of the second term on the right side of Equation (4) is smaller, a processing load applied to the transfer device 5 is lower. The calculating section 53 uses, as an evaluation value, a value obtained from summation indicated by (5).
In the summation indicated by (5), bi indicates a performance profile determined based on the rule type of the i-th registered processing rule. It is assumed that bi is set as the performance profile table 31 in the control device 40 by a process that is the same as or similar to the process described in the first embodiment.
The traffic information 61 is an example of information acquired by the acquiring section 51 after the acquiring section 51 transmits, to the transfer device 5a via the communication section 11, a control packet that requests the information of traffic processed by the transfer device 5a. Rule IDs indicate setting order of the processing rules set in the rule table 6 held in the transfer device 5a. Rule types are types of parameters used to specify application requirements of the processing rules. In the example illustrated in
The candidate identifying section 52 generates candidates for the setting order of the processing rules included in the rule table 32-1. For example, the candidate identifying section 52 generates, as a candidate (candidate A) to be set in the rule table, the order of the rule IDs=1, 2, 4, and 3. In addition, the candidate identifying section 52 may generate, as another candidate (candidate B) settable in the rule table, the order of the rule IDs=3, 2, 4, and 1.
The calculating section 53 uses the performance profile table 31 (refer to
An evaluation value Y1 obtained for the candidate A=t1×bdip+t2×(bdip+bsip)+t4×(bdip+bsip+bsip)+t3×(bdip+bsip+bsip+bdp)=1.57×10−5. An evaluation value Y2 obtained for the candidate B=t3×bdp+t2×(bdp+bsip)+t4×(bdp+bsip+bsip)+t1×(bdp+bsip+bsip+bdip)=3.69×105. The calculating section 53 calculates evaluation values for the other candidates generated by the candidate identifying section 52 and excluding the candidates A and B in the same manner as described above.
The generating section 22 generates a new rule table 32 by sorting the processing rules included in the rule table 32-1 in accordance with a candidate with the smallest evaluation value among the evaluation values obtained by the process executed by the calculating section 53. The example illustrated in
As a processing rule of a rule type with a small performance profile value is set to be closer to the top of the rule table, an evaluation value obtained for the processing rule is smaller. In the case where multiple processing rules of the same rule type exist, as a processing rule applied to a packet with large traffic is set to be closer to the top of the rule table, an evaluation value obtained for the processing rule is smaller. Thus, according to the second embodiment, the generating section 22 sets multiple processing rules from the top of the rule table in ascending order of performance profile value. When multiple processing rules with the same performance profile value exist, the generating section 22 sets the processing rules in descending order of traffic.
The generating section 22 sets the variable Y to an infinite value (∞), the variable x to 1, and the variable m to 0 (in step S21). The calculating section 53 calculates an evaluation value yx for an x-th candidate (in step S22). The generating section 22 determines whether the variable Y is larger than the evaluation value yx (in step S23). When the variable Y is larger than the evaluation value yx (Yes in step S23), the generating section 22 substitutes the evaluation value yx into the variable Y, substitutes the variable x into the variable m, and stores the variables Y and m (in step S24). After that, the generating section 22 determines whether the variable x is smaller than the fixed value X (in step S25). When the variable x is smaller than the fixed value X (Yes in step S25), the generating section 22 increments the variable x by 1 and causes a process illustrated in
When the variable x is equal to or larger than the fixed value X (No in step S25), evaluation values obtained for all the candidates are already compared with the variable Y, the minimum evaluation value is held as the variable Y, and the order of the processing rules that is indicated by a candidate for which the minimum evaluation value is obtained is held as the variable m. Thus, the generating section 22 uses the m-th candidate to update the rule table 32 (in step S27).
When the variable Y is equal to or smaller than the evaluation value yx (No in step S23), the processes of steps S25 and later are executed to compare the variable Y with an evaluation value for a next candidate.
After the rule table 32 is updated by the process illustrated in
Case C21 indicates a system using a rule table in which processing rules are sorted in descending order of traffic. Traffic and maximum throughput obtained for packets to which processing rules having rule IDs are applied in case C21 are illustrated on the left side of
Case C22 indicates a system using a rule table generated by the generating section 22 in the second embodiment. Traffic and maximum throughput in case C22 are illustrated on the right side of
A central portion of
Thus, as described in the second embodiment, the rule table 6 that causes only a low load in the transfer device 5 may be generated based on not only traffic for each of the processing rules but also processing loads applied when the determination of whether the processing rules are applicable is made. Thus, in the second embodiment, a processing load caused by a search for a processing rule to be applied in the transfer device 5 may be low.
Third EmbodimentA conflict relationship between multiple processing rules may exist depending on a rule table. A third embodiment describes details set in a rule table when a conflict relationship between multiple processing rules exists. In the following description, a relationship between rules that are sorted in different order from initial order and cause a different process to be executed from a process to be executed in accordance with the rules set in the initial order is referred to as conflict relationship.
In this case, since an application requirement (destination port number=80) of the processing rule having the rule ID=3 is not applied to a packet to which the processing rule having the rule ID=1 is applied, the processing rule having the rule ID=1 and the processing rule having the rule ID=3 do not have a conflict relationship. A packet (destination port number=60) to which the processing rule having the rule ID=1 is applied may satisfy an application requirement (destination IP address 192.168.10.0/24) of the processing rule having the rule ID=2. However, each of the processing rules having the rule IDs=1 and 2 indicates that a packet is to be discarded. Thus, regardless of whether the processing rule having the rule ID=1 or the processing rule having the rule ID=2 is set first, details of a process to be executed on a packet do not vary. Thus, the processing rule having the rule ID=1 and the processing rule having the rule ID=2 do not have a conflict relationship.
A packet (destination IP address 192.168.10.0/24) to which the processing rule having the rule ID=2 is applied may satisfy the application requirement (destination port number=80) of the processing rule having the rule ID=3. In this case, since processing details may vary depending on the order of the processing rules, the processing rule having the rule ID=2 and the processing rule having the rule ID=3 have a conflict relationship. For example, when the processing rule having the rule ID=2 is set before the processing rule having the rule ID=3 as indicated in the rule table 32-3, a packet specifying the destination IP address=192.168.10.0/24 and the destination port number=80 is discarded in accordance with the processing rule having the rule ID=2. When the processing rule having the rule ID=3 is set before the processing rule having the rule ID=2, the packet specifying the destination IP address=192.168.10.0/24 and the destination port number=80 is transferred in accordance with the processing rule having the rule ID=3.
In the third embodiment, the candidate identifying section 52 identifies processing rules having a conflict relationship and included in the rule table 32. A method of determining whether processing rules have a conflict relationship is a known arbitrary method.
After the candidate identifying section 52 generates candidates for the order of the sorted processing rules included in the rule table 32, the candidate identifying section 52 determines whether the order of multiple processing rules having a conflict relationship among the candidates for the order of the processing rules matches the order of the multiple processing rules before the sorting in the rule table 32. A table T21 illustrated in
In the second candidate indicated in the table T21, the processing rule having the rule ID=2, the processing rule having the rule ID=1, and the processing rule having the rule ID=3 are sorted in this order. Thus, in the second candidate and the rule table 32-3, the processing rule having the rule ID=2 is set before the processing rule having the rule ID=3. Thus, a conflict determination result of the second candidate indicates that the order of the processing rules having the conflict relationship matches the rule table 32-3 before the sorting (or the conflict determination result indicates OK). The same determination process is executed on the other candidates.
The candidate identifying section 52 selects, as an available candidate, only a candidate of which a conflict determination result is determined to indicate OK from among the generated candidates. For example, when the table T21 is used, the second and third candidates are selected as available candidates, but the first, fourth, and fifth candidates are determined to not be available. In this manner, in the generation of candidates for the order of processing rules, the candidate identifying section 52 limits candidates for the order of the processing rules so that the order of multiple processing rules having a conflict relationship matches the order of the processing rules included in the rule table 32 before the sorting.
The calculating section 53 calculates an evaluation value for only the candidate selected as the available candidate by the candidate identifying section 52. A process to be executed after the calculation of the evaluation value in the third embodiment is the same as or similar to that in the second embodiment.
The generating section 22 sets the variable Y to an infinite value (∞), the variable x to 1, and the variable m to 0 (in step S31). The candidate identifying section 52 checks a conflict relationship between processing rules included in the rule table 32 (in step S32). The candidate identifying section 52 determines whether the order of processing rules having a conflict relationship in an x-th candidate matches the current rule table 32 (in step S33). It is assumed that the order of the processing rules having the conflict relationship in the x-th candidate matches the current rule table 32 (Yes in step S33). In this case, the calculating section 53 calculates an evaluation value yx for the x-th candidate (in step S34). The generating section 22 determines whether the variable Y is larger than the evaluation value yx (in step S35). When the variable Y is larger than the evaluation value yx (Yes in step S35), the generating section 22 substitutes the evaluation value yx into the variable Y, substitutes the variable x into the variable m, and stores the variables Y and m (in step S36). After that, the generating section 22 determines whether the variable x is smaller than the fixed value X (in step S37). When the variable x is smaller than the fixed value X (Yes in step S37), the generating section 22 increments the variable x by 1 and causes a process illustrated in
When the variable x is equal to or larger than the fixed value X (No in step S37), evaluation values obtained for all the candidates are already compared with the variable Y, the minimum evaluation value is held as the variable Y, and the order of processing rules that is indicated by a candidate for which the minimum evaluation value is obtained is held as the variable m. Thus, the generating section 22 uses the m-th candidate to update the rule table 32 (in step S39).
When the variable Y is equal to or smaller than the evaluation value yx (No in step S35), the processes of steps S37 and later are executed to compare the variable Y with an evaluation value for a next candidate. When the order of the processing rules having the conflict relationship in the x-th candidate is determined to not match the current rule table 32 (No in step S33), processes of steps S37 and later are executed to compare the evaluation value for the next candidate with the variable Y.
According to the third embodiment, even the rule table including the processing rules having the conflict relationship may be updated without a change in processing details so as to reduce a processing load to be applied to the transfer device 5.
Modified ExamplesThe embodiments are not limited to the above description and may be variously modified. Some modified examples are described below.
The cases where each of the control devices 10 and 40 sets the rule table 32 and causes the transfer device 5, which is to be controlled, to set, as the rule table 6, information that is included in the rule table 32 after the setting and is to be used by the transfer device 5 are described above as examples. The transfer device that has acquired processing rules to be set in the rule table 6 may update the rule table 6 of the transfer device using the same method as the methods to be used by the control devices 10 and 40.
The storage section 90 stores a performance profile table 91, traffic information 92, and the rule table 6. The performance profile table 91 is information calculated by the same process as that used for the performance profile table 31 in the first embodiment. The traffic information 92 is related to traffic for each of processing rules for packets to be processed by the transfer device 80 and is the same as or similar to the traffic information 61 held in the control device 40.
The communication section 81 transmits and receives a packet to and from other devices including the control devices. The packet processing section 85 processes a packet. The packet processing section 85 records, in the rule table 6, a processing rule indicated in a control packet received from a control device. The packet processing section 85 records, as the performance profile table 91, information acquired from the measurer 70. In addition, the packet processing section 85 processes, in accordance with the rule table 6, a packet received from a device that is neither a control device nor the measurer 70 and is included in a network.
When traffic is not used to update the rule table 6, the transfer device 80 may not include the candidate identifying section 87 and the calculating section 88, like the first embodiment. The evaluating section 83 uses the performance profile table 91 to evaluate a processing load for each of the processing rules included in the rule table 6. The generating section 84 changes the order of the processing rules included in the rule table 6 based on the results of the evaluation by the evaluating section 83. A process executed in this case is the same as or similar to the process described with reference to
In the case where the rule table 6 is updated based on traffic, the transfer device 80 includes the candidate identifying section 87 and the calculating section 88. The candidate identifying section 87 generates candidates that indicate the order of the processing rules sorted in the rule table 6. The calculating section 88 uses the performance profile table 91 and the traffic information 92 to calculate evaluation values for the generated candidates. The evaluation values and a process of calculating the evaluation values are the same as or similar to those described in the second embodiment. In this case, the generating section 84 changes the order of the processing rules included in the rule table 6 based on the results of the calculation by the calculating section 88 so as to reduce a processing load of the transfer device 80. Processes executed in this case are the same as or similar to the processes described with reference to
The tables and the like that are described above are examples. The information elements included in the tables may be changed based on implementation.
The case where the one or more transfer devices 5 operate as the SDN switches are described above as an example. The one or more transfer devices 5, however, may operate as devices that are not SDN switches and process the tables in an arbitrary manner.
The cases where the candidate identifying sections 52 and 87 calculate all the candidates indicating the order of sorted processing rules are described above. The methods to be executed by the candidate identifying sections 52 and 87 to calculate the candidates may be changed based on the implementation. For example, the candidate identifying sections 52 and 87 may use the calculated candidates and evaluation values obtained for the candidates to search for a candidate in accordance with a genetic algorithm. In this case, each of the candidate identifying sections 52 and 87 generates a candidate indicating the order of changed processing rules based on a candidate for which an excellent evaluation value is obtained.
All examples and conditional language provided herein are intended for the pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed as limitations to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although one or more embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Claims
1. A control device that controls a transfer device, comprising:
- a memory; and
- a processor coupled to the memory and configured to
- evaluate, for each of a plurality of processing rules to be used to process a packet in the transfer device, a processing load caused upon identification of a packet matching the processing rule, based on the type of an application requirement identifying the packet to which the processing rule is applied,
- generate, as a table to be used by the transfer device, a rule table storing the plurality of processing rules in order from the lowest processing load to the highest processing load, and
- transmit, to the transfer device, a control packet to request the transfer device to set the rule table.
2. The transfer device according to claim 1, wherein
- the processor is configured to
- acquire traffic information that indicates the amount of a packet processed by the transfer device during a predetermined time period and has been calculated for each of the plurality of processing rules,
- calculate available candidates for the order of the processing rules in a case in which the order of the processing rules is set to different order from the order of the processing rules included in the rule table,
- calculate, for the candidates, index values of processing loads caused when the amounts of packets to which the plurality of processing rules are applied during the predetermined time period are the same as the traffic information, and
- update the order of the plurality of processing rules included in the rule table set in the transfer device to order specified by a candidate for which the smallest index value is obtained.
3. The transfer device according to claim 2, wherein
- the processor determines whether a combination of processing rules that causes a change in a process to be executed on a packet in the transfer device upon a change in the order of the plurality of processing rules is included in the plurality of processing rules, and
- when the combination is included in the plurality of processing rules, the processor selects candidates in which the order of the processing rules included in the combination is the same as the rule table, from among available candidates for the order of the plurality of processing rules in a case in which the order of the plurality of processing rules is set to different order from the rule table, and the processor calculates index values for the selected candidates.
4. The transfer device according to claim 2, wherein
- each of the index values is a function of a product of a time period for determining that each of the processing rules is applied to a packet to be processed and the amount of a packet that is to be processed by the transfer device during a predetermined time period and to which the processing rule is applicable.
5. A transfer device that processes a packet using a processing rule notified by a control device, comprising:
- an interface configured to transmit and receive a packet; and
- a processor configured to
- evaluate, for each of a plurality of processing rules notified by the control device, a processing load caused upon identification of a packet matching the processing rule, based on the type of an application requirement identifying the packet to which the processing rule is applied,
- generate a rule table storing the plurality of processing rules in order from the lowest processing load to the highest processing load, and
- process a packet received by the processor in accordance with the rule table.
6. The transfer device according to claim 5, further comprising:
- a memory configured to store traffic information that indicates the amount of a packet processed by the transfer device during a predetermined time period and has been calculated for each of the plurality of processing rules, wherein
- the processor is configured to
- calculate available candidates for the order of the processing rules in a case in which the order of the processing rules is set to different order from the order of the processing rules included in the rule table,
- calculate, for the candidates, index values of processing loads caused when the amounts of packets to which the plurality of processing rules are applied during the predetermined time period are the same as the traffic information, and
- update the order of the plurality of processing rules included in the rule table set in the transfer device to order for which the smallest index value is calculated.
7. The transfer device according to claim 6, wherein
- the processor determines whether a combination of processing rules that causes a change in a process to be executed on a packet in the transfer device upon a change in the order of the plurality of processing rules is included in the plurality of processing rules, and
- when the combination is included in the plurality of processing rules, the processor selects candidates in which the order of the processing rules included in the combination is the same as the rule table, from among available candidates for the order of the plurality of processing rules in a case in which the order of the plurality of processing rules is set to different order from the rule table, and the processor calculates index values for the selected candidates.
8. The transfer device according to claim 6, wherein
- each of the index values is a function of a product of a time period for determining that each of the processing rules is applied to a packet to be processed and the amount of a packet that is to be processed by the transfer device during a predetermined time period and to which the processing rule is applicable.
9. A method of controlling a transfer device, comprising:
- evaluating, for each of a plurality of processing rules to be used to process a packet in the transfer device, a processing load caused upon identification of a packet matching the processing rule, based on the type of an application requirement identifying the packet to which the processing rule is applied;
- generating, as a table to be used by the transfer device, a rule table storing the plurality of processing rules in order from the lowest processing load to the highest processing load; and
- transmitting, to the transfer device, a control packet to request the transfer device to set the rule table.
10. The control method according to claim 9, further comprising:
- acquiring, from the transfer device, traffic information that indicates the amount of a packet processed by the transfer device during a predetermined time period and has been calculated for each of the plurality of processing rules;
- calculating available candidates for the order of the processing rules in a case in which the order of the processing rules is set to different order from the order of the processing rules included in the rule table;
- calculating, for the candidates, index values of processing loads caused when the amounts of packets to which the plurality of processing rules are applied during the predetermined time period are the same as the traffic information; and
- updating the order of the plurality of processing rules included in the rule table set in the transfer device to order for which the smallest index value is calculated.
11. The control method according to claim 10, further comprising:
- determining whether a combination of processing rules that causes a change in a process to be executed on a packet in the transfer device upon a change in the order of the plurality of processing rules is included in the plurality of processing rules;
- selecting, when the combination is included in the plurality of processing rules, candidates in which the order of the processing rules included in the combination is the same as the rule table, from among available candidates for the order of the plurality of processing rules in a case in which the order of the plurality of processing rules is set to different order from the rule table; and
- calculating index values for the selected candidates.
12. The control method according to claim 10, wherein
- each of the index values is a function of a product of a time period for determining that each of the processing rules is applied to a packet to be processed and the amount of a packet that is to be processed by the transfer device during a predetermined time period and to which the processing rule is applicable.
Type: Application
Filed: Jul 15, 2019
Publication Date: Nov 7, 2019
Patent Grant number: 11115325
Applicant: FUJITSU LIMITED (Kawasaki-shi)
Inventors: Dai SUZUKI (Kawasaki), SATOSHI IMAI (Kawasaki)
Application Number: 16/511,594