CCIE EP.17 IRC.m/cast “Wake Up, Neo…”

CC1E 0x108D4
6 min readJul 16, 2022

“Wake up, Neo… The matrix has you.” Hey folks, I hope you are doing well. I know that the window time between my last post and this one had some delay. But do not worry, Neo still following the white rabbit.

So, today We are talking about Multicast. Which is a bandwidth conservation technology. It reduces traffic and server loads by sending a single stream of data to a hundred or thousand users.

Unicast vs. Multicast

In Unicast communications, more process and CPU load is required Because the senders must create one packet for each receiver (L3 and L2 address).

On other hand, in multicast communication the senders only create a single packet addressed to the IP multicast group.

Multicast Applications

Multicast Cons

  • Multicast is UDP-BASED. Then Best effort Delivery;
  • Drops are to be expected;
  • no congestion avoidance like TCP windows and slow-start mechanism.
  • Duplicates, routers duplicates packets. The multicast application should be aware of that;
  • Possible Out of Order packets delivery

Control Plane

IGMP for Host to Routers communications;
PIM and MSDP for Router to Router communications.

IP Multicast Group Address

IP multicast address always will be in the destination field in the IP header.

Multicast uses class D IP range:
224.0.0.0/14

Link-Local
Used by network protocols.

224.0.0.0 — 224.0.0.255 /24

  • Transmitted with TTL = 1
    Examples:
    224.0.0.1 — All Host on this subnet
    224.0.0.2 — All Routers on this Subnet
    224.0.0.5 — All OSPF Routers
    224.0.0.6 — DR/BDR OSPF Routers
    224.0.0.13 — PIMv2 Routers
    224.0.0.22 — IGMPv3
    224.0.0.9 — RIPv2 Routers
    224.0.0.10 — EIGRP routers

Source-Specific Multicast
Reserved range for Source-Specific Multicast (SSM) that is an extension to PIM for better efficiency data delivery in one-to-many communications.

The purpose of this range is to allow host to select a source for the multicast group (traffic)

232.0.0.0 /8

GLOP
It was a way to assign an IP multicast to organizations that already have an AS Number.

233.0.0.0/8

Global
Globally scoped Address used to multicast data between organizations and across the Internet.

224.0.0.0–238.255.255.255

Admin Scoped Addresses
For local Multicast applications

239.0.0.0 — 239.255.255.255 /8

Note The Class D address range is used and only used for group address and destination address of IP multicast traffic.

Layer 2 Multicast Addresses

The block of Ethernet MAC address starts from 0100.5300.0000 through 0100.5e7f.ffff. This allocation allows 23 bits in the Ethernet MAC address to correspond to the IP multicast group address.

01:00:5e

Because some bits of IP multicast group address are dropped in this mapping, Different multicast groups map to the same Ethernet address.

Mapping L3 IP multicast to L2 address

The first step — Identify the IP group
239.1.1.1

The second step — Grab the last three octets and convert them to binary
x.1.1.1 =0000 0001. 0000 0001. 0000 0001

Note: The most significant bit is always zero.

The third step — Convert binary to hex
0000 0001. 0000 0001. 0000 0001 = 0x010101

The last step — merge hex result to prefix 01:00:5e
here you are 01:00:53:01:01:01

Packet capture — L2 Multicast address

The Internet Group Management Protocol, IGMP

IGMP is used to host report to the local router multicast interest to be part of the multicast group

IGMPv1

  • Membership Query
    Routers multicast send Query message to be aware of what groups are active or inactive on this particular subnet.
  • Membership Report
    Host report to Local Multicast router interest to join that group.

IGMPv2

IGMPv2 is compatible with IGMPv1. And includes four IGMP messages:

  • Membership Query
    Query sent to the specific group address instead of all multicast hosts
  • Membership report version 1
  • Membership report version 2
  • Querier election
    if multiple routers are on the same segment.
  • Leave Group (explicit)
    This message host informs to Local router that they intend to leave the group.

IGMPv3

IGMPv3 inserts support for ‘source filtering’. What allows the host inform to the router which source of the traffic is expected.

(S, G) Where ‘S’ is the source (IP) of the multicast traffic and G is the multicast Group (multicast IP group).

  • INCLUDE MODE — List of sources from which wants to receive traffic.
  • EXCLUDE MODE — List o of sources from which it does not want to receive traffic.

IGMP SNOOPING

On a Layer 2 Lan switch, IGMP snoop hears IGMP Join and Leave messages among Host and Its router multicast. When the switch hears an IGMP report from the host, the switch adds that port to the associated multicast table entry.

Multicast Distribution Tree

The multicast distribution Tree is the path that flows from the sender(s) to the receiver(s).

Source Tree

The simplest approach. Source Distribution Tree, It’s the root at the Source of the multicast traffic. Also called as Shortest Path Tree (SPT).

Source (S) = 192.168.1.1
Group (G) =224.1.1.1

(192.168.1.1, 244.1.1.1 9)

Shared Tree

In the shared tree a common point of the network is used to send multicast traffic. That common point is called Rendezvous Point (RP) and then traffic is sent to receivers (Unless receivers are in the path between source and RP).

Source (S) = *
Group (G)= 224.2.2.2

(*, 224.2.2.22)

Note: Both source and shared tree are loop-free topologies.

Rendezvous Point

Centralized point of the Shared tree

  • Learns about sources through unicast PIM register messages (S, G)
  • Learns about receivers through PIM join messages (*, G)

Reverse Path Forwarding (RPF)

In uniscat forwarding, the router looks to the destination IP address field in the IP header. based on FIB, choose the correct outgoing interface and forward that packet. It does not matter what the source IP address is.

On the other side, multicast forwarding is to be careful about the source IP address. For every multicast packet that arrives at a router, The router performs an RPF check. RFP check verifies if an interface where packet arrives the same way of reverse back.

In other words, RFP looks up for the unicast route and checks if that same interface is used to send traffic to the sender.

if incoming multicast interface == outgoing uniscat interface:
then RFC check passed

PIM

Protocol Independent Multicast uses a unicast routing table to check RPF, instead of creating Its own completely routing table. “Independent” means that does not matter what unicast protocol populated the unicast routing table including Static router, OSPF, BGP, and EIGRP.

Unlike other protocols, PIM does not exchange topology information.

PIM’s messages:

  • Join/Prune
  • Graft
  • Assert

PIM — DM: Protocol Independent Multicast, Dense mode.

  • Generates unnecessary traffic;
  • Can cause a loop in the data plane.
  • Only support Source tree distribution

Note: Could be efficient only if there are receivers on every subnet in the network

Loop avoidance:

  • Reverse Path Forwarding, Only accept traffic on interface toward Source based on unicast route table;
  • Flood out all other interfaces:
    Prune messages are used to cut off the flow of unwanted traffic. Flood & Prune occur every 3 minutes.

PIM — SM: Protocol Independent Multicast, Sparse mode.

Explicit “join” messages are sent toward roots to build trees.

  • Both Shared and Source Distribution Tree

Operations

  • Discover PIM neighbors & elect DR
  • Discover RP
  • Tell RP about the Source
  • Tell RP about receivers
  • Build a shared tree from sender to receivers through RP
  • Join the shortest path tree
  • Leave the shared tree
  • Multicast table maintenance

Loop avoidance:

  • Only send “joins” out interface toward the root of the tree (RPF Interface);
  • Uses unicast route table to determine interface/path to tree root
  • Only accept traffic on that interface

Hands on

coming soon

--

--