[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
Última revisiónAmbos lados, revisión siguiente
es:howtos:network_services:ntp [2019/02/17 00:04 (UTC)] slackwarespanoles:howtos:network_services:ntp [2019/02/17 01:02 (UTC)] – [Sources] slackwarespanol
Línea 10: Línea 10:
 ===== Introducción ===== ===== Introducción =====
  
-When several users manipulate shared data on different client PCs on a networkit's important that these machines are all synchronizedThis is especially true if you share files over NFS, or if you use NIS for centralized authenticationYou'll get all sorts of weird errors if your clocks are out of syncUnfortunatelythe clients' onboard clocks aren't sufficiently precise.+Cuando varios usuarios manipulan datos compartidos en diferentes PC clientes en una redes importante que todas estas máquinas estén sincronizadasEsto es especialmente importante si comparte archivos a través de NFS, o si usa NIS para la autenticación centralizadaObtendrás todo tipo de errores extraños si tus relojes no están sincronizadosDesafortunadamentelos relojes a bordo de los clientes no son lo suficientemente precisos.
  
-That's where NTP (//Network Time Protocol//comes in handyIt allows networked machines to adjust their clocks so as to be perfectly synchronizedA series of public time servers on the Internet allow the reception of the exact timeFrom this pointwe can use NTP in several ways.+Ahí es donde NTP (// Network Time Protocol //) es útilPermite que las máquinas en red ajusten sus relojes para estar perfectamente sincronizadosUna serie de servidores de hora públicos en Internet permiten la recepción de la hora exactaDesde este puntopodemos usar NTP de varias maneras.
  
-  * The ''ntpdate'' command makes an initial correction of the BIOS clock+  * El comando '' ntpdate '' realiza una corrección inicial del reloj del BIOS. 
-  This one-time-adjustment isn't sufficient for a server that is supposed to be up 24/7, since its clock will drift away gradually from the exact timeIn that casewe have to configure the ''ntpd'' daemon (shipping with the ''ntp'' package). This daemon contacts public time servers at regular intervals and proceeds with incremental corrections of the local clock+   Este ajuste de una sola vez no es suficiente para un servidor que se supone que funciona 24/7, ya que su reloj se alejará gradualmente de la hora exactaEn ese casotenemos que configurar el daemon '' ntpd '' (envío con el paquete '' ntp ''). Este demonio se pone en contacto con los servidores de hora públicos a intervalos regulares y procede con correcciones incrementales del reloj local. 
-  The ''ntpd'' daemon can in its turn be configured as time server for the local client machines.+   El daemon '' ntpd '' puede su vez configurarse como un servidor de tiempo para las máquinas cliente locales.
  
-It's considered good practice to use ''ntpdate'' for the initial adjustment and ''ntpd'' for regular time synchronization.+Es una buena práctica usar '' ntpdate '' para el ajuste inicial y '' ntpd '' para la sincronización de tiempo regular. 
 +===== Consideraciones de Firewall  =====
  
-===== Firewall considerations =====+Los servicios NTP utilizan el puerto UDP 123. Abra este puerto si desea permitir que las máquinas remotas se conecten a su servidor NTP.
  
-The NTP services uses UDP port 123. Open this port if you want to allow remote machines to connect to your NTP server. +===== Sincronice un servidor LAN o un servidor público con un servidor NTP en Internet =====
- +
-===== Synchronize a LAN server or a public root server with an NTP server on the Internet ===== +
- +
-Create an empty log file:+
  
 +Crear un archivo de registro vacío:
 <code> <code>
 # touch /var/log/ntp.log # touch /var/log/ntp.log
 </code> </code>
  
-Visit [[http://www.pool.ntp.org|http://www.pool.ntp.org]] and choose list of servers according to your country.+Visite [[http://www.pool.ntp.org|http://www.pool.ntp.org]] y elija una lista de servidores de acuerdo su país.
  
-Configure the NTP service by editing ''/etc/ntp.conf''You might backup the existing ''ntp.conf'' file and start from scratch+Configure el servicio NTP editando ''/etc/ntp.conf''Puede hacer una copia de seguridad del archivo '' ntp.conf '' existente y comenzar desde cero.
  
-In the example belowthe list of four servers is chosen for my company's location (France):+En el siguiente ejemplola lista de cuatro servidores se elige para la ubicación de mi empresa (Francia):
  
 <code> <code>
Línea 56: Línea 54:
 </code> </code>
  
-Here's a little explanation for some options:+Aquí hay una pequeña explicación para algunas opciones:
  
-  The ''fudge 127.127.1.10 stratum 10'' directive is a "dummyserver acting as fallback IP in case the external time source becomes momentarily unreachableWhen this happens, NTP will continue to work and base itself on this "internalserver+   La orden '' fudge 127.127.1.10 stratum 10 '' es un servidor "ficticioque actúa como IP de reserva en caso de que la fuente de tiempo externa se vuelva momentáneamente inaccesibleCuando esto suceda, NTP continuará trabajando y se basará en este servidor "interno". 
-  * NTP has its own arsenal of rules to limit access to the servicewhich can be used independently from a firewall. The ''restrict'' directives in the above configuration prevent distant computers from changing the servers' configuration (first ''restrict'' statement), and the machine is configured to trust itself (second ''restrict'' statement).  +   * NTP tiene su propio arsenal de reglas para limitar el acceso al servicioque se puede usar independientemente de un firewall. Las ordenes '' restrict '' en la configuración anterior evitan que las computadoras distantes cambien la configuración de los servidores (primera declaración '' restrict ''), y la máquina está configurada para confiar en sí misma (segunda declaración '' restrict ''). 
-  A ''restrict'' statement without any argument but followed by the hostname boils down to an ''allow all''.+   Una declaración de "restrict" sin ningún argumento, pero seguida del nombre de host se reduce a "permitir todo".
  
-==== Manage the NTP service ====+==== Gestiona el servicio NTP ====
  
-Before starting the serviceproceed to an initial adjustment of your system clock:+Antes de iniciar el servicioproceda a un ajuste inicial del reloj de su sistema:
  
 <code> <code>
Línea 70: Línea 68:
 </code> </code>
  
-<note>The ''ntpdate'' command is normally considered obsoletebut it still comes in handy when performing important time adjustmentsThe "orthodoxway would be to use the ''ntpd -g'' command - the official replacement for ''ntpdate'' - but its use will fail if your system clock is off for more than half an hour.</note>+<note>El comando '' ntpdate '' normalmente se considera obsoletopero aún así es útil cuando se realizan ajustes de tiempo importantesLa forma "ortodoxasería utilizar el comando '' ntpd -g '', el reemplazo oficial de '' ntpdate '', pero su uso fallará si el reloj de su sistema está apagado durante más de media hora..</note>
  
-Activate the NTP service:+Activar el servicio NTP:
  
 <code> <code>
Línea 78: Línea 76:
 </code> </code>
  
-Manage the NTP service:+Gestionar el servicio NTP:
  
 <code> <code>
Línea 84: Línea 82:
 </code> </code>
  
-Now display the list of servers your machine is actually connected to:+Ahora muestre la lista de servidores a los que está conectada su máquina:
  
 <code> <code>
Línea 97: Línea 95:
 </code> </code>
  
-The little ''*'' asterisk preceding one of the above lines means your machine is effectively synchronized with the respective NTP server.+El pequeño asterisco '' * '' que precede a una de las líneas anteriores significa que su máquina está efectivamente sincronizada con el servidor NTP correspondiente.
  
-<note tip>The first synchronization can take a few minutessometimes up to half an hour.</note>+<note tip> La primera sincronización puede demorar unos minutosa veces hasta media hora.</note>
  
-===== Synchronize your client PC(s) with your local NTP server =====+===== Sincronice su (s) PC (s) cliente (s) con su servidor NTP local =====
  
-In a LAN, it is considered good practice to synchronize only one machine - the server - with a public NTP serverand the client PCs with the local serverThis saves bandwidth and takes some load off the public NTP servers. +En una LAN, se considera una buena práctica sincronizar solo una máquina, el servidor, con un servidor público NTP, y las PC cliente con el servidor local. Esto ahorra ancho de banda y quita cierta carga de los servidores NTP públicos.
- +
-As above, proceed to an initial adjustment of the system clock:+
  
 +Como arriba, proceder a un ajuste inicial del reloj del sistema:
 <code> <code>
 # ntpdate pool.ntp.org # ntpdate pool.ntp.org
 </code> </code>
  
-Create an empty logfile:+Crear un archivo de registro vacío:
  
 <code> <code>
Línea 117: Línea 114:
 </code> </code>
  
-Now configure NTP to synchronize with the LAN serverReplace the example'IP (''192.168.2.1''with your real server's IP:+Ahora configure NTP para sincronizar con el servidor LAN. Reemplace la IP del ejemplo ('' 192.168.2.1 ''con la IP de su servidor real:
  
 <code> <code>
Línea 135: Línea 132:
 </code> </code>
  
-  The three ''restrict'' statements mean we're blocking all NTP traffic except for the client itself and the server.+   Las tres declaraciones "restrict" significan que estamos bloqueando todo el tráfico NTP, excepto el cliente y el servidor.
  
-Activate and start the NTP service:+Activar e iniciar el servicio NTP:
  
 <code> <code>
Línea 144: Línea 141:
 </code> </code>
  
-As above, use the ''ntpq -p'' command to check if the synchronization went well:+Como se indicó anteriormente, use el comando '' ntpq -p '' para verificar si la sincronización fue correcta:
  
 <code> <code>
Línea 154: Línea 151:
 </code> </code>
  
-<note tip>Againyou might have to wait a few minutes before the first synchronization takes place.</note> +<note tip>Una vez máses posible que deba esperar unos minutos antes de que se realice la primera sincronización. </note> 
-   +===== Supervisar el rendimiento de ntpd =====
-===== Monitor the performance of ntpd =====+
  
-You will notice that the logfile ''/var/log/ntp.log'' does not contain any information about the actual accuracy of your system clockIf it's important to youyou can log the statistics of time corrections applied by NTP daemon to the system clockTo do thisadd the following lines to ''/etc/ntp.conf'':+Notará que el archivo de registro '' /var/log/ntp.log '' no contiene ninguna información sobre la precisión real del reloj de su sistemaSi es importante para ustedpuede registrar las estadísticas de correcciones de tiempo aplicadas por el daemon NTP al reloj del sistemaPara hacer estoagrega las siguientes líneas a''/etc/ntp.conf'':
  
 <code> <code>
Línea 166: Línea 162:
 </code> </code>
  
-You have to create the statsdir manuallyOnce the configuration changes are in effect, ''ntpd'' will create files named ''loops.YYYYMMDD'' in that directoryBelow is an example line from one of these files:+Tienes que crear el statsdir manualmenteUna vez que los cambios de configuración estén en efecto, '' ntpd '' creará archivos llamados '' loops.YYYYMMDD '' en ese directorioA continuación se muestra una línea de ejemplo de uno de estos archivos:
 <code> <code>
 56690 3950.569 0.001199636 2.297 0.001830770 0.571576 10 56690 3950.569 0.001199636 2.297 0.001830770 0.571576 10
 </code> </code>
  
-The first and second number are the UTC time (expressed as [[http://en.wikipedia.org/wiki/Julian_day|Modified Julian Date]] and seconds elapsed since midnight). The third and fourth number are the offsets of time (in secondsand of frequency (in parts per million). The fifth and sixth number are their respective uncertainties.+El primer y segundo número son la hora UTC (expresada como [[http://en.wikipedia.org/wiki/Julian_day|Modified Julian Date]] y los segundos transcurridos desde la medianoche). El tercer y cuarto número son las compensaciones de tiempo (en segundosy de frecuencia (en partes por millón). El quinto y sexto número son sus respectivas incertidumbres.
  
-To monitor the performance of ''ntpd'', you can examine the plot of clock offset or frequency offset vs. time:+Para supervisar el rendimiento de '' ntpd '', puede examinar el gráfico del desplazamiento del reloj o el desplazamiento de la frecuencia en función del tiempo:
  
 <code> <code>
Línea 184: Línea 180:
 </code> </code>
  
-Given enough data, visual examination of the plots will allow you to see peculiarities in ''ntpd'' performanceshould they ariseFor examplein the case illustrated by the figure belowthe rapid decrease of the frequency offset was caused by replacing the power supply unit of the machine. +Con suficientes datosel examen visual del gráfico le permitirá ver las particularidades en el rendimiento "ntpd"en caso de que surjanPor ejemploen el caso ilustrado en la siguiente figurala rápida disminución del desplazamiento de frecuencia se debió al reemplazo de la unidad de alimentación de la máquina.
 {{:howtos:network_services:ntp_time_freq.png|}} {{:howtos:network_services:ntp_time_freq.png|}}
  
-====== Sources ======+====== Fuentes ======
  
-  Originally written by [[wiki:user:kikinovak|Niki Kovacs]] +   Originalmente escrito por[[wiki:user:kikinovak|Niki Kovacs]] 
-  Performance monitoring section contributed by Dominik Drobek+   Sección de monitoreo de desempeño aportada por Dominik Drobek
 +   * Traducido por:  [[wiki:user: slackwarespanol | Victor]]  2019/02/17 01:00 (UTC)
  
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 <!-- You must remove the tag-word "template" below before saving your new page --> <!-- You must remove the tag-word "template" below before saving your new page -->
 {{tag>howtos time clock synchronization author_kikinovak}} {{tag>howtos time clock synchronization author_kikinovak}}
 es:howtos:network_services:ntp ()