Skip to main content

Dynamic DNS on a Cisco ADSL Router

Any new Cisco ADSL router in the 800 series should support dynamic DNS updates to a DDNS provider like DynDNS.com

This particular example is for a Cisco 877 ADSL router.
NOTE: This particular config was done on a Cisco 877 ADSL / DSL router however its known to work on the Cisco 800 series DSL routers in general including the Cisco 827 Cisco 837 Cisco 877W as long as your Cisco IOS on the router supports the DDNS config

You might want to check the Cisco ADSL config guide too.

First off you are going to want to create an account with a DDNS Provider, this particular example uses DynDNS.org but others should work in the same way or at least in a similar way. In this example the dns name we want is mycisco.dyndns.org





OK lets go

Login to you router via console or telnet

Go into Enable mode
Then configure terminal (conf t)

ip domain name dyndns.org
ip name-server ip.ip.ip.ip
ip name-server ip.ip.ip.ip
ip ddns update method DynDNS
HTTP add http://uname:passwd@members.dyndns.org/nic/update?system=dyndns&hostname=myrouter.dyndns.org&myip= # Note From HTTP to myip= is one line #
interval maximum 1 0 0 0

Breakdown of the Above Commands:

username:password This is the username and password of the account you created at the dyndns provider.
HINT: password issues seem to crop up with DynDNS.org unless you use an alpha-numeric combination pass123 for instance also shy away from pass!@# at least at the time of this How-To anyway.

members.dyndns.org/nic/update You can leave this as it is if you are using dyndns.org HINT the ? after this might cause problems
where the Cisco router thinks that you are asking for help you can escape this by pressing CTRL
and V at the same time then ?


system=dyndns There are 3 Options here dyndns is the one to use if you are using one of the default DynDNS.org domains.

hostname= The hostname you are updating in this case mycisco.dyndns.org

myip= Leave this blank the dyndns site will determine what IP your ISP has issued to you


interval maximum This is the Maximum Interval in time that will pass before your router sends your DDNS provider an update. For
testing purposes you can use interval maximum 0 0 5 0 (every 5 minutes) the First 0 is Days 0 - 365 the second 0 is
Hours 0 - 23 the third 0 is minutes 0 - 59 and the last one is for seconds 0 - 59. Once you have determined that the
DDNS Config is working I would suggest that you change it to 0 1 0 0 (once a day in other words) if for some reason
your IP Address is changed before that 24 hour period your router will automatically update your DDNS Provider
anyway.


interface Dialer1
ip ddns update hostname mycisco.dyndns.org
ip ddns update DynDNS host members.dyndns.org

interface Vlan1
ip ddns update hostname mycisco.dyndns.org
ip ddns update DynDNS host members.dyndns.org

Once you have that all added write the config, then enable dedugging turn on terminal monitor

debugging ip ddns update
term mon

I have noticed that to get the DDNS kick started that its best to shut the dialer interface and then un-shut it. As soon as you do that you start seeing debugging info on the terminal window.

If things work out you should see something like this happening

Example IP's
100.50.50.9 <-- IP assigned to the router by the ISP 110.28.196.94 <-- The IP of the the DDNS provider's HTTP page that your router is logging into to update. 00:04:35:%DHCP-6-ADDRESS_ASSIGN: Interface Ethernet1 assigned DHCP address 100.50.50.9,
mask 255.255.255.255, hostname mycisco.dyndns.org

00:04:35: DYNDNSUPD: Adding DNS mapping for mycisco.dyndns.org <=> 100.50.50.9 server
110.28.196.94

00:04:35: DYNDNSUPD: Sleeping for 3 seconds waiting for interface Ethernet1 configuration
to settle

00:04:38: HTTPDNS: Update add called for mycisco.dyndns.org <=> 100.50.50.9

00:04:38: HTTPDNS: Update called for mycisco.dyndns.org <=> 100.50.50.9

00:04:38: HTTPDNS: init

00:04:38: HTTPDNSUPD: Session ID = 0x7

00:04:38: HTTPDNSUPD: URL =
'http://test:test@110.28.196.94/nic/update?system=dyndns&hostname=mycisco.dyndns.org&myip=100.50.50.9'

00:04:38: HTTPDNSUPD: Sending request

00:04:40: HTTPDNSUPD: Response for update test.dyndns.org <=> 100.50.50.9

00:04:40: HTTPDNSUPD: DATA START

good 100.50.50.9

00:04:40: HTTPDNSUPD: DATA END, Status is Response data received, successfully

00:04:40: HTTPDNSUPD: Call returned SUCCESS for update mycisco.dyndns.org <=> 100.50.50.9

00:04:40: HTTPDNSUPD: Freeing response

00:04:40: DYNDNSUPD: Another update completed (outstanding=0, total=0)

00:04:40: HTTPDNSUPD: Clearing all session 7 info


Now if all the above things happened you should by able to do a dig or nslookup for your host name (mycisco.dyndns.org)

$ dig mycisco.dyndns.org

in the answer section you should see somehting like this
;; QUESTION SECTION:
;mycisco.dyndns.org. IN A

;; ANSWER SECTION:
mycisco.dyndns.org. 60 IN A 112.1.2.3

or you can do an nslookup mycisco.dyndns.org

Non-authoritative answer:
Name: mycisco.dyndns.org
Address: 112.1.2.3


If you then reboot your router or even shut and un-shut your Dialer 1 Interface your ISP will Probably issue you will another IP if thats the case give it a few seconds and a Dig should give you another IP associated to the hostname.
Remember to change the interval maximum once you have determined that it does work For other DDNS Providers most things should stay the same except for the "add http:username:password........" thing and of course the "ip ddns update DynDNS host xxxxx " and "ip ddns update hostname xxxxx"

Here are some examples of others
DDNS
http://USERNAME:PASSWORD@members.dyndns.org/nic/update?system=dyndns&hostname=(hostname)&myip=(address)

TZO
http://cgi.tzo.com/webclient/signedon.html?TZOName=(hostname)&Email=USERNAME&TZOKey=PASSWORD&IPAd
dress=(address)

EASYDNS
http://USERNAME:PASSWORD@members.easydns.com/dyn/ez-ipupdate.php?action=edit&myip=(address)&host
_id=(hostname)

JUSTLINUX
http://USERNAME:PASSWORD@www.justlinux.com/bin/controlpanel/dyndns/jlc.pl?direst=1&usernam
e=USERNAME&password=PASSWORD&host=(hostname)&ip=(address)

DYNS
http://USERNAME:PASSWORD@www.dyns.cx/postscript.php?username=USERNAME&password=PASSWORD&ho
st=(hostname)&ip=(address)

HN
http://USERNAME:PASSWORD@dup.hn.org/vanity/update?ver=1&IP=(address)

ZONEEDIT
http://USERNAME:PASSWORD@www.zoneedit.com/auth/dynamic.html?host=(hostname)&dnsto=(address)


Comments

fishandchips said…
members.dyndns.org does not exist. I modified it to www.dyndns.org and it all came good.

Thanks for all the help.

Popular posts from this blog

Setting up and Installing Rancid on FreeBSD for Cisco Products

Setting up and Installing Rancid on FreeBSD for Cisco Products What is Rancid? Rancid is an application that monitors a devices configuration including software and hardware. The configuration is then stored in a Concurrent Version System or CVS. Most of the time it is used to back up router, switch and firewall configurations, as well as notify you when a configuration has changed, i.e a firewall rule or a routers IP address or access list change. here is an example of the output =================================================================== retrieving revision 1.29 diff -u -4 -r1.29 mpls-jhb-pe1 @@ -288,9 +288,9 @@ ! interface Serial0/0 description Link to Client X bandwidth 2048 - ip address 192.168.1.244 255.255.255.254 + ip address 192.168.1.234 255.255.255.254 ip route-cache flow ip tcp header-compression iphc-format ip tcp compression-connections 256 ! ip ospf message-digest-key 1 md5 the - symbol represents what was removed the + symbol represents what was added The abo

Tacacs+ Install and Config Guide

Tacacs+ Install and Config Guide What is TACACS As per wikipedia Terminal access controller access control system (TACACS) is a remote authentication protocol that is used to communicate with an authentication server commonly used in UNIX networks. TACACS allows a remote access server to communicate with an authentication server in order to determine if the user has access to the network. Installing Tacacs on FreeBSD This guide is intended to be a basic implementation of TACACS+, so although there are may features I am just going to document what I generally use. Please note that tac_plus is also available from Shrubbery Networks if you would like to install and configure on another platform. You may also want to check out my Rancid How-To Once again its in your ports directory. cd to /usr/ports/net/tac_plus4/ run a "make install clean" Once installed vi /usr/local/etc/rc.d/tac_plus.sh Then Change the following line from NO to YES tac_plus_enable=$ Save the file, then vi /e

FreeBSD, Postfix, Mailscanner and Mailwatch Installation

Installing postfix, mailscanner and mailwatch on FreeBSD I have setup a number of servers using mailscanner and postfix to do antispam and antivirus checking. This particular example will show you how to set the server up as a mail gateway. i.e. all inbound and outbound mail will go via this server. You can also use the server as a pop3/imap4 server and doing so, does make life a little easier as you don't have to worry about the transport and relay_hosts files. At a later stage I will show that info too..... when I get a chance. This my seem strange but as there is quite a bit involved in installing and configuring I am splitting this into two How-To's this one, The install How-To and the configuration How-To First off its probably best to start on a new install of FreeBSD. Once you have done the initial portsnap fetch and portsnap extract Right here we go. Two things you might want to do is force your NIC to 100MB full duplex and install lsof Type in ifconfig and check if the