Share via


Configuring the Gateway Registry

By default, your gateway image includes the correct features, but for security reasons, some features are disabled in the registry. Also, some device-specific registry settings are not configured. To finish configuring your gateway device, you must change the settings.

The following list shows how you can modify the device registry settings:

  • Modify the Project.reg file before building and downloading the image.
  • After downloading the image to the CEPC, use the Remote Registry Editor. Using the Remote Registry Editor changes the image registry, but the changes are not persistent to the registry files in Platform Builder. The next time you download the image, you must configure the registry again. For information about how to use the Remote Registry Editor, see Using the Remote Registry Editor with Gateway.

The following table shows the registry values that you must add.

Registry value Description
EnableAddressTranslation Enables Network Address Translation (NAT).
EnableDhcpAllocator Enables Dynamic Host Configuration Protocol (DHCP) allocator on the private network.
EnableDnsProxy Handles Domain Name System (DNS) requests from the private network.
PrivateInterface Interface name to use for the private network.
PublicInterface Interface name to use for the public network.
IPAddress Address for the private interface.
SubnetMask Private subnet address.
EnableDHCP Disables the DHCP for the private network.
DhcpMaxRetry Defines the maximum number of attempts made to obtain a DHCP address. By setting this to a large value in headless devices, the DHCP client is more persistent and may recover after a temporary network outage.

A typical gateway bridges a public, or external, network and a private, or internal, network. The external network can be the Internet or a corporate intranet. The gateway requires two distinct network interfaces in the device. Each interface must be configured with an IP address and with other networking parameters.

The public interface IP address can be statically configured with an IP address and subnet, or dynamically configured using a DHCP client to retrieve the settings from the external network. The Internet or intranet service provider determines the process.

The private interface on the gateway is configured to allocate addresses to devices on the internal network by acting as a DHCP server to those clients. This configuration allows the gateway to provide appropriate IP addresses, subnet masks, and default information to the internal clients. This configuration also allows the clients to self-configure and then to navigate to the external network.

In the following procedure modifying the project registry file makes a persistent change to the image.

To modify the Project.reg file

  1. From the Workspace window, choose the ParameterView tab at the bottom of the window.

  2. Expand the <Platform Name> parameters node and navigate to the %_WINCEROOT%\CEPC\Project Specific Files folder.

  3. Double click on project.reg to open the file.

  4. Add the following registry key and values:

    [HKEY_LOCAL_MACHINE\Comm\ConnectionSharing]
    "EnableAddressTranslation"=dword:1
    "EnableDhcpAllocator"=dword:1
    "EnableDnsProxy"=dword:1
    "PublicInterface"="<Public Interface Name>"
    "PrivateInterface"="<Private Interface Name>"
    

    The <Private Interface Name> and <Public Interface Name> interface names depend on the network cards that you are using. The following table shows some of the supported network cards and the interface names for each card.

    Network card Interface name
    NE2000 compatible PCI card PCI\NE2000x
    NE2000 compatible ISA card NE2000x
    RealTek RTL8139 PCI card** PCI\RTL8139x
    National Semiconductor DP83815** DP83815x
    Intel DEC 211x4** DC21X4x
    Microsoft Virtual Miniport driver VMINIx

    **The non-Microsoft software and hardware referenced in these documents are included for illustrative purposes only. Illustrations that use such third-party software and hardware as examples are not intended to be an endorsement or recommendation of any of these products. We provide this information only as a convenience for our customers for purposes of explaining a practical application and do not provide warranties of any kind, whether express, implied, or statutory, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    The x is a placeholder for a whole number that Windows CE appends to the interface name depending on how many of each type of network card you have in the device. For example, if you have three NE2000 compatible PCI cards, your interface names are PCI\NE20001, PCI\NE20002, and PCI\NE20003.

    Note   Interface or adapter names are a common source of errors when creating a platform. To verify the interface or adapter names and the IP addresses for these adapters on your device after downloading the image, type s ipconfig /d /all in the Target Control window of Platform Builder. The Debug output window displays the IP address of the device and shows the interface or adapter names. For more information, see Testing the Gateway.

    If you are using two NE2000 compatible PCI network cards and the VMINI driver, use the following registry entries to finish configuring your device registry. In this example, you are using the VMINI adapter for the public interface and PCI\NE20001 for the private interface. You are also assigning a static IP address of 192.168.0.1 to the private interface.

    Note   The static IP address of 192.168.0.1 is also used in the Firewall rules as the default for the SourcePrivate registry value. If you want to use a different static address for the private interface, you must change the SourcePrivate registry value to match this address. For more information, see Default IP Firewall Rules.

    [HKEY_LOCAL_MACHINE\Comm\ConnectionSharing]
    "EnableAddressTranslation"=dword:1
    "EnableDhcpAllocator"=dword:1
    "EnableDnsProxy"=dword:1
    "PublicInterface"="VMINI1"
    "PrivateInterface"="PCI\\NE20001"
    [HKEY_LOCAL_MACHINE\Comm\PCI\NE20001\Parms\Tcpip]
    "IPAddress"="192.168.0.1"
    "SubnetMask"="255.255.255.0"
    "EnableDHCP"=dword:0
    "DhcpMaxRetry"=dword:"0xfffffffff"
    
  5. Save and then close the file.

Next, you have to build the OS image. See Building a Platform.

See Also

Customizing the Gateway | How to Create a Gateway | Creating a Gateway OS Image for a CEPC

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.