Master-slave cpe system, cpe master-slave implementation method and communication device

By determining the device priority of the primary and backup CPE devices through VRRP group negotiation and adjusting the packet sending function according to the status, the high availability problem of CPE devices under Internet dial-up access is solved, and high reliability and seamless switching under multiple network access methods are achieved.

CN119561661BActive Publication Date: 2026-04-17CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CLOUD TECH CO LTD
Filing Date
2024-11-29
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In internet dial-up access networking scenarios, existing technologies struggle to achieve high availability solutions for CPE devices, especially due to the lack of IP addresses for WAN line interfaces and operator restrictions on multiple dial-ups, which prevents load balancing solutions from being effectively applied.

Method used

VRRP groups are used for primary and backup negotiation. The primary and backup devices are determined by device priority, and the packet sending function of the CPE device is adjusted according to the primary and backup status. The packet sending function of the line network card is disabled or enabled to achieve a high availability system.

Benefits of technology

Under any network access method, the backup device will not affect the main device, avoiding multiple dialing situations and forming a highly available system, suitable for various access scenarios such as dialing, leased lines, WIFI, 4G/5G, etc.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119561661B_ABST
    Figure CN119561661B_ABST
Patent Text Reader

Abstract

This application relates to a primary / standby CPE system, a method for implementing primary / standby CPE, and communication equipment. The primary / standby CPE system includes at least one VRRP group, which comprises multiple CPE devices connected via HA network ports. Each CPE device in the VRRP group negotiates primary / standby status based on device priority to determine the primary and standby devices. Any CPE device that determines itself as a standby device disables the packet sending function of its network interface cards (NICs) on each line; or that determines itself as a primary device enables the packet sending function of its NICs on each line. Primary / standby negotiation occurs within the VRRP group, and the CPE devices adjust their packet sending functions according to the primary / standby status. This ensures that regardless of how the CPE devices access the network, the standby device will not affect the primary device. Especially in dial-up scenarios, this avoids multiple dial-up connections, thus enabling a high-availability system using one or more groups of CPE devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technology, and in particular to a primary / backup CPE system, a method for implementing primary / backup CPE, and communication equipment. Background Technology

[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 branch offices to connect users to service providers' networks due to their low cost and high flexibility. However, CPE network access methods are complex and diverse, including leased lines, internet access, 4G / 5G / LTE, and Wi-Fi access. For commonly used internet ADSL (Asymmetric Digital Subscriber Line) dial-up scenarios or hybrid wired network scenarios, the lack of IP (Internet Protocol) addresses on WAN (Wide Area Network) line interfaces and operator restrictions on multi-dialing make it impossible to simply use current IP-based load balancing solutions to achieve high availability for CPEs. Summary of the Invention

[0003] Therefore, it is necessary to provide a primary / backup CPE system, a method for implementing primary / backup CPE, and communication equipment to address the aforementioned technical issues. This system can achieve a highly available primary / backup CPE system in CPE usage scenarios using Internet dial-up access networking.

[0004] In a first aspect, this application provides a primary / standby CPE system, the system including at least one VRRP group, the VRRP group including multiple CPE devices connected via HA network ports; wherein:

[0005] Each CPE device in the VRRP group negotiates primary and backup devices based on device priority to determine the master and backup devices of the VRRP group.

[0006] Any CPE device can disable the packet sending function of each line network card when it determines itself to be a backup device; or enable the packet sending function of each line network card when it determines itself to be a master device.

[0007] In one embodiment, the CPE device is further configured 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, it monitors the connection status of each port; and based on the connection status of each port, it adjusts its own device priority.

[0008] In one embodiment, the host device in the VRRP group is configured to re-initiate master-slave negotiation within the VRRP group and re-determine the host device and standby device of the VRRP group when its own device priority is reduced.

[0009] In one embodiment, the CPE device is further configured to determine the network port priority of the target network port when the connection status of the target network port is abnormal; and 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 embodiment, the CPE device is further configured to reduce its own device priority when the target network port's network port priority is not lower than a preset priority; and to maintain its own device priority when the target network port's network port priority is lower than the preset priority.

[0011] In one embodiment, the standby device in the VRRP group is used to replace the packet sending function of all network interfaces it manages 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 embodiment, the host device in the VRRP group is used to detect whether the packet sending function of each network interface it manages has been replaced with a preset packet sending function; if it is detected that the packet sending function of the current network interface has been replaced with the preset packet sending function, the packet sending function of the current network interface 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 embodiment, the host device in the VRRP group is further configured to, after restoring the packet sending function of the current network port, redial to establish a wide area network connection if the current network port is a wide area network port and the connection mode of the current network port is dial-up connection.

[0014] Secondly, this application also provides a method for implementing a primary / standby CPE, the method being applied to the primary / standby CPE system as described in the first aspect above, the system including at least one VRRP group, the VRRP group including multiple CPE devices connected via HA network ports; the method includes:

[0015] Each CPE device in the VRRP group negotiates primary and backup devices based on device priority to determine the master and backup devices of the VRRP group.

[0016] Any CPE device can disable the packet sending function of each line's network card when it determines itself to be a backup device; or, when it determines itself to be a master device, enable the packet sending function of each line's network card.

[0017] Thirdly, this application also provides a communication device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in the second aspect above.

[0018] The aforementioned primary / standby CPE system, its implementation method, and communication equipment include at least one VRRP group, which comprises multiple CPE devices connected via HA network ports. Within the VRRP group, each CPE device negotiates its primary / standby status based on device priority to determine the master and standby devices. Any CPE device, when designated as a standby device, disables the packet sending function of its network interface cards (NICs) on each line; or, when designated as a master device, enables the packet sending function of its NICs on each line. Through this method, primary / standby negotiation occurs within the VRRP group, and the CPE devices adjust their packet sending functions according to their primary / standby status. This ensures that regardless of how the CPE devices access the network, the standby device will not affect the master device. This is particularly beneficial in dial-up scenarios, preventing multiple dial-ups and thus enabling a high-availability system using one or more groups of CPE devices. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a block diagram of a primary / standby CPE system in one embodiment;

[0021] Figure 2 This is a schematic diagram illustrating the application of a primary / standby CPE system in one embodiment;

[0022] Figure 3 This is a flowchart illustrating the primary and backup CPE system in one embodiment;

[0023] Figure 4 This is a flowchart illustrating the primary and backup CPE system in another embodiment;

[0024] Figure 5 This is an internal structural diagram of a communication device in one embodiment. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0026] To facilitate understanding of the embodiments provided in this application, some terms that appear in the detailed description are introduced below:

[0027] CPE (Customer Premises Equipment) refers to customer-facing equipment or on-premises equipment used to access the internet or other communication services. Examples include routers, modems, wireless access points, and gateways. They are responsible for converting the operator's network services into signals usable within homes or businesses. CPE devices are characterized by low cost and mobility, supporting various lines and scenarios such as operator leased lines, ordinary ADSL lines, SIM cards, 4G / 5G / LTE, and Wi-Fi, making them widely used.

[0028] HA (Highly Available) clusters are an effective solution for ensuring business continuity. They typically consist of two or more nodes, designated as active and standby nodes. The node currently executing business operations is called the active node, while the backup node is called the standby node. When the active node fails, causing the running business (task) to malfunction, the standby node detects this and immediately takes over the business operations, thus ensuring uninterrupted or only temporarily interrupted business operations.

[0029] Understandably, there are currently two solutions for high availability CPE scenarios: 1. Using multiple physical link backups; 2. Smart routers (or edge devices).

[0030] The first solution involves deploying two independent CPE devices based on the multiple WAN line access method. Each device connects to the internet via a different physical line (such as two different DSL (Digital Subscriber Line) lines or different mobile network SIM (Subscriber Identity SIM) cards). Each CPE uses an independent dial-up account, achieving a unified external service exit through upper-layer network devices (such as load balancers or intelligent switches). While this approach effectively avoids single points of failure, it incurs additional line costs and cannot fully utilize all WAN lines.

[0031] The second solution can automatically detect hardware status and primary / backup status, and automatically execute a backup plan when a fault is detected. This includes redialing, re-activating DHCP (Dynamic Host Configuration Protocol) service, updating routing configurations, and re-activating VPN (Virtual Private Network) access and other network settings to achieve failover. However, because these operations require readjusting services and configurations, they significantly extend the failover time. Furthermore, the high availability function is deeply coupled with services and configurations, greatly limiting its use cases, and it does not support 4G / 5G / LTE / Wi-Fi access methods.

[0032] Based on this, this application provides a primary / standby CPE system, a method for implementing primary / standby CPE, and communication equipment. The primary / standby CPE system includes at least one VRRP group, and the VRRP group includes multiple CPE devices connected via HA network ports. Specifically, each CPE device in the VRRP group negotiates primary / standby status based on device priority to determine the master and standby devices of the VRRP group. Any CPE device, when determining itself as a standby device, disables the packet sending function of each line's network interface card; or, when determining itself as a master device, enables the packet sending function of each line's network interface card. In this way, primary / standby negotiation occurs within the VRRP group, and the CPE devices adjust their packet sending functions according to the primary / standby status. This ensures that regardless of how the CPE device's network port accesses the network, the standby device will not affect the master device. Especially in dial-up scenarios, this avoids multiple dial-ups, thus utilizing one or more groups of CPE devices to form a high-availability system, achieving high availability at both the device and line levels.

[0033] In one exemplary embodiment, such as Figure 1 As shown, a primary / standby CPE system is provided. The system includes at least one VRRP group 10, and the VRRP group 10 includes multiple CPE devices 20 connected via HA network ports; wherein:

[0034] Each CPE device 20 in VRRP group 10 negotiates primary and backup based on device priority to determine the primary and backup devices of VRRP group 10.

[0035] Any CPE device 20 can disable the packet sending function of each line network card when it determines that it is a backup device; or enable the packet sending function of each line network card when it determines that it is a master device.

[0036] VRRP (Virtual Router Redundancy Protocol) is a fault-tolerant protocol used to improve network reliability. Through VRRP, when a host device fails, services are promptly switched to a backup device, thus ensuring the continuity and reliability of network communication. Logically, a VRRP group is a single router. Each CPE device 20 in the VRRP group elects a host device based on its configured device priority, determining the host and backup devices of the VRRP group 10. The higher the device priority of a particular CPE device 20, the more likely it is to be selected as the host device. In one optional implementation, after enabling HA (High Availability) functionality, the HA port of a CPE device 20 is directly connected to the HA port (or aggregated port) of the peer, forming a VRRP instance. The HA heartbeat line uses the VRRP protocol to determine the actual host / backup status of the devices, with the host CPE having a higher priority and the backup CPE having a lower priority.

[0037] Based on the current real-time primary / standby status, CPE device 20 determines whether to disable or enable the packet sending function of each line network card to control and manage the attributes of each network port. In one optional implementation, a Linux network driver is used to restrict standby dialing. The driver in CPE device 20 receives the current real-time primary / standby status and determines whether to disable or enable the packet sending function of each line network card based on the status value. If it is a standby device, the packet sending function of each line network card is disabled; if it is a primary device, the packet sending function of each line network card is enabled. Optionally, each CPE device 20 includes a set of WAN line network cards and a set of LAN line network cards. By disabling the packet sending function of the standby device, the line access method and service functions are not affected by the HA function. In this embodiment, primary / standby switching is no longer limited by the network access method, applicable to most usage scenarios such as dial-up, leased lines, WIFI, 4G / 5G, etc., and is isolated from service functions. It does not require adjusting configurations and service functions based on the primary / standby status, making the process simpler and more convenient.

[0038] In the aforementioned primary / standby CPE system, the system includes at least one VRRP group, which comprises multiple CPE devices connected via HA network ports. Within the VRRP group, each CPE device negotiates its primary / standby status based on device priority to determine the master and standby devices. Any CPE device, when designated as a standby device, disables the packet sending function of its network interface cards (NICs) on each line; or, when designated as the master device, enables the packet sending function of its NICs on each line. Through this method, primary / standby negotiation occurs within the VRRP group, and the CPE devices adjust their packet sending functions according to their primary / standby status. This ensures that regardless of how the CPE devices access the network, the standby device will not affect the master device. This is particularly beneficial in dial-up scenarios, preventing multiple dial-ups and thus enabling a high-availability system using one or more groups of CPE devices.

[0039] In an exemplary embodiment, the CPE device 20 is further configured 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, it monitors the connection status of each port; and based on the connection status of each port, it adjusts its own device priority.

[0040] In this setup, after network services are started, CPE devices 20 are configured with different network group areas based on network configuration. All WAN ports belong to the same WAN device group, and all LAN ports belong to the same LAN device group. Within the same VRRP group 10, the network ports (WAN or LAN ports) of each CPE device 20 are configured identically. By configuring the same network parameters, it is ensured that the backup device can seamlessly take over when the primary device fails. The HA ports of each CPE device 20 within the same VRRP group 10 are configured differently to enable communication, status synchronization, and primary / backup negotiation between the primary and backup devices.

[0041] Optionally, when each CPE device 20 decides to disable or enable the packet sending function of each line network card based on the current real-time primary / backup 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] In VRRP group 10, each CPE device 20 monitors the status of all lines based on its own WAN and LAN port groups to determine the connection status of each port. Connection status includes normal and abnormal states. If a line or hardware failure occurs on a CPE device 20, and an abnormal state is detected, the device priority of the CPE device 20 is adjusted. If the connection status of all ports on the CPE device 20 is normal, the original device priority can be maintained.

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

[0044] In this process, after the device priority is reduced, the host device restarts and initiates a primary / backup negotiation. Based on the device priority of each CPE device 20 in VRRP group 10, the host device and backup device of VRRP group 10 are re-determined, and the CPE device 20 with the highest device priority in VRRP group 10 is selected as the host device.

[0045] Understandably, during the primary / backup negotiation process, if a primary / backup switch occurs, each CPE device 20 will decide to disable or enable the packet sending function of each line network card based on its own primary / backup status. After the switch, each network port of the host device will come into play and undertake business and services.

[0046] In an exemplary embodiment, the CPE device 20 is further configured to determine the network port priority of the target network port when the connection status of the target network port is abnormal; and 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 20.

[0047] In the network configuration, each network port is assigned a priority to indicate its importance. For example, a network line with low usage frequency will have a lower priority for its network port. Optionally, a device priority adjustment policy is pre-configured. Based on this policy, the network port priority is mapped to a device priority adjustment amount, and the device priority is adjusted based on this adjustment amount. Specifically, the adjustment method is to maintain the device priority or reduce the device priority.

[0048] Understandably, when a host device experiences a line or hardware failure, it adjusts its own device priority based on the priority of the network interface in the abnormal state. If the device priority is lowered, the primary / backup mechanism is renegotiated to achieve automatic failover.

[0049] In an exemplary embodiment, the CPE device 20 is further configured to reduce its own device priority when the target network port's network port priority is not lower than a preset priority; and to maintain its own device priority when the target network port's network port priority is lower than the preset priority.

[0050] The preset priority is a threshold set according to the actual situation. If the 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 priority of CPE device 20 is reduced. If the 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 priority of CPE device 20 is maintained.

[0051] In this embodiment, the VRRP protocol and track interface scheme 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 primary and backup based on the line priority.

[0052] In an exemplary embodiment, the standby device in VRRP group 10 is used to replace the packet sending function of all network interfaces it manages 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] Since internet lines typically use ADSL dial-up access, and ISPs prohibit multicasting with the same account, it's necessary to ensure that the backup device cannot dial. In this embodiment, the backup device replaces its original packet sending function with a preset packet sending function that filters data packets, thereby disabling the packet sending function of each network card.

[0054] In one optional implementation, the Linux network driver is used to restrict the standby device's dialing functionality. The driver receives the current real-time primary / standby status and determines whether to disable or enable the packet sending function of each network interface card (NIC) based on this status. If it is a standby device, the packet sending function `net_device_ops->ndo_start_xmit` in the kernel's `net_device` structure is replaced with a custom function `my_start_xmit` (i.e., the default packet sending function). It is understood that the processing logic of the default packet sending function can be customized. Optionally, the processing logic of the default packet sending function is: directly release the skb (Socket Buffer, a data structure used for data transmission in the network protocol stack), and then return `NETDEV_TX_OK`, making the kernel believe that the data packet has been correctly processed. At this time, the WAN and LAN ports of the standby device cannot send data packets, which is equivalent to disabling the packet sending function of each NIC on the standby device (if the network interface uses dial-up access, the standby device will not dial at all), so that only the WAN and LAN ports of the primary device are active in the same VRRP group 10. Optionally, the custom net_device xmit function can be extended and adjusted according to business needs, such as allowing certain packets to pass according to BPF (Berkeley Packet Filter) rules, or blocking certain packets according to blacklists and whitelists, etc.; it can be applied to multi-active scenarios.

[0055] In one optional implementation, the standby device traverses all network ports based on its own WAN and LAN port groups, checks whether the xmit packet sending function of the traversed network ports has been replaced, and if not, replaces the packet sending function of the traversed network ports with a custom xmit function, thereby disabling the packet sending function of each line network card of the standby device.

[0056] In this embodiment, based on a custom preset packet sending function, the CPE device can control the functions of each network port of the device according to the primary and backup status, such as the packet sending function, and isolate the HA function from other service functions, so as to avoid changes in network access methods or service functions due to changes in HA functions, and the application scenarios are more extensive.

[0057] In an exemplary embodiment, the host device in VRRP group 10 is used to detect whether the packet sending function of each network interface it manages has been replaced with a preset packet sending function; if it is detected that the packet sending function of the current network interface has been replaced with the preset packet sending function, the packet sending function of the current network interface 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] The host device traverses all network ports based on its own WAN and LAN port groups, checks whether the xmit packet sending function of the traversed network port has been replaced, and if it has been replaced, restores the xmit packet sending function and re-enables the network port, 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, redial to establish a wide area network connection if the current network port is a wide area network port and the connection mode of the current network port is dial-up connection.

[0060] Specifically, after restoring the packet sending function of the current network port, if it is a WAN network port using a dial-up connection, the host device will redial to establish a network connection.

[0061] In one alternative implementation, refer to Figure 2 , Figure 2 This is a schematic diagram illustrating the application of a primary / standby CPE system in one embodiment. The network environment includes access switches, CPEs (including WAN / LAN ports), intranet switches, intranet terminals, clients, and servers. After the CPE starts up, it identifies the attribute area of ​​the network ports. The HA ports of CPE1 and CPE2 are directly connected via network cables, and the VRRP protocol is used to select the primary and standby devices. Simultaneously, the connection status of all WAN and LAN ports is tracked. Each port has a port priority, and each CPE device has a device priority. The device with the higher priority is the primary device (Master), and the device with the lower priority is the standby device (Backup). The port priority of each CPE device affects the device priority. If a WAN or LAN failure occurs, the HA device priority may change, resulting in a primary / standby switchover. When the CPE is in standby mode, the driver replaces the packet sending function ndo_start_xmit of net_device for the WAN and LAN ports with a custom xmit function and directly returns NETDEV_TX_OK. This ensures that the standby device will not affect the host device regardless of the WAN port access method (e.g., ADSL or fixed IP). In this way, two or more CPE devices can be combined into a high-availability system.

[0062] Based on the same inventive concept, this application also provides a method for implementing a primary / backup CPE system applied to the aforementioned primary / backup CPE system. The solution provided by this method is similar to the implementation scheme described in the above system; therefore, the specific limitations in one or more CPE primary / backup implementation method embodiments provided below can be found in the limitations of the primary / backup CPE system described above, and will not be repeated here.

[0063] In one exemplary embodiment, such as Figure 3 As shown, this application also provides a method for implementing a primary / standby CPE, the method being applied to the primary / standby CPE system of the first aspect above, the system including at least one VRRP group, the VRRP group including multiple CPE devices connected via HA network ports; the method includes:

[0064] Step 302: Each CPE device in the VRRP group negotiates primary and backup based on device priority to determine the primary and backup devices of the VRRP group.

[0065] Step 304: If any CPE device determines that it is a backup device, it disables the packet sending function of each line network card; or, if it determines that it is a master device, it enables the packet sending function of each line network card.

[0066] In the aforementioned CPE primary / backup implementation method, the primary / backup CPE system includes at least one VRRP group, which comprises multiple CPE devices connected via HA network ports. Specifically, each CPE device in the VRRP group negotiates primary / backup status based on device priority to determine the primary and backup devices. Any CPE device, when determining itself as a backup device, disables the packet sending function of its network interface cards (NICs) on each line; or, when determining itself as a primary device, enables the packet sending function of its NICs on each line. Through this method, primary / backup negotiation occurs within the VRRP group, and the CPE devices adjust their packet sending functions according to the primary / backup status. This ensures that regardless of how the CPE devices access the network, the backup device will not affect the primary device. Especially in dial-up scenarios, this avoids multiple dial-up connections, thus enabling a high-availability system using one or more groups of CPE devices.

[0067] In an exemplary embodiment, the method further 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, it monitors the connection status of each port; based on the connection status of each port, it adjusts its own device priority.

[0068] In an exemplary embodiment, the method further includes: when the host device in the VRRP group has its own device priority reduced, it re-initiates primary / backup negotiation within the VRRP group to re-determine the host device and backup device of the VRRP group.

[0069] In an exemplary embodiment, the method further 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; and adjusts 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.

[0070] In an exemplary embodiment, the method further includes: the CPE device lowering its own device priority when the target network port's network port priority is not lower than a preset priority; and maintaining its own device priority when the target network port's network port priority is lower than the preset priority.

[0071] In an exemplary embodiment, the method further includes: the standby device in the VRRP group replaces the packet sending function of all network interfaces it manages 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 detecting whether the packet sending function of each network interface it manages has been replaced with a preset packet sending function; if it is detected that the packet sending function of the current network interface has been replaced with the preset packet sending function, the packet sending function of the current network interface 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 restoring 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 dial-up connection, the host device in the VRRP group redials to establish a wide area network connection.

[0074] In one exemplary embodiment, refer to Figure 4The implementation method of CPE primary / standby includes the following steps: Network initialization. WAN / LAN grouping: After the network service starts, different network group areas are set according to the network configuration. 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 enables the HA function, its HA port and the peer's HA port are directly connected, forming a VRRP instance. Monitoring WAN / LAN lines: Monitor the connection status of all WAN and LAN ports. If the line changes, VRRP elects primary / standby. CPE device determines whether it is the primary device. The primary device traverses the network ports 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 been replaced, the xmit packet sending function is restored, and gratuitous ARP is sent. Standby device traverses the network ports 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 steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0076] In one exemplary embodiment, a communication device is provided, which may be a server, and its internal structure diagram may be as follows. Figure 5As shown, the communication device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a primary / backup CPE system.

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

[0078] In an exemplary embodiment, a communication device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the following steps: each CPE device in the VRRP group performs primary / backup negotiation based on device priority to determine the master device and backup device of the VRRP group; if any CPE device determines that it is a backup device, it disables the packet sending function of each line network card; or, if it determines that it is a master device, it enables the packet sending function of each line network card.

[0079] In one embodiment, when the processor executes the computer program, it further performs the following steps: 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, it monitors the connection status of each port; based on the connection status of each port, it adjusts its own device priority.

[0080] In one embodiment, when the processor executes the computer program, it further performs the following steps: when the master device in the VRRP group is downgraded, it re-initiates master-slave negotiation within the VRRP group to re-determine the master device and standby device of the VRRP group.

[0081] In one embodiment, when the processor executes the computer program, it further performs the following steps: when the connection status of the target network port is abnormal, the CPE device determines the network port priority of the target network port; adjusts 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.

[0082] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the network port priority of the target network port is not lower than the preset priority, the CPE device lowers its own device priority; if 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, it also performs the following steps: the standby device in the VRRP group replaces the packet sending function of all network interfaces it manages 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, it further performs the following steps: the host device in the VRRP group detects whether the packet sending function of each network interface it manages has been replaced with a preset packet sending function; if it detects that the packet sending function of the current network interface has been replaced with the preset packet sending function, it restores the packet sending function of the current network interface 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, it further performs the following steps: After restoring 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 dial-up connection, the host device in the VRRP group 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, data stored, data displayed, 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 the relevant data must comply with relevant regulations.

[0087] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0088] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A primary / standby CPE system, characterized by, The system includes at least one VRRP group, which includes multiple CPE devices connected via HA network ports; wherein: Each CPE device in the VRRP group negotiates primary and backup devices based on device priority to determine the master and backup devices of the VRRP group. Any CPE device can disable the packet sending function of each line network card when it determines that it is a backup device; or enable the packet sending function of each line network card when it determines that it is a master device. The standby device in the VRRP group is used to replace the packet sending function of all network ports it manages 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; The host device in the VRRP group is used to detect whether the packet sending function of each network interface it manages has been replaced with a preset packet sending function; if it detects that the packet sending function of the current network interface has been replaced with the preset packet sending function, it restores the packet sending function of the current network interface to enable the packet sending function of each line network card; the preset packet sending function is used to filter data packets.

2. The system of claim 1, wherein, 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, it monitors the connection status of each port; based on the connection status of each port, it adjusts its own device priority.

3. The system according to claim 2, characterized in that, The host device in the VRRP group is used to re-initiate master-slave negotiation within the VRRP group and re-determine the host device and standby device of the VRRP group when its own device priority 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; and to 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.

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

6. The system according to claim 1, characterized in that, The host device in the VRRP group is also used to, after restoring the packet sending function of the current network port, redial to establish a wide area network connection if the current network port is a wide area network port and the connection mode of the current network port is dial-up connection.

7. A method for implementing CPE master / slave configuration, characterized in that, The method is applied to a primary / standby CPE system as described in any one of claims 1 to 6, the system comprising at least one VRRP group, the VRRP group comprising multiple CPE devices connected via an HA network port; the method includes: Each CPE device in the VRRP group negotiates primary and backup devices based on device priority to determine the master and backup devices of the VRRP group. Any CPE device can disable the packet sending function of each line network card when it determines that it is a backup device; or, when it determines that it is a master device, enable the packet sending function of each line network card. In this VRRP group, the standby device replaces the packet sending function of all network ports it manages 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; The host device in the VRRP group detects whether the packet sending function of each network interface it manages has been replaced with a preset packet sending function; if it detects that the packet sending function of the current network interface has been replaced with the preset packet sending function, it restores the packet sending function of the current network interface to enable the packet sending function of each line network card; the preset packet sending function is used to filter data packets.

8. The method according to claim 7, characterized in that, The method further includes: After the network service is started, the CPE device sets up its own WAN port group and LAN port group; the WAN port group includes the identification information of multiple WAN ports, and the LAN port group includes the identification information of multiple LAN ports; based on the WAN port group and the LAN port group, it monitors the connection status of each port; based on the connection status of each port, it adjusts its own device priority.

9. The method according to claim 7, characterized in that, The method further includes: If the host device in the VRRP group has its own device priority reduced, it shall re-initiate the master-slave negotiation within the VRRP group to re-determine the host device and the standby device in the VRRP group.

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, it implements the steps of the method described in any one of claims 7 to 9.

Citation Information

Patent Citations

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

    CN106788921A

  • Cluster management method, system and device and storage medium

    CN118764537A