Disclosure of Invention
The invention aims to provide a SDN controller performance tester and a test method, and is characterized in that the SDN controller performance tester consists of 6 functional modules in total, namely 3 parts; the method specifically comprises the following steps: the system comprises a switch control part, a topology connection generation module and a topology connection simulation module, wherein the switch control part is formed by connecting a switch simulation module and the topology connection generation module; a protocol message control part formed by connecting an OpenFlow1.3 message generation module and a test message control module; a result output part consisting of a controller response recording module and a result calculating and outputting module; the simulation module and the topology connection generation module are respectively connected with the OpenFlow1.3 message generation module and the test message control module, and then the test message control module is connected with the controller response recording module;
the switch simulation module simulates an OpenFlow1.3 switch, performs OpenFlow1.3 connection with an SDN controller, simultaneously gives a response to the query and keep-alive actions of the controller aiming at the switch, and reports the switch information of the controller;
the topology connection generation module is used for simulating events and scenes of a large number of switches under a certain specific topology structure when the performance test aiming at the SDN controller is performed, and a large number of switches which individually establish OpenFlow1.3 connection with the controller are connected into a certain common topology type;
the OpenFlow1.3 message generation module is responsible for generating OpenFlow1.3 messages which are required to be sent to the controller by the switch so as to establish normal connection with the controller and carry out performance test;
the test message control module is responsible for the controllable sending of the OpenFlow1.3 message, and the sending form, the sending rate and the sending sequence of the message need to be considered in the performance test;
the controller response recording module records the response mode and performance of the controller according to the performance test content, and records the response state and speed of the controller;
the result calculating and outputting module extracts data from the response records and calculates the performance test result of the controller; the method comprises the steps of firstly identifying available information, filtering non-response messages according to message types, then calculating average throughput and time delay according to time stamps of the response messages, and outputting a final calculation result to a tester in a text or graphic mode.
The OpenFlow1.3 message generation module is responsible for generating OpenFlow1.3 messages which are required to be sent to the controller by the switch and include message types of Hello, Echo, Feature _ reply, Multipart _ reply and Packet _ in.
A test method of a SDN controller performance tester is characterized by comprising the following test steps:
1) starting, a switch simulation module simulates a plurality of OpenFlow1.3 switches according to input preset by a user, and establishes TCP connection with a tested SDN controller;
2) the OpenFlow1.3 message generation module generates a Hello message according to the requirement of the switch simulation module and establishes OpenFlow1.3 protocol connection with the SDN controller to be tested;
3) the method comprises the steps that a switch simulation module receives a Hello message sent by a controller and an Echo control channel keep-alive message;
4) an OpenFlow1.3 message generation module generates an Echo message according to the requirement of a switch simulation module, the Echo message and a tested SDN controller ensure the activity of a link, and the process is continued in the whole test process;
5) the topological connection generation module generates a topological adjacency matrix of the switch according to input preset by a user, and requires the switch simulation module to configure ports of each simulated switch according to the content of the matrix, wherein the ports comprise port number, port characteristics and adjacent ports;
6) the switch analog module receives a Multipart _ request query request sent by a controller and requires the Multipart _ request query request to provide port information;
7) the switch simulation module transfers the request to an OpenFlow1.3 message generation module, and the switch simulation module generates a corresponding Multipart _ reply message according to corresponding information provided by the topology connection generation module and reports the message to the SDN controller to be tested;
8) the controller sends a Link Layer Discovery Protocol (LLDP) topological Link discovery message to one or more analog switches, and the switch analog module receives the message and transmits the message to the test message control module;
9) the test message control module acquires relevant topological connection information from the topological connection generation module, reports LLDP messages according to the sequence that adjacent switches firstly report the LLDP messages, and the messages are provided by the OpenFlow1.3 message generation module;
10) the controller response recording module records the response action of the SDN controller to be tested, when the controller issues LLDP messages for all the simulation switches for one time, the test is considered to be completed, and the timestamps of all the SDN controllers issuing the LLDP messages are recorded in the process;
11) and the result calculating and outputting module calculates the time difference between the LLDP message issued by the first controller and the last LLDP message, outputs the time difference as a final test result, and finishes the test.
The method has the advantages that the throughput and the time delay of the SDN controller to various OpenFlow1.3 protocol messages are tested; simultaneously, simulating a real scene and an event which may appear in a network, and measuring the processing performance of the controller; technical support and quantitative result analysis can be provided for model selection, research, deployment test and capability test of controllers when large network operators, network companies or other network users deploy the SDN.
Detailed Description
The invention provides an SDN controller performance tester and a test method based on an OPENFFlow 1.3 protocol, which are described in the following with reference to the attached drawings.
Fig. 1 is a schematic structural diagram of a performance tester for a software-defined network controller. The SDN controller performance tester shown in the figure consists of 3 parts and 6 functional modules; the method specifically comprises the following steps: the system comprises a switch control part, a topology connection generation module and a topology connection simulation module, wherein the switch control part is formed by connecting a switch simulation module and the topology connection generation module; a protocol message control part formed by connecting an OpenFlow1.3 message generation module and a test message control module; a result output part consisting of a controller response recording module and a result calculating and outputting module; the simulation module and the topology connection generation module are respectively connected with the OpenFlow1.3 message generation module and the test message control module, and then the test message control module is connected with the controller response recording module. The main functions of each part are now explained as follows:
first, the switch control part
The system is formed by connecting a switch simulation module and a topology connection generation module. According to the technical characteristics of the SDN, when a processing performance result of the SDN controller on the OpenFlow1.3 protocol message is required to be obtained, an OpenFlow1.3 switch needs to be simulated to be connected with the controller, OpenFlow1.3 protocol interaction is generated, and the performance is tested. The part is to implement the control of the analog switch.
The switch simulation module simulates an OpenFlow1.3 switch. The method is used for carrying out OpenFlow1.3 connection with an SDN controller, responding to the inquiry and keep-alive actions of the switch by the controller, and reporting the switch information of the controller. The functions to be realized include: 1. establishing TCP connection with a TCP port of a controller 2, establishing OpenFlow1.3 protocol connection with the controller 3, reporting self information through an OpenFlow1.3 protocol according to an inquiry request of the controller 4, and performing keep-alive message interaction with the controller to ensure that the connection is always established.
The performance test of the topology connection generation module for the SDN controller often needs to simulate events and scenarios of a large number of switches under a certain topology. The module needs to concatenate a large number of switches that individually establish OpenFlow1.3 connections with the controller into a common topology type, such as a ring, line, or leaf-ridge topology, in order to achieve a more comprehensive assessment of SDN controller performance. The functions to be realized by the module include: 1. establishing a connection matrix 2 among the simulation controllers according to the generated topology type, processing a topology discovery request (LLDP message) sent by the controllers, generating the LLDP message which accords with the topology type and the connection matrix to discover the current topology structure 3, controlling the simulation switch to send the LLDP message in a specific sequence, and simulating the topology discovery process of the controllers.
Second, protocol message control part
The OpenFlow1.3 message generating module is connected with the test message control module. In a performance test aiming at an SDN controller, the processing capacity of the SDN controller on OpenFlow1.3 protocol messages needs to be measured, in order to achieve the purpose, a switch is needed to send a certain specific type of messages to the controller at a certain speed, and the throughput and the processing time delay of the controller on the type of messages are recorded and calculated; therefore, there is a need to send protocols to the switch
And controlling the content, the speed and the sequence of the message.
The OpenFlow1.3 message generation module is responsible for generating OpenFlow1.3 messages which are required to be sent to the controller by the switch. Including message types of Hello, Echo, Feature _ reply, Multipart _ reply, Packet _ in, etc. So as to establish normal connection with the controller and carry out performance test. The module requires that any field of any type of protocol message can be flexibly and dynamically adjusted so as to send the required message according to the requirement of the controller and process the message. In addition to the openflow1.3 messages, to extend the test content. And the message also needs to be capable of flexibly adjusting any field in the message.
The test message control module is responsible for the controllable sending of OpenFlow1.3 messages; in the performance test, the sending form, rate and sequence of the message need to be considered. The module implements this portion of the control content. The functions that need to be provided include: 1. and (3) control of transmission form: <1> burst transmission mode, that is, a certain number of messages are transmitted to the controller in the shortest time, regardless of the transmission sequence and the receiving capability of the controller. Can be used to examine the handling capability of the controller for bursty message events. And 2, a constant-speed sending mode, namely a certain number of messages are sent to the controller at a constant speed within a certain time, and the sending time interval between any two messages is kept consistent. The tester may define the time interval itself. Can be used to examine the throughput and latency of the controller for a certain type of message at different message input rates. 2. And controlling the transmission sequence. Certain types of messages require a certain sending sequence to ensure the consistency of the simulated network and the actual network and to enable the controller to work normally. For example, the transmission of LLDP packets needs to be performed according to the sequence of topology connection.
Third, result output part
The system consists of a controller response recording module and a result calculating and outputting module; the result output part is mainly used for recording the response mode and performance of the controller under a specific test scene and recording the response state and speed of the controller. And meanwhile, according to the recorded content, the performance test result is automatically calculated. For example, if a performance test is performed on the rate issued by the Flow table, the module needs to record the number and response time of all controllers responding to the Flow _ mod message, and sequentially calculate the throughput and delay of the controllers for processing the Flow table generation request.
And the controller response recording module records the response mode and the performance of the controller according to the performance test content. The status and rate of its response is recorded. The main function is to record the timestamp of the controller responding to the OpenFlow1.3 protocol message, the type of the protocol message and the content of the protocol message. In addition, the state of the TCP connection, such as TCP Window Size, needs to be recorded to ensure that the controller performance test result is not affected by the TCP protocol. All records should be kept in Log and Wireshark bundles as a source for analyzing test results.
The result calculating and outputting module extracts data from the response records and calculates the performance test result of the controller; available information is first identified and non-responsive messages are filtered based on message type. And then, calculating the average swallowing and delay according to the time stamp of the response message. And outputting the final calculation result to a tester in a text or graphic mode.
According to the functions of the modules, the following interrelations can be constructed:
in the three architecture parts, some modules are cross-part functional modules, such as an OpenFlow1.3 message generation module and a test message control module. Other modules are partial internal functional modules, such as a topology connection generation module and a result calculation and output module. The relationships between the functional modules and other modules are described as follows:
first, the switch control part
The switch control module needs to control the sending and receiving of the OpenFlow1.3 protocol message of the switch. In both the connection establishment phase and the connection maintenance phase with the controller, the assistance of the OpenFlow1.3 message generation module is required. The topology connection generation module also requires the assistance of the message generation module. Wherein,
when the switch simulation module controls the simulated switch to establish connection with the controller, the openflow1.3 message generation module is required to generate and provide Hello and Feature _ reply messages so as to fulfill the purpose of establishing connection. In the test process, the openflow1.3 message generation module is also required to generate and provide keep-alive protocols such as Echo and the like. When a switch port is simulated, a topology connection generation module is needed to assist, and according to the defined topology type and information, a corresponding switch port, such as port number, port characteristics, adjacent ports, etc., is simulated.
And the topology connection generation module is responsible for generating the topology connection of the analog switch. Port information of the analog switch, such as the number of ports, port numbers, port characteristics, adjacent ports, etc., needs to be defined in order to conform to the defined topology type and connection manner. Meanwhile, when the test message control module controls the message uploading sequence, topology related messages, such as LLDP, need to be uploaded one by one according to the connection matrix generated by the topology connection generation module and the adjacent sequence, so as to simulate the real network environment and the message interaction process and obtain the correct controller performance test result.
Second, protocol message control part
The module is connected with the switch control part and the result output part. The OpenFlow1.3 message generation module needs to provide customized OpenFlow1.3 message content for other modules. The test message control module needs to influence the form and characteristics of the message sent by the analog switch, and needs to reflect the test result.
The OpenFlow1.3 message generation module provides an OpenFlow1.3 message customized according to requirements. Firstly, when a switch simulation module controls a simulation switch to establish connection with a controller, an OpenFlow1.3 message generation module is required to generate and provide Hello and Feature _ reply messages so as to fulfill the purpose of establishing connection. In the test process, the openflow1.3 message generation module is also required to generate and provide keep-alive protocols such as Echo and the like. In the test message control module, the generation rate and sequence of the openflow1.3 messages are required so that the switch simulation module can send the messages to the controller. For example, the ARP message is generated according to the requirement of MAC address order increment for testing the ability of the controller to learn the address of the second layer.
The test message control module needs to control the form, rate and sequence of the OpenFlow1.3 protocol message sent to the controller. The generation rate and the sequence of the openflow1.3 message generation module are required so that the switch simulation module can send the message to the controller. Meanwhile, the module also needs to send topology related messages, such as LLDP, one by one according to the connection matrix generated by the topology connection generation module according to the topology content and information provided by the topology generation module, so as to simulate the real network environment and the message interaction process and obtain the correct controller performance test result.
Third, result output part
The part is used for recording the response of the controller, calculating the test result and outputting the test result. For a certain test result, the environment condition during the test needs to be explained, especially the content such as the OpenFlow1.3 message input rate. It is necessary to retrieve the relevant information from the test message control module.
The controller response recording module records the response mode and performance of the controller according to the performance test content, and records the response state and speed of the controller. And meanwhile, recording a specific test environment, in particular the message input rate and the message content of OpenFlow1.3, when the test is executed. The relevant information is acquired from the test message control module, and is respectively and tidily recorded in the case. And simultaneously provides the original data and information of the calculation result for the result calculation and output module. Including the type of the controller response message, the timestamp of the response message, etc. And meanwhile, the TCP connection states of the switch and the controller, such as TCP windows size, rece _ buffer size and other information, are recorded, and the test result is ensured not to be influenced by a TCP protocol. If the abnormal condition exists, the abnormal condition is provided to the result calculation and output module possibly together, and a corresponding prompt is given.
And the result calculating and outputting module calculates the response throughput and the time delay of the controller to a certain type of OpenFlow1.3 messages according to the information provided by the controller response recording module, including the type of the controller response messages, the response message timestamp and the like.
Fig. 2 is a test flow chart of a test method of the SDN controller performance tester.
The test procedure was as follows:
1) starting, a switch simulation module simulates a plurality of OpenFlow1.3 switches according to input preset by a user, and establishes TCP connection with a tested SDN controller;
2) the OpenFlow1.3 message generation module generates a Hello message according to the requirement of the switch simulation module and establishes OpenFlow1.3 protocol connection with the SDN controller to be tested;
3) the method comprises the steps that a switch simulation module receives a Hello message sent by a controller and an Echo control channel keep-alive message;
4) an OpenFlow1.3 message generation module generates an Echo message according to the requirement of a switch simulation module, the Echo message and a tested SDN controller ensure the activity of a link, and the process is continued in the whole test process;
5) the topological connection generation module generates a topological adjacency matrix of the switch according to input preset by a user, and requires the switch simulation module to configure ports of each simulated switch according to the content of the matrix, wherein the ports comprise port number, port characteristics and adjacent ports;
6) the switch analog module receives a Multipart _ request query request sent by a controller and requires the Multipart _ request query request to provide port information;
7) the switch simulation module transfers the request to an OpenFlow1.3 message generation module, and the switch simulation module generates a corresponding Multipart _ reply message according to corresponding information provided by the topology connection generation module and reports the message to the SDN controller to be tested;
8) the controller sends an LLDP topology link discovery message to one or more analog switches, and the switch analog module receives the message and transmits the message to the test message control module;
9) the test message control module acquires relevant topological connection information from the topological connection generation module, reports LLDP messages according to the sequence that adjacent switches firstly report the LLDP messages, and the messages are provided by the OpenFlow1.3 message generation module;
10) the controller response recording module records the response action of the SDN controller to be tested, when the controller issues LLDP messages for all the simulation switches for one time, the test is considered to be completed, and the timestamps of all the SDN controllers issuing the LLDP messages are recorded in the process;
11) and the result calculating and outputting module calculates the time difference between the LLDP message issued by the first controller and the last LLDP message, outputs the time difference as a final test result, and finishes the test.