Skip to main content

Multicast - Part 1


Multicast is a communication method that lets a source send traffic to a group of receivers simultaneously. The source sends a single stream, and the network copies it only where the paths to the receivers split. Multicast relies on two protocols: Internet Group Management Protocol (IGMP) and Protocol Independent Multicast (PIM).


IP multicast concept:
- receivers use IGMP to tell their local router which multicast groups they want to join
- routers use PIM to route multicast traffic between each other
- only members of the group receive the traffic
- a source sends traffic once to the group address, and all members receive it
- a source doesn't need to be a member of the group to send traffic to it
- a multicast group address is only ever a destination; the source address is always a unicast address


IPv4 multicast address space

Multicast uses 224.0.0.0 - 239.255.255.255 (224.0.0.0/4, formerly Class D), which includes:

1. 224.0.0.0 - 224.0.0.255 - Local Network Control Block (link-local). Routers never forward these packets beyond the local segment. Examples:
- 224.0.0.1 - all hosts
- 224.0.0.2 - all routers
- 224.0.0.5 - all OSPF routers
- 224.0.0.6 - OSPF DR and BDR
- 224.0.0.9 - RIPv2
- 224.0.0.10 - EIGRP
- 224.0.0.13 - all PIM routers
- 224.0.0.22 - IGMPv3 reports

2. 224.0.1.0 - 238.255.255.255 - Globally scoped addresses, including:

   a) 224.0.1.0 - 224.0.1.255 - Internetwork Control Block. Used for protocol control traffic, but unlike the link-local block, these packets can be routed. Examples:
   - 224.0.1.1 - NTP (Network Time Protocol)
   - 224.0.1.32 - mtrace
   - 224.0.1.39 - Cisco RP Announce (Auto-RP)
   - 224.0.1.40 - Cisco RP Discovery (Auto-RP)

   b) 232.0.0.0 - 232.255.255.255 - Source-Specific Multicast (SSM) range (RFC 4607). Receivers request traffic from a specific source to a group, written (S,G).

   c) 233.0.0.0 - 233.255.255.255 - GLOP block (RFC 3180). An organisation with a 16-bit AS number gets a /24 automatically: the AS number fills the middle two octets. For example, AS 5662 gets 233.22.30.0/24 (5662 = 22 x 256 + 30).

3. 239.0.0.0 - 239.255.255.255 - Administratively scoped addresses (RFC 2365). The multicast equivalent of private addresses: used inside an organisation and not routed on the internet.

More details about IPv4 multicast addresses (IANA):
https://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml#multicast-addresses-2


Internet Group Management Protocol (IGMP)

IGMP is used by receivers to join multicast groups, i.e. between a receiver and its local router. It runs directly over IP (IP protocol 2), so it is a Layer 3 protocol, even though it only works on the local segment.

There are three versions of IGMP:
- IGMPv1 (RFC 1112) - a host joins a group by sending a Membership Report. The router sends a General Query to 224.0.0.1 (every 60 seconds by default on Cisco), and hosts that still want the group reply with another report. There is no Leave message, so a group is removed only after several queries go unanswered.
- IGMPv2 (RFC 2236) - adds a Leave Group message, so the router can stop forwarding much faster. When a host leaves, the router sends a group-specific query to check whether any other receivers remain on the segment. IGMPv2 also adds querier election (the lowest IP address wins).
- IGMPv3 (RFC 3376) - adds source filtering, so a receiver can choose which sources it wants to receive a group from. There are two modes: INCLUDE (receive only from the listed sources) and EXCLUDE (receive from all sources except the listed ones). There is no separate Leave message; a host leaves by sending a report that changes its filter. IGMPv3 is required for SSM.

IGMP snooping
Without snooping, a switch treats multicast like broadcast and floods it to every port in the VLAN. With IGMP snooping, the switch listens to the IGMP messages between hosts and the router, learns which ports have receivers for each group, and forwards multicast only to those ports. Benefits:
- optimised bandwidth use - multicast no longer floods the whole VLAN
- less load on hosts that don't want the traffic
It isn't a security feature on its own, but it limits where multicast traffic reaches.

IGMP filtering can be used to control:
- which multicast groups a port can join
- the maximum number of groups per port/interface
- which IGMP version is allowed


Protocol Independent Multicast (PIM)

PIM is the multicast routing protocol that routers use to find sources and build distribution trees: the paths multicast traffic follows through the network. It is called "protocol independent" because it doesn't exchange routes of its own. Instead, it uses the existing unicast routing table, whichever protocol built it (OSPF, IS-IS, EIGRP, static routes).

Routers use the unicast routing table for the Reverse Path Forwarding (RPF) check: a multicast packet is accepted only if it arrives on the interface the router would use to reach the source. This prevents multicast loops.

PIM control messages:
- use IP protocol 103
- Hello and Join/Prune messages are sent to all PIM routers (224.0.0.13) with a TTL of 1
- some messages, such as Register and Register-Stop, are unicast between the DR and the RP
- by default, Hello messages are sent

Comments

Popular posts from this blog

Plumbing... QoS

Plumbing... QoS Rule no. 1: QoS doesn't create bandwidth. If the pipe is permanently too small, the only fix is a bigger pipe. What QoS does is decide who waits and who gets dropped when congestion happens. That makes it the right tool for short, recurring bursts of congestion, not for a chronic shortage of capacity. Most common problems to solve 1. Delay (latency): the time a packet takes to cross the network. Real-time traffic such as voice becomes unusable when one-way delay gets too high. 2. Jitter: the variation in delay between packets of the same flow. QoS reduces it by giving delay-sensitive packets a fast, predictable path through the queues. 3. Packet loss: QoS ensures that traffic which can tolerate loss (and recover from it, like TCP) is dropped before traffic that can't. 4. TCP global synchronisation: when a queue fills up and tail drop discards packets from many TCP flows at the same moment, all of those flows slow down together. The link is then underused until t...

Routing protocols - ISIS brief

What is IS-IS? - a link-state routing protocol defined in ISO/IEC 10589, originally designed as the routing protocol for CLNP (ISO 8473), the OSI connectionless network protocol - IPv4 support was added in RFC 1195 (Integrated IS-IS) and IPv6 support in RFC 5308 - runs directly over Layer 2, not over IP, but still uses OSI addresses (NETs) to identify routers. A side benefit: because it doesn't run over IP, it is hard to attack remotely - mostly popular in large ISP environments - similarly to OSPF, it runs the Dijkstra SPF algorithm - uses Hello packets (IIHs) to form and maintain adjacencies - uses a two-level hierarchy: Level 1 for routing within an area and Level 2 for routing between areas - elects a Designated Intermediate System (DIS), similar to the OSPF DR, but with no backup DIS - in general simpler than OSPF: fewer packet types, no LSA types to learn, no special area types (stub, NSSA), and TLVs make it easy to extend with new features Terminology - a router is an Interm...