Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

configure time server on router? 4

Status
Not open for further replies.

maxcolmer25

Technical User
Dec 5, 2002
44
IE
Hi again,

Just a quick question on setting clock in relation to my last question regarding the time based access lists. When i issue the # clock set hh:mm:SS and set time, once router is rebooted or powered off and on,the time reverts back to factory settings(1993)
Could anyone tell me how to setup router to update time off internet and setup time server?
As mentioned in last thread i am using cisco 1721 with BRI interface
Many thanks
 
Thanks Baddos, what mode do i apply this in? i have tried privilege mode and global config mode. am i missing something?
below is what i have tried
# ntp peer 216.152.68.20
(config)# ntp peer 216.152.68.20
 
This should work:
(config)# ntp peer 216.152.68.20

To check it, do a "show ntp status" and see what it says.

It should say something like this:

router1#sh ntp status
Clock is synchronized, stratum 3, reference is 216.152.68.20
nominal freq is 250.0000 Hz, actual freq is 249.9994 Hz, precision is 2**16
reference time is C1E96018.953F7BE5 (13:39:36.582 PST Mon Feb 3 2003)
clock offset is 0.2902 msec, root delay is 26.25 msec
root dispersion is 18.72 msec, peer dispersion is 16.72 msec
 
Hi,

For some reason that command will not enter into the ios. It is a 1721 with ios 12.2 running. Is their any alternative?
 
try this command
ntp server 204.70.128.1
logo-tektips.gif
 
No it does not accept any NTP command at privilege or global config mode, sorry?????????
 

I have the same problem with my router regarding time. I programmed the command as stated above but it never syn with the server. I wonder

How often the time is syn with the server?
Are there any command to force it to syn?

I check cisco.com and could not find any commands that will force the router to initiate a syn.
 
I dont have a 1721 here right now, but - being sort of a low end box - it could well be that it does not support full blown ntp.

But it should support sntp (simple network time protocol) instead, which is compatible with any ntp server. Try "sntp server x.x.x.x". Of course change x.x.x.x to the IP address of the ntp server of your choice. To see if you got anything use "show sntp".

The router will poll the ntp server every minute and I don't know a way to change the interval. Keep this in mind if you are using a dialup connection.

Cheers *Rob
 
Krr:

I have a Cisco 3101 running ver 12.1 IOS. My ntp server is pointing to one "ntp server 204.70.128.1" and it doesn't work. If I want to configure it to point to one of my intranet computer. Are there any software that I need to load to that computer to make it ntp server similar to TFTP server?

Thanks
 
You need to make sure that your router has access to the internet for port UDP 123.

There are many lists of public NTP servers to choose from. Some require you to notify them that you will using their service and most require only one device to be connected. IE.. one stratum time server.

To do this yourself, normally you will get a GPS antenna mount and a GPS on a card in a box that talks to a computer on your network. That system will be the stratum server or timeserver for the network.

To configure the router, start this way:

router#clock set 12:34:50 11 oct 2002
router#conf t
router(config)#hostname myrouter
myrouter(config)#ntp server *.*.*.*



Once the time is configured, it will be in UTC format. You need to set the clock with the proper offset to get it in the right time zone..

clock timezone MET 1

clock time zone (zone..ie.. PST etc) (offset)

Then pretty it up for daylight saivngs time because you *will* forget to change it ;)

clock summer-time <zone> recurring last Sun Mar 2:00 last Sun Oct 2:00

MikeS
Find me at
&quot;Take advantage of the enemy's unreadiness, make your way by unexpected routes, and attack unguarded spots.&quot;
Sun Tzu
 
MikeS & Rob:

Thanks for the information provided. I guess the reason I could not get the NTP working was the server IP most likely refused my request. After I changed the NTP to 204.70.128.1, then the time was syned and following is my access-list statment.

permit udp any any eq ntp (58 matches)

Yes, the link Krr provided has so much information. But it was very good. Thanks again.
 
Hi,
Thanks all for the feedback, the sntp server command is accepted in my ios. You say it updates itself every minute. is there a way to change this? Then again i have time access lists on my router to stop dialing up after hours and weekends. surely the access list will stop the sntp server dialing up after hours. still it means in the day it still will look to update every minute. anyone got any ideas to stop sntp server updating so much.??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top