?
Solved

NTP Server to update clients

Posted on 2010-09-08
16
Medium Priority
?
931 Views
Last Modified: 2012-05-10
We are running 14 Linux Centos 5.4 servers, 2 Cisco 3900 routers and 2 Cisco 48 port switches.  We need all hardware to have the same time for troubleshooting.  2 of my 14 servers are web servers which i would like to make ntp1 and ntp2 hosting time to the rest of the network.  We also have about 150 routers deployed to clients which should also get its time from our time servers remotely (ntp1.mydomain.com & ntp2.mydomain.com).  

How do I setup ntp1 and ntp2 to sync with time.nist.gov and all my other servers and routers to sync with ntp1.MyDomain.com and ntp2.MyDomain.com?

Thanks
0
Comment
Question by:ipconfig610
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 3
  • +1
16 Comments
 
LVL 2

Accepted Solution

by:
andrel39 earned 800 total points
ID: 33626591
Just install the ntp service on the two web servers. Set those two servers to sync to time.nist.gov.
(see below for procedure)

You will need to setup your external DNS to your Web Servers for the ntp1 and ntp2. Also, your firewalls for NAT to your web servers, or how ever you want, and allow the ntp service.

Now for the hard part. You will probably have to touch every device to set the ntp client to sync to your servers, unless someone else knows of a way to auto update 150 routers with a push of button.

Install ntp on Centos
Login as the root user

Type the following command to install ntp
# yum install ntp

Turn on service
# chkconfig ntpd on

Synchronize the system clock with time.nist.gov server:
# ntpdate time.nist.gov

Start the NTP:
# /etc/init.d/ntpd start
0
 

Author Comment

by:ipconfig610
ID: 33626870
Should I tell all 14 of my Linux servers to get time from time.nist.gov or just the web servers?
0
 
LVL 7

Assisted Solution

by:vipul999
vipul999 earned 400 total points
ID: 33627203
yeah you should do it directly.. that way even is ntp1 or ntp2 are down.. time will still continue to update as long as the internet is connected.
0
WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

 
LVL 2

Expert Comment

by:andrel39
ID: 33627474
You should tell all your hardware to use your ntp/web servers to get their time, in other words uniformity. This will help when you wondering how you configured them in the past.

0
 

Author Comment

by:ipconfig610
ID: 33627759
Okay, I setup my 2 web servers to get time from time.nist.gov in /etc/ntp.conf and than ran a service ntpd restart. I also pointed UDP port 123 on my Cisco router to my web server.

When I point one of my routers to ntp1.mydomain.com I receive "no server suitable for synchronization found"

What step am i missing?

/etc/ntp.conf file:


restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

restrict 127.0.0.1
restrict -6 ::1

server ntp1.MYDOMAIN.com
server ntp2.MYDOMAIN.com

server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10

driftfile /var/lib/ntp/drift

keys /etc/ntp/keys

Open in new window

0
 
LVL 2

Expert Comment

by:andrel39
ID: 33627920
Are you using the ip address or ntp1.MYDOMAIN.com? You should be using the ip address.

0
 
LVL 2

Expert Comment

by:andrel39
ID: 33627923
Make sure you can ping it as well.
0
 

Author Comment

by:ipconfig610
ID: 33627979
Yes I have an A Record pointing ntp1.MYDOMAIN.com to my servers WAN IP which I have confirmed is working and pings to the correct IP address.

I assume UDP 123 is the default NTP port.
0
 
LVL 2

Expert Comment

by:andrel39
ID: 33628077
Yes UDP 123 is the ntp port.

Has it been long enough for the DNS change to take effect? DNS updates usually take 24-48 hours before fully functional.
0
 

Author Comment

by:ipconfig610
ID: 33629320
I setup the A Records on my DNS server a few weeks ago.  When I ping the FQDN it resolves the correct IP of each NTP server.
0
 
LVL 12

Assisted Solution

by:mccracky
mccracky earned 800 total points
ID: 33631966
The no server suitable message means that the web servers haven't settled in to their time yet.  wait about an hour and try again (or put in the iburst option on the web servers' ntp.conf configuration)
0
 
LVL 12

Expert Comment

by:mccracky
ID: 33632017
to check if the web servers have settled in, you can do a "ntpq -pn" and see if you see an asterisk ("*") in the first column.  That means that it has settled in to receive time from that server.

Also, for what it's worth, put in a couple of other servers in your web server like:

server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org

It's common practice to have three or four external servers for your main server(s).

I'd also put the two web servers as peers of each other:

on web server 1:

peer ntp2.mydomain.com

on web server 2:

peer ntp1.mydomain.com


This peering will help them keep time with each other if, for some reason, they lose access to the servers listed.
0
 
LVL 2

Expert Comment

by:andrel39
ID: 33636240
Yes, Mccracky is correct, the other reason for the error message is that they havn't had enough time to settle in to the sync. It could take a few hours.
0
 
LVL 12

Expert Comment

by:mccracky
ID: 33794319
I'm just wondering why the points were awarded to the answer that said mine was correct.  I had a full explanation in the comment right above the "solution" and my comment right above that one (two above the "solution") also explained that the servers probably hadn't had time to settle in to sync yet which was the other part of the "solution"

Just curious.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question