Re: ntp and dynamic IP

From: Ricardo Yanez (Ricardo.Yanez_at_correo.calel.cl)
Date: 06/30/05

  • Next message: Kent West: "Re: Now you see it, now you don't--the tale of the disappearing mouse..."
    To: schnobs@babylon-kino.de
    Date: Thu, 30 Jun 2005 09:00:54 -0400
    
    

    >
    > my ISP disconnects me once a day, so that I won't keep a quasi-static IP
    > I don't pay for. Now, pppd reconnects swiftly, but ntp doesn't seem to
    > like this anyway. Soon after the dis-/reconnect I get this:

    > Feb 9 13:15:01 zwerg ntpd[4732]: sendto(192.53.103.104): Invalid argument
    > Feb 9 13:15:07 zwerg ntpd[4732]: sendto(130.149.17.21): Invalid argument
    > Feb 9 13:16:08 zwerg ntpd[4732]: sendto(195.145.119.188): Invalid argument
    > Feb 9 14:41:27 zwerg ntpd[4732]: synchronisation lost

    > As it will never recover, I resorted to restarting ntp every day. But
    > surely, there's a more elegant solution. Or is there?

    Hi,
    An elegant (I think) way of solving this is to
    put scripts in /etc/ppp/ip-[up|down].d/ to stop
    and start ntpd when pppd reconnects.

    My /etc/ppp/ip-down.d/ntp-server simply says,

    -----
    #!/bin/sh

    [ -x /usr/sbin/ntpd ] || exit 0

    echo "Stopping NTP server"
    /etc/init.d/ntp-server stop
    -----

    and my /etc/ppp/ip-up.d/ntp-server,

    -----
    #!/bin/sh

    [ -x /usr/sbin/ntpd ] || exit 0

    echo "Starting NTP server"
    /etc/init.d/ntp-server start
    -----

    Just make sure these scrips are executable (755).

    Ricardo

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Kent West: "Re: Now you see it, now you don't--the tale of the disappearing mouse..."

    Relevant Pages

    • Re: Synchronizing time on AIX
      ... We call these guys "NTP", which stands for Network Time Protocol. ... to stay synchronized to a lower stratum NTP Server. ... But xntpd doesn't just force the local clock to the 'correct' value. ...
      (comp.unix.aix)
    • Frequent time reset messages
      ... Symmetricon XLI-GPS stratum-1 NTP server on an isolated network. ... These machines each have a Gigabit network connection to a high-end ... Here is a typical ntpq output: ...
      (comp.protocols.time.ntp)
    • Re: ntpdate / ntpd
      ... > Each of them are running ntpdate via cron every 10 minutes. ... > The NTP server used is internal to the data centre, ... > synchronises its time with external NTP servers in the internet. ...
      (comp.os.linux.networking)
    • Re: NTP not working?
      ... the Windows W32TIME NTP server is not compatible with the IOS ... This may be seen with a Windows system ...
      (comp.dcom.sys.cisco)
    • Re: Problem with Linux Machines Request for Time from an XP Machine
      ... it to compensate for hardware clock rate errors. ... You will NOT get that even with full ntp from a phone connection. ... >> were to use a decent ntp server. ...
      (comp.os.linux.networking)