Managing TCP/IP Networking in Windows Server 2008

  • 2/27/2008

Configuring TCP/IP Networking

A local area connection is created automatically if a computer has a network adapter and is connected to a network. If a computer has multiple network adapters and is connected to a network, you’ll have one local area connection for each adapter. If no network connection is available, you should connect the computer to the network or create a different type of connection, as explained in “Managing Network Connections” on page 671.

Computers use IP addresses to communicate over TCP/IP. Windows Server 2008 provides the following ways to configure IP addressing:

  • Manually IP addresses that are assigned manually are called static IP addresses. Static IP addresses are fixed and don’t change unless you change them. You’ll usually assign static IP addresses to Windows servers, and when you do this, you’ll need to configure additional information to help the server navigate the network.

  • Dynamically A DHCP server (if one is installed on the network) assigns dynamic IP addresses at startup, and the addresses might change over time. Dynamic IP addressing is the default configuration.

  • Alternatively (IPv4 only) When a computer is configured to use DHCPv4 and no DHCPv4 server is available, Windows Server 2008 assigns an alternate private IP address automatically. By default, the alternate IPv4 address is in the range from 169.254.0.1 to 169.254.255.254 with a subnet mask of 255.255.0.0. You can also specify a user-configured alternate IPv4 address, which is particularly useful for laptop users.

Configuring Static IP Addresses

When you assign a static IP address, you need to tell the computer the IP address you want to use, the subnet mask for this IP address, and, if necessary, the default gateway to use for internetwork communications. An IP address is a numeric identifier for a computer. IP addressing schemes vary according to how your network is configured, but they’re normally assigned based on a particular network segment.

IPv6 addresses and IPv4 addresses are very different. With IPv6, the first 64 bits represent the network ID and the remaining 64 bits represent the network interface. With IPv4, a variable number of the initial bits represent the network ID and the rest of the bits represent the host ID. For example, if you’re working with IPv4 and a computer on the network segment 192.168.10.0 with a subnet mask of 255.255.255.0, the first 24 bits represent the network ID and the address range you have available for computer hosts is from 192.168.10.1 to 192.168.10.254. In this range, the address 192.168.10.255 is reserved for network broadcasts.

If you’re on a private network that is indirectly connected to the Internet, you should use private IPv6 addresses. Link-local unicast addresses are private IPv6 addresses. All link-local unicast addresses begin with FE80.

If you’re on a private network that is indirectly connected to the Internet, you should use private IPv4 addresses. Table 21-1 summarizes private network IPv4 addresses.

Table 21-1. Private IPv4 Network Addressing

Private Network ID

Subnet Mask

Network Address Range

10.0.0.0

255.0.0.0

10.0.0.0–10.255.255.255

172.16.0.0

255.240.0.0

172.16.0.0–172.31.255.255

192.168.0.0

255.255.0.0

192.168.0.0–192.168.255.255

All other IPv4 network addresses are public and must be leased or purchased. If the network is connected directly to the Internet and you’ve obtained a range of IPv4 addresses from your Internet service provider, you can use the IPv4 addresses you’ve been assigned.

Using the PING Command to Check an Address

Before you assign a static IP address, you should make sure that the address isn’t already in use or reserved for use with DHCP. With the PING command, you can check to see whether an address is in use. Open a command prompt and type ping, followed by the IP address you want to check.

To test the IPv4 address 10.0.10.12, you would use the following command:

ping 10.0.10.12

To test the IPv6 address FEC0::02BC:FF:BECB:FE4F:961D, you would use the following command:

ping FEC0::02BC:FF:BECB:FE4F:961D

If you receive a successful reply from the PING test, the IP address is in use and you should try another one. If no current host on the network uses this IP address, the PING command output should be similar to the following:

Pinging 192.168.1.100 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.1.100:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)

You can then use the IP address.

Configuring a Static IPv4 or IPv6 Address

One local area network (LAN) connection is available for each network adapter installed. These connections are created automatically. To configure static IP addresses for a particular connection, follow these steps:

  1. Click Start and then click Network. In Network Explorer, click Network And Sharing Center on the toolbar.

  2. In Network And Sharing Center, click Manage Network Connections. In Network Connections, right-click the connection you want to work with and then select Properties.

  3. Double-click Internet Protocol Version 6 (TCP/IPv6) or Internet Protocol Version 4 (TCP/IPv4) as appropriate for the type of IP address you are configuring.

  4. For an IPv6 address, do the following:

    • Select Use The Following IPv6 Address and then type the IPv6 address in the IPv6 Address text box. The IPv6 address you assign to the computer must not be used anywhere else on the network.

    • Press the Tab key. The Subnet Prefix Length field ensures that the computer communicates over the network properly. Windows Server 2008 should insert a default value for the subnet prefix into the Subnet Prefix Length text box. If the network doesn’t use variable-length subnetting, the default value should suffice. If your network does use variable-length subnets, you’ll need to change this value as appropriate for your network.

  5. For an IPv4 address, do the following:

    • Select Use The Following IP Address and then type the IPv4 address in the IP Address text box. The IPv4 address you assign to the computer must not be used anywhere else on the network.

    • Press the Tab key. The Subnet Mask field ensures that the computer communicates over the network properly. Windows Server 2008 should insert a default value for the subnet prefix into the Subnet Mask text box. If the network doesn’t use variable-length subnetting, the default value should suffice. If your network does use variable-length subnets, you’ll need to change this value as appropriate for your network.

  6. If the computer needs to access other TCP/IP networks, the Internet, or other subnets, you must specify a default gateway. Type the IP address of the network’s default router in the Default Gateway text box.

  7. DNS is needed for domain name resolution. Select Use The Following DNS Server Addresses and then type a preferred address and an alternate DNS server address in the text boxes provided.

  8. When you’re finished, click OK three times to save your changes. Repeat this process for other network adapters and IP protocols you want to configure.

  9. With IPv4 addressing, configure WINS as necessary, following the technique outlined in “Configuring WINS Resolution” on page 669.

Configuring Dynamic IP Addresses and Alternate IP Addressing

Many organizations use DHCP servers to dynamically assign IPv4 and IPv6 addresses. To receive an IPv4 or IPv6 address, client computers use a limited broadcast to advertise that they need to obtain an IP address. DHCP servers on the network acknowledge the request by offering the client an IP address. The client acknowledges the first offer it receives, and the DHCP server in turn tells the client that it has succeeded in leasing the IP address for a specified amount of time.

The message from the DHCP server can, and typically does, include the IP addresses of the default gateway, the preferred and alternate DNS servers, and the preferred and alternate WINS servers. This means these settings wouldn’t need to be manually configured on the client computer.

Although you can use static IP addresses with workstations, most workstations use dynamic addressing, alternative IP addressing, or both. You configure dynamic and alternative addressing by following these steps:

  1. Click Start and then click Network. In Network Explorer, click Network And Sharing Center on the toolbar.

  2. In Network And Sharing Center, click Manage Network Connections. In Network Connections, one LAN connection is shown for each network adapter installed. These connections are created automatically. If you don’t see a LAN connection for an installed adapter, check the driver for the adapter. It might be installed incorrectly. Right-click the connection you want to work with and then select Properties.

  3. Double-click Internet Protocol Version 6 (TCP/IPv6) or Internet Protocol Version 4 (TCP/IPv4) as appropriate for the type of IP address you are configuring.

  4. Select Obtain An IPv6 Address Automatically or Obtain An IP Address Automatically as appropriate for the type of IP address you are configuring. If desired, select Obtain DNS Server Address Automatically. Or select Use The Following DNS Server Addresses and then type a preferred and alternate DNS server address in the text boxes provided.

  5. When you use dynamic IPv4 addressing with desktop computers, you should configure an automatic alternative address. To use this configuration, on the Alternate Configuration tab, select Automatic Private IP Address. Click OK, click Close, and then skip the remaining steps.

  6. When you use dynamic IPv4 addressing with mobile computers, you’ll usually want to configure the alternative address manually. To use this configuration, on the Alternate Configuration tab, select User Configured and then type the IP address you want to use in the IP Address text box. The IP address that you assign to the computer should be a private IP address, as shown in Table 20-1 on page 631, and it must not be in use anywhere else when the settings are applied.

  7. With dynamic IPv4 addressing, complete the alternate configuration by entering a subnet mask, default gateway, DNS, and WINS settings. When you’re finished, click OK twice.

Configuring Multiple IP Addresses and Gateways

Using advanced TCP/IP settings, you can configure a single network interface on a computer to use multiple IP addresses and multiple gateways. This allows a computer to appear to be several computers and to access multiple logical subnets to route information or to provide internetworking services.

To provide fault tolerance in case of a router outage, you can choose to configure Windows Server 2008 computers so that they use multiple default gateways. When you assign multiple gateways, Windows Server 2008 uses the gateway metric to determine which gateway is used and at what time. The gateway metric indicates the routing cost of using a gateway. The gateway with the lowest routing cost, or metric, is used first. If the computer can’t communicate with this gateway, Windows Server 2008 tries to use the gateway with the next lowest metric.

The best way to configure multiple gateways depends on the configuration of your network. If your organization’s computers use DHCP, you’ll probably want to configure the additional gateways through settings on the DHCP server. If computers use static IP addresses or you want to set gateways specifically, assign them by following these steps:

  1. Click Start and then click Network. In Network Explorer, click Network And Sharing Center on the toolbar.

  2. In Network And Sharing Center, click Manage Network Connections. In Network Connections, right-click the connection you want to work with and then select Properties.

  3. Double-click Internet Protocol Version 6 (TCP/IPv6) or Internet Protocol Version 4 (TCP/IPv4) as appropriate for the type of IP address you are configuring.

  4. Click Advanced to open the Advanced TCP/IP Settings dialog box. Figure 21-2 shows advanced settings for IPv4. The dialog box for IPv6 is similar.

    Figure 21-2

    Figure 21-2 Configure multiple IP addresses and gateways in the Advanced TCP/IP Settings dialog box.

  5. To add an IP address, click Add below IP Addresses to display the TCP/IP Address dialog box. After you type the IP address in the IP Address field, enter the subnet mask in the Subnet Mask field for IPv4 addresses or the subnet prefix length in the Subnet Prefix Length field for IPv6 addresses. Click Add to return to the Advanced TCP/IP Settings dialog box. Repeat this step for each IP address you want to add.

  6. The Default Gateways panel shows the current gateways that have been manually configured (if any). To add a default gateway, click Add below Default Gateways to display the TCP/IP Gateway Address dialog box. Type the gateway address in the Gateway field. By default, Windows Server 2008 automatically assigns a metric to the gateway, which determines in which order the gateway is used. To assign the metric manually, clear the Automatic Metric check box, and then enter a metric in the field provided. Click Add, and then repeat this step for each gateway you want to add.

  7. Click OK three times to close the open dialog boxes.

Configuring DNS Resolution

DNS is a host name resolution service that you can use to determine the IP address of a computer from its host name. This lets users work with host names, such as http://www.msn.com or http://www.microsoft.com, rather than an IP address, such as 192.168.5.102 or 192.168.12.68. DNS is the primary name service for Windows Server 2008 and the Internet.

As with gateways, the best way to configure DNS depends on the configuration of your network. If computers use DHCP, you’ll probably want to configure DNS through settings on the DHCP server. If computers use static IP addresses or you want to configure DNS specifically for an individual user or system, you’ll want to configure DNS manually.

Basic DNS Settings

You can configure basic DNS settings by following these steps:

  1. Click Start and then click Network. In Network Explorer, click Network And Sharing Center on the toolbar.

  2. In Network And Sharing Center, click Manage Network Connections. In Network Connections, right-click the connection you want to work with and then select Properties.

  3. Double-click Internet Protocol Version 6 (TCP/IPv6) or Internet Protocol Version 4 (TCP/IPv4) as appropriate for the type of IP address you are configuring.

  4. If the computer is using DHCP and you want DHCP to specify the DNS server address, select Obtain DNS Server Address Automatically. Otherwise, select Use The Following DNS Server Addresses and then type primary and alternate DNS server addresses in the text boxes provided.

  5. Click OK three times to save your changes.

Advanced DNS Settings

You configure advanced DNS settings on the DNS tab of the Advanced TCP/IP Settings dialog box, shown in Figure 21-3. You use the fields of the DNS tab as follows:

  • DNS Server Addresses, In Order Of Use Use this area to specify the IP address of each DNS server that is used for domain name resolution. Click Add if you want to add a server IP address to the list. Click Remove to remove a selected server address from the list. Click Edit to edit the selected entry. You can specify multiple servers for DNS resolution. Their priority is determined by the order. If the first server isn’t available to respond to a host name resolution request, the next DNS server in the list is accessed, and so on. To change the position of a server in the list box, select it and then click the up or down arrow button.

  • Append Primary And Connection Specific DNS Suffixes Normally, this option is selected by default. Select this option to resolve unqualified computer names in the primary domain. For example, if the computer name Gandolf is used and the parent domain is microsoft.com, the computer name would resolve to gandolf.microsoft.com. If the fully qualified computer name doesn’t exist in the parent domain, the query fails. The parent domain used is the one set in the System Properties dialog box, on the Computer Name tab. (Click System And Maintenance\System in Control Panel, then click Change Settings and view the Computer Name tab to check the settings.)

  • Append Parent Suffixes Of The Primary DNS Suffix This option is selected by default. Select this check box to resolve unqualified computer names using the parent/child domain hierarchy. If a query fails in the immediate parent domain, the suffix for the parent of the parent domain is used to try to resolve the query. This process continues until the top of the DNS domain hierarchy is reached. For example, if the computer name Gandolf is used in the dev.microsoft.com domain, DNS would attempt to resolve the computer name to gandolf.dev.microsoft.com. If this didn’t work, DNS would attempt to resolve the computer name to gandolf.microsoft.com.

  • Append These DNS Suffixes (In Order) Select this option to set specific DNS suffixes to use rather than resolving through the parent domain. Click Add if you want to add a domain suffix to the list. Click Remove to remove a selected domain suffix from the list. Click Edit to edit the selected entry. You can specify multiple domain suffixes, which are used in order. If the first suffix doesn’t resolve properly, DNS attempts to use the next suffix in the list. If this fails, the next suffix is used, and so on. To change the order of the domain suffixes, select the suffix and then click the up or down arrow button to change its position.

  • DNS Suffix For This Connection This option sets a specific DNS suffix for the connection that overrides DNS names already configured for use on this connection. You’ll usually set the DNS domain name through the System Properties dialog box, on the Computer Name tab.

  • Register This Connection’s Addresses In DNS Select this check box if you want all IP addresses for this connection to be registered in DNS under the computer’s fully qualified domain name. This option is selected by default.

  • Use This Connection’s DNS Suffix In DNS Registration Select this check box if you want all IP addresses for this connection to be registered in DNS under the parent domain.

    Figure 21-3

    Figure 21-3 Configure advanced DNS settings on the DNS tab of the Advanced TCP/IP Settings dialog box.

Configuring WINS Resolution

You use WINS to resolve network basic input/output system (NetBIOS) computer names to IPv4 addresses. You can use WINS to help computers on a network determine the address of other computers on the network. If a WINS server is installed on the network, you can use the server to resolve computer names. Although WINS is supported on all versions of Windows, Windows Server 2008 primarily uses WINS for backward compatibility.

You can also configure Windows Server 2008 computers to use the local file LMHOSTS to resolve NetBIOS computer names. However, LMHOSTS is consulted only if normal name resolution methods fail. In a properly configured network, these files are rarely used. Thus, the preferred method of NetBIOS computer name resolution is WINS in conjunction with a WINS server.

As with gateways and DNS, the best way to configure WINS depends on the configuration of your network. If computers use DHCP, you’ll probably want to configure WINS through settings on the DHCP server. If computers use static IPv4 addresses or you want to configure WINS specifically for an individual user or system, you’ll want to configure WINS manually.

You can manually configure WINS by following these steps:

  1. Access the Advanced TCP/IP Settings dialog box for IPv4 and click the WINS tab as shown in Figure 21-4. In the WINS Addresses, In Order Of Use panel, you can specify the IPv4 addresses of each WINS server that is used for NetBIOS name resolution. Click Add if you want to add a server IPv4 address to the list. Click Remove to remove a selected server from the list. Click Edit to edit the selected entry.

    Figure 21-4

    Figure 21-4 Configure WINS resolution for NetBIOS computer names on the WINS tab of the Advanced TCP/IP Settings dialog box.

  2. You can specify multiple servers, which are used in order, for WINS resolution. If the first server isn’t available to respond to a NetBIOS name resolution request, the next WINS server on the list is accessed, and so on. To change the position of a server in the list box, select it and then click the up or down arrow button.

  3. To enable LMHOSTS lookups, select the Enable LMHOSTS Lookup check box. If you want the computer to use an existing LMHOSTS file defined somewhere on the network, retrieve this file by clicking Import LMHOSTS. You generally will use LMHOSTS only when other name resolution methods fail.

  4. WINS name resolution requires NetBIOS over TCP/IP services. Select one of the following options to configure WINS name resolution using NetBIOS:

    • If you use DHCP and dynamic addressing, you can get the NetBIOS setting from the DHCP server. Select Default: Use NetBIOS Setting From The DHCP Server.

    • If you use a static IP address or the DHCP server does not provide NetBIOS settings, select Enable NetBIOS Over TCP/IP.

    • If WINS and NetBIOS are not used on the network, select Disable NetBIOS Over TCP/IP. This eliminates the NetBIOS broadcasts that would otherwise be sent by the computer.

  5. Click OK three times. As necessary, repeat this process for other network adapters.