• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 412
  • Last Modified:

Network Time Synchronization

I have linux 7.3 installed in my server, I want to synchroniz the time in my network.

I installed ntp 4.1.1.1 and i want the workstations to get the time from the linux 7.3 server.

The network ip range is 192.168.1.1-254

The ntp.conf is as follow:
 [root@moon init.d]# more /etc/ntp.conf
# Prohibit general access to this service.
#restrict default ignore

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1


# -- CLIENT NETWORK -------
# Permit systems on this network to synchronize with this
# time service.  Do not permit those systems to modify the
# configuration of this service.  Also, do not use those
# systems as peers for synchronization.
# restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
restrict 192.168.1.0 mask 255.255.255.0

# --- OUR TIMESERVERS -----
# or remove the default restrict line
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.

# restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap noquery
# server mytrustedtimeserverip



# --- NTP MULTICASTCLIENT ---
#multicastclient                        # listen on default 224.0.1.1
# restrict 224.0.1.1 mask 255.255.255.255 notrust nomodify notrap
# restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap



# --- GENERAL CONFIGURATION ---
#
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
server  127.127.1.0     # local clock
fudge   127.127.1.0
#server 192.168.1.6     # local clock
#fudge  192.168.1.6 stratum 10

#
# Drift file.  Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
#
driftfile /etc/ntp/drift
broadcastdelay  0.008

#
# Authentication delay.  If you use, or plan to use someday, the
# authentication facility you should make the programs in the auth_stuff
# directory and figure out what this number should be on your machine.
#
# it to the file.
#
driftfile /etc/ntp/drift
broadcastdelay  0.008

#
# Authentication delay.  If you use, or plan to use someday, the
# authentication facility you should make the programs in the auth_stuff
# directory and figure out what this number should be on .
#
authenticate no

#
# Keys file.  If you want to diddle your server at run e a
# keys file (mode 600 for sure) and define the key number to be
# used for making requests.
#
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your e
# systems might be able to reset your clock at will. Note
# ntpd is started with a -A flag, d
# will have to be removed as well.
#
keys            /etc/ntp/keys
0
waweiwi
Asked:
waweiwi
  • 6
  • 6
  • 5
  • +3
2 Solutions
 
The--CaptainCommented:
I see many statements, but no questions...  With what exactly do you require assistance?  Sorry to come off so brutish, but I am having problems determining your problem...

Cheers,
-Jon

0
 
waweiwiAuthor Commented:
I want to synchroniz the time btween the server and stations (Windows stations and linux server)
0
 
ahoffmannCommented:
NT's ResKit has a TimeServ.exe which can be used with UNIX's ntpd.
The corresponding registry settings are found in
  HKLM\SYSTEM\CurrentControlSet\Services\TimeServ\Parameters

The settings in TimeServ.ini should be:
  Type=NTP
  NTPServer=<your-IP here>
  ;PrimarySource=....
  ;timesource=....
  Period=148
  ; mean test every 30 minutes

AFAIK the link to TImeServ is http://www.niceties.com/
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
waweiwiAuthor Commented:
What's about windows9x how can i play with to get the time from linux server.
0
 
waweiwiAuthor Commented:
can i use DHCP to simplify the changing in each station.

I used "option ntp-servers 192.168.1.8" in the DHCPD.conf but i didn't work.

Any suggestions
0
 
lewisgCommented:
>What's about windows9x how can i play
>with to get the time from linux server.

You can use the NET TIME command in DOS, Win3x or Win9x. Here are some examples both by name and by IP address. NET TIME will work in a batch file so you can run it on startup or in a batch file that starts a time sensitive application or from task manager (if you use it).

The possibilites are endless...

C:\>net time \\server /set /yes
Current time at \\SERVER is 6-20-2002 9:42A.M.
The command was completed successfully.

C:\>net time \\192.168.1.1 /set /yes
Current time at \\192.168.1.1 is 6-20-2002 9:43A.M.
The command was completed successfully.

0
 
ahoffmannCommented:
NET TIME ...   uses a proprietary protocol (SMB?), not NTP over TCP/IP
0
 
lewisgCommented:
>What's about windows9x how can i play
>with to get the time from linux server.

You can use the NET TIME command in DOS, Win3x or Win9x. Here are some examples both by name and by IP address. NET TIME will work in a batch file so you can run it on startup or in a batch file that starts a time sensitive application or from task manager (if you use it).

The possibilites are endless...

C:\>net time \\server /set /yes
Current time at \\SERVER is 6-20-2002 9:42A.M.
The command was completed successfully.

C:\>net time \\192.168.1.1 /set /yes
Current time at \\192.168.1.1 is 6-20-2002 9:43A.M.
The command was completed successfully.

0
 
lewisgCommented:
Sorry for the double post, the refresh button got me...

Yes NET TIME uses the M$ network client. I would assume that since waweiwi is using Win9x machines as clients and has a Linux server the M$ networking client would already be loaded.

Unless there is some advantage to loading more software to syncronize the time I don't see a problem. Do you?
0
 
ahoffmannCommented:
well, probably Samba can answer the NET TIME request too.
Never tried it, 'cause it's a command on demand, and not continously. But if this is sufficent ...
0
 
The--CaptainCommented:
I agree w/ ahoffman - an smb solution is not nearly as extensible/scalable as a pure NTP solution (in fact, many providers block ports 137-139 [mine does, idiotically, w/ no explanation], which effectively breaks SMB traffic).  Go w/ his [ahoffman's] solution (although I would be interested to hear of any implementation problems - that's what we're here for...)

Cheers,
-Jon
0
 
lewisgCommented:
"many providers block ports 137-139 [mine does, idiotically, w/ no explanation]"

ISP's do that to protect the clueless like Joe six-pack with file sharing enabled and bound to TCP/IP on his winbox. I don't think you really want to run SMB (NETBIOS) over the Internet do you? Besides, his time server is on his network so what difference does it make if his ISP blocks 137-139?

"extensible/scalable" All most folks need to do is set their clock a once a day. If instead you are doing data collection that requires split second resolution a more powerful solution may be called for.

Any app I have ever deployed on a M$ network that has any time sensitivity gets a NET TIME command in the startup file (and sometimes again while running). No additional software installation, configuration or troubleshooting required.

Simple is good.

Just try it.
0
 
lewisgCommented:
"many providers block ports 137-139 [mine does, idiotically, w/ no explanation]"

ISP's do that to protect the clueless like Joe six-pack with file sharing enabled and bound to TCP/IP on his winbox. I don't think you really want to run SMB (NETBIOS) over the Internet do you? Besides, his time server is on his network so what difference does it make if his ISP blocks 137-139?

"extensible/scalable" All most folks need to do is set their clock a once a day. If instead you are doing data collection that requires split second resolution a more powerful solution may be called for.

Any app I have ever deployed on a M$ network that has any time sensitivity gets a NET TIME command in the startup file (and sometimes again while running). No additional software installation, configuration or troubleshooting required.

Simple is good.

Just try it.
0
 
The--CaptainCommented:
>I don't think you really want to run SMB (NETBIOS) over the Internet do you?

I don't think that anyone should be able to make this decision for me - premature ISP intervention makes me see red - big brother tactics are *never* a good thing...  If I pay for IP internet access, I expect exactly that.  It is up to me to protect my network, regardless of what big brother mentality may be pervasive at my ISP...  If I ever get a choice between an ISP that provides as much bandwidth as my cable provider and does not filter any ports and competes directly with my current cable provider, you can bet I will drop my current provider in less than 2 seconds in favor of the less restrictive folks...

In any case, many less providers exist that filter NTP than those that filter netbios, and for that reason ahoffman's suggestion is the most wise...

Any solution that relies only upon internal hosts is rather broken, IMO...

Also, please stop double-posting - the refresh button should only be used if you know what you're doing...

Cheers,
-Jon

0
 
ahoffmannCommented:
> .. time sensitivity gets a NET TIME command in the startup file (and sometimes again while running). No additional software installation, configuration or troubleshooting required.

Don't agree, at least for "configuration".
On NT you need to allow the "set time policy" for everyone, otherwise you get errors.
0
 
lewisgCommented:
"Any solution that relies only upon internal hosts is rather broken, IMO..."

It may be broken in your opinion but the original question was "i want the workstations to get the time from the linux 7.3 server". Using a local timeserver (which is syncronized using NTP) is good net etiquette since it saves bandwidth.


"I don't think that anyone should be able to make this decision for me"

In general I agree. However filtering NETBIOS and private IP's are two things most ISP do and I think that is a good practice since they have no practical use outside your private network.


"Also, please stop double-posting - the refresh button should only be used if you know what you're doing..."

I didn't hit refresh this time. I pressed "Submit" and got a Java Script error from EE's server. How it double posted is interesting but looks like the coders at EE should be more careful in their error handling.

The other double post was from using refresh almost two HOURS after the original post. Once again something the coders at EE could have considered and trapped.

I hope I don't double post this...
0
 
The--CaptainCommented:
Sorry, the double-post thing was cheap - I've done it onece or twice myself (but it's been a while, knock on wood).

>since they have no practical use outside your private network

You sound like my ISP - once again, only I can make this decision for myself (the fact that I tend to agree with you is beside the point)

Also, I said
>Any solution that relies only upon internal hosts is rather broken, IMO...

Which actually should read "Any solution that *must* rely only upon internal hosts is rather broken, IMO"

I do agree with your statements about a local timeserver being a good idea - I just think folks should avoid using netbios if at all humanly possible, since it is really a crappy protocol, and not really that extensible (whereas almost anyone will route your NTP requests).

Cheers,
-Jon



0
 
waweiwiAuthor Commented:
The last option i interest to is how can i configure DHCP for each stations in the LAN to get the NTP server automatically, I used the option but it did nothing.

Thanks
0
 
ahoffmannCommented:
standard DHCP does not have an entry for the NTP server (M$ NT-Domains might behave different here)
0
 
The--CaptainCommented:
>standard DHCP does not have an entry for the NTP server

I'm not sure there really *is* a standard - I thought it was just whatever your client and server can agree to send/receive (which tends to be good for configurable systems like unix, bad for proprietary systems like M$).  Could it work in unix?  Yes.  How about M$?  Not very likely.

That being said, you don't really *need* to have your DHCP server pass out this info - DHCP should be used to pass out dynamic network info that might change regularly (like your IP address - most IP stacks don't allow config of a permanent gateway without knowing the IP, so gateway tends to be included as well).  Unless you expect your NTP timeserver to change regularly, why do you even want to pass it out via DHCP (other than to save time on client configs?).  If you think it might change once in a while, just use DNS, and adjust the zone file - that's what it's for.

Cheers,
-Jon

0
 
CleanupPingCommented:
waweiwi:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
paullamhkgCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: ahoffmann {http:#7102162} & The--Captain {http:#7103102}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

paullamhkg
EE Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 6
  • 5
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now