Multicast: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
Line 10: Line 10:


* [[Linux Network Concepts#Subjects|Linux Network Concepts]]
* [[Linux Network Concepts#Subjects|Linux Network Concepts]]
* [[Java Network Traffic Generator]]


=Overview=
=Overview=

Latest revision as of 22:18, 13 July 2017

External

Internal

Overview

Multicast is a network communication mode where packets are sent to a certain special (multicast) address and distributed to all hosts which have registered with that multicast address. A host that registered with a multicast address, it is said that the host has joined that group in the interface you specified. The packets are IP packets, and are routed at kernel level like any other IP packets, with the difference that the kernel routing algorithm is multicast-specific.

Multicast Addresses

The multicast addresses are "Class D Addresses", in the range 224.0.0.0 - 239.255.255.255. The first four bits are always "1110". The remaining 28 bits identify the multicast group.

The range 224.0.0.0 through 224.0.0.255 is reserved for local purposes (as administrative and maintenance tasks) and datagrams destined to them are never forwarded by multicast routers. Similarly, the range 239.0.0.0 to 239.255.255.255 has been reserved for "administrative scoping"

When configuring the multicast route, the netmask must be 11110000000000000000000000000000 Alternatively 240.0.0.0 and /4 can be used,

More about address classes is available here

IP Address

Well-Known Multicast Groups

  • 224.0.0.1 is the all-hosts group. If this group is pinged, all multicast capable host on the network should answer, as every multicast capable host must join that group at start-up on all its multicast capable interfaces.
  • 224.0.0.2 is the all-routers group.
  • 224.0.0.4 is the all DVMRP routers, etc.

Sending Multicast Datagrams

In principle, an application just needs to open a UDP socket and fill with a class D multicast address the destination address where it wants to send data to. A Java test application that can be used to send multicast is described here Java Network Traffic Generator.

Configuration

Linux 7 Multicast Configuration