The availability of a DHCP server doesn’t affect startup or logon (in most cases). DHCPv4 clients can start and users can log on to the local computer even if a DHCP server isn’t available. During startup, the DHCPv4 client looks for a DHCP server. If a DHCP server is available, the client gets its configuration information from the server.
If a DHCP server isn’t available and the client’s previous lease is still valid, the client pings the default gateway listed in the lease. A successful ping tells the client that it’s probably on the same network it was on when it was issued the lease, and the client continues to use the lease as described previously. A failed ping tells the client that it might be on a different network. In this case, the client uses IPv4 autoconfiguration. The client also uses IPv4 autoconfiguration if a DHCP server isn’t available and the previous lease has expired.
IPv4 autoconfiguration works like this:
1.The client computer selects an IP address from the Microsoft-reserved class B subnet 169.254.0.0 and uses the subnet mask 255.255.0.0. Before using the IPv4 address, the client performs an Address Resolution Protocol (ARP) test to be sure that no other client is using this IPv4 address.
2.If the IPv4 address is in use, the client repeats step 1, testing up to 10 IPv4 addresses before reporting failure. When a client is disconnected from the network, the ARP test always succeeds. As a result, the client uses the first IPv4 address it selects.
3.If the IPv4 address is available, the client configures the NIC with this address. The client then attempts to contact a DHCP server, sending out a broadcast every five minutes to the network. When the client successfully contacts a server, the client obtains a lease and reconfigures the network interface.
As part of your planning, you need to consider how many DHCP servers should be installed on the network. Typically, you’ll want to install at least two DHCP servers on each physical network segment. Windows Server 2012 R2 includes DHCP failover for IPv4. DHCP failover enables high availability of DHCP services by synchronizing IPv4 address leases between two DHCP servers in one of two modes:
■ Load BalanceWhen you load balance the servers, you specify the percentage of the load each server should handle. Typically, you use a 50/50 approach to make each server equally share the load. You also could use other approaches, such as 60/40 to make one server carry 60 percent of the load and the other 40 percent of the load.
■ Hot StandbyWith hot standby, one of the servers acts as the primary server and handles the DHCP services. The other acts as a standby server in case the primary fails or runs out of addresses to lease. A specific percentage of available IP addresses are reserved for the hot standby-5 percent by default.
The configuration of DHCP failover is simple and straightforward, and it does not require clustering or any advanced configuration. To configure DHCP failover, all you need to do is complete the following steps:
1.Install and configure two DHCP servers. The servers should be on the same physical network.
2.Create a DHCPv4 scope on one of the servers. Scopes are pools of IPv4 or IPv6 addresses you can assign to clients through leases.
3.When you establish the other server as a failover partner for the DHCPv4 scope, the scope is replicated to the partner.
Using dynamic IPv6 addressing and configuration
Both IPv4 and IPv6 are enabled by default when networking hardware is detected during installation. As discussed in Chapter 7, “Managing TCP/IP networking,” IPv4 is the primary version of IP used on most networks, and IPv6 is the next generation version of IP. IPv6 uses 128-bit addresses. In a standard configuration, the first 64 bits represent the network ID, and the last 64 bits represent the network interface on the client computer.
You can use DHCP to configure IPv6 addressing in two key ways:
■ DHCPv6 stateful modeIn DHCPv6 stateful mode, a client acquires its IPv6 address in addition to its network configuration parameters through DHCPv6.
■ DHCPv6 stateless modeIn DHCPv6 stateless mode, a client uses autoconfiguration to acquire its IP address and acquires its network configuration parameters through DHCPv6.
A computer that uses dynamic IPv6 addressing, configuration, or both mechanisms is called a DHCPv6 client . As with DHCPv4, the components of the DHCPv6 infrastructure consist of DHCPv6 clients that request configuration, DHCPv6 servers that provide configuration, and DHCPv6 relay agents that convey messages between clients and servers when clients are on subnets that do not have a DHCPv6 server.
Unlike in DHCPv4, you must also configure your IPv6 routers to support DHCPv6. A DHCPv6 client performs autoconfiguration based on the following flags in the Router Advertisement message sent by a neighboring router:
■Managed Address Configuration flag, which is also known as the M flag . When set to 1, this flag instructs the client to use a configuration protocol to obtain stateful addresses.
■Other Stateful Configuration flag, which is also known as the O flag . When set to 1, this flag instructs the client to use a configuration protocol to obtain other configuration settings.
Windows includes a DHCPv6 client. The DHCPv6 client attempts DHCPv6-based configuration depending on the values of the M and O flags in the Router Advertisement messages it receives. If there is more than one advertising router for a given subnet, the additional router or routers should be configured to advertise the same stateless address prefixes and the same values for the M and O flags. All current Windows desktop and server operating systems include IPv6 clients and, therefore, accept the values of the M and O flags in router advertisements they receive.
You can configure an IPv6 router to set the M flag to 1 in router advertisements by entering the following command at an elevated command prompt, where InterfaceName is the actual name of the interface:
netsh interface ipv6 set interface InterfaceName managedaddress=enabled
Similarly, you can set the O flag to 1 in router advertisements by entering the following command at an elevated command prompt:
netsh interface ipv6 set interface InterfaceName otherstateful=enabled
If the interface name contains spaces, enclose the related value in quotation marks, as shown in the following example:
netsh interface ipv6 set interface "Wired Ethernet Connection 2" managedaddress=enabled
Keep the following in mind when you are working with the M and O flags:
■If the M and O flags are both set to 0, the network is considered not to have DHCPv6 infrastructure. Clients use router advertisements for non-link-local addresses and manual configuration to configure other settings.
■If the M and O flags are both set to 1, DHCPv6 is used for both IP addressing and other configuration settings. This combination is known as DHCPv6 stateful mode , in which DHCPv6 assigns stateful addresses to IPv6 clients.
■If the M flag is set to 0 and the O flag is set to 1, DHCPv6 is used only to assign other configuration settings. Neighboring routers are configured to advertise non-link-local address prefixes from which IPv6 clients derive stateless addresses. This combination is known as DHCPv6 stateless mode .
■If the M flag is set to 1 and the O flag is set to 0, DHCPv6 is used for IP address configuration but not for other settings. Because IPv6 clients typically need to be configured with other settings, such as the IPv6 addresses of DNS servers, this combination typically is not used.
Читать дальше