Tuesday, July 15, 2008

Network Time Service Cisco Router

Network time in Cisco router, all configuration about date, time, clock, calendar in Cisco router. in Cisco router divide two method network time : hardware clock, software clock.

# Hardware clock : date time from hardware component inside router, maintain use battery, battery-powered, like bios in computer system, so if router reload or off the clock still running as long as battery is ok
# Software clock : date time from software, source can from NTP, SNTP, VINES, hardware clock

By default Cisco router use software clock, but after router come up, the clock not sync. So we need to make the clock sync from a source.

1. Source from NTP (client)
(config)# ntp server IP-ADDRESS
- can use to primary source
or
(config)# ntp peer IP-ADDRESS
- cau use to secondary source

2. Source from SNTP (client) use in Cisco router 1600, 1700 and older series not support NTP
(config)# sntp server ADDRESS | HOSTNAME
or
(config)# sntp broadcast client

3. Source from VINES (client)
(config)# vines time set-system

for redistribute time into VINES
(config)# vines time use-system

4. Source from Hardware Clock
(config)# clock calendar-valid

5. Update hardware clock from software clock
# ntp update-calendar

6. Update software clock from hardware clock
# clock read-calendar

7. Setting hardware clock manually
> calendar set HH:MM:SS DAY MONTH YEAR
or
> calendar set HH:MM:SS MONTH DAY YEAR

8. Setting software clock manually
# clock set HH:MM:SS DATE MONTH YEAR
or
# clock set HH:MM:SS MONTH DATE YEAR

9. Server-Client
How to make a Cisco router as NTP server, this is example R1 as NTP server and R2 as NTP client, but in R1 we need choose one of source network time

R1(config)# ntp master [STRATUM]
R2(config)# ntp server/peer IP-ADDRESS

10. NTP broadcast
If we have large network, we can use NTP server acts as NTP broadcast to network, so every device in a cloud network can receive broadcast date time.

R-NTP-SERVER(config-if)# ntp broadcast
and
Router(config-if)# ntp broadcast client

optional
Router(config)# ntp broadcastdelay MICROSECONDS

Router(config-if)# ntp disable

Router(config)# ntp source INTERFACE

11. Other config about network time are
- NTP access group
(config)# ntp access-group ACL

- NTP authentication
(config)# ntp authenticate
(config)# ntp authentication-key NUMBER md5 VALUE
(config)# ntp trusted-key KEY-NUMBER

- The Time Zone
(config)# clock timezone ZONE
ZONE : GMT +7

- Summer Time (Daylight Savings Time)
(config)# clock summer-time ZONE recurring

Ohhh one more, Cisco router can connect a GPS timesource device so source use External reference clock but it just a few Cisco device only.

No comments: