Troubleshooting TCP/IP Addressing Problems | Planning, Implementing, and Maintaining a Network Infrastructure (2024)

This chapter is from the book 

This chapter is from the book

MCSE 70-293 Exam Cram: Planning and Maintaining a Windows Server 2003 Network Infrastructure, 2nd Edition

Learn More Buy

This chapter is from the book

This chapter is from the book 

MCSE 70-293 Exam Cram: Planning and Maintaining a Windows Server 2003 Network Infrastructure, 2nd Edition

Learn More Buy

Troubleshooting TCP/IP Addressing Problems

Windows XP Professional and Windows Server 2003 offer several native programs that an administrator can use to troubleshoot TCP/IP issues. Some are full-fledged tools in their own right, such as FTP, but they can help in determining what might be affecting a TCP/IP network. Many of these TCP/IP troubleshooting tools are discussed in the sections that follow.

The PING Command

The PING command can be used to test network connectivity from a local system by sending an ICMP message to a remote host or gateway. On external networks such as the Internet, the use of PING might be somewhat limited, depending on how routers and firewalls are configured; many do not allow ICMP traffic. If the remote host receives the message, it responds with a reply message. PING notes the IP address, the number of bytes in the message, how long it took to reply (in milliseconds [ms]), and the length of Time –to Live (TTL) in seconds and shows any packet loss in terms of percentages, as shown here:

D:\>ping 192.168.1.225Pinging 192.168.1.225 with 32 bytes of data:Reply from 192.168.1.225: bytes=32 time<10ms TTL=128Reply from 192.168.1.225: bytes=32 time<10ms TTL=128Reply from 192.168.1.225: bytes=32 time<10ms TTL=128Reply from 192.168.1.225: bytes=32 time<10ms TTL=128Ping statistics for 192.168.1.225: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milliseconds: Minimum = 0ms, Maximum = 0ms, Average = 0msUsage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS][-r count] [-s count] [[-j host-list] | [-k host-list]][-w timeout] target_name

The following list describes the switches available for use with PING:

  • -t—Ping the specified host until stopped. To see statistics and to continue, type Ctrl+Break; to stop, type Ctrl+C.
  • -a—Resolve addresses to hostnames.
  • -n count—The number of echo requests to send.
  • -l size—Send buffer size.
  • -f—Set the Don't Fragment flag in the packet.
  • -i TTL—Time to Live.
  • -v TOS—Type of Service.
  • -r count—Record route for count hops.
  • -s count—Timestamp for count hops.
  • -j host-list—Loose source route along host list.
  • -k host-list—Strict source route along host list.
  • -w timeout—Time in milliseconds to wait for each reply.

The ARP Command

The ARP command displays and modifies the IP-to-physical address translation tables used by Address Resolution Protocol (ARP), as shown here:

ARP -s inet_addr eth_addr [if_addr]ARP -d inet_addr [if_addr]ARP -a [inet_addr] [-N if_addr]

The following list describes the switches available for use with ARP:

  • -a—Displays current ARP entries by referencing the current protocol data. If inet_addr is specified, the IP and physical addresses for only the specified computer are displayed. If more than one network interface uses ARP, entries for each ARP table are displayed.
  • -g—Same as -a.
  • inet_addr—Specifies an Internet address.
  • -N if_addr—Displays ARP entries for the network interface specified by if_addr.
  • -d—Deletes the host specified by inet_addr. You can use * as a wildcard with inet_addr to delete all hosts.
  • -s—Adds the host and associates the Internet address inet_addr with the physical (MAC) address.
  • eth_addr—Uses the physical (MAC) address and is given as six hexadecimal bytes separated by hyphens.
  • if_addr—Specifies the Internet address of the interface that should have its address translation table modified. If if_addr is not entered, the first applicable interface is used.

For example, the following code adds a static entry:

> arp -s 157.55.85.212 00-aa-00-62-c6-09 ....

The following displays the ARP table:

> arp -a

The IPCONFIG Command

IPCONFIG is a command-line tool for getting basic IP configuration information, including the IP address, subnet mask, and default gateway. The IPCONFIG /all switch produces a detailed configuration report for all interfaces on a system, including any configured remote access adapters, as shown here:

ipconfig [/? | /all | /renew [adapter] | /release [adapter]| /flushdns | /displaydns | /registerdns | /showclassid adapter| /setclassid adapter [classid] ]

The following list describes the switches available for use with IPCONFIG:

  • /all—Display full configuration information.
  • /release—Releases the IP address for the specified adapter.
  • /renew—Renews the IP address for the specified adapter.
  • /flushdns—Purges the DNS Resolver cache.
  • /registerdns—Reregisters DNS names.
  • /displaydns—Displays the contents of the DNS Resolver Cache.
  • /showclassid—Displays all the DHCP class IDs allowed for adapter.
  • /setclassid—Modifies the DHCP class ID.

The default is to display only the IP address, subnet mask, and default gateway for each adapter bound to TCP/IP. For /release and /renew, if no adapter name is specified, the IP address leases for all adapters bound to TCP/IP are released or renewed.

The NBTSTAT Command

NetBT Statistics (Nbtstat.exe) is a command-line tool that can be used to view and troubleshoot network NetBIOS over TCP/IP (NetBT) name resolution. It displays protocol statistics and current TCP/IP connections that are using NetBT.

Nbtstat resolves NetBIOS names to IP addresses by using several options for NetBIOS name resolution, including local cache lookup, WINS server query, broadcast, LMHOSTS and HOSTS file lookup, and DNS server query. It also displays protocol statistics and current TCP/IP connections using Nbtstat.

NBTSTAT [ [-a RemoteName] [-A IP address] [-c] [-n] [-r] [-R] [-RR] [-s] [-S] [interval] ]

The following list describes the switches available for use with NBTSTAT :

  • -a (adapter status)— Lists the remote machine's name table given its name.
  • -A (adapter status)— Lists the remote machine's name table given its IP address.
  • -c (cache)— Lists NBT's cache of remote (machine) names and their IP addresses.
  • -n (names)— Lists local NetBIOS names.
  • -r (resolved)— Lists names resolved by broadcast and via WINS.
  • -R (Reload)— Purges and reloads the cache name table and reloads the #PRE tagged entries from the LMHOST file if any are present.
  • -S (Sessions)— Lists the sessions table with the destination IP addresses.
  • -s (sessions)— Lists the sessions table, converting destination IP addresses to computer NETBIOS names.
  • -RR(ReleaseRefresh)— Sends Name Release packets to WINS and then starts Refresh.
  • RemoteName—Remote host machine name.
  • IP address—Dotted decimal representation of the IP address.
  • interval —Redisplays selected statistics, pausing the number of seconds specified by interval between each display. Press Ctrl+C to stop redisplaying statistics.

The NETSTAT Command

NETSTAT (Netstat.exe) is a command-line tool that displays TCP/IP statistics and active connections to and from the local system. It can also display all connections and listening ports and has an option to display the number of bytes sent and received and any network packets dropped (if applicable).

NETSTAT [-a] [-e] [-n] [-o] [-s] [-p protocol] [-r] [interval]

The following list describes the switches available for use with NETSTAT:

  • -a—Displays all connections and listening ports.
  • -e—Displays ethernet statistics. Can be combined with the -s option.
  • -n—Displays addresses and port numbers in numerical form.
  • -o—Displays the owning process ID associated with each connection.
  • -p protocol —Shows connections for the protocol specified by protocol , which can be TCP, UDP, TCPv6, or UDPv6. If used with the -s option to display per-protocol statistics, protocol can be any of the following: IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6.
  • -r—Displays the routing table.
  • -s—Displays per-protocol statistics. By default, statistics are shown for IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6; the -p option can be used to specify a subset of the default.
  • interval —Redisplays selected statistics, pausing the number of seconds specified by interval between each display. Press Ctrl+C to stop redisplaying statistics. If this switch is omitted, NETSTAT prints the current configuration information once.

The ROUTE Command

The ROUTE command-line tool displays the current IP routing table for the local system, and it can be used to add or delete IP routes and to add persistent routes.

ROUTE [-f] [-p] [command] [destination] [MASK netmask] [gateway] [METRIC metric] [IF interface]

The following list describes the switches available for use with ROUTE:

  • -f—Clears the routing tables of all gateway entries. If it is used with one of the ROUTE commands (see the following list), the routing tables are cleared before running the command.
  • -p—When used with the ADD command, it makes a route persistent across boots of the system. By default, routes are not preserved when the system is restarted. Ignored for all other commands, which always affect the appropriate persistent routes.

The following list describes the commands available for use with ROUTE:

  • PRINT—Prints a route.
  • ADD—Adds a route.
  • DELETE—Deletes a route.
  • CHANGE—Modifies an existing route.
  • destination—Specifies the host.
  • MASK—Specifies that the next parameter is the netmask value.
  • netmask—Specifies a subnet mask value for this route entry. If not specified, it defaults to 255.255.255.255.
  • gateway—Specifies the gateway.
  • interface—Specifies the interface number for the specified route.
  • METRIC—Specifies the metric—that is, the cost for the destination.

Names used for the destination command are looked up in the NETWORKS file on the local system. Names used for the gateway command are looked up in the HOSTS file on the local system. If the command is PRINT or DELETE, the destination or gateway can be a wildcard (*), or the gateway entry can be left blank. Invalid MASK entries, such as (DEST & MASK) != DEST, generate an error.

The HOSTNAME Command

HOSTNAME is a command-line tool for showing the local computer's hostname. It can be used for authentication purposes by the Remote Copy Protocol (RCP), Remote Shell (RSH), and Remote Execution (REXEC) tools.

The TRACERT Command

TRACERT is sometimes used to verify that IP addressing has been correctly configured on a client. It basically shows the route taken to reach a remote system.

tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name

Here is a list of available switches for the TRACERT command:

  • -d—Do not resolve addresses to hostnames.
  • -h maximum_hops —Maximum number of hops to search for target.
  • -j host-list—Loose source route along host list.
  • -w timeout —Wait the number of milliseconds specified by timeout for each reply.

The PATHPING Command

Like TRACERT, PATHPING shows the route taken to reach a remote system, but PATHPING does so with more detail and offers more functionality.

pathping [-g host-list] [-h maximum_hops][-i address] [-n] [-p period] [-q num_queries][-w timeout] [-P] [-R] [-T] [-4] [-6] target_name

Here is a list of available switches for the PATHPING command:

  • -g host-list —Loose source route along the host list.
  • -h maximum_hops —Maximum number of hops to search for target.
  • -i address —Use the specified source address.
  • -n—Do not resolve addresses to hostnames.
  • -p period —Wait the number of milliseconds specified by period between pings.
  • -q num_queries —Number of queries per hop.
  • -w timeout —Wait the number of milliseconds specified by timeout for each reply.
  • -P—Test for RSVP PATH connectivity.
  • -R—Test if each hop is RSVP aware.
  • -T—Test connectivity to each hop with layer-2 priority tags.
  • -4—Force using IPv4.
  • -6—Force using IPv6.

The FTP Command

FTP is used to transfer files from system to system over TCP ports 20 and 21 (by default), but it can also help you diagnose problems on your TCP/IP network. By using Internet Explorer with FTP, users experience a Windows Explorer-type of GUI environment for the FTP file transfer by having features such as file and folder views, drag-and-drop, and copy-and-paste available.

The command-line FTP allows for more functionality. FTP is considered a connected session that uses TCP. FTP commands are as follows: !, delete, literal, prompt, send ?, debug, ls, put, status append, dir, mdelete, pwd, trace ascii, disconnect, mdir, quit, type, bell, get, mget, quote, user, binary, glob, mkdir, recv, verbose, bye, hash, mls, remotehelp, cd, help, mput, rename, close, lcd, open, and rmdir. Here is an example of the syntax:

FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [host]

The following list explains the options you can use with the FTP command:

  • -v—Suppresses display of remote server responses.
  • -n—Suppresses auto-login at initial connection.
  • -i—Turns off interactive prompting during multiple file transfers.
  • -d—Enables debugging.
  • -g—Disables filename globing.
  • -s: filename —Specifies a text file containing FTP commands; the commands automatically run after FTP starts.
  • -a—Use any local interface when binding a data connection.
  • -A—Log in as anonymous.
  • -w: buffersize —Overrides the default transfer buffer size of 4,096.
  • host —Specifies the hostname or IP address of the remote host to connect to.

The TFTP Command

Trivial File Transfer Protocol allows for connectionless transfer of files to and from systems using UDP. Although TFTP is limited in functionality, there are still some command-line switches that can be used to tailor its performance:

TFTP [-i] host [GET | PUT] source [destination]

Definitions for these switches are as follows:

  • -i—Specifies binary image transfer mode (also called octet). In binary image mode, the file is moved literally byte by byte.
  • host —Specifies the local or remote host by name.
  • GET—Transfers the file destination on the remote host to the file source on the local host.
  • PUT—Transfers the file source on the local host to the file destination on the remote host.
  • source —Specifies the file to transfer.
  • destination —Specifies where to transfer the file.

The TELNET Command

Telnet is a command-line terminal emulation program that enables an administrator to perform commands on a remote computer from a command window on a local system. Here is an example of the syntax:

telnet [-a] [-e char] [-f filename] [-l user] [-t term] [host] [port]

Definitions for TELNET switches are as follows:

  • -a—Attempts automatic logon. Same as -l option, except it uses the currently logged on user's name.
  • -e char —Escape character to enter Telnet client prompt.
  • -f filename —Filename for client-side logging.
  • -l user —Specifies the username to log in with on the remote system. Requires that the remote system support the TELNET ENVIRON option.
  • -t term —Specifies terminal type. Supported term types are vt100, vt52, ansi, and vtnt only.
  • host —Specifies the hostname or IP address of the remote computer to connect to.
  • port —Specifies a port number or service name.

The RCP Command

Remote Copy Protocol (RCP) uses TCP to copy files to and from systems running the RCP service. It can be scripted in a batch file and does not require a password. The remote host must be running the Remote Shell Daemon (RSHD) service, and the user's username must be configured in the remote host's .rhosts file. Microsoft's implementation of TCP/IP includes the RCP client software but not RSHD services. RCP is one of the r-commands available on all UNIX systems.

RCP [-a | -b] [-h] [-r] [host][.user:]source [host][.user:] path\destination

The following list explains the options you can use with the RCP command:

  • -a—This is the default transfer mode that specifies ASCII transfer mode. This mode converts the end-of-line (EOL) characters to a carriage return for UNIX and a carriage return/line feed for personal computers.
  • -b—Specifies binary image transfer mode.
  • -h—Transfers hidden files.
  • -r—Copies the contents of all subdirectories; destination must be a directory.
  • host —Specifies the local or remote host. If the host is specified as an IP address or if the hostname contains dots, you must specify the user.
  • . user :—Specifies a username to use instead of the current username.
  • source —Specifies the files to copy.
  • path \ destination —Specifies the path to the logon directory on the remote host.

The RSH Command

Remote Shell (RSH) enables clients to run commands directly on remote hosts running the RSH service without having to log on to the remote host. Microsoft's implementation of TCP/IP includes the RSH client software but not the RSH service. If a user on a computer running in a Windows domain tries to use RSH to run a command on a remote UNIX server running RSH, the domain controller is required by the RSH client to resolve the user's username. RSH is one of the UNIX r commands that is available on all UNIX systems.

The REXEC Command

Remote Execution (REXEC) runs commands on remote hosts running the REXEC service and authenticates the username on the remote host before executing the specified command.

REXEC host [-l username] [-n] command

The following list defines options to use with the REXEC command:

  • host —Specifies the remote host on which to run the command.
  • -l username —Specifies the username on the remote host.
  • -n—Redirects the input of REXEC to NULL.
  • command —Specifies the command to run.
Troubleshooting TCP/IP Addressing Problems | Planning, Implementing, and Maintaining a Network Infrastructure (2024)

FAQs

How do I troubleshoot basic TCP IP problems? ›

Troubleshooting checklist
  1. Step 1: Capture a network diagram. ...
  2. Step 2: Networking traces. ...
  3. Step 3: Ping the computer's local IP address. ...
  4. Step 4: Troubleshoot error messages that occurs during the ping or telnet test. ...
  5. Step 5: Ping or Telnet to the default gateway. ...
  6. Step 6: Check issues that affects the specific destination node.
Dec 26, 2023

Which TCP IP utility should you use to troubleshoot this connectivity problem? ›

tracert/traceroute —A TCP/IP utility that determines the route data takes to get to a particular destination. This tool can help you to determine where you are losing packets in the network, helping to identify problems.

Which command line troubleshooting tool will you use to verify that the TCP IP stack functions correctly on the local host? ›

C. The ipconfig /all utility will display the current configuration of TCP/IP on a given workstation—including the current IP address, DNS configuration, WINS configuration, and default gateway.

Which command is used to identify TCP IP errors such as connection problems? ›

The netstat command is a good tool for diagnosing common problems in a Transmission Control Protocol/Internet Protocol (TCP/IP) network environment. The netstat command lets you determine which area of the network has a problem.

What is the IP network troubleshooting? ›

Network troubleshooting is the act of discovering and correcting problems with connectivity, performance, security, and other aspects of networks.

How do you fix an IP address problem? ›

How to resolve top IP conflicts
  1. Isolate the devices experiencing the conflict. The key step here is to make sure you can reliably get into one of the devices to reconfigure them. ...
  2. Assign a non-conflicting address. Once you're able to reliably access one of the devices, give it a “good” IP address.

How to troubleshoot networking issues? ›

Network Troubleshooting: A Step-by-Step Guide
  1. Step 1: Define the Problem. ...
  2. Step 2: Check Physical Connections. ...
  3. Step 3: Restart Devices. ...
  4. Step 4: Run Network Diagnostics. ...
  5. Step 5: Check for Software Issues. ...
  6. Step 6: Monitor Network Traffic. ...
  7. Step 7: Update Firmware and Software. ...
  8. Step 8: Test Different Devices.
Sep 8, 2023

How to troubleshoot network connectivity problems? ›

Here are the steps for fixing network connectivity issues:
  1. CHECK THE SILLY LITTLE THINGS. ...
  2. CHECK IF IT IS THE WEBSITE'S PROBLEM. ...
  3. CHECK IF IT IS JUST YOUR DEVICE. ...
  4. RESTART/HARD BOOT/POWER CYCLE. ...
  5. CHECK FOR A VALID IP ADDRESS. ...
  6. TRY A PING AND TRACE THE ROUTE. ...
  7. INFORM YOUR IT SUPPORT/ISP OF THE NETWORK CONNECTIVITY PROBLEM.
Jan 9, 2024

What is the first step to follow when troubleshooting? ›

The first step in the troubleshooting process is to describe the problem completely. Problem descriptions help you and IBM® Software Support know where to start to find the cause of the problem. This step includes asking yourself basic questions: What are the symptoms of the problem?

What is the basic tool for testing TCP IP connectivity? ›

The ping command tests whether a remote host can be reached from your computer. This simple function is extremely useful for testing the network connection, independent of the application in which the original problem was detected.

How to check if TCP/IP is working? ›

Verify TCP/IP is installed and functioning properly
  1. Click Start > Programs > Accessories > Command Prompt. ...
  2. Type 'ipconfig' to return the IP address of the system. ...
  3. Ping the hostname as returned in step 1.
Apr 25, 2020

What is the command to check TCP IP configuration? ›

Find Your TCP/IP Properties in Microsoft Windows 10

At the command prompt, type ipconfig /all and press Enter. Note the values that you see for the primary network adapter.

How do you check TCP IP configurations and IP connectivity? ›

To check TCP/IP configurations and IP connectivity on a system, you can use the following two command-line utilities: ipconfig (Windows): Syntax: ipconfig. Description: This command is used on Windows systems to display the current configuration of the installed network interfaces.

How do I test TCP IP communication? ›

Using Telnet to test the TCP/IP stack
  1. Start a Telnet server process (or daemon) on one machine. Check your TCP/IP software documentation to see how to do this. ...
  2. Start the Telnet client process on the other machine, and see if you get a connection. Again, check your TCP/IP software documentation to see how to do this.

Which command is commonly used to find current TCP IP network connections? ›

The netstat command generates displays that show network status and protocol statistics. You can display the status of TCP and UDP endpoints in table format, routing table information, and interface information.

How do I test my TCP IP connection? ›

Testing TCP/IP using the command prompts

From a workstation, open a command prompt and type ping followed by the IP address of the interface you have configured.

How to debug TCP connection? ›

Debugging TCP connections
  1. Start the server.
  2. Start the Client.
  3. Press Run on the server,
  4. It will tell the client that it has started and the client will do tcp read for an incoming 1 byte signal.
  5. server will run through its loop, then tcp write a 1 byte signal to client.
Mar 7, 2019

How error is handled in TCP IP? ›

Error control in TCP is mainly done through the use of three simple techniques : Checksum – Every segment contains a checksum field which is used to find corrupted segments. If the segment is corrupted, then that segment is discarded by the destination TCP and is considered lost.

Top Articles
Latest Posts
Article information

Author: Jeremiah Abshire

Last Updated:

Views: 5625

Rating: 4.3 / 5 (54 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Jeremiah Abshire

Birthday: 1993-09-14

Address: Apt. 425 92748 Jannie Centers, Port Nikitaville, VT 82110

Phone: +8096210939894

Job: Lead Healthcare Manager

Hobby: Watching movies, Watching movies, Knapping, LARPing, Coffee roasting, Lacemaking, Gaming

Introduction: My name is Jeremiah Abshire, I am a outstanding, kind, clever, hilarious, curious, hilarious, outstanding person who loves writing and wants to share my knowledge and understanding with you.