Search

CN-116436900-B - Access method and device

CN116436900BCN 116436900 BCN116436900 BCN 116436900BCN-116436900-B

Abstract

The specification provides an access method and device, wherein the method comprises the steps of receiving a first online request sent by a client, distributing a temporary IP address for the client in a first address pool according to the first online request, and configuring a temporary lease for the temporary IP address. And then sending a first online response to the client, wherein the first online response comprises the temporary IP address and the temporary lease. And receiving a renewal request sent by the client. If the client selects the target access authentication mode for authentication, a first offer response is sent to the client to trigger the client to send a first online request again.

Inventors

  • ZHANG RENQIANG

Assignees

  • 新华三技术有限公司

Dates

Publication Date
20260505
Application Date
20230428

Claims (8)

  1. 1. An access method, wherein the method is applied to a device side, and the method comprises: receiving a first online request sent by a client; According to the first online request, a temporary IP address is allocated to the client in a first address pool, and a temporary lease is configured for the temporary IP address; sending a first online response to the client, wherein the first online response comprises the temporary IP address and the temporary lease; receiving a renewal request sent by the client; If the client selects a target access authentication mode for authentication, a first offer response is sent to the client so as to trigger the client to send the first online request again; If the client continues to not select the target access authentication mode for authentication within a preset time after receiving the first online request, performing candidate access authentication on the client; If the client passes the candidate access authentication, a first lease is configured for the temporary IP address; Transmitting a second renewal response to the renewal request to the client, the second renewal response comprising the temporary IP address and the first lease, so that the client accesses a target network according to the temporary IP address and the first lease, or If the client passes the candidate access authentication, a third renewal response aiming at the renewal request is sent to the client so that the client sends a first access request again; Receiving a first access request sent again by the client; distributing a formal IP address to the client in the first address pool according to the retransmitted first online request, and configuring a second lease for the formal IP address; And sending a third online response corresponding to the retransmitted first online request to the client, wherein the third online response comprises the formal IP address and the second lease, so that the client accesses a target network according to the formal IP address and the second lease.
  2. 2. The method of claim 1, wherein after the receiving the first online request sent by the client, the method further comprises: And sending a notification message to the client, wherein the notification message is used for prompting whether the client selects to authenticate in the target access authentication mode.
  3. 3. The method of claim 1, wherein after the sending the first online response to the client, the method further comprises: And sending a forced update message to the client, wherein the forced update message is used for indicating the client to send a renewal request.
  4. 4. The method of claim 1, wherein the first renewal response indicates a renewal failure, the method further comprising: receiving a first online request sent again by a client; Distributing a target IP address to the client in a second address pool according to the retransmitted first online request, and configuring a target lease for the target IP address; And sending a second online response to the client, wherein the second online response comprises the target IP address and the target lease, so that the client accesses a target network according to the target IP address and the target lease.
  5. 5. An access method, wherein the method is applied to a client, the method comprising: Sending a first online request to a device side, so that the device side allocates a temporary IP address for the client side in a first address pool according to the first online request, and configures a temporary lease for the temporary IP address; Receiving a first online response sent by the equipment end, wherein the first online response comprises the temporary IP address and the temporary lease; Before the temporary lease expires, transmitting a renewal request to the equipment end; receiving a first offer response sent by the equipment end; according to the first offer response, the first online request is sent to the equipment end again; Receiving a second offer response from the equipment end, wherein the second offer response comprises the temporary IP address and a first lease; accessing a target network according to the temporary IP address and the first lease; Or alternatively Receiving a third online response from the equipment end, wherein the third online response comprises a formal IP address and a second lease; And accessing a target network according to the formal IP address and the second lease.
  6. 6. The method of claim 5, wherein the first renewal response indicates a renewal failure, the method further comprising: Sending a second online request to the equipment end according to the first offer response, so that the equipment end distributes a target IP address for the client end in a second address pool according to the second online request, and configures a target lease for the target IP address; Receiving a second online response from the equipment end, wherein the second online response comprises the target IP address and the target lease; and accessing a target network according to the target IP address and the target lease.
  7. 7. A client access device, the device being applied to a device, the device comprising: the first online request receiving module is used for receiving a first online request sent by the client; the first allocation module is used for allocating a temporary IP address for the client in a first address pool according to the first online request and configuring a temporary lease for the temporary IP address; A first online response sending module, configured to send a first online response to the client, where the first online response includes the temporary IP address and the temporary lease; the second receiving module is used for receiving the renewal request sent by the client; the second sending module is used for sending a first offer response to the client if the client does not select to authenticate in a target access authentication mode, so as to trigger the client to send the first online request again; The apparatus further comprises: The candidate authentication module is used for carrying out candidate access authentication on the client if the client continuously does not select the target access authentication mode for authentication within a preset time after receiving the first online request; the first configuration module is used for configuring a first lease for the temporary IP address if the client passes the candidate access authentication; a second renewal response sending module, configured to send a second renewal response to the renewal request to the client, where the second renewal response includes the temporary IP address and the first lease, so that the client accesses the target network according to the temporary IP address and the first lease; or the device further comprises: The candidate authentication module is used for carrying out candidate access authentication on the client if the client continuously does not select the target access authentication mode for authentication within a preset time after receiving the first online request; The third offer response sending module is used for sending a third offer response aiming at the offer request to the client if the client passes the candidate access authentication so as to enable the client to send the first access request again; the second online request receiving module is used for receiving the first access request sent again by the client; the second configuration module is used for distributing a formal IP address to the client in the first address pool according to the retransmitted first online request, and configuring a second lease for the formal IP address; And the third online response sending module is used for sending a third online response corresponding to the retransmitted first online request to the client, wherein the third online response comprises a formal IP address and a second lease, so that the client accesses the target network according to the formal IP address and the second lease.
  8. 8. A client access device, the device being applied to a client, the device comprising: the first online request sending module is used for sending a first online request to the equipment end, so that the equipment end allocates a temporary IP address for the client in a first address pool according to the first online request and configures a temporary lease for the temporary IP address; The first online response receiving module is used for receiving a first online response sent by the equipment end, wherein the first online response comprises the temporary IP address and the temporary lease; A renewal request sending module, configured to send a renewal request to the device end when the temporary lease expires; The first offer response receiving module is used for receiving a first offer response sent by the equipment end; the first online request retransmission module is further configured to send the first online request to the device side again according to the first offer response; The apparatus further comprises: the third online response receiving module is used for receiving a third online response from the equipment end, wherein the third online response comprises a temporary IP address and a first lease; the second access module is used for accessing the target network according to the temporary IP address and the first lease; or the device further comprises: the third online response receiving module is used for receiving a third online response from the equipment end, wherein the third online response comprises a formal IP address and a second lease; and the third access module is used for accessing the target network according to the formal IP address and the second lease.

Description

Access method and device Technical Field The present disclosure relates to the field of communications technologies, and in particular, to an access method and apparatus. Background BRAS (Broadband Remote ACCESS SERVER) level 802.1x authentication is a technique that provides 802.1x (access control and authentication protocol) access authentication on BRAS devices. It uses 802.1x as an authentication method for IPoE (IP over Ethernet, internet protocol of Ethernet). 802.1x and IPoE can be matched on the BRAS to jointly realize the access of the client. Where 802.1x may be used for authentication and authorization and IPoE may be used for billing. Under the condition that the BRAS-level 802.1X authentication and the IPoE Web (webpage) authentication are deployed on the BRAS at the same time, if the BRAS equipment firstly receives an online request sent by the client, the online request is temporarily cached. It is then necessary to wait until it is confirmed that the client does not select 802.1X authentication before starting to process the online request and assign it an IP address. Before the BRAS device starts to process the online request, the client cannot receive the IP address, so that the client can repeatedly send the online request, which causes waste of communication resources and poor user experience. Disclosure of Invention In order to overcome the problems in the related art, the present specification provides an access method and apparatus. According to a first aspect of embodiments of the present disclosure, an access method is provided and applied to a device, where the method includes receiving a first online request sent by a client, allocating a temporary IP address to the client in a first address pool according to the first online request, and configuring a temporary lease for the temporary IP address, sending a first online response to the client, where the first online response includes the temporary IP address and the temporary lease, receiving a renewal request sent by the client, and if the client selects a target access authentication mode for authentication, sending a first renewal response to the client to trigger the client to send the first online request again. According to a second aspect of embodiments of the present disclosure, an access method is provided and applied to a client, where the method includes sending a first online request to a device side, so that the device side allocates a temporary IP address to the client in a first address pool according to the first online request, configures a temporary lease for the temporary IP address, receiving a first online response sent by the device side, where the first online response includes the temporary IP address and the temporary lease, sending a renewal request to the device side before the temporary lease expires, receiving a first renewal response sent by the device side, and sending the first online request again to the device side according to the first renewal response. According to a third aspect of embodiments of the present disclosure, a client access device is provided, which is applied to a device side, and the device comprises a first receiving module, a first allocation module, a first sending module, a second receiving module and a second sending module, wherein the first receiving module is used for receiving a first online request sent by a client, the first allocation module is used for allocating a temporary IP address to the client in a first address pool according to the first online request, and configuring a temporary lease for the temporary IP address, the first sending module is used for sending a first online response to the client, the first online response comprises the temporary IP address and the temporary lease, the second receiving module is used for receiving an renewal request sent by the client, and the second sending module is used for sending a first renewal response to the client to trigger the client to send the first online request again if the client does not select to authenticate in a target access authentication mode. According to a fourth aspect of embodiments of the present disclosure, a client access device is provided, where the device is applied to a client, and the device includes a third sending module configured to send a first online request to a device side, so that the device side allocates a temporary IP address to the client in a first address pool according to the first online request, configures a temporary lease for the temporary IP address, a third receiving module configured to receive a first online response sent by the device side, where the first online response includes the temporary IP address and the temporary lease, a fourth sending module configured to send a renewal request to the device side if the temporary lease expires, a fourth receiving module configured to receive the first renewal response sent by the device side, and a fifth sending module