How do I get ntpd to answer on a specific ip address - NTP

This is a discussion on How do I get ntpd to answer on a specific ip address - NTP ; Hi, I'm trying to set up ntpd on a high availability cluster comprised of two servers running running heartbeat. Each server has it's own address and heartbeat managers a third address which is the cluster and whatever machine is active ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: How do I get ntpd to answer on a specific ip address

  1. How do I get ntpd to answer on a specific ip address

    Hi,

    I'm trying to set up ntpd on a high availability cluster comprised of
    two servers running running heartbeat. Each server has it's own address
    and heartbeat managers a third address which is the cluster and whatever
    machine is active has that address as a virtual address. The problem is
    that when I query the cluster address for the time, ntpd responds on the
    individual server's real address and not the virtual.

    How can I set the address that it answers on so that it always answers
    on the virtual address which is the cluster address.

    Thanks,
    Rob



    --
    Rob Tanner
    UNIX Services Manager
    Linfield College, McMinnville OR

  2. Re: How do I get ntpd to answer on a specific ipaddress

    Rob Tanner wrote:
    > Hi,
    >
    > I'm trying to set up ntpd on a high availability cluster comprised of
    > two servers running running heartbeat. Each server has it's own address
    > and heartbeat managers a third address which is the cluster and whatever
    > machine is active has that address as a virtual address. The problem is
    > that when I query the cluster address for the time, ntpd responds on the
    > individual server's real address and not the virtual.
    >
    > How can I set the address that it answers on so that it always answers
    > on the virtual address which is the cluster address.
    >
    > Thanks,
    > Rob


    Rob,

    We are going to need a lot more information about this. So please start
    with the version of NTP and the O/S's they are running on and the
    configuration file for each.

    Is the problem that you are using the cluster address in an ntpq query
    and it responds with the IP address of a specific node? I'm not very
    clear on what the question is. Also how do you know that it's responding
    with a specific address and not the cluster address?

    Danny

  3. Re: How do I get ntpd to answer on a specific ip address

    I didn't see the original message to I'll reply to the bit that Danny
    quoted.

    Danny Mayer wrote:
    > Rob Tanner wrote:
    >> Hi,
    >>
    >> I'm trying to set up ntpd on a high availability cluster comprised of
    >> two servers running running heartbeat. Each server has it's own address
    >> and heartbeat managers a third address which is the cluster and whatever
    >> machine is active has that address as a virtual address. The problem is
    >> that when I query the cluster address for the time, ntpd responds on the
    >> individual server's real address and not the virtual.
    >>
    >> How can I set the address that it answers on so that it always answers
    >> on the virtual address which is the cluster address.
    >>
    >> Thanks,
    >> Rob


    I recommend not synchronising to the cluster's floating IP address, but
    rather to all of the cluster nodes individually. This has the following
    advantages:

    1. It works (because it avoids the problems you mentioned);

    2. Clients will be able to keep better time (but see disadvantage no. 2
    below).

    3. Your overall time synchronisation network will be more resilient.

    4. If your cluster heartbeat mechanism works at the application layer
    (as good heartbeat mechanisms do), then removing ntp as a concern in
    heartbeat design is welcome. This point is moot if your heartbeat
    mechanism is just a ping without checking whether the applications are
    also still up.

    It also has the following potential disadvantages:

    1. You need to make the ntp ports of the cluster nodes's real IP
    addresses reachable to your clients. This may violate your security policy.

    2. If it is your intention for the clients to synchronise only to the
    cluster, and if the cluster consists of 2 nodes (as appears to be the
    case) then my proposed setup is probably the worst possible: your
    clients would synchronise to two servers. Solution: have your clients
    synchronise to several additional machines (ideally 4 independent
    servers in total for each client).

    Hope this helps.

    Cheers, Jan

  4. Re: How do I get ntpd to answer on a specific ip address

    Similar problem here. It seems that ntpd binds to existing interfaces explicitly, not the inaddr_any that allows it to hear traffic on every interface. In my HA situation, I add a virtual IP address that is my "highly available" IP address. NTPD started before my highly available address was created, so clients trying to attach to the ntp server couldn't, as xntpd wasn't listening on my HA IP address.
    The solution was to do a stop/start on NTPD shortly after I create my highly available address. Then the NTP server is bound to the new address as well as the old physical addresses.

+ Reply to Thread