Thursday, 5 June 2014

IP multicast

Multicasting allows a one-to-many transmission that consists of a single data stream that is propagated to any host that wants to receive the data stream, without unnecessarily sending that data stream to hosts that do not want to receive the data stream. 

That means multicast traffic must be controlled in some fashion at both a Layer 2 level and Layer 3 level.

IP multi-casting is a communication mechanism in which data is communicated from server to a set of clients who are interested in receiving that data. Any client can dynamically enter or leave the communication.


Multicast is important for any application that needs to send large amounts of the same information to multiple devices. Common uses for multicast traffic include:
  • Multimedia applications that consume high bandwidth, such as streaming video and TV servers
  • Voice-conferencing applications
  • Software distribution applications
  • Routing protocols such as Open Shortest Path First (OSPF), Enhanced Interior Gateway Routing Protocol (EIGRP), and Routing Information Protocol (RIP) version 2
  • Any application that requires a central host to efficiently send the same message to multiple peers


Multicast Addressing


For both IP (Layer 3) and Ethernet (Layer 2) communications, special addressing is required to identify multicast packets and frames. A multicast address identifies a specific group of receivers that want to receive the information transmitted to the multicast address.

IP Multicast Addressing

For IP multicast addressing, the Class D address range is used (224.0.0.0-239.255.255.255) in the destination IP address field to identify a multicast packet. The source IP address of a multicast packet is always a unicast address (Class A, B, or C). Within the Class D address range, some smaller address ranges are reserved for special use. The first is the 224.0.0.x range, which is reserved for the use of various communications protocols. 

Table 7-1 describes some common reserved multicast addresses.
Table Reserved Multicast Addresses
Address
Description
224.0.0.1
All multicast receivers on a subnet
224.0.0.2
All multicast routers on a subnet
224.0.0.5
All OSPF routers on a subnet
224.0.0.6
All OSPF designated routers on a subnet
224.0.0.9
All RIPv2 routers on a subnet
224.0.0.10
All EIGRP routers on a subnet
224.0.0.13
All Protocol Independent Multicast (PIM) routers on a subnet
224.0.0.18
All Virtual Redundancy Router Protocol
(VRRP) routers on a subnet (VRRP is a standards-based implementation of HSRP)
224.0.0.102
All Hot Standby Router Protocol (HSRP) routers on a subnet
The 224.0.0.x multicast range has a local scope. The scope of a multicast packet is basically the number of router hops the multicast is allowed to travel and is implemented using the IP TTL (time-to-live) field. A local scope means that the multicast is never forwarded by routers and is isolated to a single VLAN. If you are familiar with routing protocols, this is the reason why OSPF and EIGRP multicast communications are never forwarded off the subnet they originated in.
The other important reserved address range is 239.0.0.0 through 239.255.255.255, which is reserved for private use. This reservation is a similar concept to the RFC 1918 private IP address ranges (10.x.x.x, 172.16.x.x-172.31.x.x, and 192.168.x.x) and is designed to be used for multicast traffic that is restricted to a closed area of a private network.


Ethernet Multicast Addressing

Ethernet multicast addresses are derived directly from IP multicast addresses,
Figure shows that an Organizational Unique Identifier (OUI) of 01-00-5E is always used to allow a receiving host to identify the frame as an IP multicast (other OUIs are used to identify multicasts for other Layer 2 protocols). The first bit in the second octet (bit 24) is always 0, and the remaining low-order 23 bits are mapped directly from the first 23 low-order bits of the matching IP multicast address. With Class D IP addressing, the first four bits are always 1110, with the remaining 28 bits identifying each IP multicast group. When the conversion to Ethernet multicast addressing is performed, 5 bits from the IP multicast address (bits 24-28) are lost, which means that there are 32 (25) IP multicast addresses that map to the same Ethernet multicast address.

Scenario:

Multicasting on single network

On a single network, the concept of multitasking works as follows :
  • The server sends data packet to specific destination IP address or a multicast IP address.
  • Through the mapping described above, the multicast IP address is converted into ethernet address and sent on the network.
  • A process on a client that is willing to receive multicast traffic need to specify the same multicast IP address while communicating with the systems IP layer which further configures lower layers to look out for such multicast packets.
  • When a multicast packet is received on the system, it is filtered in order to discard unwanted packets as 32 multicast group IDs can correspond to one ethernet address (explained above)
  • Please note that there can be multiple processes on single client that want to receive packets with same multicast ID. In this case, the kernel makes sure that each process gets a copy of the packet.

Multicasting across the networks

Things get a bit complex when multicast IP packets have to traverse across networks because of that fact that multiple routers come into the scenario. Each router that comes in path should support multi-casting and should contain forwarding entries for multicast packets. Whenever a client joins a multicast group, a distribution tree is created for it which specifies the path for the multicast traffic corresponding to this multicast connection. 
Multiple routers can be part of a distribution tree and one router can be part of multiple distributions trees. It means that if a router is a part of X distribution trees then it must contain X number of forwarding entries where each entry would correspond to a distribution tree.
Protocols:

Internet Group Management Protocol

Multicast packets are transmitted to a particular multicast address, which represents a group of receivers interested in the packets. Internet Group Management Protocol (IGMP) facilitates the concepts of joining a group, maintaining group membership and leaving a group. IGMP exists in three versions (version 1, 2, and 3), of which version 2 is the most common. In this chapter, assume version 2 unless otherwise stated. IGMP uses several different messages that provide the following various functions:
  • Allows a receiver to join a multicast group— Facilitated by IGMP Membership Report messages
  • Allows a router to query a LAN segment for receivers that want to join a multicast group— Facilitated by IGMP General Query messages
  • Allows a receiver to notify a router that it wants to leave a multicast group— Facilitated by IGMP Leave Group messages and verified by IGMP Group-Specific Query messages.

IP Multicast Routing


IGMP deals with allowing receivers to register that they want to receive a particular multicast transmission, but does not deal with routing multicast traffic across the network from the source to each receiver. This task is left to a multicast routing protocol, several of which exist for IP networks:
  • Distance Vector Multicast Routing Protocol (DVMRP)
  • Protocol Independent Multicast (PIM)
  • Multicast OSPF (MOSPF)
  • Multicast BGP (MBGP) 
  • Of the routing protocols listed above, PIM represents the most commonly used routing protocol used on routers.


In Figure, Router-A is configured as the shared root for the network, and a shared tree is built for (*,239.1.1.1) that ensures each receiver receives transmissions from any source associated with the 239.1.1.1 group.

_____END OF DOCUMENT_____

No comments:

Post a Comment