Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    multiple independant multicast routing instances

    I worte a multicast proxy (mcproxy -, some time ago. The Proxy is using the Linux Kernel routing tables and supports multiple multicast routing tables. The proxy split the the routing tables virtual on the userspace and usees only the default multicast routing table of the Linux Kernel. This behavior is causing problems with a szenario from RFC 6224 (Multicast Listener Support in Proxy Mobile IPv6).

    Therefore, I tested the multiple independant multicast routing instances of the Linux Kernel. But i encounterd a problem:

    //1. I create a socket.
    m_sock = socket(AF_INET, SOCK_RAW, IPPROTO_IGMP);

    //2. choose an arbitrary routing table.
    int table = 5;
    setsockopt (m_sock, IPPROTO_IP, MRT_TABLE, &table, sizeof (table));

    //3. set the multicast routing flag
    int val = 1;
    setsockopt(m_sock, IPPROTO_IP, MRT_INIT, &val, sizeof(val));

    //4. add two virtual interface indexes (eth0, eth1)
    setsockopt(m_sock, IPPROTO_IP, MRT_ADD_VIF, ... );

    //5. add a route (eth0 to eth1 with group G1 and source S1)
    setsockopt(m_sock, IPPROTO_IP, MRT_ADD_MFC, ... );

    If I use the zero table (table= 0) then everything is fine: The routing entry in "/proc/net/ip_mr_cache" is visible and multicast packetes are forwarded.

    If I use another talbe (for example table five) all setsockopt functions work without errors but no multicast packets are forwarded. „/proc/sys/net/ipv4/config/eth[0|1]/mc_forwarding“ are set but
    unfortunately, the files /proc/net/ip_mr_cache and „ip_mr_vif“ are empty, so it is difficult to analyze errors.

    Am I doing something wrong, or is the experimental Linux code the problem?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Great questions! I am just now myself getting into Linux multicast programming. If I find anything out, I'll let you know! Right now, I'm clueless...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    yeah the first "'answer" . If you need help about Linux multicast programming then you can ask me. What do you want to program?

  4. $spacer_open
  5. #4
    Ok, I solve it by myself.

    I have to configure the routing table with the following commands:

    # ip mrule add iif eth0 lookup 5
    # ip mrule add oif eth1 lookup 5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts