A method, device and medium for fast switching of multiple uplinks in FTTR
By acquiring the link status of the FTTR sub-gateway and switching to the backup link according to priority, combined with ETH port probing and DHCP requests, the problems of excessive ETH port probing time and loop formation are solved, enabling rapid uplink switching and service recovery.
Patent Information
- Application Number
- CN202411242981.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-09-05
AI Technical Summary
In FTTR networking scenarios, existing technologies suffer from excessively long ETH port detection times, which prolong uplink switching times, affect service recovery, and can easily create loops during ETH port detection.
By acquiring the PON link status, ETH link status, and WIFI link status of the sub-gateway, the system switches to the backup link in case of link failure based on the uplink priority. It also generates detection results through ETH port probing, calculates the uplink port, notifies the WAN management module to delete the old forwarding network card interface, creates a new forwarding network card interface, and triggers a DHCP request to obtain an address to prevent loop formation.
It achieves millisecond-level ETH multiplexing port detection time, quickly completes FTTR gateway WIFI to ETH and PON to ETH switching, and completes service recovery within 10 seconds, preventing loops from occurring during the switching process.
Smart Images

Figure CN119094434B_ABST
Abstract
Description
Technical Field
[0001] This disclosure belongs to the field of FTTR uplink switching technology, and specifically relates to a method, device and medium for fast switching of multiple FTTR uplinks. Background Technology
[0002] In FTTR networking scenarios, master and slave gateways can be networked via fiber optic cables, Ethernet cables, or Wi-Fi. In actual deployments, multiple network topologies may coexist in FTTR networks, and these topologies can dynamically change. For example, a network might be constructed using fiber optic cables with Wi-Fi as a backup link, or a network might be constructed using Ethernet cables with Wi-Fi as a backup link. The networking between master and slave gateways is quite complex in practice. There may be switches between master and slave networks, cascaded networking between slave gateways, and Wi-Fi networking between different slave gateways. FTTR is now widely used in home and enterprise scenarios. To ensure that user services are not affected when the current uplink fails, it is necessary to dynamically switch to a backup link in a timely manner.
[0003] In actual deployments, multiple networking methods may coexist in the master and slave gateways, including fiber optic, Ethernet cable, and Wi-Fi uplink. FTTR slave gateways need to perform routing to avoid loops between the same slave gateway and the master gateway. Furthermore, some FTTR slave gateways have a very limited number of ETH ports (only two). When a slave gateway's ETH port is configured as an uplink networking port, it can also be used as a user port, leading to widespread ETH port mixing. Therefore, it's necessary to detect whether the slave gateway's uplink networking port is using the ETH port for networking. Current methods for detecting FTTR uplink ETH ports typically involve the slave gateway sending DHCP or PPPoE (server) request messages. If the server responds, the port is considered an uplink networking port; otherwise, it's a user port.
[0004] However, when the main gateway is in bridged mode, the sub-gateways are assigned addresses by DHCP servers. The external DHCP server responds to DHCP request messages with a 3-second delay, resulting in a detection time of nearly 5 seconds. Furthermore, during ETH uplink networking, network devices typically enable STP (Straight Through Processing) to prevent loops. For example, when the main and sub-gateways are networked via a cable, a switch is usually connected in between. When the ETH port goes up, it triggers port recalculation. During STP calculation, the ETH port only allows loop detection messages to pass, preventing the sub-gateway's DHCP probe messages from being sent successfully. This results in a detection time of approximately 20 seconds, affecting uplink switching time and consequently impacting service recovery time during PON and ETH uplink switching. If the ETH port detection time is too long, Wi-Fi will automatically form a network, creating a loop between the Wi-Fi and ETH ports. Summary of the Invention
[0005] In view of the above problems, this disclosure proposes a fast switching method, electronic device, and medium for multiple uplinks in FTTR. It enables fast switching under various uplink modes of FTTR, with ETH multiplexing port detection time reaching millisecond levels. This allows for the completion of FTTR gateway WIFI to ETH switching and PON-ETH switching service recovery within 10 seconds, while also preventing loops during the switching process.
[0006] This application provides a fast FTTR multi-uplink switching method, applied to a sub-gateway, including:
[0007] Obtain the PON link status, ETH link status, and WIFI link status identified by the LOS signal on the sub-gateway;
[0008] When the sub-gateway receives a failure in any of the link status transmissions of PON link status, ETH link status and WIFI link status, it switches the current uplink of the FTTR sub-gateway to the backup link according to the uplink priority.
[0009] Based on the detection results generated by probing the ETH port of the sub-gateway, the uplink port is calculated, the WAN management module is notified to delete the forwarding network card interface of the uplink, and a forwarding network card interface corresponding to the switched uplink is created.
[0010] Open the user-side ETH port, trigger the DHCPC module to send a DHCP request message to the network side to obtain the interface address, and notify OMCI.
[0011] Furthermore, obtaining the PON link status identified by the LOS signal on the sub-gateway includes:
[0012] When the PON link generates a LOS signal, it indicates that the PON link is DOWN and the link status is faulty.
[0013] When the LOS signal of the PON link disappears, the PON link is marked as UP, and the link status is normal.
[0014] Furthermore, the detection results generated by probing the ETH port of the sub-gateway include:
[0015] Debouncing detection is performed on the ETH port status, which involves delaying the received ETH port status change messages;
[0016] If the delay time is greater than the debouncing time, the ETH port status of the sub-gateway is considered stable.
[0017] Furthermore, the step of calculating the uplink port based on the detection result generated from the detection of the ETH port of the sub-gateway includes:
[0018] Based on state machine transitions and debouncing, the received timer messages, link state change messages, and ETH port detection results are used to select and control the uplink of the FTTR sub-gateway.
[0019] Define the roles of ETH ports, including uplink networking ports, user ports, and multiplexed ports; detect ETH ports that are multiplexed ports.
[0020] Furthermore, the detection of ETH ports as multiplexed ports includes:
[0021] When the ETH port is initially a multiplexed port, and a switch from a PON link to an ETH link or a WIFI link to an ETH link is detected in the sub-gateway, the WAN management module first closes and then opens all ETH ports.
[0022] After the sub-gateway receives the UP message from the uplink networking ETH port, it triggers ETH port probing. The FTTR sub-gateway receives the ETH port probing message response from the main gateway or the probing times out, and the ETH multiplexing port probing ends.
[0023] Furthermore, the method also includes:
[0024] If the ETH port in the detection results is a user port, then the loop detection module is notified to run the loop detection protocol on the user port;
[0025] If the ETH port is identified as an uplink networking port in the detection results, the loop detection module is notified to stop running the loop detection protocol on the uplink networking port.
[0026] During the probe, the ETH multiplexed port does not run the loop detection protocol.
[0027] Furthermore, the method also includes:
[0028] The detection results are sent to the multi-uplink detection module, which then starts a state machine to calculate the port status and selects the uplink port based on the port status calculation results.
[0029] Furthermore, the method also includes:
[0030] The WAN management module is instructed to delete the forwarding NIC port of the previous uplink and create the corresponding forwarding NIC port for the switched uplink.
[0031] The WAN management module closes the open user-side ETH port, triggering the DHCPC module to send a DHCP request message to the network side to obtain the interface address, and notifying OMCI and device management to turn on the lights.
[0032] Based on the same inventive concept, another aspect of the present disclosure provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0033] Memory, which stores computer programs;
[0034] When the processor executes a program stored in memory, it implements a fast FTTR multiple uplink switching method.
[0035] Based on the same inventive concept, another aspect of the present disclosure provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements a fast FTTR multiple uplink switching method.
[0036] The beneficial effects of this disclosure are as follows: This application obtains the PON link status, ETH link status, and WIFI link status on the sub-gateway after being identified by the LOS signal; when any of the PON link status, ETH link status, and WIFI link status of the sub-gateway fails, the current uplink of the FTTR sub-gateway is switched to a backup link according to the uplink priority; based on the detection results generated by probing the ETH port of the sub-gateway, the uplink port is calculated, the WAN management module is notified to delete the forwarding network card interface of the uplink, and a forwarding network card interface corresponding to the switched uplink is created; the user-side ETH port is opened, triggering the DHCPC module to send a DHCP request message to the network side to obtain the interface address. Therefore, it can be seen that fast switching under multiple uplink modes of FTTR is achieved, the ETH multiplexing port detection time reaches the millisecond level, and thus the FTTR gateway WIFI to ETH switching and PON to ETH switching service time recovery is completed within 10 seconds, and loops can be prevented during the switching process.
[0037] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objects and other advantages of this disclosure may be realized and obtained by means of the structures pointed out in the description and the accompanying drawings. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1This is a flowchart of a fast FTTR multiple uplink switching method in an embodiment of this application;
[0040] Figure 2 This is a schematic diagram of the multi-uplink detection and control system model in the embodiments of this application;
[0041] Figure 3 This is a flowchart of a PON switching ETH uplink example in this application embodiment;
[0042] Figure 4 This is the state machine transition diagram for multiple uplink detection in the embodiments of this application;
[0043] Figure 5 This is a schematic diagram of an FTTR networking scenario in an embodiment of this application;
[0044] Figure 6 This is a flowchart illustrating a WIFI switching ETH uplink example in this application.
[0045] Figure 7 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0047] It should be noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. In this application, the terms "upper," "lower," "left," "right," "front," "rear," "top," "bottom," "inner," "outer," "middle," "vertical," "horizontal," "lateral," "longitudinal," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings.
[0048] In the context of multiple uplink methods coexisting in FTTR master and slave gateways, and with the ETH port being a reused port, the excessively long ETH port detection time leads to slow user service switching recovery and loops during ETH detection and ETH-WIFI switching. This application proposes a fast switching method, electronic device, and medium for multiple uplinks in FTTR.
[0049] It should be understood that FTTR refers to Fiber to the Room, OMCI refers to Optical Network Unit Management and Control Interface, and DHCPC refers to Configuration Server. Similar abbreviations in this application are technical terms that can be understood by those skilled in the art or through learning conventional technology. Therefore, the abbreviations in this application will not be described in detail.
[0050] This application provides a fast switching method for multiple uplinks in FTTR. See [link to relevant documentation]. Figure 1 ,include:
[0051] S101: Obtain the PON link status, ETH link status, and WIFI link status identified by the LOS signal on the sub-gateway;
[0052] S102: When the sub-gateway receives a failure in any of the link status transmissions of PON link status, ETH link status and WIFI link status, it switches the current uplink of the FTTR sub-gateway to the backup link according to the uplink priority.
[0053] S103: Based on the detection results generated by detecting the ETH port of the sub-gateway, calculate the uplink port, notify the WAN management module to delete the forwarding network card interface of the uplink, and create the forwarding network card interface corresponding to the switched uplink.
[0054] S104: Open the user-side ETH port, trigger the DHCPC module to send a DHCP request message to the network side to obtain the interface address, and notify OMCI.
[0055] Specifically, obtaining the PON link status identified by the LOS signal on the sub-gateway includes:
[0056] When the PON link generates a LOS signal, it indicates that the PON link is DOWN and the link status is faulty.
[0057] When the LOS signal of the PON link disappears, the PON link is marked as UP, and the link status is normal.
[0058] In step S102, the uplink priority of the FTTR sub-gateway is configured on the sub-gateway to switch the current uplink to the backup link according to the uplink priority.
[0059] Specifically, the LOS signal is used to identify the PON link status. When the PON link generates an LOS signal, it indicates that the PON link is DOWN. When the PON link LOS signal disappears, it indicates that the PON link status is normal.
[0060] In step S102, switching the current uplink of the FTTR sub-gateway to a backup link according to the uplink priority includes:
[0061] The FTTR subgateway switches the current uplink of the subgateway according to the priority order of PON link as the first link, ETH link as the second link, and WIFI link as the third link.
[0062] Specifically, see Figure 2 Deploy multiple uplink detection modules on the sub-gateway, enable the adaptive switch, and dynamically monitor the status of PON links, ETH links, or WIFI links between the main gateway and the sub-gateway. When a link between the FTTR sub-gateway and the FTTR main gateway fails, such as when the link status transmission of the PON link or ETH link fails, switch the current uplink of the FTTR sub-gateway to a lower priority backup link such as ETH or WIFI in a timely manner according to the uplink priority configured in the FTTR sub-gateway (e.g., PON link > ETH link > WIFI link).
[0063] See Figure 4 Multiple uplink detection and switching require multiple modules to work together. To ensure processing timing, the multiple uplink detection module is equipped with a state machine and anti-jitter.
[0064] In step S103, the detection results generated by probing the ETH port of the sub-gateway include:
[0065] The status is debouncing, which includes delaying the received ETH port status change messages;
[0066] If the delay time is greater than the debouncing time, the ETH port status of the sub-gateway is considered stable.
[0067] Specifically, anti-jitter mainly involves delaying the processing of port status change messages received by the FTTR multi-uplink detection module to avoid frequent UP / DOWN of port status and repeated link switching when the link status is unstable.
[0068] In step S103, calculating the uplink port based on the detection result generated by probing the ETH port of the sub-gateway includes:
[0069] Based on state machine transitions and debouncing, the received timer messages, link state change messages, and ETH uplink probe results are used to select and control the uplink of the FTTR sub-gateway.
[0070] It should be noted that the uplink channel link status of the FTTR sub-gateway is identified by defining PON link status, ETH link status, and WIFI link status, where 1 indicates that the link status is UP and 0 indicates that the link status is DOWN. The multi-uplink detection module performs uplink selection and control of the FTTR sub-gateway based on the timer messages, link status change messages, and ETH uplink detection results received by the multi-uplink detection module, according to state machine transition changes and anti-jitter processing.
[0071] Define the roles of ETH ports, including uplink networking ports, user ports, and multiplexed ports; detect ETH ports that are multiplexed ports.
[0072] For reused ports, this application uses a private protocol to probe the ETH port of the user's FTTR sub-gateway. The sub-gateway sends a probe message; the main gateway sends a response message after receiving the probe message.
[0073] Specifically, the detection of the ETH port as a multiplexed port includes:
[0074] When the ETH port is initially a multiplexed port, and a switch from a PON link to an ETH link or a WIFI link to an ETH link is detected in the sub-gateway, the WAN management module first closes and then opens all ETH ports.
[0075] After the sub-gateway receives the UP message from the uplink networking ETH port, it triggers ETH port probing. The FTTR sub-gateway receives the ETH port probing message response from the main gateway or the probing times out, and the ETH multiplexing port probing ends.
[0076] It should be noted that the ETH port roles are defined, and the ETH ports of FTTR are divided into three categories: uplink networking ports, user ports, and multiplexing ports.
[0077] Specifically, see Figure 2 An ETH network port detection module is set up on the sub-gateway. When the ETH port role of the sub-gateway is configured as a multiplexed port, this is the initial state of the ETH multiplexed port, that is: when the ETH port detection module of the sub-gateway detects that the ETH port is a multiplexed port;
[0078] When the multi-uplink detection module of the FTTR sub-gateway detects that the sub-gateway is switching between PON links, ETH links, or WIFI links to ETH links, this is a transitional state before ETH multiplexed port detection during the uplink switching of the FTTR sub-gateway. The WAN management module first closes and then opens all ETH ports. After the sub-gateway receives the UP message of the uplink networking ETH port, the ETH multiplexed port starts the detection state, triggering ETH port detection. When the FTTR sub-gateway receives the ETH port detection message response from the main gateway or the detection times out, the ETH multiplexed port detection ends, and the ETH multiplexed port detection is complete.
[0079] Furthermore, the method also includes: if the ETH port is a user port in the detection result, then the sub-gateway loop detection module is notified to run the loop detection protocol on the user port;
[0080] If the ETH port is identified as an uplink networking port in the detection results, the sub-gateway loop detection module is notified to stop running the loop detection protocol on the uplink networking port.
[0081] During the probe, the ETH multiplexed port does not run the loop detection protocol.
[0082] In some implementations, the detection results are sent to a multi-uplink detection module, which starts a state machine to calculate the port status and selects an uplink port based on the port status calculation results.
[0083] The WAN management module is instructed to delete the forwarding NIC port of the previous uplink and create the corresponding forwarding NIC port for the switched uplink.
[0084] The WAN management module closes the open user-side ETH port, triggering the DHCPC module to send a DHCP request message to the network side to obtain the interface address, and notifying OMCI and device management to turn on the lights.
[0085] The following details the detection steps for sub-gateways.
[0086] The specific detection steps for the sub-gateway are as follows:
[0087] (1) The sub-gateway probe port calls the driver interface to set the blocking port, disallowing packets from passing through; only ETH port probe packets and ETH probe response packets are allowed to pass through.
[0088] (2) The sub-gateway sends a custom private protocol probe message to the main gateway;
[0089] (3) After receiving the probe request message, the main gateway responds to the probe request message;
[0090] (4) After the sub-gateway receives the probe response message within the specified time, it determines that the ETH port is the uplink networking port. If no response message is received within the specified time, the ETH port is the user port.
[0091] (5) After the detection is completed, the ETH detection module of the sub-gateway calls the driver interface to release the blocked port and complete the entire detection process. If the ETH port is a user port, the loop detection module is notified to run the loop detection protocol on the port; if the ETH port is an uplink networking port, the loop detection module is notified to stop running the loop detection protocol on the port. During the detection, the ETH multiplexed port does not run the loop detection protocol.
[0092] (6) The detection results are notified to the multi-uplink detection module. The multi-uplink detection module starts the state machine to calculate and select the uplink port. It also notifies the WAN management module to delete the forwarding network card interface of the previous uplink and create the forwarding network card interface corresponding to the switched uplink. The WAN management module closes and reopens the user-side ETH port, triggering the DHCPC module to send a DHCP request message to the network side to obtain the interface address. It then notifies OMCI and device management to turn on the lights.
[0093] This application uses LOS signals to identify the PON link status, accurately describes the PON link status of the FTTR sub-gateway, and selects the uplink by deploying multiple uplink detection modules. Especially for the case where the port role is an ETH multiplexed port, a private protocol is defined for ETH port detection, which can complete ETH port detection in a short time (within 1 second), thereby realizing rapid switching between different uplink modes such as PON, ETH, or WIFI to ETH. The ETH port detection results are linked with the loop detection module to avoid loops.
[0094] The following detailed description of the FTTR sub-gateway PON to ETH uplink switching implementation method of the present invention, with reference to the accompanying drawings and specific embodiments, is as follows:
[0095] See Figure 5 The FTTR networking scenario diagram applicable to this application, for example, FTTR sub-gateway 1 has its adaptive switch enabled, ETH port 1 is the configured uplink networking port, the multiplexing enable switch of ETH port 1 is enabled, the uplink priority of the FTTR sub-gateway is configured as PON > ETH > WIFI, the FTTR sub-gateway is connected to the FTTR main gateway through fiber optic cable and network cable, and the downlink PON port, ETH port and WIFI port of the FTTR main gateway run loop detection protocol.
[0096] During operation, the FTTR master gateway detects a loop between PON and ETH and shuts down the ETH port of the FTTR master gateway.
[0097] See Figure 3 This is a flowchart of a multi-uplink detection and control PON switching ETH uplink example. The multi-uplink detection module of the sub-gateway detects a LOS signal on the PON link, indicating an abnormality in the PON link. The multi-uplink detection module also detects a DOWN message on the PON link, triggering the uplink switching of the sub-gateway. The loop detection module of the FTTR main gateway detects an abnormality in the link status corresponding to the downstream PON port, starts the loop detection module to perform loop detection, and the loop detection module detects that the loop has disappeared, opening the ETH port of the main gateway connected to the ETH1 port.
[0098] See Figure 4 This is a state machine transition diagram for the multi-uplink detection module. To describe in detail the three uplink states (PON, ETH, and WIFI) and the switching between different uplink modes, the three uplink states of the sub-gateway are identified by PON link state, ETH link state, and WIFI port state. For each link state, 1 indicates that the link state is normal, 0 indicates that the link state is DOWN, and 2 is used to indicate the initialization state of the WIFI module. The link states of the sub-gateway for different uplink modes include a total of 7 states: PON uplink transition state, PON uplink stable state; ETH uplink transition state, ETH uplink stable state; WIFI initial state, WIFI uplink transition state, and WIFI uplink stable state. The transitions between different states are affected by link state change messages, port debouncing, and ETH port detection results. See details in [link to documentation]. Figure 4 When the multi-uplink detection module listens for changes in the status of PON, ETH, WIFI and other links, as well as timer messages and ETH network port detection result messages, it triggers the state machine of the multi-uplink detection module to transition to a stable state.
[0099] Specifically, see Figure 4 The PON link status, ETH link status, and WIFI port status are used to identify the uplink status of the sub-gateway. 1 indicates that the link status is normal, 0 indicates that the link status is DOWN, and 2 is used to identify the initialization status of the WIFI module. For example, (010) indicates that the current PON link status is DOWN, the WIFI link status is DOWN, and the ETH link status is UP. At this time, the uplink networking mode is ETH uplink.
[0100] The relationships between the different state machines are as follows:
[0101] Transitions between states are affected by link state change messages, port debouncing, and ETH port probing results; see details below. Figure 4The sub-gateway's multi-uplink detection module listens to changes in the link status of PON, ETH, WIFI, etc., as well as timer messages and ETH network port detection result messages. This triggers the sub-gateway's multi-uplink detection module state machine to transition to a stable state. For example, in the PON to ETH switching mentioned in this patent, after receiving the PON link DOWN message, the state machine transitions from the PON uplink stable state (100) to the ETH transition state (000), and then starts the detection transition to the ETH stable state (010). When switching from WIFI to ETH, after receiving the ETH network port UP message, it transitions from the WIFI stable state (001) to the ETH transition state (000), and then starts the ETH multiplexing port detection. After the ETH port detection is successful, it transitions to the ETH stable state (010). When switching from PON to WIFI, after receiving the PON link status DOWN message, after the ETH port detection fails, it switches to the WIFI initialization state (002). After initialization is completed, it transitions to the WIFI transition state (000), and then transitions to the WIFI stable state (001).
[0102] See Figure 3 The following is a flowchart of the PON switching ETH uplink instance process, and its specific steps are as follows:
[0103] Step S1: Configure the multi-uplink adaptive switch to enable, configure ETH port 1 as the uplink networking port, and enable the ETH port multiplexing function; the loop detection module of the main gateway detects the loop, closes the ETH port of the main gateway according to the configured uplink priority, and breaks the loop;
[0104] The configured uplink priority refers to the uplink priority of the corresponding FTTR sub-gateway, that is, the priority of the PON link, ETH link, and WIFI link. Each link corresponds to a port of the FTTR main gateway. This priority is stored in the device through the node and supports configuring the default priority from high to low (PON > uplink ETH port > WIFI port).
[0105] Step S2: An anomaly occurs in the PON link (cause), generating a LOS signal (effect). The multi-uplink detection module listens for the PON link DOWN message; the LOS signal is detected by the detection module, that is, the LOS signal is identified by the DOWM message.
[0106] Step S3: The link corresponding to the downstream PON port of the main gateway is abnormal, triggering the main gateway device to start loop detection. If the loop is detected and disappears, the ETH port of the main gateway is opened, and the sub-gateway listens for the UP message of the ETH1 network port.
[0107] The loop detection is performed periodically. When the PON link status changes, the loop detection module will be notified to restart the detection. When both the PON link and the ETH link are online, the ETH port will be closed according to the configuration of the lower ETH priority to break the loop. When the PON link is abnormal, the PON port channel is not connected. The loop detection module detects that the loop detection has disappeared and reopens the ETH port.
[0108] Step S4: Determine whether the port receiving the UP message is an uplink networking port.
[0109] Step S5: If the port is not an uplink networking port and is a user port, then the loop detection protocol is started on the port.
[0110] The loop detection protocol is specifically implemented as follows: when the ETH port is a user port, the loop detection protocol is activated.
[0111] If the port is an uplink networking port, it needs to be probed to determine whether it is used as a networking port connected to the main gateway or as a user port connected to a user PC.
[0112] Depending on the user configuration, the ETH port has three roles (user port, multiplexing port, and uplink networking port). Among them, the user port can only be used by the user's PC.
[0113] Multiplexing port: This only occurs when the ETH port multiplexing switch is enabled;
[0114] Uplink networking port: Can only be used as a networking port and cannot be connected to user PCs.
[0115] Step S6: Then determine whether the ETH port multiplexing switch is enabled. If enabled, trigger ETH port 1 to start ETH port detection.
[0116] Step S7: Before initiating ETH port probing, the ETH probing module first calls the driver interface to set the STP state of ETH port 1 to blocked; then, the ETH probing module calls the driver's dedicated packet sending interface to send the probe packet of ETH port 1 to the main gateway for probing, and starts the packet receiving timer and packet counting. After receiving the port probing packet sent by the sub-gateway port 1, the main gateway parses the packet content and immediately responds to the packet.
[0117] Step S8: If the sub-gateway receives a response message to the probe message on port ETH1 within the specified time, the probe is successful. This port is the uplink networking port. If no response message is received within the specified time, the probe is retried.
[0118] Step S9: Determine whether the ETH1 port detection was successful and notify the multi-uplink detection module of the detection result; if the detection fails, proceed to step S5, and the corresponding ETH1 port starts the loop detection protocol.
[0119] Step 10: Notify the multi-uplink detection module of the successful ETH1 port probe result for relevant processing;
[0120] The relevant processing includes: routing by multiple uplink modules; if the ETH port is successfully detected, and this port is the uplink networking port, then the multiple uplink modules set the uplink node to the ETH port, then the WIFI port is turned off, the corresponding network card is created, and the IP address is obtained again, etc.
[0121] At the same time, set the STP status of the ETH port to forward to open the port.
[0122] Step S11: The multi-uplink detection module selects the uplink route through the running state machine based on the uplink status, timer messages, and configured uplink priority. Finally, it selects ETH port 1 as the uplink networking port, writes ETH port 1 to the uplink mode node, and notifies the WAN management module, device management, OMCI and other modules to complete interface creation, obtain IP address, turn on lights and perform other operations.
[0123] The following is a detailed explanation of the steps for switching ETH uplink via WIFI.
[0124] See Figure 6 Step S12: Configure the multi-uplink adaptive switch to enable, configure ETH port 1 as the uplink networking port, and enable the ETH port multiplexing function; by default, neither the PON port nor the uplink ETH port is connected, and the link status is DOWN; the multi-uplink selection module selects the WIFI link as the uplink link.
[0125] The configured uplink priority refers to the uplink priority of the corresponding FTTR sub-gateway, that is, the priority of the PON link, ETH link, and WIFI link. Each link corresponds to a port of the FTTR main gateway. This priority is stored in the device through the node and supports configuring the default priority from high to low (PON > uplink ETH port > WIFI port).
[0126] Step S13: Connect ETH port 1 to the network cable and network with the FTTR main gateway device. The ETH link status changes to UP, and the multi-uplink detection module listens for the ETH link UP message.
[0127] Step S14: The sub-gateway device receives the UP message on ETH port 1;
[0128] Step S15: Determine whether the port of the received port UP message is an uplink networking port.
[0129] Step S16: If the port is not an uplink networking port and is a user port, then the loop detection protocol is started on the port.
[0130] The loop detection protocol is specifically implemented as follows: when the ETH port is a user port, the loop detection protocol is activated.
[0131] If the port is an uplink networking port, it needs to be probed to determine whether it is used as a networking port connected to the main gateway or as a user port connected to a user PC.
[0132] Depending on the user configuration, the ETH port has three roles (user port, multiplexing port, and uplink networking port). Among them, the user port can only be used by the user's PC.
[0133] Multiplexing port: This only occurs when the ETH port multiplexing switch is enabled;
[0134] Uplink networking port: Can only be used as a networking port and cannot be connected to user PCs.
[0135] Step S17: Then determine whether the ETH port multiplexing switch is enabled. If enabled, trigger ETH port 1 to start ETH port detection.
[0136] Step S18: Before initiating ETH port probing, the ETH probing module first calls the driver interface to set the STP state of ETH port 1 to blocked; then, the ETH probing module calls the driver's dedicated packet sending interface to send the probe packet of ETH port 1 to the main gateway for probing, and starts the packet receiving timer and packet counting. After receiving the port probing packet sent by the sub-gateway port 1, the main gateway parses the packet content and immediately responds to the packet.
[0137] Step S19: If the sub-gateway receives a response message to the probe message on port ETH1 within the specified time, the probe is successful. This port is the uplink networking port. If no response message is received within the specified time, the probe is retried.
[0138] Step S20: Determine whether the ETH1 port was successfully probed, and notify the multi-uplink detection module of the probe result; if the probe fails, proceed to step S16, and the corresponding ETH port starts the loop detection protocol.
[0139] Step 21: Notify the multi-uplink detection module to turn off the WIFI port and select the ETH1 port as the uplink networking port after the successful detection of the ETH1 port.
[0140] Step 22: The multiple uplink modules select the ETH1 port as the uplink port and write it to the node, notifying the WAN connection management and other modules.
[0141] Based on the same inventive concept, this disclosure also provides an electronic device 161, see [link to previous document]. Figure 6 It includes a processor 164, a communication interface 165, a memory 162, and a communication bus, wherein the processor 164, the communication interface 165, and the memory 162 communicate with each other through the communication bus;
[0142] Memory 162 stores computer program 163;
[0143] When processor 164 executes the program stored in memory 162, it implements the FTTR multi-uplink fast switching method.
[0144] The aforementioned communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc.
[0145] The communication interface 165 is used for communication between the aforementioned electronic device 161 and other devices.
[0146] The memory 162 may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 162 may also be at least one storage device located remotely from the aforementioned processor 164.
[0147] The processor 164 mentioned above can be a general-purpose processor 164, including a central processing unit (CPU), a network processor 164 (NP), etc.; it can also be a digital signal processor 164 (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0148] Based on the same inventive concept, another aspect of the present disclosure provides a computer-readable storage medium storing a computer program 163, which, when executed by a processor 164, implements the FTTR multi-uplink fast switching method.
[0149] The computer-readable storage medium may be included in the device / apparatus described in the above embodiments; or it may exist independently and not assembled into the device / apparatus. The computer-readable storage medium carries one or more programs that, when executed, implement the FTTR multi-uplink fast switching method according to embodiments of this disclosure.
[0150] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A fast FTTR multi-uplink handover method, applied to a sub-gateway, characterized in that, include: Obtain the PON link status, ETH link status, and WIFI link status identified by the LOS signal on the sub-gateway; When the sub-gateway receives a failure in any of the link status transmissions of PON link status, ETH link status and WIFI link status, it switches the current uplink of the FTTR sub-gateway to the backup link according to the uplink priority. Based on the detection results generated by probing the ETH port of the sub-gateway, the uplink port is calculated, the WAN management module is notified to delete the forwarding network card interface of the uplink, and a forwarding network card interface corresponding to the switched uplink is created. Open the user-side ETH port, trigger the DHCPC module to send a DHCP request message to the network side to obtain the interface address, and notify OMCI; The detection results generated by probing the ETH port of the sub-gateway include: Debouncing detection is performed on the ETH port status, which involves delaying the received ETH port status change messages; If the delay time is greater than the debouncing time, the ETH port status of the sub-gateway is determined to be stable. The step of calculating the uplink port based on the received probe results generated from probing the ETH port of the sub-gateway includes: Based on state machine transitions and debouncing, the uplink selection and control of the FTTR sub-gateway are performed based on the received timer messages, link state change messages, and ETH port detection results. Define the roles of ETH ports, including uplink networking ports, user ports, and multiplexing ports; Probe the ETH port as a reused port; The detection results are sent to the multi-uplink detection module, which then starts a state machine to calculate the port status and selects the uplink port based on the port status calculation results.
2. The method according to claim 1, characterized in that, The process of obtaining the PON link status identified by the LOS signal on the sub-gateway includes: When the PON link generates a LOS signal, it indicates that the PON link is DOWN and the link status is faulty. When the LOS signal of the PON link disappears, the PON link is marked as UP, and the link status is normal.
3. The method according to claim 1, characterized in that, The detection of ETH ports as multiplexed ports includes: When the ETH port is initially a multiplexed port, and a switch from a PON link to an ETH link or a WIFI link to an ETH link is detected in the sub-gateway, the WAN management module first closes and then opens all ETH ports. After the sub-gateway receives the UP message from the uplink networking ETH port, it triggers ETH port probing. The FTTR sub-gateway receives the ETH port probing message response from the main gateway or the probing times out, and the ETH multiplexing port probing ends.
4. The method according to claim 3, characterized in that, The method further includes: If the ETH port in the detection results is a user port, then the loop detection module is notified to run the loop detection protocol on the user port; If the ETH port is identified as an uplink networking port in the detection results, the loop detection module is notified to stop running the loop detection protocol on the uplink networking port. During the probe, the ETH multiplexed port does not run the loop detection protocol.
5. The method according to claim 4, characterized in that, The method further includes: The WAN management module is instructed to delete the forwarding NIC port of the previous uplink and create the corresponding forwarding NIC port for the switched uplink. The WAN management module closes the open user-side ETH port, triggering the DHCPC module to send a DHCP request message to the network side to obtain the interface address, and notifying OMCI and device management to turn on the lights.
6. An electronic device, characterized in that, include: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. Memory, which stores computer programs; When the processor executes the program stored in the memory, it implements the FTTR multi-uplink fast switching method as described in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, implements the FTTR multi-uplink fast switching method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Heterogeneous multimode gateway device, and transmission method and application thereof
CN107018070A