Tag Archives: troubleshoot

Ping - Network Troubleshoot

How to troubleshoot a slow computer network?

Troubleshoot Network - Ping

Pinging Google

Your network is slow. What do you do to make it faster?
The answer is not simple and the reason for your slow network could be a lot of things. You have to take a step by step approach and isolate the bottleneck. Once you isolate the point of failure it is easier to find the problem.

Many times a packet sniffer will help you find the problem faster. A good free packet sniffer is Wireshark. Another packet sniffer is Microsoft Network Monitor.

Here is a list of Windows-based network tools that can help you troubleshoot almost any problem in a Computer Network:
Ping – a network utility to test if a computer is up and reachable or not. Ping uses the ICMP protocol to send echo requests.
Nmap – a port scanner. You need a port scanner to enumerate open ports and live IP addresses.
Tracert – a utility that traces the path of a network packet enumerating all of the routers that it passes through.
Wireshark – a packet sniffer.
Netstat – a utility that enumerates all the open ports on the local computer.
Ipconfig – a utility to list or modify the properties of a network adapter.
Netsh – a powerful Windows utility to modify various network properties. It is a scripting utility that basically controls every aspect of the Network on a Windows computer.
One of the cool usages of the netsh is to reset the TCP/IP stack to the defaults without the need to uninstall and reinstall the TCP/IP protocol as we needed with the older OSs.
Route – enables the view and manipulation of routing.
Nslookup – a name resolution utility. Very useful to check DNS servers and validity of name records.
Arp – a utility that allows you to get information about MAC address to IP address resolution.
Getmac – Provides the MAC address and lists associated network protocols for all network cards for a local or remote computer.
Getname – displays the computer name.
PathPing – Combines the functions of Traceroute and Ping, very powerful tool.
Net services commands – Performs a broad range of network tasks such as Network mapping, authentication, controls services, etc…

If you are not sure how to use these tools read the Help or from the command line, (all of these are command line tools), issue the command with the help option, for instance: “pathping /?”. This will give you a list of other valid options.  

This article is part of a five posts series regarding Network Troubleshooting.

  1. How to troubleshoot a slow computer network?
  2. Troubleshoot a Slow Network – The entire Network is Slow
  3. Troubleshoot a Slow Network – Slow Server
  4. Troubleshoot a Slow Computer Network – Only One Computer on the Network is Slow
  5. Troubleshoot a Slow Computer Network – Your Computer is Slow and Not the Network

Troubleshoot a Slow Computer Network – Your Computer is Slow and Not the Network

Slow Data Transfer is not Always caused by the Network

Slow data transfers are sometimes caused by a slow computer. Determine if the computer is the reason by comparing the transfer speed with a different computer connected on the same switch port. If the speed is the same, the problem is your network. If you get faster data transfers with a different computer then the problem is the computer.

A computer could be slow because of various reasons:

A bad network card. Troubleshoot: Swap the network card and test the data transfers afterwards.
The computer is outdated and it runs software that needs more resources. Troubleshoot: change the computer.
Slow hard-drive. The hard-drive will always be the computer’s bottle neck. It is the slowest part of a desktop computer. Old hard-disks are very often seen in new computers. Hard-disk fragmentation is a frequent reason for slow computers. Troubleshoot: Defragment often your hard-drive and reserve a 25% free space on the drive.
The computer might be infected with a virus or a Trojan. Troubleshoot: scan the computer for viruses. On a Windows machine run the command “netstat -a -b” to see what ports are being used and which program is using them. Use a network sniffer and monitor the network activity on the specific computer.
The transfer is intermittently slow, check what background processes are using the CPU, Memory, and hard-drives. Windows Vista can sometimes be a resources hog by allocating too many resources for background processes such as indexing and running the antispyware. Antivirus or other antimalware can consume a lot of the computers’ resources. Troubleshoot: Change the schedule for maintenance tasks to a time when you are not using the computer. Check what other programs are running in the background and configure accordingly. Some antivirus programs enable scanning the network drives by default.
A slow network printer. A slow network printer can be caused by the power save feature. If you use the printer very often you might consider turning off the power save.
A slow Network Attached Storage device. A slow NAS could be caused by improper SAMBA configuration or a disk power save feature. The power save feature is fairly easy to fix, just disable it if you find that you are using the drive very often. The SAMBA tune up is more difficult and usually it is complicated to have terminal access to the device itself. Many manufacturers do not allow direct access to the OS. SAMBA is a free implementation of Microsoft’s SMB protocol. SAMBA, SMB and CIFS offer file and print sharing services for Windows and Linux/Unix machines

This article is part of a five posts series regarding Network Troubleshooting.

Troubleshoot a Slow Computer Network – Only One Computer on the Network is Slow

Only One Computer on the Network is Slow

Client Computer Network Mask Wrongly Configured
Your network is a class C network, (net-mask 255.255.255.0), and your client computer has its IP address configuration on a class B network, (255.255.0.0). Change the network mask of the client to match the network configuration.

Poor network cards
Bad network cards or bad drivers are very often the reason for poor transfer rates. Test the transfer rate with a different network card.
An outdated computer can also slow down your network transfer.

Bad Network Configuration
DNS Configuration
can be the cause a of slow network connections.
Wrong DNS address in the IP configuration can slow your network dramatically. Your DNS client will try to connect to an inexistent or not working DNS server then give up and try your secondary DNS server. This translates in slowdowns and sometimes even DNS resolution errors.
Fix: Ping the DNS address or, even better, use nslookup and connect to both of your DNS servers to check if they work.

The TCP/IP protocol stack corrupted.

Sometimes no matter what you do you can’t fix the network and this is because the TCP/IP becomes corrupted. The only thing that fixes it is a reset. On older Operating Systems, such as Windows 98 and Windows NT, the fix was to uninstall and reinstall the whole TCP/IP suite of protocols.
Fix: issue the following command to reset it: netsh int ip reset c:\resetlog.txt.

More Than One Default Route
Advanced Lan SettingsA very common mistake is to assign more than on default route to the same computer. Do not confuse load balancing with multiple Default Gateways. You are configuring two network cards, and both of them have a default gateway. This configuration will not work. Usually, a Windows computer will warn you that this is not a good idea, but some users will choose to ignore the warning.
This is a typical problem for laptop users, they connect into the Lan environment and leave the wireless connection on. This will create a lot of problems for corporate users and even for home users.
In order for this type of configuration to work, special routing rules and IP configuration is needed. it is easier to turn the wireless of or have an adapter manager that will automatically do that for you based on your rules.
Advanced Tcp/IP Settings
On a Windows XP there is a way to assign priorities to network cards using a graphic interface. from the Network Connections applet in the Control Panel, click on the Advanced menu and choose Advanced Settings.
On the Advanced Settings window arrange the network cards according to the correct priority.
Another way to achieve this is to change the gateway’s metric for each of the network adapters on the computer. To do this, open the TCP/IP properties on each of the network addapters with a default gateway configured, and click on the Advanced button. On the Advanced TCP/IP Settings window, uncheck the Automatic Metric for the Default Gateway, and enter a value according to your network topology. The lower the metric, the higher the preference for a default route.

This article is part of a five posts series regarding Network Troubleshooting.

Troubleshoot a Slow Network – Slow Server

Slow Server

How do we know the server is slow and the problem is not elsewhere?
Make a file transfer between any two other computers on the network. Compare the measurements with the server’s transfer rates.
What are the reasons for a slow server?
There are many reasons for a slow server. The server is many times the bottle-neck of a network. Here are a few reasons for a slow server:
An average, or below average network card, (you need good quality network cards for a server).
Server Network Card Underutilized. Connect your server on the backbone or on 1GB switch ports to make use of the high speed network card. You probably want to limit all your clients to transfer at 100Mb so that there is no traffic discrimination. If your server and switches support higher transfer rates, (10GB ports), make sure you make use of it.
Slow disks. Poor hardware is many times the main reason. Improper configuration, such as choosing the wrong RAID type, or not using write caching can be another reason.
Too many clients on a server. If too many clients make requests to the same single server this could overload the server and it will perceived as a slow network by the users. Measure your server’s performance on load using the performance logs and alerts and the system monitor in Windows. Usually the performance is changing over the course of a day based on the number of users who access the server at the same time. Sometimes adding another network card would be sufficient. Enabling cache writing on the SCSI card can help a lot, (make sure you install a cache battery), adding a new SCSI card and additional disks to offload the existing ones could be of help. Sometimes adding another CPU can make a difference, (if you have free CPU slots). Memory is very often the most used method of upgrading, but most of the times it is not the needed solution. Use the performance logs and alerts and the system monitor and compare with the recommended thresholds to determine what your bottleneck is.
Slow server response, (packet sniffer to determine the handshake time), Adjust the server’s configuration to optimize the handshaking time; (this is a fairly advanced optimization task).

This article is part of a five posts series regarding Network Troubleshooting.

How to – Debian Static IP Configuration

On a basic Debian machine without a graphical interface assigning the same IP address all the times can be achieved in two ways.

Static IP Address

To configure a static IP, (an IP that will never change), and not use DHCP you must edit the file /etc/networking/interfaces.
Insert the following code at the end of the file and don’t change anything else unless you know what you do:

# The first network card – this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
#Private Interface
iface eth0 inet static
address 192.168.0.254
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
## only use gateway if your machine is not multi-homed, (two network cards). You can only have a default route.
# gateway 192.168.0.1

In our case the IP of the Debian machine is 192.168.0.254. The gateway, (the router), is 192.168.0.1 and it is a standard Class C network.

To refresh the network configuration without restarting the server execute:
/etc/init.d/networking restart

If that doesn’t work reboot the machine (reboot or init 6).

For a second network card you should add at the end of the file another entry for your second card:
#External interface
iface eth1 inet static
address 1.1.2.2
netmask 255.255.255.0
network 1.1.2.0
gateway 1.1.2.254

Check the new configuration by issuing the command:
ifconfig

DHCP Reserved address

If you want to set this via DHCP you have to make a reservation into your DHCP server for your network card’s MAC address.
You can find your MAC address by using the command ifconfig.
The server will spit some information on the screen that looks like this:
eth0 Link encap:Ethernet HWaddr 00:33:ff:c4:2f:2b
inet addr:192.168.0.254 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::230:f4ff:fdd4:bf33/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:93373 errors:0 dropped:0 overruns:0 frame:0
TX packets:38320 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:76539317 (72.9 MiB) TX bytes:5551726 (5.2 MiB)
Interrupt:17 Base address:0×6000

The first line is the one you are interested in:
HWaddr 00:33:ff:c4:2f:2b
In your DHCP server make a reservation using 0033ffc42f2b as your MAC address. Note the removal of the colons in between.
Reboot the server and when the machine will try to renegociate its IP address the DHCP server will assign it the newly reserver address.

If you want to add a static route on your Debian machine edit your /etc/networking/interfaces file and add the following two lines at the end of your eth1, (eth0), configuration.
up route add -net 192.168.22.0 netmask 255.255.255.0 gw 192.168.100.254
down route del -net 192.168.22.0 netmask 255.255.255.0 gw 192.168.100.254
The two lines tell Debian to add a static route when the computer boots, and to remove the static route when it shuts down.

The parameters mean: 192.168.22.0 is the network you want to make your Debian machine aware of; 255.255.255.0 is the netmask of your added network, 192.168.100.254 is the gateway to that network.

Why would you need a static network? In our configuration example your default route is through your public network interface.
Any additional internal networks or VPN’s will not be available. The configuration above tells your Debian machine how to reach any VPN or networks not reachable via the default Network.

There is another change needed if you plan to configure this machine as a simple router. You need to enable IP forwarding, in other words allow the machine to forward traffic for its clients.
# nano /etc/sysctl.conf
Change the following line : net.ipv4.ip_forward = 0
to net.ipv4.ip_forward = 1

Reboot the machine to make the setting active, or issue the following command to make the kernel aware of the change:
# echo 1 > /proc/sys/net/ipv4/ip_forward

Why do you want your Debian machine to connect to other networks or VPN’s? If your machine is a proxy, or a gateway it needs to know where to route packets for its clients. Even if your remote networks or VPN’s have their own proxy, if you have a shared server in one of these networks you need to make it available for your users. It is easier to maintain a static route on one server than add it to all of the clients.

My Wireless Network Doesn’t Work When the Baby is Sleeping

Having a baby could affect your wireless communication?

Yes. Well, indirectly yes. Who has a baby and a wireless network will most likely have a baby monitor. We all like to spend our time blogging, or browsing the Internet while the baby is asleep, but we couldn’t blog a word if we didn’t keep an eye on the baby.

Many baby monitors will interfere with wireless networks. The wireless connection will work for most of the time and then suddenly it will stop working; after a wile will resume functioning properly. It could work without interruption but slow down transfer rates as network error corrections will be needed more than regularly.

How TO Eliminate Interference Between Baby Monitors and Wireless Networks?

Make sure you verify the band used by the baby monitor is not overlapping with the wireless band. If it does, you can change the channel on your Baby Monitor. How do you know if it overlaps? Read the instructions manual, and if you don’t have it, just try different channels on your baby monitor until you get a stable connection on your Network.
Another option would be to change the channel used by your wireless access point. If you have an old baby monitor consider buying a newer model, the newer models have less interference with your WiFi Network. I know that this sounds so un-green and consumerist, but I tested this and newer and more expensive models are better protected to interferences.

Is your Toddler Curious about the Little Box on the Wall?

If your child is a toddler he’ll be very curious about the different devices hanging around in your office and he will find your wireless AP. They will try, whenever they have the chance, to press any buttons and pull all the cables. Make sure, when your connection goes off, to check all the connections to the access point and to the modem. Consider to move your devices where your child cannot reach them.

How to make a Loopback Cable

Why do I need a loopback cable?

Sometimes in order to test a computer’s hardware or software we need a network link for the network adapter. The solution, very often, is to carry around a hub. A loopback software adapter sometimes could help but in many cases it doesn’t work.
The best solution is to create a loopback cable. The loopback cable, or loopback addapter, will work as the computer, or router, or other networked device, was connected to a real network transmitting and receiving packets. The packets are sent and received in a loop, this kind of setup allowing the technician to troubleshoot hardware.

What is a loopback cable?

A loopback cable redirects the output back into itself. This effectively gives the NIC the impression that it is communicating on a network, since its able to transmit and receive communications.

How to make a loopback cable

The short description for a 100T base Ethernet loopback cable:
Redirect Pin 1 to Pin 3 and Pin 2 to Pin 6.
The detailed explanation with pictures follows:
Materials needed:
Good quality Crimper
Cutter pliers
RJ45 plug
Utility knife
UTP cable
Tools needed for crimping
 
Cat 5 Twisted PairsTake a CAT3 or CAT5 UTP cable and strip the jacket trying to preserve the jacket intact, as you will need it later.
Maintain the wire twists as this will prevent electromagnetic interferences between the two pairs. Untwist the least possible so you could insert the wires into the RJ45 plug. For a 100T base loopback you only need two pairs, I choose orange and green pairs.
Bend the orange pair at the middle making a U shape.
CAT 5 twisted paires

Insert the Orange pair as follows:
White-Orange wire into the pin number 1 and pin number 3 and the solid Orange wire into pin number 2 and pin number 6. Try do insert the four ends at the same time as this is easier.

Pinout RJ45 Plug Loopbac

Click to enlarge

Pinout loopback cable

Crimping the cable

At this point you can crimp your plug for a 100T base loopback cable. Make sure you insert the cable jacket before crimping. The jacket has to be inserted into the plug about an inch so that it’s crimped in and offers rigidity to the loopback cable.

If you want your loopback cable to work at 1Gb you need to insert the second pair, (green), insert the cable jacket and only crimp after that. The green pair is inserted as follows: solid-Green wire in the pin 4 and pin 7 and white-green into 5 and 8.

Improve this article by commenting and asking questions.

How to Troubleshoot Internet Connection Speed

Who didn’t have problems with the Internet speed at least once? OK, many of us, but as an IT professional I always meet and talk to the people who did have problems with their Internet Speed.
I hate to be run through standard procedure, which by the way I know by hearth, (I used to work in an ISP call center). You probably hate it too. If your problem is the Internet connection you will probably have to talk to an agent anyway, but, (with the help of my article), you will know from the start what’s wrong with your Internet connection.

Step 0 – Never Assume

First think I have learned in the Call Center was to never assume. Many times, when people call the Help Line they have a “pretty good idea” of what’s the problem. Usually they are wrong. Don’t do this mistake, do not presume or, do not presume without checking the facts. We hate the Call centers for making us do stupid things, check things that we don’t need to. The truth is that in most of the cases we overlook things and going by the book helps.
When we open up a browser and there is an error message “Page not found” we immediately assume that the connection is to blame. In fact many times this is just a temporary problem of our home page site. Try a different address to see if the connections is down or the home pages’s website is down. Try google.com for instance or ibm.com, or bing.com; if these don’t work it could be the connection

Step 1 – Try a reboot

Almost every time a reboot solves the problem. This might sound anecdotic but it actually works in many cases. Reboot the computer, reboot the modem, reboot the router behind the modem.

Isolate the problem
First of all we need to know that the problem is not in the network.

  • Use a computer that you are sure is not infected by any Mallware. Connect it directly to the DSL device, cable modem, or other type of modem.
  • Do not use the wireless; connect the computer with a network cable. This way you are testing the connection and nothing else.
  • As already mentioned, you need to make sure your computer works fine and is not infected. Use antivirus and antispyware if needed.
  • If you are not sure about the health of your computer you can always boot from a Live Linux CD. On the Live CD you will have a browser and other useful tools.
  • Once the system is up and you are connected to the Internet, test your connection with one of the free online services. Google-it and you will find many online DSL speed test websites. If the speed is OK then, the problem is in your computer, or your network, go to step 4.
  • Step 2 – Modem troubleshoot

    If the DSL speed test failed, (no connection or slow speed), you have a few things to try before calling the ISP
    Usually, for a DSL connection, the telephone line is shared with another device, a fax or a phone. Some of us have a separate line for DSL or they don’t even have a phone line, they only have a dry loop. If you don’t understand any of these you most likely don’t have it.

  • If you share the DSL line with another device you need to connect this second device through a DSL filter. I must stress: EVEN IF IT WORKED before without it, you must have the filter.
    DO NOT run the DSL line through a filter, you’ll only break your Internet Connection, only the phone or the fax, or Credit Card processing device, etc…
  • Check all the physical connections of the Modem Device, R6 or RJ11 or the RJ45 connectors and make sure that they are tight they don’t have the locking pins broken, etc…
  • For a DSL connection the length of the phone cable could be critical, so use the original cable, (the short one), provided with the modem at least for the testing period. The reason is because the length of the pair from the CO to your place can be at its length limits, it happens more often than you think. If you pass this limit your connection stability will be penalized. Another reason is because a long cable is more difficult to examine for defects than a short one.
    If needed, use a longer network cable to connect a device in the house. The network cable, (UTP – unshielded twisted pair), can go up to 100m (300 feet).
  • Some electric devices can interfere with the modem; avoid placing it near such devices.
  • Look at the modem’s lights. If the DSL light is off there is no service.
  • If there is no connection at all, (No DSL light), check the phone to see if you have a dial tone.
  • If the modem connects to a separate wall jack bring a phone and check if you have a dial tone, you might have a dial tone in the bedroom and not in the office.
  • Similarly check if there is TV service, if there is no TV service then most likely it is a bigger problem at your cable provider.
  • Look for the DSL filter as described above.
  • Check the LAN light on the modem. If the LAN LED is off your computer’s network adapter might be defective, or disabled, or the UTP cable that connects the computer with the modem might be defective. There is a chance that the modem’s LAN interface is defective.
  • If you have a solid DSL light, (check the modem’s manual, manufacturers have different signalling for established DSL connection), and you don’t have a connection check the password for the connection.
  • Step 3 – Connect to Your Modem’s Administration Interface

    All of the modern modems have a WEB Administration Interface. The admin Interface is usually accessible via a WEB browser. It lets you configure the authentication and other different settings.
    In order to administrate your modem you need the following:

  • The administrator’s password to access your router. If you don’t have it you can perform a hardware reset using the reset button located on the modem. You need to use a pin to press the button. This will reset all of your modem’s setting, including the admin password, to the factory defaults.
  • The IP address of the router. If the modem has its DHCP server started, (by default yes), it will lease your computer an IP address and provide it with other IP configuration settings such as: “Default Gateway”, netmask, and DNS. The important part is the gateway’s IP address as this is your modem’s internal interface and this is what you need to access your router’s web Interface. You can find all of this information by issuing the following command in a command prompt window with elevated rights, (admin credentials):
    ipconfig /all
    After issuing the command you will get a screen similar to this one. Note that the “Default Gateway” is the address of your modem.
    IPCONFIG
    In a web browser type: http://IPADDRESS where IPADDRES is your router.
    For instance if your router’s (gateway) IP address is 192.168.200.1 the address you are looking for is: http://192.168.200.1.
  • Once connected to the web interface you need to enter the authentication details. If you don’t have them you have to call your ISP which will make a reset after security verification.
  • If all of the previous steps did not solve the problem call your ISP. They might ask you to redo all of the steps above and maybe more. Be patient, they are just doing their job, they never assume, or they shouldn’t. The second they let themselves drawn into your speculation they make the same mistake as you do.

    Step 4 – Correct the problems behind the modem

    If the connection is OK the problem is behind the modem. This problem could be anything in your network.
    Some suggestions are:
    The router – many times the router can slow down your network. Try a reboot. If that doesn’t work try another model or another manufacturer. Do an upgrade of the firmware. Check the router’s configuration and try a default stripped down configuration.
    The computer – most of the times, the slow performance over Internet is actually the poor performance of a computer. This is a dense material that is treated in a separate article which you can find here: How to Refresh your Computer speed (coming soon).
    The network – many times a poor network will penalize al sorts of network traffic not only Internet. This makes the subject of another article here: How to Troubleshoot Your LAN, (Local Area Network). (coming soon)

    Ask me any technical question in the comments area so I can update the document or answer you directly on the comments. I would like to make this article as useful as possible.