Management method of routing equipment, routing equipment and computer readable medium
By modifying the destination address of the packet in the routing device, it ensures that users can continue to use the initial IP address to manage the routing device, which solves the problem that users cannot operate after the IP address is changed and improves the user experience.
Patent Information
- Application Number
- CN202310651995.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-02
- Publication Date
- 2024-12-03
AI Technical Summary
After the IP address of the routing device is changed, the user cannot obtain or forget the new IP address, resulting in the inability to manage and operate the routing device, affecting the user experience.
When a routing device receives a message whose destination address is the initial IP address, it modifys its destination address to the current IP address, and realizes access to the target application by processing the message, ensuring that the user can continue to use the initial IP address to manage the routing device.
Users can still manage and operate without perception when the IP address of the routing device changes, avoiding factory reset caused by forgetting or being unable to obtain a new IP address and improving user experience.
Smart Images

Figure CN119071223A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a management method for a routing device, a routing device, and a computer-readable medium. Background Art
[0002] Users usually access the management page of the routing device and other applications through the Internet Protocol (IP) address of the routing device to manage and operate the routing device. The IP address of the routing device may change due to IP address conflicts, user modifications, etc.
[0003] After the IP address of the routing device is changed, if the user does not know that the IP address has changed, cannot obtain the changed IP address, or forgets the changed IP address, the routing device will not be able to be managed and operated, which will adversely affect the user experience. Summary of the invention
[0004] The embodiments of the present disclosure provide a management method for a routing device, a routing device, and a computer-readable medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a management method for a routing device, comprising: receiving a first message, wherein the destination address of the first message is an initial IP address of the routing device, and the destination port is a target application; when the current IP address of the routing device is different from the initial IP address, modifying the destination address of the first message to the current IP address to obtain a second message; and processing the second message.
[0006] In a second aspect, an embodiment of the present disclosure provides a routing device, comprising: one or more processors; a memory on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the management method described in the first aspect of the embodiment of the present disclosure.
[0007] In a third aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the management method described in the first aspect of the embodiment of the present disclosure is implemented.
[0008] In the management method of a routing device provided by an embodiment of the present disclosure, the routing device receives a first message whose destination address is the initial IP address of the routing device and whose destination port is the target application. When the current IP address of the routing device is different from the initial IP address, the routing device can modify the destination address of the first message to the current IP address of the routing device to obtain a second message, and access the target application is achieved by processing the second message. In this way, when the IP address of the routing device changes, the user can still access the target application through the initial IP address of the routing device to manage and operate the routing device. The user is unaware of the change in the IP address of the routing device, and avoids restoring the routing device to factory settings due to forgetting or being unable to obtain the changed IP address of the routing device, which is beneficial to improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 is a flowchart of a method for managing a routing device in an embodiment of the present disclosure;
[0010] Figure 2 is a flowchart of another method for managing a routing device in an embodiment of the present disclosure;
[0011] Figure 3 is a flowchart of some steps in another method for managing a routing device in an embodiment of the present disclosure;
[0012] Figure 4 is a schematic diagram of the composition of a routing device in an embodiment of the present disclosure;
[0013] Figure 5 is a schematic diagram of the composition of a computer-readable medium in an embodiment of the present disclosure;
[0014] Figure 6 It is a schematic diagram of a system architecture for managing routing devices in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0015] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the management method of a routing device, a routing device, and a computer-readable medium provided by the present disclosure are described in detail below with reference to the accompanying drawings.
[0016] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.
[0017] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0018] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0019] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded.
[0020] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.
[0021] The IP address change of the routing device includes but is not limited to the following scenarios: (1) user modification; (2) IP address conflict. For example, after the routing device is connected to the upstream device, if the IP address assigned to the routing device by the upstream device is in the same network segment as the LAN (Local Area Network) IP address of the routing device, an IP address conflict will occur, and the user needs to be notified to modify the IP address of the routing device or directly modify the IP address of the routing device. After the IP address of the routing device is changed, the user will no longer be able to access applications such as the management page through the original IP address of the routing device, and will therefore be unable to manage and operate the routing device.
[0022] In view of this, firstly, refer to Figure 1 The present disclosure provides a method for managing a routing device, which may include the following operations:
[0023] S1. Receive a first message, where the destination address of the first message is the initial IP address of the routing device and the destination port is the target application;
[0024] S2. When the current IP address of the routing device is different from the initial IP address, modify the destination address of the first message to the current IP address to obtain a second message;
[0025] S3. Process the second message.
[0026] In the embodiments of the present disclosure, the target application may be an application in the routing device. In some embodiments, the target application may be an application in the routing device that needs to access the gateway of the routing device. For example, the target application is a management page such as a Web User Interface (Web UI) of the routing device, or the target application is a secure shell (SSH) of the routing device.
[0027] In the embodiment of the present disclosure, the destination address of the first message is the initial IP address of the routing device, and the destination port is the target application, corresponding to the user accessing the target application in the routing device through the initial IP address.
[0028] In the embodiment of the present disclosure, when the initial IP address and the current IP address are different, it indicates that the IP address of the routing device has changed.
[0029] In some embodiments, the destination address of the first message may be modified to the current IP address through Network Address Translation (NAT).
[0030] In the embodiment of the present disclosure, the second message is processed, including but not limited to accessing the target application according to the second message.
[0031] In the management method of a routing device provided by an embodiment of the present disclosure, the routing device receives a first message whose destination address is the initial IP address of the routing device and whose destination port is the target application. When the current IP address of the routing device is different from the initial IP address, the routing device can modify the destination address of the first message to the current IP address of the routing device to obtain a second message, and access the target application is achieved by processing the second message. In this way, when the IP address of the routing device changes, the user can still access the target application through the initial IP address of the routing device to manage and operate the routing device. The user is unaware of the change in the IP address of the routing device, and avoids restoring the routing device to factory settings due to forgetting or being unable to obtain the changed IP address of the routing device, which is beneficial to improving the user experience.
[0032] The embodiments of the present disclosure do not specifically limit the scenario in which the IP address of the routing device changes. For example, the user changes the IP address of the routing device to the current IP address, or the routing device directly changes its IP address to the current IP address in the event of an IP address conflict, or the routing device obtains the current IP address from the uplink device.
[0033] Accordingly, refer to Figure 2 Before receiving the first message, the management method may further include:
[0034] S4. Determine the current second IP address according to the working mode of the routing device.
[0035] In the embodiment of the present disclosure, the routing device may support a routing mode or a bridging mode, which is not specifically limited in the embodiment of the present disclosure.
[0036] In some embodiments, in routing mode, when the IP address assigned by the uplink device to the routing device conflicts with the initial IP address of the routing device, the client accessing the routing device will be unable to access the network and will need to modify the IP address of the routing device.
[0037] Accordingly, in some embodiments, determining the current IP address according to the working mode of the routing device may include:
[0038] When the working mode of the routing device is the routing mode, obtaining a first IP address allocated by the uplink device;
[0039] Determine whether the first IP address conflicts with the initial IP address;
[0040] In the case where the first IP address conflicts with the initial IP address, the local area network IP address of the routing device is modified to the first IP address to determine the current IP address.
[0041] In some embodiments, if an IP address and an initial IP address are in the same network segment, it indicates that the first IP address conflicts with the third IP address. The disclosed embodiments do not specifically limit how to determine whether the first IP address conflicts with the initial IP address. In some embodiments, by performing AND calculation on the initial IP address and the subnet mask (NETMASK) corresponding to the initial IP address, if the first IP address is within the range of the calculation result, it indicates that the first IP address conflicts with the initial IP address.
[0042] In some embodiments, in the bridging mode, the routing device obtains an IP address from the upstream device and sets the IP address as the current IP address of the routing device.
[0043] Accordingly, in some embodiments, determining the current IP address may include:
[0044] When the working mode of the routing device is the bridging mode, a second IP address is obtained from an uplink device to determine the current IP address.
[0045] In some embodiments, the routing device supports the user to select the working mode, that is, to select the routing mode or the bridging mode, and determines whether the routing device is connected to the uplink device and the current IP address according to the Internet access mode selected by the user.
[0046] In the embodiments of the present disclosure, all applications in the routing device can be used as target applications, that is, all applications in the routing device can be accessed through the initial IP address of the routing device; some applications in the routing device can also be used as target applications, that is, only the target applications can be accessed through the initial IP address of the routing device. The embodiments of the present disclosure do not specifically limit this.
[0047] Accordingly, in some embodiments, reference Figure 2 After determining the current IP address, the management method may further include:
[0048] S5. When the current IP address is different from the initial IP address, determine the target application.
[0049] In some embodiments, a user is enabled to select an application as a target application.
[0050] Accordingly, in some embodiments, determining the target application includes:
[0051] generating a candidate application list including at least one candidate application, wherein the candidate application is an application accessed through the initial IP address in the routing device;
[0052] At least one of the candidate applications is determined as the target application according to the configuration instruction obtained through the candidate application list.
[0053] The candidate application list may be in the form of a graphical interface, a text instruction, or other forms, which are not specifically limited in the embodiments of the present disclosure.
[0054] In some embodiments, in the event that a routing device is changed, a default management page can be accessed via the original IP address of the routing device.
[0055] Accordingly, in some embodiments, determining the target application includes:
[0056] A management page of the routing device is determined as the target application.
[0057] In some embodiments, when the management page is determined as the target application, the user can access the management page and further select an application that can be accessed through the initial IP address of the routing device. For example, in the bridge mode, after the routing device obtains the IP address from the uplink device, the management page is NATed by default, and the user can set other applications that need to be NATed in the management page.
[0058] In the embodiment of the present disclosure, a judgment logic for the first message is added in the routing device, that is, NAT is performed only on the message accessing the target application, and NAT is not performed on the message accessing applications other than the target application.
[0059] Accordingly, in some embodiments, reference Figure 3 , the management method further comprises:
[0060] S61, receiving a third message, wherein the destination port of the third message is not the target application;
[0061] S62: Forward the third message according to the destination address and destination port of the third message.
[0062] In some embodiments, the destination address of the third message is an initial IP address, and the destination port is a non-target application.
[0063] In some embodiments, the destination address of the third message is not the initial IP address, and the destination port is not the target application.
[0064] In some embodiments, the third message is forwarded for processing by an uplink device.
[0065] Second, refer to Figure 4 , an embodiment of the present disclosure provides a routing device, comprising:
[0066] One or more processors 101;
[0067] A memory 102, on which one or more programs are stored. When the one or more programs are executed by one or more processors, the one or more processors implement the management method described in the first aspect of the embodiment of the present disclosure;
[0068] One or more I / O interfaces 103 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.
[0069] Among them, the processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU) and the like; the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus) and the like.
[0070] In some embodiments, the processor 101 , the memory 102 , and the I / O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.
[0071] Thirdly, refer to Figure 5 The embodiment of the present disclosure provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the management method described in the first aspect of the embodiment of the present disclosure is implemented.
[0072] In order to enable those skilled in the art to more clearly understand the technical solutions provided by the embodiments of the present disclosure, the technical solutions provided by the embodiments of the present disclosure are described in detail below through specific embodiments:
[0073] Embodiment 1
[0074] In this embodiment, the system architecture of routing device management is as follows: Figure 6 As shown, the entire system architecture consists of a routing device 200 and an uplink device 300, wherein the routing device 200 includes a mode monitoring module 201, a networking monitoring module 202, an IP detection module 203, a user setting monitoring module 204, a NAT processing module 205, and an IP switching module 206.
[0075] The mode monitoring module 201 is used to monitor whether the Internet access mode of the routing device is the routing mode or the bridging mode. The user can modify the Internet access mode of the routing device through the user setting monitoring module 204.
[0076] The network monitoring module 202 is used to monitor whether the routing device is connected to the network, for example, by determining whether a network cable is inserted into the wide area network (WAN) port of the routing device and whether an IP address is obtained from an upstream device.
[0077] The IP detection module 203 is used to detect whether the WAN IP obtained by the routing device from the upstream device conflicts with the LAN IP of the routing device. For example, the LAN IP and LAN NETMASK are ANDed. If the WAN IP is within the range of the calculation result, it indicates that the WAN IP conflicts with the LAN IP of the routing device.
[0078] The user setting monitoring module 204 is used to provide a setting page, which supports the user to select the Internet access mode of the routing device. It also supports the user to choose whether to manage the routing device based on the modified IP address or the initial IP address after an IP conflict is detected. For example, the applications in the routing device that need to access the gateway are listed, and the user chooses whether to use the initial IP address to access the application.
[0079] The NAT processing module 205 is used to NAT the message whose destination address is the initial IP address of the routing device and the destination port is the target application to the current IP address of the routing device in the scenario of IP address conflict in routing mode, and continue to forward the message of non-target application for processing by the upstream device; in bridging mode, NAT the message whose destination address is the initial IP address of the routing device and the destination port is the management page to the IP address obtained by the routing device from the upstream device, and for the target application set by the user in the management page, NAT the message whose destination address is the initial IP address of the routing device and the destination port is the target application to the IP address obtained by the routing device from the upstream device.
[0080] IP switching module 206: After obtaining the IP address assigned by the uplink device according to the monitoring result of the network monitoring module 202, the IP address of the routing device is modified in the router mode, and the IP address is obtained from the uplink device in the bridge mode. If the routing device is in a disconnected state (for example, the IP assigned by the uplink device is not obtained), the routing device continues to support access using the initial IP address, so that the client accessing the routing device can obtain the IP address, thereby managing and operating the routing device.
[0081] Embodiment 2
[0082] This embodiment is based on the system architecture of routing device management in Embodiment 1. The management process of routing devices includes:
[0083] The user selects the Internet access module of the routing device through the user setting monitoring module 204. The user setting monitoring module 204 sends the selection result to the mode monitoring module 201;
[0084] The mode monitoring module 201 sends the Internet access mode selected by the user to the network monitoring module 202 and the NAT processing module 205. The network monitoring module 202 determines whether the routing device is connected to the Internet successfully according to the Internet access mode selected by the user. The result is sent to the IP detection module 203 and the IP switching module 206;
[0085] The IP switching module 206 detects that the user has obtained the IP address assigned by the uplink device according to the monitoring result of the network monitoring module 201, and modifies the IP address of the routing device in the router mode, and obtains the IP address from the uplink device in the bridge mode. If the routing device is in a disconnected state (for example, the IP assigned by the uplink device is not obtained), the routing device continues to support access using the initial IP address, so that the client accessing the routing device can obtain the IP address, thereby managing and operating the routing device;
[0086] After receiving the monitoring result from the network monitoring module 202, the IP detection module 203 detects whether the WAN IP obtained by the routing device from the upstream device conflicts with the LAN IP of the routing device. For example, the LAN IP and LAN NETMASK are calculated. If the WAN IP is within the range of the calculation result, it indicates that the WAN IP conflicts with the LAN IP of the routing device, and the detection result is sent to the NAT processing module 205.
[0087] After receiving the message that there is an IP address conflict and the user continues to use the original IP management router, in routing mode, the message with the destination address being the initial IP address of the routing device and the destination port being the target application is NATed to the current IP address of the routing device, and the message of the non-target application continues to be forwarded for processing by the upstream device; in bridging mode, the message with the destination address being the initial IP address of the routing device and the destination port being the management page is NATed to the IP address obtained by the routing device from the upstream device. For the target application set by the user in the management page, the message with the destination address being the initial IP address of the routing device and the destination port being the target application is NATed to the IP address obtained by the routing device from the upstream device.
[0088] The beneficial effects of this embodiment are as follows:
[0089] In this embodiment, when the routing device is in routing mode or bridging mode, when there is an IP address conflict or the initial IP address of the routing device cannot be used, the user can access the network through the routing device and can manage and operate the routing device based on the initial IP address of the routing device, thereby improving the user experience.
[0090] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0091] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A method for managing a routing device, comprising: Receive a first message, wherein the destination address of the first message is an initial IP address of the routing device and the destination port is a target application; When the current IP address of the routing device is different from the initial IP address, modify the destination address of the first message to the current IP address to obtain a second message; Process the second message.
2. The management method according to claim 1, wherein: Before receiving the first message, the management method further includes: The current IP address is determined according to the working mode of the routing device.
3. The management method according to claim 2, wherein: Determining the current IP address according to the working mode of the routing device includes: When the working mode of the routing device is the routing mode, obtaining a first IP address allocated by the uplink device; Determine whether the first IP address conflicts with the initial IP address; In the case where the first IP address conflicts with the initial IP address, the local area network IP address of the routing device is modified to the first IP address to determine the current IP address.
4. The management method according to claim 2, wherein: Determining the current IP address according to the working mode of the routing device includes: When the working mode of the routing device is the bridging mode, a second IP address is obtained from an uplink device to determine the current IP address.
5. The management method according to any one of claims 2 to 4, wherein: After determining the current IP address according to the working mode of the routing device, the management method further includes: In a case where the current IP address is different from the initial IP address, the target application is determined.
6. The management method according to claim 5, wherein: Determining the target application includes: generating a candidate application list including at least one candidate application, wherein the candidate application is an application accessed through the initial IP address in the routing device; At least one of the candidate applications is determined as the target application according to the configuration instruction obtained through the candidate application list.
7. The management method according to claim 5, wherein: Determining the target application includes: A management page of the routing device is determined as the target application.
8. The management method according to any one of claims 1 to 4, wherein: The management method also includes: receiving a third message, wherein a destination port of the third message is not the target application; Forward the third message according to the destination address and destination port of the third message.
9. A routing device, comprising: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the management method according to any one of claims 1 to 8.
10. A computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the management method according to any one of claims 1 to 8.
