Troubleshooting Internet Connectivity

This evening, I noticed that I was having some horrible Internet connectivity issues, from home. Trying to stream anything online? Forget it. Frustrated, I started troubleshooting the issue, fully expecting that I would end up opening up a trouble ticket with my ISP, sending them all my available troubleshooting information, and asking them to resolve their issue.

Turns out, the issue was a simple fix – on my side, but I figured that I would provide my troubleshooting steps as a learning experience for anybody whom runs across this page.

Background information: My home Internet connectivity is provided by Cable Internet with a 30Mbps downstream / 5Mbps upstream.

The first thing that I did was go to http://speedtest.rackspace.com. From this page, you can run the OOKLA speedtest application from any of their data centers. This provides excellent information on download & upload speeds, latency, and jitter. I ran the test from the Dallas and Chicago data centers. Right off the bat, I noticed that I was getting a fraction of the download speed that my Internet service is configured for. This can be seen below:

Screen Shot 2015-03-13 at 1.44.38 AMScreen Shot 2015-03-13 at 1.47.58 AM

 

This immediately pointed to a real issue, but I didn’t yet have all the information that I needed to take to my ISP. Next, I used an application called MTR. MTR is a traceroute application, that when ran correctly makes it visually easy to spot potential network issues. I ran an MTR report destined to one of my cloud servers at Rackspace.

You look at the ‘loss%’ column, you will notice that the MTR reports packet loss, starting at hop 4. This packet loss continues at every hop in the path. Hop 4 is the gateway of my Cable Internet. This suggests that the actual network issue exists between my cable modem and my providers router. To further solidify this finding, I ran a 100 count ping to that same server, hosted at Rackspace.

Indeed, the ping saw the same packet loss. Before opening a ticket with my Internet provider, I decided to power cycle my cable modem. After my cable modem was back online, I ran the same tests.

First with the speed tests.

Screen Shot 2015-03-13 at 2.03.07 AMScreen Shot 2015-03-13 at 2.04.27 AM

 

Huge difference! Next, I ran the same MTR report.

Notice how the packet loss is completely gone now? Finally, I ran the same 100 count ping.

Confirmed. No packet loss. As you can see, the issue ended up being that my cable modem needed to be power cycled. No inundating my Internet provider with a trouble ticket tonight.

Simple tools, such as MTR, traceroute, and ping can provide a lot of information about network connectivity problems. At the very least, they can assist you in narrowing down where to look.

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone

March 13, 2015

Posted In: Network Connectivity, Rackspace, troubleshooting

Dynamic DNS Updates via the Rackspace Cloud DNS

Do you remember the old days when dyndns.org offered free sub domains, that pointed to your home internet connection? This service allowed you to access your home computer remotely, by hostname, without the need of remembering your IP Address.

I wrote a python script that does something similar. It uses the Rackspace Cloud API to manage an DNS A record of a domain that you own and is hosted with Rackspace.

Below is the code:

There are a couple things that still need to be added:

  • Check to see if {dyn_domain} exists, if it doesn’t, create it.
  • Obtain the {record_id} automatically.

Given that, the current limitations are:

  • Your hostname, needs to already exist. The script will only update the hostname, not create it. Example: thisismyhomepc.example.com
  • You have to obain the record ID by hand.

In the examples, I’m going to be using CentOS 7. The first thing that I’m going to do is install EPEL, which will allow me to install the package ‘pip’.

Once that is installed, we can install the python module that we’ll need, which is pyrax – which is the Rackspace Python SDK for their Cloud.

Once you’ve installed the needed modules, you can verify that they are available for use.

In my example, I’m going to use the hostname of myhomepc.jtdub.com, which points to 192.168.1.1. While still in the python prompt, I’m going to call the pyrax module to get the {record_id}, which in this example output is id: ‘A-2222222’.

Replace {username} and {api_key} with your rackspace cloud account username and api key. Now that we have the necessary information, we can edit the variables of the script and run it!

Here’s my first run of the script. Here you can see that it determines my public IP Address, then determines the DNS A record of my {dyn_domain} hostname. As they are different, it authenticates to the API and makes a call to update the DNS A record of myhomepc.jtdub.com with my current public IP Address.

I gave DNS a five minutes to update, then I ran the script again. This time, the script determined that my current public IP Address is the same as my DNS A record of myhomepc.jtdub.com, so it didn’t even attempt to authenticate to the API to make any changes.

Pretty nifty, right? From here, you can put the script into a cron job to run once a day, or however often you want. There you go! Custom dynamic DNS hostname, to access your home PC, using the Rackspace Cloud!

The script can be found on github.com.

Here is more information on the Rackspace SDK.

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone

July 26, 2014

Posted In: Bind, DNS, Python Tips, Rackspace