NTP Summarize

As everyone knows, the NTP is sync clock protocol.
That knowledge less other protocol.
But there are some attention:
——————————————
1. When you config more than one server in customer network.
Please don’t use the same stratum.
Base on the stratum, refer to
http://www.cisco.com/en/US/docs/ios/netmgmt/command/reference/nm_10.html#wp1093957
If customer use same stratum, it would instability and lost sync.

2. After you config the ntp, “ntp clock-period” will auto appear.
It will auto adjust the local clock and base HW auto recreate.
But some customer maybe paste one chassis configuration to other chassis include “ntp clock-period”.
Then the adjust times not exact, it don’t recalculate and recreate the new period.
So lead to sync lost each 17 minutes.
Please customer “no ntp clock-period” and auto recreate it.

Follow are some scenarios for ntp config:
(covers most of the scenarios that you might encounter)

———————————————————————————–
SCENARIO 1: ROUTER SYNCS WITH LOCAL TIME SERVER (also works for a local
time server that syncs with an Internet time server).

The primary command used to configure NTP is “ntp server x.x.x.x”. This
is the same regardless of whether the server is local or on the internet. Afer this
command is entered, the router will commence start-up polling”, sending 1 poll packet
every second for 16 seconds. After that, the router will do “regular polling”, which
normally occurs once every 64 seconds. This poll interval cannot be changed by
configuration. The other two commands, “clock timezone” and “clock summer-time” are not
required; they are for display purposes only.

Clock timezone adjusts the timestamp to the local time and clock
summer-time allows for the daylight savings time adjustment  automatically.

+--------+          10.1.1.2+------+
|ROUTERA |e0----------------|SERVER|
+--------+10.1.1.1          +------+

RouterA configuration:
router(config)#ntp server 10.1.1.2
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring

* for example, in Dallas: clock timezone CST -6
* for the US, use "recurring"; for other countries, the dates must be specified
* the command "ntp clock-period" wil appear automatically in the config

On the local Server:
NTP software (www.ntp.org)

For info on internet clock sources:
(http://www.eecis.udel.edu/~mills/ntp/servers.htm)
———————————————————————————–

SCENARIO 2: ROUTER IS CONFIGURED AS MASTER, OTHER ROUTERS SYNC WITH IT
In this scenario, RouterA is configured to provide the clock for the
network, rather than an internal/external server. This is done through the use of the “ntp
master” command. When specifying the ntp master, a stratum number should be used to
designate how many NTP hops away a machine is from an authoritative time source. The clock
source itself is usually stratum level 1. If no stratum level is specified, the router
will default to 8.

+--------+            10.1.1.2+--------+          11.1.1.2+-------+
|ROUTERA |s0----------------s0|ROUTERB |s1--------------s0|ROUTERC|
+--------+10.1.1.1            +--------+11.1.1.1          +-------+

RouterA configuration:
router(config)#ntp master <value should be +2 to the stratum value of
the Inet time server shown on
sh ntp status after routerA is synced up with the Internet time server>
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring

RouterB configuration:
router(config)#ntp server 10.1.1.1
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring

RouterC configuration:
router(config)#ntp server 10.1.1.1
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring

———————————————————————————–

SCENARIO 3: NTP USING SERVERS AND PEERS
In this scenario, RouterA is configured as the source and RouterB syncs with it. RouterC then
syncs with RouterB. This is done through the “ntp peer” command. RouterC will not sync
with RouterB unless RouterB is synchronized with RouterA.

+--------+         10.1.1.2+--------+          11.1.1.2+--------+
|ROUTERA|s0--------------s0|ROUTERB |s1--------------s0|ROUTERC |
+--------+10.1.1.1         +--------+11.1.1.1          +--------+

RouterA configuration:
router(config)#ntp master <1>
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring

RouterB configuration:
router(config)#ntp server 10.1.1.1
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring

RouterC configuration:
router(config)#ntp peer 11.1.1.1
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring

———————————————————————————–

SCENARIO 4: NTP ON BROADCAST MEDIUM
In this scenario, RouterA is broadcasting ntp packets containing its time to all hosts on the
network. Rather than polling RouterA, RouterB and RouterC will simply listen to and sync
with RouterA.

+--------+10.1.1.1
|ROUTERA |--------------+----------------+
+--------+e0         e0 |10.1.1.2     e0 |10.1.1.3
                        +--------+       +--------+
                        |ROUTERB |       |ROUTERC |
                        +--------+       +--------+

RouterA configuration:
router(config)#ntp master <1>
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring
router(config)#int e0
router(config-if)#ntp broadcast

RouterB configuration:
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring
router(config)#int e0
router(config-if)#ntp broadcast client

RouterC configuration:
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring
router(config)#int e0
router(config-if)#ntp broadcast client

———————————————————————————–

SCENARIO 5: REDUNDANT NTP MASTER CLOCKS
In this scenario, more than one router is configured as the ntp master.
Because RouterA has a lower stratum number than RouterB, it becomes the primary NTP
source. RouterC will poll both routers at 64 second  intervals. In the event that RouterA
goes down, RouterC will sync up with RouterB.

+--------+            10.1.1.2+---------+          11.1.1.2+--------+
|ROUTERA |s0----------------s0|ROUTERB  |s1--------------s0|ROUTERC |
+--------+10.1.1.1            +---------+11.1.1.1          +--------+

RouterA configuration:
router(config)#ntp master 1
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring

RouterB configuration:
router(config)#ntp master 2
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring

RouterC configuration:
router(config)#ntp server 10.1.1.1
router(config)#ntp server 11.1.1.1
router(config)#clock timezone <zone> <hours offset from UTC>
router(config)#clock summer-time <zone> recurring
You can leave a response,or trackback from your own site.

Leave a Reply