CN109729026B - SDN network control method and SDN controller - Google Patents

SDN network control method and SDN controller Download PDF

Info

Publication number
CN109729026B
CN109729026B CN201711025688.9A CN201711025688A CN109729026B CN 109729026 B CN109729026 B CN 109729026B CN 201711025688 A CN201711025688 A CN 201711025688A CN 109729026 B CN109729026 B CN 109729026B
Authority
CN
China
Prior art keywords
terminal
source terminal
switch
information
accessed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711025688.9A
Other languages
Chinese (zh)
Other versions
CN109729026A (en
Inventor
罗向征
吴小文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201711025688.9A priority Critical patent/CN109729026B/en
Publication of CN109729026A publication Critical patent/CN109729026A/en
Application granted granted Critical
Publication of CN109729026B publication Critical patent/CN109729026B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a control method of an SDN (software defined network) and an SDN controller, relates to the field of communication, and can reasonably issue a flow table, improve the efficiency of the SDN in the process of processing the access of a communication terminal and improve the utilization efficiency of switch flow table resources. The method comprises the following steps: the SDN controller sends initial flow tables to all switches in the SDN network; the source terminal sends ARP message to the switch accessed by the source terminal, and the characteristic information of the ARP message comprises: address information of a source terminal; the switch accessed by the source terminal sends an ARP message and information of the switch accessed by the source terminal to the SDN controller according to the initial flow table; the SDN controller sends a preset flow table to the switch accessed by the source terminal according to the information of the switch accessed by the source terminal and the address information of the source terminal, wherein the preset flow table is used for indicating the switch accessed by the source terminal to send the received preset message to the source terminal.

Description

SDN network control method and SDN controller
Technical Field
The embodiment of the invention relates to the field of communication, in particular to a control method of an SDN (Software Defined Networking) network and an SDN controller.
Background
The SDN network reduces the complexity of network equipment in data communication, improves the updating and evolution speed of network services and efficiently meets the requirements of users on application service innovation by separating a control plane from a data plane, centralizing the control plane and standardizing the service flow of the data plane. An existing SDN open controller openday light (a modular, extensible, upgradable, and multiprotocol-supported controller framework developed based on SDN) implements an OpenFlow flow table management and issuing mechanism, and is used to construct a forwarding path from a source end to a destination end communication terminal device, and the implementation method is as follows: the SDN controller issues an OpenFlow flow table corresponding to each communication terminal device to all OpenFlow switches in the network, and each OpenFlow switch is provided with a flow table entry corresponding to each communication terminal device in the network. By adopting the implementation mode, one communication terminal device is accessed into the SDN network, and the SDN controller builds the data forwarding path between the terminal and any other terminal.
However, there is a local characteristic in network communication, that is, in a network of a certain scale, there is rarely a case where one communication terminal device will communicate with all other communication terminal devices, and generally, one communication terminal device will only have a communication requirement with a small number of communication terminals in the network. By adopting the method, the communication path is managed and issued to establish the required flow table, the SDN controller issues the flow tables on all OpenFlow switches for the communication equipment terminals which do not need to communicate, the efficiency of the controller in issuing the flow tables is reduced, meanwhile, the flow tables corresponding to the terminals without communication requirements occupy valuable flow table resources of the OpenFlow switches, and the SDN network is not beneficial to accessing more communication terminals.
Disclosure of Invention
Embodiments of the present invention provide a method for controlling an SDN network and an SDN controller, which can reasonably issue a flow table, improve the efficiency of the SDN network in processing an access process of a communication terminal, and improve the utilization efficiency of switch flow table resources.
In a first aspect, a method for controlling an SDN network is provided, including:
the SDN controller sends initial flow tables to all switches in the SDN network;
the source terminal sends ARP message to the switch accessed by the source terminal, and the characteristic information of the ARP message comprises: address information of the source terminal;
the switch accessed by the source terminal sends the ARP message and the information of the switch accessed by the source terminal to the SDN controller according to the initial flow table;
the SDN controller sends a preset flow table to the switch accessed by the source terminal according to the information of the switch accessed by the source terminal and the address information of the source terminal, wherein the preset flow table is used for indicating the switch accessed by the source terminal to send a received preset message to the source terminal;
the SDN controller stores the address information of the source terminal and the information of the switch accessed by the source terminal in a database.
In a second aspect, an SDN controller is provided, comprising:
the flow table processing unit is used for sending initial flow tables to all switches in the SDN network;
a receiving unit, configured to receive an ARP packet sent by a switch to which a source terminal accesses according to the initial flow table and information of the switch to which the source terminal accesses; wherein the ARP message is sent by a source terminal, and the characteristic information of the ARP message comprises: address information of the source terminal;
the flow table processing unit is further configured to send a predetermined flow table to the switch accessed by the source terminal according to the information of the switch accessed by the source terminal and the address information of the source terminal received by the receiving unit, where the predetermined flow table is used to instruct the switch accessed by the source terminal to send a received predetermined message to the source terminal;
and the storage unit is used for storing the address information of the source terminal and the information of the switch accessed by the source terminal into a database.
In the above scheme, the SDN controller sends initial flow tables to all switches in the SDN network; the source terminal sends ARP message to the switch accessed by the source terminal, and the characteristic information of the ARP message comprises: address information of a source terminal; the switch accessed by the source terminal sends an ARP message and information of the switch accessed by the source terminal to the SDN controller according to the initial flow table; the SDN controller sends a preset flow table to the switch accessed by the source terminal according to the information of the switch accessed by the source terminal and the address information of the source terminal, wherein the preset flow table is used for indicating the switch accessed by the source terminal to send a received preset message to the source terminal; the SDN controller stores the address information of a source terminal and the information of a switch accessed by the source terminal into a database; in the process, the SDN controller can generate a corresponding flow table according to the address information of the source terminal, the address information of the source terminal and the information of the switch accessed by the source terminal are recorded in a database of the SDN controller, the flow table is only issued to the access switch connected with the source terminal, other unrelated switches are not affected by the access network of the source terminal, the phenomenon that the SDN controller issues the flow table on all switches for terminals which do not need communication at the same time is avoided, the efficiency of the SDN in the process of processing the access of the communication terminal is improved, and the utilization efficiency of flow table resources of the OpenFlow switch is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a block diagram of a communication system according to an embodiment of the present invention;
fig. 2 is a flowchart of a control method for an SDN network according to an embodiment of the present invention;
fig. 3 is a structural diagram of an SDN controller according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The system architecture and the service scenario described in the embodiment of the present invention are for more clearly illustrating the technical solution of the embodiment of the present invention, and do not form a limitation on the technical solution provided in the embodiment of the present invention, and it can be known by those skilled in the art that the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems along with the evolution of the system architecture and the appearance of a new service scenario.
The above method is described in detail with reference to specific examples. Referring to fig. 1, an embodiment of the present invention is applied to a communication system including: the SDN controller and the three switches SW1-SW3, wherein a port P1-1 of SW1 is connected with the SDN controller, a port P1-2 of SW1 is connected with a port P2-1 of SW2, a port P1-3 of SW1 is connected with a port P3-1 of SW3, a port P2-2 of SW2 is connected with the terminal 1, a port P2-3 of SW2 is connected with the terminal 2, and a port P3-2 of SW3 is connected with the terminal 3. Of course the above system is only an example, wherein two terminals communicating with each other in any SDN network may be limited to two cases, i.e. two terminals are simultaneously connected to one switch, i.e. terminal 1 and terminal 2 are both connected to SW2 as in fig. 1; or two terminals are respectively connected to different switches, that is, a terminal 1 is connected to SW2, and a terminal 3 is connected to SW3 as in fig. 1, where the topology of the SDN network shown in fig. 1 is only an example, and it may be immediately that the topology of any existing SDN network is applicable to the present application. In the following schemes, specific examples are described in which the ID of SW1 is 0001, the ID of SW2 is 0002, and the ID of SW3 is 0003. In one scenario, when two terminals are connected to one switch at the same time, a terminal 1 is taken as a source terminal and a terminal 2 is taken as a destination terminal in the following scheme, wherein the IP of the terminal 1 is 10.0.0.1, the MAC is 00:01:7a:00: 01, the IP of the terminal 2 is 10.0.2, the MAC is 00:01:7a:00:00:02, the IP of the terminal 3 is 10.0.3, and the MAC is 00:01:7a:00:00: 03.
With reference to the foregoing communication system, an embodiment of the present invention provides a method for controlling an SDN network, which is shown in fig. 2, and includes the following steps:
s101, the SDN controller sends initial flow tables to all switches in the SDN network.
In step 101, the SDN controller issues the following initial flow tables to all switches in the network through control channels between the SDN controller and each switch, so as to prepare for a subsequent communication device terminal to access the SDN network, where the following examples of the relevant flow tables are as follows:
flow table 1-1: etherType is 0x0806action is output to controller; the meaning is that the matching message type is 0x0806, and the matching message type is uploaded to an SDN controller; the flow table 1-1 is used for identifying that the switch receives all ARP protocol messages, uploading the ARP protocol messages to a switch control plane, and uploading the ARP protocol messages to an SDN controller through a control channel by the switch.
Flow tables 1-2: pktType equals any action drop; meaning a message that is not matched with the rest of the flow table entries, and the switch directly discards the message. The flow table 1-2 is used for processing exception messages, and in order to avoid unnecessary burden of the exception messages on the switch and the SDN controller, the switch directly discards the messages.
S102, the source terminal sends an ARP message to a switch accessed by the source terminal, and the characteristic information of the ARP message comprises: address information of the source terminal.
S103, the switch accessed by the source terminal sends an ARP message and information of the switch accessed by the source terminal to the SDN controller according to the initial flow table.
The switch receives the message sent by the terminal, extracts the characteristic information of the message, and uses the characteristic information to search and match the table items of the local flow table. And when the message sent by the terminal is an ARP message, matching the flow table 1-1 of the initial flow table, and uploading the ARP message to an SDN controller.
And S104, the SDN controller sends a preset flow table to the switch accessed by the source terminal according to the information of the switch accessed by the source terminal and the address information of the source terminal, wherein the preset flow table is used for indicating the switch accessed by the source terminal to send the received preset message to the source terminal.
In step S104, the SDN controller performs the following processing on the ARP packet:
extracting address information (sMAC, sIP) of a source terminal carried in an ARP message, and extracting information of a receiving switch (rcvSwitch, i.e., a switch to which the source terminal accesses) corresponding to the ARP message, where the information of the switch to which the source terminal accesses may include: the ID of rcvSwitch and the receiving port of ARP packet (rcvPort, i.e. the port where the terminal is connected to rcvSwitch). A flow table required for data forwarding is generated using the information and issued to an access switch (rcvSwitch) directly connected to the terminal, and an example of the predetermined flow table is as follows:
flow table 2-1: dst is IPV4 action is output to rcvPort; under the control of flow table 2-1, if the destination IP address of all IPv4 messages received by the switch connected to the source terminal is the IP address of the source terminal (sIP), the switch directly sends the IPv4 messages to the source terminal from the access port rcvPort corresponding to the source terminal.
And S105, the SDN controller stores the address information of the source terminal and the information of the switch accessed by the source terminal into a database.
Using the information of the switch accessed by the source terminal and the address information of the source terminal in step S104, a communication device terminal database is locally established in the SDN controller as shown in table 2-1 below:
Figure BDA0001448323660000051
Figure BDA0001448323660000061
in the above scheme, the SDN controller sends initial flow tables to all switches in the SDN network; the source terminal sends ARP message to the switch accessed by the source terminal, and the characteristic information of the ARP message comprises: address information of a source terminal; the switch accessed by the source terminal sends an ARP message and information of the switch accessed by the source terminal to the SDN controller according to the initial flow table; the SDN controller sends a preset flow table to the switch accessed by the source terminal according to the information of the switch accessed by the source terminal and the address information of the source terminal, wherein the preset flow table is used for indicating the switch accessed by the source terminal to send a received preset message to the source terminal; the SDN controller stores the address information of a source terminal and the information of a switch accessed by the source terminal into a database; in the process, the SDN controller can generate a corresponding flow table according to the address information of the source terminal, the address information of the source terminal and the information of the switch accessed by the source terminal are recorded in a database of the SDN controller, the flow table is only issued to the access switch connected with the source terminal, other unrelated switches are not affected by the access network of the source terminal, the phenomenon that the SDN controller issues the flow table on all switches for terminals which do not need communication at the same time is avoided, the efficiency of the SDN in the process of processing the access of the communication terminal is improved, and the utilization efficiency of flow table resources of the OpenFlow switch is improved.
In another implementable scheme, the feature information of the ARP packet includes: address information of the destination terminal. Referring to fig. 3, the method further includes the following steps:
and S106, the SDN controller inquires the information of the switch accessed by the destination terminal in a database according to the address information of the destination terminal.
And S107, when the SDN controller inquires the information of the switch accessed by the target terminal, sending the ARP message and the information of the switch accessed by the target terminal to the switch accessed by the target terminal.
And S108, the switch accessed by the target terminal sends the ARP message to the target terminal according to the information of the switch accessed by the target terminal.
When the ARP message is an ARP request message, the execution steps S101-S108 can send the ARP request message to a target terminal, then the target terminal generates an ARP response message according to the ARP request message and sends the ARP response message to a switch accessed by the target terminal, and then the execution steps S101-S108 aiming at the ARP response message can complete ARP request and response.
In addition, the ARP message is an ARP request message; and when the SDN controller does not inquire the information of the target terminal, the SDN controller sends an ARP request message and the information of the switch accessed by the target terminal to all switches. The ARP message is an ARP response message, and when the SDN controller cannot inquire the information of the switch accessed by the target terminal, the SDN controller discards the ARP response message.
In addition, in one embodiment, when the SDN controller determines that a switch accessed by the destination terminal is not a switch accessed by the source terminal according to information of the switch accessed by the source terminal and information of the switch accessed by the destination terminal, the SDN controller generates a communication path between the destination terminal and the source terminal according to a topology of the switch accessed by the destination terminal and the switch accessed by the source terminal, and transmits a forwarding flow table between the source terminal and the destination terminal to the switch on the communication path.
When a terminal initiates communication of another terminal through an ARP request message or an ARP response message, an SDN controller judges whether switches accessed by the two terminals are the same switch or not by inquiring the table 2-1, if the switches are different devices, the SDN controller enters a cross-connected switch communication path establishment state, and the SDN controller mainly works as follows: and generating a communication path across the access switch according to the connection relation between the switch accessed by the destination terminal and the switch accessed by the source terminal in the topological structure, positioning all transmission switches on the path, and issuing a forwarding flow table corresponding to the source terminal and the destination terminal for the transmission switches. And respectively issuing forwarding flow tables corresponding to the source terminal and the destination terminal for the switch accessed by the destination terminal and the switch accessed by the source terminal, wherein one forwarding flow table corresponds to the terminal accessed locally, and the other forwarding flow table corresponds to the terminal accessed remotely.
Illustratively, the SDN controller issues forwarding flow tables required for communication between the source terminal and the destination terminal for a switch accessed by the destination terminal, a switch accessed by the source terminal, and a transmission switch between the two switches, respectively, to complete establishment of a communication path across the access switches. Taking the nth entry in table 2-1 as an example, the final flow tables after the stage of the switch sw-0032 accessed by the destination terminal and the switch sw-1 accessed by the source terminal are as follows:
switch that the source terminal inserts:
dst=sIP type=IPv4 action=output to rcvPort
dst=sIPn type=IPv4 action=output to sw-0032
ethType=ARP action=trap to controller
otherPkts action=drop。
the switch that the purpose terminal inserts:
dst=sIPn type=IPv4 action=output to port01
dst=sIP type=IPv4 action=output to sw-1
ethType=ARP action=trap to controller
otherPkts action=drop。
specifically, referring to the communication system shown in fig. 1, a specific flow for establishing an OpenFlow session between the terminal 1 and the terminal 2 through the SW and the SDN controller is provided:
s201, the SDN controller issues the same initial flow table to SW 1-3.
Wherein the initial flow table comprises the following:
flow table 3-1: etherType 0x0806action output to controller
Flow table 3-2: pktType action drop
The flow table 3-1 and the flow table 3-2 have the same principle as the flow tables 2-1 and 2-2, and detailed description thereof is omitted.
Taking the example that the terminal 1 initiates a communication request to the terminal 2:
s202, the terminal 1 sends an ARP request message to SW 2.
The message content is as follows:
Figure BDA0001448323660000091
s203, SW2 receives the ARP request message through the port P2-2.
S204, SW2 uses the initial flow table (flow table 3-1) to match the input data flow, and the ARP request message is uploaded to the switch control plane of SW 2; the control plane of the SW2 encapsulates the ARP request message, the ID (0002) of the message receiving switch SW2, and the receiving port (P2-2) into an OpenFlow message, and interfaces the OpenFlow message to the SDN controller through a control channel.
S205, the SDN controller receives an OpenFlow message sent by the SW2 through the control channel, analyzes the OpenFlow message, acquires an ARP request message, an ID (0002) and a receiving port (P2-2) of the message receiving switch SW2, and acquires a hardware address (MAC: 00:01:7a:00:00: 00:01) and an IP address (10.0.0.1) of the terminal 1 from the ARP request message.
And S206, the SDN controller issues a preset flow table to the SW 2.
An exemplary such predetermined flow table is: flow table 4-1: dst IP 10.0.0.1 type 0x0800 action output port P2-2.
S207, the SDN controller stores the address information of the terminal 1 and the information of the source SW2 in a database.
Illustratively, the SDN controller creates a terminal database entry-1 for terminal 1
Figure BDA0001448323660000092
S208, the SDN controller obtains the IP address (10.0.0.2) of the terminal 2 from the ARP request packet, and queries the database using the IP address of the terminal 2, and performs the following processing according to different query results.
S209, if the SDN controller acquires the ID (0002) and the receiving port ID (P2-3) of the switch SW2 accessed by the terminal 2 from the database, the SDN controller executes step S210.
And S210, the SDN controller encapsulates the ARP request message again by using an OpenFlow protocol to generate an OpenFlow message. The OpenFlow message may include: the ARP request message, and the ID (0002) and the receiving port ID (P2-3) of the switch (SW2) to which the terminal 2 has access.
S211, the SDN controller sends the OpenFlow message to the switch SW2 through a control channel with the SW 2.
S212 and SW2 analyze the received OpenFlow message, extract the ARP request message therein, and send the ARP request message to the terminal 2 by the receiving port ID (P2-3).
In this example, if the terminal 2 is not on-line, there is no corresponding entry in the database. Therefore, if the query in S208 fails, step S213 is executed.
And S213, the SDN controller encapsulates the ARP request message again by using an OpenFlow protocol to generate an OpenFlow message, and the OpenFlow message is sent to the switches of all the access terminals in the network by the control channel.
After step S213, each switch parses the received OpenFlow message, extracts an ARP request message therein, and sends the ARP request message to the terminal accessed by the switch through the receiving port (where the receiving port that receives the ARP request message does not send any more). The OpenFlow message may include: the ARP request message, and the ID (0002) and the receiving port ID (P2-2) of the switch (SW2) to which the terminal 2 has access. In this embodiment, the access switch SW2 sends the OpenFlow message through the receiving port P2-3; the access switch SW3 sends this OpenFlow message by receiving port P3-2.
The step of the terminal 2 responding to the ARP request message of the terminal 1 specifically comprises the following steps:
s301, the terminal 2 generates an ARP response message according to the ARP protocol specification. The ARP response message format is as follows:
Figure BDA0001448323660000101
s302, SW2 receives the ARP response message sent by terminal 2 through the receiving port P2-3.
S303 and SW2 match input data flow by using an initial flow table (flow table 3-1), the ARP response message is uploaded to a switch control plane of SW2, the control plane encapsulates the uploaded ARP response message, the ID (0002) of the message SW2 and a receiving port (P2-3) into an OpenFlow message, and the SDN controller is uploaded through a control channel.
S303, the SDN controller receives an OpenFlow message sent by the SW2 through the control channel, the OpenFlow message acquires an ARP response message, an ID (0002) and a receiving port (P2-2) of the message receiving switch SW2, and obtains a hardware address (MAC: 00:01:7a:00:00: 00:02) and an IP address (10.0.0.2) of the terminal 2 from the ARP response message.
And S304, the SDN controller issues a preset flow table to SW 2.
An exemplary such predetermined flow table is: flow table 4-2: dst IP 10.0.0.2 type 0x0800 action output port P2-3
S305, the SDN controller stores the address information of the terminal 2 and the information of the SW2 in a database.
Illustratively, the SDN controller creates a terminal database entry-2 for terminal 2
Figure BDA0001448323660000111
S306, the SDN controller obtains the IP address (10.0.0.1) of the terminal 1 from the ARP response packet, and queries the database using the IP address of the terminal 1, and respectively processes the following steps according to different query results.
S307, if the SDN controller acquires the ID (0002) and the receiving port ID (P2-2) of the switch SW2 accessed by the terminal 1 from the database, the SDN controller executes step S308.
And S308, the SDN controller encapsulates the ARP response message again by using an OpenFlow protocol to generate an OpenFlow message. The OpenFlow message may include: the ARP response message, and the ID (0002) and the receiving port ID (P2-2) of the switch (SW2) accessed by the terminal 1.
S309, the SDN controller sends the OpenFlow message to the switch SW2 through the control channel with the SW 2.
S310 and SW2 analyze the received OpenFlow message, extract the ARP response message therein, and send the ARP response message to the terminal 2 through the receiving port ID (P2-2). If the query in S306 fails, the OpenFlow message is discarded, and no further processing is performed.
At this point, the ARP interaction between terminal 1 and terminal 2 is completed. The SDN controller judges that the source terminal and the destination terminal correspond to an access switch, the source terminal and the destination terminal are the same switch (SW2), and no further processing is carried out.
If the switch accessed by the source terminal and the switch accessed by the destination terminal are not the same switch, the process of establishing the communication path between the accessed switches needs to be executed, and the establishment of the communication channel between the terminal 1 and the terminal 3 is taken as an example for explanation:
s401, the terminal 1 sends an ARP request message to the terminal 3.
This process is in accordance with the completion of the process flow in which terminal 1 initiates a communication request to terminal 2 in steps S201 to S213. After the processing is completed, the flow table in SW2 is written as follows:
flow table 5-1: dst IP 10.0.0.1 type 0x0800 action output port P2-2
Terminal database table entry-1 is also created for terminal 1 in SDN controller
Figure BDA0001448323660000121
In S401, the processes of steps S211 and S212 may be replaced by: the SDN controller sends an OpenFlow message to switch SW3 through a control channel with SW 3. The SW3 parses the received OpenFlow message, extracts the ARP request message therein, and sends the ARP request message to the terminal 3 via the receiving port ID (P3-2). Step S213 may be replaced with a step in which the SDN controller re-encapsulates the ARP request packet using an OpenFlow protocol, generates an OpenFlow message, and sends the OpenFlow message to switches of all access terminals in the network through the control channel. And then, after analyzing the received OpenFlow message, each switch extracts the ARP request message from the OpenFlow message and sends the ARP request message to the terminal accessed by the switch through the receiving port (wherein the receiving port receiving the ARP request message does not send the ARP request message). The OpenFlow message may include: the ARP request message, and the ID (0003) and the receiving port ID (P3-2) of the switch (SW3) to which the terminal 3 has access. In this embodiment, the access switch SW2 sends the OpenFlow message through the receiving port P2-3; the access switch SW3 sends this OpenFlow message by receiving port P3-2.
S402, the terminal 3 sends ARP response message to the terminal 1.
The processing flow of this step is consistent with that of the access switch2 receiving the ARP response message sent by the terminal 2, that is, steps S301 to S310 may be referred to.
Wherein, in the OpenFlow message in S303, the ID (0003) of the message SW3, the receiving port (P3-2), the hardware address (00:01:7a:00:00:03) and the IP address (10.0.0.3) of the terminal 3 obtained in the ARP response message are included. For SW3, the SDN controller issues a forwarding flow table for terminal 3 as follows:
flow table 5-2: dst IP 10.0.0.3 type 0x0800 action output port P3-2
SDN controller creates terminal database table entry-3 for terminal 3
Figure BDA0001448323660000131
The target IP address of the ARP response packet, that is, the terminal 1IP address (10.0.0.1), queries the database using the IP address of the terminal 1, and acquires the ID (0002) and the receiving port ID (P2-2) of the switch SW2 corresponding to the terminal 2 from the database. The SDN controller encapsulates the ARP response message again by using an OpenFlow protocol to generate an OpenFlow message, the encapsulated OpenFlow message is sent to a target access switch SW2 through a control channel, and after the received OpenFlow message is analyzed by a SW2, the ARP response message is extracted and sent to the terminal 1 through a receiving port P2-2.
S503, when the SDN controller determines that SW2 is not the same switch as SW3 according to the information of SW2 and the information of SW3, the SDN controller generates a communication path between terminal 1 and terminal 3 according to the topology of SW2 and SW3, and sends a forwarding flow table between terminal 1 and terminal 3 to switches (SW1, SW2, and SW3) on the communication path.
Illustratively, the following flow table is issued to SW2 for terminal 3:
flow tables 5-3: dst IP 10.0.0.3 type 0x0800 action output port P2-1
The following flow table is issued to SW2 for terminal 1:
flow tables 5-4: dst IP 10.0.0.1 type 0x0800 action output port P3-1
To SW1, the following flow tables are issued to terminal 1 and terminal 3, respectively:
flow tables 5-5: dst IP 10.0.0.1 type 0x0800 action output port P1-2
Flow tables 5-6: dst IP 10.0.0.3 type 0x0800 action output port P1-3
So far, the terminal 1 and the terminal 3 realize the establishment of a communication channel across the accessed switches.
An embodiment of the present invention illustrated with reference to fig. 3 provides an SDN controller comprising:
a flow table processing unit 31, configured to send initial flow tables to all switches in the SDN network;
a receiving unit 32, configured to receive an ARP packet sent by an switch to which a source terminal accesses according to the initial flow table and information of the switch to which the source terminal accesses; wherein the ARP message is sent by a source terminal, and the characteristic information of the ARP message comprises: address information of the source terminal;
the flow table processing unit 31 is further configured to send a predetermined flow table to the switch accessed by the source terminal according to the information of the switch accessed by the source terminal and the address information of the source terminal received by the receiving unit 32, where the predetermined flow table is used to instruct the switch accessed by the source terminal to send the received predetermined packet to the source terminal;
a storage unit 33, configured to store the address information of the source terminal and the information of the switch to which the source terminal accesses in a database.
Optionally, the feature information of the ARP request includes: address information of the destination terminal; further comprising:
the query unit 34 is configured to query, in the database, information of a switch to which the destination terminal is accessed according to the address information of the destination terminal;
the sending unit 35 is further configured to send the ARP packet and the information of the switch accessed by the destination terminal to the switch accessed by the destination terminal when the querying unit 34 queries the information of the switch accessed by the destination terminal, so that the switch accessed by the destination terminal sends the ARP packet to the destination terminal according to the information of the switch accessed by the destination terminal.
Optionally, the ARP message is an ARP request message; the sending unit 35 is further configured to send the ARP request packet and information of the switch to which the destination terminal accesses to all switches when the querying unit 34 does not query the information of the destination terminal.
Optionally, the ARP packet is an ARP response packet, and the sending unit 35 is further configured to discard the ARP response packet when the querying unit 34 fails to query the information of the switch accessed by the source terminal.
Optionally, the flow table processing unit 31 is further configured to, when determining that the switch accessed by the destination terminal is not the switch accessed by the source terminal according to the information of the switch accessed by the source terminal and the information of the switch accessed by the destination terminal, generate a communication path between the destination terminal and the source terminal according to a topology of the switch accessed by the destination terminal and the switch accessed by the source terminal, and send a forwarding flow table between the source terminal and the destination terminal to the switch on the communication path.
In the above scheme, the SDN controller sends initial flow tables to all switches in the SDN network; the source terminal sends ARP message to the switch accessed by the source terminal, and the characteristic information of the ARP message comprises: address information of a source terminal; the switch accessed by the source terminal sends an ARP message and information of the switch accessed by the source terminal to the SDN controller according to the initial flow table; the SDN controller sends a preset flow table to the switch accessed by the source terminal according to the information of the switch accessed by the source terminal and the address information of the source terminal, wherein the preset flow table is used for indicating the switch accessed by the source terminal to send a received preset message to the source terminal; the SDN controller stores the address information of a source terminal and the information of a switch accessed by the source terminal into a database; in the process, the SDN controller can generate a corresponding flow table according to the address information of the source terminal, the address information of the source terminal and the information of the switch accessed by the source terminal are recorded in a database of the SDN controller, the flow table is only issued to the access switch connected with the source terminal, other unrelated switches are not affected by the access network of the source terminal, the phenomenon that the SDN controller issues the flow table on all switches for terminals which do not need communication at the same time is avoided, the efficiency of the SDN in the process of processing the access of the communication terminal is improved, and the utilization efficiency of flow table resources of the OpenFlow switch is improved.
Additionally, a computer-readable medium (or media) is also provided, comprising computer-readable instructions that when executed perform the operations of the method in the above-described embodiments.
Additionally, a computer program product is also provided, comprising the above-described computer-readable medium (or media).
It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for controlling an SDN network, comprising:
the SDN controller sends initial flow tables to all switches in the SDN network;
the source terminal sends ARP message to the switch accessed by the source terminal, and the characteristic information of the ARP message comprises: address information of the source terminal;
the switch accessed by the source terminal sends the ARP message and the information of the switch accessed by the source terminal to the SDN controller according to the initial flow table;
the SDN controller sends a preset flow table to the switch accessed by the source terminal according to the information of the switch accessed by the source terminal and the address information of the source terminal, wherein the preset flow table is used for indicating the switch accessed by the source terminal to send a received preset message to the source terminal;
the SDN controller stores the address information of the source terminal and the information of the switch accessed by the source terminal in a database.
2. The method of claim 1, wherein the characteristic information of the ARP packet comprises: address information of the destination terminal; the method further comprises the following steps:
the SDN controller inquires information of a switch accessed by the target terminal in the database according to the address information of the target terminal;
when the SDN controller inquires the information of the switch accessed by the target terminal, the ARP message and the information of the switch accessed by the target terminal are sent to the switch accessed by the target terminal;
and the switch accessed by the target terminal sends the ARP message to the target terminal according to the information of the switch accessed by the target terminal.
3. The method of claim 2, wherein the ARP message is an ARP request message; when the SDN controller cannot inquire the information of the destination terminal, the method further comprises the following steps:
and the SDN controller sends the ARP request message and the information of the switch accessed by the target terminal to the switches of all the access terminals.
4. The method according to claim 2, wherein the ARP packet is an ARP response packet, and when the SDN controller fails to inquire about the switch accessed by the destination terminal, the SDN controller discards the ARP response packet.
5. The method of claim 2, further comprising:
when the SDN controller determines that the switch accessed by the destination terminal is not the switch accessed by the source terminal according to the information of the switch accessed by the source terminal and the information of the switch accessed by the destination terminal, the SDN controller generates a communication path between the destination terminal and the source terminal according to the topological structures of the switch accessed by the destination terminal and the switch accessed by the source terminal, and sends a forwarding flow table between the source terminal and the destination terminal to the switch on the communication path.
6. An SDN controller, comprising:
the flow table processing unit is used for sending initial flow tables to all switches in the SDN network;
a receiving unit, configured to receive an ARP packet sent by a switch to which a source terminal accesses according to the initial flow table and information of the switch to which the source terminal accesses; wherein the ARP message is sent by a source terminal, and the characteristic information of the ARP message comprises: address information of the source terminal;
the flow table processing unit is further configured to send a predetermined flow table to the switch accessed by the source terminal according to the information of the switch accessed by the source terminal and the address information of the source terminal received by the receiving unit, where the predetermined flow table is used to instruct the switch accessed by the source terminal to send a received predetermined message to the source terminal;
and the storage unit is used for storing the address information of the source terminal and the information of the switch accessed by the source terminal into a database.
7. The SDN controller of claim 6, wherein the characteristic information of the ARP request comprises: address information of the destination terminal; further comprising:
the query unit is used for querying the information of the switch accessed by the target terminal in the database according to the address information of the target terminal;
and the sending unit is used for sending the ARP message and the information of the switch accessed by the target terminal to the switch accessed by the target terminal when the information of the switch accessed by the target terminal is inquired by the inquiring unit, so that the switch accessed by the target terminal can send the ARP message to the target terminal according to the information of the switch accessed by the target terminal.
8. The SDN controller of claim 7, wherein the ARP message is an ARP request message; the sending unit is further configured to send the ARP request packet and the information of the switch to which the destination terminal accesses to all switches when the information of the destination terminal is not queried by the querying unit.
9. The SDN controller of claim 7, wherein the ARP packet is an ARP response packet, and the sending unit is further configured to discard the ARP response packet when the querying unit does not query information of a switch accessed by the destination terminal.
10. The SDN controller of claim 7, wherein the flow table processing unit is further configured to, when it is determined that the switch accessed by the destination terminal is not the switch accessed by the source terminal according to the information about the switch accessed by the source terminal and the information about the switch accessed by the destination terminal, generate a communication path between the destination terminal and the source terminal according to a topology of the switch accessed by the destination terminal and the switch accessed by the source terminal, and send a forwarding flow table between the source terminal and the destination terminal to a switch on the communication path.
CN201711025688.9A 2017-10-27 2017-10-27 SDN network control method and SDN controller Active CN109729026B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711025688.9A CN109729026B (en) 2017-10-27 2017-10-27 SDN network control method and SDN controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711025688.9A CN109729026B (en) 2017-10-27 2017-10-27 SDN network control method and SDN controller

Publications (2)

Publication Number Publication Date
CN109729026A CN109729026A (en) 2019-05-07
CN109729026B true CN109729026B (en) 2020-12-01

Family

ID=66291061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711025688.9A Active CN109729026B (en) 2017-10-27 2017-10-27 SDN network control method and SDN controller

Country Status (1)

Country Link
CN (1) CN109729026B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102938794B (en) * 2012-11-14 2016-01-13 华为技术有限公司 ARP message forwarding method, switch and controller
CN103905577A (en) * 2012-12-28 2014-07-02 中兴通讯股份有限公司 Address resolution protocol message processing method and system
CN103905317B (en) * 2012-12-28 2017-05-03 中兴通讯股份有限公司 Message processing method and system for software-defined network
US9426060B2 (en) * 2013-08-07 2016-08-23 International Business Machines Corporation Software defined network (SDN) switch clusters having layer-3 distributed router functionality
KR20150030099A (en) * 2013-09-11 2015-03-19 한국전자통신연구원 System and method for address resolution
CN103825954B (en) * 2014-03-10 2017-12-01 中国联合网络通信集团有限公司 A kind of OpenFlow control methods and corresponding plug-in unit, platform and network
CN105340227B (en) * 2014-06-03 2018-11-13 华为技术有限公司 Method, controller, interchanger and the system that information is transmitted between open flows flow table
CN104301238A (en) * 2014-10-17 2015-01-21 福建星网锐捷网络有限公司 Message processing method, device and system

Also Published As

Publication number Publication date
CN109729026A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
US11552885B2 (en) Network system and routing method
EP2544417B1 (en) Communication system, path control apparatus, packet forwarding apparatus and path control method
US10880214B2 (en) Service routing packet processing method and apparatus, and network system
JP5621778B2 (en) Content-based switch system and content-based switch method
US20180324274A1 (en) Information system, control apparatus, method of providing virtual network, and program
US10645006B2 (en) Information system, control apparatus, communication method, and program
CN100525240C (en) Data packet communication device
JP2014533001A (en) Transfer device control device, transfer device control method, communication system, and program
WO2015027401A1 (en) Packet processing method, device and system
US10523629B2 (en) Control apparatus, communication system, communication method, and program
JP2008148243A (en) Communication apparatus, communication system, communication method and communication program
WO2013062070A1 (en) Control apparatus, communication system, virtual network management method, and program
CN109729026B (en) SDN network control method and SDN controller
US9942823B2 (en) Communication terminal, communication method, and communication program
WO2016017737A1 (en) Switch, overlay network system, communication method, and program
CN108574637B (en) Address self-learning method and device and switch
EP3059909B1 (en) Method, apparatus and system for controlling forwarding of service data in virtual network
US20170195236A1 (en) Communication method and communication device
KR20170001654A (en) Method for network address translation by using a software defined networking switch
WO2016031923A1 (en) Switch, overlay network system, tunnel setting changing method and program
JP6175766B2 (en) Communication node, control device, communication system, entry aggregation method, and program
WO2015129727A1 (en) Communication terminal, communication method and program
JP6160101B2 (en) Communication device, control device, communication system, and control message transmission method
WO2014175250A1 (en) Communication terminal, control apparatus, communication system, communication method and program
JP2016225933A (en) Control device, control method for relay device, program, and communication system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 610041 nine Xing Xing Road 16, hi tech Zone, Sichuan, Chengdu

Patentee after: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 610041, 17 floor, maple building, 1 building, 288 Tianfu street, Chengdu, Sichuan.

Patentee before: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.