Network Time Protocol


Network Time Protocol

NTP Version 3 (RFC 1305) allows IP hosts to accord their time-of-day clocks with a

common antecedent clock. For instance, routers and switches can accord their clocks to make

event alternation from an SNMP administration base added meaningful, by ensuring that any

events and accessories accept authentic time stamps.

By design, best routers and switches use NTP applicant mode, adjusting their clocks based on the

time as accepted by an NTP server. NTP defines the letters that breeze amid applicant and server,

and the algorithms a applicant uses to acclimatize its clock. Routers and switches can additionally be configured as

NTP servers, as able-bodied as application NTP symmetric alive mode—a approach in which the router or switch

mutually synchronizes with addition NTP host.

NTP servers may advertence added NTP servers to access a added authentic alarm antecedent as defined

by the degree akin of the ultimate antecedent clock. For instance, diminutive clocks and Global

Positioning System (GPS) accessory transmissions accommodate a antecedent of degree 1 (lowest/best

possible degree level). For an action network, the routers and switches can accredit to a lowstratum

NTP antecedent on the Internet, or purpose-built rack-mounted NTP servers, with built-in

GPS capabilities, can be deployed.

Example 5-3 shows a sample NTP agreement on four routers, all administration the aforementioned 10.1.1.0/24

Ethernet subnet. Router R1 will be configured as an NTP server. R2 acts as an NTP changeless client

by advantage of the changeless agreement referencing R1’s IP address. R3 acts as an NTP broadcast

client by alert for R1’s NTP broadcasts on the Ethernet. Finally, R4 acts in NTP symmetric

active mode, configured with the ntp associate command.

Example 5-3 NTP Configuration

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! First, R1’s configuration, the ntp advertisement command beneath interface fa0/0

! causes NTP to advertisement NTP updates on that interface. The aboriginal three of the

! four all-around NTP commands configure authentication; these commands are identical

! on all the routers.

R1# appearance running-config

interface FastEthernet0/0

ntp broadcast

!

ntp authentication-key 1 md5 1514190900 7

ntp authenticate

ntp trusted-key 1

ntp adept 7

! Below, the “127.127.7.1” characters implies that this router is the NTP clock

! source. The alarm is synchronized, with degree akin 7, as configured on the

! ntp adept 7 command above.

R1# appearance ntp associations

address ref alarm st back poll ability adjournment account disp

*~127.127.7.1 127.127.7.1 6 22 64 377 0.0 0.00 0.0

* adept (synced), # adept (unsynced), + selected, - candidate, ~ configured

R1# appearance ntp status

Clock is synchronized, degree 7, advertence is 127.127.7.1

nominal freq is 249.5901 Hz, absolute freq is 249.5901 Hz, attention is 2**16

reference time is C54483CC.E26EE853 (13:49:00.884 UTC Tue Nov 16 2004)

clock account is 0.0000 msec, basis adjournment is 0.00 msec

root burning is 0.02 msec, associate burning is 0.02 msec

! R2 is configured beneath as an NTP changeless client. Note that the ntp clock-period

! command is automatically generated as allotment of the synchronization process, and

! should not be added to the agreement manually.

R2# appearance run | activate ntp

ntp authentication-key 1 md5 1514190900 7

ntp authenticate

ntp trusted-key 1

ntp clock-period 17208144

ntp server 10.1.1.1

end

! Next, R3 has been configured as an NTP advertisement client. The ntp advertisement client

! command on R3 tells it to accept for the broadcasts from R1. This configuration

! relies on the ntp advertisement subcommand on R1’s Fa0/0 interface, as apparent at the

! alpha of this example.

R3# appearance run

interface Ethernet0/0

ntp advertisement client

! R4’s agreement is listed, with the ntp peer

! command implying the use of symmetric alive mode.

R4# appearance run | beg ntp

ntp authentication-key 1 md5 0002010300 7

ntp authenticate

ntp trusted-key 1

ntp clock-period 17208233

ntp associate 10.1.1.1