troglobit / pimd

PIM-SM/SSM multicast routing for UNIX and Linux
http://troglobit.com/projects/pimd/
BSD 3-Clause "New" or "Revised" License
197 stars 87 forks source link

VIFs and start up of pimd #68

Closed Kzibi closed 7 years ago

Kzibi commented 8 years ago

It it possible to change start up of pimd to NOT scan kernel for all vifs, but only for those listed in pimd.conf ?

troglobit commented 8 years ago

Depends on which version of pimd you are using, but since v2.1.1 you can disable all at startup, using pimd -N and enable only the interfaces you want with phyint ... enable syntax in pimd.conf

Kzibi commented 8 years ago

That's truth with pimd -N. I start pimd:

/usr/sbin/pimd -N

but

pimd version 2.3.1 starting ...
pimd[15248]: Cannot install the Register vif: too many interfaces
....

couse of 32 limit in kernel. I have plenty of interfaces (aliases, vlans etc.) and pimd ask kernel for all. I build pimd with --disable-exit-on-error and it saved my skin ;)

pimd is working fine because it's use vif 13 and 14 on list ( < 31). But if I need to use vif number 32 etc. Will pimd find it?

I know to compile kernel with increased MAXVIFS, but I prefer to avoid it.

BTW. Thanks, big thanks, for Your work.

troglobit commented 8 years ago

Aha, now I understand! Yeah, that should be fixed ... we want pimd to know of all interfaces (regardless of MAXVIFS), but only set up VIFs for interfaces enabled in pimd.conf :+1:

I'll look into a fix for this, so you don't have to use --disable-exit-on-error, in the upcoming v2.3.2 release.

Thank you for the report, and the kind words! :smiley:

troglobit commented 8 years ago

Argh, too messy to fix this properly for v2.3.2 ... I'll have to postpone it for the v2.4.0 release cycle instead :disappointed:

... and you're right, pimd will not be able to add interfaces beyond 31 as VIFs at the moment.

Kzibi commented 7 years ago

I suggest to use ip net namespaces. It's elegant and practical. Working flawless.

troglobit commented 7 years ago

Yep, netns really is awesome!

AHG-2017 commented 7 years ago

Hi troglobit, can you say any date, when v2.4.0 (with this Bugfix) will be released?

troglobit commented 7 years ago

@AHG-2017 Sorry, been busy with lots of other things for a while now. I'm working on pimd on my own time, so evenings and weekends, which is shared with all other projects and family. So unfortunately I cannot give any estimates when v2.4 will be out.

AHG-2017 commented 7 years ago

No problem, perhaps then 2018. Family should have always highest priority.

vshunkov commented 7 years ago

Faced with same issue on 2.3.2. Freebsd 9.3 is using as a border router for small network ~1k users. Thanks to @troglobit for your work in advance and looking forward for 2.4.0.

troglobit commented 7 years ago

I hope the fix in 396be21 is to everyone's liking. It's a bit of an ugly workaround, but should be sufficient to be able to use up to MAXVIFS (32) active multicast routing interfaces.

The recommended way of using this is pimd -N, and a pimd.conf with:

phyint ifname1 enable
phyint ifname2 enable
...

Please let me know (in a new bug report) if you find any problems.

Cheers /Joachim