Networking-Forums.com

Professional Discussions => Routing and Switching => Topic started by: Ironman on March 21, 2015, 03:03:21 PM

Title: NO-IP DDNS on Cisco Router
Post by: Ironman on March 21, 2015, 03:03:21 PM
Trying to get this setup but having some issues. Here is my config:


ip ddns update method ironman
HTTP
  add http://email_address:password@dynupdate.no-ip.com/nic/updatehostname=<h>&myip=<a>
interval maximum 0 0 5 0

interface gi0/0 (public internet interface)
ip ddns update hostname iron.ddns.net (changed slightly)
ip ddns update ironman



PVD_RTR1#sho ip ddns update
Dynamic DNS Update on GigabitEthernet0/0:
  Update Method Name            Update Destination
  ironman                       not available


Any thoughts?
Title: Re: NO-IP DDNS on Cisco Router
Post by: Fred on March 21, 2015, 10:50:57 PM
First thing I'd check is DNS resolution.  Can you ping dynupdate.no-ip.com from the router?
Title: Re: NO-IP DDNS on Cisco Router
Post by: Ironman on March 22, 2015, 08:01:09 AM
Quote from: Fred on March 21, 2015, 10:50:57 PM
First thing I'd check is DNS resolution.  Can you ping dynupdate.no-ip.com from the router?

Hi Fred, yes I can ping it:

PVD_RTR1#ping dynupdate.no-ip.com
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.23.224.120, timeout is 2 seconds:
!!!!!


Actually it seems like it's closer to working now. I didn't make any changes. In the debug I noticed this

<p>The requested URL /nic/updatehostname=PVD_RTR1.domain&amp;myip=x.x.x.x was not found on this server.</p>

Does this command refer to the hostname of the router or should it be the URL name I assigned on NO-IP.com?

add http://email_address:password@dynupdate.no-ip.com/nic/updatehostname=<h>&myip=<a>

Title: Re: NO-IP DDNS on Cisco Router
Post by: Reggle on March 23, 2015, 03:52:05 PM
I don't know no-ip, but do you need the "&myip=" part? The DDNS service I use will automatically use the source of the HTTP GET as IP address if that parameter is missing. I also think it's weird your debug shows the ampersand in different formatting.
Title: Re: NO-IP DDNS on Cisco Router
Post by: Ironman on March 23, 2015, 10:18:53 PM
Yea, it is an odd message. I will actually reboot the router in the next day or so and see if DDNS is working properly.
Title: Re: NO-IP DDNS on Cisco Router
Post by: Fred on March 23, 2015, 10:42:36 PM
Quote from: Ironman on March 22, 2015, 08:01:09 AM
<p>The requested URL /nic/updatehostname=PVD_RTR1.domain&amp;myip=x.x.x.x was not found on this server.</p>
This suggests that the URL is invalid.  IIRC there are some nice debug commands that will show the update in progress, but you'd have to google those.
Title: Re: NO-IP DDNS on Cisco Router
Post by: Stuart on March 26, 2015, 06:09:02 AM
@Ironman,

I believe the answer to your problem is that the update URL requires a question mark between the "update" and "hostname" portion (e.g. dynupdate.no-ip.com/nic/update?hostname)

Now as we all know, you can't enter a ? in the IOS.  But you can. :)

Enter the URL until you get to the end of "update", type CTRL + V and then press ? which will give you the question mark.  You can then continue to enter the remainder of the URL.

I have the following configured on my router and it works fine:-


ip ddns update method DynamicDNS
HTTP
  add http://USERNAME:PASSWORD@nic.changeip.com/nic/update?system=dyndns&hostname=HOSTNAME
interval maximum 7 0 0 0
interval minimum 0 6 0 0
!


Regards,

S.
Title: Re: NO-IP DDNS on Cisco Router
Post by: Ironman on March 26, 2015, 08:24:44 AM
Thanks for the reply! I did get the ? in my config a few days ago but I am still noticing an error in the debug. Do I have to specify the actual HOSTNAME in that line?


000098: Mar 25 22:11:33.695 EST: HTTPDNSUPD: DATA START 404 Not Found Not Found The requested URL /nic/ was not found on this server. Apache Server at dynupdate.no-ip.com Port 80
000099: Mar 25 22:11:33.699 EST: HTTPDNSUPD: DATA END, Status is Response data recieved, successfully
000100: Mar 25 22:11:33.699 EST: HTTPDNSUPD: Call returned SUCCESS, update of avenger2.ddns.net x.x.x.x succeeded
000101: Mar 25 22:11:33.699 EST: DYNDNSUPD: Another update completed (outstanding=0, total=0)
000102: Mar 25 22:11:33.699 EST: HTTPDNSUPD: Clearing all session 11 info


Here is my current configuration:
ip ddns update method avenger2
HTTP add http://username:password@dynupdate.no-ip.com/nic/?updatehostname=&myip
interval maximum 0 0 1 0
interface gi0/1
ip ddns update hostname avenger2.ddns.net
ip ddns update avenger2
Title: Re: NO-IP DDNS on Cisco Router
Post by: SimonV on March 26, 2015, 08:32:13 AM
Is there any way to specify the source IP because now I get 1.1.1.1 from nslookup, maybe one of your loopbacks?
Title: Re: NO-IP DDNS on Cisco Router
Post by: Ironman on March 26, 2015, 08:36:17 AM
I changed it to 1.1.1.1 on the web side on NOIP.com to force my router to update it. It should be using the Gi0/1 interface as its source which is where the public dhcp address is.
Title: Re: NO-IP DDNS on Cisco Router
Post by: SimonV on March 26, 2015, 08:47:18 AM
The No-IP guide uses this format:

add http://username:passsword@dynupdate.no-ip.com/nic/update?hostname=<h>&myip=<a>

Your config behind the /nic/ uses a different format

By the way, I've been using No-IP for the last two years and it really gets on my nerve to confirm the hostnames every two weeks.
Been looking into an alternative and will be trying these ones soon: FreeDNS.afraid.org
Title: Re: NO-IP DDNS on Cisco Router
Post by: Ironman on March 26, 2015, 10:03:55 AM
Thanks for the info, I made the changes and now I am getting this in the debug:

008625: Mar 26 11:02:21.272 EST: HTTPDNSUPD: DATA END, Status is Response data recieved, successfully
008626: Mar 26 11:02:21.272 EST: HTTPDNSUPD: Call returned SUCCESS, update of avenger2.ddns.net <=> x.x.x.x succeeded
008627: Mar 26 11:02:21.272 EST: DYNDNSUPD: Another update completed (outstanding=0, total=0)
008628: Mar 26 11:02:21.272 EST: HTTPDNSUPD: Clearing all session 13 info
CRN_RTR1#
008629: Mar 26 11:03:22.156 EST: DYNDNSUPD: Adding DNS mapping for avenger2.ddns.net <=> x.x.x.x
008630: Mar 26 11:03:22.156 EST: HTTPDNS: Update add called for avenger2.ddns.net <=> x.x.x.x
008631: Mar 26 11:03:22.156 EST: HTTPDNSUPD: Session ID = 0xE
008632: Mar 26 11:03:22.156 EST: HTTPDNSUPD: URL = 'http://ironman401:password@dynupdate.no-ip.com/nic/?updatehostname=&myip'
008633: Mar 26 11:03:22.156 EST: HTTPDNSUPD: Sending request
008634: Mar 26 11:03:22.784 EST: HTTPDNSUPD: Response for update avenger2.ddns.net <=> x.x.x.x

008635: Mar 26 11:03:22.784 EST: HTTPDNSUPD: DATA START
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><
CRN_RTR1#head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /nic/
on this server.</p>
<hr>
<address>Apache/2 Server at dynupdate.no-ip.com Port 80</address>
</body></html>
Title: Re: NO-IP DDNS on Cisco Router
Post by: SimonV on March 26, 2015, 10:16:43 AM
Is it possible you forgot the hostname after the = ?
Title: Re: NO-IP DDNS on Cisco Router
Post by: Stuart on March 26, 2015, 10:58:16 AM
Ironman,

You have the ? in the wrong place in the URL.

In your code you have it after nic (e.g. no-ip.com/nic/?) when in fact it should come between "update" and "hostname" (e.g. no-ip.com/nic/update?hostname)

Move the ? to the correct location and then it should work.

No-ip.com also have the following guide for setting up DDNS on Cisco routers.
http://www.noip.com/support/knowledgebase/using-your-cisco-router-with-no-ip-dynamic-dns-services/

Edit: so the correct URL to use should be:

http://ironman401:password@dynupdate.no-ip.com/nic/update?hostname=<h>&myip=<a>

Regards,

S.
Title: Re: NO-IP DDNS on Cisco Router
Post by: Ironman on March 26, 2015, 12:29:58 PM
Thanks for your help! I made the changes you mentioned and it was still hung up. I believe it was tied up with some of the previous commands so I reloaded each router and it is working now. Much appreciated! I modified the links I was using above for security reasons.
Title: Re: NO-IP DDNS on Cisco Router
Post by: javentre on March 26, 2015, 02:53:10 PM
FWIW:  I have found the DDNS code in IOS to be very buggy.  Things like changing the interval/frequency or URL doesn't always work.  Even removing the command and putting it back in hasn't resolved issues.  It usually took a reload.
Title: Re: NO-IP DDNS on Cisco Router
Post by: Ironman on March 26, 2015, 02:56:24 PM
Yup, exactly what I noticed. Even though the old config and URL were gone from the config it was still showing up in a debug. I even completely removed the ddns config all together and yet I STILL saw it trying in the debug. A reload cleared it up.
Title: Re: NO-IP DDNS on Cisco Router
Post by: Reggle on March 27, 2015, 06:19:39 AM
Quote from: SimonV on March 26, 2015, 08:47:18 AM
By the way, I've been using No-IP for the last two years and it really gets on my nerve to confirm the hostnames every two weeks.
Been looking into an alternative and will be trying these ones soon: FreeDNS.afraid.org
I'm using hopper.pw
It supports both IPv4 and IPv6, and updating is a single HTTP GET url where it will take the update source as IP address if you want. No mail confirmations.
It's community funded though, and my uptime of the DNS record has not been 100% lately.