Windows obtains dynamic IPv6 addresses by using a process similar to dynamic IPv4 addresses. Typically, IPv6 autoconfiguration for DHCPv6 clients in stateful mode works like this:
1.The client computer selects a link-local unicast IPv6 address. Before using the IPv6 address, the client performs an ARP test to make sure that no other client is using this IPv6 address.
2.If the IPv6 address is in use, the client repeats step 1. Keep in mind that when a client is disconnected from the network, the ARP test always succeeds. As a result, the client uses the first IPv6 address it selects.
3.If the IPv6 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.
This is not how IPv6 autoconfiguration works for DHCPv6 clients in stateless mode. In stateless mode, DHCPv6 clients configure both link-local addresses and additional non-link-local addresses by exchanging Router Solicitation and Router Advertisement messages with neighboring routers.
Like DHCPv4, DHCPv6 uses User Datagram Protocol (UDP) messages. DHCPv6 clients listen for DHCP messages on UDP port 546. DHCPv6 servers and relay agents listen for DHCPv6 messages on UDP port 547. The structure for DHCPv6 messages is much simpler than for DHCPv4, which had its origins in Bootstrap Protocol (BOOTP) to support diskless workstations.
DHCPv6 messages start with a 1-byte Msg-Type field that indicates the type of DHCPv6 message. This is followed by a 3-byte Transaction-ID field determined by a client and used to group together the messages of a DHCPv6 message exchange. Following the Transaction-ID field, DHCPv6 options are used to indicate client and server identification, addresses, and other configuration settings.
Three fields are associated with each DHCPv6 option. A 2-byte Option-Code field indicates a specific option. A 2-byte Option-Len field indicates the length of the Option-Data field in bytes. The Option-Data field contains the data for the option.
Messages exchanged between relay agents and servers use a different message structure to transfer additional information. A 1-byte Hop-Count field indicates the number of relay agents that have received the message. A receiving relay agent can discard the message if the message exceeds a configured maximum hop count. A 15-byte Link-Address field contains a non-link-local address that is assigned to an interface connected to the subnet on which the client is located. Based on the LinkAddress field, the server can determine the correct address scope from which to assign an address. A 15-byte Peer-Address field contains the IPv6 address of the client that originally sent the message or the previous relay agent that relayed the message. Following the Peer-Address field are DHCPv6 options. A key option is the Relay Message option. This option provides an encapsulation of the messages being exchanged between the client and the server.
IPv6 does not have broadcast addresses. The use of the limited broadcast address for some DHCPv4 messages has been replaced with the use of the All_DHCP_Relay_Agents_and_Servers address of FF02::1:2 for DHCPv6. A DHCPv6 client attempting to discover the location of the DHCPv6 server on the network sends a Solicit message from its link-local address to FF02::1:2. If there is a DHCPv6 server on the client’s subnet, it receives the Solicit message and sends an appropriate reply. If the client and server are on different subnets, a DHCPv6 relay agent on the client’s subnet that receives the Solicit message forwards it to a DHCPv6 server.
Checking IP address assignment
You can use ipconfig to check the currently assigned IP address and other configuration information. To obtain information for all network adapters on the computer, enter the command ipconfig /allat the command prompt. If the IP address has been assigned automatically, you’ll notice an entry for Autoconfiguration IP Address.
In the following example, the autoconfiguration IPv4 address is 169.254.98.59:
Windows IP Configuration
Host Name…: DELTA
Primary DNS Suffix…: microsoft.com Node Type…: Hybrid
IP Routing Enabled…: No
WINS Proxy Enabled…: No
DNS Suffix Search List…: microsoft.com Ethernet adapter Ethernet:
Connection-specific DNS Suffix…:
Description…: Intel Pro/1000 Network Connection Physical Address…: 23-15-C6-F8-FD-67
DHCP Enabled…: Yes
Autoconfiguration Enabled…: Yes Autoconfiguration IP Address: 169.254.98.59 Subnet Mask…: 255.255.0.0
Default Gateway…:
DNS Servers…:
Scopes are pools of IPv4 or IPv6 addresses you can assign to clients through leases. DHCP also provides a way to permanently assign a lease on an address. To do this, you need to create a reservation by specifying the IPv4 address to reserve and the media access control (MAC) address of the computer that will hold the IPv4 address. The reservation thereafter ensures that the client computer with the specified MAC address always gets the designated IPv4 address. With IPv6, you can specify that a lease is temporary or nontemporary. A nontemporary lease is similar to a reservation.
You create scopes to specify IP address ranges that are available for DHCP clients. For example, you could assign the IP address range 192.168.12.2 to 192.168.12.250 to a scope called Enterprise Primary. Scopes can use public or private IPv4 addresses on the following networks:
■ Class A networksIP addresses from 1.0.0.0 to 126.255.255.255
■ Class B networksIP addresses from 128.0.0.0 to 191.255.255.255
■ Class C networksIP addresses from 192.0.0.0 to 223.255.255.255
■ Class D networksIP addresses from 224.0.0.0 to 239.255.255.255
NOTE The IP address 127.0.0.1 is used for local loopback (and so are any other IP addresses in the 127.x.y.z address range).
Scopes can also use link-local unicast, global unicast, and multicast IPv6 addresses. Link-local unicast addresses begin with FE80. Multicast IPv6 addresses begin with FF00. Global (site-local) unicast addresses include all other addresses except:: (unspecified) and::1 (loopback) addresses.
A single DHCP server can manage multiple scopes. With IPv4 addresses, four types of scopes are available:
■ Normal scopesUsed to assign IPv4 address pools for class A, B, and C networks.
■ Multicast scopesUsed to assign IP address pools for IPv4 class D networks. Computers use multicast IP addresses as secondary IP addresses in addition to a standard IP address.
■ SuperscopesContainers for other scopes that are used to simplify management of multiple scopes and also support DHCP clients on a single physical network where multiple logical IP networks are used.
■ Failover scopesScopes split between two DHCP servers to increase fault tolerance, provide redundancy, and enable load balancing.
With IPv6, only normal scopes are available. Although you can create scopes on multiple network segments, you’ll usually want these segments to be in the same network class, such as all IP addresses that are class C.
TIP Don’t forget that you must configure DHCPv4 and DHCPv6 relays to relay DHCPv4 and DHCPv6 broadcast requests between network segments. You can configure relay agents with the Routing and Remote Access Service (RRAS) and the DhCP Relay Agent Service. You can also configure some routers as relay agents. These services can be installed as part of the Remote Access role. On a server with no other policy and access role services configured, you can install the Remote Access role by using the Add Roles And Features Wizard.
Читать дальше