Go Back   The macosxhints Forums > OS X Help Requests > Networking



Reply
 
Thread Tools Rate Thread Display Modes
Old 04-04-2003, 03:23 AM   #1
ogg
Prospect
 
Join Date: Apr 2003
Posts: 12
Question Setting up a timeserver

Hi folks,

how can I set up my mac to be a timeserver for my local network?
__________________
kind regards, ogg
ogg is offline   Reply With Quote
Old 04-04-2003, 06:47 AM   #2
gatorparrots
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
gatorparrots is offline   Reply With Quote
Old 04-04-2003, 08:36 AM   #3
ogg
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
ogg is offline   Reply With Quote
Old 04-04-2003, 10:27 AM   #4
gatorparrots
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
Also, are you running the ipfw? If so, you will have to open the appropriate ports.

Last edited by gatorparrots; 04-04-2003 at 10:31 AM.
gatorparrots is offline   Reply With Quote
Old 04-04-2003, 10:31 AM   #5
pink
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.
pink is offline   Reply With Quote
Old 04-04-2003, 11:02 AM   #6
ogg
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
ogg is offline   Reply With Quote
Old 04-04-2003, 01:09 PM   #7
gatorparrots
Major Leaguer
 
Join Date: Dec 2002
Posts: 441
ntp ports:
Quote:
ntp 123/tcp #Network Time Protocol
ntp 123/udp #Network Time Protocol

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`
gatorparrots is offline   Reply With Quote
Old 04-04-2003, 03:19 PM   #8
ogg
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
ogg is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:07 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.