Partager via


DHCP Allocator Operation

When the gateway that contains the DHCP allocator starts, it sends out a DHCP discover packet to determine if another DHCP server is present. If one exists, ICS turns off the gateway DHCP services. If another DHCP server does not exist, then the gateway monitors the network, and ICS turns off the gateway's DHCP services if another DHCP server becomes available.

DHCP can automatically assign addresses for the network, including default gateway and DNS server information. This approach assumes that the DHCP allocation is performed from the gateway device, so that the gateway can advertise itself to DHCP clients as both the default gateway and as the DNS server to the Internet. To detect DHCP requests from clients on the network, the DHCP allocator monitors UDP port 67 of the local-area interface of the gateway device.

Using client's hardware address as a seed, the allocator pseudo-randomly assigns addresses to clients from a range of addresses, called an address pool. The address pool is defined by the IP address and subnet mask of the network interface on which the allocator runs. It makes the address assignments for short, configurable periods of time to avoid collisions that arise when devices are not operating. The default period for address assignment is ten minutes. Each address assignment carries the address of the DHCP allocator as both the default gateway and the DNS server. To ensure that no address conflicts exist, the DHCP allocator defends each address using Address Resolution Protocol (ARP).

Assigned addresses are stored in the Address subkeys under the HKEY_LOCAL_MACHINE\Comm\ConnectionSharing\Addresses registry key.

Note   If you change addresses in the DHCP allocator's address pool, you must also reset the Point-to-Point (PPP) server address pool to keep it synchronized.

Note   Do not use Automatic IP to obtain an address for the private network interface of the gateway computer.

For more information about the Address subkeys, see Machine Name to IP Address Maps and Internet Connection Sharing Registry Settings.

Note   Using the DHCP allocator works well when all machines on the network have broadcast access to the gateway. If the configuration of the network includes multiple routed segments, then you must use a full DHCP server with a database. This is because a broadcast-based defense is not an adequate means of ensuring the uniqueness of assigned addresses for multiple routed segments, and not all devices on the network have broadcast access to the DHCP server. Furthermore, multiple routed segments require the configuration of multiple DHCP scopes to ensure that separate subnets are used on each segment, as well as the configuration of DHCP relay agents to relay DHCP requests to the DHCP allocator.

Response to Messages

The following table shows the messages received by the DHCP allocator, the reason the client sent the message, and the action the allocator takes in response to each message.

Message Reason sent Description
DHCPDISCOVER To obtain an offer from the allocator. Generates an address using a pseudo-random hashing scheme, subject to conflict-detection, and then replies to the client with a DHCPOFFER message.
DHCPREQUEST To request a previously offered address, or extend a lease on a previously assigned address. If no conflict is detected, the allocator generates a DHCPACK message.
DHCPDECLINE Address conflict detected. No action other than to log an event or update its statistics.
DHCPRELEASE Address relinquished. No action.
DHCPINFORM To obtain options information from the allocator without acquiring an address. Responds with a DHCPACK message that contains the default gateway, the DNS proxy address, both, or neither, depending upon the configuration of the allocator.

See Also

DHCP Allocator

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.