Parallel networking method, router and parallel networking system
By detecting the VLAN ID transmission capability of Lightmax and switching the router's message forwarding channel or converting the message type, the network failure problem caused by Lightmax does not support preset VLAN ID transmission is solved, and normal interaction between Lightmax and the router and successful networking is achieved.
Patent Information
- Application Number
- CN202410110527.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-25
- Publication Date
- 2025-07-25
AI Technical Summary
Lightmao does not support preset VLAN ID transmission, resulting in the failure of normal interaction between Lightmao and the router, affecting the success of networking.
By detecting whether the optical cat supports preset VLAN ID transmission, and switching the router's message forwarding channel type according to the results, establish an interactive channel that can interact with the default VLAN ID channel, or convert the message to a type that the optical cat cannot recognize to achieve transparent transmission.
It realizes normal packet interaction between Lightmao and the router, solves the problem of Lightmao's unsuccessful parallel networking, and ensures the successful completion of the networking.
Smart Images

Figure CN120378250A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of networking, and in particular, to a parallel networking method, a router, and a parallel networking system. Background Art
[0002] With the improvement of family living standards, for family houses over 120 square meters, a single home router can no longer meet the needs of home wireless network coverage. Therefore, home router manufacturers have successively provided wireless networking and wired networking solutions. In many families, due to the lack of pre-burial of the return network cable on the living room TV wall during the early decoration, it has brought great difficulties to wired series networking. Currently, the parallel networking of optical network terminals (also known as optical modems) is widely used because the uplink network cable of its main router can realize the reuse of virtual local area network (VLAN), eliminating the need for a return network cable and solving the network cable limitation of wired series networking. Summary of the Invention
[0003] Each embodiment of this application discloses a parallel networking method, a router, and a parallel networking system, which solve the problem that the optical network terminal does not support the transparent transmission of a preset VLAN ID, affecting the normal interaction between the optical network terminal and the router and resulting in the failure of networking.
[0004] In a first aspect, the embodiments of this application provide the following technical solutions:
[0005] A parallel networking method, applied to a first router to be networked, includes:
[0006] In the routing mode, it is determined that there is a second router to be networked and the first router is connected in parallel to the optical network terminal;
[0007] In response to a networking instruction, a parallel networking command is broadcast;
[0008] In response to the parallel networking command, the first router and the second router determine a master router based on a preset election rule;
[0009] When the first router is determined as a slave router, the packet forwarding channel type in the slave router is switched to a target channel type, so that the packets of the slave router and the packets of the master router can be transparently interacted through the optical network terminal; where the target channel type is the packet channel type of the optical network terminal.
[0010] The parallel networking method of this application, in the routing mode, first determines that the second router to be networked and the first router to be networked are connected in parallel to the optical modem. Then the user enables the parallel networking command, and the first router to be networked broadcasts the parallel networking command. After that, the first router and the second router determine the master router based on a preset election rule. When the first router is determined as the slave router, it is necessary to switch the packet forwarding channel of the slave router to the target channel type according to the packet channel type of the optical modem, so that the packets of the slave router can be transparently transmitted through the optical modem to the master router, so as to realize the packet interaction between the slave router and the master router and successfully realize networking. This application solves the problem that the parallel networking of the optical modem fails due to the inconsistency between the packet transparent transmission channel of the optical modem and the packet forwarding channel of the router.
[0011] In some embodiments, switching the packet forwarding channel type in the slave router to the target channel type includes:
[0012] Detect whether the optical modem supports the transparent transmission of a preset VLAN ID. If the optical modem supports the transparent transmission of the preset VLAN ID, switch the packet forwarding channel to the preset VLAN ID channel; if the optical modem does not support the transparent transmission of the preset VLAN ID, establish an interaction channel that can interact with the default VLAN ID channel, and switch the packet forwarding channel to the interaction channel.
[0013] This application detects whether the optical modem supports the transparent transmission of a preset VLAN ID, and correspondingly switches the packet forwarding channel of the router to the preset VLAN ID channel or establishes and switches to an interaction channel that can interact with the default VLAN ID channel, solving the problem that the packet interaction between the optical modem and the router cannot be carried out due to the optical modem not supporting the transparent transmission of the preset VLAN ID.
[0014] In some embodiments, the following method is used to detect whether the optical modem supports the transparent transmission of a preset VLAN ID:
[0015] Send a detection packet to the preset VLAN ID network port of the specified second router through the optical modem, and receive the detection packet at the preset VLAN ID network port of the second router.
[0016] Send a detection packet to the preset VLAN ID network port of the specified second router through the optical modem. According to whether the detection packet is received, it can be judged whether the optical modem supports the transparent transmission of the preset VLAN ID of the second router.
[0017] In some embodiments, the parallel networking method further includes obtaining the address assigned by the master router.
[0018] In some embodiments, obtaining the address assigned by the master router includes:
[0019] Transmit the address request message sent by the terminal through the optical modem to the main router;
[0020] Send the address response message transmitted by the main router through the optical modem to the terminal.
[0021] In some embodiments, the transmitting the address request message sent by the terminal through the optical modem to the main router includes:
[0022] Receive the first type of message requested by the terminal and convert the first type of message into the second type of message; wherein, the first type of message can be recognized by the optical modem, and the second type of message cannot be recognized by the optical modem;
[0023] Send the converted second type of message to the main router through the optical modem;
[0024] Correspondingly, the sending the address response message transmitted by the main router through the optical modem to the terminal includes:
[0025] Receive the second type of response message transmitted through the optical modem and convert the second type of response message into the first type of response message, wherein the second type of response message is the response message of the determined main router based on the second type of message;
[0026] Send the converted first type of response message to the terminal.
[0027] In some embodiments, the port number of the first type of message is the port number of the address request message, and the port number of the first type of message is different from the port number of the second type of message in value.
[0028] In some embodiments, the port number of the first type of message is the port number of the address request message, and the number of digits of the port number of the second type of message is greater than or equal to the number of digits of the port number of the first type of message.
[0029] In some embodiments, the port number of the first type of message is 67 / 68, and the port number of the second type of message is 54067 / 54068.
[0030] During the process of the sub-router obtaining the address, when the message passes through the optical modem, it is always the second type of message or the second type of response message. Since the optical modem cannot recognize the port numbers of the second type of message and the second type of response message, the second type of response message of the main router will not be intercepted due to the optical modem enabling the monitoring function, and at the same time, the optical modem has no chance to respond to the first type of message of the sub-router. This application solves the problem that the optical modem prohibits the main router from allocating addresses, and at the same time solves the problem that the optical modem and the main router respond to the first type of message simultaneously, affecting normal interaction.
[0031] In some embodiments, the parallel networking method further includes:
[0032] Sending an easy networking request to the determined master router and obtaining the response information of the master router in response to the easy networking request; wherein, the easy networking request is forwarded by the optical network terminal (ONT).
[0033] Switching the first router from the routing mode to the access point (AP) mode and re - establishing a communication connection with the master router as a slave router.
[0034] After the slave router obtains the address, it continues to send an easy networking request to the master router. After receiving the response information of the master router, the slave router switches from the routing mode to the AP mode and re - establishes a communication connection with the master router, and the networking is completed.
[0035] In some embodiments, the parallel networking method further includes:
[0036] When the first router is determined as the master router, it responds to the address request of the terminal forwarded by the slave router and configures an address for it.
[0037] In some embodiments, the parallel networking method further includes:
[0038] Responding to the easy networking request of the slave router and registering the slave router information;
[0039] Re - establishing a communication connection with the slave router.
[0040] After the master router finishes configuring the address for the slave router, it continues to respond to the easy networking request of the slave router, registers the slave router information, re - establishes a communication connection with the slave router, and the networking is completed.
[0041] In some embodiments, the responding to the address request of the slave router and configuring an address for it includes:
[0042] Receiving a second - type packet transmitted through the ONT and converting the second - type packet into a first - type packet;
[0043] Responding to the first - type packet and generating a first - type response packet;
[0044] Converting the first - type response packet into a second - type response packet and transmitting it through the ONT to the determined slave router;
[0045] Wherein, the first - type packet and the first - type response packet can be recognized by the ONT, and the second - type packet and the second - type response packet cannot be recognized by the ONT.
[0046] During the process of the master router configuring an address for the slave router, similarly, when the message passes through the optical modem for transparent transmission, it is always the second type of message or the second type of response message. Since the optical modem cannot recognize the port numbers of the second type of message and the second type of response message, the second type of response message of the master router will not be intercepted due to the optical modem enabling the monitoring function. At the same time, the optical modem has no opportunity to respond to the first type of message of the slave router. This application solves the problem that the optical modem prohibits the master router from allocating addresses, and at the same time solves the problem that the optical modem and the master router respond to the first type of message simultaneously, which affects normal interaction.
[0047] In some embodiments, the parallel networking method further includes:
[0048] When the first router is determined to be the master router, a preset VLAN ID channel is simultaneously enabled and an interaction channel that can interact with the default VLAN ID channel is established.
[0049] When the master router simultaneously enables a preset VLAN ID channel and establishes an interaction channel that can interact with the default VLAN ID channel, the message forwarding channel of the master router can be selected according to the message transparent transmission channel type of the optical modem.
[0050] In some embodiments, the parallel networking method further includes:
[0051] When the first router is determined to be the master router, it receives the first type of message requested by the terminal;
[0052] Generates a first type of response message based on the first type of message, and sends the first type of response message to the terminal.
[0053] When the terminal is directly connected to the master router, the master router directly responds to the terminal request.
[0054] In some embodiments, the following method is used to determine that there is a second router to be networked and connected in parallel to the optical modem with the first router:
[0055] Send a discovery message at the WAN network interface and receive a discovery message at the WAN network interface.
[0056] By sending and receiving discovery messages at the WAN network interface, it is determined that there are multiple routers connected in parallel to the optical modem.
[0057] In a second aspect, an embodiment of the present application further provides a parallel networking device, which is applied to the first router and includes:
[0058] An optical modem parallel discovery module, configured to determine that there is a second router to be networked and connected in parallel to the optical modem with the first router; further configured to determine the master router with the second router based on a preset election rule; and further configured to detect whether the optical modem supports transparent transmission of a preset VLAN ID;
[0059] A wireless access point management module, which is used to switch the packet forwarding channel type in the sub-router to a target channel type when the first router is a sub-router, so that the packets of the sub-router and the packets of the master router can be transparently transmitted and interacted through the optical modem.
[0060] In some embodiments, the wireless access point management module is further configured to simultaneously enable a preset VLAN ID channel and establish an interaction channel that can interact with the default VLAN ID channel when the first router is the master router.
[0061] In a third aspect, an embodiment of the present application further provides a router, including:
[0062] An optical modem parallel discovery module, which is used to determine that there is a second router to be networked and connected to the optical modem in parallel with the router; is further used to determine the master router with the second router based on a preset election rule; is further used to detect whether the optical modem supports the transparent transmission of a preset VLAN ID;
[0063] A wireless access point management module, which is used to switch the packet forwarding channel type in the sub-router to a target channel type when the router is a sub-router, so that the packets of the sub-router and the packets of the master router can be transparently transmitted and interacted through the optical modem.
[0064] In some embodiments, the wireless access point management module is further configured to simultaneously enable a preset VLAN ID channel and establish an interaction channel that can interact with the default VLAN ID channel when the router is the master router.
[0065] The optical modem parallel discovery module of the router of the present application can determine whether there are multiple routers connected to the optical modem in parallel, and elect a master router based on a preset rule; it can also detect the packet channel type of the optical modem, that is, detect whether the optical modem supports the transparent transmission of a preset VLAN ID, and switch the packet forwarding channel type of the sub-router according to the detection result, so as to realize the packet interaction between the sub-router and the master router, and solve the problem that the optical modem parallel networking fails due to the inconsistency between the packet channel of the optical modem and the packet forwarding channel of the router.
[0066] A Dynamic Host Configuration Protocol conversion module, which is used to convert the first type of packets that cannot be transparently transmitted by the optical modem into the second type of packets that can be transparently transmitted by the optical modem; is further used to convert the second type of packets into the first type of packets.
[0067] The switching chip access control list module, when the router is determined to be a sub-router, is used to receive the first type of packets from the terminals connected to the sub-router and send the first type of packets to the Dynamic Host Configuration Protocol (DHCP) conversion module of the sub-router; it is also used to transparently transmit the second type of packets through the optical network terminal (ONT) to the DHCP conversion module of the main router; it is further used to receive the second type of response packets replied by the main router and send the second type of response packets transparently transmitted through the ONT to the DHCP conversion module of the sub-router; it is also used to send the first type of response packets to the terminals.
[0068] When the router is determined to be the main router, the switching chip access control list module is used to receive the first type of packets from the terminals connected to the main router and generate the first type of response packets based on the first type of packets; it is also used to send the first type of response packets to the terminals.
[0069] Fourthly, each embodiment of the present application further provides a parallel networking system, including an ONT and multiple routers as described in the second aspect;
[0070] Multiple said routers are connected in parallel to the ONT;
[0071] The ONT is used to transparently transmit the interaction packets among multiple said routers.
[0072] The parallel networking system of the present application realizes the packet interaction among multiple routers through the transparent transmission of the ONT.
[0073] Fifthly, each embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the parallel networking method as described in the first aspect.
[0074] Sixthly, each embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the parallel networking method as described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 It is a schematic flowchart of the process before the terminal obtains an address provided by the embodiment of the present application;
[0076] Figure 2 is Figure 1 a schematic flowchart of step S104 in
[0077] Figure 3 It is a schematic flowchart of the process for the sub-router of the embodiment of the present application to obtain the address assigned by the main router;
[0078] Figure 4 isFigure 3 Flow chart of step S301 in
[0079] Figure 5 is Figure 3 Flow chart of step S302 in
[0080] Figure 6 Flow chart of the EasyLink networking process of the router in the embodiment of the present application;
[0081] Figure 7 Flow chart of the process of the main router in the embodiment of the present application allocating addresses to the sub-router and EasyLink networking;
[0082] Figure 8 is Figure 6 Flow chart of step S601 in
[0083] Figure 9 Flow chart of the process of the optical modem in the embodiment of the present application allocating addresses to the terminals;
[0084] Figure 10 Flow chart of a parallel networking method provided by the embodiment of the present application;
[0085] Figure 11 Process diagram of the terminal obtaining an address in the embodiment of the present application;
[0086] Figure 12 Structure diagram of a parallel networking system provided by the embodiment of the present application;
[0087] Figure 13 Structure diagram of the access control list module of the switching chip of the router provided by the embodiment of the present application;
[0088] Icons: 100, optical modem; 200, sub-router; 300, main router; 1, optical modem parallel discovery module; 2, wireless access point management module; 3, Dynamic Host Configuration Protocol conversion module; 4, access control list module of the switching chip; 5, central processing unit; 41, wide area network port; 42, local area network port; 43, central processing unit port; 51, preset VLAN ID channel; 52, interaction channel. Detailed implementation manners
[0089] At present, in the parallel networking of optical network terminals (ONTs), since the uplink network cable of the main router can achieve virtual local area network (VLAN) multiplexing, the backhaul network cable is saved, and the network cable limitation of the wired series networking is solved, so it is widely applied. However, some ONTs do not support the pass-through of the preset VLAN ID, which affects the normal interaction between the ONT and the router and leads to the failure of networking; some ONTs enable the dynamic host configuration protocol snooping (DHCP Snooping) function, which prohibits the main router from allocating addresses, resulting in the failure of the parallel networking of ONTs; some ONTs do not support the preset VLAN ID completely, and there are problems such as the ONT and the main router simultaneously responding to the dynamic host configuration protocol (DHCP) requests, resulting in incorrect address acquisition by the sub-router and the terminal, etc.
[0090] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may represent A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality of" means two or more than two.
[0091] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more than two.
[0092] As Figure 1 shown, the embodiment of the present application provides a parallel networking method, which is applied to a first router to be networked, and includes:
[0093] S101. In the routing mode, determine that there is a second router to be networked and the first router is connected in parallel to the ONT;
[0094] S102. Broadcast a parallel networking command in response to a networking instruction;
[0095] S103. In response to the parallel networking command, the first router and the second router determine the master router based on a preset election rule;
[0096] S104. When the first router is determined to be a slave router, switch the message forwarding channel type in the slave router to the target channel type, so that the messages of the slave router and the master router can be transparently transmitted and interacted through the optical modem; where the target channel type is the message channel type of the optical modem.
[0097] In the parallel networking method of this application, in the routing mode, first determine that the second router to be networked and the first router to be networked are connected in parallel to the optical modem. Then the user enables the parallel networking command, and the first router to be networked broadcasts the parallel networking command. After that, the first router and the second router determine the master router based on a preset election rule. When the first router is determined to be a slave router, it is necessary to switch the message forwarding channel of the slave router to the target channel type according to the message channel type of the optical modem, so that the messages of the slave router can be transparently transmitted to the master router through the optical modem, so as to realize the message interaction between the slave router and the master router and successfully realize networking. This application solves the problem that the parallel networking of the optical modem fails due to the inconsistency between the message transparent transmission channel of the optical modem and the message forwarding channel of the router.
[0098] In some embodiments, referring to Figure 2 , switching the message forwarding channel type in the slave router to the target channel type includes:
[0099] S201. Detect whether the optical modem supports the transparent transmission of a preset VLAN ID. If so, execute S202; if not, execute S203;
[0100] S202. Switch the message forwarding channel to the preset VLAN ID channel;
[0101] S203. Establish an interaction channel that can interact with the default VLAN ID channel, and switch the message forwarding channel to the interaction channel.
[0102] In the sub-router of the embodiment of the present application, the message forwarding channel type needs to be switched to the message channel type of the optical modem. Specifically, when the optical modem supports the preset VLAN ID pass-through, the message forwarding channel type of the sub-router is switched to the preset VLAN ID channel, that is, the parallel networking forwarding network channel (hereinafter referred to as the VLAN i channel, where i is a positive integer greater than 1); when the optical modem does not support the preset VLAN ID pass-through, the sub-router establishes an interaction channel that can interact with the default VLAN ID channel and switches the message forwarding channel to the interaction channel, that is, the media access control virtual local area network channel (hereinafter referred to as the macVLAN channel).
[0103] It should be noted that the ID range of the VLAN can be predefined as 1-4094. Among them, VLAN1 is the default pass-through forwarding channel of ordinary optical modems and routers. To improve the pass-through performance, the VLAN4033 channel is preset. Since the forwarding performance of the preset VLAN4033 channel is better and the priority is higher, the sub-router or its attached terminals preferentially request an address from the main router through the preset VLAN4033 channel. The message of this address request requires the optical modem to support the preset VLAN4033 pass-through. However, due to the inherent performance of the optical modem, some optical modems do not support the preset VLAN4033 pass-through. But the above address request message matches the preset VLAN4033 channel and does not match the VLAN1 channel, so it cannot be passed through by the VLAN1 channel, resulting in the failure of parallel networking.
[0104] In response to the above problem, the embodiment of the present application creates a new interaction channel, that is, the macVLAN channel. This channel does not require the optical modem to support the preset VLAN ID pass-through and can interact with the optical modem's default VLAN 1 channel, enabling the message to be transparently transmitted and forwarded without obstacles.
[0105] It should be added that, without conflicting with the VLANs of other services, 4033 can also be replaced with other IDs within the range of 1-4094 for the forwarding of address request messages. Generally, defining one ID is sufficient, and there is no need to define multiple IDs.
[0106] By switching the message forwarding channel of the sub-router according to the message channel type of the optical modem, the embodiment of the present application can realize the transparent transmission of the messages of the sub-router through the optical modem and send them to the main router, realizing the message interaction between the sub-router and the main router, and solving the problem of the failure of parallel networking caused by the optical modem not supporting the preset VLAN ID pass-through.
[0107] In some embodiments, the following method is used to detect whether the optical modem supports the pass-through of the preset VLAN ID:
[0108] Send a detection message through the optical modem to the preset VLAN ID network port of the specified second router, and receive the detection message at the preset VLAN ID network port of the second router.
[0109] In a possible implementation, sending a detection message through the optical modem to the preset VLAN ID network port of the specified second router and receiving the detection message at the preset VLAN ID network port of the second router indicates that the optical modem supports the preset VLAN ID pass-through; if the second router does not receive the detection message through the preset VLAN ID network port, it indicates that the optical modem does not support the preset VLAN ID pass-through. In the embodiments of the present application, a detection message is sent through the optical modem to the preset VLAN ID network port of the specified second router, and it can be determined whether the optical modem supports the preset VLAN ID pass-through according to whether the detection message is received.
[0110] In some embodiments, the parallel networking method further includes: obtaining the address assigned by the main router.
[0111] In some embodiments, referring to Figure 3 , obtaining the address assigned by the main router includes:
[0112] S301. Transmit the address request message sent by the terminal through the optical modem to the main router;
[0113] S302. Send the address response message passed through the optical modem by the main router to the terminal.
[0114] In some embodiments, referring to Figure 4 , transmitting the address request message sent by the terminal through the optical modem to the main router includes:
[0115] S401. Receive the first type of message requested by the terminal and convert the first type of message into the second type of message; wherein, the first type of message can be recognized by the optical modem, and the second type of message cannot be recognized by the optical modem;
[0116] S402. Send the converted second type of message to the main router through the optical modem.
[0117] Correspondingly, referring to Figure 5 , sending the address response message passed through the optical modem by the main router to the terminal includes:
[0118] S501. Receive the second type of response message passed through the optical modem and convert the second type of response message into the first type of response message, wherein the second type of response message is the response message of the determined main router based on the second type of message;
[0119] S502. Send the converted first type of response message to the terminal.
[0120] In a possible implementation, since the first type of message and the first type of response message can be recognized by the optical modem, when the optical modem enables the message monitoring (DHCP snooping) function, the first type of response message of the main router will be intercepted by the optical modem, affecting the interaction and resulting in a failed network setup. When the optical modem does not enable the message monitoring function, the first type of message can be responded to by both the main router and the optical modem simultaneously, affecting the normal interaction and causing the sub-router to obtain an incorrect address. To solve the above problems, after receiving the first type of message from the connected terminal, the sub-router first converts the first type of message into a second type of message that cannot be recognized by the optical modem, then transmits the second type of message through the optical modem to the main router, then receives the second type of response message of the main router transmitted through the optical modem, then converts the second type of response message into the first type of response message, and finally sends it to the terminal, and the address acquisition is successful. Optionally, the first type of message and the first type of response message can be DHCP standard messages.
[0121] When the message of the embodiment of the present application is transmitted through the optical modem, it is always the second type of message or the second type of response message. Since the optical modem cannot recognize the port numbers of the second type of message and the second type of response message, the second type of response message of the main router will not be intercepted due to the optical modem enabling the monitoring function, and at the same time, the optical modem has no chance to respond to the first type of message of the sub-router. The present application solves the problem that the optical modem prohibits the main router from allocating addresses, and at the same time solves the problem that the optical modem and the main router respond to the first type of message simultaneously, affecting the normal interaction.
[0122] It should be noted that the DHCP snooping function of the optical modem is specifically used to intercept address request messages and has no interception effect on other types of messages.
[0123] In some embodiments, the port number of the first type of message is the port number of the address request message, and the numerical value of the port number of the first type of message is different from the port number of the second type of message.
[0124] It should be noted that the first type of message is an address request message, which is a standard protocol message of the Dynamic Host Configuration Protocol (DHCP for short). The specific port numbers of the message are 67 / 68. The numerical value of the port number of the second type of message is different so as not to be intercepted by the optical modem.
[0125] In some embodiments, the port number of the first type of message is the port number of the address request message, and the number of digits of the port number of the second type of message is greater than or equal to the number of digits of the port number of the first type of message.
[0126] The number of bits of the second type of message is greater than or equal to that of the first type of message, such as 78 / 79, 367 / 368, 4467 / 4468, 46067 / 46068, etc., that is, port numbers less than 65536. As long as they are not occupied, they can be used. However, if the numbers are relatively small, such as 78, 367, 4067, etc., there will be a risk of conflict with the port numbers already used by the system.
[0127] In some embodiments, the port number of the first type of message can be 67 / 68, and the port number of the second type of message can be 54067 / 54068.
[0128] Exemplarily, the port number 67 / 68 of the first type of message is a standard message type, which is specifically used for address requests and matches the VLAN4033 channel. The port number 54067 / 54068 of the second type of message is a non-standard message type, which is a mapping modification of the standard message port number, that is, 67 is modified to 54067 and 68 is modified to 54068. Its function is to solve the problem of intercepting the first type of response message of the main router due to the optical modem enabling the message monitoring function.
[0129] The optical modem can identify the port numbers of the first type of message and the first type of response message. That is, when the optical modem enables the message monitoring function, the first type of response message will be intercepted by the optical modem, resulting in the failure of the main router to respond. However, the optical modem cannot identify the port numbers of the second type of message and the second type of response message. That is, the optical modem will not intercept the second type of message response message, enabling the message to be transparently transmitted through the optical modem. In the embodiments of the present application, when the message passes through the optical modem, the first type of message is always converted into the second type of message, or the first type of response message is converted into the second type of response message, realizing the normal interaction between the sub-router, the optical modem, and the main router.
[0130] In some embodiments, referring to Figure 6 , the parallel networking method further includes:
[0131] S601. Apply for an easy connection networking request to the determined main router and obtain the response information of the main router in response to the easy connection networking request; wherein, the easy connection networking request is forwarded by the optical modem;
[0132] S602. Switch the first router from the routing mode to the AP mode and re-establish a communication connection with the main router as a sub-router.
[0133] In a possible implementation manner, after the sub-router obtains the address, EasyLink networking needs to be performed. Specifically, the sub-router sends an EasyLink networking request to the main router. After the sub-router receives the response message from the main router, the sub-router switches from the routing mode to the wireless access point mode (Access Point, abbreviated as AP), and re-establishes a communication connection with the main router, and the networking is completed.
[0134] It should be noted that during the process of the EasyLink networking request, the sub-router will send an EasyLink networking request message, which is a message of a pre-configured management protocol, and is forwarded using the same forwarding channel as the address request process (that is, if the address request process uses the preset VLAN4033 channel, the EasyLink request process also uses the preset VLAN4033 channel; that is, if the address request process uses the macVLAN channel, the EasyLink request process also uses the macVLAN channel), and is also converted into a second type of message when passing through the optical modem. Since the optical modem is not aware of all the second type of messages passing through it, the optical modem only serves as a bridge between the sub-router and the main router and does not perform other operations.
[0135] In some embodiments, referring to Figure 7 , the parallel networking method further includes:
[0136] S701. When the first router is determined as the main router, respond to the address request of the terminal forwarded by the sub-router and configure an address for it;
[0137] S702. Respond to the EasyLink networking request of the sub-router and register the sub-router information;
[0138] S703. Re-establish a communication connection with the sub-router.
[0139] In a possible implementation manner, when the first router is determined as the main router, the main router needs to receive the address request of the sub-router and configure an address for the sub-router. After the address is configured, it also needs to receive the EasyLink networking request of the sub-router, register the sub-router information, and re-establish a communication connection with the sub-router to complete the parallel networking. Among them, registering the sub-router information includes one or more of the serial number SN, mac address, software version number, forwarding mode, ip address, etc. of the sub-router.
[0140] In some embodiments, referring to Figure 8 , responding to the address request of the sub-router and configuring an address for it includes:
[0141] S801. Receive the second type of message transparently transmitted by the optical modem and convert the second type of message into the first type of message;
[0142] S802. Respond to the first type of message and generate a first type of response message;
[0143] S803. Convert the first type of response message into the second type of response message, and transparently transmit it through the optical modem to the determined sub-router;
[0144] Among them, the first type of message and the first type of response message can be recognized by the optical modem, while the second type of message and the second type of response message cannot be recognized by the optical modem.
[0145] In a possible implementation, the process of the master router configuring an address for the sub-router is as follows: First, the master router receives the second type of message of the sub-router transparently transmitted through the optical modem. The master router converts the second type of message into the first type of message, and responds to the first type of message to generate the first type of response message. Then, the master router converts the first type of response message into the second type of response message that cannot be recognized by the optical modem. Finally, the second type of response message is transparently transmitted through the optical modem to the sub-router, and the master router completes the address configuration for the sub-router.
[0146] In the process of the master router of the embodiment of the present application configuring an address for the sub-router, similarly, when the message is transparently transmitted through the optical modem, it is always the second type of message or the second type of response message. Since the optical modem cannot recognize the port numbers of the second type of message and the second type of response message, the second type of response message of the master router will not be intercepted due to the optical modem enabling the monitoring function. At the same time, the optical modem has no chance to respond to the first type of message of the sub-router. The present application solves the problem that the optical modem prohibits the master router from allocating addresses, and at the same time solves the problem that the optical modem and the master router respond to the first type of message at the same time, which affects the normal interaction.
[0147] In some embodiments, the parallel networking method further includes:
[0148] When the first router is determined as the master router, the preset VLAN ID channel is opened and an interaction channel that can interact with the default VLAN ID channel is established at the same time.
[0149] In a possible implementation, when the first router is determined as the master router, the master router opens the preset VLAN ID channel and establishes an interaction channel that can interact with the default VLAN ID channel at the same time. And the sub-router switches to the corresponding forwarding channel according to the message channel type of the optical modem. For example, when the optical modem supports the preset VLAN ID transparent transmission, the message forwarding channel type of the sub-router switches to the preset VLAN ID channel; when the optical modem does not support the preset VLAN ID transparent transmission, the sub-router establishes an interaction channel that can interact with the default VLAN ID channel, and switches the message forwarding channel to the interaction channel, that is, the macVLAN channel.
[0150] In some embodiments, refer to Figure 9, the parallel networking method further includes:
[0151] S901. When the first router is determined as the master router, receive the first type of message requested by the terminal;
[0152] S902. Generate a first type of response message based on the first type of message, and send the first type of response message to the terminal.
[0153] In a possible implementation manner, when the first router is determined as the master router and the terminal is connected to the master router, the process for the terminal to obtain an address is that the master router receives the first type of message from the terminal, generates a first type of response message based on the first type of message, and then sends the first type of response message to the terminal, and the terminal successfully obtains the address. The master router in the embodiment of the present application directly configures the address for the terminal connected to it.
[0154] In some embodiments, the following method is used to determine that there is a second router to be networked and the first router is connected in parallel to the optical cat:
[0155] Send discovery messages at the WAN network port and receive discovery messages at the WAN network port.
[0156] In a possible implementation manner, if the first router to be networked sends a discovery message and receives a discovery message, it indicates that there is a second router to be networked and the first router is connected in parallel to the optical cat; if no discovery message is received, it indicates that there is no second router to be networked and the first router is connected in parallel to the optical cat. In the embodiment of the present application, by sending and receiving discovery messages at the WAN network port, it is determined that multiple routers are connected in parallel to the optical cat.
[0157] To make the solution provided in the embodiment of the present application easier to understand, the following uses a specific embodiment to detail the process for the terminal to obtain an address in the parallel networking method. As Figure 10 shown, taking the example that the terminal is connected to the sub-router and the optical cat supports VLAN pass-through, the process includes the following steps:
[0158] S1001. The terminal sends a first type of message request;
[0159] S1002. The sub-router receives the first type of message request from the terminal;
[0160] S1003. The sub-router converts the first type of message into a second type of message;
[0161] S1004. The second type of message is sent to the master router through the optical cat pass-through;
[0162] S1005. The master router converts the second type of message into a first type of message;
[0163] S1006. The master router responds to the first type of message to generate a first type of response message;
[0164] S1007. The master router converts the first type of response message into a second type of response message;
[0165] S1008. The second type of response message is transparently transmitted through the optical modem to the slave router;
[0166] S1009. The slave router converts the second type of response message into a first type of response message;
[0167] S1010. The slave router sends the first type of response message to the terminal to complete the address configuration.
[0168] Figure 11 The process diagram for obtaining an address for the terminal is as follows: Specifically, when the router connected by the wired terminal is the slave router and the optical modem supports the transparent transmission of the preset VLAN ID, the process of the wired terminal obtaining an address includes the following steps:
[0169] (1) The wired terminal sends a Dynamic Host Configuration Protocol (DHCP) request;
[0170] (2) The DHCP request is sent to the Switch Access Control List (Switch ACL) module of the slave router and filtered according to the rules;
[0171] (3) The DHCP request is sent to the Dynamic Host Configuration Protocol Convertor (DHCP Convertor) module of the slave router, and the standard DHCP message is converted into a non-standard DHCP message and then sent back to the Switch Access Control List module of the slave router;
[0172] (4) The non-standard DHCP message is directly sent to the Dynamic Host Configuration Protocol conversion module of the master router through the optical modem;
[0173] (5) The Dynamic Host Configuration Protocol conversion module of the master router converts the non-standard DHCP message into a standard DHCP message, and after being processed by the server protocol of the master router, it responds to the standard DHCP message request;
[0174] (6) The Dynamic Host Configuration Protocol conversion module of the main router then converts the replied standard DHCP message into a replied non-standard DHCP message, and sends it to the access control list module of the switching chip of the sub-router via the optical network terminal, and filters it according to the rules;
[0175] (7) The access control list module of the switching chip of the sub-router sends the replied non-standard DHCP message to the Dynamic Host Configuration Protocol conversion module;
[0176] (8) The Dynamic Host Configuration Protocol conversion module of the sub-router converts the replied non-standard DHCP message into a replied standard DHCP message, and sends it back to the access control list module of the switching chip;
[0177] (9) The access control list module of the switching chip of the sub-router sends the replied standard DHCP message to the wired terminal to complete the address configuration.
[0178] The embodiment of the present application also provides a parallel networking device, which is applied to the first router, and is characterized by including:
[0179] An optical network terminal parallel discovery module, configured to determine that there is a second router to be networked and the first router is connected in parallel to the optical network terminal; further configured to determine the main router with the second router based on a preset election rule; further configured to detect whether the optical network terminal supports the pass-through of a preset VLAN ID;
[0180] A wireless access point management module, configured to, when the first router is a sub-router, switch the message forwarding channel type in the sub-router to a target channel type, so that the messages of the sub-router and the main router can be transparently transmitted and interacted through the optical network terminal.
[0181] In some embodiments, the wireless access point management module is further configured to, when the first router is the main router, simultaneously enable a preset VLAN ID channel and establish an interaction channel that can interact with the default VLAN ID channel.
[0182] Figure 12 As shown, the embodiment of the present application also provides a parallel networking system, including an optical network terminal 100 and multiple routers;
[0183] Multiple routers are connected in parallel to the optical network terminal 100;
[0184] The optical network terminal 100 is configured to transparently transmit the interaction messages between multiple routers.
[0185] In a possible implementation manner, referring to Figure 12 , the main router 300 and the sub-router 200 are connected in parallel to the optical network terminal 100, and the optical network terminal 100 is configured to transparently transmit the interaction messages between the sub-router 200 and the main router 300.
[0186] AsFigure 12 As shown in the figure, the router in the parallel networking system of the embodiment of the present application includes:
[0187] An optical modem parallel discovery (Opendisc) module, which is used to determine that there is a second router to be networked and the router is connected in parallel to the optical modem 100; is also used to determine the master router 300 with the second router based on a preset election rule; is also used to detect whether the optical modem 100 supports the pass-through of a preset VLAN ID;
[0188] A wireless access point management (Access Point manager, abbreviated as APMGR) module, which is used to switch the packet forwarding channel type in the slave router 200 to the target channel type ( Figure 12 Channel A or B in the figure) when the router is the slave router 200, so that the packets of the slave router 200 and the packets of the master router 300 can be transparently interacted through the optical modem 100.
[0189] In a possible implementation manner, referring to Figure 12 , the router of the embodiment of the present application includes an optical modem parallel discovery module 1 and a wireless access point management module 2. Among them, the optical modem parallel discovery module 1 is used to determine that there is a second router to be networked and the router is connected in parallel to the optical modem 100; is also used to determine the master router 300 with the second router based on a preset election rule; is also used to detect whether the optical modem 100 supports the pass-through of a preset VLAN ID.
[0190] The wireless access point management module 2 is used to switch the packet forwarding channel type in the slave router 200 to the optical modem packet pass-through channel type ( Figure 12 Channel A or B in the figure) when the router is determined to be the slave router 200, so that the packets of the slave router 200 and the packets of the master router 300 can be transparently interacted through the optical modem 100. Specifically, when the optical modem 100 supports the pass-through of the preset VLAN ID, the packet forwarding channel type of the slave router 200 is switched to the preset VLAN ID channel 51 ( Figure 12 Channel A in the figure); when the optical modem 100 does not support the pass-through of the preset VLAN ID, an interaction channel 52 that can interact with the default VLAN ID channel is established for the slave router 200 ( Figure 12In the B channel), and switch the message forwarding channel to the interactive channel 52, that is, the macVLAN channel. The wireless access point management module 2 is also used to apply for an EasyLink networking request to the determined main router 300 and obtain the response information of the main router 300; it is also used to switch the sub-router 200 from the routing mode to the AP mode and re-establish a communication connection with the main router 300. The wireless access point management module 2 is also used to, when the router is determined to be the main router 300, simultaneously activate the preset VLAN ID channel 51 and establish an interactive channel 52 that can interact with the default VLAN ID channel. Figure 12 In channels A and B).
[0191] In the router according to the embodiment of the present application, the optical modem parallel discovery module 1 detects whether the optical modem 100 supports the preset VLAN ID pass-through, and the wireless access point management module 2 correspondingly switches the message forwarding channel type of the sub-router 200, solving the problem that the sub-router 200 and the main router 300 cannot interact normally due to the fact that the optical modem 100 does not support the preset VLAN ID pass-through.
[0192] In some embodiments, the wireless access point management module is also used to, when the router is the main router 300, simultaneously activate the preset VLAN ID channel and establish an interactive channel that can interact with the default VLAN ID channel.
[0193] Continue to refer to Figure 12 , the router according to the embodiment of the present application further includes a switching chip access control list module 4 and a dynamic host configuration protocol conversion module 3. Among them, the dynamic host configuration protocol conversion module 3 is used to convert the first type of message that can be recognized by the optical modem 100 into the second type of message that cannot be recognized by the optical modem 100; it is also used to convert the second type of message into the first type of message.
[0194] When the router is determined to be the sub-router 200, the switching chip access control list module 4 is used to receive the first type of message from the terminal connected to the sub-router 200 and send the first type of message to the dynamic host configuration protocol conversion module 3 of the sub-router 200 through the central processing unit 5; it is also used to transparently transmit the second type of message through the optical modem 100 to the dynamic host configuration protocol conversion module 3 of the main router 300; it is also used to receive the second type of response message replied by the main router 300 and send the second type of response message transparently transmitted through the optical modem 100 to the dynamic host configuration protocol conversion module 3 of the sub-router 200; it is also used to send the first type of response message to the terminal;
[0195] When the router is determined to be the master router 300, the switching chip access control list module 4 is used to receive the first type of packets from the terminals connected to the master router 300, generate the first type of response packets based on the first type of packets, and also send the first type of response packets to the terminals.
[0196] In the embodiments of the present application, the router solves the problem that when the terminal is connected to the slave router 200, the optical network terminal 100 intercepts the response packets of the master router 300 when the packet monitoring function is enabled, and also solves the problem that the optical network terminal 100 and the master router 300 respond to the packets simultaneously, affecting the normal interaction, through the packet type conversion of the dynamic host configuration protocol conversion module 3 and the packet forwarding of the switching chip access control list module 4.
[0197] It should be noted that when the terminal is a wireless terminal, the requests sent by the wireless terminal are directly sent to the central processing unit 5 of the slave router 200 without passing through the switching chip access control list module 4. The other processes are the same as those of the wired terminal requests and will not be elaborated here; during the process of the wireless terminal obtaining the address, the response packets are also directly sent to the central processing unit 5 of the slave router 200 without passing through the switching chip access control list module 4. The other processes are the same as those of the wired terminal obtaining the address and will not be elaborated here. In addition, the processes of the slave router 200 sending requests and obtaining addresses by itself are the same as those of the wireless terminal and will not be elaborated here.
[0198] Refer to Figure 13 , the switching chip access control list module 4 of the router includes a wide area network (WAN) port, a local area network (LAN) port, and a central processing unit port 43. Figure 13 As shown in 1-4 in, the 4 is the local area network port 42, the 5 is the wide area network port 41, and the 0 is the central processing unit port 43. The optical network terminal 100 is connected to the router through the wide area network port 41, the terminal is connected to the switching chip access control list module 4 through the local area network port 42, and the switching chip access control list module 4 is connected to the central processing unit 5 through the central processing unit port 43.
[0199] Each embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the parallel networking method as described in the first aspect.
[0200] Each embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by the processor, it implements the parallel networking method as described in the first aspect.
[0201] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to cover these changes and modifications.
Claims
1. A parallel networking method, characterized in that, Applied to the first router to be networked, including: In the routing mode, it is determined that there is a second router to be networked and the first router is connected in parallel to the optical modem; In response to the networking instruction, broadcast the parallel networking command; In response to the parallel networking command, the first router and the second router determine the master router based on a preset election rule; When the first router is determined as the slave router, switch the packet forwarding channel type in the slave router to the target channel type, so that the packets of the slave router and the packets of the master router can be transparently transmitted and interacted through the optical modem; where the target channel type is the packet channel type of the optical modem.
2. The parallel networking method according to claim 1, wherein Switching the packet forwarding channel type in the slave router to the target channel type includes: Detect whether the optical modem supports the transparent transmission of a preset VLAN ID. If the optical modem supports the transparent transmission of the preset VLAN ID, switch the packet forwarding channel to the preset VLAN ID channel; if the optical modem does not support the transparent transmission of the preset VLAN ID, establish an interaction channel that can interact with the default VLAN ID channel, and switch the packet forwarding channel to the interaction channel.
3. The parallel networking method according to claim 2, wherein Detect whether the optical modem supports the transparent transmission of a preset VLAN ID in the following way: Send a detection packet to the preset VLAN ID network port of the specified second router through the optical modem, and receive the detection packet at the preset VLAN ID network port of the second router.
4. The parallel networking method according to claim 1, wherein The parallel networking method further includes: obtaining the address assigned by the master router.
5. The parallel networking method according to claim 4, wherein The obtaining the address assigned by the master router includes: Transparently transmit the address request packet sent by the terminal to the master router through the optical modem; Send the address response packet transparently transmitted by the master router through the optical modem to the terminal.
6. The parallel networking method according to claim 5, wherein The transparently transmitting the address request packet sent by the terminal to the master router through the optical modem includes: Receive the first type of packet requested by the terminal and convert the first type of packet into the second type of packet; where the first type of packet can be recognized by the optical modem, and the second type of packet cannot be recognized by the optical modem; Send the converted second type of packet to the master router through the optical modem; Correspondingly, the sending the address response packet transparently transmitted by the master router through the optical modem to the terminal includes: Receive the second type of response packet transparently transmitted through the optical modem and convert the second type of response packet into the first type of response packet, where the second type of response packet is the response packet of the determined master router based on the second type of packet; Send the converted first type of response packet to the terminal.
7. The parallel networking method according to claim 6, characterized in that, The port number of the first type of packet is the port number of the address request packet, and the port number of the first type of packet is different from the port number of the second type of packet in value.
8. The parallel networking method according to claim 7, wherein The number of digits of the port number of the second type of packet is greater than or equal to the number of digits of the port number of the first type of packet.
9. The parallel networking method according to claim 1, wherein The parallel networking method further includes: Apply for an easy networking request to the determined master router and obtain the response information of the master router in response to the easy networking request; where the easy networking request is forwarded by the optical modem. Switch the first router from the routing mode to the AP mode, and re - establish a communication connection with the master router as a sub - router.
10. The parallel networking method according to claim 1, wherein The parallel networking method further includes: When the first router is determined as the master router, respond to the address request of the terminal forwarded by the sub - router and configure an address for it.
11. The parallel networking method according to claim 10, wherein The parallel networking method further includes: Respond to the easy - connection networking request of the sub - router and register the sub - router information; Re - establish a communication connection with the sub - router.
12. The parallel networking method according to claim 10, wherein The responding to the address request of the sub - router and configuring an address for it includes: Receive the second - type message transparently transmitted by the optical network terminal (ONT), and convert the second - type message into a first - type message; Respond to the first - type message and generate a first - type response message; Convert the first - type response message into a second - type response message, and transparently transmit it to the determined sub - router through the ONT; Wherein, the first - type message and the first - type response message can be recognized by the ONT, and the second - type message and the second - type response message cannot be recognized by the ONT.
13. The parallel networking method according to claim 1, wherein The parallel networking method further includes: When the first router is determined as the master router, simultaneously open the preset VLAN ID channel and establish an interaction channel that can interact with the default VLAN ID channel.
14. The parallel networking method according to claim 1, wherein The parallel networking method further includes: When the first router is determined as the master router, receive the first - type message requested by the terminal; Generate a first - type response message based on the first - type message, and send the first - type response message to the terminal.
15. The parallel networking method according to claim 1, wherein Determine that there is a second router to be networked and the first router is connected in parallel to the ONT in the following way: Send discovery messages at the WAN network interface and receive discovery messages at the WAN network interface.
16. A parallel networking device, applied to a first router, characterized in that, Includes: An ONT parallel discovery module, used to determine that there is a second router to be networked and the first router is connected in parallel to the ONT; also used to determine the master router with the second router based on a preset election rule; Also used to detect whether the ONT supports the transparent transmission of the preset VLAN ID; A wireless access point management module, used to switch the message forwarding channel type in the sub - router to the target channel type when the first router is the sub - router, so that the messages of the sub - router and the master router can be transparently transmitted and interacted through the ONT.
17. The parallel networking device according to claim 16, wherein The wireless access point management module is also used to simultaneously open the preset VLAN ID channel and establish an interaction channel that can interact with the default VLAN ID channel when the first router is the master router.
18. A parallel networking system, including an optical modem, characterized in that, Includes multiple routers; Multiple routers are connected in parallel to the ONT; The ONT is used to transparently transmit the interaction messages between multiple routers.
19. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, When the processor executes the program, it implements the steps of the parallel networking method according to any one of claims 1 - 15.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the parallel networking method according to any one of claims 1 - 15.
Citation Information
Cited By
Networking method, apparatus and system, and electronic device and storage medium
EP4811728A1