Advanced Linux Routing and traffic control: multicast routing

Source: Internet
Author: User
Keywords Linux flow control multicast routing advanced routing
Tags address advanced advanced routing control group html kernel linux

The multicast-howto is already very old (relatively), and not accurate enough even to be mistaken for 21136.html "> Guide.

Before you start multicast routing, you need to reconfigure your Linux kernel to support the type of multicast routing you want to implement. This step requires you to decide what type of multicast route to use. There are basically four kinds: DVMRP (multicast version of the RIP Unicast Protocol), MOSPF (the same, just OSPF), PIM ("Kyoto independent multicasting-sparse Mode", Protocol-Independent multicast-sparse mode, which assumes that users of any multicast group are spread out, rather than clumped, and PIM-DM (the same is only "intensive mode", which assumes that users of a multicast group are appropriately clumps together).

In the Linux kernel, you will notice that these options are not available. This is because the protocols themselves are handled by the routing process, such as zebra, mrouted, or PIMD. However, you should still have a clear idea of which scheme you want to use in order to choose the right kernel option.

Regardless of the multicast routing, you must enable the "multicasting" and "Multicast routing" options. That's enough for DVMRP and MOSPF. If you want to use PIM, you must also enable the PIMV1 or PIMV2 option, depending on which version of the PIM protocol your network uses.

When you think about all that, and you compile the new kernel, you should be able to see the IP protocol list that includes IGMP when you reboot. This is the protocol used to manage multicast groups. Although version 3rd already exists and is archived, Linux supports only the 1th and 2nd versions of IGMP until this document is written. But that doesn't affect us too much, because IGMPv3 is too new to see how many apps can be used to V3 specific features. Because, with IGMP processing groups, only the basic features that are included in the simplest version of IGMP are used. Most should be IGMPv2, although still can reach IGMPv1.

So far, everything is fine. We have enabled multicast. Now we have to tell the kernel to do something real--start routing. This means adding a multicast subnet to the routing table:

IP route add 224.0.0.0/4 dev eth0

(Of course, we assume you're going to be multicast through eth0.) You have to choose the equipment according to your situation. )

Now, start the Linux package forwarding ...

echo 1 >/proc/sys/net/http://www.aliyun.com/zixun/aggregation/6133.html ">ipv4/ip_forward

Here, you may wonder if it works. So let's ping the default group 224.0.0.1 and see if anyone is there. All machines configured and enabled for multicast on your LAN should be responded to, and other machines will not. But you will notice how amazing it is to declare yourself a 224.0.0.1 when no one machine responds ☺! Because this is a group address ("broadcast" to the receiver), all members of the group respond with their address instead of the group address.

Ping-c 2 224.0.0.1

You can now implement real multicast routing. OK, suppose you need to route between two networks.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.