Author Topic: Troubleshooting Internal Network Lag and Packetloss  (Read 2309 times)

Henrod

  • 68 Carbine
  • Posts: 356
Troubleshooting Internal Network Lag and Packetloss
« on: June 03, 2009, 08:08:41 PM »
As many of you know, I have experience with Internet connectivity and work for an ISP.  I have helped several people diagnose their connections over the last year and figured I might as well make a post to benefit everyone. This is a walk through on diagnosing lag and other connectivity issues. This walk through is based on the assumption that your computer is in good, working order.

If you have a stable Internet connection but would like to optimize your Internet connection for single downloads, tuning your TCP stack is a great way to optimize the available bandwidth. Here is a link for a java based tweak test.
http://www.dslreports.com/tweaks
TCP tweaks are only for Windows XP, not for Vista and do not help with gaming.


If you are experiencing lag and/or packet loss, the following steps will help you track down the cause whether you are connected via hardwire or wireless connection. Before you get started, you must know how to run a ping test. The following is for Windows machines.

From Microsoft's website

How to run a ping test in command prompt. (Windows XP and earlier.)
Click Start, click Run, type cmd, and then press ENTER.
In Vista just type cmd in the Start Search bar, directly above the Start Menu button, and press Enter

Type ping IP address of the remote network host -t (for example, ping 192.168.1.104 -t) or ping host name -t (for example, ping www.yahoo.com -t), and then press ENTER.

Check for a reply that may look like this:
Reply from 209.131.36.158: bytes=32 time=40ms TTL=61

Replies like this show that you are connected to the Internet. Ideally you will see a nonstop string of these replies with consistent ping times. The ping time is the value after time =.

If you see a reply that looks like this:
Request timed out
Then your computer is losing connection to the host site/Internet.


Henrod

  • 68 Carbine
  • Posts: 356
Re: Troubleshooting Internal Network Lag and Packetloss
« Reply #1 on: June 03, 2009, 08:08:55 PM »
Now that you can ping, we can use this information to check the stability of your connection.

Step 1 – Make sure your computers aren't downloading. Best situation would be to shut down all computers on the network besides your own.

Step 2 – Ping the Internet and your Router

Run a sustained ping test out to the Internet. Be sure to pick a very robust site such as www.google.com or www.yahoo.com .
Once again the command is: ping www.yahoo.com -t
Simultaneously, run a sustained ping to your router. Your router's IP address will be printed on your router somewhere. The most common router IPs are 192.168.0.1 and 192.168.1.1 .
The command is: ping 192.168.0.1 -t
After 2 min of sustained pings press Ctrl + c in each command promt and the pings will stop.

Step 3 – Analyze the results.
Now that we have run the ping tests we can use the statistical data to diagnose where the packetloss or lag is coming from. After you hit Ctrl +c you will have information on packets sent, packets received, and percentage of packet loss, maximum time of reply, minimum time of reply, and average time of reply.

If your percentage of packet loss is more than 3%, you have a connectivity problem. If your maximum time of reply to the Internet is more than 100ms higher than your minimum time of reply, you may have a connection problem. If your ping times to the router are above 7 ms, then you may have a connection issue. If this is the case, you need to determine where the problem is in your network.

If spiking ping times to your router coincide with spiking ping times to the Internet, then the problem is between your computer and your router. If this is the case, the problem is either your ISP, your router, your computer's wireless adapter, your computer's Ethernet port, or the wireless signal strength.

To determine if the router is the problem, simply bypass the router and plug your Internet connection directly into the computer. If your latency goes down and stabilizes significantly and your packet loss improves, then your router is malfunctioning. Sometimes, a router reboot will correct this. A wireless adapter runs about $30.00-60.00 US. You can spend more than this but there is not much reason to unless you get a gaming specific router (packet prioritizing), trust me.

To determine if your computer's Ethernet port is the problem (if you are connected through a wire to your router), simply test with another computer. If the ping test from one computer is significantly more consistent than the ping test from the other, the Ethernet port is the problem. A new ethernet port is about $10.00 US. If you continue to have connectivity issues, there could be a problem with your ISP's modem or even the ISP itself. If this is the case, call your ISP.

To determine if your computer's wireless adapter is the problem (if you are connected wireless to your router), you will need to run a test with another wireless connected simultaneously from the same location.  Run the tests and look for inconsistencies. If the ping test from one computer is significantly more consistent than the ping test from the other, the wireless adapter is the problem. A wireless adapter runs about $30.00-60.00 US. You can spend more than this but there is no reason to, trust me. If the pings are the same, then the wireless signal is too weak to deliver bandwidth required for enjoyable gaming. Look into powered antennae if this is the case.

There are many computer related issues that can also create connection issues. Most of these are related to Viruses, firewalls, or Anti-virus programs. I will do a writeup on these issues some other time.

Please feel free to add to this or ask questions.




Henrod

  • 68 Carbine
  • Posts: 356
Re: Troubleshooting Internal Network Lag and Packetloss
« Reply #2 on: June 03, 2009, 08:09:06 PM »
reserved

Justinph5

  • Autococker
  • Posts: 1159
Re: Troubleshooting Internal Network Lag and Packetloss
« Reply #3 on: June 03, 2009, 08:14:24 PM »
I thought you were gonna try and get help for yourself lagging out all the time :P
But good topic.

As for the tweaktest, it doesn't work for me, I think I already got mine set up past the tweaktest accepting it :P
Quote
We unexpectedly captured multiple data transfer streams to your IP address.

KnacK

  • Global Moderator
  • Autococker
  • Posts: 3039
Re: Troubleshooting Internal Network Lag and Packetloss
« Reply #4 on: June 04, 2009, 06:26:03 AM »
A better command than just ping is called "pathping"

Code: [Select]


S:\>pathping

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

Options:
    -g host-list     Loose source route along 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 period milliseconds between pings.
    -q num_queries   Number of queries per hop.
    -w timeout       Wait timeout milliseconds 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.

S:\>pathping www.google.com

Tracing route to www.l.google.com [209.85.225.103]
over a maximum of 30 hops:
  0  knack.fms-tex [192.68.7.52]
  1  pitkin-router.fms-tex [192.68.7.1]
  2  firewall.fms-tex [192.68.7.254]
  3  . [216.63.70.201]
  4  optqrtr.optiquest.net [216.61.144.10]
  5  70.242.19.245
  6  bb2-g8-2-1.hstntx.sbcglobal.net [151.164.41.152]
  7  ex1-p2-0.eqdltx.sbcglobal.net [151.164.40.33]
  8  72.14.197.113
  9  66.249.94.94
 10  216.239.47.121
 11  209.85.253.173
 12  209.85.241.29
 13  72.14.239.18
 14  iy-in-f103.google.com [209.85.225.103]

Computing statistics for 350 seconds...
            Source to Here   This Node/Link
Hop  RTT    Lost/Sent = Pct  Lost/Sent = Pct  Address
  0                                           knack.fms-tex [192.68.7.52]

                                0/ 100 =  0%   |
  1    0ms     0/ 100 =  0%     0/ 100 =  0%  pitkin-router.fms-tex [192.68.7.1]

                                0/ 100 =  0%   |
  2    0ms     0/ 100 =  0%     0/ 100 =  0%  firewall.fms-tex [192.68.7.254]
                                0/ 100 =  0%   |
  3    4ms     0/ 100 =  0%     0/ 100 =  0%  . [216.63.70.201]
                                0/ 100 =  0%   |
  4    6ms     0/ 100 =  0%     0/ 100 =  0%  optqrtr.optiquest.net [216.61.144.
10]
                                0/ 100 =  0%   |
  5   10ms     0/ 100 =  0%     0/ 100 =  0%  70.242.19.245
                                0/ 100 =  0%   |
  6  ---     100/ 100 =100%   100/ 100 =100%  bb2-g8-2-1.hstntx.sbcglobal.net [1
51.164.41.152]
                                0/ 100 =  0%   |
  7  ---     100/ 100 =100%   100/ 100 =100%  ex1-p2-0.eqdltx.sbcglobal.net [151
.164.40.33]
                                0/ 100 =  0%   |
  8   18ms     0/ 100 =  0%     0/ 100 =  0%  72.14.197.113
                                0/ 100 =  0%   |
  9   19ms     0/ 100 =  0%     0/ 100 =  0%  66.249.94.94
                                0/ 100 =  0%   |
 10   27ms     0/ 100 =  0%     0/ 100 =  0%  216.239.47.121
                                0/ 100 =  0%   |
 11   51ms     0/ 100 =  0%     0/ 100 =  0%  209.85.253.173
                                0/ 100 =  0%   |
 12   55ms     0/ 100 =  0%     0/ 100 =  0%  209.85.241.29
                                0/ 100 =  0%   |
 13   54ms     0/ 100 =  0%     0/ 100 =  0%  72.14.239.18
                                0/ 100 =  0%   |
 14   49ms     0/ 100 =  0%     0/ 100 =  0%  iy-in-f103.google.com [209.85.225.
103]

Trace complete.

S:\>

Pathping gives you a good look over 5 minutes of how you are pinging to each hop in your  route to a destination.

Henrod

  • 68 Carbine
  • Posts: 356
Re: Troubleshooting Internal Network Lag and Packetloss
« Reply #5 on: June 04, 2009, 09:45:27 AM »
Agreed. Pathping is the hotness. I just didn't wan't people asking me what the results mean. Thanks for the coming flood of questions on vent and IRC Knack.  :P

KnacK

  • Global Moderator
  • Autococker
  • Posts: 3039
Re: Troubleshooting Internal Network Lag and Packetloss
« Reply #6 on: June 04, 2009, 04:14:23 PM »
Henrod is dah bomb on the netowrking side ;D