NTP server using DNS

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2019 04:07 AM
I have configure a NTP server using a DNS name on a IOS router.
But when I boot the device and the DNS server is not available on config load, the IP address doesn't get resolved and never asks the NTP server.
Is there any way to force the router to lookup the NTP server and use it later.(without removing the NTP server and reapplying it)
Right now the router has been running for 2 days and hasn't update the NTP time yet.
- Labels:
-
ISR G2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2019 04:49 AM
NTP should keep check the updates, can you post your NTP config.
Also if you have DNS issue, you map the NTP DNS in to IP as below example :
config t
!
ip host ntpserver.com x.x.x.x
!
so if the dns Fails still it will use IP to sync.
make sense ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2019 08:23 AM
It doesn't add the NTP server to show ntp associations if DNS lookup fails during the name lookup.
ip host <dns name> <ip> always overwrites DNS requests and isn't a solution in this case:
ROUTER(config)#ip host ntp.greennet.gl 8.8.8.8
ROUTER(config)#do ping ntp.greennet.gl
Translating "ntp.greennet.gl"...domain server (10.10.10.10)
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/64/70 ms
ROUTER(config)#no ip host ntp.greennet.gl 8.8.8.8
ROUTER(config)#do ping ntp.greennet.gl
Translating "ntp.greennet.gl"...domain server (10.10.10.10)
Translating "ntp.greennet.gl"...domain server (10.10.10.10) [OK]
i
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 194.177.227.9, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/10 ms

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2019 06:23 AM
Hello,
--> Right now the router has been running for 2 days and hasn't update the NTP time yet.
That sounds odd, how did you configure NTP ? And what (device) are you currently using as NTP server ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2019 08:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2021 11:34 PM
Hi guys,
Indeed I have the same kind of issue on a Cat. 2960CX running IOS 15.2(4)E2. In the startup configuration file two DNS servers are configured using their hostname but since NDS resolution is not yet available when the NTP process starts the switch remains unsynchronized.
Does it mean the only way to configure a NTP server is to use its IP address ?
Regards, Vincent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2021 01:00 AM
Hello,
I am not sure what the original problem was, but:
ip host time.google.com 216.239.35.0
ntp server time.google.com
should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2021 12:08 AM
Hello
Try using split DNS RR so the dns list associated with the host will round robin to each server in the listing.
Example:
ip host view ntp.greennet.gl 8.8.8.8 8.8.4.4 etc..
ip dns view default
domain lookup
domain round-robin
Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.
Kind Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2021 01:03 AM
Hi Paul,
Thanks for advice. I can unable DNS round robin but I cannot enter the below command :
ip dns view default
Can you please explain a little bit what is its purpose ? Please kindly note the problem is not with a particular DNS server but the fact that DNS resolution is not available at all when the NTP process startups.
Regards, Vincent
