Document toolboxDocument toolbox

IP Address Allocation

When a DHCP client requests an IP address, the NIOS appliance draws an address from an address range associated with the network segment for that client. Because you define that range, you can thereby control the IP address (within the defined range) and the associated TCP/IP settings that the client receives.
In Figure 31.1, three hosts — each in a different subnet — request an IP address. Each one broadcasts a DHCPDISCOVER message, which includes its MAC address. When the router, which also functions as a DHCP relay agent, receives the message, it adds the IP address of the interface on which the message arrives and forwards the message to the DHCP server — or servers — previously configured on the router. When the NIOS appliance receives the message, it uses the ingress interface IP address of the router to determine the network segment to which the host belongs and associates the MAC address of the requesting host with an IP address from an address range for that network.

Figure 31.1 Requesting Addresses – DHCPDISCOVER Messages

The NIOS appliance replies to DHCPREQUEST messages by sending DHCPOFFER messages through the relay agent to the requesting hosts, as shown in Figure 31.2.

Figure 31.2 Requesting Addresses – DHCPOFFER Messages



The addressing scheme depicted in Figure 31.1 and Figure 31.2 is fairly simple: each network has a single address range. Consequently, address assignments are fairly straightforward. However, if you have multiple address ranges in the same network and you want to assign addresses from specific address ranges to specific hosts, you must screen the address assignments through the use of filters. If you do not apply a filter, the NIOS appliance assigns addresses from the highest address range to the lowest range and within each range from the highest address to the lowest address. That is, the appliance chooses the range with the highest addresses first (that is, closest to 255) and begins assigning addresses exclusively from that range, starting with the highest address and finishing with the lowest (closest to 0). When all the addresses from that range are in use, it then begins assigning addresses from the next highest range, and so on, finishing with the range with the lowest addresses. This is shown in Figure 31.3.


Note: After the DHCP server runs for a while, it assigns leases based on when it last used addresses, and not just on their positions in the range.



Figure 31.3 Multiple Address Ranges without Filters