Back to Mars, hacking my DNS...
cmw.osdude 120000QT77 Visits (3004)
On Sunday night, I joined a number of space exploration enthusiasts at a Landing Party to watch the deployment of Curiosity, the newest Mars rover. It was an incredible event. Here is some video of my immediate reaction after the party. Bear in mind that it is very late, I'm out on the street and I'm pretty tired by now. It's raw-gritty reporting that puts you there! I would have had Monday or Tuesday, but I had to fiddle with the video a little... and I was pretty out of it on Monday and not able to multi-task as well as I do on other days.
First, let me congratulate NASA and all involved. It was an inspiring deployment where everything appeared to work perfectly. Watching it in a room full of people who cared was inspiring. Every stage was cheered enthusiastically. It was wonderful to behold.
In the video, I mention a couple of applications. First, was Uniview, which is a commercial application that was used to show us an impressive 3D rendering of our solar system and beyond as the presenter related it all to the Mars mission. However, he also pointed out Partiview, which he said was a similar application, freely available as open source. It's mulitplatform and I am downloading it now. I'll report the results.
I believe that space exploration is important. It drives us to solve problems and gives us places to reach when our own world seems a little inhospitable. Science fiction becomes science fact as people find ways to make their social and technological dreams come true. We will never stop reaching for the stars. If governments decide to get out (which might not be a bad idea on some levels) people will make it happen.
Hacking my DNS
A while back I was feeling frustrated about my home network. Everything just seemed sluggish, but when I would do various speed tests it didn't really seem to be so bad. What was going on? After poking around for a while, I observed that my slow-down seemed to be related to domain name resolution. If you already know about this stuff you can skip the explanation.
Quick explanation of DNS
In a TCP/IP (Transmission Control Protocol/Internet Protocol) network, which is what we use on the Internet, everything is done by the numbers. Ultimately, your network card is wanting to talk to another networks card somewhere else. That's what your MAC (Machine Access Control) address is. It's a unique identifier of your network card. Of course, having an index of all of those devices is cumbersome, so a system of cataloging them was determined. That's where the TCP/IP address comes in, the x.x.x.x number that is assigned to you on a network. However, telling you to visit my web page at 188.8.131.52 is probaby not going to be easy to deal with. So, a concept was devised where names could be given to the various networks and a lookup occur to point you to the final destination. That is known as the DNS (Domain Name System). I'm going pretty quickly here. If you really want to understand you should read more about tcp/ip and DNS, but here's essentially how it works:
Once I noticed that my name resolution seemed to be a bottleneck, I started digging around. I think that the DNS servers for ISPs are typically pretty overloaded. If I can bypass those, then I can perhaps get a faster lookup and faster networking overall. In Linux, there is a utility called dig. It performs name lookups with some feedback about the process. By default, it will use your network's name server, but you can designate a name server as well. I found a list of public name servers and played with them through dig. You can see some examples below.
$ dig ibm.com @184.108.40.206 ; <<>> DiG 9.8.1-P1 <<>> ibm.com @220.127.116.11 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54167 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;ibm.com. IN A ;; ANSWER SECTION: ibm.com. 9097 IN A 18.104.22.168 ;; Query time: 27 msec ;; SERVER: 22.214.171.124#53(126.96.36.199) ;; WHEN: Wed Aug 8 13:58:01 2012 ;; MSG SIZE rcvd: 41 $ dig ibm.com @188.8.131.52 ; <<>> DiG 9.8.1-P1 <<>> ibm.com @184.108.40.206 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43573 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;ibm.com. IN A ;; ANSWER SECTION: ibm.com. 4548 IN A 220.127.116.11 ;; Query time: 21 msec ;; SERVER: 208.
Ultimately, I decided that I liked the Google server, 18.104.22.168, because it was easy to remember. All of them provided some improvements. So, I went to my home router and told it to use the Google name servers rather than the default. Voila! All machines connected to my network automatically go to the other servers to look up names. This has made a vast improvement in my networking latency. Isn't that interesting?
If I'm in another network and want to do the same thing, then I can adjust the network settings to include my own choices. That will vary with each operating system. On Linux, I simply edit a file called /etc/resolv.conf. Here's what it looks like:
nameserver 22.214.171.124 nameserver 126.96.36.199
188.8.131.52 is the secondary server.
What about the phone?
So, after I had done this for a while, I started wondering about the network on my phone. I have a 4G phone, but it just seemed to lose its mind from time to time. Again, the issues seemed to be related to finding things more than connecting to them? Could I do the same thing?
I did some digging, and since Android is based on Linux, there were similar underpinnings. However, these only seemed to work for the WIFI network, not the 4G/3G. Drat! I rooted my phone some time ago, so, I had access to the settings, but I just couldn't find anything useful. Then I found out that there are apps that will help out with this. The one I settled on is "Set DNS" by Steve Hanlon. I tried the free version for a while and then bought the pro version for less than $3. (I like to support independent developers when I can, so I donate to open-source projects and buy pro versions of phone apps that I like.) It has worked exactly as I hoped. Suddenly, some of the sites I had trouble with getting lost started working very efficiently and I have noticed a decided difference in my network stability.
Perhaps later on I'll find the guts for this and be able to do it without a helper app, though I'm satisfied with the solution.
If you are having sluggish access to the Internet, maybe a change to your name server will help. Feel free to post a comment with a question and I'll help if I can.