摘要 |
<p>Embodiments of the present invention disclose a method, relay agent and system for acquiring an IP address in a network. According to the method, the relay agent configures multiple gateway IP addresses corresponding to a type of a client; the relay agent adds the multiple gateway IP addresses to a DHCP Discover packet of the client, and sends the DHCP Discover packet to a DHCP server, so that the DHCP server allocates an IP address to the client, and sends a DHCP Offer packet to the client after determining that one gateway IP address in the multiple gateway IP addresses belongs to a same network segment as the allocated IP address; and the relay agent adds, to a DHCP Request packet, the gateway IP address that is in the multiple gateway IP addresses and belongs to the same network segment as the IP address of the client, and sends the DHCP Request packet with the gateway IP address to the DHCP server, so that the DHCP server allocates the IP address to the client, thereby implementing that multiple IPs in different IP address segments are allocated to a same DHCP client type.</p> |