How to troubleshoot Internet connectivity issues

Jephe Wu - http://linuxtechres.blogspot.com

Situation: packet loss on Internet between countries, one end ip is 1.2.3.4, other end is 5.6.7.8
Objective: use free tools to troubleshoot the issue


Tools:
1. ping
ping -c 100 1.2.3.4 to check the RTT and packet loss rate

2. traceroute or tracert

check the RTT time for each hop.

You can paste the result to http://www.geobytes.com/TraceRouteLocator.htm to get the location information.

3. tcptraceroute or traceroute -T(CentOS 5)

If the udp normal traceroute is not able to go through, you can try tcptraceroute or traceroute -T

4. telnet or nc

telnet serverip portnumber to check the connectivity

nc -vz servername portnumber to check if tcp portnumber is open,


nc -zv jephe01 22
Connection to jephe01 22 port [tcp/ssh] succeeded!




nc -zuv time.windows.com 123
Connection to time.windows.com 123 port [udp/ntp] succeeded!


5. mtr (My TraceRoute) - http://www.bitwizard.nl/mtr/

use mtr to check packet loss and RTT time.

6. wireshark(GUI) or tshark(CLI)

use tshark to monitor packet loss (tcp retransmission)

7. tcpdump to check if the traffic is coming into the server

References:
http://www.geobytes.com/IpLocator.htm  - IP Locator