I need to route a multicast streams in my private network. I'm using pimd for multicast routing. The multicast routing did not work until I put altnet <multicast_source_ip> masklen 24 to the pimd.conf file. The problem that I do not always know what the <multicast_source_ip>.

I still not understand what the altnet directive is doing? According to the pimd.conf file:

# If you want to add "alternative (sub)net" to a physical interface,
# e.g., if you want to make incoming traffic with a non-local source address
# to appear as it is coming from a local subnet, then use the command:
#   phyint <local-addr | ifname> altnet <net-addr> masklen <len>
# XXX: if you use this command, make sure you know what you are doing!!

And how can I solve this problem without <multicast_source_ip> using?


The altnet directive to phyint specifies an alternative subnet for a given upstream interface.

Say you want to route from iface eth0 to eth1, the subnet on eth0 is and eth1 has However, even if the multicast source is located on the LAN eth0 is attached to, it operates on the subnet. Adding altnet to the eth0 phyint configuration makes pimd accept the traffic as locally originating.

I've added the following new paragraph to the man page for the project on GitHub:

altnet network/len: Alternative host(s)/network(s) to accept as locally attached multicast sources on a given interface. If a phyint is attached to multiple IP subnets, describe each additional subnet with the altnet keyword.

Usually you shouldn't need this option, so I'm a bit curious about your setup. Did you enable IP forwarding in sysctl.conf, or similar?

  • yes, IP forwarding is enabled – Dima Aug 24 '12 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.