Wednesday, May 4, 2011

TCP/IP Configuration and Troubleshooting

CP/IP Configuration and Troubleshooting

TCP/IP, the Transport Control Protocol/Internet Protocol (often referred to in Windows as simply Internet Protocol), can be called the language of the Internet. It doesn't matter what type of computer you have; any computer or other device on the Internet needs to use TCP/IP to share information with the rest of the world's largest network.
Unfortunately, the flip side of the power of TCP/IP is that it can be very hard to configure. Every computer or other device on the Internet needs an IP address; computers and devices that are directly connected to the Internet need a public address unique to that machine. However, most Internet users don't connect directly to the Internet, but connect to an intermediate device or service that provides an IP address as needed. By default, Windows installs TCP/IP to receive an IP address from a Dynamic Host Control Protocol (DHCP) server, a feature of most ISPs as well as broadband modems, routers, and Internet sharing programs. A DHCP server automatically assigns an IP address when your computer makes the connection to the Internet.
However, if your ISP doesn't provide a setup CD for TCP/IP configuration, or if you need to make changes to your configuration because you are using Internet-sharing products such as a router, you might need to manually configure your computer's TCP/IP settings. This might include entering your computer's IP address, the IP addresses of the DNS servers the computer relies on to convert URLs into IP addresses, the IP address of the gateway to the Internet, and so forth. If you need to change these settings, open the properties sheet for the connection in Windows XP. Click the TCP/IP setting and select Properties. To learn how to view these settings in an easier-to-read list,
Using a Fixed IP Address with a Dial-Up or PPPoE Broadband Connection in Windows XP
To change the TCP/IP settings for a dial-up connection in Windows XP, follow these instructions:
1.
Open the My Network Places folder.
2.
Click View Network Connections.
3.
Right-click the connection you need to change and select Properties.
4.
Click Networking, click Internet Protocol (TCP/IP), and then click Properties (see Figure 8.42).



Figure 8.42. Configuring a Windows XP dial-up connection for the default server-assigned IP address (left) and for a fixed IP address (right).

5.
Click Use the Following IP Address and enter the IP address provided by the ISP for your computer.
6.
Click Use the Following DNS Server Addresses and enter the IP addresses for the DNS servers used by the ISP.
7.
If you need to make additional changes required by the ISP, such as WINS server IP addresses or additional DNS servers, click Advanced.
8.
Click OK when you are finished.
If your broadband Internet connection requires you to log in and provide a username and password, the provider is using PPPoE (point-to-point protocol over Ethernet) for your account. DSL broadband accounts are the primary users of PPPoE, but other types of broadband might use it as well. Use the same procedure listed here to configure PPPoE broadband accounts with a fixed IP address.
Using a Fixed IP Address with a LAN, Cable Modem, or Fixed Wireless Connection in Windows XP
By default, Windows configures all types of Internet connections to use server-assigned IP addresses. In most cases, this is the correct setting because broadband Internet devices and routers (which are used to share a single Internet connection among multiple users) are normally configured to use DHCP to provide IP addresses to the devices connected to them. However, in some cases, an Internet connection using a LAN or a direct connection to a cable modem or other broadband device might need to use a fixed IP address.
To configure a LAN or broadband Internet connection with a fixed IP address in Windows XP, follow these steps:
1.
Open the My Network Places folder.
2.
Click View Network Connections.
3.
Right-click the connection you need to change and select Properties.
4.
Click Networking, click Internet Protocol (TCP/IP), and then click Properties.
5.
Click Use the Following IP Address and enter the IP address provided by the ISP for your computer.
6.
Click Use the Following DNS Server Addresses and enter the IP addresses for the DNS servers used by the ISP.
7.
Click Advanced and click Add under the Gateway section; enter the IP address of the default gateway.
8.
Click OK when finished.

Using TCP/IP Diagnostics to Troubleshoot Your Connection

Microsoft provides several TCP/IP diagnostics programs as part of the TCP/IP protocol. The most important of these include the following:
  • PING This program sends data to a specified IP address or server name. The target IP then returns data to your computer, which helps you to determine if you have a live connection and how fast it is. You can also use PING to make sure your computer has TCP/IP installed.
  • IPCONFIG This program displays the IP address and other details about your computer, and it can be used to release and renew IP addresses provided by a DHCP server (often built into a router or broadband modem). Note that if you still use Windows 9x/Me, WINIPCFG performs the same function.
These commands are covered in more detail in the upcoming sections.
To run PING and IPCONFIG, you need to open a command-prompt window. Within Windows XP, click Start, Run, type CMD, and then click OK. Then, type the command and options you want to use after the command promptEXIT and press Enter to return to the Windows desktop. (>) and press Enter. After you are finished with command-line programs, type
Using IPCONFIG
If you're not a whiz at networking, digging around in the Networks icon in Control Panel probably isn't your idea of a good time. Fortunately, running IPCONFIG provides a fast way to see TCP/IP configuration information about your computer.
After opening a command prompt in Windows XP, type IPCONFIG and press Enter to display the name of the DNS server (the server that matches IP addresses to server names), the computer's IP address and subnet mask, and the default gateway (which connects your computer to the Internet). If you need more detailed information, type IPCONFIG /ALL and press Enter, as in Figure 8.43.

Figure 8.43. IPCONFIG /ALL displays your MAC address (physical address), along with your computer's IP address, whether you use DHCP to get an IP address, and other information that tech support people might need to know about your system.


If your computer has a wireless network adapter and an Ethernet port, you will see listings for both devices. If you use the wireless network adapter, the wireless network adapter entry lists information similar to the information shown in Figure 8.43, but the Ethernet adapter entry lists "media disconnected. "
If you see an invalid IP address such as 0.0.0.0 and your computer uses dynamic IP addressing, type IPCONFIG /RELEASE and press Enter to release the current IP addresses. Then type IPCONFIG /RENEW and press Enter to get new IP address information for your system. If you still see 0.0.0.0 as the IP address, you need to do the following:

1.
Make sure you have a working connection to the device that gives you your IP address (a router, a computer running a sharing program such as Internet Connection Sharing (ICS), or a broadband modem). If you use a separate switch and router, make sure both are turned on and that the switch is properly connected to the router and to all the computers.
2.
Make sure the router, computer with shared Internet access, or modem is turned on. If you connect through a computer running ICS or a third-party sharing program, see if you can access the Internet from that computer. If not, you need to get that computer working first before others can use its connection.
3.
Restart the router, computer with shared Internet access, or broadband modem. Wait for a computer that shares Internet access with others to complete booting.
4.
Restart your computer and see if you can connect to the Internet.
If you see an IP address starting with 169, your computer has assigned itself a private IP address because it could not receive an IP address from the DHCP server on your network. Use the same checklist used to recover from an invalid IP address to solve this problem.

Using PING

PING must be used from a command prompt, as described in the previous section. It can be used to determine the following:
  • Whether you have TCP/IP installed on your system
  • Whether you have a connection to a specified IP address or server name
  • The speed of your connection to a specified IP address or server name
To view the options you can use for PING, type PING /? and press Enter. Normally, you will use a command such as PING hostname (replace hostname with the IP address or server name). If PING can reach the specified hostname, it determines the host's IP address (a process called resolving), sends data to the host, and displays the roundtrip time (also called site latency), the host's IP address, and the time to live (TTL) value for that site (in milliseconds) . Figure 8.44 shows a typical PING command and output.


Figure 8.44. Using PING to test the connection to a popular Internet news site. Note the average roundtrip time (also called the ping rate or latency of the website).


Checking Your TCP/IP Configuration with PING
To make sure that you have TCP/IP installed on your system, type PING 127.0.0.1 (this IP address is called the local loopback address) and press Enter. If you don't have TCP/IP installed, you will get an "unknown host" error message instead of output similar to that shown in Figure 8.44. Reinstall the TCP/IP protocol through the Network icon in Control Panel.

Checking Your Connection to Your Broadband Modem or Router or ICS Host with PING
To determine the IP address of your broadband modem or router or the computer that shares its Internet connection with the network, use IPCONFIG. The value shown for the default gateway is the address to use in your PING command. For example, if the default gateway is listed as 192.168.0.1, use PING 192.168.0.1.
If you get a timeout error instead of a display similar to that shown in Figure 8.44, you might have a cabling problem or the router or modem might not be working. Restart your computer and try your connection again. If it fails, then check the broadband modem or router to see if the device is working correctly. If your computer uses another computer's Internet connection, restart the computer with the shared connection and make sure it's completely booted and is running the sharing software before you try your Internet connection again.
If you can ping the IP address of your broadband modem, the router, or the computer with the shared Internet connection, but you cannot ping remote IP addresses or websites, there is a problem with your Internet connection beyond your network. Restart the broadband modem, router, or computer with the shared connection and try the Internet connection again. If the connection still doesn't work, see "Using Signal Lights to Troubleshoot Your Connection," this chapter, p. 494, to troubleshoot your broadband modem, or see "Troubleshooting a Router", this chapter, p. 528, to solve the router problems.
If PING displays "Unknown Host" when you ping another computer or IP address, make sure you specified the correct hostname and check your TCP/IP settings to verify that you can reach a DNS server.

Using PING to Locate Fast Game Servers

Because PING can be used to measure the roundtrip speed between your computer and any other computer that responds to PING (some computers and websites block PING for security reasons), you can use PING to check your connection speed to a game server (PING gameservername or PING Ipaddress of gameserver). The lower the PING rate, the faster your connection.


Internet connections can be very complex, particularly if your ISP has provided you with a fixed IP address or if you use a network to provide shared Internet access. Using tools such as IPCONFIG and PING to determine your network configuration when it's working properly will make troubleshooting a broken system a lot easier to perform.

Network Connections

The Network Connections system folder displays the current network and Internet connections on your system. Right-click a connection to view its properties, repair it, enable or disable it, or use it as a bridge to another connection you specify (see Figure 8.45).


Figure 8.45. Using the Network Connections folder in Windows XP to repair a connection.


What Connections Do Which Task?

Figure 8.45 shows different types of connections. A broadband connection requires you to log in and supply a username and password when you connect. A dial-up connection uses a dial-up modem and your regular phone line. A LAN or high-speed Internet connection might use Internet Connection Sharing, a router, or a connection to a broadband device that's always on (no login or username/password required).


Troubleshooting Your Network/Internet Connections
The Network Connections display in Windows XP offers two different ways to fix a broken connection:
  • Repair This Connection
  • Change Settings of This Connection
Select the connection and click Repair This Connection or right-click the connection and select Repair to run a series of commands designed to fix common problems with connections that use dynamic IP addresses (as most Internet connections do). You can learn more about what Repair does from Microsoft Knowledge Base articlehttp://support. microsoft. com/default. aspx?kbid= 289256. 289256, available at
To fix other problems such as an incorrect user-set IP address, or to enable or disable the Internet Connection Firewall (Windows XP up through Service Pack 1) or Windows Firewall (Windows XP Service Pack 2 and beyond), select Properties from the right-click menu or Change Settings of This Connection from the left column. The General tab displays the network components installed. Authentication configures how your connection provides authenticated access to a network. Advanced lets you enable or disable the firewall. You can also click Change Windows Firewall Settings from the Network Tasks menu shown in Figure 8.45.

Using Net Diagnostics
Net Diagnostics runs a series of tests on your network, broadband, and dial-up Internet connections to determine whether they are working correctly. Net Diagnostics also checks software configurations for mail and news serversFigure 8.46). You should start your dial-up or broadband Internet connection before you start Net Diagnostics. to see if they are properly configured (see


Figure 8.46. An incorrect setting for the news server causes this service to fail.


Click the plus sign (+) next to a category to expand it for more information, particularly if it's marked as FAILED. If a failed message appears next to a mail or news server, check the spelling of the name; if the name is incorrectly spelled, Windows can't find the resource. Open your default mail or news reader software (Outlook Express is used by most Windows users) and correct the spelling. If the spelling is correct, the remote server might not be responding.
If you see a FAILED message for hardware such as your network adapter or modem, use Device Manager to diagnose the problem.

Troubleshooting the Windows XP Firewall

A firewall is a device or program that stops unauthorized network traffic. Windows XP contains a built-in firewall that is configured through the Advanced tab of the properties sheet for any type of network or Internet connection, including dial-up (see Figure 8.47).


Figure 8.47. Use the Advanced tab for a dial-up (left) or LAN connection (right) to access the Windows XP Firewall.


The original version of the Windows XP firewall was used in the initial release of Windows XP and Service Pack 1; it was designed primarily for direct connections to the Internet through a dial-up or broadband modem. If you enabled this version of the firewall on a system with shared resources such as printers or folders, other computers on the network could not access these resources. For this reason, many users of Windows XP used third-party firewalls instead.

Windows XP SP2 Firewall
Starting with Service Pack 2, the Windows Firewall was greatly improved; it now supports resource sharing on local area networks, while continuing to block unauthorized traffic from the Internet. Figure 8.48 shows the basic dialog for the SP2 version of the Windows Firewall.


Figure 8.48. This system's Windows Firewall is not enabled.


SP2 Firewall Exceptions
When Windows Firewall is enabled, it blocks Internet access except for programs on the Exceptions tab (see Figure 8.49). The Exceptions tab contains a short list of programs you can select as exceptions to the "no unsolicited inbound traffic" rule used by Windows Firewall. To permit a program on the list to run, make sure the box is checked. By default, Remote Assistance is enabled. However, if you want to share resources, you must also check File and Printer Sharing. And, if you want your computer to automatically detect Internet gateways, check UPnP (Universal Plug and Play) Framework.


Figure 8.49. The only default exception is for Remote Assistance.


Protect Your Traveling PC: Make No Exceptions!

If you take your PC on the road and use unsecured "hot spots" in libraries, hotels, and airport terminals, make sure you're protected against unauthorized traffic. Open the Windows Firewall dialog as soon as you boot up your PC in such situations and click the Don't Allow Exceptions check box shown in Figure 8.48. This disables the Exceptions list, preventing your system from unauthorized file sharing and other risks. When you return to your home or office, uncheck this box and your normal Exceptions list takes effect again.


If Windows Firewall prevents you from using network or Internet-enabled programs, click Add Program and choose the program that needs Internet access from the list of installed programs. If your program needs access to specified TCP port numbers (often the case with online games), click Add Port and specify the TCP port numbers your program requires.

SP2 Firewall Advanced Settings
By default, the settings in Windows Firewall are the same for all network and Internet connections. To specify exceptions for a particular connection, click the Advanced tab and click Settings in the Network Connection Settings portion of the dialog (see Figure 8.50). The Advanced tab is also used to configure the network activity log created by Windows Firewall, to configure error and status message sharing, and to reset the firewall to its defaults.


Figure 8.50. Use the Advanced tab to customize exceptions for a particular connection, to configure security logging or error and status information, or to reset the firewall to its defaults.

No comments:

Post a Comment