+

US20140130125A1 - Method and apparatus for allocating and obtaining ip address - Google Patents

Method and apparatus for allocating and obtaining ip address Download PDF

Info

Publication number
US20140130125A1
US20140130125A1 US14/017,020 US201314017020A US2014130125A1 US 20140130125 A1 US20140130125 A1 US 20140130125A1 US 201314017020 A US201314017020 A US 201314017020A US 2014130125 A1 US2014130125 A1 US 2014130125A1
Authority
US
United States
Prior art keywords
authentication
client
user
message
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US14/017,020
Other versions
US8713659B1 (en
Inventor
Manna Chen
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Assigned to HUAWEI TECHNOLOGIES CO., LTD. reassignment HUAWEI TECHNOLOGIES CO., LTD. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: CHEN, MANNA
Application granted granted Critical
Publication of US8713659B1 publication Critical patent/US8713659B1/en
Publication of US20140130125A1 publication Critical patent/US20140130125A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0892Network architectures or network communication protocols for network security for authentication of entities by using authentication-authorization-accounting [AAA] servers or protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/503Internet protocol [IP] addresses using an authentication, authorisation and accounting [AAA] protocol, e.g. remote authentication dial-in user service [RADIUS] or Diameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5053Lease time; Renewal aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5061Pools of addresses

Definitions

  • the present disclosure relates to the field of communications and, in particular embodiments, to a method and an apparatus for allocating and obtaining an IP address.
  • a switch allocates a corresponding IP address to a client according to an authentication domain planned by an authentication server for a user.
  • the authentication domain planned by the authentication server for the user is changed, the IP address of the client is not changed.
  • the user can access neither resources in the previous authentication domain nor resources in the current authentication domain; the user can access resources in the current authentication domain only when the user manually releases the previous IP address and reapplies for an IP address.
  • ports of the switch are temporarily disabled, and the ports are re-enabled after the authentication domain of the user is switched. If the client is directly connected to the switch, the network interface card of the client is disconnected and connected according to states of the switch ports, and obtains an IP address corresponding to the current authentication domain in a reconnection process, without manual operations performed by the user.
  • the prior art only applies to a scenario where the client is directly connected to the switch.
  • the client cannot perceive whether the ports of the switch are disabled or enabled, and therefore cannot obtain a new IP address.
  • a switch port is connected to more than one client. When the port is disabled or enabled, connections between the switch and other clients are affected. This features high operation costs, strong constraints, and poor scalability.
  • Embodiments of the present disclosure provide a method and an apparatus for allocating and obtaining an IP address.
  • a client is notified that an authentication domain of a user carried on the client is changed, so that the client automatically obtains a fresh IP address, thereby solving problems of strong constraints and poor scalability in the prior art.
  • the present disclosure provides a method for allocating an IP address.
  • the method includes sending an authentication request message to a client at intervals of a preset duration and receiving a response message sent by the client.
  • the response message carries authentication information of a user carried on the client.
  • the method also includes sending an authentication message to a server according to the response message and receiving an authentication reply message sent by the server.
  • the authentication reply message carries information about an authentication domain authorized by the server to the user. It is determined, according to the authentication reply message, whether the authentication domain of the user is changed, and if the authentication domain of the user is changed, an authentication domain change message is sent to the client according to the authentication reply message, so that the client obtains an IP address again according to the authentication domain change message.
  • the present disclosure provides a method for obtaining an IP address.
  • the method includes receiving an authentication request message sent by a switch at intervals of a preset duration and sending a response message to the switch.
  • the response message carries authentication information of a user carried on a client, so that the switch sends an authentication message to a server according to the response message. If an authentication domain of the user is changed, an authentication domain change message sent by the switch is received.
  • the authentication domain change message is generated by the switch according to an authentication reply message sent by the server.
  • An IP address is obtained again according to the authentication domain change message.
  • a first sending unit is configured to send an authentication request message to a client at intervals of a preset duration.
  • a first receiving unit is configured to receive a response message sent by the client. The response message carries authentication information of a user carried on the client.
  • a second sending unit is configured to send an authentication message to a server according to the response message.
  • a second receiving unit is configured to receive an authentication reply message sent by the server. The authentication reply message carries information about an authentication domain authorized by the server to the user.
  • a determining unit is configured to determine, according to the authentication reply message, whether the authentication domain of the user is changed.
  • the first sending unit is further configured to send an authentication domain change message to the client according to the authentication reply message if the authentication domain of the user is changed, so that the client obtains an IP address again according to the authentication domain change message.
  • the present disclosure provides an apparatus for obtaining an IP address.
  • a receiving unit is configured to receive an authentication request message sent by a switch at intervals of a preset duration.
  • a sending unit is configured to send a response message to the switch. Where the response message carries authentication information of a user carried on a client, so that the switch sends an authentication message to a server according to the response message.
  • the receiving unit is further configured to receive an authentication domain change message sent by the switch if an authentication domain of the user is changed.
  • the authentication domain change message is generated by the switch according to an authentication reply message sent by the server.
  • An obtaining unit is configured to obtain an IP address again according to the authentication domain change message.
  • a client is notified, by using a message, that an authentication domain of a user carried on the client is modified.
  • the client can also perceive that the authentication domain of the user carried on the client is changed, and automatically obtain an IP address again.
  • one client updates an IP address connections between other clients and the switch are not affected.
  • the present disclosure has an extensive application scope, and can reduce deployment difficulties and operation and maintenance costs of the system.
  • FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a method for allocating an IP address according to an embodiment of the present disclosure
  • FIG. 3 is a flowchart of a method for obtaining an IP address according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of an apparatus for allocating an IP address according to an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of another apparatus for allocating an IP address according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of an apparatus for obtaining an IP address according to an embodiment of the present disclosure
  • FIG. 7 is another schematic structural diagram of an apparatus for allocating an IP address according to an embodiment of the present disclosure.
  • FIG. 8 is another schematic structural diagram of an apparatus for obtaining an IP address according to an embodiment of the present disclosure.
  • FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present disclosure.
  • the method for allocating an IP address applies to an L3 NAC system, where the L3 NAC system includes a client 11 , a switch 12 , and a server 13 .
  • the switch 12 sends an authentication request message to the client 11 so as to request authentication information of a user carried on the client 11 .
  • the switch 12 receives a response message sent by the client 11 , where the response message carries authentication information of the user (for example, such information as user name that can identify a user identity, and such information as password that can authenticate the user).
  • the switch 12 sends the authentication information of the user carried in the response message to the server 13 .
  • the server 13 authenticates the user according to the authentication information of the user. After the authentication succeeds, the server 13 sends an authentication success message to the client 11 through the switch 12 .
  • the client 11 starts a Dynamic Host Configuration Protocol (DHCP) process to obtain an IP address corresponding to an authentication domain of the client 11 .
  • DHCP Dynamic Host Configuration Protocol
  • the authentication domain refers to a database that can be accessed by a successfully authenticated user.
  • the server 13 may divide the database into different authentication domains according to different user rights, and different authentication domains are accessed only by IP addresses in different address pools. For example, a client having an IP address in an IP address pool 1 can only access resources in an authentication domain 1 , while a client having an IP address in an IP address pool 2 can only access resources in an authentication domain 2 .
  • the server After the server authenticates the user successfully, it is assumed that the user rights allow access to resources in the authentication domain 1 .
  • the DHCP server When receiving an address allocation request (DHCP request) of the client, the DHCP server selects an IP address from the IP address pool corresponding to the authentication domain 1 and allocates the selected IP address to the client.
  • the DHCP server may be integrated into the switch 12 or be set independently. When the DHCP server is set independently, the switch 12 acts as a DHCP relay to forward DHCP messages between the client and the DHCP server.
  • the server 13 modifies the authentication domain of the user carried on the client 11 , it is assumed that resources that the user is authorized to access are moved from the authentication domain 1 to the authentication domain 2 . At this time, the client 11 can neither obtain the resources by accessing the authentication domain 1 nor access the authentication domain 2 , and the client 11 needs to obtain an IP address again that can access the authentication domain 2 to establish a normal connection with the network. Therefore, the present disclosure provides a method for allocating an IP address, that is, in a process of re-authenticating the client 11 by the server 13 , the server 13 sends information about the authentication domain of the client to the switch 12 .
  • the switch 12 sends an authentication domain change message to the client 11 , so that the client 11 determines, according to the received authentication domain change message, whether the authentication domain of the user carried on the client is changed, and automatically obtains an IP address again when the authentication domain of the user is changed.
  • FIG. 2 is a flowchart of a method for allocating an IP address according to an embodiment of the present disclosure. The method may be performed by the switch 12 illustrated in FIG. 1 . Specifically, the method includes the following steps.
  • Step S 201 Send an authentication request message to a client at intervals of a preset duration.
  • the authentication request message is used to notify the client that re-authentication is needed, that is, it is used to instruct the client to re-send authentication information of a user carried on the client.
  • the preset duration is pre-configured according to a re-authentication time interval authorized by a server.
  • the server needs to re-authenticate the authentication information of the user carried on the client on a timed basis, so that when an authentication domain of the user is changed, the client is capable of obtaining a fresh IP address in time.
  • Step S 202 Receive a response message sent by the client.
  • the response message carries the authentication information of the user carried on the client.
  • Step S 203 Send an authentication message to the server according to the response message.
  • the switch After receiving the response message sent by the client, the switch sends, by using the authentication message, the authentication information of the user carried in the response message to the server, so that the server authenticates the user.
  • Step S 204 Receive an authentication reply message sent by the server.
  • the authentication reply message carries information about an authentication domain authorized by the server to the user, so that the switch determines, according to the information about the authentication domain authorized by the server to the user, whether the authentication domain of the user is changed.
  • Step S 205 Determine, according to the authentication reply message, whether the authentication domain of the user is changed.
  • the server sends, by using the authentication reply message, information about a post-authentication domain authorized to the user to the switch.
  • the switch determines, according to information about the post-authentication domain authorized to the user, whether the post-authentication domain of the user is changed. If the post-authentication domain authorized by the server to the user is different from a previous post-authentication domain, step S 206 is performed. If the post-authentication domain authorized by the server to the user is the same as the previous post-authentication domain, step S 206 is not performed and step S 201 is performed again.
  • the post-authentication domain refers to an authentication domain that can be accessed by the user after the user authentication succeeds.
  • a pre-authentication domain refers to an authentication domain that can be accessed by the user before the user authentication is completed. That before the authentication is completed includes the following two cases: authentication fails and no authentication is performed.
  • the server sends, by using the authentication reply message, information about the pre-authentication domain authorized to the user to the switch.
  • the authentication domain of the user is changed inevitably. Therefore, after receiving the authentication reply message indicating that the user authentication fails, the switch can directly determine that the authentication domain of the user is changed, and then step S 206 is directly performed.
  • Step S 206 Send an authentication domain change message to the client according to the authentication reply message.
  • the switch constructs the authentication change message according to the information about the authorization domain authorized by the server to the user and carried in the authentication reply message, and sends the authentication domain change message to the client, so that the client obtains an IP address again according to the authentication domain change message.
  • the client establishes a DHCP process according to the identifier that is carried in the authentication domain change message and instructs the client to obtain an IP address again, and obtains an IP address again by establishing the DHCP process.
  • the client performs refreshing automatically, and obtains an IP address from the IP address identifier that is allocated to the client and carried in the authentication domain change message.
  • the client can directly obtain a fresh IP address by refreshing without the need of initiating a new DHCP process again. This is more convenient and faster and can save network overheads.
  • the authentication domain change message is an EAPol Success message.
  • the identifier that instructs the client to obtain an IP address again and is carried in the authentication domain change message or the IP address identifier that is allocated to the client and carried in the authentication domain change message is an option identifier in a TLV format.
  • the authentication domain change message is an EAPol Failure message; and the identifier that instructs the client to obtain an IP address again and is carried in the authentication domain change message or the IP address identifier that is allocated to the client and carried in the authentication domain change message is an option identifier in a TLV format.
  • the client can automatically perceive, according to an authentication domain change message sent by the switch, whether an authentication domain of a user carried on the client is changed. In this way, when the authentication domain of the user is changed, the client can automatically obtain an IP address again. In addition, in a process of obtaining an IP address again by the client, normal connections between other clients and the switch are not affected.
  • FIG. 3 is a flowchart of a method for obtaining an IP address according to an embodiment of the present disclosure.
  • An executor of the method is a client. Specifically, the method includes the following steps:
  • Step S 301 Receive an authentication request message sent by a switch at intervals of a preset duration.
  • the authentication request message is used by the switch to request authentication information of a user carried on the client.
  • the preset duration is pre-configured by the switch according to a re-authentication time interval authorized by a server.
  • Step S 302 Send a response message to the switch.
  • the response message carries the authentication information of the user carried on the client, so that the switch sends, by using an authentication message, the authentication information of the user carried in the response message to the server.
  • Step S 303 If an authentication domain of the user is changed, receive an authentication domain change message sent by the switch.
  • the authentication domain change message is generated by a switching office according to the authentication reply message sent by the server.
  • the server authenticates the authentication information of the user carried in the authentication message. Then, the server sends the authentication reply message to the switch, where the authentication reply message carries information about an authentication domain authorized by the server to the user.
  • the switch determines, according to the information that is about the authentication domain authorized by the server to the user and carried in the authentication reply message, whether the authentication domain of the user is changed. If the authentication domain authorized by the server to the user is different from a previous authentication domain, the switch constructs the authentication domain change message according to the information about the authentication domain authorized by the server to the user. The switch sends the authentication domain change message to the client.
  • the authentication domain change message carries an identifier instructing the client to obtain an IP address again or carries an IP address identifier allocated to the client.
  • the authentication domain change message is an EAPol Success message.
  • the identifier that instructs the client to obtain an IP address again and is carried in the authentication domain change message or the IP address identifier that is allocated to the client and carried in the authentication domain change message is an option identifier in a TLV format.
  • the authentication domain change message is an EAPol Failure message; and the identifier that instructs the client to obtain an IP address again and is carried in the authentication domain change message or the IP address identifier that is allocated to the client and carried in the authentication domain change message is an option identifier in a TLV format.
  • Step S 304 Obtain an IP address again according to the authentication domain change message.
  • the client After receiving the authentication domain change message, the client determines whether the authentication domain of the user carried on the client is changed; if the authentication domain of the user carried on the client is changed, the client obtains an IP address again automatically according to the authentication domain change message.
  • the client establishes a DHCP process according to the identifier that is carried in the authentication domain change message and instructs the client to obtain an IP address again, and obtains an IP address again by establishing the DHCP process.
  • the client performs refreshing automatically, and obtains an IP address from the IP address identifier that is allocated to the client and carried in the authentication domain change message.
  • the client can directly obtain a fresh IP address by refreshing without the need of initiating a new DHCP process again. This is more convenient and faster and can save network overheads.
  • a client receives an authentication domain change message that is sent by a switch and carries an identifier instructing the client to obtain an IP address again or carries an IP address identifier allocated to the client.
  • the client can also perceive that the authentication domain of the user carried on the client is changed, and obtain an IP address again.
  • normal connections between other clients and the switch are not affected.
  • FIG. 4 is a schematic structural diagram of an apparatus for allocating an IP address according to an embodiment of the present disclosure.
  • the apparatus includes a first sending unit 410 , a first receiving unit 420 , a second sending unit 430 , a second receiving unit 440 , and a determining unit 450 .
  • the first sending unit 410 is configured to send an authentication request message to a client at intervals of a preset duration.
  • the authentication request message is used to notify the client that re-authentication is needed, that is, it is used to instruct the client to re-send authentication information of a user carried on the client.
  • the preset duration is pre-configured according to a re-authentication time interval authorized by a server.
  • the server needs to re-authenticate the authentication information of the user carried on the client on a timed basis, so that when an authentication domain of the user is changed, the client is capable of obtaining a fresh IP address in time.
  • the apparatus for allocating an IP address further includes a configuring unit 460 .
  • FIG. 5 is a schematic structural diagram of another apparatus for allocating an IP address according to an embodiment of the present disclosure.
  • the configuring unit 460 is configured to pre-configure the foregoing preset duration according to a re-authentication time interval authorized by the server.
  • the first receiving unit 420 is configured to receive a response message sent by the client, where the response message carries the authentication information of the user carried on the client.
  • the second sending unit 430 is configured to send an authentication message to the server according to the response message.
  • the second sending unit 430 sends, by using the authentication message, the authentication information of the user carried in the response message to the server, so that the server authenticates the user.
  • the second receiving unit 440 is configured to receive an authentication reply message sent by the server, where the authentication reply message carries information about an authentication domain authorized by the server to the user.
  • the determining unit 450 is configured to determine, according to the authentication reply message, whether the authentication domain of the user is changed.
  • the authentication reply message carries information about a post-authentication domain authorized by the server to the user.
  • the determining unit 450 determines, according to the information about the post-authentication domain authorized by the server to the user, whether the post-authorization domain of the user is changed; if the post-authentication domain authorized by the server to the user is different from a previous post-authentication domain, the determining unit 450 determines that the authentication domain of the user is changed.
  • the authentication reply message indicates that the user authentication fails
  • the authentication reply message carries information about a pre-authentication domain authorized by the server to the user.
  • the authentication domain of the user is changed inevitably. Therefore, after the second receiving unit 440 receives the authentication reply message indicating that the user authentication fails, the determining unit 450 can directly determine that the authentication domain of the user is changed.
  • the first sending unit 410 is further configured to send an authentication domain change message to the client according to the authentication reply message if the authentication domain of the user is changed, so that the client obtains an IP address again according to the authentication domain change message.
  • the client establishes a DHCP process according to the identifier that is carried in the authentication domain change message and instructs the client to obtain an IP address again, and obtains an IP address again by establishing the DHCP process.
  • the client performs refreshing automatically, and obtains an IP address from the IP address identifier that is allocated to the client and carried in the authentication domain change message.
  • the client can directly obtain a fresh IP address by refreshing without the need of initiating a new DHCP process again. This is more convenient and faster and can save network overheads.
  • the apparatus for allocating an IP address provided in this embodiment, when an authentication domain of a user carried on a client is changed, the apparatus sends an authentication domain change message to the client according to a received authentication reply message. In this way, when other networks or devices are connected between a switch and the client, the client can also perceive that the authentication domain of the user carried on the user is changed and obtain an IP address again. In addition, in a process of obtaining an IP address again by the client, normal connections between other clients and the switch are not affected.
  • FIG. 6 is a schematic structural diagram of an apparatus for obtaining an IP address according to an embodiment of the present disclosure.
  • the apparatus includes a receiving unit 610 , a sending unit 620 , and an obtaining unit 630 .
  • the receiving unit 610 is configured to receive an authentication request message sent by a switch at intervals of a preset duration.
  • the authentication request message is used by the switch to request authentication information of a user carried on the client.
  • the preset duration is pre-configured by the switch according to a re-authentication time interval authorized by a server.
  • the sending unit 620 is configured to send a response message to the switch, where the response message carries the authentication information of the user carried on the client, so that the switch sends an authentication message to the server according to the response message.
  • the switch After receiving the response message, the switch sends, by using the authentication message, the authentication information of the user carried in the response message to the server, so that the server authenticates the user.
  • the receiving unit 610 is further configured to receive an authentication domain change message sent by the switch if an authentication domain of the user is changed, where the authentication domain change message is generated by the switch according to an authentication reply message sent by the server.
  • the server authenticates the authentication information of the user carried in the authentication message. Then, the server sends the authentication reply message to the switch, where the authentication reply message carries information about an authentication domain authorized by the server to the user.
  • the switch determines, according to the information that is about the authentication domain authorized by the server to the user and carried in the authentication reply message, whether the authentication domain of the user is changed; if the authentication domain authorized by the server to the user is different from a previous authentication domain, the switch constructs the authentication domain change message according to the information about the authentication domain authorized by the server to the user.
  • the switch sends the authentication domain change message to the client.
  • the receiving unit 610 receives the authentication domain change message.
  • the authentication domain change message carries an identifier instructing the client to obtain an IP address again or carries an IP address identifier allocated to the client.
  • the obtaining unit 630 is configured to obtain an IP address again according to the authentication domain change message.
  • the obtaining unit 630 establishes a DHCP process according to the identifier that is carried in the authentication domain change message and instructs the client to obtain an IP address again, and obtains an IP address again by establishing the DHCP process.
  • the obtaining unit 630 performs refreshing automatically, and obtains an IP address from the IP address identifier that is allocated to the client and carried in the authentication domain change message.
  • the client can directly obtain a fresh IP address by refreshing without the need of initiating a new DHCP process again. This is more convenient and faster and can save network overheads.
  • the apparatus receives an authentication domain change message that is sent by a switch and carries an identifier instructing a client to obtain an IP address again or carries an IP address identifier allocated to a client.
  • the client can also perceive that the authentication domain of the user carried on the client is changed, and obtain an IP address again.
  • normal connections between other clients and the switch are not affected.
  • FIG. 7 is another schematic structural diagram of an apparatus for allocating an IP address according to an embodiment of the present disclosure.
  • the apparatus for allocating an IP address applies to a switch and includes a network interface 710 , a processor 720 , a memory 730 , and a system bus 740 .
  • the system bus 740 is configured to connect to the network interface 710 , the processor 720 , and the memory 730 .
  • the network interface 710 is configured to communicate with other devices, the apparatus, and the server.
  • the memory 730 may be a permanent memory, such as a hard disk driver and a flash memory, and the memory 730 is provided with a software module and device driver programs.
  • the software module is capable of executing each functional module of the foregoing method of the present disclosure; the device driver programs may be driver programs of a network and an interface.
  • the software components are loaded to the memory 730 , and then are accessed by the processor 720 to perform the following instructions sending an authentication request message to a client at intervals of a preset duration, receiving a response message sent by the client, where the response message carries authentication information of a user carried on the client, sending an authentication message to a server according to the response message, receiving an authentication reply message sent by the server, where the authentication reply message carries information about an authentication domain authorized by the server to the user, determining, according to the authentication reply message, whether the authentication domain of the user is changed, and if the authentication domain of the user is changed, sending an authentication domain change message to the client according to the authentication reply message, so that the client obtains an IP address again according to the authentication domain change message.
  • the apparatus for allocating an IP address informs, by using a message, the client that the authentication domain of the user carried on the client is modified and an IP address needs to be obtained again.
  • the authentication domain change message carries an identifier instructing the client to obtain an IP address again or carries an IP address identifier allocated to the client.
  • the apparatus sends, according to a received authentication reply message, an authentication domain change message that carries an identifier instructing a client to obtain an IP address again or carries an IP address identifier allocated to a client.
  • an authentication domain change message that carries an identifier instructing a client to obtain an IP address again or carries an IP address identifier allocated to a client.
  • FIG. 8 is another schematic structural diagram of an apparatus for obtaining an IP address according to an embodiment of the present disclosure.
  • the apparatus for obtaining an IP address applies to a client and includes a network interface 810 , a processor 820 , a memory 830 , and a system bus 840 .
  • the system bus 840 is configured to connect to the network interface 810 , the processor 820 , and the memory 830 .
  • the network interface 810 is configured to communicate with other devices, apparatuses, and servers.
  • the memory 830 may be a permanent memory, such as a hard disk driver and a flash memory, and the memory 830 has a software module and device driver programs.
  • the software module is capable of executing each functional module of the foregoing method of the present disclosure; the device driver programs may be driver programs of a network and an interface.
  • the software components are loaded to the memory 830 , and then are accessed by the processor 820 to perform the following instructions receiving an authentication request message sent by a switch at intervals of a preset duration, sending a response message to the switch, where the response message carries authentication information of a user carried on the client, so that the switch sends an authentication message to a server according to the response message, if an authentication domain of the user is changed, receiving an authentication domain change message sent by the switch, where the authentication domain change message is generated by the switch according to the authentication reply message sent by the server, and obtaining an IP address again according to the authentication domain change message.
  • the apparatus for obtaining an IP address perceives, according to the authentication domain change message sent by the switch, that the authentication domain of the user carried on the client is changed, and obtains an IP address again according to the authentication domain change message.
  • a process instruction of obtaining an IP address again according to the authentication domain change message is specifically as follows.
  • a DHCP process is established according to the identifier that is carried in the authentication domain change message and instructs the client to obtain an IP address again. In IP address is obtained again by establishing the DHCP process.
  • the obtaining an IP address again according to the authentication domain change message is specifically as follows obtaining an IP address from the IP address identifier that is allocated to the client and carried in the authentication domain change message by refreshing.
  • an authentication domain change message that carries an identifier instructing a client to obtain an IP address again or carries an IP address identifier allocated to a client is received from a switch.
  • the client can also perceive that the authentication domain of the user carried on the client is changed, and obtain an IP address again.
  • normal connections between other clients and the switch are not affected.
  • the steps of the method or algorithm according to the embodiments disclosed herein can be implemented by hardware or software modules executed by a processor, or implemented by a combination thereof.
  • the software module may be stored in a random access memory (RAM) memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable magnetic disk, CD-ROM or any other forms of storage media commonly known in the art.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

A switch sends an authentication request message to a client at intervals of a preset duration. A response message sent by the client is received. The response message carries authentication information of a user carried on the client. An authentication message is sent to a server according to the response message. An authentication reply message sent by the server is received. The authentication reply message carries information about an authentication domain authorized by the server to the user. It is determined, according to the authentication reply message, whether the authentication domain of the user is changed. If the authentication domain of the user is changed, an authentication domain change message is sent to the client according to the authentication reply message, so that the client obtains an IP address again.

Description

    CROSS-REFERENCE TO RELATED APPLICATIONS
  • This application claims priority to Chinese Patent Application No. 201210431931.8, filed on Nov. 2, 2012, which is hereby incorporated by reference in its entirety.
  • TECHNICAL FIELD
  • The present disclosure relates to the field of communications and, in particular embodiments, to a method and an apparatus for allocating and obtaining an IP address.
  • BACKGROUND
  • In a network admission control (NAC) system of a communication layer L3 that implements forwarding based on IP addresses, a switch allocates a corresponding IP address to a client according to an authentication domain planned by an authentication server for a user. When the authentication domain planned by the authentication server for the user is changed, the IP address of the client is not changed. In this case, the user can access neither resources in the previous authentication domain nor resources in the current authentication domain; the user can access resources in the current authentication domain only when the user manually releases the previous IP address and reapplies for an IP address.
  • In the prior art, before the authentication server switches the authentication domain of the user, ports of the switch are temporarily disabled, and the ports are re-enabled after the authentication domain of the user is switched. If the client is directly connected to the switch, the network interface card of the client is disconnected and connected according to states of the switch ports, and obtains an IP address corresponding to the current authentication domain in a reconnection process, without manual operations performed by the user.
  • However, the prior art only applies to a scenario where the client is directly connected to the switch. When other devices are connected between the client and the switch, the client cannot perceive whether the ports of the switch are disabled or enabled, and therefore cannot obtain a new IP address. In addition, in an actual network, a switch port is connected to more than one client. When the port is disabled or enabled, connections between the switch and other clients are affected. This features high operation costs, strong constraints, and poor scalability.
  • SUMMARY OF THE INVENTION
  • Embodiments of the present disclosure provide a method and an apparatus for allocating and obtaining an IP address. A client is notified that an authentication domain of a user carried on the client is changed, so that the client automatically obtains a fresh IP address, thereby solving problems of strong constraints and poor scalability in the prior art.
  • According to a first aspect, the present disclosure provides a method for allocating an IP address. The method includes sending an authentication request message to a client at intervals of a preset duration and receiving a response message sent by the client. The response message carries authentication information of a user carried on the client. The method also includes sending an authentication message to a server according to the response message and receiving an authentication reply message sent by the server. The authentication reply message carries information about an authentication domain authorized by the server to the user. It is determined, according to the authentication reply message, whether the authentication domain of the user is changed, and if the authentication domain of the user is changed, an authentication domain change message is sent to the client according to the authentication reply message, so that the client obtains an IP address again according to the authentication domain change message.
  • According to a second aspect, the present disclosure provides a method for obtaining an IP address. The method includes receiving an authentication request message sent by a switch at intervals of a preset duration and sending a response message to the switch. The response message carries authentication information of a user carried on a client, so that the switch sends an authentication message to a server according to the response message. If an authentication domain of the user is changed, an authentication domain change message sent by the switch is received. The authentication domain change message is generated by the switch according to an authentication reply message sent by the server. An IP address is obtained again according to the authentication domain change message.
  • According to a third aspect, the present disclosure provides an apparatus for allocating an IP address. A first sending unit is configured to send an authentication request message to a client at intervals of a preset duration. A first receiving unit is configured to receive a response message sent by the client. The response message carries authentication information of a user carried on the client. A second sending unit is configured to send an authentication message to a server according to the response message. A second receiving unit is configured to receive an authentication reply message sent by the server. The authentication reply message carries information about an authentication domain authorized by the server to the user. A determining unit is configured to determine, according to the authentication reply message, whether the authentication domain of the user is changed. The first sending unit is further configured to send an authentication domain change message to the client according to the authentication reply message if the authentication domain of the user is changed, so that the client obtains an IP address again according to the authentication domain change message.
  • According to a fourth aspect, the present disclosure provides an apparatus for obtaining an IP address. A receiving unit is configured to receive an authentication request message sent by a switch at intervals of a preset duration. A sending unit is configured to send a response message to the switch. Where the response message carries authentication information of a user carried on a client, so that the switch sends an authentication message to a server according to the response message. The receiving unit is further configured to receive an authentication domain change message sent by the switch if an authentication domain of the user is changed. The authentication domain change message is generated by the switch according to an authentication reply message sent by the server. An obtaining unit is configured to obtain an IP address again according to the authentication domain change message.
  • With the present disclosure, a client is notified, by using a message, that an authentication domain of a user carried on the client is modified. In this way, when other networks or devices connected between a switch and the client, the client can also perceive that the authentication domain of the user carried on the client is changed, and automatically obtain an IP address again. In addition, when one client updates an IP address, connections between other clients and the switch are not affected. The present disclosure has an extensive application scope, and can reduce deployment difficulties and operation and maintenance costs of the system.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • For a more complete understanding of the present invention, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawing, in which:
  • FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present disclosure;
  • FIG. 2 is a flowchart of a method for allocating an IP address according to an embodiment of the present disclosure;
  • FIG. 3 is a flowchart of a method for obtaining an IP address according to an embodiment of the present disclosure;
  • FIG. 4 is a schematic structural diagram of an apparatus for allocating an IP address according to an embodiment of the present disclosure;
  • FIG. 5 is a schematic structural diagram of another apparatus for allocating an IP address according to an embodiment of the present disclosure;
  • FIG. 6 is a schematic structural diagram of an apparatus for obtaining an IP address according to an embodiment of the present disclosure;
  • FIG. 7 is another schematic structural diagram of an apparatus for allocating an IP address according to an embodiment of the present disclosure; and
  • FIG. 8 is another schematic structural diagram of an apparatus for obtaining an IP address according to an embodiment of the present disclosure.
  • DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS
  • To make the objectives, technical solutions, and advantages of the present disclosure more comprehensible, the following further describes the present disclosure with reference to the accompanying drawings. Apparently, the embodiments described herein are merely a part rather than all of the embodiments of the present disclosure. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.
  • The following firstly describes an application scenario of a method for allocating an IP address according to an embodiment of the present disclosure. FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present disclosure.
  • The method for allocating an IP address provided in the embodiment of the present disclosure applies to an L3 NAC system, where the L3 NAC system includes a client 11, a switch 12, and a server 13. When the client 11 is authenticated for the first time, after receiving an initiated authentication message sent by the client 11, the switch 12 sends an authentication request message to the client 11 so as to request authentication information of a user carried on the client 11. Then, the switch 12 receives a response message sent by the client 11, where the response message carries authentication information of the user (for example, such information as user name that can identify a user identity, and such information as password that can authenticate the user). Then, the switch 12 sends the authentication information of the user carried in the response message to the server 13. The server 13 authenticates the user according to the authentication information of the user. After the authentication succeeds, the server 13 sends an authentication success message to the client 11 through the switch 12. The client 11 starts a Dynamic Host Configuration Protocol (DHCP) process to obtain an IP address corresponding to an authentication domain of the client 11.
  • Specifically, the authentication domain refers to a database that can be accessed by a successfully authenticated user. The server 13 may divide the database into different authentication domains according to different user rights, and different authentication domains are accessed only by IP addresses in different address pools. For example, a client having an IP address in an IP address pool 1 can only access resources in an authentication domain 1, while a client having an IP address in an IP address pool 2 can only access resources in an authentication domain 2.
  • After the server authenticates the user successfully, it is assumed that the user rights allow access to resources in the authentication domain 1. When receiving an address allocation request (DHCP request) of the client, the DHCP server selects an IP address from the IP address pool corresponding to the authentication domain 1 and allocates the selected IP address to the client. The DHCP server may be integrated into the switch 12 or be set independently. When the DHCP server is set independently, the switch 12 acts as a DHCP relay to forward DHCP messages between the client and the DHCP server.
  • After the server 13 modifies the authentication domain of the user carried on the client 11, it is assumed that resources that the user is authorized to access are moved from the authentication domain 1 to the authentication domain 2. At this time, the client 11 can neither obtain the resources by accessing the authentication domain 1 nor access the authentication domain 2, and the client 11 needs to obtain an IP address again that can access the authentication domain 2 to establish a normal connection with the network. Therefore, the present disclosure provides a method for allocating an IP address, that is, in a process of re-authenticating the client 11 by the server 13, the server 13 sends information about the authentication domain of the client to the switch 12. When the authentication domain of the user is changed, the switch 12 sends an authentication domain change message to the client 11, so that the client 11 determines, according to the received authentication domain change message, whether the authentication domain of the user carried on the client is changed, and automatically obtains an IP address again when the authentication domain of the user is changed.
  • The following describes in detail the present disclosure by using a specific embodiment.
  • FIG. 2 is a flowchart of a method for allocating an IP address according to an embodiment of the present disclosure. The method may be performed by the switch 12 illustrated in FIG. 1. Specifically, the method includes the following steps.
  • Step S201: Send an authentication request message to a client at intervals of a preset duration.
  • The authentication request message is used to notify the client that re-authentication is needed, that is, it is used to instruct the client to re-send authentication information of a user carried on the client.
  • Further, the preset duration is pre-configured according to a re-authentication time interval authorized by a server. To ensure that the client normally obtains resources, the server needs to re-authenticate the authentication information of the user carried on the client on a timed basis, so that when an authentication domain of the user is changed, the client is capable of obtaining a fresh IP address in time.
  • Step S202: Receive a response message sent by the client.
  • The response message carries the authentication information of the user carried on the client.
  • Step S203: Send an authentication message to the server according to the response message.
  • After receiving the response message sent by the client, the switch sends, by using the authentication message, the authentication information of the user carried in the response message to the server, so that the server authenticates the user.
  • Step S204: Receive an authentication reply message sent by the server.
  • The authentication reply message carries information about an authentication domain authorized by the server to the user, so that the switch determines, according to the information about the authentication domain authorized by the server to the user, whether the authentication domain of the user is changed.
  • Step S205: Determine, according to the authentication reply message, whether the authentication domain of the user is changed.
  • Specifically, if the authentication reply message indicates that the user authentication succeeds, the server sends, by using the authentication reply message, information about a post-authentication domain authorized to the user to the switch. The switch determines, according to information about the post-authentication domain authorized to the user, whether the post-authentication domain of the user is changed. If the post-authentication domain authorized by the server to the user is different from a previous post-authentication domain, step S206 is performed. If the post-authentication domain authorized by the server to the user is the same as the previous post-authentication domain, step S206 is not performed and step S201 is performed again. The post-authentication domain refers to an authentication domain that can be accessed by the user after the user authentication succeeds. A pre-authentication domain refers to an authentication domain that can be accessed by the user before the user authentication is completed. That before the authentication is completed includes the following two cases: authentication fails and no authentication is performed.
  • If the authentication reply message indicates that the user authentication fails, the server sends, by using the authentication reply message, information about the pre-authentication domain authorized to the user to the switch. When the user authentication fails, the authentication domain of the user is changed inevitably. Therefore, after receiving the authentication reply message indicating that the user authentication fails, the switch can directly determine that the authentication domain of the user is changed, and then step S206 is directly performed.
  • Step S206: Send an authentication domain change message to the client according to the authentication reply message.
  • Specifically, the switch constructs the authentication change message according to the information about the authorization domain authorized by the server to the user and carried in the authentication reply message, and sends the authentication domain change message to the client, so that the client obtains an IP address again according to the authentication domain change message.
  • Preferentially, if the authentication domain change message carries an identifier instructing the client to obtain an IP address again, the client establishes a DHCP process according to the identifier that is carried in the authentication domain change message and instructs the client to obtain an IP address again, and obtains an IP address again by establishing the DHCP process.
  • Preferentially, if the authentication domain change message carries an IP address identifier allocated to the client, the client performs refreshing automatically, and obtains an IP address from the IP address identifier that is allocated to the client and carried in the authentication domain change message. By using this manner of obtaining an IP address, the client can directly obtain a fresh IP address by refreshing without the need of initiating a new DHCP process again. This is more convenient and faster and can save network overheads.
  • Preferentially, if the authentication reply message indicates that the user authentication succeeds, the authentication domain change message is an EAPol Success message. The identifier that instructs the client to obtain an IP address again and is carried in the authentication domain change message or the IP address identifier that is allocated to the client and carried in the authentication domain change message is an option identifier in a TLV format.
  • Preferentially, if the authentication reply message indicates that the user authentication fails, the authentication domain change message is an EAPol Failure message; and the identifier that instructs the client to obtain an IP address again and is carried in the authentication domain change message or the IP address identifier that is allocated to the client and carried in the authentication domain change message is an option identifier in a TLV format.
  • By using the method for allocating an IP address provided in this embodiment, when other networks or devices are connected between a switch and a client, the client can automatically perceive, according to an authentication domain change message sent by the switch, whether an authentication domain of a user carried on the client is changed. In this way, when the authentication domain of the user is changed, the client can automatically obtain an IP address again. In addition, in a process of obtaining an IP address again by the client, normal connections between other clients and the switch are not affected.
  • FIG. 3 is a flowchart of a method for obtaining an IP address according to an embodiment of the present disclosure. An executor of the method is a client. Specifically, the method includes the following steps:
  • Step S301: Receive an authentication request message sent by a switch at intervals of a preset duration.
  • The authentication request message is used by the switch to request authentication information of a user carried on the client.
  • The preset duration is pre-configured by the switch according to a re-authentication time interval authorized by a server.
  • Step S302: Send a response message to the switch.
  • The response message carries the authentication information of the user carried on the client, so that the switch sends, by using an authentication message, the authentication information of the user carried in the response message to the server.
  • Step S303: If an authentication domain of the user is changed, receive an authentication domain change message sent by the switch.
  • The authentication domain change message is generated by a switching office according to the authentication reply message sent by the server.
  • Specifically, after receiving an authentication message, the server authenticates the authentication information of the user carried in the authentication message. Then, the server sends the authentication reply message to the switch, where the authentication reply message carries information about an authentication domain authorized by the server to the user. After receiving the authentication reply message, the switch determines, according to the information that is about the authentication domain authorized by the server to the user and carried in the authentication reply message, whether the authentication domain of the user is changed. If the authentication domain authorized by the server to the user is different from a previous authentication domain, the switch constructs the authentication domain change message according to the information about the authentication domain authorized by the server to the user. The switch sends the authentication domain change message to the client.
  • Preferentially, the authentication domain change message carries an identifier instructing the client to obtain an IP address again or carries an IP address identifier allocated to the client.
  • Preferentially, if the authentication reply message indicates that the user authentication succeeds, the authentication domain change message is an EAPol Success message. The identifier that instructs the client to obtain an IP address again and is carried in the authentication domain change message or the IP address identifier that is allocated to the client and carried in the authentication domain change message is an option identifier in a TLV format.
  • Preferentially, if the authentication reply message indicates that the user authentication fails, the authentication domain change message is an EAPol Failure message; and the identifier that instructs the client to obtain an IP address again and is carried in the authentication domain change message or the IP address identifier that is allocated to the client and carried in the authentication domain change message is an option identifier in a TLV format.
  • Step S304: Obtain an IP address again according to the authentication domain change message.
  • After receiving the authentication domain change message, the client determines whether the authentication domain of the user carried on the client is changed; if the authentication domain of the user carried on the client is changed, the client obtains an IP address again automatically according to the authentication domain change message.
  • Preferentially, if the authentication domain change message carries an identifier instructing the client to obtain an IP address again, the client establishes a DHCP process according to the identifier that is carried in the authentication domain change message and instructs the client to obtain an IP address again, and obtains an IP address again by establishing the DHCP process.
  • Preferentially, if the authentication domain change message carries an IP address identifier allocated to the client, the client performs refreshing automatically, and obtains an IP address from the IP address identifier that is allocated to the client and carried in the authentication domain change message. By using this manner of obtaining an IP address, the client can directly obtain a fresh IP address by refreshing without the need of initiating a new DHCP process again. This is more convenient and faster and can save network overheads.
  • By using the method for obtaining an IP address provided in this embodiment, a client receives an authentication domain change message that is sent by a switch and carries an identifier instructing the client to obtain an IP address again or carries an IP address identifier allocated to the client. In this way, in the case where other networks or devices are connected between the switch and the client, when an authentication domain of a user carried on the client is changed, the client can also perceive that the authentication domain of the user carried on the client is changed, and obtain an IP address again. In addition, in a process of obtaining an IP address again by the client, normal connections between other clients and the switch are not affected.
  • Accordingly, the present disclosure provides an apparatus for allocating an IP address, where the apparatus applies to a switch. FIG. 4 is a schematic structural diagram of an apparatus for allocating an IP address according to an embodiment of the present disclosure. The apparatus includes a first sending unit 410, a first receiving unit 420, a second sending unit 430, a second receiving unit 440, and a determining unit 450.
  • The first sending unit 410 is configured to send an authentication request message to a client at intervals of a preset duration.
  • The authentication request message is used to notify the client that re-authentication is needed, that is, it is used to instruct the client to re-send authentication information of a user carried on the client.
  • Further, the preset duration is pre-configured according to a re-authentication time interval authorized by a server. To ensure that the client normally obtains resources, the server needs to re-authenticate the authentication information of the user carried on the client on a timed basis, so that when an authentication domain of the user is changed, the client is capable of obtaining a fresh IP address in time.
  • Therefore, the apparatus for allocating an IP address further includes a configuring unit 460. FIG. 5 is a schematic structural diagram of another apparatus for allocating an IP address according to an embodiment of the present disclosure. The configuring unit 460 is configured to pre-configure the foregoing preset duration according to a re-authentication time interval authorized by the server.
  • The first receiving unit 420 is configured to receive a response message sent by the client, where the response message carries the authentication information of the user carried on the client.
  • The second sending unit 430 is configured to send an authentication message to the server according to the response message.
  • After the first receiving unit 420 receives the response message sent by the client, the second sending unit 430 sends, by using the authentication message, the authentication information of the user carried in the response message to the server, so that the server authenticates the user.
  • The second receiving unit 440 is configured to receive an authentication reply message sent by the server, where the authentication reply message carries information about an authentication domain authorized by the server to the user.
  • The determining unit 450 is configured to determine, according to the authentication reply message, whether the authentication domain of the user is changed.
  • Specifically, if the authentication reply message indicates that the user authentication succeeds, the authentication reply message carries information about a post-authentication domain authorized by the server to the user. The determining unit 450 determines, according to the information about the post-authentication domain authorized by the server to the user, whether the post-authorization domain of the user is changed; if the post-authentication domain authorized by the server to the user is different from a previous post-authentication domain, the determining unit 450 determines that the authentication domain of the user is changed.
  • If the authentication reply message indicates that the user authentication fails, the authentication reply message carries information about a pre-authentication domain authorized by the server to the user. When the user authentication fails, the authentication domain of the user is changed inevitably. Therefore, after the second receiving unit 440 receives the authentication reply message indicating that the user authentication fails, the determining unit 450 can directly determine that the authentication domain of the user is changed.
  • The first sending unit 410 is further configured to send an authentication domain change message to the client according to the authentication reply message if the authentication domain of the user is changed, so that the client obtains an IP address again according to the authentication domain change message.
  • Preferentially, if the authentication domain change message carries an identifier instructing the client to obtain an IP address again, the client establishes a DHCP process according to the identifier that is carried in the authentication domain change message and instructs the client to obtain an IP address again, and obtains an IP address again by establishing the DHCP process.
  • Preferentially, if the authentication domain change message carries an IP address identifier allocated to the client, the client performs refreshing automatically, and obtains an IP address from the IP address identifier that is allocated to the client and carried in the authentication domain change message. By using this manner of obtaining an IP address, the client can directly obtain a fresh IP address by refreshing without the need of initiating a new DHCP process again. This is more convenient and faster and can save network overheads.
  • By using the apparatus for allocating an IP address provided in this embodiment, when an authentication domain of a user carried on a client is changed, the apparatus sends an authentication domain change message to the client according to a received authentication reply message. In this way, when other networks or devices are connected between a switch and the client, the client can also perceive that the authentication domain of the user carried on the user is changed and obtain an IP address again. In addition, in a process of obtaining an IP address again by the client, normal connections between other clients and the switch are not affected.
  • Accordingly, the present disclosure provides an apparatus for obtaining an IP address, where the apparatus applies to a client. FIG. 6 is a schematic structural diagram of an apparatus for obtaining an IP address according to an embodiment of the present disclosure. The apparatus includes a receiving unit 610, a sending unit 620, and an obtaining unit 630.
  • The receiving unit 610 is configured to receive an authentication request message sent by a switch at intervals of a preset duration.
  • The authentication request message is used by the switch to request authentication information of a user carried on the client.
  • The preset duration is pre-configured by the switch according to a re-authentication time interval authorized by a server.
  • The sending unit 620 is configured to send a response message to the switch, where the response message carries the authentication information of the user carried on the client, so that the switch sends an authentication message to the server according to the response message.
  • After receiving the response message, the switch sends, by using the authentication message, the authentication information of the user carried in the response message to the server, so that the server authenticates the user.
  • The receiving unit 610 is further configured to receive an authentication domain change message sent by the switch if an authentication domain of the user is changed, where the authentication domain change message is generated by the switch according to an authentication reply message sent by the server.
  • Specifically, after receiving the authentication message, the server authenticates the authentication information of the user carried in the authentication message. Then, the server sends the authentication reply message to the switch, where the authentication reply message carries information about an authentication domain authorized by the server to the user. After receiving the authentication reply message, the switch determines, according to the information that is about the authentication domain authorized by the server to the user and carried in the authentication reply message, whether the authentication domain of the user is changed; if the authentication domain authorized by the server to the user is different from a previous authentication domain, the switch constructs the authentication domain change message according to the information about the authentication domain authorized by the server to the user. The switch sends the authentication domain change message to the client. The receiving unit 610 receives the authentication domain change message.
  • Preferentially, the authentication domain change message carries an identifier instructing the client to obtain an IP address again or carries an IP address identifier allocated to the client.
  • The obtaining unit 630 is configured to obtain an IP address again according to the authentication domain change message.
  • Preferentially, if the authentication domain change message carries an identifier instructing the client to obtain an IP address again, the obtaining unit 630 establishes a DHCP process according to the identifier that is carried in the authentication domain change message and instructs the client to obtain an IP address again, and obtains an IP address again by establishing the DHCP process.
  • Preferentially, if the authentication domain change message carries an IP address identifier allocated to the client, the obtaining unit 630 performs refreshing automatically, and obtains an IP address from the IP address identifier that is allocated to the client and carried in the authentication domain change message. By using this manner of obtaining an IP address, the client can directly obtain a fresh IP address by refreshing without the need of initiating a new DHCP process again. This is more convenient and faster and can save network overheads.
  • By using the apparatus for obtaining an IP address provided in this embodiment, the apparatus receives an authentication domain change message that is sent by a switch and carries an identifier instructing a client to obtain an IP address again or carries an IP address identifier allocated to a client. In this way, in the case where other networks or devices are connected between the switch and the client, when an authentication domain of a user carried on the client is changed, the client can also perceive that the authentication domain of the user carried on the client is changed, and obtain an IP address again. In addition, in a process of obtaining an IP address again by the client, normal connections between other clients and the switch are not affected.
  • In addition, an apparatus for allocating an IP address provided in the embodiment of the present disclosure may be implemented by using another manner. FIG. 7 is another schematic structural diagram of an apparatus for allocating an IP address according to an embodiment of the present disclosure. The apparatus for allocating an IP address applies to a switch and includes a network interface 710, a processor 720, a memory 730, and a system bus 740.
  • The system bus 740 is configured to connect to the network interface 710, the processor 720, and the memory 730.
  • The network interface 710 is configured to communicate with other devices, the apparatus, and the server.
  • The memory 730 may be a permanent memory, such as a hard disk driver and a flash memory, and the memory 730 is provided with a software module and device driver programs. The software module is capable of executing each functional module of the foregoing method of the present disclosure; the device driver programs may be driver programs of a network and an interface.
  • When the apparatus is started, the software components are loaded to the memory 730, and then are accessed by the processor 720 to perform the following instructions sending an authentication request message to a client at intervals of a preset duration, receiving a response message sent by the client, where the response message carries authentication information of a user carried on the client, sending an authentication message to a server according to the response message, receiving an authentication reply message sent by the server, where the authentication reply message carries information about an authentication domain authorized by the server to the user, determining, according to the authentication reply message, whether the authentication domain of the user is changed, and if the authentication domain of the user is changed, sending an authentication domain change message to the client according to the authentication reply message, so that the client obtains an IP address again according to the authentication domain change message.
  • The apparatus for allocating an IP address provided in this embodiment informs, by using a message, the client that the authentication domain of the user carried on the client is modified and an IP address needs to be obtained again.
  • Preferentially, the authentication domain change message carries an identifier instructing the client to obtain an IP address again or carries an IP address identifier allocated to the client.
  • By using the apparatus for allocating an IP address provided in this embodiment, the apparatus sends, according to a received authentication reply message, an authentication domain change message that carries an identifier instructing a client to obtain an IP address again or carries an IP address identifier allocated to a client. In this way, in the case where other networks or devices are connected between a switch and the client, when an authentication domain of a user carried on the client is changed, the client can also perceive that the authentication domain of the user carried on the client is changed, and obtain an IP address again. In addition, in a process of obtaining an IP address again by the client, normal connections between other clients and the switch are not affected.
  • Further, an apparatus for obtaining an IP address provided in the embodiment of the present disclosure may be implemented by using another manner. FIG. 8 is another schematic structural diagram of an apparatus for obtaining an IP address according to an embodiment of the present disclosure. The apparatus for obtaining an IP address applies to a client and includes a network interface 810, a processor 820, a memory 830, and a system bus 840.
  • The system bus 840 is configured to connect to the network interface 810, the processor 820, and the memory 830.
  • The network interface 810 is configured to communicate with other devices, apparatuses, and servers.
  • The memory 830 may be a permanent memory, such as a hard disk driver and a flash memory, and the memory 830 has a software module and device driver programs. The software module is capable of executing each functional module of the foregoing method of the present disclosure; the device driver programs may be driver programs of a network and an interface.
  • When the apparatus is started, the software components are loaded to the memory 830, and then are accessed by the processor 820 to perform the following instructions receiving an authentication request message sent by a switch at intervals of a preset duration, sending a response message to the switch, where the response message carries authentication information of a user carried on the client, so that the switch sends an authentication message to a server according to the response message, if an authentication domain of the user is changed, receiving an authentication domain change message sent by the switch, where the authentication domain change message is generated by the switch according to the authentication reply message sent by the server, and obtaining an IP address again according to the authentication domain change message.
  • The apparatus for obtaining an IP address provided in this embodiment perceives, according to the authentication domain change message sent by the switch, that the authentication domain of the user carried on the client is changed, and obtains an IP address again according to the authentication domain change message.
  • Preferentially, if the authentication domain change message carries an identifier instructing the client to obtain an IP address again, a process instruction of obtaining an IP address again according to the authentication domain change message is specifically as follows.
  • A DHCP process is established according to the identifier that is carried in the authentication domain change message and instructs the client to obtain an IP address again. In IP address is obtained again by establishing the DHCP process.
  • Preferentially, if the authentication domain change message carries an IP address allocated to the client, the obtaining an IP address again according to the authentication domain change message is specifically as follows obtaining an IP address from the IP address identifier that is allocated to the client and carried in the authentication domain change message by refreshing.
  • By using the apparatus for obtaining an IP address provided in this embodiment, an authentication domain change message that carries an identifier instructing a client to obtain an IP address again or carries an IP address identifier allocated to a client is received from a switch. In this way, in the case where other networks or devices are connected between the switch and the client, when an authentication domain of a user carried on the client is changed, the client can also perceive that the authentication domain of the user carried on the client is changed, and obtain an IP address again. In addition, in a process of obtaining an IP address again by the client, normal connections between other clients and the switch are not affected.
  • Those skilled in the art may be further aware that units and steps provided in each embodiment disclosed in the specification can be implemented by electronic hardware, computer software or a combination thereof. For clear description of the interchangeability between hardware and software, components and steps of each embodiment are generally described in the foregoing description according to the functionality. Whether these functions are executed by hardware or software depends on specific applications and design constraints of the technical solution. Those skilled in the art can implement the described functions of each specific application by using different methods, but the implementation should not depart from the scope of the present disclosure.
  • The steps of the method or algorithm according to the embodiments disclosed herein can be implemented by hardware or software modules executed by a processor, or implemented by a combination thereof. The software module may be stored in a random access memory (RAM) memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable magnetic disk, CD-ROM or any other forms of storage media commonly known in the art.
  • The objectives, technical solutions, and benefits of the present disclosure are further described in detail in the foregoing specific embodiments. It should be understood that the foregoing descriptions are merely specific embodiments of the present disclosure, but are not intended to limit the protection scope of the present disclosure. Any modification, equivalent replacement, or improvement made within the principle of the present disclosure shall fall within the protection scope of the present disclosure.

Claims (19)

1. A method for allocating an IP address, the method comprising:
sending an authentication request message to a client at intervals of a preset duration, wherein the authentication request message is used to instruct the client to re-send authentication information of a user;
receiving a response message sent by the client, wherein the response message carries authentication information of the user;
sending an authentication message to a server according to the response message, wherein the authentication message carries the authentication information of the user;
receiving an authentication reply message sent by the server, wherein the authentication reply message carries information about an authentication domain authorized by the server to the user, wherein the authentication domain comprises a database that can be accessed by the user;
determining, according to the authentication reply message, whether the authentication domain of the user is changed; and
if the authentication domain of the user is changed, sending an authentication domain change message to the client according to the authentication reply message, wherein the authentication domain change message is used to enable the client to obtain a new IP address according to the authentication domain change message.
2. The method according to claim 1, wherein no authentication domain change message is sent to the client when the authentication domain of the user is not changed.
3. The method according to claim 1, wherein the authentication domain change message carries an IP address identifier allocated to the client.
4. The method according to claim 1, wherein the authentication domain change message carries an identifier instructing the client to obtain the new IP address.
5. The method according to claim 4, wherein the authentication reply message indicates that user authentication succeeds and wherein the authentication domain change message is an EAPol Success message of a LAN-based Extensible Authentication Protocol and the identifier is an option identifier in a type-length-value (TLV) format.
6. The method according to claim 4, wherein the authentication reply message indicates that user authentication fails and wherein the authentication domain change message is an EAPol Failure message of a LAN-based Extensible Authentication Protocol and the identifier is an option identifier in a type-length-value (TLV) format.
7. The method according to claim 1, wherein the preset duration is pre-configured according to a re-authentication time interval authorized by the server.
8. A method for obtaining an IP address, the method comprising:
receiving an authentication request message sent by a switch at intervals of a preset duration, wherein the authentication request message is used to instruct a client to re-send authentication information of a user;
sending a response message to the switch, wherein the response message carries authentication information of the user;
if an authentication domain of the user is changed, receiving an authentication domain change message sent by the switch, wherein the authentication domain change message is generated by the switch according to an authentication reply message sent by a server, the authentication domain comprising a database that can be accessed by the user; and
obtaining a new IP address again according to the authentication domain change message.
9. The method according to claim 8, wherein the authentication domain change message carries an identifier instructing the client to obtain the new IP address and wherein obtaining the new IP address according to the authentication domain change message comprises establishing a DHCP process according to the identifier so as to obtain the new IP address.
10. The method according to claim 9, wherein the authentication reply message indicates that user authentication succeeds and wherein the authentication domain change message is an EAPol Success message and the identifier is an option identifier in a TVL format.
11. The method according to claim 9, wherein the authentication reply message indicates that user authentication fails and wherein the authentication domain change message is an EAPoI Failure message and the identifier is an option identifier in a TVL format.
12. The method according to claim 8, wherein the authentication domain change message carries an IP address identifier allocated to the client and wherein the obtaining the new IP address according to the authentication domain change message comprises obtaining the new IP address from the IP address identifier allocated to the client.
13. An apparatus for allocating an IP address, the apparatus comprising:
a first sending unit, configured to send an authentication request message to a client at intervals of a preset duration, wherein the authentication request message is used to instruct the client to re-send authentication information of a user;
a first receiving unit, configured to receive a response message sent by the client, wherein the response message carries authentication information of the user;
a second sending unit, configured to send an authentication message to a server according to the response message, wherein the authentication message carries the authentication information of the user;
a second receiving unit, configured to receive an authentication reply message sent by the server, wherein the authentication reply message carries information about an authentication domain authorized by the server to the user, wherein the authentication domain comprises a database that can be accessed by the user; and
a determining unit, configured to determine, according to the authentication reply message, whether the authentication domain of the user is changed;
wherein the first sending unit is further configured to send an authentication domain change message to the client according to the authentication reply message if the authentication domain of the user is changed, wherein the authentication domain change message is used to enable the client to obtain a new IP address according to the authentication domain change message.
14. The apparatus according to claim 13, wherein the authentication domain change message carries an identifier instructing the client to obtain an the new IP address.
15. The apparatus according to claim 13, wherein the authentication domain change message carries an IP address identifier allocated to the client.
16. The apparatus according to claim 13, further comprising:
a configuring unit, configured to pre-configure the preset duration according to a re-authentication time interval authorized by the server.
17. An apparatus for obtaining an IP address, the apparatus comprising:
a receiving unit, configured to receive an authentication request message sent by a switch at intervals of a preset duration, wherein the authentication request message is used to instruct a client to re-send authentication information of a user; and
a sending unit, configured to send a response message to the switch, wherein the response message carries authentication infothiation of the user;
wherein the receiving unit is further configured to, if an authentication domain of the user is changed, receive an authentication domain change message sent by the switch, wherein the authentication domain change message is generated by the switch according to an authentication reply message sent by a server, the authentication domain comprises a database that can be accessed by the user; and
an obtaining unit, configured to obtain a new IP address according to the authentication domain change message.
18. The apparatus according to claim 17, wherein when the authentication domain change message carries an identifier instructing the client to obtain the new IP address, the obtaining unit is specifically configured to:
establish a DHCP process according to the identifier so as to obtain the new IP address.
19. The apparatus according to claim 17, wherein when the authentication domain change message carries an IP address identifier allocated to the client, the obtaining unit is specifically configured to:
obtain the new IP address from the IP address identifier allocated to the client.
US14/017,020 2012-11-02 2013-09-03 Method and apparatus for allocating and obtaining IP address Active US8713659B1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201210431931.8A CN102882994B (en) 2012-11-02 2012-11-02 IP address assignment method and device and IP address acquisition method and device
CN201210431931 2012-11-02
CN201210431931.8 2012-11-02

Publications (2)

Publication Number Publication Date
US8713659B1 US8713659B1 (en) 2014-04-29
US20140130125A1 true US20140130125A1 (en) 2014-05-08

Family

ID=47484136

Family Applications (1)

Application Number Title Priority Date Filing Date
US14/017,020 Active US8713659B1 (en) 2012-11-02 2013-09-03 Method and apparatus for allocating and obtaining IP address

Country Status (4)

Country Link
US (1) US8713659B1 (en)
EP (1) EP2728837B1 (en)
JP (1) JP5613915B2 (en)
CN (1) CN102882994B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516395A (en) * 2016-01-14 2016-04-20 深圳市深信服电子科技有限公司 Network address assignment method and device
CN108712387A (en) * 2018-04-19 2018-10-26 深圳市联软科技股份有限公司 The system of user identity in a kind of identification network
CN110881143B (en) * 2018-09-05 2022-07-19 中兴通讯股份有限公司 Set top box management method, device and equipment and computer readable storage medium
CN109447291A (en) * 2018-11-22 2019-03-08 奥士康科技股份有限公司 A kind of method of detection device multimachine network line shared data
CN113765904B (en) * 2021-08-26 2023-03-31 新华三大数据技术有限公司 Authentication method and device

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7251826B1 (en) * 1999-06-07 2007-07-31 Register.Com, Inc. Domain manager for plural domains and method of use
US7143435B1 (en) * 2002-07-31 2006-11-28 Cisco Technology, Inc. Method and apparatus for registering auto-configured network addresses based on connection authentication
US20040122976A1 (en) * 2002-10-24 2004-06-24 Ashutosh Dutta Integrated mobility management
KR100538223B1 (en) * 2003-05-12 2005-12-21 삼성전자주식회사 System and method for deleting tunnelling in the connection between mobile node and correspondent node
US20060068799A1 (en) * 2004-09-27 2006-03-30 T-Mobile, Usa, Inc. Open-host wireless access system
US7464136B2 (en) * 2004-11-05 2008-12-09 Microsoft Corporation Integrated messaging domain name setup
US8601103B2 (en) * 2006-06-15 2013-12-03 Intel Corporation Method, apparatus and system for distributing and enforcing authenticated network connection policy
CN101217575B (en) * 2008-01-18 2010-07-28 杭州华三通信技术有限公司 An IP address allocation and device in user end certification process
US8285875B2 (en) * 2009-01-28 2012-10-09 Juniper Networks, Inc. Synchronizing resource bindings within computer network
CA2672642C (en) * 2009-07-17 2013-05-14 Solutioninc Limited Remote roaming controlling system, visitor based network server, and method of controlling remote roaming of user devices
JP5271925B2 (en) * 2010-01-13 2013-08-21 株式会社日立製作所 Cache information update method, computer, program, and storage medium
CN101917398A (en) * 2010-06-28 2010-12-15 北京星网锐捷网络技术有限公司 Method and equipment for controlling client access authority
CN102075904B (en) * 2010-12-24 2015-02-11 杭州华三通信技术有限公司 Method and device for preventing re-authentication of roaming user
CN102546568B (en) * 2010-12-31 2015-04-08 华为技术有限公司 Method and device for Internet protocol (IP) terminal being accessed into network
CN102710814B (en) * 2012-06-21 2016-03-30 北京奇虎科技有限公司 The control method of virtual machine IP address and device

Also Published As

Publication number Publication date
CN102882994A (en) 2013-01-16
US8713659B1 (en) 2014-04-29
JP2014093772A (en) 2014-05-19
JP5613915B2 (en) 2014-10-29
EP2728837A1 (en) 2014-05-07
CN102882994B (en) 2015-05-06
EP2728837B1 (en) 2016-03-16

Similar Documents

Publication Publication Date Title
CN112566050B (en) Cellular service account transfer for an accessory wireless device
US11483711B2 (en) Cellular service account transfer and authentication
RU2556468C2 (en) Terminal access authentication method and customer premise equipment
US9973925B2 (en) Method and apparatus for direct communication key establishment
US8713659B1 (en) Method and apparatus for allocating and obtaining IP address
EP1934780B1 (en) Creating secure interactive connections with remote resources
US9246872B2 (en) Methods and arrangements for enabling data transmission between a mobile device and a static destination address
CN106161496B (en) The remote assistance method and device of terminal, system
US9749320B2 (en) Method and system for wireless local area network user to access fixed broadband network
CN110519404B (en) SDN-based policy management method and device and electronic equipment
US11645102B2 (en) Connection leasing system and related methods for use with legacy virtual delivery appliances
CN113068175B (en) User data distribution method, sinking user plane function network element and system
US10582380B2 (en) Methods and apparatus for direct communication key establishment
US20160345169A1 (en) Methods and apparatus for direct communication key establishment
US20220007277A1 (en) A method and apparatus for attaching user equipment to a network slice
US20140122731A1 (en) Techniques for desktop migration
WO2017202466A1 (en) Network application function registration
US20150358575A1 (en) Wireless camera, wireless network video recorder (nvr), and method for registering wireless camera with wireless nvr
CN116325843A (en) Method and device for establishing secure communication
CN103188662B (en) A kind of method and device verifying WAP (wireless access point)
EP3310078A1 (en) Communication method, small cell base station, small cell base station controller, terminal and system
CN104703121B (en) Method, system and the network side equipment that control device accesses
CN102282800A (en) Terminal authentication method and apparatus
CN108243059B (en) Network management centralized management method and server
CN115134800A (en) 5G private network access method, private network gateway, 5GC system and storage medium

Legal Events

Date Code Title Description
AS Assignment

Owner name: HUAWEI TECHNOLOGIES CO., LTD., CHINA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:CHEN, MANNA;REEL/FRAME:031204/0971

Effective date: 20130710

STCF Information on status: patent grant

Free format text: PATENTED CASE

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551)

Year of fee payment: 4

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 8TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1552); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Year of fee payment: 8

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载