CN110838935A - High-availability SDN controller clustering method, system, storage medium and equipment - Google Patents

High-availability SDN controller clustering method, system, storage medium and equipment Download PDF

Info

Publication number
CN110838935A
CN110838935A CN201811207413.1A CN201811207413A CN110838935A CN 110838935 A CN110838935 A CN 110838935A CN 201811207413 A CN201811207413 A CN 201811207413A CN 110838935 A CN110838935 A CN 110838935A
Authority
CN
China
Prior art keywords
controller
controllers
network
tcp
availability
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
CN201811207413.1A
Other languages
Chinese (zh)
Other versions
CN110838935B (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.)
Shanghai Broadband Technology and Application Engineering Research Center
Original Assignee
Shanghai Broadband Technology and Application Engineering Research Center
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 Shanghai Broadband Technology and Application Engineering Research Center filed Critical Shanghai Broadband Technology and Application Engineering Research Center
Publication of CN110838935A publication Critical patent/CN110838935A/en
Application granted granted Critical
Publication of CN110838935B publication Critical patent/CN110838935B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Abstract

The invention provides a high-availability SDN controller clustering method, a system, a storage medium and equipment, wherein the high-availability SDN controller clustering method comprises the following steps: setting a service port, a controller IP and a virtual IP in a cluster into a configuration file; a single TCP is arranged to be connected between any two controllers; setting a main controller election mechanism between the controllers based on the TCP connection; when the main controller is down or the network is abnormal, selecting a new main controller; the new main controller seizes a virtual IP and broadcasts a free ARP request; and informing the nodes in the local area network to update the ARP cache table. The method and the device solve the problem that in the SDN controller cluster in the prior art, when the main controller is down or the network is abnormal, the whole SDN controller cluster is in an unavailable abnormal state. And a master controller election mechanism is creatively utilized to realize the high availability of the SDN controller cluster.

Description

High-availability SDN controller clustering method, system, storage medium and equipment
Technical Field
The invention particularly relates to a high-availability SDN controller clustering method, a system, a storage medium and equipment.
Background
In a network in a traditional IT architecture, after the network is deployed and brought online according to service requirements, if the service requirements change, IT is a very tedious matter to modify the configuration on corresponding network devices (routers, switches, firewalls) again. In the service environment of the internet/mobile internet, the high stability and the high performance of the network are not enough to meet the service requirement, and the flexibility and the agility are more critical. What SDN does is to separate the control rights on the network devices, manage them by a centralized controller, and shield the differences from the underlying network devices without relying on the underlying network devices (routers, switches, firewalls). The control right is completely open, and the user can customize any network routing and transmission rule strategy to be realized, so that the method is more flexible and intelligent.
However, in the SDN controller cluster, when the main controller is down or the network is abnormal, the whole SDN controller cluster faces an abnormal state that is unavailable.
Disclosure of Invention
In view of the above drawbacks of the prior art, the present invention provides a complete name for solving the problem that in an SDN controller cluster in the prior art, when a main controller is down or a network is abnormal, the entire SDN controller cluster faces an abnormal state that is not available.
To achieve the above and other related objects, the present invention provides a high-availability SDN controller clustering method, including the steps of: setting a service port, a controller IP and a virtual IP in a cluster into a configuration file; a single TCP is arranged to be connected between any two controllers; setting a main controller election mechanism between the controllers based on the TCP connection; when the main controller is down or the network is abnormal, a new main controller is elected through the main controller election mechanism; the new main controller seizes a virtual IP and broadcasts a free ARP request; and informing the nodes in the local area network to update the ARP cache table.
In an embodiment of the present invention, an implementation procedure of setting a single TCP connection between all any two controllers includes: the controller initiates a listening service at a port; monitoring TCP connection requests of other controllers; the controller tries to connect other controllers in the cluster according to the configured controller list and simultaneously monitors the connection request service of the opposite controller; the two controllers retain and only retain the newly established TCP connection between them.
In an embodiment of the present invention, when the main controller is down or the network is abnormal, an implementation process of electing a new main controller through the main controller election mechanism includes: judging whether only one slave controller monitoring the downtime of the master controller or the network abnormity exists; if yes, the slave controller determines that the name of the master controller is promoted and stores the name to the local; otherwise, the multiple slave controllers simultaneously and respectively determine the name of a master controller and store the name to the local.
In an embodiment of the present invention, the rule for determining the nomination of the master controller includes: and (5) nominating the slave controller with the largest IP in all the slave controllers with normal TCP connections.
In an embodiment of the present invention, the method for clustering high-availability SDN controllers further includes: adding a new controller IP into all controller IP summary tables when a new controller is added into the controller cluster; the new controller IP is automatically configured into the configuration files of the other controllers.
To achieve the above and other related objects, the present invention provides a highly available SDN controller cluster system, comprising: the configuration module is used for setting a service port, a controller IP and a virtual IP in the cluster into a configuration file; a single TCP is arranged to be connected between any two controllers; the processing module is in communication connection with the configuration module and is used for electing a new main controller through the main election mechanism when the main controller is down or the network is abnormal; the new main controller seizes a virtual IP and broadcasts a free ARP request; informing nodes in the local area network to update an ARP cache table; and the master controller election module is in communication connection with the processing module and is used for realizing a master controller election mechanism in the cluster system.
In an embodiment of the present invention, an implementation procedure of setting a single TCP connection between all any two controllers includes: the controller initiates a listening service at a port; monitoring TCP connection requests of other controllers; the controller tries to connect other controllers in the cluster according to the configured controller list and simultaneously monitors the connection request service of the opposite controller; the two controllers retain and only retain the newly established TCP connection between them.
In an embodiment of the present invention, when the main controller is down or the network is abnormal, an implementation process of electing a new main controller through the main election mechanism includes: judging whether only one slave controller monitoring the downtime of the master controller or the network abnormity exists; if yes, the slave controller determines that the name of the master controller is promoted and stores the name to the local; otherwise, the multiple slave controllers simultaneously and respectively determine the name of a master controller and store the name to the local.
To achieve the above and other related objects, the present invention further provides a computer readable storage medium having stored thereon a computer program, which is executed by a processor to perform the steps of the highly available SDN controller clustering method according to the present invention.
To achieve the above and other related objects, the present invention also provides an apparatus comprising: a processor and a memory, the memory for storing a computer program, the processor for executing the memory-stored computer program to cause the apparatus to perform the high-availability SDN controller clustering method according to the invention.
As described above, the highly available SDN controller clustering method, system, storage medium, and device of the present invention have the following beneficial effects: the method and the device solve the problem that in the SDN controller cluster in the prior art, when the main controller is down or the network is abnormal, the whole SDN controller cluster is in an unavailable abnormal state. And a master controller election mechanism is creatively utilized to realize the high availability of the SDN controller cluster.
Drawings
Fig. 1A is a schematic implementation flow diagram of a high-availability SDN controller clustering method according to an embodiment of the present invention.
Fig. 1B is a schematic implementation flow diagram of a high-availability SDN controller clustering method according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a high-availability SDN controller cluster system according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Description of the element reference numerals
20 high-availability SDN controller cluster system
21 configuration module
22 processing module
23 main controller election module
30 device
31 processor
32 memory
S101 to S203
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
Referring to fig. 1A and 1B, the present invention provides a high-availability SDN controller clustering method, which includes the following steps:
s101, setting a service port, a controller IP and a virtual IP in a cluster into a configuration file;
s102, setting a single TCP to be connected between any two controllers;
s103, setting a main controller election mechanism between the controllers based on the TCP connection;
s104, when the main controller is down or the network is abnormal, selecting a new main controller through the main controller selection mechanism;
s105, the new main controller seizes a virtual IP and broadcasts a free ARP request; and informing the nodes in the local area network to update the ARP cache table.
In an embodiment of the present invention, when the main controller is down or the network is abnormal, an implementation process of electing a new main controller through the main controller election mechanism includes:
s201, judging whether only one slave controller monitoring the downtime of the master controller or the abnormal network is available;
s202, if yes, the slave controller determines that the name of the master controller is nominated and stores the nominated name to the local;
s203, if not, the multiple slave controllers simultaneously and respectively determine the name of the master controller and store the name to the local.
In an embodiment of the present invention, the rule for determining the nomination of the master controller includes: and (5) nominating the slave controller with the largest IP in all the slave controllers with normal TCP connections.
In an embodiment of the present invention, the method for clustering high-availability SDN controllers further includes:
adding a new controller IP into all controller IP summary tables when a new controller is added into the controller cluster;
the new controller IP is automatically configured into the configuration files of the other controllers.
In a distributed mode, a scene is often encountered, and for a complex service, only one master controller election needs to be selected from a cluster for processing. Such a distributed problem, we call the "Master" election. By means of the zookeeper, the function of Master election can be conveniently realized. The general idea is very simple. Selecting a node, for example, Master _ select, and simultaneously creating a child node/Master _ select/lock for the node by a plurality of machines, wherein only one machine can be successfully created finally by using the characteristic of zookeeper, and the successful machine is selected as the Master. The Curator is also based on the idea, but the Curator encapsulates node creation, event monitoring and automatic election, and developers can realize Master election only by simply calling an API. Below we see by way of an example how the Master election function is implemented using Curator.
Figure RE-GDA0001946014160000041
Figure RE-GDA0001946014160000051
Figure RE-GDA0001946014160000061
And (3) program output:
become Master role
[_c_d2557b3f-bf64-4868-988b-d023a340b38b-lock-0000000021]
And (5) completing the Master operation, and releasing the Master right to become the Master role.
SDN (Software Defined Network), namely a Software Defined Network, is a novel Network innovation architecture of Emulex Network, and is an implementation mode of Network virtualization, and the core technology OpenFlow separates a control plane and a data plane of Network equipment, so that flexible control of Network flow is realized, and the Network becomes more intelligent as a pipeline. From the design point of view of the router, the router consists of software control and hardware data channels. Software control includes management (CLI, SNMP) and routing protocol (OSPF, ISIS, BGP), among others. The data path includes the query, switch, and cache for each packet. If all Network devices in the Network are regarded as managed resources, then, referring to the principle of the operating system, the concept of a Network operating system (Network OS) can be abstracted, wherein the Network operating system abstracts the concrete details of the underlying Network devices on one hand, and simultaneously provides a uniform management view and a uniform programming interface for upper-layer applications. Therefore, based on the platform of the network operating system, users can develop various application programs, and define the logical network topology through software so as to meet different requirements on network resources without concerning the physical topology structure of the underlying network. SDN proposes abstraction of the control layer, the MAC layer and the IP layer can be well abstracted but do not have an effect on the control interface, we let the network work with network topology, protocols, algorithms and controls that handle high complexity (because too many complex functions are added to the architecture, such as OSPF, BGP, multicast, differentiated services, traffic engineering, NAT, firewall, MPLS, redundancy layer, etc.), and we can completely abstract the control layer simply and correctly. The SDN provides great flexibility for network design planning and management, and may select centralized or distributed control, match flow entries when forwarding micro-flows (such as flows of a campus network) or aggregated flows (such as flows of a backbone network), and select virtual implementation or physical implementation. In a network in a traditional IT architecture, after the network is deployed and brought online according to service requirements, if the service requirements change, IT is a very tedious matter to modify the configuration on corresponding network devices (routers, switches, firewalls) again. In the service environment of the internet/mobile internet, the high stability and the high performance of the network are not enough to meet the service requirement, and the flexibility and the agility are more critical. What SDN does is to separate the control rights on the network devices, manage them by a centralized controller, and shield the differences from the underlying network devices without relying on the underlying network devices (routers, switches, firewalls). The control right is completely open, and the user can customize any network routing and transmission rule strategy to be realized, so that the method is more flexible and intelligent. After the SDN is modified, the router of each node in the network does not need to be configured repeatedly, and the equipment in the network is automatically connected. Only simple network rules need to be defined at the time of use. If you do not like the built-in protocol of the router itself, it can be modified in a programming way to realize better data exchange performance. If the network has several services, such as SIP, FTP, and streaming media, and the total bandwidth of the network is fixed, then if the streaming media service needs more bandwidth and traffic at a certain time, which is difficult to process in the conventional network, it is easy to implement in the network after the SDN is modified, the SDN can shape and regulate the traffic, temporarily make the "pipe" of the streaming media thicker, make the bandwidth of the streaming media larger, even close the "pipe" of SIP and FTP, and restore the original bandwidth ratio when the demand of the streaming media is reduced. It is because of the openness of this business logic that makes it infinitely possible to make the development space of networks as "pipes". If the business application model of future cloud computing can be simplified into "cloud-pipe-end", the SDN is an important technical support for the ring of "pipe".
IP, the Protocol for interconnection between networks, is a foreign language abbreviation for Internet Protocol. A protocol for interconnecting networks is a protocol designed for communication between computer networks. In the internet, it is a set of rules that enable all computer networks connected to the network to communicate with each other, defining rules that computers should follow when communicating over the internet. Any vendor of computer systems, while complying with the IP protocol, can communicate with the internet. The IP address has uniqueness and can be classified into 5 types according to the nature of the user. In addition, IP has the meanings of entry protection, intellectual property, pointer register, and the like. The IP address is a 32-bit address assigned to each host connected to the internet. IP address is as if it were a telephone number (address code): with the phone number of someone you can talk to him. Similarly, with the IP address of a host, you can communicate with that host. According to the specification of a TCP/IP (Transmission Control Protocol/Internet Protocol) Protocol, IP addresses are represented by binary systems, each IP address is 32 bits long, and the bits are converted into bytes, namely 4 bytes. For example, an IP address in binary form is a long string of numbers and is too laborious for people to handle. For convenience of human use, IP addresses are often written in decimal form with a symbol "separating different bytes in between. Thus, the above IP address may be expressed as "10.0.0.1". This representation of the IP address is called "dotted decimal representation", which is clearly much easier to remember than 1 and 0. A computer can only have one IP address, which is wrong. One computer can be assigned with a plurality of IP addresses, so that when the Internet is accessed, the computer can be not considered as one IP address; in addition, by a specific technique, it is also possible to make a plurality of servers share one IP address, and these servers look like one host at the user. IPV4 data header format: dividing the IP address into two parts, the network number and the host number, the designer must decide how many bits each part contains. The number of bits of the network number directly determines the number of networks which can be allocated (calculation method 2^ number of bits); the number of bits of the host number determines the maximum number of hosts in the network (calculation method 2^ number of bits-2). However, since the entire internet may include a large or small network size, designers have finally cleverly chosen a flexible solution: the IP address space is divided into different classes, each class having a different number of network numbers and a different number of host numbers. An IP address is the basis for data transmission in an IP network, which identifies a connection in the IP network, and a host may have multiple IP addresses. The IP address in the IP packet remains unchanged during network transmission, and current IP networks use 32-bit addresses, in dotted decimal notation, such as 192.168.0.1. The address format is: IP address is network address + host address or IP address is network address + subnet address + host address.
TCP (Transmission Control Protocol) is a connection-oriented, reliable transport layer communication Protocol based on byte streams, defined by IETF RFC 793. In the simplified OSI model of computer networks, which performs the functions specified by the transport layer four, the User Datagram Protocol (UDP) is another important transport protocol within the same layer. In the Internet protocol suite (Internet protocol suite), the TCP layer is an intermediate layer located above the IP layer and below the application layer. Reliable, pipe-like connections are often required between the application layers of different hosts, but the IP layer does not provide such a flow mechanism, but rather provides unreliable packet switching. The application layer sends a data stream represented in 8-bit bytes to the TCP layer for internetwork transfer, and the TCP then partitions the data stream into segments of appropriate length (usually limited by the Maximum Transmission Unit (MTU) of the data link layer of the network to which the computer is connected). The TCP then passes the resulting packet to the IP layer, which passes the packet through the network to the TCP layer of the receiving entity. TCP gives each packet a sequence number in order to ensure that no packet is lost, and the sequence number also ensures in-sequence reception of packets transmitted to the receiving end entity. Then the receiving end entity sends back a corresponding Acknowledgement (ACK) to the successfully received packet; if the sending entity does not receive an acknowledgement within a reasonable Round Trip Time (RTT), the corresponding packet is assumed to have been lost and will be retransmitted. TCP uses a checksum function to check whether the data has errors; the checksum is calculated both at the time of transmission and at the time of reception. The application layer sends a data stream represented in 8-bit bytes to the TCP layer for internetwork transmission, which then segments the data stream into segments of appropriate length, the maximum transmission segment size (MSS) being typically limited by the Maximum Transmission Unit (MTU) of the data link layer of the network to which the computer is connected. The TCP then passes the data packets to the IP layer, which passes the packets through the network to the TCP layer of the receiving entity. TCP gives each packet a sequence number in order to ensure reliable packet transmission, and the sequence number also ensures in-sequence reception of packets transmitted to the receiving end entity. Then the receiving end entity sends back a corresponding Acknowledgement (ACK) to the successfully received bytes; if the sending entity does not receive an acknowledgement within a reasonable Round Trip Time (RTT), the corresponding data (assuming lost) will be retransmitted. In terms of data correctness and legality, TCP uses a checksum function to check whether data has errors, and the checksum is calculated during sending and receiving; while the data may be encrypted using md5 authentication. And in the aspect of ensuring the reliability, an overtime retransmission and piggybacking mechanism is adopted. In flow control, a sliding window protocol is used, which specifies that for unacknowledged packets within a window, retransmissions are required. In terms of congestion control, a widely appreciated TCP congestion control algorithm (also called AIMD algorithm) is employed. The algorithm mainly comprises three main parts: 1) increase in addition, decrease in multiplicative; 2) slow starting; 3) in response to a timeout event. TCP/IP (Transmission Control Protocol/Internet Protocol), i.e., Transmission Control Protocol/Internet Protocol, is an industry standard Protocol set designed for Wide Area Networks (WANs). It was developed by the research institute of ARPANET networks. The standard for TCP/IP is published in a series of documents called RF C. The documents are edited and revised by a technical expert, a special working group, or RFC. When a document is published, the document is given an RFC number, such as RFC959 (specification document of FTP), RFC793 (specification document of TCP), RFC791 (specification document of IP), and the like. The original RFC is always preserved and never updated, and if the document is modified, the document is published again with a new number. Therefore, it is important to confirm that you have the latest RFC documents about a certain topic. Generally, at the beginning of RFC, there are update (update), error (errata), and revocation (invalid) information about RFC, and the reader is prompted about the timeliness of the information. The header format of TCP is: source Port is the Source Port, 16 bits. TCP header- -DestinationPort is the destination port, 16 bits. Sequence Number is the Sequence Number of the first byte in the transmitted packet, 32 bits. - - -acknowledgement Number is an Acknowledgment sequence Number, 32 bits.
Data Offset is the Data Offset, 4 bits, and the value of this field is the TCP header (including options) length divided by 4. - - -flag bit: 6 bits, URG indicates that the Ungent Pointer field makes sense: ACK represents that an acknowledgement Number field has significance, PSH represents a Push function, RST represents reset TCP connection, SYN represents SYN message (used when TCP connection is established), FIN represents that no data needs to be sent (used when TCP connection is closed), Window represents the free space of a receiving buffer, and 16 bits are used for telling a TCP connection opposite end that the maximum data length can be received by the opposite end. - -Checksum is a Checksum, 16-bit. - -Unrgent Pointers is an Urgent pointer, 16 bits, which field only makes sense if the URG flag bit is set, indicating the offset of Urgent data from the Sequence Number (value of the Sequence Number field). Establishing a connection requires a three-way handshake, while terminating a connection is subject to a four-way handshake, which is the termination of a TCP connection due to a half-close (half-close) of the TCP. The specific process is as follows: an application process first calls close, which is said to perform "active close" (active). The TCP at this end then sends a FIN section indicating that the data has been sent. The peer that receives this FIN performs a "passive close", which is acknowledged by TCP. Note that: the receipt of the FIN is also passed to the receiving end application process as an end-of-file, after having queued for any other data received by the application process, because the receipt of the FIN means that no more additional data is receivable by the receiving end application process on the corresponding connection. (3) After a while, the application process that receives this end of file will call close to close its socket. This causes its TCP to also send a FIN. (4) The original sender TCP (i.e. the one performing the active close) receiving this final FIN acknowledges this FIN. Since each direction requires one FIN and one ACK, 4 sections are typically required. Note that: (1) "generally" means that in some cases, the FIN of step 1 is sent with the data, and in addition, the sections sent in step 2 and step 3 are all from the end where passive shutdown is performed, and may be merged into one section. (2) Between step 2 and step 3, it is possible to flow data from the side performing passive closure to the side performing active closure, which is called "half-closure". (3) When a Unix process terminates either voluntarily (calling an exit or returning from a main function) or involuntarily (receiving a signal to terminate the process), all open descriptors are closed, which also results in a FIN also being issued on any TCP connection that is still open. Either side, whether client or server, may perform an active shutdown. It is often the case that the client performs an active shutdown, but some protocols, such as HTTP/1.0, are instead performed by the server. TCP provides a connection-oriented, reliable byte stream service. Connection-oriented means that two applications using TCP (usually a client and a server) must establish a TCP connection before exchanging packets with each other. This process is very similar to making a call, dialing a ring, waiting for the other party to say "feed" when they are off-hook, and then stating who he is. In a TCP connection, only two parties are communicating with each other. Broadcast and multicast cannot be used for TCP. TCP provides reliability by: 1. the application data is divided into blocks of data that TCP considers to be the most suitable for transmission. This is in contrast to UDP, where the length of data generated by an application will remain the same. The unit of information passed by TCP to IP is called a segment or segment (segment). 2. When TCP sends a segment, it starts a timer and waits for the destination to acknowledge receipt of the segment. If an acknowledgement is not received in time, the segment is retransmitted. When TCP receives data sent from the other end of the TCP connection, it will send an acknowledgement. TCP has a delayed acknowledgment function where if not turned on, it is an immediate acknowledgment. When the function is opened, the timer triggers the confirmation time point. TCP will keep a checksum of its header and data. This is an end-to-end checksum and is intended to detect any change in the data during transmission. If the checksum of the received segment is in error, TCP will discard the segment and not acknowledge receipt of the segment (hopefully the originator times out and retransmits). Since TCP segments are transmitted as IP datagrams, the arrival of IP datagrams may be out of order, and thus the arrival of TCP segments may be out of order. TCP will reorder the received data, if necessary, and deliver the received data to the application layer in the correct order. 5. Since IP datagrams are duplicated, the receiving end of TCP must discard duplicated data. TCP can also provide flow control. Each side of the TCP connection has a buffer space of fixed size. The receiving end of TCP only allows the other end to send data that the receiving end buffer can accept. This will prevent the faster host from causing the buffer of the slower host to overflow. Two applications exchange a byte stream of 8bit bytes over a TCP connection. TCP does not insert record identifiers in the byte stream. We call this a byte stream service (byte stream service). If one party's application passes 10 bytes first, 20 bytes second, and 50 bytes second, the other party to the connection will not know how many bytes each time the sender sent. As long as its own receive buffer is not full, how many TCP receivers will receive. One end places a byte stream on the TCP connection and the same byte stream will appear at the other end of the TCP connection. In addition, TCP does not make any explanation of the contents of the byte stream. TCP does not know whether the transmitted data byte stream is binary data, or ascii characters, EBCDIC characters, or other types of data. The interpretation of the byte stream is interpreted by the application layer of both sides of the TCP connection. This processing of the byte stream is similar to the processing of files by the Unix operating system. The kernel of Unix does not interpret anything that an application reads or writes, but instead passes it to the application program for processing. For the kernel of Unix, it cannot distinguish a binary file from a text file. Retransmission strategy, the basis that the TCP protocol uses to control whether a data segment needs to be retransmitted is to set up a retransmission timer. A retransmission is initiated while a data segment is being transmitted, and is turned off if an acknowledgement (acknowledgement) is received before a retransmission timeout, and the data segment is retransmitted if no acknowledgement is received before the retransmission timeout. In selecting the retransmission time, TCP must be adaptive. It needs to give a suitable retransmission time according to the communication situation of the internet at the time. The key to this retransmission strategy is the setting of the initial value of the timer. The more used algorithm is a dynamic algorithm proposed by Jacobson in 1988 to continuously adjust the timeout interval. The working principle is as follows: a variable rtt (round Trip time) is maintained for each TCP connection, and is used to store the closest estimate of the round Trip time from the current destination. When a data segment is sent, a connected timer is started at the same time, if the acknowledgement arrives before the timer is overtime, the required time (M) is recorded, the RTT value is corrected, and if the acknowledgement is not received before the timer is overtime, the RTT value is increased by 1 time. By measuring a series of RTT (round trip time) values, the TCP protocol can estimate the time that a packet needs to wait before it is retransmitted. Some statistical principles and algorithms (e.g., Karn's algorithm) are typically used in estimating the current delay required for the connection to obtain the amount of time to wait before TCP retransmission. One function of TCP is to ensure that each data segment reaches its destination. The TCP service at the destination host acknowledges the received data and sends an acknowledgement to the source application. The state machine of TCP uses the data header sequence number and the acknowledgment number to acknowledge receipt of the associated data bytes contained in the data segment. TCP uses an acknowledgment number in the data segment sent back to the source device to indicate the next byte that the receiving device expects to receive. This process is called expectation validation. The size of the data that the source host can transmit before receiving the acknowledgement message is called the window size. For managing lost data and flow control. And (3) configuring TCP: modifying the timeout time for establishing the TCP connection, and three times of handshaking are needed for establishing the TCP connection: the active end firstly sends a SYN message, passively returns a SYN + ACK message, and then the active end returns an ACK. After the active end sends SYN, if the passive end does not respond SYN + ACK message all the time, the active end will continuously retransmit SYN message until a certain number of retransmissions or overtime time is exceeded. After the active end sends SYN, the passive end responds to the SYN + ACK message, but the active end does not reply ACK any more, and the passive end also retransmits until a certain number of retransmissions or timeout time is exceeded. (this may be the case with SYN message attacks). The timeout time for the SYN message (the maximum time to send the SYN message until the three-way handshake succeeds), i.e., the timeout time for establishing the TCP connection, can be configured by the following command. Command: r (config) # ip tcpsyntime-out seconds. The size of the buffer is modified, and the receiving buffer of the TCP is used for buffering data received from the opposite end, and the data can be read by an application program later. Typically, the window value of a TCP packet reflects the size of the free space of the receive buffer. For connections with large bandwidth and large amount of data, increasing the size of the receive buffer can significantly provide TCP transmission performance. The sending buffer of TCP is used to buffer the data of the application program, each byte of the sending buffer has a sequence number, and the data corresponding to the sequence number acknowledged by the response is deleted from the sending buffer. Increasing the send buffer may improve TCP interaction with the application and thus performance. But increasing the receive and transmit buffers results in TCP taking up relatively much memory. The no ip tcp window-size command is used to restore the receive and transmit buffer sizes to default values. And prohibiting the reset message when the port is not reachable. When the TCP module distributes the TCP message, if the TCP connection to which the message belongs cannot be found, the TCP module actively replies a reset message to terminate the TCP connection of the opposite terminal. An attacker may attack a device with a large number of TCP messages that are not reachable at a port. The following command may be used to inhibit/resume sending reset messages when TCP messages are received for which a port is not reachable. The maximum value of the MSS for the TCP connection is limited. The MSS is an abbreviation for maximum transmission segment size, which refers to the maximum length of the data payload of a TCP packet, and does not include the TCP option. In the three-way handshake of TCP to establish a connection, there is an important task to perform MSS negotiation. Both connected parties add MSS option in SYN message, and its option value represents the maximum segment size that can be received by the local terminal, i.e. the maximum segment size that can be sent by the opposite terminal. The two connected parties take the smaller of the MSS value sent by the home terminal and the MSS value of the receiving opposite terminal as the maximum transmission section size of the connection. The MSS option value when sending the SYN message is calculated as follows. In non-direct networks: mss is default. In direct connection networks: mss is the MTU-20 byte ip header-20 byte tcp header of the exit corresponding to the peer ip address. Generally, if certain applications of the egress configuration affect mtu of the interface, the applications will set mtu accordingly, such as tunnel ports, vpn ports, etc. The rmss value obtained up to this point is the value of the syn message mss option to be sent. Examples are: typically, a bgp neighbor is established in a direct connection network, and the transmitted mss for that connection is 1500-20-20-20-1440. The effect of the ip TCP MSS command is to limit the maximum value of the MSS of the TCP connection to be established. The MSS value negotiated for any newly established connection cannot exceed the configured value. The PMTU discovery function is enabled, and the Path Maximum Transmission Unit (PMTU) discovery function of the TCP is realized according to the RF C1191, which can improve the utilization rate of network bandwidth. When a user uses TCP to transmit massive data in batch, the function can obviously improve the transmission performance. As described in RFC1191, TCP may probe for new PMTUs using a larger MSS at intervals after discovery of the PMTUs. This time interval is specified using the parameter age-timer. When the PMTU discovered by the device is smaller than the MSS negotiated at both ends of the TCP connection, the device will try to discover a larger PMTU at the configured time interval. This probing process will not stop until the PMTU reaches the value of MSS or the user stops this timer. Stop this timer, use the age-timer infiinite parameter. The no ip tcp path-mtu-discovery command is used to turn off the PMTU discovery function. And setting MSS option values of the interfaces for receiving and sending SYN messages. When a client initiates a TCP connection, it negotiates the maximum value of TCP message data load through MSS option field in TCP SYN message, and MSS value of client SYN message represents the maximum value of TCP message data load sent by subsequent server, otherwise the same is true. It may happen that the PC accesses the server with http. Because the negotiation between the PC and the connection MSS established at the server side is 1460, but the MSS of 1460 cannot be connected by the tunnels of R1 and R2, R1 and R2, and the MTU is less than 1500. The MSS option value in the SYN message may be modified by configuring the following commands on port (1) and port (2) of R2. Thereby modifying the MSS value negotiated through the TCP connections of port (1) and port (2). The no ip tcp adjust-MSS command is used to cancel the setting, so that the MSS option value of the message will not be modified when the interface receives and transmits the SYN message. Configuring the command on the interface causes the MSS option of the interface to receive or send the SYN message to be changed to the MSS value configured on the interface. It is recommended that the outlet and inlet are configured with the same values. If the entry and exit of the SYN message are configured with different MSS values, the MSS option of the SYN message is changed to the smaller of the two port configuration values after passing through the device.
ARP, an Address Resolution Protocol (Address Resolution Protocol), is a TCP/IP Protocol that obtains physical addresses from IP addresses. When the host sends information, the ARP request containing the target IP address is broadcasted to all hosts on the network, and a return message is received, so that the physical address of the target is determined; after receiving the return message, the IP address and the physical address are stored in the local ARP cache and are kept for a certain time, and the ARP cache is directly inquired when the next request is made so as to save resources. The address resolution protocol is established on the basis that all hosts trust each other in the network, the hosts on the network can independently send ARP response messages, and other hosts can not detect the authenticity of the messages and can record the messages into the ARP cache of the hosts when receiving the response messages; therefore, an attacker can send a false ARP response message to a certain host, so that the sent information cannot reach an expected host or reach a wrong host, and ARP spoofing is formed. The ARP command may be used to query the correspondence between IP addresses and MAC addresses in the local ARP cache, add or delete static correspondence, and the like. The related protocols include RARP and proxy ARP. NDP is used in place of the address resolution protocol in IPv 6. ARP working principle and process: the IP address of the host A is 192.168.1.1, and the MAC address is 0A-11-22-33-44-01; the IP address of the host B is 192.168.1.2, and the MAC address is 0A-11-22-33-44-02; when host a is to communicate with host B, the address resolution protocol may resolve the IP address of host B (192.168.1.2) to the MAC address of host B, with the following workflow: step 1: from the routing table contents on host a, IP determines that the forwarding IP address for accessing host B is 192.168.1.2. The a-host then checks its own local ARP cache for the matching MAC address of host B. Step 2: if host a does not find a mapping in the ARP cache, it will query the hardware address of 192.168.1.2, broadcasting an ARP request frame to all hosts on the local network. Both the IP address and the MAC address of source host a are included in the ARP request. Each host on the local network receives the ARP request and checks if it matches its own IP address. If the host finds that the requested IP address does not match its own IP address, it will discard the ARP request. And 3, step 3: and the host B determines that the IP address in the ARP request is matched with the IP address of the host B, and then the IP address and the MAC address of the host A are mapped and added into a local ARP cache. And 4, step 4: host B sends an ARP reply message containing its MAC address directly back to host a. And 5, step 5: when host a receives the ARP reply message from host B, the ARP cache is updated with the IP and MAC address mapping of host B. The local cache has a lifetime, and after the lifetime is over, the above process is repeated again. Once the MAC address of host B is determined, host a can send an IP communication to host B. The ARP cache is a buffer area for storing IP addresses and MAC addresses, and is essentially a table corresponding to IP addresses, i.e., MAC addresses, where each entry in the table records IP addresses and corresponding MAC addresses of other hosts on the network. Each ethernet or token ring network adapter has its own separate table. When the address resolution protocol is inquired about the MAC address of a known IP address node, the MAC address is checked in an ARP cache, if the MAC address exists, the corresponding MAC address is directly returned, and if the MAC address does not exist, an ARP request is sent to inquire the local area network. To minimize the amount of broadcast, ARP maintains a cache of IP address to MAC address mappings for future use. The ARP cache may contain both dynamic and static items. Dynamic items are automatically added and deleted over time. The potential life cycle of each dynamic ARP cache entry is 10 minutes. The items newly added into the cache are provided with time stamps, and if a certain item is not used within 2 minutes after being added, the item is expired and deleted from the ARP cache; if a certain project is used, the life cycle of 2 minutes is received; if a project is used all the time, it receives an additional 2 minute lifecycle, up to a maximum lifecycle of 10 minutes. Static items remain in the cache until the computer is restarted. The ARP cache contains one or more tables that are used to store the IP address and its resolved MAC address. The ARP command is used for inquiring the corresponding relation of IP address- - > MAC address in the local ARP cache, adding or deleting the static corresponding relation and the like. If used without a parameter, the ARP command will display the help information. Common usage arp-a or arp-g, to view all items in the cache. The results for-a and-g parameters are the same, and for many years-g has been the option on the UNIX platform to display all items in the ARP cache, while Windows uses ARP-a (-a can be considered all, i.e. the full meaning), but it can also accept the more traditional-g option. and if the ARP-a Ip has a plurality of network cards, the ARP-a plus the Ip address of the interface is used, so that only the ARP cache entry related to the interface can be displayed. The ARP-s Ip physical address, a static entry may be manually entered into the ARP cache. The entry will remain valid during the computer boot process or, in the event of an error, the manually configured physical address will automatically update the entry. arp-d Ip, with which a static item can be deleted manually.
In an embodiment of the present invention, the high-availability SDN controller clustering method includes the following characteristics: 1. high availability; 2, high reliability; 3. election and master-slave data synchronization of the master controller are realized through TCP connection established between every two controllers; 4. and the elected main controller preempts the virtual IP and then broadcasts by using a free ARP.
More detailed implementation process: 1. before starting, a controller in a cluster configuration cluster needs to set a cluster service port, all controller IPs and virtual IPs in the cluster into a configuration file in advance. TCP connection management. After all the controllers in the cluster are started, a TCP connection is maintained between every two controllers for master election, heartbeat detection and master-slave data synchronization. According to 1 (cluster configuration), in the starting process, a controller firstly starts a monitoring service at a port cluster _ service _ port and monitors TCP connection requests from other controllers; meanwhile, according to the controller list configured by the cluster _ controller _ list, the other controllers in the cluster are tried to be connected. If a plurality of TCP connections are established between the two controllers in sequence (the monitoring service tries to actively connect the other side and simultaneously monitors the connection request of the other side), the connection established in advance is closed, the newly established connection is reserved, and only one TCP connection is ensured to be maintained between any two controllers. The TCP connection condition between the two controllers is detected by a heartbeat mechanism. Once established, the connection enters steady state CONNECTED. In steady state, when the heartbeat request does not receive a response, the connection will enter the NORESPONSE state. In the NORESPONSE state, the heartbeat request will still be sent, but when no heartbeat request or response is received from the opposite end after the specific time (30s) expires, the connection will enter the UNREACHABLE state, and the heartbeat request will not be sent any more. In this process, if any heartbeat request or response is received from the peer, the connection will return to steady state. If a connection is in the unreadable or DISCONNECTED state, it will be considered as no longer available, and an active connection attempt will be triggered immediately. If successful, the connection will return to steady state; otherwise, the connection will keep the unreadable or DISCONNECTED state until the listening service listens for the connection request of the opposite end. 3. And when the master controller is down or the network is abnormal, all slave controllers generate a new master controller through 4(master election mechanism). And after occupying the virtual IP, the newly elected master controller informs nodes in the local area network to update an ARP cache table by broadcasting a free ARP request, and then takes over the role of the old master controller. 4. And when a controller needs to be newly added to the cluster, the IP of all the controllers in the cluster (including the IP of the newly added controller) is listed in the configuration file before the controller is started. The other controllers in the cluster will automatically write the newly accessed controller IP into their respective configuration files. 5. And a master election mechanism is realized, and election is completed through TCP connection established between every two controllers. When the election starts, only the slave controller participates in the election, the newly started or newly accessed controller is used as an observer to not participate in the election, and only receives the final notification after the election is completed, so that the slave controller is formed. The election initiator broadcasts the nomination to all other slave controllers, and the non-initiator returns a nomination to the corresponding initiator after receiving the nomination. Here, the nomination follows the principle: the IP maximum in the slave controllers with all TCP connections being normal currently. When the master controller is down or the network is abnormal, if only one slave controller detects the abnormal condition, the slave controller determines a nomination and stores the nomination to the local, and then broadcasts the nomination to all other slave controllers. And after receiving the nomination, the other slave controllers respectively determine a nomination, and if the nomination IP is larger than the current nomination IP, the determined nomination is sent back to the initiator. After the initiator receives other nominations, if the IP is found to be larger than the nominations IP stored locally, the nominations stored locally are updated. After the specific time (1s) expires, the initiator takes the locally stored nomination as a new master controller and informs all other controllers including all other slave controllers, restarts and newly accesses the incoming controller, and the election is finished. If a plurality of slave controllers detect that the master controller is down or the network is abnormal at the same time, the slave controllers respectively determine a nomination and store the nomination to the local, and then broadcast the nomination to all other slave controllers to initiate elections. The initiator receives the nomination of other initiators after broadcasting the nomination, if the nomination IP is found to be larger than the nomination IP stored locally, the nomination stored locally is updated, and the nomination is not returned any more, because the local nomination is broadcasted before. After receiving the nomination, the other slave controllers as non-initiators respectively determine a nomination, and if the nomination IP is larger than the current nomination IP, the determined nomination is sent back to the corresponding initiator. The initiator which expires first at a specific time (1s) takes the locally stored nomination as a new master controller and informs all other controllers including all other slave controllers, restarts and newly accesses the incoming controller, and the election is finished. 6. The master-slave data synchronization is realized, the data synchronization is initiated by the master controller, and meanwhile, the regular synchronization, the real-time synchronization, the full synchronization and the incremental synchronization are supported. The master controller organizes the data to be synchronized into binary streams according to a certain rule, and sends the binary streams to the corresponding slave controllers through the TCP connection established with the master controller. And the slave controller immediately recovers after receiving the data synchronized by the master controller and responds a recovery result to the master controller.
The protection scope of the highly available SDN controller clustering method according to the present invention is not limited to the execution sequence of the steps listed in this embodiment, and all solutions implemented by adding, subtracting, and replacing steps in the prior art according to the principles of the present invention are included in the protection scope of the present invention.
The present invention further provides a high-availability SDN controller cluster system 20, where the high-availability SDN controller cluster system 20 may implement the high-availability SDN controller cluster method described in the present invention, but an implementation apparatus of the high-availability SDN controller cluster method described in the present invention includes, but is not limited to, the structure of the high-availability SDN controller cluster system 20 recited in this embodiment, and all structural modifications and replacements of the prior art made according to the principle of the present invention are included in the protection scope of the present invention.
To achieve the above and other related objects, as shown in fig. 2, the present invention provides a high-availability SDN controller cluster system 20, which includes:
a configuration module 21, configured to set a service port, a controller IP, and a virtual IP in a cluster into a configuration file; a single TCP is arranged to be connected between any two controllers;
the processing module 22 is in communication connection with the configuration module 21, and is configured to elect a new main controller through the main election mechanism when the main controller is down or the network is abnormal; the new main controller seizes a virtual IP and broadcasts a free ARP request; informing nodes in the local area network to update an ARP cache table;
and a master controller election module 23, communicatively connected to the processing module 22, configured to implement a master controller election mechanism in the cluster system.
In an embodiment of the present invention, an implementation procedure of setting a single TCP connection between all any two controllers includes:
the controller initiates a listening service at a port; monitoring TCP connection requests of other controllers;
the controller tries to connect other controllers in the cluster according to the configured controller list and simultaneously monitors the connection request service of the opposite controller;
the two controllers retain and only retain the newly established TCP connection between them.
In an embodiment of the present invention, when the main controller is down or the network is abnormal, an implementation process of electing a new main controller through the main election mechanism includes:
judging whether only one slave controller monitoring the downtime of the master controller or the network abnormity exists;
if yes, the slave controller determines that the name of the master controller is promoted and stores the name to the local;
otherwise, the multiple slave controllers simultaneously and respectively determine the name of the master controller and store the name to the local.
It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And the modules can be realized in a form that all software is called by the processing element, or in a form that all the modules are realized in a form that all the modules are called by the processing element, or in a form that part of the modules are called by the hardware. For example: the x module can be a separately established processing element, and can also be integrated in a certain chip of the device. In addition, the x-module may be stored in the memory of the apparatus in the form of program codes, and may be called by a certain processing element of the apparatus to execute the functions of the x-module. Other modules are implemented similarly. All or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software. These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors (DSPs), one or more Field Programmable Gate Arrays (FPGAs), and the like. When a module is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. These modules may be integrated together and implemented in the form of a System-on-a-chip (SOC).
To achieve the above and other related objects, the present invention further provides a computer readable storage medium having stored thereon a computer program, which is executed by a processor to perform the steps of the highly available SDN controller clustering method according to the present invention.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the above method embodiments may be performed by hardware associated with a computer program. The aforementioned computer program may be stored in a computer readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Referring to fig. 3, to achieve the above and other related objects, the present invention further provides an apparatus 30, wherein the apparatus 30 comprises: a processor 31 and a memory 32, the memory 32 being configured to store a computer program, the processor 31 being configured to execute the computer program stored by the memory 32 to cause the apparatus 30 to perform the high-availability SDN controller clustering method according to the present invention.
The device provided by the embodiment of the application comprises: a processor, memory, transceiver, communication interface, or/and system bus; the memory and the communication interface are connected with the processor and the transceiver through the system bus and are used for realizing mutual communication, the memory is used for storing the computer program, the communication interface is used for communicating with other equipment, and the processor and the transceiver are used for running the computer program to enable the x device to execute the steps of the method x.
The above-mentioned system bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may 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, but this does not mean that there is only one bus or one type of bus. The communication interface is used for realizing communication between the database access device and other equipment (such as a client, a read-write library and a read-only library). The Memory may include a Random Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components.
As described above, the highly available SDN controller clustering method and system of the present invention have the following beneficial effects: the high availability of the SDN controller cluster is realized by creatively utilizing a master controller election mechanism.
The invention solves the problem that the whole SDN controller cluster is in an unavailable abnormal state when a main controller is down or a network is abnormal in the SDN controller cluster in the prior art, effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (10)

1. A high-availability SDN controller clustering method, characterized in that the high-availability SDN controller clustering method comprises the following steps:
setting a service port, a controller IP and a virtual IP in a cluster into a configuration file;
a single TCP is arranged to be connected between any two controllers;
setting a main controller election mechanism between the controllers based on the TCP connection;
when the main controller is down or the network is abnormal, a new main controller is elected through the main controller election mechanism;
the new main controller seizes a virtual IP and broadcasts a free ARP request; and informing the nodes in the local area network to update the ARP cache table.
2. The method for clustering high-availability SDN controllers according to claim 1, wherein one implementable process of setting a single TCP connection between all any two controllers comprises:
the controller initiates a listening service at a port; monitoring TCP connection requests of other controllers;
the controller tries to connect other controllers in the cluster according to the configured controller list and simultaneously monitors the connection request service of the opposite controller;
the two controllers retain and only retain the newly established TCP connection between them.
3. The method for clustering high-availability SDN controllers according to claim 1, wherein an implementation process of electing a new main controller through the main controller election mechanism after a main controller is down or a network is abnormal comprises:
judging whether only one slave controller monitoring the downtime or network abnormality of the master controller is available;
if yes, the slave controller determines that the name of the master controller is promoted and stores the name to the local;
otherwise, the multiple slave controllers simultaneously and respectively determine the name of a master controller and store the name to the local.
4. The method according to claim 3, wherein the rule for determining a host controller nomination comprises: and nominating the slave controller with the largest IP in all the slave controllers with normal TCP connections.
5. The high-availability SDN controller clustering method of claim 1, further comprising:
adding a new controller IP into all controller IP summary tables when a new controller is added into the controller cluster;
the new controller IP is automatically configured into the configuration files of the other controllers.
6. A high-availability SDN controller cluster system, the high-availability SDN controller cluster system comprising:
the configuration module is used for setting a service port, a controller IP and a virtual IP in the cluster into a configuration file; a single TCP is arranged to be connected between any two controllers;
the processing module is in communication connection with the configuration module and is used for electing a new main controller through the main election mechanism when the main controller is down or the network is abnormal; the new main controller seizes a virtual IP and broadcasts a free ARP request; informing nodes in the local area network to update an ARP cache table;
and the master controller election module is in communication connection with the processing module and is used for realizing a master controller election mechanism in the cluster system.
7. The SDN controller cluster system of claim 6, wherein one implementable process of setting a single TCP connection between all any two controllers comprises:
the controller initiates a listening service at a port; monitoring TCP connection requests of other controllers;
the controller tries to connect other controllers in the cluster according to the configured controller list and simultaneously monitors the connection request service of the opposite controller;
the two controllers retain and only retain the newly established TCP connection between them.
8. The SDN controller cluster system of claim 6, wherein an implementation of the election of a new master controller through the master election mechanism after a master controller crashes or a network anomaly comprises:
judging whether only one slave controller monitoring the downtime or network abnormality of the master controller is available;
if yes, the slave controller determines that the name of the master controller is promoted and stores the name to the local;
otherwise, the multiple slave controllers simultaneously and respectively determine the name of a master controller and store the name to the local.
9. A computer readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the high-availability SDN controller clustering method of any of claims 1 to 5.
10. An apparatus, characterized in that the apparatus comprises: a processor and a memory, the memory for storing a computer program, the processor for executing the memory-stored computer program to cause the apparatus to perform the high-availability SDN controller clustering method of any one of claims 1-5.
CN201811207413.1A 2018-08-15 2018-10-17 High-availability SDN controller clustering method, system, storage medium and equipment Active CN110838935B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810929373 2018-08-15
CN2018109293735 2018-08-15

Publications (2)

Publication Number Publication Date
CN110838935A true CN110838935A (en) 2020-02-25
CN110838935B CN110838935B (en) 2023-01-03

Family

ID=69573941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811207413.1A Active CN110838935B (en) 2018-08-15 2018-10-17 High-availability SDN controller clustering method, system, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN110838935B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770210A (en) * 2020-06-05 2020-10-13 深圳爱克莱特科技股份有限公司 Multi-controller IP grouping method, system and readable medium
CN111817886A (en) * 2020-06-29 2020-10-23 新华三信息安全技术有限公司 Method and equipment for acquiring management object data
CN113472662A (en) * 2021-07-09 2021-10-01 武汉绿色网络信息服务有限责任公司 Path redistribution method and network service system
CN114466081A (en) * 2021-12-23 2022-05-10 东莞市李群自动化技术有限公司 Node control method, system, equipment and storage medium of real-time channel group

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1423197A (en) * 2002-12-16 2003-06-11 华中科技大学 High usable system based on multi TCP linking map
CN102843259A (en) * 2012-08-21 2012-12-26 武汉达梦数据库有限公司 Middleware self-management hot backup method and middleware self-management hot backup system in cluster
CN103618621A (en) * 2013-11-21 2014-03-05 华为技术有限公司 Method, device and system for automatic configuration of SDN
CN104158642A (en) * 2014-08-08 2014-11-19 上海斐讯数据通信技术有限公司 Method and system for providing backup for software defined network controller
CN104679796A (en) * 2013-12-03 2015-06-03 方正信息产业控股有限公司 Selecting method, selecting device and database mirror image cluster node
CN106953744A (en) * 2017-02-27 2017-07-14 浙江工商大学 A kind of SDN cluster controllers High Availabitity architecture design method
CN107515863A (en) * 2016-06-15 2017-12-26 上海宽带技术及应用工程研究中心 The method and system that a kind of SDN clusters based on distributed data base are realized
CN107819774A (en) * 2017-11-16 2018-03-20 郑州云海信息技术有限公司 A kind of SDN isomeries multi-controller Synergistic method and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1423197A (en) * 2002-12-16 2003-06-11 华中科技大学 High usable system based on multi TCP linking map
CN102843259A (en) * 2012-08-21 2012-12-26 武汉达梦数据库有限公司 Middleware self-management hot backup method and middleware self-management hot backup system in cluster
CN103618621A (en) * 2013-11-21 2014-03-05 华为技术有限公司 Method, device and system for automatic configuration of SDN
CN104679796A (en) * 2013-12-03 2015-06-03 方正信息产业控股有限公司 Selecting method, selecting device and database mirror image cluster node
CN104158642A (en) * 2014-08-08 2014-11-19 上海斐讯数据通信技术有限公司 Method and system for providing backup for software defined network controller
CN107515863A (en) * 2016-06-15 2017-12-26 上海宽带技术及应用工程研究中心 The method and system that a kind of SDN clusters based on distributed data base are realized
CN106953744A (en) * 2017-02-27 2017-07-14 浙江工商大学 A kind of SDN cluster controllers High Availabitity architecture design method
CN107819774A (en) * 2017-11-16 2018-03-20 郑州云海信息技术有限公司 A kind of SDN isomeries multi-controller Synergistic method and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770210A (en) * 2020-06-05 2020-10-13 深圳爱克莱特科技股份有限公司 Multi-controller IP grouping method, system and readable medium
CN111770210B (en) * 2020-06-05 2021-09-21 深圳爱克莱特科技股份有限公司 Multi-controller grouping method and readable medium
CN111817886A (en) * 2020-06-29 2020-10-23 新华三信息安全技术有限公司 Method and equipment for acquiring management object data
CN111817886B (en) * 2020-06-29 2023-12-26 新华三信息安全技术有限公司 Method and equipment for acquiring management object data
CN113472662A (en) * 2021-07-09 2021-10-01 武汉绿色网络信息服务有限责任公司 Path redistribution method and network service system
CN114466081A (en) * 2021-12-23 2022-05-10 东莞市李群自动化技术有限公司 Node control method, system, equipment and storage medium of real-time channel group
CN114466081B (en) * 2021-12-23 2024-04-12 东莞市李群自动化技术有限公司 Method, system, equipment and storage medium for managing and controlling nodes of real-time channel group

Also Published As

Publication number Publication date
CN110838935B (en) 2023-01-03

Similar Documents

Publication Publication Date Title
Braden Requirements for Internet hosts-communication layers
CN110838935B (en) High-availability SDN controller clustering method, system, storage medium and equipment
Braden Rfc1122: Requirements for internet hosts-communication layers
US8938553B2 (en) Cooperative proxy auto-discovery and connection interception through network address translation
US6901580B2 (en) Configuration parameter sequencing and sequencer
US7065086B2 (en) Method and system for efficient layer 3-layer 7 routing of internet protocol (“IP”) fragments
WO2018133454A1 (en) Method for controlling remote service access path, and relevant apparatus
US8583831B2 (en) Thin client discovery
US8493839B2 (en) Method and system of teamed network adapters with offloaded connections
US20060262734A1 (en) Transport protocol connection synchronization
US8544025B2 (en) Efficient data transfer on local network connections using a pseudo socket layer
JP2005502225A (en) Gigabit Ethernet adapter
JP2011018373A (en) Method to upload state object of offloaded network stack and method to synchronize the same
US11888818B2 (en) Multi-access interface for internet protocol security
US20070291782A1 (en) Acknowledgement filtering
US20220247672A1 (en) LAN System, Method and Unit Supporting Dynamic Self-Adaptive Network Configuration
WO2012049363A1 (en) Method, system and element for multipurpose data traffic engineering and routing
US20040267960A1 (en) Force master capability during multicast transfers
US20230269164A1 (en) Method and apparatus for sending route calculation information, device, and storage medium
Rayes et al. The internet in IoT
US6826623B1 (en) Detecting a dead gateway for subsequent non-TCP transmission by sending a first TCP packet and deleting an ARP entry associated with the gateway
MacDonald et al. Microsoft windows 2000 tcp/ip implementation details
US20080056263A1 (en) Efficient transport layer processing of incoming packets
JP3614006B2 (en) COMMUNICATION SYSTEM USING Asymmetrical Route and Communication Method Utilizing Asymmetrical Route
Cisco Bridging and IBM Networking Command Reference Cisco IOS Release 11.3

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