Link to home
Start Free TrialLog in
Avatar of waweiwi
waweiwiFlag for Palestine, State of

asked on

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
Avatar of The--Captain
The--Captain
Flag of United States of America image

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

Avatar of waweiwi

ASKER

I want to synchroniz the time btween the server and stations (Windows stations and linux server)
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/
Avatar of waweiwi

ASKER

What's about windows9x how can i play with to get the time from linux server.
Avatar of waweiwi

ASKER

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
>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.

NET TIME ...   uses a proprietary protocol (SMB?), not NTP over TCP/IP
>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.

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?
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 ...
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
"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.
"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.
>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

> .. 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.
"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...
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



Avatar of waweiwi

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CleanupPing
CleanupPing

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.
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