serving multicast ntp in multihomed server - NTP

This is a discussion on serving multicast ntp in multihomed server - NTP ; hi there! After reading this list archives, and after playing around with the broadcast option in ntp.conf to enable multicast in a ntp server,I'm unable to do a couple of things that should work without problems. I'm using servers that ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: serving multicast ntp in multihomed server

  1. serving multicast ntp in multihomed server

    hi there!

    After reading this list archives, and after playing around with the
    broadcast option in ntp.conf to enable multicast in a ntp server,I'm
    unable to do a couple of things that should work without problems.

    I'm using servers that come with three network cards. Our network
    topology uses two of them to send data, and the third one is used for
    server management.

    The problem is that it doesn't matter what I do, multicast group is
    always sended through the last configured nic (eth2).

    My boxes run linux, and multicast routes are configured:

    ifconfig eth0 214.25.250.1
    ifconfig eth1 214.25.249.1
    ifconfig eth2 172.88.1.1
    route add -net 225.25.250.0 mask 255.255.255.0 dev eth0
    route add -net 225.25.249.0 mask 255.255.255.0 dev eth1
    route add default gw 172.88.1.100

    ntp.conf:
    broadcast 225.25.250.123

    Running tcpdump shows that multicat packets output through eth2... I'm
    running no mcast daemon. Since ntpd asks the kernel the multicast
    route, something is going wrong since it is outputing data to the
    wrong interface, with the wrong source address.

    If ntpd doesn't rely on the routing tables to output its data, it
    should let the user specify the source ip of the outgoing multicast
    packet, so it will leave the box using the correct interface. I was
    thinking about the possibility of modifying ntpd, to add a "source ip"
    and a "destination interface" to the broadcast directive.

    Maybe a better approach is to use a multicast routing daemon? There
    are not plenty of them... I've only found one, smcroute, which insert
    static multicast routes in kernel. mrouted no longer exists, zebra is
    out...

    Could someone bring some light to this, thanks in advance!

    --
    -- Use of a keyboard or mouse may be linked to serious injuries or disorders.
    diego dot torres at gmail dot com - Madrid / Spain

  2. Re: serving multicast ntp in multihomed server

    Hello Diego,

    you are not specifying which version of ntpd you are using.
    4.2.4p2 is the minimum level required for ntpd to pick up
    the correct interface for mcast addresses.

    I have not analyzed much of the way Linux does multicast in general.
    But it seems that Linux just as BSD needs to run a mcast routing daemon
    for correct operation in a multihomed environment.

    See http://bugs.ntp.org/785 for some background information.

    Usually the source address is the address of the interface where
    the packets where initially sent out. And it is a unicast address.
    Since 4.2.4p2 ntpd detects the interface which is sending out
    the multicast packets.
    Multicast routing (controlled by the mcast routing daemon) will
    replicate these packets as needed to the other interfaces, but
    the source address will not be adjusted during this replication
    step.
    I have no idea whether your definition of a multicast network
    route will do what you expect, but you must use at least 4.2.4p2
    for ntpd to pick up the kernels notion where it would send this
    multicast packet.

    Frank

    Diego Torres wrote:
    > hi there!
    >
    > After reading this list archives, and after playing around with the
    > broadcast option in ntp.conf to enable multicast in a ntp server,I'm
    > unable to do a couple of things that should work without problems.
    >
    > I'm using servers that come with three network cards. Our network
    > topology uses two of them to send data, and the third one is used for
    > server management.
    >
    > The problem is that it doesn't matter what I do, multicast group is
    > always sended through the last configured nic (eth2).
    >
    > My boxes run linux, and multicast routes are configured:
    >
    > ifconfig eth0 214.25.250.1
    > ifconfig eth1 214.25.249.1
    > ifconfig eth2 172.88.1.1
    > route add -net 225.25.250.0 mask 255.255.255.0 dev eth0
    > route add -net 225.25.249.0 mask 255.255.255.0 dev eth1
    > route add default gw 172.88.1.100
    >
    > ntp.conf:
    > broadcast 225.25.250.123
    >
    > Running tcpdump shows that multicat packets output through eth2... I'm
    > running no mcast daemon. Since ntpd asks the kernel the multicast
    > route, something is going wrong since it is outputing data to the
    > wrong interface, with the wrong source address.
    >
    > If ntpd doesn't rely on the routing tables to output its data, it
    > should let the user specify the source ip of the outgoing multicast
    > packet, so it will leave the box using the correct interface. I was
    > thinking about the possibility of modifying ntpd, to add a "source ip"
    > and a "destination interface" to the broadcast directive.
    >
    > Maybe a better approach is to use a multicast routing daemon? There
    > are not plenty of them... I've only found one, smcroute, which insert
    > static multicast routes in kernel. mrouted no longer exists, zebra is
    > out...
    >
    > Could someone bring some light to this, thanks in advance!
    >


+ Reply to Thread