troglobit / pimd

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

PIMD doesn't send down mac addr #83

Closed aFric0t closed 7 years ago

aFric0t commented 8 years ago

Hi, I have a problem with pimd. I don't see with ipmddr command, the mac address when a group report is accepted. I see in the Multicast Table (pimd -r) the group adress but not in my kernel message and register. How pimd send mac address to kernel ?

my configuration is: a sender -> send IGMP report a router

It is inside the router that I didn't saw anything with mac addrr.

Could you help me please ?

troglobit commented 8 years ago

Hi @alban53

Not sure I understand what you want to do, how familiar are you with PIM? Usually the sender only sends its multicast stream to a group, when the router sees a receiver requesting that group it will forward the stream from the sender to the receiver.

So, either an IGMP membership report is received on a PIM interface, or a PIM join from another router. Not until that has transpired does pimd set the multicast route in the kernel.

See the HowTo on my blog for more pointers http://troglobit.com/multicast-howto.html

aFric0t commented 8 years ago

I think I understand how pimd works but when pimd receives a IGMP report (v2 or v3) from a receiver, I think it must register the corresponding multicast mac address to configured net devices ?

For example: if I send a report for the multicast group 231.0.1.2, does it normally have to write down this IP Address inside kernel routing table with the asscoiated multicast MAC Address 01:00:5e:00:01:02 ?

With the multicast 224.0.0.0/4 range configured, I can see that when pimd receives IGMP v2/v3 report from a receiver, the corresponding multicast mac address is correctly written down to the kernel. But with the multicast 231.0.0.0/4 range configured, the IGMP v2/v3 report for 231.0.1.2 is correctly received by pimd (pimd -r tells me 231.0.1.2 is ni its multicast routing table), but the corresponding multicast mac address is not set in the kernel.

I tried smcroute, and when the receiver sends a report, it sends down to the driver the multicast IP address translated (Mac multicast address).

Why the same test works with smcroute but not with pimd ?

This is my configuration(pimd.conf):

phyint eth0 enable 

# Smaller value means "higher" priority
cand_rp time 30 priority 20

# Bigger value means  "higher" priority
cand_bootstrap_router priority 5

# All multicast groups
#group_prefix 224.0.2.0 masklen 4
group_prefix 231.0.1.0 masklen 16

# Switch to shortest-path tree after first packet, but only after 100 sec.
spt_threshold packets 0 interval 100 
aFric0t commented 8 years ago

I downloaded your source code and I saw that multicast mac address are written down kernel inside start_vif function but only at the initialisation and only for multicast mac address in 224.0.0.X. I understand now why others multicast mac adress are never send down to kernel when I send a report join message and when the new group is accepted.

Is it a normal use of pimd ?

troglobit commented 8 years ago

SMCRoute and pimd are different. PIM takes over the IGMP services from the kernel, SMCRoute doesn't really do anything with IGMP except for faking a receiver for you. And for routing SMCRoute sets up the route immediately whereas pimd only sets it up when it has both an IGMP join and an inbound multicast stream.

Instead of diving into details immediately you could start by explaining a bit about your use-case, perhaps inclode a small ASCII image of your topology (sender -- router -- router -- receiver). It is much easier to help out if I understand what you are trying to solve instead of trying to figure it out from how you've interpreted that it should work ... maybe you cannot even use pimd in your use-case, I don't know.