Main and standby CPE system, CPE main and standby implementation method and communication equipment

Through the VRRP group's master-secure negotiation and equipment priority adjustment, the problem of high availability of CPE equipment in Internet dial-up access scenarios is solved, and a high availability solution at the equipment and line level is realized.

CN119561661AActive Publication Date: 2025-03-04CHINA TELECOM CLOUD TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411741245.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-04
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

The prior art is difficult to realize the high availability solution for CPE devices in the Internet dial-up access scenario, especially when the WAN line interface does not have an IP address and the operator restricts multiple dial-up.

Method used

The VRRP group realizes the master-sustainment negotiation of CPE equipment, determines the host device and the backup device according to the priority of the device, and disables the network card's packetization function in the case of the backup device, or enables the packetization function in the case of the host device.

Benefits of technology

It realizes high availability of CPE devices under different network access methods, avoids multiple dialing situations in dialing scenarios, and builds a high availability system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119561661A_ABST
    Figure CN119561661A_ABST
Patent Text Reader

Abstract

The invention relates to a main and standby CPE (Customer Premise Equipment) system, a CPE main and standby implementation method and communication equipment. The main and standby CPE system comprises at least one VRRP group, and the VRRP group comprises a plurality of CPE devices which are in communication connection through an HA network port; each CPE device in the VRRP group performs main-standby negotiation based on the device priority, and determines a main machine device and a standby machine device of the VRRP group; when any CPE device determines that the CPE device is a standby device, the packet sending function of each line network card is forbidden; or starting the packet sending function of the network card of each line under the condition that the network card is determined to be the host equipment. According to the technical scheme of the invention, main and standby negotiation is carried out in the VRRP group, and the CPE equipment adjusts the packet sending function according to the main and standby states, so that the network port of the CPE equipment does not affect the main machine no matter which mode is accessed to the network or the standby machine, and particularly, the multi-path dialing condition can be avoided in a dialing scene, so that one or more groups of CPE equipment are utilized to form a high-availability system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to an active-standby CPE system, an implementation method of active-standby CPE, and a communication device. Background Art

[0002] With the rapid advancement of information technology and the acceleration of digital transformation, CPE (Customer Premises Equipment) devices are widely used in small stores or branches such as sites due to their low cost and high flexibility to connect users to the service provider's network. However, the CPE access network is complex and diverse, which can be a dedicated line, Internet access, 4G / 5G / LTE, WIFI access and other methods. For the commonly used Internet adsl (Asymmetric Digital Subscriber Line) dial-up scenario or hybrid wired network scenario, the WAN (Wide Area Network) line interface does not have an IP (Internet Protocol) address and the operator restricts multi-channel dialing. Therefore, it is not possible to simply use the current IP-based load balancing solution to achieve CPE high availability solutions. Summary of the invention

[0003] Based on this, it is necessary to provide a master-standby CPE system, a CPE master-standby implementation method and a communication device to address the above technical problems, so as to realize a highly available master-standby CPE system in a CPE usage scenario using Internet dial-up access networking.

[0004] In a first aspect, the present application provides a master-slave CPE system, the system includes at least one VRRP group, the VRRP group includes multiple CPE devices connected through HA network port communication; wherein:

[0005] Each CPE device in the VRRP group performs master-slave negotiation based on device priority to determine the master and backup devices of the VRRP group;

[0006] Any CPE device is used to disable the packet sending function of each line network card when it is determined that it is a backup device; or to enable the packet sending function of each line network card when it is determined that it is a host device.

[0007] In one of the embodiments, the CPE device is also used to set its own WAN port group and LAN port group after the network service is started; the WAN port group includes identification information of multiple WAN ports, and the LAN port group includes identification information of multiple LAN ports; based on the WAN port group and the LAN port group, monitor the connection status of each port; based on the connection status of each port, adjust its own device priority.

[0008] In one of the embodiments, the master device in the VRRP group is used to re-initiate master-slave negotiation in the VRRP group when its own device priority is reduced, and to re-determine the master device and the backup device of the VRRP group.

[0009] In one of the embodiments, the CPE device is also used to determine the network port priority of the target network port when the connection status of the target network port is abnormal; adjust its own device priority according to the network port priority; the target network port is any WAN port or LAN port managed by the CPE device.

[0010] In one of the embodiments, the CPE device is further used to lower its own device priority when the network port priority of the target network port is not lower than the preset priority; and to maintain its own device priority when the network port priority of the target network port is lower than the preset priority.

[0011] In one of the embodiments, the backup device in the VRRP group is used to replace the packet sending function of all network ports managed by itself with a preset packet sending function to disable the packet sending function of each line network card; the preset packet sending function is used to filter data packets.

[0012] In one of the embodiments, the host device in the VRRP group is used to detect whether the packet sending function of each network port managed by itself is replaced by a preset packet sending function; if it is detected that the packet sending function of the current network port is replaced by the preset packet sending function, the packet sending function of the current network port is restored to enable the packet sending function of each line network card; the preset packet sending function is used to filter data packets.

[0013] In one of the embodiments, the host device in the VRRP group is further used to, after restoring the packet sending function of the current network port, if the current network port is a WAN port and the connection mode of the current network port is a dial-up connection, redial to establish a WAN connection.

[0014] In a second aspect, the present application further provides a method for implementing CPE master-slave, the method being applied to the master-slave CPE system of the first aspect above, the system comprising at least one VRRP group, the VRRP group comprising a plurality of CPE devices connected via HA network port communication; the method comprising:

[0015] Each CPE device in the VRRP group performs master-slave negotiation based on device priority to determine the master and backup devices of the VRRP group;

[0016] When any CPE device determines that it is a standby device, it disables the packet sending function of each line network card; or, when it determines that it is a host device, it enables the packet sending function of each line network card.

[0017] In a third aspect, the present application further provides a communication device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the second aspect above are implemented.

[0018] The above-mentioned active-standby CPE system, the implementation method of CPE active-standby and the communication device, the active-standby CPE system includes at least one VRRP group, the VRRP group includes multiple CPE devices connected through HA network port communication; wherein: each CPE device in the VRRP group performs active-standby negotiation based on device priority to determine the host device and the standby device of the VRRP group; any CPE device is used to disable the packet sending function of each line network card when it is determined to be a standby device; or, when it is determined to be a host device, enable the packet sending function of each line network card. In this way, active-standby negotiation is performed within the VRRP group, and the CPE device adjusts the packet sending function according to the active-standby status, so that no matter how the network port of the CPE device is connected to the network, the standby device will not affect the host, especially in the dial-up scenario, it can avoid the occurrence of multi-channel dial-up, so as to form a high-availability system using one or more groups of CPE devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0020] FIG1 is a block diagram of a primary and standby CPE system in one embodiment;

[0021] FIG2 is a schematic diagram of an application of a primary and standby CPE system in one embodiment;

[0022] FIG3 is a schematic diagram of a process flow of a primary and standby CPE system in one embodiment;

[0023] FIG4 is a schematic diagram of a process flow of a primary and standby CPE system in another embodiment;

[0024] FIG. 5 is a diagram showing the internal structure of a communication device in one embodiment. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0026] In order to facilitate understanding of the embodiments provided in this application, some terms that appear in the specific description process are introduced below:

[0027] CPE (Customer Premises Equipment) is the customer front-end equipment or customer premises equipment used to access the Internet or other communication services. For example, routers, modems, wireless access points, gateways, etc. can all be classified as CPE. They are responsible for converting the operator's network services into signals that can be used within the home or enterprise. CPE equipment has the characteristics of low cost and flexible mobility. It can support various lines and scenarios such as operator dedicated lines, ordinary ADSL lines, SIM cards, 4G / 5G / LTE, WIFI, etc., and is widely used.

[0028] HA (Highly Available) high availability cluster is an effective solution to ensure business continuity. It usually has two or more nodes, which are divided into active nodes and standby nodes. Usually, the node that is executing the business is called the active node, and the node that is a backup of the active node is called the standby node. When a problem occurs in the active node, causing the running business (task) to fail to operate normally, the standby node will detect it and immediately take over the active node to execute the business, thereby achieving uninterrupted or short-term interruption of the business.

[0029] It is understandable that there are currently two solutions in the CPE high availability scenario: 1. Using multiple physical link backups; 2. Smart routers (or edge devices).

[0030] The first solution is to deploy two independent CPE devices based on multiple WAN line access methods. Each device is connected to the Internet through different physical lines (such as two different DSL (Digital Subscriber Line) lines or different mobile network SIM (Subscriber Identity Module) cards). Each CPE uses an independent dial-up account and realizes a unified export of external services through upper-layer network devices (such as load balancers or smart switches). Although this method can effectively avoid single point failures, it requires additional line costs and cannot fully utilize all WAN lines.

[0031] The second solution can automatically detect the hardware status and the active / standby status, and automatically execute the backup plan when a fault is detected, including redialing, re-DHCP (Dynamic Host Configuration Protocol) service, updating routing configuration, re-VPN (Virtual Private Network) access and other network settings, etc., to achieve the purpose of failover. However, due to the need to readjust the business and configuration, these operations greatly extend the failover time, and the high availability function is deeply coupled with the business and configuration, which greatly limits the usage scenarios, and does not support access methods such as 4G / 5G / LTE / WIFI.

[0032] Based on this, the present application provides a master-slave CPE system, a method for implementing master-slave CPE, and a communication device. The master-slave CPE system includes at least one VRRP group, and the VRRP group includes multiple CPE devices connected through HA network port communication; wherein: each CPE device in the VRRP group performs master-slave negotiation based on device priority to determine the host device and the backup device of the VRRP group; any CPE device is used to disable the packet sending function of each line network card when it is determined that it is a backup device; or, when it is determined that it is a host device, enable the packet sending function of each line network card. In this way, master-slave negotiation is performed within the VRRP group, and the CPE device adjusts the packet sending function according to the master-slave status, so that no matter how the network port of the CPE device is connected to the network, the backup device will not affect the host, especially in the dial-up scenario, it can avoid the occurrence of multi-channel dialing, so that a high-availability system is formed by one or more groups of CPE devices to achieve high-availability solutions at the device level and line level.

[0033] In an exemplary embodiment, as shown in FIG1 , a master-slave CPE system is provided, the system includes at least one VRRP group 10, the VRRP group 10 includes a plurality of CPE devices 20 connected via HA network port communication; wherein:

[0034] Each CPE device 20 in the VRRP group 10 performs master-slave negotiation based on device priority to determine the master device and the backup device of the VRRP group 10;

[0035] Any CPE device 20 is used to disable the packet sending function of each line network card when it is determined that it is a backup device; or to enable the packet sending function of each line network card when it is determined that it is a host device.

[0036] Among them, VRRP (Virtual Router Redundancy Protocol) is a fault-tolerant protocol for improving network reliability. Through VRRP, when the host device fails, the service is switched to the backup device in time, thereby ensuring the continuity and reliability of network communication. The VRRP group is logically a router. Each CPE device 20 in the VRRP group elects a host device according to the configured device priority to determine the host device and the backup device of the VRRP group 10. Among them, the higher the device priority of a certain CPE device 20, the CPE device 20 is preferentially selected as the host device. In an optional implementation, after the HA function of the CPE device 20 is turned on, its HA network port and the HA network port (available aggregation port) of the opposite end are directly connected to form a group of VRRP instances. The HA heartbeat line adopts the VRRP protocol to determine the real master-slave status of the device. The device priority of the master CPE is high, and the device priority of the backup CPE is low.

[0037] The CPE device 20 decides to disable or enable the packet sending function of each line network card of the CPE device 20 according to the current real-time master-slave status to control and manage the properties of each network port. In an optional implementation method, a Linux network driver is used to achieve the purpose of limiting the standby machine dialing. The driver in the CPE device 20 receives the current real-time master-slave status and decides to disable or enable the packet sending function of each line network card according to the status value. If it is a standby device, the packet sending function of each line network card is disabled; if it is a host device, the packet sending function of each line network card is enabled. Optionally, each CPE device 20 includes a group of wide area network line network cards and a group of local area network line network cards. By disabling the packet sending function of the standby device, the line access mode and service functions will not be affected by the HA function. In this embodiment, the master-slave switching is no longer limited to the network access mode, and is suitable for most usage scenarios such as dial-up, dedicated line, WIFI, 4G / 5G, and is isolated from the service function. There is no need to adjust the configuration and service functions according to the master-slave status, and the processing method is simpler and more convenient.

[0038] In the above-mentioned master-slave CPE system, the master-slave CPE system includes at least one VRRP group, and the VRRP group includes multiple CPE devices connected through HA network port communication; wherein: each CPE device in the VRRP group performs master-slave negotiation based on device priority to determine the host device and the backup device of the VRRP group; any CPE device is used to disable the packet sending function of each line network card when it is determined that it is a backup device; or, when it is determined that it is a host device, enable the packet sending function of each line network card. In this way, master-slave negotiation is performed within the VRRP group, and the CPE device adjusts the packet sending function according to the master-slave status, so that no matter how the network port of the CPE device is connected to the network, the backup device will not affect the host, especially in the dial-up scenario, it can avoid the occurrence of multi-channel dial-up, so as to form a high-availability system using one or more groups of CPE devices.

[0039] In an exemplary embodiment, the CPE device 20 is also used to set its own WAN port group and LAN port group after the network service is started; the WAN port group includes identification information of multiple WAN ports, and the LAN port group includes identification information of multiple LAN ports; based on the WAN port group and the LAN port group, monitor the connection status of each port; based on the connection status of each port, adjust its own device priority.

[0040] Among them, after the network service is started, the CPE device 20 sets different network group areas according to the network configuration. All WAN ports belong to the same WAN port group (i.e., WAN device group), and all LAN ports belong to the same LAN port group (i.e., LAN device group). The configuration of the network ports (WAN ports or LAN ports) of each CPE device 20 in the same VRRP group 10 is the same. By configuring the same network parameters, it is ensured that when the host device fails, the backup device can seamlessly take over the work. The configuration of the HA network ports of each CPE device 20 in the same VRRP group 10 is different, so as to realize the communication, status synchronization and master-slave negotiation between the master and backup devices.

[0041] Optionally, when each CPE device 20 decides to disable or enable the packet sending function of each line network card of the CPE device 20 according to the current real-time master-slave status, it traverses the packet sending function of the line network card of each network port according to its own WAN port group and LAN port group, thereby disabling or enabling the packet sending function of each line network card.

[0042] Each CPE device 20 in the VRRP group 10 monitors the status of all lines based on its own WAN port group and LAN port group to determine the connection status of each port. The connection status includes normal status and abnormal status. When a line of the CPE device 20 fails or a hardware failure occurs, the network port is monitored to be in an abnormal state, and the device priority of the CPE device 20 is adjusted. If the connection status of each port of the CPE device 20 is normal, the original device priority can be maintained.

[0043] In an exemplary embodiment, the master device in VRRP group 10 is used to re-initiate master-slave negotiation in VRRP group 10 to re-determine the master device and the backup device of VRRP group 10 when its own device priority is reduced.

[0044] Among them, after the device priority of the host device is reduced, it restarts to initiate the master-slave negotiation, and re-determines the host device and the backup device of the VRRP group 10 according to the device priority of each CPE device 20 in the VRRP group 10, and selects the CPE device 20 with the highest device priority in the VRRP group 10 as the host device.

[0045] It is understandable that during the active-standby negotiation process, if active-standby switching occurs, each CPE device 20 decides to disable or enable the packet sending function of each line network card according to its own active-standby status, and the network ports of the switched host device function and undertake business and services.

[0046] In an exemplary embodiment, the CPE device 20 is also used to determine the network port priority of the target network port when the connection status of the target network port is abnormal; adjust its own device priority according to the network port priority; the target network port is any wide area network port or local area network port managed by the CPE device 20.

[0047] In the network configuration, a network port priority is configured for each network port to indicate the importance of the network port. For example, if a network line is used less frequently, a lower network port priority is set for the network port. Optionally, a device priority adjustment strategy is set in advance, based on which the network port priority is mapped to a device priority adjustment amount, and the device priority is adjusted based on the priority adjustment amount. The adjustment method is specifically to maintain the device priority or reduce the device priority.

[0048] It is understandable that when a line failure or hardware failure occurs in a host device, the host device adjusts its own device priority according to the priority of the network port in the abnormal state. When the device priority is lowered, the master and backup are renegotiated to achieve automatic failure switching.

[0049] In an exemplary embodiment, the CPE device 20 is also used to lower its own device priority when the network port priority of the target network port is not lower than the preset priority; and to maintain its own device priority when the network port priority of the target network port is lower than the preset priority.

[0050] The preset priority is a threshold value set according to actual conditions. If the network port priority of the target network port is not lower than the preset priority, it indicates that the faulty line is an important line, and the device priority of the CPE device 20 is reduced. If the network port priority of the target network port is lower than the preset priority, it indicates that the faulty line is a non-important line, and the device priority of the CPE device 20 is maintained.

[0051] In this embodiment, the VRRP protocol and track interface solution are used to track the line status of each WAN and LAN port. Each network port is set with a corresponding network port priority. The HA network port can track the line priority and automatically adjust the device priority, thereby automatically selecting the CPE device with good line quality as the host device, and intelligently negotiating the master and backup according to the line priority.

[0052] In an exemplary embodiment, the backup device in VRRP group 10 is used to replace the packet sending function of all network ports managed by itself with a preset packet sending function to disable the packet sending function of each line network card; the preset packet sending function is used to filter data packets.

[0053] Among them, since the Internet line generally adopts adsl dial-up access mode, and the operator prohibits multicasting of the same account, it is necessary to ensure that the standby device cannot dial. In this embodiment, the standby device replaces the original packet sending function with a preset packet sending function for filtering data packets to disable the packet sending function of each line network card.

[0054] In an optional implementation, the Linux network driver is used to achieve the purpose of limiting the standby machine dialing. The driver receives the current real-time master-slave status and decides to disable or enable the packet sending function of each line network card according to the master-slave status. If it is a standby device, the net_device_ops->ndo_start_xmit packet sending function in the kernel net_device structure is replaced with a customized my_start_xmit function (i.e., a preset packet sending function). It can be understood that the processing logic of the preset packet sending function can be customized. Optionally, the processing logic of the preset packet sending function is: directly release skb (Socket Buffer, a data structure used to transmit data in the network protocol stack), and then return NETDEV_TX_OK, so that the kernel believes that the data packet has been processed correctly. At this time, the WAN and LAN ports of the standby device cannot send data packets, which is equivalent to the standby device disabling the packet sending function of each line network card (if the network port adopts a dial-up access method, the standby device is equivalent to not being able to dial at this time), so that only the WAN and LAN ports of the host device in the same VRRP group 10 are effective. Optionally, the customized net_device xmit function can be expanded and adjusted according to business conditions. For example, some packets can be allowed to pass according to BPF (Berkeley Packet Filter) rules, some packets can be blocked according to blacklists and whitelists, etc.; it can be applicable to multi-active scenarios.

[0055] In an optional implementation method, the backup device traverses all network ports based on its own WAN port group and LAN port group, and checks whether the xmit packet sending function of the traversed network port has been replaced. If not, the packet sending function of the traversed network port is replaced with a custom xmit function to disable the packet sending function of each line network card of the backup device.

[0056] In this embodiment, based on a customized preset packet sending function, the CPE device can control the functions of each network port of the device according to the active / standby status, such as the packet sending function, and isolate the HA function from other business functions, thereby preventing the network access method or business function from being affected by the function change of HA, and providing a wider range of usage scenarios.

[0057] In an exemplary embodiment, the host device in VRRP group 10 is used to detect whether the packet sending function of each network port managed by itself is replaced by a preset packet sending function; if it is detected that the packet sending function of the current network port is replaced by the preset packet sending function, the packet sending function of the current network port is restored to enable the packet sending function of each line network card; the preset packet sending function is used to filter data packets.

[0058] Among them, the host device traverses all network ports based on its own WAN port group and LAN port group, and checks whether the xmit packet sending function of the traversed network port is replaced. If replaced, the xmit packet sending function is restored and the network port is re-enabled, which is equivalent to restoring the network card function.

[0059] In an exemplary embodiment, the host device in VRRP group 10 is further configured to, after restoring the packet sending function of the current network port, if the current network port is a WAN port and the connection mode of the current network port is a dial-up connection, redial to establish a WAN connection.

[0060] Among them, after restoring the packet sending function of the current network port, if it is a WAN network port and a dial-up connection is adopted, the host device dials again to achieve network connection.

[0061] In an optional implementation, refer to FIG. 2, which is an application diagram of the active-standby CPE system in one embodiment. The network environment includes access switches, CPE (including WAN / LAN ports), intranet switches, intranet terminals, clients and servers, etc. After the CPE is started, the attribute area of ​​the network port is identified, and the HA ports of CPE1 and CPE2 are directly connected through a network cable, and the VRRP protocol is used to select the active and standby ports. At the same time, the connection status of all WAN and LAN ports is tracked, each network port is set with a network port priority, and each CPE device is set with a device priority. The device with a high device priority is the host device (ie, Master), and the device with a low device priority is the standby device (ie, Backup). The network port priority in each CPE device affects the device priority. If a WAN or LAN failure occurs, the HA device priority may change, resulting in active-standby switching. When the active / standby state of CPE is standby, the driver replaces the packet sending function ndo_start_xmit of the net_device of the WAN and LAN ports with a custom xmit function, and directly returns NETDEV_TX_OK, so that no matter what access method the WAN port uses (such as adsl or fixed IP, etc.), the standby device will not affect the host device. In this way, two or more CPE devices can form a high-availability system.

[0062] Based on the same inventive concept, the embodiment of the present application also provides a CPE active standby implementation method applied to the active standby CPE system involved above. The implementation solution provided by the method to solve the problem is similar to the implementation solution recorded in the above system, so the specific limitations in the implementation method embodiments of one or more CPE active standby provided below can refer to the limitations on the active standby CPE system above, and will not be repeated here.

[0063] In an exemplary embodiment, as shown in FIG3 , the present application further provides a method for implementing CPE master-slave, the method being applied to the master-slave CPE system of the first aspect above, the system comprising at least one VRRP group, the VRRP group comprising a plurality of CPE devices connected via HA network port communication; the method comprising:

[0064] Step 302: Each CPE device in the VRRP group performs master-slave negotiation based on device priority to determine the master device and the backup device of the VRRP group.

[0065] Step 304: any CPE device, when determining that it is a standby device, disables the packet sending function of each line network card; or, when determining that it is a host device, enables the packet sending function of each line network card.

[0066] In the above-mentioned CPE master-slave implementation method, the master-slave CPE system includes at least one VRRP group, and the VRRP group includes multiple CPE devices connected through HA network port communication; wherein: each CPE device in the VRRP group performs master-slave negotiation based on device priority to determine the host device and the backup device of the VRRP group; any CPE device is used to disable the packet sending function of each line network card when it is determined that it is a backup device; or, when it is determined that it is a host device, enable the packet sending function of each line network card. In this way, master-slave negotiation is performed within the VRRP group, and the CPE device adjusts the packet sending function according to the master-slave status, so that no matter how the network port of the CPE device is connected to the network, the backup device will not affect the host, especially in the dial-up scenario, it can avoid the occurrence of multi-channel dial-up, thereby using one or more groups of CPE devices to form a high-availability system.

[0067] In an exemplary embodiment, the method also includes: after the network service is started, the CPE device sets its own WAN port group and LAN port group; the WAN port group includes identification information of multiple WAN ports, and the LAN port group includes identification information of multiple LAN ports; based on the WAN port group and the LAN port group, the connection status of each port is monitored; based on the connection status of each port, the device priority of the device itself is adjusted.

[0068] In an exemplary embodiment, the method further includes: when the device priority of the host device in the VRRP group is reduced, the host device in the VRRP group re-initiates master-slave negotiation in the VRRP group to re-determine the host device and the backup device of the VRRP group.

[0069] In an exemplary embodiment, the method also includes: when the connection status of the target network port is abnormal, the CPE device determines the network port priority of the target network port; according to the network port priority, adjusts its own device priority; the target network port is any wide area network port or local area network port managed by the CPE device.

[0070] In an exemplary embodiment, the method also includes: when the network port priority of the target network port is not lower than the preset priority, the CPE device lowers its own device priority; when the network port priority of the target network port is lower than the preset priority, the CPE device maintains its own device priority.

[0071] In an exemplary embodiment, the method further includes: the backup device in the VRRP group replaces the packet sending function of all network ports managed by itself with a preset packet sending function to disable the packet sending function of each line network card; the preset packet sending function is used to filter data packets.

[0072] In an exemplary embodiment, the method further includes: the host device in the VRRP group detects whether the packet sending function of each network port managed by itself is replaced by a preset packet sending function; if it is detected that the packet sending function of the current network port is replaced by the preset packet sending function, the packet sending function of the current network port is restored to enable the packet sending function of each line network card; the preset packet sending function is used to filter data packets.

[0073] In an exemplary embodiment, the method further includes: after the host device in the VRRP group restores the packet sending function of the current network port, if the current network port is a WAN port and the connection mode of the current network port is a dial-up connection, redialing to establish a WAN connection.

[0074] In an exemplary embodiment, referring to FIG. 4 , the implementation method of CPE master-slave includes the following steps: Network initialization. WAN / LAN grouping: After the network service is started, different network group areas are set according to the network configuration, and all WAN ports belong to the same WAN port group, and all LAN ports belong to the same LAN port group. HA VRRP startup: After the CPE turns on the HA function, its HA port and the HA port of the other end are directly connected to form a group of VRRP instances. Monitor WAN / LAN lines: Monitor the connection status of all WAN and LAN ports. If the line changes, VRRP will run for master-slave. The CPE device determines whether it is a host device. The host device traverses the network port to determine whether the traversed network port is WAN / LAN; for the WAN / LAN port, determine whether the xmit packet sending function has been replaced; if it has been replaced, restore the xmit packet sending function and send a free ARP. The standby device traverses the network port and determines whether the traversed network port is WAN / LAN; for the WAN / LAN network port, it determines whether the xmit packet sending function has been replaced; if it has not been replaced, it is replaced with a custom xmit packet sending function.

[0075] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0076] In an exemplary embodiment, a communication device is provided, which may be a server, and its internal structure diagram may be shown in FIG5. The communication device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the communication device is used to provide computing and control capabilities. The memory of the communication device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the communication device is used to exchange information between the processor and an external device. The communication interface of the communication device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a master-slave CPE system is implemented.

[0077] Those skilled in the art will understand that the structure shown in FIG. 5 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the communication device to which the scheme of the present application is applied. The specific communication device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0078] In an exemplary embodiment, a communication device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: each CPE device in a VRRP group performs a master-slave negotiation based on device priority to determine a master device and a backup device of the VRRP group; when any CPE device determines that it is a backup device, it disables the packet sending function of each line network card; or, when it determines that it is a master device, it enables the packet sending function of each line network card.

[0079] In one embodiment, the processor further implements the following steps when executing the computer program: after the network service is started, the CPE device sets its own WAN port group and LAN port group; the WAN port group includes identification information of multiple WAN ports, and the LAN port group includes identification information of multiple LAN ports; based on the WAN port group and the LAN port group, the connection status of each port is monitored; based on the connection status of each port, the device priority of the device itself is adjusted.

[0080] In one embodiment, when the processor executes the computer program, the following steps are further implemented: when the host device in the VRRP group has its device priority reduced, the host device in the VRRP group re-initiates master-slave negotiation within the VRRP group to re-determine the host device and the backup device of the VRRP group.

[0081] In one embodiment, the processor also implements the following steps when executing the computer program: when the connection status of the target network port is abnormal, the CPE device determines the network port priority of the target network port; according to the network port priority, adjusts its own device priority; the target network port is any wide area network port or local area network port managed by the CPE device.

[0082] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the network port priority of the target network port is not lower than the preset priority, the CPE device lowers its own device priority; when the network port priority of the target network port is lower than the preset priority, the CPE device maintains its own device priority.

[0083] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the backup device in the VRRP group replaces the packet sending function of all network ports managed by itself with a preset packet sending function to disable the packet sending function of each line network card; the preset packet sending function is used to filter data packets.

[0084] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the host device in the VRRP group detects whether the packet sending function of each network port managed by itself is replaced by a preset packet sending function; if it is detected that the packet sending function of the current network port is replaced by the preset packet sending function, the packet sending function of the current network port is restored to enable the packet sending function of each line network card; the preset packet sending function is used to filter data packets.

[0085] In one embodiment, when the processor executes the computer program, the following steps are further implemented: after the host device in the VRRP group restores the packet sending function of the current network port, if the current network port is a wide area network port and the connection mode of the current network port is a dial-up connection, it redials to establish a wide area network connection.

[0086] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0087] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0088] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0089] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A master-slave CPE system, characterized in that: The system includes at least one VRRP group, and the VRRP group includes a plurality of CPE devices connected through HA network port communication; wherein: Each CPE device in the VRRP group performs a master-slave negotiation based on device priority to determine a master device and a backup device of the VRRP group; Any CPE device is used to disable the packet sending function of each line network card when it is determined that it is a backup device; or to enable the packet sending function of each line network card when it is determined that it is a host device.

2. The system according to claim 1, characterized in that The CPE device is also used to set its own WAN port group and LAN port group after the network service is started; the WAN port group includes identification information of multiple WAN ports, and the LAN port group includes identification information of multiple LAN ports; based on the WAN port group and the LAN port group, monitor the connection status of each port; based on the connection status of each port, adjust its own device priority.

3. The system according to claim 2, characterized in that The master device in the VRRP group is used to re-initiate master-slave negotiation in the VRRP group and re-determine the master device and the backup device of the VRRP group when the priority of the device itself is reduced.

4. The system according to claim 2, characterized in that The CPE device is also used to determine the network port priority of the target network port when the connection status of the target network port is abnormal; adjust its own device priority according to the network port priority; the target network port is any wide area network port or local area network port managed by the CPE device.

5. The system according to claim 4, characterized in that The CPE device is also used to reduce its own device priority when the network port priority of the target network port is not lower than the preset priority; and maintain its own device priority when the network port priority of the target network port is lower than the preset priority.

6. The system according to any one of claims 1 to 5, characterized in that: The standby device in the VRRP group is used to replace the packet sending function of all network ports managed by itself with a preset packet sending function to disable the packet sending function of each line network card; the preset packet sending function is used to filter data packets.

7. The system according to any one of claims 1 to 5, characterized in that: The host device in the VRRP group is used to detect whether the packet sending function of each network port managed by itself is replaced by a preset packet sending function; if it is detected that the packet sending function of the current network port is replaced by the preset packet sending function, the packet sending function of the current network port is restored to enable the packet sending function of each line network card; the preset packet sending function is used to filter data packets.

8. The system according to claim 7, characterized in that The host device in the VRRP group is further configured to, after restoring the packet sending function of the current network port, if the current network port is a WAN port and the connection mode of the current network port is a dial-up connection, redial to establish a WAN connection.

9. A method for implementing CPE master-slave, characterized in that: The method is applied to the active-standby CPE system according to any one of claims 1 to 8, wherein the system includes at least one VRRP group, and the VRRP group includes a plurality of CPE devices connected through HA network port communication; the method includes: Each CPE device in the VRRP group performs a master-slave negotiation based on device priority to determine a master device and a backup device of the VRRP group; When any CPE device determines that it is a standby device, it disables the packet sending function of each line network card; or, when it determines that it is a host device, it enables the packet sending function of each line network card.

10. A communication device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to claim 9 are implemented.

Citation Information

Patent Citations

  • Protecting method and device for cut-in device up connection service

    CN101051885A

  • An address resolution optimization procedure to effect a gradual cutover from a provider bridge network to a VPLS or provider backbone bridging network

    CN102422600A

  • Main-standby switching method and device

    CN105591902A

  • Multi-CPE (customer premise equipment) redundant link system and method

    CN106788921A

  • Communication method and device

    CN116896756A