Microsoft KB Archive/309642

= How to Configure a Static Client for Windows XP Internet Connection Sharing =

Article ID: 309642

Article Last Modified on 8/6/2002

-

APPLIES TO


 * Microsoft Windows XP Professional Edition
 * Microsoft Windows XP Home Edition

-



This article was previously published under Q309642



SUMMARY
This article describes how to configure a static client for Internet Connection Sharing (ICS). Windows XP ICS automatically configures internal clients so that they can access the Internet by using ICS. However, you may need to configure a host, such as a server, statically rather than allowing the host to be configured dynamically. To properly configure the host with static settings, you must provide the host with IP address and host name resolution information. Also, you must configure the ICS host (the Windows XP-based computer that is running ICS) with the name of the client so that name resolution can function properly.



MORE INFORMATION
To configure a static client on the ICS private network, you use the following general steps:
 * Add a valid ICS private IP address to the client.
 * Configure the default gateway to be 192.168.0.1.
 * Configure the preferred DNS server to be 192.168.0.1.
 * Add MSHOME.NET as the DNS suffix on the client.
 * Add an entry for the client to the Hosts file on the Windows XP-based ICS host, using .MSHOME.NET as the name.

These steps are described in detail later in this article.

Windows XP ICS uses the private network of 192.168.0.x to dynamically assign addresses to clients. In addition, the ICS host keeps track of the names of internal clients to facilitate name resolution. The remainder of this article describes the process of statically configuring an ICS client, while taking these two factors into account.

Configuring the IP Address
When you select an address for the statically configured internal host, it is a good idea to pick an address that has not already been assigned to a client. However, when ICS assigns an IP address, Windows XP sends an Address Resolution Protocol (ARP) broadcast to make sure that the address is not already in use on the network. If Windows XP receives a reply to the ARP broadcast, a new address is selected and the process starts again. Therefore, if you choose an address that is already in use on the network, it creates a temporary problem on the network that should be resolved the next time the conflicting client requests an IP address. The address that you select for the statically configured client must be on the 192.168.0.x network (for example, 192.168.0.100). The only three addresses on the network that you cannot use are 192.168.0.0 (the network address), 192.168.0.1 (the ICS host), and 192.168.0.255 (the broadcast address). Valid address range from 192.168.0.2 through 192.168.0.254.

Configuring the Default Gateway, DNS, and Host Name
ICS clients must be configured to use the ICS host for their default gateway and DNS server. This causes the ICS host to act as a gateway to the Internet for the client, and takes care of resolving names for the client. With Windows XP ICS, the internal interface that is used by ICS always has an address of 192.168.0.1. Therefore, you must configure the static clients to use this address for Domain Name System (DNS) and Dynamic Host Configuration Protocol (DHCP) requests.

Windows XP ICS also always uses a domain name of MSHOME.NET. Therefore, to specify a fully qualified host name for a client, you must use the client computer name followed by &quot;.MSHOME.NET&quot;. For example, &quot;COMPUTER1.MSHOME.NET&quot; is the fully qualified name of an internal client with a name of COMPUTER1.

To configure a static client, use the following steps.

NOTE: This article assumes that the client computer is running Windows XP. The same objectives no matter which operating system is running on the client, but the actual process may differ.
 * 1) Click Start, click Control Panel, click Network and Internet Connections, and then click Network Connections.
 * 2) Right-click the network connection that is connected to the private ICS network, and then click Properties.
 * 3) On the General tab, click Internet Protocol (TCP/IP) in the This connection uses the following items list, and then click Properties.
 * 4) On the General tab, click Use the following IP address. Configure the entries as follows:
 * 5) * IP Address: The IP address you chose for this client (for example, 192.168.0.100).
 * 6) * Subnet Mask: 255.255.255.0
 * 7) * Default Gateway: 192.168.0.1
 * 8) * Click Use the following DNS server addresses, and then type 192.168.0.1 in the Preferred DNS server box.
 * 9) Click Advanced, and then click the DNS tab.
 * 10) In the DNS suffix for this connection box, type MSHOME.NET.
 * 11) Click OK.
 * 12) Click OK.

Make note of the computer's name for name-resolution purposes:
 * 1) Click Start, click Control Panel, click Performance and Maintenance, and then click System.
 * 2) Click the Computer Name tab.
 * 3) Note the entry on the &quot;Full computer name&quot; line.

For the purposes of this article, the computer name includes everything up to, but not including, the first period in the name that is listed on the &quot;Full computer name&quot; line. For example, if &quot;COMPUTER1.&quot; is listed, the computer name is COMPUTER1 (with no period).
 * 1) Close all open dialog boxes.

Adding Static Clients to the Hosts File
To complete the static configuration, lest each static client in the Hosts file on the ICS host. The Hosts file helps to speed up name resolution and prevents unnecessary queries from being sent to DNS servers on the Internet. For a dial-up connection to the Internet, adding static clients to the Hosts file helps to minimize the traffic that causes the Internet connection to be dialed.  On the Windows XP-based ICS host computer, start Windows Explorer, and open the following folder:

%SystemRoot%\System32\Drivers\Etc

 This folder contains two files of which you should be aware. The Hosts.ics file is used by ICS to store information about dynamically configured clients. Avoid making changes to this file to prevent the loss of connectivity or data. The Hosts file (with no file name extension) is the file to which you add information about statically configured clients. Right-click the Hosts file, and then click Open. Click Select the program from a list, and then click OK. Click Notepad in the list of programs, and then click OK. Notepad starts and displays the contents of the Hosts file. The file will probably contain only an &quot;127.0.0.1 localhost&quot; entry. Move the insertion point to the first blank line after the last entry. Following the same model as the previous entry, first type the IP address of the statically configured client, press the TAB key, and then type the fully qualified computer name. For example, if the IP address of the statically configured client is 192.168.0.100 and the name of the host is COMPUTER1, type this entry:

192.168.0.100 COMPUTER1.MSHOME.NET

Again, note that a tab character separates the IP address and name.

 Make sure that there are two blank lines after the last entry by pressing ENTER twice. Save the file, and then quit Notepad.

This completes the configuration to allow the statically configured client to participate on the ICS network.

Keywords: kbinfo kbnetwork KB309642

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.