IP networks (the Internet and most likely the network at your home and your office) use numbers called IP addresses to identify devices and route data from one device to another. Humans (mostly) like to identify devices with names because:
- Names are easier to remember. Google.com, for example, is a lot easier to remember than 184.108.40.206.
- Sometimes the exact IP address depends on things like geographic location or which particular service the user wants to access (like website or email). Names are a convenient abstraction that can be used to hide this complexity.
- IP addresses can change. If you move your office (and any servers along with it) you probably won’t be able to get the same IP address. Depending on your Internet service, you might not even get a static IP address (one that stays the same all the time) so you can expect your IP address to change, possibly on a daily basis.
IP (Internet Protocol) networks don’t understand names, they only understand numbers. To bridge the gap between the names humans like and the numbers networks like we have DNS (Domain Name System). DNS is the system that translates names to numbers. So when you type google.com into your web browser, the first thing your computer needs to do is ask DNS for the number (IP address) of google.com. When it has the number, it can send the request for you.
Domain names (and consequently DNS) are structure hierarchically. So the server at mail.google.com is a device called mail in the domain google which is in the domain com. We call com (and net and org and edu, etc) a top-level domain or TLD. When you need to find the IP address for mail.google.com, you first ask your local DNS server (Which is probably either on your local network at your Internet service provider). If the local DNS server knows the address (because it saved the address from an earlier query), it tells you. If it doesn’t know, it asks the root DNS server for the com TLD for the DNS server that knows about google.com. It then asks the DNS server for google.com for the address of mail.google.com. Once it has the IP address it sends it back to your computer.
Internet service providers often don’t assign permanent IP addresses to home or small business networks. Instead, these networks get what is called a dynamic address, chosen from a pool of addresses controlled by the ISP, which is subject to change regularly and without notice. If we want to reliably access such a network from the outside (to monitor the HVAC for example), it is often convenient to use dynamic DNS.
Dynamic DNS consists of some client software inside the network (either running on a PC or built into a router or other device) and a DNS service that listens for frequent IP address changes from the client.
To set this up on your network, you need 3 things:
- A domain name. A name can be purchased for an annual fee from a domain registrar. There are many. Some examples (but not necessarily recommendations) are Google domains (domains.google), hover (hover.com) and GoDaddy (godaddy.com). If you don’t want to commit to purchasing a name, you can often borrow a domain from a dynamic DNS service provider.
- A service provider that supports dynamic DNS. Some domain name registrars support dynamic DNS (google does, hover doesn’t) so you won’t need an extra service if you use one of those. If your domain registrar doesn’t support dynamic DNS you can use a dedicated dynamic DNS service. I have used both ChangeiP (changeip.com) and Dyn (dyn.com).
- A dynamic DNS client inside your network to monitor the dynamic IP address and report changes to the DNS service provider. This is built into many routers, so you might have it already. If it isn’t in your router or you don’t want to use the router for this, there are client applications that can run on a regular PC. Many dynamic DNS service providers provide a client for you to use. I have successfully used the flexible, open source ddclient (https://sourceforge.net/p/ddclient) for many years.