Disclosure of Invention
In view of the above drawbacks of the prior art, an object of the present invention is to provide a flow table issuing method, a flow table issuing system, an SDN controller, and an SDN switch, which are used to solve the problem in the prior art that when a large number of flow tables are generated in the SDN controller, the flow table issuing speed is slow.
In order to achieve the above and other related objects, the present invention provides a flow table issuing method, which is applied in a process of issuing a flow table to an SDN switch by an SDN controller in an SDN network, and the flow table issuing method includes: detecting whether the number of flow table entries generated by an SDN controller exceeds a preset threshold value, if so, generating a flow file containing the flow table entries, and if not, issuing a flow table containing the flow table entries to an SDN switch by the SDN controller; after a flow file containing the flow table entry is generated, a flow table message containing the flow file information is sent to the SDN interaction machine; the SDN interaction machine acquires flow entries in the flow file from the SDN controller in a preset network access mode according to the received flow table message; and the SDN interaction machine configures and issues the flow table according to the acquired flow table items.
Preferably, the flow table issuing method further includes: and extending an Experimenter message in an OpenFlow protocol standard, wherein the flow table message containing the flow file information is carried by the Experimenter message when the flow table message is sent to the SDN interaction machine.
Preferably, the flow table issuing method further includes: after sending the flow table message containing the flow file information to the SDN interaction machine, when the SDN controller does not receive feedback information fed back by the SDN interaction machine and used for confirming that a flow table item is obtained and the flow table is issued within preset time, the SDN controller issues the flow table containing the flow table item to an SDN switch.
Preferably, the preset network access mode is an FTP network access mode.
In order to achieve the above object, the present invention further provides an SDN controller for issuing a flow table to an SDN switch in an SDN network, where the SDN controller includes: the threshold setting module is used for setting the threshold of the flow table entry; a threshold detection module connected to the threshold setting module, configured to detect whether the number of flow entries generated by the SDN controller exceeds a preset threshold; the flow file module is connected with the threshold detection module and used for generating a flow file containing the flow entries when the number of the flow entries generated by the SDN controller exceeds a preset threshold; the flow table issuing module is connected with the threshold value detecting module and used for issuing a flow table containing the flow table items to the SDN switch when the number of the flow table items generated by the SDN controller does not exceed a preset threshold value; and the flow table information sending module is connected with the flow file module and used for sending the flow table information containing the flow file information to the SDN interaction machine.
Preferably, the SDN controller further includes: the expansion module is connected with the flow table information sending module and used for expanding the Experimenter message in the OpenFlow protocol standard; when the flow table information sending module sends the flow table information containing the flow file information to the SDN interaction machine, the flow table information is carried by the Experimenter message.
Preferably, the SDN controller further includes: the feedback information receiving module is used for judging whether feedback information which is fed back by the SDN interaction machine and used for confirming that the flow table items are acquired and the flow table is issued is received or not within preset time; and when the feedback information fed back by the SDN interaction machine is not received within the preset time, the flow table issuing module issues a flow table containing the flow table entry to the SDN switch.
in order to achieve the above object, the present invention further provides an SDN switch for acquiring a flow table from an SDN controller in an SDN network, where the SDN switch includes: a flow table information receiving module for receiving a flow table message containing flow file information from the SDN controller; a flow table entry obtaining module connected to the flow table information receiving module, and configured to obtain a flow table entry in the flow file from the SDN controller in a preset network access manner according to the received flow table message; and the configuration issuing module is connected with the flow table item acquisition module and used for configuring and issuing the flow table according to the acquired flow table item.
preferably, the SDN switch further includes: and the feedback information sending module is connected with the configuration issuing module and used for sending feedback information for confirming that the flow table items are acquired and the flow table is issued to the SDN controller.
In order to achieve the above object, the present invention further provides a flow table issuing system, which is applied in a process of issuing a flow table to an SDN switch by an SDN controller in an SDN network, where the flow table issuing system includes the SDN controller and the SDN switch.
As described above, the flow table issuing method, system, SDN controller and SDN switch of the present invention have the following beneficial effects:
1. According to the method and the device, the SDN controller generates the flow file containing a large number of flow entries, and the SDN interaction machine acquires and issues the large number of flow entries from the SDN controller in one step in an FTP mode, so that the flow table issuing speed of the whole SDN network is increased.
2. The invention avoids the traditional flow table issuing mode, and ensures the dependence between the flow tables through a message mechanism; if the SND switch does not support the FTP issuing mode, the processing can be continuously carried out according to the traditional flow table issuing mode.
3. The method is simple and efficient, and has strong universality and practicability.
Detailed Description
the embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention.
Referring to fig. 1 to 6, an object of the present embodiment is to provide a flow table issuing method, a flow table issuing system, an SDN controller, and an SDN switch, so as to solve the problem in the prior art that when a large number of flow tables are generated in the SDN controller, the flow table issuing speed is slow. The flow table issuing method, system, SDN controller and SDN switch according to the present invention will be described in detail below, so that those skilled in the art can understand the flow table issuing method, system, SDN controller and SDN switch without creative labor.
The embodiment provides a flow table issuing method and system, an SDN controller and an SDN switch based on a message queue mechanism, the SDN controller judges a flow table issuing mode according to a preset flow table item threshold, if the number of generated flow table items exceeds the threshold, an Experimenter message with a flow file mark and a flow file name is sent to the SDN switch, the SDN switch acquires the flow files in an FTP mode, the flow table items are issued rapidly according to the sequence in the flow files, and the flow table issuing speed of the whole SDN network system is improved.
Specifically, as shown in fig. 1, the present embodiment provides a flow table issuing method, which is applied to a process of issuing a flow table to an SDN switch by an SDN controller in an SDN network, and the flow table issuing method includes the following steps.
step S11, detecting whether the number of flow entries generated by the SDN controller exceeds a preset threshold, if not, then performing step S12, and if yes, then performing step S13.
Step S12, the SDN controller issues a flow table containing the flow table entry to an SDN switch.
Step S13, a stream file containing the stream entry is generated.
Step S14, after generating the flow file containing the flow entry, sends a flow table message containing the flow file information to the SDN interactor.
Step S15, the SDN interacting machine acquires a flow entry in the flow file from the SDN controller in a preset network access manner according to the received flow table message.
And step S16, the SDN interaction machine configures and issues a flow table according to the acquired flow table item.
the following describes steps S11 to S16 in detail.
Step S11, detecting whether the number of flow entries generated by the SDN controller exceeds a preset threshold. The threshold of the flow table entry may be set according to network load capacity, network speed, etc. The flow table issuing method in this embodiment determines the flow table issuing mode according to the threshold of the flow table entry. If the number of flow entries generated by the SDN controller does not exceed the preset threshold of the flow entries, step S12 is executed, and the SDN controller issues a flow table containing the flow entries to the SDN switch. That is to say, if the number of the flow entries generated by the SDN controller does not exceed the preset threshold of the flow entries, the SDN controller continues to issue the flow entries to the SDN switch in a conventional flow entry issuing manner, that is, the SDN controller generates the flow entries and issues the flow entries to the SDN interacting machine one by one. If the number of flow entries generated by the SDN controller exceeds a preset threshold of the flow entries, step S13 is executed, and the SDN controller generates a flow file including the flow entries.
After generating the flow file containing the flow entry, next, in step S14, the SDN controller sends a flow table message containing the flow file information to the SDN interworking machine, where the flow table information includes at least a flow file identifier and a name of a flow file.
in this embodiment, the SDN controller specifically sends a flow table message including the flow file information to the SDN interactor in the following manner: and extending an Experimenter message in an OpenFlow protocol standard, wherein the flow table message containing the flow file information is carried by the Experimenter message when the flow table message is sent to the SDN interaction machine.
At the SDN switch, step S15 is executed, and the SDN inter-working machine acquires flow entries in the flow file from the SDN controller according to the received flow table message in a preset network access manner. In this embodiment, the preset network access mode is an FTP network access mode. The SDN interaction machine can acquire and issue a large number of flow table items from the SDN controller in one step by using an FTP mode, and the flow table issuing speed of the whole SDN network is improved.
After the SDN controller acquires the flow entry in the flow file, step S16 is executed, and the SDN inter-working machine configures and issues a flow table according to the acquired flow entry.
Furthermore, in this embodiment, after sending the flow table message including the flow file information to the SDN interactor, in order to ensure that the SDN interactor has already acquired the flow entries in the flow file, the SDN controller sends an inquiry message (e.g., Barrier message) to inquire whether the SDN switch has already acquired the flow entries in the flow file, so in this embodiment, after the SDN interactor configures and issues the flow table according to the acquired flow entries, the SDN interactor feeds back feedback information for confirming that the flow entries have been acquired and the flow table has been issued to the SDN controller. When the SDN controller does not receive feedback information fed back by the SDN interaction machine and used for confirming that a flow table item is acquired and issued, the SDN controller issues the flow table containing the flow table item to an SDN switch, namely when the SDN controller does not receive the feedback information fed back by the SDN interaction machine and used for confirming that the flow table item is acquired and the flow table is issued in the preset time, the SDN controller continues to issue the flow table to the SDN switch in a traditional flow table issuing mode, namely the SDN controller generates the flow table and issues the flow table to the SDN interaction machine in a strip mode.
In order to further understand the flow table issuing method in this embodiment, as shown in fig. 2 and fig. 3, the following will further describe an implementation process of the flow table issuing method in this embodiment.
The threshold value of the flow table entry is preset. The SDN controller checks whether the flow table items needing to be generated exceed a set threshold value, if not, the SDN controller continues to send the flow table items to the SDN switch in a traditional flow table issuing mode, namely the SDN controller generates the flow table items and issues the flow table items to the SDN interaction machine one by one. And if the current flow file is beyond the preset flow file, writing the current generated flow entry into the flow file by the SDN controller, and sending an Experimenter message with an extended flow file mark and a flow file name to the SDN switch by the SDN controller. The SDN switch receives an Experimenter message with a stream file mark and a stream file name, and if the SDN switch does not receive the Experimenter message or does not support the Experimenter message, the traditional stream table issuing mode is continued. If the SDN switch receives the Experimenter message, the SDN switch acquires the flow file from the SDN controller through the FTP, if the flow file is overtime and is not acquired successfully, the traditional flow table issuing mode is continued. And if the flow is successfully acquired, the SDN switch sequentially reads the entries in the flow file and rapidly configures the flow table.
In order to ensure that the SDN switch acquires and issues entries in the flow file, the SDN controller inquires whether the SDN switch acquires the flow entries in the flow file or not by sending Barrier messages, and after the SDN interaction machine configures and issues the flow table according to the acquired flow entries, the SDN interaction machine responds to the Barrier messages of the SDN controller and indicates that the processing is finished. And the SDN controller waits for a Barrier message response, and if the SDN controller receives the Barrier message response within the preset time, the step S11 is returned, and the flow table issuing method in the embodiment is repeatedly executed. And if the SDN controller does not receive the Barrier message response within the specified time, prompting the user of an error, and issuing the flow processing according to the traditional flow table.
In order to achieve the above object, the present invention further provides a flow table issuing system, and specifically, as shown in fig. 4, the flow table issuing system 1 includes: SDN controller 11 and SDN switch 12.
The SDN controller 11 and the SDN switch 12 in the flow table issuing system 1 are described in detail below.
The SDN controller 11 is configured to issue a flow table to an SDN switch 12 in an SDN network, and specifically, as shown in fig. 4 and fig. 5, the SDN controller 11 includes: the device comprises a threshold setting module 111, a threshold detection module 112, a stream file module 113, a stream table issuing module 114, a stream table information sending module 115 and an expansion module 116.
The threshold setting module 111 is configured to set a threshold of a flow table entry; the threshold of the flow table entry may be set according to network load capacity, network speed, etc. The present embodiment determines a flow table issuing mode according to a threshold of a flow table entry.
The threshold detecting module 112 is connected to the threshold setting module 111, and is configured to detect whether the number of flow entries generated by the SDN controller 11 exceeds a preset threshold.
The flow file module 113 is connected to the threshold detection module 112, and is configured to generate a flow file including the flow entries when the number of the flow entries generated by the SDN controller 11 exceeds a preset threshold. The flow table issuing module 114 is connected to the threshold detection module 112, and configured to issue a flow table containing the flow table entry to the SDN switch 12 when the number of the flow table entries generated by the SDN controller 11 does not exceed a preset threshold.
If the number of flow entries generated by the SDN controller 11 does not exceed the preset threshold of the flow entry, the flow table issuing module 114 issues the flow table containing the flow entry to the SDN switch 12. That is, if the number of the flow entries generated by the SDN controller 11 does not exceed the preset threshold of the flow entries, the SDN controller 11 continues to send the flow entries to the SDN switch 12 in a conventional flow entry issuing manner, that is, the SDN controller 11 generates the flow entries and issues the flow entries to the SDN interacting machine one by one. If the number of flow entries generated by the SDN controller 11 exceeds a preset threshold of the flow entries, the flow file module 113 generates a flow file including the flow entries.
The flow table information sending module 115 is connected to the flow file module 113, and is configured to send a flow table message including the flow file information to an SDN interactor. After generating the flow file containing the flow entry, the flow table information sending module 115 sends a flow table message containing the flow file information to the SDN inter-working machine, where the flow table information at least includes a flow file identifier and a name of a flow file.
The expansion module 116 is connected to the flow table information sending module 115, and is configured to expand an Experimenter message in an OpenFlow protocol standard; when the flow table information sending module 115 sends the flow table message containing the flow file information to the SDN interactor, the flow table message is carried by the Experimenter message.
The SDN switch 12 is used in an SDN network to acquire a flow table from an SDN controller 11, and specifically, as shown in fig. 4 and fig. 6, the SDN switch 12 includes: a flow table information receiving module 121, a flow table entry obtaining module 122 and a configuration issuing module 123.
The flow table information receiving module 121 is configured to receive a flow table message containing flow file information from the SDN controller 11; the flow table entry obtaining module 122 is connected to the flow table information receiving module 121, and is configured to obtain a flow table entry in the flow file from the SDN controller 11 in a preset network access manner according to the received flow table message.
In this embodiment, the preset network access mode is an FTP network access mode. The SDN interaction machine can acquire and issue a large number of flow table entries from the SDN controller 11 in one step by using an FTP mode, and the flow table issuing speed of the whole SDN network is increased.
The configuration issuing module 123 is connected to the flow entry obtaining module 122, and is configured to configure and issue a flow table according to the obtained flow entry.
Furthermore, in this embodiment, after sending the flow table message containing the flow file information to the SDN interactor, to ensure that the SDN interactor has already acquired the flow table entry in the flow file, the SDN controller 11 sends an inquiry message (e.g., Barrier message) inquiring whether the SDN switch 12 has already acquired the flow table entry in the flow file. Therefore, in this embodiment, the SDN switch 12 further includes: a feedback information sending module 124, connected to the configuration issuing module 123, and configured to send feedback information used for confirming that a flow entry has been acquired and a flow table has been issued to the SDN controller 11. The SDN controller 11 further includes: and the feedback information receiving module 117 is configured to determine whether feedback information for confirming that a flow table item has been acquired and a flow table has been issued is received within a preset time. When the feedback information receiving module 117 does not receive the feedback information fed back by the SDN interacting machine within a preset time, the flow table issuing module 114 issues the flow table including the flow table entry to the SDN switch 12. That is to say, when the feedback information receiving module 117 does not receive the feedback information, which is fed back by the feedback information sending module 124 and used for confirming that the flow table entry has been acquired and the flow table has been issued, within the preset time, the SDN controller 11 continues to send the flow table to the SDN switch 12 in the conventional flow table issuing manner, that is, the SDN controller 11 generates the flow table and issues the flow table to the SDN interactor one by one.
In order to further understand the flow table issuing system 1 in this embodiment, the following will further describe the working process of the flow table issuing system 1 in this embodiment.
the threshold setting module 111 sets the threshold of the flow table entry in advance. The threshold detection module 112 checks whether the flow table entry to be generated exceeds a set threshold, and if not, the flow table issuing module 114 continues to issue the flow table entry to the SDN switch 12 in a conventional flow table issuing manner, that is, the SDN controller 11 generates the flow table and issues the flow table entry to the SDN interactor one by one. If the flow table entry exceeds the preset flow table entry, the flow table file module 113 writes the flow table entry generated this time into the flow file, and the flow table information sending module 115 sends an Experimenter message with a flow file flag and a flow file name, which is extended by the extension module 116, to the SDN switch 12. The SDN switch 12 receives an Experimenter message with a flow file flag and a flow file name, and when the flow table information sending module 115 sends a flow table message containing the flow file information to the SDN inter-working machine, the flow table message is carried by the Experimenter message. If the flow table information receiving module 121 in the SDN switch 12 does not receive the Experimenter message or does not support the Experimenter message, the flow table issuing module 114 continues to use the conventional flow table issuing manner. If the flow table information receiving module 121 receives the Experimenter message, the flow table entry obtaining module 122 obtains the flow file from the SDN controller 11 through the FTP, and if the obtaining is over time and unsuccessful, the flow table issuing module 114 continues the conventional flow table issuing mode. If the acquisition is successful, the flow table entry acquiring module 122 sequentially reads the entries in the flow file, and the configuration issuing module 123 performs the rapid configuration of the flow table.
In order to ensure that the SDN switch 12 has acquired and issued entries in the flow file, the SDN controller 11 queries whether the SDN switch 12 has acquired flow entries in the flow file by sending a Barrier message, and after the SDN interactor configures and issues a flow table according to the acquired flow entries, the feedback information sending module 124 responds to the Barrier message of the SDN controller 11, indicating that the processing is completed. The feedback information receiving module 117 waits for a Barrier message response, and if the feedback information receiving module 117 receives the Barrier message response within a preset time, the current flow table issuing process is ended. If the feedback information receiving module 117 does not receive the Barrier message response within the specified time, the user is prompted to make an error, and the flow table issuing module 114 processes according to the conventional flow table issuing process.
In summary, the flow file containing a large number of flow entries is generated by the SDN controller, and the SDN interactor acquires and issues the large number of flow entries from the SDN controller in one step in an FTP manner, so that the flow table issuing speed of the whole SDN network is increased; the invention avoids the traditional flow table issuing mode, and ensures the dependence between the flow tables through a message mechanism; if the SND switch does not support the FTP issuing mode, the processing can be continuously carried out according to the traditional flow table issuing mode; the method is simple and efficient, and has strong universality and practicability. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.