IP address management method and device applied to fiber to room (FTTR)

By recording and updating the associated information of IP addresses on the FTTR master device, the problem of unstable IP addresses in the FTTR network is solved by prioritizing the reclamation of long-term unused IP addresses and identifying unmanaged devices, thereby improving the reliability of the network and the stability of terminal services.

CN121814737APending Publication Date: 2026-04-07XINHUASAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-28
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In FTTR networks, terminal IP addresses are easily reclaimed or randomly assigned due to address pool shortages, leading to service interruptions and access failures. In particular, the IP addresses of de-managed devices cannot be identified, causing conflicts.

Method used

By recording the associated information of terminal IP addresses on the FTTR master device, including active status identifiers and times, monitoring inactive status events, prioritizing the reclamation of long-unused IP addresses when the address pool is tight, automatically identifying unmanaged devices, and avoiding frequent reconfiguration.

Benefits of technology

It ensures the stability of terminal IP addresses, avoids impacting active terminals that are communicating, improves the reliability of the FTTR network, and detects and handles IP conflicts to prevent service interruptions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121814737A_ABST
    Figure CN121814737A_ABST
Patent Text Reader

Abstract

The invention provides an IP address management method and device applied to a fiber to room (FTTR). According to the scheme provided by the invention, after the IP address corresponding to the terminal is obtained for the first time, the associated information of the terminal is continuously recorded and updated, and the associated information comprises the state identifier for identifying the active state and the time for entering the state. By monitoring whether an inactive state event occurs or not, the IP state is updated to an inactive state, and the corresponding time for entering the inactive state is recorded. When no idle IP address exists in the DHCP address pool, the IP address which is inactive for a long time is preferentially recovered based on the actual duration of each IP address which is continuously in the inactive state, and the recovered object is ensured to be mainly the IP address occupied by the terminal which is actually offline or is idle for a long time, so that the influence on the active terminal in communication is avoided in an FTTR (Fiber To The Rate) scene, and the user experience is improved. The stability of the IP address of the active terminal is guaranteed, frequent service reconfiguration is not needed, and the reliability of the FTTR network is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Fiber to the Room (FTTR) technology, and in particular to an IP address management method and apparatus for FTTR. Background Technology

[0002] In FTTR (Fiber To The Room) networks, terminal IP (Internet Protocol) addresses are typically assigned dynamically via a DHCP (Dynamic Host Configuration Protocol) server. However, in FTTR networks, some terminals, such as cameras and gateway devices, require the same IP address to function stably. Traditional DHCP typically reclaims IP addresses based on lease duration. When the number of free IP addresses in the DHCP address pool is limited, it can easily reclaim the IP addresses of terminals that are still communicating normally. Furthermore, terminals can be randomly assigned different IP addresses than before, leading to the need for reconfiguration of terminal services or access failures. Summary of the Invention

[0003] In view of this, this application provides an IP address management method and apparatus for Fiber to the Room (FTTR) to prioritize the stability of terminal IPs and to safely reclaim long-term unused IP addresses when the address pool is tight.

[0004] The technical solution provided in this application is as follows: According to an embodiment of the first aspect of this application, an IP address management method for Fiber to the Room (FTTR) is provided. This method is applied to an FTTR master device and includes: After obtaining the IP address corresponding to the terminal for the first time, the associated information of the IP address is recorded; the associated information includes at least: an identifier of the active state and the time when the IP address entered the active state; the IP address is an IP address in the DHCP address pool managed by the FTTR master device; If an inactive state event of the IP address is detected, the active state identifier in the associated information of the IP address is updated to the inactive state identifier, and the time when the IP address enters the active state is updated to the time when the IP address enters the inactive state. When no free IP address is detected in the DHCP address pool, based on the recorded association information associated with each IP address, it is determined whether there is an IP address that meets the following requirements: it is currently inactive and the duration of its inactivity is greater than or equal to a specified duration threshold; if so, the IP address that meets the requirements is reclaimed; if not, at least one IP address is reclaimed based on the duration of each IP address's inactivity; the reclaimed IP address is then used for redistribution to the terminal.

[0005] According to an embodiment of the second aspect of this application, an IP address management device for Fiber to the Room (FTTR) is provided. This device is applied to an FTTR master device and includes: The recording unit is used to record the association information associated with the IP address after obtaining the IP address corresponding to the terminal for the first time; the association information includes at least: an identifier of the active state and the time when the IP address enters the active state; the IP address is an IP address in the DHCP address pool managed by the FTTR master device; The update unit is configured to, if an inactive state event of the IP address is detected, update the active state identifier in the associated information of the IP address to the inactive state identifier, and update the time when the IP address enters the active state to the time when the IP address enters the inactive state. The recycling unit is used to determine whether there is an IP address that meets the following requirements when it detects that there is no free IP address in the DHCP address pool, based on the recorded association information associated with each IP address: the IP address is currently inactive and the duration of inactivity is greater than or equal to a specified duration threshold; if so, the IP address that meets the requirements is recycled; if not, at least one IP address is recycled based on the duration of inactivity of each IP address; the recycled IP address is used to redistribute to the terminal.

[0006] According to an embodiment of a third aspect of this application, an electronic device is provided, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; the processor being configured to execute the machine-executable instructions to perform the method as described in the first aspect.

[0007] As can be seen from the above technical solutions, the proposed solution continuously records and updates the associated information after obtaining the IP address corresponding to the terminal for the first time, including the status identifier indicating the active state and the time of entering this state. By monitoring whether an inactive state event occurs, the IP state is updated to an inactive state, and the corresponding time of entering the inactive state is recorded. When there are no free IP addresses in the DHCP address pool, based on the actual continuous inactive time of each IP address, long-term inactive IP addresses are preferentially reclaimed. This ensures that the reclaimed targets are mainly IP addresses occupied by terminals that are truly offline or have been idle for a long time. Thus, in the FTTR scenario, the impact on active terminals that are communicating is minimized, the stability of the IP addresses of active terminals is guaranteed, services do not need to be frequently reconfigured, and the reliability of the FTTR network is significantly improved. Attached Figure Description

[0008] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the principles of this application.

[0009] Figure 1 This is a schematic diagram of the network architecture in the FTTR scenario provided in the embodiments of this application; Figure 2 A flowchart of an IP address management method for Fiber to the Room (FTTR) provided in this application embodiment; Figure 3 A schematic diagram illustrating the association information associated with IP addresses provided in the embodiments of this application; Figure 4 This application provides a structural diagram of an IP address management device for Fiber to the Room (FTTR) as described in an embodiment. Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0010] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, and to make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings.

[0011] In FTTR (Fiber To The Room) networking scenarios, such as small and medium-sized scenarios like homes and offices, the network architecture typically consists of one FTTR master device, multiple FTTR slave devices, and access terminals.

[0012] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the network architecture in the FTTR scenario provided in the embodiments of this application.

[0013] like Figure 1 As shown, this architecture may include a single FTTR master device, which connects to multiple terminals (e.g., ...). Figure 1 The FTTR master device can connect to terminals 1, n, etc., and can also connect multiple FTTR slave devices (such as terminals 1, n, etc.) via a splitter. Figure 1 (e.g., FTTR slave device 1, FTTR slave device m, etc.), each FTTR slave device can also connect to multiple terminals (e.g., ... Figure 1 (The terminal connected to FTTR slave device 1 and FTTR slave device m).

[0014] When a terminal needs to request an IP address for network communication, it can send an IP address request to the FTTR master device. The FTTR master device will then allocate an IP (Internet Protocol) address to the terminal from the DHCP storage pool.

[0015] In related technologies, terminal IP addresses are typically assigned dynamically via DHCP (Dynamic Host Configuration Protocol). However, in FTTR scenarios, some terminals, such as cameras and gateway devices, require stable IP addresses to function properly and stably.

[0016] Traditional DHCP IP address allocation typically relies solely on lease time and address pool availability. For instance, when the address pool is insufficient, the IP address with the earliest lease time is reclaimed and reassigned to the requesting terminal in the order of request time. This can lead to the reclamation of IP addresses still in normal communication, causing service interruptions. Furthermore, terminals can easily obtain different IP addresses, requiring service reconfiguration or resulting in access failures, thus impacting user experience.

[0017] In addition, in actual network configurations, some terminals are not under the unified management of the main equipment throughout the entire process. Instead, users or engineers directly configure static IPs on the terminals, forming "dismantled devices." Examples include security equipment such as surveillance cameras, video recorders, and access control controllers, as well as printers, file servers, and industrial control equipment.

[0018] Since the IP address of the detached device is configured directly on the terminal, the DHCP server cannot detect whether the terminal has already used the IP address. When allocating IP addresses to other terminals, it will still allocate the IP address occupied by the detached device to other terminals according to the address pool and lease logic. This causes the detached device and the terminal newly allocated by the DHCP server to use the same IP address, resulting in an IP conflict.

[0019] Based on this, this application proposes an IP address management method for Fiber to the Room (FTTR) to prioritize the stability of terminal IPs, safely reclaim long-term unused IP addresses when the address pool is tight, and automatically identify disconnected devices.

[0020] Please refer to Figure 2 , Figure 2 A flowchart illustrating the method provided in this application embodiment.

[0021] In this embodiment, the method can be applied to the FTTR master device.

[0022] like Figure 2 As shown, the method may include the following steps: Step 201: After obtaining the IP address corresponding to the terminal for the first time, record the associated information related to the IP address.

[0023] In this embodiment, after the FTTR master device obtains the IP address corresponding to the terminal for the first time, the FTTR master device can record the association information associated with that IP address. This association information includes at least: an identifier of the active state and the time when the IP address entered the active state. The IP address is one of the IP addresses in the DHCP address pool managed by the FTTR master device.

[0024] In this embodiment, it is assumed that the maximum number of terminal specifications supported by the FTTR network is N (e.g., 300), and the number of available IP addresses in the DHCP address pool configured by the FTTR master device can be M, where M>N (e.g., 400 or 512 IPs are configured) to set some redundant IP addresses, so that a high proportion of available addresses can still be maintained in extreme scenarios.

[0025] In this embodiment, for each IP address in the DHCP address pool, the FTTR master device additionally stores and maintains the status identifier of the IP address and the time when it entered the status indicated by the status identifier.

[0026] An IP address's status identifier can include an active status identifier and an inactive status identifier. An active status indicates that packets have been transmitted through that IP address within a set time period, while an inactive status indicates that no packets have been transmitted through that IP address within the set time period.

[0027] In step 201, after the FTTR master device obtains the IP address corresponding to the terminal for the first time, it can set the status flag corresponding to the IP address to an active status flag, indicating that the IP address is in an active state, and record the time when the IP address enters the active state as the time when the FTTR master device obtains the terminal IP address.

[0028] How to determine if an IP address is inactive and how to determine when it enters an inactive state will be detailed below, and will not be repeated here.

[0029] In this embodiment, IP addresses can be categorized into three types based on the allocation method: dynamic IP addresses, static IP addresses pre-configured on the terminal, and static IP addresses pre-configured on the FTTR master device. The method by which the FTTR master device initially obtains the IP address corresponding to the terminal differs for each type of IP address.

[0030] The following sections provide a detailed description of the three different types of IP addresses and how the FTTR master device obtains the corresponding IP address of the terminal for the first time.

[0031] (1) Dynamic IP address In this embodiment, a dynamic IP address refers to the IP address assigned to the terminal by the FTTR master device based on the terminal's IP address request. The associated information of the IP address may also include the MAC address most recently bound to the IP address.

[0032] As one example, the specific method by which the FTTR master device allocates a corresponding IP address to a terminal based on the terminal's IP address request may include: Based on the terminal's MAC address, if a target association containing that MAC address is found in the recorded association information, the IP address in that target association information is assigned to the terminal; otherwise, an idle IP address is selected from the DHCP address pool and assigned to the terminal.

[0033] Specifically, the IP address request initiated by the terminal carries the terminal's MAC address, and the FTTR master device stores the association information associated with each IP address in the DHCP address pool, including the MAC address most recently bound to the IP address.

[0034] When FTTR receives an IP address request from a terminal, it can query the associated information of each recorded IP address based on the MAC address of the terminal carried in the IP address request. If there is a most recently bound MAC address in the associated information that is the same as the terminal's MAC address, then the IP address included in the associated information of that MAC address will be assigned to the terminal.

[0035] In this embodiment, if the association information of each recorded IP address is found to match the MAC address of the terminal requesting the IP address, it indicates that the terminal has been assigned the IP address before, and the IP address is not currently occupied by other terminals (because if it is occupied by other terminals, the most recently bound MAC address recorded in the association information of the IP address will change). At this time, the IP address can be directly assigned to the terminal to prioritize the stability of the terminal's IP address.

[0036] If there is no most recently bound MAC address that matches the terminal's MAC address in the recorded association information, then an available IP address is selected from the DHCP address pool and assigned to the terminal.

[0037] In this embodiment, if there is a matching information among the recorded IP address association information that matches the MAC address of the terminal requesting the IP address, it indicates that the terminal is requesting the IP address for the first time, or that the IP address previously occupied by the terminal has been reclaimed and allocated to other terminals.

[0038] At this point, an IP address can be directly assigned to the terminal from the available IP addresses in the DHCP address pool. The method for assigning an IP address to the terminal from the available IP addresses in the DHCP address pool can be based on a specified strategy, such as starting from the beginning of the address pool and sequentially assigning the next available free IP address, or selecting the free IP address with the smallest value in the address pool for allocation. This application does not impose any restrictions on this.

[0039] In this embodiment, after receiving the IP address request from the terminal, if the FTTR master device detects that there are no free IP addresses in the DHCP address pool, it will reclaim the occupied IP addresses. The specific process of reclaiming IP addresses will be detailed in step 203 below, and will not be repeated here.

[0040] As an example, in addition to recording the active status identifier and the time when the IP address enters the active status in the association information, the FTTR master device can also set the MAC address most recently bound to the IP address in the association information as the MAC address of the terminal.

[0041] (2) A static IP address pre-configured on the terminal In this embodiment, the static IP address pre-configured on the terminal refers to the static IP address manually configured by the terminal user or device administrator in the network settings of the terminal device itself. For example, in an FTTR networking scenario, the terminal user manually configures a static IP address for devices such as smart cameras and network printers that need to be accessed through a fixed IP address.

[0042] Considering that in related technologies, the FTTR master device cannot identify the statically configured IP address on the terminal (this type of terminal is referred to as a disconnected device), which causes the FTTR master device to still assign the IP address occupied by the disconnected device to other terminals when allocating IP addresses, resulting in IP conflicts, this application proposes a solution that can automatically identify disconnected devices.

[0043] Specifically, the IP address association information stored in the FTTR master device also includes an IP type tag. This IP type tag indicates the type of the IP address; for example, the IP type tag may include a dynamic IP, a static IP address pre-configured on the terminal, or a static IP address pre-configured on the FTTR master device.

[0044] Among them, dynamic IP refers to the IP address assigned to the terminal by the FTTR master device in accordance with the above (1). After assigning an IP address to any terminal, the FTTR master device will set the IP address type of the IP address to dynamic IP.

[0045] The IP address configured on the FTTR master device refers to the IP address manually configured for the terminal on the FTTR master device (which will be detailed below and will not be repeated here). The FTTR master device has relevant records for both of the above two types of IP addresses. When assigning IP addresses to other terminals, the above two types of already assigned IP addresses will not be reassigned to other terminals.

[0046] For static IP addresses that are pre-configured on the terminal, there are no relevant records on the FTTR master device. For such IP addresses configured on the terminal, this application determines which terminal the IP address of this type is configured on by means of the following method.

[0047] In this embodiment, for a static IP address pre-configured on the terminal, the FTTR master device can obtain the IP address corresponding to the terminal when it receives the first message sent by the terminal after it comes online.

[0048] Specifically, when the FTTR master device detects that an IP address is used by a terminal for the first time based on the network forwarding table, if the IP address has not been assigned to any terminal by the FTTR master device (not a dynamic IP) and the IP address is not an IP address configured on the FTTR master device (not a static IP address pre-configured on the FTTR master device), then the IP type tag of the IP address is set to the static IP address pre-configured on the terminal.

[0049] In this embodiment, the FTTR master device can monitor the underlying network protocol entries (denoted as the network forwarding table) used for packet forwarding decisions. These entries can reflect the network communication activities of the terminal. Specifically, the network forwarding table can be an ARP (Address Resolution Protocol) table, a Neighbor Discovery Table, a Session Table, etc., and this application does not impose any limitations on it.

[0050] In this embodiment, the FTTR master device can continuously monitor the network forwarding table. If it finds that an IP address is occupied, and the IP address is neither an IP address assigned to the terminal by the FTTR master device nor an IP address manually configured on the FTTR master device, it can be determined that the IP address is the IP address of the unmanaged device. At this time, the IP type tag of the IP address can be set to a static IP address that is pre-configured on the terminal.

[0051] If the IP type flag is set to a static IP address that is pre-configured on the terminal, the IP address will not be reassigned to other terminals during address allocation, thus avoiding IP conflicts.

[0052] (3) Static IP address pre-configured on the FTTR master device In this embodiment, the static IP address pre-configured on the FTTR master device refers to the static IP address configured by the network administrator in the management interface or APP of the FTTR master device. For example, in the FTTR networking scenario, the network administrator manually configures static IP addresses for important devices such as the home main gateway and NAS server, reserving fixed IPs for these important devices to ensure stable addresses and easy management.

[0053] For static IP addresses pre-configured on the FTTR master device, since they are configured directly on the FTTR master device, the FTTR master device can directly obtain which terminal the IP address is configured to.

[0054] This concludes the description of step 201. We will now proceed to step 202.

[0055] Step 202: If an inactive state event of an IP address is detected, update the active state identifier in the associated information of the IP address to the inactive state identifier, and update the time when the IP address enters the active state to the time when the IP address enters the inactive state.

[0056] In this embodiment, after obtaining the IP address corresponding to the terminal, the FTTR master device will continuously monitor whether an inactive state event occurs at that IP address.

[0057] If an IP address is found to be inactive, the identifier in the associated information of that IP address that was originally used to indicate an active state can be updated to an identifier that indicates an inactive state, and the time when the IP address entered an active state can be updated to the time when the IP address entered an inactive state.

[0058] Specifically, inactive state events for IP addresses may include: the forwarding table entry corresponding to the locally learned IP address aging out; or, if the time difference between the time when the IP address enters an active state and the current time is greater than or equal to a set time difference, and there is no forwarding table entry corresponding to the IP address locally.

[0059] In this embodiment, when the FTTR master device detects that the network forwarding table entry corresponding to the locally learned IP address has been aged out and deleted due to exceeding its lifespan, it indicates that the IP address has not transmitted packets for a long time. It can be assumed that the terminal has not communicated through the IP address within the set time period, and at this time the IP address can be updated to an inactive state.

[0060] The time when an IP address enters an inactive state can be the moment when the network forwarding table entry corresponding to the locally learned IP address is aged out and deleted due to exceeding its lifespan.

[0061] In this embodiment, the FTTR master device can also continuously detect the time difference between the time when the IP address enters the active state and the current time. If the time difference is found to be greater than or equal to the set time difference, and there is no forwarding table entry corresponding to the IP address locally, it can be considered that the terminal has not communicated through the IP address within the set time period.

[0062] The FTTR master device can periodically scan the current network forwarding table (such as the ARP table). If it finds that the ARP entry for an IP address does not exist, and the time between the time the IP address entered an active state and the current time has exceeded the set time, it indicates that the IP address has not been used for a long time, and the status indicator in the associated information may have failed to be updated in time due to an anomaly. At this time, the IP address can be updated to an inactive state.

[0063] It should be noted that the time when each IP address enters the active state is updated when the forwarding table entry of the network forwarding table corresponding to the IP address is established or refreshed. That is, when a packet is transmitted through this IP address, the time when it enters the active state will be updated.

[0064] This concludes the description of step 202.

[0065] Step 203: When it is detected that there are no free IP addresses in the DHCP address pool, based on the association information associated with each recorded IP address, determine whether there is an IP address that meets the following requirements: the current inactive state and the duration of the inactive state is greater than or equal to a specified duration threshold.

[0066] In this embodiment, step 203 is executed when no free IP address is detected in the DHCP address pool. It is not executed sequentially with steps 201 and 202. It is referred to as step 203 here for ease of description.

[0067] The FTTR master device can monitor whether there is a free IP address in the DHCP address pool when it receives an IP address request initiated by the terminal, or it can periodically monitor whether there is a free IP address in the DHCP address pool. If it determines that there is no free IP address in the DHCP address pool, it will execute this step 203.

[0068] In related technologies, when the FTTR master device detects that there are no free IP addresses in the address pool, it usually directly reclaims the IP address of the terminal that applied for the IP address earliest, according to the lease order. However, the terminal that applied for the IP address earliest may still be using that IP address for communication. Directly reclaiming the IP address in this case will cause service interruption and affect user experience.

[0069] Based on this, this application proposes an IP address recycling method based on continuous inactive duration. Specifically, when it is detected that there are no free IP addresses in the DHCP address pool, it can be determined whether there are IP addresses that are currently inactive and have been inactive for a duration greater than or equal to a specified duration threshold, based on the association information associated with each recorded IP address.

[0070] As one example, a specific method for determining whether a matching IP address exists may include: For each IP address whose associated information indicates it is inactive, obtain the time when the IP address entered the inactive state. Determine the duration of continuous inactivity of the IP address based on the current time and the time when the IP address entered the inactive state; If the duration of continuous inactivity is greater than or equal to the specified duration threshold, then the IP address is determined to be a qualified IP address.

[0071] In this embodiment, for each IP address in an inactive state, the difference between the current time and the time when the IP address entered the inactive state recorded in the associated information can be determined to obtain the duration of the continuous inactive state of the IP address. When the duration of the continuous inactive state of the IP address is greater than or equal to a specified duration threshold, it indicates that the IP address has been in an inactive state for a long time and is likely to be an IP address that has been discontinued. At this time, the IP address can be determined to be an IP address that meets the requirements.

[0072] If an IP address that meets the requirements is found, it indicates that there is an IP address that has been inactive for a long time. At this point, step 203a can be executed.

[0073] Step 203a: Reclaim IP addresses that meet the requirements.

[0074] In this embodiment, after identifying one or more IP addresses that meet the requirements, these IP addresses can be reclaimed.

[0075] For IP addresses that are being reclaimed, the most recently bound MAC address in the IP address's association information can be cleared, the status flag can be set to a default value such as an inactive status flag, and the time when the IP address entered the inactive state can be cleared.

[0076] Optionally, all eligible IP addresses can be reclaimed at once, or only the required number of IP addresses can be reclaimed. For example, if a terminal is currently applying for an IP address, only one eligible IP address can be reclaimed and allocated to that terminal. When reclaiming the required number of IP addresses, they can be reclaimed in descending order of the duration of continuous inactivity. This application does not impose any restrictions on this.

[0077] This concludes the description of step 203a.

[0078] If, after iterating through all inactive IP addresses, no IP address is found that meets the requirements, step 203b can be executed.

[0079] Step 203b: Reclaim at least one IP address based on the duration of inactivity of each IP address.

[0080] In this embodiment, if no IP address meets the requirements, it indicates that all IP addresses currently in an inactive state have been in an inactive state for a short period of time, and may be temporarily inactive. In this case, the IP address that is currently inactive, has been inactive for the longest time, and is not a static IP address pre-configured on any terminal or on the FTTR master device can be reclaimed and assigned to the terminal requesting the IP address.

[0081] This concludes the description of step 203b.

[0082] It should be noted that in step 203, for the IP address that meets the requirements, that is, the IP address that is currently inactive and has been inactive for a duration greater than or equal to the specified duration threshold, it indicates that the IP address has been inactive for a long time and is likely to be an IP address that has been stopped from use. At this time, regardless of whether the IP address is a dynamic IP address or a static IP address, it can be determined that the IP address meets the requirements and the IP address is reclaimed.

[0083] If no IP address meets the requirements, it means that there is no IP address that has been inactive for a long time. In this case, when reclaiming according to the inactive duration, static IP addresses (including static IP addresses pre-configured on the terminal and static IP addresses pre-configured on the FTTR master device) will not be reclaimed. This is to prevent static IPs from being reclaimed before they become active, and to ensure that the terminal configured with a static IP address can continue to use the static IP address stably.

[0084] In this embodiment, if no free IP address is found in the DHCP address database, and no IP address is found to be inactive, it is determined that an IP address cannot be provided to the new terminal this time.

[0085] At this time, the FTTR master device may return address allocation failure information to the terminal; and / or trigger address pool expansion, lease adjustment or manual intervention, which is not limited in this application.

[0086] This concludes the description of step 203.

[0087] In this embodiment, there is a special case when allocating IP addresses to terminals. For example, one terminal (referred to as the second terminal) first obtains an IP address through the DHCP service of the FTTR master device, while another terminal (referred to as the first terminal) later occupies the IP address by setting a static IP. In this case, the problem of IP conflict will still occur. In this regard, this application also proposes a conflict detection and handling method.

[0088] Specifically, when it is detected that the first terminal is using a static IP address pre-configured on the terminal for network communication, if it is found that the IP address has been assigned to the second terminal based on the association information associated with each recorded IP address, an alarm message is sent to the first terminal, and the first terminal is prohibited from using the IP address for network communication.

[0089] In this embodiment, for example, the second terminal first obtains IP address 1 through the DHCP service of the FTTR master device. At this time, the MAC address recorded in the association information of IP address 1 is the MAC address of the second terminal. The first terminal then configures IP address 1 as the static IP address of the first terminal by having the terminal user directly configure a static IP address locally on the terminal.

[0090] When the first terminal initiates communication, the FTTR master device will detect that IP address 1 in the network forwarding table is being used by the MAC address of the first terminal. However, the MAC address recorded in the association information of IP address 1 is the MAC address of the second terminal, which does not match the MAC address of the first terminal. At this time, it is considered that an IP address conflict has occurred, and an alarm message can be generated.

[0091] At the same time, the first terminal can be prohibited from communicating through IP address 1, ensuring that the service of the second terminal that was allocated IP address 1 first is not interrupted, that is, ensuring that the second terminal has priority to use IP address 1.

[0092] Furthermore, since the FTTR master device in related technologies typically stores the IP address association information in memory, after a power outage or restart, all IP addresses in the DHCP address pool are considered idle IPs. At this time, IP addresses can only be reassigned to the terminals, and the system cannot remember which terminals have been assigned which IP addresses.

[0093] Based on this, this application also proposes that, upon detecting that any IP address is assigned to a terminal, or that the IP address is reclaimed, or that the IP type tag of the IP address is changed, key information included in the associated information of the IP address is stored in a non-volatile storage medium; wherein, the key information includes at least the MAC address most recently bound to the IP address, and an IP type tag used to indicate the type of the IP address; When the FTTR master device is powered on or restarted, critical information is loaded from non-volatile storage media to restore the IP address association information.

[0094] In this embodiment, the FTTR master device maintains complete association information for each IP address in memory during operation. When a critical event that significantly affects the association information occurs, such as an IP address being assigned to a terminal, the IP address being reclaimed, or the IP type label of the IP address being changed, the FTTR master device can write the changed association information to a non-volatile storage medium.

[0095] For fields that are updated frequently but have a relatively small impact if lost, such as the time when an IP address enters an active state, the status indicator (indicating an active or inactive state), and the time when an IP address enters an inactive state, they can be updated in real time only in memory. The overall information of the IP address association information or the incremental information compared with the last write can be written in batches to non-volatile storage media according to a preset period or number of events. For example, synchronization can be performed every T seconds, or synchronization can be triggered when the cumulative number of changed entries exceeds a preset threshold. This application does not impose any restrictions on this.

[0096] When the FTTR master device powers on or restarts, critical information can be loaded from non-volatile storage media to restore the association information of each IP address. This preserves critical IP information and prevents static IP addresses from being incorrectly assigned to other terminals due to address pool resets.

[0097] This concludes the discussion on... Figure 2 The description.

[0098] The proposed solution continuously records and updates the associated information of the terminal after it first obtains the corresponding IP address, including the status identifier indicating the active state and the time it entered this state. By monitoring for inactive state events, the IP state is updated to inactive, and the time of entering the inactive state is recorded. When there are no free IP addresses in the DHCP address pool, IP addresses that have been inactive for a long time are prioritized for reclamation based on the actual continuous inactive duration of each IP address. This ensures that the reclamation targets are mainly IP addresses occupied by terminals that are truly offline or have been idle for a long time. Therefore, in FTTR scenarios, this minimizes the impact on active terminals that are currently communicating, ensures the stability of the active terminal's IP address, eliminates the need for frequent service reconfiguration, and significantly improves the reliability of the FTTR network.

[0099] In addition, this application proposes a scheme for the FTTR master device to automatically identify the IP address of the disconnected device, and can detect and alarm the situation of static IP and dynamic IP allocation conflict, so as to avoid service interruption caused by IP address being misused, misreclaimed or conflicted.

[0100] The following is based on Figure 3This application provides an overall description of the IP address management method proposed for Fiber to the Room (FTTR).

[0101] Please refer to Figure 3 , Figure 3 This is a schematic diagram illustrating the association information associated with IP addresses provided in the embodiments of this application.

[0102] like Figure 3 As shown, the FTTR master device maintains a record (association information) for each IP address in the DHCP address pool, forming an IP address record table. This record table is stored in memory during device operation and synchronized to non-volatile storage media according to a preset strategy.

[0103] Specifically, the associated information for each IP address may include the following: 1. IP address; 2. The most recently bound MAC address; 3. Allocation flag, used to indicate whether the IP address has been allocated; 4. IP type tag, used to indicate the type of IP address, which may include dynamic IP, IP address configured on the FTTR master device, or IP address configured on the terminal; 5. Status identifier, used to indicate the current status of the IP address, which may include active and inactive status; 6. The time it takes for an IP address to become active; 7. The time when an IP address enters an inactive state.

[0104] When the FTTR master device is powered on or restarted, it reads the IP address association information saved in the previous job cycle from the non-volatile storage medium.

[0105] The associated information is loaded into memory to restore information such as IP type marker, bound MAC, allocation marker, status identifier, active state occurrence time and inactive state occurrence time for each IP address.

[0106] As an example, for IP type-marked associated information of IP addresses configured on the terminal, their "assigned" status can be maintained first, so that after the system restarts, the IP can still be assigned to the corresponding terminal first, instead of being dynamically assigned to other terminals.

[0107] For IPs marked as dynamic IPs, their original status can be maintained, or they can be temporarily marked as inactive according to the policy, and the status and timestamp can be updated again later based on the forwarding table and communication status.

[0108] After completing the above initialization loading process, when a terminal in the FTTR network requests an IP address from the FTTR master device, the FTTR master device executes the following allocation process based on the IP address record table: First, the FTTR master device searches for a record in the IP address association information that corresponds to the MAC address of the terminal. If a matching record is found, the IP address in the record is assigned to the terminal first.

[0109] At the same time, update the associated information for this IP address: Update the most recently bound MAC address to the current terminal's MAC address (overwrite if different); update the active state occurrence time to the current time; set the status flag to active state; clear or ignore the time when the IP address enters inactive state; set the allocation flag to allocated.

[0110] If no record matching the MAC address is found in the association information, then an unassigned free IP record is searched in the association information.

[0111] If a free IP address exists, select one according to sequence or a preset strategy, assign the IP address to the current terminal, and update the associated information of that IP address: Write the current terminal MAC address; mark the IP type as dynamic IP; set the allocation flag to allocated; set the status flag to active; set the time when the IP address entered the active state to the current time; clear the time when the IP address entered the inactive state.

[0112] If the FTTR master device detects that there are no free IP addresses in the DHCP address pool, it initiates a traversal search and recycling process.

[0113] Specifically, the FTTR master device scans the associated information of each IP address one by one to comprehensively assess all recyclable resources.

[0114] For IP addresses whose status is marked as inactive, the FTTR master device can calculate the continuous inactivity duration based on the current time minus the time when the IP address entered the inactive state. If the inactivity duration exceeds the preset initialization time threshold, it is considered that the IP address has been unoccupied for a long time, and the identified IP address (whether dynamic or static) can be reclaimed.

[0115] Specifically, the association information for these IP addresses can be updated: Clear the most recently bound MAC address; set the allocation flag to unassigned; mark the IP type as dynamic IP; clear the time when the IP address entered the active state and the time when the IP address entered the inactive state; keep the status flag as inactive.

[0116] In this embodiment, the reclaimed IP addresses can be directly allocated as free IP addresses. For example, one of these newly acquired free IP addresses can be selected and allocated to the currently requesting terminal. Update the most recently bound MAC address to the current terminal MAC address; mark the IP address type as dynamic IP; set the allocation flag to allocated; set the status flag to active; update the time when the IP address entered the active state to the current time, and clear the time when the IP address entered the inactive state.

[0117] If an inactive IP address is found, but no IP address has a continuous inactivity duration exceeding the initialization time threshold, then the dynamic IP address with the longest continuous inactivity duration can be assigned to the current terminal. Update the most recently bound MAC address to the current terminal MAC address; update the time when the IP address entered an active state to the current time; update the status flag to active state; clear the time when the IP address entered an inactive state; set the allocation flag to allocated.

[0118] If there is no inactive IP address, it is determined that an IP address cannot be provided to the new terminal. The address allocation failure information can be returned to the terminal, and further measures such as address pool expansion, lease adjustment or manual intervention can be triggered. This application does not impose any restrictions on these measures.

[0119] In addition, this application can automatically identify disconnection devices.

[0120] Specifically, the FTTR master device can combine the learning results of DHCP allocation records and forwarding tables such as ARP tables to observe the terminal's IP occupation behavior multiple times, identify unmanaged devices, and mark their IP addresses as static IP addresses pre-configured on the terminals.

[0121] In this embodiment, the tube removal equipment can be divided into two types of tube removal equipment, and the processing methods of the two types of tube removal equipment will be described below.

[0122] (1) Category I pipe disconnection equipment In this embodiment, the first type of unmanaged device refers to a terminal that previously obtained an IP address through the host device's DHCP, and the IP and MAC binding relationship has been recorded in the association information. Subsequently, for a considerable period of time, the terminal no longer initiates DHCP requests, but the host device repeatedly observes through ARP or the forwarding table that the terminal is still using the IP address for communication.

[0123] When the above conditions are met, the FTTR master device can identify the terminal as a Class 1 disconnected device. At this time, the type label of the IP can be left unchanged, that is, the IP will remain as a dynamic IP in the record table.

[0124] Since the master device continuously observes that the IP has normal communication through the forwarding table, the IP's status will be maintained as active, and the active status occurrence time field will be continuously refreshed.

[0125] In the subsequent address reclamation process, dynamic IPs that are inactive and have been continuously inactive for a long period of time are selected for reclamation or initialization, while active IPs are not actively reclaimed. Therefore, even if the terminal no longer initiates DHCP requests, as long as normal communication is maintained, its corresponding dynamic IP is still treated as a normal active terminal and is in a state of normal use and priority reservation.

[0126] (2) Category II pipe disconnection equipment In this embodiment, the FTTR master device detects a new entry for a certain IP address in the forwarding table. This IP address does not appear in the DHCP allocation record of the device, meaning it has never been dynamically allocated through the DHCP service of the device. Furthermore, this IP address is not a static IP that has been manually configured on the FTTR master device, and it belongs to a dynamic IP in the DHCP address pool managed by the FTTR master device.

[0127] If the above conditions are met simultaneously, the IP address can be identified as the IP address used by the second type of managed device, and the IP address can be marked as a static IP address pre-configured on the terminal.

[0128] Furthermore, if an IP address is found to have appeared in the DHCP allocation record of this device, but the newly learned MAC address in the current forwarding table is inconsistent with the MAC address bound to the IP address, it indicates that the IP address has been assigned to a terminal as a dynamic IP address via DHCP, and another terminal device has configured the same IP address as a static IP address, thus causing an IP conflict.

[0129] At this point, an IP conflict alarm can be generated and reported via local logs, network management interface, or other alarm channels to indicate that an IP address conflict has occurred, while ensuring that the communication of the terminal originally dynamically assigned by DHCP is not affected by the conflicting terminal.

[0130] When an IP address conflict is detected, the FTTR master device, on the one hand, prevents the forwarding table entries of the conflicting MAC address from participating in normal forwarding to avoid network chaos caused by incorrect static configuration, and on the other hand, prompts the operation and maintenance personnel to make on-site adjustments or reconfiguration through alarm means.

[0131] This concludes the overall description of the IP address management method applied to Fiber to the Room (FTTR) in this application.

[0132] Please refer to Figure 4 , Figure 4This application provides an embodiment of an IP address management device for Fiber to the Room (FTTR) applications, specifically for use with the FTTR master equipment. Figure 4 As shown, the device may include a direction recording unit 401, an update unit 402, and a retrieval unit 403. Specifically, the device includes: The recording unit 401 is used to record the associated information of the IP address after obtaining the IP address corresponding to the terminal for the first time; the associated information includes at least: the identifier of the active state and the time when the IP address enters the active state; the IP address is an IP address in the DHCP address pool managed by the FTTR master device; The update unit 402 is used to update the active state identifier in the associated information of the IP address to the inactive state identifier, and update the time when the IP address enters the active state to the time when the IP address enters the inactive state if an inactive state event of the IP address is detected. The recycling unit 403 is used to determine, based on the recorded association information associated with each IP address, whether there is an IP address that meets the following requirements when it is detected that there is no free IP address in the DHCP address pool: the IP address is currently inactive and the duration of inactivity is greater than or equal to a specified duration threshold. If yes, the IP address that meets the requirements is recycled; if no, at least one IP address is recycled based on the duration of inactivity of each IP address. The recycled IP address is then used to redistribute to the terminal.

[0133] Optionally, the IP address corresponding to the terminal is obtained for the first time based on the terminal's IP address application and is the corresponding IP address allocated to the terminal; the associated information also includes the MAC address most recently bound to the IP address; Assign a corresponding IP address to the terminal, including: Based on the terminal's MAC address, if a target association containing that MAC address is found in the recorded association information, the IP address in that target association information is assigned to the terminal; otherwise, an idle IP address is selected from the DHCP address pool and assigned to the terminal. And / or, the IP address corresponding to the terminal is obtained for the first time when the first message sent after the terminal comes online is received; the IP address is a static IP address that is pre-configured on the terminal; The recycling unit 403 is specifically used for: Identify the IP address that is currently inactive, has been inactive for the longest time, and is not a static IP address pre-configured on any terminal, and reclaim that IP address. And / or, the IP address corresponding to the terminal is first obtained when the address configuration instruction is received; the IP address is a static IP address pre-configured on the FTTR master device; The recycling unit 403 is specifically used for: Identify the IP address that is currently inactive for the longest period of time and is not a static IP address pre-configured on the FTTR master device, and reclaim that IP address. And / or, inactive state events of an IP address include: The forwarding table entries corresponding to the locally learned IP addresses have become outdated; Alternatively, if the time difference between the time when the IP address enters the active state and the current time is greater than or equal to the set time difference, and there is no forwarding table entry corresponding to the IP address locally; And / or, the recycling unit 403 is also used for: When it is detected that the first terminal is using a static IP address pre-configured on this terminal for network communication, if it is found that the IP address has been assigned to the second terminal based on the association information associated with each recorded IP address, an alarm message is sent to the first terminal and the first terminal is prohibited from using the IP address for network communication. And / or, the recycling unit 403 is also used for: Upon detecting that any IP address is assigned to a terminal, or that the IP address is reclaimed, or that the IP type tag of the IP address is changed, the key information included in the associated information of the IP address is stored in a non-volatile storage medium; wherein, the key information includes at least the MAC address most recently bound to the IP address, and the IP type tag used to indicate the type of the IP address; When the FTTR master device is powered on or restarted, critical information is loaded from non-volatile storage media to restore the IP address association information.

[0134] This concludes the process. Figure 4 Description of the device.

[0135] This application also provides embodiments that... Figure 4 Hardware structure description of the illustrated device. This hardware structure is... Figure 5 The structure in the illustrated electronic device. Please refer to [link / reference]. Figure 5 , Figure 5 This is a structural diagram of an electronic device provided in an embodiment of this application. Figure 5 As shown, the hardware structure may include: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.

[0136] Based on the same concept as the above method, this application also provides a machine-readable storage medium storing a plurality of computer instructions, which, when executed by a processor, can implement the method disclosed in the above examples of this application.

[0137] For example, the aforementioned machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, etc. For instance, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0138] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for IP address management applied to Fiber to the Room (FTTR), characterized in that, This method is applied to the FTTR master device, and the method includes: After obtaining the IP address corresponding to the terminal for the first time, the associated information of the IP address is recorded; the associated information includes at least: an identifier of the active state and the time when the IP address entered the active state; the IP address is an IP address in the DHCP address pool managed by the FTTR master device; If an inactive state event of the IP address is detected, the active state identifier in the associated information of the IP address is updated to the inactive state identifier, and the time when the IP address enters the active state is updated to the time when the IP address enters the inactive state. When no free IP address is detected in the DHCP address pool, based on the recorded association information associated with each IP address, it is determined whether there is an IP address that meets the following requirements: it is currently inactive and the duration of its inactivity is greater than or equal to a specified duration threshold; if so, the IP address that meets the requirements is reclaimed; if not, at least one IP address is reclaimed based on the duration of each IP address's inactivity; the reclaimed IP address is then used for redistribution to the terminal.

2. The method according to claim 1, characterized in that, The initial acquisition of the IP address corresponding to the terminal is based on the IP address application of the terminal, which allocates the corresponding IP address to the terminal; the association information also includes the MAC address most recently bound to the IP address; Assigning a corresponding IP address to the terminal includes: Based on the terminal's MAC address, if a target association information containing that MAC address is found in the recorded association information, then the IP address in the target association information is assigned to the terminal; otherwise, an idle IP address is selected from the DHCP address pool and assigned to the terminal.

3. The method according to claim 1, characterized in that, The IP address corresponding to the terminal is obtained when the first message sent after the terminal comes online is received; the IP address is a static IP address that is pre-configured on the terminal. The process of reclaiming at least one IP address based on the duration of inactivity of each IP address includes: Identify the IP address that is currently inactive, has been inactive for the longest time, and is not a static IP address pre-configured on any terminal, and reclaim that IP address.

4. The method according to claim 1, characterized in that, The initial acquisition of the terminal's corresponding IP address is obtained upon receiving an address configuration instruction; the IP address is a static IP address pre-configured on the FTTR master device. The process of reclaiming at least one IP address based on the duration of inactivity of each IP address includes: Identify the IP address that is currently inactive, has been inactive for the longest time, and is not a static IP address pre-configured on the FTTR master device, and reclaim that IP address.

5. The method according to claim 1, characterized in that, The inactive state events of the IP address include: The forwarding table entries corresponding to the IP addresses that have been learned locally have become outdated; Alternatively, if the time difference between the time when the IP address enters the active state and the current time is greater than or equal to a set time difference, and there is no forwarding table entry corresponding to the IP address locally.

6. The method according to claim 1, characterized in that, The method also includes: When it is detected that the first terminal is using a static IP address pre-configured on the terminal for network communication, if it is found that the IP address has been assigned to the second terminal based on the association information associated with each recorded IP address, an alarm message is sent to the first terminal, and the first terminal is prohibited from using the IP address for network communication.

7. The method according to claim 1, characterized in that, The method also includes: Upon detecting that any IP address is assigned to a terminal, or that the IP address is reclaimed, or that the IP type tag of the IP address is changed, the key information included in the associated information of the IP address is stored in a non-volatile storage medium; wherein, the key information includes at least the MAC address most recently bound to the IP address, and an IP type tag used to indicate the type of the IP address; When the FTTR master device is powered on or restarted, the key information is loaded from the non-volatile storage medium to restore the association information of the IP address.

8. An IP address management device for Fiber to the Room (FTTR), characterized in that, This device is used in FTTR master equipment and includes: The recording unit is used to record the association information associated with the IP address after obtaining the IP address corresponding to the terminal for the first time; the association information includes at least: an identifier of the active state and the time when the IP address enters the active state; the IP address is an IP address in the DHCP address pool managed by the FTTR master device; The update unit is configured to, if an inactive state event of the IP address is detected, update the active state identifier in the associated information of the IP address to the inactive state identifier, and update the time when the IP address enters the active state to the time when the IP address enters the inactive state. The recycling unit is used to determine whether there is an IP address that meets the following requirements when it detects that there is no free IP address in the DHCP address pool, based on the recorded association information associated with each IP address: the IP address is currently inactive and the duration of inactivity is greater than or equal to a specified duration threshold; if so, the IP address that meets the requirements is recycled; if not, at least one IP address is recycled based on the duration of inactivity of each IP address; the recycled IP address is used to redistribute to the terminal.

9. The apparatus according to claim 8, characterized in that, The initial acquisition of the IP address corresponding to the terminal is based on the IP address application of the terminal, which allocates the corresponding IP address to the terminal; the association information also includes the MAC address most recently bound to the IP address; Assigning a corresponding IP address to the terminal includes: Based on the terminal's MAC address, if a target association information containing that MAC address is found in the recorded association information, then the IP address in the target association information is assigned to the terminal; otherwise, an idle IP address is selected from the DHCP address pool and assigned to the terminal. And / or, the IP address corresponding to the terminal is obtained when the first message sent after the terminal comes online is received; the IP address is a static IP address pre-configured on the terminal; The recycling unit is specifically used for: Identify the IP address that is currently inactive, has been inactive for the longest time, and is not a static IP address pre-configured on any terminal, and reclaim that IP address. And / or, the initial acquisition of the IP address corresponding to the terminal is obtained when an address configuration instruction is received; the IP address is a static IP address pre-configured on the FTTR master device; The recycling unit is specifically used for: Identify the IP address that is currently inactive and has been inactive for the longest time, and is not a static IP address pre-configured on the FTTR master device, and reclaim that IP address. And / or, the inactive state events of the IP address include: The forwarding table entries corresponding to the IP addresses that have been learned locally have become outdated; Alternatively, if the time difference between the time when the IP address enters the active state and the current time is greater than or equal to a set time difference, and there is no forwarding table entry corresponding to the IP address locally; And / or, the recycling unit is also used for: When it is detected that the first terminal is using a static IP address pre-configured on the terminal for network communication, if it is found that the IP address has been assigned to the second terminal based on the association information associated with each recorded IP address, an alarm message is sent to the first terminal and the first terminal is prohibited from using the IP address for network communication. And / or, the recycling unit is also used for: Upon detecting that any IP address is assigned to a terminal, or that the IP address is reclaimed, or that the IP type tag of the IP address is changed, the key information included in the associated information of the IP address is stored in a non-volatile storage medium; wherein, the key information includes at least the MAC address most recently bound to the IP address, and an IP type tag used to indicate the type of the IP address; When the FTTR master device is powered on or restarted, the key information is loaded from the non-volatile storage medium to restore the association information of the IP address.

10. An electronic device, characterized in that, include: A processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; The processor is configured to execute machine-executable instructions to perform the method as described in any one of claims 1 to 7.