Recipe 12.5. Configuring DNS Settings


Problem

You want to configure the DNS settings on a system.

Solution

Using a graphical user interface

To configure the DNS suffix, do the following:

  1. From the Control Panel, open the System applet.

  2. Select the Computer Name tab.

  3. Click the Change button.

  4. Click the More button.

  5. Enter the suffix under the Primary DNS suffix of this computer heading.

  6. Check the box beside Change primary DNS suffix when domain membership changes if you want the suffix to change to the name of the Active Directory domain the computer joins.

  7. Click OK until all the windows are closed. You will be prompted to reboot for the changes to take effect.

To modify the list of DNS servers used during name resolution, configure how unqualified names are resolved, and configure DNS dynamic registration, do the following:

  1. From the Control Panel, open the Network Connections applet.

  2. Double-click the connection you want to modify.

  3. Choose the Internet Protocol (TCP/IP) item in the list.

  4. From this screen you can configure whether to use the DNS servers obtained through DHCP or to manually enter them. In the latter case, you can enter preferred and alternate DNS servers.

  5. To configure the other DNS settings, click the Advanced button.

  6. Select the DNS tab.

  7. From this screen you can configure additional DNS servers to use during resolution, configure how unqualified names are handled, set a DNS suffix for this connection, and configure DNS registration for this connection.

  8. When you are done, click OK until all screens are closed.

Using a command-line interface

To view the current DNS configuration for all connections on the local system, run this command:

> netsh int ip show dns

To make a connection use DHCP-specified DNS settings, use this command:

> netsh int ip set dns "<ConnectionName>" dhcp

Here is an example:

> netsh int ip set dns "Local Area Connection" dhcp

To make a connection use a specified DNS server for name resolution, use this command:

> netsh int ip set dns "Local Area Connection" static <IPAddress>

Here is an example:

> netsh int ip set dns "Local Area Connection" static 10.0.0.1

This command allows you to specify only one DNS server for name resolution.

With the same command, you can also configure whether the connection registers the host's name under the primary DNS suffix or the connection-specific suffix. To register just the primary DNS suffix, append "primary" to the end of the command. To register both, append "both." To register nothing, append "none." Here is an example:

> netsh int ip set dns "Local Area Connection" static 10.0.0.1 primary

Discussion

With Windows Server 2003 Active Directory, you can set most Windows XP DNS client settings via Group Policy.

You can configure the DNS suffix, dynamic updates settings, search list, and DNS servers used for name resolution among many other settings. These settings can be found by navigating the following path of a Group Policy Object: Computer Configuration Administrative Templates Network DNS Client.

Be careful with this setting, as users that use their laptops to connect to third-party ISPs end up inheriting your company's DNS settings and their third party connections may not work.


See Also

MS KB 178277, "INFO: Setting DNS Domain Suffix Search Order During an Unattended Installation," MS KB 246804, "How to enable or disable dynamic DNS registrations in Windows 2000 and in Windows Server 2003," and MS KB 275553, "How to Configure a Domain Suffix Search List on the Domain Name System Clients"



Windows XP Cookbook
Windows XP Cookbook (Cookbooks)
ISBN: 0596007256
EAN: 2147483647
Year: 2006
Pages: 408

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net