CN104410730B - SDN active and standby controller seamless handover methods based on NAT technologies - Google Patents
SDN active and standby controller seamless handover methods based on NAT technologies Download PDFInfo
- Publication number
- CN104410730B CN104410730B CN201410753409.0A CN201410753409A CN104410730B CN 104410730 B CN104410730 B CN 104410730B CN 201410753409 A CN201410753409 A CN 201410753409A CN 104410730 B CN104410730 B CN 104410730B
- Authority
- CN
- China
- Prior art keywords
- controller
- active
- sdn
- message
- address
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2521—Translation architectures other than single NAT servers
- H04L61/2532—Clique of NAT servers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本发明提供一种基于NAT技术的SDN主备控制器无缝切换方法,SDN主备控制器之间控制通道的数据格式包括活性报文、选举报文和同步报文;SDN控制器的活性报文和选举报文采用同一报文格式;SDN控制器的同步分为实时同步和周期同步;路由器须配置NAT表,建立虚拟地址到控制器实际IP地址一对多的映射关系,SDN交换机和虚拟地址建立TCP连接;定义备份控制器对Openflow消息的处理行为。本发明的基于NAT技术的SDN主备控制器无缝切换方法采用类似NAT TCP负载均衡的技术实现唯一的集群虚拟地址,即使主备控制器发生切换,唯一的集群虚拟地址也不会发生改变,交换机无需感知主备控制器的切换,从而实现主备控制器无缝和快速的切换。
The invention provides a method for seamless switching of SDN active and standby controllers based on NAT technology. The data format of the control channel between the SDN active and standby controllers includes an active message, an election message and a synchronization message; the active report of the SDN controller The election message and the election message adopt the same message format; the synchronization of the SDN controller is divided into real-time synchronization and periodical synchronization; the router must be configured with a NAT table to establish a one-to-many mapping relationship between the virtual address and the actual IP address of the controller, and the SDN switch and the virtual Address to establish a TCP connection; define the processing behavior of the backup controller for Openflow messages. The NAT technology-based SDN active/standby controller seamless switching method of the present invention adopts a technology similar to NAT TCP load balancing to realize a unique cluster virtual address, even if the active/standby controller switches, the unique cluster virtual address will not change. The switch does not need to sense the switching of the active and standby controllers, so as to realize the seamless and fast switching of the active and standby controllers.
Description
技术领域technical field
本发明涉及网络通信的技术领域,特别是涉及一种基于NAT(Network AddressTranslation,网络地址转换)技术的SDN(Software Defined Network,软件定义网络)主备控制器无缝切换方法。The present invention relates to the technical field of network communication, in particular to a method for seamlessly switching active and standby controllers of SDN (Software Defined Network, Software Defined Network) based on NAT (Network Address Translation, Network Address Translation) technology.
背景技术Background technique
目前,各个大厂商在SDN市场的争夺,更多是对控制器定义权和控制权的争夺。控制器是SDN网络的核心。在大规模的IDC(Internet Data Center,互联网数据中心)网络里,对控制器的可靠性有很高的要求。At present, the competition among major manufacturers in the SDN market is more about the competition for the right to define and control the controller. The controller is the core of the SDN network. In a large-scale IDC (Internet Data Center, Internet Data Center) network, there is a high requirement for the reliability of the controller.
现有技术中,SDN控制器的东西向接口没有标准化,每个厂商都有自己私有的扩展。有些厂商采用单SDN控制器的技术。逻辑上集中的控制器难免出现单点故障。一旦控制器出现故障并且没有备份控制器顶替的话,整个SDN网络将处于无法管理和控制的状态。这对运营商和用户来说都是致命的。In the prior art, the east-west interface of the SDN controller is not standardized, and each vendor has its own proprietary extension. Some manufacturers adopt the technology of single SDN controller. Logically centralized controllers are not immune to single points of failure. Once the controller fails and there is no backup controller to replace it, the entire SDN network will be in an unmanageable and controllable state. This is fatal to operators and users.
另外,很多厂商采用主备控制器的技术。但是主备控制器的IP地址不同,导致无法实现平滑和无缝地切换。一旦主控制器故障,SDN交换机需要重新和备份控制器建立TCP连接,将会导致控制数据丢失,影响基本业务,从而导致用户体验感很差。。In addition, many manufacturers adopt the technology of active and standby controllers. However, the IP addresses of the active and standby controllers are different, so smooth and seamless switchover cannot be achieved. Once the main controller fails, the SDN switch needs to re-establish a TCP connection with the backup controller, which will result in loss of control data and affect basic services, resulting in poor user experience. .
因此,能够快速地实现主备控制器切换是非常重要和必需的。Therefore, it is very important and necessary to quickly realize the switchover of the active and standby controllers.
发明内容Contents of the invention
鉴于以上所述现有技术的缺点,本发明的目的在于提供一种基于NAT技术的SDN主备控制器无缝切换方法,采用类似NAT TCP负载均衡的技术实现唯一的集群虚拟地址,即使主备控制器发生切换,唯一的集群虚拟地址也不会发生改变,由于交换机是通过唯一的集群虚拟地址和控制器集群建立TCP连接,因此交换机无需感知主备控制器的切换,从而实现主备控制器无缝和快速的切换。In view of the above-mentioned shortcoming of prior art, the object of the present invention is to provide a kind of SDN active-standby controller seamless switching method based on NAT technology, adopt the technology similar to NAT TCP load balancing to realize unique cluster virtual address, even master-standby When the controller is switched, the unique virtual address of the cluster will not change. Since the switch establishes a TCP connection with the controller cluster through the unique virtual address of the cluster, the switch does not need to perceive the switching of the active and standby controllers, so as to realize the active and standby controllers Seamless and fast switching.
为实现上述目的及其他相关目的,本发明提供一种基于NAT技术的SDN主备控制器无缝切换方法,SDN主备控制器之间控制通道的数据格式包括活性报文、选举报文和同步报文;SDN控制器的活性报文和选举报文采用同一报文格式;SDN控制器的同步分为实时同步和周期同步;所述实时同步是增量同步,所述周期同步是全数据库的同步;路由器须配置NAT表,建立虚拟地址到控制器实际IP地址一对多的映射关系,SDN交换机和虚拟地址建立TCP连接;定义备份控制器对Openflow消息的处理行为。In order to achieve the above purpose and other related purposes, the present invention provides a method for seamless switching of SDN active and standby controllers based on NAT technology. The data format of the control channel between the SDN active and standby controllers includes active messages, election messages and synchronization message; the active message of the SDN controller and the election message adopt the same message format; the synchronization of the SDN controller is divided into real-time synchronization and periodic synchronization; the real-time synchronization is incremental synchronization, and the periodic synchronization is the whole database Synchronization; the router must configure the NAT table, establish a one-to-many mapping relationship between the virtual address and the actual IP address of the controller, and the SDN switch establishes a TCP connection with the virtual address; define the processing behavior of the backup controller for Openflow messages.
根据上述的基于NAT技术的SDN主备控制器无缝切换方法,其中:所述活性报文为双向的,用于确认跟对方的连接和测量连接延时;所述选举报文为双向的,用于携带发送者的IP地址信息;所述同步报文由主控制器发送至备份控制器,当主控制器的数据库发生改变时,用于更新备份控制器的数据库内容。According to the above-mentioned SDN active/standby controller seamless switching method based on NAT technology, wherein: the active message is bidirectional, used to confirm the connection and measurement connection delay with the other party; the election message is bidirectional, It is used to carry the IP address information of the sender; the synchronization message is sent from the master controller to the backup controller, and is used to update the database content of the backup controller when the database of the master controller changes.
根据上述的基于NAT技术的SDN主备控制器无缝切换方法,其中:所述SDN控制器的活性报文和选举报文的格式均包括序列号和IP地址两个字段,共32bits。According to the above-mentioned method for seamless switching of SDN active and standby controllers based on NAT technology, wherein: the formats of the activation message and the election message of the SDN controller include two fields of serial number and IP address, with a total of 32 bits.
进一步地,根据上述的基于NAT技术的SDN主备控制器无缝切换方法,其中:所述序列号为16bits,起始值为1,当所述序列号的值如果超过65535,将重新从1开始计算;所述IP地址字段记录控制器的节点IP,用于主控制器的选举。Further, according to the above-mentioned method for seamless switching of SDN active/standby controllers based on NAT technology, wherein: the serial number is 16bits, and the initial value is 1, and if the value of the serial number exceeds 65535, it will restart from 1 Start calculation; the IP address field records the node IP of the controller, which is used for the election of the master controller.
根据上述的基于NAT技术的SDN主备控制器无缝切换方法,其中:SDN控制器活性和选举的流程包括以下步骤:According to the above-mentioned method for seamless switching of SDN active and standby controllers based on NAT technology, wherein: the flow of SDN controller activity and election includes the following steps:
步骤S21、活性报文定时器超时;Step S21, the active packet timer expires;
步骤S22、判断是否收到回应;若是,转入步骤S23;若否,转入步骤S27;Step S22, judging whether a response is received; if yes, proceed to step S23; if not, proceed to step S27;
步骤S23、将应答报文的序号累加1,发送对端,比较对端IP地址和本地IP地址;Step S23, adding 1 to the serial number of the response message, sending it to the opposite end, and comparing the opposite end IP address and the local IP address;
步骤S24、判断对端IP地址是否小于本地IP地址,若是,转入步骤S25;若否,转入步骤S26;Step S24, judging whether the peer IP address is smaller than the local IP address, if so, proceed to step S25; if not, proceed to step S26;
步骤S25、判断本地控制器是否为主控制器,若是,本地工作模式改为备份控制器,流程结束;若否,不执行任何操作,流程结束;Step S25, judging whether the local controller is the master controller, if so, the local working mode is changed to the backup controller, and the process ends; if not, no operation is performed, and the process ends;
步骤S26、判断本地控制器是否为备份控制器,若是,本地工作模式改为主控制器,流程结束;若否,不执行任何操作,流程结束;Step S26, judging whether the local controller is a backup controller, if so, the local working mode is changed to the master controller, and the process ends; if not, no operation is performed, and the process ends;
步骤S27、判断重传次数是否大于重传次数阈值,若是,本地工作模式设为主控制器,流程结束;若否,应答报文的序列号不变,发送对端,流程结束。Step S27. Determine whether the number of retransmissions is greater than the threshold of retransmissions. If yes, the local working mode is set to the master controller, and the process ends;
根据上述的基于NAT技术的SDN主备控制器无缝切换方法,其中:所述实时同步产生的因素包括统计信息变化、编排器变化、北向应用变化和OF消息变化。According to the above NAT technology-based SDN active/standby controller seamless switching method, wherein: the factors generated by the real-time synchronization include statistical information changes, orchestrator changes, northbound application changes and OF message changes.
根据上述的基于NAT技术的SDN主备控制器无缝切换方法,其中:SDN控制器同步报文处理流程中,主控制器数据库接收到实时同步和周期同步请求后,向备份控制器数据库发送同步报文,以使得二者保持一致。According to the above-mentioned method for seamless switching of SDN active and standby controllers based on NAT technology, wherein: in the SDN controller synchronization message processing flow, after the main controller database receives the real-time synchronization and periodic synchronization requests, it sends a synchronization request to the backup controller database. message so that the two are consistent.
根据上述的基于NAT技术的SDN主备控制器无缝切换方法,其中:路由器把交换机的OF消息转发到所有的控制器时,用实际的控制器IP地址替换虚拟的目的IP地址;路由器把控制器的OF消息转发到交换机时,用虚拟的源IP地址替换实际的控制器IP。According to the above-mentioned method for seamless switching of SDN active and standby controllers based on NAT technology, wherein: when the router forwards the OF message of the switch to all controllers, it replaces the virtual destination IP address with the actual controller IP address; When forwarding the OF message of the controller to the switch, replace the actual controller IP with the virtual source IP address.
根据上述的基于NAT技术的SDN主备控制器无缝切换方法,其中:只有主控制器才会对外发OF消息。According to the above-mentioned method for seamless switching of SDN active and standby controllers based on NAT technology, only the active controller will send out OF messages.
如上所述,本发明的基于NAT技术的SDN主备控制器无缝切换方法,具有以下有益效果:As mentioned above, the NAT technology-based SDN active/standby controller seamless switching method of the present invention has the following beneficial effects:
(1)结合了NAT技术,采用了实时和定期同步主备控制器数据库的机制,当主控制器发生故障的时候,例如掉电,系统异常等,能够在交换机无感知的情况下,做到主备控制器的无缝切换,很大程度地提高了控制器健壮性;(1) Combined with NAT technology, the mechanism of real-time and regular synchronization of the active and standby controller databases is adopted. When the active controller fails, such as power failure, system abnormality, etc., the active The seamless switching of the standby controller greatly improves the robustness of the controller;
(2)由于备份控制器能够实时同步主控制器的数据,当主控制器发生故障的时候无需再导出数据到备份控制器;(2) Since the backup controller can synchronize the data of the master controller in real time, there is no need to export data to the backup controller when the master controller fails;
(3)采用类似NAT TCP负载均衡的技术实现唯一的集群虚拟地址,即使主控制器发生切换,唯一的集群虚拟地址也不会发生改变,由于交换机是通过唯一的集群虚拟地址和控制器集群建立TCP连接,因此交换机无需感知主备控制器的切换。(3) Use a technology similar to NAT TCP load balancing to realize the unique cluster virtual address. Even if the main controller is switched, the unique cluster virtual address will not change, because the switch is established through the unique cluster virtual address and the controller cluster. TCP connection, so the switch does not need to sense the switching of the active and standby controllers.
附图说明Description of drawings
图1显示为本发明的SDN控制器的活性报文和选举报文的格式示意图;Fig. 1 is shown as the active message of SDN controller of the present invention and the schematic format diagram of election message;
图2显示为本发明的SDN控制器活性和选举的流程图;Fig. 2 is shown as the flowchart of SDN controller activity and election of the present invention;
图3显示为本发明的SDN控制器同步报文处理的流程图;Fig. 3 is shown as the flowchart of SDN controller synchronous message processing of the present invention;
图4显示为本发明的SDN控制器OF消息接收处理的流程图;Fig. 4 is shown as the flow chart of SDN controller OF message receiving process of the present invention;
图5显示为本发明的SDN控制器OF消息发送处理的流程图;Fig. 5 is shown as the flow chart of SDN controller OF message sending process of the present invention;
图6显示为本发明的基于NAT技术的SDN主备控制器切换模拟测试环境示意图。FIG. 6 is a schematic diagram of a simulation test environment for SDN active/standby controller switchover based on NAT technology in the present invention.
具体实施方式Detailed ways
以下通过特定的具体实例说明本发明的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本发明的其他优点与功效。本发明还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本发明的精神下进行各种修饰或改变。Embodiments of the present invention are described below through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation modes, and various modifications or changes can be made to the details in this specification based on different viewpoints and applications without departing from the spirit of the present invention.
需要说明的是,本实施例中所提供的图示仅以示意方式说明本发明的基本构想,遂图式中仅显示与本发明中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。It should be noted that the diagrams provided in this embodiment are only schematically illustrating the basic idea of the present invention, and only the components related to the present invention are shown in the diagrams rather than the number, shape and shape of the components in actual implementation. Dimensional drawing, the type, quantity and proportion of each component can be changed arbitrarily during actual implementation, and the component layout type may also be more complicated.
本发明的基于NAT技术的SDN主备控制器无缝切换方法包括以下内容:The SDN active/standby controller seamless switching method based on NAT technology of the present invention comprises the following contents:
(1)SDN主备控制器之间控制通道的数据格式包括活性报文、选举报文和同步报文。其中,活性报文通过发送应答(echo)以及得到回应(reply),来确认跟对方的连接没有问题,也可用来测量连接延时。选举报文携带发送者的IP地址信息。(1) The data format of the control channel between the SDN active and standby controllers includes active messages, election messages and synchronization messages. Among them, the active message confirms that there is no problem with the connection with the other party by sending an echo (echo) and getting a response (reply), and can also be used to measure the connection delay. The election message carries the IP address information of the sender.
各种数据格式的定义如下表1所示。The definitions of various data formats are shown in Table 1 below.
表1、SDN主备控制器之间控制通道的数据格式定义表Table 1. Data format definition table of the control channel between the SDN active and standby controllers
(2)SDN控制器的活性报文和选举报文采用同一报文格式。SDN控制器的活性报文和选举报文的格式如图1所示,包括序列号和IP地址两个字段,共32bits。其中,序列号为16bits,起始值为1,值如果超过65535,将重新从1开始计算。IP地址字段记录了控制器的节点IP,用于主控制器的选举。(2) The activation message and the election message of the SDN controller adopt the same message format. The format of the activity message and election message of the SDN controller is shown in Figure 1, including two fields of serial number and IP address, with a total of 32 bits. Among them, the serial number is 16bits, and the starting value is 1. If the value exceeds 65535, it will be calculated from 1 again. The IP address field records the node IP of the controller, which is used for the election of the master controller.
SDN控制器的活性检测支持超时重传机制。重传次数缺省值为3次,超时时间缺省值为1秒。用户可以根据实际情况修改重传次数和超时时间。在SDN控制集群当中,IP地址最小的并且活跃的控制器将成为主控制器。The liveness detection of the SDN controller supports the timeout retransmission mechanism. The default value of the number of retransmissions is 3, and the default value of the timeout is 1 second. Users can modify the number of retransmissions and timeout according to the actual situation. In the SDN control cluster, the active controller with the smallest IP address will become the master controller.
如图2所示,本发明的SDN控制器活性和选举的流程包括以下步骤:As shown in Figure 2, the flow process of SDN controller activity and election of the present invention comprises the following steps:
步骤S21、活性报文定时器超时(超时时间缺省值为1s);Step S21, active message timer overtime (timeout default value is 1s);
步骤S22、判断是否收到回应;若是,转入步骤S23;若否,转入步骤S27;Step S22, judging whether a response is received; if yes, proceed to step S23; if not, proceed to step S27;
步骤S23、将应答(echo)报文的序号累加1,发送对端,比较对端IP地址和本地IP地址;Step S23, adding 1 to the sequence number of the response (echo) message, sending it to the opposite end, comparing the opposite end IP address and the local IP address;
步骤S24、判断对端IP地址是否小于本地IP地址,若是,转入步骤S25;若否,转入步骤S26;Step S24, judging whether the peer IP address is smaller than the local IP address, if so, proceed to step S25; if not, proceed to step S26;
步骤S25、判断本地控制器是否为主控制器,若是,本地工作模式改为备份控制器,流程结束;若否,不执行任何操作,流程结束;Step S25, judging whether the local controller is the master controller, if so, the local working mode is changed to the backup controller, and the process ends; if not, no operation is performed, and the process ends;
步骤S26、判断本地控制器是否为备份控制器,若是,本地工作模式改为主控制器,流程结束;若否,不执行任何操作,流程结束;Step S26, judging whether the local controller is a backup controller, if so, the local working mode is changed to the master controller, and the process ends; if not, no operation is performed, and the process ends;
步骤S27、判断重传次数是否大于重传次数阈值(如默认值3),若是,本地工作模式设为主控制器,流程结束;若否,echo报文的序列号不变,发送对端,流程结束。Step S27, determine whether the number of retransmissions is greater than the threshold of retransmissions (such as the default value 3), if so, the local operating mode is set to the master controller, and the process ends; if not, the serial number of the echo message remains unchanged, and the sending peer, The process ends.
(3)SDN控制器的同步分为实时同步和周期同步。实时同步是增量同步,周期同步是全数据库的同步。(3) The synchronization of the SDN controller is divided into real-time synchronization and periodic synchronization. Real-time synchronization is incremental synchronization, and periodic synchronization is the synchronization of the entire database.
其中,引起实时同步的因素有以下四点:统计信息变化、编排器变化、北向应用变化和OF消息变化。参照图3,SDN控制器同步报文处理流程中,主控制器数据库接收到实时同步和周期同步请求后,向备份控制器数据库发送同步报文,以使得二者保持一致。Among them, the following four factors cause real-time synchronization: changes in statistical information, changes in the orchestrator, changes in northbound applications, and changes in OF messages. Referring to FIG. 3 , in the SDN controller synchronization message processing flow, after receiving the real-time synchronization and periodic synchronization requests, the main controller database sends a synchronization message to the backup controller database to make the two consistent.
(4)路由器须配置NAT表,建立虚拟地址到控制器实际IP地址一对多的映射关系。SDN交换机和虚拟地址建立TCP连接,无须感知实际的控制器IP地址。(4) The router must be configured with a NAT table to establish a one-to-many mapping relationship between the virtual address and the actual IP address of the controller. The SDN switch establishes a TCP connection with the virtual address without knowing the actual IP address of the controller.
其中,NAT表的格式和样例如下表3所示。Wherein, the format and sample of the NAT table are shown in Table 3 below.
表3、NAT表Table 3, NAT table
为了保证数据库的一致性,主备控制器都需要处理交换机发送过来的OF消息。需要注意的是:路由器需要把交换机的OF消息转发到所有的控制器,用实际的控制器IP地址替换虚拟的目的IP地址。同样,路由器也需要把控制器的OF消息转发到交换机,用虚拟的源IP地址替换实际的控制器IP。In order to ensure the consistency of the database, both the active and standby controllers need to process the OF message sent by the switch. It should be noted that the router needs to forward the OF message of the switch to all controllers, and replace the virtual destination IP address with the actual controller IP address. Similarly, the router also needs to forward the controller's OF message to the switch, and replace the actual controller IP with the virtual source IP address.
参照图4,本发明的SDN控制器OF消息接收处理的流程包括以下步骤:With reference to Fig. 4, the flow process of SDN controller OF message receiving process of the present invention comprises the following steps:
步骤S41、路由器须配置NAT表,建立虚拟地址到控制器实际IP地址一对多的映射关系。Step S41 , the router must configure a NAT table, and establish a one-to-many mapping relationship between the virtual address and the actual IP address of the controller.
步骤S42、交换机和唯一的集群虚拟地址建立TCP连接。Step S42, the switch establishes a TCP connection with the unique cluster virtual address.
步骤S43、路由器收到交换机的OF消息,用目的IP查询NAT表。Step S43, the router receives the OF message from the switch, and uses the destination IP to query the NAT table.
步骤S44、判断控制器IP是否与目的IP相匹配;若是,用匹配的控制器IP替换虚拟IP将OF消息发送到对应的控制器,控制器处理OF消息,转入步骤S45;若否,转入步骤S45。Step S44, determine whether the controller IP matches the destination IP; if so, replace the virtual IP with the matched controller IP to send the OF message to the corresponding controller, and the controller processes the OF message and proceeds to step S45; if not, proceeds to step S45 Enter step S45.
步骤S45、判断目的IP的匹配是否结束,若是,流程结束;若否,转入步骤S43。Step S45, judging whether the matching of the destination IP is finished, if yes, the process ends; if not, go to step S43.
参照图5,本发明的SDN控制器OF消息发送处理的流程包括以下步骤:With reference to Fig. 5, the flow process of SDN controller OF message sending process of the present invention comprises the following steps:
步骤S51、路由器须配置NAT表,建立虚拟地址到控制器实际IP地址一对多的映射关系。Step S51 , the router must configure a NAT table, and establish a one-to-many mapping relationship between the virtual address and the actual IP address of the controller.
步骤S52、交换机和唯一的集群虚拟地址建立TCP连接。Step S52, the switch establishes a TCP connection with the unique cluster virtual address.
步骤S53、路由器收到控制器的OF消息,用源IP查询NAT表。Step S53, the router receives the OF message from the controller, and uses the source IP to query the NAT table.
步骤S54、判断源IP是否与虚拟IP相匹配,若是,用匹配的虚拟IP替换源IP将OF消息发送到对应的交换机,交换机处理OF消息并且生成流表,转入步骤S55;若否,转入步骤S55。Step S54, determine whether the source IP matches the virtual IP, if so, replace the source IP with the matching virtual IP and send the OF message to the corresponding switch, the switch processes the OF message and generates a flow table, and then proceeds to step S55; if not, proceeds to Enter step S55.
步骤S55、判断源IP的匹配是否结束,若是,流程结束;若否,转入步骤S53。Step S55, judging whether the matching of the source IP is finished, if yes, the process ends; if not, go to step S53.
需要注意的是只有主控制器才会对外发OF消息。It should be noted that only the master controller will send OF messages to the outside world.
(5)定义备份控制器对Openflow消息的处理行为,如下表2所示。(5) Define the processing behavior of the backup controller for Openflow messages, as shown in Table 2 below.
表2、备份控制器OF消息处理表Table 2. Backup controller OF message processing table
如图6所示,在本发明的基于NAT技术的SDN主备控制器切换模拟测试环境中进行SDN主备控制器切换测试时,包括以下步骤:As shown in Figure 6, when carrying out SDN active/standby controller switching test in the SDN active/standby controller switching simulation test environment based on NAT technology of the present invention, comprise the following steps:
A、搭建如图6所示的模拟测试环境;A. Build the simulation test environment as shown in Figure 6;
B、控制器1断电;B. The controller 1 is powered off;
C、确保SDN转发面正常工作;C. Ensure that the SDN forwarding plane works normally;
D、用户通过控制器2管理SDN网络,如可以通过控制器2修改和删除先前的流表数据。D. The user manages the SDN network through the controller 2, such as modifying and deleting the previous flow table data through the controller 2.
通过上述测试,可以达到无需交换机感知主备控制器的切换,即可实现主备控制器无缝和快速的切换的技术效果。Through the above tests, the technical effect of seamless and rapid switching of the active and standby controllers can be achieved without the switch being aware of the switching of the active and standby controllers.
综上所述,本发明的基于NAT技术的SDN主备控制器无缝切换方法结合了NAT技术,采用了实时和定期同步主备控制器数据库的机制,当主控制器发生故障的时候,例如掉电,系统异常等,能够在交换机无感知的情况下,做到主备控制器的无缝切换,很大程度地提高了控制器健壮性;由于备份控制器能够实时同步主控制器的数据,当主控制器发生故障的时候无需再导出数据到备份控制器;采用类似NAT TCP负载均衡的技术实现唯一的集群虚拟地址,即使主控制器发生切换,唯一的集群虚拟地址也不会发生改变,由于交换机是通过唯一的集群虚拟地址和控制器集群建立TCP连接,因此交换机无需感知控制器的主备切换。所以,本发明有效克服了现有技术中的种种缺点而具高度产业利用价值。In summary, the NAT technology-based SDN master-standby controller seamless switching method of the present invention combines NAT technology, and adopts a mechanism of real-time and regular synchronization of the master-standby controller database. When the master controller fails, for example, the Power, system abnormalities, etc., can achieve seamless switching between the active and standby controllers without the switch being aware, which greatly improves the robustness of the controller; because the backup controller can synchronize the data of the main controller in real time, When the main controller fails, there is no need to export data to the backup controller; the unique virtual address of the cluster is realized by using a technology similar to NAT TCP load balancing. Even if the main controller is switched, the unique virtual address of the cluster will not change, because The switch establishes a TCP connection with the controller cluster through the unique cluster virtual address, so the switch does not need to be aware of the active/standby switchover of the controller. Therefore, the present invention effectively overcomes various shortcomings in the prior art and has high industrial application value.
上述实施例仅例示性说明本发明的原理及其功效,而非用于限制本发明。任何熟悉此技术的人士皆可在不违背本发明的精神及范畴下,对上述实施例进行修饰或改变。因此,举凡所属技术领域中具有通常知识者在未脱离本发明所揭示的精神与技术思想下所完成的一切等效修饰或改变,仍应由本发明的权利要求所涵盖。The above-mentioned embodiments only illustrate the principles and effects of the present invention, but are not intended to limit the present invention. Anyone skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical ideas disclosed in the present invention should still be covered by the claims of the present invention.
Claims (8)
- A kind of 1. SDN active and standby controller seamless handover methods based on NAT technologies, it is characterised in that:Including herein below:The data format of control passage includes active message, EB packet and sync message between SDN active and standby controllers;The active message and EB packet of SDN controllers use same message format;SDN controllers are synchronously divided into real-time synchronization and cycle synchronisation;The real-time synchronization is increment synchronization, the cycle synchronisation It is the synchronization of full database;Router must configure NAT table, establish virtual address and exchanged to the one-to-many mapping relations of controller real ip address, SDN Machine is established TCP with virtual address and connected;When the OF message of interchanger is forwarded to all controllers by router, replaced virtually with the controller IP address of reality Purpose IP address;When the OF message of controller is forwarded to interchanger by router, actual control is replaced with virtual source IP address Device IP processed;Define processing behavior of the backup controller to Openflow message;Processing behavior of the backup controller to Openflow message is defined according to following table:
- 2. the SDN active and standby controller seamless handover methods according to claim 1 based on NAT technologies, it is characterised in that:Institute Active message is stated to be two-way, for confirming connection and measurement connection delay with other side;The EB packet is two-way, is used In the IP address information for carrying sender;The sync message is sent to backup controller by master controller, when master controller When database changes, for updating the data-base content of backup controller.
- 3. the SDN active and standby controller seamless handover methods according to claim 1 based on NAT technologies, it is characterised in that:Institute Stating the form of the active message and EB packet of SDN controllers includes two fields of sequence number and IP address, common 32bits.
- 4. the SDN active and standby controller seamless handover methods according to claim 3 based on NAT technologies, it is characterised in that:Institute State Serial No. 16bits, initial value 1, when the value of the sequence number is if it exceeds 65535, will be calculated again since 1;Institute The node IP of IP address field recording controller is stated, the election for master controller.
- 5. the SDN active and standby controller seamless handover methods according to claim 1 based on NAT technologies, it is characterised in that: SDN controllers activity and the flow of election comprise the following steps:Step S21, active message timer expiry;Step S22, judge whether to receive response;If so, it is transferred to step S23;If it is not, it is transferred to step S27;Step S23, by the sequence number of response message cumulative 1, opposite end is sent, compares peer IP address and local ip address;Step S24, judge whether peer IP address is less than local ip address, if so, being transferred to step S25;If it is not, it is transferred to step S26;Step S25, judge whether local controller is master controller, if so, local mode of operation is changed to backup controller, flow Terminate;If it is not, not performing any operation, flow terminates;Step S26, judge whether local controller is backup controller, if so, local mode of operation is changed to master controller, flow Terminate;If it is not, not performing any operation, flow terminates;Step S27, judge whether number of retransmissions is more than number of retransmissions threshold value, if so, local mode of operation is set to master controller, stream Journey terminates;If it is not, the sequence number of response message is constant, opposite end is sent, flow terminates.
- 6. the SDN active and standby controller seamless handover methods according to claim 1 based on NAT technologies, it is characterised in that:Institute Stating factor caused by real-time synchronization includes statistical information change, composer change, north orientation application change and the change of OF message.
- 7. the SDN active and standby controller seamless handover methods according to claim 1 based on NAT technologies, it is characterised in that: In SDN controller sync message handling processes, after master controller database receives real-time synchronization and cycle synchronisation request, Xiang Bei Part controller database sends sync message, to cause the two to be consistent.
- 8. the SDN active and standby controller seamless handover methods according to claim 1 based on NAT technologies, it is characterised in that:Only There is master controller just can be to outgoing OF message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410753409.0A CN104410730B (en) | 2014-12-10 | 2014-12-10 | SDN active and standby controller seamless handover methods based on NAT technologies |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410753409.0A CN104410730B (en) | 2014-12-10 | 2014-12-10 | SDN active and standby controller seamless handover methods based on NAT technologies |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104410730A CN104410730A (en) | 2015-03-11 |
CN104410730B true CN104410730B (en) | 2018-04-10 |
Family
ID=52648325
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410753409.0A Active CN104410730B (en) | 2014-12-10 | 2014-12-10 | SDN active and standby controller seamless handover methods based on NAT technologies |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104410730B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104935463B (en) * | 2015-06-03 | 2019-02-05 | 清华大学 | Implementation method of virtual software-defined network mapping |
CN105207902A (en) * | 2015-10-13 | 2015-12-30 | 广州西麦科技股份有限公司 | Main-standby virtual gateway system and method based on SDN |
CN105471648A (en) * | 2015-12-03 | 2016-04-06 | 英华达(上海)科技有限公司 | Zigbee network system and standby assistance method therefor |
CN106559254A (en) * | 2015-12-29 | 2017-04-05 | 国网智能电网研究院 | SDN multiple-domain networks device and implementation method based on both-end mouth switch |
CN108011815B (en) * | 2016-10-28 | 2020-12-01 | 中国电信股份有限公司 | Network control method and software defined network device and system |
CN106982207B (en) * | 2017-03-13 | 2019-06-28 | 中国人民解放军信息工程大学 | A kind of method and system of dynamic dispatching network operating system |
CN107046486A (en) * | 2017-06-16 | 2017-08-15 | 郑州云海信息技术有限公司 | A Failover System Based on Controller Agent |
CN109561127A (en) * | 2017-09-27 | 2019-04-02 | 上海诺基亚贝尔股份有限公司 | Method, equipment and the computer-readable medium synchronous for the data in software defined network |
CN110290174B (en) * | 2019-05-24 | 2021-02-05 | 华为技术有限公司 | Control method and control node of main master cluster |
CN112666914B (en) * | 2021-03-17 | 2021-06-18 | 浙江国利信安科技有限公司 | A method for realizing non-inductive switching redundant communication based on EPA bus |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103795805A (en) * | 2014-02-27 | 2014-05-14 | 中国科学技术大学苏州研究院 | Distributed server load balancing method based on SDN |
CN103929333A (en) * | 2014-05-08 | 2014-07-16 | 陈桂芳 | Implementation method for SDN controller pool |
CN104092774A (en) * | 2014-07-23 | 2014-10-08 | 杭州华三通信技术有限公司 | Software defined network connection establishment control method and device |
CN104158642A (en) * | 2014-08-08 | 2014-11-19 | 上海斐讯数据通信技术有限公司 | Method and system for providing backup for software defined network controller |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103139265B (en) * | 2011-12-01 | 2016-06-08 | 国际商业机器公司 | Network adaptation transmitter optimization method in massive parallel processing and system |
-
2014
- 2014-12-10 CN CN201410753409.0A patent/CN104410730B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103795805A (en) * | 2014-02-27 | 2014-05-14 | 中国科学技术大学苏州研究院 | Distributed server load balancing method based on SDN |
CN103929333A (en) * | 2014-05-08 | 2014-07-16 | 陈桂芳 | Implementation method for SDN controller pool |
CN104092774A (en) * | 2014-07-23 | 2014-10-08 | 杭州华三通信技术有限公司 | Software defined network connection establishment control method and device |
CN104158642A (en) * | 2014-08-08 | 2014-11-19 | 上海斐讯数据通信技术有限公司 | Method and system for providing backup for software defined network controller |
Non-Patent Citations (1)
Title |
---|
SDN and OpenFlow;William Stallings;《The Internet Protocol Journal,www.cisco.com/c/dam/en_us/about/ac123/ac147/archived_issues/ipj_16-1.pdf》;20130331;第12-13页OpenFlow Protocol,表1 * |
Also Published As
Publication number | Publication date |
---|---|
CN104410730A (en) | 2015-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104410730B (en) | SDN active and standby controller seamless handover methods based on NAT technologies | |
CN104468236B (en) | SDN controllers cluster, SDN switch and its connection control method | |
WO2020048453A1 (en) | Network element management method and apparatus, system and storage medium | |
CN100388703C (en) | Method and system for Ethernet interface node backup | |
CN105607590A (en) | Methods and apparatus to provide redundancy in a process control system | |
CN115004650B (en) | Node configuration method, device, distributed system and computer-readable medium | |
CN115225634B (en) | Data forwarding method, device and computer program product under virtual network | |
CN106797370B (en) | SAS system and traversal method and device thereof | |
CN104135446A (en) | System and method of implementing transition from IPv4 (Internet Protocol Version4) to IPv6 (Internet Protocol Version6) based on SDN (Software Defined Network) | |
CN104601380A (en) | Software-defined network controller and host computer information recovery method thereof | |
CN101714945A (en) | System and method for realizing internetwork communication | |
CN114297296A (en) | A server main-standby switching system for broadcasting | |
CN105991423A (en) | Gateway and method for calling device through gateway | |
EP3280102B1 (en) | Optical path allocation method and apparatus | |
CN113765781B (en) | Method, communication device, storage medium and system for processing routing message | |
CN111669333B (en) | Data transmission method, device, computing device and storage medium | |
CN111371680B (en) | Route management method, device, device and storage medium for dual-system hot backup | |
CN104767664A (en) | A method, device and system for increasing and decreasing slave nodes in a ring communication network | |
CN104734952A (en) | A data packet forwarding method and device | |
JP2022172168A (en) | Point-to-point database synchronization over transport protocol | |
CN111741077B (en) | Network service scheduling method and device, electronic equipment and storage medium | |
CN117118991A (en) | ARP forwarding table synchronization method and system, storage medium and electronic device | |
CN104348637B (en) | A kind of method that TCP connection is kept in failover | |
CN107528743B (en) | A Distributed Network Virtualization System of SDN Network | |
WO2013107087A1 (en) | Distributed logical address and physical address conversion method, apparatus and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20201103 Address after: 318015 no.2-3167, zone a, Nonggang City, no.2388, Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province Patentee after: Taizhou Jiji Intellectual Property Operation Co.,Ltd. Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666 Patentee before: Phicomm (Shanghai) Co.,Ltd. |
|
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210412 Address after: 518107 5th floor, building 7, huidebao Industrial Park, south of outer ring road, Baihua community, Guangming Street, Guangming New District, Shenzhen City, Guangdong Province Patentee after: SHENZHEN SUPERELECTRON TECHNOLOGY Co.,Ltd. Address before: 318015 no.2-3167, area a, nonggangcheng, 2388 Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province Patentee before: Taizhou Jiji Intellectual Property Operation Co.,Ltd. |
|
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20250326 Address after: Room 303, Building 2, Dahong Science and Technology Park, No. 470 Lianmashan 1st Road, Baihua Community, Guangming Street, Guangming District, Shenzhen City, Guangdong Province 518000 Patentee after: SHENZHEN SUPERELECTRON TECHNOLOGY Co.,Ltd. Country or region after: China Patentee after: HANGZHOU PINGZHI INFORMATION TECHNOLOGY CO.,LTD. Patentee after: Hangzhou Zhaoneng Xuntong Technology Co.,Ltd. Patentee after: Hangzhou Qiao Communication Technology Co.,Ltd. Address before: 518107 5th floor, building 7, huidebao Industrial Park, south of outer ring road, Baihua community, Guangming Street, Guangming New District, Shenzhen City, Guangdong Province Patentee before: SHENZHEN SUPERELECTRON TECHNOLOGY Co.,Ltd. Country or region before: China |
|
TR01 | Transfer of patent right |