Configure TCP/IP

  • Install Simple TCP/IP Services
  • Configure TCP/IP for dynamic addressing
  • Configure TCP/IP for automatic addressing
  • Configure TCP/IP for an alternate configuration
  • Disable automatic address configuration
  • Configure TCP/IP for static addressing
  • Configure TCP/IP to use DNS
  • Configure TCP/IP to use WINS
  • Configure TCP/IP to use TCP/IP filtering


Install Simple TCP/IP Services

Microsoft Windows graphic

To install Simple TCP/IP Services

  1. Open Add or Remove Programs in Control Panel.
  2. Click Add/Remove Windows Components.
  3. In Components, click Networking Services, and then click Details.
  4. In Networking Services, select the Simple TCP/IP Services check box, and then click OK.
  5. Click Next.
  6. If prompted, type the path where the distribution files are located, and then click OK.
  7. Click Finish, and then click Close.

Notes

  • To perform this procedure, you must be a member of the Administrators group or the Network Configuration Operators group on the local computer.
  • XOX

  • Simple TCP/IP Services provide support for the optional TCP/IP protocol services listed in the following table.

    Protocol | Description | RFC
    Character Generator (CHARGEN) | Sends data made up of the set of 95 printable ASCII characters. Useful as a debugging tool for testing or troubleshooting line printers. | 864
    Daytime | Returns messages containing the day of the week, month, day, year, current time (in hh:mm:ss format), and time-zone information. Some programs can use the output from this service for debugging or monitoring variations in system clock time or on a different host. | 867
    Discard | Discards all messages received on this port without response or acknowledgment. Can serve as a null port for receiving and routing TCP/IP test messages during network setup and configuration or, in some cases, can be used by programs as a message discard function. | 863
    Echo | Echoes back data from any messages it receives on this server port. Echo can be useful as a network debugging and monitoring tool. | 862
    Quote of the Day (QUOTE) | Returns a quotation as one or more lines of text in a message. Quotations are taken at random from the following file: systemroot\System32\Drivers\Etc\Quotes. A sample quote file is installed with the Simple TCP/IP Services. If this file is missing, the quote service fails. | 865
    All of these protocol services are classified as elective Internet standards and are defined and described in the specified Request for Comments (RFC) document listed in the table. For more information about these protocol services, see the RFCs.

  • Do not install Simple TCP/IP Services unless you specifically need this computer to support communication with other systems that use these protocol services.
  • After Simple TCP/IP Services are installed, you cannot enable or disable the separate services individually.

Related Topics


Configure TCP/IP for dynamic addressing

To configure TCP/IP for dynamic addressing

  1. Open Network Connections.
  2. Right-click the network connection that you want to configure, and then click Properties.
  3. On the General tab (for a local area connection) or the Networking tab (for all other connections), click Internet Protocol (TCP/IP), and then click Properties.
  4. Click Obtain an IP address automatically, and then click OK.

Notes

  • To perform this procedure, you must be a member of the Administrators group or the Network Configuration Operators group on the local computer.
  • XOX
  • These instructions are only required if a static TCP/IP configuration was previously used. By default, computers running Windows Server 2003 operating systems attempt to obtain the TCP/IP configuration from a DHCP server on your network.


Configure TCP/IP for automatic addressing

To configure TCP/IP for automatic addressing

  1. Open Network Connections.
  2. Right-click the network connection that you want to configure, and then click Properties.
  3. On the General tab (for a local area connection) or the Networking tab (for all other connections), click Internet Protocol (TCP/IP), and then click Properties.
  4. Click Obtain an IP address automatically, and then click OK.

Notes

  • To perform this procedure, you must be a member of the Administrators group or the Network Configuration Operators group on the local computer.
  • XOX
  • By default, TCP/IP is configured to use DHCP addressing. If a DHCP server is unavailable, then servers running Windows Server 2003 can use Automatic Private IP Addressing (APIPA) or the alternate configuration method to automate Internet Protocol (IP) configuration of network connections. For more information about these new features, see Related Topics.


Configure TCP/IP for an alternate configuration

To configure TCP/IP for an alternate configuration

  1. Open Network Connections.
  2. Right-click the network connection that you want to configure, and then click Properties.
  3. On the General tab (for a local area connection) or the Networking tab (for all other connections), click Internet Protocol (TCP/IP), and then click Properties.
  4. On the General tab, click Obtain an IP address automatically.
  5. On the Alternate Configuration tab, click User configured, and then type appropriate values for the following:
    • IP address
    • Subnet mask
    • Default gateway
    • Preferred and alternate DNS server
    • Preferred and alternate WINS server

Notes

  • To perform this procedure, you must be a member of the Administrators group or the Network Configuration Operators group on the local computer.
  • XOX
  • The alternate configuration is used for computers that travel between a network with static IP addresses and one or more DHCP networks.
  • Computers running Windows Server 2003 can use Automatic Private IP Addressing (APIPA) or the alternate configuration method to automate Internet Protocol (IP) configuration of network connections. For more information about these new features, see Related Topics.


Disable automatic address configuration

To disable automatic address configuration

  1. Open Registry Editor.

    2. Caution

    • Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on the computer. You can also use the Last Known Good Configuration startup option if problems are encountered after manual changes have been applied.
  2. In Registry Editor, navigate to the following registry key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
    Services\Tcpip\Parameters

  3. Click the Parameters folder, and then click Edit.
  4. Click New, and then click DWORD Value.
  5. Type the following to create a new entry:

    IPAutoconfigurationEnabled

  6. Right-click the new entry, and then click Modify.
  7. In Edit DWORD Value, under Value data, ensure that the setting is O.
  8. Exit Registry Editor, and restart the computer.

Notes

  • To perform this procedure, you must be a member of the Administrators group or the Network Configuration Operators group on the local computer.
  • XOX
  • If the IPAutoconfigurationEnabled entry is not present, a default value of 1 is assumed, which indicates that APIPA can be used.


Configure TCP/IP for static addressing

To configure TCP/IP for static addressing

  1. Open Network Connections.
  2. Right-click the network connection you want to configure, and then click Properties.
  3. On the General tab (for a local area connection) or the Networking tab (for all other connections), click Internet Protocol (TCP/IP), and then click Properties.
  4. Click Use the following IP address, and do one of the following:
    • For a local area connection, in IP address, Subnet mask, and Default gateway, type the IP address, subnet mask, and default gateway addresses.
    • For all other connections, in IP address, type the IP address.
  5. Click Use the following DNS server addresses.
  6. In Preferred DNS server and Alternate DNS server, type the primary and secondary DNS server addresses.
  7. To configure advanced static address settings for a local area connection, click Advanced, and do one or more of the following:
    • To configure additional IP addresses:
      1. On the IP Settings tab, in IP addresses, click Add.
      2. In TCP/IP Address, type an IP address in IP address and a subnet mask in Subnet mask, and then click Add.
      3. Repeat steps 1 and 2 for each IP address you want to add, and then click OK.
    • To configure additional default gateways:
      1. On the IP Settings tab, in Default gateways, click Add.
      2. In TCP/IP Gateway Address, type the IP address of the default gateway in Gateway. To manually configure a default route metric, clear the Automatic metric check box and type a metric in Metric.
      3. Click Add.
      4. Repeat steps 1 through 3 for each default gateway you want to add, and then click OK.
    • To configure a custom metric for this connection, clear the Automatic metric check box, and then type a metric value in Interface metric.

Notes

  • To perform this procedure, you must be a member of the Administrators group or the Network Configuration Operators group on the local computer.
  • XOX


Configure TCP/IP to use DNS

To configure TCP/IP to use DNS

  1. Open Network Connections.
  2. Right-click the network connection you want to configure, and then click Properties.
  3. On the General tab (for a local area connection) or the Networking tab (for all other connections), click Internet Protocol (TCP/IP), and then click Properties.
  4. If you want to obtain DNS server addresses from a DHCP server, click Obtain DNS server address automatically.
  5. If you want to manually configure DNS server addresses, click Use the following DNS server addresses, and in Preferred DNS server and Alternate DNS server, type the preferred DNS server and alternate DNS server IP addresses.
  6. To configure advanced DNS properties, click Advanced, click the DNS tab, and do one or more of the following:
    • To configure an additional DNS server IP address:
      1. Under DNS server addresses, in order of use, click Add.
      2. In TCP/IP DNS server, type the IP address of the DNS server, and then click Add.
    • To modify the resolution behavior for unqualified DNS names, do the following:
      • To resolve an unqualified name by appending the primary DNS suffix and the DNS suffix of each connection (if configured), click Append primary and connection specific DNS suffixes. If you also want to search the parent suffixes of the primary DNS suffix up to the second level domain, select the Append parent suffixes of the primary DNS suffix check box.
      • To resolve an unqualified name by appending the suffixes from a list of configured suffixes, click Append these DNS suffixes (in order), and then click Add to add suffixes to the list.
    • To configure a connection-specific DNS suffix, type the DNS suffix in DNS suffix for this connection.
    • To modify DNS dynamic update behavior, do the following:
      • To use a DNS dynamic update to register the IP addresses of this connection and the primary domain name of the computer, select the Register this connection's addresses in DNS check box. This option is enabled by default. The primary domain name of the computer is the primary DNS suffix appended to the computer name and can be viewed as the full computer name on the Computer Name tab (available in System in Control Panel).
      • To use a DNS dynamic update to register the IP addresses and the connection-specific domain name of this connection, select the Use this connection's DNS suffix in DNS registration check box. This option is disabled by default. The connection-specific domain name of this connection is the DNS suffix for this connection appended to the computer name.

Notes

  • To perform this procedure, you must be a member of the Administrators group or the Network Configuration Operators group on the local computer.
  • XOX
  • To completely disable DNS dynamic update for all names on the computer, clear the Register this connection's addresses in DNS and Use this connection's DNS suffix in DNS registration check boxes for all connections in Network Connections.


Configure TCP/IP to use WINS

To configure TCP/IP to use WINS

  1. Open Network Connections.
  2. Right-click the network connection you want to configure, and then click Properties.
  3. On the General tab (for a local area connection) or the Networking tab (for all other connections), click Internet Protocol (TCP/IP), and then click Properties.
  4. Click Advanced, click the WINS tab, and then click Add.
  5. In TCP/IP WINS server, type the IP address of the WINS server, and then click Add.
  6. Repeat steps 4 and 5 for each WINS server IP address you want to add, and then click OK.
  7. To enable the use of the Lmhosts file to resolve remote NetBIOS names, select the Enable LMHOSTS lookup check box. This option is enabled by default.
  8. To specify the location of the file that you want to import into the Lmhosts file, click Import LMHOSTS, and then select the file in the Open dialog box.
  9. To enable or disable NetBIOS over TCP/IP, do the following:
    • To enable the use of NetBIOS over TCP/IP, click Enable NetBIOS over TCP/IP.
    • To disable the use of NetBIOS over TCP/IP, click Disable NetBIOS over TCP/IP.
    • To have the DHCP server determine whether NetBIOS over TCP/IP is enabled or disabled, click Default. For more information, see Notes.

Notes

  • To perform this procedure, you must be a member of the Administrators group or the Network Configuration Operators group on the local computer.
  • XOX
  • If you are using a DHCP server to allocate WINS server IP addresses, you do not need to add WINS server addresses.
  • If you disable NetBIOS over TCP/IP, you might not be able to connect to computers that are running operating systems other than Windows 2000, XOX, or a Windows Server 2003 operating system.
  • If you disable NetBIOS over TCP/IP, you cannot use broadcast-based NetBIOS name resolution to resolve computer names to IP addresses for computers on the same network segment. If your computers are on the same network segment, and NetBIOS over TCP/IP is disabled, you must install a DNS server and either have the computers register with DNS (or manually configure DNS records) or configure entries in the local Hosts file for each computer.
  • The DHCP server determines whether NetBIOS over TCP/IP is enabled or disabled based on the value of the Microsoft vendor-specific DHCP option Disable NetBIOS over TCP/IP (NetBT). This option either enables (set to 1) or disables (set to 2) NetBIOS over TCP/IP on the DHCP client computer. If the DHCP server does not send the Disable NetBIOS over TCP/IP (NetBT) DHCP option during DHCP lease negotiation or TCP/IP is manually configured, NetBIOS over TCP/IP is enabled. For more information about the Disable NetBIOS over TCP/IP (NetBT) DHCP option, see Related Topics.
  • You can no longer configure the NetBIOS scope ID on the WINS tab (previously available in Windows NT 4.0). To configure the NetBIOS scope ID, set the following registry value to the name of the scope ID that you want to use:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\ScopeID

    • Caution

    • Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on the computer.
  • For more information about DHCP options, see "DHCP Options" at the Microsoft Windows Resource Kits Web site. (http://www.microsoft.com/)


Configure TCP/IP to use TCP/IP filtering

To configure TCP/IP to use TCP/IP filtering

  1. Open Network Connections.
  2. Right-click the network connection you want to configure, and then click Properties.
  3. On the General tab (for a local area connection) or the Networking tab (for all other connections), click Internet Protocol (TCP/IP), and then click Properties.
  4. Click Advanced.
  5. Click Options, click TCP/IP filtering, and then click Properties.
  6. Do one of the following:
    • To enable TCP/IP filtering for all adapters, select the Enable TCP/IP Filtering (All adapters) check box.
    • To disable TCP/IP filtering for all adapters, clear the Enable TCP/IP Filtering (All adapters) check box.
  7. Based on your requirements for TCP/IP filtering, configure TCP ports, UDP ports, or IP protocols for the allowed traffic.

Notes

  • To perform this procedure, you must be a member of the Administrators group or the Network Configuration Operators group on the local computer.
  • XOX


Manage routes

  • View the IP routing table
  • Add a static IP route
  • Remove a static IP route
  • Enable the Routing and Remote Access service


View the IP routing table

To view the IP routing table

  1. Open Command Prompt.
  2. At the command prompt, type:

    route print

Note

  • XOX


Add a static IP route

To add a static IP route

  1. Open Command Prompt.
  2. At the command prompt, type:

    3. route add destination mask subnetmask gateway metric costmetric if interface

    where:

    Static IP route entry | Definition
destination | Specifies either an IP address or host name for the network or host.
subnetmask | Specifies a subnet mask to be associated with this route entry. If subnetmask is not specified, 255.255.255.255 is used.
gateway | Specifies either an IP address or host name for the gateway or router to use when forwarding.
costmetric | Assigns an integer cost metric (ranging from 1 through 9,999) to be used in calculating the fastest, most reliable, and/or least expensive routes. If costmetric is not specified, 1 is used.
interface | Specifies the interface to be used for the route that uses the interface number. If an interface is not specified, the interface to be used for the route is determined from the gateway IP address.

    For example, to add a static route to the 10.0.0.0 network that uses a subnet mask of 255.0.0.0, a gateway of 192.168.0.1, and a cost metric of 2, you type the following at a command prompt:

    route add 10.0.0.0 mask 255.0.0.0 192.168.0.1 metric 2

Notes

  • XOX
  • To make a static route persistent, you can either enter route add commands in a batch file that is run during system startup or use the –p option when adding routes.
  • Routes added by using the –p option are stored in the registry under the following key:

    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip \Parameters\PersistentRoutes

  • All symbolic names used for destination or gateway are looked up in the network and computer name database files (Networks and Hosts), which are stored in the local systemroot\System32\Drivers\Etc folder.
  • If a route addition fails, you can use the tracert command to verify that the gateway specified is directly reachable from the same subnet as this computer.


Remove a static IP route

To remove a static IP route

  1. Open Command Prompt.
  2. At the command prompt, type:

    3. route delete destination

    where:

    destination specifies either an IP address or network name for the remote TCP/IP host computer or network.

    For example, to delete a static route to the 10.0.0.0 network, you type the following at a command prompt:

    route delete 10.0.0.0

Notes

  • XOX
  • All symbolic names used for destination are looked up in the network database file Networks, which is stored in the local systemroot\System32\Drivers\Etc folder.


Diagnose connections

  • Test a TCP/IP configuration by using the ping command
  • Test TCP/IP connections by using the ping and net view commands
  • Trace a path by using the tracert command
  • View the NetBIOS name table by using the nbtstat command
  • Release and refresh NetBIOS names by using the nbtstat command
  • View the Address Resolution Protocol (ARP) cache
  • Add a static ARP cache entry
  • View current TCP/IP protocol and connection statistics


Test a TCP/IP configuration by using the ping command

To test a TCP/IP configuration by using the ping command

  1. To quickly obtain the TCP/IP configuration of a computer, open Command Prompt, and then type ipconfig. From the display of the ipconfig command, ensure that the network adapter for the TCP/IP configuration you are testing is not in a Media disconnected state. For more information, see Notes.
  2. At the command prompt, ping the loopback address by typing ping 127.0.0.1.
  3. Ping the IP address of the computer.
  4. Ping the IP address of the default gateway.

    5. If the ping command fails, verify that the default gateway IP address is correct and that the gateway (router) is operational.

  5. Ping the IP address of a remote host (a host that is on a different subnet).

    6. If the ping command fails, verify that the remote host IP address is correct, that the remote host is operational, and that all of the gateways (routers) between this computer and the remote host are operational.

  6. Ping the IP address of the DNS server.

    7. If the ping command fails, verify that the DNS server IP address is correct, that the DNS server is operational, and that all of the gateways (routers) between this computer and the DNS server are operational.

Notes

  • XOX
  • The ipconfig command is the command-line equivalent to the winipcfg command, which is available in Windows 95, Windows 98, Windows 98 Second Edition, and Windows Millennium Edition. Computers running XOX or Windows Server 2003 operating systems do not include a graphical equivalent of the winipcfg command, however, you can get equivalent functionality for viewing and renewing an IP address by opening Network Connections, right-clicking a network connection, clicking Status, and then clicking the Support tab.
  • If the ipconfig command displays Media disconnected, the network cable is not plugged in to the network adapter.
  • If the ping command is not found or the command fails, you can use Event Viewer to check the system log and look for problems reported by Setup or the Internet Protocol (TCP/IP) service.
  • The ping command uses Internet Control Message Protocol (ICMP) Echo Request and Echo Reply messages. Packet filtering policies on routers, firewalls, or other types of security gateways might prevent the forwarding of this traffic.


Test TCP/IP connections by using the ping and net view commands

To test TCP/IP connections by using the ping and net view commands

  1. To test TCP/IP connectivity by using the ping command, use the display of the ipconfig command to ensure that your network adapter is not in a Media disconnected state. For more information, see Notes.
  2. Open Command Prompt, and then ping the desired host using its IP address.

    3. If the ping command fails with a "Request timed out" message, verify that the host IP address is correct, that the host is operational, and that all of the gateways (routers) between this computer and the host are operational.

  3. To test host name resolution by using the ping command, ping the desired host using its host name.

    4. If the ping command fails with an "Unable to resolve target system name" message, verify that the host name is correct and that the host name can be resolved by your DNS server.

  4. To test TCP/IP connectivity by using the net view command, open Command Prompt, and then type net view \\ComputerName. The net view command lists the file and print shares by establishing a temporary connection. If there are no file or print shares on the specified computer, the net view command displays a "There are no entries in the list" message.

    5. If the net view command fails with a "System error 53 has occurred" message, verify that ComputerName is correct, that the computer is operational, and that all of the gateways (routers) between this computer and the computer are operational.

    If the net view command fails with a "System error 5 has occurred. Access is denied." message, verify that you are logged on using an account that has permission to view the shares on the remote computer.

    To further troubleshoot this connectivity problem, do the following:

    • Use the ping command to ping ComputerName.

      If the ping command fails with an "Unable to resolve target system name" message, then ComputerName cannot be resolved to its IP address.

    • Use the net view command and the IP address of the computer, as follows:

      net view \\IPAddress

      If the net view command succeeds, then ComputerName is being resolved to the wrong IP address.

      If the net view command fails with a "System error 53 has occurred" message, the remote computer might not be running the File and Printer Sharing for Microsoft Networks service.

Notes

  • XOX
  • The ipconfig command is the command-line equivalent to the winipcfg command, which is available in Windows 95, Windows 98, and Windows Millennium Edition. Computers running XOX or a Windows Server 2003 operating system do not include a graphical equivalent of the winipcfg command, however, you can get equivalent functionality for viewing and renewing an IP address by opening Network Connections, right-clicking a network connection, clicking Status, and then clicking the Support tab.
  • If the ipconfig command displays Media disconnected, the network cable is not plugged in to the network adapter.
  • If the ipconfig command only yields the message Windows IP Configuration, and then returns you to the command prompt, you should check to see if your network adapter has been disabled. For more information, see To make a local area connection in Related Topics
  • If the ping command is not found or the command fails, you can use Event Viewer to check the system log and look for problems reported by Setup or the Internet Protocol (TCP/IP) service.
  • The ping command uses Internet Control Message Protocol (ICMP) Echo Request and Echo Reply messages. Packet filtering policies on routers, firewalls, or other types of security gateways might prevent the forwarding of this traffic.
  • The procedure for testing TCP/IP connections using the net view command assumes that you are using only the TCP/IP protocol suite. If additional protocols are installed, such as the NWLink IPX/SPX/NetBIOS Compatible Transport Protocol, net view might work correctly when there are problems resolving names and making connections with TCP/IP because net view attempts a connection using all installed protocols. Even if the net view connection with TCP/IP fails, net view might successfully connect to the NWLink IPX/SPX/NetBIOS Compatible Transport Protocol.
  • XOX


Trace a path by using the tracert command

To trace a path by using the tracert command

  • Open Command Prompt, and type the following:

    tracert HostName

    Or, type tracert IPAddress

    where HostName or IPAddress is the host name or IP address, respectively, of the remote computer.

    • For example, to trace the path from this computer to www.microsoft.com, type the following at a command prompt:

    tracert www.microsoft.com

    If you do not want the tracert command to resolve and display the names of all routers in the path, use the -d parameter. This expedites the display of the path. For example, to trace a path from this computer to www.microsoft.com without displaying the router names, type the following at a command prompt:

    tracert -d www.microsoft.com

Notes

  • XOX
  • The tracert command traces the path by sending Internet Control Message Protocol (ICMP) Echo Request and Echo Reply messages (similar to the ping command) to produce command-line report output about each router that is crossed and the roundtrip time (RTT) for each hop. Packet filtering policies on routers, firewalls, or other types of security gateways might prevent forwarding of this traffic.
  • If tracert is unsuccessful, you can use the command output to help determine at which intermediate router forwarding failed or was slowed.
  • For details about packet forwarding and packet loss at each router and link in the path, use the pathping command.


View the NetBIOS name table by using the nbtstat command

To view the NetBIOS name table by using the nbtstat command

  1. Open Command Prompt.
  2. At the command prompt, type:

    nbtstat –n

    The NetBIOS local name table for this computer is displayed as command-line output. The name type is listed to indicate whether each name is a unique name or a group name. Also, the status for each name is given, indicating whether the name is registered or unregistered with the network.

Notes

  • XOX
  • The nbtstat command displays statistics and names information used by NetBIOS over TCP/IP (NetBT) connections. The –n option is used to list only local NetBIOS names for this computer. You can also use nbtstat to:
    • List the NetBIOS name table of a remote computer.
    • Display the contents of the NetBIOS names cache of this computer or a remote computer.
    • Manually load or reload the NetBIOS names cache by using entries in the Lmhosts file with a #PRE option.
    • List NetBIOS over TCP/IP sessions statistics.
    • Release and refresh NetBIOS names in WINS.


Release and refresh NetBIOS names by using the nbtstat command

To release and refresh NetBIOS names by using the nbtstat command

  1. Open Command Prompt.
  2. At the command prompt, type:

    nbtstat –RR

    The progress of the release and refresh process is displayed as command-line output. This information indicates if all local NetBIOS names currently registered in WINS for this computer have released and renewed their registration with a WINS server.

Notes

  • XOX
  • NetBIOS names are registered with WINS and are normally released when the computer shuts down properly. If the computer did not properly shut down or could not contact a WINS server during shutdown and release its names, you can use this command to force a refresh and update in WINS of the local names for this computer. This is useful for mobile or portable computers that are moved between different locations on a network.
  • You can also use the nbtstat command to:
    • List the NetBIOS names registered to this computer or a remote computer.
    • Display the contents of the NetBIOS names cache of this computer or a remote computer.
    • Manually load or reload the NetBIOS names cache by using entries in the Lmhosts file with a #PRE option.
    • List NetBIOS over TCP/IP sessions statistics.


View the Address Resolution Protocol (ARP) cache

To view the Address Resolution Protocol (ARP) cache

  1. Open Command Prompt.
  2. At the command prompt, type arp –a.

    For example, if you recently used the ping command to test and verify connectivity from this computer to a host computer at IP address 10.0.0.99, the ARP cache displays the following entry:

Interface: 10.0.0.1 on Interface 0x1
  Internet Address      Physical Address      Type
  10.0.0.99             00-e0-98-00-7c-dc     dynamic

    In this example, the cache entry indicates that the remote host computer at 10.0.0.99 resolved to a media access control address of 00-e0-98-00-7c-dc assigned in the network adapter hardware of the remote computer. The media access control address is the address that your computer used to physically communicate with this remote TCP/IP host on your network.

Notes

  • XOX
  • To minimize ARP broadcast traffic on your network, a cache of hardware-to-software address mappings is maintained for future use. This cache contains the following two types of entries:
    • Dynamic ARP cache entries

      These entries are added and deleted automatically during normal use of TCP/IP sessions with remote computers. Dynamic entries age and expire from the cache if not reused within 2 minutes. If a dynamic entry is reused within 2 minutes, it may remain in the cache and age up to a maximum cache life of 10 minutes before being removed or requiring cache renewal by using the ARP broadcast process.

    • Static ARP cache entries

      These entries are added manually by using the arp command with the –s option. Static entries remain in the ARP cache until either the computer is restarted, or the interface is reinitiated. Examples of some of the events that cause an interface to be reinitiated are:

      1. The interface is Disabled, and then Enabled.
      2. The Repair feature is used.
      3. The commands ipconfig /release and ipconfig /renew are given.
      4. The computer awakes from a suspend or hibernation state.
      5. You removed and replugged a network cable or moved a computer out of and back into wireless range.

    ARP cache entries can be deleted manually by using the arp command with the –d option.

    Example: arp -d 192.168.0.1
Removes ARP mappings for 192.168.0.1 on all interfaces.


Add a static ARP cache entry

To add a static ARP cache entry

  1. Open Command Prompt.
  2. At the command prompt, type:

    arp –s ip_address mac_address

    where:

    ip_address | Specifies the IP address of a local (on the same subnet) TCP/IP node.
    mac_address | Specifies the media access control address for a network adapter installed and used on the local TCP/IP node.

    For example, to add a static ARP entry for a local TCP/IP node with an IP address of 10.0.0.200 that resolves to a media access control address of 00-10-54-CA-E1-40, type the following at a command prompt:

    arp -s 10.0.0.200 00-10-54-CA-E1-40

Notes

  • XOX
  • Static ARP entries can help speed access for hosts that are frequently used.
  • Static ARP entries are valid only until your computer is restarted. To make static ARP cache entries persistent, you can add arp commands to a batch file that is run at system startup.


View current TCP/IP protocol and connection statistics

To view current TCP/IP protocol and connection statistics

  1. Open Command Prompt.
  2. At the command prompt, type:

    netstat

Notes

  • XOX
  • To view netstat command-line options, type:

    netstat /?


Verify A resource records exist in DNS

Microsoft Windows Graphic

To verify A resource records exist in DNS

  1. Open Command Prompt.
  2. Type:

    3. nslookup RootServerIPAddress

  3. Type:

    4. nslookup

  4. At the next prompt, type:

    set q=A

  5. At the next prompt, type the name of a domain controller.
  6. Look through the returned resource records for the fully qualified domain name (FQDN) of the domain controller.

    7. If they do not exist, do one of the following:

    • If the zone authoritative for the Domain Name System (DNS) name of the domain controller is configured to allow dynamic update, use the ipconfig/registerdns command to renew DNS registration. This procedure must be performed from the command line on the domain controller that did not register its A resource record.
    • If the zone authoritative for the DNS name of the domain controller is not configured to allow dynamic updates, on a DNS server, use the DNS console in Microsoft Management Console (MMC) to administer the DNS server and add the required A resource records or enable dynamic update.
Value | Description
nslookup | Initiates the command-line tool.
RootServerIPAddress | The IP address of a valid root server.
set q=A | Sets the resource record type to address (A) in the query to the root server.

Notes

  • XOX
  • To view the complete syntax for this command, at a command prompt, do the following:

    Type nslookup, press ENTER, then type help.


Troubleshooting joining a domain

Error: This computer could not join the domain.

Cause: This computer could not locate a domain controller for the specified Active Directory domain.

Solution: Verify the DNS resource records needed to join an Active Directory domain.

See also: To verify the DNS resource records needed to join an Active Directory domain using nslookup; DNS requirements for joining an Active Directory domain.


Troubleshooting network identification

Error: This computer could not locate a domain controller for the Active Directory domain displayed in the error message because the Domain Name System (DNS) servers used by this computer for name resolution did not respond. As a result, this computer cannot join the Active Directory domain until this problem is fixed.

Cause: The DNS servers did not respond because the IP addresses of the preferred or alternate DNS servers with which this computer is configured are incorrect.

Solution: Contact your network administrator and verify that the IP addresses of the DNS servers used by this computer are correct.

Cause: The DNS servers did not respond because there is a connectivity problem.

Solution: Eliminate the possibility of a basic network connectivity problem by using the ping command.

See also: To test a TCP/IP configuration by using the ping command.

Cause: DNS servers are not running.

Solution: To determine if the DNS servers are running, you can use the DNS console in Microsoft Management Console (MMC) to view local and remote DNS servers.

See also: DNS requirements for joining an Active Directory domain.


Troubleshooting network identification

Error: This computer could not locate a domain controller for the Active Directory domain displayed in the error message because the Domain Name System (DNS) servers used by this computer for name resolution failed to look up the service (SRV) resource record.

Cause: The DNS SRV resource record is not registered in DNS.

Solution: Verify that the SRV resource record for the requested domain and service type exists in DNS. You can do this using the Dcdiag command-line tool, which must be run on a domain controller for the Active Directory domain you entered. To download Dcdiag, see the Download Center at the Microsoft Web site (http://www.microsoft.com/).

Cause: One or more of the zones listed in the error message does not contain a delegation to its child zone. This misconfiguration is common with organizations that use an Internet service provider (ISP) for Internet connectivity and DNS hosting.

Solution: Do one of the following:

  • If the first domain controller in the domain you are trying to join is running a DNS server, then configure your computer to use that domain controller as its preferred DNS server. For more information, see Configure a computer's preferred DNS server.

    • Or

  • Verify DNS zone delegations by using the Nslookup command-line tool. For more information about troubleshooting DNS zone delegations, see the Microsoft Web site (http://www.microsoft.com/); Nslookup.

See also: DNS requirements for joining an Active Directory domain.


Troubleshooting network identification

Error: This computer could not locate the Domain Name System (DNS) service (SRV) resource record needed to locate a domain controller for the Active Directory domain displayed in the error message because the DNS servers used by this computer for name resolution failed to look up the SRV resource record.

Cause: The DNS servers used by this computer for name resolution may have incorrect root hints. For more information about root hints, see Microsoft Windows Resource Kits Web site (http://www.microsoft.com/).

Solution: Update the root hints for the DNS servers.

See also: DNS console Help in Microsoft Management Console (MMC).

Cause: Some of the delegations listed in the DNS zones are incorrect.

Solution: Verify DNS zone delegations by using the Nslookup command-line tool. For more information about troubleshooting DNS zone delegations, see Microsoft Windows Resource Kits Web site (http://www.microsoft.com/).

See also: DNS requirements for joining an Active Directory domain.


Troubleshooting network identification

Error: This computer successfully resolved the Domain Name System (DNS) service (SRV) resource record required to locate a domain controller, but it failed to locate a domain controller for the Active Directory domain displayed in the error message.

Cause: The required address (A) resource records that map the name of the domain controller to its IP address do not exist in DNS.

Solution: Verify that the required A resource records do not exist in DNS by using the Nslookup command-line tool.

See also: To verify A resource records exist in DNS.

Cause: The domain controller advertised in DNS may not be connected to the network or is connected to the network but is not running.

Solution: Verify connectivity and then verify that the domain controller is running.

See also: To test a TCP/IP configuration by using the ping command; DNS requirements for joining an Active Directory domain.


Configure a computer's preferred DNS server

To configure a computer's preferred DNS server

  1. Open Network Connections.
  2. Right-click Local Area Connection, and then click Properties.
  3. Click Internet Protocol (TCP/IP), and then click Properties.
  4. Do one of the following:
    • If the computer will use DHCP to obtain a preferred DNS server, click Obtain DNS server address automatically.

      • This option is available only when the Obtain an IP address automatically option is selected.

    • If the computer will use a static IP address for a preferred DNS server, click Use the following DNS server addresses.

      • For Preferred DNS server, specify the IP address of the DNS server this computer should use.

Notes

  • XOX
  • Usually, the preferred Domain Name System (DNS) server is an existing DNS server within the same site as the computer you want to configure. If the computer you want to configure is running a DNS server and you want it to send queries to this local DNS server, you can specify the computer's own IP address as its preferred DNS server. Optionally, you can specify the IP address of an alternate DNS server that this computer will use if the preferred DNS server does not respond.
  • If the computer for which you are configuring a preferred DNS server is using a local DNS server as its preferred DNS server, it is strongly recommended that you use a static IP address. To do this, click Use following IP address, and then specify the static IP address, subnet mask, and IP address of the default gateway.


Verify the DNS resource records needed to join an Active Directory domain using nslookup

To verify the DNS resource records needed to join an Active Directory domain using nslookup

  1. Open Command Prompt.
  2. Type:

    nslookup

  3. At the next prompt, type:

    4. set q=srv

  4. At the next prompt, type:

    5. _ldap._tcp.dc._msdcs.ActiveDirectoryDomainName

  5. Review the output of the previous SRV query and determine if further action is needed based on whether the previous query succeeded or failed:
    • If the query succeeded, review the registered service location (SRV) resource records returned in the query to determine if all domain controllers for your Active Directory domain are included and registered using valid IP addresses. If no corresponding address (A) resource records are returned in response to the query, use the nslookup tool to obtain these records. For information on using nslookup, see Related Topics.
    • If the query failed, continue troubleshooting dynamic update or DNS server-related issues to determine the exact cause of the problem.
Value | Description
nslookup | Initiates the command-line tool.
set q= | The command to send the query to the root server. This parameter will accept all resource record (RR) types. For example, set q=A for host (A) resource records.
srv | The SRV resource records that use a specified name.
_ldap._tcp.dc._msdcs.ActiveDirectoryDomainName | The DNS name configured for use with your Active Directory domain and any of its associated domain controllers. For example, if the DNS domain name of your Active Directory domain is example.microsoft.com, type: _ldap._tcp.dc._msdcs.example.microsoft.com.

Notes

  • XOX
  • To view the complete syntax for this command, at a command prompt, do the following:

    Type nslookup, press ENTER, then type help.

  • In some cases, when performing this procedure, you might see several time-outs reported. This happens when reverse lookup is not configured for DNS servers servicing the same DNS domain as your Active Directory domain.
  • The following is an example of command-line output for an Nslookup session used to verify SRV resource records that are registered by domain controllers. In the following example, the two domain controllers are dc1 and dc2 and are registered for the "example.microsoft.com" domain.

C:\nslookup
Default Server:  dc1.example.microsoft.com
Address:  10.0.0.14
 set type=srv
 _ldap._tcp.dc._msdcs.example.microsoft.com
Server:  dc1.example.microsoft.com
Address:  10.0.0.14
_ldap._tcp.dc._msdcs.example.microsoft.com   SRV service location:
          priority       = 0
          weight         = 0
          port           = 389
          svr hostname   = dc1.example.microsoft.com
_ldap._tcp.dc._msdcs.example.microsoft.com   SRV service location:
          priority       = 0
          weight         = 0
          port           = 389
          svr hostname   = dc2.example.microsoft.com
dc1.example.microsoft.com     internet address = 10.0.0.14
dc2.example.microsoft.com     internet address = 10.0.0.15
  • The Nslookup command-line tool is a standard tool provided in most DNS service implementations. It offers the ability to perform query testing of DNS servers and obtain detailed responses as the command output. This information is useful in troubleshooting name resolution problems, verifying that resource records are added or updated correctly in a zone, and debugging other server-related problems.
  • The Net Logon service on each domain controller registers, as appropriate, a number of different DNS resource records with DNS servers. For more information about these records and how Net Logon updates DNS, see Microsoft Windows Resource Kits Web site. (http://www.microsoft.com/)


Troubleshooting joining an Active Directory domain or renaming your computer

The computer could not join an Active Directory domain or be renamed due to one of the causes listed in the error message. For some of the causes, you must contact your network administrator to correct the computer's configuration. You may configure the computer to update its primary DNS suffix when domain membership changes, or configure its primary DNS suffix to match the Active Directory domain DNS name or any other allowed primary DNS suffix.

See also: To change the DNS suffix of your computer.

Note

  • If the computer is configured with a primary DNS suffix that is not allowed in the Active Directory domain, your network administrator may allow different DNS suffixes by configuring the MS-DS-allowedDnsSuffixes attribute in the Domain-DNS object of the Active Directory domain where the computer is a member.


DNS requirements for joining an Active Directory domain

Active Directory uses Domain Name System (DNS) to locate domain controllers, enabling computers joining the network to obtain a domain controller's IP address, and then begin the process of network authentication.

Computers joining an Active Directory domain must satisfy the following three DNS requirements:

  • The computer must be configured with the IP address of a preferred DNS server.
  • The _ldap._tcp.dc._msdcs.DNSDomainName service (SRV) resource record must exist in DNS.
  • The address (A) resource record for the DNS name of the domain controllers specified in the data field of the _ldap._tcp.dc._msdcs.DNSDomainName SRV resource record must exist in DNS.

Configuring a computer’s preferred DNS server

You must configure the computer with the static IP address of a preferred DNS server manually or assign the IP address of a preferred DNS server using Dynamic Host Configuration Protocol (DHCP).

For more information, see To configure a computer's preferred DNS server.

Configuring the required DNS resource records

Computers joining an Active Directory domain need the following resource records in DNS to locate a domain controller:

  • _ldap._tcp.dc._msdcs.DNSDomainName SRV resource record, which identifies the name of the domain controller that hosts the Active Directory domain.

    DNSDomainName is the DNS name of the Active Directory domain the computer is attempting to join.

  • A corresponding address (A) resource record that identifies the IP address for the domain controller listed in the _ldap._tcp.dc._msdcs.DNSDomainName SRV resource record.

For more information, see To verify the DNS resource records needed to join an Active Directory domain and To configure TCP/IP to use DNS.


Configuring TCP/IP

TCP/IP is installed by default. Before you configure TCP/IP you need to know:

  • Whether your network supports a dynamic TCP/IP configuration, which uses the Dynamic Host Configuration Protocol (DHCP).

    • A dynamic configuration is the simplest to complete and can be used if there is a DHCP server on your network. The DHCP server provides IP address, subnet mask, default gateway (IP router), DNS domain name, DNS server, and WINS server configuration information. TCP/IP is configured to use a dynamic configuration by default.

  • Whether your network requires a manual TCP/IP configuration.

    • Some existing networks either do not use DHCP or require that TCP/IP configuration is performed manually for each computer.

  • Whether your computer uses an alternate TCP/IP configuration.

    • For example, laptop computers are sometimes connected to a corporate network that provides dynamic addressing. At other times, laptops require an alternate, manual configuration for home networks.

For more information about configuration methods, see TCP/IP configuration methods.

If you do not use DHCP to configure TCP/IP dynamically, obtain the following information from your network administrator to configure TCP/IP manually:

  • The IP address and subnet mask for each network adapter that is installed on the computer.
  • The IP address for the local default gateway (IP router).
  • The name of your DNS domain and the IP addresses of the DNS servers on the network.

    • For Active Directory deployment, the primary DNS suffix (also known as the primary domain name) of a computer is, by default, the name of the Active Directory domain that the computer has joined. If you want your computer's primary DNS suffix to be different from the name of the Active Directory domain that the computer has joined, see To change the DNS suffix of your computer.

  • The IP addresses for the WINS servers, if WINS services are available on your network.

For more information about configuration items, see TCP/IP configuration items.

For instructions about configuring TCP/IP, see Configure TCP/IP.

For information and instructions about securing TCP/IP, see Internet Protocol security (IPSec)


Use Microsoft TCP/IP

  • Configure TCP/IP
  • Manage routes
  • Diagnose connections