Link processing method and device
By establishing wired and wireless dual links between routing devices and using virtual logical network ports for network port management, the network interruption problem caused by link type changes when multiple routers are networked is solved, and fast and stable links are achieved Switching improves the data service continuity of terminal devices.
Patent Information
- Application Number
- CN202310652331.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-02
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2043-06-02
AI Technical Summary
When multiple routers are networked, the change in link type causes network connection to be interrupted, resulting in data service interruption of terminal equipment, affecting network stability.
By establishing wired and wireless dual links between the first routing device and the second routing device, and adding their corresponding network ports to the virtual logical network port, the virtual logical network port is controlled for network port mounting and removal, and rapid implementation Switch link type to avoid network connection interruption.
It effectively shortens the link switching time, avoids interruption of terminal equipment data services, and improves the stability and reliability of network connections.
Smart Images

Figure CN117715076B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a link processing method and device. Background Art
[0002] When a single router cannot cover a sufficient area, in order to improve the coverage of the wireless network, multiple routers can usually be networked to achieve wireless coverage.
[0003] At present, there are three common ways of wireless networking: wired networking, wireless networking, and hybrid networking. After multiple routers are networked, in some unavoidable circumstances, it may be necessary to change the link type of the networking, such as changing from wired networking to wireless networking, or from wireless networking to wired networking, etc.
[0004] During the process of changing the networking mode, the networking link will be interrupted and it will take a certain amount of time to recover. Therefore, the data service of the device connected to the router will also be interrupted, resulting in the impact on the data service. Summary of the invention
[0005] The embodiments of the present application provide a link processing method and device, which are applied in the field of terminal technology.
[0006] In a first aspect, an embodiment of the present application provides a link processing method. The method includes:
[0007] When the first routing device establishes networking with the second routing device, establishing a wired network connection with the second routing device, wherein the first routing device operates in a relay mode;
[0008] Adding a network port corresponding to the wired network connection to a virtual logical network port of the first routing device, wherein the virtual logical network port is used to control a network connection mode between the first routing device and the second routing device;
[0009] receiving wireless information sent by the second routing device through the wired network connection;
[0010] Establish a wireless network connection with the second routing device according to the wireless information, and add the network port corresponding to the wireless network connection to the virtual logical network port.
[0011] In this implementation, a wired network connection and a wireless network connection are established between the first routing device and the second routing device, and the network ports corresponding to the wired network connection and the wireless network connection are added to the virtual logical network port, so as to realize binding of multiple network ports as a single network port for use by the upper layer, but at the same time, the network connection modes corresponding to the multiple network ports coexist. Later, when switching the link, it is only necessary to control the network port mounted on the virtual logical network port to quickly and effectively realize the switching of the networking mode. Therefore, by controlling the network connection mode between the first routing device and the second routing device through the virtual logical network port, the time consumption of the networking switching can be effectively shortened to avoid the impact on the data service of the terminal device caused by the interruption of the network connection.
[0012] In some implementations, after establishing a wired network connection with the second routing device, the method further includes:
[0013] Detecting whether the working mode of the first routing device is the relay mode;
[0014] If not, the working mode of the first routing device is switched to the relay mode.
[0015] In this implementation, when the first routing device and the second routing device establish a wired network connection, the first routing device is controlled to operate in a relay mode, so that when the first routing device switches the networking mode with the second routing device, it does not need to spend time switching the working mode, thereby effectively shortening the time of link switching.
[0016] In some implementations, a virtual bridge is provided in the first routing device;
[0017] After establishing a wired network connection with the second routing device, the method further includes:
[0018] Sending a dial-up request to the second routing device through a network port corresponding to the wired network connection;
[0019] Receiving the IP address assigned by the second routing device;
[0020] The IP address is set as the address of the virtual bridge.
[0021] In this implementation, the slave router directly sets the received IP address as the IP address of the virtual bridge, so that the same IP address is allocated for wired networking and wireless networking, avoiding waste of IP address resources, and ensuring that the main router can access the slave router based on the IP address before, during or after the networking mode is switched, thereby ensuring the stability of the main router's management of the slave router. At the same time, there is no need to request the allocation of an IP address from the main router again after each switch, effectively avoiding the complexity of the switching process and the increase in duration.
[0022] In some implementations, the method further includes:
[0023] If a disconnection event corresponding to the wired network connection is detected, determining whether the network port corresponding to the wireless network connection is added to the virtual logical network port;
[0024] If so, determining that the network connection mode between the first routing device and the second routing device is the wireless network connection;
[0025] If not, the network port corresponding to the wireless network connection is added to the virtual logical network port, and the network connection mode between the first routing device and the second routing device is determined to be the wireless network connection.
[0026] In this implementation, when the wired network is switched to the wireless network, the network port corresponding to the wireless network connection is directly mounted under the virtual logical network port, so that the switching of the networking mode can be realized very quickly and conveniently, and the time is very short, so as to effectively avoid interruption of the data service of the terminal device.
[0027] In some implementations, the method further includes:
[0028] If a connection event corresponding to the wired network connection is detected, sending a detection request message to the second routing device;
[0029] If the detection response message sent by the second routing device is received, removing the network port corresponding to the wireless network connection from the virtual logical network port;
[0030] Determine that the network connection mode between the first routing device and the second routing device is the wired network connection.
[0031] In this implementation, when the wireless network is switched to the wired network, it is only necessary to simply remove the network port of the wireless network connection to quickly and conveniently switch the networking mode in a very short time, thereby effectively avoiding interruptions to the data services of the terminal device.
[0032] In some implementations, after receiving the probe response message sent by the second routing device, the method further includes:
[0033] Detecting whether the working mode of the first routing device is a relay mode;
[0034] If not, the working mode of the first routing device is switched to the relay mode.
[0035] In this implementation, after receiving the detection response message, the working mode of the first routing device is further detected to effectively ensure that the first routing device always works in the relay mode, thereby preventing some routing devices from automatically adjusting the working mode to the bridge mode after switching to the wired network.
[0036] In some implementations, after receiving the probe response message sent by the second routing device, the method further includes:
[0037] Setting the inserted network port corresponding to the connection event to a wide area network interface;
[0038] Sending a dial request to the second routing device through the wide area network interface;
[0039] Receive the IP address allocated by the second routing device to the first routing device, and set the IP address as the address of the virtual bridge.
[0040] In this implementation, after detecting the connection event corresponding to the wired network connection and receiving the detection response message, the dialing request and the IP address receiving operation are performed, which can ensure that the existing routing devices on the market can also reuse the technical solution of the present application. And the IP address is re-applied and allocated, which can also effectively ensure the availability of the IP address allocated to the virtual bridge.
[0041] In some implementations, the method further includes:
[0042] The virtual logical network port is mounted under the virtual network card to transmit data to the virtual network card through the virtual logical network port.
[0043] In this implementation, the virtual logical network port is mounted under the virtual network card to ensure effective transmission of the data link inside the router.
[0044] In some implementations, the wireless information includes wireless information of a backhaul link and wireless information of a forward link, and the wireless information of the forward link is used as wireless information for the terminal device to connect to the first routing device;
[0045] The establishing a wireless network connection with the second routing device according to the wireless information includes:
[0046] A wireless network connection is established with the second routing device according to the wireless information of the backhaul link.
[0047] In a second aspect, an embodiment of the present application provides a link processing device. The device includes:
[0048] A processing module, configured to establish a wired network connection with a second routing device when a first routing device and a second routing device establish networking, wherein the first routing device operates in a relay mode;
[0049] The processing module is further used to add the network port corresponding to the wired network connection to the virtual logical network port of the first routing device, and the virtual logical network port is used to control the network connection mode between the first routing device and the second routing device;
[0050] a transceiver module, configured to receive wireless information sent by the second routing device via the wired network connection;
[0051] The processing module is further used to establish a wireless network connection with the second routing device according to the wireless information, and add a network port corresponding to the wireless network connection to the virtual logical network port.
[0052] In some implementations, the processing module is further configured to:
[0053] After establishing a wired network connection with the second routing device, detecting whether the working mode of the first routing device is the relay mode;
[0054] If not, the working mode of the first routing device is switched to the relay mode.
[0055] In some implementations, a virtual bridge is provided in the first routing device;
[0056] The processing module is further used for:
[0057] After establishing a wired network connection with the second routing device, sending a dial-up request to the second routing device through a network port corresponding to the wired network connection;
[0058] Receiving the IP address assigned by the second routing device;
[0059] The IP address is set as the address of the virtual bridge.
[0060] In some implementations, the processing module is further configured to:
[0061] If a disconnection event corresponding to the wired network connection is detected, determining whether the network port corresponding to the wireless network connection is added to the virtual logical network port;
[0062] If so, determining that the network connection mode between the first routing device and the second routing device is the wireless network connection;
[0063] If not, the network port corresponding to the wireless network connection is added to the virtual logical network port, and the network connection mode between the first routing device and the second routing device is determined to be the wireless network connection.
[0064] In some implementations, the processing module is further configured to:
[0065] If a connection event corresponding to the wired network connection is detected, sending a detection request message to the second routing device;
[0066] If the detection response message sent by the second routing device is received, removing the network port corresponding to the wireless network connection from the virtual logical network port;
[0067] Determine that the network connection mode between the first routing device and the second routing device is the wired network connection.
[0068] In some implementations, the processing module is further configured to:
[0069] After receiving the detection response message sent by the second routing device, detecting whether the working mode of the first routing device is a relay mode;
[0070] If not, the working mode of the first routing device is switched to the relay mode.
[0071] In some implementations, the processing module is further configured to:
[0072] After receiving the detection response message sent by the second routing device, setting the insertion network port corresponding to the connection event as a wide area network interface;
[0073] Sending a dial request to the second routing device through the wide area network interface;
[0074] Receive the IP address allocated by the second routing device to the first routing device, and set the IP address as the address of the virtual bridge.
[0075] In some implementations, the processing module is further configured to:
[0076] The virtual logical network port is mounted under the virtual network card to transmit data to the virtual network card through the virtual logical network port.
[0077] In some implementations, the wireless information includes wireless information of a backhaul link and wireless information of a forward link, and the wireless information of the forward link is used as wireless information for the terminal device to connect to the first routing device;
[0078] The processing module is specifically used for:
[0079] A wireless network connection is established with the second routing device according to the wireless information of the backhaul link.
[0080] In a third aspect, an embodiment of the present application provides a terminal device, which may also be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The terminal device may be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc.
[0081] The terminal device comprises: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the terminal device executes the method of the first aspect.
[0082] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method of the first aspect is implemented.
[0083] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the method of the first aspect.
[0084] In a sixth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute the method described in the first aspect.
[0085] It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] Figure 1 A schematic diagram of a router networking change provided in an embodiment of the present application;
[0087] Figure 2 A flowchart of a link processing method provided in an embodiment of the present application;
[0088] Figure 3 The process of the link processing method provided in the embodiment of the present application Figure 2 ;
[0089] Figure 4 Schematic diagram of link switching in the networking mode provided in the embodiment of the present application Figure 1 ;
[0090] Figure 5 The process of the link processing method provided in the embodiment of the present application Figure 3 ;
[0091] Figure 6 Schematic diagram of link switching in the networking mode provided in the embodiment of the present application Figure 2 ;
[0092] Figure 7 A schematic diagram of the structure of a link processing device provided in an embodiment of the present application;
[0093] Figure 8 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0094] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0095] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0096] It should be noted that the "at..." in the embodiment of the present application can be the instant when a certain situation occurs, or a period of time after a certain situation occurs, and the embodiment of the present application does not specifically limit this. In addition, the display interface provided in the embodiment of the present application is only an example, and the display interface can also include more or less content.
[0097] In order to better understand the technical solution of the present application, the relevant concepts involved in the present application are briefly explained below.
[0098] Router: A hardware device that connects two or more networks and acts as a gateway between networks. It is a dedicated intelligent network device that reads the address in each data packet and then decides how to transmit it. Routers have multiple wireless modes, including Repeater mode and Bridge mode.
[0099] Relay mode: In relay mode, the router will establish a connection with a wireless router that can access the Internet to amplify the wireless signal on the wireless router that can access the Internet. The name of the amplified wireless signal is the same as the wireless signal name of the original wireless router that can access the Internet.
[0100] Bridge mode: In bridge mode, the router will establish a connection with a wireless router that can access the Internet to amplify the wireless signal on the wireless router that can access the Internet. The name of the amplified wireless signal is inconsistent with the wireless signal name of the original wireless router.
[0101] The relevant technologies involved in this application are further introduced in detail below.
[0102] As people's living standards improve, more and more families will choose large-sized apartments / duplexes / villas, etc. However, the partition walls, stairs, etc. of these houses will cause wireless signal attenuation, which greatly reduces the wireless transmission rate and affects the quality of wireless transmission. Therefore, when the area of the home is relatively large, a single wireless router can no longer fully cover all areas, and it is necessary to consider networking multiple wireless routers to achieve wireless coverage.
[0103] There are three networking methods currently used: wired networking, wireless networking and hybrid networking. After the networking is completed, it is inevitable to change the link type of the networking. For example, you can refer to Figure 1 Understand the changes in the link type of the network. Figure 1 A schematic diagram of the networking changes of the router provided in the embodiment of the present application.
[0104] Reference Figure 1 When multiple routers are networked, there can be a master router and a slave router. The number of master routers is usually one, and the number of slave routers can be multiple. Different slave routers can be placed in different locations to expand the coverage area of the wireless network. The master router can connect to one or more slave routers, and the master router can manage at least one slave router.
[0105] Among them, the main router is usually responsible for accessing the network and managing the main router, while the slave router usually exists to expand the network coverage area and is used to act as a relay between the terminal device and the main router.
[0106] Reference Figure 1 The slave router can be connected to the main router by wired networking or wireless networking, and the slave router can also be connected to the terminal device wirelessly (wired connection is also possible), and then the slave router can relay data. There are two situations:
[0107] Case 1: The master router sends the data to be sent to the terminal device to the slave router, and then the slave router can forward the data to the corresponding terminal device;
[0108] Case 2: The terminal device sends the data to be uploaded to the network to the slave router, which can then forward the data to the master router, and then forward the data to the corresponding network device via the master router.
[0109] In order to use the above-mentioned system architecture to carry out corresponding data transmission and effectively expand the network coverage area, it is necessary to ensure the connection of the networking link between the master router and the slave router.
[0110] However, in some unavoidable cases, for any slave router, Figure 1 The switching of the link type between the master and slave routers shown in FIG. Figure 1, the situation of switching from wired networking to wireless networking may occur, or the situation of switching from wireless networking to wired networking may occur.
[0111] Regardless of which switching method is used, after the link type is changed, the corresponding link is re-established for the changed link type. This will cause the link switching to take a long time, which will cause the data service of the terminal device connected to the router to be interrupted, thereby affecting the data service of the terminal device.
[0112] In response to the technical problems introduced above, the present application proposes the following technical concept: when the master router and the slave router are first networked, a dual link is directly established between the master router and the slave router, that is, a wired link and a wireless link. Then, the corresponding network ports of the wired link and the wireless link are mounted on the bond port in the slave router. When switching the link, you only need to simply control the network port mounted on the bond port to quickly and conveniently implement the link switching, so as to avoid interruption of the data service of the terminal device.
[0113] Based on the above introduction, the link processing method provided by the present application is introduced below in combination with specific embodiments. Figure 2 To explain, Figure 2 A flowchart of a link processing method provided in an embodiment of the present application.
[0114] like Figure 2 As shown, the method includes:
[0115] S201. When a first routing device establishes a network with a second routing device, a wired network connection is established with the second routing device, wherein the first routing device operates in a relay mode.
[0116] In this embodiment, the first routing device can be understood as the slave routing device described above, and the second routing device can be understood as the master routing device described above. When the first routing device and the second routing device establish networking, the first routing device can establish a wired network connection with the second routing device.
[0117] The first routing device and the second routing device may be connected by means of a physical connection, thereby realizing a wired network connection between the first routing device and the second routing device, wherein the physical connection may be a network cable, or may be any connection that can realize a network connection between devices.
[0118] And in this embodiment, when the first routing device and the second routing device establish a wired network connection, the first routing device is controlled to operate in a relay mode.
[0119] As mentioned above, routers can have relay mode and bridge mode. In the current traditional technical solutions, when the slave router and the main router establish a wired network, the slave router usually works in bridge mode; and when the slave router and the main router establish a wireless network, the slave router works in relay mode. However, under this implementation method, when switching the link between wired networking and wireless networking, the working mode of the slave router needs to be switched before the corresponding networking can be realized. However, switching the working mode requires a certain amount of processing time, which will result in a longer link switching time.
[0120] In the technical solution of the present application, when the first routing device and the second routing device establish a wired network connection, the first routing device is controlled to operate in a relay mode, so that when the first routing device switches the networking mode with the second routing device, it does not need to spend time switching the working mode, thereby effectively shortening the time of link switching.
[0121] In a possible implementation, for example, after establishing a wired network connection with a second routing device, it is possible to first detect whether the working mode of the first routing device is the relay mode. If the first routing device is already working in the relay mode, there is no need to switch. If the first routing device is not currently working in the relay mode, the first routing device can be switched to the relay mode to ensure that the first routing device also works in the relay mode when the wired network is formed.
[0122] S202: Add a network port corresponding to the wired network connection to a virtual logical network port of the first routing device, where the virtual logical network port is used to control a network connection mode between the first routing device and the second routing device.
[0123] The first routing device includes many network ports, such as eth (Ethernet) interface, wlan interface (Wireless Local Area Network) interface, etc. The eth port can be understood as a network port of a wired network, and the wlan interface can be understood as a network port of a wireless network.
[0124] The network port corresponding to the wired network connection in this embodiment can be understood as the network port in the first routing device into which the network cable is inserted. In this embodiment, the network port corresponding to the wired network connection can be added to the virtual logical network port (bond port) of the first routing device to enable data transmission through the network port corresponding to the wired network connection.
[0125] Among them, the role of the bond port is to bind multiple network ports together as a single interface for upper-layer applications. It can be understood that the network port corresponding to the wired network connection is the actual physical network port, while the bond port is a virtual network port at the logical level. When adding the network port corresponding to the wired network connection to the bond port of the first routing device, the network port can be added to the bond port through the network port identifier through software commands to achieve the network port being mounted under the bond port, and then the corresponding data transmission link can be constructed to transmit data through the corresponding network port.
[0126] In this embodiment, the virtual logical network port can mount multiple network ports, one of which can correspond to one data transmission link, so the virtual logical network port can control the network connection mode between the first routing device and the second routing device.
[0127] S203: Receive wireless information sent by the second routing device through the wired network connection.
[0128] After the first routing device and the second routing device establish a wired network connection, the second routing device can send wireless information to the first routing device through the link of the wired network connection. The wireless information can include at least the following: the SSID (Service Set Identifier) of the wireless network, the password, the encryption method, and the security method parameter. This embodiment does not limit the specific implementation method of the wireless information, and all the information required for implementing the wireless network connection can be used as the wireless information in this embodiment.
[0129] Accordingly, the first routing device can receive the wireless information sent by the second routing device through the wired network connection.
[0130] S204: Establish a wireless network connection with the second routing device according to the wireless information, and add a network port corresponding to the wireless network connection to the virtual logical network port.
[0131] Because the wireless information is the relevant information required for establishing a wireless network connection with the second routing device, after receiving the wireless information, the first routing device can establish a wireless connection with the second routing information according to the wireless information.
[0132] In one possible implementation, the wireless information sent by the main router may include wireless information of the backhaul link and wireless information of the forward link, wherein the wireless information of the forward link is used as wireless information for the terminal device to connect to the first router device, that is, the wireless connection information sent by the first router device, and it can be understood that the wireless information of the forward link is also the wireless connection information sent by the second router device, thereby ensuring that the first router device and the second router device are based on the same wireless information distribution network.
[0133] When the first routing device establishes a wireless network connection with the second routing device according to the wireless information, the first routing device may specifically establish a wireless network connection with the second routing device according to the wireless information of the backhaul link.
[0134] Furthermore, the first routing device can also add the network port corresponding to the wireless network connection to the virtual logical network port to mount the network port corresponding to the wireless network connection under the bond port, so that data can be transmitted through the wireless link. The implementation method of adding the network port corresponding to the wireless network connection is similar to the above description and will not be repeated here.
[0135] Therefore, in this embodiment, the network port corresponding to the wired network connection and the network port corresponding to the wireless network connection can be added to the virtual logical network port. The virtual logical network port can then bind multiple network ports together as a single interface for use by upper-layer applications. Therefore, it can simultaneously support the wired network connection and the wireless network connection between the first routing device and the second routing device, that is, the existence of a dual link between the first routing device and the second routing device is realized.
[0136] Later, when switching links, you only need to add or remove the mounted network port through the virtual logical network port to quickly and easily switch the networking mode without having to re-execute the entire network connection process of the corresponding networking mode, thereby effectively shortening the switching time of the networking mode and avoiding interruptions to the data services of the terminal equipment.
[0137] Based on the above introduction, it can be determined that after the first routing device is switched to the relay mode, the network ports corresponding to the wired connection and the wireless connection will be added to the virtual logical network port. In this embodiment, the working mode of the first routing device after the network port addition operation is performed is called bondagent mode, which can be understood as a special mode under the relay mode.
[0138] The link processing method provided by the embodiment of the present application includes: when a first routing device establishes a network with a second routing device, establishing a wired network connection with the second routing device, wherein the first routing device operates in a relay mode. Adding a network port corresponding to the wired network connection to a virtual logical network port of the first routing device, the virtual logical network port is used to control the network connection mode between the first routing device and the second routing device. Receive wireless information sent by the second routing device through the wired network connection. Establishing a wireless network connection with the second routing device according to the wireless information, and adding the network port corresponding to the wireless network connection to the virtual logical network port. By establishing a wired network connection and a wireless network connection between the first routing device and the second routing device, and adding the network ports corresponding to the wired network connection and the wireless network connection to the virtual logical network port, multiple network ports can be bound as a single network port for use by the upper layer, but at the same time, the network connection modes corresponding to the multiple network ports coexist. When switching the link later, it is only necessary to control the network port mounted on the virtual logical network port to quickly and effectively switch the networking mode. Therefore, by controlling the network connection mode between the first routing device and the second routing device through the virtual logical network port, the time consumption of the network switching can be effectively shortened to avoid the impact on the data service of the terminal device caused by the interruption of the network connection.
[0139] It is understandable that the above embodiment introduces that the first routing device first establishes a wired network connection with the second routing device, and then establishes a wireless network connection. In the actual implementation process, it is also feasible for the first routing device and the second routing device to first establish a wireless network connection, and then establish a wired network connection. As long as the interface corresponding to the wired network connection and the interface corresponding to the wireless network connection are added to the virtual logical network port, the above-mentioned technical effect can be achieved.
[0140] Based on the above introduction, it is necessary to further explain that when the first routing device and the second routing device establish a wired network connection, in addition to using a physical connection to connect the two routing devices, the second routing device also needs to assign an IP address to the first routing device to facilitate subsequent management of the first routing device.
[0141] Therefore, the first routing device can send a dial-up request to the second routing device through the network port corresponding to the wired network connection, and then the second routing device responds to the dial-up request and allocates an IP address to the first routing device. Then the first routing device can receive the IP address allocated by the second routing device, for example, the first routing device can receive the IP address through the wired network connection, and set the IP address as the IP address of the first routing device.
[0142] In a possible implementation, a virtual bridge (br) is provided in the first routing device, wherein the virtual bridge is a technology for implementing relay at the link layer and forwarding data frames, wherein the virtual bridge can also be understood as a virtual interface, and multiple network ports can also be mounted under the virtual bridge, and the bond port introduced above can be mounted. When the data frame reaches the virtual bridge, the virtual bridge can decide which port the data is transmitted from, thereby realizing the corresponding relay function.
[0143] Special instructions are required here for setting the IP address of the first routing device. In the traditional technical solution introduced above, when the slave router and the main router establish a wired network, the slave router usually works in bridge mode; and when the slave router and the main router establish a wireless network, the slave router works in relay mode.
[0144] There are some differences in the IP address settings for bridge mode and relay mode. The following describes the two modes separately:
[0145] In bridge mode, there will be at least two nas (Network Attached Storage) ports. These two nas ports are virtual ports obtained by virtualizing the network port into which the network cable is inserted. For example, if the network port into which the network cable is inserted is nas4, then for example, two ports, nas4_4 and nas4_5, can be virtualized. Among them, nas4_4 can be used as a data wan (Wide Area Network) interface for upgrading and data services such as SNTP (Simple Network Time Protocol). The data wan can be mounted under the bridge port (for example, br0). And nas4_5 is used as a management wan interface, which is used to assign IP addresses on this management wan port. The master router accesses the slave router through this management wan, thereby realizing the management of the slave router.
[0146] In relay mode, an IP address is assigned to the bridge port (such as br0). For example, a sub-interface br0:1 can be virtualized for the br0 port as a management wan. In addition, the upgrade and SNTP data services introduced above can go through the bond0 port, and the bond0 port can be mounted under br0.
[0147] Based on the above introduction, it can be determined that for bridge mode, the IP address will be allocated on the nas*_5 (* represents the number of the network port where the network cable is inserted) interface, and for relay mode, the IP address will be allocated on the bridge port (for example, br0). Because the MAC address of the br0 interface is different from the MAC address of the nas*_5 interface, the DHCP server used to allocate IP addresses will think that different devices are applying for IP addresses, so the IP addresses allocated for bridge mode and relay mode are different.
[0148] Then, in the traditional technical solution, when the wired network works in the bridge mode and the wireless network works in the relay mode, the IP addresses allocated to the slave in the wired network and the wireless network will be different. This will result in at least two different IP addresses being allocated for the same routing device, resulting in a waste of IP address resources.
[0149] At the same time, because the IP addresses assigned to routing devices in wired and wireless networks are different, if the IP address is not updated in time during the switching of networking modes, if the main router uses the old IP address to manage the slave router, the main router will not be able to correctly access the slave router.
[0150] Also, because the IP addresses assigned to routing devices in wired and wireless networks are different, each time the networking mode is switched, the slave router must re-request the master router to assign an IP address based on the switched networking mode, which also complicates the process and increases the switching time.
[0151] In the technical solution of the present application, regardless of whether it is wired networking or wireless networking, the slave router works in relay mode. Therefore, regardless of the networking mode adopted by the slave router, the slave router can directly set the received IP address to the IP address of the virtual bridge (br), so that the same IP address is allocated for wired networking and wireless networking, avoiding waste of IP address resources, and ensuring that the main router can access the slave router based on the IP address before, during or after the networking mode is switched, thereby ensuring the management stability of the slave router by the main router, and because the wired networking and wireless networking can use the same IP address, theoretically speaking, in the process of establishing the network between the main router and the slave router, as long as the IP address is allocated once, the slave router can always use the IP address, without having to request the IP address allocation from the main router again after each switch, effectively avoiding the complexity of the switching process and the increase in duration.
[0152] The above embodiments introduce the relevant implementation when the first routing device and the second routing device establish networking. After the networking is established, multiple network ports can be mounted under the bond port, corresponding to multiple data transmission links, for example, data transmission links for wired networking and data transmission links for wireless networking. When switching the networking mode, it is only necessary to simply add and uninstall the network ports. Based on the content introduced in the above embodiments, the two situations of switching the networking mode are described in detail below.
[0153] First, the implementation method of switching the networking mode from wired networking to wireless networking is introduced. Figure 3 and Figure 4 To explain, Figure 3 The process of the link processing method provided in the embodiment of the present application Figure 2 , Figure 4 Schematic diagram of link switching in the networking mode provided in the embodiment of the present application Figure 1 .
[0154] like Figure 3 As shown, the method includes:
[0155] S301. If a disconnection event corresponding to a wired network connection is detected, determine whether the network port corresponding to the wireless network connection is added to the virtual logical network port. If so, execute S302; if not, execute S303.
[0156] Among them, the disconnection event corresponding to the wired network connection can be understood as a network cable unplugging event. If a disconnection event corresponding to the wired network connection is detected, it can be determined that the link corresponding to the wired network connection is no longer connected. At this time, it is necessary to switch to the link corresponding to the wireless network connection for data interaction.
[0157] Although it is described above that a dual link is established between the first routing device and the second routing device, in order to ensure the availability of the wireless network connection, it is still necessary to first determine whether the network port corresponding to the wireless network connection is added to the virtual logical network port.
[0158] S302: Determine that the network connection mode between the first routing device and the second routing device is a wireless network connection.
[0159] In one possible implementation, if the network port corresponding to the wireless network connection is determined to be added to the virtual logical network port, it means that data can be directly transmitted using wireless networking. Therefore, in this embodiment, the network connection method between the first routing device and the second routing device is determined to be a wireless network connection.
[0160] S303: Add the network port corresponding to the wireless network connection to the virtual logical network port, and determine that the network connection mode between the first routing device and the second routing device is a wireless network connection.
[0161] In another possible implementation, if it is determined that the network port corresponding to the wireless network connection is not added to the virtual logical network port, the first routing device needs to add the network port corresponding to the wireless network connection to the virtual logical network port and activate it, and then determine that the network connection method between the first routing device and the second routing device is a wireless network connection.
[0162] It should be noted that when the network port corresponding to the wireless network connection is not added to the virtual logical network port, the wireless network connection between the first routing device and the second routing device still remains connected. It is just that if the network port corresponding to the wireless network connection is not added to the virtual logical network port, data cannot be transmitted through the link corresponding to the wireless network connection. By adding the network port corresponding to the wireless network connection to the virtual logical network port, the link of the wireless networking can be restored, and the operation of adding the network port only requires a simple logical command, which is easy to operate.
[0163] For example, you can refer to Figure 4 Understand the situation of this embodiment, such as Figure 4 As shown, multiple network ports are mounted under the bond port. These network ports correspond to their own data transmission links. The data transmission links can include wired links corresponding to wired networking and wireless links corresponding to wireless networking. There can be multiple wireless network ports, and there can also be multiple corresponding wireless links. For example, it can include Figure 4 The 2.4G wireless link and the 5G wireless link are shown.
[0164] When the disconnection event corresponding to the wired network connection is detected, it can be confirmed that the wired link is no longer connected. However, it should be noted that the network port corresponding to the wired network connection is still mounted under the bond port, but the link is disconnected. After the wired network is disconnected, the link corresponding to the wireless network needs to be used for data transmission. Figure 4 There may be multiple links corresponding to the wireless network. For example, link measurement can be performed on multiple wireless network links, and then the one with the best link quality is determined as the link for data transmission among the multiple wireless network links. Subsequent data packets are exchanged from the network port corresponding to the selected link.
[0165] In one possible implementation, link measurement is performed and the link with the best link quality is determined as the data transmission link to be adopted. In addition to performing measurement when performing network switching, link measurement can also be performed periodically with a preset duration as a period during the process of using wireless networking for data transmission, thereby ensuring that the wireless link with the best link quality is used for data transmission in each time period.
[0166] For example, Figure 4 In the example, the network port corresponding to the 2.4G wireless link is wlan1, and the network port corresponding to the 5G wireless link is wlan2, where wlan1 and wlan2 are both mounted under the bond port. Then the link quality of the 2.4G wireless link and the 5G wireless link is determined to be better, so the 5G wireless link can be determined as the link for data transmission, and then the data packets are exchanged from wlan2.
[0167] The data transmission link of wireless networking is introduced with the example here:
[0168] Assuming that the master router sends a datagram to the slave router, the datagram will be sent out from the wireless network port of the master router and reach the wlan2 port of the slave router. If the wlan2 port is mounted under the bond port, the datagram will then reach the bond port, and if the bond port is mounted under the br port, the datagram will then reach the br port. Multiple network ports of the slave router are also mounted under the br port, and then the br port decides which network port to forward the datagram to. For example, if the destination address of the datagram is the address of the terminal device, and the terminal device and the slave router have established a wireless network connection, and the wireless connection is made through the wlan3 port of the slave router, then the br port can forward the datagram to the wlan3 port, and forward the datagram to the terminal device via the wlan3 port.
[0169] When a data packet is sent from the router to the main router, the data transmission link is similar to the above description, except that the link direction is opposite, which will not be repeated here.
[0170] In this embodiment, when it is detected that the wired network connection is disconnected, it is first detected whether the network port corresponding to the wireless network connection is mounted under the virtual logical network port. If so, it can be determined that the wireless link is unobstructed, and the network connection mode between the first routing device and the second routing device can be directly determined to be a wireless network connection. If not, because the wireless network connection between the first routing device and the second routing device is maintained in a connected state, the wireless network connection can be restored by directly mounting the network port corresponding to the wireless network connection under the virtual logical network port, and then determining that the network connection mode between the first routing device and the second routing device is a wireless network connection. Therefore, the technical solution of the present application can realize the switching of the networking mode very quickly and conveniently when the wired networking is switched to the wireless networking, and it takes very little time to effectively avoid interruption of the data service of the terminal device.
[0171] Next, combine Figure 5 and Figure 6 This chapter introduces how to switch from wireless networking to wired networking. Figure 5 The process of the link processing method provided in the embodiment of the present application Figure 3 , Figure 6 Schematic diagram of link switching in the networking mode provided in the embodiment of the present application Figure 2 .
[0172] like Figure 5 As shown, the method includes:
[0173] S501: If a connection event corresponding to a wired network connection is detected, a detection request message is sent to a second routing device.
[0174] Among them, the connection event corresponding to the wired network connection can be understood as a network cable insertion event. If a connection event corresponding to the wired network connection is detected, it can be determined that a physical connection is inserted into the network port corresponding to the current wired network connection. However, the other end device of the wired connection may be the main router or the terminal device. Therefore, in this embodiment, it is necessary to send a detection request message through the wired network connection.
[0175] If the opposite device is a second routing device, then in this embodiment, a detection request message is sent to the second routing device; if the opposite device is a terminal device, then in this embodiment, a detection request message is sent to the terminal device.
[0176] S502: If a detection response message sent by the second routing device is received, remove the network port corresponding to the wireless network connection from the virtual logical network port.
[0177] If the opposite device is the second routing device, the first routing device will receive the detection response message sent by the second routing device, and can determine that the link corresponding to the wired network connection is unobstructed. Compared with the wireless network connection, the wired network connection has the advantages of stability. Therefore, when the link corresponding to the wired network connection is unobstructed, in this embodiment, the network port corresponding to the wireless network connection is removed from the virtual logical network port to ensure that the wired link is used for data transmission first.
[0178] Based on the above introduction, it can be determined that in this embodiment, when establishing the networking of the first routing device and the second routing device, the first routing device will be set to work in the relay mode, and it is necessary to ensure that the first routing device always works in the relay mode to save the time of mode switching and IP address application. Therefore, in an optional implementation method, after receiving the detection response message sent by the second routing device, it can be determined that the opposite device is the second routing device. At this time, it can be further detected whether the working mode of the first routing device is the relay mode. If it is not the relay mode, the working mode of the first routing device is switched to the relay mode.
[0179] After receiving the detection response message, the working mode of the first routing device is further detected to effectively ensure that the first routing device always works in the relay mode, thereby preventing some routing devices from automatically adjusting the working mode to the bridge mode after switching to the wired network.
[0180] Also, the above also introduces that when establishing a network of a first routing device and a second routing device, the first routing device will receive the IP address assigned by the second routing device. In an optional implementation, after receiving the detection response message sent by the second routing device, the inserted network port corresponding to the connection event can also be set to a wide area network interface, and a dial-up request is sent to the second routing device through the wide area network interface, and the IP address assigned by the second routing device to the first routing device is received, and the IP address is set to the address of the virtual bridge.
[0181] It is understandable that after the routing device detects the network cable insertion event, dialing through the network port where the network cable is inserted and applying for an IP address is a common operation of routing devices on the market. Therefore, in this embodiment, after detecting the connection event corresponding to the wired network connection and receiving the detection response message, the dialing request and the IP address are performed, which can ensure that the existing routing devices on the market can also reuse the technical solution of this application. In addition, re-applying for and allocating the IP address can also effectively ensure the availability of the IP address allocated to the virtual bridge.
[0182] S503: Determine that the network connection mode between the first routing device and the second routing device is a wired network connection.
[0183] Afterwards, it can be determined that the network connection mode between the first routing device and the second routing device is a wired network connection.
[0184] For example, you can refer to Figure 6 Understand the situation of this embodiment, such as Figure 6 As shown, multiple network ports are mounted under the bond port. These network ports correspond to their own data transmission links. The data transmission links can include wired links corresponding to wired networking and wireless links corresponding to wireless networking. There can be multiple wireless network ports, and there can also be multiple corresponding wireless links. For example, it can include Figure 6 The 2.4G wireless link and the 5G wireless link are shown.
[0185] When a connection event corresponding to a wired network connection is detected, a detection request message can be sent to the second routing device. If a detection response message sent by the second routing device is received, it can be confirmed that the wired link is unobstructed. In order to ensure that the wired link is prioritized, the network port corresponding to the wireless network connection is removed from the virtual logical network port in this embodiment. Figure 6 , the two links corresponding to the wireless network are in a disconnected state.
[0186] Assume that Figure 6 In the example, the network port corresponding to the wired link is eth1. After the wired link is determined as the link for data transmission, data packets are exchanged from eth1.
[0187] The data transmission link of wireless networking is introduced with the example here:
[0188] Assuming that the master router sends a datagram to the slave router, the datagram will be sent out from the wired network port of the master router and reach the eth1 port of the slave router. If the eth1 port is mounted under the bond port, the datagram will then reach the bond port, and if the bond port is mounted under the br port, the datagram will then reach the br port. Multiple network ports of the slave router are also mounted under the br port, and then the br port decides which network port to forward the datagram to. For example, if the destination address of the datagram is the address of the terminal device, and the terminal device and the slave router have established a wireless network connection, and the wireless connection is made through the wlan3 port of the slave router, then the br port can forward the datagram to the wlan3 port, and forward the datagram to the terminal device via the wlan3 port.
[0189] When a data packet is sent from the router to the main router, the data transmission link is similar to the above description, except that the link direction is opposite, which will not be repeated here.
[0190] In this embodiment, when it is detected that the wired network connection is restored, a detection request message is first sent through the network port into which the network cable is inserted. When a detection response message is received, it can be determined that the other end device of the network cable is the second routing device. Thereafter, the network port corresponding to the wireless network connection can be removed from the virtual logical network port to ensure that the wired link is used for data transmission first. Therefore, the technical solution of the present application, when the wireless network is switched to the wired network, only needs to simply remove the network port of the wireless network connection, so as to realize the switching of the networking mode very quickly and conveniently, and the time consumption is very short, so as to effectively avoid the interruption of the data service of the terminal device.
[0191] In summary, in the traditional technical solution, because the slave router is in bridge mode (also called wired bridge mode) during wired networking, and in relay mode (also called wireless bridge mode) during wireless networking, when the wired networking is switched to wireless networking, the slave router needs to first turn on the switch of the wireless repeater, then search for the wireless signal of the main router and then connect to the wireless network, and switch the slave router to relay mode. However, when the technical solution of the present application switches from wired networking to wireless networking, there is no need to turn on the repeater switch. You only need to add the network port of the wireless network connection to the bond port to achieve fast switching of the networking mode, which solves the problem that as the link type changes, a new type of link is used to establish a connection, resulting in interruption of user data services and poor experience.
[0192] And for the same reasons as above, in the traditional technical solution, when switching from wireless networking to wired networking, the router needs to turn off the wireless repeater switch, and then switch the router to bridge mode to achieve wired networking. However, when the technical solution of the present application switches from wireless networking to wired networking, there is no need to turn off the repeater switch. You only need to directly remove the network port of the wireless network connection from the bond port to quickly switch the networking mode, which solves the problem that as the link type changes, the connection is established using a new type of link, resulting in interruption of user data services and poor experience.
[0193] The link processing method of the embodiment of the present application has been described above, and the device for executing the above link processing method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute the steps in the above link processing method.
[0194] Figure 7 This is a schematic diagram of the structure of the link processing device provided in the embodiment of the present application. Figure 7 As shown, the device 70 includes: a processing module 701 and a transceiver module 702;
[0195] The processing module 701 is used to establish a wired network connection with the second routing device when the first routing device and the second routing device establish networking, wherein the first routing device works in a relay mode;
[0196] The processing module 701 is further used to add the network port corresponding to the wired network connection to the virtual logical network port of the first routing device, and the virtual logical network port is used to control the network connection mode between the first routing device and the second routing device;
[0197] The transceiver module 702 is used to receive the wireless information sent by the second routing device through the wired network connection;
[0198] The processing module 701 is further configured to establish a wireless network connection with the second routing device according to the wireless information, and add a network port corresponding to the wireless network connection to the virtual logical network port.
[0199] In some implementations, the processing module 701 is further configured to:
[0200] After establishing a wired network connection with the second routing device, detecting whether the working mode of the first routing device is the relay mode;
[0201] If not, the working mode of the first routing device is switched to the relay mode.
[0202] In some implementations, a virtual bridge is provided in the first routing device;
[0203] The processing module 701 is further used for:
[0204] After establishing a wired network connection with the second routing device, sending a dial-up request to the second routing device through a network port corresponding to the wired network connection;
[0205] Receiving the IP address assigned by the second routing device;
[0206] The IP address is set as the address of the virtual bridge.
[0207] In some implementations, the processing module 701 is further configured to:
[0208] If a disconnection event corresponding to the wired network connection is detected, determining whether the network port corresponding to the wireless network connection is added to the virtual logical network port;
[0209] If so, determining that the network connection mode between the first routing device and the second routing device is the wireless network connection;
[0210] If not, the network port corresponding to the wireless network connection is added to the virtual logical network port, and the network connection mode between the first routing device and the second routing device is determined to be the wireless network connection.
[0211] In some implementations, the processing module 701 is further configured to:
[0212] If a connection event corresponding to the wired network connection is detected, sending a detection request message to the second routing device;
[0213] If the detection response message sent by the second routing device is received, removing the network port corresponding to the wireless network connection from the virtual logical network port;
[0214] Determine that the network connection mode between the first routing device and the second routing device is the wired network connection.
[0215] In some implementations, the processing module 701 is further configured to:
[0216] After receiving the detection response message sent by the second routing device, detecting whether the working mode of the first routing device is a relay mode;
[0217] If not, the working mode of the first routing device is switched to the relay mode.
[0218] In some implementations, the processing module 701 is further configured to:
[0219] After receiving the detection response message sent by the second routing device, setting the insertion network port corresponding to the connection event as a wide area network interface;
[0220] Sending a dial request to the second routing device through the wide area network interface;
[0221] Receive the IP address allocated by the second routing device to the first routing device, and set the IP address as the address of the virtual bridge.
[0222] In some implementations, the processing module 701 is further configured to:
[0223] The virtual logical network port is mounted under the virtual network card to transmit data to the virtual network card through the virtual logical network port.
[0224] In some implementations, the wireless information includes wireless information of a backhaul link and wireless information of a forward link, and the wireless information of the forward link is used as wireless information for the terminal device to connect to the first routing device;
[0225] The processing module 701 is specifically used for:
[0226] A wireless network connection is established with the second routing device according to the wireless information of the backhaul link.
[0227] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar and will not be described in detail in this embodiment.
[0228] The link processing method provided in the embodiment of the present application can be applied to electronic devices with communication functions. The electronic devices include terminal devices, and the specific device form of the terminal devices can refer to the above related descriptions, which will not be repeated here.
[0229] The present application embodiment provides a terminal device, Figure 8 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application.
[0230] like Figure 8 As shown, the terminal device 80 includes: a processor 801 and a memory 802; the memory 802 stores computer-executable instructions; the processor 801 executes the computer-executable instructions stored in the memory 802, so that the terminal device 80 executes the above method.
[0231] When the memory 802 is independently provided, the terminal device further includes a bus 1203 for connecting the memory 1202 and the processor 801 .
[0232] The embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above related embodiments, and will not be repeated here.
[0233] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The above method is implemented when the computer program is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.
[0234] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.
[0235] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.
[0236] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0237] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.
Claims
1. A link processing method, characterized in that: Applied to a first routing device, the method includes: When the first routing device establishes networking with the second routing device, establishing a wired network connection with the second routing device, wherein the first routing device operates in a relay mode; Adding a network port corresponding to the wired network connection to a virtual logical network port of the first routing device, wherein the virtual logical network port is used to control a network connection mode between the first routing device and the second routing device; receiving wireless information sent by the second routing device through the wired network connection; Establishing a wireless network connection with the second routing device according to the wireless information, and adding a network port corresponding to the wireless network connection to the virtual logical network port; After establishing a wired network connection with the second routing device, the method further includes: Detecting whether the working mode of the first routing device is the relay mode; If not, the working mode of the first routing device is switched to the relay mode.
2. The method according to claim 1, characterized in that A virtual bridge is provided in the first routing device; After establishing a wired network connection with the second routing device, the method further includes: Sending a dial-up request to the second routing device through a network port corresponding to the wired network connection; Receiving the IP address assigned by the second routing device; The IP address is set as the address of the virtual bridge.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: If a disconnection event corresponding to the wired network connection is detected, determining whether the network port corresponding to the wireless network connection is added to the virtual logical network port; If so, determining that the network connection mode between the first routing device and the second routing device is the wireless network connection; If not, the network port corresponding to the wireless network connection is added to the virtual logical network port, and the network connection mode between the first routing device and the second routing device is determined to be the wireless network connection.
4. The method according to claim 2, characterized in that: The method further comprises: If a connection event corresponding to the wired network connection is detected, sending a detection request message to the second routing device; If the detection response message sent by the second routing device is received, removing the network port corresponding to the wireless network connection from the virtual logical network port; Determine that the network connection mode between the first routing device and the second routing device is the wired network connection.
5. The method according to claim 4, characterized in that After receiving the detection response message sent by the second routing device, the method further includes: Detecting whether the working mode of the first routing device is a relay mode; If not, the working mode of the first routing device is switched to the relay mode.
6. The method according to claim 4, characterized in that After receiving the detection response message sent by the second routing device, the method further includes: Setting the inserted network port corresponding to the connection event to a wide area network interface; Sending a dial request to the second routing device through the wide area network interface; Receive the IP address allocated by the second routing device to the first routing device, and set the IP address as the address of the virtual bridge.
7. The method according to any one of claims 1-2, 5-6, characterized in that: The method further comprises: The virtual logical network port is mounted under the virtual network card to transmit data to the virtual network card through the virtual logical network port.
8. The method according to any one of claims 1-2, 5-6, characterized in that: The wireless information includes wireless information of a backhaul link and wireless information of a forward link, and the wireless information of the forward link is used as wireless information for a terminal device to connect to the first routing device; The establishing a wireless network connection with the second routing device according to the wireless information includes: A wireless network connection is established with the second routing device according to the wireless information of the backhaul link.
9. A link processing device, characterized in that: include: A processing module, configured to establish a wired network connection with a second routing device when a first routing device and a second routing device establish networking, wherein the first routing device operates in a relay mode; The processing module is further used to add the network port corresponding to the wired network connection to the virtual logical network port of the first routing device, and the virtual logical network port is used to control the network connection mode between the first routing device and the second routing device; a transceiver module, configured to receive wireless information sent by the second routing device via the wired network connection; The processing module is further used to establish a wireless network connection with the second routing device according to the wireless information, and add a network port corresponding to the wireless network connection to the virtual logical network port; The processing module is further configured to detect whether the working mode of the first routing device is the relay mode after establishing a wired network connection with the second routing device; if not, switch the working mode of the first routing device to the relay mode.
10. A terminal device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the terminal device executes the method according to any one of claims 1 to 8.
11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product, characterized in that The method comprises a computer program, which, when being executed, enables a computer to execute the method according to any one of claims 1 to 8.
