将altnet参数转换成pimd.conf文件

我需要在我的专用networking路由多播stream。 我正在使用pimd进行多播路由。 直到我把altnet <multicast_source_ip> masklen 24放到pimd.conf文件中,组播路由才起作用。 问题是我并不总是知道<multicast_source_ip>是什么。

我仍然不明白altnet指令在做什么? 根据pimd.conf文件:

 # If you want to add "alternative (sub)net" to a physical interface, # eg, 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!! 

我怎样才能解决这个问题,而不使用<multicast_source_ip>

phyint的altnet指令为给定的上游接口指定了一个替代子网。

假设你想从iface eth0路由到eth1,eth0上的子网是192.168.1.0/24,eth1是10.0.0.0/24。 但是,即使组播源位于eth0所连接的局域网上,它也会在172.12.0.0/24子网上运行。 将eth0 172.12.0.0/24添加到eth0 phyintconfiguration使得pimd接受本地发起的stream量。

我在GitHub的项目的手册页上添加了以下新段落:

altnet network / len:替代主机/networking在一个给定的接口上作为本地连接的组播源接受。 如果phyint连接到多个IP子网,请使用altnet关键字来描述每个附加子网。

通常你不需要这个选项,所以我对你的设置有点好奇。 你在sysctl.conf中启用IP转发,还是类似的?