Message forwarding method, message forwarding system and related equipment

By using data links to transmit data packets and decision results in the SDN architecture, the problem of switch control link bandwidth limitation and cache overflow is solved, and reliable data transmission and rapid issuance of decision results are achieved.

CN113630325BActive Publication Date: 2025-05-23HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010380955.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-08
Publication Date
2025-05-23
Estimated Expiration
2040-05-08

AI Technical Summary

Technical Problem

In the existing SDN architecture, data loss caused by limited bandwidth of switch control links, slow configuration dispatch, and switch cache overflow.

Method used

Transfer data packets and decision results through the data link between the switch and the SDN controller to avoid switch cache overflow and increase the rate at which the controller issues decision results.

Benefits of technology

It effectively avoids data loss, improves the transmission speed and processing capabilities of the switch, and improves the rate at which the SDN controller issues decision results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113630325B_ABST
    Figure CN113630325B_ABST
Patent Text Reader

Abstract

A message forwarding method is disclosed, which can be applied to the field of network communication. The method includes: a switch receives a first data message sent by a host; the switch queries whether there is a flow table matching the first data message; if not, the switch sends the first data message to a first SDN controller via a data link; the switch receives the first data message and a decision result via a data link, and the decision result is obtained by the first SDN controller according to the first data message; the switch forwards the first data message according to the decision result. The present application first sends the first data message to the first SDN controller through the switch, and then receives the first data message and the decision result, which can solve the problems of data loss caused by limited switch control link bandwidth, slow configuration delivery, and switch cache overflow in the existing SDN architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communications, and in particular to a message forwarding method, a message forwarding system and related equipment. Background Art

[0002] Software defined network (SDN) is a new type of innovative network architecture and a way to implement network virtualization. Through its core technology, openflow, the control plane and data plane of SDN are separated, thereby achieving flexible control of network traffic.

[0003] SDN generally includes hosts, SDN controllers, and switches. The SDN controller is the brain and center of SDN, which controls the forwarding path of the switch and directly determines the traffic distribution of the network. After the switch receives the data packet sent by the host through the data link, it first queries whether there is a flow table matching the data packet locally. If the switch has a flow table matching the data packet, it executes the action and then forwards it; if the switch does not have a flow table matching the data packet, it caches the data packet and constructs a PACKET_IN control message based on the header of the data packet. The PACKET_IN control message is sent to the SDN controller through the control link. The SDN controller generates a decision result based on the global network information it has, and returns the decision result to the switch through the control link. The switch uses the decision result to create a local flow table and forwards the data packet according to the flow table.

[0004] As the scope of SDN applications continues to expand, switch application scenarios and forwarding throughput continue to increase, and existing switches are unable to support high-tech network application requirements; at the same time, existing solutions need to cache a large number of data packets that do not match the flow table, resulting in cache overflow and data packet loss. Summary of the invention

[0005] The present application provides a message forwarding method, a message forwarding system and related equipment, which can solve the problems of limited switch control link bandwidth, slow configuration delivery, data loss caused by switch cache overflow, etc. in the existing SDN architecture.

[0006] The first aspect of the present application provides a message forwarding method, comprising:

[0007] The switch is connected to the host and the first SDN controller, and forwards the first data message of the host according to the decision result provided by the first SDN controller. First, the switch receives the first data message sent by the host. Then, the switch can query whether there is a flow table matching the first data message. If there is no flow table matching the first data message, the switch sends the first data message to the first SDN controller through a data link. The switch receives the first data message and the decision result, and the decision result is obtained by the first SDN controller according to the first data message. There are many ways for the first SDN controller to obtain the decision result according to the first data message. For example, the switch also generates a PACKET_IN control message according to the first data message, sends the PACKET_IN control message to the first SDN controller, and the first SDN controller generates a decision result according to the PACKET_IN control message. Or the first SDN controller directly generates a decision result according to the header of the first data message. After the switch receives the decision result through the data link, the switch forwards the first data message according to the decision result. If there is a flow table matching the first data message, the switch can forward the first data message according to the matching flow table.

[0008] Among them, the switch first sends the first data message to the first SDN controller, and then receives the first data message and the decision result. Therefore, even if the cache of the switch overflows during the period, the first data message will not be lost. Compared with the PACKET_IN control message, the first data message generally has a larger volume. The switch sends and receives the first data message and the decision result through the data link, which can improve the transmission speed and processing capacity, and improve the rate at which the controller sends the decision result. And when the switch does not generate the PACKET_IN control message based on the first data message, the data processing amount of the switch for the first data message can also be reduced.

[0009] Based on the first aspect of the present application, in a first implementation of the first aspect of the present application, the switch receives a second data message through a data link, the second data message includes the first data message and the decision result, and the decision result is carried in the control protocol field of the second data message. The second data message includes the first data message and the decision result, and the decision result and the first data message can arrive at the switch at the same time, so that the state synchronization timing between the SDN controller and the switch is simplified and the disorder problem is alleviated.

[0010] Based on the first implementation of the first aspect of the present application, in the second implementation of the first aspect of the present application, after the switch receives the second data message through the data link, the switch can read the first data message and the decision result in the second data message, and perform corresponding operations according to the decision result, including but not limited to generating, deleting, and modifying the flow table. Then forward the first data message according to the flow table. Among them, the decision result is the instruction information for controlling the switch, which can be related to the flow table, such as the decision result is the information for directly operating the flow table, such as directly generating the flow table, or generating the flow table after decrypting or converting the decision result, and then storing the flow table in the local storage space; the decision result may be unrelated to the flow table, such as the decision result is to command the switch to report statistical information. Among them, the switch can directly obtain the first data message and the decision result in the second data message, so it can forward the first data message in time according to the decision result. Compared with the switch receiving the first data message first and then receiving the decision result, the cache time of the first data message in the switch can be reduced, and the situation of switch cache overflow caused by the accumulation of time can be reduced.

[0011] Based on the first aspect of the present application, or any one of the first to second embodiments of the first aspect of the present application, in the third embodiment of the first aspect of the present application, the switch receives the first data message and decision result sent by the second SDN controller through a data link, and the first data message and decision result are obtained by the second SDN controller from the first SDN controller. Among them, the first data message and decision result are sent from the first SDN controller to the second SDN controller, and the switch receives the first data message and decision result from the second SDN controller through the data link. Therefore, the second SDN controller has the opportunity to confirm and back up the decision result. Therefore, the accuracy and stability of the decision result can be increased.

[0012] Based on the first aspect of the present application, or any one of the first to third embodiments of the first aspect of the present application, in a fourth embodiment of the first aspect of the present application, before the switch sends the first data message to the first SDN controller, the switch first sends a request message to the first SDN controller, and the request message is used to request the first SDN controller for a decision result of the first data message. By notifying the first SDN controller in advance, the first SDN controller can be prepared to receive the first data message, which is conducive to the first SDN controller to reasonably arrange storage resources or processing resources.

[0013] The second aspect of the present application provides a message forwarding method, including:

[0014] The first SDN controller is connected to the switch and is used to provide a decision result to the switch. The first SDN controller receives the first data message sent by the switch through the data link, and obtains a decision result according to the first data message. There are many ways for the first SDN controller to obtain the decision result according to the first data message. For example, the switch also generates a PACKET_IN control message based on the first data message, sends the PACKET_IN control message to the first SDN controller, and the first SDN controller generates a decision result according to the PACKET_IN control message. Or the first SDN controller directly generates a decision result based on the header of the first data message. After the first SDN controller obtains the decision result, the first SDN controller sends the first data message and the decision result to the switch, so that the switch forwards the first data message according to the decision result.

[0015] Among them, the first SDN controller can receive the first data message sent by the switch. After obtaining the decision result according to the first data message, the first data message and the decision result are sent to the controller. Therefore, even if the cache of the switch overflows during the period, the first data message will not be lost. Compared with the PACKET_IN control message, the first data message generally has a larger volume. The switch sends and receives the first data message and the decision result through the data link, which can improve the transmission speed and processing capacity, and improve the rate at which the controller sends the decision results. In the case where the switch does not generate a PACKET_IN control message based on the first data message, the data processing amount of the switch for the first data message can also be reduced.

[0016] Based on the second aspect of the present application, in a first implementation of the second aspect of the present application, the first SDN controller sends a second data message to the switch, the second data message includes the first data message and the decision result, and the decision result is carried in the control protocol field of the second data message. The second data message includes the first data message and the decision result, and the decision result and the first data message can arrive at the switch at the same time, so that the state synchronization timing between the SDN controller and the switch is simplified and the disorder problem is alleviated.

[0017] Based on the second aspect of the present application, or the first implementation of the second aspect of the present application, in the second implementation of the second aspect of the present application, the first SDN controller sends a first data message and a decision result to the second SDN controller, so that the second SDN controller can save the decision result and send the first data message and the decision result to the switch through the data link. Among them, the first SDN controller sends the first data message and the decision result to the second SDN controller, and the switch can receive the first data message and the decision result from the second SDN controller. Therefore, the second SDN controller has the opportunity to confirm (such as re-decision) and back up the decision result. Therefore, the accuracy and stability of the decision result can be increased.

[0018] Based on the second aspect of the present application, or any one of the first to second embodiments of the second aspect of the present application, in a third embodiment of the first aspect of the present application, before the first SDN controller receives the first data message sent by the switch, the first SDN controller receives the request information sent by the switch. The first SDN controller can prepare to receive the first data message according to the request information, which is conducive to the first SDN controller to reasonably arrange storage resources or processing resources.

[0019] The third aspect of the present application provides a message forwarding system, including:

[0020] Hosts, switches and the first SDN controller;

[0021] The host is used to send a first data message to the switch; the switch is used to receive the first data message sent by the host, query whether there is a flow table matching the first data message, and if not, the switch is also used to send the first data message to the first SDN controller through the data link. The first SDN controller is used to receive the first data message sent by the switch through the data link, obtain a decision result according to the first data message, and send the first data message and the decision result to the switch; the switch is also used to receive the first data message and the decision result through the data link, and forward the first data message according to the decision result.

[0022] Based on the third aspect of the present application, in a first implementation manner of the third aspect of the present application, the first SDN controller is specifically used to send a second data packet to the switch through a data link, the second data packet includes the first data packet and a decision result, and the decision result is carried in a control protocol field of the second data packet.

[0023] Based on the first implementation of the third aspect of the present application, in the second implementation of the third aspect of the present application, the switch is specifically used to obtain the decision result in the second data message, generate a flow table according to the decision result, and forward the first data message according to the flow table.

[0024] Based on the third aspect of the present application, or any one of the first to second embodiments of the third aspect of the present application, in a third embodiment of the third aspect of the present application, the system further includes:

[0025] The second SDN controller; the first SDN controller is specifically used to send the first data message and the decision result to the second SDN controller; the second SDN controller is used to receive the first data message and the decision result sent by the first SDN controller, save the decision result, and send the first data message and the decision result to the switch through the data link; the switch is specifically used to receive the first data message and the decision result sent by the second SDN controller through the data link.

[0026] Based on the third aspect of the present application, or any one of the first to third implementations of the third aspect of the present application, in a fourth implementation of the third aspect of the present application, the switch is further used to send request information to the first SDN controller; the first SDN controller is specifically used to obtain a decision result according to the first data message if the request information sent by the switch is received.

[0027] For the description of the beneficial effects of the message forwarding system in the third aspect of the present application, reference may be made to the description of the message forwarding method in the first aspect or the second aspect mentioned above.

[0028] A fourth aspect of the present application provides a switch, including:

[0029] A first receiving unit, used for receiving a first data message sent by a host;

[0030] A query unit, used to query whether there is a flow table matching the first data message;

[0031] a sending unit, configured to, if not, send the first data message to the first SDN controller through the data link;

[0032] A second receiving unit is used to receive the first data message and the decision result through the data link, where the decision result is obtained by the first SDN controller according to the first data message;

[0033] The forwarding unit is used to forward the first data message according to the decision result.

[0034] Based on the fourth aspect of the present application, in a first implementation of the fourth aspect of the present application, the second receiving unit is specifically used to receive a second data message through a data link, the second data message including a first data message and a decision result, and the decision result is carried in a control protocol field of the second data message.

[0035] Based on the first implementation of the fourth aspect of the present application, in the second implementation of the fourth aspect of the present application,

[0036] The forwarding unit is specifically used to obtain the decision result in the second data message;

[0037] The forwarding unit is specifically used to generate a flow table according to the decision result;

[0038] The forwarding unit is specifically configured to forward the first data message according to the flow table.

[0039] Based on the fourth aspect of the present application, or any one of the first to second embodiments of the fourth aspect of the present application, in a third embodiment of the fourth aspect of the present application, the second receiving unit is specifically used to receive a first data message and a decision result sent by a second SDN controller through a data link, and the first data message and the decision result are obtained by the second SDN controller from the first SDN controller.

[0040] Based on the fourth aspect of the present application, or any one of the first to third embodiments of the fourth aspect of the present application, in a fourth embodiment of the fourth aspect of the present application, the sending unit is further used to send request information to the first SDN controller, and the request information is used to request the first SDN controller for a decision result of the first data packet.

[0041] For the description of the beneficial effects of the message forwarding system in the fourth aspect of the present application, reference may be made to the description of the message forwarding method in the aforementioned first aspect.

[0042] A fifth aspect of the present application provides an SDN controller, including:

[0043] A receiving unit, configured to receive a first data message sent by the switch through a data link;

[0044] A processing unit, configured to obtain a decision result according to the first data message;

[0045] A sending unit is used to send the first data message and the decision result to the switch, so that the switch forwards the first data message according to the decision result.

[0046] Based on the fifth aspect of the present application, in a first implementation manner of the fifth aspect of the present application, the sending unit is specifically used to send a second data message to the switch, the second data message includes the first data message and a decision result, and the decision result is carried in the control protocol field of the second data message.

[0047] Based on the fifth aspect of the present application, or the first implementation manner of the fifth aspect of the present application, in the second implementation manner of the fifth aspect of the present application, the sending unit is specifically used to send the first data message and the decision result to the second SDN controller, so that the second SDN controller can save the decision result, and send the first data message and the decision result to the switch through the data link.

[0048] Based on the fifth aspect of the present application, or any one of the first to third embodiments of the fifth aspect of the present application, in a fourth embodiment of the fifth aspect of the present application, the processing unit is specifically used for obtaining a decision result according to the first data message if the SDN controller receives the request information sent by the switch.

[0049] For the description of the beneficial effects of the SDN controller in the fifth aspect of the present application, reference may be made to the description of the message forwarding method in the aforementioned second aspect.

[0050] A sixth aspect of the present application provides a switch, including:

[0051] Memory and processor;

[0052] Wherein, the memory is used to store programs;

[0053] The processor is used to execute the program in the memory, including executing the method described in the first aspect or any one of the embodiments of the first aspect.

[0054] A seventh aspect of the present application provides a switch, including:

[0055] Memory and processor;

[0056] Wherein, the memory is used to store programs;

[0057] The processor is used to execute the program in the memory, including executing the method described in the second aspect or any one of the embodiments of the second aspect.

[0058] The eighth aspect of the present application provides a computer storage medium, characterized in that instructions are stored in the computer storage medium, and when the instructions are executed on a computer, the computer executes the method as described in the first aspect or any one of the embodiments of the first aspect; or executes the method as described in the second aspect or any one of the embodiments of the second aspect.

[0059] In the ninth aspect of the present application, a computer program product is provided, characterized in that when the computer program product is executed on a computer, the computer is caused to execute the method as described in the first aspect or any one of the embodiments of the first aspect; or execute the method as described in the second aspect or any one of the embodiments of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A schematic diagram of a network framework in an embodiment of the present application;

[0061] Figure 2 A schematic diagram of a flow chart of a message forwarding method in an embodiment of the present application;

[0062] Figure 3 This is a schematic diagram of the networking of data links and control links in an embodiment of the present application;

[0063] Figure 4 This is a schematic diagram of the structure of the second data message in an embodiment of the present application;

[0064] Figure 5 Another flowchart of the message forwarding method in the embodiment of the present application;

[0065] Figure 6 A schematic diagram of the structure of a switch in an embodiment of the present application;

[0066] Figure 7 This is a structural diagram of an SDN controller in an embodiment of the present application;

[0067] Figure 8 This is another structural diagram of a switch or an SDN controller in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The embodiments of the present application provide a message forwarding method, a message forwarding system and related devices, which are applied to the field of network communications and can solve the problems of limited switch control link bandwidth, slow configuration delivery, data loss caused by switch cache overflow, etc. in the existing SDN architecture.

[0069] SDN adopts the idea of ​​separating data from control, and separates the control function from the forwarding device: the switch is only responsible for high-speed data forwarding, without complex state control signals. The SDN controller implements complex state management and logical implementation of network functions, controls the resource view of the entire network, optimizes resource utilization, and improves network management efficiency and network configuration flexibility. To implement SDN, the physical links of the switch are currently divided into two categories: data link and control link. The bandwidth of the control link is generally much smaller than the bandwidth of the data link. The SDN controller is connected to the switch through the control port to form a control link. The switch sends statistics and request messages to the SDN controller through the control link, and the SDN controller sends the decision result to the switch through the control link. The switch is connected to the host through the data port to form a data link. The host sends data packets to the switch through the data link. In order to prevent data packets from occupying the bandwidth of the control link and affecting the sending and receiving performance of the decision result, the control port and data port of the switch are physically separated and use different physical channels. The control message and the data message are independent of each other and do not interfere with each other.

[0070] The control of the switch by the SDN controller is completed through the decision result delivery mechanism. The decision result described in this application can be a flow table, or a table group composed of multiple flow tables, or other information that controls the behavior of the switch. The flow table can include multiple flow table items, such as matching domains, control domains, and counters. The matching domain is also called the header domain, which is used to match the header content of the data message received by the switch. The header content of the data message can be the source, MAC (media access control) address, destination MAC address, source IP (internet protocol) address, destination IP address, etc. The control domain of the flow table is used to instruct the switch how to process the matching data message after receiving it. For example, discard (drop), forward to the specified port of the switch, modify the data message, wherein modifying the data message includes adding / deleting a virtual local area network identity (VLAN ID), push / pop tags, increasing / decreasing IP lifetime (time to live, TTL), etc., forwarding to a sequence of special ports, etc.

[0071] After receiving the data message from the host, the switch needs to query whether there is a flow table that matches the content of the data message header. If there is no flow table that matches the content of the data message header, the switch caches the data message, generates a PACKET_IN control message, sends the PACKET_IN control message to the SDN controller, and waits for the SDN controller to send the flow table. Since the cache queue space of the switch is limited, when the data message throughput of the switch is large and there are many short connections, a large number of data messages need to be buffered. And the time required for a single data message to be buffered depends on the speed at which the controller sends the flow table. If the speed at which the controller sends the flow table is long, the buffering amount will increase further. The risk of the switch cache queue overflow increases, resulting in data message loss.

[0072] In an embodiment of the present application, the switch first sends a first data message to the SDN controller, and then receives the first data message and the decision result. Even if the cache of the switch overflows during this period, the first data message will not be lost. In the case where the switch does not generate a PACKET_IN control message based on the first data message, the amount of data processing by the switch for the first data message can also be reduced. Compared with the PACKET_IN control message, the first data message generally has a larger volume. The switch sends and receives the first data message and the decision result through the data link, which can improve the transmission speed and processing capacity of the switch and improve the rate at which the controller sends the decision results. In the case where the switch does not cache the first data message, the amount of data cached by the switch can also be reduced, saving cache resources for the switch.

[0073] The network framework of the embodiment of the present application is described below. For example, the features or contents marked with dotted lines in the drawings involved in the embodiment of the present application can be understood as optional operations or optional structures of the embodiment.

[0074] See also Figure 1 , Figure 1 Schematic diagram of the network framework in the embodiment of the present application.

[0075] Figure 1 It includes: a host 101, a switch 102, and a first SDN controller 103.

[0076] The host 101 is connected to the router 102, and the connection mode can be a wireless connection or a wired connection. The host 101 can be a mobile phone, a tablet computer, an IoT terminal device, a vehicle-mounted device, a wearable device, a computing device, etc. The main function of the host 101 is to send a first data message to the switch 102, and try to send the first data message to the destination through the forwarding function of the switch 102.

[0077] The switch 102 is a network device for forwarding electrical or optical signals. The switch 102 can provide an exclusive electrical or optical signal path for any two network nodes connected to the switch 102. Common switches 102 include Ethernet switches, telephone voice switches, fiber switches, etc. The switch 102 is connected to the first SDN controller 103. The main function of the switch 102 is to receive the first data message sent by the host 101, query whether there is a flow table matching the first data message, and if not, send the first data message to the first SDN controller 103 through the data link, and receive the first data message and the decision result through the data link. After receiving the first data message and the decision result, forward the first data message according to the decision result.

[0078] The first SDN controller 103 can be hardware or an application. When the first SDN controller 103 is an application, the first SDN controller 103 runs on a device that is not the switch 102. The first SDN controller 103 can be connected to the switch 102 based on a protocol such as OpenFlow. The main function of the first SDN controller 103 is to receive the first data message sent by the switch 102 through a data link, and then make a decision based on the global network information to obtain a decision result, and send the decision result and the first data message to the switch 102.

[0079] Optionally, Figure 1The second SDN controller 104 is also included, and the second SDN controller 104 is connected to the first SDN controller 103 and the switch 102. In the case of including the second SDN controller 104, the first SDN controller 103 sends the first data message and the decision result to the switch 102 through the second SDN controller 104. The main function of the second SDN controller 104 is to receive the first data message and the decision result sent by the first SDN controller 103, back up the decision result, and send the first data message and the decision result to the switch 102 through the data link.

[0080] According to the foregoing description, the embodiment of the present application may include a second SDN controller or may not include a second SDN controller, which will be described separately below.

[0081] See also Figure 2 , Figure 2 A flowchart diagram of a message forwarding method in an embodiment of the present application.

[0082] In step 201, the host sends a first data message to the switch.

[0083] The host establishes a communication connection with the switch through access authentication, authentication-free, etc. After the communication connection is established, the host may attempt to send a first data message to the switch.

[0084] In step 202, the switch queries whether there is a flow table matching the first data packet.

[0085] In step 203, if not, the switch sends a request message to the first SDN controller.

[0086] Before the switch sends the first data message to the first SDN controller, the switch first sends a request message to the first SDN controller, and the request message is used to request the first SDN controller for a decision result of the first data message. By notifying the first SDN controller in advance, the first SDN controller can be prepared to receive the first data message, which is conducive to the first SDN controller to reasonably arrange storage resources or processing resources.

[0087] Optionally, the switch sends a request message to the first SDN controller via a data link, and the data link is the same as the data link for transmitting the first data message. The request message is used to notify the first SDN controller to prepare for receiving the first data message, which is beneficial for the first SDN controller to reasonably arrange storage resources or processing resources. The first data message will be transmitted via the data link. If the request message is also transmitted via the data link, the content of the request message can be simplified through the agreement between the first SDN controller and the switch. For example, the request message may not need to include information about which port the first data message will be transmitted from.

[0088] Optionally, step 203 may not be performed. The switch and the first SDN controller may agree in advance that after receiving the first data message, the first SDN controller obtains a decision result according to the first data message and sends the first data message and the decision result to the switch.

[0089] In step 204, the switch sends a first data packet to the first SDN controller through a data link.

[0090] like Figure 3 As shown, Figure 3 The network diagram of the data link and the control link in the embodiment of the present application. The switch establishes a connection with the host through the data port 301, so the switch can receive the first data message sent by the host through the data link. The switch also establishes a connection with the first SDN controller through the data port 303. If there is no flow table matching the first data message, the switch sends the first data message to the first SDN controller through the data link. It is necessary to determine whether it is a data link or a control link by judging by the port on the switch. Compared with the control port, the data port has a larger bandwidth and can transmit a larger amount of data in the same time. In the embodiment of the present application, by sending the first data message to the first SDN controller, the first data message can be prevented from being lost. At the same time, the data transmission volume between the switch and the first SDN controller will increase slightly, but since only the first data packet of each flow needs to be sent to the controller for decision request, the subsequent messages of the flow will be directly forwarded according to the decision result cached in the switch, so the bandwidth consumption of sending data messages to the controller is within an acceptable range. In addition, the switch is connected to the first SDN controller via the data port, which can increase the transmission bandwidth between the switch and the first SDN controller, and improve the transmission speed and processing performance of the first data message and the second data message.

[0091] Optionally, the switch does not generate a PACKET_IN control message based on the first data message. The PACKET_IN control message is obtained based on the first data message. When the first SDN controller can receive the first data message, the switch may not generate a PACKET_IN control message based on the first data message. Among them, the original decision result needs to go through two steps to be obtained. The two steps are that the switch obtains the PACKET_IN control message based on the first data message, and the first SDN controller obtains the decision result based on the PACKET_IN control message. The decision result in the embodiment of the present application can be obtained directly by the first SDN controller based on the first data message, without the step of obtaining the PACKET_IN control message, so the processing flow can be simplified.

[0092] In step 205, the first SDN controller obtains a decision result according to the first data message.

[0093] There are many ways for the first SDN controller to obtain a decision result based on the first data message. For example, the switch also generates a PACKET_IN control message based on the first data message, and then sends the first data message and the PACKET_IN control message to the first SDN controller, and the first SDN controller generates a decision result based on the received PACKET_IN control message. Alternatively, if the first SDN controller does not receive the PACKET_IN control message, the first SDN controller can generate a decision result based on the header information of the first data message. The header information of the first data message includes the source IP address, the source MAC address, the VLAN ID, etc. After the first SDN controller obtains the decision result based on the first data message, the first SDN controller can save the decision result.

[0094] In step 206, the first SDN controller sends the decision result and the first data packet to the switch through the data link.

[0095] Optionally, the first SDN controller sends a second data message to the switch through a data link, where the second data message includes a decision result and the first data message. Figure 4 As shown, Figure 4 It is a structural diagram of the second data message in the embodiment of the present application. The second data message can be in different formats. The second data message 401 is an Ethernet message, including an outer Ethernet header, a decision result and an IP payload. The second data message 402 is a VXLAN data message, including an outer Ethernet header, a VXLAN header, an inner Ethernet header, 802.1Q, a decision result and an IP payload. The second data message 403 is a VXLAN-GPE data message, including an outer Ethernet header, a VXLAN-GPE header, a decision result, an inner Ethernet header, an 802.1Q protocol and an IP payload. The second data message 404 is a VLAN data message, including an outer Ethernet header, 802.1QET=0X×894f protocol, a decision result and an IP payload. By carrying the first data message and the decision result with the second data message, the control signal and the data signal arrive at the same time, so that the state synchronization timing between the first SDN controller and the switch is simplified. In particular, the first SDN controller is a large-scale distributed gateway. For large-scale distributed gateways, control signals and data signals need to arrive at the same time to alleviate timing issues.

[0096] Optionally, the switch does not establish a connection with the first SDN controller through a control link, and the switch and the first SDN controller only establish a connection through a data link. The original switch established a connection with the first SDN controller through the control port 302 because only a control signal, such as a decision result, needs to be transmitted. In the embodiment of the present application, not only a control signal but also a data signal needs to be transmitted between the switch and the first SDN controller. In the case where the switch establishes a data link connection with the first SDN controller, there is no need to establish a control link connection. However, in order to ensure that the control signal can be transmitted first, data can be transmitted in a priority manner. For example: the switch sends a control signal and a first data message to the first SDN controller through a data link, the first data message is a data signal, and the control signal has a higher priority than the first data message. For example: the first SDN controller sends a control signal and a second data message to the switch through a data link, the second data message includes a control signal and a data signal, and the control signal has a higher priority than the second data message. If the data transmission between the first SDN controller and the switch includes three types, namely, a control signal, a data signal, and a second data message, the priority relationship between the three types is: the control signal has a higher priority than the second data message, and the second data message has a higher priority than the data signal.

[0097] In step 207, the switch forwards the first data message according to the decision result.

[0098] According to the above description, the decision result can be a flow table, a table group consisting of multiple flow tables, or other information for controlling the switch. The flow table carries information of the matching domain and the control domain. After the switch receives the decision result, the switch performs an action on the first data message according to the information in the control domain, such as forwarding the first data message.

[0099] Optionally, if the switch receives the second data message, the switch obtains the decision result in the second data message and performs corresponding operations according to the decision result. The decision result is generally related to the flow table, and the switch directly operates the flow table according to the decision result, such as generating a flow table, or generating a flow table after decrypting or converting the decision result, and then storing the flow table in a local storage space; the decision result may also be unrelated to the flow table, such as commanding the switch to report statistical information.

[0100] The above describes a message forwarding method that does not include the second SDN controller. The following describes a message forwarding method that includes the second SDN controller.

[0101] See also Figure 5 , Figure 5 Another flowchart of the message forwarding method in the embodiment of the present application.

[0102] In step 501, the host sends a first data message to the switch.

[0103] In step 502, the switch queries whether there is a flow table matching the first data packet.

[0104] In step 503, if not, the switch sends a request message to the first SDN controller.

[0105] In step 504, the switch sends a first data packet to the first SDN controller through a data link.

[0106] In step 505, the first SDN controller obtains a decision result according to the first data message.

[0107] The description of steps 501 to 505 is the same as that of the above Figure 2 The description of step 201 to step 205 is similar.

[0108] In step 506, the first SDN controller sends the decision result and the first data packet to the second SDN controller.

[0109] Optionally, the first SDN control channel sends a second data packet to the switch, where the second data packet includes the decision result and the first data packet.

[0110] In step 507, the second SDN controller saves the decision result.

[0111] Optionally, before the second SDN controller saves the decision result, the second SDN controller may first determine whether the received decision result is correct. The way in which the second SDN controller determines whether the decision result is correct includes: the second SDN controller obtains the header information of the first data message, and obtains a new decision result based on the global information mastered by the second SDN controller. After obtaining the new decision result, the second SDN controller compares the new decision result with the decision result received from the first SDN controller. If the two decision results are the same, the second SDN controller determines that the received decision result is correct and saves the decision result. If the two decision results are not the same, the second SDN controller saves the new decision result and sends the new decision result to the first SDN controller, or sends the new decision result and the first data message to the first SDN controller. Whether the two decision results are the same should consider whether the matching domain and the control domain of the decision result are the same. If one of the two is different, the two decision results are considered to be different. The principle that leads to the two different decision results may be that the global information mastered by the first SDN controller and the second SDN controller is different, or the global information mastered by the first SDN controller and the second SDN controller is the same, and after the first SDN controller generates the decision result, the first SDN controller and the second SDN controller update the global information they master.

[0112] If the second SDN controller sends a new decision result and the first data message to the first SDN controller, the second SDN controller does not need to send a new decision result and the first data message to the switch. After the first SDN controller receives the new decision result and the first data message, the first SDN controller saves the new decision result and sends the new decision result and the first data message to the switch through the data link.

[0113] In step 508, the second SDN controller sends the decision result and the first data packet to the switch.

[0114] If the two decision results are the same, the second SDN controller saves the decision result, and then the second SDN controller sends the decision result and the first data message to the switch through the data link. Figure 3 The switch is connected to the second SDN controller via the data port 305 to form a data link. Optionally, the switch does not establish a connection with the second SDN controller via the control link, and the switch and the first SDN controller are only connected via the data link.

[0115] In step 509, the switch forwards the first data message according to the decision result.

[0116] The description of step 509 is the same as above. Figure 2 The description of step 207 is similar.

[0117] The message forwarding method is described above, and the switch in the present application is described below.

[0118] See also Figure 6 , Figure 6 A schematic diagram of the structure of a switch in an embodiment of the present application.

[0119] The switches implemented in this application include:

[0120] The first receiving unit 601 is used to receive a first data message sent by a host;

[0121] A query unit 602 is used to query whether there is a flow table matching the first data message;

[0122] The sending unit 603 is configured to send the first data message to the first SDN controller through the data link if no;

[0123] The second receiving unit 604 is used to receive the first data message and the decision result through the data link, where the decision result is obtained by the first SDN controller according to the first data message;

[0124] The forwarding unit 605 is configured to forward the first data message according to the decision result.

[0125] exist Figure 6 On the basis of, the switch in the embodiment of the present application may also include the following contents:

[0126] The second receiving unit 604 is specifically configured to receive a second data message through a data link, where the second data message includes the first data message and a decision result, and the decision result is carried in a control protocol field of the second data message.

[0127] The forwarding unit 605 is specifically used to obtain the decision result in the second data message;

[0128] The forwarding unit 605 is specifically used to generate a flow table according to the decision result;

[0129] The forwarding unit 605 is specifically configured to forward the first data message according to the flow table.

[0130] The second receiving unit 604 is specifically configured to receive the first data message and the decision result sent by the second SDN controller through the data link, and the first data message and the decision result are obtained by the second SDN controller from the first SDN controller.

[0131] The sending unit 603 is further configured to send request information to the first SDN controller, where the request information is used to request the first SDN controller for a decision result of the first data packet.

[0132] The switch is described above, and the SDN controller in this application is described below.

[0133] See also Figure 7 , Figure 7 A structural diagram of an SDN controller in an embodiment of the present application.

[0134] The SDN controller implemented in this application includes:

[0135] The receiving unit 701 is configured to receive a first data message sent by the switch through a data link;

[0136] A processing unit 702 is configured to obtain a decision result according to the first data message;

[0137] The sending unit 703 is configured to send the first data message and the decision result to the switch, so that the switch forwards the first data message according to the decision result.

[0138] exist Figure 7 On the basis of, the switch in the embodiment of the present application may also include the following contents:

[0139] The sending unit 703 is specifically configured to send a second data message to the switch, where the second data message includes the first data message and a decision result, and the decision result is carried in a control protocol field of the second data message.

[0140] The sending unit 703 is specifically configured to send the first data message and the decision result to the second SDN controller, so that the second SDN controller can save the decision result, and send the first data message and the decision result to the switch through the data link.

[0141] The receiving unit 701 is specifically used to receive a first data message sent by the switch through a data link; the sending unit is specifically used to send the first data message and the decision result to the switch through the data link.

[0142] The processing unit 702 is specifically configured to obtain a decision result according to the first data message if the SDN controller receives the request information sent by the switch.

[0143] See also Figure 8 , Figure 8 This is another schematic diagram of the structure of the switch in the embodiment of the present application.

[0144] like Figure 8 As shown, the switch 800 includes a processor 810, a transceiver 820 coupled to the processor 810, and a memory 830. The switch 800 may be Figure 2 , Figure 3 and Figure 5 The switch in. Processor 810 can be a central processing unit (CPU), a network processor (NP) or a combination of a CPU and a NP. The processor can also be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. Processor 810 can refer to one processor or include multiple processors. Processor 810 is used to query whether there is a flow table that matches the first data message.

[0145] The memory 830 may include a volatile memory, such as a random-access memory (RAM); the memory 830 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 830 may also include a combination of the above-mentioned types of memory.

[0146] The transceiver 820 is a hardware electronic device for receiving and / or sending electrical signals between devices. The transceiver 820 includes an optical fiber transceiver, a radio frequency transceiver, a CAN transceiver, and a broadband communication transceiver. The transceiver 820 is used to receive a first data message sent by the host; the transceiver 820 is also used to receive the first data message and the decision result through the data link, and the decision result is obtained by the first SDN controller according to the first data message; the transceiver 820 is also used to forward the first data message according to the decision result.

[0147] In addition, after the processor 810 executes the computer-readable instructions in the memory, it can perform all operations that the switch can perform according to the instructions of the computer-readable instructions, such as Figure 2 , Figure 5 The operations performed in the corresponding embodiments.

[0148] See also Figure 8 , Figure 8 It can also be another structural schematic diagram of the SDN controller in the embodiment of the present application.

[0149] like Figure 8 As shown, the SDN controller 800 includes a processor 810, a transceiver 820 coupled to the processor 810, and a memory 830. The SDN controller 800 may be Figure 2 , Figure 3 and Figure 5 The description of the processor, transceiver and memory in the SDN controller 800 can refer to the description of the switch 800 mentioned above.

[0150] The processor 810 is used to obtain a decision result according to the first data message. The transceiver 820 is used to receive the first data message sent by the switch through the data link; the transceiver 820 is also used to send the first data message and the decision result to the switch, so that the switch forwards the first data message according to the decision result. In addition, after the processor 810 executes the computer-readable instructions in the memory, it can perform all operations that can be performed by the first SDN controller according to the instructions of the computer-readable instructions, such as the first SDN controller in the communication Figure 2 , Figure 5 The operations performed in the corresponding embodiments.

[0151] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0152] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0153] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0154] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.

Claims

1. A packet forwarding method, characterized in that, comprising: A switch receives a first data packet sent by a host; The switch queries whether there is a flow table matching the first data packet; If not, the switch sends the first data packet to a first SDN controller via a data link; The switch receives the first data packet and a decision result via the data link, and the decision result is obtained by the first SDN controller based on the first data packet; The switch forwards the first data packet according to the decision result.

2. The method according to claim 1, characterized in that, The switch receiving the first data packet and the decision result via the data link includes: The switch receives a second data packet via the data link, and the second data packet includes the first data packet and the decision result, and the decision result is carried in the control protocol field of the second data packet.

3. The method according to claim 2, characterized in that, The switch forwarding the first data packet according to the decision result includes: The switch obtains the decision result in the second data packet; The switch generates a flow table according to the decision result; The switch forwards the first data packet according to the flow table.

4. The method according to any one of claims 1 to 3, characterized in that, The switch receiving the first data packet and the decision result via the data link includes: The switch receives the first data packet and the decision result sent by a second SDN controller via the data link, and the first data packet and the decision result are obtained by the second SDN controller from the first SDN controller.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The switch sends a request message to the first SDN controller, and the request message is used to request the decision result of the first data packet from the first SDN controller.

6. A packet forwarding method, characterized in that, comprising: A first SDN controller receives a first data packet sent by a switch via a data link; The first SDN controller obtains a decision result based on the first data packet; The first SDN controller sends the first data packet and the decision result to the switch, for the switch to forward the first data packet according to the decision result.

7. The method according to claim 6, characterized in that, The first SDN controller sending the first data packet and the decision result to the switch includes: The first SDN controller sends a second data packet to the switch, and the second data packet includes the first data packet and the decision result, and the decision result is carried in the control protocol field of the second data packet.

8. The method according to claim 6 or 7, characterized in that, The first SDN controller sending the first data packet and the decision result to the switch includes: The first SDN controller sends the first data message and the decision result to the second SDN controller, so that the second SDN controller saves the decision result and sends the first data message and the decision result to the switch through a data link.

9. The method according to any one of claims 6 to 8, It is characterized in that Before the first SDN controller receives the first data message sent by the switch through the data link, the method further includes: The first SDN controller receives the request information sent by the switch.

10. A message forwarding system, It is characterized in that include: Hosts, switches and the first SDN controller; Wherein, the host is used to send a first data message to the switch; The switch is used to receive the first data packet sent by the host, query whether there is a flow table matching the first data packet, and if not, the switch is further used to send the first data packet to the first SDN controller through a data link; The first SDN controller is used to receive the first data message sent by the switch through a data link, obtain a decision result according to the first data message, and send the first data message and the decision result to the switch; The switch is further configured to receive the first data message and the decision result through a data link, and forward the first data message according to the decision result.

11. The system according to claim 10, It is characterized in that The first SDN controller is specifically configured to send a second data message to the switch through a data link, where the second data message includes the first data message and the decision result, and the decision result is carried in a control protocol field of the second data message.

12. The system according to claim 11, It is characterized in that The switch is specifically configured to obtain the decision result in the second data message, generate a flow table according to the decision result, and forward the first data message according to the flow table.

13. A system according to any one of claims 10 to 12, It is characterized in that The system further comprises: Second SDN controller; The first SDN controller is specifically configured to send the first data message and the decision result to the second SDN controller; The second SDN controller is used to receive the first data message and the decision result sent by the first SDN controller, save the decision result, and send the first data message and the decision result to the switch through a data link; The switch is specifically configured to receive the first data message and the decision result sent by the second SDN controller through a data link.

14. A switch, It is characterized in that include: A first receiving unit, used for receiving a first data message sent by a host; A query unit, used to query whether there is a flow table matching the first data message; a sending unit, configured to, if not, send the first data message to the first SDN controller through a data link; A second receiving unit, configured to receive the first data packet and the decision result through a data link, where the decision result is obtained by the first SDN controller according to the first data packet; A forwarding unit, configured to forward the first data packet according to the decision result.

15. The switch according to claim 14, wherein, the second receiving unit is specifically configured to receive a second data packet through a data link, where the second data packet includes the first data packet and the decision result, and the decision result is carried in a control protocol field of the second data packet.

16. The switch according to claim 15, wherein, the forwarding unit is specifically configured to obtain the decision result in the second data packet; the forwarding unit is specifically configured to generate a flow table according to the decision result; the forwarding unit is specifically configured to forward the first data packet according to the flow table.

17. The switch according to any one of claims 14 to 16, wherein, the second receiving unit is specifically configured to receive the first data packet and the decision result sent by a second SDN controller through a data link, where the first data packet and the decision result are obtained by the second SDN controller from the first SDN controller.

18. An SDN controller, wherein, comprises: a receiving unit, configured to receive a first data packet sent by a switch through a data link; a processing unit, configured to obtain a decision result according to the first data packet; a sending unit, configured to send the first data packet and the decision result to the switch, for the switch to forward the first data packet according to the decision result.

19. The SDN controller according to claim 18, wherein, the sending unit is specifically configured to send a second data packet to the switch, where the second data packet includes the first data packet and the decision result, and the decision result is carried in a control protocol field of the second data packet.

20. The SDN controller according to claim 18 or 19, wherein, the sending unit is specifically configured to send the first data packet and the decision result to a second SDN controller, for the second SDN controller to save the decision result and send the first data packet and the decision result to the switch through a data link.

21. A switch, wherein, comprises: a memory and a processor; wherein, the memory is used to store a program; the processor is configured to execute the program in the memory, including executing the method according to any one of claims 1 to 5 above.

22. An SDN controller, wherein, comprises: a memory and a processor; wherein, the memory is used to store a program; the processor is configured to execute the program in the memory, including executing the method according to any one of claims 6 to 9 above.

23. A computer storage medium, wherein, The computer storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the method as claimed in any one of claims 1 to 5; or the computer executes the method as claimed in any one of claims 6 to 9.

Citation Information

Patent Citations

  • Controller, openflow switch and method and system of channel establishing

    CN103391296A

  • Method and system for controlling network topology

    CN104753703A

  • Data message forwarding control method and system

    CN105306390A