Freigeben über


DHCPv6 - Understanding of address configuration in automatic mode and installation of DHCPv6 Server

Understanding of address configuration in automatic mode

 

 

Windows Server 2008 and Windows Vista include a DHCPv6-capable DHCP client that will perform stateful address autoconfiguration with a DHCPv6 server. Windows Server 2008 includes a DHCPv6-capable DHCP server.

A host (DHCP Client) can configure itself with an IPv6 address to be used on the network. Address

configuration can be performed in a stateful or a stateless mode. A host can use both stateless and stateful address configuration completely independent of each other. The router advertisement messages with the appropriate flags set would indicate the precise method to be used. However the host (DHCP Client) can also be configured by manual means. The latter is seldom an occurrence in a well managed network.

Stateless Address Configuration

 The stateless mechanism allows a host to generate its own addresses using a combination of locally available information and information advertised by routers. The stateless approach is used when a site is not particularly concerned with the exact addresses hosts use, so long as they are unique and properly routable. 

Stateless Address Autoconfiguration is used to configure both link-local addresses and additional non-link-local addresses by exchanging Router Solicitation and Router Advertisement messages with neighboring routers.

Following are the two approaches with which IPv6 node can configure its address in a stateless fashion:

· Using automatic address configuration with prefix discovery: This is based on RFC2462. If the ‘autonomous’ flag of a Prefix Information Option contained in a router advertisement is set, the IPv6 host may automatically generate its global IPv6 address by appending its 64-bit interface identifier to the prefix contained in the router advertisement.

· Stateless DHCPv6: This is not mentioned as an option given in router advertisements [RFC2461].

Stateful Address Configuration

In the stateful address auto-configuration model, hosts obtain interface addresses and/or configuration information and parameters from a server. The stateful approach is used when a site requires tighter control over exact address assignments.

Stateful Address Autoconfiguration is used to configure non-link-local addresses through the use of a configuration protocol such as DHCP.

As far as the IPv6 host is concerned, using stateful DHCPv6 is little different to using stateless

DHCPv6 as the observed request/response times should be the same in most cases. However, it is possible that the extra overhead of reading and writing state to memory inside the DHCPv6 server may lead to a small increase in latency when compared to its stateless equivalent. This may be important for the configuration time of mobile nodes, which must perform address configuration when moving into a new network.

Delegating a prefix to an entire site is commonly a stateful operation, as the service provider routing scheme must always know where a site topologically resides, a packet targeted to a site must be routed back to the site. DHCPv6 server typically stores the DHCPv6 delegated prefix.

IPv6 host behaviour

An IPv6 host performs stateless address autoconfiguration automatically and uses a configuration protocol such as DHCPv6 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 host 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 host to use a configuration protocol to obtain other configuration settings.

Combining the values of the M and O flags can yield the following:

Both M and O Flags are Set to 0. This combination corresponds to a network without a DHCPv6 infrastructure. Hosts use router advertisements for non-link-local addresses and other methods (such as manual configuration) to configure other settings.

Both M and O Flags are Set to 1. DHCPv6 is used for both addresses and other configuration settings. This combination is known as DHCPv6 stateful, in which DHCPv6 is assigning stateful addresses to IPv6 hosts.

The M Flag is Set to 0 and the O Flag is Set to 1. DHCPv6 is not used to assign addresses, only to assign other configuration settings. Neighboring routers are configured to advertise non-link-local address prefixes from which IPv6 hosts derive stateless addresses. This combination is known as

DHCPv6 stateless: DHCPv6 is not assigning stateful addresses to IPv6 hosts, but stateless configuration settings.

The M Flag is Set to 1 and the O Flag is Set to 0. In this combination, DHCPv6 is used for address configuration but not for other settings. Because IPv6 hosts typically need to be configured with other settings, such as the IPv6 addresses of Domain Name System (DNS) servers, this is an unlikely combination.

Like DHCP for IPv4, the components of a 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.

 

Installation of DHCP Server

In the installation of DHCP Server using the role installation in the Server Manager, following is specific details with regard to IPv6 configuration during the role installation:

Behavior - 1

In case, “Enable DHCPv6 stateless mode for this server” option was selected during role installation

It would have asked for Parent Domain and IPv6 DNS Server (primary – mandatory and secondary – optional) information.

Therefore, in the post installation phase following Server Options under IPv6 node in the DHCP MMC will be with the configured values:

- 00023 DNS Recursive Name Server IPv6 Address List

- 00024 Domain Search List

 

Behavior - 2

In case, “Disable DHCPv6 stateless mode for this server” option was selected during role installation

It would NOT have asked for Parent Domain and IPv6 DNS Server (primary – mandatory and secondary – optional) information at all as that page in wizard will be hidden.

Therefore, in the post installation phase if you do not see Server Options under IPv6 node in the DHCP MMC.

In this case, this means the DHCPv6 Stateless mode is NOT configured on the DHCP Server.

However, in this stage if Admin wants to configure DHCP Server as stateless mode, he needs to configure the above mentioned Server Options explicitly.

 

Following are the options that can be configured at the IPv6 Scope Level and/or the IPv6 Server Level

Server Options

Description

00021 SIP Server Domain Name List

This option specifies a list of the domain names of the SIP outbound proxy servers for the client to use.

00022 SIP Servers IPv6 Address List

This option specifies a list of IPv6 addresses indicating SIP outbound proxy servers available to the client. Servers MUST be listed in order of preference.

00023 DNS Recursive Name Server IPv6 Address

The DNS Recursive Name Server option carries a list of IPv6 addresses of RDNSSes to which the host may send DNS queries. The DNS servers are listed in the order of preference for use by the DNS resolver on the host.

00024 Domain Search List

The Domain Search List option specifies the domain search list the client is to use when resolving hostnames with DNS. This option does not apply to other name resolution mechanisms.

00027 NIS IPv6 Address List

This option specifies a list of IPv6 addresses indicating Network Information Services (NIS) Servers available to the client. Clients MUST treat the list of NIS servers as an ordered list. The server MAY list the NIS servers in the order of preference.

00028 NIS + IPv6 Address List

This option specifies a list of IPv6 addresses indicating Network Information Services v2 (NIS +) Servers available to the client. Clients MUST treat the list of NIS+ servers as an ordered list. The server MAY list the NIS+ servers in the order of preference.

00029 NIS Domain List

The Network Information Service (NIS) Domain Name List is used by the server to convey client's list of NIS Domain Name info to the client.

00030 NIS + Domain Name List

The Network Information Service v2 (NIS+) Domain Name List is used by the server to convey client's list of NIS+ Domain Name info to the client.

00031 SNTP Servers IPv6 Address List

Simple Network Time Protocol (SNTP) servers option provides a list of one or more IPv6 addresses of SNTP [3] servers available to the client for synchronization.

Comments

  • Anonymous
    January 01, 2003
    Hi argon The command is add route ::/0 Local <router address> publish=yes where <router address> is address of your DHCP/Router Try using 10:18:1::10 ? Just make sure that it is the correct v6 address of your router. Thanks Arun DHCP team

  • Anonymous
    January 01, 2003
    PingBack from http://feeds.bscopes.com/2009/03/15/blog-microsoft-windows-dhcp-team-blog/

  • Anonymous
    January 01, 2003
    Hi Simon Rho The requested prefix can be released by invoking call to Dhcpv6ReleasePrefix() Api. Please refer to following link for more information on usgae of api : http://msdn.microsoft.com/en-us/library/aa363323(VS.85).aspx. A subsequent call to Dhcpv6RequestPrefix() call makes win7 client to request prefix all over again. Alternatively, a new prefix can be requested (with previously requested prefix still retained)by invoking call to Dhcpv6RequestPrefix Api, with a different value of iaid. Ravi

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    Please, help. We need to solve this problem. Even on Russian TechNet Forum nobody knows the solution. DHCP Team, you are the last chance.

  • Anonymous
    January 01, 2003
    Dear DHCP team, How can i advertise default router to clients, if DHCPv6 and IPv6 router in the same WS2008 OS? I've tried netsh int ipv6 set int Local adv=en add route ::/0 Local fc00:10:18:1::10 publish=yes where 10:18:1::10 address of DHCP/Router but clients get this route "::/0 on-link" ("::" in ipconfig). So default route links to whole Network Interface instead of router address. If i set clinet route manually, all is ok. Please help me to properly advertise WS2008 IPv6 router.

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    Hi Arun I have. I've looked through this blog several times. I can't work out what Argon refers to as the command: int ipv6 local other=en ...and how to disable or enable it. Thanks

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    Thank you very much for explanations! Hope all the info published above will be available on technet library. Kind regards and best wishes, Igor Romanovsky MCITP: EA. VA; MCSA

  • Anonymous
    January 01, 2003
    dvtestlab, yes of course. Dear DHCP Team, i need to advertise cutom ipv6 route to remote network. When i advertise this route directly from additional roter, clients get this route fine and routing works. But this additional router conflicts with my main DHCPv6 server, clients stop getting IPs and settings from it. I've disabled this additional router adv, and considered to advertise the route to remote netork from my main router add route fc00:10:18:1::/64 local <link-local address of router> publish=yes routing on the DHCP serer works now, but clients don't get this fc00:10:18:1::/64 route. Where i'm wrong?

  • Anonymous
    January 01, 2003
    Dir Administrator, I'm try to use Stateful Address Configuration in widnwso 2008 ,as you mention as below "Using automatic address configuration with prefix discovery: This is based on RFC2462. If the ‘autonomous’ flag of a Prefix Information Option contained in a router advertisement is set, the IPv6 host may automatically generate its global IPv6 address by appending its 64-bit interface identifier to the prefix contained in the router advertisement. " but I can't see any Prefix Information in RA can ? can I assign a prefix to RA and use it under Stateful Address Configuration

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    Hi Dave, Seems like you are trying something similar to what Argon wanted. Try looking at above comments (Aug 24  onwards) and see if it helps you. Thanks, Arun DHCP team

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    So after some more digging ... Clients identify routers by their link-local addresses (Router Advertisements are always sourced from the router’s link-local address for that interface).  See RFC 4861, section 4.2 and section 6.3.4. So if you are asking how to advertise a non-link-local address as the address of a default router, the answer is you can’t. Ideally you shouldn't need to either, coz your router would be on the same link, and link-local should work fine. Thanks Arun DHCP Team

  • Anonymous
    January 01, 2003
    Hi Glen, DHCPV6CAPI_CLASSID is not a required parameter for Dhcpv6RequestPrefix. What I see missing from below code, during second invocation of call is setting of nPrefixes field of DHCPV6PrefixLeaseInformation structure: pPrefixInfo->nPrefixes = iNumPrefixes; When pPrefixInfo->prefixArray is initialized, the nPrefixes field should be set to number of prefixes requested. The Api call should pass, after above addition to your code. Regards Ravi

  • Anonymous
    January 01, 2003
    Hi Norman, IPv6 Stateless Address Autoconfiguration specified in RFC 2462, is yet another way in which ipv6 address is acquired by network elements.Stateful address assignment is done through a Dhcp Server. It is very much possible that Clients can have addresses acquired using both the modes. The Router prefix can be advertised in RA's from Windows machine,by running following netsh commands from elevated prompt: Netsh interface ipv6 add route <ipv6prefix>::/<prefixlength> <server_interface > publish=yes netsh interface ipv6 set interface < server_interface > adv=en managed=en other=en on server. Ravi

  • Anonymous
    January 01, 2003
    Suvajit, prefix delegation is not supported by Windows DHCPv6 server.

  • Anonymous
    January 01, 2003
    Dear DHCP team, please don't disappear.

  • Anonymous
    January 01, 2003
    Yes, you did it i've configured netsh int ipv6 add route ::/0 <interfaceid> <nexthopaddress> publish=yes which goes to virtual but valid ipv6 address on another NIC. Now Clients got default router, but with link-local fe80::... adrees instead of assigned. Routing works now, but how to assign configured default router adress instead of auto-generated link local?

  • Anonymous
    January 01, 2003
    I need to advertise "default router", routable prefix works fine. Please, read my previous posts anf try to understand the problem. Kind regards, Argon MCITP: EA, VA; MCSA

  • Anonymous
    January 01, 2003
    Don't know if my last message was submitted correctly... Again...


fc00:10:18:1::10 was an example, real address of router is  fc00:10:0:18::10. on server:

netsh interface ipv6>show route Publish  Type      Met  Prefix                    Idx  Gateway/Interface Name -------  --------  ---  ------------------------  ---  ------------------------ Yes      Manual    256  ::/0                       10  Local1 No       Manual    256  ::1/128                     1  Loopback Pseudo-Interface 1 Yes      Manual    256  fc00:10:0:18::/64          10  Local1 ... >route print ... Active Routes: If Metric Network Destination      Gateway 10    261 ::/0                     On-link  1    306 ::1/128                  On-link 10    261 fc00:10:0:18::/64        On-link ... on client:

So, clients get On-Link route (to ip 0.0.0.0 with  mask 0.0.0.0 in terms of IPv4), and don't get route to 10:0:18::10

  • Anonymous
    January 01, 2003
    thanks

  • Anonymous
    January 01, 2003
    On my additional router (WS2008R2 with RaRAS role only) i've find what int ipv6 local other=en option was set. Disabled it, enable adv again, now all is seems to be fine.

  • Anonymous
    January 01, 2003
    Hi Argon If I get your query right, your requirement is to advertise Ipv6 Router from WS2008 machine, so that the ipv6 address obtained from Dhcp Server is routable. In that case, the ipv6 prefix needs to be advertised from the WS2008 machine. Please run below netsh commands and let us know, if it works : netsh int ipv6 set int Local adv=en add route <ipv6_prefix>/64  Local publish=yes Note : Replace <ipv6_prefix> with 64-bit prefix of Ipv6 router / ipv6 prefix configured on Dhcp Server Ravi DHCP team

  • Anonymous
    February 24, 2010
    The comment has been removed

  • Anonymous
    June 09, 2010
    Hello teamdhcp, I'm trying to use the Dhcpv6RequestPrefix() api on Windows 7 Ultimate to request a prefix from the DHCPv6 server. The first call to this api returns ERROR_MORE_DATA as expected because the first call does not provide memory for the prefixes and the serverid. After following the instructions from the MSDN documentation - "The caller must follow these considerations when assigning the values of the nPrefixes, iaid, and ServerIdLen members of the DHCPV6PrefixLeaseInformation structure. Based on these values, memory must also be properly allocated to the ServerId and PrefixArray members before the Dhcpv6RequestPrefix function is called." The subsequent call to Dhcpv6RequestPrefix() returns ERROR_INVALID_PARAMETER. MSDN states - "Returned if one of the following conditions are true: AdapterName is NULL. prefixleaseInfo is NULL. pdwTimeToWait is NULL. The iaid member of the prefixleaseInfo is zero." I have verified that the adaptername is not NULL. Memory for prefixleaseInfo is allocated(i.e. not NULL). pdwTimeToWait is not NULL.  iaid is not zero. Please see code snippet below.  Is there something I missed?  Is DHCPV6CAPI_CLASSID a required parameter? I also verified that the DHCPv6 client and DHCPv6 server have completed the prefix request change. i.e. the packet trace shows DHCPv6 Solicit, Advertise, Request, Reply Any help is appreciated. -glen --- Start Code Snippet ---- DWORD dwError, dwTimeout = 0xFFFFFFFF; int dw, iNumPrefixes = 1; DWORD dwServerIdLen = 128; WCHAR wszAdapter[260]; WCHAR wszDescription[512]; PDHCPV6PrefixLeaseInformation pPrefixInfo = NULL; pPrefixInfo = (PDHCPV6PrefixLeaseInformation)malloc(sizeof(DHCPV6PrefixLeaseInformation)); memset(pPrefixInfo, 0, sizeof(DHCPV6PrefixLeaseInformation)); pPrefixInfo->iaid = 1; CString strTemp; strTemp = pApp->m_pAdapterInfo[i].szMacDeviceID; dw = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, strTemp, -1, wszAdapter, 0); MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, strTemp, -1, wszAdapter, dw); strTemp = pApp->m_pAdapterInfo[i].szDescription; dw = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, strTemp, -1, wszDescription, 0); MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, strTemp, -1, wszDescription, dw); dwError = Dhcpv6RequestPrefix(wszAdapter, NULL, // no class id pPrefixInfo, &dwTimeout); if(dwError == ERROR_MORE_DATA){ // The value of the nPrefixes or the ServerIdLen member specified // is less than the number of prefixes available from the server // or the available server ID length. Increase the nPrefixes or        // the ServerIdLen member and make sure the corresponding memory // has been allocated properly before calling the Dhcpv6RequestPrefix // function again. iNumPrefixes = 1; pPrefixInfo->prefixArray = (LPDHCPV6Prefix)malloc(iNumPrefixessizeof(DHCPV6Prefix)); memset(pPrefixInfo->prefixArray, 0, iNumPrefixessizeof(DHCPV6Prefix)); pPrefixInfo->ServerId = (LPBYTE)malloc(dwServerIdLen); memset(pPrefixInfo->ServerId, 0, dwServerIdLen); pPrefixInfo->ServerIdLen = dwServerIdLen; dwError =Dhcpv6RequestPrefix(wszAdapter, NULL, // no class id pPrefixInfo, &dwTimeout); } if(pPrefixInfo->prefixArray) free(pPrefixInfo->prefixArray); if(pPrefixInfo->ServerId) free(pPrefixInfo->ServerId); if(pPrefixInfo) free(pPrefixInfo);; --- End Code snippet ---

  • Anonymous
    June 14, 2010
    Hello Ravi, Thank you for the quick reply. I tried your suggestion above - added pPrefixInfo->nPrefixes=iNumPrefixes but I still got a ERROR_INVALID_PARAMETER return code after the second call to DHCPV6RequestPrefix() Below is the content of the DHCPV6PrefixLeaseInformation structure copied from the debugger. pPrefixInfo = 0x03c720c0 {nPrefixes=1 prefixArray=0x03c72280 iaid=1 ...} nPrefixes = 1 prefixArray = 0x03c72280 {prefix=0x03c72280 "" prefixLength=0 preferredLifeTime=0 ...} iaid = 1 T1 = 0 T2 = 0 MaxLeaseExpirationTime = 60129542144 LastRenewalTime = 0 status = STATUS_NO_ERROR ServerId = 0x03c72cf0 "" ServerIdLen = 128 Is there anything else you can see that might cause the api to return ERROR_INVALID_PARAMETER? -glen

  • Anonymous
    September 20, 2010
    Is IPv4 & IPv6 supported on the same NIC on a windows 2008 server? I want to be able to connect NIC-2 to a ALU 7750 router so my client sare able to gte either v4/v6 off the same NIC-2 interface.

  • Anonymous
    October 26, 2010
    Hi DHCP team I'm trying to do the same with our W2008 SP2 srvr DHCPv6 in Stateful mode and a site-local address scheme. We have an IPv6 enabled Cisco but if we enable router advertisements on it the Cisco completely overrides the server DHCPv6 settings and acts as a DHCPv6 server in its own right. We've turned off RA on this device and want to advertise the defalt gateway from the W2008 server. To do this I've used the following command: > netsh interface ipv6 add route ::/0 "local area connection 2"  <link-local address of router> publish=yes It works on the server but does not advertise to the rest of the network. The server doesn't like the option advertisedefaultroute=enabled Can you advise please? Is there a better way of doing this? Thanks Dave

  • Anonymous
    August 10, 2014
    I need to configure my windows dhcpv6 server to send option 25, that is it will send prefix delegation to other router connected to it. How can I do that ?

  • Anonymous
    August 18, 2015
    The comment has been removed