http://www.meebo.com/rooms

Saturday, March 15, 2008

Some Troubleshooting Commands

Some frequently use commands:

ipconfig - Displays IP configuration information
ping - Tests connections to other IP hosts
tracert - Displays route taken to destination
netstat - Displays network connections
nslookup - Directly queries the name server for information on a destination domain



1. Troubleshooting using Ipconfig


Ipconfig

Ipconfig is used to display the current IP configuration information for a host. Issuing this command from the command prompt will display the basic configuration information including: IP address, subnet mask and default gateway.

Ipconfig /all

The command ipconfig /all displays additional information including the MAC address, IP addresses of the default gateway and the DNS servers. It also indicates if DHCP is enabled, the DHCP server address and lease information.

How can this utility assist in the troubleshooting process? Without an appropriate IP configuration, a host can not participate in communications on a network. If the host does not know the location of the DNS servers it cannot translate names into IP addresses.

Ipconfig /release and ipconfig /renew

If IP addressing information is assigned dynamically, the command ipconfig /release will release the current DHCP bindings. Ipconfig /renew will request fresh configuration information from the DHCP server. A host may contain faulty or outdated IP configuration information and a simple renewal of this information is all that is required to regain connectivity.

If after releasing the IP configuration, the host is unable to obtain fresh information from the DHCP server, it could be that there is no network connectivity. Verify that the NIC has an illuminated link light, indicating that it has a physical connection to the network. If this does not solve the problem, it may be an issue with the DHCP server or network connections to the DCHP server.


2. Troubleshooting using Ping


Ping

If the IP configuration appears to be correctly configured on the local host, next, test network connectivity by using ping. Ping is used to test if a destination host is reachable. The ping command can be followed by either an IP address or the name of a destination host, as for example:

ping 192.168.1.2


When a ping is sent to an IP address, a packet known as an echo request is sent across the network to the IP address specified. If the destination host receives the echo request, it responds with a packet known as an echo reply. If the source receives the echo reply, connectivity is verified.

If a ping is sent to a name, such as www.google.com , a packet is first sent to a DNS server to resolve the name to an IP address. Once the IP address is obtained, the echo request is forwarded to the IP address and the process proceeds. If a ping to the IP address succeeds, but a ping to the name does not, there is most likely a problem with DNS.

If pings to both the name and IP address are successful, but the user is still unable to access the application, then the problem most likely resides in the application on the destination host. For example, it may be that the requested service is not running.

If neither ping is successful, then network connectivity along the path to the destination is most likely the problem. If this occurs, it is common practice to ping the default gateway. If the ping to the default gateway is successful, the problem is not local. If the ping to the default gateway fails, the problem resides on the local network.

The basic ping command usually issues four echoes and waits for the replies to each one. It can, however, be modified to increase its usefulness. The Options listed in the graphic display additional features available.



3. Troubleshooting using Tracert

Tracert
The ping utility can verify end-to-end connectivity. However, if a problem exists and the device cannot ping the destination, the ping utility does not indicate where the connection was actually dropped. To accomplish this, another utility known as tracert must be used.
The Tracert utility provides connectivity information about the path a packet takes to reach the destination and about every router (hop) along the way. It also indicates how long a packet takes to get from source to each hop and back (round trip time). Tracert can help identify where a packet may have been lost or delayed due to bottlenecks or slowdowns in the network.

The basic tracert utility will only allow up to 30 hops between a source and destination device before it assumes that the destination is unreachable. This number is adjustable by using the -h parameter. Other modifiers, displayed as Options in the graphic, are also available.


4. Troubleshooting using Netstat

Netstat

Sometimes it is necessary to know which active TCP connections are open and running on a networked host. Netstat is an important network utility that can be used to verify those connections. Netstat lists the protocol in use, the local address and port number, the foreign address and port number, and the state of the connection.

Unexplained TCP connections can pose a major security threat. This is because they can indicate that something or someone is connected to the local host. Additionally, unnecessary TCP connections can consume valuable system resources thus slowing down the host's performance. Netstat should be used to examine the open connections on a host when performance appears to be compromised.

Many useful Options are available for the netstat command.


5. Troubleshooting using Nslookup


Nslookup

When accessing applications or services across the network, individuals usually rely on the DNS name instead of the IP address. When a request is sent to that name, the host must first contact the DNS server to resolve the name to the corresponding IP. The host then uses IP to package the information for delivery.

The nslookup utility allows an end-user to look up information about a particular DNS name in the DNS server. When the nslookup command is issued, the information returned includes the IP address of the DNS server being used as well as the IP address associated with the specified DNS name. Nslookup is often used as a troubleshooting tool for determining if the DNS server is performing name resolution as expected.


No comments: