Multicast configuration under Linux

Source: Internet
Author: User

A unicast address identifies a single IP interface, and the broadcast address identifies all IP interfaces for a subnet. Multicast addresses represent a set of IP interfaces, unicast and broadcast are the two extremes (either single or full) of the addressing scheme, and multicast is intended to provide a compromise between the two. Multicast is an important tool for building distributed systems, such as: Network games, ICQ chat construction, remote video conferencing system and so on. The program that uses multicast is similar to the one that UDP sends information in one way, except that the multicast program uses a special multicast IP address.
Broadcast data using Linux multicast IP

For example, the IP address of the local computer is: 127.0.0.1 Two its multicast address is: 224.0.0.1. This is defined by RCF 1390. To send IP multicast data, the sender needs to determine a suitable multicast address, which represents a group. The IPV4 multicast address uses class D IP addresses to determine multicast groups. On the Internet, the range of multicast addresses is from 224.0.0.0 to 234.255.255.255. Among the more important addresses are:

224.0.0.1-all hosts that support multicast in the network segment

224.0.0.2-All multicast-enabled routers in the network segment

224.0.0.4-All DVMRP routers in the network segment

224.0.0.5-all OSPF routers

224.0.0.6-all OSPF assigned routers

224.0.0.9-All RIPV2 routers

1/256 of the address space in the IPV6 address space is assigned to a multicast address. A FF (11111111) value identifies the address as a multicast address. The three-bit height of the identity segment is always set to 0 and retained. A fourth-bit T identity set to 0 represents a permanently allocated multicast address. The T identity is set to 1 o'clock, which represents a non-persistent-assigned multicast address as a temporary multicast address.

Multicast and broadcast need to be done on the LAN, and see if the Linux system supports multicast and broadcast: Using commands: Ifconfig
Up broadcast RUNNING multicast mtu:1500 metric:1
Explains that the NIC supports
If not supported, configure accordingly so Linux supports multicast IP
In the default state, most Linux distributions turn off support for multicast IP. The Linux kernel needs to be reconfigured and compiled in order to use a multicast socket interface on a Linux system. Let's take a look at the configuration steps:

1.cd/usr/src/linux

2.make Menuconfig

3. Select Network Options

4. Select Ip:enable multicasting IP One

5. Save and exit from Menuconfig

6. Run: Make Dep;make clean;make bzlmage

7.cp/vmlinuz/vdimlz_good

8.cparch/i386/boot/zimage/vmlinzz

9.cd/etc

10. Edit Lilo. conf, add new kernel options for/vmlinuz_good

11. Run li1o

After the Linux kernel compiles, run the command as Superuser: #router add–net 224.0.0.0 netmask 224.0.0.0 Dev Lo

This article is from the "Late Evening" blog, please be sure to keep this source http://yiluohuanghun.blog.51cto.com/3407300/1083094

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.