Hi everyone, I am running two Asterisk servers on two machines that have dynamic DNS due to ISP changing IP address daily. Both servers are registered on DynDns.org and IP update scripts work fine on both machines. However, if one machine changes IP address, other one (that has trunk pointing to machine that changed address) starts displaying that trunk host is not reachable. O.k. I thought, it is DNS propagation problem, but it is NOT! Even one hour after IP change, machine A still points to old IP address and says that it is not reachable. Is there any solution? Regards, Branko
restart Asterisk as it cache's the IP when you start Asterisk and will not re-read the new IP until you restart. Thats why its important to have a static IP address. On 12/11/05, Branko Samardzic <branko_samardzic@rogers.com> wrote:> Hi everyone, > > I am running two Asterisk servers on two machines that have dynamic DNS due > to ISP changing IP address daily. Both servers are registered on DynDns.org > and IP update scripts work fine on both machines. However, if one machine > changes IP address, other one (that has trunk pointing to machine that > changed address) starts displaying that trunk host is not reachable. O.k. I > thought, it is DNS propagation problem, but it is NOT! Even one hour after > IP change, machine A still points to old IP address and says that it is not > reachable. > Is there any solution? > > Regards, > Branko > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- Tom Vile Baldwin Technology Solutions, Inc Consulting - Web Design - VoIP Telephony www.baldwintechsolutions.com Phone: 518-631-2855 x205 Phone: 978-203-3848 x205 Fax: 518-631-2856
Hope this helps. I had a similar problem today, when I changed the machine that my single installation of Asterisk runs on, but keeping the same IP address. My Sipura ATA took about 10 minutes to pick up the new machine (even though the IP address had not changed). I deduced that it needed the registration to time out before it did the lookup again, and thus reset the ARP cache. So, try changing the registration time out to something shorter...say 5 minutes or so, see if that helps. Roger Branko Samardzic wrote:>Hi everyone, > >I am running two Asterisk servers on two machines that have dynamic DNS due >to ISP changing IP address daily. Both servers are registered on DynDns.org >and IP update scripts work fine on both machines. However, if one machine >changes IP address, other one (that has trunk pointing to machine that >changed address) starts displaying that trunk host is not reachable. O.k. I >thought, it is DNS propagation problem, but it is NOT! Even one hour after >IP change, machine A still points to old IP address and says that it is not >reachable. >Is there any solution? > >Regards, >Branko > >_______________________________________________ >--Bandwidth and Colocation provided by Easynews.com -- > >Asterisk-Users mailing list >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > >-- ######################################################## Roger Hill 07739 707 180 Perseverance is the hard work you do after you get tired of doing the hard work you already did. ########################################################
Sounds like a DNS caching problem. Can you tell if the machine is actually going out to look up the address each time, or is it cached locally for some period of time? -----Original Message----- From: Branko Samardzic [mailto:branko_samardzic@rogers.com] Sent: Sunday, December 11, 2005 12:51 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] Asterisk Dynamic DNS Hi everyone, I am running two Asterisk servers on two machines that have dynamic DNS due to ISP changing IP address daily. Both servers are registered on DynDns.org and IP update scripts work fine on both machines. However, if one machine changes IP address, other one (that has trunk pointing to machine that changed address) starts displaying that trunk host is not reachable. O.k. I thought, it is DNS propagation problem, but it is NOT! Even one hour after IP change, machine A still points to old IP address and says that it is not reachable. Is there any solution? Regards, Branko _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Branko Samardzic wrote:>thought, it is DNS propagation problem, but it is NOT! Even one hour after >IP change, machine A still points to old IP address and says that it is not >reachable. > >I bet it is a DNS cache problem. Probably the machine A uses a cache dns and the record is not up to date. You have to run nslookup from the machine A to understand if the record was updated. Set the /etc/resolv.conf to point to a ISP dns server. Sergio
It is not problem with outdated DNS cache. It takes approximatelly 2 minutes for DynDns entry to propagate and my router picks it up. However Asterisk does reverse name lookup (instead of trying to resolve server.dyndns.org to IP address and pick up new one, it does reverse lookup on old IP address which happen to be valid ISP IP adress from some dynamic pool). I can't make Asterisk to perform direct DNS lookup. I tried dnsmgr.conf to decrease timeout to 60 sec, but it doesn't seem to have effect without enabling managed dns. If I enable managed dns then instead of host name I get UNSPECIFIED in IAX2 peer list and that is end of story. Any other thoughts? Regards, Branko
That's fine. But there is, obviously, situations where such situation is not welcome. Is it possible to force Asterisk to refresh cache every in a while. Regards, Branko
Here is the solution. On each and every server that has DynDns you can install Cron job that will perform forced configuration updates of an running server. This updates will pick up all the changes in iax.conf and IP address change! So, put following in your cron job: asterisk -r -x "iax2 reload" and you will have DynDns working nicely. Cheers, Branko -----Original Message----- From: Branko Samardzic [mailto:branko_samardzic@rogers.com] Sent: Sunday, December 11, 2005 3:25 PM To: mawise@hotmail.com Subject: RE: [Asterisk-Users] Asterisk Dynamic DNS No problem. Cheers, Branko -----Original Message----- From: Manny A. Wise [mailto:mannywise@gmail.com] Sent: Sunday, December 11, 2005 2:41 PM To: branko_samardzic@rogers.com Subject: RE: [Asterisk-Users] Asterisk Dynamic DNS I was told that the new version(1.2.1) of asterisk support FQDN on (sip.conf) externip=name.dyndns.org... but we can't get it to work either, if you find any solution to the problem, can you please let me know? Thanks Manny -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Branko Samardzic Sent: Sunday, December 11, 2005 1:51 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] Asterisk Dynamic DNS Hi everyone, I am running two Asterisk servers on two machines that have dynamic DNS due to ISP changing IP address daily. Both servers are registered on DynDns.org and IP update scripts work fine on both machines. However, if one machine changes IP address, other one (that has trunk pointing to machine that changed address) starts displaying that trunk host is not reachable. O.k. I thought, it is DNS propagation problem, but it is NOT! Even one hour after IP change, machine A still points to old IP address and says that it is not reachable. Is there any solution? Regards, Branko
Branko Samardzic wrote:> Hi everyone, > > I am running two Asterisk servers on two machines that have dynamic DNS due > to ISP changing IP address daily. Both servers are registered on DynDns.org > and IP update scripts work fine on both machines. However, if one machine > changes IP address, other one (that has trunk pointing to machine that > changed address) starts displaying that trunk host is not reachable. O.k. I > thought, it is DNS propagation problem, but it is NOT! Even one hour after > IP change, machine A still points to old IP address and says that it is not > reachable.Register both servers to our FreeVoip service. It's free and the registration will update every minute. Then you can use the freevoip numbers to contact each other. This will cost you nothing and is the easiest way in my (not so neutral) opinion. -- Cheers, Matt Riddell _______________________________________________ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://freevoip.gedameurope.com (Free Asterisk Voip Community) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)