Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGMP "Other querier present timer" not implemented #35

Closed
pchri03 opened this issue Oct 2, 2014 · 8 comments
Closed

IGMP "Other querier present timer" not implemented #35

pchri03 opened this issue Oct 2, 2014 · 8 comments

Comments

@pchri03
Copy link

pchri03 commented Oct 2, 2014

It seems that the "other querier present timer" is not implemented in the IGMP code (See RFC 2236 section 8.5, and section 7). The consequence hereof is that pimd does not resume as a querier if another querier with a lower IP address has been present in the past. With IGMP snooping switches without inbuilt queriers, this may break multicast altogether on the network.

Essentially, a non-querier IGMP router should listen for general queries from other queries, and restart the other querier present timer when it hears one. If the timer times out (other-querier-present-interval = robustness * query-interval + query-response-interval / 2 = 2 * 125 + 10 / 2 = 255 seconds), the IGMP router should switch to querier state and immediate transmit a general query. If it fails to do so, the multicast memberships expires 5 seconds after (group-membership-interval = robustness * query-interval + query-response-interval = 2 * 125 + 10 = 260 seconds).

@troglobit
Copy link
Owner

True, that's one of several features missing. Do you have a patch? :)

@pchri03
Copy link
Author

pchri03 commented Oct 6, 2014

Not at the moment, no. But now that I've finally found the root cause of what caused multicast to fail in our data centers, I can probably prioritize making a patch soon.

@troglobit
Copy link
Owner

I just noticed that my other project, mrouted, which is the base used by the original pimd authors,
probably has what we want:

if (v->uv_querier &&
    (v->uv_querier->al_timer += TIMER_INTERVAL) >
    IGMP_OTHER_QUERIER_PRESENT_INTERVAL) {
    /*
     * The current querier has timed out.  We must become the
     * querier.
     */
    IF_DEBUG(DEBUG_IGMP) {
    logit(LOG_DEBUG, 0, "Querier %s timed out",
          inet_fmt(v->uv_querier->al_addr, s1, sizeof(s1)));
    }
    free(v->uv_querier);
    v->uv_querier = NULL;
    v->uv_flags |= VIFF_QUERIER;
    send_query(v);
}

So it should be fairly easy to port it to pimd. The layout of the is a bit different, this piece of
code was found in mrouted/vif.c, whereas pimd locates the IGMP stuff in pimd/igmp_proto.c

troglobit added a commit that referenced this issue Oct 6, 2014
@troglobit
Copy link
Owner

Huh, that was almost too easy.

Just ported the above code to cc03559 on branch igmp-querier-timeout and a very basic test seems to indicate that it works! If possible, could you test this @pchri03 before I merge to master for release?

I'd of course like to have this, and #31 configurable via pimd.conf, if I get another couple of minutes to spare I might whip some support up for that too before I punch out a release.

@troglobit
Copy link
Owner

Got a few hours off tonight, so now I've also implemented rudimentary configuration of
IGMP query interval and querier timeout (global settings only). See #31 for details, on
the same branch as the timeout fix.

@pchri03
Copy link
Author

pchri03 commented Oct 7, 2014

Nice! I tested the code in a virtual environment and it worked as expected.

I'll probably attempt to deploy a build with the changes to our multicast routers tomorrow night.

@pchri03 pchri03 closed this as completed Oct 7, 2014
@troglobit
Copy link
Owner

Thanks for verifying the fix, much appreciated! :)

Reopening the issue, however. I like to keep issues open until the fix is in the master (release) branch.

@troglobit troglobit reopened this Oct 7, 2014
@troglobit
Copy link
Owner

Merged to master, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants