Patent ID: 8909787

Claim:
A method for allocating an address in an IP network, the method comprising: receiving, by a server, a request message from a client, wherein the client is connected to the server through at least one routing device, and the request message received by the server carries a device identifier of a preceding stage routing device; obtaining, by the server, according to the device identifier of the preceding stage routing device, a first address prefix pool that is pre-allocated to the preceding stage routing device, allocating a second address prefix pool to the client according to the first address prefix pool, wherein an address range corresponding to the second address prefix pool falls within an address range corresponding to the first address prefix pool; and sending, by the server, the second address prefix pool to the client; wherein corresponding relationships among the device identifier of the preceding stage routing device, the first address prefix pool, a client identifier, and the second address prefix pool are saved on the server; and the server queries, according to the device identifier of the preceding stage routing device, the corresponding relationships to obtain the first address prefix pool of the preceding stage routing device, allocates the second address prefix pool to the client according to the first address prefix pool of the preceding stage routing device, and associates a client identifier carried in the request message with the second address prefix pool.