troglobit / pimd

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

Add support for Cisco style "ip pim register-source" #38

Closed troglobit closed 7 years ago

troglobit commented 9 years ago

Thomas Lau of Tetrion Captial Ltd writes:

On Cisco router I could use ip pim register-source to specific which source IP / interface should I use to "announce" to neighbor, but I can't see this option exists on PIMD, may I know how could I implement this? ​

troglobit commented 9 years ago

You can probably add this functionality if you hack the following two functions in pim_proto.c:

send_pim_register()
send_pim_null_register()

I imagine the following setting in pimd.conf:

register-source <ifname>

Which can be used to find the vifi_t in the above functions. Notice how both the IP address and the MTU is read from the vifi_t.

42wim commented 8 years ago

Would be nice if phyint 1.2.3.4 enable would actually use 1.2.3.4 and not the first ip found on that interface.

We're using keepalived and the virtual ip address should be the one used. As workaround i'm now hardcoding the ip addresses.

troglobit commented 8 years ago

@42wim Sounds more than reasonable. The code isn't prepared for that today, unclear even if the code can actually handle multiple addresses on interfaces.

I can have a look at this later, unless you beat me to it.

troglobit commented 7 years ago

Should be fixed in 5a53406. Note, to use this it is recommended to start pimd with -N flag:

pimd -N -c noif.conf

and selectively enable interfaces in the .conf file:

phyint virbr0 enable
phyint gre0 enable
phyint 192.168.1.42 enable

If an interface has multiple addresses, pimd will now only use the one selected. In this case 192.168.1.42 of usb0.

42wim commented 7 years ago

cool! Thanks for the work.

troglobit commented 7 years ago

World be awesome if someone could test it before we release it :)

On Sun, Jun 4, 2017, 21:33 Wim, notifications@github.com wrote:

cool! Thanks for the work.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/troglobit/pimd/issues/38#issuecomment-306061772, or mute the thread https://github.com/notifications/unsubscribe-auth/AALM3XFcx-Yz3k4TFuGm8b9pJ0Sj0yVuks5sAwaagaJpZM4D8Otp .

42wim commented 7 years ago

I'll try in the week of 12 june :-)

troglobit commented 7 years ago

Thanks man! 😎✌️

On Sun, Jun 4, 2017, 21:54 Wim, notifications@github.com wrote:

I'll try in the week of 12 june :-)

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/troglobit/pimd/issues/38#issuecomment-306063004, or mute the thread https://github.com/notifications/unsubscribe-auth/AALM3VwCgWOJ_sE8OsEwRhl6EQ31BQwcks5sAwuJgaJpZM4D8Otp .