queries regarding mc proxy

457 views
Skip to first unread message

Debarun Roychowdhury

unread,
Jul 24, 2015, 4:31:54 AM7/24/15
to Multicast Proxy, tath...@alumnux.com
Hi,

  We have a device which can act in router mode as well as bridge mode. There is a specification which requires to send IGMPv2 and MLDv2 General Query in bridge mode. Also the specification requires that in gateway mode the device should not proxy.I have the following queries:

1. The version of mcproxy being used in the distribution is 1.1.0.y . From mcproxy website we found that till version 0.1.4 there was support for generation of IGMPv2 General Query. From 1.0.0 sending of IGMPv2 General Query is not supported , only IGMPv3 general query can be sent. Similarly for MLD ,from version 1.1.0 sending of MLDv2 General Query is supported only, and not MLDv1. But from the specification we need to send IGMPv2 query and MLDv2 query. What do you suggest we do to satisfy this requirement? The latest mcproxy source has support for sending MLDv2 general query but not IGMPv2 general query. Do we need to port the feature from older version to support sending of IGMPv2 general query?

2. In the specification it is specified that the device should not perform IGMPv2/3 proxy in the gateway mode. Can you please suggest any changes in code/configuration to prevent mcproxy from performing IGMP proxy?

3. Can you suggest any changes in the configuration of mcproxy to make it run in bridge mode? The requirement is to send IGMPv2 and MLDv2 General Query for snooping.

Regards
Debarun Roychowdhury

Sebastian Wölke

unread,
Jul 24, 2015, 7:51:20 AM7/24/15
to Multicast Proxy, debarun.ro...@gmail.com, tath...@alumnux.com, debarun.ro...@gmail.com
Hello Debarun Roychowdhury,

My suggests:
1. yes your are right, the version 0.1.4 (or better 0.1.5 on github https://github.com/mcproxy/mcproxy/tree/v0.1.5) supports IGMPv2 and MLDv1. and the current version 1.1.1 supports IGMPv3 and MLDv2.
If you need an IGMPv2 proxy and an MLDv2 proxy you could simple run both versions (Mcproxy 0.1.5 for IPv4 and Mcproxy 1.1.1 for IPv6).
Referring to RFC 3376 (IGMPv3 - https://tools.ietf.org/html/rfc3376#section-7.3.2) Mcproxy version 1.1.1 supports a compatibility mode for "older versions group members". Therefore, you may run an IGMPv3 Proxy despite the specification. There should be at least no technical reasons to not install an IGMPv3 querier.

2. To stop Mcproxy you can simple kill it or write the following in the configuration file: >> disable; #the Mcproxy quits if it sees this command in the configuration file.

3. If I understand you correctly, you want Mcproxy to work as a simple Querier not as a proxy (just sending periodically General Queries, but not forwarding of group data), you can configure it with exact one downstream:
>> pinstance quiererOnly: ==> eth8;

I hope I was able to help.
If you have further questions or comments, do not  hesitate to contact me.

Regards,
Sebastian

Debarun Roychowdhury

unread,
Jul 24, 2015, 8:06:46 AM7/24/15
to Multicast Proxy
Hi Sebastian,
Thank you very much for your help. I will definitely try out these points and will get back to you. Thanks once again.

Best Regards,
Debarun

Debarun Roychowdhury

unread,
Jul 27, 2015, 4:44:07 AM7/27/15
to Multicast Proxy, tath...@alumnux.com, aufga...@gmail.com
Hi Sebastian,

    I am trying to configure mcproxy as a simple querier. I made the following changes in "/etc/init.d/mcproxy" file

#       echo "pinstance $instname: \"$upstream\" ==> \"$downstreams\";" >>$CONF_FILE
        echo "pinstance quiererOnly: ==> \"$downstreams\";" >>$CONF_FILE

   After making this modification , I have restarted the network, but I don't see mcproxy running. However the "/etc/mcproxy" file got updated like this:

protocol IGMPv3;
pinstance quiererOnly: ==> "br-lan";

   Please let me know if the process is correct and whether I have to make more modification to make mcproxy run.

Thanks and Regards
Debarun

Sebastian Wölke

unread,
Jul 27, 2015, 8:53:01 AM7/27/15
to Multicast Proxy, debarun.ro...@gmail.com, tath...@alumnux.com, debarun.ro...@gmail.com
Hello Debarun,

your configuration file looks good.
Before Mcproxy stops it should print an ERROR message which should help you.
If you cannot see this message you could compile and run Mcproxy in debug mode. It will writes ERROR and other messages to a number of logfiles.

Kind Regards,
Sebastian

Debarun Roychowdhury

unread,
Jul 27, 2015, 11:03:46 AM7/27/15
to Multicast Proxy, tath...@alumnux.com, aufga...@gmail.com
Hi Sebastian,

  I am trying to compile mcproxy in debug mode. I have made the following modification in the Makefile of mcproxy
define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR)/mcproxy \
                CC="$(TARGET_CC)" \
                CXX="$(TARGET_CXX)" \
                CFLAGS="$(TARGET_CFLAGS) -DDEBUG_MODE"
endef

  With this change I am trying to compile mcproxy, but I observe compilation error. I have attached the error log with this mail. Can you please suggest what am I doing wrong?

Regards
Debarun
Error.txt

Sebastian Wölke

unread,
Jul 27, 2015, 11:26:11 AM7/27/15
to Multicast Proxy, debarun.ro...@gmail.com, tath...@alumnux.com, debarun.ro...@gmail.com
Hello Debarun,

It looks like you are using g++ version 4.6.3 but you need a g++ version of 4.8 or higher.

Kind Regards,
Sebastian

Debarun Roychowdhury

unread,
Jul 28, 2015, 3:58:08 AM7/28/15
to Multicast Proxy, tath...@alumnux.com, aufga...@gmail.com
Hi Sebastian,

   Thank you for the information. But there is an issue. The g++ that came in with the toolchain is of version 4.6.3 and it is not advisable to modify the toolchain. Is there any other way?  The main issue that I want to focus on is to make mcproxy run in bridge mode where there is no concept of WAN , so that I can send out the query in bridge mode. Please advise.

Thanks and Regards
Debarun

Sebastian Wölke

unread,
Jul 28, 2015, 5:37:46 AM7/28/15
to Multicast Proxy, debarun.ro...@gmail.com, tath...@alumnux.com, debarun.ro...@gmail.com
Hello Debarun,

If you cannot compile Mcproxy in debug mode, you can still get the error message (the reason why Mcproxy stops). It will print the error message to standard output. If you need more information you could modify the logger to print lower priority messages to the standard output.

Otherwise you could try out this version (https://github.com/mcproxy/mcproxy/tree/OpenWRT/uClibc) or you can convert the proxy code to be compatible to your compiler version.

Kind Regards,
Sebastian

Debarun Roychowdhury

unread,
Jul 28, 2015, 8:27:24 AM7/28/15
to Multicast Proxy, tath...@alumnux.com, aufga...@gmail.com
Hi Sebastian,
  
    Thank you for your help. I was able to get the error message. I had to make 2 modifications in the "/etc/init.d/mcproxy" file to make mcproxy run in bridge mode.

1.
echo "pinstance querierOnly: ==> \"$downstreams\";" >>$CONF_FILE

2.
echo "pinstance querierOnly downstream \"$downif\" in blacklist table upnp;" >>$CONF_FILE

   With 2 changes I was able to make mcproxy run in bridge mode and generate IGMPv3 General Query as well.

   Now my aim is to generate IGMPv2 General Query in bridge mode. For this as you suggested I need to port Mcproxy 0.1.5 . But will it compile if I use g++ version 4.6.3? Or is there any possible way to modify the 1.1.1 version code to generate IGMPv2 General Query ? Also I need to stop generation of IGMPv3 General Query both in gateway mode and bridge mode, that is instead of IGMPv3 General Query, I need to send IGMPv2 General Query.

Thanks and Regards
Debarun

Sebastian Wölke

unread,
Jul 29, 2015, 5:21:01 AM7/29/15
to Multicast Proxy, debarun.ro...@gmail.com, tath...@alumnux.com, debarun.ro...@gmail.com
Hello Debarun,

yes, you could modify Mcproxy 1.1.1 to send only IGMPv2 general Query messages, if it helps you.
At first you should force Mcproxy to work always in the compatibility mode by fixing the variable compatibility_mode_variable to IGMPv2.
and to send IGMPv2 General Queries you have to modify the function send_igmpv3_query() in file igmp_sender.cpp where the message is created.

Kind Regards,
Sebastian

Debarun Roychowdhury

unread,
Jul 30, 2015, 3:20:10 AM7/30/15
to Multicast Proxy, tath...@alumnux.com, aufga...@gmail.com
Hi Sebastian,

   Thank you very much for your reply. I am trying to modify the code of mcproxy-1.1.1 to send IGMPv2 general query
   Can you help me with some points:
   The "m_sock.send_packet" function prototype has changed from 0.1.5 to 1.1.1
    Previously it was
send_packet(const char* addr, int port, const unsigned char* data, unsigned int data_size)
and now
send_packet(const addr_storage& addr, const unsigned char* data, unsigned int data_size)
    So now using the current send_packet function, I want to send out IGMPv2 General Query. Can you let me know what changes are required while populating the "igmpv3_query* query" and "ip* ip_hdr" structures to generate query for IGMPv2 instead of IGMPv3?

Thanks and Regards
Debarun

Debarun Roychowdhury

unread,
Jul 30, 2015, 10:51:58 AM7/30/15
to Multicast Proxy, tath...@alumnux.com, aufga...@gmail.com, debarun.ro...@gmail.com
Hi Sebastian,

   I have modified the send_general_query code as below:

bool igmp_sender::send_general_query(unsigned int if_index, const timers_values& tv) const
{
    HC_LOG_TRACE("");
#if 0 // Debarun
    return send_igmpv3_query(if_index, tv, addr_storage(AF_INET), false, source_list<source>());
#else
    addr_storage dst_addr;
    int size = get_msg_min_size();

   if(size <0) return false;
    unsigned char buf[size];

    if(!m_sock.choose_if(if_index)) return false;
    if(!create_mc_query(GENERAL_QUERY, buf)) return false;

    dst_addr = IPV4_ALL_HOST_ADDR;
//    return m_sock.send_packet(IPV4_ALL_HOST_ADDR,0,buf,sizeof(buf));
    return m_sock.send_packet(dst_addr, buf, sizeof(buf));
#endif // Debarun
}


   I have ported the get_msg_min_size and create_mc_query functions from 0.1.5 version.

   With this change the parameters being passed to m_sock.send_packet function are:
   IPV4_ALL_HOST_ADDR -> 224.0.0.1
   buf -> 11  a ee f5  0  0  0  0 (In hex , 11=type Membership query , a = Max response time 10 secs , eef5 = checksum , 0 0 0 0 = Multicast Address)
   sizeof(buf) -> 8


   But I don't see the packet in wireshark on running on the host macine, however I have confirmed the sendto() function is getting called from the m_sock.send_packet function. The parameters being passed to the sendto funciton are:
sendto(m_sock, data, data_size, 0, &addr.get_sockaddr() , addr.get_addr_len());
m_sock -> 4
data -> same as buf generated by create_mc_query funciton
data_size -> 8
&addr.get_sockaddr() -> The address is 224.0.0.1
addr.get_addr_len() -> Length is 16


  
Please kindly let me know where I am going wrong , and whether this is the correct approach.

Debarun Roychowdhury

unread,
Aug 4, 2015, 1:47:44 AM8/4/15
to Multicast Proxy, tath...@alumnux.com, aufga...@gmail.com, debarun.ro...@gmail.com
Hi Sebastian,

   Can you please provide me with any update regarding my last post?

Regards
Debarun

Sebastian Wölke

unread,
Aug 4, 2015, 2:46:20 PM8/4/15
to Multicast Proxy, tath...@alumnux.com, aufga...@gmail.com, debarun.ro...@gmail.com
Hello,

sorry for the late answer, I am currently on vacation.

I could not found any mistakes in your code example.
Returns the sendto function with an error?

Regards,
Sebastian

Debarun Roychowdhury

unread,
Aug 5, 2015, 4:54:18 AM8/5/15
to Multicast Proxy, tath...@alumnux.com, aufga...@gmail.com, debarun.ro...@gmail.com
Hi Sebastian,

   By default the mcproxy is configured to send out IGMP queries. Is it possible to send out IGMP General queries and MLDv2 General Queries simultaneously? If yes can you let me know what are the changes required? We need to send out General Queries only and not perform proxy. Also can you please outline the steps required to configure mcproxy to use MLD in querierOnly mode?

Regards
Debarun

Sebastian Wölke

unread,
Aug 5, 2015, 5:48:20 PM8/5/15
to Multicast Proxy, tath...@alumnux.com, aufga...@gmail.com, debarun.ro...@gmail.com
Hello Debarun,

to run IGMP General queries and MLDv2 General Queries at the same time you could load for example two configuration files instead of one.

Here the configuration file is loaded (file in line 64 https://github.com/mcproxy/mcproxy/blob/master/mcproxy/src/proxy/proxy.cpp#L64).
and you could "copy" and modify the function start_proxy_instances() run with the second configuration file.

Regards,
Sebastian

Debarun Roychowdhury

unread,
Aug 6, 2015, 12:42:07 PM8/6/15
to Multicast Proxy, tath...@alumnux.com, aufga...@gmail.com, debarun.ro...@gmail.com
Hi Sebastian,

   Thank your very much for your reply. Sorry to disturb you again during your vacation :-(  . I tried modifying the code to run the mcproxy with 2 different configuration files. But while running i am observing the following error:

ERROR: failed to set MRT flag! Error: Address already in use errno: 125
pure virtual method called
terminate called without an active exception
Aborted


  I have attached the modified proxy.cpp file , proxy.hpp file , the init.d/mcproxy file and the 2 configuration files. Can you please go through them once and let me know where I am going wrong? Actually during the 2nd start_proxy_instance() function call I am getting the error. I have renamed the function as start_proxy_instance_mld(), the error is happening at the below line

 m_proxy_instances.insert(std::pair<int, std::unique_ptr<proxy_instance>>(table_number_mld, std::move(pr_i_mld)));

  I got a print before this line but did not get the print after this line.

  I am really sorry to disturb you during your vacation. Thank you once again for all your help.

Best Regards,
Debarun

Debarun Roychowdhury

unread,
Aug 6, 2015, 12:43:42 PM8/6/15
to Multicast Proxy, tath...@alumnux.com, aufga...@gmail.com, debarun.ro...@gmail.com
Hi Sebastian,

   Thank your very much for your reply. Sorry to disturb you again during your vacation :-(  . I tried modifying the code to run the mcproxy with 2 different configuration files. But while running i am observing the following error:

ERROR: failed to set MRT flag! Error: Address already in use errno: 125
pure virtual method called
terminate called without an active exception
Aborted


  I have attached the modified proxy.cpp file , proxy.hpp file , the init.d/mcproxy file and the 2 configuration files. Can you please go through them once and let me know where I am going wrong? Actually during the 2nd start_proxy_instance() function call I am getting the error. I have renamed the function as start_proxy_instance_mld(), the error is happening at the below line

 m_proxy_instances.insert(std::pair<int, std::unique_ptr<proxy_instance>>(table_number_mld, std::move(pr_i_mld)));

  I got a print before this line but did not get the print after this line.

  I am really sorry to disturb you during your vacation. Thank you once again for all your help.

Best Regards,
Debarun

Files.tar.gz

Sebastian Wölke

unread,
Aug 7, 2015, 4:54:48 PM8/7/15
to Multicast Proxy, tath...@alumnux.com
Hello,

ok, I have assumed the following:
The modifed proxy works fine in the IGMP only mode and in the MLD only mode.
If you run both modes at the same time the proxy crashes.
Right?

I think the proxy.cpp file looks quite good, you just duplicated and renamed all necessary member variables of the class proxy.

But I think you have forgot the following:
In the line
        m_proxy_instances.insert(...);

m_proxy_instance is a map with the table_number as key. You might make the table_number global. I think your key has the value 1 for the IMGP instance as well as for the MLD instance (this would result in an undefined behaviour).

I hope this fixes your error.

Regards,
Sebastian

Debarun Roychowdhury

unread,
Aug 18, 2015, 2:51:17 AM8/18/15
to Multicast Proxy, tath...@alumnux.com
Hi Sebastian,

   Thank you for your mail. I have implemented the same and now I am able to run mcproxy using both the configuration files and General Query is being sent out for both IGMP and MLD.

   I have one query. In bridge mode I see the IPv6 multicast data packets are being flooded to all interfaces even if I have not joined the IPv6 multicast group. But for IGMP it is working fine, I receive the packets only after joining the group.

   Can you let me know whether the join/leave is handled by mcproxy or by linux. I checked the mld_receiver.cpp file. I found its parsing the type of message and calling the "m_proxy_instance->add_msg()" function with appropriate arguments. What does it actually do?

Regards
Debarun

Sebastian Wölke

unread,
Aug 19, 2015, 5:44:19 PM8/19/15
to Multicast Proxy, tath...@alumnux.com
Hello Debarun,

the multicast router part (the group menagement of the domain - querier) is handled by Mcproxy and the listener part (joining/leaving groups on the upstream) is handled by the operating system. Thereby is file mld_receiver.cpp part of the multicast router part. It parses all membership messages and sends these messages (indirect over the proxy instance) to the querier (querier.cpp/hpp) of the downstream, where the messages have been received.

Regards,
Sebastian

Debarun Roychowdhury

unread,
Sep 10, 2015, 8:24:57 AM9/10/15
to Multicast Proxy, tath...@alumnux.com
Hi Sebastian,

  Hope you are doing well.

  I want to consult with you regarding an issue. With mcproxy running in my system I am observing a memleak. When I kill mcproxy , the leak is no longer observed. I tried mcproxy version 1.1.0 without any modification to the original source code, and I was able to see the memleak in that case as well.

  This issue is similar to the issue I found over the internet:
 
   Please let me know if you have any solution related to this memleak issue.

Thanks and Regards
Debarun

Debarun Roychowdhury

unread,
Sep 12, 2015, 3:20:00 PM9/12/15
to Multicast Proxy, tath...@alumnux.com
Hi Sebastian,

   Any update regarding this issue?

Thanks and Regards,
Debarun

Sebastian Wölke

unread,
Sep 12, 2015, 7:38:22 PM9/12/15
to Multicast Proxy, tath...@alumnux.com
Hello Debarun,

sorry for the late answer. I can investigate the issue on monday. Could you send me your configuration file and could you describe me your network condition? Do you have many different groups, or do you have the same problem with just one group?

Regards
Sebastian

Debarun Roychowdhury

unread,
Sep 14, 2015, 2:40:05 AM9/14/15
to Multicast Proxy, tath...@alumnux.com
Hi Sebastian,

   Thank you for your reply.

   I have attached the following files:
   mcproxy.conf -> configuration file for mcproxy
   memleak_log.txt -> log of free memory, recorded after every 60 seconds.

   There were no groups joined. The LAN and WAN have configured and the board is booted up. The board is in idle condition.

root@OpenWrt:/# cat /proc/net/ip_mr_cache
Group    Origin   Iif     Pkts    Bytes    Wrong Oifs
root@OpenWrt:/#


  When mcproxy is killed, there is no further memory leak.
  The mcproxy version being used is 1.1.0.y .

  It will be of great help if you can kindly provide us with some lead towards this issue.

Thanks and Regards
Debarun
mcproxy.conf
memleak_log.txt

Debarun Roychowdhury

unread,
Sep 15, 2015, 3:43:26 AM9/15/15
to Multicast Proxy, tath...@alumnux.com
Hi Sebastian,

   Any did you get the chance to investigate this issue? Any lead that we can follow? Its a bit urgent :-(

Regards
Debarun

Sebastian Wölke

unread,
Sep 16, 2015, 10:09:11 AM9/16/15
to Multicast Proxy, tath...@alumnux.com
Hello Debarun,

I started to investigate the issue and I realized it consumes more time than I have at the moment.
I will work on it in the near future, but I can't do it now.

Regards
sebastian

Aditya Shedsale

unread,
May 9, 2022, 5:08:39 AM5/9/22
to Multicast Proxy
Hi all,
i am trying multicast using mcproxy in bridge mode, in script I added  pinstance A: "eth2" ==> "br-lan";
but getting error as failed to add interface.
Does anyone have an idea to debug, please reply?
Regards
Aditya

Reply all
Reply to author
Forward
0 new messages