CN106576108A - Communication method and device, and system in communication system - Google Patents
Communication method and device, and system in communication system Download PDFInfo
- Publication number
- CN106576108A CN106576108A CN201580000771.3A CN201580000771A CN106576108A CN 106576108 A CN106576108 A CN 106576108A CN 201580000771 A CN201580000771 A CN 201580000771A CN 106576108 A CN106576108 A CN 106576108A
- Authority
- CN
- China
- Prior art keywords
- message
- tcp
- master controller
- transponder
- sequence number
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本发明涉及通信技术领域,具体涉及一种通信系统中的通信方法和设备及系统。The present invention relates to the technical field of communication, in particular to a communication method, equipment and system in a communication system.
软件定义网络(Software Defined Network,SDN),是网络虚拟化的一种实现方式,其核心技术OpenFlow通过将网络设备控制面与数据面分离开来,从而实现了网络流量的灵活控制,使网络作为管道变得更加智能。SDN剥离了交换机除流量转发之外的所有高级处理功能,并且将这部分高级处理功能移到了单独的设备即控制器中。交换机和控制器之间使用控制通道协议(例如OpenFlow协议)进行交流,由控制器来发出控制指令,交换机负责接收指令并进行相应的数据转发。Software Defined Network (SDN) is an implementation of network virtualization. Its core technology, OpenFlow, realizes flexible control of network traffic by separating the control plane of network equipment from the data plane, making the network as a Pipelines just got smarter. SDN strips all high-level processing functions of the switch except traffic forwarding, and moves this part of high-level processing functions to a separate device, the controller. The switch and the controller use a control channel protocol (such as the OpenFlow protocol) to communicate, the controller issues control commands, and the switch is responsible for receiving commands and forwarding corresponding data.
为了提升SDN中控制器的可靠性,一般需要部署双控制器,其中,主控制器完成业务处理,备控制器作为备份。当主控制器故障时,备控制器实时替换主控制器,执行业务处理;整个过程,与主备控制器进行通信的对端设备不感知该主备控制器切换的过程。In order to improve the reliability of the controllers in the SDN, it is generally necessary to deploy dual controllers, wherein the primary controller completes service processing, and the standby controller acts as a backup. When the primary controller fails, the standby controller replaces the primary controller in real time to perform business processing; during the whole process, the peer device communicating with the primary and secondary controllers does not perceive the switching process of the primary and secondary controllers.
现有的技术方案中,通过主备控制器之间实时同步TCP(Transmission Control Protocol,传输控制协议)报文信息,实现基于TCP连接的协议的可靠性。为了实现主备控制器保护功能,与控制器进行基于TCP连接的协议通信的对端设备不感知该主备控制器切换的过程,需要备控制器对协议报文进行实时侦听。In the existing technical solution, the reliability of the protocol based on the TCP connection is realized by synchronizing TCP (Transmission Control Protocol, Transmission Control Protocol) message information between the active and standby controllers in real time. In order to realize the protection function of the active and standby controllers, the peer device that communicates with the controller based on the protocol of the TCP connection does not perceive the switching process of the active and standby controllers, and the standby controller needs to monitor the protocol packets in real time.
实践发现,该方案需要主备控制器之间实时同步大量TCP信息,特别是在一主多备场景下,主控制器需要同时与多个备控制器进行多次实时数据同步,导致主备控制器负担较重,对于整个系统性能影响较大。Practice has found that this solution requires a large amount of TCP information to be synchronized between the active and standby controllers in real time. The burden on the server is heavy, which has a great impact on the performance of the entire system.
发明内容Contents of the invention
本发明实施例提供一种通信系统中的通信方法和设备及系统,以解决现有SDN中主备控制器之间需要实时同步大量TCP信息,导致主备控制器负担较 重,影响系统性能的技术问题。Embodiments of the present invention provide a communication method, device, and system in a communication system to solve the problem that a large amount of TCP information needs to be synchronized in real time between the active and standby controllers in the existing SDN, resulting in heavy burden on the active and standby controllers. Heavy, technical issues affecting system performance.
本发明第一方面提供一种通信系统中的通信方法,所述通信系统包括主控制器、备控制器、转发器以及网络设备,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接收所述网络设备的报文并转发给所述主控制器,所述方法包括:所述转发器在接收到来自所述主控制器或者所述网络设备的报文之后,缓存接收到的报文;所述转发器监控所述缓存的报文的处理状态,并删除所述缓存的报文中的已经处理完毕的报文;当所述备控制器切换为新的主控制器时,所述转发器将所述缓存的报文中尚未处理完毕的报文发送给所述新的主控制器。The first aspect of the present invention provides a communication method in a communication system, the communication system includes a master controller, a backup controller, a repeater and a network device, the repeater is located between the master controller and the network device During the interval, it is used to receive the message of the main controller and forward it to the network device, or receive the message of the network device and forward it to the main controller, the method includes: the forwarder receiving After receiving the message from the main controller or the network device, cache the received message; the forwarder monitors the processing status of the cached message, and deletes the cached message A message that has been processed; when the standby controller is switched to a new master controller, the forwarder sends the messages that have not been processed in the buffered messages to the new master controller.
结合第一方面,在第一种可能的实现方式中,所述转发器监控缓存的报文的处理状态,并删除所述缓存的报文中的已经处理完毕的报文包括:所述转发器接收所述主控制器或者所述网络设备发送的、用于指示已经处理完毕的报文的指示值,根据所述指示值删除所述缓存的报文中的已经处理完毕的报文。With reference to the first aspect, in a first possible implementation manner, the forwarder monitors the processing status of the buffered messages, and deleting the processed messages in the buffered messages includes: the forwarder receiving an indication value sent by the main controller or the network device for indicating the processed message, and deleting the processed message in the buffered messages according to the indicated value.
结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述报文为传输控制协议TCP报文,所述缓存接收到的报文包括:所述转发器根据所述接收到的报文的报文头中的源IP地址、目的IP地址、源端口以及目的端口,确认对应的TCP连接;所述转发器基于所述确认的TCP连接,确定所述报文的TCP序列号,缓存所述接收到的报文以及所述接收到的报文的TCP序列号。With reference to the first possible implementation of the first aspect, in the second possible implementation, the message is a transmission control protocol TCP message, and the message received by the cache includes: the forwarder according to The source IP address, destination IP address, source port and destination port in the message header of the received message confirm the corresponding TCP connection; the forwarder determines the message based on the confirmed TCP connection The TCP sequence number of the received message is cached and the TCP sequence number of the received message is cached.
结合第一方面的第二种可能的实现方式,在第三种可能的实现方式中,所述缓存的报文包括所述网络设备向所述主控制器发送的入方向报文,所述转发器监控所述缓存的报文的处理状态,并删除所述缓存的报文中的已经处理完毕的报文包括:所述转发器接收所述主控器返回的应答消息,所述应答消息中包括第一指示值,所述第一指示值指示所述主控制器已经处理完毕的最后一个入方向报文的结束字节的TCP序列号;所述转发器从所述缓存的报文中,将结束字节的TCP序列号不大于所述第一指示值的至少一个入方向报文删除。With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner, the cached message includes an inbound message sent by the network device to the main controller, and the forwarding The device monitors the processing status of the buffered messages, and deleting the processed messages in the buffered messages includes: the forwarder receives the response message returned by the master controller, and the response message includes: Include a first indication value, the first indication value indicates the TCP sequence number of the end byte of the last inbound message that the main controller has processed; the forwarder from the cached message, Deleting at least one incoming packet whose TCP sequence number of the end byte is not greater than the first indication value.
结合第一方面的第一种至第三种可能的实现方式中的任一种,在第四种可能的实现方式中,所述缓存的报文包括所述主控制器向所述网络设备发送的出 方向报文,所述转发器监控所述缓存的报文的处理状态,当确定所述缓存的报文中的至少一个报文已经处理完毕时,将所述缓存的报文中已经处理完毕的至少一个报文删除包括:所述转发器接收所述网络设备返回的反馈消息,所述反馈消息中包括第二指示值,所述第二指示值指示所述网络设备期待接收的下一个出方向报文的TCP序列号;从所述缓存的报文中,将结束字节的TCP序列号小于所述第二指示值的至少一个出方向报文删除。With reference to any one of the first to third possible implementation manners of the first aspect, in a fourth possible implementation manner, the cached message includes out of Direction message, the forwarder monitors the processing status of the cached message, and when it is determined that at least one message in the cached message has been processed, the processed message in the cached message Deleting at least one message includes: the forwarder receiving a feedback message returned by the network device, the feedback message including a second indication value, the second indication value indicating the next outbound direction that the network equipment expects to receive The TCP sequence number of the message; from the buffered messages, delete at least one outbound message whose TCP sequence number of the end byte is smaller than the second indication value.
结合第一方面的第四种可能的实现方式,在第五种可能的实现方式中,所述方法还包括:所述转发器发送响应消息给所述主控制器,所述响应消息中包括所述缓存的报文中的最后一个出方向报文的结束字节的TCP序列号;所述转发器接收所述主控制器发送的通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已处理完毕的最后一个出方向报文的结束字节的TCP序列号;所述从所述缓存的报文中,将结束字节的TCP序列号小于所述第二指示值的至少一个出方向报文删除包括:从所述缓存的报文中,将结束字节的TCP序列号小于所述第二指示值且不大于所述第三指示值的至少一个出方向报文删除。With reference to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner, the method further includes: the forwarder sends a response message to the main controller, and the response message includes the The TCP sequence number of the end byte of the last outgoing message in the cached message; the forwarder receives the notification message sent by the master controller, and the notification message includes a third indication value, the The third indication value indicates the TCP sequence number of the end byte of the last outbound message that the main controller has processed; the TCP sequence number of the end byte from the buffered message is less than the Deleting at least one outbound packet of the second indication value includes: from the cached message, at least An outgoing packet is deleted.
结合第一方面的第一种至第五种可能的实现方式中的任一种,在第六种可能的实现方式中,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。In combination with any one of the first to fifth possible implementations of the first aspect, in a sixth possible implementation, the data part of the TCP message includes a sub-message, and the sub-message It is a Border Gateway Protocol BGP packet or a Label Distribution Protocol LDP packet.
结合第一方面的第二种至第五种可能的实现方式中的任一种,在第七种可能的实现方式中,所述缓存所述接收到的报文以及所述接收到的报文的TCP序列号包括:所述转发器对所述接收到的报文按照TCP序列号排序后进行缓存。With reference to any one of the second to fifth possible implementations of the first aspect, in a seventh possible implementation, the buffering of the received message and the received message The TCP sequence numbers include: the forwarder caches the received packets after sorting them according to the TCP sequence numbers.
结合第一方面的第一种至第七种可能的实现方式中的任一种,在第八种可能的实现方式中,所述缓存接收到的报文包括:所述转发器接收到所述主控制器或者所述网络设备重传的报文时,缓存所述重传的报文;所述当所述备控制器切换为新的主控制器时,所述转发器将所述缓存的报文中尚未处理完毕的报文发送给所述新的主控制器包括:当所述备控制器切换为新的主控制器时,如果所述重传的报文是尚未处理的报文,所述转发器将所述重传的报文以及所述重传的报文的原报文一起发送给所述新的主控制器。 With reference to any one of the first to seventh possible implementation manners of the first aspect, in an eighth possible implementation manner, the buffering the received message includes: the forwarder receives the When the main controller or the network device retransmits the message, cache the retransmitted message; when the standby controller is switched to a new main controller, the forwarder will store the cached Sending the message that has not been processed in the message to the new master controller includes: when the standby controller is switched to the new master controller, if the retransmitted message is a message that has not been processed, The forwarder sends the retransmitted message and the original message of the retransmitted message to the new main controller together.
结合第一方面的第四种或第五种可能的实现方式,在第九种可能的实现方式中,所述方法还包括:所述转发器根据所述出方向报文的报文头中的分片标示位,识别所述接收到的出方向报文是否是一个完整TCP报文的分片;若是,所述转发器在收到所述完整TCP报文的全部分片之后,开始向所述网络设备转发所述完整TCP报文的分片。With reference to the fourth or fifth possible implementation of the first aspect, in a ninth possible implementation, the method further includes: the forwarder, according to the Fragmentation flag bit, identifying whether the received outgoing direction message is a fragment of a complete TCP message; The network device forwards the fragments of the complete TCP message.
本发明第二方面提供一种通信系统中的通信方法,所述通信系统包括主控制器,备控制器,转发器以及网络设备,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接收所述网络设备的报文并转发给所述主控制器,所述方法包括:所述主控制器接收所述转发器转发的来自所述网络设备的报文,对接收到的报文进行处理;所述主控制器向所述转发器发送用于指示已经处理完毕的报文的指示值。The second aspect of the present invention provides a communication method in a communication system, the communication system includes a master controller, a standby controller, a repeater and a network device, the repeater is located between the master controller and the network device During the period, it is used to receive the message of the main controller and forward it to the network device, or receive the message of the network device and forward it to the main controller, and the method includes: the main controller receives The forwarder forwards the message from the network device, and processes the received message; the main controller sends an indication value to the forwarder to indicate the message that has been processed.
结合第二方面,在第一种可能的实现方式中,所述报文为传输控制协议TCP报文,所述主控制器向所述转发器发送所述主控制器、用于指示已经处理完毕的报文的指示值包括:所述主控制器向所述转发器发送应答消息,所述应答消息中包括第一指示值,所述第一指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述应答消息被所述转发器用于将自身缓存的TCP报文中的、结束字节的TCP序列号不大于所述第一指示值的至少一个TCP报文删除。With reference to the second aspect, in a first possible implementation manner, the message is a transmission control protocol TCP message, and the main controller sends the main controller to the forwarder to indicate that the processing has been completed The indication value of the message includes: the main controller sends a response message to the transponder, the response message includes a first indication value, and the first indication value indicates that the main controller has processed the last The TCP sequence number of the end byte of a TCP message, the response message is used by the forwarder to save the TCP sequence number of the end byte in the TCP message cached by itself at least not greater than the first indication value A TCP packet is deleted.
结合第二方面或第二方面的第一种可能的实现方式,在第二种可能的实现方式中,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。In combination with the second aspect or the first possible implementation of the second aspect, in the second possible implementation, the data part of the TCP message includes a sub-message, and the sub-message is a border gateway protocol BGP packets, or Label Distribution Protocol LDP packets.
结合第二方面的第二种可能的实现方式,在第三种可能的实现方式中,所述主控制器对接收到的TCP报文进行处理包括:将所述TCP报文的报文头去除,获取所述TCP报文的数据部分;从所述TCP报文的数据部分中恢复出完整的子报文;对所述子报文进行持久化处理。With reference to the second possible implementation of the second aspect, in a third possible implementation, the main controller processing the received TCP message includes: removing the header of the TCP message , obtaining the data part of the TCP message; recovering a complete sub-message from the data part of the TCP message; and performing persistent processing on the sub-message.
本发明第三方面提供一种通信系统中的通信方法,所述通信系统包括主控制器,备控制器,转发器以及网络设备,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接 收所述网络设备的报文并转发给所述主控制器,所述方法包括:所述主控制器向所述转发器发送报文,发送的报文被所述转发器用于缓存后向所述网络设备发送;所述主控制对所述发送的报文进行处理;所述主控制器向所述转发器发送用于指示已经处理完毕的报文的指示值。The third aspect of the present invention provides a communication method in a communication system, the communication system includes a master controller, a standby controller, a repeater and a network device, the repeater is located between the master controller and the network device time, used to receive the message of the master controller and forward it to the network device, or receive Receive the message of the network device and forward it to the main controller, the method includes: the main controller sends a message to the forwarder, and the sent message is used for buffering by the forwarder and then forwarded to the main controller The network device sends the message; the main controller processes the sent message; the main controller sends an indication value for indicating the message that has been processed to the forwarder.
结合第三方面,在第一种可能的实现方式中,所述报文为传输控制协议TCP报文,所述主控制对所述报文进行处理包括:所述主控制接收所述转发器发送的响应消息,所述响应消息中包括所述转发器已缓存的最后一个TCP报文的结束字节的TCP序列号;所述主控制根据所述响应消息对所述TCP报文进行处理;所述主控制器向所述转发器发送所述主控制器、用于指示已经处理完毕的报文的指示值包括:所述主控制器向所述转发器发送通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述通知消息被所述转发器用于将已缓存的报文中的、结束字节的TCP序列号不大于所述第三指示值且小于第二指示值的一个或多个TCP报文删除,所述第二指示值指示所述网络设备期待接收的下一个TCP报文的TCP序列号。With reference to the third aspect, in a first possible implementation manner, the message is a Transmission Control Protocol TCP message, and processing the message by the main control includes: receiving, by the main control, the message sent by the forwarder. A response message, the response message includes the TCP sequence number of the end byte of the last TCP message that the forwarder has cached; the master control processes the TCP message according to the response message; The main controller sending the indication value of the main controller to the forwarder to indicate that the message has been processed includes: the main controller sends a notification message to the forwarder, and the notification message includes The third indication value, the third indication value indicates the TCP sequence number of the end byte of the last TCP message that the main controller has processed, and the notification message is used by the forwarder to forward the buffered message In the text, the TCP sequence number of the end byte is not greater than the third indication value and less than the second indication value, and one or more TCP packets are deleted, and the second indication value indicates that the network device expects to receive the next The TCP sequence number of a TCP packet.
结合第三方面或第三方面的第一种可能的实现方式,在第二种可能的实现方式中,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。In combination with the third aspect or the first possible implementation of the third aspect, in the second possible implementation, the data part of the TCP message includes a sub-message, and the sub-message is a border gateway protocol BGP packets, or Label Distribution Protocol LDP packets.
结合第三方面的第二种可能的实现方式,在第三种可能的实现方式中,所述主控制器对所述TCP报文进行处理包括:获取所述TCP报文的路由信息,对所述路由信息进行持久化处理。With reference to the second possible implementation of the third aspect, in a third possible implementation, the main controller processing the TCP message includes: acquiring routing information of the TCP message, and The above routing information is persisted.
本发明第四方面提供一种通信系统中的转发器,所述通信系统包括主控制器、备控制器、所述转发器以及网络设备,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接收所述网络设备的报文并转发给所述主控制器,所述转发器包括:缓存模块,用于在所述转发器接收到来自所述主控制器或者所述网络设备的报文之后,缓存接收到的报文;处理模块,用于监控缓存的报文的处理状态,并删除所述缓存的报文中的已经处理完毕的报文;发送模块,用于当所述备控制器切换为新 的主控制器时,将所述缓存的报文中尚未处理完毕的报文发送给所述新的主控制器。The fourth aspect of the present invention provides a repeater in a communication system, the communication system includes a master controller, a backup controller, the repeater and network equipment, the repeater is located between the master controller and the network Between devices, it is used to receive the message of the main controller and forward it to the network device, or receive the message of the network device and forward it to the main controller, and the forwarder includes: a cache module, After the forwarder receives the message from the main controller or the network device, cache the received message; the processing module is used to monitor the processing status of the cached message, and delete the A message that has been processed in the cached message; a sending module, used to switch the standby controller to the new When the main controller is used, the unprocessed messages in the buffered messages are sent to the new main controller.
结合第四方面,在第一种可能的实现方式中,所述转发器还包括:接收模块,用于接收所述主控制器或者所述网络设备发送的、用于指示已经处理完毕的报文的指示值;所处处理模块具体用于根据所述指示值删除所述缓存的报文中的已经处理完毕的报文。With reference to the fourth aspect, in a first possible implementation manner, the forwarder further includes: a receiving module, configured to receive a message sent by the main controller or the network device to indicate that processing has been completed The indication value; the processing module where it is located is specifically configured to delete the processed message in the buffered messages according to the indication value.
结合第四方面的第一种可能的实现方式,在第二种可能的实现方式中,所述报文为传输控制协议TCP报文,所述缓存模块包括:确认单元,用于根据所述接收到的报文的报文头中的源IP地址、目的IP地址//源端口以及目的端口,确认对应的TCP连接;确定单元,用于基于所述确认的TCP连接,确定所述报文的TCP序列号;缓存单元,用于缓存所述接收到的报文以及所述接收到的报文的TCP序列号。With reference to the first possible implementation of the fourth aspect, in the second possible implementation, the message is a transmission control protocol TCP message, and the cache module includes: a confirmation unit, configured to receive The source IP address, destination IP address//source port and destination port in the message header of the received message confirm the corresponding TCP connection; the determining unit is used to determine the address of the message based on the confirmed TCP connection TCP sequence number; a cache unit, configured to cache the received message and the TCP sequence number of the received message.
结合第四方面的第二种可能的实现方式,在第三种可能的实现方式中,所述缓存的报文包括所述网络设备向所述主控制器发送的入方向报文,所述转发器还包括:接收模块,用于接收所述主控器返回的应答消息,所述应答消息中包括第一指示值,所述第一指示值指示所述主控制器已经处理完毕的最后一个入方向报文的结束字节的TCP序列号;所述处理模块具体用于从所述缓存的报文中,将结束字节的TCP序列号不大于所述第一指示值的至少一个入方向报文删除。With reference to the second possible implementation manner of the fourth aspect, in a third possible implementation manner, the cached message includes an inbound message sent by the network device to the main controller, and the forwarding The controller also includes: a receiving module, configured to receive a response message returned by the main controller, wherein the response message includes a first indication value, and the first indication value indicates that the main controller has processed the last input The TCP sequence number of the end byte of the direction message; the processing module is specifically configured to, from the buffered messages, at least one inbound direction message whose TCP sequence number of the end byte is not greater than the first indication value The text is deleted.
结合第四方面的第一种至第三种可能的实现方式中的任一种,在第四种可能的实现方式中,所述缓存的报文包括所述主控制器向所述网络设备发送的出方向报文,所述转发器还包括:接收模块,用于接收所述网络设备返回的反馈消息,所述反馈消息中包括第二指示值,所述第二指示值指示所述网络设备期待接收的下一个出方向报文的TCP序列号;所述处理模块具体用于从所述缓存的报文中,将结束字节的TCP序列号小于所述第二指示值的至少一个出方向报文删除。With reference to any one of the first to third possible implementation manners of the fourth aspect, in a fourth possible implementation manner, the cached message includes The forwarder further includes: a receiving module, configured to receive a feedback message returned by the network device, the feedback message includes a second indication value, and the second indication value indicates that the network equipment The TCP sequence number of the next outgoing direction message that is expected to be received; the processing module is specifically configured to, from the buffered message, at least one outgoing direction whose TCP sequence number of the end byte is less than the second indication value The message is deleted.
结合第四方面的第四种可能的实现方式,在第五种可能的实现方式中,所述发送模块,还用于发送响应消息给所述主控制器,所述响应消息中包括所述 缓存的报文中的最后一个出方向报文的结束字节的TCP序列号;所述接收模块,还用于接收所述主控制器发送的通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已处理完毕的最后一个出方向报文的结束字节的TCP序列号;所述处理模块具体用于从所述缓存的报文中,将结束字节的TCP序列号小于所述第二指示值且不大于所述第三指示值的至少一个出方向报文删除。With reference to the fourth possible implementation manner of the fourth aspect, in a fifth possible implementation manner, the sending module is further configured to send a response message to the main controller, and the response message includes the The TCP sequence number of the end byte of the last outgoing message in the buffered message; the receiving module is also used to receive the notification message sent by the main controller, and the notification message includes a third indication value , the third indication value indicates the TCP sequence number of the end byte of the last outgoing message that has been processed by the main controller; the processing module is specifically used to, from the buffered message, end At least one outbound packet whose byte TCP sequence number is less than the second indication value and not greater than the third indication value is deleted.
结合第四方面或者第四方面的第一种至第五种可能的实现方式中的任一种,在第六种可能的实现方式中,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。In combination with the fourth aspect or any one of the first to fifth possible implementations of the fourth aspect, in a sixth possible implementation, the data part of the TCP message includes a sub-message, so The sub-message is a Border Gateway Protocol BGP message or a Label Distribution Protocol LDP message.
结合第四方面的第二种至第五种可能的实现方式中的任一种,在第七种可能的实现方式中,所述缓存单元,具体用于对所述接收到的报文按照TCP序列号排序后进行缓存。With reference to any one of the second to fifth possible implementations of the fourth aspect, in a seventh possible implementation, the cache unit is specifically configured to process the received message according to the TCP The sequence numbers are sorted and cached.
结合第四方面的第一种至第七种可能的实现方式中的任一种,在第八种可能的实现方式中,所述缓存模块,还用于在所述转发器接收到所述主控制器或者所述网络设备重传的报文时,缓存所述重传的报文;所述发送模块,还用于当所述备控制器切换为新的主控制器时,如果所述重传的报文是尚未处理的报文,所述转发器将所述重传的报文以及所述重传的报文的原报文一起发送给所述新的主控制器。With reference to any one of the first to seventh possible implementation manners of the fourth aspect, in an eighth possible implementation manner, the cache module is further configured to receive the master When the controller or the network device retransmits the message, cache the retransmitted message; the sending module is also used for when the standby controller is switched to a new master controller, if the retransmitted The transmitted message is an unprocessed message, and the forwarder sends the retransmitted message and the original message of the retransmitted message to the new master controller together.
结合第四方面的第四种至第五种可能的实现方式中的任一种,在第九种可能的实现方式中,所述转发器还包括:识别模块,用于根据所述出方向报文的报文头中的分片标示位,识别所述接收到的出方向报文是否是一个完整TCP报文的分片;所述发送模块,还用于若所述识别模块识别出所述接收到的出方向报文是一个完整TCP报文的分片,则在收到所述完整TCP报文的全部分片之后,开始向所述网络设备转发所述完整TCP报文的分片。With reference to any one of the fourth to fifth possible implementations of the fourth aspect, in a ninth possible implementation, the transponder further includes: an identification module, configured to Fragmentation flag in the message header of the message, identifying whether the received outgoing message is a fragment of a complete TCP message; the sending module is also used to identify the The received outgoing message is a fragment of a complete TCP message, and after receiving all the fragments of the complete TCP message, start to forward the fragments of the complete TCP message to the network device.
本发明第五方面提供一种通信系统中的主控制器,所述通信系统包括所述主控制器,备控制器,转发器以及网络设备,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接收所述网络设备的报文并转发给所述主控制器,所述主控制器包括:接收 模块,用于接收所述转发器转发的来自所述网络设备的报文;处理模块,用于对接收到的报文进行处理;发送模块,用于向所述转发器发送用于指示已经处理完毕的报文的指示值。The fifth aspect of the present invention provides a main controller in a communication system, the communication system includes the main controller, a standby controller, a repeater and a network device, and the repeater is located between the main controller and the Between network devices, it is used to receive the message of the main controller and forward it to the network device, or receive the message of the network device and forward it to the main controller, and the main controller includes: receiving A module, configured to receive a message from the network device forwarded by the forwarder; a processing module, configured to process the received message; a sending module, configured to send a message indicating that it has been processed to the forwarder Indicates the completed message.
结合第五方面,在第一种可能的实现方式中,所述主控制器还包括:接收模块,用于接收所述转发器发送的响应消息,所述响应消息中包括所述转发器已缓存的最后一个TCP报文的结束字节的TCP序列号;所述处理模块,具体用于根据所述响应消息对所述TCP报文进行处理;所述发送模块,具体用于向所述转发器发送通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述通知消息被所述转发器用于将已缓存的报文中的、结束字节的TCP序列号不大于所述第三指示值且小于第二指示值的一个或多个TCP报文删除,所述第二指示值指示所述网络设备期待接收的下一个TCP报文的TCP序列号。With reference to the fifth aspect, in a first possible implementation manner, the main controller further includes: a receiving module, configured to receive a response message sent by the forwarder, where the response message includes The TCP sequence number of the end byte of the last TCP message; the processing module is specifically used to process the TCP message according to the response message; the sending module is specifically used to send to the transponder Send a notification message, the notification message includes a third indication value, the third indication value indicates the TCP sequence number of the end byte of the last TCP message that the main controller has processed, and the notification message is received The forwarder is used to delete one or more TCP packets in which the TCP sequence number of the end byte is not greater than the third indication value and less than the second indication value in the cached message, and the second indication The value indicates the TCP sequence number of the next TCP packet that the network device expects to receive.
结合第五方面或第五方面的第一种可能的实现方式,在第二种可能的实现方式中,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。In combination with the fifth aspect or the first possible implementation of the fifth aspect, in the second possible implementation, the data part of the TCP message includes a sub-message, and the sub-message is a border gateway protocol BGP packets, or Label Distribution Protocol LDP packets.
结合第五方面的第二种可能的实现方式,在第三种可能的实现方式中,所述处理模块具体用于将所述TCP报文的报文头去除,获取所述TCP报文的数据部分;从所述TCP报文的数据部分中恢复出完整的子报文;对所述子报文进行持久化处理。In combination with the second possible implementation of the fifth aspect, in the third possible implementation, the processing module is specifically configured to remove the header of the TCP message and obtain the data of the TCP message part; recover a complete sub-message from the data part of the TCP message; and perform persistent processing on the sub-message.
本发明第六方面提供一种通信系统中的主控制器,所述通信系统包括主控制器,备控制器,转发器以及网络设备,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接收所述网络设备的报文并转发给所述主控制器,所述主控制器包括:发送模块,用于向所述转发器发送报文,所述报文被所述转发器用于缓存后向所述网络设备发送;处理模块,用于对所述报文进行处理;所述发送模块,还用于所述主控制器向所述转发器发送用于指示已经处理完毕的报文的指示值。The sixth aspect of the present invention provides a main controller in a communication system, the communication system includes a main controller, a standby controller, a repeater and a network device, and the repeater is located between the main controller and the network device In between, it is used to receive the message of the main controller and forward it to the network device, or receive the message of the network device and forward it to the main controller, and the main controller includes: a sending module, Used to send a message to the forwarder, the message is buffered by the forwarder and then sent to the network device; the processing module is used to process the message; the sending module is also used The main controller sends an indication value for indicating that the message has been processed to the forwarder.
结合第六方面,在第一种可能的实现方式中,所述主控制器还包括:接收模块,用于接收所述转发器发送的响应消息,所述响应消息中包括所述转发器 已缓存的最后一个TCP报文的结束字节的TCP序列号;所述处理模块,具体用于根据所述响应消息对所述TCP报文进行处理;所述发送模块,具体用于向所述转发器发送通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述通知消息被所述转发器用于将已缓存的报文中的、结束字节的TCP序列号不大于所述第三指示值且小于第二指示值的一个或多个TCP报文删除,所述第二指示值指示所述网络设备期待接收的下一个TCP报文的TCP序列号。With reference to the sixth aspect, in a first possible implementation manner, the main controller further includes: a receiving module, configured to receive a response message sent by the transponder, and the response message includes the The TCP sequence number of the end byte of the last TCP message that has been cached; the processing module is specifically used to process the TCP message according to the response message; the sending module is specifically used to send the The forwarder sends a notification message, the notification message includes a third indication value, the third indication value indicates the TCP sequence number of the end byte of the last TCP message that the main controller has processed, the notification The message is used by the forwarder to delete one or more TCP packets whose TCP sequence number of the end byte is not greater than the third indication value and less than the second indication value in the cached messages, and the first The two indication values indicate the TCP sequence number of the next TCP message that the network device expects to receive.
结合第六方面或第六方面的第一种可能的实现方式中,在第六方面的第二种可能的实现方式中,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。In combination with the sixth aspect or the first possible implementation of the sixth aspect, in the second possible implementation of the sixth aspect, the data part of the TCP message includes a sub-message, and the sub-message It is a Border Gateway Protocol BGP packet or a Label Distribution Protocol LDP packet.
结合第六方面的第二种可能的实现方式,在第三种可能的实现方式中,所述处理模块,具体用于获取所述TCP报文的路由信息,对所述路由信息进行持久化处理。In combination with the second possible implementation of the sixth aspect, in a third possible implementation, the processing module is specifically configured to obtain routing information of the TCP message, and perform persistent processing on the routing information .
本发明第七方面提供一种通信系统,所述通信系统包括主控制器、备控制器、转发器以及网络设备,其中,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接收所述网络设备的报文并转发给所述主控制器;以及,在接收到来自所述主控制器或者所述网络设备的报文之后,缓存接收到的报文,监控缓存的报文的处理状态,并删除所述缓存的报文中的已经处理完毕的报文;当所述备控制器切换为新的主控制器时,所述转发器将所述缓存的报文中尚未处理完毕的报文发送给所述新的主控制器;所述主控制器用于向所述转发器发送报文,对发送的报文进行处理,或者,接收所述转发器转发的来自所述网络设备的报文,对接收到的报文进行处理;以及,向所述转发器发送用于指示已经处理完毕的报文的指示值;所述网络设备用于向所述转发器发送报文,或者,接收所述转发器转发的来自所述主控制器的报文;所述备控制器,用于在所述主控制器故障时,切换为新的主控制器。A seventh aspect of the present invention provides a communication system, the communication system includes a master controller, a standby controller, a repeater, and a network device, wherein the repeater is located between the master controller and the network device, It is used to receive the message of the main controller and forward it to the network device, or receive the message of the network device and forward it to the main controller; and, after receiving the message from the main controller or the After the message of the network device, cache the received message, monitor the processing status of the cached message, and delete the processed message in the cached message; when the standby controller switches to the new When the master controller is used, the forwarder sends the unprocessed messages in the buffered messages to the new master controller; the master controller is used to send messages to the forwarder, for Processing the sent message, or receiving a message from the network device forwarded by the forwarder, and processing the received message; and sending a message indicating that the process has been completed to the forwarder The indication value of the message; the network device is used to send a message to the forwarder, or receive the message from the master controller forwarded by the forwarder; the standby controller is used to When the master controller fails, switch to a new master controller.
由上可见,本发明一些可行的实施方式中,采用由转发器缓存接收到的报文,确认缓存的报文被处理完毕后才删除缓存的报文,如果主备控制器进行了身份切换,则将缓存的、尚未处理完毕的报文上传给新的主控制器的技术方案, 取得了以下技术效果:通过利用转发器缓存报文进行数据备份,避免了主备控制器之间的数据备份,可以减少主备控制器的负担,减轻系统负载,有效提高系统效率和可靠性。It can be seen from the above that in some feasible embodiments of the present invention, the forwarder caches the received message and deletes the cached message after confirming that the cached message has been processed. If the active and standby controllers perform identity switching, Then upload the cached and unprocessed messages to the technical solution of the new master controller, The following technical effects have been achieved: by using the forwarder to cache messages for data backup, data backup between the active and standby controllers is avoided, the burden on the active and standby controllers can be reduced, the system load can be reduced, and the system efficiency and reliability can be effectively improved.
为了更清楚地说明本发明实施例技术方案,下面将对实施例和现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that are required in the description of the embodiments and prior art. Obviously, the accompanying drawings in the following description are only some implementations of the present invention For example, those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1a是本发明实施例中SDN的网络结构示意图;Fig. 1a is a schematic diagram of the network structure of SDN in the embodiment of the present invention;
图1b是IP报文的结构示意图;Figure 1b is a schematic structural diagram of an IP packet;
图1c是IP首部的结构示意图;Fig. 1c is a structural schematic diagram of an IP header;
图1d是TCP首部的结构示意图;Figure 1d is a schematic structural diagram of a TCP header;
图1e是主备控制器进行身份切换的示意图;Fig. 1e is a schematic diagram of identity switching between active and standby controllers;
图1f是TCP报文分片的示意图;Fig. 1f is a schematic diagram of TCP packet fragmentation;
图1g是TCP报文重传的示意图;Fig. 1g is a schematic diagram of TCP packet retransmission;
图2是本发明实施例一提供的一种通信系统中的通信方法的流程图;FIG. 2 is a flowchart of a communication method in a communication system provided by Embodiment 1 of the present invention;
图3a是本发明实施例二提供的一种通信系统中的通信方法的流程图;FIG. 3a is a flowchart of a communication method in a communication system provided by Embodiment 2 of the present invention;
图3b是的本发明一个具体应用场景的示意图;Fig. 3b is a schematic diagram of a specific application scenario of the present invention;
图4a是本发明实施例三提供的一种通信系统中的通信方法的流程图;FIG. 4a is a flowchart of a communication method in a communication system provided by Embodiment 3 of the present invention;
图4b是的本发明另一个具体应用场景的示意图;Fig. 4b is a schematic diagram of another specific application scenario of the present invention;
图4c是的本发明实施例另一个具体应用场景的示意图;Fig. 4c is a schematic diagram of another specific application scenario of the embodiment of the present invention;
图5是本发明实施例四提供的一种通信系统中的通信方法的流程图;FIG. 5 is a flowchart of a communication method in a communication system provided by Embodiment 4 of the present invention;
图6是本发明实施例五提供的一种通信系统中的通信方法的流程图;FIG. 6 is a flowchart of a communication method in a communication system provided by Embodiment 5 of the present invention;
图7a是本发明实施例六提供的一种通信系统中的转发器的示意图;Fig. 7a is a schematic diagram of a transponder in a communication system provided by Embodiment 6 of the present invention;
图7b是本发明实施例六提供的另一种通信系统中的转发器的示意图;Fig. 7b is a schematic diagram of a transponder in another communication system provided by Embodiment 6 of the present invention;
图8是本发明实施例七提供的一种通信系统中的主控制器的示意图;FIG. 8 is a schematic diagram of a main controller in a communication system provided by Embodiment 7 of the present invention;
图9a是本发明实施例八提供的一种通信系统中的主控制器的示意图;Fig. 9a is a schematic diagram of a main controller in a communication system provided by Embodiment 8 of the present invention;
图9b是本发明实施例八提供的另一种通信系统中的主控制器的示意图; Fig. 9b is a schematic diagram of a main controller in another communication system provided by Embodiment 8 of the present invention;
图10是本发明实施例提供的一种通信系统中的转发器的示意图;FIG. 10 is a schematic diagram of a transponder in a communication system according to an embodiment of the present invention;
图11是本发明实施例提供的一种通信系统中的主控制器的示意图;Fig. 11 is a schematic diagram of a main controller in a communication system provided by an embodiment of the present invention;
图12是本发明实施例提供的一种通信系统中的主控制器的示意图。Fig. 12 is a schematic diagram of a main controller in a communication system provided by an embodiment of the present invention.
本发明实施例提供一种通信系统中的通信方法和设备和系统,以解决现有SDN中主备控制器之间需要实时同步大量TCP信息,导致主备控制器负担较重,影响系统性能的技术问题。本发明实施例还提供相应的转发器。Embodiments of the present invention provide a communication method, device, and system in a communication system to solve the problem that a large amount of TCP information needs to be synchronized in real time between the active and standby controllers in the existing SDN, resulting in a heavy burden on the active and standby controllers and affecting system performance. technical problem. The embodiment of the present invention also provides a corresponding transponder.
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is an embodiment of a part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.
下面通过具体实施例,分别进行详细的说明。In the following, specific examples will be used to describe in detail respectively.
实施例一Embodiment one
请参考图1a,是本发明实施例中涉及的通信系统的网络结构示意图。Please refer to FIG. 1a, which is a schematic diagram of a network structure of a communication system involved in an embodiment of the present invention.
所述通信系统具体可以是软件定义网络(SDN),SDN包括控制器,转发器以及网络设备。其中,控制器有两个或多个,具体包括一个主控制器和至少一个备控制器。控制器可以是硬件装置,也可以是虚拟机,例如,具体可以是物理服务器或者物理服务器中运行的虚拟机。转发器可以是物理的或者虚拟的交换机或路由器等转发设备。控制器和转发器之间利用OpenFlow协议进行交互。转发器根据控制器的指令,进行数据转发,用于将主控制器的报文转发给网络设备,或者将网络设备的报文转发给主控制器。控制器发出的报文或者网络设备发出的报文,都经过转发器。Specifically, the communication system may be a software-defined network (SDN), and the SDN includes a controller, a repeater, and a network device. Wherein, there are two or more controllers, specifically including one master controller and at least one standby controller. The controller may be a hardware device, or a virtual machine, for example, specifically, a physical server or a virtual machine running in the physical server. The forwarder can be a forwarding device such as a physical or virtual switch or router. The controller and the forwarder use the OpenFlow protocol to interact. The forwarder performs data forwarding according to the instruction of the controller, and is used to forward the message of the main controller to the network device, or forward the message of the network device to the main controller. The packets sent by the controller or the packets sent by the network equipment all pass through the transponder.
所说的通信系统不局限于电信通信系统,还可以是其他领域的通信系统,例如IT(Information Technology,信息技术)设备组成的通信系统等。The communication system mentioned is not limited to the telecommunication communication system, and may also be a communication system in other fields, such as a communication system composed of IT (Information Technology, information technology) equipment.
其中,主控制器完成业务处理,备控制器作为备份。转发器只与主控制器交互,接受主控制器的指令控制。当主控制器故障时,备控制器实时替换主控 制器,作为新的主控制器执行业务处理;整个过程中,与主备控制器进行通信的对端设备(例如图1a中的网络设备)不感知。Wherein, the primary controller completes business processing, and the standby controller acts as a backup. The transponder only interacts with the main controller and accepts the command and control of the main controller. When the master controller fails, the standby controller replaces the master controller in real time The controller acts as a new master controller to perform business processing; during the whole process, the peer device (such as the network device in Figure 1a) that communicates with the master controller does not perceive it.
本文中,主控制器和网络设备交互的报文可以是任何一种基于TCP连接的协议报文,例如可以是BGP(Border Gateway Protocol,边界网关协议)报文,或者LDP(Label Distribution Protocol,标签分发协议)报文等。一般的,采用IP(Internet Protocol,网络之间互连的协议)报文来承载TCP报文,用TCP报文来承载BGP报文或者LDP报文。主控制器和网络设备交互的BGP报文或LDP报文的外层封装的报文头包括TCP首部和IP首部。In this paper, the message exchanged between the main controller and the network device can be any protocol message based on the TCP connection, for example, it can be a BGP (Border Gateway Protocol, Border Gateway Protocol) message, or an LDP (Label Distribution Protocol, label distribution protocol) messages, etc. Generally, IP (Internet Protocol, a protocol for interconnection between networks) packets are used to carry TCP packets, and TCP packets are used to carry BGP packets or LDP packets. The outer-encapsulated message header of the BGP message or LDP message exchanged between the main controller and the network device includes a TCP header and an IP header.
如图1b所示,BGP报文或者LDP报文携带在TCP报文的数据域中,TCP报文携带在IP报文的数据域中。As shown in FIG. 1b, the BGP message or the LDP message is carried in the data field of the TCP message, and the TCP message is carried in the data field of the IP message.
如图1c所示,是IP报文的IP首部的结构示意图。IP首部中包含IP报文的源IP地址(即图1c中的32位源IP地址)和目的IP地址(即图1c中的32位目的IP地址)。As shown in FIG. 1c, it is a structural schematic diagram of the IP header of the IP message. The IP header includes the source IP address of the IP packet (that is, the 32-bit source IP address in FIG. 1c ) and the destination IP address (that is, the 32-bit destination IP address in FIG. 1c ).
如图1d所示,是TCP报文的TCP首部的结构示意图。TCP首部中包含TCP报文的源端口(即图1d中的16位源端口)和目的端口(即图1d中的16位目的端口),还包括TCP报文的TCP序列号(即图1d中的32位序号)。As shown in FIG. 1d, it is a schematic structural diagram of a TCP header of a TCP message. The TCP header includes the source port of the TCP message (i.e. the 16-bit source port in Figure 1d) and the destination port (i.e. the 16-bit destination port in Figure 1d), and also includes the TCP serial number of the TCP message (i.e. the 16-bit source port in Figure 1d). 32-bit serial number).
TCP报文的数据域的每一个字节都对应有一个TCP序列号,一般的,将TCP报文的数据域的起始字节的TCP序列号携带在TCP首部中(32位序号),作为该TCP报文的TCP序列号。举例来说,一个TCP报文的TCP序列号是100,则表示该TCP报文的数据域的起始字节的TCP序列号是100,该起始字节之后的各个字节的TCP序列号依次是101、102、103……。Each byte of the data field of the TCP message corresponds to a TCP sequence number. Generally, the TCP sequence number of the start byte of the data field of the TCP message is carried in the TCP header (32-bit sequence number) as The TCP sequence number of the TCP packet. For example, if the TCP sequence number of a TCP message is 100, it means that the TCP sequence number of the start byte of the data field of the TCP message is 100, and the TCP sequence number of each byte after the start byte The order is 101, 102, 103....
TCP报文的长度值一般携带在IP首部中(即图2b中的16位总长度),根据TCP报文的TCP序列号和TCP报文的长度,可计算得到TCP报文的数据域的结束字节(简称TCP报文的结束字节)的TCP序列号。举例来说,一个TCP报文的TCP序列号是100,且该TCP报文的长度是50(表示TCP报文的数据域包括50个字节),则该TCP报文的结束字节的TCP序列号是100+50-1=149。The length value of the TCP message is generally carried in the IP header (that is, the 16-bit total length in Figure 2b). According to the TCP sequence number of the TCP message and the length of the TCP message, the end of the data field of the TCP message can be calculated The TCP sequence number of the byte (referred to as the end byte of the TCP packet). For example, if the TCP serial number of a TCP message is 100, and the length of the TCP message is 50 (indicating that the data field of the TCP message includes 50 bytes), then the TCP sequence number of the end byte of the TCP message The serial number is 100+50-1=149.
为方便识别,本文中,可以将TCP报文的TCP序列号,称为TCP报文的起始TCP序列号;可以将TCP报文的结束字节的TCP序列号称为结束TCP序列号。 For the convenience of identification, in this paper, the TCP sequence number of the TCP message can be called the starting TCP sequence number of the TCP message; the TCP sequence number of the end byte of the TCP message can be called the ending TCP sequence number.
请参考图2,本发明实施例提供一种通信系统中的通信方法。Referring to FIG. 2 , an embodiment of the present invention provides a communication method in a communication system.
其中,所述通信系统包括主控制器、备控制器、转发器以及网络设备,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接收所述网络设备的报文并转发给所述主控制器。Wherein, the communication system includes a main controller, a standby controller, a repeater, and a network device, and the repeater is located between the main controller and the network device, and is used to receive the message of the main controller and forward it to the network device, or receive the message from the network device and forward it to the main controller.
本发明实施例技术方案的核心思想是,由转发器代替备控制器,对主控制器发出的报文或者网络设备发出的报文进行实时侦听,并缓存侦听到的报文,直到确认所缓存的报文被处理完毕后,才删除缓存的报文。这样,尚未处理完毕的报文就会被缓存在转发器中。当主控制器故障,主控制器和备控制器进行了身份切换时,转发器就将缓存的所有尚未处理完毕的报文上传给新的主控制器,从而实现主备控制器切换时业务不中断,数据不丢失。The core idea of the technical solution of the embodiment of the present invention is that the forwarder replaces the standby controller to listen to the messages sent by the master controller or the network equipment in real time, and cache the intercepted messages until they are confirmed. After the cached packets are processed, the cached packets are deleted. In this way, the unprocessed packets will be buffered in the forwarder. When the master controller fails and the identity of the master controller and the standby controller are switched, the forwarder will upload all the buffered messages that have not been processed to the new master controller, so that the business will not be interrupted when the master controller is switched. , the data is not lost.
如图2所示,本发明实施例方法可以包括:As shown in Figure 2, the method of the embodiment of the present invention may include:
201、所述转发器在接收到来自所述主控制器或者所述网络设备的报文之后,缓存接收到的报文。201. After receiving a packet from the main controller or the network device, the forwarder buffers the received packet.
本发明实施例中,转发器收到来自所述主控制器或者所述网络设备的报文中,首先缓存收到的报文,对于已经缓存完毕报文,才进行转发。所说的缓存,可以是存储在转发器本地的存储装置中,也可以是存储在其它第三方的存储装置中。并且,转发之后,已经转发的报文,不予删除。In the embodiment of the present invention, among the messages received from the main controller or the network device, the forwarder first buffers the received messages, and only forwards the messages that have been buffered. The cache may be stored in a local storage device of the transponder, or may be stored in other third-party storage devices. Moreover, after forwarding, the forwarded message will not be deleted.
本文中,所说的报文可以是任何一种基于TCP连接的协议报文,简称TCP报文。所述的缓存接收到的报文可包括:根据所述接收到的报文的报文头中的源IP地址、目的IP地址、源端口以及目的端口,确认对应的TCP连接;基于所述确认的TCP连接,确定所述接收到的报文的TCP序列号,缓存所述接收到的报文以及所述报文的TCP序列号。所述报文是TCP报文,所述报文的TCP序列号是指TCP报文的数据域的起始字节的TCP序列号(可简称为报文的起始TCP序列号)。在基于TCP连接的通信中,一组源IP地址,目的IP地址,源端口,以及目的端口,唯一对应一个TCP连接。In this document, the message mentioned can be any protocol message based on the TCP connection, referred to as TCP message. The buffering of the received message may include: confirming the corresponding TCP connection according to the source IP address, destination IP address, source port and destination port in the message header of the received message; based on the confirmation determine the TCP sequence number of the received message, and cache the received message and the TCP sequence number of the message. The message is a TCP message, and the TCP sequence number of the message refers to the TCP sequence number of the initial byte of the data field of the TCP message (which may be referred to as the initial TCP sequence number of the message). In communication based on a TCP connection, a set of source IP address, destination IP address, source port, and destination port uniquely correspond to a TCP connection.
在有多个TCP连接时,为了唯一识别收到的报文,转发器需要确认收到的报文对应的TCP连接,并进一步确认所述报文的TCP序列号,用对应的TCP连 接和TCP序列号这两种参数来标记收到的报文。When there are multiple TCP connections, in order to uniquely identify the received message, the forwarder needs to confirm the TCP connection corresponding to the received message, and further confirm the TCP sequence number of the message, and use the corresponding TCP connection The two parameters of connection and TCP sequence number are used to mark the received message.
可选的,转发器可以在存储装置中设置多个存储单元,多个存储单元分别对应于多个TCP连接,将收到的报文按照所属的TCP连接分别缓存到不同的存储单元中,以方便后续处理。Optionally, the forwarder can set multiple storage units in the storage device, the multiple storage units correspond to multiple TCP connections respectively, and buffer the received messages in different storage units according to the TCP connections to which they belong, so as to It is convenient for follow-up processing.
所说的缓存所述报文以及所述报文的TCP序列号可以有两种方式,一种是只缓存报文,由于报文中包含报文的TCP序列号,缓存报文也就意味着同时缓存了报文的TCP序列号;另一种是缓存报文时,从报文中提取出报文的TCP序列号,另外对应缓存报文的TCP序列号。There are two ways to cache the message and the TCP sequence number of the message. One is to only cache the message. Since the message contains the TCP sequence number of the message, the cache message means At the same time, the TCP sequence number of the message is cached; the other is that when the message is cached, the TCP sequence number of the message is extracted from the message, and it corresponds to the TCP sequence number of the cached message.
202、所述转发器监控所述缓存的报文的处理状态,并删除所述缓存的报文中的已经处理完毕的报文。202. The forwarder monitors the processing status of the cached packets, and deletes the processed packets in the cached packets.
本实施例中,转发器监控缓存装置中缓存的所有报文的处理状态,判断所缓存的每个报文是否已经处理完毕。所说的处理是指被所述主控制器和/或所述网络设备处理,其中,对于网络设备发往主控制器的入方向报文,只需要监控主控制器是否处理完毕即可;对于主控制器发送网络设备的出方向报文,可以只监控网络设备是否处理完毕,也可以同时监控主控制器和网络设备是否都处理完毕。In this embodiment, the forwarder monitors the processing status of all messages cached in the cache device, and judges whether each cached message has been processed. Said processing refers to being processed by the main controller and/or the network device, wherein, for the inbound message sent by the network device to the main controller, it is only necessary to monitor whether the main controller has finished processing; for The main controller sends the outbound packets of the network equipment, and can only monitor whether the network equipment has been processed, or can monitor whether the main controller and the network equipment have both been processed.
可选的,主控制器或网络设备可以发送、用于指示已经处理完毕的报文的指示值给转发器,所述指示值中可以包括所述主控制器或者所述网络设备已经处理完毕的报文的编号,每个报文在所述主控制器和所述网络设备处的编号一致,从而告知转发器已经处理完毕哪些报文,转发器通过接收所述主控制器或者所述网络设备发送的、用于指示已经处理完毕的报文的指示值,来确认哪些报文已经处理完毕,根据所述指示值删除所述缓存的报文中的已经处理完毕的报文。对于缓存的报文中的已经处理完毕的报文,予以删除;尚未处理完毕的报文,则不予删除。所述指示值中的编号,可以是报文的TCP序列号,或者,也可以用其它编号例如生成一种全新的编号来标记报文。Optionally, the main controller or the network device may send an indication value for indicating the message that has been processed to the forwarder, and the indication value may include the message that the main controller or the network device has processed The number of the message, the number of each message at the main controller and the network device is the same, so as to inform the forwarder which messages have been processed, and the forwarder receives the data from the main controller or the network device The indication value sent to indicate the message that has been processed is used to confirm which messages have been processed, and the message that has been processed in the buffered messages is deleted according to the indication value. Among the cached messages, the processed messages are deleted; the unprocessed messages are not deleted. The number in the indication value may be the TCP sequence number of the message, or other numbers may be used, for example, to generate a new number to mark the message.
203、当所述备控制器切换为新的主控制器时,所述转发器将所述缓存的报文中尚未处理完毕的报文发送给所述新的主控制器。203. When the standby controller is switched to be a new master controller, the forwarder sends unprocessed packets among the cached messages to the new master controller.
本实施例中,当所述主控制器故障,所述备控制器切换为新的主控制器时, 转发器可以通过与主或备控制器的交互,得知主备控制器进行了身份切换。这时候,由于原来的主控制器故障,转发器中缓存的、尚未处理完毕的报文,将不会被原来的主控制器继续处理,于是,转发器可以将缓存的报文中尚未处理完毕的报文发送给所述新的主控制器,由新的主控制器来处理。从而,主备控制器切换时,可以保证业务不中断,数据不丢失。In this embodiment, when the master controller fails and the standby controller is switched to be a new master controller, The forwarder can learn that the identity switch of the active and standby controllers has been performed by interacting with the active or standby controllers. At this time, due to the failure of the original master controller, the unprocessed messages cached in the forwarder will not be processed by the original master controller, so the forwarder can save the buffered messages that have not been processed The message is sent to the new master controller for processing by the new master controller. Therefore, when the active and standby controllers are switched, it can ensure that services are not interrupted and data is not lost.
由上可见,本发明实施例提供了一种通信系统中的通信方法,取得了以下技术效果:通过转发器缓存报文,实现基于TCP连接的控制器热备通信,避免了主备控制器之间的数据备份,可以减少主备控制器的负担,减轻系统负载,有效提高系统效率和可靠性;同时,可利用不同转发器分别缓存各自TCP信息,可实现将系统负载分担到多台设备上,可避免主控制器成为性能瓶颈。It can be seen from the above that the embodiment of the present invention provides a communication method in a communication system, which achieves the following technical effects: the forwarder caches the message, realizes the controller hot standby communication based on the TCP connection, and avoids the communication between the active and standby controllers. Data backup between active and standby controllers can reduce the burden on the active and standby controllers, reduce system load, and effectively improve system efficiency and reliability; at the same time, different forwarders can be used to cache their respective TCP information, which can realize system load sharing to multiple devices , which can prevent the main controller from becoming a performance bottleneck.
下面,分别从出方向(从主控制器到网络设备方向)和入方向(从网络设备到主控制器方向),对本发明实施例方法进行进一步说明。In the following, the method of the embodiment of the present invention will be further described respectively from the outgoing direction (direction from the main controller to the network device) and the incoming direction (direction from the network device to the main controller).
实施例二Embodiment two
请参考图3a,本发明实施例提供一种通信系统中的通信方法,该方法用于如图1a所示的SDN,具体用于对网络设备向转发器发送的入方向报文的处理,该方法可包括:Please refer to FIG. 3a. An embodiment of the present invention provides a communication method in a communication system. The method is used in the SDN shown in FIG. Methods can include:
301、转发器接收并缓存网络设备向转发器发送的入方向报文;将所述入方向报文转发给所述主控制器。301. The forwarder receives and buffers an inbound packet sent by a network device to the forwarder; and forwards the inbound packet to the main controller.
本发明实施例中,转发器基于TCP连接,对网络设备向主控制器(或者说向转发器)发送的入方向报文进行侦听和缓存处理。由于转发器负责转发主控制器和网络设备之间交互的报文,网络设备向主控制器发送的入方向报文都会经过转发器,转发器可以缓存每个经过的入方向报文。In the embodiment of the present invention, based on the TCP connection, the forwarder monitors and caches the inbound message sent by the network device to the main controller (or to the forwarder). Since the forwarder is responsible for forwarding the messages exchanged between the main controller and the network device, the inbound messages sent by the network device to the main controller will pass through the forwarder, and the forwarder can cache each passing inbound message.
具体的,转发器可以实时接收网络设备例如路由器,通过TCP连接向主控制器发送的入方向报文;根据所述入方向报文的报文头中的源IP地址、目的IP地址、源端口、目的端口,确认对应的TCP连接;基于所述确认的TCP连接,确定所述报文的TCP序列号,缓存所述入方向报文及所述入方向报文的TCP序列号。Specifically, the transponder can receive in real time a network device, such as a router, from an inbound packet sent to the main controller through a TCP connection; according to the source IP address, destination IP address, and source port in the header of the inbound packet 1. The destination port, confirming the corresponding TCP connection; based on the confirmed TCP connection, determining the TCP sequence number of the message, and caching the incoming message and the TCP sequence number of the incoming message.
其中,入方向报文的源IP地址是网络设备的IP地址,目的IP地址是转发器 的IP地址。具体的,入方向报文的源IP地址例如是网络设备的BGP邻居地址,目的IP地址例如是主控制器与网络设备建立BGP邻居的本地IP地址,该本地IP地址是转发器上的IP地址。一组源IP地址,目的IP地址,源端口,和目的端口,可以确定一对BGP邻居(包括主控制器和一个网络设备),一对BGP邻居对应一个TCP连接。Among them, the source IP address of the inbound packet is the IP address of the network device, and the destination IP address is the forwarder IP address. Specifically, the source IP address of the incoming message is, for example, the BGP neighbor address of the network device, and the destination IP address is, for example, the local IP address of the BGP neighbor established between the main controller and the network device, and the local IP address is the IP address on the forwarder . A set of source IP address, destination IP address, source port, and destination port can determine a pair of BGP neighbors (including the main controller and a network device), and a pair of BGP neighbors corresponds to a TCP connection.
可选的,缓存入方向报文时,可以按照报文所属TCP连接的不同分别在不同的存储单元中存储入方向报文。每个TCP连接的入方向报文存储在一个独立的存储单元中,并对应存储该TCP连接的各个入方向报文的TCP序列号。优选的,缓存的入方向报文按照TCP序列号排序,以方便后续按顺序处理。Optionally, when caching the inbound packets, the inbound packets may be stored in different storage units according to different TCP connections to which the packets belong. The incoming packets of each TCP connection are stored in an independent storage unit, and correspondingly store the TCP sequence numbers of the incoming packets of the TCP connection. Preferably, the cached inbound packets are sorted according to the TCP sequence numbers, so as to facilitate subsequent sequential processing.
由上可见,本实施例中,转发器首先对接收到的入方向报文进行缓存,缓存完毕的入方向报文才上送到主控制器进行处理。It can be seen from the above that in this embodiment, the forwarder first caches the received inbound packets, and the cached inbound packets are sent to the main controller for processing.
302、所述转发器监控所述缓存的入方向报文的处理状态,并将所述缓存的入方向报文中已经处理完毕的至少一个入方向报文删除。302. The forwarder monitors the processing status of the cached inbound packets, and deletes at least one inbound packet in the cached inbound packets that has been processed.
入方向报文经转发器到达主控制器后,主控制器对入方向报文进行处理。当转发器确认入方向报文被处理完毕后,即删除所缓存的报文。一种实施方式中,当主控制器对入方向报文处理完毕后,会向转发器发送应答消息,所述应答消息中包括第一指示值,所述第一指示值指示所述主控制器已经处理完毕的最后一个入方向报文的结束字节的TCP序列号;转发器接收主控制器返回的应答消息,从所述缓存的报文中,将结束字节的TCP序列号不大于所述第一指示值的至少一个入方向报文(即已经处理完毕的报文)删除。其它实施方式中,转发器也可以通过其它方式确认入方向报文被处理完毕,例如,将入方向报文转发给主控制器一定时间后,认为入方向报文被处理完毕;本文中,对确认方式不加限制。After the incoming packets arrive at the main controller through the forwarder, the main controller processes the incoming packets. When the forwarder confirms that the inbound packet has been processed, it deletes the cached packet. In one embodiment, after the main controller finishes processing the incoming message, it will send a response message to the forwarder, and the response message includes a first indication value, and the first indication value indicates that the main controller has The TCP serial number of the end byte of the last incoming direction message that has been processed; At least one inbound packet (that is, a packet that has been processed) of the first indication value is deleted. In other implementation manners, the forwarder may also confirm that the inbound message has been processed in other ways, for example, after forwarding the inbound message to the main controller for a certain period of time, it considers that the inbound message has been processed; Confirmation methods are not limited.
具体实施中,主控制器中一般部署有协议栈SOCK模块和具体的协议处理模块,例如BGP处理模块或者LDP处理模块。本文以BGP处理模块为例。In a specific implementation, a protocol stack SOCK module and a specific protocol processing module, such as a BGP processing module or an LDP processing module, are generally deployed in the main controller. This document takes the BGP processing module as an example.
主控制器收到的入方向报文首先到达SOCK模块,SOCK模块将入方向报文的报文头(包括IP首部和TCP首部)去除,得到承载的报文例如BGP报文,然后,将BGP报文和BGP报文的TCP序列号传给BGP处理模块。TCP序列号可 以从TCP首部中获取。The inbound message received by the main controller first arrives at the SOCK module, and the SOCK module removes the message header (including the IP header and the TCP header) of the inbound message to obtain the carried message such as a BGP message, and then converts the BGP The message and the TCP sequence number of the BGP message are passed to the BGP processing module. The TCP sequence number can be to obtain from the TCP header.
BGP处理模块对入方向报文进行处理,处理完毕后,返回应答消息给转发器。所说的处理例如可以是持久化处理,即,将收到的入方向报文存储到数据库中;所说的处理例如也可以是至其它处理方式。应答消息中可包含第一指示值,所述第一指示值指示所述主控制器已处理完毕的最后一个入方向报文的结束字节的TCP序列号。其中,将报文的TCP序列号加上报文长度再减去1,即可得到报文的结束字节的TCP序列号。具体的,第一指示值可以是主控制器已处理完毕的最后一个入方向报文的结束字节的TCP序列号,或者,第一指示值也可以包括主控制器已处理完毕的最后一个入方向报文的TCP序列号及其报文长度。The BGP processing module processes the incoming packets, and returns a response message to the forwarder after processing. The processing may be, for example, persistent processing, that is, storing the received inbound message in a database; the processing may also be, for example, other processing methods. The response message may include a first indication value, where the first indication value indicates the TCP sequence number of the end byte of the last incoming message that has been processed by the master controller. The TCP sequence number of the end byte of the message can be obtained by adding the TCP sequence number of the message to the message length and then subtracting 1. Specifically, the first indication value may be the TCP sequence number of the end byte of the last inbound packet that has been processed by the main controller, or the first indication value may also include the last inbound packet that has been processed by the main controller. The TCP sequence number of the direction packet and its packet length.
转发器接收主控制器返回的应答消息,获取应答消息中包含的第一指示值;然后,根据所述第一指示值从缓存的所有入方向报文中找出已经处理完毕的至少一个入方向报文,予以删除。The forwarder receives the response message returned by the main controller, and obtains the first indication value contained in the response message; then, according to the first indication value, finds out at least one inbound direction message that has been processed from all cached inbound direction messages The message is deleted.
303、当所述备控制器切换为新的主控制器时,所述转发器将所述缓存的报文中尚未处理完毕的报文发送给所述新的主控制器。303. When the standby controller is switched to be a new master controller, the forwarder sends unprocessed packets among the cached messages to the new master controller.
主、备控制器可通过OpenFlow协议与转发器交互,转发器可以实时感知控制器的状态和角色,即,可以感知主、备控制器是否进行了身份切换,当前哪一个控制器是主控制器。The active and standby controllers can interact with the forwarder through the OpenFlow protocol, and the forwarder can perceive the status and role of the controller in real time, that is, it can perceive whether the identity of the active and standby controllers has been switched, and which controller is currently the active controller .
如图1e所示,当主控制器发生了故障,转发器检测到主控制器和一个备控制器进行了身份切换,一个备控制器切换为新的主控制器时,转发器与新的主控制器进行数据平滑。所述的数据平滑具体为:转发器将缓存的所有尚未处理完毕的入方向报文,上传给新的主控制器,由新的主控制器进行处理。由于尚未处理的报文被重传给新的主控制器,主控制器可以据此恢复业务,实现主备控制器切换时,入方向报文的业务不中断,数据不丢失。As shown in Figure 1e, when the master controller fails, the forwarder detects that the master controller and a standby controller have switched identities, and when a standby controller switches to the new master controller, the forwarder and the new master controller The device performs data smoothing. The data smoothing specifically includes: the forwarder uploads all cached inbound messages that have not been processed to the new main controller, and the new main controller processes them. Since unprocessed packets are retransmitted to the new primary controller, the primary controller can resume services based on this, and when the primary and secondary controllers are switched, the service of incoming packets will not be interrupted and data will not be lost.
需要说明的是,本发明实施例中可以在转发器中部署一个代理(AGENT)模块,以BGP报文为例,可以部署一个BGP AGENT模块。上述方法流程,可以由转发器中部署的该代理模块来具体实施。代理模块可仅与主控制器交互。It should be noted that, in the embodiment of the present invention, an agent (AGENT) module can be deployed in the forwarder, taking BGP packets as an example, a BGP AGENT module can be deployed. The process of the above method can be specifically implemented by the proxy module deployed in the repeater. The agent module can only interact with the main controller.
请参考图3b,是本发明实施例一个具体应用场景的示意图。如图3b所示, 对入方向报文的处理流程可包括:Please refer to FIG. 3b , which is a schematic diagram of a specific application scenario of an embodiment of the present invention. As shown in Figure 3b, The processing flow for incoming packets may include:
(1)转发器中的BGP AGENT模块接收及缓存报文TCP1和TCP2后,向主控制器中的SOCK模块上送TCP1和TCP2。其中,TCP1的TCP序列号是100,报文长度是50;TCP2的TCP序列号是150,报文长度是50。(1) After receiving and buffering packets TCP1 and TCP2, the BGP AGENT module in the forwarder sends TCP1 and TCP2 to the SOCK module in the master controller. Among them, the TCP sequence number of TCP1 is 100, and the packet length is 50; the TCP sequence number of TCP2 is 150, and the packet length is 50.
(2)主控制器中,SOCK模块向BGP处理模块上报已去除报文头的TCP1和TCP2,以及TCP1和TCP2各自的TCP序列号。其中,TCP1和TCP2去除报文头后例如可以是BGP报文。(2) In the main controller, the SOCK module reports to the BGP processing module the TCP1 and TCP2 whose message headers have been removed, and the respective TCP sequence numbers of TCP1 and TCP2. Wherein, TCP1 and TCP2 may be, for example, BGP packets after removing packet headers.
(3)主控制器中,BGP处理模块将TCP1和TCP2中携带的完整的BGP报文例如更新(update)报文上报给BGP处理模块,并将update报文的结束字节的TCP序列号一并上报给BRM(BGP Route Management,BGP路由管理)模块。其中,假设update报文的长度是75,由TCP1和TCP2承载,update报文的TCP序列号为100,结束字节的TCP序列号为175,即,update报文的前50个字节携带在TCP1中,后25个字节携带在TCP2中。(3) In the master controller, the BGP processing module reports the complete BGP message carried in TCP1 and TCP2 such as an update (update) message to the BGP processing module, and the TCP sequence number of the end byte of the update message is one And report to BRM (BGP Route Management, BGP routing management) module. Among them, assuming that the length of the update message is 75, carried by TCP1 and TCP2, the TCP sequence number of the update message is 100, and the TCP sequence number of the end byte is 175, that is, the first 50 bytes of the update message are carried in In TCP1, the last 25 bytes are carried in TCP2.
(4)BRM模块对update报文进行持久化处理,处理完毕后,通知BGP处理模块已经处理完毕,具体的,可通知TCP序列号175给BGP处理模块。(4) The BRM module performs persistent processing on the update message. After the processing is completed, it notifies the BGP processing module that the processing has been completed. Specifically, it can notify the TCP sequence number 175 to the BGP processing module.
(5)BGP处理模块返回携带TCP序列号175的应答消息给BGP AGENT模块。BGP-AGENT模块删除结束字节的TCP序列号不大于特定序列号175的完整的入方向报文,于是:只删除TCP1,保留TCP2。(5) The BGP processing module returns the response message carrying the TCP sequence number 175 to the BGP AGENT module. The BGP-AGENT module deletes the complete inbound packets whose TCP sequence number of the end byte is not greater than the specific sequence number 175, so: only TCP1 is deleted, and TCP2 is reserved.
可选的,本发明实施例中,转发器中部署的代理模块,可以感知TCP序列号和协议报文边界,支持对TCP重传、乱序、分片进行相应的处理。TCP报文存在重传的可能,在接收端需要通过TCP序列号区分哪些是重传报文;TCP报文走不同网络路径,报文达到顺序可以与发送端不一样;TCP报文超大,可能在网络路径上分成多片报文,在接收端需要对分片报文重组。本发明实施例中,对于入方向报文的几种特殊情况可按照如下方式处理:Optionally, in the embodiment of the present invention, the proxy module deployed in the forwarder can sense the TCP sequence number and protocol message boundary, and support corresponding processing on TCP retransmission, out-of-sequence, and fragmentation. TCP packets may be retransmitted, and the receiving end needs to use the TCP sequence number to distinguish which are retransmitted packets; TCP packets follow different network paths, and the order of packet arrival may be different from that of the sending end; TCP packets are too large, and may It is divided into multiple pieces of packets on the network path, and the fragmented packets need to be reassembled at the receiving end. In the embodiment of the present invention, several special cases for incoming packets can be handled in the following manner:
一、TCP报文乱序:TCP报文传输过程中可能会出现乱序,BGP AGENT模块可以对缓存的TCP报文可根据TCP序列号排序,方便后续缓存报文的删除;即,所述转发器可以对接收到的报文按照TCP序列号排序后进行缓存。1. Out-of-order TCP messages: out-of-order TCP messages may occur during transmission, and the BGP AGENT module can sort the cached TCP messages according to the TCP sequence number to facilitate subsequent deletion of cached messages; that is, the forwarding The device can sort the received packets according to the TCP sequence numbers and then cache them.
二、TCP分片:一个TCP报文传输中根据链路MTU(Maximum Transmission Unit,最大传输单元)大小不同,可能被分片,BGP AGENT模块可以根据IP首部中的分片标示位,识别被分为多个分片的TCP报文,删除一个TCP报文时统一删除。其中,所述分片标示位具体可以是图2b的IP首部中的13位片偏移,不同的分片用不用的分片标示位表示。如图1f所示,是TCP分片的示意图。2. TCP Fragmentation: In the transmission of a TCP message, according to the link MTU (Maximum Transmission Unit (Maximum Transmission Unit) has different sizes and may be fragmented. The BGP AGENT module can identify TCP packets that are divided into multiple fragments according to the fragmentation flag in the IP header, and delete a TCP packet uniformly. Wherein, the fragment flag bit may specifically be a 13-bit slice offset in the IP header in FIG. 2 b , and different fragments are represented by different fragment flag bits. As shown in Figure 1f, it is a schematic diagram of TCP fragmentation.
换句话说,所述转发器可根据所述入方向报文的报文头中的分片标示位,识别所述接收到的入方向报文是否是一个完整TCP报文的分片;若是,所述转发器从所述缓存的报文中,将结束字节的TCP序列号不大于所述第一指示值的至少一个入方向报文删除包括:在所述完整TCP报文的结束字节的TCP序列号不大于所述第一指示值时,将所述完整TCP报文的全部分片一起删除。In other words, the forwarder can identify whether the received inbound message is a fragment of a complete TCP message according to the fragmentation flag in the message header of the inbound message; if so, The forwarder deletes at least one inbound packet whose TCP sequence number of the end byte is not greater than the first indication value from the buffered packets, including: at the end byte of the complete TCP packet When the TCP sequence number is not greater than the first indication value, all fragments of the complete TCP message are deleted together.
三、TCP重传:主控制器或网络设备可能会重传TCP报文,并可能重组报文。如图1g所示,此时BGP-AGENT模块可保存重传前后的报文,当转发器接收到所述主控制器或者所述网络设备重传的报文时,可缓存所述重传的报文;当所述备控制器切换为新的主控制器时,如果所述重传的报文是尚未处理的报文,所述转发器将所述重传的报文以及所述重传的报文的原报文一起发送给所述新的主控制器。3. TCP retransmission: The main controller or network device may retransmit the TCP message and reassemble the message. As shown in Figure 1g, at this time, the BGP-AGENT module can save the messages before and after retransmission, and when the forwarder receives the message retransmitted by the main controller or the network device, it can cache the retransmitted message message; when the standby controller is switched to a new master controller, if the retransmitted message is an unprocessed message, the forwarder will send the retransmitted message and the retransmitted The original message of the message is sent to the new main controller together.
实施例三Embodiment three
请参考图4a,本发明实施例提供另一种通信系统中的通信方法,该方法用于如图1a所示的SDN,具体用于对主控制器向转发器发送的出方向报文的处理,该方法可包括:Please refer to FIG. 4a. The embodiment of the present invention provides another communication method in a communication system. This method is used in the SDN shown in FIG. , the method can include:
401、转发器接收并缓存主控制器向转发器发送的出方向报文;将所述出方向报文转发给网络设备。401. The forwarder receives and buffers an outbound packet sent by the main controller to the forwarder; and forwards the outbound packet to a network device.
本发明实施例中,转发器基于TCP连接,对主控制器向网络设备(或者说向转发器)发送的出方向报文进行侦听和缓存处理。由于转发器负责转发主控制器和网络设备之间交互的报文,主控制器向网络设备发送的出方向报文都会经过转发器,转发器可以缓存每个经过的出方向报文。In the embodiment of the present invention, based on the TCP connection, the forwarder intercepts and caches the outgoing message sent by the main controller to the network device (or to the forwarder). Since the forwarder is responsible for forwarding the messages exchanged between the master controller and the network device, the outbound messages sent by the master controller to the network device will pass through the forwarder, and the forwarder can cache each passing outbound message.
具体的,转发器实时接收主控制器通过TCP连接向网络设备例如路由器,发送的出方向报文;根据所述出方向报文的报文头中的源IP地址,目的IP地址,源端口,目的端口,确认对应的TCP连接;基于所述确认的TCP连接,确定所 述报文的TCP序列号,缓存所述出方向报文及所述出方向报文的TCP序列号;另外,可返回包含已经缓存的最后一个出方向报文的结束字节的TCP序列号的响应消息给所述主控制器。Specifically, the transponder receives in real time the outbound message sent by the main controller to the network device such as a router through the TCP connection; according to the source IP address in the message header of the outbound message, the destination IP address, and the source port, The purpose port is to confirm the corresponding TCP connection; based on the confirmed TCP connection, determine the The TCP sequence number of the message, cache the outgoing direction message and the TCP sequence number of the outgoing direction message; in addition, it can return the TCP sequence number containing the end byte of the last outgoing message that has been cached Response message to the master controller.
其中,出方向报文的目的IP地址是网络设备的IP地址,源IP地址是转发器的IP地址。具体的,出方向报文的目的IP地址例如是网络设备的BGP邻居地址,源IP地址例如是主控制器与网络设备建立BGP邻居的本地IP地址,该本地IP地址是转发器上的IP地址。一组源IP地址,目的IP地址,源端口,和目的端口,可以确定一对BGP邻居(包括主控制器和一个网络设备),一对BGP邻居对应一个TCP连接。Wherein, the destination IP address of the outgoing message is the IP address of the network device, and the source IP address is the IP address of the forwarder. Specifically, the destination IP address of the outgoing message is, for example, the BGP neighbor address of the network device, and the source IP address is, for example, the local IP address of the BGP neighbor established between the main controller and the network device, and the local IP address is the IP address on the forwarder . A set of source IP address, destination IP address, source port, and destination port can determine a pair of BGP neighbors (including the main controller and a network device), and a pair of BGP neighbors corresponds to a TCP connection.
其中,出方向报文由主控制器中的BGP处理模块指定TCP序列号,将TCP序列号和出方向报文发给SOCK模块;TCP是基于流的,如BGP处理模块指定的TCP序列号是100,发送一个长度100的BGP报文,BGP报文的TCP序列号100,BGP报文的结束字节的TCP序列号是100+100-1=199。SOCK模块将BGP报文封装包括TCP/IP首部的报文头后向转发器发送。Among them, the BGP processing module in the main controller specifies the TCP sequence number for the outgoing message, and sends the TCP sequence number and the outgoing message to the SOCK module; TCP is based on flow, such as the TCP sequence number specified by the BGP processing module is 100, send a BGP message with a length of 100, the TCP sequence number of the BGP message is 100, and the TCP sequence number of the end byte of the BGP message is 100+100-1=199. The SOCK module encapsulates the BGP message including the TCP/IP header and sends it to the forwarder.
本实施例中,转发器首先对接收到的出方向报文进行缓存,缓存完毕的出方向报文才转发给网络设备。同时记录已经缓存的出方向报文的结束字节的TCP序列号,发送的携带该序列号的响应消息通知BGP处理模块已收到该出方向报文。In this embodiment, the forwarder first caches the received outbound packets, and then forwards the cached outbound packets to the network device. At the same time, record the TCP sequence number of the end byte of the cached outgoing message, and send a response message carrying the sequence number to notify the BGP processing module that the outgoing message has been received.
具体的,主控制器和转发器之间的出方向报文的处理流程可包括:Specifically, the processing flow of outgoing packets between the main controller and the forwarder may include:
1、主控制器将出方向报文以透传的方式发送给转发器;1. The main controller sends the outgoing message to the transponder in a transparent way;
2、转发器向主控制器发送收到出方向报文的响应消息;响应消息中携带出方向报文的结束字节的TCP序列号;2. The transponder sends a response message to the main controller for receiving the outgoing message; the response message carries the TCP sequence number of the end byte of the outgoing message;
3、主控制器对出方向报文进行处理;3. The main controller processes the outbound packets;
所说的处理可以包括:根据收到的响应消息获取对应的出方向报文的路由信息,将报文的路由信息持久化,例如存入数据库。换句话说,主控制器根据收到的响应消息得知已经被转发器接收的路由信息,将确认已经被转发器接收并缓存(意味着如果发生倒换,此报文)的路由信息打上“已处理”标记,记录在数据库中(备控制器根据此数据库中的数据恢复业务),认为打上“已处 理”标记的路由信息在倒换发生后新的主控制器不需要向邻居重新发送。The processing may include: obtaining the routing information of the corresponding outbound packet according to the received response message, and persisting the routing information of the packet, such as storing it in a database. In other words, the main controller knows the routing information that has been received by the forwarder according to the received response message, and marks the routing information that has been received and cached by the forwarder (meaning that if a switching occurs, this message) will be marked with "already processing" mark, record in the database (the standby controller restores the service based on the data in this database), and consider it marked as "processed" The routing information marked with "Management" does not need to be resent to the neighbors after the switchover occurs.
4、主控制器向转发器发送处理完毕的通知消息;通知消息中携带已经处理完毕的出方向报文的结束字节的TCP序列号。4. The main controller sends a processing completed notification message to the transponder; the notification message carries the TCP sequence number of the end byte of the processed outgoing message.
402、所述转发器监控所述缓存的出方向报文的处理状态,并将所述缓存的出方向报文中已经处理完毕的至少一个出方向报文删除。402. The forwarder monitors the processing status of the cached outbound packets, and deletes at least one outbound packet that has been processed in the cached outbound packets.
一些实施例中,网络设备和转发器之间的出方向报文的处理流程可包括:In some embodiments, the processing flow of the outbound packet between the network device and the forwarder may include:
1、转发器将出方向报文发送给网络设备;1. The transponder sends the outbound packet to the network device;
2、网络设备收到出方向报文后,向转发器发送反馈消息。可选的,该反馈消息具体可以是TCP ACK(Acknowledgement,确认字符)。2. After receiving the outbound packet, the network device sends a feedback message to the transponder. Optionally, the feedback message may specifically be a TCP ACK (Acknowledgment, confirmation character).
以上,转发器接收网络设备返回的反馈消息,所述反馈消息中包括第二指示值,所述第二指示值指示所述网络设备期待接收的下一个出方向报文的TCP序列号;转发器可从所述缓存的报文中,将结束字节的TCP序列号小于所述第二指示值的至少一个出方向报文(即,已经处理完毕的出方向报文)删除。具体的,第二指示值可以是所述网络设备期待接收的下一个出方向报文的TCP序列号,或者,第二指示值也可以包括网络设备已接收的最后一个出方向报文的TCP序列号及其报文长度。Above, the transponder receives the feedback message returned by the network device, the feedback message includes a second indication value, and the second indication value indicates the TCP sequence number of the next outbound message that the network device expects to receive; the transponder At least one outbound packet whose end byte TCP sequence number is smaller than the second indication value (that is, the outbound packet that has been processed) may be deleted from the buffered packets. Specifically, the second indication value may be the TCP sequence number of the next outgoing message that the network device expects to receive, or the second indication value may also include the TCP sequence number of the last outgoing message received by the network device number and its message length.
可选的,转发器还可以接收主控制器发送的通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已处理完毕的最后一个出方向报文的结束字节的TCP序列号;转发器可从所述缓存的报文中,将结束字节的TCP序列号小于所述第二指示值且不大于所述第三指示值的至少一个出方向报文(即,已经处理完毕的出方向报文)删除。具体的,所述第三指示值可以是所述主控制器已处理完毕的最后一个出方向报文的结束字节的TCP序列号,或者,第三指示值也可以包括所述主控制器已处理完毕的最后一个出方向报文的TCP序列号及其报文长度。Optionally, the forwarder may also receive a notification message sent by the master controller, where the notification message includes a third indication value, and the third indication value indicates the last outgoing message that has been processed by the master controller The TCP sequence number of the end byte; the transponder may, from the buffered message, at least one outbound direction whose TCP sequence number of the end byte is less than the second indication value and not greater than the third indication value The message (that is, the outbound message that has been processed) is deleted. Specifically, the third indication value may be the TCP sequence number of the end byte of the last outgoing message that has been processed by the main controller, or the third indication value may also include the TCP sequence number and packet length of the last outbound packet processed.
其它实施方式中,转发器也可以通过其它方式确认出方向报文被处理完毕,例如,转发器将出方向报文转发给网络设备一定时间后,认为出方向报文被处理完毕;本文中,对确认方式不加限制。In other implementation manners, the forwarder may also confirm that the outgoing message has been processed in other ways. For example, after the forwarder forwards the outgoing message to the network device for a certain period of time, it considers that the outgoing message has been processed; in this paper, There is no restriction on the confirmation method.
需要注意到是,所述反馈消息是网络设备收到出方向报文后发送的,所述 通知消息是主控制器将出方向报文对应的路由信息进行持久化处理(例如存入数据库)后发送的。It should be noted that the feedback message is sent by the network device after receiving the outgoing message, and the The notification message is sent by the master controller after performing persistent processing (for example, storing in a database) the routing information corresponding to the outgoing message.
403、当所述备控制器切换为新的主控制器时,所述转发器将所述缓存的报文中尚未处理完毕的报文发送给所述新的主控制器。403. When the standby controller is switched to be a new master controller, the forwarder sends unprocessed packets among the cached messages to the new master controller.
主、备控制器通过OpenFlow协议与转发器交互,转发器可以实时感知控制器的状态和角色,即,可以感知主、备控制器是否进行了身份切换,当前哪一个控制器是主控制器。The active and standby controllers interact with the forwarder through the OpenFlow protocol. The forwarder can perceive the status and role of the controller in real time, that is, it can perceive whether the identity of the active and standby controllers has been switched, and which controller is currently the active controller.
如图1e所示,当主控制器发生了故障,转发器检测到主控制器和备控制器进行了身份切换,一个备控制器切换为新的主控制器时,转发器与新的主控制器进行数据平滑。所述的数据平滑具体为:转发器将缓存的所有尚未处理完毕的出方向报文,上传给新的主控制器,由新的主控制器进行处理。由于尚未处理的报文被重传给新的主控制器,主控制器可以据此恢复业务,实现主备控制器切换时,出方向报文的业务不中断,数据不丢失。As shown in Figure 1e, when the primary controller fails, the forwarder detects that the identity of the primary controller and the standby controller has been switched, and when a standby controller is switched to be the new primary controller, the forwarder and the new primary controller Perform data smoothing. The data smoothing specifically includes: the forwarder uploads all cached outbound messages that have not been processed to the new master controller, and the new master controller processes them. Since unprocessed packets are retransmitted to the new primary controller, the primary controller can restore services based on this, so that when the primary and secondary controllers are switched, the service of outgoing packets will not be interrupted and data will not be lost.
需要说明的是,本发明实施例中可以在转发器中部署一个代理(AGENT)模块,以BGP报文为例,可以部署一个BGP AGENT模块。上述方法流程,可以由转发器中部署的该代理模块来具体实施。代理模块可仅与主控制器交互。可选的,本实施例中用于出方向的代理模块,与图3a实施例中用于入方向的代理模块,可以是同一个代理模块,也可以是不同的代理模块。It should be noted that, in the embodiment of the present invention, an agent (AGENT) module can be deployed in the forwarder, taking BGP packets as an example, a BGP AGENT module can be deployed. The process of the above method can be specifically implemented by the proxy module deployed in the repeater. The agent module can only interact with the main controller. Optionally, the proxy module used for the outbound direction in this embodiment and the proxy module used for the inbound direction in the embodiment of FIG. 3a may be the same proxy module, or may be different proxy modules.
请参考图4b,是本发明实施例一个具体应用场景的示意图。如图4b所示,对出方向报文的处理流程可包括:Please refer to FIG. 4b, which is a schematic diagram of a specific application scenario according to an embodiment of the present invention. As shown in Figure 4b, the processing flow for outgoing packets may include:
(1)主控制器中的协议处理模块例如BGP处理模块,向SOCK模块发送报文长度为200,TCP序列号为200的BGP报文。容易得知,该BGP报文的数据域的起始字节的TCP序列号是200,结束字节的TCP序列号是399。(1) The protocol processing module in the main controller, such as the BGP processing module, sends a BGP message with a message length of 200 and a TCP sequence number of 200 to the SOCK module. It is easy to know that the TCP sequence number of the start byte of the data field of the BGP message is 200, and the TCP sequence number of the end byte is 399.
(2)SOCK模块为BGP报文封装报文头即TCP首部和IP首部,封装报文头后的报文以TCP1表示,之后,向转发器的BGP AGENT模块发送TCP1。(2) The SOCK module encapsulates the header of the BGP message, that is, the TCP header and the IP header, and the message after the header is represented by TCP1, and then sends TCP1 to the BGP AGENT module of the forwarder.
(3)BGP AGENT模块对TCP1进行缓存,然后向网络设备发送TCP1。(3) The BGP AGENT module caches TCP1, and then sends TCP1 to the network device.
(3’)BGP AGENT模块收到TCP1后,还返回包含TCP1的结束字节的TCP序列号(即399)的响应消息给主控制器; (3') After the BGP AGENT module receives TCP1, it also returns the response message of the TCP serial number (that is, 399) that includes the end byte of TCP1 to the master controller;
(4)主控制器中的BGP处理模块将TCP1对应的路由信息存入数据库,实现数据持久化后,向转发器发送处理完毕的通知消息;通知消息中携带第三指示值,即,已经处理完毕的TCP1的结束字节的TCP序列号例如399。(4) The BGP processing module in the main controller stores the routing information corresponding to TCP1 into the database, and after realizing data persistence, sends a notification message that the processing is completed to the transponder; the notification message carries the third indication value, that is, processed The TCP sequence number of the end byte of the completed TCP1 is 399, for example.
(5)BGP AGENT模块发送TCP1给网络设备后,会收到网络设备返回的反馈消息,反馈消息中包含第二指示值,即,所述网络设期待处理的下一个出方向报文的TCP序列号,例如可以是401。(5) After the BGP AGENT module sends TCP1 to the network device, it will receive the feedback message returned by the network device, which contains the second indication value, that is, the TCP sequence of the next outgoing message to be processed by the network device number, such as 401.
(6)BGP AGENT模块收到通知消息和应答消息后,删除结束字节的TCP序列号不大于399的出方向报文。(6) After the BGP AGENT module receives the notification message and the response message, it deletes the outgoing direction message whose TCP sequence number of the end byte is not greater than 399.
值得说明的是,BGP AGENT模块需要感知BGP报文边界,收齐完整BGP报文才能向外发送,否则,如果BGP AGENT模块只收到半个BGP报文,且后半个BGP报文因主备控制器身份切换未收到,那么,未收到的半个BGP报文无法恢复,会导致邻居会话中断。例如图4c所示的应用场景,流程包括:It is worth noting that the BGP AGENT module needs to sense the boundaries of BGP packets and send them out after receiving complete BGP packets. Otherwise, if the BGP AGENT module only receives half of the BGP packets and the second half of the BGP packets is If the identity switchover of the standby controller is not received, half of the unreceived BGP packets cannot be recovered, and the neighbor session will be interrupted. For example, in the application scenario shown in Figure 4c, the process includes:
(1)BGP处理模块向SOCK模块发送长度分别为600和300的BGP报文,前后两个BGP报文的起始TCP序列号分别为200和800;(1) The BGP processing module sends BGP messages with lengths of 600 and 300 to the SOCK module, and the initial TCP sequence numbers of the two BGP messages before and after are respectively 200 and 800;
(2)SOCK模块将两个BGP报文封装为三个TCP报文,即,TCP1,TCP2,TCP3,其中,TCP1的长度和TCP序列号分别为400和200,TCP2的长度和TCP序列号分别为400和600,TCP3的长度和TCP序列号分别为100和1000。(2) The SOCK module encapsulates two BGP messages into three TCP messages, namely, TCP1, TCP2, and TCP3, wherein the length of TCP1 and the TCP serial number are 400 and 200 respectively, and the length of TCP2 and the TCP serial number are respectively are 400 and 600, and the TCP3 length and TCP sequence number are 100 and 1000, respectively.
(3)SOCK模块向BGP AGENT模块发送TCP1,BGP AGENT模块检查TCP1,发现BGP报文不完整,则本地缓存但不向网络设备例如LDM(Local Distribute Management,本地分配管理)设备发送。(3) The SOCK module sends TCP1 to the BGP AGENT module, and the BGP AGENT module checks TCP1 and finds that the BGP message is incomplete, then caches it locally but does not send it to a network device such as an LDM (Local Distribute Management, local distribution management) device.
(4)SOCK模块继续向BGP AGENT模块发送TCP2。(4) The SOCK module continues to send TCP2 to the BGP AGENT module.
(5)BGP AGENT模块收到并检查TCP1和TCP2,发现长度为600的BGP报文完整,则开始向网络设备发送TCP1;以及,缓存TCP2之后,向网络设备发送TCP2。(5) The BGP AGENT module receives and checks TCP1 and TCP2, and finds that the BGP message with a length of 600 is complete, then begins to send TCP1 to the network device; and, after buffering TCP2, sends TCP2 to the network device.
本发明一些实施例中,转发器中部署的代理模块,可以感知TCP序列号和协议报文边界,支持对TCP重传、乱序、分片进行相应的处理。TCP报文存在重传的可能,在接收端需要通过序列号区分哪些是重传报文;TCP报文走不同网络路径,报文达到顺序可以与发送端不一样;TCP报文超大,可能在网络路 径上分成多片报文,在接收端需要对分片报文重组。对于出方向报文的重传、乱序、分片等特殊情况的处理,可参考前文对入方向报文的处理。其中,对于分片的处理,与对入方向报文的处理略有不同,不同之处在于,所述转发器可根据所述出方向报文的报文头中的分片标示位,识别所述接收到的出方向报文是否是一个完整TCP报文的分片;若是,所述转发器在收到所述完整TCP报文的全部分片之后,开始向所述网络设备转发所述完整TCP报文的分片;若尚未收到完整TCP报文的全部分片,则只缓存不转发。对于重传、乱序的处理,出方向与入方向报文的处理可以相同。In some embodiments of the present invention, the proxy module deployed in the forwarder can sense the TCP sequence number and protocol message boundaries, and support corresponding processing of TCP retransmission, out-of-sequence, and fragmentation. TCP packets may be retransmitted, and the receiving end needs to use the serial number to distinguish which are retransmitted packets; TCP packets follow different network paths, and the arrival order of the packets may be different from that of the sending end; network road The packet is divided into multiple fragments along the path, and the fragmented packets need to be reassembled at the receiving end. For the handling of special cases such as retransmission, out-of-sequence, and fragmentation of outbound packets, refer to the previous section for processing inbound packets. Wherein, the processing of fragmentation is slightly different from the processing of incoming packets, the difference is that the transponder can identify the whether the received outgoing message is a fragment of a complete TCP message; if so, the forwarder starts to forward the complete TCP message to the network device after receiving all the fragments of the complete TCP message; Fragmentation of the TCP message; if all the fragments of the complete TCP message have not been received, it will only be cached and not forwarded. For retransmission and out-of-sequence processing, the processing of outbound and inbound packets can be the same.
实施例四Embodiment four
请参考图5,本发明实施例还提供一种通信系统中的通信方法,所述通信系统包括主控制器,备控制器,转发器以及网络设备,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接收所述网络设备的报文并转发给所述主控制器,所述方法包括:Please refer to FIG. 5 , an embodiment of the present invention also provides a communication method in a communication system, the communication system includes a master controller, a backup controller, a repeater and a network device, and the repeater is located between the master controller and Between the network devices, it is used to receive the message of the main controller and forward it to the network device, or receive the message of the network device and forward it to the main controller, and the method includes:
501、所述主控制器接收所述转发器转发来自所述网络设备的报文,对接收到的报文进行处理;501. The main controller receives the packet forwarded by the forwarder from the network device, and processes the received packet;
502、所述主控制器向所述转发器发送所述主控制器、用于指示已经处理完毕的报文的指示值。502. The main controller sends, to the repeater, an indication value of the main controller used to indicate that a packet has been processed.
一些具体实施中,所述报文为传输控制协议TCP报文,所述主控制器可以向所述转发器发送应答消息,所述应答消息中包括第一指示值,所述第一指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述应答消息被所述转发器用于将自身缓存的TCP报文中的、结束字节的TCP序列号不大于所述第一指示值的至少一个TCP报文删除。In some specific implementations, the message is a transmission control protocol TCP message, and the main controller may send a response message to the forwarder, and the response message includes a first indication value, and the first indication value indicates The TCP sequence number of the end byte of the last TCP message that the main controller has processed, and the response message is used by the forwarder to save the TCP sequence number of the end byte in the TCP message cached by itself At least one TCP packet not greater than the first indication value is deleted.
可选的,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。Optionally, the data part of the TCP message includes a sub-message, and the sub-message is a Border Gateway Protocol (BGP) message or a Label Distribution Protocol (LDP) message.
本发明一些实施例中,所述主控制器对接收到的TCP报文进行处理包括:In some embodiments of the present invention, the processing of the received TCP message by the main controller includes:
将所述TCP报文的报文头去除,获取所述TCP报文的数据部分;removing the header of the TCP message to obtain the data part of the TCP message;
从所述TCP报文的数据部分中恢复出完整的子报文;Recovering a complete sub-message from the data part of the TCP message;
对所述子报文进行持久化处理。 Perform persistent processing on the sub-message.
由上可见,本发明实施例提供了一种通信系统中的通信方法,取得了以下技术效果:通过转发器缓存报文,实现基于TCP连接的控制器热备通信,避免了主备控制器之间的数据备份,可以减少主备控制器的负担,减轻系统负载,有效提高系统效率和可靠性;同时,可利用不同转发器分别缓存各自TCP信息,可实现将系统负载分担到多台设备上,可避免主控制器成为性能瓶颈。It can be seen from the above that the embodiment of the present invention provides a communication method in a communication system, which achieves the following technical effects: the forwarder caches the message, realizes the controller hot standby communication based on the TCP connection, and avoids the communication between the active and standby controllers. Data backup between active and standby controllers can reduce the burden on the active and standby controllers, reduce system load, and effectively improve system efficiency and reliability; at the same time, different forwarders can be used to cache their respective TCP information, which can realize system load sharing to multiple devices , which can prevent the main controller from becoming a performance bottleneck.
实施例五Embodiment five
请参考图6,本发明实施例还提供一种通信系统中的通信方法,所述通信系统包括主控制器,备控制器,转发器以及网络设备,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接收所述网络设备的报文并转发给所述主控制器,所述方法包括:Please refer to FIG. 6, an embodiment of the present invention also provides a communication method in a communication system, the communication system includes a main controller, a backup controller, a repeater and a network device, and the repeater is located between the main controller and Between the network devices, it is used to receive the message of the main controller and forward it to the network device, or receive the message of the network device and forward it to the main controller, and the method includes:
601、所述主控制器生成传输控制协议TCP报文之后,向所述转发器发送报文,发送的报文被所述转发器用于缓存后向所述网络设备发送。601. After the main controller generates a Transmission Control Protocol TCP message, it sends the message to the forwarder, and the sent message is cached by the forwarder and then sent to the network device.
602、所述主控制对所述发送的报文进行处理。602. The master controller processes the sent message.
可选的,所述主控制可以接收所述转发器发送的响应消息,所述响应消息中包括所述转发器已缓存的最后一个TCP报文的结束字节的TCP序列号;根据所述响应消息对所述TCP报文进行处理。Optionally, the master control may receive a response message sent by the forwarder, and the response message includes the TCP sequence number of the end byte of the last TCP message that the forwarder has cached; according to the response The message processes the TCP packet.
603、所述主控制器向所述转发器发送所述主控制器、用于指示已经处理完毕的报文的指示值。603. The main controller sends, to the forwarder, an indication value of the main controller used to indicate that the packets have been processed.
一些具体实施中,所述主控制器可以向所述转发器发送通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述通知消息被所述转发器用于将已缓存的报文中的、结束字节的TCP序列号不大于所述第三指示值且小于第二指示值的一个或多个TCP报文删除,所述第二指示值指示所述网络设备期待接收的下一个TCP报文的TCP序列号。In some specific implementations, the main controller may send a notification message to the repeater, and the notification message includes a third indication value, and the third indication value indicates the last TCP that the main controller has processed. The TCP sequence number of the end byte of the message, the notification message is used by the forwarder to set the TCP sequence number of the end byte in the buffered message not greater than the third indication value and less than the second indication value One or more TCP packets with values are deleted, and the second indication value indicates the TCP sequence number of the next TCP packet that the network device expects to receive.
可选的,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。Optionally, the data part of the TCP message includes a sub-message, and the sub-message is a Border Gateway Protocol (BGP) message or a Label Distribution Protocol (LDP) message.
本发明一些实施例中,所述主控制器对所述TCP报文进行处理包括:In some embodiments of the present invention, the processing of the TCP message by the main controller includes:
获取所述TCP报文的路由信息,对所述路由信息进行持久化处理。 Obtain the routing information of the TCP message, and perform persistent processing on the routing information.
由上可见,本发明实施例提供了一种通信系统中的通信方法,取得了以下技术效果:通过转发器缓存报文,实现基于TCP连接的控制器热备通信,避免了主备控制器之间的数据备份,可以减少主备控制器的负担,减轻系统负载,有效提高系统效率和可靠性;同时,可利用不同转发器分别缓存各自TCP信息,可实现将系统负载分担到多台设备上,可避免主控制器成为性能瓶颈。It can be seen from the above that the embodiment of the present invention provides a communication method in a communication system, which achieves the following technical effects: the forwarder caches the message, realizes the controller hot standby communication based on the TCP connection, and avoids the communication between the active and standby controllers. Data backup between active and standby controllers can reduce the burden on the active and standby controllers, reduce system load, and effectively improve system efficiency and reliability; at the same time, different forwarders can be used to cache their respective TCP information, which can realize system load sharing to multiple devices , which can prevent the main controller from becoming a performance bottleneck.
为了更好的实施本发明实施例的上述方案,下面还提供用于配合实施上述方案的相关装置。In order to better implement the above solutions of the embodiments of the present invention, related devices for coordinating the implementation of the above solutions are also provided below.
实施例六Embodiment six
请参考图7a,本发明实施例提供一种通信系统中的转发器700,所述通信系统包括主控制器、备控制器、所述转发器以及网络设备,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接收所述网络设备的报文并转发给所述主控制器,所述转发器可包括:Please refer to Fig. 7a, an embodiment of the present invention provides a repeater 700 in a communication system, the communication system includes a main controller, a backup controller, the repeater and network equipment, the repeater is located in the main control Between the router and the network device, it is used to receive the message of the main controller and forward it to the network device, or receive the message of the network device and forward it to the main controller, and the forwarder May include:
缓存模块701,用于在所述转发器接收到来自所述主控制器或者所述网络设备的报文之后,缓存接收到的报文;A cache module 701, configured to cache the received message after the forwarder receives the message from the main controller or the network device;
处理模块702,用于监控所述缓存的报文的处理状态,并删除所述缓存的报文中的已经处理完毕的报文;A processing module 702, configured to monitor the processing status of the cached messages, and delete the processed messages in the cached messages;
发送模块703,用于当所述备控制器切换为新的主控制器时,将所述缓存的报文中尚未处理完毕的报文发送给所述新的主控制器。The sending module 703 is configured to send unprocessed messages among the cached messages to the new master controller when the standby controller is switched to the new master controller.
请参考图7b,在本发明的一些实施例中,所述转发器700还包括:Please refer to FIG. 7b. In some embodiments of the present invention, the transponder 700 further includes:
接收模块704,用于接收所述主控制器或者所述网络设备发送的、用于指示已经处理完毕的报文的指示值;所处处理模块702可具体用于根据所述指示值删除所述缓存的报文中的已经处理完毕的报文。The receiving module 704 is configured to receive an indication value sent by the main controller or the network device to indicate that the message has been processed; the processing module 702 can be specifically configured to delete the message according to the indication value Packets that have been processed in the buffered packets.
在本发明的一些实施例中,缓存模块701具体可以包括:In some embodiments of the present invention, the caching module 701 may specifically include:
确认单元,用于根据所述接收到的报文的报文头中的源IP地址、目的IP地址、源端口以及目的端口,确认对应的TCP连接;A confirmation unit, configured to confirm the corresponding TCP connection according to the source IP address, destination IP address, source port and destination port in the message header of the received message;
确定单元,用于基于所述确认的TCP连接,确定所述报文的TCP序列号; A determining unit, configured to determine the TCP sequence number of the message based on the confirmed TCP connection;
缓存单元,用于缓存所述接收到的报文以及所述接收到的报文的TCP序列号。A cache unit, configured to cache the received message and the TCP sequence number of the received message.
在本发明的一些实施例中,所述缓存的报文包括所述网络设备向所述转发器发送的入方向报文,请参考图7b,转发器700还可以包括:接收模块704;In some embodiments of the present invention, the cached message includes an inbound message sent by the network device to the forwarder, please refer to FIG. 7b, the forwarder 700 may further include: a receiving module 704;
接收模块704,用于接收所述主控器返回的应答消息,所述应答消息中包括第一指示值,所述第一指示值指示所述主控制器已经处理完毕的最后一个入方向报文的结束字节的TCP序列号;The receiving module 704 is configured to receive a response message returned by the main controller, the response message includes a first indication value, and the first indication value indicates the last incoming packet that has been processed by the main controller The TCP sequence number of the end byte;
所述处理模块702,具体用于从所述缓存的报文中,将结束字节的TCP序列号不大于所述第一指示值的至少一个入方向报文删除。The processing module 702 is specifically configured to delete at least one inbound packet whose end byte TCP sequence number is not greater than the first indication value from the buffered packets.
在本发明的一些实施例中,所述缓存的报文包括所述主控制器向所述转发器发送的出方向报文,请参考图7b,转发器700还可以包括:接收模块704;所述接收模块704,用于接收所述网络设备返回的反馈消息,所述反馈消息中包括第二指示值,所述第二指示值指示所述网络设备期待接收的下一个出方向报文的TCP序列号;所述处理模块702,具体用于从所述缓存的报文中,将结束字节的TCP序列号小于第二指示值的至少一个出方向报文删除。In some embodiments of the present invention, the cached message includes an outbound message sent by the main controller to the forwarder, please refer to FIG. 7b, the forwarder 700 may also include: a receiving module 704; The receiving module 704 is configured to receive a feedback message returned by the network device, the feedback message includes a second indication value, and the second indication value indicates the TCP address of the next outgoing message that the network equipment expects to receive. Sequence number: the processing module 702 is specifically configured to delete at least one outbound packet whose TCP sequence number of the end byte is smaller than the second indicated value from the buffered packets.
在本发明的一些实施例中,所述发送模块703,还用于发送响应消息给所述主控制器,所述响应消息中包括所述缓存的报文中的最后一个出方向报文的结束字节的TCP序列号;所述接收模块704,还用于接收所述主控制器发送的通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已处理完毕的最后一个出方向报文的结束字节的TCP序列号;所述处理模块702具体用于从所述缓存的报文中,将结束字节的TCP序列号小于所述第二指示值且不大于所述第三指示值的至少一个出方向报文删除。In some embodiments of the present invention, the sending module 703 is further configured to send a response message to the main controller, and the response message includes the end of the last outgoing message in the buffered messages The TCP sequence number of bytes; the receiving module 704 is also configured to receive a notification message sent by the main controller, the notification message includes a third indication value, and the third indication value indicates the main controller The TCP sequence number of the end byte of the last outbound message that has been processed; the processing module 702 is specifically configured to set the TCP sequence number of the end byte smaller than the second indication from the buffered message at least one outbound packet whose value is not greater than the third indicated value is deleted.
可选的,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。Optionally, the data part of the TCP message includes a sub-message, and the sub-message is a Border Gateway Protocol (BGP) message or a Label Distribution Protocol (LDP) message.
在本发明的一些实施例中,所述缓存单元,具体可用于对所述接收到的报文按照TCP序列号排序后进行缓存。In some embodiments of the present invention, the buffering unit may specifically be configured to buffer the received packets after sorting them according to TCP sequence numbers.
在本发明的一些实施例中,所述缓存模块701,还用于在所述转发器接收到所述主控制器或者所述网络设备重传的报文时,缓存所述重传的报文;所述 发送模块703,还用于当所述备控制器切换为新的主控制器时,如果所述重传的报文是尚未处理的报文,所述转发器将所述重传的报文以及所述重传的报文的原报文一起发送给所述新的主控制器。In some embodiments of the present invention, the caching module 701 is further configured to cache the retransmitted message when the forwarder receives the retransmitted message from the main controller or the network device ; said The sending module 703 is further configured to send the retransmitted message and The original message of the retransmitted message is sent to the new main controller together.
在本发明的一些实施例中,所述处理模块702,还用于根据所述出方向报文的报文头中的分片标示位,识别所述接收到的出方向报文是否是一个完整TCP报文的分片;所述发送模块703,还用于若所述识别模块识别出所述接收到的出方向报文是一个完整TCP报文的分片,则在收到所述完整TCP报文的全部分片之后,开始向所述网络设备转发所述完整TCP报文的分片。In some embodiments of the present invention, the processing module 702 is further configured to identify whether the received outgoing message is a complete Fragmentation of a TCP message; the sending module 703 is also used for if the identification module recognizes that the received outbound message is a fragment of a complete TCP message, then upon receiving the complete TCP After all the fragments of the message are fragmented, start to forward the fragments of the complete TCP message to the network device.
可以理解,本发明实施例的转发器的各个功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可参照上述方法实施例中的相关描述,此处不再赘述。It can be understood that the functions of each functional module of the transponder in the embodiment of the present invention can be specifically implemented according to the method in the above method embodiment, and the specific implementation process can refer to the relevant description in the above method embodiment, and will not be repeated here.
由上可见,在本发明的一些可行的实施方式中,提供了一种通信系统中的转发器,该转发器可以接收到的报文,确认缓存的报文被处理完毕后才删除缓存的报文,如果主备控制器进行了身份切换,则将缓存的、尚未处理完毕的报文上传给新的主控制器,取得了以下技术效果:It can be seen from the above that in some feasible implementations of the present invention, a transponder in a communication system is provided. The transponder can receive a message and delete the cached message after confirming that the cached message has been processed. In this paper, if the active and standby controllers switch their identities, they will upload the cached and unprocessed messages to the new active controller, achieving the following technical effects:
通过利用转发器缓存报文进行数据备份,避免了主备控制器之间的数据备份,可以减少主备控制器的负担,减轻系统负载,有效提高系统效率和可靠性;By using the forwarder to cache messages for data backup, data backup between the active and standby controllers is avoided, which can reduce the burden on the active and standby controllers, reduce the system load, and effectively improve system efficiency and reliability;
并且,可利用多个转发器缓存报文,将系统负载分担到多台设备上,可避免主控制器成为性能瓶颈。In addition, multiple transponders can be used to cache messages, and the system load can be shared among multiple devices, which can prevent the main controller from becoming a performance bottleneck.
实施例七Embodiment seven
请参考图8,本发明实施例提供一种通信系统中的主控制器800,所述通信系统包括所述主控制器,备控制器,转发器以及网络设备,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接收所述网络设备的报文并转发给所述主控制器,所述主控制器600可包括:Please refer to FIG. 8 , an embodiment of the present invention provides a main controller 800 in a communication system, the communication system includes the main controller, a standby controller, a repeater and a network device, and the repeater is located Between the controller and the network device, it is used to receive the message of the master controller and forward it to the network device, or receive the message of the network device and forward it to the master controller, and the master Controller 600 may include:
接收模块801,用于接收所述转发器转发的来自所述网络设备的报文;A receiving module 801, configured to receive a message from the network device forwarded by the forwarder;
处理模块802,用于对接收到的报文进行处理;A processing module 802, configured to process the received message;
发送模块803,用于向所述转发器发送用于指示已经处理完毕的报文的指 示值。A sending module 803, configured to send an instruction to the forwarder to indicate that the message has been processed Indication.
在本发明的一些实施例中,发送模块803,可具体用于向所述转发器发送应答消息,所述应答消息中包括第一指示值,所述第一指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述应答消息被所述转发器用于将自身缓存的TCP报文中的、结束字节的TCP序列号不大于所述第一指示值的至少一个TCP报文删除。In some embodiments of the present invention, the sending module 803 may be specifically configured to send a response message to the transponder, where the response message includes a first indication value, and the first indication value indicates that the main controller has The TCP sequence number of the end byte of the last TCP message that has been processed, and the response message is used by the forwarder to save the TCP sequence number of the end byte in the TCP message cached by itself not greater than the first At least one TCP packet with the indicated value is deleted.
在本发明的一些实施例中,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。In some embodiments of the present invention, the data part of the TCP message includes a sub-message, and the sub-message is a Border Gateway Protocol (BGP) message or a Label Distribution Protocol (LDP) message.
在本发明的一些实施例中,所述处理模块802具体用于将所述TCP报文的报文头去除,获取所述TCP报文的数据部分;从所述TCP报文的数据部分中恢复出完整的子报文;对所述子报文进行持久化处理。In some embodiments of the present invention, the processing module 802 is specifically configured to remove the header of the TCP message, obtain the data part of the TCP message; recover from the data part of the TCP message Output a complete sub-message; perform persistent processing on the sub-message.
可以理解,本发明实施例的转发器的各个功能模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可参照上述方法实施例中的相关描述,此处不再赘述。It can be understood that the functions of each functional module of the transponder in the embodiment of the present invention can be specifically implemented according to the method in the above method embodiment, and the specific implementation process can refer to the relevant description in the above method embodiment, and will not be repeated here.
由上可见,在本发明的一些可行的实施方式中,提供了一种通信系统中的主控制器,该主控制器可以向所述转发器发送应答消息,所述应答消息中包括第一指示值,所述第一指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述应答消息被所述转发器用于将自身缓存的报文中的、结束字节的TCP序列号不大于所述第一指示值的至少一个TCP报文删除,取得了以下技术效果:It can be seen from the above that in some feasible implementation manners of the present invention, a main controller in a communication system is provided, the main controller can send a response message to the transponder, and the response message includes a first indication value, the first indication value indicates the TCP sequence number of the end byte of the last TCP message that the main controller has processed, and the response message is used by the forwarder to store the , the TCP sequence number of the end byte is not greater than at least one TCP message deletion of the first indication value, and the following technical effects are obtained:
避免了主备控制器之间的数据备份,可以减少主备控制器的负担,减轻系统负载,有效提高系统效率和可靠性;It avoids the data backup between the active and standby controllers, which can reduce the burden on the active and standby controllers, reduce the system load, and effectively improve the system efficiency and reliability;
并且,可利用多个转发器缓存报文,将系统负载分担到多台设备上,可避免主控制器成为性能瓶颈。In addition, multiple transponders can be used to cache messages, and the system load can be shared among multiple devices, which can prevent the main controller from becoming a performance bottleneck.
实施例八Embodiment eight
请参考图9a,本发明实施例提供一种通信系统中的主控制器900,所述通信系统包括所述主控制器,备控制器,转发器以及网络设备,所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所 述网络设备,或者接收所述网络设备的报文并转发给所述主控制器,所述主控制器900可包括:Please refer to Fig. 9a, an embodiment of the present invention provides a main controller 900 in a communication system, the communication system includes the main controller, a standby controller, a repeater and a network device, and the repeater is located in the main Between the controller and the network device, it is used to receive the message of the main controller and forward it to the The network device, or receive the message of the network device and forward it to the main controller, the main controller 900 may include:
发送模块901,用于向所述转发器发送报文,所述报文被所述转发器用于缓存后向所述网络设备发送;A sending module 901, configured to send a message to the forwarder, and the message is cached by the forwarder and then sent to the network device;
处理模块902,用于对所述报文进行处理;A processing module 902, configured to process the message;
所述发送模块901,还用于所述主控制器向所述转发器发送用于指示已经处理完毕的报文的指示值。The sending module 901 is further configured for the main controller to send an indication value for indicating the processed message to the repeater.
在本发明的一些实施例中,如图9b所示,所述主控制器还包括:接收模块904;In some embodiments of the present invention, as shown in FIG. 9b, the main controller further includes: a receiving module 904;
接收模块904,用于接收所述转发器发送的响应消息,所述响应消息中包括所述转发器已缓存的最后一个TCP报文的结束字节的TCP序列号;The receiving module 904 is configured to receive a response message sent by the forwarder, where the response message includes the TCP sequence number of the end byte of the last TCP message that the forwarder has cached;
所述处理模块902,具体用于根据所述响应消息对所述TCP报文进行处理;The processing module 902 is specifically configured to process the TCP message according to the response message;
所述发送模块901,具体用于向所述转发器发送通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述通知消息被所述转发器用于将已缓存的报文中的、结束字节的TCP序列号不大于所述第三指示值且小于第二指示值的一个或多个TCP报文删除,所述第二指示值指示所述网络设备期待接收的下一个TCP报文的TCP序列号。The sending module 901 is specifically configured to send a notification message to the forwarder, the notification message includes a third indication value, and the third indication value indicates the last TCP message that has been processed by the main controller The TCP sequence number of the end byte of the notification message is used by the forwarder to send the TCP sequence number of the end byte in the cached message not greater than the third indication value and less than the second indication value One or more TCP packets are deleted, and the second indication value indicates the TCP sequence number of the next TCP packet expected to be received by the network device.
在本发明的一些实施例中,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。In some embodiments of the present invention, the data part of the TCP message includes a sub-message, and the sub-message is a Border Gateway Protocol (BGP) message or a Label Distribution Protocol (LDP) message.
在本发明的一些实施例中,所述处理模块902,具体用于获取所述TCP报文的路由信息,对所述路由信息进行持久化处理。In some embodiments of the present invention, the processing module 902 is specifically configured to obtain routing information of the TCP message, and perform persistent processing on the routing information.
由上可见,在本发明的一些可行的实施方式中,提供了一种通信系统中的主控制器,该主控制器可以向所述转发器发送通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述通知消息被所述转发器用于将已缓存的报文中的、结束字节的TCP序列号不大于所述第三指示值且小于第二指示值的一个或多个TCP报文删除,所述第二指示值指示所述网络设备期待接收的下一个 TCP报文的TCP序列号,取得了以下技术效果:As can be seen from the above, in some feasible implementation manners of the present invention, a master controller in a communication system is provided, and the master controller can send a notification message to the transponder, and the notification message includes a third indication value, the third indication value indicates the TCP sequence number of the end byte of the last TCP message that the main controller has processed, and the notification message is used by the forwarder to convert the buffered message 1. Delete one or more TCP packets whose TCP sequence number of the end byte is not greater than the third indication value and less than the second indication value, and the second indication value indicates that the network device expects to receive the next The TCP serial number of the TCP message has achieved the following technical effects:
避免了主备控制器之间的数据备份,可以减少主备控制器的负担,减轻系统负载,有效提高系统效率和可靠性;It avoids the data backup between the active and standby controllers, which can reduce the burden on the active and standby controllers, reduce the system load, and effectively improve the system efficiency and reliability;
并且,可利用多个转发器缓存报文,将系统负载分担到多台设备上,可避免主控制器成为性能瓶颈。In addition, multiple transponders can be used to cache messages, and the system load can be shared among multiple devices, which can prevent the main controller from becoming a performance bottleneck.
本发明实施例还提供一种计算机存储介质,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的通信系统中的通信方法的部分或全部步骤。An embodiment of the present invention also provides a computer storage medium, where the computer storage medium can store a program, and when the program is executed, some or all steps of the communication method in the communication system described in the above method embodiments are included.
请参考图10,本发明实施例还提供一种通信系统中的转发器1000。Referring to FIG. 10 , an embodiment of the present invention further provides a transponder 1000 in a communication system.
该转发器1000可以是微处理计算机或通信设备。比如:该转发器1000可以是通用计算机、客户定制机、手机终端或平板机等便携设备中的一种。该转发器1000包括:处理器1004、存储器1006、通信接口1002和总线1008。处理器1004、存储器1006和通信接口1002通过总线1008连接并完成相互间的通信。The transponder 1000 may be a microprocessor computer or a communication device. For example: the transponder 1000 may be one of portable devices such as a general computer, a customized machine, a mobile terminal or a tablet. The transponder 1000 includes: a processor 1004 , a memory 1006 , a communication interface 1002 and a bus 1008 . The processor 1004, the memory 1006 and the communication interface 1002 are connected through the bus 1008 and complete the mutual communication.
所述总线1008可以是工业标准体系结构(Industry Standard Architecture,简称为ISA)总线或外部设备互连(Peripheral Component,简称为PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,简称为EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线中的一种或多种。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 1008 may be an Industry Standard Architecture (Industry Standard Architecture, referred to as ISA) bus or a Peripheral Component (abbreviated as PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, referred to as EISA) bus etc. The bus can be classified into one or more of address bus, data bus and control bus. For ease of representation, only one thick line is used in FIG. 10 , but it does not mean that there is only one bus or one type of bus.
存储器1006用于存储可执行程序代码,该程序代码包括计算机操作指令。当转发器1000执行该程序代码时,所述转发器1000可以完成上述图2所示方法实施例的步骤201~203,也可以实现图7a所示装置实施例中所述转发器700的所有功能。存储器1006可以包含高速RAM(Ramdom Access Memory)存储器。可选地,存储器1006还可以还包括非易失性存储器(non-volatile memory)。例如存储器1006可以包括磁盘存储器。The memory 1006 is used to store executable program codes including computer operation instructions. When the transponder 1000 executes the program code, the transponder 1000 can complete steps 201-203 of the method embodiment shown in FIG. 2, and can also realize all functions of the transponder 700 in the device embodiment shown in FIG. 7a . The memory 1006 may include a high-speed RAM (Ramdom Access Memory) memory. Optionally, the memory 1006 may further include a non-volatile memory (non-volatile memory). For example, storage 1006 may include disk storage.
处理器1004可以是一个中央处理器(Central Processing Unit,简称为CPU),或者是处理器1004可以特定集成电路(Application Specific Integrated Circuit, 简称为ASIC),或者处理器1004可以是被配置成实施本发明实施例的一个或多个集成电路。The processor 1004 may be a central processing unit (Central Processing Unit, CPU for short), or the processor 1004 may be an Application Specific Integrated Circuit (Application Specific Integrated Circuit, ASIC for short), or processor 1004 may be one or more integrated circuits configured to implement embodiments of the present invention.
处理器1004,用于在转发器1000接收到来自所述主控制器或者所述网络设备的报文之后,缓存接收到的报文;监控缓存的报文的处理状态,并删除所述缓存的报文中已经处理完毕的报文;The processor 1004 is configured to cache the received message after the forwarder 1000 receives the message from the main controller or the network device; monitor the processing status of the cached message, and delete the cached Messages that have been processed in the message;
通信接口1002,用于当所述备控制器切换为新的主控制器时,将所述缓存的报文中尚未处理完毕的报文发送给所述新的主控制器。The communication interface 1002 is configured to send unprocessed messages among the cached messages to the new master controller when the standby controller is switched to the new master controller.
可选地,通信接口1002还用于接收所述主控制器或者所述网络设备发送的、用于指示已经处理完毕的报文的指示值,根据所述指示值删除所述缓存的报文中的已经处理完毕的报文。Optionally, the communication interface 1002 is further configured to receive an indication value sent by the main controller or the network device for indicating a message that has been processed, and delete the cached message according to the indication value. of packets that have been processed.
可选地,所述处理器1004还用于根据接收到的报文的报文头中的源IP地址、目的IP地址、源端口以及目的端口,确认对应的TCP连接;基于所述确认的TCP连接,确定接收到的报文的TCP序列号;缓存接收到的报文以及所述报文的TCP序列号。Optionally, the processor 1004 is further configured to confirm the corresponding TCP connection according to the source IP address, destination IP address, source port and destination port in the header of the received message; Connecting, determining the TCP sequence number of the received message; buffering the received message and the TCP sequence number of the message.
可选地,通信接口1002还用于接收所述主控器返回的应答消息,所述应答消息中包括第一指示值,所述第一指示值指示所述主控制器已经处理完毕的最后一个入方向报文的结束字节的TCP序列号;Optionally, the communication interface 1002 is further configured to receive a response message returned by the main controller, where the response message includes a first indication value, and the first indication value indicates that the main controller has processed the last The TCP sequence number of the end byte of the incoming packet;
可选地,所述处理器1004还用于从所述缓存的报文中,将结束字节的TCP序列号不大于所述第一指示值的至少一个入方向报文删除Optionally, the processor 1004 is further configured to delete at least one incoming packet whose TCP sequence number of the end byte is not greater than the first indication value from the buffered packets
可选地,通信接口1002还用于接收所述网络设备返回的反馈消息,所述反馈消息中包括第二指示值,所述第二指示值指示所述网络设备期待接收的下一个出方向报文的TCP序列号;Optionally, the communication interface 1002 is further configured to receive a feedback message returned by the network device, where the feedback message includes a second indication value, and the second indication value indicates the next outbound report that the network equipment expects to receive. The TCP sequence number of the file;
可选地,所述处理器1004还用于从所述缓存的报文中,将结束字节的TCP序列号小于所述第二指示值的至少一个出方向报文删除。Optionally, the processor 1004 is further configured to, from the cached messages, delete at least one outbound message whose TCP sequence number of the end byte is smaller than the second indication value.
可选地,通信接口1002还用于发送响应消息给所述主控制器,所述响应消息中包括所述缓存的报文中的最后一个出方向报文的结束字节的TCP序列号;接收所述主控制器发送的通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已处理完毕的最后一个出方向报文的结束字节的 TCP序列号;所述处理器1004还用于从所述缓存的报文中,将结束字节的TCP序列号小于所述第二指示值且不大于所述第三指示值的至少一个出方向报文删除。Optionally, the communication interface 1002 is further configured to send a response message to the main controller, the response message including the TCP sequence number of the end byte of the last outbound message in the cached message; receiving The notification message sent by the main controller, the notification message includes a third indication value, and the third indication value indicates the end byte of the last outgoing message that the main controller has processed TCP sequence number; the processor 1004 is further configured to, from the buffered message, at least one outgoing direction whose TCP sequence number of the end byte is less than the second indication value and not greater than the third indication value The message is deleted.
可选地,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。Optionally, the data part of the TCP message includes a sub-message, and the sub-message is a Border Gateway Protocol (BGP) message or a Label Distribution Protocol (LDP) message.
可选地,所述处理器1004还用于对所述接收到的报文按照TCP序列号排序后进行缓存。Optionally, the processor 1004 is further configured to sort the received packets according to the TCP sequence numbers and then cache them.
可选地,所述处理器1004还用于接收到所述主控制器或者所述网络设备重传的报文时,缓存所述重传的报文;Optionally, the processor 1004 is further configured to buffer the retransmitted message when receiving the retransmitted message from the main controller or the network device;
可选地,所述通信接口1002还用于当所述备控制器切换为新的主控制器时,如果所述重传的报文是尚未处理的报文,所述转发器将所述重传的报文以及所述重传的报文的原报文一起发送给所述新的主控制器。Optionally, the communication interface 1002 is also used for when the standby controller is switched to be a new master controller, if the retransmitted message is a message that has not been processed, the forwarder sends the retransmitted The transmitted message and the original message of the retransmitted message are sent to the new main controller together.
可选地,所述处理器1004还用于根据所述出方向报文的报文头中的分片标示位,识别所述接收到的出方向报文是否是一个完整TCP报文的分片;Optionally, the processor 1004 is further configured to identify whether the received outbound message is a fragment of a complete TCP message according to the fragmentation flag in the message header of the outbound message ;
可选地,所述通信接口1002还用于若处理器1004识别为是,在收到所述完整TCP报文的全部分片之后,开始向所述网络设备转发所述完整TCP报文的分片。Optionally, the communication interface 1002 is further configured to start forwarding fragments of the complete TCP message to the network device if the processor 1004 identifies it as yes, after receiving all the fragments of the complete TCP message. piece.
值得说明的是,本发明实施例提供的网络设备的各功能单元,可以是基于实施例一提供的方法和图六所示实施例提供的装置所具备的功能的具体实现,术语的定义和说明与实施例一和实施例六保持一致,此处不再赘述。It is worth noting that each functional unit of the network device provided in the embodiment of the present invention may be based on the specific implementation of the functions provided by the method provided in Embodiment 1 and the device provided in the embodiment shown in Figure 6, and the definitions and descriptions of terms It is consistent with Embodiment 1 and Embodiment 6, and will not be repeated here.
由上可见,在本发明的一些可行的实施方式中,提供了一种通信系统中的转发器,该转发器可以接收到的报文,确认缓存的报文被处理完毕后才删除缓存的报文,如果主备控制器进行了身份切换,则将缓存的、尚未处理完毕的报文上传给新的主控制器,取得了以下技术效果:It can be seen from the above that in some feasible implementations of the present invention, a transponder in a communication system is provided. The transponder can receive a message and delete the cached message after confirming that the cached message has been processed. In this paper, if the active and standby controllers switch their identities, they will upload the cached and unprocessed messages to the new active controller, achieving the following technical effects:
通过利用转发器缓存报文进行数据备份,避免了主备控制器之间的数据备份,可以减少主备控制器的负担,减轻系统负载,有效提高系统效率和可靠性;By using the forwarder to cache messages for data backup, data backup between the active and standby controllers is avoided, which can reduce the burden on the active and standby controllers, reduce the system load, and effectively improve system efficiency and reliability;
并且,可利用多个转发器缓存报文,将系统负载分担到多台设备上,可避免主控制器成为性能瓶颈。 In addition, multiple transponders can be used to cache messages, and the system load can be shared among multiple devices, which can prevent the main controller from becoming a performance bottleneck.
请参考图11,本发明实施例还提供一种通信系统中的主控制器1100。Please refer to FIG. 11 , an embodiment of the present invention further provides a main controller 1100 in a communication system.
该主控制器1100可以是微处理计算机。比如:该主控制器1100可以是通用计算机、客户定制机、手机终端或平板机等便携设备中的一种。该主控制器1100包括:处理器1104、存储器1106、通信接口1102和总线1108。处理器1104、存储器1106和通信接口1102通过总线1108连接并完成相互间的通信。The master controller 1100 may be a microprocessor computer. For example: the main controller 1100 may be one of portable devices such as a general computer, a customized machine, a mobile terminal or a tablet. The main controller 1100 includes: a processor 1104 , a memory 1106 , a communication interface 1102 and a bus 1108 . The processor 1104, the memory 1106 and the communication interface 1102 are connected through the bus 1108 and complete the mutual communication.
所述总线1108可以是工业标准体系结构(Industry Standard Architecture,简称为ISA)总线或外部设备互连(Peripheral Component,简称为PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,简称为EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线中的一种或多种。为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 1108 may be an Industry Standard Architecture (Industry Standard Architecture, referred to as ISA) bus or a Peripheral Component (abbreviated as PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, referred to as EISA) bus etc. The bus can be classified into one or more of address bus, data bus and control bus. For ease of representation, only one thick line is used in FIG. 11 , but it does not mean that there is only one bus or one type of bus.
存储器1106用于存储可执行程序代码,该程序代码包括计算机操作指令。当主控制器1100执行该程序代码时,所述主控制器1100可以完成上述实施例四的步骤501~502,也可以实现装置实施例七中所述主控制器800的所有功能。存储器1106可以包含高速RAM(Ramdom Access Memory)存储器。可选地,存储器1106还可以还包括非易失性存储器(non-volatile memory)。例如存储器1106可以包括磁盘存储器。The memory 1106 is used to store executable program codes including computer operation instructions. When the main controller 1100 executes the program code, the main controller 1100 can complete the steps 501-502 in the fourth embodiment above, and can also realize all the functions of the main controller 800 in the seventh embodiment of the device. The memory 1106 may include a high-speed RAM (Ramdom Access Memory) memory. Optionally, the memory 1106 may further include a non-volatile memory (non-volatile memory). For example, storage 1106 may include disk storage.
处理器1104可以是一个中央处理器(Central Processing Unit,简称为CPU),或者是处理器1104可以特定集成电路(Application Specific Integrated Circuit,简称为ASIC),或者处理器1104可以是被配置成实施本发明实施例的一个或多个集成电路。The processor 1104 can be a central processing unit (Central Processing Unit, referred to as CPU for short), or the processor 1104 can be a specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC for short), or the processor 1104 can be configured to implement the present invention One or more integrated circuits of an embodiment of the invention.
通信接口1102,用于接收所述转发器转发的来自所述网络设备的报文;a communication interface 1102, configured to receive a message from the network device forwarded by the forwarder;
处理器1104,用于对接收到的报文进行处理;Processor 1104, configured to process the received message;
通信接口1102,还用于向所述转发器发送所述主控制器、用于指示已经处理完毕的报文的指示值。The communication interface 1102 is further configured to send, to the transponder, an indication value of the master controller for indicating the message that has been processed.
可选地,通信接口1102,还用于向所述转发器发送应答消息,所述应答消息中包括第一指示值,所述第一指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述应答消息被所述转发器用于将自 身缓存的报文中的、结束字节的TCP序列号不大于所述第一指示值的至少一个TCP报文删除。Optionally, the communication interface 1102 is further configured to send a response message to the repeater, where the response message includes a first indication value, and the first indication value indicates the last TCP that has been processed by the master controller. The TCP sequence number of the end byte of the message, the reply message is used by the forwarder to At least one TCP message whose TCP sequence number of the end byte is not greater than the first indication value in the cached message is deleted.
可选地,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。Optionally, the data part of the TCP message includes a sub-message, and the sub-message is a Border Gateway Protocol (BGP) message or a Label Distribution Protocol (LDP) message.
可选地,处理器1104,还用于将所述TCP报文的报文头去除,获取所述TCP报文的数据部分;从所述TCP报文的数据部分中恢复出完整的子报文;对所述子报文进行持久化处理。Optionally, the processor 1104 is further configured to remove the header of the TCP message to obtain the data part of the TCP message; recover the complete sub-message from the data part of the TCP message ; Perform persistent processing on the sub-message.
值得说明的是,本发明实施例提供的网络设备的各功能单元,可以是基于实施例四提供的方法和实施例七提供的装置所具备的功能的具体实现,术语的定义和说明与实施例四和实施例七保持一致,此处不再赘述。It is worth noting that each functional unit of the network device provided by the embodiment of the present invention may be based on the specific realization of the functions of the method provided by the fourth embodiment and the device provided by the seventh embodiment. The fourth is consistent with the seventh embodiment, and will not be repeated here.
由上可见,在本发明的一些可行的实施方式中,提供了一种通信系统中的主控制器,该主控制器可以向所述转发器发送应答消息,所述应答消息中包括第一指示值,所述第一指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述应答消息被所述转发器用于将自身缓存的报文中的、结束字节的TCP序列号不大于所述第一指示值的至少一个TCP报文删除,取得了以下技术效果:It can be seen from the above that in some feasible implementation manners of the present invention, a main controller in a communication system is provided, the main controller can send a response message to the transponder, and the response message includes a first indication value, the first indication value indicates the TCP sequence number of the end byte of the last TCP message that the main controller has processed, and the response message is used by the forwarder to store the , the TCP sequence number of the end byte is not greater than at least one TCP message deletion of the first indication value, and the following technical effects are obtained:
避免了主备控制器之间的数据备份,可以减少主备控制器的负担,减轻系统负载,有效提高系统效率和可靠性;It avoids the data backup between the active and standby controllers, which can reduce the burden on the active and standby controllers, reduce the system load, and effectively improve the system efficiency and reliability;
并且,可利用多个转发器缓存报文,将系统负载分担到多台设备上,可避免主控制器成为性能瓶颈。In addition, multiple transponders can be used to cache messages, and the system load can be shared among multiple devices, which can prevent the main controller from becoming a performance bottleneck.
请参考图12,本发明实施例还提供一种通信系统中的主控制器1200。Please refer to FIG. 12 , an embodiment of the present invention further provides a main controller 1200 in a communication system.
该主控制器1200可以是微处理计算机。比如:该主控制器1200可以是通用计算机、客户定制机、手机终端或平板机等便携设备中的一种。该主控制器1200包括:处理器1204、存储器1206、通信接口1202和总线1208。处理器1204、存储器1206和通信接口1202通过总线1208连接并完成相互间的通信。The main controller 1200 may be a microprocessor computer. For example: the main controller 1200 may be one of portable devices such as a general computer, a customized machine, a mobile terminal or a tablet. The main controller 1200 includes: a processor 1204 , a memory 1206 , a communication interface 1202 and a bus 1208 . The processor 1204, the memory 1206 and the communication interface 1202 are connected through the bus 1208 and complete mutual communication.
所述总线1208可以是工业标准体系结构(Industry Standard Architecture,简称为ISA)总线或外部设备互连(Peripheral Component,简称为PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,简称为 EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线中的一种或多种。为便于表示,图12中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 1208 may be an Industry Standard Architecture (Industry Standard Architecture, referred to as ISA) bus or a Peripheral Component (abbreviated as PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, referred to as EISA) bus, etc. The bus can be classified into one or more of address bus, data bus and control bus. For ease of representation, only one thick line is used in FIG. 12 , but it does not mean that there is only one bus or one type of bus.
存储器1206用于存储可执行程序代码,该程序代码包括计算机操作指令。当主控制器1200执行该程序代码时,所述主控制器1100可以完成上述实施例五的步骤601~604,也可以实现装置实施例八中所述主控制器900的所有功能。存储器1206可以包含高速RAM(Ramdom Access Memory)存储器。可选地,存储器1206还可以还包括非易失性存储器(non-volatile memory)。例如存储器1206可以包括磁盘存储器。The memory 1206 is used to store executable program codes including computer operation instructions. When the main controller 1200 executes the program code, the main controller 1100 can complete steps 601 to 604 in the fifth embodiment above, and can also realize all the functions of the main controller 900 in the eighth embodiment of the device. The memory 1206 may include a high-speed RAM (Ramdom Access Memory) memory. Optionally, the memory 1206 may further include a non-volatile memory (non-volatile memory). For example, storage 1206 may include disk storage.
处理器1204可以是一个中央处理器(Central Processing Unit,简称为CPU),或者是处理器1204可以特定集成电路(Application Specific Integrated Circuit,简称为ASIC),或者处理器1204可以是被配置成实施本发明实施例的一个或多个集成电路。The processor 1204 may be a central processing unit (Central Processing Unit, referred to as CPU), or the processor 1204 may be a specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC), or the processor 1204 may be configured to implement the present invention. One or more integrated circuits of an embodiment of the invention.
通信接口1202,用于向所述转发器发送报文;A communication interface 1202, configured to send a message to the transponder;
处理器1204,用于对所述发送的报文进行处理;a processor 1204, configured to process the sent message;
通信接口1202,用于向所述转发器发送所述主控制器、用于指示已经处理完毕的报文的指示值。The communication interface 1202 is configured to send, to the repeater, an indication value of the main controller used to indicate the message that has been processed.
可选地,通信接口1202,还用于向所述转发器发送所述TCP报文,所述TCP报文被所述转发器用于缓存后向所述网络设备发送;接收所述转发器发送的响应消息,所述响应消息中包括所述转发器已缓存的最后一个TCP报文的结束字节的TCP序列号;向所述转发器发送通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述通知消息被所述转发器用于将已缓存的报文中的、结束字节的TCP序列号不大于所述第三指示值且小于第二指示值的一个或多个TCP报文删除,所述第二指示值指示所述网络设备期待接收的下一个TCP报文的TCP序列号。Optionally, the communication interface 1202 is also configured to send the TCP message to the forwarder, and the TCP message is cached by the forwarder and then sent to the network device; receiving the TCP message sent by the forwarder Response message, including the TCP sequence number of the end byte of the last TCP message that the forwarder has cached in the response message; sending a notification message to the forwarder, including a third indication value in the notification message, The third indication value indicates the TCP sequence number of the end byte of the last TCP message that the main controller has processed, and the notification message is used by the forwarder to send the end byte in the buffered message to One or more TCP packets whose TCP sequence number is not greater than the third indication value and less than the second indication value are deleted, and the second indication value indicates the next TCP message that the network device expects to receive TCP sequence number.
可选地,所述TCP报文的数据部分包含子报文,所述子报文是边界网关协议BGP报文,或者标签分发协议LDP报文。 Optionally, the data part of the TCP message includes a sub-message, and the sub-message is a Border Gateway Protocol (BGP) message or a Label Distribution Protocol (LDP) message.
可选地,处理器1104,还用于获取所述TCP报文的路由信息,对所述路由信息进行持久化处理。Optionally, the processor 1104 is further configured to obtain routing information of the TCP packet, and perform persistent processing on the routing information.
值得说明的是,本发明实施例提供的网络设备的各功能单元,可以是基于实施例五提供的方法和实施例八提供的装置所具备的功能的具体实现,术语的定义和说明与示实施例五和实施例八保持一致,此处不再赘述。It is worth noting that each functional unit of the network device provided by the embodiment of the present invention may be based on the specific realization of the functions of the method provided by the fifth embodiment and the device provided by the eighth embodiment, and the definitions, descriptions and implementation of the terms The fifth example is consistent with the eighth embodiment, and will not be repeated here.
由上可见,在本发明的一些可行的实施方式中,提供了一种通信系统中的主控制器,该主控制器可以向所述转发器发送通知消息,所述通知消息中包括第三指示值,所述第三指示值指示所述主控制器已经处理完毕的最后一个TCP报文的结束字节的TCP序列号,所述通知消息被所述转发器用于将已缓存的报文中的、结束字节的TCP序列号不大于所述第三指示值且小于第二指示值的一个或多个TCP报文删除,所述第二指示值指示所述网络设备期待接收的下一个TCP报文的TCP序列号,取得了以下技术效果:As can be seen from the above, in some feasible implementation manners of the present invention, a master controller in a communication system is provided, and the master controller can send a notification message to the transponder, and the notification message includes a third indication value, the third indication value indicates the TCP sequence number of the end byte of the last TCP message that the main controller has processed, and the notification message is used by the forwarder to convert the buffered message 1. Delete one or more TCP packets whose TCP sequence number of the end byte is not greater than the third indication value and less than the second indication value, and the second indication value indicates the next TCP packet that the network device expects to receive The TCP sequence number of the text has achieved the following technical effects:
避免了主备控制器之间的数据备份,可以减少主备控制器的负担,减轻系统负载,有效提高系统效率和可靠性;It avoids the data backup between the active and standby controllers, which can reduce the burden on the active and standby controllers, reduce the system load, and effectively improve the system efficiency and reliability;
并且,可利用多个转发器缓存报文,将系统负载分担到多台设备上,可避免主控制器成为性能瓶颈。In addition, multiple transponders can be used to cache messages, and the system load can be shared among multiple devices, which can prevent the main controller from becoming a performance bottleneck.
本发明实施例还提供一种通信系统,如图1a所示,所述通信系统包括主控制器、备控制器、转发器以及网络设备,其中,An embodiment of the present invention also provides a communication system. As shown in FIG. 1a, the communication system includes a master controller, a backup controller, a repeater, and a network device, wherein,
所述转发器位于所述主控制器和所述网络设备之间,用于接收所述主控制器的报文并转发给所述网络设备,或者接收所述网络设备的报文并转发给所述主控制器;以及,在接收到来自所述主控制器或者所述网络设备的报文之后,缓存接收到的报文,监控缓存的报文的处理状态,并删除所述缓存的报文中的已经处理完毕的报文;当所述备控制器切换为新的主控制器时,所述转发器将所述缓存的报文中尚未处理完毕的报文发送给所述新的主控制器;The forwarder is located between the main controller and the network device, and is used to receive the message of the main controller and forward it to the network device, or receive the message of the network device and forward it to the network device. the main controller; and, after receiving the message from the main controller or the network device, cache the received message, monitor the processing status of the cached message, and delete the cached message the packets that have been processed; when the standby controller is switched to a new primary controller, the forwarder sends the unprocessed packets in the buffered packets to the new primary controller device;
所述主控制器用于向所述转发器发送报文,对发送的报文进行处理,或者,接收所述转发器转发的来自所述网络设备的报文,对接收到的报文进行处理;以及,向所述转发器发送所述主控制器、用于指示已经处理完毕的报文的指示 值;The main controller is configured to send a message to the forwarder, process the sent message, or receive a message from the network device forwarded by the forwarder, and process the received message; And, sending the main controller to the forwarder an indication for indicating that the message has been processed value;
所述网络设备用于向所述转发器发送报文,或者,接收所述转发器转发的来自所述主控制器的报文;The network device is configured to send a message to the forwarder, or receive a message from the main controller forwarded by the forwarder;
所述备控制器,用于在所述主控制器故障时,切换为新的主控制器;The backup controller is configured to switch to a new master controller when the master controller fails;
该通信系统避免了主备控制器之间的数据备份,可以减少主备控制器的负担,减轻系统负载,有效提高系统效率和可靠性。The communication system avoids data backup between the active and standby controllers, can reduce the burden on the active and standby controllers, lighten the system load, and effectively improve system efficiency and reliability.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详细描述的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述动作顺序的限制,因为依据本发明,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that for the foregoing method embodiments, for the sake of simple description, they are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because Certain steps may be performed in other orders or simultaneously in accordance with the present invention. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:ROM、RAM、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: ROM, RAM, disk or CD, etc.
以上对本发明实施例所提供的通信系统中的通信方法和设备进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The communication method and equipment in the communication system provided by the embodiment of the present invention have been introduced in detail above. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The description of the above embodiment is only used to help understand the present invention. The method of the invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, the content of this specification should not be understood To limit the present invention.
Claims (37)
- A kind of communication means in communication system, it is characterized in that, the communication system includes master controller, preparation controller, transponder and the network equipment, the transponder is located between the master controller and the network equipment, for receiving the message of the master controller and being transmitted to the network equipment, or receive the message of the network equipment and be transmitted to the master controller, methods described includes:The transponder caches the message received after the message from the master controller or the network equipment is received;The processing state of the message of the transponder monitoring caching, and delete the message being disposed in the message of the caching;When the preparation controller switches to new master controller, the message being not yet disposed in the message of the caching is sent to the new master controller by the transponder.
- According to the method described in claim 1, it is characterised in that the processing state of the message of transponder monitoring caching, and delete the message being disposed in the message of the caching and include:The transponder receives the message being disposed for being used for the indicated value for the message that instruction has been disposed, deleting in the message of the caching according to the indicated value that the master controller or the network equipment are sent.
- Method according to claim 2, it is characterised in that the message is transmission control protocol TCP message, the message that the caching is received includes:Source IP address, purpose IP address, source port and destination interface in the heading for the message that the transponder is received according to, confirm corresponding TCP connections;TCP connection of the transponder based on the confirmation, determines the TCP sequence number of the message, the message and the TCP sequence number of the message received received described in caching.
- Method according to claim 3, it is characterized in that, the message of the caching enters direction message including the network equipment to what the master controller was sent, the transponder monitors the processing state of the message of the caching, and deletes the message being disposed in the message of the caching and include:The transponder receives the response message that the main controller is returned, and the response message includes the first indicated value, the first indicated value instruction master controller be disposed last enter direction message end byte TCP sequence number;The transponder is according to first indicated value, from the message of the caching, and by the TCP sequence number of end byte is not more than first indicated value, at least one enters the deletion of direction message.
- Method according to Claims 2 or 3 or 4, it is characterized in that, the message of the caching includes the outgoing packet that the master controller is sent to the network equipment, the transponder monitors the processing state of the message of the caching, and deletes the message being disposed in the message of the caching and include:The transponder receives the feedback message that the network equipment is returned, and the feedback message includes the second indicated value, and second indicated value indicates that the network equipment expects the TCP sequence number of next outgoing packet of reception;From the message of the caching, at least one outgoing packet that the TCP sequence number of end byte is less than second indicated value is deleted.
- Method according to claim 5, it is characterised in that also include:The transponder sends response message to the master controller, and the response message includes the TCP sequence number of the end byte of last outgoing packet in the message of the caching;The transponder receives the notification message that the master controller is sent, and the notification message includes the 3rd indicated value, and the 3rd indicated value indicates the TCP sequence number of the end byte of processed last outgoing packet finished of master controller;It is described from the message of the caching, by the TCP sequence number of end byte be less than second indicated value at least one outgoing packet delete include:From the message of the caching, at least one outgoing packet that the TCP sequence number of end byte is less than second indicated value and no more than described 3rd indicated value is deleted.
- According to any described method in claim 2 to 6, it is characterised in thatThe data division of the TCP message includes sub- message, and the sub- message is Border Gateway Protocol (BGP) message, or tag distribution protocol LDP messages.
- According to any described method in claim 3 to 6, it is characterised in that the message and the TCP sequence number of the message received received described in the caching includes:The transponder is cached after being sorted to the message received according to TCP sequence number.
- According to any described method in claim 1 to 8, it is characterised in thatThe message received that caches includes:The transponder receives the master controller or the net During the message that network equipment is retransmitted, the message of the re-transmission is cached;Described when new master controller is switched to when the preparation controller, the message being not yet disposed in the message of the caching is sent to the new master controller by the transponder to be included:When the preparation controller switches to new master controller, if the message of the re-transmission is still untreated message, the former message of the message of the re-transmission and the message of the re-transmission is sent jointly to the new master controller by the transponder.
- According to any described method in claim 5 to 6, it is characterised in that also include:The transponder indicates position according to the burst in the heading of the outgoing packet, the outgoing packet received described in identification whether be a complete TCP message burst;If so, the transponder is after whole bursts of the complete TCP message are received, start to forward the burst of the complete TCP message to the network equipment.
- A kind of communication means in communication system, it is characterized in that, the communication system includes master controller, preparation controller, transponder and the network equipment, the transponder are located between the master controller and the network equipment, for receiving the message of the master controller and being transmitted to the network equipment, or receive the message of the network equipment and be transmitted to the master controller, methods described includes:The master controller receives the message from the network equipment of the transponder forwarding, and the message received is handled;The master controller sends the indicated value of the message for indicating to be disposed to the transponder.
- Method according to claim 11, it is characterised in that the message is transmission control protocol TCP message, the indicated value of message of the master controller to the transponder transmission master controller, for indicating to be disposed includes:The master controller sends response message to the transponder, the response message includes the first indicated value, first indicated value indicates the TCP sequence number of the end byte for last TCP message that the master controller has been disposed, and the response message is used to delete at least one TCP message that the TCP sequence number of in the TCP message of own cache, end byte is not more than first indicated value by the transponder.
- Method according to claim 11 or 12, it is characterised in thatThe data division of the TCP message includes sub- message, and the sub- message is Border Gateway Protocol (BGP) message, or tag distribution protocol LDP messages.
- Method according to claim 13, it is characterised in that the described pair of message progress processing received includes:The heading of the TCP message is removed, the data division of the TCP message is obtained;Complete sub- message is recovered from the data division of the TCP message;Persistence processing is carried out to the sub- message.
- A kind of communication means in communication system, it is characterized in that, the communication system includes master controller, preparation controller, transponder and the network equipment, the transponder are located between the master controller and the network equipment, for receiving the message of the master controller and being transmitted to the network equipment, or receive the message of the network equipment and be transmitted to the master controller, methods described includes:The master controller sends message to the transponder, and the message of transmission is used to send to the network equipment after caching by the transponder;The main control is handled the message of the transmission;The master controller sends the indicated value of the message for indicating to be disposed to the transponder.
- Method according to claim 15, it is characterised in that the message is transmission control protocol TCP message, the main control includes to message progress processing:The main control receives the response message that the transponder is sent, and the response message includes the TCP sequence number of the end byte for last TCP message that the transponder has been cached;The main control is handled the TCP message according to the response message;The indicated value of message of the master controller to the transponder transmission master controller, for indicating to be disposed includes:The master controller sends a notification message to the transponder, the notification message includes the 3rd indicated value, 3rd indicated value indicates the TCP sequence number of the end byte for last TCP message that the master controller has been disposed, the notification message is not more than the 3rd indicated value by the TCP sequence number that the transponder is used in the message that will cache, end byte and one or more TCP messages less than the second indicated value are deleted, and second indicated value indicates that the network equipment expects the TCP sequence number of next TCP message received.
- Method according to claim 15 or 16, it is characterised in thatThe data division of the TCP message includes sub- message, and the sub- message is Border Gateway Protocol (BGP) report Text, or tag distribution protocol LDP messages.
- Method according to claim 17, it is characterised in that the master controller includes to TCP message progress processing:The routing iinformation of the TCP message is obtained, persistence processing is carried out to the routing iinformation.
- A kind of transponder in communication system, it is characterized in that, the communication system includes master controller, preparation controller, the transponder and the network equipment, the transponder is located between the master controller and the network equipment, for receiving the message of the master controller and being transmitted to the network equipment, or receive the message of the network equipment and be transmitted to the master controller, the transponder includes:Cache module, after receiving the message from the master controller or the network equipment in the transponder, caches the message received;Processing module, the processing state of the message for monitoring caching, and delete the message being disposed in the message of the caching;Sending module, for when the preparation controller switches to new master controller, the message being not yet disposed in the message of the caching to be sent into the new master controller.
- Transponder in communication system according to claim 19, it is characterised in thatThe transponder also includes:Receiving module, for receive it is that the master controller or the network equipment are sent, for the indicated value for the message for indicating to be disposed;The message being disposed in message of the residing processing module specifically for deleting the caching according to the indicated value.
- Transponder in communication system according to claim 20, it is characterised in that the message is transmission control protocol TCP message, the cache module includes:Confirmation unit, for source IP address, purpose IP address, source port and the destination interface in the heading of the message received according to, confirms corresponding TCP connections;Determining unit, for the TCP connections based on the confirmation, determines the TCP sequence number of the message;Buffer unit, the TCP sequence number for caching the message received and the message received.
- Transponder in communication system according to claim 21, it is characterised in that the message of the caching enters direction message including the network equipment to what the master controller was sent,The transponder also includes:Receiving module, for receiving the response message that the main controller is returned, the response message includes the first indicated value, the first indicated value instruction master controller be disposed last enter direction message end byte TCP sequence number;The processing module is specifically for from the message of the caching, and by the TCP sequence number of end byte is not more than first indicated value, at least one enters direction message deletion.
- The transponder in communication system according to claim 20 or 21 or 22, it is characterised in that the message of the caching includes the outgoing packet that the master controller is sent to the network equipment,The transponder also includes:Receiving module, for receiving the feedback message that the network equipment is returned, the feedback message includes the second indicated value, and second indicated value indicates that the network equipment expects the TCP sequence number of next outgoing packet of reception;The processing module is specifically for from the message of the caching, at least one outgoing packet that the TCP sequence number of end byte is less than second indicated value is deleted.
- Transponder in communication system according to claim 23, it is characterised in thatThe sending module, is additionally operable to send response message to the master controller, the response message includes the TCP sequence number of the end byte of last outgoing packet in the message of the caching;The receiving module, it is additionally operable to receive the notification message that the master controller is sent, the notification message includes the 3rd indicated value, and the 3rd indicated value indicates the TCP sequence number of the end byte of processed last outgoing packet finished of master controller;The processing module is specifically for from the message of the caching, at least one outgoing packet that the TCP sequence number of end byte is less than second indicated value and no more than described 3rd indicated value is deleted.
- According to the transponder in any described communication system of claim 19 to 24, it is characterised in thatThe data division of the TCP message includes sub- message, and the sub- message is Border Gateway Protocol (BGP) message, or tag distribution protocol LDP messages.
- According to the transponder in any described communication system of claim 21 to 24, it is characterised in thatThe buffer unit, specifically for being cached after being sorted to the message received according to TCP sequence number.
- According to the transponder in any described communication system of claim 20 to 26, it is characterised in thatThe cache module, is additionally operable to receive the master controller in the transponder or the network is set During the message of standby re-transmission, the message of the re-transmission is cached;The sending module, it is additionally operable to when the preparation controller switches to new master controller, if the message of the re-transmission is still untreated message, the former message of the message of the re-transmission and the message of the re-transmission is sent jointly to the new master controller by the transponder.
- According to the transponder in any described communication system of claim 23 to 24, it is characterised in thatThe processing module, is additionally operable to the burst sign position in the heading according to the outgoing packet, the outgoing packet that receives described in identification whether be a complete TCP message burst;The sending module, if being additionally operable to the identification module identifies that the outgoing packet received is the burst of a complete TCP message, then after whole bursts of the complete TCP message are received, start to forward the burst of the complete TCP message to the network equipment.
- A kind of master controller in communication system, it is characterized in that, the communication system includes the master controller, preparation controller, transponder and the network equipment, the transponder are located between the master controller and the network equipment, for receiving the message of the master controller and being transmitted to the network equipment, or receive the message of the network equipment and be transmitted to the master controller, the master controller includes:Receiving module, the message from the network equipment for receiving the transponder forwarding;Processing module, for handling the message received;Sending module, the indicated value for sending the message for indicating to be disposed to the transponder.
- Master controller in communication system according to claim 29, it is characterised in that the message is transmission control protocol TCP message,Sending module, specifically for sending response message to the transponder, the response message includes the first indicated value, first indicated value indicates the TCP sequence number of the end byte for last TCP message that the master controller has been disposed, and the response message is used to delete at least one TCP message that the TCP sequence number of in the TCP message of own cache, end byte is not more than first indicated value by the transponder.
- The master controller in communication system according to claim 29 or 30, it is characterised in thatThe data division of the TCP message includes sub- message, and the sub- message is Border Gateway Protocol (BGP) message, or tag distribution protocol LDP messages.
- Master controller in communication system according to claim 31, it is characterised in thatThe processing module is specifically for by the heading removal of the TCP message, obtaining the data division of the TCP message;Complete sub- message is recovered from the data division of the TCP message;Persistence processing is carried out to the sub- message.
- A kind of master controller in communication system, it is characterized in that, the communication system includes master controller, preparation controller, transponder and the network equipment, the transponder are located between the master controller and the network equipment, for receiving the message of the master controller and being transmitted to the network equipment, or receive the message of the network equipment and be transmitted to the master controller, the master controller includes:Sending module, for sending message to the transponder, the message is used to send to the network equipment after caching by the transponder;Processing module, for handling the message;The sending module, is additionally operable to the indicated value that the master controller sends the message for indicating to be disposed to the transponder.
- Master controller in communication system according to claim 33, it is characterised in thatThe master controller also includes:Receiving module, for receiving the response message that the transponder is sent, the response message includes the TCP sequence number of the end byte for last TCP message that the transponder has been cached;The processing module, specifically for being handled according to the response message the TCP message;The sending module, specifically for being sent a notification message to the transponder, the notification message includes the 3rd indicated value, 3rd indicated value indicates the TCP sequence number of the end byte for last TCP message that the master controller has been disposed, the notification message is used in the message that will cache by the transponder, the TCP sequence number of end byte is not more than the 3rd indicated value and one or more TCP messages less than the second indicated value are deleted, second indicated value indicates that the network equipment expects the TCP sequence number of next TCP message of reception.
- The master controller in communication system according to claim 33 or 34, it is characterised in thatThe data division of the TCP message includes sub- message, and the sub- message is Border Gateway Protocol (BGP) message, or tag distribution protocol LDP messages.
- Master controller in communication system according to claim 35, it is characterised in thatThe processing module, the routing iinformation specifically for obtaining the TCP message, persistence processing is carried out to the routing iinformation.
- A kind of communication system, it is characterised in that the communication system includes master controller, preparation controller, transponder and the network equipment, wherein,The transponder is located between the master controller and the network equipment, for receiving the message of the master controller and being transmitted to the network equipment, or receives the message of the network equipment and be transmitted to the master controller;And, after the message from the master controller or the network equipment is received, the message received is cached, the processing state of the message of caching is monitored, and deletes the message being disposed in the message of the caching;When the preparation controller switches to new master controller, the message being not yet disposed in the message of the caching is sent to the new master controller by the transponder;The master controller is used to send message to the transponder, and the message of transmission is handled, or, the message from the network equipment of the transponder forwarding is received, the message received is handled;And, the indicated value of the message for indicating to be disposed is sent to the transponder;The network equipment is used to send message to the transponder, or, receive the message from the master controller of the transponder forwarding;The preparation controller, in the master controller fault, switching to new master controller.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2015/077980 WO2016172926A1 (en) | 2015-04-30 | 2015-04-30 | Communication method and device, and system in communication system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106576108A true CN106576108A (en) | 2017-04-19 |
CN106576108B CN106576108B (en) | 2020-05-08 |
Family
ID=57197958
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201580000771.3A Active CN106576108B (en) | 2015-04-30 | 2015-04-30 | Communication method, equipment and system in communication system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106576108B (en) |
WO (1) | WO2016172926A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110798276A (en) * | 2018-08-02 | 2020-02-14 | 全球能源互联网研究院有限公司 | A time synchronization method and system for SDN network of intelligent substation |
CN112039863A (en) * | 2020-08-25 | 2020-12-04 | 烽火通信科技股份有限公司 | Method and equipment for backup and smoothing of TCP stream in TCP hot standby architecture |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107046486A (en) * | 2017-06-16 | 2017-08-15 | 郑州云海信息技术有限公司 | A Failover System Based on Controller Agent |
CN112187519A (en) * | 2020-09-09 | 2021-01-05 | 中盈优创资讯科技有限公司 | Multi-activity concurrency method and device for realizing policy control based on BGP (Border gateway protocol) |
CN113961212B (en) * | 2021-10-29 | 2024-05-10 | 重庆长安汽车股份有限公司 | OTA installation package deployment method and system based on Ethernet and method for upgrading vehicle controller |
CN114124581B (en) * | 2022-01-27 | 2022-05-17 | 深圳融安网络科技有限公司 | Message processing method, firewall and readable storage medium |
US11722570B1 (en) * | 2022-05-13 | 2023-08-08 | Microsoft Technology Licensing, Llc | Sharing SDN policy state information between SDN appliances |
CN115550250B (en) * | 2022-11-17 | 2023-04-07 | 鹏城实验室 | Small flow packet retransmission method, system, electronic device and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101916217A (en) * | 2010-08-04 | 2010-12-15 | 中兴通讯股份有限公司 | Method, control device and system for switching a plurality of controllers |
US20110173490A1 (en) * | 2010-01-08 | 2011-07-14 | Juniper Networks, Inc. | High availability for network security devices |
CN103944974A (en) * | 2014-04-02 | 2014-07-23 | 华为技术有限公司 | Method for processing protocol messages, method for processing faults of controllers and related device |
CN104426789A (en) * | 2013-08-23 | 2015-03-18 | 杭州华三通信技术有限公司 | Forwarding equipment control method in software defined network and equipment |
-
2015
- 2015-04-30 WO PCT/CN2015/077980 patent/WO2016172926A1/en active Application Filing
- 2015-04-30 CN CN201580000771.3A patent/CN106576108B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110173490A1 (en) * | 2010-01-08 | 2011-07-14 | Juniper Networks, Inc. | High availability for network security devices |
CN101916217A (en) * | 2010-08-04 | 2010-12-15 | 中兴通讯股份有限公司 | Method, control device and system for switching a plurality of controllers |
CN104426789A (en) * | 2013-08-23 | 2015-03-18 | 杭州华三通信技术有限公司 | Forwarding equipment control method in software defined network and equipment |
CN103944974A (en) * | 2014-04-02 | 2014-07-23 | 华为技术有限公司 | Method for processing protocol messages, method for processing faults of controllers and related device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110798276A (en) * | 2018-08-02 | 2020-02-14 | 全球能源互联网研究院有限公司 | A time synchronization method and system for SDN network of intelligent substation |
CN110798276B (en) * | 2018-08-02 | 2022-11-11 | 全球能源互联网研究院有限公司 | A time synchronization method and system for SDN network of intelligent substation |
CN112039863A (en) * | 2020-08-25 | 2020-12-04 | 烽火通信科技股份有限公司 | Method and equipment for backup and smoothing of TCP stream in TCP hot standby architecture |
Also Published As
Publication number | Publication date |
---|---|
CN106576108B (en) | 2020-05-08 |
WO2016172926A1 (en) | 2016-11-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106576108A (en) | Communication method and device, and system in communication system | |
CN107347021B (en) | SDN-based reliable transmission method | |
US10505838B2 (en) | System and method for diverting established communication sessions | |
US7471681B2 (en) | Determining network path transmission unit | |
US7801135B2 (en) | Transport protocol connection synchronization | |
CN106330414B (en) | Message transmission method and device | |
WO2019242748A1 (en) | Information transmission method and device | |
EP3593498B1 (en) | Router device using flow duplication | |
WO2018205688A1 (en) | Method, apparatus and system for data transmission | |
EP3574679B1 (en) | Lossless handover for mobility with location identifier separation protocol in 3rd generation partnership project networks | |
US6760766B1 (en) | Data transmission method and device | |
Shi et al. | NDNLP: A link protocol for NDN | |
US20070183376A1 (en) | Data communication system and method for same | |
EP2961112B1 (en) | Message forwarding system, method and device | |
CN103944691B (en) | Data repeating method in a kind of transmission of cooperation service and connect network gateway | |
US11849493B2 (en) | Modified methods and system of transmitting and receiving transmission control protocol segments over internet protocol packets | |
US20150373135A1 (en) | Wide area network optimization | |
CN110324254A (en) | The transmission of message is carried out using the network interface controller on subnet | |
JP2008153778A (en) | Packet transfer apparatus | |
US7965625B2 (en) | Communication device and logical link abnormality detection method | |
JP4229807B2 (en) | Data transfer method, TCP proxy device, and network system using the same | |
US20080069106A1 (en) | Communication apparatus | |
US7535916B2 (en) | Method for sharing a transport connection across a multi-processor platform with limited inter-processor communications | |
US8639822B2 (en) | Extending application-layer sessions based on out-of-order messages | |
CN106209733B (en) | A data processing method and device |
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 |