I recently had to set this up on a friend’s router and I was not aware that there had been API changes to the DDNS protocol so many of the configurations I found on the internet no longer worked. So below I am posting a working configuration for the DDNS confi
gura
tion supporting dyndns.com dynamic DNS update service using the current APIs along with an
explanation of
how each
command works.
Below is some explanations for the code I will post.
<method-name>This is the name that you want to give the DDNS update, you can use any name you want but
I usually use something related to the system I am working on.
<f.q.d.n> This is fully qualified domain name that you want updated for Dynamic DNS such as www.shutdown-r.net.
<username> Your DynDNS account user name.
<password> This is the password for you DynDNS account. It is recommended that you generate an update
key so you don’t have to use your account password for updates.
<h> This is an internal Cisco IOS variable for the hostname that it gets from the configuration on the interface.
<a> This is an internal Cisco IOS variable for the dynamic address on the interface that you are requesting the update from.
<int> The wan interface that you want the domain name pointed to.
hostname= Specifies the host name to be updated in the update string sent to the Dyndns servers.
(i.e. hostname=www.shutdown-r.net or hostname=<h>)
&myip Uses internal mechanism to determine external IP address that needs to be associated with domain name.
&myip= User specifies IP address to be associated with domain name. (i.e. &myip=8.8.4.4 or &myip=<a>)
? When typing or pasting your config into the CLI on CISCO IOS you must press <Ctrl-v> prior to entering the <?> symbol.
ip ddns update hostname <f.q.d.n>
This tells CISCO IOS what <h> is.
ip ddns update <method-name>
This tells CISCO IOS that you want to update DDNS sourcing from configured port using the called out method.
In the example below you will have to replace <method-name>, <username>, <password>, and <f.q.d.n> with the proper information from your DynDNS account.
config t
ip ddns update method <method-name>
interval minimum 0 12 0 0
HTTP
add http://<username>:<password>@members.dyndns.org/nic/update?hostname=<f.q.d.n>&myip
remove http://<username>:<password>@members.dyndns.org/nic/update?hostname=<f.q.d.n>&myip
or
add http://<username>:<password>@members.dyndns.org/nic/update?hostname=<h>&myip=<a>
remove http://<username>:<password>@members.dyndns.org/nic/update?hostname=<h>&myip=<a>
exit
exit
interface <int>
ip ddns update hostname <f.q.d.n>
ip ddns update <method-name>
do wr
Some notes:
HTTPS supports requires you to load certificates into your router from the site you are trying to update to.
You can create multiple update methods and assign them to the same interface so that you can update different dynamic DNS services at the same time. This is required when using Hurricane Electric IPv6 Tunnels over dynamic IPs.