mcproxy by default forwarding UDP stream received from its connected Downstream side to upstream.

44 views
Skip to first unread message

Ganesh Reddy

unread,
Nov 24, 2017, 2:30:05 AM11/24/17
to Multicast Proxy
Dear all, 

I am trying to analyze below case with mcproxy


H1 ========================  Mcproxy/Router ====================== H2
                               (downstream)eth0                 eth1(upstream)                  

my mcproxy.conf looks as below:

protocol IGMPv3;
pinstace myProxy: eth1 ==> eth0;

Description:

 When i send a UDP stream from H1,  the mcproxy is forming multicat route and  blindly forwarding onto its configured upstream, irrespective of subscriber listening @H2.

1)Is the above observation valid one  ?
2)Is this a known limitation ? How to avoid doing soo ?

Please help me to analyze.

Thanks,
Ganesh

Sebastian Woelke

unread,
Nov 24, 2017, 8:04:47 AM11/24/17
to Multicast Proxy
Hello Ganesh,

> 1) Is the above observation valid one  ?
Yes, its the intended behavior. See https://tools.ietf.org/html/rfc4605#section-4.2
Multicast Data on the Upstream is only forwarded to the Downstream if subscribers exist, but not vice versa.

> 2) How to avoid doing soo ?
For this minimalist scenario you could switch Upstream and Downstream.
If a simple multicast forwarder is not sufficient, you might require a multicast routing protocol such as PIM or DVMRP

Regards,
Sebastian

Ganesh Reddy

unread,
Nov 24, 2017, 12:35:16 PM11/24/17
to Multicast Proxy
Hello Sebastian,

Thanks for giving insight of the behavior. 
Your suggestion about #2 look fine. But, as per the current usage of mcproxy  in our scope, we may not switch to other service.

I am trying to search other options like, any filters/configuration  in mcproxy.conf to add, so that forwarding to upstream won't occur  even without subscribers.
Or,  trying to check below code snippet in "mcproxy/src/proxy/simple_mc_proxy_routing.cpp"  to modify below function  and give a try. 

Please share, if you have any suggestion for my use case ?  Thanks again

std::list<std::pair<source, std::list<unsigned int>>> simple_mc_proxy_routing::collect_interested_interfaces(const addr_storage& gaddr, const source_list<source>& slist) const
{
    HC_LOG_TRACE("");

    const std::map<addr_storage, unsigned int>& input_if_index_map = m_data.get_interface_map(gaddr);

    //add upstream interfaces
    std::list<std::pair<source, std::list<unsigned int>>> rt_list;
    for (auto & s : slist) {

        auto input_if_it = input_if_index_map.find(s.saddr);
        if (input_if_it == input_if_index_map.end()) {
            HC_LOG_ERROR("input interface of multicast source " << s.saddr << " not found");
            return rt_list;
        }

        if (m_p->is_downstream(input_if_it->second)) {
            auto input_if_it = input_if_index_map.find(s.saddr);
            if (input_if_it == input_if_index_map.end()) {
                HC_LOG_ERROR("input interface of multicast source " << s.saddr << " not found");
                continue;
            }

            std::list<unsigned int> up_if_list;
            for (auto ui : m_p->m_upstreams) {
                if (check_interface(IT_UPSTREAM, ID_OUT, ui.m_if_index, input_if_it->second, gaddr, s.saddr)) {

                    if (is_rule_matching_type(IT_UPSTREAM, ID_OUT, RMT_ALL)) {
                        up_if_list.push_back(ui.m_if_index);       //////////////  I am assuming this is the location of the code, where  the upstream IfIndex is getting added OUT-VIF list of the MCast Route Cache list using MRT_ADD_MFC


.  
Reply all
Reply to author
Forward
0 new messages