Sheepdog Software HOME ArduServer HOMEFarWatch HOME
Delicious.Com Bookmark this on Delicious   Recommend to StumbleUpon

Serving webpages, video feeds, etc to internet

Using dynamic DNS services to save needing a static IP address

I've written a number of tutorials about connecting things to the internet... and there is some duplication, overlap, etc. Sorry. In the page below, I am going to try to pull together what you need to know about one requirement of one way of providing services to the online world.

First a bit of good news: If you are just getting started with publishing things on the internet, the rest of this page is probably not important to you. It is important to people who are setting up a server connected to the same connection to the internet as they use for browsing, email, etc. ("A server" may be what is often called a server, or it may be something like an IPcam... actually a server, but not always though of as a server.)

If you are just building a blog, or publishing some web pages which have to be uploaded to a server which is on a different internet connection that your own, then your life is still simple... you don't need dynamic DNS services. <^_^>

If whatever service you are considering building would die if something on your LAN was unplugged, then this page is for you!

If you already understand what a dynamic dns service is, and just want a recommendation as to a supplier, you can skip down to that section of this essay.

It may seem for a few paragraphs that I am rambling. But if you show a little determination, you will eventually reach the part where what I've been saying begins to be pulled together. You can't really understand the answer to "how do I connect?" without knowing a bit about various pieces of the puzzle.

Where's My Internet Device?

You need to have your system "findable" to all the other devices on the internet.

To find the server which has what you are reading on it, and to get to this particular document, you put "http://arduserver.com/DynamDns.htm" into your web browser. (Or Google's search engine or similar did that for you.)

Before the page could be sent to your computer, the internet's DNS (Directory Name Service) "translated" "http://arduserver.com" into a number, and "the system" used that number to go to the right place for "DynamDns.htm", which is what you are reading.

Think for a moment about using telephones. If you want to call Mr Ranhoff, you look up his number in a phone book. The internet, like the phone system, is build on numbers. However, the internet comes with what is effectively an "automatic phone book", which returns IP addresses from more human friendly things, things like "http://arduserver.com/DynamDns.htm". "IP Address": Internet Protocol Address. Traditionally four, but we are moving to six, numbers separated by periods, e.g. 152.43.203.68. None of the numbers will be greater than 255. The numbers are sometimes expressed in hex, in which case A,B,C,D,E and F are additional acceptable digits, and the maximum number is FF. Sometimes written $FF.

Which IP address are we talking about?

Ah! You thought this would be easy? There are internet addresses "out there on the WAN" (wide area network, "the internet"). In any local area network, we also use "IP Addresses" to differentiate the different machines on the LAN.

While in the whole internet world, there is only one device connected to 152.43.203.68, there are, worldwide, probably literally millions of machines connected to 192.168.0.0. I'll explain in a moment.

I don't know what is connected to 152.43.203.68... I just picked a number out of a hat. And what's connected today might be hooked to the internet by a different number tomorrow.

192.168.0.0... and all the others beginning 192.168... (and some others) are set aside for using on LANs. When your LAN connects to the outside world, it keeps the local IP Addresses (192.168...) to itself. It is connected to the outside word by an non- 192... number assigned to home users, and small businesses... and some not so small businesses... by things beyond our control. And the number we are given changes from time to time, unless we have a "static IP address".... and if you do, you will know... from the bill you pay.

Normally, this dynamic IP address doesn't matter. Even if there are two people in one home using web browsers. Perhaps Alice is going to YouTube and Bob is going to eBay. When they send a request, it travels from their machines... we'll say that Alice is on LOCAL IP address 192.168.0.2 and Bob is on 192.168.0.3. Both will go out to the WAN from the household's (current) WAN address... let's say it is 152.43.203.15. YouTube and eBay will both answer to that address, but within all the "stuff" will be what the household's router needs to send Alice's answer to 192.168.0.2 and Bob's answer to 192.168.0.3

So far, so good. So far, the communications have started within the LAN which connects to the WAN via 152.43.203.15.

What happens if there is a SERVER on the LAN, and you want someone in the outside world to be able to start the conversation? (Rather as Alice started her conversation with YouTube, but with roles reversed.)

Well, the someone in the outside world needs to know the 152.43.203.15... or whatever is currently assigned for the WAN's link to the router connecting to the LAN with the server.

Static WAN IP address? Dynamic?

As I said... it is unlikely that you have a static IP address. You probably have a dynamic IP address, e.g. the hypothetical "152.43.203.15" changes from time to time. Probably not very often. But at all is a problem.

A "virtually static" WAN IP address

Like most technology challenges, almost as soon as someone encountered the problem, someone else came up with an answer. It is a little complex to describe, but read through quickly once, and then go back over it. It isn't too bad, really.

Take the server on my LAN which let's anyone out there in internet land see what the weather has been like at a house I monitor between New York and Boston, in the USA. First I signed up with a service... I'll come to that in a moment. As part of the sign up, I chose the weather station's URL. For my weather station, it is http://www.mon277rr.dyndns.org/. (I chose the "mon277rr" part. The rest I had to accept in return for using a free service.)

Whenever anyone asks to go to my weather reporting server, they are routed through the computers at dyndns.org. They know the right current IP address for my server.

How do they know?

When I first turned everything on, I sent to dyndns.org the IP address my weather server was on at the time. Since then, a device on the same LAN checks and rechecks what IP address the LAN's router is using to "talk" to the internet. As long as it doesn't change, nothing need be done. Whenever it does change, the device on my LAN sends a message to dyndns.org, and they revise their records, and anyone looking for my weather server is still sent to the right place.

Clever!

I spoke of "a device on the same LAN". This is sometimes an always-on PC running the dyndns updater application. It is sometimes the router itself. Some of them have dyndns service updaters built into them. Some IPcams have dyndns service updaters built into them. A story for another time.


So tell me about DYNDNS Services?

The one I've used for many years comes from Dyn.com. (They used to be called dyndns.com)

Until about Dec 2011, for the home user, they allowed free use of their service, but you had to go along about every three months and say "Yes, I want to continue using your service."

Even before December 2011, I was already paying them $20 per year to use their service. It was worth it to me. They were doing a good job, and for that nominal charge, I didn't have to keep "renewing".

At August 2012, they still offer a free trial... for 14 days. You can make sure you can overcome the set-up issues, etc, before paying. The service you want, for the sort of things we've been discussing, is what they call their "DynDNS Pro". Go to http://dyn.com/dns/dyndns-pro/ for the details.

There are free services out there still. For $20, I think I would "go with" the well established dyn.com, and avoid all the hassles of changes to terms, advertising panels, possibly unreliable service, etc, etc.

That's it for now!

I apologize for ending rather abruptly! Do let me know if there are aspects of the above which weren't sufficiently clear, or if there are related things I could talk about for you.

A number of things I do with the internet make use of the dyndns service I get from Dyn.com... I hope that if you came here from one of them, you can get back to where you came from easily!



Contact this page's editor, Tom Boyd


Valid HTML 4.01 Transitional Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org. An early draft of the page was valid apart from several things inside the code to embed the video clip of the ocelots.

- - - Page ends - - -