This thread belongs to my "Cisco 88xVA – A home router on steroids" project. The initial thread serving as an anchor can be found HERE. Please use that thread for all general comments or requests.
Cisco 88xVA – Part 4: VDSL advanced configuration – DynDNS and kron jobs
Like most other "normal" people I do not have a static ip address. Instead the ip address is dynamically assigned upon dial-up and - to make things worse - it changes daily because all ISPs over here disconnect us every 24 hours and we get different ip address upon reconnecting. Only some cable providers reassign you the same ip address as they use a lease time of about a week. All other users have to cope with constantly changing ip addresses which make it difficult to remotely connect to your network.
The solution to this problem are Dynamic DNS providers like dyndns.org, just to name the one that most people know and that I use for this example. You can also use an update client installed on a pc to do this job but Cisco routers can do it as well. So let's take a look at the config:
! *** First we need to define a method
ip ddns update method MyDDNSMethod
! *** The updates use HTTP with hostname, username, password, etc. provided inside the URL
! *** Remember to press "CTRL+v" before entering the question mark which is part of the above string
! *** To prevent the account from getting locked I only allow 1 update per hour
! *** Cable modem users with pseudo-static ip address need to set "interval maximum 28 0 0 0"
interval minimum 0 1 0 0
! *** Finally we associate the DDNS update method with the Dialer interface
interface Dialer 0
ip ddns update hostname MyHost.dyndns.org
! *** This is the hostname used by the <h> placeholder in the URL string
ip ddns update MyDDNSMethod host members.dyndns.org
! *** This is the server name used by the <s> placeholder in the URL string
! *** and calles the update method we defined
The second thing we want to do is to control the time when we get disconnected by the ISP. We certainly do not want to get disconnected in the middle of a large download or while recording our favourite movie!
If you are familiar with Unix then you might be familiar with kron jobs as well. The IOS on our Cisco routers also supports kron jobs and we can use them to control when to disconnect from our ISP. Configuring a kron job is pretty straight forward:
! First we need to define a policy and then define the command to be executed
kron policy-list ClearDialer0
cli clear interface Dialer 0
! *** Then we configure the job to be executed every day at 04:30 a.m.
kron occurrence DisconnectISP at 4:30 recurring
Comments and remarks
The Dynamic DNS Support feature allows us to perform DDNS updates using a simle HTTP command. The exact syntax is proprietary and depends on the DDNS provider you use and there are many others out there. Feel free to post example for other DDNS providers.
You can check whether or not the dynamic updates are working with the "debug ip ddns update" command:
%DIALER-6-BIND: Interface Vi2 bound to profile Di0
%LINK-3-UPDOWN: Interface Virtual-Access2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access2, changed state to up
DYNUPD: SWIF comingup 'Virtual-Access2'
Translating "members.dyndns.org"...domain server (22.214.171.124) [OK]
DYNDNSUPD: Adding DNS mapping for MyHost.dyndns.org <=> 10.20.30.40 server 126.96.36.199
HTTPDNS: Update add called for MyHost.dyndns.org <=> 10.20.30.40
HTTPDNSUPD: Session ID = 0x6
HTTPDNSUPD: URL = 'http://MyUserName:MyPassword@members.dyndns.org/nic/update?system=dyndns&hostname=MyHost.dyndns.org&myip=10.20.30.40'
HTTPDNSUPD: Sending request
HTTPDNSUPD: Response for update MyHost.dyndns.org <=> 10.20.30.40
HTTPDNSUPD: DATA START
HTTPDNSUPD: DATA END, Status is Response data recieved, successfully
HTTPDNSUPD: Call returned SUCCESS, update of MyHost.dyndns.org <=> 10.20.30.40 succeeded
DYNDNSUPD: Another update completed (outstanding=0, total=0)
HTTPDNSUPD: Clearing all session 6 info
Of course, 10.20.30.40 is not a public ip address but just a placeholder used in this example. If you do not get a response after sending the request and run into a timeout, then you need to check your access-lists whether they allow the return traffic.
What we achieved so far...
Our router is now sending Dynamic DNS updates to our DDNS provider every time the ip address changes. This is a necessary prerequisite for the remote vpn connections that we want to configure in the upcoming parts.
We also control the time when we get disconnected to prevent our ISP from doing this while we record our favourite movies. Otherwise, Mr. Murphy would surely take his chance...
Feel free to ask if something is not clear to you!
Comments and questions regarding this base configuration should be posted right here while general comments or requests should go into the anchor post mentioned at the beginning.
Cisco 88xVA – Part 4: VDSL advanced configuration – DynDNS and kron joVDSL dynamic DNS DynDNS kron jobs 88xVA
No replies to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users