CN105745877A - Switch processing method, controller, switch, and switch processing system - Google Patents

Switch processing method, controller, switch, and switch processing system Download PDF

Info

Publication number
CN105745877A
CN105745877A CN201480024931.3A CN201480024931A CN105745877A CN 105745877 A CN105745877 A CN 105745877A CN 201480024931 A CN201480024931 A CN 201480024931A CN 105745877 A CN105745877 A CN 105745877A
Authority
CN
China
Prior art keywords
switch
flow table
flow
extended
packet
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.)
Granted
Application number
CN201480024931.3A
Other languages
Chinese (zh)
Other versions
CN105745877B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN105745877A publication Critical patent/CN105745877A/en
Application granted granted Critical
Publication of CN105745877B publication Critical patent/CN105745877B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/64Routing or path finding of packets in data switching networks using an overlay routing layer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3009Header conversion, routing tables or routing tags
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3063Pipelined operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/583Stackable routers

Abstract

Provided in the embodiments of the present invention are a switch processing method, a controller, a switch, and a switch processing system. The method provided in the embodiments of the present invention is executed by the controller and a logical Switch which comprises at least two physical Switches. The method comprises: the controller allocates a flow table of the logic Switch to each physical Switch; the controller sends mapping information in order that each physical Switch obtains the mapping information; the controller sends flow table entries in order that each physical Switch obtains its corresponding flow table entry, and processes data packets. The logical Switch executing the method provided in the embodiments of the present invention can stack new physical Switches on the basis of the physical structure of the logical Switch, be useful for maintaining the stability of the existing network topology, improve the processing ability of the logical Switch, and reduce the influence on network operation as well as cost of expansion.

Description

Switch processing method, controller, switch and switch processing system Technical Field
Embodiments of the present invention relate to communications technologies, and in particular, to a switch processing method, a controller, a switch, and a switch processing system.
Background
Software Defined Networking (SDN) is a network architecture that decouples control and forwarding, and has the features of centralized control and open programmable interface, that is, a controller at a control plane can control a switch at a forwarding plane through a network communication protocol, for example, through a proposed new network switching model, that is, an Openflow (Openflow) protocol.
In the prior art, a controller may control a behavior of a Switch (Switch) on a forwarding plane through an Openflow protocol, where the Switch specifically carries a multi-level Flow table (Flow table) of service logic, that is, the Switch processes a data packet by using a pipeline based on the Flow table. Specifically, each flow table may include a plurality of flow table entries, where the flow table entries are basic processing logic for carrying an Openflow protocol, and when receiving a data packet, the Switch matches each flow table entry one by one using a matching field in the flow table entry according to a preset priority order, and executes an execution instruction in the flow table entry after the matching is successful, where the instruction includes, for example, an operation (Action) list, modification of inter-flow table information (Metadata), and jumping to a subsequent flow table; because the data packet is usually subjected to matching processing of multiple stages of flow tables in the Switch, the input data packet is successfully matched in one flow table, then the execution instruction in the flow table entry is executed, and then the data packet is skipped to the next flow table for continuous processing.
However, the number of flow table stages supported by the pipeline of the Switch in the prior art and the size of the flow table entries that can be processed by the pipeline are limited, so when an operator needs to perform function or performance expansion on the Switch arranged in a network node, the Switch in the existing network can only be replaced due to the limitation of the hardware capability of the Switch, and the Switch with larger capacity or capable of supporting more flow table stages is replaced, thereby increasing the cost of network expansion.
Disclosure of Invention
Embodiments of the present invention provide a Switch processing method, a controller, a Switch, and a Switch processing system, so as to solve the problem that in the prior art, when an operator needs to perform function or performance expansion on a Switch disposed in a network node, only the Switch in the existing network can be replaced due to the limitation of the hardware capability of the Switch, thereby reducing the cost of network expansion.
In a first aspect, an embodiment of the present invention provides a Switch processing method, which is executed by a controller and a logical Switch, where the logical Switch includes at least two physical switches; the method comprises the following steps:
the controller allocates each flow table in a multi-stage flow table of a logical Switch to each physical Switch, wherein the multi-stage flow table is a pipeline of the logical Switch;
The controller sends mapping information to enable each physical Switch to obtain the mapping information, wherein the mapping information comprises the mapping relation between each flow table in the multi-stage flow tables and the physical Switch;
the controller sends flow entries to the logical switches, so that each physical Switch obtains a flow entry corresponding to the physical Switch, and processes the received data packet according to the flow entries, or according to the flow entries and the mapping information, where the flow entries are content information of each flow table in a flow table set allocated by the controller for each physical Switch.
In a first possible implementation manner of the first aspect, the at least two physical switches include a primary Switch and a first extended Switch, where the controller is connected to at least the primary Switch, and the first extended Switch is connected to at least the primary Switch;
the controller transmits mapping information including:
the controller at least sends mapping information to the primary Switch, so that the primary Switch receives the mapping information, and the mapping information received by the first extended Switch includes the mapping information sent by the controller and/or the primary Switch;
The controller sending a flow table entry to the logic Switch, including:
the controller sends the flow table entries of the logical switches to at least the main Switch, so that the flow table entries received by the main Switch include the flow table entry corresponding to the main Switch, or the flow table entry corresponding to each physical Switch, so that the flow table entries received by the first extended Switch include the flow table entries sent by the controller and/or the main Switch.
According to a first possible implementation manner of the first aspect, in a second possible implementation manner, the physical Switch further includes a second extended Switch, and the second extended Switch is connected to at least the first extended Switch;
the controller transmits mapping information including:
the controller at least sends mapping information to the primary Switch, so that the primary Switch receives the mapping information, and the mapping information received by the first extended Switch includes the mapping information sent by the controller and/or the primary Switch, and the mapping information received by the second extended Switch includes the mapping information sent by the controller and/or the primary Switch and/or the first extended Switch;
The controller sending a flow table entry to the logic Switch, including:
the controller sends, to at least the master Switch, flow entries of the logical Switch, so that the flow entries received by the master Switch include the flow entry corresponding to the master Switch, or the flow entry corresponding to the master Switch and the flow entry corresponding to the first extended Switch and/or the second extended Switch, so that the flow entries received by the first extended Switch include the flow entry corresponding to the first extended Switch sent by the controller and/or the master Switch, and so that the flow entries received by the second extended Switch include the flow entry corresponding to the second extended Switch sent by the controller and/or the master Switch and/or the first extended Switch.
According to the first or second possible implementation manner of the first aspect, in a third possible implementation manner, the flow table allocated by the controller for the master Switch at least includes a first-level flow table0 in the multi-level flow table of the logic Switch, so that the master Switch processes the data packet through the table0 when receiving the data packet.
According to the first aspect, or any one of the first and second possible implementation manners of the first aspect, in a fourth possible implementation manner, the sending, by the controller, a flow entry to the logic Switch includes:
the controller sends a flow table entry to the logic Switch, so that when the current physical Switch receives a data message, the data message is processed through the current flow table, the position of a next-hop flow table is determined according to the mapping information, when the determined next-hop flow table is located in the current physical Switch, the data message is hopped to the next-hop flow table for continuous processing, or when the determined next-hop flow table is located in other physical switches, protection of a pipeline environment is initiated to generate a message encapsulation packet, and the message encapsulation packet is sent to the physical Switch corresponding to the next-hop flow table.
According to the first aspect, in a fifth possible implementation manner of any one of the first and second possible implementation manners of the first aspect, the sending, by the controller, a flow entry to the logic Switch includes:
when the table entry to be sent includes a table jump instruction, the controller judges whether a next jump table is located in the current physical Switch;
When determining that the next-hop flow table is located in the current physical Switch, the controller sends a flow table entry containing the flow table jump instruction to the current physical Switch, so that the current physical Switch jumps the data packet into the next-hop flow table for processing; alternatively, the first and second electrodes may be,
when the controller determines that the next-hop flow table is located in other physical switches, the controller replaces the flow table jump instruction in the to-be-sent flow table item with a Switch forwarding instruction, and sends the flow table item including the Switch forwarding instruction to the current physical Switch, so that the current physical Switch initiates protection on a pipeline environment to generate a packet encapsulation packet, and sends the packet encapsulation packet to the physical Switch corresponding to the next-hop flow table.
According to the fourth and fifth possible implementation manners of the first aspect, in a sixth possible implementation manner, the protection of the pipeline environment is that the current physical Switch encapsulates, in the packet encapsulation packet, the relevant information for processing the data packet and the data packet at the same time, where the relevant information for processing the data packet at least includes the next-hop table number ID, and also includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
According to any one of the fourth to sixth possible implementation manners of the first aspect, in a seventh possible implementation manner, the protection of the pipeline environment is configured to enable the physical Switch corresponding to the next-hop flow table to analyze the received packet encapsulation packet to obtain analysis information, to recover the pipeline environment according to the analysis information, and to jump the data packet to the next-hop flow table for further processing, where the analysis information includes the data packet and related information for processing the data packet.
According to any one of the fourth to sixth possible implementation manners of the first aspect, in an eighth possible implementation manner, the flow entry corresponding to the extended Switch sent by the controller includes a flow entry for performing pipeline recovery; the method further comprises:
the controller sends the flow table entry for pipeline recovery to the extended Switch, so that the extended Switch adds the flow table entry to the first-level flow table0 'of the extended Switch, and when the packet encapsulation packet is received, the pipeline environment is recovered through the added flow table entry in the table 0'.
According to an eighth possible implementation manner of the first aspect, in a ninth possible implementation manner, the packet encapsulation packet includes a next-hop flow table ID, the flow table entry for pipeline recovery includes a matching part and an execution instruction, the matching part is used by the extended Switch to use the next-hop flow table ID as a matching object corresponding to the flow table entry, and the execution instruction includes a flow table recovery instruction and/or a flow table hop instruction;
the recovery of the pipeline environment is that the extended Switch matches the received packet encapsulation packet through the flow table entry in the table0 ', and when the next-hop flow table ID is matched with the flow table entry in the table 0', the flow table recovery instruction and/or the flow table jump instruction in the matched flow table entry are/is sequentially executed according to the matching result.
In a second aspect, an embodiment of the present invention provides a Switch processing method, which is performed by a controller and a logical Switch, where the logical Switch includes at least two physical switches, and the at least two physical switches include a primary Switch and an extended Switch, where the controller is connected to at least the primary Switch; the method comprises the following steps:
The master Switch receives mapping information sent by the controller, wherein the mapping information comprises mapping relations between each flow table in the multi-stage flow tables of the logic Switch and the physical Switch;
the master Switch receives a flow table entry sent by the controller, where the flow table entry received by the master Switch is allocated by the controller for the master Switch, or the controller allocates content information of each flow table in a flow table set to the master Switch and the extended Switch;
and the main Switch processes the received data message according to the flow table entry or the flow table entry and the mapping information.
In a first possible implementation manner of the second aspect, after the receiving, by the master Switch, the mapping relationship sent by the controller, the method further includes:
the primary Switch sends the mapping information to the extended Switch connected with the primary Switch;
after the master Switch receives the flow entry sent by the controller, the method further includes:
the primary Switch sends the flow table entry allocated by the controller to the extended Switch connected with the primary Switch.
In a second possible implementation manner, the extended Switch includes a first extended Switch and a second extended Switch, the main Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch;
After the primary Switch receives the mapping information sent by the controller, the method further includes:
the primary Switch sends the mapping information to the first extended Switch and/or the second extended Switch;
after the master Switch receives the flow table entry sent by the controller, the method further includes:
and the main Switch sends the flow table items allocated by the controller to the first extended Switch and/or the second extended Switch, so that the extended Switch processes the received data packets according to the flow table items corresponding to the extended Switch and the mapping information.
According to the second aspect, or any one of the first and second possible implementation manners of the second aspect, in a third possible implementation manner, the mapping information received by the master Switch includes a flow table allocated by the controller, and the flow table at least includes a first-level flow table0 in a multi-level flow table of the logical Switch; the processing, by the primary Switch, of the received data packet according to the flow table entry or according to the flow table entry and the mapping information includes:
the main Switch processes the received data packet through the table0 according to the flow table entry or according to the flow table entry and the mapping information.
According to the second aspect, or any one of the first to third possible implementation manners of the second aspect, in a fourth possible implementation manner, the processing, by the primary Switch, the received data packet according to the flow entry, or according to the flow entry and the mapping information includes:
when receiving a data message, the primary Switch processes the data message and judges the position of a next current-hopping table according to the mapping information;
when the next-hop table is located in the main Switch, the main Switch jumps the data message to the next-hop table for processing; alternatively, the first and second electrodes may be,
and when the next-hop flow table is located in the extended Switch, the main Switch initiates protection of a pipeline environment to generate a packet, and sends the packet to the extended Switch corresponding to the next-hop flow table.
According to the second aspect and any one of the first to third possible implementation manners of the second aspect, in a fifth possible implementation manner, the receiving, by the master Switch, a flow entry sent by the controller includes:
the master Switch receives a flow table item which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction, wherein the flow table jump instruction or the Switch forwarding instruction in the flow table item is determined by the controller according to whether a next jump table in the flow table item is located in the master Switch, if yes, the flow table item comprises the flow table jump instruction, and if not, the flow table item comprises the Switch forwarding instruction;
The processing, by the primary Switch, of the received data packet according to the flow table entry or according to the flow table entry and the mapping information includes:
the primary Switch receives the data message, and when the flow table item matched with the data message comprises the flow table jump instruction, the data message is jumped to the next flow jump table for processing continuously; alternatively, the first and second electrodes may be,
and the main Switch receives the data message, when the flow table item matched with the data message comprises the Switch forwarding instruction, the main Switch initiates protection on a pipeline environment to generate a message encapsulation packet, and sends the message encapsulation packet to the extended Switch corresponding to the next-hop flow table.
In a sixth possible implementation manner, according to the fourth or fifth possible implementation manner of the second aspect, the initiating, by the master Switch, protection of a pipeline environment includes:
the primary Switch encapsulates the relevant information for processing the data packet and the data packet in the packet encapsulation packet at the same time, wherein the relevant information for processing the data packet at least includes the next-hop flow table number ID, and also includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
According to any one of the fourth to sixth possible implementation manners of the second aspect, in a seventh possible implementation manner, the protection of the pipeline environment is configured to enable the extended Switch corresponding to the next-hop flow table to analyze the received packet encapsulation packet to obtain analysis information, to recover the pipeline environment according to the analysis information, and to jump the data packet to the next-hop flow table for further processing, where the analysis information includes the data packet and related information for processing the data packet.
In a third aspect, an embodiment of the present invention provides a Switch processing method, which is performed by a controller and a logical Switch, where the logical Switch includes a plurality of physical switches, the plurality of physical switches includes a main Switch and an extended Switch, and the extended Switch includes a first extended Switch and a second extended Switch, where the controller is connected to at least the main Switch, the main Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch; the method comprises the following steps:
the current extended Switch receives mapping information sent by the controller and/or the main Switch and/or other extended switches, where the mapping information includes mapping relationships between each flow table in a multi-stage flow table of a logical Switch and the physical Switch;
The current extended Switch receives a flow table entry corresponding to the current extended Switch, which is sent by the controller and/or the main Switch and/or other extended switches, where the flow table entry received by the current extended Switch is content information of each flow table in a flow table set allocated by the controller to the current extended Switch;
and the current extended Switch processes a received first packet encapsulation packet according to the flow table entry or according to the flow table entry and the mapping information, wherein the first packet encapsulation packet is generated by encapsulating the received data packet and related information for processing the data packet by a physical Switch in which a previous-hop flow table is located.
In a first possible implementation manner of the third aspect, in the mapping information received by the current extended Switch, a first-level flow table0 in a multi-level flow table of the logical Switch corresponds to the master Switch.
According to the third aspect or the first possible implementation manner of the third aspect, in a second possible implementation manner, after the current extended Switch receives a flow table entry corresponding to the current extended Switch sent by the controller and/or the master Switch and/or other extended switches, the method further includes:
The current extended Switch receives the first packet encapsulation packet;
the current extended Switch determines that the next-hop flow table number ID in the first packet encapsulation packet is located in other physical switches;
and the current extended Switch forwards the first message encapsulation packet to the physical Switch corresponding to the next-hop flow table ID according to the mapping information.
According to the third aspect or the first possible implementation manner of the third aspect, in a third possible implementation manner, after the current extended Switch receives a flow table entry corresponding to the current extended Switch, where the flow table entry is sent by the controller and/or the master Switch and/or other extended switches, the method further includes:
the current extended Switch receives the first packet encapsulation packet;
the current extended Switch determines that the next-hop flow table number ID in the first packet encapsulation packet is located in the current extended Switch;
and the current extended Switch recovers the pipeline environment of the first message encapsulation packet to acquire the data message.
According to a third possible implementation manner of the third aspect, in a fourth possible implementation manner, the restoring, by the current extended Switch, the pipeline environment of the first packet encapsulation packet includes:
The current extended Switch analyzes the received first packet encapsulation packet to obtain analysis information, where the analysis information includes the data packet and related information for processing the data packet, where the related information for processing the data packet at least includes the next-hop flow table ID, and also includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message and information (Metadata) between flow tables;
and the current extended Switch recovers the pipeline environment according to the analysis information and jumps the data message to a next jump table for processing continuously.
According to a third possible implementation manner of the third aspect, in a fifth possible implementation manner, the flow entry received by the current extended Switch includes a flow entry sent by the controller for performing pipeline recovery; the restoring of the pipeline environment of the first packet encapsulated packet by the current extended Switch includes:
the current extended Switch adds the flow table entry for pipeline recovery to the first-level flow table 0' of the current extended Switch;
And the current extended Switch recovers the pipeline environment for the received first packet encapsulation packet through the flow entry added in the table 0'.
According to a fifth possible implementation manner of the third aspect, in a sixth possible implementation manner, the first packet encapsulation packet includes a next-flow-skipping table ID, and the flow table entry for pipeline recovery includes a matching part and an execution instruction, where the execution instruction includes a flow table recovery instruction and/or a flow table skipping instruction; the recovering of the pipeline environment of the received first packet encapsulation packet by the current extended Switch through the flow entry added in the table 0' includes:
the current extended Switch matches the first packet encapsulation packet through the flow table entry in the table 0';
and when the current extended Switch successfully matches the flow table entries in the table 0', sequentially executing a flow table recovery instruction and/or a flow table jump instruction in the matched flow table entries according to a matching result.
According to any one of the third to sixth possible implementation manners of the third aspect, in a seventh possible implementation manner, after the current extended Switch recovers a pipeline environment for the first packet encapsulation packet to obtain the data packet, the method further includes:
When the current extended Switch acquires the data message, processing the data message through the current flow table, and judging the position of a next-hop flow table according to the mapping information;
when the next-hop table is located in the current extended Switch, the current extended Switch jumps the data packet to the next-hop table for processing; alternatively, the first and second electrodes may be,
and when the next-hop flow table is located in other extended switches, the current extended Switch initiates protection of a pipeline environment to generate a second packet, and the second packet is sent to the extended Switch corresponding to the next-hop flow table.
According to any one of the third to sixth possible implementation manners of the third aspect, in an eighth possible implementation manner, the method further includes:
the current extended Switch receives a flow table entry which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction, wherein the flow table jump instruction or the Switch forwarding instruction in the flow table entry is determined by the controller according to whether the next jump table in the flow table entry is located in the current extended Switch, if yes, the flow table entry comprises the flow table jump instruction, and if not, the flow table entry comprises the Switch forwarding instruction;
After the current extended Switch restores the pipeline environment of the first packet encapsulation packet, the method further includes:
the current extended Switch acquires a data message in the first message encapsulation packet, and when a flow table item matched with the data message comprises the flow table jump instruction, the data message is jumped to the next flow jump table for processing continuously; alternatively, the first and second electrodes may be,
and the current extended Switch acquires the data message in the first message encapsulation packet, initiates protection on a pipeline environment to generate a second message encapsulation packet when the flow table item matched with the data message comprises the Switch forwarding instruction, and sends the second message encapsulation packet to the extended Switch corresponding to the next-hop flow table.
According to a seventh possible implementation manner or an eighth possible implementation manner of the third aspect, in a ninth possible implementation manner, the initiating, by the current extended Switch, protection of a pipeline environment includes:
the current extended Switch encapsulates the relevant information for processing the data packet and the data packet in the second packet encapsulation packet at the same time, wherein the relevant information for processing the data packet at least includes a next-hop flow table ID, and also includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
In a fourth aspect, an embodiment of the present invention provides a Switch processing apparatus, which is disposed in a controller connected to a logical Switch, where the logical Switch includes at least two physical switches; the device comprises:
the allocation module is used for allocating each flow table in a multi-stage flow table of the logic Switch to each physical Switch, and the multi-stage flow table is a pipeline of the logic Switch;
a sending module, configured to send mapping information, so that each physical Switch obtains the mapping information, where the mapping information includes a mapping relationship between each flow table in the multi-stage flow table and the physical Switch;
the sending module is further configured to send a flow entry to the logical Switch, so that each physical Switch obtains a flow entry corresponding to the physical Switch, and process the received data packet according to the flow entry or according to the flow entry and the mapping information, where the flow entry is content information of each flow table in a flow table set allocated by the controller for each physical Switch.
In a first possible implementation manner of the fourth aspect, the at least two physical switches include a primary Switch and a first extended Switch, where the controller is connected to at least the primary Switch, and the first extended Switch is connected to at least the primary Switch;
The sending module is configured to send mapping information, and specifically includes: sending mapping information to at least the primary Switch, so that the primary Switch receives the mapping information, and the mapping information received by the first extended Switch includes the mapping information sent by the controller and/or the primary Switch;
the sending module is further configured to send a flow entry to the logic Switch, and specifically includes: sending, to at least the master Switch, the flow table entry of the logical Switch, so that the flow table entry received by the master Switch includes the flow table entry corresponding to the master Switch, or the flow table entry corresponding to each of the physical switches, so that the flow table entry received by the first extended Switch includes the flow table entry sent by the controller and/or the master Switch.
In a second possible implementation manner, the physical Switch further includes a second extended Switch, and the second extended Switch is connected to at least the first extended Switch;
the sending module is configured to send mapping information, and specifically includes: sending mapping information to at least the primary Switch, so that the primary Switch receives the mapping information, so that the mapping information received by the first extended Switch includes the mapping information sent by the controller and/or the primary Switch, and the mapping information received by the second extended Switch includes the mapping information sent by the controller and/or the primary Switch and/or the first extended Switch;
The sending module is further configured to send a flow entry to the logic Switch, and specifically includes: sending, at least to the master Switch, flow entries of the logical Switch to cause the flow entries received by the master Switch to include the flow entry corresponding to the master Switch, or the flow entry corresponding to the master Switch and the flow entries corresponding to the first extended Switch and/or the second extended Switch, so that the flow entries received by the first extended Switch include the flow entry corresponding to the first extended Switch sent by the controller and/or the master Switch, and so that the flow entries received by the second extended Switch include the flow entry corresponding to the second extended Switch sent by the controller and/or the master Switch and/or the first extended Switch.
According to the first or second possible implementation manner of the fourth aspect, in a third possible implementation manner, the flow table allocated by the allocation module for the master Switch at least includes a first-level flow table0 in the multi-level flow table of the logic Switch, so that the master Switch processes the data packet through the table0 when receiving the data packet.
According to the fourth aspect, or any one of the first and second possible implementation manners of the fourth aspect, in a fourth possible implementation manner, the sending module is further configured to send a flow entry to the logic Switch, and specifically includes: and sending a flow table entry to the logic Switch, so that when the current physical Switch receives a data message, the data message is processed through the current flow table, the position of a next-hop flow table is determined according to mapping information sent by the sending module, when the determined next-hop flow table is located in the current physical Switch, the data message is hopped to the next-hop flow table for continuous processing, or when the determined next-hop flow table is located in other physical switches, protection of a pipeline environment is initiated to generate a message encapsulation packet, and the message encapsulation packet is sent to the physical Switch corresponding to the next-hop flow table.
According to a fourth aspect, any one of the first and second possible implementation manners of the fourth aspect, in a fifth possible implementation manner, the sending module includes: the judging unit is used for judging whether a next-hop flow table is positioned in the current physical Switch or not when the flow table item to be sent comprises a flow table jump instruction;
An execution unit, configured to send, when the determining unit determines that the next-hop flow table is located in the current physical Switch, a flow table entry including the flow table hop instruction to the current physical Switch, so that the current physical Switch hops the data packet to the next-hop flow table for further processing; alternatively, the first and second electrodes may be,
the execution unit is configured to, when the determining unit determines that the next-hop flow table is located in another physical Switch, replace the flow table jump instruction in the to-be-sent flow table entry with a Switch forwarding instruction, and send the flow table entry including the Switch forwarding instruction to the current physical Switch, so that the current physical Switch initiates protection of a pipeline environment to generate a packet encapsulation packet, and send the packet encapsulation packet to the physical Switch corresponding to the next-hop flow table.
According to the fourth and fifth possible implementation manners of the fourth aspect, in a sixth possible implementation manner, the protection of the pipeline environment is that the current physical Switch encapsulates, in the packet encapsulation packet, the relevant information for processing the data packet and the data packet at the same time, where the relevant information for processing the data packet at least includes the next-hop table number ID, and further includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
According to any one of the fourth to sixth possible implementation manners of the fourth aspect, in a seventh possible implementation manner, the protection of the pipeline environment is configured to enable the physical Switch corresponding to the next-hop flow table to analyze the received packet encapsulation packet to obtain analysis information, to recover the pipeline environment according to the analysis information, and to jump the data packet to the next-hop flow table for further processing, where the analysis information includes the data packet and related information for processing the data packet.
According to any one of the fourth to sixth possible implementation manners of the fourth aspect, in an eighth possible implementation manner, the flow table entry corresponding to the extended Switch sent by the sending module includes a flow table entry used for performing pipeline recovery; the sending module is further configured to send the flow entry for pipeline recovery to the extended Switch, so that the extended Switch adds the flow entry to a first-stage flow table0 'of the extended Switch, and when the packet encapsulation packet is received, the pipeline environment is recovered through the flow entry added in the table 0'.
According to an eighth possible implementation manner of the fourth aspect, in a ninth possible implementation manner, the packet encapsulation packet includes a next-hop table ID, the flow table entry sent by the sending module for performing pipeline recovery includes a matching part and an execution instruction, the matching part is used by the extended Switch to use the next-hop table ID as a matching object corresponding to the flow table entry, and the execution instruction includes a flow table recovery instruction and/or a flow table jump instruction;
the recovery of the pipeline environment is that the extended Switch matches the received packet encapsulation packet through the flow table entry in the table0 ', and when the next-hop flow table ID is matched with the flow table entry in the table 0', the flow table recovery instruction and/or the flow table jump instruction in the matched flow table entry are/is sequentially executed according to the matching result.
In a fifth aspect, an embodiment of the present invention provides a Switch processing apparatus, which is disposed in a physical Switch of a logical Switch connected to a controller, where the logical Switch includes at least two physical switches, the at least two physical switches include a primary Switch and an extended Switch, the controller is connected to at least the primary Switch, and the Switch processing apparatus is specifically disposed in the primary Switch; the device comprises:
A receiving module, configured to receive mapping information sent by the controller, where the mapping information includes mapping relationships between each flow table in a multi-stage flow table of a logical Switch and the physical Switch;
the receiving module is further configured to receive a flow entry sent by the controller, where the flow entry received by the receiving module is content information of each flow table in a flow table set allocated by the controller for the primary Switch, or allocated by the controller for the primary Switch and the extended Switch;
and the processing module is used for processing the data message received by the primary Switch according to the flow table entry received by the receiving module or according to the flow table entry and the mapping information received by the receiving module.
In a first possible implementation manner of the fifth aspect, the method further includes: a sending module, configured to send the mapping information to an extended Switch connected to the receiving module after the receiving module receives the mapping relationship sent by the controller;
the sending module is further configured to send the flow entry allocated by the controller to an extended Switch connected to the receiving module after the receiving module receives the flow entry sent by the controller.
In a second possible implementation manner, in the logic Switch to which the primary Switch belongs, the extended Switch includes a first extended Switch and a second extended Switch, the primary Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch;
The sending module is configured to send the mapping information to an extended Switch connected to the sending module, and specifically includes: sending the mapping information to the first extended Switch and/or the second extended Switch;
the sending module is further configured to send the flow entry allocated by the controller to an extended Switch connected to the sending module, and specifically includes: and sending the flow table entry allocated by the controller to the first extended Switch and/or the second extended Switch, so that the extended Switch processes the received data packet according to the flow table entry corresponding to the extended Switch and the mapping information.
According to the fifth aspect and any one of the first and second possible implementation manners of the fifth aspect, in a third possible implementation manner, the mapping information received by the receiving module includes a flow table allocated by the controller for a master Switch, and the flow table at least includes a first-level flow table0 in a multi-level flow table of the logical Switch; the processing module is specifically configured to process the received data packet through the table0 according to the flow table entry received by the receiving module, or according to the flow table entry and the mapping information received by the receiving module.
According to the fifth aspect and any one of the first to third possible implementation manners of the fifth aspect, in a fourth possible implementation manner, the processing module includes: the processing unit is used for processing the data message when the data message is received;
the judging unit is used for judging the position of the next skip flow table according to the mapping information received by the receiving module;
the processing unit is further configured to jump the data packet to the next-hop flow table for processing continuously when the determining unit determines that the next-hop flow table is located in the master Switch; alternatively, the first and second electrodes may be,
the processing unit is further configured to initiate protection of a pipeline environment to generate a packet encapsulation packet and send the packet encapsulation packet to the extended Switch corresponding to the next-hop flow table when the determining unit determines that the next-hop flow table is located in the extended Switch.
According to the fifth aspect and any one of the first to third possible implementation manners of the fifth aspect, in a fifth possible implementation manner, the receiving module is further configured to receive a flow entry sent by the controller, and specifically includes: receiving a flow table item which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction, wherein the flow table jump instruction or the Switch forwarding instruction in the flow table item is determined by the controller according to whether a next jump table in the flow table item is located in the main Switch, if so, the flow table item comprises the flow table jump instruction, and if not, the flow table item comprises the Switch forwarding instruction;
The processing module is specifically configured to jump the data packet to the next jump table for processing when the flow table entry matched with the received data packet includes the flow table jump instruction; alternatively, the first and second electrodes may be,
the processing module is specifically configured to initiate protection of a pipeline environment to generate a packet encapsulation packet when the flow entry matched with the received data packet includes the Switch forwarding instruction, and send the packet encapsulation packet to the extended Switch corresponding to the next-hop flow table.
According to a fourth possible implementation manner or a fifth possible implementation manner of the fifth aspect, in a sixth possible implementation manner, the processing module initiates protection of a pipeline environment, including: and encapsulating the related information for processing the data message and the data message in the message encapsulation packet at the same time, wherein the related information for processing the data message at least comprises the next-hop flow table number ID and any amount of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
According to any one of the fourth to sixth possible implementation manners of the fifth aspect, in a seventh possible implementation manner, the protection of the pipeline environment is configured to enable the extended Switch corresponding to the next-hop flow table to analyze the received packet encapsulation packet to obtain analysis information, to recover the pipeline environment according to the analysis information, and to jump the data packet to the next-hop flow table for further processing, where the analysis information includes the data packet and related information for processing the data packet.
In a sixth aspect, an embodiment of the present invention provides a Switch processing apparatus, which is disposed in a physical Switch of a logical Switch connected to a controller, where the logical Switch includes a plurality of physical switches, the plurality of physical switches includes a primary Switch and an extended Switch, the extended Switch includes a first extended Switch and a second extended Switch, the controller is connected to at least the primary Switch, the primary Switch is connected to at least the first extended Switch, the second extended Switch is connected to at least the first extended Switch, and the Switch processing apparatus is specifically disposed in the extended Switch; the device comprises:
A receiving module, configured to receive mapping information sent by the controller and/or the master Switch and/or other extended switches, where the mapping information includes mapping relationships between flow tables in multiple stages of flow tables of a logical Switch and the physical Switch, respectively;
the receiving module is further configured to receive a flow table entry corresponding to a current extended Switch sent by the controller and/or the master Switch and/or other extended switches, where the flow table entry received by the receiving module is content information of each flow table in a flow table set allocated by the controller for the current extended Switch;
and the processing module is configured to process a first packet received by the current extended Switch according to the flow table entry received by the receiving module, or according to the flow table entry and the mapping information received by the receiving module, where the first packet is generated by encapsulating, by the physical Switch in which the previous-hop flow table is located, the received data packet and related information for processing the data packet.
In a first possible implementation manner of the sixth aspect, in the mapping information received by the receiving module, a first-level flow table0 in a multi-level flow table of the logical Switch corresponds to the master Switch.
According to the sixth aspect or the first possible implementation manner of the sixth aspect, in a second possible implementation manner, the receiving module is further configured to receive the first packet encapsulation packet after receiving the flow table entry corresponding to the current extended Switch;
the processing module is specifically configured to, when it is determined that the next-hop flow table number ID in the first packet received by the receiving module is located in another physical Switch, forward the first packet received by the receiving module to the physical Switch corresponding to the next-hop flow table ID according to the mapping information received by the receiving module.
According to the sixth aspect or the first possible implementation manner of the sixth aspect, in a third possible implementation manner, the receiving module is further configured to receive the first packet encapsulation packet after receiving the flow table entry corresponding to the current extended Switch;
the processing module is specifically configured to, when it is determined that the next-hop-flow table number ID in the first packet received by the receiving module is located in the current extended Switch, perform pipeline environment restoration on the first packet received by the receiving module to obtain the data packet.
According to a third possible implementation manner of the sixth aspect, in a fourth possible implementation manner, the processing module includes: the analysis unit is configured to analyze the first packet encapsulation packet received by the receiving module to obtain analysis information, where the analysis information includes the data packet and related information for processing the data packet, where the related information for processing the data packet at least includes the next-hop flow table ID, and further includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message and information (Metadata) between flow tables;
and the processing unit is used for recovering the pipeline environment according to the analysis information obtained by the analysis unit and jumping the data message to the next jump flow table for processing continuously.
According to a third possible implementation manner of the sixth aspect, in a fifth possible implementation manner, the flow entry received by the receiving module includes a flow entry sent by the controller for performing pipeline recovery; the processing module comprises: an adding unit, configured to add the flow table entry for pipeline recovery to the first-level flow table 0' of the current extended Switch; and the processing unit recovers the pipeline environment for the first packet encapsulation packet received by the receiving module through the flow entry added in the table 0'.
According to a fifth possible implementation manner of the sixth aspect, in a sixth possible implementation manner, the first packet encapsulation packet received by the receiving module includes a next-hop flow table ID, and the flow table entry received by the receiving module for pipeline recovery includes a matching part and an execution instruction, where the execution instruction includes a flow table recovery instruction and/or a flow table hop instruction; the processing unit is specifically configured to match the first packet encapsulation packet received by the receiving module through the flow table entry in the table 0'; and when the flow table entries in the table 0' are successfully matched, sequentially executing a flow table recovery instruction and/or a flow table jump instruction in the matched flow table entries according to a matching result.
According to any one of the third to sixth possible implementation manners of the sixth aspect, in a seventh possible implementation manner, the processing module is further configured to, after a pipeline environment of the first packet encapsulation packet received by the receiving module is recovered, process the data packet through the current flow table when the data packet is obtained; the apparatus further comprises: the judging module is used for judging the position of the next skip flow table according to the mapping information;
The processing module is further configured to jump the data packet to the next-hop flow table for further processing when the determining module determines that the next-hop flow table is located in the current extended Switch; alternatively, the first and second electrodes may be,
the processing module is further configured to initiate protection of a pipeline environment to generate a second packet and send the second packet to the extended Switch corresponding to the next-hop table when the determining module determines that the next-hop table is located in another extended Switch.
According to any one of the third to sixth possible implementation manners of the sixth aspect, in an eighth possible implementation manner, the receiving module is further configured to receive a flow table entry that includes a flow table jump instruction or a Switch forwarding instruction and is sent by the controller, where the flow table jump instruction or the Switch forwarding instruction in the flow table entry is determined by the controller according to whether the next-jump flow table in the flow table entry is located in the current extended Switch, if yes, the flow table entry includes the flow table jump instruction, and if not, the flow table entry includes the Switch forwarding instruction;
the processing module is further configured to obtain a data packet in the first packet encapsulation packet after performing pipeline environment recovery on the first packet encapsulation packet received by the receiving module, and jump the data packet to the next-jump flow table for processing when a flow table entry matched with the data packet includes the flow table jump instruction; or, when a data packet in the first packet encapsulation packet is acquired and a flow table entry matched with the data packet includes the Switch forwarding instruction, protection of a pipeline environment is initiated to generate a second packet encapsulation packet, and the second packet encapsulation packet is sent to an extended Switch corresponding to the next-hop flow table.
According to a seventh possible implementation manner or an eighth possible implementation manner of the sixth aspect, in a ninth possible implementation manner, the processing module is configured to initiate protection of a pipeline environment, and specifically includes: and encapsulating the related information for processing the data message and the data message in the second message encapsulation packet at the same time, wherein the related information for processing the data message at least comprises a next-hop flow table ID and any amount of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
In a seventh aspect, an embodiment of the present invention provides a controller, where the controller is connected to a logical Switch, where the logical Switch includes at least two physical switches; the controller includes:
a processor, configured to allocate each flow table in a multi-stage flow table of a logical Switch to each physical Switch, where the multi-stage flow table is a pipeline of the logical Switch;
a transmitter, configured to transmit mapping information so that each physical Switch obtains the mapping information, where the mapping information includes a mapping relationship between each flow table in the multi-stage flow table and the physical Switch;
The sender is further configured to send a flow entry to the logical Switch, so that each physical Switch obtains a flow entry corresponding to the physical Switch, and process the received data packet according to the flow entry or according to the flow entry and the mapping information, where the flow entry is content information of each flow table in a flow table set allocated by the controller for each physical Switch.
In a first possible implementation manner of the seventh aspect, the at least two physical switches include a primary Switch and a first extended Switch, where the controller is connected to at least the primary Switch, and the first extended Switch is connected to at least the primary Switch;
the transmitter is configured to transmit mapping information, which specifically includes: sending mapping information to at least the primary Switch, so that the primary Switch receives the mapping information, and the mapping information received by the first extended Switch includes the mapping information sent by the controller and/or the primary Switch;
the sender is further configured to send a flow entry to the logic Switch, and specifically includes: sending, to at least the master Switch, the flow table entry of the logical Switch, so that the flow table entry received by the master Switch includes the flow table entry corresponding to the master Switch, or the flow table entry corresponding to each of the physical switches, so that the flow table entry received by the first extended Switch includes the flow table entry sent by the controller and/or the master Switch.
According to a first possible implementation manner of the seventh aspect, in a second possible implementation manner, the physical Switch further includes a second extended Switch, and the second extended Switch is connected to at least the first extended Switch;
the transmitter is configured to transmit mapping information, which specifically includes: sending mapping information to at least the primary Switch, so that the primary Switch receives the mapping information, so that the mapping information received by the first extended Switch includes the mapping information sent by the controller and/or the primary Switch, and the mapping information received by the second extended Switch includes the mapping information sent by the controller and/or the primary Switch and/or the first extended Switch;
the sender is further configured to send a flow entry to the logic Switch, and specifically includes: sending, at least to the master Switch, flow entries of the logical Switch to cause the flow entries received by the master Switch to include the flow entry corresponding to the master Switch, or the flow entry corresponding to the master Switch and the flow entries corresponding to the first extended Switch and/or the second extended Switch, so that the flow entries received by the first extended Switch include the flow entry corresponding to the first extended Switch sent by the controller and/or the master Switch, and so that the flow entries received by the second extended Switch include the flow entry corresponding to the second extended Switch sent by the controller and/or the master Switch and/or the first extended Switch.
According to the first or second possible implementation manner of the seventh aspect, in a third possible implementation manner, the flow table allocated by the processor to the master Switch at least includes a first-level flow table0 in the multi-level flow table of the logic Switch, so that the master Switch processes the data packet through the table0 when receiving the data packet.
According to the seventh aspect, or any one of the first and second possible implementation manners of the seventh aspect, in a fourth possible implementation manner, the sending unit is further configured to send a flow entry to the logic Switch, and specifically includes: and sending a flow table entry to the logic Switch, so that when the current physical Switch receives a data message, the data message is processed through the current flow table, whether a next-hop flow table is located in the current physical Switch is judged according to mapping information sent by the sender, if so, the data message is skipped to the next-hop flow table for continuous processing, and if not, protection of a pipeline environment is initiated to generate a message encapsulation packet, and the message encapsulation packet is sent to the physical Switch corresponding to the next-hop flow table.
According to a seventh aspect, any one of the first and second possible implementation manners of the seventh aspect, in a fifth possible implementation manner, the transmitter is further configured to send a flow entry to the logic Switch, and specifically includes: when the table entry to be sent includes a table jump instruction, judging whether a next jump table is located in the current physical Switch; if so, sending a flow table item containing the flow table jump instruction to the current physical Switch, so that the current physical Switch jumps the data message to the next jump flow table for processing; if not, replacing the flow table jump instruction in the flow table item to be sent with a Switch forwarding instruction, and sending the flow table item containing the Switch forwarding instruction to the current physical Switch, so that the current physical Switch initiates protection of a pipeline environment to generate a message encapsulation packet, and sending the message encapsulation packet to a physical Switch corresponding to the next-hop flow table.
According to the fourth and fifth possible implementation manners of the seventh aspect, in a sixth possible implementation manner, the protection of the pipeline environment is that the current physical Switch encapsulates, in the packet encapsulation packet, the relevant information for processing the data packet and the data packet at the same time, where the relevant information for processing the data packet at least includes the next-hop table number ID, and also includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
According to any one of the fourth to sixth possible implementation manners of the seventh aspect, in a seventh possible implementation manner, the protection of the pipeline environment is configured to enable the physical Switch corresponding to the next-hop flow table to analyze the received packet encapsulation packet to obtain analysis information, to recover the pipeline environment according to the analysis information, and to jump the data packet to the next-hop flow table for further processing, where the analysis information includes the data packet and related information for processing the data packet.
According to any one of the fourth to sixth possible implementation manners of the seventh aspect, in an eighth possible implementation manner, the flow entry corresponding to the extended Switch sent by the sender includes a flow entry for performing pipeline recovery; the sender is further configured to send the flow entry for pipeline recovery to the extended Switch, so that the extended Switch adds the flow entry to a first-level flow table0 'of the extended Switch, and when the packet encapsulation packet is received, the pipeline environment is recovered through the flow entry added in the table 0'.
According to an eighth possible implementation manner of the seventh aspect, in a ninth possible implementation manner, the packet encapsulation packet includes a next-hop flow table ID, a flow table entry sent by the sender for performing pipeline recovery includes a matching part and an execution instruction, the matching part is used by the extended Switch to use the next-hop flow table ID as a matching object corresponding to the flow table entry, and the execution instruction includes a flow table recovery instruction and/or a flow table jump instruction;
the recovery of the pipeline environment is that the extended Switch matches the received packet encapsulation packet through the flow table entry in the table0 ', and when the next-hop flow table ID is matched with the flow table entry in the table 0', the flow table recovery instruction and/or the flow table jump instruction in the matched flow table entry are/is sequentially executed according to the matching result.
In an eighth aspect, an embodiment of the present invention provides a master Switch, where the master Switch is a physical Switch in a logical Switch connected to a controller, where the logical Switch includes at least two physical switches, the at least two physical switches include the master Switch and an extended Switch, and the controller is connected to at least the master Switch; the master switch includes:
The receiver is used for receiving mapping information sent by the controller, wherein the mapping information comprises the mapping relation between each flow table in the multi-stage flow tables of the logical Switch and the physical Switch;
the receiver is further configured to receive a flow entry sent by the controller, where the flow entry received by the receiver is allocated by the controller for the primary Switch, or content information of each flow table in a flow table set allocated by the controller for the primary Switch and the extended Switch;
and the processor is configured to process the data packet received by the primary Switch according to the flow table entry received by the receiver, or according to the flow table entry and the mapping information received by the receiver.
In a first possible implementation manner of the eighth aspect, the method further includes: the transmitter is further used for transmitting the mapping information to the extended Switch connected with the receiver after the receiver receives the mapping relation transmitted by the controller;
the sender is further configured to send the flow entry allocated by the controller to an extended Switch connected to the receiver after the receiver receives the flow entry sent by the controller.
In a second possible implementation manner, in the logic Switch to which the primary Switch belongs, the extended Switch includes a first extended Switch and a second extended Switch, the primary Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch;
The sender is configured to send the mapping information to an extended Switch connected to the sender, and specifically includes: sending the mapping information to the first extended Switch and/or the second extended Switch;
the sender is further configured to send the flow table entry allocated by the controller to an extended Switch connected to the sender, and specifically includes: and sending the flow table entry allocated by the controller to the first extended Switch and/or the second extended Switch, so that the extended Switch processes the received data packet according to the flow table entry corresponding to the extended Switch and the mapping information.
According to the eighth aspect and any one of the first and second possible implementation manners of the eighth aspect, in a third possible implementation manner, the mapping information received by the receiver includes a flow table allocated by the controller for a master Switch, and the flow table at least includes a first-level flow table0 in a multi-level flow table of the logical Switch; the processor is specifically configured to process the received data packet through the table0 according to the stream table entry received by the receiver, or according to the stream table entry and the mapping information received by the receiver.
According to the eighth aspect or any one of the first to third possible implementation manners of the eighth aspect, in a fourth possible implementation manner, the processor includes: the method specifically comprises the steps of processing a data message when the data message is received; and judging whether a next hop flow table is located in the main Switch according to the mapping information received by the receiver, if so, jumping the data message to the next hop flow table for continuous processing, and if not, initiating protection of a pipeline environment to generate a message encapsulation packet and sending the message encapsulation packet to an extended Switch corresponding to the next hop flow table.
According to the eighth aspect and any one of the first to third possible implementation manners of the eighth aspect, in a fifth possible implementation manner, the receiver is further configured to receive a flow entry sent by the controller, and specifically includes: receiving a flow table item which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction, wherein the flow table jump instruction or the Switch forwarding instruction in the flow table item is determined by the controller according to whether a next jump table in the flow table item is located in the main Switch, if so, the flow table item comprises the flow table jump instruction, and if not, the flow table item comprises the Switch forwarding instruction;
the processor is specifically configured to jump the data packet to the next jump table for processing when the flow table entry matched with the received data packet includes the flow table jump instruction; alternatively, the first and second electrodes may be,
the processor is specifically configured to, when a flow entry matched with the received data packet includes the Switch forwarding instruction, initiate protection of a pipeline environment to generate a packet encapsulation packet, and send the packet encapsulation packet to the extended Switch corresponding to the next-hop flow table.
In a sixth possible implementation manner, according to the fourth or fifth possible implementation manner of the eighth aspect, the processor initiates protection of a pipeline environment, including: and encapsulating the related information for processing the data message and the data message in the message encapsulation packet at the same time, wherein the related information for processing the data message at least comprises the next-hop flow table number ID and any amount of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
According to any one of the fourth to sixth possible implementation manners of the eighth aspect, in a seventh possible implementation manner, the protection of the pipeline environment is configured to enable the extended Switch corresponding to the next-hop flow table to analyze the received packet encapsulation packet to obtain analysis information, to recover the pipeline environment according to the analysis information, and to jump the data packet to the next-hop flow table for further processing, where the analysis information includes the data packet and related information for processing the data packet.
In a ninth aspect, an embodiment of the present invention provides an extended Switch, where the extended Switch is a physical Switch in a logical Switch connected to a controller, where the logical Switch includes a plurality of physical switches, the plurality of physical switches includes a main Switch and the extended Switch, the extended Switch includes a first extended Switch and a second extended Switch, the controller is connected to at least the main Switch, the main Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch; the extension switch includes:
a receiver, configured to receive mapping information sent by the controller and/or the master Switch and/or other extended switches, where the mapping information includes mapping relationships between flow tables in multiple stages of flow tables of a logical Switch and the physical Switch, respectively;
the receiver is further configured to receive a flow table entry corresponding to the current extended Switch, where the flow table entry is sent by the controller and/or the master Switch and/or another extended Switch, and the flow table entry received by the receiver is content information of each flow table in a flow table set allocated by the controller for the current extended Switch;
And the processor is configured to process a first packet encapsulation packet received by the current extended Switch according to the flow table entry received by the receiver, or according to the flow table entry and mapping information received by the receiver, where the first packet encapsulation packet is generated by encapsulating, by a physical Switch in which a previous-hop flow table is located, a data packet received by the physical Switch and related information for processing the data packet.
In a first possible implementation manner of the ninth aspect, in the mapping information received by the receiver, a first-level flow table0 in a multi-level flow table of the logical Switch corresponds to the master Switch.
According to the ninth aspect or the first possible implementation manner of the ninth aspect, in a second possible implementation manner, the receiver is further configured to receive the first packet encapsulation packet after receiving the flow table entry corresponding to the current extended Switch;
the processor is specifically configured to, when it is determined that a next-hop flow table number ID in a first packet received by the receiver is located in another physical Switch, forward the first packet received by the receiver to a physical Switch corresponding to the next-hop flow table ID according to mapping information received by the receiver.
In a third possible implementation manner, according to the ninth aspect or the first possible implementation manner of the ninth aspect, the receiver is further configured to receive the first packet encapsulation packet after receiving the flow entry corresponding to the current extended Switch;
the processor is specifically configured to, when it is determined that the next-hop-flow table number ID in the first packet received by the receiver is located in the current extended Switch, perform pipeline environment restoration on the first packet received by the receiver to obtain the data packet.
According to a third possible implementation manner of the ninth aspect, in a fourth possible implementation manner, the processor is specifically configured to analyze a first packet encapsulation packet received by the receiver to obtain analysis information, where the analysis information includes the data packet and related information for processing the data packet, where the related information for processing the data packet at least includes the next hop table ID, and further includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message and information (Metadata) between flow tables; and recovering the pipeline environment according to the analysis information, and jumping the data message to a next-hop flow table for continuous processing.
According to a third possible implementation manner of the ninth aspect, in a fifth possible implementation manner, the flow entry received by the receiver includes a flow entry sent by the controller for pipeline recovery; the processor is specifically configured to add the flow table entry for pipeline recovery to the first-stage flow table 0' of the current extended Switch; and recovering the pipeline environment for the first packet encapsulation packet received by the receiver through the flow entry added in the table 0'.
According to a fifth possible implementation manner of the ninth aspect, in a sixth possible implementation manner, the first packet encapsulation packet received by the receiver includes a next-hop flow table ID, and the flow table entry received by the receiver for pipeline recovery includes a matching part and an execution instruction, where the execution instruction includes a flow table recovery instruction and/or a flow table hop instruction;
the processor is configured to recover the pipeline environment for the first packet encapsulation packet received by the receiver through the flow entry added in the table 0', and specifically includes: matching the first packet encapsulation packet received by the receiver through the flow table entry in the table 0'; and when the flow table entries in the table 0' are successfully matched, sequentially executing a flow table recovery instruction and/or a flow table jump instruction in the matched flow table entries according to a matching result.
According to any one of the third to sixth possible implementation manners of the ninth aspect, in a seventh possible implementation manner, the processor is further configured to, after a pipeline environment is recovered for a first packet encapsulation packet received by the receiver, process the data packet through the current flow table when the data packet is obtained;
the processor is further configured to determine whether a next-hop flow table is located in the current extended Switch according to the mapping information; if so, jumping the data message to the next skip flow table for continuous processing; if not, the protection of the pipeline environment is initiated to generate a second message encapsulation packet, and the second message encapsulation packet is sent to the extended Switch corresponding to the next-hop flow table.
According to any one of the third to sixth possible implementation manners of the ninth aspect, in an eighth possible implementation manner, the receiver is further configured to receive a flow table entry that includes a flow table jump instruction or a Switch forwarding instruction and is sent by the controller, where the flow table jump instruction or the Switch forwarding instruction in the flow table entry is determined by the controller according to whether the next-hop flow table in the flow table entry is located in the current extended Switch, if yes, the flow table entry includes the flow table jump instruction, and if not, the flow table entry includes the Switch forwarding instruction;
The processor is further configured to obtain a data packet in a first packet encapsulation packet after a pipeline environment of the first packet encapsulation packet received by the receiver is recovered, and jump the data packet to the next-jump flow table for processing when a flow table entry matched with the data packet includes the flow table jump instruction; or, when a data packet in the first packet encapsulation packet is acquired and a flow table entry matched with the data packet includes the Switch forwarding instruction, protection of a pipeline environment is initiated to generate a second packet encapsulation packet, and the second packet encapsulation packet is sent to an extended Switch corresponding to the next-hop flow table.
According to a seventh possible implementation manner or an eighth possible implementation manner of the ninth aspect, in a ninth possible implementation manner, the processor is configured to initiate protection of a pipeline environment, and specifically includes: and encapsulating the related information for processing the data message and the data message in the second message encapsulation packet at the same time, wherein the related information for processing the data message at least comprises a next-hop flow table ID and any amount of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
In a tenth aspect, an embodiment of the present invention provides a switch processing system, including: a controller and a logical Switch, the logical Switch including at least two physical switches, the system comprising:
the controller is configured to allocate each flow table in a multi-stage flow table of a logical Switch to each physical Switch, where the multi-stage flow table is a pipeline of the logical Switch;
the controller is further configured to send mapping information, where the mapping information includes mapping relationships between each flow table in the multi-stage flow tables of the logical Switch and the physical Switch;
each physical Switch is used for receiving the mapping information;
the controller is further configured to send a flow entry to the logic Switch;
each physical Switch is further configured to receive the flow table entry, where the flow table entry is content information of each flow table in a flow table set allocated by the controller for each physical Switch;
each physical Switch is further configured to process the received data packet according to the flow entry, or according to the flow entry and the mapping information.
In a first possible implementation manner of the tenth aspect, the at least two physical switches include a primary Switch and an extended Switch, where the controller is connected to at least the primary Switch, and the extended Switch is connected to at least the primary Switch;
The controller is configured to send mapping information, which specifically includes: sending mapping information to at least the primary Switch;
the primary Switch is further configured to send the mapping information to an extended Switch connected to the primary Switch after receiving the mapping relationship sent by the controller;
the controller is further configured to send a flow entry to the logic Switch, which specifically includes: sending flow entries of the logical switches to at least the primary Switch, where the flow entries received by the primary Switch include a flow entry corresponding to the primary Switch or a flow entry corresponding to each of the physical switches;
the primary Switch is further configured to send, after receiving the flow entry sent by the controller, the flow entry allocated by the controller to the extended Switch connected to the primary Switch.
In a second possible implementation manner, the extended Switch includes a first extended Switch and a second extended Switch, the main Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch;
the primary Switch is configured to send the mapping information to the extended Switch connected to the primary Switch, and specifically includes: sending the mapping information to the first extended Switch and/or the second extended Switch;
The primary Switch is configured to send the flow entry allocated by the controller to the extended Switch connected to the primary Switch, and specifically includes: sending the flow table entry allocated by the controller to the first extended Switch and/or the second extended Switch.
According to a second possible implementation manner of the tenth aspect, in a third possible implementation manner, each of the extended switches is configured to receive the mapping information, and specifically includes: the first extended Switch is configured to receive mapping information sent by the controller and/or the primary Switch; the second extended Switch is configured to receive mapping information sent by the controller and/or the main Switch and/or the first extended Switch;
each of the extended switches is configured to receive the flow entry, and specifically includes: the first extended Switch is configured to receive a flow entry sent by the controller and/or the master Switch; the second extended Switch is configured to receive a flow entry sent by the controller and/or the main Switch and/or the first extended Switch.
According to the tenth aspect or any one of the first to third possible implementation manners of the tenth aspect, in a fourth possible implementation manner, the flow table allocated by the controller to the master Switch at least includes a first-level flow table0 in the multi-level flow tables of the logical Switch;
The primary Switch is configured to process the data packet received by the primary Switch, and specifically includes: and processing the received data message through the table0 according to the flow table entry or according to the flow table entry and the mapping information.
According to the tenth aspect and any one of the first to fourth possible implementation manners of the tenth aspect, in a fifth possible implementation manner, the processing, by the primary Switch, of the data packet received by the primary Switch specifically includes: processing the data message when the data message is received; and judging whether a next-hop flow table is located in the main Switch or not according to the mapping information, if so, jumping the data message to the next-hop flow table for continuous processing, and if not, initiating protection of a pipeline environment to generate a first message encapsulation packet and sending the first message encapsulation packet to an extended Switch corresponding to the next-hop flow table.
According to the tenth aspect or any one of the first to fourth possible implementation manners of the tenth aspect, in a sixth possible implementation manner, the controller is configured to send a flow entry to the master Switch, and specifically includes: when the table entry to be sent includes a table jump instruction, judging whether a next jump table is located in the main Switch; if yes, sending a flow table item containing the flow table jump instruction to the main Switch; if not, replacing the flow table jump instruction in the flow table item to be sent with a Switch forwarding instruction, and sending the flow table item containing the Switch forwarding instruction to the main Switch;
Correspondingly, the primary Switch is configured to receive a flow entry, and specifically includes: receiving a flow table item which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction;
the primary Switch is configured to process the data packet received by the primary Switch, and specifically includes: when the flow table item matched with the received data message comprises the flow table jump instruction, jumping the data message to the next jump table for processing continuously; and when the received flow table item matched with the data message comprises the Switch forwarding instruction, initiating protection on a pipeline environment to generate a first message encapsulation packet, and sending the first message encapsulation packet to the extended Switch corresponding to the next-hop flow table.
According to a fifth possible implementation manner or a sixth possible implementation manner of the tenth aspect, in a seventh possible implementation manner, the main Switch is configured to initiate protection of a pipeline environment, and specifically includes: the primary Switch encapsulates, in the first packet encapsulation packet, related information for processing the data packet and the data packet at the same time, where the related information for processing the data packet at least includes the next-hop flow table number ID, and also includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
According to the tenth aspect and any one of the first to seventh possible implementation manners of the tenth aspect, in an eighth possible implementation manner, the current extended Switch is further configured to receive the first packet encapsulation packet after receiving the flow table entry corresponding to the current extended Switch;
the current extended Switch is further configured to determine whether a next-hop flow table number ID in the first packet is located in the current extended Switch, if not, forward the first packet to a physical Switch corresponding to the next-hop flow table ID according to the mapping information, and if so, recover a pipeline environment for the first packet to obtain the data packet.
According to an eighth possible implementation manner of the tenth aspect, in a ninth possible implementation manner, the current extended Switch is configured to perform pipeline environment restoration on the first packet encapsulation packet, and specifically includes: analyzing the first message encapsulation packet to obtain analysis information, wherein the analysis information comprises the data message and relevant information for processing the data message; and recovering the pipeline environment according to the analysis information, and jumping the data message to a next-hop flow table for continuous processing.
According to an eighth possible implementation manner of the tenth aspect, in a tenth possible implementation manner, the flow entry received by the current extended Switch includes a flow entry sent by the controller for performing pipeline recovery; the current extended Switch is further configured to add the flow table entry for pipeline recovery to the first-stage flow table 0' of the current extended Switch; and recovering the pipeline environment of the first packet encapsulation packet through the flow table entry added in the table 0'.
According to a tenth possible implementation manner of the tenth aspect, in an eleventh possible implementation manner, the first packet encapsulation packet received by the current extended Switch includes a next-hop table ID, the flow table entry received by the current extended Switch for pipeline recovery includes a matching portion and an execution instruction, and the execution instruction includes a flow table recovery instruction and/or a flow table hop instruction;
the current extended Switch is configured to perform pipeline environment recovery on the first packet encapsulation packet through the flow entry added in the table 0', and specifically includes: matching the first packet encapsulation packet received by the receiver through the flow table entry in the table 0'; and when the flow table entries in the table 0' are successfully matched, sequentially executing a flow table recovery instruction and/or a flow table jump instruction in the matched flow table entries according to a matching result.
According to any one of the eighth to eleventh possible implementation manners of the tenth aspect, in a twelfth possible implementation manner, the current extended Switch is further configured to, after a pipeline environment of the first packet encapsulation packet is recovered, process the data packet through the current flow table when the data packet is acquired;
the current extended Switch is further configured to determine whether a next-hop flow table is located in the current extended Switch according to the mapping information; if so, jumping the data message to the next skip flow table for continuous processing; if not, the protection of the pipeline environment is initiated to generate a second message encapsulation packet, and the second message encapsulation packet is sent to the extended Switch corresponding to the next-hop flow table.
In a thirteenth possible implementation manner, according to any one of the eighth to eleventh possible implementation manners of the tenth aspect, the controller is configured to send the flow entry to the current extended Switch, and specifically includes: when the table entry to be sent includes a table jump instruction, judging whether a next jump table is located in the current extended Switch; if yes, sending a flow table item containing the flow table jump instruction to the current extended Switch; if not, replacing the flow table jump instruction in the flow table item to be sent with a Switch forwarding instruction, and sending the flow table item containing the Switch forwarding instruction to the current extended Switch;
Correspondingly, the current extended Switch is configured to receive a flow entry, and specifically includes: receiving a flow table item which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction;
the current extended Switch is further configured to obtain a data packet in the first packet after the pipeline environment of the first packet is restored, and process the obtained data packet through the current flow table.
According to a thirteenth possible implementation manner of the tenth aspect, in a fourteenth possible implementation manner, the processing, by the current extended Switch, of the obtained data packet specifically includes: when the flow table item matched with the acquired data message comprises the flow table jump instruction, jumping the data message to the next jump table for processing continuously; or, when the flow table entry matched with the acquired data packet includes the Switch forwarding instruction, initiating protection of a pipeline environment to generate a second packet encapsulation packet, and sending the second packet encapsulation packet to the extended Switch corresponding to the next-hop flow table.
In a fifteenth possible implementation manner, according to any one of the twelfth to fourteenth possible implementation manners of the tenth aspect, the initiating protection of a pipeline environment by the current extended Switch specifically includes: and encapsulating the related information for processing the data message and the data message in the second message encapsulation packet at the same time, wherein the related information for processing the data message at least comprises a next-hop flow table ID and any amount of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
The Switch processing method is executed by a controller and a logic Switch, wherein the logic Switch comprises at least two physical switches, each flow table in a multi-stage flow table of the logic Switch is allocated to each physical Switch by the controller, and mapping information and a flow table item are sent, so that each physical Switch acquires the mapping information and the flow table item corresponding to the mapping information, and further each physical Switch can process a received data message according to the acquired flow table item and mapping relation or the flow table item; the Switch processing system for executing the Switch processing method provided by the invention can stack new physical Switch on the basis of the physical structure of the logical Switch, thereby being beneficial to maintaining the stability of the existing network topology, improving the processing capacity of the logical Switch and reducing the influence on network operation and the cost of capacity expansion.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings 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 some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a flowchart of a switch processing method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an application scenario provided in the embodiment shown in FIG. 1;
FIG. 3 is a schematic diagram of another application scenario provided by the embodiment shown in FIG. 1;
FIG. 4 is a schematic diagram of another application scenario provided by the embodiment shown in FIG. 1;
fig. 5 is a flowchart of a switch processing method according to a second embodiment of the present invention;
fig. 6 is a flowchart of another switch processing method according to an embodiment of the present invention;
fig. 7 is a flowchart of a switch processing method according to a third embodiment of the present invention;
fig. 8 is a flowchart of a switch processing method according to a fourth embodiment of the present invention;
fig. 9 is a flowchart of a switch processing method according to a fifth embodiment of the present invention;
fig. 10 is a flowchart of another switch processing method according to an embodiment of the present invention;
fig. 11 is a flowchart of a switch processing method according to a sixth embodiment of the present invention;
fig. 12 is a schematic structural diagram of a switch processing apparatus according to a seventh embodiment of the present invention;
fig. 13 is a flow chart of another structure of a switch processing apparatus according to an embodiment of the present invention;
Fig. 14 is a schematic structural diagram of a switch processing apparatus according to an eighth embodiment of the present invention;
fig. 15 is a schematic structural diagram of another switch processing apparatus according to an embodiment of the present invention;
fig. 16 is a schematic structural diagram of a switch processing apparatus according to a ninth embodiment of the present invention;
fig. 17 is a schematic structural diagram of a further switch processing apparatus according to an embodiment of the present invention;
fig. 18 is a schematic structural diagram of a controller according to an embodiment of the present invention;
fig. 19 is a schematic structural diagram of a master switch according to an embodiment of the present invention;
fig. 20 is a schematic structural diagram of an expansion switch according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. 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 Switch processing method provided by the embodiment of the present invention may be specifically applied to a situation where the number of flow table stages supported by a pipeline of a logical Switch in a network and the scale of flow table entries that can be processed by the flow table stages need to be expanded, and specifically, the Switch processing method provided by the embodiment of the present invention may allocate each flow table in a multi-stage flow table to a plurality of physical switches through a controller, where the plurality of physical switches should be regarded as one logical Switch, so as to implement that the pipeline of the logical Switch supports more number of flow table stages and/or can process larger-scale flow table entries. The Switch processing method provided in this embodiment may be specifically executed by a Switch processing system, where the Switch processing system includes a controller and a plurality of physical switches, and a data processing apparatus may be integrated in the controller and each physical Switch, and the data processing apparatus may be implemented in a software and/or hardware manner. The switch processing method provided by the present embodiment is explained in detail below.
Example one
Fig. 1 is a flowchart of a switch processing method according to an embodiment of the present invention. The Switch processing method provided in this embodiment is executed by a controller and a logical Switch, where the logical Switch includes at least two physical switches, as shown in fig. 1, the method of this embodiment specifically includes the following steps:
S110, the controller allocates each flow table in the multi-stage flow table of the logical Switch, which is a pipeline of the logical Switch, to each physical Switch.
S120, the controller sends mapping information to make each physical Switch obtain mapping information, where the mapping information includes a mapping relationship between each flow table and each physical Switch in the multi-stage flow table.
In this embodiment, the logical Switch is composed of at least two physical switches, and therefore, the controller needs to respectively give each flow table in the multistage flow table to a different physical Switch to undertake, and also needs to send the mapping relationship between each flow table and each physical Switch to the physical Switch participating in processing, so that each physical Switch can forward the data packet to a subsequent flow table or other physical switches to continue processing after processing the received data packet through the allocated current flow table.
S130, the controller sends a flow entry to the logical Switch, so that each physical Switch obtains a flow entry corresponding to the physical Switch, and processes the received data packet according to the flow entry, or according to the flow entry and the mapping information, where the flow entry is content information of each flow table in a flow table set allocated by the controller for each physical Switch.
In this embodiment, after the controller allocates each flow table in the multiple stages of flow tables to each physical Switch, and issues the mapping relationship, it is necessary to issue a flow table entry corresponding to the flow table to which the physical Switch is allocated to each physical Switch, where the flow table entry received by each physical Switch is specifically content information of each flow table in the flow table set allocated to the flow table entry by the controller, and includes, for example, a matching part (Match Fields), a Priority (Priority), statistics (Counters), an instruction (Instructions), an aging time (times), and a flow table association value (Cookie), so that each physical Switch fills the received flow table entry into the flow table corresponding to the physical Switch, and after the physical Switch obtains the allocated flow table, the mapping relationship, and the flow table entry in each flow table, the received data packet may be processed.
For example, fig. 2 is a schematic diagram of an application scenario provided in the embodiment shown in fig. 1, in the scenario shown in fig. 2, a logical Switch includes two physical switches, and a physical Switch specifically includes a primary Switch and a first extended Switch, where a controller is connected to at least the primary Switch, and the first extended Switch is connected to at least the primary Switch, in the framework shown in fig. 2, a manner for the controller to send mapping information and a flow entry may be: firstly, the controller directly sends the mapping information and the flow table entry corresponding to each physical Switch to the corresponding physical Switch, that is, the controller needs to be connected with each physical Switch and corresponds to the connection relationship shown by the solid line in fig. 2; and secondly, the controller sends the mapping information and all the flow table entries to the main Switch, so that the flow table entries received by the main Switch not only include the flow table entry corresponding to the main Switch, but also include the flow table entry corresponding to the first extended Switch, and the main Switch sends the mapping information and the flow table entry corresponding to the first extended Switch. Generally, the manner of sending the mapping information and the flow table entry by the controller may include the above two cases, that is, the connection relationship between each physical Switch and the controller satisfies any condition.
As another example, fig. 3 is a schematic diagram of another application scenario provided by the embodiment shown in fig. 1, in the scenario shown in fig. 3, the logical Switch includes three physical switches, the physical switches include a main Switch, a first extended Switch, and a second extended Switch, the connection manner of the main Switch and the first extended Switch is similar to that of the scenario shown in fig. 2, and the second extended Switch is connected to at least the first extended Switch, and in the architecture shown in fig. 3, the manner for the controller to send the mapping information and the flow table entry may be: firstly, the controller directly sends the mapping information and the flow table entry corresponding to each physical Switch to the corresponding physical Switch, that is, the controller needs to be connected with each physical Switch, and corresponds to the connection relationship shown by the solid line "1" in fig. 3; the controller sends the mapping information and all the flow table entries to the master Switch, that is, the flow table entries received by the master Switch not only include the flow table entry corresponding to the master Switch, but also include the flow table entries corresponding to other extended switches, and then the master Switch sends the mapping information and the flow table entries corresponding to other physical switches to the corresponding physical switches, in this sending mode, the controller is connected only with the master Switch, and the first extended Switch and the second extended Switch are both connected with the master Switch, corresponding to the connection relationship shown by the solid line "2" in fig. 3; the controller sends the mapping information and all the flow entries to the master Switch, the master Switch sends the mapping information and the flow entries corresponding to the other physical switches only to the first extended Switch, the flow entries received by the first extended Switch not only include the flow entries corresponding to the first extended Switch, but also include the flow entries corresponding to the second extended Switch, and further, the first extended Switch sends the mapping information and the flow entries corresponding to the second extended Switch to the corresponding second extended Switch, in the sending mode, the controller and the first extended Switch are connected to the master Switch, and the second extended Switch is connected to the first extended Switch only, corresponding to the connection relationship shown by the solid line "3" in fig. 3; the controller may further send the mapping information and the flow table entry corresponding to the master Switch, send the mapping information and the flow table entries corresponding to all the extended switches to the first extended Switch, and then send the mapping information and the flow table entry corresponding to the second extended Switch from the first extended Switch to the second extended Switch. In addition, the controller may also send the mapping information and the flow table entry to the extended Switch first, for example, the controller specifically sends the mapping information and the flow table entry to the first extended Switch, the flow table entry includes a flow table entry corresponding to the primary Switch and a flow table entry corresponding to the extended Switch, the mapping relationship and the flow table entry corresponding to the mapping relationship are forwarded to the primary Switch by the first extended Switch, and the mapping information received by the second extended Switch may be sent by the controller and/or the first extended Switch, in this sending manner, the first extended Switch is connected to the controller and the primary Switch, and the second extended Switch is connected to the first extended Switch and/or the controller. Generally, the manner of sending the mapping information and the flow entry by the controller may include many of the above cases, that is, the connection relationship between each physical Switch and the controller satisfies any of the above conditions. The Switch processing method provided by the present invention does not limit the specific process of sending the mapping information and the flow table entry by the controller, and can be applied to the Switch processing method provided by the embodiment of the present invention as long as the method for sending the mapping information and the flow table entry corresponding to the mapping information received by each physical Switch can be implemented.
It should be noted that fig. 2 and fig. 3 are also schematic structural diagrams of a Switch processing system provided by an embodiment of the present invention, in the system, a master Switch is a Switch determined in a network and connected to a controller, and a flow table allocated by the controller for the master Switch includes at least a first-level flow table (table0) in a multi-level flow table of a logical Switch, so that when receiving a data packet, the master Switch processes the data packet through a table0 first, and other physical switches perform receiving and forwarding of mapping information and flow table entries according to a connection relationship with the master Switch and with upper-level and lower-level physical switches.
In the prior art, when an operator needs to perform function or performance expansion on a Switch arranged in a network node, the Switch is limited by the hardware capability of the Switch, and therefore only the solidified Switch in the existing network can be replaced, so that the cost of network expansion is high. In contrast, in this embodiment, because the logical Switch is not a solidified physical Switch, but is formed by stacking a plurality of physical switches, when the network capacity is increased, the traffic flow is increased, or the logical Switch is required to complete a more complex logical processing function, the operator can still continuously use the existing physical Switch, and the capacity expansion is achieved by stacking a plurality of existing physical switches to form a new logical Switch. In the specific implementation, the whole formed by the original equipment and the expansion equipment can be regarded as a logic entity which is completely equivalent to the original equipment in the network topology, and the network topology can be kept stable before and after the upgrade by using the method, so that the smooth upgrade of the node level in the SDN domain can be completed with low complexity and high reliability. Specifically, in the method provided in this embodiment, first, the number of physical switches in a logical Switch may be expanded, so as to expand the processing capability of the logical Switch, and when the number of flow tables that can be supported by the existing logical Switch is limited and cannot process complex logic, the physical Switch added during capacity expansion and the existing physical Switch may be used together to form a new logical Switch, that is, a capacity-expanded logical Switch is formed; further, the capacity of the logic Switch after capacity expansion for processing complex logic is improved, when the computation processing capacity of the existing logic Switch is insufficient, and when the Switch processing method provided by the embodiment is executed by the logic Switch after capacity expansion, the computation processing capacity is improved, and meanwhile, the existing network topology can be maintained to realize smooth upgrade, so that capacity expansion is easier to implement, and the influence on network operation is reduced.
For example, when the number of flow table stages supported by the original logic Switch is not enough to process the new service logic, or when the traffic flow to be carried is greatly increased to cause that the computational resource of the original logic Switch is not enough, the logic function can be upgraded by adding the new physical Switch, and the processing capability of the logic Switch can be improved to realize the performance upgrade of the logic Switch. Fig. 4 is a schematic diagram of another application scenario provided by the embodiment shown in fig. 1, as shown in fig. 4, an original logic Switch includes Switch1, Switch2, Switch3 and Switch4, where the Switch1 is a master Switch, the Switch2 and the Switch3 are first extended switches, and the Switch4 is a second extended Switch, and the original logic Switch can only support n-level flow tables, and when more complex logic needs to be processed, an additional Switch5 may be added between the Switch1 and the Switch2 in a stacked manner, and together with the original logic Switch, a new logic Switch capable of supporting n + m-level flow tables is formed, that is, the Switch1 to the Switch5, and the original logic Switch is replaced in a network topology, so as to achieve an effect of upgrading functions of the logic Switch; in fig. 4, the solid lines between the switches are data connections existing before the upgrade, the dotted lines are data connections newly added after the upgrade, and the connection relationship between the controller and the extended switches is shown by dotted lines. It can be seen that the network topology is kept stable before and after the logic is upgraded, which means that the upgrading process is very smooth, the influence on the running network is very small, and the reliability of the network is very guaranteed. Similarly, when the original logical Switch, that is, the number n of flow tables supported by the Switch1 to the Switch4, can meet the requirement of service logic complexity, but needs greater processing capacity as the bearer traffic increases, the newly added Switch5 may be added between the Switch1 and the Switch2 in a stacked manner, and the Switch1 to the Switch5 replace the original logical Switch in the network topology, although the upgraded logical Switch still supports the n-level flow tables, and thus achieves the effect of upgrading the performance of the logical Switch. It should be noted that, in the application scenario shown in fig. 4, an original logical Switch may also include only Switch1, for example, and Switch2 is stacked on Switch1 to form a new logical Switch.
The Switch processing method provided by this embodiment is executed by a controller and a logical Switch, where the logical Switch includes at least two physical switches, and the controller allocates each flow table in a multi-stage flow table of the logical Switch to each physical Switch and sends mapping information and a flow table entry, so that each physical Switch acquires mapping information and a flow table entry corresponding to the mapping information, and further, each physical Switch can process a received data packet according to the acquired flow table entry and mapping relationship, or according to the flow table entry; the logical Switch for executing the Switch processing method provided by this embodiment may stack a new physical Switch on the basis of the physical structure of the logical Switch, which is beneficial to maintaining the stability of the existing network topology, improving the processing capability of the logical Switch, and reducing the influence on the network operation and the cost of capacity expansion.
Example two
Fig. 5 is a flowchart of a switch processing method according to a second embodiment of the present invention. The Switch processing method provided in this embodiment is executed by a controller and a logical Switch, where the logical Switch includes at least two physical switches, as shown in fig. 5, the method of this embodiment specifically includes the following steps:
S210, the controller allocates each flow table in the multi-stage flow table of the logical Switch, which is a pipeline of the logical Switch, to each physical Switch.
S220, the controller sends mapping information to make each physical Switch obtain mapping information, where the mapping information includes mapping relationships between each flow table and each physical Switch in the multi-stage flow table.
Specifically, the implementation manners of S210 to S220 refer to S110 to S120 in the first embodiment.
And S230, the controller sends the flow table entry to the logic Switch, so that when the current physical Switch receives the data message, the data message is processed through the current flow table, the position of a next-hop flow table is determined according to the mapping information, when the determined next-hop flow table is located in the current physical Switch, the data message is jumped to the next-hop flow table for continuous processing, or when the determined next-hop flow table is located in other physical switches, protection of a pipeline environment is initiated to generate a message encapsulation packet, and the message encapsulation packet is sent to the physical Switch corresponding to the next-hop flow table.
In this embodiment, when the current physical Switch receives and processes a data packet, the current physical Switch determines, in combination with the received mapping information, a position of a next-hop flow table for processing the data packet, on one hand, the current physical Switch may still be processed by the flow table of the current physical Switch, that is, the current physical Switch may directly jump the data packet to the next-hop flow table of the current physical Switch to continue processing; on the other hand, when the current physical Switch finds that the data packet needs to be processed continuously by other physical switches, pipeline environment protection for the multi-stage flow table needs to be performed. The method provided by this embodiment is specifically protection of a pipeline environment controlled by a Switch, and is decided, initiated and executed by the Switch, and when a controller issues a flow entry, it is not necessary to consider whether each flow table is located in the same physical Switch, specifically, the current physical Switch determines the position of a next-hop flow table, and specifically, when the next-hop flow table is located in another physical Switch, the method initiates protection of the pipeline environment to generate a packet encapsulation packet, and sends the generated packet encapsulation packet to a physical Switch corresponding to the next-hop flow table.
Optionally, in another possible implementation manner of this embodiment, as shown in fig. 6, the present invention is a flowchart of another switch processing method provided in this embodiment. Specifically, for the protection of the pipeline environment controlled by the controller, the controller makes a decision, and the Switch directly executes the corresponding instruction, where based on the method shown in fig. 5, the step S220 specifically includes: s230, when the table entry to be sent includes a table jump instruction, the controller judges whether a next jump table is located in the current physical Switch; if yes, go to S240, otherwise go to S250.
S240, the controller sends the current physical Switch a flow table entry containing the flow table jump instruction, so that the current physical Switch jumps the data packet to the next jump table for processing.
S250, the controller replaces the flow table jump instruction in the flow table entry to be sent with a Switch forwarding instruction, and sends the flow table entry including the Switch forwarding instruction to the current physical Switch, so that the current physical Switch initiates protection of the pipeline environment to generate a packet encapsulation packet, and sends the packet encapsulation packet to the physical Switch corresponding to the next flow jump table.
The controller usually sends a Flow table entry to the Switch through a Flow _ Mod message, in this embodiment, the Flow table jump instruction may be, for example, an instruction of a "Goto _ table" type, the Switch forwarding instruction may be, for example, an instruction of a "forward to subsequent Switch" type, specifically, when the controller finds that an execution instruction in the Flow table entry to be sent includes the "Goto _ table", the controller performs a judgment on a next-hop Flow table position, and specifically determines whether the next-hop Flow table is located in a current physical Switch; if so, using a 'Goto _ table' instruction, namely the controller directly sends the flow table entry including the 'Goto _ table' to the current physical Switch, and if not, using a 'forward to subsequent Switch' instruction, namely the controller replaces the 'Goto _ table' in the flow table entry with 'forward to subsequent Switch', so as to send the flow table entry after the replacement instruction to the current physical Switch, and the current physical Switch initiates protection of the pipeline environment according to the 'forward to subsequent Switch' instruction type in the flow table entry.
It should be noted that, because the method provided in this embodiment is executed by at least two physical switches, when processing a data packet and jumping to a next-hop flow table, unlike the prior art that only one fixed physical Switch is used for execution, for confidentiality of the data packet, it is necessary to initiate protection of a pipeline environment to jump the data packet between different physical switches. Although the control manner of the embodiments shown in fig. 5 and fig. 6 is different, the protection manner of the current physical Switch to the pipeline environment is the same, specifically: the current physical Switch encapsulates the related information for processing the data message and the data message in a message encapsulation packet at the same time, wherein the related information for processing the data message at least includes an Identity (ID) of a next hop table, and optionally includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
Further, after the current physical Switch performs protection of the pipeline environment, the packet encapsulation packet generated by protecting the pipeline environment is sent to the physical Switch corresponding to the next-hop flow table, and accordingly, the physical Switch corresponding to the next-hop flow table needs to recover the pipeline environment to obtain the data packet, in the method provided by this embodiment, the physical Switch corresponding to the next-hop flow table controls recovery of the pipeline environment, specifically, the physical Switch analyzes the received packet encapsulation packet to obtain analysis information, the analysis information includes the data packet and related information for processing the data packet, the related information for processing the data packet also includes a next-hop flow table ID, and optionally includes any number of the following information: the Ingress port, the Action set, and the Metadata are used to recover the pipeline environment according to the analysis information, and jump the data message obtained by analysis to the next-hop flow table for further processing, and the method of jumping to the next-hop flow table is the same as the above embodiment, and therefore, the details are not repeated here.
Optionally, in another possible implementation manner of this embodiment, the controller may control the restoring of the pipeline environment, where the restoring of the pipeline environment may be performed on the basis of the embodiments shown in fig. 5 or fig. 6, where this embodiment is shown by taking the above fig. 6 as an example, and as shown in fig. 6, after S250, the method further includes:
s260, the controller sends a flow entry for pipeline recovery to the extended Switch, so that the extended Switch adds the flow entry to the first-level flow table0 'of the extended Switch, and when a packet encapsulation packet is received, the pipeline environment is recovered through the flow entry added in table 0'. It should be noted that, the controller transmission flow entry is usually sent in advance, in this embodiment, S250 and S260 have no explicit precedence order, and fig. 6 shows S250 before S260 as an example.
In this embodiment, the extended Switch performs recovery of the pipeline environment through a received flow entry sent by the controller for performing pipeline environment recovery, where the flow entry for performing pipeline recovery may include a matching portion and an execution instruction, a next-hop flow table ID in the packet is specifically used as a matching object of the flow entry matching portion, the execution instruction may include a flow table recovery instruction and/or a flow table jump instruction, and a specific process of recovering the pipeline environment is as follows: and the extended Switch matches the received packet encapsulation packet through the flow table entry in the table0 ', and when the next flow-hopping table ID is matched with the flow table entry in the table 0', sequentially executes the flow table recovery instruction and/or the flow table hopping instruction in the matched flow table entry according to the matching result. For example, if the next-hop table ID of the packet received by the extended Switch is equal to the logic flow table 3, it must happen that the flow table entry corresponding to the logic flow table 3 can be successfully matched, and according to the basic operation manner of the Openflow protocol, the extended Switch executes the execution instruction in the matched flow table entry after the matching is successful.
The Switch processing method provided in this embodiment is executed by the controller and the logical Switch including at least two physical switches, and when a data packet is forwarded between different physical switches, seamless connection processing of the data packet between the physical switches of the same logical Switch is realized by protecting and restoring a pipeline environment.
EXAMPLE III
Fig. 7 is a flowchart of a switch processing method according to a third embodiment of the present invention. The Switch processing method provided by the present embodiment is performed by a controller and a logical Switch, and similar to the above-described embodiments, the logical Switch includes at least two physical switches, where the at least two physical switches include a primary Switch and an extended Switch, and the controller is connected to at least the primary Switch. As shown in fig. 7, the method of this embodiment specifically includes the following steps:
s310, the master Switch receives the mapping information sent by the controller, where the mapping information includes mapping relationships between the flow tables in the multi-stage flow tables of the logical Switch and the physical Switch.
S320, the master Switch receives the flow table entry sent by the controller, where the flow table entry received by the master Switch is allocated by the controller for the master Switch, or the content information of each flow table in the flow table set allocated by the controller for the master Switch and the extended Switch.
In this embodiment, when the controller assumes that each of the multi-stage flow tables is assigned to a different physical Switch, the first-stage flow table0 in the multi-stage flow table of the logical Switch is inevitably allocated to the master Switch. If the extended Switch is connected to the primary Switch only, after receiving the mapping information, the primary Switch may further send the mapping information to the extended Switch connected to the primary Switch, and similarly, after receiving the flow entry sent by the controller, the primary Switch may also send the flow entry allocated by the controller to the extended Switch connected to the primary Switch. Similar to the foregoing embodiment, the extended Switch in this embodiment may also include a first extended Switch and a second extended Switch, where the main Switch is connected to at least the first extended Switch, the second extended Switch is connected to at least the first extended Switch, a distribution manner of the mapping information and the flow table entry is the same as that in the foregoing embodiment, and is related to a connection relationship between each physical Switch and the controller, and in this embodiment, reference may be made to fig. 2 and fig. 3 for the connection relationship between each physical Switch and the controller, and therefore details are not repeated here.
S330, the master Switch processes the received data packet according to the flow table entry or according to the flow table entry and the mapping information.
In this embodiment, the master Switch acquires the mapping information sent by the controller, that is, acquires the flow table to which the master Switch is allocated, acquires the flow tables to which other physical switches are allocated, and fills the received flow table entries in the corresponding flow tables, where the content of the flow table entries is similar to that in the above-described embodiment, and further processes the data packet according to the received flow table entries, or the flow table entries and the mapping information, and because the master Switch includes a table0 in the multi-stage flow table of the logical Switch, the processing of the data packet specifically starts from the table 0. It should be noted that, in this embodiment, the data packet received by the primary Switch may generally be an external node (Host), for example, sent by a computer that can access the primary Switch.
The Switch processing method provided by this embodiment is executed by a controller and a logic Switch, where a physical Switch forming the logic Switch at least includes a main Switch and an extended Switch, and the main Switch processes a received data packet through mapping information and flow table items sent by the controller, where the flow table item received by the main Switch may be a flow table item allocated by the controller for the main Switch, and may also be a flow table item allocated by the controller for the main Switch and the extended Switch, and in this distribution manner, the main Switch may also send the mapping information and the flow table item corresponding to the extended Switch, so that each physical Switch finally obtains the mapping information sent by the controller and the flow table item corresponding to the physical Switch, and further the extended Switch may also process the received data packet according to the obtained flow table item and mapping relationship, or according to the flow table item; the logical Switch for executing the Switch processing method provided by this embodiment may stack a new physical Switch on the basis of the physical structure of the logical Switch, which is beneficial to maintaining the stability of the existing network topology, improving the processing capability of the logical Switch, and reducing the influence on the network operation and the cost of capacity expansion.
Example four
Fig. 8 is a flowchart of a switch processing method according to a fourth embodiment of the present invention. The Switch processing method provided in this embodiment is executed by a controller and a logical Switch, and similar to the foregoing embodiments, the logical Switch at least includes a main Switch and an extended Switch, as shown in fig. 8, the method of this embodiment specifically includes the following steps:
s410, the master Switch receives the mapping information sent by the controller, where the mapping information includes mapping relationships between the flow tables in the multi-stage flow tables of the logical Switch and the physical Switch.
S420, the master Switch receives the flow table entry sent by the controller, where the flow table entry received by the master Switch is allocated by the controller for the master Switch, or the content information of each flow table in the flow table set allocated by the controller for the master Switch and the extended Switch.
Specifically, the implementation manners of S410 to S420 refer to S310 to S320 in the second embodiment.
S430, when the master Switch receives the data packet, it processes the data packet through table 0. As described in the foregoing embodiment, since the master Switch includes the first-level flow table0 in the multi-level flow table of the logical Switch, the processing of the data packet by the master Switch specifically starts from this table 0.
S440, the main Switch judges whether the next-hop flow table is located in the main Switch according to the mapping information; if yes, go to S450, otherwise go to S460.
S450, the main Switch jumps the data message to the next jump table for processing;
s460, the master Switch initiates protection of the pipeline environment to generate a packet, and sends the packet to the extended Switch corresponding to the next-hop flow table.
In this embodiment, when receiving and processing a data packet, a master Switch determines, in combination with received mapping information, a position of a next-hop flow table for processing the data packet, on one hand, when the next-hop flow table is located in the master Switch, the next-hop flow table is still processed by the flow table in the master Switch, that is, the data packet can be directly hopped to the next-hop flow table of the master Switch for further processing; on the other hand, when the master Switch finds that the data packet needs to be continuously processed by the extended Switch, that is, when the master Switch determines that the next-hop flow table is located in the extended Switch, pipeline environment protection on the multistage flow table needs to be performed to generate a packet encapsulation packet, and the generated packet encapsulation packet is sent to the physical Switch corresponding to the next-hop flow table. The method provided by this embodiment is protection of a pipeline environment controlled by the master Switch, and is specifically decided, initiated and executed by the master Switch, and the controller does not need to consider whether each flow table is located in the same physical Switch when issuing the flow table entry.
Optionally, in another possible implementation manner of this embodiment, the protection of the pipeline environment may be controlled by the controller, specifically, the controller makes a decision, and the master Switch directly executes the corresponding instruction, where on the basis of the embodiment shown in fig. 7, S320 is replaced with: the master Switch receives a flow table entry which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction, wherein the flow table jump instruction or the Switch forwarding instruction in the flow table entry is determined by the controller according to whether a next jump flow table in the flow table entry is located in the master Switch, if yes, the flow table entry comprises the flow table jump instruction, and if not, the flow table entry comprises the Switch forwarding instruction. Accordingly, S330 is replaced with: the primary Switch receives a data message, and when a flow table item matched with the data message comprises a flow table jump instruction, the data message is jumped to a next flow jump table for continuous processing; or, the master Switch receives the data packet, and when the flow entry matched with the data packet includes a Switch forwarding instruction, initiates protection of a pipeline environment to generate a packet encapsulation packet, and sends the packet encapsulation packet to the extended Switch corresponding to the next-hop flow table. In this embodiment, the manner of sending the flow table entry by the controller, and when the flow table entry includes an instruction of a type of "Goto _ table", for example, the determination of the next-hop flow table position and the subsequent processing manner are similar to those in the above embodiments, and therefore, no further description is given here.
It should be noted that, because the method provided in this embodiment is executed by a logical Switch including a main Switch and an extended Switch, when the main Switch jumps a processing data packet into the extended Switch, unlike the prior art that only one fixed physical Switch is used, in order to protect the pipeline environment, the main Switch needs to initiate protection before jumping the processing data packet into the extended Switch. In a specific implementation, the primary Switch encapsulates, in a packet encapsulation packet, related information for processing a data packet and the data packet at the same time, where the related information for processing the data packet at least includes a next-hop table ID, and optionally includes any number of the following information: ingress port, Action set, and Metadata.
Further, after the main Switch performs protection of the pipeline environment, the packet encapsulation packet generated by protecting the pipeline environment is sent to the extended Switch corresponding to the next-hop flow table, and accordingly, the extended Switch needs to recover the pipeline environment to obtain a data packet, in the method provided by this embodiment, the extended Switch controls recovery of the pipeline environment, specifically, the extended Switch parses the received packet encapsulation packet to obtain parsing information, where the parsing information includes the data packet and related information for processing the data packet, and the related information for processing the data packet also includes the next-hop flow table ID, and optionally includes any number of the following information: the method for recovering the pipeline environment according to the analysis information, skipping the data message obtained by analysis to the next-skip flow table for continuous processing, and skipping the data message to the next-skip flow table is the same as the above embodiment, and therefore, the detailed description is omitted here. Similarly, the recovery of the pipeline environment may also be implemented in a manner controlled by the controller, and the specific implementation manner is the same as that in the foregoing embodiment, since this embodiment is implemented by using the main Switch as an execution subject, the processing executed by the main Switch does not involve the recovery of the pipeline environment, and therefore, details are not described here again.
The Switch processing method provided in this embodiment is executed by a logical Switch and a controller that are formed by a main Switch and an extended Switch, and when the main Switch forwards a data packet to the extended Switch, the data packet is seamlessly joined and processed between physical switches of the same logical Switch through protection of the pipeline environment by the main Switch and restoration of the pipeline environment by the extended Switch.
EXAMPLE five
Fig. 9 is a flowchart of a switch processing method according to a fifth embodiment of the present invention. The Switch processing method provided by the present embodiment is performed by a controller and a logical Switch, and similarly to the above-described embodiments, the logical Switch includes at least a plurality of physical switches, where the plurality of physical switches includes a main Switch and an extended Switch, the extended Switch includes a first extended Switch and a second extended Switch, and the controller is connected to at least the main Switch, the main Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch. As shown in fig. 9, the method of this embodiment specifically includes the following steps:
S510, the current extended Switch receives mapping information sent by the controller and/or the master Switch and/or other extended switches, where the mapping information includes mapping relationships between the flow tables in the multi-stage flow tables of the logical Switch and the physical Switch, respectively.
S520, the current extended Switch receives a flow table entry corresponding to the current extended Switch sent by the controller and/or the main Switch and/or other extended switches, where the flow table entry received by the current extended Switch is content information of each flow table in a flow table set allocated by the controller for the current extended Switch.
The embodiment may be executed by the first extended Switch or the second extended Switch, and the receiving manner of the mapping information and the flow table entry sent by the controller by the extended Switch is similar to that in the above embodiment, that is, the mapping information and/or the flow table entry received by the current extended Switch may be sent directly by the controller, may be forwarded by the main Switch, may be forwarded by other extended switches, or may be a combination of the foregoing manners. Note that, when the controller is configured to give each of the flow tables in the multi-stage flow tables to a different physical Switch, the first-stage flow table0 in the multi-stage flow table of the logical Switch is inevitably allocated to the master Switch, and therefore, the table0 in the multi-stage flow table of the logical Switch specifically corresponds to the master Switch in the mapping information received by the extended Switch. In this embodiment, the distribution manner of the mapping information and the flow table entry is the same as that in the above embodiment, and is related to the connection relationship between each physical Switch and the controller, and the connection relationship between each physical Switch and the controller in this embodiment may refer to fig. 3, and therefore, details are not described here again.
S530, the current extended Switch processes the received first packet encapsulation packet according to the flow table entry, or according to the flow table entry and the mapping information, where the first packet encapsulation packet is generated by encapsulating the received data packet and the related information for processing the data packet together by the physical Switch in which the previous-hop flow table is located.
In this embodiment, after the current extended Switch acquires the mapping information and the flow table item sent by the controller, the received first packet encapsulation packet is specifically processed, which is different from the processing manner of the main Switch on the data packet in the embodiments shown in fig. 7 and 8, because the first packet encapsulation packet received by the current extended Switch is specifically generated after the physical Switch where the previous-hop flow table is located performs pipeline environment protection, the processing manner after the current extended Switch receives the first packet generally includes directly forwarding to the physical Switch corresponding to the next-hop flow table ID in the packet encapsulation packet, or performing pipeline environment restoration on the first packet encapsulation packet, so as to acquire the data packet. Fig. 10 shows a specific implementation manner of this embodiment, which is a flowchart of another switch processing method provided in this embodiment of the present invention. On the basis of the embodiment shown in fig. 9, after S520, the method specifically includes:
S530, the current extended Switch receives the first packet encapsulation packet.
S540, the current extended Switch judges whether the next-hop flow table ID in the first packet encapsulation packet is located in the current extended Switch; if not, go to S550, and if yes, go to S560.
S550, the current extended Switch forwards the first packet encapsulation packet to the physical Switch corresponding to the next-hop flow table ID according to the mapping information;
s560, the current extended Switch restores the pipeline environment of the first packet to obtain the data packet.
In this embodiment, when the current extended Switch receives and processes the first packet, the method of processing the first packet is determined according to the next-hop table ID in the first packet, and the current extended Switch recovers the pipeline environment, which may be controlled by the current extended Switch, that is, S560 specifically includes: the current extended Switch analyzes the received first packet encapsulation packet to obtain analysis information, wherein the analysis information comprises a data packet and related information for processing the data packet, the related information for processing the data packet at least comprises a next-hop table ID, and optionally comprises the following information in any quantity: ingress port, Action set and Metadata; and then the current extended Switch recovers the pipeline environment according to the analysis information, jumps the data message to the next-jump table for processing, and jumps the data message to the next-jump table in the same way as the above embodiment, so that the details are not repeated here.
Optionally, in another possible implementation manner of this embodiment, the recovery of the pipeline environment may also be controlled by the controller, specifically, the controller makes a decision, and the Switch may directly execute a corresponding instruction, in a specific implementation, the flow entry currently received by the extended Switch includes a flow entry sent by the controller for performing pipeline recovery, and accordingly, on the basis of the method shown in fig. 10, S560 includes: s561, the current extended Switch adds a flow entry for pipeline restoration to the first-level flow table 0' of the current extended Switch.
S562, the current extended Switch recovers the pipeline environment for the received first packet encapsulation packet through the flow entry added in table 0'.
In this implementation, the first packet encapsulation packet includes a next skip flow table ID, and the flow table entry for pipeline recovery includes a matching section and an execution instruction, where the execution instruction includes a flow table recovery instruction and/or a flow table skip instruction; s562 specifically includes: the current extended Switch matches the first packet encapsulation packet through the flow table entry in table 0'; when the flow table entry in table 0' is successfully matched, the flow table recovery instruction and/or the flow table jump instruction in the matched flow table entry are executed in sequence according to the matching result.
Further, after the current extended Switch performs recovery of the pipeline environment, the obtained data packet may continue to be processed, a processing manner of the data packet is similar to that in the foregoing embodiment, and the position of a next-hop flow table for processing the data packet may also be determined by combining the mapping information, and the processing manner is determined, specifically, on the basis of the embodiment shown in fig. 10, the method further includes: when the current extended Switch acquires the data message, processing the data message through the current flow table, and judging the position of a next-hop flow table according to the mapping information, on one hand, when the next-hop flow table is positioned in the current extended Switch, the next-hop flow table is still processed by the flow table in the current extended Switch, and the data message can be directly jumped to the next-hop flow table for continuous processing; on the other hand, when the current extended Switch finds that the data packet needs to be continuously processed by other extended switches, that is, when the current extended Switch determines that the next-hop flow table is located in other extended switches, pipeline environment protection on the multistage flow table needs to be performed to generate a second packet, and the generated second packet is sent to the extended Switch corresponding to the next-hop flow table. The method provided by this embodiment is specifically protection of a pipeline environment controlled by the current extended Switch, and is decided, initiated and executed by the current extended Switch, and the controller does not need to consider whether each flow table is located in the same physical Switch when issuing a flow table entry.
Optionally, similar to the foregoing embodiment, in another possible implementation manner of this embodiment, protection of a pipeline environment may be controlled by a controller, the controller makes a decision, and the current extended Switch may directly execute a corresponding instruction, where on the basis of the method shown in fig. 10, the method further includes: the current extended Switch receives a flow table entry which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction, the flow table jump instruction or the Switch forwarding instruction in the flow table entry is determined by the controller according to whether a next jump flow table in the flow table entry is located in the current extended Switch, if yes, the flow table entry comprises the flow table jump instruction, and if not, the flow table entry comprises the Switch forwarding instruction. Accordingly, S560 is followed by: when the current extended Switch acquires a data message in a first message encapsulation packet and a flow table item matched with the data message comprises a flow table jump instruction, jumping the data message to a next flow jump table for continuous processing; or, when the current extended Switch acquires the data packet in the first packet encapsulation packet and the flow table entry matched with the data packet includes a Switch forwarding instruction, the current extended Switch initiates protection of the pipeline environment to generate a second packet encapsulation packet, and sends the second packet encapsulation packet to the extended Switch corresponding to the next-hop flow table. In this embodiment, the manner of sending the flow table entry by the controller, and when the flow table entry includes an instruction of a type of "Goto _ table", for example, the determination of the next-hop flow table position and the subsequent processing manner are similar to those in the above embodiments, and therefore, no further description is given here.
It should be noted that, because the method provided in this embodiment is executed by the logic Switch including the current extended Switch and the controller, when the current extended Switch receives a packet encapsulation packet, or jumps an acquired data packet to another extended Switch, unlike the prior art that only uses one fixed physical Switch, in order to implement seamless connection processing of a data packet between physical switches of the same logic Switch, the current expansion needs to initiate recovery and protection of a pipeline environment. The switch processing method provided in this embodiment has the same beneficial effects as those of the above embodiments, and therefore, the description thereof is omitted here.
EXAMPLE six
Fig. 11 is a flowchart of a switch processing method according to a sixth embodiment of the present invention. The Switch processing method provided by the present embodiment is performed by a controller and a logical Switch, and similarly to the above-described embodiments, the logical Switch includes at least a plurality of physical switches, where the plurality of physical switches includes a main Switch and an extended Switch, the extended Switch may be a plurality of switches, for example, includes a first extended Switch and a second extended Switch, and the controller is connected to at least the main Switch, the main Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch. As shown in fig. 11, the method of this embodiment specifically includes the following steps:
S601, the controller allocates each flow table in the multi-stage flow table of the logical Switch, which is a pipeline of the logical Switch, to each physical Switch.
S602, the controller sends mapping information and flow table entries, where the mapping information includes mapping relationships between each flow table in the multiple levels of flow tables and each physical Switch, and the flow table entries are content information of each flow table in the flow table set allocated by the controller for each physical Switch.
In this embodiment, the flow entries received by the master Switch may only include the flow entry corresponding to the master Switch, and may also include the flow entry corresponding to each physical Switch, in this case, the method provided in this embodiment further includes:
s603, the primary Switch forwards the mapping information and the flow table entry allocated by the controller to the extended Switch connected thereto. It should be noted that this step is optional, and is specifically related to the connection mode of each physical Switch and the controller.
In this embodiment, the manner in which the current extended Switch receives the mapping information and the flow entry corresponds to the sending manner, and the mapping information and the flow entry received by the current extended Switch may be sent directly by the controller, may be forwarded by the master Switch, may be forwarded by another extended Switch, or may be a combination of the foregoing manners.
Note that when the controller assumes that each of the flow tables in the multi-stage flow tables is assigned to a different physical Switch, the first-stage flow table0 in the multi-stage flow table of the logical Switch is inevitably allocated to the master Switch. In this embodiment, the distribution manner of the mapping information and the flow table entry is the same as that in the above embodiment, and is related to the connection relationship between each physical Switch and the controller, and the connection relationship between each physical Switch and the controller in this embodiment may refer to fig. 3, and therefore, details are not described here again. It should be further noted that the sending of the mapping information and the flow item by the controller and the receiving of the mapping information and the flow item by each physical Switch are usually performed separately, and in the steps of the embodiment shown in fig. 11, only the execution bodies of the sending and receiving of the mapping information and the flow item are shown, and it is not described that the mapping information and the flow item are sent simultaneously or received simultaneously.
In this embodiment, the processing mode of the primary Switch after receiving the data packet may specifically be:
s604, the primary Switch receives the data message; the data message received by the primary Switch may be a Host, for example, a data message sent by a computer that can access the primary Switch.
S605, the master Switch processes the data packet through table 0.
S606, the main Switch judges whether the next-hop flow table is located in the main Switch according to the mapping information; if so, S607 is executed, otherwise, S608 is executed.
S607, the master Switch jumps the data message to the next jump table for processing;
s608, the master Switch initiates protection of the pipeline environment to generate a first packet, and sends the first packet to the extended Switch corresponding to the next-hop flow table.
The manner described in S605-S608 is protection of the pipeline environment controlled by the master Switch.
In another possible implementation manner of this embodiment, the protection of the pipeline environment is controlled by the controller, specifically, the flow table entry received by the master Switch includes a flow table jump instruction or a Switch forwarding instruction, and accordingly, the foregoing S605 to S608 are replaced with:
s609, when the flow table item sent to the main Switch comprises a flow table jump instruction, the controller judges whether a next jump flow table is positioned in the main Switch; if yes, go to S610, otherwise go to S612.
S610, the controller sends a flow table entry containing the flow table jump instruction to the master Switch;
correspondingly, S611, the master Switch jumps the data packet to the next-jump table for further processing.
S612, the controller replaces the flow table jump instruction in the flow table item to be sent with a Switch forwarding instruction;
s613, sending the flow table entry containing the Switch forwarding instruction to the master Switch;
correspondingly, S614, the master Switch initiates protection of the pipeline environment to generate a first packet encapsulation packet;
s615, the primary Switch sends the first packet encapsulation packet to the extended Switch corresponding to the next-hop flow table.
In this embodiment, after the main Switch sends a first packet encapsulation packet generated after pipeline environment protection to the current extended Switch, the current extended Switch processes the first packet encapsulation, which specifically includes;
s616, the previous extension Switch determines whether the next-hop table ID in the first packet is located in the current extension Switch; if not, S617 is performed, and if yes, S618 is performed.
S617, the current extended Switch forwards the first message encapsulation packet to other extended switches corresponding to the next-hop flow table ID according to the mapping information;
s618, the current extended Switch restores the pipeline environment of the first packet to obtain the data packet.
In this embodiment, when the current extended Switch receives and processes the first packet, the method of processing the first packet is determined according to the next-hop table ID in the first packet, and the current extended Switch recovers the pipeline environment, which may be controlled by the current extended Switch, that is, S618 is replaced with: the current extended Switch analyzes the received first packet encapsulation packet to obtain analysis information, wherein the analysis information comprises a data packet and related information for processing the data packet, the related information for processing the data packet at least comprises a next-hop table ID, and optionally comprises the following information in any quantity: ingress port, Action set, and Metadata.
Optionally, in another possible implementation manner of this embodiment, the controller may further control the recovery of the pipeline environment, and in a specific implementation, the method further includes: s619, the current extended Switch receives the flow table entry which is sent by the controller and used for pipeline recovery; s620, the current extended Switch adds a flow table entry for pipeline recovery to the first-level flow table 0' of the current extended Switch; s621, the current extended Switch recovers the pipeline environment for the received first packet encapsulation packet through the flow entry added in table 0'.
In this implementation, the first packet encapsulation packet includes a next skip flow table ID, and the flow table entry for pipeline recovery includes a matching section and an execution instruction, where the execution instruction includes a flow table recovery instruction and/or a flow table skip instruction; s621 specifically includes: the current extended Switch matches the first packet encapsulation packet through the flow table entry in table 0'; when the flow table entry in table 0' is successfully matched, the flow table recovery instruction and/or the flow table jump instruction in the matched flow table entry are executed in sequence according to the matching result.
Further, after the current extended Switch executes the recovery of the pipeline environment, the obtained data packet may be processed continuously, a processing manner of the data packet is similar to that in the foregoing embodiment, and a position of a next-hop table for processing the data packet may also be determined by combining the mapping information, and a processing manner is determined, specifically, the method provided in this embodiment further includes:
S622, the current extended Switch obtains the data packet, and processes the data packet through the current flow table;
s623, the current extended Switch mapping information judges whether a next-hop flow table for processing the data message is located in the current extended Switch; if so, S624 is executed, and if not, S625 is executed.
S624, the current extended Switch jumps the data message to the next-jump flow table for processing;
s625, the current extended Switch initiates protection of the pipeline environment and generates a second message encapsulation packet;
the manner described in the above S623 to S625 is a manner of pipeline environment protection of the current extended Switch control.
Optionally, similar to the foregoing embodiment, in another possible implementation manner of this embodiment, protection of a pipeline environment that may be controlled by a controller, where a current extension Switch receives a flow table entry including a flow table jump instruction or a Switch forwarding instruction, in a specific implementation, the foregoing S623 to S625 are replaced with:
s626, when the to-be-sent flow table entry includes the flow table jump instruction, the controller determines whether the next flow jump table is located in the current physical Switch; if yes, go to S627, otherwise, go to S629.
S627, the controller sends a flow table entry containing the flow table jump instruction to the current extended Switch;
accordingly, S628, the current extended Switch jumps the data packet to the next-jump table for further processing.
S629, replacing a flow table jump instruction in a flow table item to be sent by a Switch forwarding instruction by the controller;
s630, the controller sends the current extended Switch the flow table entry containing the Switch forwarding instruction.
Correspondingly, the method provided by the embodiment further includes: s631, the current extended Switch initiates protection of the pipeline environment to generate a second packet encapsulation packet;
s632, the current extended Switch sends the second packet to the extended Switch corresponding to the next-hop flow table for further processing.
It should be noted that, because the method provided in this embodiment is executed by the controller, and the logical Switch formed by the main Switch and the extended Switch is executed, when processing a data packet and jumping to the next-hop flow table, unlike the prior art that only one fixed physical Switch is used, for confidentiality of the data packet, the main Switch or the current extended Switch needs to initiate protection of the pipeline environment before jumping the data packet to another physical Switch. After receiving the packet protected by the pipeline environment, the current extended Switch needs to initiate recovery of the pipeline environment to obtain the data packet. The switch processing method provided in this embodiment includes the method described in any of the above embodiments, and the specific implementation manner and beneficial effects are the same as those in the above embodiments, and therefore are not described herein again.
EXAMPLE seven
Fig. 12 is a schematic structural diagram of a switch processing apparatus according to a seventh embodiment of the present invention. The Switch processing apparatus is applied to the Switch processing system shown in fig. 2 or fig. 3, and is specifically disposed in a controller connected to a logical Switch, as shown in fig. 2 or fig. 3, where the logical Switch includes at least two physical switches; the device arranged in the controller specifically comprises: an allocation module 11 and a sending module 12.
The allocating module 11 is configured to allocate each flow table in the multi-stage flow tables of the logical Switch to each physical Switch, where the multi-stage flow tables are pipelines of the logical Switch.
A sending module 12, configured to send mapping information, so that each physical Switch obtains the mapping information, where the mapping information includes a mapping relationship between each flow table in the multiple stages of flow tables and the physical Switch.
The sending module 12 is further configured to send a flow entry to the logical Switch, so that each physical Switch obtains a flow entry corresponding to the logical Switch, and process the received data packet according to the flow entry, or according to the flow entry and the mapping information, where the flow entry is content information of each flow table in a flow table set allocated by the controller for each physical Switch.
When a physical Switch of a logical Switch connected to a controller in this embodiment includes a main Switch and a first extended Switch, a connection relationship between the controller and each physical Switch in the logical Switch is as shown in fig. 2; in the logical Switch connected to the controller in this embodiment, when the physical Switch further includes the second extended Switch, the connection relationship between the controller and each physical Switch in the logical Switch is as shown in fig. 3; the controller transmits the mapping information and the flow table entry in the same manner as in the above-described embodiment, including multiple transmission manners and combined use of various transmission manners.
It should be noted that, in the Switch processing systems shown in fig. 2 and fig. 3, the master Switch is a Switch connected to a controller and determined in the network, and the flow table allocated by the allocation module 11 for the master Switch includes at least a first-level flow table (table0) in the multi-level flow tables of the logical Switch, so that the master Switch firstly processes the data packet through the table0 when receiving the data packet, and the other physical switches perform receiving and forwarding of the mapping information and the flow table entry according to the connection relationship with the master Switch and with the upper-level and lower-level physical switches.
The switch processing apparatus provided in the embodiment of the present invention is configured to execute the switch processing method provided in the embodiment shown in fig. 1 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
Optionally, the sending module 12 is further configured to send the flow entry to the logic Switch, and specifically includes: sending a flow table entry to the logical Switch, so that when the current physical Switch receives a data packet, the data packet is processed through the current flow table, and the position of the next-hop flow table is determined according to the mapping information sent by the sending module 12, when the determined next-hop flow table is located in the current physical Switch, the data packet is skipped to the next-hop flow table for continuous processing, or, when the determined next-hop flow table is located in another physical Switch, protection of a pipeline environment is initiated to generate a packet encapsulation packet, and the packet encapsulation packet is sent to the physical Switch corresponding to the next-hop flow table. The Switch processing apparatus provided in this embodiment is decided, initiated, and executed by the Switch when the pipeline environment of execution is protected, and the controller does not need to consider whether each flow table is located in the same physical Switch when issuing the flow table entry.
The switch processing apparatus provided in the embodiment of the present invention is configured to execute the switch processing method provided in the embodiment shown in fig. 5 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
In another possible implementation manner of this embodiment, as shown in fig. 13, it is a flowchart of a structure of another switch processing apparatus provided in this embodiment of the present invention. Specifically, for the protection of the pipeline environment controlled by the controller, the controller makes a decision, and the Switch directly executes the corresponding instruction, and based on the structure of the apparatus shown in fig. 12, the sending module 12 includes: a judging unit 13, configured to judge whether a next-hop flow table is located in the current physical Switch when the flow table item to be sent includes a flow table jump instruction; an executing unit 14, configured to send a flow table entry including a flow table jump instruction to the current physical Switch when the determining unit 13 determines that the next-hop flow table is located in the current physical Switch, so that the current physical Switch jumps the data packet to the next-hop flow table for processing; or, the executing unit 14 is configured to, when the determining unit determines that the next-hop flow table is located in another physical Switch, replace the flow table jump instruction in the flow table entry to be sent with a Switch forwarding instruction, and send the flow table entry including the Switch forwarding instruction to the current physical Switch, so that the current physical Switch initiates protection of the pipeline environment to generate a packet encapsulation packet, and send the packet encapsulation packet to the physical Switch corresponding to the next-hop flow table.
It should be noted that, in the above embodiments, although the control manner when the protection of the pipeline environment is performed is different, the protection manner of the pipeline environment by the current physical Switch is the same, specifically: the current physical Switch encapsulates the relevant information for processing the data message and the data message in a message encapsulation packet at the same time, wherein the relevant information for processing the data message at least comprises a next-hop table ID, and optionally comprises any number of the following information: ingress port, Action set, and Metadata.
Further, after the current physical Switch performs protection of the pipeline environment, the packet encapsulation packet generated by the pipeline environment protection is sent to the physical Switch corresponding to the next-hop flow table, and accordingly, the physical Switch corresponding to the next-hop flow table needs to perform recovery of the pipeline environment to acquire the data packet, and the apparatus provided in this embodiment controls recovery of the pipeline environment by the physical Switch corresponding to the next-hop flow table, specifically, the physical Switch parses the received packet encapsulation packet to obtain parsing information, which includes the data packet and related information for processing the data packet, the method for resuming the pipeline environment according to the analysis information and skipping the data message obtained by analysis to the next-hop flow table for processing is the same as the above embodiment, and therefore, the description thereof is omitted here.
Optionally, in another possible implementation manner of this embodiment, recovery of the pipeline environment may be controlled by the controller, and specifically, the flow entry corresponding to the extended Switch sent by the sending module 12 includes a flow entry for performing pipeline recovery; the sending module 12 is further configured to send the flow entry for pipeline recovery to the extended Switch, so that the extended Switch adds the flow entry to the first-stage flow table0 'of the extended Switch, and when receiving the packet encapsulation packet, recovers the pipeline environment through the flow entry added in the table 0'. It should be noted that, the sending module 12 usually sends the flow table entry in advance, and in this embodiment, the sending module 12 is not limited to send the flow table entry including the Switch forwarding instruction and the sending order of the flow table entry for performing pipeline recovery.
In this embodiment, the extended Switch performs recovery of the pipeline environment through a received flow entry sent by the controller for performing pipeline environment recovery, the flow entry sent by the sending module 12 for performing pipeline recovery may include a matching part and an execution instruction, the next-hop flow table ID in the packet is specifically used as a matching object of the flow entry matching part, the execution instruction may include a flow table recovery instruction and/or a flow table jump instruction, and a specific process of recovering the pipeline environment is as follows: and the extended Switch matches the received packet encapsulation packet through the flow table entry in the table0 ', and when the next flow-hopping table ID is matched with the flow table entry in the table 0', sequentially executes the flow table recovery instruction and/or the flow table hopping instruction in the matched flow table entry according to the matching result.
The switch processing apparatus provided in the embodiment of the present invention is configured to execute the switch processing method provided in the embodiment shown in fig. 6 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
Example eight
Fig. 14 is a schematic structural diagram of a switch processing apparatus according to an eighth embodiment of the present invention. The Switch processing apparatus is applied to the Switch processing system shown in fig. 2 or fig. 3, and is specifically disposed in a physical Switch of a logical Switch connected to a controller, as shown in fig. 2 or fig. 3, the logical Switch includes at least two physical switches, the at least two physical switches include a main Switch and an extended Switch, the controller is connected to at least the main Switch, and the Switch processing apparatus is specifically disposed in the main Switch; the device disposed in the master Switch specifically includes: a receiving module 21 and a processing module 22.
The receiving module 21 is configured to receive mapping information sent by the controller, where the mapping information includes mapping relationships between each flow table in the multi-stage flow tables of the logical Switch and the physical Switch.
The receiving module 21 is further configured to receive a flow table entry sent by the controller, where the flow table entry received by the receiving module 21 is allocated by the controller for the master Switch, or content information of each flow table in a flow table set allocated by the controller for the master Switch and the extended Switch.
The processing module 22 is configured to process the data packet received by the primary Switch according to the flow table entry received by the receiving module 21, or according to the flow table entry and the mapping information received by the receiving module 21.
In this embodiment, when the controller respectively gives each flow table in the multi-stage flow tables to different physical switches to bear, the first-stage flow table0 in the multi-stage flow table of the logical Switch is inevitably allocated to the master Switch, and the processing module 22 is specifically configured to process the received data packet through the table0 according to the flow table entry received by the receiving module 21, or according to the flow table entry and the mapping information received by the receiving module 21. Similar to the foregoing embodiment, the extended Switch in this embodiment may also include a first extended Switch and a second extended Switch, where the main Switch is connected to at least the first extended Switch, the second extended Switch is connected to at least the first extended Switch, a distribution manner of the mapping information and the flow table entry is the same as that in the foregoing embodiment, and is related to a connection relationship between each physical Switch and the controller, and in this embodiment, reference may be made to fig. 2 and fig. 3 for the connection relationship between each physical Switch and the controller, and therefore details are not repeated here. It should be noted that, in this embodiment, the data packet received by the primary Switch may be generally sent by an external node, for example, a computer that can access the primary Switch.
The switch processing apparatus provided in the embodiment of the present invention is configured to execute the switch processing method provided in the embodiment shown in fig. 7 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
Fig. 15 is a schematic structural diagram of another switch processing apparatus according to an embodiment of the present invention. On the basis of the structure of the switch processing apparatus shown in fig. 14, the processing module 22 includes a processing unit 23, configured to process a data packet when the data packet is received; the judging unit 24 is configured to judge a position of a next skip list according to the mapping information received by the receiving module 21; the processing unit 23 is further configured to jump the data packet to the next-hop table for further processing when the determining unit 24 determines that the next-hop table is located in the master Switch; or, the processing unit 23 is further configured to initiate protection of the pipeline environment to generate a packet encapsulation packet and send the packet encapsulation packet to the extended Switch corresponding to the next-hop flow table when the determining unit 24 determines that the next-hop flow table is located in the extended Switch. The embodiment shown in fig. 15 is protection of a pipeline environment controlled by the master Switch, and is specifically decided, initiated and executed by the master Switch, and the controller does not need to consider whether each flow table is located in the same physical Switch when issuing a flow table entry.
The switch processing apparatus provided in the embodiment of the present invention is configured to execute the switch processing method provided in the embodiment shown in fig. 8 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
Optionally, in another possible implementation manner of the present invention, the protection of the pipeline environment may be controlled by the controller, specifically, the controller makes a decision, and the master Switch may directly execute a corresponding instruction, and may be executed by the apparatus shown in fig. 14, where the receiving module 21 is further configured to receive a flow entry sent by the controller, and specifically, the receiving module includes: receiving a flow table item which is sent by a controller and comprises a flow table jump instruction or a Switch forwarding instruction, wherein the flow table jump instruction or the Switch forwarding instruction in the flow table item is determined by the controller according to whether a next flow jump table in the flow table item is located in a main Switch, if so, the flow table item comprises the flow table jump instruction, and if not, the flow table item comprises the Switch forwarding instruction; the processing module 22 is specifically configured to jump the data packet to the next flow-jumping table for further processing when the flow table entry matched with the received data packet includes the flow-table jump instruction; or, the processing module 22 is specifically configured to, when a flow entry matched with the received data packet includes a Switch forwarding instruction, initiate protection of a pipeline environment to generate a packet encapsulation packet, and send the packet encapsulation packet to an extended Switch corresponding to a next-hop flow table.
In a specific implementation of this embodiment, the processing module 22 initiates protection of the pipeline environment, including: the related information for processing the data message and the data message are encapsulated in a message encapsulation packet at the same time, wherein the related information for processing the data message at least comprises a next-hop table ID, and optionally comprises any number of the following information: ingress port, Action set, and Metadata.
Further, after the processing module 22 performs protection of the pipeline environment, the packet encapsulation packet generated by performing protection of the pipeline environment is sent to the extended Switch corresponding to the next-hop flow table, and accordingly, the extended Switch needs to perform recovery of the pipeline environment to obtain a data packet, the Switch processing apparatus provided in this embodiment is controlled by the extended Switch when performing recovery of the pipeline environment, specifically, the extended Switch parses the received packet encapsulation packet to obtain parsing information, the parsing information includes the data packet and related information for processing the data packet, the related information for processing the data packet also includes a next-hop flow table ID, and optionally includes any number of the following information: the method for recovering the pipeline environment according to the analysis information, skipping the data message obtained by analysis to the next-skip flow table for continuous processing, and skipping the data message to the next-skip flow table is the same as the above embodiment, and therefore, the detailed description is omitted here. Similarly, the restoration of the pipeline environment may also be implemented in a manner controlled by the controller, and the specific implementation manner is the same as that in the foregoing embodiment, because the Switch processing apparatus provided in this embodiment is specifically disposed in the master Switch, the processing performed by the master Switch does not involve the restoration of the pipeline environment, and therefore, details are not described here again.
Example nine
Fig. 16 is a schematic structural diagram of a switch processing apparatus according to a ninth embodiment of the present invention. The Switch processing apparatus is applied to the Switch processing system shown in fig. 3, and is specifically disposed in a physical Switch of a logical Switch connected to a controller, as shown in fig. 2 or fig. 3, where the logical Switch includes a plurality of physical switches, the plurality of physical switches includes a main Switch and an extended Switch, the extended Switch includes a first extended Switch and a second extended Switch, the controller is connected to at least the main Switch, the main Switch is connected to at least the first extended Switch, the second extended Switch is connected to at least the first extended Switch, and the Switch processing apparatus is specifically disposed in the extended Switch; the apparatus arranged in the extended Switch specifically includes: a receiving module 31 and a processing module 32.
The receiving module 31 is configured to receive mapping information sent by the controller and/or the master Switch and/or other extension switches, where the mapping information includes mapping relationships between each flow table in the multi-stage flow tables of the logical Switch and the physical Switch;
the receiving module 31 is further configured to receive a flow table entry corresponding to the current extended Switch sent by the controller and/or the master Switch and/or other extended switches, where the flow table entry received by the receiving module 31 is content information of each flow table in a flow table set allocated by the controller for the current extended Switch;
The processing module 32 is configured to process a first packet received by the current extended Switch according to the flow table entry received by the receiving module 31, or according to the flow table entry and the mapping information received by the receiving module 31, where the first packet is generated by encapsulating, by the physical Switch where the previous hop table is located, the received data packet and related information for processing the data packet.
The embodiment may be executed by the first extended Switch or the second extended Switch, and the receiving manner of the mapping information and the flow table entry sent by the controller by the extended Switch is similar to that in the above embodiment, that is, the mapping information and/or the flow table entry received by the current extended Switch may be sent directly by the controller, may be forwarded by the main Switch, may be forwarded by other extended switches, or may be a combination of the foregoing manners. Note that, when the controller is configured to assign each of the flow tables of the multi-stage flow tables to a different physical Switch, the first-stage flow table0 of the multi-stage flow table of the logical Switch is inevitably allocated to the master Switch, and therefore, the table0 of the multi-stage flow table of the logical Switch specifically corresponds to the master Switch in the mapping information received by the receiving module 31. In this embodiment, the distribution manner of the mapping information and the flow table entry is the same as that in the above embodiment, and is related to the connection relationship between each physical Switch and the controller, and the connection relationship between each physical Switch and the controller in this embodiment may refer to fig. 3, and therefore, details are not described here again.
The switch processing apparatus provided in the embodiment of the present invention is configured to execute the switch processing method provided in the embodiment shown in fig. 9 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
In this embodiment, the receiving module 31 is further configured to receive a first packet encapsulation packet after receiving the flow entry corresponding to the current extended Switch; the processing module 32 is specifically configured to, when it is determined that the next-hop flow table number ID in the first packet received by the receiving module 31 is located in another physical Switch, forward the first packet received by the receiving module 31 to a physical Switch corresponding to the next-hop flow table ID according to the mapping information received by the receiving module 31; or, the processing module 32 is specifically configured to, when it is determined that the next-hop flow table ID in the first packet received by the receiving module 31 is located in the current extended Switch, perform pipeline environment recovery on the first packet received by the receiving module 31, so as to obtain a data packet.
Fig. 17 is a schematic structural diagram of another switch processing apparatus according to an embodiment of the present invention. In a specific implementation of this embodiment, when the processing module 32 of the current extended Switch performs recovery of the pipeline environment, the processing module 32 may control the recovery of the pipeline environment by the current extended Switch, and includes: the parsing unit 33 is configured to parse the first packet encapsulation packet received by the receiving module 31 to obtain parsing information, where the parsing information includes a data packet and related information for processing the data packet, where the related information for processing the data packet at least includes a next-hop table ID, and optionally includes any number of the following information: ingress port, Action set and Metadata; the processing unit 34 is configured to perform recovery of the pipeline environment according to the analysis information obtained by the analysis unit 33, jump the data packet to the next-hop table for processing, and jump the data packet to the next-hop table in the same manner as in the above embodiment, which is not described herein again.
Optionally, in another possible implementation manner of this embodiment, recovery of the pipeline environment may also be controlled by the controller, specifically, the controller makes a decision, and the Switch may directly execute a corresponding instruction, in a specific implementation, a current flow entry received by the extended Switch includes a flow entry sent by the controller for performing pipeline recovery, and accordingly, a flow entry received by the receiving module 31 includes a flow entry sent by the controller for performing pipeline recovery; the processing module 32 includes: an adding unit configured to add a flow entry for pipeline recovery to the first-stage flow table 0' of the current extended Switch; and the processing unit recovers the pipeline environment for the first packet encapsulation packet received by the receiving module through the flow entry added in the table 0'. In a specific implementation, the first packet encapsulation packet received by the receiving module 31 includes a next skip table ID, and the flow table entry received by the receiving module 31 for performing pipeline recovery includes a matching part and an execution instruction, where the execution instruction includes a flow table recovery instruction and/or a flow table skip instruction; the processing unit is specifically configured to match the first packet encapsulation packet received by the receiving module 31 through the flow table entry in table 0'; and when the flow table entries in table 0' are successfully matched, sequentially executing the flow table recovery instruction and/or the flow table jump instruction in the matched flow table entries according to the matching result
Further, after the processing module 32 of the current extended Switch performs recovery of the pipeline environment, the obtained data packet may be continuously processed, a processing manner of the data packet is similar to that in the above embodiment, and a position of a next-hop flow table for processing the data packet may also be determined by combining mapping information, and the processing manner is determined, specifically, on the basis of the structure of the Switch processing apparatus shown in fig. 17, the processing module 32 is further configured to perform recovery of the pipeline environment on the first packet encapsulation packet received by the receiving module 31, and process the data packet through the current flow table when the data packet is obtained; the apparatus further comprises: the judging module 35 is configured to judge a position of a next skip list according to the mapping information; the processing module 32 is further configured to jump the data packet to the next-hop flow table for further processing when the determining module 35 determines that the next-hop flow table is located in the current extended Switch; or, the processing module 32 is further configured to initiate protection of the pipeline environment to generate a second packet encapsulation packet and send the second packet encapsulation packet to the extended Switch corresponding to the next-hop flow table when the determining module determines that the next-hop flow table is located in another extended Switch. The method provided by this embodiment is specifically protection of a pipeline environment controlled by the current extended Switch, and is decided, initiated and executed by the current extended Switch, and the controller does not need to consider whether each flow table is located in the same physical Switch when issuing a flow table entry.
Optionally, similar to the foregoing embodiment, in another possible implementation manner of this embodiment, protection of a pipeline environment may be controlled by a controller, the controller makes a decision, and the current extended Switch may directly execute a corresponding instruction, where the specific implementation manner is: the receiving module 31 is further configured to receive a flow table entry including a flow table jump instruction or a Switch forwarding instruction sent by the controller, where the flow table jump instruction or the Switch forwarding instruction in the flow table entry is determined by the controller according to whether a next-jump flow table in the flow table entry is located in a current extended Switch, if yes, the flow table entry includes the flow table jump instruction, and if not, the flow table entry includes the Switch forwarding instruction; the processing module 32 is further configured to obtain the data packet in the first packet encapsulation packet after performing pipeline environment recovery on the first packet encapsulation packet received by the receiving module 31, and when a flow table entry matched with the data packet includes a flow table jump instruction, jump the data packet to a next jump flow table for further processing; or, when the data packet in the first packet encapsulation packet is acquired and the flow table entry matched with the data packet includes a Switch forwarding instruction, the protection of the pipeline environment is initiated to generate a second packet encapsulation packet, and the second packet encapsulation packet is sent to the extended Switch corresponding to the next-hop flow table.
It should be noted that, in the foregoing embodiment, the manner in which the processing module 32 initiates the recovery of the pipeline environment is the same, and specifically includes: and simultaneously encapsulating the related information for processing the data message and the data message in a second message encapsulation packet, wherein the related information for processing the data message at least comprises a next-hop table ID and any number of the following information: ingress port, Action set, and Metadata.
The switch processing apparatus provided in the embodiment of the present invention is configured to execute the switch processing method provided in the embodiment shown in fig. 10 of the present invention, and has corresponding functional modules, which implement similar principles and technical effects, and are not described herein again.
Fig. 18 is a schematic structural diagram of a controller according to an embodiment of the present invention. The controller is applied to the Switch processing system shown in fig. 2 or fig. 3, and is specifically connected to a logical Switch, as shown in fig. 2 and fig. 3, the logical Switch includes at least two physical switches; the physical Switch includes a main Switch and a first extended Switch, the controller is connected to at least the first extended Switch, and the first extended Switch is connected to at least the main Switch, as shown in fig. 3, the physical Switch further includes a second extended Switch, and the second extended Switch is connected to at least the first extended Switch, as shown in fig. 18, the controller provided in this embodiment specifically includes a processor 41 and a sender 42, and the manner in which the controller sends the mapping information and the flow table entry and the manner in which the controller is connected to each physical Switch in the logical Switch are the same as those in the foregoing embodiments, and therefore, details are not repeated here.
In the controller provided in this embodiment, the processor 41 is configured to implement the function of the allocating module 11 of the switch processing apparatus in the embodiment shown in fig. 12 to 13, and the transmitter 42 is configured to implement the function of the transmitting module 12 of the switch processing apparatus in the embodiment shown in fig. 12 to 13; the controller provided in the embodiment of the present invention is configured to execute the switch processing method provided in the embodiments shown in fig. 1, fig. 5, and fig. 6 of the present invention, and has a corresponding entity apparatus, which has similar implementation principles and technical effects and is not described herein again.
Fig. 19 is a schematic structural diagram of a master switch according to an embodiment of the present invention. The master Switch is applied to the Switch processing system shown in fig. 2 or fig. 3, and for a physical Switch in a logical Switch connected to a controller, as shown in fig. 2, the logical Switch includes at least two physical switches, the physical Switch includes a master Switch and a first extended Switch, the controller is connected to at least the first extended Switch, and the first extended Switch is connected to at least the master Switch, as shown in fig. 3, the physical Switch further includes a second extended Switch, and the second extended Switch is connected to at least the first extended Switch, as shown in fig. 19, the master Switch provided in this embodiment specifically includes a receiver 51 and a processor 52, and the manner of receiving and forwarding mapping information and flow table items by the master Switch provided in this embodiment and the manner of connecting each extended Switch and controller in the logical Switch are the same as those in the above-described embodiment, and thus details are omitted here.
In the controller provided in this embodiment, the receiver 51 is configured to implement the function of the receiving module 21 of the switch processing apparatus in the embodiment shown in fig. 14 to 15, and the processor 52 is configured to implement the function of the processing module 22 of the switch processing apparatus in the embodiment shown in fig. 14 to 15; the primary Switch provided in the embodiment of the present invention is configured to execute the Switch processing method provided in the embodiments shown in fig. 7 to fig. 8 of the present invention, and has a corresponding entity apparatus, which has similar implementation principles and technical effects, and is not described herein again.
Fig. 20 is a schematic structural diagram of an expansion switch according to an embodiment of the present invention. The extended Switch is applied to the Switch processing system shown in fig. 2 or fig. 3, and for a physical Switch in a logical Switch connected to a controller, as shown in fig. 2, the logical Switch includes at least two physical switches, the physical Switch includes a primary Switch and a first extended Switch, the controller is connected to at least the first extended Switch, and the first extended Switch is connected to at least the primary Switch, as shown in fig. 3, the physical Switch further includes a second extended Switch, and the second extended Switch is connected to at least the first extended Switch, as shown in fig. 20, the extended Switch provided in this embodiment specifically includes a receiver 61 and a processor 62, and the manner of receiving and forwarding mapping information and flow table entries by the extended Switch provided in this embodiment and the manner of connecting other physical switches and controllers in the logical Switch are the same as those in the above-described embodiment, and thus the description is omitted here.
In the controller provided in this embodiment, the receiver 61 is used to implement the function of the receiving module 31 of the switch processing apparatus in the embodiment shown in fig. 16 to 17, and the processor 62 is used to implement the function of the processing module 32 of the switch processing apparatus in the embodiment shown in fig. 16 to 17; the extended Switch provided in the embodiment of the present invention is used to execute the Switch processing method provided in the embodiments shown in fig. 9 to fig. 10 of the present invention, and has corresponding entity apparatuses, which implement similar principles and technical effects and are not described herein again.
Fig. 2 and fig. 3 are schematic structural diagrams of a switch processing system according to an embodiment of the present invention. As shown in fig. 2 and 3, the Switch processing system provided in this embodiment includes the controller shown in fig. 18, the primary Switch shown in fig. 19, and the extended Switch shown in fig. 20, in this embodiment, connection relationships between the controller, the primary Switch, and the extended Switch are as shown in fig. 2 and 3, and ways of sending the mapping information and the flow entry, and receiving and forwarding the mapping information and the flow entry by each physical Switch are the same as those in the above embodiments, and therefore, details are not described here. In the controller in the Switch processing system provided in this embodiment, the main Switch and the extended Switch are used to implement the Switch processing method shown in the embodiments of fig. 1, fig. 5 to fig. 11, and specific corresponding entity devices, which implement similar principles and technical effects, and are not described herein again.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (100)

  1. A Switch processing method, characterized by being performed by a controller and a logical Switch, the logical Switch comprising at least two physical switches; the method comprises the following steps:
    The controller allocates each flow table in a multi-stage flow table of a logical Switch to each physical Switch, wherein the multi-stage flow table is a pipeline of the logical Switch;
    the controller sends mapping information to enable each physical Switch to obtain the mapping information, wherein the mapping information comprises the mapping relation between each flow table in the multi-stage flow tables and the physical Switch;
    the controller sends flow entries to the logical switches, so that each physical Switch obtains a flow entry corresponding to the physical Switch, and processes the received data packet according to the flow entries, or according to the flow entries and the mapping information, where the flow entries are content information of each flow table in a flow table set allocated by the controller for each physical Switch.
  2. The method according to claim 1, wherein the at least two physical switches comprise a primary Switch and a first extended Switch, wherein the controller is connected to at least the primary Switch, and wherein the first extended Switch is connected to at least the primary Switch;
    the controller transmits mapping information including:
    the controller at least sends mapping information to the primary Switch, so that the primary Switch receives the mapping information, and the mapping information received by the first extended Switch includes the mapping information sent by the controller and/or the primary Switch;
    The controller sending a flow table entry to the logic Switch, including:
    the controller sends the flow table entries of the logical switches to at least the main Switch, so that the flow table entries received by the main Switch include the flow table entry corresponding to the main Switch, or the flow table entry corresponding to each physical Switch, so that the flow table entries received by the first extended Switch include the flow table entries sent by the controller and/or the main Switch.
  3. The method of claim 2, wherein the physical Switch further comprises a second extended Switch, the second extended Switch being connected to at least the first extended Switch;
    the controller transmits mapping information including:
    the controller at least sends mapping information to the primary Switch, so that the primary Switch receives the mapping information, and the mapping information received by the first extended Switch includes the mapping information sent by the controller and/or the primary Switch, and the mapping information received by the second extended Switch includes the mapping information sent by the controller and/or the primary Switch and/or the first extended Switch;
    the controller sending a flow table entry to the logic Switch, including:
    The controller sends, to at least the master Switch, flow entries of the logical Switch, so that the flow entries received by the master Switch include the flow entry corresponding to the master Switch, or the flow entry corresponding to the master Switch and the flow entry corresponding to the first extended Switch and/or the second extended Switch, so that the flow entries received by the first extended Switch include the flow entry corresponding to the first extended Switch sent by the controller and/or the master Switch, and so that the flow entries received by the second extended Switch include the flow entry corresponding to the second extended Switch sent by the controller and/or the master Switch and/or the first extended Switch.
  4. The method according to claim 2 or 3, wherein the flow table allocated by the controller for the master Switch at least includes a first-level flow table0 in the multi-level flow tables of the logical Switch, so that the master Switch processes the data packet through the table0 when receiving the data packet.
  5. The method according to any of claims 1-4, wherein the controller sends a flow table entry to the logical Switch, comprising:
    The controller sends a flow table entry to the logic Switch, so that when the current physical Switch receives a data message, the data message is processed through the current flow table, the position of a next-hop flow table is determined according to the mapping information, when the determined next-hop flow table is located in the current physical Switch, the data message is hopped to the next-hop flow table for continuous processing, or when the determined next-hop flow table is located in other physical switches, protection of a pipeline environment is initiated to generate a message encapsulation packet, and the message encapsulation packet is sent to the physical Switch corresponding to the next-hop flow table.
  6. The method according to any of claims 1-4, wherein the controller sends a flow table entry to the logical Switch, comprising:
    when the table entry to be sent includes a table jump instruction, the controller judges whether a next jump table is located in the current physical Switch;
    when determining that the next-hop flow table is located in the current physical Switch, the controller sends a flow table entry containing the flow table jump instruction to the current physical Switch, so that the current physical Switch jumps the data packet into the next-hop flow table for processing; alternatively, the first and second electrodes may be,
    When the controller determines that the next-hop flow table is located in other physical switches, the controller replaces the flow table jump instruction in the to-be-sent flow table item with a Switch forwarding instruction, and sends the flow table item including the Switch forwarding instruction to the current physical Switch, so that the current physical Switch initiates protection on a pipeline environment to generate a packet encapsulation packet, and sends the packet encapsulation packet to the physical Switch corresponding to the next-hop flow table.
  7. The method according to claim 5 or 6, wherein the protection of the pipeline environment is that the current physical Switch encapsulates the data packet and related information for processing the data packet into the packet encapsulation packet at the same time, where the related information for processing the data packet at least includes the next-hop flow table number ID, and further includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
  8. The method according to any one of claims 5 to 7, wherein the protection of the pipeline environment is configured to enable a physical Switch corresponding to the next-hop flow table to parse a received packet to obtain parsing information, so as to recover the pipeline environment according to the parsing information, and jump the data packet to the next-hop flow table for further processing, where the parsing information includes the data packet and information related to processing of the data packet.
  9. The method according to any of claims 5 to 7, wherein the flow table entry corresponding to the extended Switch sent by the controller comprises a flow table entry for pipeline recovery; the method further comprises:
    the controller sends the flow table entry for pipeline recovery to the extended Switch, so that the extended Switch adds the flow table entry to the first-level flow table0 'of the extended Switch, and when the packet encapsulation packet is received, the pipeline environment is recovered through the added flow table entry in the table 0'.
  10. The method according to claim 9, wherein the packet encapsulation packet includes a next-hop flow table ID, the flow table entry for pipeline recovery includes a matching section and an execution instruction, the matching section is used for the extended Switch to use the next-hop flow table ID as a matching object corresponding to the flow table entry, and the execution instruction includes a flow table recovery instruction and/or a flow table jump instruction;
    the recovery of the pipeline environment is that the extended Switch matches the received packet encapsulation packet through the flow table entry in the table0 ', and when the next-hop flow table ID is matched with the flow table entry in the table 0', the flow table recovery instruction and/or the flow table jump instruction in the matched flow table entry are/is sequentially executed according to the matching result.
  11. A Switch processing method, performed by a controller and a logical Switch, wherein the logical Switch includes at least two physical switches including a primary Switch and an extended Switch, and wherein the controller is connected to at least the primary Switch; the method comprises the following steps:
    the master Switch receives mapping information sent by the controller, wherein the mapping information comprises mapping relations between each flow table in the multi-stage flow tables of the logic Switch and the physical Switch;
    the master Switch receives a flow table entry sent by the controller, where the flow table entry received by the master Switch is allocated by the controller for the master Switch, or the controller allocates content information of each flow table in a flow table set to the master Switch and the extended Switch;
    and the main Switch processes the received data message according to the flow table entry or the flow table entry and the mapping information.
  12. The method as claimed in claim 11, wherein after the master Switch receives the mapping relationship sent by the controller, the method further comprises:
    the primary Switch sends the mapping information to the extended Switch connected with the primary Switch;
    After the master Switch receives the flow entry sent by the controller, the method further includes:
    the primary Switch sends the flow table entry allocated by the controller to the extended Switch connected with the primary Switch.
  13. The method according to claim 11 or 12, wherein the extended Switch comprises a first extended Switch and a second extended Switch, the primary Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch;
    after the primary Switch receives the mapping information sent by the controller, the method further includes:
    the primary Switch sends the mapping information to the first extended Switch and/or the second extended Switch;
    after the master Switch receives the flow table entry sent by the controller, the method further includes:
    and the main Switch sends the flow table items allocated by the controller to the first extended Switch and/or the second extended Switch, so that the extended Switch processes the received data packets according to the flow table items corresponding to the extended Switch and the mapping information.
  14. The method according to any of claims 11-13, wherein the mapping information received by the master Switch includes flow tables allocated by the controller, and the flow tables include at least a first-level flow table0 in the multi-level flow tables of the logical Switch; the processing, by the primary Switch, of the received data packet according to the flow table entry or according to the flow table entry and the mapping information includes:
    The main Switch processes the received data packet through the table0 according to the flow table entry or according to the flow table entry and the mapping information.
  15. The method according to any of claims 11 to 14, wherein the processing, by the primary Switch, the received data packet according to the flow table entry or according to the flow table entry and the mapping information includes:
    when receiving a data message, the primary Switch processes the data message and judges the position of a next current-hopping table according to the mapping information;
    when the next-hop table is located in the main Switch, the main Switch jumps the data message to the next-hop table for processing; alternatively, the first and second electrodes may be,
    and when the next-hop flow table is located in the extended Switch, the main Switch initiates protection of a pipeline environment to generate a packet, and sends the packet to the extended Switch corresponding to the next-hop flow table.
  16. The method according to any of claims 11 to 14, wherein the receiving, by the master Switch, the flow table entry sent by the controller comprises:
    the master Switch receives a flow table item which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction, wherein the flow table jump instruction or the Switch forwarding instruction in the flow table item is determined by the controller according to whether a next jump table in the flow table item is located in the master Switch, if yes, the flow table item comprises the flow table jump instruction, and if not, the flow table item comprises the Switch forwarding instruction;
    The processing, by the primary Switch, of the received data packet according to the flow table entry or according to the flow table entry and the mapping information includes:
    the primary Switch receives the data message, and when the flow table item matched with the data message comprises the flow table jump instruction, the data message is jumped to the next flow jump table for processing continuously; alternatively, the first and second electrodes may be,
    and the main Switch receives the data message, when the flow table item matched with the data message comprises the Switch forwarding instruction, the main Switch initiates protection on a pipeline environment to generate a message encapsulation packet, and sends the message encapsulation packet to the extended Switch corresponding to the next-hop flow table.
  17. The method as claimed in claim 15 or 16, wherein the master Switch initiates protection of pipeline environment, comprising:
    the primary Switch encapsulates the relevant information for processing the data packet and the data packet in the packet encapsulation packet at the same time, wherein the relevant information for processing the data packet at least includes the next-hop flow table number ID, and also includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
  18. The method according to any one of claims 15 to 17, wherein the protection of the pipeline environment is configured to enable the extended Switch corresponding to the next-hop flow table to parse the received packet encapsulation packet to obtain parsing information, so as to recover the pipeline environment according to the parsing information, and jump the data packet to the next-hop flow table for further processing, where the parsing information includes the data packet and information related to processing of the data packet.
  19. A Switch processing method, performed by a controller and a logical Switch, the logical Switch comprising a plurality of physical switches, the plurality of physical switches comprising a primary Switch and an extended Switch, the extended Switch comprising a first extended Switch and a second extended Switch, wherein the controller is connected to at least the primary Switch, the primary Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch; the method comprises the following steps:
    the current extended Switch receives mapping information sent by the controller and/or the main Switch and/or other extended switches, where the mapping information includes mapping relationships between each flow table in a multi-stage flow table of a logical Switch and the physical Switch;
    The current extended Switch receives a flow table entry corresponding to the current extended Switch, which is sent by the controller and/or the main Switch and/or other extended switches, where the flow table entry received by the current extended Switch is content information of each flow table in a flow table set allocated by the controller to the current extended Switch;
    and the current extended Switch processes a received first packet encapsulation packet according to the flow table entry or according to the flow table entry and the mapping information, wherein the first packet encapsulation packet is generated by encapsulating the received data packet and related information for processing the data packet by a physical Switch in which a previous-hop flow table is located.
  20. The method according to claim 19, wherein in the mapping information received by the current extended Switch, a first-level flow table0 in the multi-level flow tables of the logical Switch corresponds to the master Switch.
  21. The method according to claim 19 or 20, wherein after the current extended Switch receives the flow table entry corresponding to the current extended Switch sent by the controller and/or the primary Switch and/or other extended switches, the method further comprises:
    The current extended Switch receives the first packet encapsulation packet;
    the current extended Switch determines that the next-hop flow table number ID in the first packet encapsulation packet is located in other physical switches;
    and the current extended Switch forwards the first message encapsulation packet to the physical Switch corresponding to the next-hop flow table ID according to the mapping information.
  22. The method according to claim 19 or 20, wherein after the current extended Switch receives the flow table entry corresponding to the current extended Switch sent by the controller and/or the primary Switch and/or other extended switches, the method further comprises:
    the current extended Switch receives the first packet encapsulation packet;
    the current extended Switch determines that the next-hop flow table number ID in the first packet encapsulation packet is located in the current extended Switch;
    and the current extended Switch recovers the pipeline environment of the first message encapsulation packet to acquire the data message.
  23. The method of claim 22, wherein the restoring the pipeline environment of the first wrapper packet by the current extended Switch comprises:
    the current extended Switch analyzes the received first packet encapsulation packet to obtain analysis information, where the analysis information includes the data packet and related information for processing the data packet, where the related information for processing the data packet at least includes the next-hop flow table ID, and also includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message and information (Metadata) between flow tables;
    And the current extended Switch recovers the pipeline environment according to the analysis information and jumps the data message to a next jump table for processing continuously.
  24. The method of claim 22, wherein the flow entries received by the current extended Switch include flow entries sent by the controller for pipeline recovery; the restoring of the pipeline environment of the first packet encapsulated packet by the current extended Switch includes:
    the current extended Switch adds the flow table entry for pipeline recovery to the first-level flow table 0' of the current extended Switch;
    and the current extended Switch recovers the pipeline environment for the received first packet encapsulation packet through the flow entry added in the table 0'.
  25. The method of claim 24, wherein the first wrapper packet includes a next-hop table ID, wherein the flow table entry for pipeline recovery includes a match portion and an execution instruction, wherein the execution instruction includes a flow table recovery instruction and/or a flow table jump instruction; the recovering of the pipeline environment of the received first packet encapsulation packet by the current extended Switch through the flow entry added in the table 0' includes:
    The current extended Switch matches the first packet encapsulation packet through the flow table entry in the table 0';
    and when the current extended Switch successfully matches the flow table entries in the table 0', sequentially executing a flow table recovery instruction and/or a flow table jump instruction in the matched flow table entries according to a matching result.
  26. The method according to any of claims 22 to 25, wherein after the current extended Switch performs pipeline environment restoration on the first decapsulated packet to obtain the data packet, the method further comprises:
    when the current extended Switch acquires the data message, processing the data message through the current flow table, and judging the position of a next-hop flow table according to the mapping information;
    when the next-hop table is located in the current extended Switch, the current extended Switch jumps the data packet to the next-hop table for processing; alternatively, the first and second electrodes may be,
    and when the next-hop flow table is located in other extended switches, the current extended Switch initiates protection of a pipeline environment to generate a second packet, and the second packet is sent to the extended Switch corresponding to the next-hop flow table.
  27. The method of any one of claims 22 to 25, further comprising:
    the current extended Switch receives a flow table entry which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction, wherein the flow table jump instruction or the Switch forwarding instruction in the flow table entry is determined by the controller according to whether the next jump table in the flow table entry is located in the current extended Switch, if yes, the flow table entry comprises the flow table jump instruction, and if not, the flow table entry comprises the Switch forwarding instruction;
    after the current extended Switch restores the pipeline environment of the first packet encapsulation packet, the method further includes:
    the current extended Switch acquires a data message in the first message encapsulation packet, and when a flow table item matched with the data message comprises the flow table jump instruction, the data message is jumped to the next flow jump table for processing continuously; alternatively, the first and second electrodes may be,
    and the current extended Switch acquires the data message in the first message encapsulation packet, initiates protection on a pipeline environment to generate a second message encapsulation packet when the flow table item matched with the data message comprises the Switch forwarding instruction, and sends the second message encapsulation packet to the extended Switch corresponding to the next-hop flow table.
  28. The method as claimed in claim 26 or 27, wherein the current extended Switch initiates protection of pipeline environment, comprising:
    the current extended Switch encapsulates the relevant information for processing the data packet and the data packet in the second packet encapsulation packet at the same time, wherein the relevant information for processing the data packet at least includes a next-hop flow table ID, and also includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
  29. A Switch processing apparatus, provided in a controller connected to a logical Switch, the logical Switch including at least two physical switches; the device comprises:
    the allocation module is used for allocating each flow table in a multi-stage flow table of the logic Switch to each physical Switch, and the multi-stage flow table is a pipeline of the logic Switch;
    a sending module, configured to send mapping information, so that each physical Switch obtains the mapping information, where the mapping information includes a mapping relationship between each flow table in the multi-stage flow table and the physical Switch;
    The sending module is further configured to send a flow entry to the logical Switch, so that each physical Switch obtains a flow entry corresponding to the physical Switch, and process the received data packet according to the flow entry or according to the flow entry and the mapping information, where the flow entry is content information of each flow table in a flow table set allocated by the controller for each physical Switch.
  30. The apparatus of claim 29, wherein the at least two physical switches comprise a primary Switch and a first extended Switch, wherein the controller is connected to at least the primary Switch, and wherein the first extended Switch is connected to at least the primary Switch;
    the sending module is configured to send mapping information, and specifically includes: sending mapping information to at least the primary Switch, so that the primary Switch receives the mapping information, and the mapping information received by the first extended Switch includes the mapping information sent by the controller and/or the primary Switch;
    the sending module is further configured to send a flow entry to the logic Switch, and specifically includes: sending, to at least the master Switch, the flow table entry of the logical Switch, so that the flow table entry received by the master Switch includes the flow table entry corresponding to the master Switch, or the flow table entry corresponding to each of the physical switches, so that the flow table entry received by the first extended Switch includes the flow table entry sent by the controller and/or the master Switch.
  31. The apparatus of claim 30, wherein the physical Switch further comprises a second extended Switch, the second extended Switch being connected to at least the first extended Switch;
    the sending module is configured to send mapping information, and specifically includes: sending mapping information to at least the primary Switch, so that the primary Switch receives the mapping information, so that the mapping information received by the first extended Switch includes the mapping information sent by the controller and/or the primary Switch, and the mapping information received by the second extended Switch includes the mapping information sent by the controller and/or the primary Switch and/or the first extended Switch;
    the sending module is further configured to send a flow entry to the logic Switch, and specifically includes: sending, at least to the master Switch, flow entries of the logical Switch to cause the flow entries received by the master Switch to include the flow entry corresponding to the master Switch, or the flow entry corresponding to the master Switch and the flow entries corresponding to the first extended Switch and/or the second extended Switch, so that the flow entries received by the first extended Switch include the flow entry corresponding to the first extended Switch sent by the controller and/or the master Switch, and so that the flow entries received by the second extended Switch include the flow entry corresponding to the second extended Switch sent by the controller and/or the master Switch and/or the first extended Switch.
  32. The apparatus according to claim 30 or 31, wherein the flow table allocated by the allocating module for the master Switch includes at least a first-level flow table0 in the multi-level flow tables of the logical Switch, so that the master Switch processes the data packet through the table0 when receiving the data packet.
  33. The apparatus according to any one of claims 29 to 32, wherein the sending module is further configured to send a flow entry to the logic Switch, and specifically includes: and sending a flow table entry to the logic Switch, so that when the current physical Switch receives a data message, the data message is processed through the current flow table, the position of a next-hop flow table is determined according to mapping information sent by the sending module, when the determined next-hop flow table is located in the current physical Switch, the data message is hopped to the next-hop flow table for continuous processing, or when the determined next-hop flow table is located in other physical switches, protection of a pipeline environment is initiated to generate a message encapsulation packet, and the message encapsulation packet is sent to the physical Switch corresponding to the next-hop flow table.
  34. The apparatus according to any one of claims 29 to 32, wherein the sending module comprises: the judging unit is used for judging whether a next-hop flow table is positioned in the current physical Switch or not when the flow table item to be sent comprises a flow table jump instruction;
    an execution unit, configured to send, when the determining unit determines that the next-hop flow table is located in the current physical Switch, a flow table entry including the flow table hop instruction to the current physical Switch, so that the current physical Switch hops the data packet to the next-hop flow table for further processing; alternatively, the first and second electrodes may be,
    the execution unit is configured to, when the determining unit determines that the next-hop flow table is located in another physical Switch, replace the flow table jump instruction in the to-be-sent flow table entry with a Switch forwarding instruction, and send the flow table entry including the Switch forwarding instruction to the current physical Switch, so that the current physical Switch initiates protection of a pipeline environment to generate a packet encapsulation packet, and send the packet encapsulation packet to the physical Switch corresponding to the next-hop flow table.
  35. The apparatus according to claim 33 or 34, wherein the protection of pipeline environment is that the current physical Switch encapsulates the data packet and related information for processing the data packet into the packet encapsulation packet at the same time, wherein the related information for processing the data packet at least includes the next-hop flow table number ID, and further includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
  36. The apparatus according to any one of claims 33 to 35, wherein the protection of the pipeline environment is configured to enable a physical Switch corresponding to the next-hop flow table to parse a packet encapsulation packet received by the physical Switch to obtain parsing information, so as to perform recovery of the pipeline environment according to the parsing information, and jump the data packet to the next-hop flow table for further processing, where the parsing information includes the data packet and information related to processing of the data packet.
  37. The apparatus according to any of claims 33-36, wherein the flow table entry corresponding to the extended Switch sent by the sending module comprises a flow table entry for pipeline recovery; the sending module is further configured to send the flow entry for pipeline recovery to the extended Switch, so that the extended Switch adds the flow entry to a first-stage flow table0 'of the extended Switch, and when the packet encapsulation packet is received, the pipeline environment is recovered through the flow entry added in the table 0'.
  38. The apparatus according to claim 37, wherein the packet encapsulation packet includes a next-hop table ID, the flow table entry sent by the sending module for pipeline recovery includes a matching section and an execution instruction, the matching section is used by the extended Switch to use the next-hop table ID as a matching object corresponding to the flow table entry, and the execution instruction includes a flow table recovery instruction and/or a flow table jump instruction;
    The recovery of the pipeline environment is that the extended Switch matches the received packet encapsulation packet through the flow table entry in the table0 ', and when the next-hop flow table ID is matched with the flow table entry in the table 0', the flow table recovery instruction and/or the flow table jump instruction in the matched flow table entry are/is sequentially executed according to the matching result.
  39. A Switch processing apparatus, configured to be disposed in a physical Switch of a logical Switch connected to a controller, where the logical Switch includes at least two physical switches, the at least two physical switches include a primary Switch and an extended Switch, the controller is connected to at least the primary Switch, and the Switch processing apparatus is specifically disposed in the primary Switch; the device comprises:
    a receiving module, configured to receive mapping information sent by the controller, where the mapping information includes mapping relationships between each flow table in a multi-stage flow table of a logical Switch and the physical Switch;
    the receiving module is further configured to receive a flow entry sent by the controller, where the flow entry received by the receiving module is content information of each flow table in a flow table set allocated by the controller for the primary Switch, or allocated by the controller for the primary Switch and the extended Switch;
    And the processing module is used for processing the data message received by the primary Switch according to the flow table entry received by the receiving module or according to the flow table entry and the mapping information received by the receiving module.
  40. The apparatus of claim 39, further comprising: a sending module, configured to send the mapping information to an extended Switch connected to the receiving module after the receiving module receives the mapping relationship sent by the controller;
    the sending module is further configured to send the flow entry allocated by the controller to an extended Switch connected to the receiving module after the receiving module receives the flow entry sent by the controller.
  41. The apparatus as claimed in claim 39 or 40, wherein the extended Switch comprises a first extended Switch and a second extended Switch, the main Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch;
    the sending module is configured to send the mapping information to an extended Switch connected to the sending module, and specifically includes: sending the mapping information to the first extended Switch and/or the second extended Switch;
    The sending module is further configured to send the flow entry allocated by the controller to an extended Switch connected to the sending module, and specifically includes: and sending the flow table entry allocated by the controller to the first extended Switch and/or the second extended Switch, so that the extended Switch processes the received data packet according to the flow table entry corresponding to the extended Switch and the mapping information.
  42. The apparatus according to any of claims 39-41, wherein the mapping information received by the receiving module includes flow tables allocated by the controller for the master Switch, and the flow tables include at least a first-level flow table0 in the multi-level flow tables of the logical Switch; the processing module is specifically configured to process the received data packet through the table0 according to the flow table entry received by the receiving module, or according to the flow table entry and the mapping information received by the receiving module.
  43. The apparatus of any one of claims 39 to 42, wherein the processing module comprises: the processing unit is used for processing the data message when the data message is received;
    the judging unit is used for judging the position of the next skip flow table according to the mapping information received by the receiving module;
    The processing unit is further configured to jump the data packet to the next-hop flow table for processing continuously when the determining unit determines that the next-hop flow table is located in the master Switch; alternatively, the first and second electrodes may be,
    the processing unit is further configured to initiate protection of a pipeline environment to generate a packet encapsulation packet and send the packet encapsulation packet to the extended Switch corresponding to the next-hop flow table when the determining unit determines that the next-hop flow table is located in the extended Switch.
  44. The apparatus according to any one of claims 39 to 42, wherein the receiving module is further configured to receive a flow table entry sent by the controller, and specifically includes: receiving a flow table item which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction, wherein the flow table jump instruction or the Switch forwarding instruction in the flow table item is determined by the controller according to whether a next jump table in the flow table item is located in the main Switch, if so, the flow table item comprises the flow table jump instruction, and if not, the flow table item comprises the Switch forwarding instruction;
    the processing module is specifically configured to jump the data packet to the next jump table for processing when the flow table entry matched with the received data packet includes the flow table jump instruction; alternatively, the first and second electrodes may be,
    The processing module is specifically configured to initiate protection of a pipeline environment to generate a packet encapsulation packet when the flow entry matched with the received data packet includes the Switch forwarding instruction, and send the packet encapsulation packet to the extended Switch corresponding to the next-hop flow table.
  45. The apparatus of claim 43 or 44, wherein the processing module initiates protection of a pipeline environment, comprising: and encapsulating the related information for processing the data message and the data message in the message encapsulation packet at the same time, wherein the related information for processing the data message at least comprises the next-hop flow table number ID and any amount of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
  46. The apparatus according to any one of claims 43 to 45, wherein the protection of the pipeline environment is configured to enable the extended Switch corresponding to the next-hop flow table to parse the received packet encapsulation packet to obtain parsing information, so as to perform pipeline environment recovery according to the parsing information, and jump the data packet to the next-hop flow table for further processing, where the parsing information includes the data packet and information related to processing of the data packet.
  47. A Switch processing apparatus, configured to be disposed in a physical Switch of a logical Switch connected to a controller, wherein the logical Switch includes a plurality of physical switches, the plurality of physical switches includes a main Switch and an extended Switch, the extended Switch includes a first extended Switch and a second extended Switch, the controller is connected to at least the main Switch, the main Switch is connected to at least the first extended Switch, the second extended Switch is connected to at least the first extended Switch, and the Switch processing apparatus is specifically disposed in the extended Switch; the device comprises:
    a receiving module, configured to receive mapping information sent by the controller and/or the master Switch and/or other extended switches, where the mapping information includes mapping relationships between flow tables in multiple stages of flow tables of a logical Switch and the physical Switch, respectively;
    the receiving module is further configured to receive a flow table entry corresponding to a current extended Switch sent by the controller and/or the master Switch and/or other extended switches, where the flow table entry received by the receiving module is content information of each flow table in a flow table set allocated by the controller for the current extended Switch;
    And the processing module is configured to process a first packet received by the current extended Switch according to the flow table entry received by the receiving module, or according to the flow table entry and the mapping information received by the receiving module, where the first packet is generated by encapsulating, by the physical Switch in which the previous-hop flow table is located, the received data packet and related information for processing the data packet.
  48. The apparatus according to claim 47, wherein in the mapping information received by the receiving module, a first-level flow table0 in a multi-level flow table of the logical Switch corresponds to the master Switch.
  49. The apparatus according to claim 47 or 48, wherein the receiving module is further configured to receive the first decapsulation packet after receiving the flow entry corresponding to the current extended Switch;
    the processing module is specifically configured to, when it is determined that the next-hop flow table number ID in the first packet received by the receiving module is located in another physical Switch, forward the first packet received by the receiving module to the physical Switch corresponding to the next-hop flow table ID according to the mapping information received by the receiving module.
  50. The apparatus according to claim 47 or 48, wherein the receiving module is further configured to receive the first packet encapsulation packet after receiving the flow entry corresponding to the current extended Switch;
    the processing module is specifically configured to, when it is determined that the next-hop-flow table number ID in the first packet received by the receiving module is located in the current extended Switch, perform pipeline environment restoration on the first packet received by the receiving module to obtain the data packet.
  51. The apparatus of claim 50, wherein the processing module comprises: the analysis unit is configured to analyze the first packet encapsulation packet received by the receiving module to obtain analysis information, where the analysis information includes the data packet and related information for processing the data packet, where the related information for processing the data packet at least includes the next-hop flow table ID, and further includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message and information (Metadata) between flow tables;
    and the processing unit is used for recovering the pipeline environment according to the analysis information obtained by the analysis unit and jumping the data message to the next jump flow table for processing continuously.
  52. The apparatus of claim 50, wherein the flow entries received by the receiving module comprise flow entries sent by the controller for pipeline recovery; the processing module comprises: an adding unit, configured to add the flow table entry for pipeline recovery to the first-level flow table 0' of the current extended Switch; and the processing unit recovers the pipeline environment for the first packet encapsulation packet received by the receiving module through the flow entry added in the table 0'.
  53. The apparatus according to claim 52, wherein the first packet encapsulation packet received by the receiving module includes a next skip flow table ID, and the flow table entry received by the receiving module for pipeline recovery includes a matching section and an execution instruction, wherein the execution instruction includes a flow table recovery instruction and/or a flow table skip instruction; the processing unit is specifically configured to match the first packet encapsulation packet received by the receiving module through the flow table entry in the table 0'; and when the flow table entries in the table 0' are successfully matched, sequentially executing a flow table recovery instruction and/or a flow table jump instruction in the matched flow table entries according to a matching result.
  54. The apparatus according to any one of claims 50 to 53, wherein the processing module is further configured to, after performing pipeline environment recovery on the first packet encapsulation packet received by the receiving module, process the data packet through the current flow table when the data packet is acquired; the apparatus further comprises: the judging module is used for judging the position of the next skip flow table according to the mapping information;
    the processing module is further configured to jump the data packet to the next-hop flow table for further processing when the determining module determines that the next-hop flow table is located in the current extended Switch; alternatively, the first and second electrodes may be,
    the processing module is further configured to initiate protection of a pipeline environment to generate a second packet and send the second packet to the extended Switch corresponding to the next-hop table when the determining module determines that the next-hop table is located in another extended Switch.
  55. The apparatus according to any one of claims 50 to 53, wherein the receiving module is further configured to receive a flow table entry sent by the controller and including a flow table jump instruction or a Switch forwarding instruction, where the flow table jump instruction or Switch forwarding instruction in the flow table entry is determined by the controller according to whether the next-hop flow table in the flow table entry is located in the current extended Switch, if yes, the flow table entry includes the flow table jump instruction, and if not, the flow table entry includes the Switch forwarding instruction;
    The processing module is further configured to obtain a data packet in the first packet encapsulation packet after performing pipeline environment recovery on the first packet encapsulation packet received by the receiving module, and jump the data packet to the next-jump flow table for processing when a flow table entry matched with the data packet includes the flow table jump instruction; or, when a data packet in the first packet encapsulation packet is acquired and a flow table entry matched with the data packet includes the Switch forwarding instruction, protection of a pipeline environment is initiated to generate a second packet encapsulation packet, and the second packet encapsulation packet is sent to an extended Switch corresponding to the next-hop flow table.
  56. The apparatus according to claim 54 or 55, wherein the processing module is configured to initiate protection of a pipeline environment, and specifically includes: and encapsulating the related information for processing the data message and the data message in the second message encapsulation packet at the same time, wherein the related information for processing the data message at least comprises a next-hop flow table ID and any amount of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
  57. A controller, connected to a logical Switch, said logical Switch comprising at least two physical switches; the controller includes:
    a processor, configured to allocate each flow table in a multi-stage flow table of a logical Switch to each physical Switch, where the multi-stage flow table is a pipeline of the logical Switch;
    a transmitter, configured to transmit mapping information so that each physical Switch obtains the mapping information, where the mapping information includes a mapping relationship between each flow table in the multi-stage flow table and the physical Switch;
    the sender is further configured to send a flow entry to the logical Switch, so that each physical Switch obtains a flow entry corresponding to the physical Switch, and process the received data packet according to the flow entry or according to the flow entry and the mapping information, where the flow entry is content information of each flow table in a flow table set allocated by the controller for each physical Switch.
  58. The controller according to claim 57, wherein said at least two physical switches comprise a primary Switch and a first extended Switch, wherein said controller is connected to at least said primary Switch, and wherein said first extended Switch is connected to at least said primary Switch;
    The transmitter is configured to transmit mapping information, which specifically includes: sending mapping information to at least the primary Switch, so that the primary Switch receives the mapping information, and the mapping information received by the first extended Switch includes the mapping information sent by the controller and/or the primary Switch;
    the sender is further configured to send a flow entry to the logic Switch, and specifically includes: sending, to at least the master Switch, the flow table entry of the logical Switch, so that the flow table entry received by the master Switch includes the flow table entry corresponding to the master Switch, or the flow table entry corresponding to each of the physical switches, so that the flow table entry received by the first extended Switch includes the flow table entry sent by the controller and/or the master Switch.
  59. The controller according to claim 58, wherein said physical Switch further comprises a second extended Switch, said second extended Switch being connected to at least said first extended Switch;
    the transmitter is configured to transmit mapping information, which specifically includes: sending mapping information to at least the primary Switch, so that the primary Switch receives the mapping information, so that the mapping information received by the first extended Switch includes the mapping information sent by the controller and/or the primary Switch, and the mapping information received by the second extended Switch includes the mapping information sent by the controller and/or the primary Switch and/or the first extended Switch;
    The sender is further configured to send a flow entry to the logic Switch, and specifically includes: sending, at least to the master Switch, flow entries of the logical Switch to cause the flow entries received by the master Switch to include the flow entry corresponding to the master Switch, or the flow entry corresponding to the master Switch and the flow entries corresponding to the first extended Switch and/or the second extended Switch, so that the flow entries received by the first extended Switch include the flow entry corresponding to the first extended Switch sent by the controller and/or the master Switch, and so that the flow entries received by the second extended Switch include the flow entry corresponding to the second extended Switch sent by the controller and/or the master Switch and/or the first extended Switch.
  60. The controller according to claim 58 or 59, wherein the flow table allocated by the processor to the master Switch includes at least a first-level flow table0 in the multi-level flow tables of the logical Switch, so that the master Switch processes the data packet through the table0 when receiving the data packet.
  61. The controller according to any of claims 57 to 60, wherein the transmitter is further configured to send a flow table entry to the logic Switch, and specifically comprises: and sending a flow table entry to the logic Switch, so that when the current physical Switch receives a data message, the data message is processed through the current flow table, whether a next-hop flow table is located in the current physical Switch is judged according to mapping information sent by the sender, if so, the data message is skipped to the next-hop flow table for continuous processing, and if not, protection of a pipeline environment is initiated to generate a message encapsulation packet, and the message encapsulation packet is sent to the physical Switch corresponding to the next-hop flow table.
  62. The controller according to any of claims 57 to 60, wherein the transmitter is further configured to send a flow table entry to the logic Switch, and specifically comprises: when the table entry to be sent includes a table jump instruction, judging whether a next jump table is located in the current physical Switch; if so, sending a flow table item containing the flow table jump instruction to the current physical Switch, so that the current physical Switch jumps the data message to the next jump flow table for processing; if not, replacing the flow table jump instruction in the flow table item to be sent with a Switch forwarding instruction, and sending the flow table item containing the Switch forwarding instruction to the current physical Switch, so that the current physical Switch initiates protection of a pipeline environment to generate a message encapsulation packet, and sending the message encapsulation packet to a physical Switch corresponding to the next-hop flow table.
  63. The controller according to claim 61 or 62, wherein the protection of pipeline environment is that the current physical Switch encapsulates the data packet and related information for processing the data packet into the packet encapsulation packet at the same time, wherein the related information for processing the data packet at least includes the next-hop flow table number ID, and further includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
  64. The controller according to any one of claims 61 to 63, wherein the protection of the pipeline environment is configured to enable a physical Switch corresponding to the next-hop flow table to parse a packet encapsulation packet received by the physical Switch to obtain parsing information, so as to perform recovery of the pipeline environment according to the parsing information, and jump the data packet to the next-hop flow table for further processing, where the parsing information includes the data packet and information related to processing of the data packet.
  65. The controller according to any one of claims 61 to 63, wherein the flow table entry corresponding to the extended Switch sent by the sender comprises a flow table entry for pipeline recovery; the sender is further configured to send the flow entry for pipeline recovery to the extended Switch, so that the extended Switch adds the flow entry to a first-level flow table0 'of the extended Switch, and when the packet encapsulation packet is received, the pipeline environment is recovered through the flow entry added in the table 0'.
  66. The controller according to claim 65, wherein the packet encapsulation packet includes a next-hop flow table ID, the flow table entry sent by the sender for performing pipeline recovery includes a matching section and an execution instruction, the matching section is used by the extended Switch to use the next-hop flow table ID as a matching object corresponding to the flow table entry, and the execution instruction includes a flow table recovery instruction and/or a flow table jump instruction;
    The recovery of the pipeline environment is that the extended Switch matches the received packet encapsulation packet through the flow table entry in the table0 ', and when the next-hop flow table ID is matched with the flow table entry in the table 0', the flow table recovery instruction and/or the flow table jump instruction in the matched flow table entry are/is sequentially executed according to the matching result.
  67. A master Switch, wherein the master Switch is a physical Switch among logical switches connected to a controller, wherein the logical switches include at least two physical switches including the master Switch and an extended Switch, and the controller is connected to at least the master Switch; the master switch includes:
    the receiver is used for receiving mapping information sent by the controller, wherein the mapping information comprises the mapping relation between each flow table in the multi-stage flow tables of the logical Switch and the physical Switch;
    the receiver is further configured to receive a flow entry sent by the controller, where the flow entry received by the receiver is allocated by the controller for the primary Switch, or content information of each flow table in a flow table set allocated by the controller for the primary Switch and the extended Switch;
    And the processor is configured to process the data packet received by the primary Switch according to the flow table entry received by the receiver, or according to the flow table entry and the mapping information received by the receiver.
  68. The master switch of claim 67, further comprising: the transmitter is further used for transmitting the mapping information to the extended Switch connected with the receiver after the receiver receives the mapping relation transmitted by the controller;
    the sender is further configured to send the flow entry allocated by the controller to an extended Switch connected to the receiver after the receiver receives the flow entry sent by the controller.
  69. The master Switch as claimed in claim 67 or 68, wherein the extended Switch comprises a first extended Switch and a second extended Switch, the master Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch;
    the sender is configured to send the mapping information to an extended Switch connected to the sender, and specifically includes: sending the mapping information to the first extended Switch and/or the second extended Switch;
    The sender is further configured to send the flow table entry allocated by the controller to an extended Switch connected to the sender, and specifically includes: and sending the flow table entry allocated by the controller to the first extended Switch and/or the second extended Switch, so that the extended Switch processes the received data packet according to the flow table entry corresponding to the extended Switch and the mapping information.
  70. The master Switch of any one of claims 67 to 69, wherein the mapping information received by the receiver comprises flow tables allocated by the controller for the master Switch, and the flow tables comprise at least a first-level flow table0 in the multi-level flow tables of the logical Switch; the processor is specifically configured to process the received data packet through the table0 according to the stream table entry received by the receiver, or according to the stream table entry and the mapping information received by the receiver.
  71. The master switch of any one of claims 67 to 70, wherein the processor comprises: the method specifically comprises the steps of processing a data message when the data message is received; and judging whether a next hop flow table is located in the main Switch according to the mapping information received by the receiver, if so, jumping the data message to the next hop flow table for continuous processing, and if not, initiating protection of a pipeline environment to generate a message encapsulation packet and sending the message encapsulation packet to an extended Switch corresponding to the next hop flow table.
  72. The master switch according to any one of claims 67 to 70, wherein the receiver is further configured to receive a flow entry sent by the controller, and specifically includes: receiving a flow table item which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction, wherein the flow table jump instruction or the Switch forwarding instruction in the flow table item is determined by the controller according to whether a next jump table in the flow table item is located in the main Switch, if so, the flow table item comprises the flow table jump instruction, and if not, the flow table item comprises the Switch forwarding instruction;
    the processor is specifically configured to jump the data packet to the next jump table for processing when the flow table entry matched with the received data packet includes the flow table jump instruction; alternatively, the first and second electrodes may be,
    the processor is specifically configured to, when a flow entry matched with the received data packet includes the Switch forwarding instruction, initiate protection of a pipeline environment to generate a packet encapsulation packet, and send the packet encapsulation packet to the extended Switch corresponding to the next-hop flow table.
  73. The master switch of claim 71 or 72, wherein the processor initiates protection of the pipeline environment, comprising: and encapsulating the related information for processing the data message and the data message in the message encapsulation packet at the same time, wherein the related information for processing the data message at least comprises the next-hop flow table number ID and any amount of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
  74. The master Switch according to any one of claims 71 to 73, wherein the protection of the pipeline environment is configured to enable the extended Switch corresponding to the next-hop flow table to parse the received packet encapsulation packet to obtain parsing information, so as to perform pipeline environment recovery according to the parsing information, and jump the data packet to the next-hop flow table for further processing, where the parsing information includes the data packet and information related to processing of the data packet.
  75. An extended Switch, wherein the extended Switch is a physical Switch of logical switches connected to a controller, wherein the logical Switch comprises a plurality of physical switches, the plurality of physical switches comprises a primary Switch and the extended Switch, the extended Switch comprises a first extended Switch and a second extended Switch, the controller is connected to at least the primary Switch, the primary Switch is connected to at least the first extended Switch, and the second extended Switch is connected to at least the first extended Switch; the extension switch includes:
    a receiver, configured to receive mapping information sent by the controller and/or the master Switch and/or other extended switches, where the mapping information includes mapping relationships between flow tables in multiple stages of flow tables of a logical Switch and the physical Switch, respectively;
    The receiver is further configured to receive a flow table entry corresponding to the current extended Switch, where the flow table entry is sent by the controller and/or the master Switch and/or another extended Switch, and the flow table entry received by the receiver is content information of each flow table in a flow table set allocated by the controller for the current extended Switch;
    and the processor is configured to process a first packet encapsulation packet received by the current extended Switch according to the flow table entry received by the receiver, or according to the flow table entry and mapping information received by the receiver, where the first packet encapsulation packet is generated by encapsulating, by a physical Switch in which a previous-hop flow table is located, a data packet received by the physical Switch and related information for processing the data packet.
  76. The extension Switch of claim 75, wherein in the mapping information received by the receiver, a first-level flow table0 in the multi-level flow tables of the logical Switch corresponds to the primary Switch.
  77. The extended Switch of claim 75 or 76, wherein the receiver is further configured to receive the first decapsulated packet after receiving the flow entry corresponding to the current extended Switch;
    The processor is specifically configured to, when it is determined that a next-hop flow table number ID in a first packet received by the receiver is located in another physical Switch, forward the first packet received by the receiver to a physical Switch corresponding to the next-hop flow table ID according to mapping information received by the receiver.
  78. The extended Switch of claim 75 or 76, wherein the receiver is further configured to receive the first decapsulation packet after receiving the flow entry corresponding to the current extended Switch;
    the processor is specifically configured to, when it is determined that the next-hop-flow table number ID in the first packet received by the receiver is located in the current extended Switch, perform pipeline environment restoration on the first packet received by the receiver to obtain the data packet.
  79. The extended switch of claim 78, wherein the processor is specifically configured to parse a first packet encapsulation packet received by the receiver to obtain parsing information, where the parsing information includes the data packet and related information for processing the data packet, and where the related information for processing the data packet at least includes the next hop flow table ID, and further includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message and information (Metadata) between flow tables; and recovering the pipeline environment according to the analysis information, and jumping the data message to a next-hop flow table for continuous processing.
  80. The extension switch of claim 78 wherein the flow entries received by the receiver include flow entries sent by the controller for pipeline recovery; the processor is specifically configured to add the flow table entry for pipeline recovery to the first-stage flow table 0' of the current extended Switch; and recovering the pipeline environment for the first packet encapsulation packet received by the receiver through the flow entry added in the table 0'.
  81. The extended switch of claim 80, wherein the first packet encapsulation packet received by the receiver includes a next-hop table ID, and wherein the flow entry received by the receiver for pipeline recovery includes a matching portion and an execution instruction, wherein the execution instruction includes a flow table recovery instruction and/or a flow table hop instruction;
    the processor is configured to recover the pipeline environment for the first packet encapsulation packet received by the receiver through the flow entry added in the table 0', and specifically includes: matching the first packet encapsulation packet received by the receiver through the flow table entry in the table 0'; and when the flow table entries in the table 0' are successfully matched, sequentially executing a flow table recovery instruction and/or a flow table jump instruction in the matched flow table entries according to a matching result.
  82. The extension switch of any one of claims 78 to 81, wherein the processor is further configured to, after performing pipeline environment restoration on the first packet encapsulation packet received by the receiver, process the data packet through the current flow table when the data packet is acquired;
    the processor is further configured to determine whether a next-hop flow table is located in the current extended Switch according to the mapping information; if so, jumping the data message to the next skip flow table for continuous processing; if not, the protection of the pipeline environment is initiated to generate a second message encapsulation packet, and the second message encapsulation packet is sent to the extended Switch corresponding to the next-hop flow table.
  83. The extension Switch of any one of claims 78 to 81, wherein the receiver is further configured to receive a flow table entry sent by the controller and including a flow table jump instruction or a Switch forwarding instruction, where the flow table jump instruction or Switch forwarding instruction in the flow table entry is determined by the controller according to whether the next jump table in the flow table entry is located in the current extension Switch, if yes, the flow table entry includes the flow table jump instruction, and if not, the flow table entry includes the Switch forwarding instruction;
    The processor is further configured to obtain a data packet in a first packet encapsulation packet after a pipeline environment of the first packet encapsulation packet received by the receiver is recovered, and jump the data packet to the next-jump flow table for processing when a flow table entry matched with the data packet includes the flow table jump instruction; or, when a data packet in the first packet encapsulation packet is acquired and a flow table entry matched with the data packet includes the Switch forwarding instruction, protection of a pipeline environment is initiated to generate a second packet encapsulation packet, and the second packet encapsulation packet is sent to an extended Switch corresponding to the next-hop flow table.
  84. The extension switch of claim 82 or 83, wherein the processor is configured to initiate protection of a pipeline environment, and specifically comprises: and encapsulating the related information for processing the data message and the data message in the second message encapsulation packet at the same time, wherein the related information for processing the data message at least comprises a next-hop flow table ID and any amount of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
  85. A switch processing system, comprising: a controller and a logical Switch, the logical Switch including at least two physical switches, the system comprising:
    the controller is configured to allocate each flow table in a multi-stage flow table of a logical Switch to each physical Switch, where the multi-stage flow table is a pipeline of the logical Switch;
    the controller is further configured to send mapping information, where the mapping information includes mapping relationships between each flow table in the multi-stage flow tables of the logical Switch and the physical Switch;
    each physical Switch is used for receiving the mapping information;
    the controller is further configured to send a flow entry to the logic Switch;
    each physical Switch is further configured to receive the flow table entry, where the flow table entry is content information of each flow table in a flow table set allocated by the controller for each physical Switch;
    each physical Switch is further configured to process the received data packet according to the flow entry, or according to the flow entry and the mapping information.
  86. The system according to claim 85, wherein said at least two physical switches comprise a primary Switch and an extended Switch, wherein said controller is connected to at least said primary Switch, and wherein said extended Switch is connected to at least said primary Switch;
    The controller is configured to send mapping information, which specifically includes: sending mapping information to at least the primary Switch;
    the primary Switch is further configured to send the mapping information to an extended Switch connected to the primary Switch after receiving the mapping relationship sent by the controller;
    the controller is further configured to send a flow entry to the logic Switch, which specifically includes: sending flow entries of the logical switches to at least the primary Switch, where the flow entries received by the primary Switch include a flow entry corresponding to the primary Switch or a flow entry corresponding to each of the physical switches;
    the primary Switch is further configured to send, after receiving the flow entry sent by the controller, the flow entry allocated by the controller to the extended Switch connected to the primary Switch.
  87. The system according to claim 85 or 86, wherein said extended Switch comprises a first extended Switch and a second extended Switch, said primary Switch being connected to at least said first extended Switch, said second extended Switch being connected to at least said first extended Switch;
    the primary Switch is configured to send the mapping information to the extended Switch connected to the primary Switch, and specifically includes: sending the mapping information to the first extended Switch and/or the second extended Switch;
    The primary Switch is configured to send the flow entry allocated by the controller to the extended Switch connected to the primary Switch, and specifically includes: sending the flow table entry allocated by the controller to the first extended Switch and/or the second extended Switch.
  88. The system according to claim 87, wherein each of said extended switches is configured to receive said mapping information, and specifically comprises: the first extended Switch is configured to receive mapping information sent by the controller and/or the primary Switch; the second extended Switch is configured to receive mapping information sent by the controller and/or the main Switch and/or the first extended Switch;
    each of the extended switches is configured to receive the flow entry, and specifically includes: the first extended Switch is configured to receive a flow entry sent by the controller and/or the master Switch; the second extended Switch is configured to receive a flow entry sent by the controller and/or the main Switch and/or the first extended Switch.
  89. The system according to any of claims 85-88, wherein the flow tables allocated by the controller for the master Switch comprise at least a first level of flow table0 among the multi-level flow tables of the logical Switch;
    The primary Switch is configured to process the data packet received by the primary Switch, and specifically includes: and processing the received data message through the table0 according to the flow table entry or according to the flow table entry and the mapping information.
  90. The system according to any one of claims 85 to 89, wherein the processing, by the master Switch, of the data packet received by the master Switch specifically includes: processing the data message when the data message is received; and judging whether a next-hop flow table is located in the main Switch or not according to the mapping information, if so, jumping the data message to the next-hop flow table for continuous processing, and if not, initiating protection of a pipeline environment to generate a first message encapsulation packet and sending the first message encapsulation packet to an extended Switch corresponding to the next-hop flow table.
  91. The system according to any one of claims 85 to 89, wherein the controller is configured to send a flow entry to the master Switch, and specifically comprises: when the table entry to be sent includes a table jump instruction, judging whether a next jump table is located in the main Switch; if yes, sending a flow table item containing the flow table jump instruction to the main Switch; if not, replacing the flow table jump instruction in the flow table item to be sent with a Switch forwarding instruction, and sending the flow table item containing the Switch forwarding instruction to the main Switch;
    Correspondingly, the primary Switch is configured to receive a flow entry, and specifically includes: receiving a flow table item which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction;
    the primary Switch is configured to process the data packet received by the primary Switch, and specifically includes: when the flow table item matched with the received data message comprises the flow table jump instruction, jumping the data message to the next jump table for processing continuously; and when the received flow table item matched with the data message comprises the Switch forwarding instruction, initiating protection on a pipeline environment to generate a first message encapsulation packet, and sending the first message encapsulation packet to the extended Switch corresponding to the next-hop flow table.
  92. The system according to claim 90 or 91, wherein the master Switch is configured to initiate protection of a pipeline environment, and specifically comprises: the primary Switch encapsulates, in the first packet encapsulation packet, related information for processing the data packet and the data packet at the same time, where the related information for processing the data packet at least includes the next-hop flow table number ID, and also includes any number of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
  93. The system according to any one of claims 85 to 92, wherein said current extended Switch is further configured to receive said first decapsulation packet after receiving a flow table entry corresponding thereto;
    the current extended Switch is further configured to determine whether a next-hop flow table number ID in the first packet is located in the current extended Switch, if not, forward the first packet to a physical Switch corresponding to the next-hop flow table ID according to the mapping information, and if so, recover a pipeline environment for the first packet to obtain the data packet.
  94. The system according to claim 93, wherein the current extended Switch is configured to perform pipeline environment restoration on the first packet encapsulation packet, and specifically includes: analyzing the first message encapsulation packet to obtain analysis information, wherein the analysis information comprises the data message and relevant information for processing the data message; and recovering the pipeline environment according to the analysis information, and jumping the data message to a next-hop flow table for continuous processing.
  95. The system according to claim 93, wherein the flow entries received by said current extended Switch include flow entries sent by said controller for pipeline recovery; the current extended Switch is further configured to add the flow table entry for pipeline recovery to the first-stage flow table 0' of the current extended Switch; and recovering the pipeline environment of the first packet encapsulation packet through the flow table entry added in the table 0'.
  96. The system according to claim 95, wherein said first packet encapsulation packet received by said current extended Switch includes a next-hop table ID, said flow table entry received by said current extended Switch for pipeline recovery includes a matching portion and an execution instruction, said execution instruction includes a flow table recovery instruction and/or a flow table hop instruction;
    the current extended Switch is configured to perform pipeline environment recovery on the first packet encapsulation packet through the flow entry added in the table 0', and specifically includes: matching the first packet encapsulation packet received by the receiver through the flow table entry in the table 0'; and when the flow table entries in the table 0' are successfully matched, sequentially executing a flow table recovery instruction and/or a flow table jump instruction in the matched flow table entries according to a matching result.
  97. The system according to any one of claims 93 to 96, wherein the current extended Switch is further configured to, after a pipeline environment of the first packet encapsulation packet is recovered, process the data packet through the current flow table when the data packet is acquired;
    The current extended Switch is further configured to determine whether a next-hop flow table is located in the current extended Switch according to the mapping information; if so, jumping the data message to the next skip flow table for continuous processing; if not, the protection of the pipeline environment is initiated to generate a second message encapsulation packet, and the second message encapsulation packet is sent to the extended Switch corresponding to the next-hop flow table.
  98. The system according to any of claims 93 to 96, wherein the controller is configured to send a flow entry to the current extended Switch, and specifically comprises: when the table entry to be sent includes a table jump instruction, judging whether a next jump table is located in the current extended Switch; if yes, sending a flow table item containing the flow table jump instruction to the current extended Switch; if not, replacing the flow table jump instruction in the flow table item to be sent with a Switch forwarding instruction, and sending the flow table item containing the Switch forwarding instruction to the current extended Switch;
    correspondingly, the current extended Switch is configured to receive a flow entry, and specifically includes: receiving a flow table item which is sent by the controller and comprises a flow table jump instruction or a Switch forwarding instruction;
    The current extended Switch is further configured to obtain a data packet in the first packet after the pipeline environment of the first packet is restored, and process the obtained data packet through the current flow table.
  99. The system according to claim 98, wherein the current extended Switch is configured to process the acquired data packet, specifically including: when the flow table item matched with the acquired data message comprises the flow table jump instruction, jumping the data message to the next jump table for processing continuously; or, when the flow table entry matched with the acquired data packet includes the Switch forwarding instruction, initiating protection of a pipeline environment to generate a second packet encapsulation packet, and sending the second packet encapsulation packet to the extended Switch corresponding to the next-hop flow table.
  100. The system according to any of claims 97-99, wherein the current extended Switch is configured to initiate protection of a pipeline environment, and specifically comprises: and encapsulating the related information for processing the data message and the data message in the second message encapsulation packet at the same time, wherein the related information for processing the data message at least comprises a next-hop flow table ID and any amount of the following information: an input port (Ingress port), an Action set (Action set) currently corresponding to the data message, and information (Metadata) between flow tables.
CN201480024931.3A 2014-10-28 2014-10-28 Switch processes method, controller, interchanger and switch processes system Active CN105745877B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/089701 WO2016065536A1 (en) 2014-10-28 2014-10-28 Switch processing method, controller, switch, and switch processing system

Publications (2)

Publication Number Publication Date
CN105745877A true CN105745877A (en) 2016-07-06
CN105745877B CN105745877B (en) 2019-04-12

Family

ID=55856356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201480024931.3A Active CN105745877B (en) 2014-10-28 2014-10-28 Switch processes method, controller, interchanger and switch processes system

Country Status (8)

Country Link
US (1) US10498637B2 (en)
EP (1) EP3197106B1 (en)
JP (1) JP6448785B2 (en)
KR (1) KR101996337B1 (en)
CN (1) CN105745877B (en)
BR (1) BR112017008532A2 (en)
RU (1) RU2666243C1 (en)
WO (1) WO2016065536A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107623635A (en) * 2017-10-30 2018-01-23 深圳市德赛微电子技术有限公司 A kind of network exchanging chip can recognize that the intelligent Matching method of flow table
CN112764679A (en) * 2021-01-19 2021-05-07 福建天泉教育科技有限公司 Dynamic capacity expansion method and terminal

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10536379B2 (en) * 2017-09-28 2020-01-14 Argela Yazilim Ve Bilisim Teknolojileri San Ve Tic. A.S. System and method for control traffic reduction between SDN controller and switch

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100257263A1 (en) * 2009-04-01 2010-10-07 Nicira Networks, Inc. Method and apparatus for implementing and managing virtual switches
CN102546351A (en) * 2012-03-15 2012-07-04 北京邮电大学 System and method for interconnecting openflow network and conventional Internet protocol (IP) network
US20130003549A1 (en) * 2011-06-30 2013-01-03 Broadcom Corporation Resilient Hashing for Load Balancing of Traffic Flows
CN103200101A (en) * 2013-04-15 2013-07-10 昆山天元昌电子有限公司 Method and device of open flow multi-table inquiry based on exchange chip
CN103347013A (en) * 2013-06-21 2013-10-09 北京邮电大学 OpenFlow network system and method for enhancing programmable capability

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8391282B1 (en) * 2001-07-02 2013-03-05 Haw-Minn Lu Systems and methods for overlaid switching networks
JP2007274305A (en) 2006-03-31 2007-10-18 Nec Corp Ring network, communication device, and method of managing operation used therefor
WO2012049925A1 (en) * 2010-10-15 2012-04-19 日本電気株式会社 Switch system, and data forwarding method
US9444651B2 (en) * 2011-08-17 2016-09-13 Nicira, Inc. Flow generation from second level controller to first level controller to managed switching element
US9331937B2 (en) * 2012-04-18 2016-05-03 Nicira, Inc. Exchange of network state information between forwarding elements
US9246847B2 (en) * 2012-12-17 2016-01-26 Telefonaktiebolaget L M Ericsson (Publ) Extending the reach and effectiveness of header compression in access networks using SDN
WO2014147197A1 (en) * 2013-03-20 2014-09-25 Wolting Holding B.V. Compiler for and method for software defined networks
CN103428094B (en) * 2013-08-12 2016-08-17 杭州华三通信技术有限公司 Message forwarding method in open flows OpenFlow system and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100257263A1 (en) * 2009-04-01 2010-10-07 Nicira Networks, Inc. Method and apparatus for implementing and managing virtual switches
WO2010115060A3 (en) * 2009-04-01 2010-11-25 Nicira Networks, Inc. Method and apparatus for implementing and managing virtual switches
CN102726007A (en) * 2009-04-01 2012-10-10 Nicira网络公司 Method and apparatus for implementing and managing virtual switches
US20130003549A1 (en) * 2011-06-30 2013-01-03 Broadcom Corporation Resilient Hashing for Load Balancing of Traffic Flows
CN102546351A (en) * 2012-03-15 2012-07-04 北京邮电大学 System and method for interconnecting openflow network and conventional Internet protocol (IP) network
CN103200101A (en) * 2013-04-15 2013-07-10 昆山天元昌电子有限公司 Method and device of open flow multi-table inquiry based on exchange chip
CN103347013A (en) * 2013-06-21 2013-10-09 北京邮电大学 OpenFlow network system and method for enhancing programmable capability

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANDREAS WUNDSAM: "nosix:a portable switch interface for the network operating system", 《INTERNATIONAL COMPUTER SCIENCE INSTITUTE》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107623635A (en) * 2017-10-30 2018-01-23 深圳市德赛微电子技术有限公司 A kind of network exchanging chip can recognize that the intelligent Matching method of flow table
CN107623635B (en) * 2017-10-30 2020-07-21 深圳市德赛微电子技术有限公司 Intelligent matching method for network switching chip to identify flow table
CN112764679A (en) * 2021-01-19 2021-05-07 福建天泉教育科技有限公司 Dynamic capacity expansion method and terminal
CN112764679B (en) * 2021-01-19 2022-04-12 福建天泉教育科技有限公司 Dynamic capacity expansion method and terminal

Also Published As

Publication number Publication date
US20170289026A1 (en) 2017-10-05
EP3197106A1 (en) 2017-07-26
EP3197106A4 (en) 2017-11-15
RU2666243C1 (en) 2018-09-06
KR101996337B1 (en) 2019-07-04
KR20170068525A (en) 2017-06-19
CN105745877B (en) 2019-04-12
JP2017532912A (en) 2017-11-02
US10498637B2 (en) 2019-12-03
WO2016065536A1 (en) 2016-05-06
EP3197106B1 (en) 2020-01-01
JP6448785B2 (en) 2019-01-09
BR112017008532A2 (en) 2018-06-19

Similar Documents

Publication Publication Date Title
RU2692042C1 (en) Method of route determination and corresponding device and system
US10091100B1 (en) Network functions virtualization infrastructure comprising virtual switch for internet of things data
US10673760B2 (en) Method, apparatus, and system for load balancing of service chain
CN106878194B (en) Message processing method and device
CN104954274A (en) Method for generating forwarding information, controller and service forwarding entity
US10178017B2 (en) Method and control node for handling data packets
US10003503B2 (en) Tunnel type selection method and apparatus
US10193811B1 (en) Flow distribution using telemetry and machine learning techniques
CN112788060B (en) Data packet transmission method and device, storage medium and electronic equipment
US10193791B2 (en) Method of allocating wavelength and wavelength allocation device
CN103281257A (en) Method and device for processing protocol message
CN105745877A (en) Switch processing method, controller, switch, and switch processing system
CN111327527B (en) Flow forwarding method and system, SDN controller and computer readable storage medium
CN105391647A (en) Method and system for flow control
CN107409132B (en) Method and network node for dynamically configuring flow segmentation by software defined network control signaling
US10104018B2 (en) Method, apparatus, and system for controlling forwarding of service data in virtual network
CN107018072B (en) data frame sending method and access equipment
CN106817316B (en) Method, device and system for detecting path MTU
CN110324265B (en) Traffic distribution method, routing method, equipment and network system
US11689447B2 (en) Enhanced dynamic encryption packet segmentation
EP4087194A1 (en) Data forwarding method, forwarding device, system, server, and storage medium
US11012347B2 (en) Communication apparatus, communication control method, and communication system for multilink communication simultaneously using a plurality of communication paths
CN114697253A (en) Method for determining forwarding path of service chain and communication device
CN116319514B (en) Data processing method and related device
CN108234321B (en) Method and system for forwarding message

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant