[ntp:questions] serving multicast ntp in multihomed server

Frank Kardel kardel at ntp.org
Thu Oct 30 19:14:38 UTC 2008

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
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.


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
> ifconfig eth1
> ifconfig eth2
> route add -net mask dev eth0
> route add -net mask dev eth1
> route add default gw
> ntp.conf:
> broadcast
> 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!

More information about the questions mailing list