CN107666440B - Switch and switching system - Google Patents

Switch and switching system Download PDF

Info

Publication number
CN107666440B
CN107666440B CN201610608386.3A CN201610608386A CN107666440B CN 107666440 B CN107666440 B CN 107666440B CN 201610608386 A CN201610608386 A CN 201610608386A CN 107666440 B CN107666440 B CN 107666440B
Authority
CN
China
Prior art keywords
address
switch
matching
message
flow table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610608386.3A
Other languages
Chinese (zh)
Other versions
CN107666440A (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
Priority to CN201610608386.3A priority Critical patent/CN107666440B/en
Publication of CN107666440A publication Critical patent/CN107666440A/en
Application granted granted Critical
Publication of CN107666440B publication Critical patent/CN107666440B/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
    • 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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a switch and a switching system, wherein N flow tables are preset in the switch, N is an integer larger than 1, and the N flow tables support that message contents for address requests are sent to an address distribution server through at least one switch, and response messages responded by the address distribution server to the message contents are sent to the switch sending the message contents. The invention can realize the distribution of the IP address of the exchanger in the in-band mode.

Description

Switch and switching system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a switch and a switching system.
Background
With the development of information technology, the change of a network is accelerated by separating control and forwarding, controlling centralized Software and generalizing a forwarding hardware platform, and a sequence screen of Software Defined Networking (SDN) hot tide is opened.
A common SDN architecture includes an SDN controller and a switch. The network used for interworking between the SDN controller and the switches is referred to as a control network, and the network used for forwarding the data flow by each switch is referred to as a data network. The SDN controller is interconnected with the switch through a control network, and issues a flow table to the flow table of the switch, wherein the flow table comprises a matching domain and an execution domain, the switch matches with the data packet according to the matching domain in the flow table, and processes the matched data packet according to the execution operation indicated by the execution domain. Interaction can be established between the switch and the SDN controller through an OpenFlow protocol.
At present, the deployment modes of the SDN network mainly include an out-band mode and an in-band mode. In other words, the control network is created through the conventional network in the out-of-band mode, and the control network and the data network belong to different networks, as shown in fig. 1A. In the in-band mode, the network management system manually configures an IP address for the switch, and the switch connects the SDN controller through the manually configured IP address to complete creation of the control network, in other words, the control network and the data network share one network in the in-band mode, as shown in fig. 1B.
The control network and the data network in the out-of-band mode belong to two different networks, a traditional network needs to be additionally managed, and the cost of network management and maintenance is high, so that the control network is created by using the in-band mode, but the IP address is configured for the switch in the in-band mode in a manual mode, so that errors are easy to occur, and the processing efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a switch and a switching system, which are used for realizing the automatic allocation of an IP address of the switch through a data network in an in-band mode.
In a first aspect, a switch is provided, where the switch includes a main control board and a switch board, where the main control board presets N flow tables for the switch board, and N is an integer greater than 1. And the exchange board processes the address request message comprising the matching field and the message content according to the N flow tables.
In the embodiment of the invention, the N flow tables support that the message content included in the address request message is sent to the address distribution server through at least one switch, and the response message responded by the address distribution server to the message content is sent to the switch sending the address request message, so that the switch provided by the embodiment of the invention can be used for processing the address request message according to the preset flow table, and further, the switch sending the address request message can obtain the IP address by using a plurality of switches.
In one possible design, the main control board 101 may preset N flow tables for the switch board as follows:
a: the main control board configures a matching field in the flow table 1 to include a matching field included in the first address request message, and configures an execution operation indicated by an execution field in the flow table 1 to include: and performing first assignment on the matching field, and broadcasting a second address matching message, wherein the second address matching message comprises the matching field subjected to the first assignment and the message content.
B: the main control board configures a matching field of the 2 nd flow table as the matching field after the first assignment, and configures the execution operation indicated by the execution field of the 2 nd flow table to include: performing second assignment on the matching field subjected to the first assignment, and broadcasting a third address matching message, wherein the third address matching message comprises the matching field subjected to the second assignment and the message content;
c: and the main control board completes the rest of the flow tables except the 1 st flow table and the 2 nd flow table in the N flow tables according to the mode of configuring the 2 nd flow table.
Optionally, in the embodiment of the present invention, when the main control board presets N flow tables for the switch board, the value of N may be determined according to the hop count between the switch that sends the first address request packet and the address allocation server.
In the embodiment of the present invention, if the switch that sends the first address request packet through a preset flow table, the N is +1, which is the hop count between the switch that sends the address request packet and the address allocation server. And if the switch sending the first address request message does not send the first address request message through a preset flow table, the N is the hop count between the switch sending the address request message and the address allocation server.
In another possible design, the main control board may also preset N +1 flow tables for the switch board, a matching field in the N +1 flow table is the matching field after the nth assignment, and the execution operation of executing the field indication includes discarding the message content to avoid a broadcast storm.
In another possible design, the main control board may preset N flow tables for the switch board in the following manner, including:
a: the main control board configures a matching field in the 1 st flow table to include the matching field, and configures the execution operation indicated by the execution field in the 1 st flow table to include: and performing first assignment on the matching field, and broadcasting a second address matching message, wherein the second address matching message comprises the matching field subjected to the first assignment and the message content.
B: the main control board configures a matching field of the 2 nd flow table as the matching field after the first assignment, and configures the execution operation indicated by the execution field of the 2 nd flow table to include: and performing second assignment on the matching field subjected to the first assignment, and broadcasting a third address matching message, wherein the third address matching message comprises the matching field subjected to the second assignment and the message content.
C: and the main control board configures the rest of the N flow tables except the 1 st flow table, the 2 nd flow table and the N flow table according to the mode of configuring the 2 nd flow table.
D: the main control board configures a matching field of a matching field in the Nth flow table as the matching field after being assigned for the (N-1) th time, and the execution operation of the execution field is to broadcast an Nth address matching message to a downlink port, wherein the Nth address matching message comprises the matching field after being assigned for the (N-1) th time and the message content.
Optionally, when the main control board presets N flow tables for the switch board, the value of N may be determined according to the number of switch networking layers between the switch that sends the first address request packet and the address allocation server. For example, N is the number of switch networking layers between the switch that sends the address request packet and the address allocation server.
In this embodiment of the present invention, the manner of configuring the 2 nd flow table refers to configuring a matching field of the mth flow table as the matching field after being assigned for the M-1 th time, where M is an integer greater than 1 and not greater than N, and configuring an execution operation indicated by the execution field of the mth flow table includes: and performing M-th assignment on the matching field, and broadcasting an M + 1-th address matching message, wherein the M + 1-th address matching message comprises the matching field subjected to M-th assignment and the message content.
In a second aspect, an embodiment of the present invention provides an implementation method for a switch to preset a flow table, in which a switch determines a matching field of a preset flow table matching field, determines a preset number of flow tables, and then configures the number of flow tables in the switch.
The matching field of the preset flow table matching field in the embodiment of the invention can be matched with the matching field of the address request message, and can be one of TTL, VLAN and MPLS, for example.
The flow table with the number configured in the embodiment of the present invention supports that at least one switch sends the message content included in the address request message to the address allocation server, and sends the response message in which the address allocation server responds to the message content to the switch that sends the address request message.
In the embodiment of the present invention, when determining the number of the preset flow tables, the number may be determined according to the number of hops between the switch that sends the first address request packet and the address allocation server or the number of switch networking layers, for example, the number may be determined as +1, or may be determined as a number of hops between the switch that sends the address request packet and the address allocation server, or may be determined as a number of switch networking layers between the switch that sends the address request packet and the address allocation server.
In the embodiment of the present invention, when the switch presets the number of flow tables, the following method may be adopted:
configuring a matching field in the flow table 1 to include a matching field included in the first address request message, and configuring an execution operation indicated by an execution field in the flow table 1 to include: and performing first assignment on the matching field, and broadcasting a second address matching message, wherein the second address matching message comprises the matching field subjected to the first assignment and the message content. Configuring a matching field of the 2 nd flow table as the matching field after the first assignment, and configuring an execution operation indicated by an execution field of the 2 nd flow table, including: and performing second assignment on the matching field subjected to the first assignment, and broadcasting a third address matching message, wherein the third address matching message comprises the matching field subjected to the second assignment and the message content. And continuously configuring the flow tables according to the mode of configuring the 2 nd flow table until the flow tables with the number are configured.
Optionally, in the embodiment of the present invention, on the premise that it is ensured that the message content included in the address request message can be broadcast to the address server, a flow table for indicating an operation of discarding the address matching message is set in a preset flow table, so as to suppress a broadcast storm.
In another possible design, in the embodiment of the present invention, before determining the matching field of the matching field, an uplink port and a downlink port may be further distinguished, and in a case that the uplink port is determined, the N flow tables are preset in the following manner to avoid a broadcast storm:
configuring a matching field in the 1 st flow table to include the matching field, and configuring an execution operation indicated by an execution field in the 1 st flow table to include: and performing first assignment on the matching field, and broadcasting a second address matching message, wherein the second address matching message comprises the matching field subjected to the first assignment and the message content. Configuring a matching field of the 2 nd flow table as the matching field after the first assignment, and configuring an execution operation indicated by an execution field of the 2 nd flow table, including: and performing second assignment on the matching field subjected to the first assignment, and broadcasting a third address matching message, wherein the third address matching message comprises the matching field subjected to the second assignment and the message content. And continuously configuring the flow tables according to the mode of configuring the 2 nd flow table until the configuration of the N-1 flow tables is completed. And configuring a matching field of a matching field in the Nth flow table as the matching field after the Nth-1-time assignment, wherein the execution operation of the execution field is to broadcast an Nth address matching message to a downlink port, and the Nth address matching message comprises the matching field after the Nth-1-time assignment and the message content.
In a third aspect, a switching system is provided that includes a first switch, at least one second switch, and an address assignment server. In the embodiment of the present invention, each switch in the switching system is preset with N flow tables, where N is an integer greater than 1.
The first switch is configured to generate and broadcast a first address request packet, where the first address request packet includes a matching field and packet contents, and the matching field is used for matching with the N flow tables. The first switch may broadcast the first address request packet according to one of preset N flow tables, or may not broadcast the first address request packet through the preset flow table. The at least one second switch is configured to receive the first address request packet and broadcast the packet content to an address distribution server according to the N flow tables, where the N flow tables support broadcasting the packet content to the address distribution server through the at least one second switch and broadcasting a response packet in response to the packet content by the address distribution server to the first switch. And the address distribution server is used for generating the response message after receiving the message content.
By applying the switching system provided by the embodiment of the invention, the IP address can be distributed to the switch through the data network in the in-band mode.
In this embodiment of the present invention, the at least one second switch may broadcast the packet content to the address assignment server in the following two ways:
in one possible design, a first second switch that receives the first address request packet broadcasted by the first switch determines a flow table matched with the first address request packet in the N flow tables and executes an execution operation indicated by a flow table execution domain matched with the first address request packet, where the execution operation indicated by the execution domain of the flow table matched with the first address request packet includes performing first assignment on the matching field and broadcasting a second address matching packet, and the second address matching packet includes the matching field after the first assignment and the packet content.
And the second switch which receives the second address matching message broadcasted by the first second switch determines a flow table matched with the second address matching message in the N flow tables and executes the execution operation indicated by the flow table execution domain matched with the second address matching message, wherein the execution operation indicated by the execution domain of the flow table matched with the second address matching message comprises the steps of performing second assignment on the matching field subjected to first assignment and broadcasting a third address matching message, and the third address matching message comprises the matching field subjected to second assignment and the message content.
And other second switches except the first second switch and the second switch in the at least one second switch continue to assign the matching fields according to the mode of the second switch, and broadcast the assigned matching fields and the message contents until the Nth second switch determines a flow table matched with the Nth address matching message in the N flow tables, executes the execution operation of the flow table execution domain indication matched with the Nth address matching message, and broadcasts the (N + 1) th address matching message to the address distribution server. The flow table matching method comprises the steps that a matching field of a flow table matched with an Nth address matching message can be matched with a matching field subjected to the assignment for the (N-1) th time, execution operation indicated by an execution field of the flow table matched with the Nth address matching message comprises the steps of performing the assignment for the matching field for the Nth time and broadcasting an (N + 1) th address matching message, wherein the (N + 1) th address matching message comprises the matching field subjected to the assignment for the Nth time and message content.
Optionally, the at least one second switch may further include an N +1 th second switch that receives an N +1 th address matching packet broadcast by the nth second switch. The N +1 th second switch determines the flow table matched with the N +1 th address matching message in the N flow tables and executes the execution operation indicated by the flow table execution domain matched with the N +1 th address matching message, the matching domain of the flow table matched with the N +1 th address matching message can match the matching field after the nth assignment, and the execution operation indicated by the execution domain of the flow table matched with the N +1 th address matching message is to discard the N +1 th address matching message.
In this embodiment of the present invention, if the first switch broadcasts the first address request packet through N preset flow tables, N is +1, which is a hop count between the first switch and the address allocation server. If the first switch does not broadcast the first address request message through preset N flow tables, the N is the hop count between the first switch and the address allocation server.
In another possible design, a first second switch that receives the first address request packet broadcasted by the first switch determines a flow table matched with the first address request packet in the N flow tables and executes an execution operation indicated by a flow table execution domain matched with the first address request packet, the execution operation indicated by the execution domain of the flow table matched with the first address request packet includes performing first assignment on the matching field, and broadcasting a second address matching packet, and the second address matching packet includes the matching field subjected to the first assignment and the packet content.
And the second switch which receives the second address matching message broadcasted by the first second switch determines a flow table matched with the second address matching message in the N flow tables and executes the execution operation indicated by the flow table execution domain matched with the second address matching message, wherein the execution operation indicated by the execution domain of the flow table matched with the second address matching message comprises the steps of performing second assignment on the matching field subjected to first assignment and broadcasting a third address matching message, and the third address matching message comprises the matching field subjected to second assignment and the message content.
And other second switches except the first second switch and the second switch in the at least one second switch continue to assign the matching fields according to the mode of the second switch, and broadcast the assigned matching fields and the message contents until the Nth second switch determines a flow table matched with the Nth address matching message in the N flow tables and executes the execution operation of the flow table execution domain indication matched with the Nth address matching message, and broadcasts the (N + 1) th address matching message to the address distribution server through a downlink port. The flow table matching method comprises the steps that the matching field of the flow table matched with the Nth address matching message can be matched with the matching field subjected to the N-1 th assignment, the execution operation indicated by the execution field of the flow table matched with the Nth address matching message comprises the steps of performing the Nth assignment on the matching field and broadcasting the (N + 1) th address matching message through a downlink port, and the (N + 1) th address matching message comprises the matching field subjected to the Nth assignment and the message content.
In the embodiment of the present invention, when the at least one second switch broadcasts the message content of the address request packet in the second embodiment, the N is the number of switch networking layers between the first switch and the address allocation server.
In a fourth aspect, an embodiment of the present invention further provides an interaction method for each switch in a switching system, where in the interaction method, a second switch sends an address request packet to request an address assignment server to assign an IP address to the second switch. The first switch receives a request message sent by the second switch, and broadcasts the message content included in the address request message to an address distribution server according to preset N flow tables. And after receiving the message content of the address request message, the address server responds to the message content of the address request message and allocates an IP address for the second switch. And the first switch receives a response message of the address server responding to the message content of the address request message, wherein the response message comprises an IP address distributed for the second switch. And the first switch broadcasts the response message according to a preset flow table. And the second switch receives a response message broadcasted by the first switch according to a preset flow table, and takes the IP address distributed to the second switch in the response message as the IP address of the second switch.
In the embodiment of the present invention, after receiving a request packet sent by a second switch, the first switch determines, from the N flow tables, a flow table matched with the first address request packet and executes an execution operation indicated by a flow table execution domain matched with the first address request packet. The execution operation indicated by the execution domain of the flow table matched with the first address request message comprises the steps of performing first assignment on a matching field included in the address request message, and broadcasting the matching field subjected to the first assignment and the message content. If the message content is not broadcasted to the address distribution server, the switch which receives the message content continues to assign the matching field and broadcast the assigned matching field and the message content according to the mode that the first switch determines a flow table and executes operation until the message content is broadcasted to the address distribution server.
In a fifth aspect, an embodiment of the present invention provides a switch, which has corresponding functions to implement the switch related to the second aspect and the fourth aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions. The modules may be software and/or hardware.
In one possible design, the switch includes a processing unit and a communication unit in a structure, the processing unit is used for controlling and managing functions of the switch, and the communication unit is used for communication between the switch and other switches.
The switch in the embodiment of the present invention may further include a storage unit configured to store program codes and data of the switch.
In another possible design, the switch may include a processor, an ethernet interface, a memory, and a bus in its fabric. Wherein the ethernet interface, the processor and the memory are interconnected by a bus. The processor is used for controlling and managing functions of the switch, and the Ethernet interface is used for communication between the switch and other switches. The memory is used for storing program codes and data of the switch.
According to the switch, the method for presetting the flow table by the switch, the switching system and the interaction method between the switches, the message content for the address request can be sent to the address distribution server through at least one switch through the preset N flow tables, the response message of the address distribution server responding to the message content is sent to the switch for sending the address request message, and therefore the automatic distribution of the IP address of the switch in the in-band mode can be achieved.
Drawings
FIG. 1A is a diagram of a prior art out-of-band mode network architecture;
FIG. 1B is a diagram of a prior art in-band mode network architecture;
figure 2 is a SDN network topology diagram of the present invention application;
fig. 3 is a schematic diagram of a switch structure provided in an embodiment of the present invention;
fig. 4 is a schematic diagram of a switch system according to an embodiment of the present invention;
fig. 5 is a schematic flow chart of a switch preset flow table according to an embodiment of the present invention;
fig. 6 is another schematic flow chart of a switch preset flow table according to an embodiment of the present invention;
fig. 7 is a schematic flowchart of implementing IP address allocation in the switch system according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a broadcast content broadcasting process provided by an embodiment of the present invention;
fig. 9 is another schematic diagram of a broadcast content broadcasting process provided by an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a switch according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a switch according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described in detail below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only some embodiments, and not all embodiments, of the present invention.
Throughout the present description, the flow table is used for controlling data flow in an SDN, and may also be referred to as an SDN flow table, and in the embodiment of the present invention, a flow table conforming to an OpenFlow protocol is used as an example, and a flow table conforming to another protocol may also be used in actual use.
The flow table in the embodiment of the invention is mainly used for processing an address request message sent by a switch, and the address request message comprises a matching field and message content. The matching field is used for matching with a flow table, and may be a field in a header of an address request packet, where the field may be a field that is not used or modified in an address request and address response process performed by using the address request packet and does not affect the address request and address response process, and may be, for example, a Time To Live (TTL), a Virtual Local Area Network (VLAN), or a Multi-Protocol Label Switching (MPLS). The message content mainly includes a payload (payload) of the address request message, which is used for performing address request and address response.
The flow table related in the embodiment of the present invention may have the following structure:
matching the domain: matching field is A; execution domain: b, broadcast address matching message
And the matching field (A) indicates that whether the matching field is A or not is judged, the matching field (B) indicates that the matching field is assigned as B, and the address matching message comprises the matching field assigned as B and message content included in the address request message.
In the embodiment of the invention, N flow tables can be preset in the switch, wherein N is an integer larger than 1, and the address request message is processed by utilizing the preset N flow tables. In the embodiment of the present invention, when the address request packet is processed by applying the N flow tables, a flow table in which a matching field can match the address request packet is determined, for example, the flow table in which the matching field can match the address request packet is determined to be the flow table, and if the matching field in which the matching field matches the address request packet is the matching field in the address request packet, the value of the matching field in the address request packet is a, then an execution operation indicated by the execution field in which the flow table of the address request packet is matched is executed, for example, an operation indicated by the execution field according to the flow table is executed, the matching field is reassigned to B, and the address matching packet is broadcasted, where the address matching packet includes the matching field reassigned to B and packet contents included in the address request packet.
The switches in which the N flow tables are preset in the embodiment of the present invention may be virtual switches or physical switches. Illustratively, the switch may be a switch in the SDN network topology shown in fig. 2. The SDN network in fig. 2 includes an SDN controller and a plurality of switches, and there are switches connected to the SDN controller, such as the switch 3 in fig. 2. The communication between the SDN controller and the switch connected to the SDN controller may support an OpenFlow protocol, but in actual use, the communication between the SDN controller and the switch may also be through another protocol. Among the plurality of switches, there is also a switch connected to the address assignment server, such as switch 5 in fig. 2. In the embodiment of the present invention, the address assignment server may respond to a message content included in the address request message and assign an IP address, and the address assignment server may be, for example, a Dynamic Host Configuration Protocol (DHCP) server.
It should be noted that, in the embodiment of the present invention, the SDN controller and the address allocation server may be software entities having the above corresponding functions, or may also be physical entities having corresponding hardware structures, and fig. 2 schematically illustrates, by way of example, that the SDN controller and the address allocation server are two independent entities, but not limited to these, in actual use, the SDN controller and the address allocation server may be deployed on the same functional entity, for example, on the same server device.
The embodiment of the invention firstly provides a switch, and the switch is used for realizing the presetting of a flow table so that the switch with the preset flow table can process an address request message according to the flow table.
Fig. 3 is a schematic structural diagram of a switch according to an embodiment of the present invention, and as shown in fig. 3, the switch 100 includes a main control board 101 and a switch board 102. The main control board 101 is connected to the switch board 102, and the main control board 101 is configured to preset N flow tables for the switch board 102, where N is an integer greater than 1. The switch board 102 is configured to process an address request packet according to the N flow tables, where the address request packet includes a matching field and packet contents, and the matching field is used for matching with the N flow tables.
It should be noted that the schematic structural diagram of the switch 100 shown in fig. 3 in the embodiment of the present invention is only schematically illustrated, and the switch 100 in the embodiment of the present invention is not limited to the above-mentioned structure, for example, there may be one or more master control boards 101, and when there are a plurality of master control boards, the master control boards may include an active master control board and a standby master control board, which are not illustrated in the drawing. For another example, the switch 100 may further include an interface board, which is not illustrated in the figure.
In the embodiment of the present invention, the main control board 101, for the N flow tables preset in the switch board 102, supports that the message content is sent to an address allocation server through at least one switch 100, and a response message in response to the message content by the address allocation server is sent to the switch that sends the address request message.
In the embodiment of the present invention, the main control board 101 may preset N flow tables for the switch board 102 in two ways, so that the N flow tables support that the message content is sent to an address allocation server through at least one switch 100, and a response message that the address allocation server responds to the message content is sent to a switch that sends the address request message.
In the first embodiment, the presetting, by the main control board 101, N flow tables for the switch board 102 includes:
a: the main control board 101 configures a matching field in the flow table 1 including a matching field included in the address request message, and configures an execution operation indicated by an execution field in the flow table 1 including: and performing first assignment on the matching field, and broadcasting an address matching message, wherein the address matching message comprises the matching field subjected to the first assignment and the message content.
In the embodiment of the present invention, in order to distinguish the address request packet before matching and the address matching packet after broadcasting, the address request packet may be distinguished by "first" and "second", and the terms "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or a sequence. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. For example, the address request packet in step a may be referred to as a first address request packet, and the broadcasted address packet may be referred to as a second address matching packet.
B: the main control board 101 configures the matching field of the 2 nd flow table as the matching field after the first assignment, and configures the execution operation indicated by the execution field of the 2 nd flow table to include: performing second assignment on the matching field subjected to the first assignment, and broadcasting a third address matching message, wherein the third address matching message comprises the matching field subjected to the second assignment and the message content;
c: the main control board 101 completes the remaining flow tables of the N flow tables except for the 1 st flow table and the 2 nd flow table in a manner of configuring the 2 nd flow table.
In this embodiment of the present invention, the manner of configuring the 2 nd flow table is to configure a matching field of the mth flow table as the matching field after being assigned for the M-1 st time, where M is an integer greater than 1 and not greater than N, and configure the execution operation indicated by the execution field of the mth flow table to include: and performing M-th assignment on the matching field, and broadcasting an M + 1-th address matching message, wherein the M + 1-th address matching message comprises the matching field subjected to M-th assignment and the message content.
In the embodiment of the present invention, when the main control board 101 presets N flow tables for the switch board 102, the value of N may be determined according to the hop count between the switch that sends the first address request packet and the address assignment server.
In the embodiment of the present invention, the maximum hop count in the shortest path between the switch that sends the first address request packet and the address is used as the hop count between the switch that sends the first address request packet and the address allocation server.
In the embodiment of the present invention, if the switch that sends the first address request packet through a preset flow table, the N is +1, which is the hop count between the switch that sends the address request packet and the address allocation server. And if the switch sending the first address request message does not send the first address request message through a preset flow table, the N is the hop count between the switch sending the address request message and the address allocation server.
Optionally, the main control board 101 may also preset N +1 flow tables for the switch board 102, where a matching field in the N +1 flow table is the matching field after the nth value assignment, and the execution operation of the execution field is to discard the message content, so as to avoid a broadcast storm.
In a second embodiment, the presetting, by the main control board 101, N flow tables for the switch board 102 includes:
a: the main control board 101 configures a matching field in the 1 st flow table to include the matching field, and configures the execution operation indicated by the execution field in the 1 st flow table to include: and performing first assignment on the matching field, and broadcasting a second address matching message, wherein the second address matching message comprises the matching field subjected to the first assignment and the message content.
B: the main control board 101 configures the matching field of the 2 nd flow table as the matching field after the first assignment, and configures the execution operation indicated by the execution field of the 2 nd flow table to include: and performing second assignment on the matching field subjected to the first assignment, and broadcasting a third address matching message, wherein the third address matching message comprises the matching field subjected to the second assignment and the message content.
C: the main control board 101 configures the rest of the N flow tables, except for the 1 st flow table, the 2 nd flow table, and the nth flow table, according to the manner of configuring the 2 nd flow table.
D: the main control board 101 configures a matching field of a matching field in the nth flow table as the matching field after being assigned for the nth-1 time, and the execution operation of the execution field is to broadcast an nth address matching message to a downlink port, where the nth address matching message includes the matching field after being assigned for the nth-1 time and the message content.
The difference between the process of presetting the flow table in the second embodiment of the present invention and the process of presetting the flow table in the first embodiment is that in step D, the operation executed by the execution domain is to broadcast the nth address matching packet to the downstream port, so as to avoid broadcasting the matching packet to the upstream port at the switch capable of broadcasting the address matching packet to the address assignment server, thereby avoiding broadcasting a storm. The execution process of A, B and C in the process of presetting the flow table in the second embodiment of the present invention is similar to that in the first embodiment, and for the parts that are not described in detail in this embodiment, reference may be made to the related description in the first embodiment.
In a second implementation manner of this embodiment of the present invention, when the main control board 101 presets N flow tables for the switch board 102, the value of N may be determined according to the number of switch networking layers between the switch that sends the first address request packet and the address allocation server.
The networking layer number of the switch in the embodiment of the invention can be determined by adopting the following method: the switch is interconnected with the upper-layer switch through the uplink port, and the networking layer number of the switch is two. The switch at the uppermost layer is connected with the internet port in the north-south direction, the access switch is connected with the server equipment, the hop count +1 formed by the uplink ports between the access switch and the switch at the uppermost layer is determined as the networking layer number of the switch, and if the hop counts between a plurality of access switches and the switch at the uppermost layer are different, the maximum hop count is determined as the networking layer number of the switch.
In the embodiment of the present invention, when the flow table is preset in the second implementation manner, the N is the number of switch networking layers between the switch that sends the address request packet and the address allocation server.
Optionally, in the two embodiments of the present invention, the main control board 101 may include, in the N flow tables preset for the switch board 102, a flow table in which a matching field of the default message is a flow table of the default message, where the matching field is that the flow table of the default message can match any address request message, so that when the matching field of the address request message cannot be matched with the matching field, the flow table containing the matching field of the default message may be executed. Of course, in the specific implementation process, after the flow table with the matching field being the default message is executed, the flow table with the matching field being the default message may be deleted, so as to ensure that the address request message can be matched with other flow tables to perform a normal processing flow.
In the embodiment of the present invention, by presetting the N flow tables, the N flow tables support that the message content is sent to the address allocation server through at least one switch, and a response message in which the address allocation server responds to the message content is sent to the switch that sends the first address request message.
Fig. 4 is a schematic diagram illustrating a configuration of a switching system 200 according to an embodiment of the present invention, and as shown in fig. 4, the switching system 200 includes a first switch 201, at least one second switch 202, and an address allocation server 203.
In the embodiment of the present invention, each switch in the switching system is preset with N flow tables, where N is an integer greater than 1, and a process of presetting the N flow tables by the switch may refer to the related description of the above embodiment, which is not described herein again.
The first switch 201 is configured to generate and broadcast a first address request packet, where the first address request packet includes a matching field and packet contents, and the matching field is used for matching with the N flow tables. The first switch 201 may broadcast the first address request packet according to one of the preset N flow tables, or may not broadcast the first address request packet through the preset flow table.
The at least one second switch 202 is configured to receive the first address request packet and broadcast the packet content to the address distribution server 203 according to the N flow tables, where the N flow tables support that the packet content is broadcast to the address distribution server 203 through the at least one second switch 202 and a response packet in which the address distribution server 203 responds to the packet content is broadcast to the first switch 201.
The address assignment server 203 is configured to generate the response packet after receiving the packet content.
In this embodiment of the present invention, the at least one second switch 202 may broadcast the message content to the address assignment server 203 in the following two manners:
in a first embodiment:
a: the first second switch 202 that receives the first address request packet broadcasted by the first switch 201 determines the flow table matched with the first address request packet in the N flow tables and executes the execution operation indicated by the flow table execution domain matched with the first address request packet, wherein the matching domain of the flow table matched with the first address request packet can match the matching field, the execution operation indicated by the execution domain of the flow table matched with the first address request packet includes performing first assignment on the matching field and broadcasting a second address matching packet, and the second address matching packet includes the matching field after the first assignment and the packet content.
B: the second switch 202 which receives the second address matching message broadcasted by the first second switch 202 determines that the matching field can match the flow table matched with the second address matching message of the matching field after the first assignment in the N flow tables, and executes the execution operation indicated by the flow table execution field matched with the second address matching message, wherein the execution operation indicated by the execution field of the flow table matched with the second address matching message includes performing the second assignment on the matching field after the first assignment, and broadcasting a third address matching message, and the third address matching message includes the matching field after the second assignment and the message content.
C: the other second switches 202 in the at least one second switch 202 except the first second switch 202 and the second switch 202 continue to assign values to the matching fields according to the manner of the second switch 202, and broadcast the matching fields and the message contents after assigning values until the nth second switch 202 determines a flow table matched with the nth address matching message in the N flow tables and executes the execution operation indicated by the flow table execution domain matched with the nth address matching message, and broadcasts the N +1 th address matching message to the address assignment server 203. The flow table matching method comprises the steps that a matching field of a flow table matched with an Nth address matching message can be matched with a matching field subjected to the assignment for the (N-1) th time, execution operation indicated by an execution field of the flow table matched with the Nth address matching message comprises the steps of performing the assignment for the matching field for the Nth time and broadcasting an (N + 1) th address matching message, wherein the (N + 1) th address matching message comprises the matching field subjected to the assignment for the Nth time and message content.
Optionally, the at least one second switch 202 may further include an N +1 th second switch 202 that receives the N +1 th address matching packet broadcast by the nth second switch 202. The (N + 1) th second switch 202 determines the flow table matched with the (N + 1) th address matching message from the N flow tables and executes the execution operation indicated by the flow table execution domain matched with the (N + 1) th address matching message, the matching domain of the flow table matched with the (N + 1) th address matching message can match the matching field after the nth assignment, and the execution operation indicated by the execution domain of the flow table matched with the (N + 1) th address matching message is to discard the (N + 1) th address matching message.
In this embodiment of the present invention, if the first switch 201 broadcasts the first address request packet through N preset flow tables, N is +1, which is the hop count between the first switch and the address allocation server. If the first switch 201 does not broadcast the first address request packet through the preset N flow tables, the N is the hop count between the first switch and the address allocation server.
In the second embodiment, the implementation process of the at least one second switch 202 broadcasting the message content to the address assignment server 203 is similar to the implementation process of the first embodiment, except that after the nth second switch determines the flow table matched with the nth address matching message from the N flow tables, the N +1 th address matching message is broadcasted to the address assignment server through the downlink port, that is, in the second embodiment, the N second switch determines that the matching field of the flow table matched with the nth address matching message from the N flow tables can match the matching field after the N-1 th assignment, the execution operation indicated by the execution field of the flow table matched with the nth address matching message includes the N-th assignment for the matching field, and the N +1 th address matching message is broadcasted through the downlink port, the N +1 th address matching message comprises the matching field after the nth assignment and the message content.
In this embodiment of the present invention, when the at least one second switch 202 broadcasts the message content of the address request packet by using the second embodiment, the N is the number of switch networking layers between the first switch and the address allocation server.
By applying the switch and the switching system provided by the embodiment of the invention, the IP address can be allocated to the switch through the data network in an in-band mode. The following describes a process of implementing IP address assignment by using the switch and the switching system according to the embodiments.
In the embodiment of the invention, N flow tables are required to be preset in each switch in the switch, so that each switch can broadcast an address request message for requesting allocation of an IP address to an address server according to the preset flow tables, and broadcast a response message containing the IP address allocated by the address server to the switch requesting allocation of the IP address according to the preset flow tables, thereby realizing IP address allocation of the switch.
Fig. 5 is a flowchart of an implementation of presetting a flow table by each switch in the switches according to the embodiment of the present invention, as shown in fig. 5, including:
s101: the switch determines a preset matching field of the flow table matching field.
The preset flow table in the embodiment of the invention is used for processing the address request message, so the determined matching field can be matched with the matching field of the address request message, such as one of TTL, VLAN and MPLS.
S102: the switch determines the number N of preset flow tables, wherein N is an integer larger than 1.
S103: the switch configures the N flow tables, and the N flow tables support that the message content included in the address request message is sent to an address distribution server through at least one switch, and a response message responded by the address distribution server to the message content is sent to the switch sending the address request message.
The implementation process of configuring the N flow tables in the embodiment of the present invention may refer to the process of configuring the N flow tables for the switch board 102 by the main control board 101 in the above embodiment, which is not described herein again.
For example, when the flow table is preset in the first embodiment, if N is 4, and the preset flow table includes a flow table whose matching field is a default message, the flow table preset by the switch may be in the following form:
flow table 1, matching field: defaults; execution domain: matching field is broadcast as A;
flow table 2 matching field: matching field a execution field: matching field is broadcast;
flow table 3 matching field: matching field B execution field: broadcast matching field ═.. broadcast;
flow table 4 matching field: execute field: match field Z broadcast.
The flow table preset in the embodiment of the invention is configured in the above way, so that each switch can be matched with one flow table and execute broadcast operation after receiving the message content of the address request message, and the message content of the address request message can be broadcast to the address server through a plurality of switches.
Optionally, in order to suppress a broadcast storm in the embodiment of the present invention, on the premise that it is ensured that a message content included in an address request message can be broadcast to an address server, a flow table for indicating an operation of discarding the address matching message may be set in a preset flow table, for example, on the basis of the set flow table, the following flow table may be further set:
flow table 5 matching field: matching field Z execution field: and (4) drop.
In order to further suppress a broadcast storm in the embodiment of the present invention, broadcast suppression may be performed by controlling an uplink and downlink broadcast direction of a message content included in an address request message, for example, in a preset flow table, a flow table including an operation for indicating that the message content included in the address request message is broadcast through a downlink port may be set, so as to suppress broadcast of the message content in the uplink direction.
Optionally, in the case of distinguishing the uplink and downlink broadcasting directions, the process of the switch presetting the flow table is similar to that in fig. 5, except that the following steps are further included before executing S101, as shown in fig. 6:
s101 a: and determining a downlink port.
If the port is determined to be a downstream port, the N flow tables are preset in such a manner that the main control board 101 presets the flow tables for the switch board 102 in the second embodiment.
The implementation manner of the switch preset flow table in the embodiment of the present invention may have a variety of implementation manners, and the implementation manner of the switch preset flow table in the embodiment of the present invention is not limited in the embodiment of the present invention, and for example, the implementation manner may be implemented by deploying a broadcast agent in the switch, where the broadcast agent may be a preset script on an operating system of the switch, and is started when the switch is started, and the flow table is preset for each switch according to the manner of configuring the flow table.
The following describes in detail a process of implementing IP address allocation in an in-band mode by a switch according to a preset flow table.
In the embodiment of the present invention, the implementation process of broadcasting the message content in the address request message to the address server by the switch is similar to the implementation process of broadcasting the response message to the switch requesting to allocate an IP address by the switch, so the following description focuses on the implementation process of broadcasting the message content of the address request message to the address server by the switch.
In the embodiment of the invention, for convenience of description, the switch which broadcasts the message content according to the preset flow table can be called a first switch, and the switch which sends the address request message and requests to allocate the IP address can be called a second switch.
Fig. 7 is a flowchart of a method for implementing IP address allocation in an in-band mode by a switch according to a preset flow table, as shown in fig. 7, where the method includes:
s201: and the second switch sends an address request message to request an address allocation server to allocate an IP address for the second switch.
S202: the first switch receives a request message sent by the second switch, and broadcasts the message content included in the address request message to an address distribution server according to preset N flow tables.
Typically, the first switch receiving the address request message is a switch connected to the second switch. In the embodiment of the present invention, after receiving a request packet sent by a second switch, the first switch determines, from the N flow tables, a flow table matched with the first address request packet and executes an execution operation indicated by a flow table execution domain matched with the first address request packet. The execution operation indicated by the execution domain of the flow table matched with the first address request message comprises the steps of performing first assignment on a matching field included in the address request message, and broadcasting the matching field subjected to the first assignment and the message content. If the message content is not broadcasted to the address distribution server, the switch that receives the message content continues to assign the matching field and broadcast the assigned matching field and the message content according to the way in which the first switch determines the flow table and executes the operation until the message content is broadcasted to the address distribution server.
The following describes an IP address assignment process according to an embodiment of the present invention, taking the network topology shown in fig. 2 as an example:
each switch in fig. 2 is preconfigured with a flow table that satisfies a condition for broadcasting the message content included in the address request message sent by the switch 3 to the address server, for example, the preset flow table is as follows:
flow table 1, matching field: VLAN-3 enforcement domain: drop;
flow table 2, matching field: VLAN ═ 2 enforcement domain: VLAN +1 broadcasting;
flow table 3, matching field: VLAN ═ 1 enforcement field: VLAN +1 broadcasting;
flow table 4, matching field: default execution domain: VLAN +1 broadcast.
Fig. 8 is a schematic diagram showing that the switch broadcasts the message content of the address request message according to the preset flow table, in fig. 8, the switch 3 starts to send the address request message for requesting allocation of the IP address, the address request message is received by the switch 1 and the switch 2, and after the switch 1 and the switch 2 receive the address request message, the matching field is determined to be the default value, so that the operation execution operation indicated by the execution domain of the flow table 4 is performed, that is, the matching field VLAN +1 is broadcasted. The matching field of VLAN ═ 1 and the message content broadcast by the switch 1 and the switch 2 are received by the switch 3, the switch 4 and the switch 5, and after the matching field of VLAN ═ 1 and the message content are received by the switch 3, the switch 4 and the switch 5, the matching of the upper flow table 3 is determined, and the operation indicated by the execution domain of the flow table 3 is executed, that is, the VLAN ═ 2 and the message content are broadcast. The message content broadcast by the switch 5 can be received by the address server.
Optionally, the message content broadcasted by the switch 3, the switch 4, and the switch 5 can be received by the switch 1 and the switch 2, the switch 1 and the switch 2 continue to execute the broadcast of the matching field with VLAN ═ 2 and the message content after matching to the flow table 2, the broadcasted matching field with VLAN ═ 2 and the message content are received by the switch 3, the switch 4, and the switch 5, after receiving the message content, determine that the upper flow table 1 can be matched, and execute a drop (drop) operation according to the operation indicated by the execution domain of the flow table 1.
In the embodiment of the present invention, each switch in the network topology shown in fig. 2 may also implement broadcasting the message content of the address request packet to the address server in the following preset flow table manner. For example, the following may be employed:
flow table 1 matching field: VLAN ═ 1 enforcement domain: broadcasting at a downlink port;
flow table 2 default execution domain: VLAN +1 broadcast.
Fig. 9 is another schematic diagram showing that the switch broadcasts the message content in the address request message according to the preset flow table, in fig. 9, the switch 3 starts and then sends the address request message for requesting allocation of the IP address, the address request message is received by the switch 1 and the switch 2, and after receiving the address request message, the switch 1 and the switch 2 determine that the matching of the upper flow table 2 is possible, so that the operation is executed according to the operation indicated by the execution domain of the flow table 2, that is, the broadcast is performed after the matching of the field VLAN + 1. The matching field of VLAN ═ 1 broadcasted by the switch 1 and the switch 2 and the message content can be received by the switch 3, the switch 4 and the switch 5, after the switch 3, the switch 4 and the switch 5 receive the matching field of VLAN ═ 1 and the message content, the flow table 1 is matched, the matching field of VLAN ═ 1 broadcasted to the downstream port and the operation of the message content are executed according to the operation indicated by the execution domain of the flow table 1, so that the message content broadcasted by the switch 5 through the downstream port is received by the address server, the broadcast of the switch 3, the switch 4 and the switch 5 through the upstream port is avoided, and the broadcast storm is suppressed.
S203: and after receiving the message content of the address request message, the address server responds to the message content of the address request message and allocates an IP address for the second switch.
S204: and the first switch receives a response message of the address server responding to the message content of the address request message, wherein the response message comprises an IP address distributed for the second switch.
S205: and the first switch broadcasts the response message according to a preset flow table.
S206: and the second switch receives a response message broadcasted by the first switch according to a preset flow table, and takes the IP address distributed to the second switch in the response message as the IP address of the second switch.
The embodiment of the present invention may perform functional unit division on the related switch according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit may be implemented in the form of hardware, for example, as shown in fig. 3, or in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In the case of integrated units, fig. 10 shows a possible structural diagram of the switch involved in the above-described embodiment. In fig. 10, a switch 1000 includes a processing unit 1001 and a communication unit 1002, where the processing unit 1001 is configured to control and manage functions of the switch 1000, for example, it may perform the processes of determining a matching domain and presetting a flow table as described in the above embodiment, and the communication unit 1002 is configured to perform communication between the switch 1000 and other switches, for example, it may only perform the processes of receiving and broadcasting message contents as described in the above embodiment. The switch 1000 in the embodiment of the present invention may further include a storage unit 1003, configured to store program codes and data of the switch.
The processing Unit 1001 may be a Processor or a controller, such as a Central Processing Unit (CPU), a general-purpose Processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others. The communication unit 1002 may be a communication interface such as an ethernet interface or the like. The storage unit 1003 may be a storage device such as a memory.
When the processing unit 1001 is a processor, the communication unit 1002 is an ethernet interface, and the storage unit 1003 is a memory, the switch according to the embodiment of the present invention may be the switch shown in fig. 11.
Referring to fig. 11, the switch 1000 includes: a processor 10011, an ethernet interface 10021, and a memory 10031. Optionally, switch 1000 can also include bus 10041. The ethernet interface 10021, the processor 10011, and the memory 10031 may be connected to each other through a bus 10041; the bus 10041 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 10041 can be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 11, but this is not intended to represent only one bus or type of bus.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A switch comprises a switch board and a main control board, wherein the main control board is connected with the switch board,
the main control board is used for presetting N flow tables for the exchange board, wherein N is an integer greater than 1;
the switch board is configured to process a first address request packet according to the N flow tables, where the first address request packet includes a matching field and packet contents, and the matching field is used for matching with the N flow tables;
the N flow tables support that the message content is sent to an address distribution server through at least one switch, and a response message of the address distribution server responding to the message content is sent to the switch which sends the first address request message;
the main control board presets N flow tables for the exchange board, and the method comprises the following steps:
the main control board configures a matching field in the 1 st flow table to include the matching field, and configures the execution operation indicated by the execution field in the 1 st flow table to include: performing first assignment on the matching field, and broadcasting a second address matching message, wherein the second address matching message comprises the matching field subjected to first assignment and the message content;
the main control board configures a matching field of the 2 nd flow table as the matching field after the first assignment, and configures the execution operation indicated by the execution field of the 2 nd flow table to include: performing second assignment on the matching field subjected to the first assignment, and broadcasting a third address matching message, wherein the third address matching message comprises the matching field subjected to the second assignment and the message content;
the main control board configures the rest of the N flow tables except the 1 st flow table, the 2 nd flow table and the N nd flow table according to the manner of configuring the 2 nd flow table;
the main control board configures a matching field of a matching field in the Nth flow table as the matching field after being assigned for the (N-1) th time, and the execution operation of the execution field is to broadcast an Nth address matching message to a downlink port, wherein the Nth address matching message comprises the matching field after being assigned for the (N-1) th time and the message content.
2. The switch of claim 1, wherein the master board pre-provisioning N flow tables for the switch board comprises:
the main control board configures a matching field in the 1 st flow table to include the matching field, and configures the execution operation indicated by the execution field in the 1 st flow table to include: performing first assignment on the matching field, and broadcasting a second address matching message, wherein the second address matching message comprises the matching field subjected to first assignment and the message content;
the main control board configures a matching field of the 2 nd flow table as the matching field after the first assignment, and configures the execution operation indicated by the execution field of the 2 nd flow table to include: performing second assignment on the matching field subjected to the first assignment, and broadcasting a third address matching message, wherein the third address matching message comprises the matching field subjected to the second assignment and the message content;
and the main control board configures the rest of the flow tables in the N flow tables except the 1 st flow table and the 2 nd flow table according to the mode of configuring the 2 nd flow table.
3. The switch of claim 2, wherein N is the number of hops between the switch sending the first address request message and the address assignment server.
4. The switch of claim 2, wherein N is +1 hops between the switch sending the first address request message and the address assignment server.
5. The switch according to any of claims 2 to 4, characterized in that the preset flow tables further include an N +1 th flow table;
wherein, the matching field in the (N + 1) th flow table is the matching field after the nth value assignment, and the execution operation indicated by the execution field comprises discarding the message content.
6. The switch of claim 1, wherein N is a number of switch networking layers between the switch sending the first address request message and the address assignment server.
7. A switching system, comprising: the system comprises a first switch, at least one second switch and an address allocation server, wherein each switch is preset with N flow tables, and N is an integer greater than 1;
the first switch is used for generating and broadcasting a first address request message, the first address request message comprises a matching field and message content, and the matching field is used for matching with the N flow tables;
the at least one second switch is configured to receive the first address request packet and broadcast the packet content to an address distribution server according to the N flow tables, where the N flow tables support broadcasting the packet content to the address distribution server through the at least one second switch and broadcasting a response packet in response to the packet content by the address distribution server to the first switch;
the address distribution server is used for generating the response message after receiving the message content;
the at least one second switch receives the first address request message and broadcasts the message content to an address distribution server according to the N flow tables, and the method includes:
a first second switch receiving the first address request message broadcasted by the first switch determines a flow table matched with the first address request message in the N flow tables and executes an execution operation indicated by a flow table execution domain matched with the first address request message, wherein the execution operation indicated by the execution domain of the flow table matched with the first address request message comprises a first assignment of the matching field and a broadcast of a second address matching message, and the second address matching message comprises the matching field subjected to the first assignment and the message content;
the second switch receiving the second address matching message broadcasted by the first second switch determines a flow table matched with the second address matching message in the N flow tables and executes the execution operation indicated by the flow table execution domain matched with the second address matching message, the execution operation indicated by the execution domain of the flow table matched with the second address matching message comprises the steps of performing second assignment on the matching field subjected to first assignment and broadcasting a third address matching message, and the third address matching message comprises the matching field subjected to second assignment and the message content;
the other second switches except the first second switch and the second switch in the at least one second switch continue to assign the matching fields according to the mode of the second switch, and broadcast the assigned matching fields and the message contents until the Nth second switch determines a flow table matched with the Nth address matching message in the N flow tables and executes the execution operation of the flow table execution domain indication matched with the Nth address matching message, and broadcasts the (N + 1) th address matching message to the address distribution server;
the matching field of the flow table matched with the Nth address matching message can be matched with the matching field subjected to the N-1 th assignment, the execution operation indicated by the execution field of the flow table matched with the Nth address matching message comprises the steps of performing the Nth assignment on the matching field and broadcasting the (N + 1) th address matching message, and the (N + 1) th address matching message comprises the matching field subjected to the Nth assignment and the message content; or,
the at least one second switch receives the first address request message and broadcasts the message content to an address distribution server according to the N flow tables, and the method includes:
a first second switch receiving the first address request message broadcasted by the first switch determines a flow table matched with the first address request message in the N flow tables and executes an execution operation indicated by a flow table execution domain matched with the first address request message, wherein the execution operation indicated by the execution domain of the flow table matched with the first address request message comprises a first assignment of the matching field and a broadcast of a second address matching message, and the second address matching message comprises the matching field subjected to the first assignment and the message content;
the second switch receiving the second address matching message broadcasted by the first second switch determines a flow table matched with the second address matching message in the N flow tables and executes the execution operation indicated by the flow table execution domain matched with the second address matching message, the execution operation indicated by the execution domain of the flow table matched with the second address matching message comprises the steps of performing second assignment on the matching field subjected to first assignment and broadcasting a third address matching message, and the third address matching message comprises the matching field subjected to second assignment and the message content;
the other second switches except the first second switch and the second switch in the at least one second switch continue to assign the matching fields according to the mode of the second switch, and broadcast the assigned matching fields and the message content until the Nth second switch determines a flow table matched with the Nth address matching message in the N flow tables and executes the execution operation of the flow table execution domain indication matched with the Nth address matching message, and broadcasts the (N + 1) th address matching message to the address distribution server through a downlink port;
the matching field of the flow table matched with the Nth address matching message can be matched with the matching field after being assigned for the (N-1) th time, the execution operation indicated by the execution field of the flow table matched with the Nth address matching message comprises the steps of carrying out the assignment for the matching field for the Nth time and broadcasting the (N + 1) th address matching message through a downlink port, and the (N + 1) th address matching message comprises the matching field after being assigned for the Nth time and the message content.
8. The switching system according to claim 7, wherein the N is a hop count between the first switch and the address assignment server; or
And N is the hop count between the first switch and the address allocation server + 1.
9. The switching system according to claim 7 or 8, wherein the at least one second switch includes an N +1 th second switch that receives an N +1 th address matching message broadcast by the nth second switch;
the N +1 th second switch determines the flow table matched with the N +1 th address matching message in the N flow tables and executes the execution operation indicated by the flow table execution domain matched with the N +1 th address matching message, the matching domain of the flow table matched with the N +1 th address matching message can match the matching field after the nth assignment, and the execution operation indicated by the execution domain of the flow table matched with the N +1 th address matching message is to discard the N +1 th address matching message.
10. The switching system according to claim 7, wherein N is a number of switch networking layers between the first switch and the address assignment server.
CN201610608386.3A 2016-07-29 2016-07-29 Switch and switching system Active CN107666440B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610608386.3A CN107666440B (en) 2016-07-29 2016-07-29 Switch and switching system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610608386.3A CN107666440B (en) 2016-07-29 2016-07-29 Switch and switching system

Publications (2)

Publication Number Publication Date
CN107666440A CN107666440A (en) 2018-02-06
CN107666440B true CN107666440B (en) 2020-09-11

Family

ID=61115513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610608386.3A Active CN107666440B (en) 2016-07-29 2016-07-29 Switch and switching system

Country Status (1)

Country Link
CN (1) CN107666440B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710432A (en) * 2012-04-27 2012-10-03 北京云杉世纪网络科技有限公司 System and method for managing virtual network in cloud computation data center
CN104135539A (en) * 2014-08-15 2014-11-05 华为技术有限公司 Data storage method, SDN controller and distributed network storage system
US9264400B1 (en) * 2013-12-02 2016-02-16 Trend Micro Incorporated Software defined networking pipe for network traffic inspection
CN105763465A (en) * 2016-01-29 2016-07-13 杭州华三通信技术有限公司 Distributed combination flow control method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9712431B2 (en) * 2013-07-17 2017-07-18 Kt Corporation Methods for managing transaction in software defined network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710432A (en) * 2012-04-27 2012-10-03 北京云杉世纪网络科技有限公司 System and method for managing virtual network in cloud computation data center
US9264400B1 (en) * 2013-12-02 2016-02-16 Trend Micro Incorporated Software defined networking pipe for network traffic inspection
CN104135539A (en) * 2014-08-15 2014-11-05 华为技术有限公司 Data storage method, SDN controller and distributed network storage system
CN105763465A (en) * 2016-01-29 2016-07-13 杭州华三通信技术有限公司 Distributed combination flow control method and device

Also Published As

Publication number Publication date
CN107666440A (en) 2018-02-06

Similar Documents

Publication Publication Date Title
US10063470B2 (en) Data center network system based on software-defined network and packet forwarding method, address resolution method, routing controller thereof
CN103814554B (en) A kind of communication means of virtual easily extensible local area network (LAN), device and system
CN108768692B (en) Network creation method, related equipment and system
CN112087386B (en) Message processing method, device and system
US20220191136A1 (en) Label Management Method, Data Stream Processing Method, and Device
US8310939B2 (en) Method, system, and device for configuring operation, administration and maintenance properties
EP3664420A1 (en) Managing address spaces across network elements
US20190238949A1 (en) Multicast service providing method and software defined networking controller
CN106878480B (en) DHCP service process sharing method and device
CN104065759A (en) Method for improving utilization efficiency of NAT address pool resource and device thereof
US11140091B2 (en) Openflow protocol-based resource control method and system, and apparatus
US20200304456A1 (en) Network and Network Management Method
WO2018161795A1 (en) Routing priority configuration method, device, and controller
CN113726915A (en) Network system, message transmission method therein and related device
CN104618148B (en) The backup method and equipment of a kind of firewall box
CN107666440B (en) Switch and switching system
CN107124307B (en) Management VLAN (virtual local area network) switching method and device
WO2022166465A1 (en) Message processing method and related apparatus
CN102624727B (en) Interface configuration method, device, master control central processing unit and network equipment
WO2022063065A1 (en) Routing information transmission method and apparatus
WO2016091186A1 (en) Method and system for preventing conflict from occurring in resources occupied by logical switch
CN110990123B (en) Method and device for constructing virtual machine network system
CN115811499A (en) Method and equipment for designated forwarder DF election
CN107911301B (en) Message forwarding method and device
CN115208857A (en) Address allocation method, device and equipment

Legal Events

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