Method and device for quickly recovering and distributing user addresses of OLT (Optical Line Terminal) system
By introducing the lease configuration LS function and the active management of the DHCP module into the OLT system, the impact of simultaneous online and offline users on the DHCP server and IP address conflicts are solved, and network stability and user experience are improved.
Patent Information
- Application Number
- CN202410982043.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-22
AI Technical Summary
In traditional PON systems, when a large number of users go online and offline at the same time, they have an impact on the DHCP server, resulting in reduced network stability and IP address conflicts.
By introducing the lease configuration LS function into the OLT system, the OLT's DHCP module actively manages IP addresses during the address renewal and release process, reducing dependence on the DHCP server. It uses timers to poll clients and record MAC and IP addresses for convenience. Quick allocation.
It effectively reduces the impact of users going online and offline at the same time on the DHCP server, improves network stability and resource utilization, realizes rapid recovery and allocation of user addresses, and improves user experience.
Smart Images

Figure CN118740804A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of passive optical network, in particular to a method and a device for quickly recovering and allocating user addresses of an OLT system. Background Art
[0002] The DHCP protocol is a software protocol running on the OLT (Optical Line Terminal) system, and the OLT is a component of the PON (Passive Optical Network) system. In the traditional PON system, the OLT device is an important local equipment. An OLT device cooperates with the user terminal device ONU (Optical Network Unit) through the ODN (Optical Distribution Network) to provide various broadband services to the users connected to it. By interconnecting with the splitter to realize the distribution of optical signal power and the division and multiplexing of optical signals, an OLT device can carry thousands or even tens of thousands of users.
[0003] In actual applications, one or several OLT devices are responsible for the Internet access activities of users in a certain area. Due to some objective reasons (such as users turning off their devices before going to bed at night and turning them on the next morning, which may cause a large number of users to go online and offline at the same time; or due to line quality problems, users frequently go online and offline), a large number of users will obtain network resources at the same time, causing an impact on the DHCP server and affecting the stability of the network environment; at the same time, due to message congestion and untimely processing, user terminals that obtain IPs may have IP conflicts. Summary of the invention
[0004] The purpose of the present invention is to provide a method and device for quickly recovering and allocating user addresses of an OLT system, which realizes the participation of the OLT in the address renewal and address release process. In the above process, the DHCP server does not need to participate in the message interaction process, thereby avoiding the impact of a large number of users going online and offline at the same time on the DHCP server, and the problem of user IP allocation conflicts under a large number of messages, thereby improving network stability and resource utilization.
[0005] To achieve the above objectives, in a first aspect, an embodiment of the present invention provides a method for quickly recovering and allocating user addresses of an OLT system, the method comprising:
[0006] In the address application phase, the IP address assigned by the DHCP server to the client is delivered to the client through the four-step interaction process of DHCP Relay. When the LS configuration lease function is enabled, the client's lease is changed from the default lease L1 to the configured lease LS and LS < L1, the renewal threshold time T1 is initialized to T1 = user online time + 1 / 2L1, and the release threshold time T2 is initialized to T2 = user online time + LS.
[0007] In the address renewal phase, if the current time is less than T1 and the configuration lease LS function is enabled, the DHCP module of the OLT renews the client's lease based on the configuration lease LS;
[0008] In the address release phase, all clients are polled periodically through a timer to determine whether there is a client whose current time is greater than T2; if there is, and the configuration lease LS function is enabled at the same time, the DHCP module of the OLT actively reclaims the IP address of the client.
[0009] In combination with the first aspect, in one implementation, the method further includes:
[0010] During the address renewal phase, the DHCP module records the client's MAC address when renewing the client's lease based on the configured lease period LS:
[0011] In the address release phase, when the DHCP module actively reclaims the IP address of the client, it records the reclaimed IP address and replaces the MAC address and the IP address with<MAC,IP> Stored in binary form;
[0012] When the client requests to go online again, the DHCP module obtains the user MAC information in the Discover message sent by the client and compares it with the stored<MAC,IP> The two tuples are compared, and the IP matching this MAC is obtained and assigned to the client.
[0013] In conjunction with the first aspect, in one implementation, the specific process of the address application stage includes:
[0014] The DHCP module forwards the Discover message sent by the client to the DHCP server, requesting to obtain network parameters including the IP address; if the configuration lease LS function is enabled, a renewal threshold time T1 initially equal to 0 and a release threshold time T2 initially equal to 0 are set;
[0015] The DHCP module forwards the Offer message responded by the DHCP server to the client, in which the pre-allocated network parameters are encapsulated; during forwarding, if the configuration lease LS function is enabled, the default lease L1 is replaced with the configuration lease LS in the Offer message;
[0016] The DHCP module forwards the application request message sent by the client to the DHCP server to confirm the request for the network parameters;
[0017] The DHCP module forwards the ACK message responded by the DHCP server to the client to complete the allocation of network parameters including the IP address; during forwarding, if the configuration lease LS function is enabled, the default lease L1 is replaced with the configuration lease LS in the ACK message, and the threshold time T1 is initialized to T1=user online time+1 / 2L1, and the release threshold time T2 is initialized to T2=user online time+LS.
[0018] In conjunction with the first aspect, in one implementation, the specific process of the address renewal phase includes:
[0019] When the DHCP module determines that the current time is less than T1 and the configuration lease LS function is enabled, the DHCP module intercepts the renewal request Request message sent by the client to the DHCP server and updates T2 at the same time; and sends an ACK message to the client based on the configuration lease LS group to complete the address renewal and update T1 at the same time;
[0020] When the DHCP module determines that the current time is less than T1 but the configuration lease period LS function is not enabled, the renewal request Request message sent by the client is forwarded to the DHCP server; and the ACK message of the DHCP server based on the default lease period L1 group is forwarded to the client to complete the address renewal.
[0021] In combination with the first aspect, in one implementation, the specific process of the address release stage includes:
[0022] The DHCP module starts the timer and periodically polls all clients to determine whether there is a client whose current time is greater than T2. If not, it waits for the next polling cycle; if yes, it determines whether the configuration lease LS function is enabled;
[0023] If the LS function is enabled, the Release message sent by the client to the DHCP server is intercepted and the IP address of the client is actively reclaimed.
[0024] If the LS function is not enabled, the Release message sent by the client is forwarded to the DHCP server, and the DHCP server reclaims the IP address of the client.
[0025] In a second aspect, an embodiment of the present invention further provides a user address fast recovery and allocation device of an OLT system, the device being arranged in a DHCP module of an OLT device, comprising:
[0026] The address application unit is used in the address application phase to send the IP address assigned by the DHCP server to the client through the DHCP Relay four-step interaction process; and when the configuration lease LS function is enabled, the client's lease is changed from the default lease L1 to the configuration lease LS and LS < L1, the renewal threshold time T1 is initialized to T1 = user online time + 1 / 2L1, and the release threshold time T2 is initialized to T2 = user online time + LS;
[0027] The address renewal unit is used in the address renewal phase. When it is determined that the current time is less than T1 and the configuration lease period LS function is enabled at the same time, the client is renewed based on the configuration lease period LS;
[0028] The address release unit is used in the address release phase. It polls all clients regularly through a timer. When it is determined that the current time of a client is greater than T2 and the configuration lease LS function is enabled, it actively reclaims the IP address of the client.
[0029] In combination with the first aspect, in one embodiment, the address renewal unit is further used to: when renewing the client based on the configured lease period LS, record the MAC address of the client; the address release unit is further used to: when actively reclaiming the IP address of the client, record the reclaimed IP address, and replace the recorded MAC address of the client with the reclaimed IP address.<MAC,IP> Stored in binary form;
[0030] The device also includes a fast online unit, which is used to: when the client requests to go online again, obtain the user MAC information in the Discover message sent by the client and compare it with the stored<MAC,IP> The two tuples are compared, and the IP matching this MAC is obtained and assigned to the client.
[0031] In combination with the first aspect, in one implementation, the operations performed by the address application unit in the address application stage include:
[0032] Forward the Discover message sent by the client to the DHCP server to request network parameters including the IP address; if the LS function is enabled, set a renewal threshold time T1 that is initially 0 and a release threshold time T2 that is initially 0;
[0033] Forward the Offer message responded by the DHCP server to the client. The Offer message contains pre-allocated network parameters. When forwarding, if the LS configuration lease function is enabled, the default lease L1 is replaced with the configured lease LS in the Offer message.
[0034] Forward the Request message sent by the client to the DHCP server to confirm the request for the network parameters;
[0035] The ACK message responded by the DHCP server is forwarded to the client to complete the allocation of network parameters including the IP address; during forwarding, if the configuration lease LS function is enabled, the default lease L1 is replaced with the configuration lease LS in the ACK message, and the threshold time T1 is initialized to T1=user online time+1 / 2L1, and the release threshold time T2 is initialized to T2=user online time+LS.
[0036] In combination with the first aspect, in one implementation, the operations performed by the address renewal unit in the address renewal phase include:
[0037] When it is determined that the current time is less than T1 and the LS function is enabled, the DHCP server intercepts the Request message sent by the client to the DHCP server and updates T2 at the same time. The ACK message based on the LS group configuration lease is sent to the client to complete the address renewal and update T1 at the same time.
[0038] When it is determined that the current time is less than T1 but the configuration lease LS function is not enabled, the lease renewal request Request message sent by the client is forwarded to the DHCP server; and the ACK message of the DHCP server based on the default lease L1 group is forwarded to the client to complete the address renewal.
[0039] In combination with the first aspect, in one implementation, the operations performed by the address release unit in the address release phase include:
[0040] Start the timer and periodically poll all clients to determine whether there is a client whose current time is greater than T2. If not, wait for the next polling cycle. If yes, determine whether the LS function is enabled.
[0041] If the LS function is enabled, the Release message sent by the client to the DHCP server is intercepted and the IP address of the client is actively reclaimed.
[0042] If the LS function is not enabled, the Release message sent by the client is forwarded to the DHCP server, and the DHCP server reclaims the IP address of the client.
[0043] The beneficial effects brought by the technical solution provided by the embodiments of the present application include:
[0044] (1) Compared with the existing DHCP Relay technology, this embodiment is designed with a lease LS configuration function. After this function is enabled, the subsequent address renewal and address release processes are completely taken over by the OLT's DHCP module without the participation of the DHCP server. This can reduce the impact of a large number of users going online and offline at the same time on the DHCP server and the possible IP address conflict problem, effectively improving network stability and resource utilization, and meeting actual application requirements.
[0045] (2) The DHCP module of the OLT will record the MAC address of the client when renewing the lease, and will record the recovered IP address when the IP address is recovered, and will record the two in<MAC,IP> The MAC address is compared to the client's MAC address.<MAC,IP> The corresponding IP is found in the binary group and allocated to the client, which realizes the rapid allocation of user addresses, greatly meets the needs of rapid business recovery of users, and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A flowchart of an embodiment of a method for fast recovery and allocation of user addresses of an OLT system of the present application;
[0047] Figure 2 This is a schematic diagram of the specific process of the address application stage in the embodiment of this application;
[0048] Figure 3 This is a schematic diagram of the specific process of the address renewal phase in the embodiment of this application;
[0049] Figure 4 This is a schematic diagram of a specific process of the address release phase in an embodiment of the present application;
[0050] Figure 5 A flowchart of a method for quickly recovering and allocating user addresses of an OLT system in an example;
[0051] Figure 6 This is a flowchart of user information storage and user IP allocation in an example;
[0052] Figure 7 This is a functional module diagram of an embodiment of a user address fast recovery and allocation device of an OLT system of the present application;
[0053] Figure 8 This is a functional module diagram of another embodiment of the user address fast recovery and allocation device of the OLT system of the present application. DETAILED DESCRIPTION
[0054] First, the design idea of the present invention is further explained: the present invention is intended to improve the performance of the PON access network. The OLT device, as the local end device in the PON network, is interconnected with the optical splitter on the user side through optical fiber, and is responsible for various broadband services for multiple users. When the network is stable and does not fluctuate, or only a small number of users are online at a certain moment, these situations will not affect the network performance of the access network. However, when a large number of users are offline or online at the same time, a large number of network resource request messages have an impact on the DHCP server, which affects the stability of the DHCP server device. In addition, when the DHCP server receives too many messages at the same time, due to its performance limitations, the DHCP server does not have time to process all the requests, and some messages are congested in the network, which further brings about the IP address conflict problem of the user terminal that obtains the IP, and even some users have been unable to obtain the IP address, which will affect the Internet experience of some users.
[0055] In order to solve the above problems, the solution proposed by the present invention is: in the address application stage, the IP address assigned by the DHCP server to the client is sent to the client through the four-step interaction process of DHCP Relay; and when the configuration lease LS function is enabled, the client's lease is changed from the default lease L1 to the configuration lease LS and LS<L1, the renewal threshold time T1 is initialized to T1=user online time+1 / 2L1, and the release threshold time T2 is initialized to T2=user online time+LS; in the address renewal stage, if the current time is less than T1 and the configuration lease LS function is enabled at the same time, the DHCP module of the OLT renews the client based on the configuration lease LS; in the address release stage, all clients are periodically polled by a timer to determine whether there is a client whose current time is greater than T2; if so, and the configuration lease LS function is enabled at the same time, the DHCP module of the OLT actively reclaims the IP address of the client.
[0056] In this solution, based on the preset configuration lease LS function, after this function is turned on, the subsequent address renewal, address release and other processes are completely handled by the OLT DHCP module, and the DHCP server does not need to participate in the above message interaction process, thereby greatly reducing the burden on the DHCP server, thereby effectively avoiding the impact of a large number of users going online and offline at the same time on the DHCP server, and the problem of user IP allocation conflicts under a large number of messages, thereby improving network stability and resource utilization.
[0057] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, the technical solutions of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0058] However, it should be noted that the examples to be introduced below are only some specific examples, and are not intended to limit the embodiments of the present invention to the following specific steps, values, conditions, data, sequences, etc. All other embodiments obtained by ordinary technicians in this field without creative work based on the embodiments in this application are within the scope of protection of this application.
[0059] Embodiment 1
[0060] See also Figure 1 As shown, this embodiment provides a method for quickly recovering and allocating user addresses of an OLT system, the method comprising the following steps:
[0061] A. In the address application phase, the IP address assigned by the DHCP server to the client is sent to the client through the four-step interaction process of DHCP Relay; and when the configuration lease LS function is enabled, the client's lease is changed from the default lease Ll to the configuration lease LS, the renewal threshold time T1 is initialized to T1 = user online time + 1 / 2Ll, and the release threshold time T2 is initialized to T2 = user online time + LS.
[0062] It can be understood that, in this embodiment, the default lease L1 is the default lease of the DHCP server, and its lease duration is recorded as L1; the configured lease LS is a configured lease pre-set on the OLT when the configured lease LS function is turned on, and its lease duration is recorded as LS, and LS < L1. In addition, the renewal threshold time T1 and the release threshold time T2 are specially designed in this embodiment. Among them, the renewal threshold time T1 is used for renewal judgment in the subsequent address renewal stage, and the release threshold time T2 is used for address recovery judgment in the subsequent address release stage. Subsequently, by comparing the current time with the T2 / T1 time, it can be quickly determined whether the address recovery is required or whether the DHCP module is used to complete the renewal of the client during renewal, which effectively saves reaction time and improves processing efficiency.
[0063] For example, see Figure 2 As shown, as an optional implementation, the address application stage of step A specifically includes the following operations:
[0064] A1. The DHCP module of OLT forwards the Discover message sent by the client during the four-step interaction of DHCP Relay to the DHCP server, requesting to obtain network parameters including the IP address; if the configuration lease LS function is enabled on the current OLT, the DHCP module of OLT will also set a renewal threshold time T1 for the address renewal phase and a release threshold time T2 for the address release phase, and both T1 and T2 are initially 0.
[0065] A2. The DHCP module of the OLT forwards the Offer message responded by the DHCP server to the client. The Offer message (usually in the Offer message options) encapsulates the pre-allocated network parameters. When forwarding, if the configuration lease LS function is enabled on the current OLT, the DHCP module of the OLT will also change the client's lease from the default lease L1 to the configuration lease LS in the Offer message. In actual application, the DHCP module can modify the value of the lease option (Option 54) in the Offer message from the server's default lease L1 to the configuration lease LS pre-set on the OLT.
[0066] A3. The DHCP module of the OLT forwards the Request message sent by the client to the DHCP server to confirm the request for the network parameters.
[0067] A4, the DHCP module of the OLT forwards the ACK message responded by the DHCP server to the client, completing the allocation of network parameters including the IP address; when forwarding, if the configuration lease LS function is enabled on the current OLT, the DHCP module of the OLT will also change the client's lease from the default lease L1 to the configuration lease LS in the ACK message, and initialize the renewal threshold time T1 set in step A1 to T1 = user online time + 1 / 2L1, and initialize the release threshold time T2 set in step A1 to T2 = user online time + LS. Similarly, when completing the lease change, the DHCP module can achieve this by changing the value of the lease option (Option 54) in the ACK message from the server's default lease L1 to the configuration lease LS pre-set on the OLT.
[0068] B. During the address renewal phase, if the current time is less than T1 and the configuration lease period LS function is enabled, the DHCP module of the OLT renews the client's lease based on the configuration lease period LS.
[0069] It can be understood that, in this embodiment, when the current time is less than T1, if the configuration lease period LS function is enabled at the same time, the DHCP module of the OLT will directly replace the DHCP server to renew the address of the client, and the DHCP server will no longer participate in the relevant message interaction process; and the DHCP module of the OLT will renew the lease of the client based on the configuration lease period LS, and will no longer renew the lease based on L1 (LS<L1), so that the address renewal operation can be completed within the valid lease period and the participation of the DHCP server can be avoided, which effectively reduces the burden on the DHCP server.
[0070] For example, see Figure 3 As shown, as an optional implementation, the address renewal phase of step B specifically includes the following operations:
[0071] B1. Determine whether the current time is less than T1 (T1 = user online time + 1 / 2L1). If so, proceed to step B2; otherwise, proceed to step B4. It can be understood that after the client obtains the IP address assigned by the DHCP server through the four-step interaction process of DHCP Relay, it enters the IP address renewal stage; after entering the IP address renewal stage, the current time can be compared with the T1 time, and then further determine whether the configuration lease LS function is enabled to determine whether the OLT DHCP module renews the client based on the configuration lease LS, or the DHCP server renews the client based on the default lease L1.
[0072] B2. Determine whether the LS function of configuring the lease period is enabled on the current OLT. If so, proceed to step B3; if not, proceed to step B4.
[0073] B3. The DHCP module of OLT intercepts the renewal request message sent by the client to the DHCP server, and updates T2 at the same time (updated to the latest user online time + LS, so that the subsequent address release process can proceed normally); afterwards, the DHCP module of OLT sends an ACK message to the client based on the configuration lease period LS to complete the address renewal, and updates T1 at the same time (updated to the latest user online time + 1 / 2L1, that is, postpone the renewal process for one cycle, so that the renewal process can proceed normally). It can be understood that when the configuration lease period LS function is enabled, if the client maintains normal Internet access, the subsequent address renewal process will be completely renewed based on the configuration lease period LS, and the two parties in the message interaction will always be the client and the DHCP module, without the participation of the DHCP server at all.
[0074] B4. The DHCP module of OLT forwards the renewal request message sent by the client to the DHCP server; and forwards the ACK message of the DHCP server based on the default lease period L1 to the client to complete the address renewal. It can be understood that when the configuration lease period LS function is not enabled, the client will renew the lease based on the default lease period L1 in the traditional way, and the DHCP server will send the ACK message to the client to complete the address renewal, and the DHCP module only forwards the corresponding message and participates only as a transit person.
[0075] C. In the address release phase, all clients are polled periodically through a timer to determine whether there is a client whose current time is greater than T2; if so, and the configuration lease LS function is enabled at the same time, the DHCP module of the OLT actively reclaims the IP address of the client.
[0076] It is also understandable that in this embodiment, in the address release phase, once it is regularly checked that the current time of a client is greater than T2 (such as an abnormality in the renewal of a user, and the user needs to go offline), and the configuration lease LS function is enabled at the same time, the DHCP module of the OLT will directly replace the DHCP server to actively reclaim the client's IP address, without the need for the DHCP server to respond to the Release message and then reclaim the IP address, which can effectively improve the efficiency of address recovery and achieve rapid recovery of user addresses. In addition, the DHCP server is also not required to participate in the relevant message interaction process, which effectively reduces the burden on the DHCP server.
[0077] For example, see Figure 4 As shown, as an optional implementation, the address release phase of step C specifically includes the following operations:
[0078] C1. Start the timer and periodically poll all clients to determine whether there is a client whose current time is greater than T2 (T2 = user online time + Ls). If so, go to step C2; otherwise, wait for the next cycle. In actual application, the timing period of the timer can be set to 1 second to 1800 seconds. In this embodiment, the timing period is set to 60 seconds, that is, all clients will be polled every 60 seconds for comparison and judgment.
[0079] C2. Determine whether the LS function of configuring the lease period is enabled on the current OLT. If so, proceed to step C3; if not, proceed to step C4.
[0080] C3. The DHCP module of OLT intercepts the Release message sent by the client to the DHCP server and actively reclaims the IP address of the client. It can be understood that when the LS function of configuring the lease period is enabled, the DHCP server no longer releases the IP address after receiving the Release message, but the DHCP module of OLT intercepts the Release message and actively reclaims the IP address, without the participation of the DHCP server.
[0081] C4. The DHCP module of OLT forwards the Release message sent by the client to the DHCP server; and the DHCP server completes the IP address recovery of the client. It can be understood that when the configuration lease LS function is not enabled, the client will send a Release message to the DHCP service and request the DHCP server to release the IP address in the traditional release method.
[0082] In addition, it should be noted that although the operations in the address renewal phase are indicated by sequence number B in this embodiment, and the operations in the address release phase are indicated by sequence number C, it is understandable that in actual applications, after obtaining the IP address assigned by the DHCP server through the DHCPRelay four-step interaction process, the address renewal phase will be entered. Similarly, after obtaining the IP address assigned by the DHCP server through the DHCPRelay four-step interaction process, the timer will be started to enter the address release phase. Therefore, there is no specific execution order between the two phases of address renewal and address release. The sequence number of the operation in this embodiment is only used to distinguish between different operations. The sequence number itself does not represent any execution order and is not specifically limited.
[0083] In order to better understand the overall process of the first embodiment of the method for fast recovery and allocation of user addresses of the OLT system of the present application, Figure 5 As shown, a specific example is used to illustrate the overall implementation process of the above embodiment 1. Figure 5 As shown, a method for quickly recovering and allocating user addresses of an OLT system includes:
[0084] S501, the IP address assigned by the DHCP server to the client is sent to the client through the four-step DHCP Relay interaction process; and when the LS configuration lease function is enabled, the client's lease is changed from L1 to LS, and T1 and T2 are initialized;
[0085] S502, start the timer, regularly scan whether the client is offline, and determine whether there is a client whose current time is greater than T2 (T2 = user online time + Ls). If so, go to step S503; otherwise, wait for the next scanning cycle.
[0086] S503, determine whether the LS configuration function is enabled on the current OLT, if so, proceed to step S504; if not, proceed to step S505.
[0087] S504: The DHCP module of the OLT intercepts the Release message sent by the client to the DHCP server, and actively reclaims the IP address of the client, and this round of address release ends.
[0088] S505 , the DHCP module of the OLT forwards the Release message sent by the client to the DHCP server; and the DHCP server completes the IP address recovery of the client, and this round of address release ends.
[0089] S506. Determine whether the current time is less than T1 (T1 = user online time + 1 / 2L1). If so, proceed to step S507; otherwise, proceed to step S509.
[0090] S507, determine whether the LS configuration function is enabled on the current OLT, if so, proceed to step S508; if not, proceed to step S509.
[0091] S508, the DHCP module of the OLT intercepts the renewal request Request message sent by the client to the DHCP server, and updates T2 at the same time; then, the DHCP module of the OLT sends an ACK message to the client based on the configured lease period LS group to complete the address renewal, and updates T1 at the same time, and the address renewal ends.
[0092] S509, the DHCP module of the OLT forwards the renewal request Request message sent by the client to the DHCP server; then forwards the ACK message of the DHCP server based on the default lease period L1 group to the client to complete the address renewal, and this address renewal ends.
[0093] From the above content, it can be seen that compared with the existing DHCP Relay technology, this embodiment is designed with a configuration lease LS function. After this function is enabled, the subsequent address renewal and address release processes are completely taken over by the OLT's DHCP module, without the participation of the DHCP server. This can reduce the impact of a large number of users going online and offline at the same time on the DHCP server and possible IP address conflicts, effectively improving network stability and resource utilization, and meeting actual application needs.
[0094] Embodiment 2
[0095] It is understandable that in the prior art, when a user goes online (including the first time or again), each user needs to wait for the DHCP server to allocate an IP address. When the number of messages in the network is too large, some users cannot go online within a tolerable time range, which will bring negative comments to the network operator. Therefore, in order to further solve the problem that the user IP service needs to be quickly restored, this embodiment provides a method for quickly recovering and allocating user addresses of an OLT system, and its basic steps are the same as those of the first embodiment, except that, as an optional implementation, the method further includes:
[0096] (1) During the address renewal phase, the OLT's DHCP module will record the client's MAC address when renewing the client's lease based on the configured lease period LS;
[0097] (2) During the address release phase, when the OLT's DHCP module actively reclaims the client's IP address, it records the reclaimed IP address and adds the recorded client's MAC address and the reclaimed IP address to the DHCP server.<MAC,IP> Stored in binary form;
[0098] (3) When the client requests to go online again, the DHCP module of the OLT obtains the user MAC information in the Discover message sent by the client and compares it with the stored<MAC,IP> The two tuples are compared, and the IP matching this MAC is obtained and assigned to the client.
[0099] As can be seen from the above content, in this embodiment, the DHCP module of the OLT will record the MAC address of the client when renewing the lease, and will record the recovered IP address when the IP address is recovered, and the two will be recorded as<MAC,IP> The MAC address is compared to the client's MAC address.<MAC,IP> The corresponding IP is found in the binary group and allocated to the client, which realizes the rapid allocation of user addresses, greatly meets the needs of rapid business recovery of users, and improves the user experience.
[0100] Similarly, in order to better understand the above content. Figure 6 As shown, a specific example is used to illustrate the user information storage and user IP allocation in the above implementation process:
[0101] S601, such as Figure 6 As shown in the figure, in the address renewal phase, when the DHCP module of the OLT determines that the current time is less than T1 and the configuration lease period LS function is enabled at the same time, it will intercept the renewal request Request message sent by the client to the DHCP server, and update T2 at the same time, updating it to the latest user online time + Ls, so that the subsequent address release process can proceed normally.
[0102] S602, such as Figure 6 As shown in the figure, after intercepting the client's Request renewal request message, the DHCP module of the OLT will send an ACK message of the LS group to the client to complete the address renewal based on the configured lease period. At the same time, it will also record the client's MAC address and update T1 to the latest user online time + 1 / 2L1, so that the renewal process can proceed normally.
[0103] S603, such as Figure 6 As shown, in the address release phase, when the DHCP module of the OLT determines that the current time of a client is greater than T2 and the configuration lease LS function is enabled at the same time, it will intercept the Release message sent by the client to the DHCP server, and actively recycle and record the IP address of the client.
[0104] S604, such as Figure 6As shown, the DHCP module of the OLT combines the MAC address of the client recorded in step S602 with the recovered IP address recorded in step S603 to form<MAC,IP> It is understandable that the information of multiple clients (users) is stored in the DHCP module in this form.
[0105] S605, such as Figure 6 As shown, when the client requests to go online again, the DHCP module of the OLT obtains the user MAC information in the Discover message sent by the client and compares it with the MAC information stored in step S604.<MAC,IP> The two tuples are compared, and the IP matching this MAC is obtained and assigned to the client.
[0106] S606, such as Figure 6 As shown in the figure, the client is successfully online.
[0107] Embodiment 3
[0108] join Figure 7 As shown, based on the same inventive concept, an embodiment of the present invention further provides a user address fast recovery and allocation device of an OLT system, the device is arranged in a DHCP module of an OLT device, and includes:
[0109] The address application unit is used in the address application phase to send the IP address assigned by the DHCP server to the client through the DHCP Relay four-step interaction process; and when the configuration lease LS function is enabled, the client's lease is changed from the default lease L1 to the configuration lease LS and LS < L1, the renewal threshold time T1 is initialized to T1 = user online time + 1 / 2L1, and the release threshold time T2 is initialized to T2 = user online time + LS;
[0110] The address renewal unit is used in the address renewal phase. When it is determined that the current time is less than T1 and the configuration lease period LS function is enabled at the same time, the client is renewed based on the configuration lease period LS;
[0111] The address release unit is used in the address release phase. It polls all clients regularly through a timer. When it is determined that the current time of a client is greater than T2 and the configuration lease LS function is enabled, it actively reclaims the IP address of the client.
[0112] From the above content, it can be seen that in this embodiment, after the configuration lease LS function is turned on, the subsequent address renewal and address release processes are completely taken over by the address renewal unit and address release unit in the DHCP module, without the participation of the DHCP server. This can reduce the impact of a large number of users going online and offline at the same time on the DHCP server and the possible IP address conflict problems, effectively improve network stability and resource utilization, and meet actual application needs.
[0113] Furthermore, in order to solve the problem that the user IP service needs to be quickly restored, as an optional implementation, the address renewal unit is also used to: when renewing the client based on the configured lease period LS, record the client's MAC address. The address release unit is also used to: when actively reclaiming the client's IP address, record the reclaimed IP address, and replace the recorded client MAC address and the reclaimed IP address with each other.<MAC,IP> On this basis, participate in Figure 8 As shown, the device also includes a fast online unit, which is used to: when the client requests to go online again, obtain the user MAC information in the Discover message sent by the client, and compare it with the stored<MAC,IP> The two tuples are compared, and the IP matching this MAC is obtained and assigned to the client.
[0114] Since the address renewal unit will record the client's MAC address when renewing the lease, the address release unit will record the recovered IP address when the IP address is recovered, and the two will be combined in<MAC,IP> The data is stored in the form of a binary tuple. When the client goes online again, the fast online unit can quickly log in through the MAC.<MAC,IP> The corresponding IP is found in the binary group and allocated to the client, thereby realizing rapid allocation of user addresses, greatly meeting the needs of rapid recovery of user services and improving the user experience.
[0115] It should be noted that the various variations and specific examples in the aforementioned method embodiments are also applicable to the device of this embodiment. Through the detailed description of the aforementioned method, those skilled in the art can clearly know the implementation method of the device in this embodiment, so for the sake of brevity of the specification, they will not be described in detail here.
[0116] Note: The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0117] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0118] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0119] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0120] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0121] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0122] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for quickly recovering and allocating user addresses of an OLT system. It is characterized in that The method includes: In the address application phase, the IP address assigned by the DHCP server to the client is delivered to the client through the four-step interaction process of DHCP Relay. When the LS configuration lease function is enabled, the client's lease is changed from the default lease L1 to the configured lease LS and LS < L1, the renewal threshold time T1 is initialized to T1 = user online time + 1 / 2L1, and the release threshold time T2 is initialized to T2 = user online time + LS. In the address renewal phase, if the current time is less than T1 and the configuration lease LS function is enabled, the DHCP module of the OLT renews the client's lease based on the configuration lease LS; In the address release phase, all clients are polled periodically through a timer to determine whether there is a client whose current time is greater than T2; if there is, and the configuration lease LS function is enabled at the same time, the DHCP module of the OLT actively reclaims the IP address of the client.
2. The method for quickly recovering and allocating user addresses of an OLT system according to claim 1, It is characterized in that The method further includes: During the address renewal phase, the DHCP module records the client's MAC address when renewing the client's lease based on the configured lease period LS: In the address release phase, when the DHCP module actively reclaims the IP address of the client, it records the reclaimed IP address and replaces the MAC address and the IP address with<MAC,IP> Stored in binary form; When the client requests to go online again, the DHCP module obtains the user MAC information in the Discover message sent by the client and compares it with the stored<MAC,IP> The two tuples are compared, and the IP matching this MAC is obtained and assigned to the client.
3. The method for quickly recovering and allocating user addresses of an OLT system according to claim 1, It is characterized in that The specific process of the address application stage includes: The DHCP module forwards the Discover message sent by the client to the DHCP server, requesting to obtain network parameters including the IP address; if the configuration lease LS function is enabled, a renewal threshold time T1 initially equal to 0 and a release threshold time T2 initially equal to 0 are set; The DHCP module forwards the Offer message responded by the DHCP server to the client, in which the pre-allocated network parameters are encapsulated; during forwarding, if the configuration lease LS function is enabled, the default lease L1 is replaced with the configuration lease LS in the Offer message; The DHCP module forwards the application request message sent by the client to the DHCP server to confirm the request for the network parameters; The DHCP module forwards the ACK message responded by the DHCP server to the client to complete the allocation of network parameters including the IP address; during forwarding, if the configuration lease LS function is enabled, the default lease L1 is replaced with the configuration lease LS in the ACK message, and the threshold time T1 is initialized to T1=user online time+1 / 2L1, and the release threshold time T2 is initialized to T2=user online time+LS.
4. The method for quickly recovering and allocating user addresses of an OLT system according to claim 1, It is characterized in that The specific process of the address renewal phase includes: When the DHCP module determines that the current time is less than T1 and the configuration lease LS function is enabled, the DHCP module intercepts the renewal request Request message sent by the client to the DHCP server and updates T2 at the same time; and sends an ACK message to the client based on the configuration lease LS group to complete the address renewal and update T1 at the same time; When the DHCP module determines that the current time is less than T1 but the configuration lease period LS function is not enabled, the renewal request Request message sent by the client is forwarded to the DHCP server; and the ACK message of the DHCP server based on the default lease period L1 group is forwarded to the client to complete the address renewal.
5. The method for quickly recovering and allocating user addresses of an OLT system according to claim 1, It is characterized in that The specific process of the address release stage includes: The DHCP module starts the timer and periodically polls all clients to determine whether there is a client whose current time is greater than T2. If not, it waits for the next polling cycle; if yes, it determines whether the configuration lease LS function is enabled; If the LS function is enabled, the Release message sent by the client to the DHCP server is intercepted and the IP address of the client is actively reclaimed. If the LS function is not enabled, the Release message sent by the client is forwarded to the DHCP server, and the DHCP server reclaims the IP address of the client.
6. A user address fast recovery and allocation device for an OLT system, It is characterized in that The device is arranged in the DHCP module of the OLT device, and includes: The address application unit is used in the address application phase to send the IP address assigned by the DHCP server to the client through the DHCP Relay four-step interaction process; and when the configuration lease LS function is enabled, the client's lease is changed from the default lease L1 to the configuration lease LS and LS < L1, the renewal threshold time T1 is initialized to T1 = user online time + 1 / 2L1, and the release threshold time T2 is initialized to T2 = user online time + LS; The address renewal unit is used in the address renewal phase. When it is determined that the current time is less than T1 and the configuration lease period LS function is enabled at the same time, the client is renewed based on the configuration lease period LS; The address release unit is used in the address release phase. It polls all clients regularly through a timer. When it is determined that the current time of a client is greater than T2 and the configuration lease LS function is enabled, it actively reclaims the IP address of the client.
7. The user address fast recovery and allocation device of the OLT system according to claim 6, Features: The address renewal unit is further used to: record the MAC address of the client when renewing the client based on the configured lease period LS; The address release unit is also used to: when actively reclaiming the IP address of the client, record the reclaimed IP address, and record the MAC address of the client and the reclaimed IP address in<MAC,IP> Stored in binary form; The device also includes a fast online unit, which is used to: when the client requests to go online again, obtain the user MAC information in the Discover message sent by the client and compare it with the stored<MAC,IP> The two tuples are compared, and the IP matching this MAC is obtained and assigned to the client.
8. The user address fast recovery and allocation device of the OLT system according to claim 6, It is characterized in that The operations performed by the address application unit in the address application stage include: Forward the Discover message sent by the client to the DHCP server to request network parameters including the IP address; if the LS function is enabled, set a renewal threshold time T1 that is initially 0 and a release threshold time T2 that is initially 0; Forward the Offer message responded by the DHCP server to the client. The Offer message contains pre-allocated network parameters. When forwarding, if the LS configuration lease function is enabled, the default lease L1 is replaced with the configured lease LS in the Offer message. Forward the Request message sent by the client to the DHCP server to confirm the request for the network parameters; The ACK message responded by the DHCP server is forwarded to the client to complete the allocation of network parameters including the IP address; during forwarding, if the configuration lease LS function is enabled, the default lease L1 is replaced with the configuration lease LS in the ACK message, and the threshold time T1 is initialized to T1=user online time+1 / 2L1, and the release threshold time T2 is initialized to T2=user online time+LS.
9. The user address fast recovery and allocation device of the OLT system according to claim 6, It is characterized in that The operations performed by the address renewal unit during the address renewal phase include: When it is determined that the current time is less than T1 and the LS function is enabled, the DHCP server intercepts the Request message sent by the client to the DHCP server and updates T2 at the same time. The ACK message based on the LS group configuration lease is sent to the client to complete the address renewal and update T1 at the same time. When it is determined that the current time is less than T1 but the configuration lease LS function is not enabled, the lease renewal request Request message sent by the client is forwarded to the DHCP server; and the ACK message of the DHCP server based on the default lease L1 group is forwarded to the client to complete the address renewal.
10. The user address fast recovery and allocation device of the OLT system according to claim 6, It is characterized in that The operations performed by the address release unit in the address release phase include: Start the timer and periodically poll all clients to determine whether there is a client whose current time is greater than T2. If not, wait for the next polling cycle. If yes, determine whether the LS function is enabled. If the LS function is enabled, the Release message sent by the client to the DHCP server is intercepted and the IP address of the client is actively reclaimed. If the LS function is not enabled, the Release message sent by the client is forwarded to the DHCP server, and the DHCP server reclaims the IP address of the client.
Citation Information
Patent Citations
Method of achieving IP address cheating prevention based on analysis of dynamic host configuration protocol (DHCP) message
CN102882861A
Internet protocol address obtaining method in network, relay device and system
CN103888551A
Routing control method and device in DHCPV6 PD scene
CN111954102A
Method for realizing DHCP (Dynamic Host Configuration Protocol) no-IP (Internet Protocol)
CN115767326A
System and method for assigning IP address in ethernet passive optical network
US20050025165A1
