Manually Configuring an IPv4 Address
A version of this page is also available for
Although automatic address assignment by using DHCP is the preference, you can configure the address of a Windows Embedded CE IPv4 device manually by assigning the appropriate values in the registry for the IP address, subnet mask, default gateway, and DNS servers.
Dynamic Host Configuration Protocol (DHCP) and Windows Internet Name Service (WINS) servers are not used.
The following list shows the ways in which you can change the registry settings:
- Typically, to create a run-time image with predefined settings, add registry settings to the projects file before building the run-time image. **
- If the OEM provides Network user interface (UI), you can manually configure the IPv4 address by using the Network UI.
When you select an IPv4 address for the devices on your network, be sure that each address is unique, and that the addresses are in appropriate subnets. If you do not have an IPv4 address assigned to you, contact your network administrator.
If you plan to statically configure your adapter with an IPv4 address, you must also set the EnableDHCP registry key to zero (0). This setting is the default setting for Windows Embedded CE.
Also, to enter information into the projects file, you must first convert the addresses to hexadecimal. For example, if the address is 10.0.3.2, you would type "Ipaddr"=hex:0a,00,03,02
The following example shows the information that you would type in the Project.reg file to manually configure an IPv4 address:
;Manually configure an IPv4 Address [HKEY_LOCAL_MACHINE\Comm\<Adapter Name>\Parms\Tcpip] "DefaultGateway"=REG_MULTI_SZ:<IP address of the default gateway> "EnableDhcp"=REG_DWORD:0 "DNS"=REG_MULTI_SZ:<IP address of the DNS name server>. "Domain"=REG_SZ:<the domain name that is used by the network to which the device is connected> "IPAddress"=REG_MULTI_SZ:<IP address of the device> "SubnetMask"=REG_MULTI_SZ:<the subnet masks to be used with the IP interfaces bound to the adapter>.