Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
3122 connectés 

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Serveur NTP

n°1192758
kloklo55
Posté le 15-01-2010 à 17:08:58  profilanswer
 

Bonjour,

 

j'ai trois PC relié comme ceci
http://nsa10.casimages.com/img/2010/01/15/100115050704317765.jpg

 

Chacun des PC étant en mode routeur et donc avec plusieurs port ethernet. (sur chacun des PC il y a quelque chose de brancher sur les ports en adresse 192.10.10.1 (pour celui de gauche), 192.10.20.1 (pour celui du milieu) et en 192.10.0.1 pour celui de droite).

 

J'aimerais mettre du NTP sur les serveurs afin que les deux PC des extremités se synchronise avec le PC centrale. Mais avec mes fichiers de conf actuel cela ne marche pas.

 

Es ce que quelqu'un sais pourquoi??

 

fichier de conf d'un client :
/etc/ntp.conf

  

# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).

 

driftfile /var/lib/ntp/drift

 

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

 

# 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
restrict -6 ::1

 

restrict 192.10.11.0 mask 255.255.255.0 nomodify notrap

 

# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

 

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 192.10.20.1

 

#broadcast 192.168.1.255 autokey # broadcast server
#broadcastclient   # broadcast client
#broadcast 224.0.1.1 autokey  # multicast server
#multicastclient 224.0.1.1  # multicast client
#manycastserver 239.255.254.254  # manycast server
#manycastclient 239.255.254.254 autokey # manycast client

 

# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
#server 127.127.1.0 # local clock
#fudge 127.127.1.0 stratum 10

 

# Enable public key cryptography.
#crypto

 

includefile /etc/ntp/crypto/pw

 

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys

 

# Specify the key identifiers which are trusted.
#trustedkey 4 8 42

 

# Specify the key identifier to use with the ntpdc utility.
#requestkey 8

 

# Specify the key identifier to use with the ntpq utility.
#controlkey 8

 

# Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats

  


/etc/ntp/ntpservers

 


#This file contains a list of ntp servers to show in the system-config-date user interface.
#It is not recommended that you modify this file by hand.

 

192.10.20.1
clock.redhat.com
clock2.redhat.com

 


fichier de conf du server:

 

/etc/ntp.conf

 

# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).

 

driftfile /var/lib/ntp/drift

 

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

 

# 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
restrict 10.10.0.21
restrict 10.10.10.21
restrict 192.10.0.1
restrict 192.10.10.1
restrict -6 ::1

 

# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

 

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.fedora.pool.ntp.org
server 1.fedora.pool.ntp.org
server 2.fedora.pool.ntp.org

 

#broadcast 192.168.1.255 autokey # broadcast server
#broadcastclient   # broadcast client
#broadcast 224.0.1.1 autokey  # multicast server
#multicastclient 224.0.1.1  # multicast client
#manycastserver 239.255.254.254  # manycast server
#manycastclient 239.255.254.254 autokey # manycast client

 

# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
#server 127.127.1.0 # local clock
#fudge 127.127.1.0 stratum 10

 

# Enable public key cryptography.
#crypto

 

includefile /etc/ntp/crypto/pw

 

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys

 

# Specify the key identifiers which are trusted.
#trustedkey 4 8 42

 

# Specify the key identifier to use with the ntpdc utility.
#requestkey 8

 

# Specify the key identifier to use with the ntpq utility.
#controlkey 8

 

# Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats

  


/etc/ntp/servers
#This file contains a list of ntp servers to show in the system-config-date user interface.
#It is not recommended that you modify this file by hand.

 

clock.redhat.com
clock2.redhat.com

 


Merci par avance!!


Message édité par o'gure le 15-01-2010 à 18:26:35
mood
Publicité
Posté le 15-01-2010 à 17:08:58  profilanswer
 

n°1193147
kloklo55
Posté le 18-01-2010 à 08:57:30  profilanswer
 

Mon probleme a un petit peu changer. Je vois bien passer les trames NTP sur le réseaux pour la mise a jour. Le client envoie son heure. Le service acquite et lui donne sa nouvelle heure mais le client ne met pas a jour son horloge. Es ce que vous sauriez pourquoi??

n°1193165
kloklo55
Posté le 18-01-2010 à 10:47:58  profilanswer
 

je viens de faire des traces NTP :
 
http://nsa11.casimages.com/img/2010/01/18/100118125839745913.png
 
http://nsa11.casimages.com/img/2010/01/18/100118125905336588.png

n°1193172
o'gure
Modérateur
Multi grognon de B_L
Posté le 18-01-2010 à 11:03:18  profilanswer
 

As tu regardé dans les logs de /var/log pour détecter d'éventuelles erreurs avec des messages explicites ?


---------------
Relax. Take a deep breath !
n°1193173
kloklo55
Posté le 18-01-2010 à 11:06:17  profilanswer
 

je n'ai aucun fichier de log concernant ntp :/

n°1193174
o'gure
Modérateur
Multi grognon de B_L
Posté le 18-01-2010 à 11:09:28  profilanswer
 

kloklo55 a écrit :

je n'ai aucun fichier de log concernant ntp :/


Tu n'as pas forcément un fichier de log par service, fais usage de la curiosité :-)
Jette un coup d'oeil à ceux qui ne sont pas dédié à un services :
- messages.log
- syslog.log
- dmesg
- errors
...
ou en bourrin : grep -R ntp /var/log/*


---------------
Relax. Take a deep breath !
n°1193179
kloklo55
Posté le 18-01-2010 à 11:23:00  profilanswer
 

appriori il n'y a pas d'erreur loggué ni sur le serveur ni sur les clients

n°1193618
nemo13
Posté le 19-01-2010 à 21:33:56  profilanswer
 

Bonsoir,
 
D'après ce qu'on peut glaner ontheweb , il faut peut-être que tu gères le "stratum" entre ton serveur et tes clients .
 
en gros d'après ce que je crois avoir compris  :ange:
le stratum 1 est pour la référence mondiale , le 2 pour ceux qui se synchronisent etc ...
 
donc à priori un client doit avoir un stratum > à son serveur ntp
 
C'est peut-être une piste à suivre .
 
A+:jlp

n°1193691
Trailx ori​ginal
Posté le 20-01-2010 à 11:31:26  profilanswer
 

A titre personnel, j'ai déjà constaté que lorsque l'offset entre le serveur et le client était trop important, le client ne se mettait pas à jour...
 
Que donne un :
ntpdate -q @ip_serveur  
 
 ;)

n°1193813
fighting_f​alcon
Posté le 20-01-2010 à 20:09:47  profilanswer
 

nemo13 > c'est automatique
En règle générale tu ne synchronisera que très rarement sur un stratum 2, la plupart du temps sur stratum 3
Ton serveur NTP sera donc de stratum 3 ou 4
et tes clients obtiendrons automatiquement un stratum 4 ou 5
 
trailx > +1
essaie un ntpdate (paquet homonyme) avant pour forcer la mise à l'heure d'un coup (oui parce que le service NTP décale l'horloge que petit peu à petit peu)


Aller à :
Ajouter une réponse
 

Sujets relatifs
Débutant serveur SUNUn serveur de chat via interface web léger
[Ubuntu Server]Serveur de messagerie de type Exchange[résolu]serveur svn derrière routeur et livebox
Administrer un serveur Linux via VNCQu'est ce qu'un serveur d'affichage? Probleme mode 3D (Résolu)
panel d'admin+ sécurité + serveur de prod +noob?Synchronisation NTP sur Serveur Windows 2000
Serveur NTPproblème de serveur NTP
Plus de sujets relatifs à : Serveur NTP


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR