Previous Section  < Day Day Up >  Next Section

Recipe 19.7. Setting Up Multiple Local Time Servers

19.7.1 Problem

Your local time server is getting overwhelmed, so you need to add more servers. And you would like the additional servers to peer, so that your network hosts are always synchronized with each other.

19.7.2 Solution

In this example, two internal servers—server1 and server2—synchronize with us.pool.ntp.org and with each other:

# /etc/ntp.conf for server1

   

driftfile  /etc/ntp.drift

logfile  /var/log/ntp.log

   

# default access policy

# this denies all ntp traffic that is not

# explicitly allowed

restrict default ignore

   

# ntp server list

server pool.ntp.org

server pool.ntp.org

server pool.ntp.org

peer server2

   

# allow time service from peer

# but not run-time configuration changes

# disable remote logging

restrict server2 nomodify notrap

   

# allow localhost unrestricted

restrict 127.0.0.0 mask 255.0.0.0

/etc/ntp.conf for server2 is identical, except the server2 entries must be replaced with server1. Configure LAN clients as described in Recipe 23.2, using the peers as the server entries:

# /etc/ntp.conf for clients

driftfile  /etc/ntp.drift

logfile  /var/log/ntp.log

   

server  server1

server  server2

19.7.3 Discussion

You can set up as many additional peers as you like; workstations can even peer with each other. For your own sanity, keep it as simple as possible. Don't try to peer with the public time servers! They have no reason to trust your servers, and you do not want to annoy time server admins. The idea behind peering is to hit the public servers as little as possible, while adequately serving the local network.

19.7.4 See Also

    Previous Section  < Day Day Up >  Next Section