cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4466
Views
0
Helpful
8
Replies

NTP server using DNS

rasmus.elmholt
Level 7
Level 7

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.

8 Replies 8

balaji.bandi
Hall of Fame
Hall of Fame

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 ?

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hi.

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

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 ?

Configured it with ntp server <dns name> and used time.greennet.gl as the DNS server.

mitard
Level 1
Level 1

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

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.

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

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card