|
|
#1 |
|
Prospect
Join Date: Apr 2003
Posts: 12
|
Hi folks,
how can I set up my mac to be a timeserver for my local network?
__________________
kind regards, ogg |
|
|
|
|
|
#2 |
|
Major Leaguer
Join Date: Dec 2002
Posts: 441
|
You're already running ntpd on your machine:
ps auxww | grep "ntp[d]" root 334 0.0 0.0 1556 304 ?? Ss 10:47AM 0:05.10 ntpd -f /var/run/ntp.drift -p /var/run/ntpd.pid |
|
|
|
|
|
#3 |
|
Prospect
Join Date: Apr 2003
Posts: 12
|
Thanks. But when I set the IP-Number of my Mac OS X Server into the Timeserver-Field of my Client, I become an error.
Have I missunderstood anything else?
__________________
kind regards, ogg |
|
|
|
|
|
#4 |
|
Major Leaguer
Join Date: Dec 2002
Posts: 441
|
You have to configure it:
Code:
# Create the configuration file for NTPD
* Make the file /etc/ntp.conf
BEGIN FILE
server 127.127.1.0 prefer
fudge 127.127.1.0 stratum 0
END OF FILE
* "server" 127.127.1.0 specifies the local clock
* "refer" tells ntpd to prefer this other any other options
* fudge "127.127.1.0 stratum 0" tells ntpd that this is a very reliable time source
Last edited by gatorparrots; 04-04-2003 at 10:31 AM. |
|
|
|
|
|
#5 |
|
Major Leaguer
Join Date: Jul 2002
Location: Germany
Posts: 441
|
In the standard configuration, ntpd only works as a client. To have it work as a server, you'll need to edit /etc/ntp.conf .
I couldn't find the man pages for ntpd and ntp.conf on my system, but they can be read here: http://www.freebsd.org/cgi/man.cgi?q...SD+4.1-RELEASE cheers, pink edit: so I was a bit too late...
__________________
"And what have we got in here ? - Ahh, things.." (Louis (2), inspecting kitchen cupboards.) Last edited by pink; 04-04-2003 at 10:33 AM. |
|
|
|
|
|
#6 |
|
Prospect
Join Date: Apr 2003
Posts: 12
|
@ gatorparrots and pink
thanks a lot, but I can't get it work... can you give me a sample with real ip-numbers, machines and so on? how can i start (or restart) the ntpd? should I confugure anything else? what is the default port-number of timeserver? how can I open the port? Many questions, I know...
__________________
kind regards, ogg |
|
|
|
|
|
#7 | |||||||||||||||||||
|
Major Leaguer
Join Date: Dec 2002
Posts: 441
|
ntp ports:
Adding firewall rules: sudo ipfw add 2008 allow tcp from any to 192.168.1.2 123 in recv en0 sudo ipfw add 2008 allow tcp from 192.168.1.2 123 to any out xmit en0 sudo ipfw add 2009 allow udp from any to 192.168.1.2 123 in recv en0 sudo ipfw add 2009 allow udp from 192.168.1.2 123 to any out xmit en0 (The rule numbers [2008,2009] are arbitrary. Replace with numbers appropriate to your configuration. 192.168.1.2 is your IP address. Replace as appropriate.) Restart the ntpd daemon like this: sudo kill -1 `cat /var/run/ntpd.pid` |
|||||||||||||||||||
|
|
|
|
|
#8 |
|
Prospect
Join Date: Apr 2003
Posts: 12
|
------------------------------------------------------
code: # Create the configuration file for NTPD * Make the file /etc/ntp.conf BEGIN FILE server 10.0.0.5 prefer fudge 10.0.0.5 stratum 0 END OF FILE ------------------------------------------------------ >> when I modify this config-file and then I re-open the System Preferences > Time + Date, I get the following server: "10.0.0.5 fudge" >> then I open the Config-File again and the files looks like this: ------------------------------------------------------ server 10.0.0.5 minpoll 12 maxpoll 17 fudge 10.0.0.5 minpoll 12 maxpoll 17 ------------------------------------------------------ >> What does this mean? I only want to have a timeserver... >> "10.0.0.5" is the ip-adress of my station, that I want to have as timeserver.
__________________
kind regards, ogg |
|
|
|
![]() |
|
|