cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
883
Views
0
Helpful
3
Replies

Ntp will not change

Fredrik Ågren
Level 1
Level 1

Hey, so we are about to change NTP server. 

and instead of going with x.x.x.x we said lets go with a dns name this time ntp.domain.local

So easy right.

just

no ntp server x.x.x.x

and then

ntp server ntp.domain.local 

and 50% och my switches took this change, the rest just keeps converting the name to the old ip again (we have not changed the ntp server ip yet) 

the switches are mixed from 2960-x to 3560, firmwares are diffrent, and i have even some EI3000. some work some dont! 

on all switches i can still ping ntp.domain.local . 

3 Replies 3

Richard Burts
Hall of Fame
Hall of Fame

Perhaps I am not understanding something in your question. If DNS is still pointing to the old address why are you surprised that the devices are still using the old ip?

Are you using the name in hope that when DNS is updated with a new address for the NTP server that the Cisco network devices will begin using the new address? I do not believe that it will work that way. Even if the Cisco device keeps the name in the config, I believe that at bootup time it will resolve the name to an IP and then will use that IP. I do not believe that it would dynamically pick up a new IP for the server and begin to use the new address without a reset of the device.

HTH

Rick

HTH

Rick

hi 

no ofc it will use the same IP 

but in 50% of the config it now says 

ntp server 1.1.1.2 

and the rest say

ntp server ntp.domain.local 

i want it to use ntp.domain.local so when we do change the ntp server it will not be a problem! 

Thanks for the additional explanation. I do understand the question better. Unfortunately I do not believe that there is a good solution. It appears that there are differences in the parser for the config in various versions. Some will place the command into the config as entered with the name (and will resolve name to address at bootup) while some resolve the name at config time and place the command in the config with the IP address. I am not aware of a way to change that behavior in these switches.

If you know what the new IP address will be you might configure in the switches that convert the name at config time with two ntp server commands (one for the current address and one for the new address). It is perhaps a bit more work but has the advantage that the devices will smoothly transition from old address to new address without impacting network performance. Otherwise you will need to make config changes at the time when you change the ntp server address and there would be some period of time when at least some of the devices are not able to maintain correct sync with time.

HTH

Rick

HTH

Rick