Tema 7. Multicast-I

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

REDES DE DATOS II

Multicast IP Routing

Alberto Arellano A. Ing. Msc.


[email protected]
CCNA – CCNP – CCSP – LPI - JNCIA
Unicast vs Multicast Scaling
IP Multicast Applications
Multicast Uses UDP Application
0 15 16 31

16-bit Source Port Number 16-bit Destination Port Number


Header + data

16-bit UDP Length 16-bit UDP Checksum

Data (if any)

• IP multicast traffic uses UDP as the transport layer.


• UDP adds no reliability, flow control, or error-recovery
functions to IP.
• UDP, simplicity, data-packet headers contain fewer
bytes and consume less network overhead than TCP.
• Reliability in multicast is therefore managed at the
receiving client and by QoS in the network.
Multicast IPv4 Address Structure

224.0.0.0 to 239.255.255.255

• IP multicast uses the Class D addresses, which range from


224.0.0.0 to 239.255.255.255.

• These addresses consist of binary 1110 as the most


significant bits (MSBs) in the first octet, followed by a 28-bit
group address.

• Unlike with Class A, B, and C IP addresses, the last 28 bits


of a Class D address are unstructured.
Multicast IPv4 Address Structure
Reserved link-local addresses
• 224.0.0.0–224.0.0.255
• Transmitted with TTL = 1
• Examples
• 224.0.0.1 All systems on this subnet
• 224.0.0.2 All routers on this subnet
• 224.0.0.5 OSPF routers
• 224.0.0.9 RIP routers
• 224.0.0.10 EIGRP Routers
• 224.0.0.13 PIMv2 routers
• 224.0.0.22 IGMPv3

Administratively scoped addresses


• 239.0.0.0–239.255.255.255
• Private address space
• Similar to RFC1918 unicast addresses
• Not used for global Internet traffic—scoped traffic
Multicast MAC Address Structure

Multicasts MAC address


First 3 bytes (24 bits) are always 01-00-5E.

Binary:
00000001.00000000.01011110.0xxxxxxx.xxxxxxxx.xxxxxxxx

Indicates a multicast application.


25th bit set to 0.
Usually, is the Organizational Unique Identifier.

So, if multicast L2 addresses always begin with 01-00-5E, where


does the other half (24 bits) of the address come from?
“0” + 23 bits (copied from the IP address)
Multicast MAC Address Structure

Loose 5 bits of IP Address


IP:1110xxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx
Multicast MAC:
00000001.00000000.01011110.0xxxxxxx.xxxxxxxx.xxxxxxxx

Example
Host: “If I join multicast group 224.10.8.5, I will listen for the MAC address?

IP: 11100000.00001010.00001000.00000101

00000001.00000000.01011110.00001010.00001000.00000101
01-00-5E-0A-08-05
Multicast MAC Address Structure
Convert 224.0.9.45 to a multicast MAC address.

224 | 0 | 9 | 45

1110 0000 0000 0000 0000 1001 0010 1101

01-00-5E First 3 bytes


25th bit “0” 0000 0000 0000 1001 0010 1101

0000 0000 0000 1001 0010 1101


01-00-5E- 0 0 - 0 9 - 2 D(13)

01-00-5E-00-09-2D
Multicast MAC Address Structure
Convert 224.192.255.30 to a multicast MAC address.

224 | 192 | 255 | 30

1110 0000 1100 0000 1111 1111 0001 1110

01-00-5E First 3 bytes


25th bit “0” 0100 0000 1111 1111 0001 1110

0100 0000 1111 1111 0001 1110


01-00-5E- 4 0 - F(15) F - 1 E(14)

01-00-5E-40-FF-1E
How are Multicast Flows Identified
Every Multicast Flow can be identified by two components:
• Source IP Address
• The address of the Sender
• Multicast Group Address
• 224/4 (Class D) IP Address

How do Hosts Signal to Routers which flow they want?


• IPv4: IGMP
• IPv6: MLD
Host-Router Signalling: IGMP

• Internet Group Management Protocol

• Used by a host to notify the local router that it wishes


to receive (or stop receiving) multicast traffic for a
given destination address or “group”.

• RFC 2236 (11/1997) specifies version 2 of IGMP(a


form of ASM -Any source Multicast), most widely
deployed and supported

• RFC 3376 (10/2002) specifies version 3 of IGMP(a


form of SSM -Source Specific Multicast), good
network support.
IGMPv2 (RFC 2236)
1. Group-specific query: Router sends query membership
message to a single group rather than all hosts (reduces traffic).
2. Leave group message: Host sends leave message if it leaves
the group and is the last member (reduces leave latency in
comparison to v1).
3. Query-interval response time: The Query router sets the
maximum Query-Response time (controls burstiness and fine-
tunes leave latencies).
4. Querier election process: IGMPv2 routers can elect the Query
Router without relying on the multicast routing protocol.
IGMPv3 (RFC 3376) – 10/2002
• IGMP Version 3 is current version
• Uses 224.0.0.22 (IGMPv3 routers) Link-Local Multicast
Address
• All IGMP hosts send Membership Reports to this
address
• All IGMP routers listen to this address
• Hosts do not listen or respond to this address (unlike
previous IGMP versions)
• Membership Reports
• Sent by Hosts
• Contain list of Multicast (Source, Group) pairs to
Include/Exclude (Join/Leave)
• Membership Queries
• Sent by Routers to refresh/maintain list of Multicast traffic
to deliver.
IGMPv3 –Joining Group “G” Source “S”
IGMPv3 –Maintaining State
Router sends periodic General Queries to All Hosts
• General Query: Group=0, #Srcs=0
All IGMP members respond
• Reports can contain multiple Group State records
IGMPv3 –Leaving Group “G” Source “S”
1. H2 leaves Group-Source
2. Sends “Block Old” Membership Report
3. Router sends Group-Source Query
• Group-Source Query: Group=G, #Srcs=N
Layer 2 Multicast Frame Switching
Problem: Layer 2 flooding of multicast
frames
• Typical Layer 2 switches treat multicast
traffic as unknown or broadcast and
must flood the frame to every port (in
VLAN).
• Static entries may sometimes be set to
specify which ports receive which
groups of multicast traffic.
• Dynamic configuration of these entries
may reduce administration.

SOLUTION
• Cisco Group Management Protocol (CGMP): Simple, proprietary,
routers and switches
• IGMP snooping: Complex, standardized, proprietary
implementations; switches only
IGMP Snooping
• IGMP Snooping is a Multicast mechanism that runs on Layer 2
switch.
• IGMP Snooping checks the IGMP join, leave messages and
record the information about user about the group that it
joins or leaves.
IGMP Snooping Operation
1
In the following graph we have a
multicast enabled router, a switch and
three host devices. The switch has a
CPU and a CAM table (mac address
table) which is connected to an internal
interface that I will call “INT”. It does
have support for IGMP snooping
though. Let’s see what happens when
we enable IGMP snooping on this
switch:
2
Then one of the hosts (H1) sends a
membership report for multicast
group 239.1.1.1 that it wants to join.
Then switch has no idea where to
forward this to so the first time it will
flood it on all interfaces, including the
internal interface to the CPU.
IGMP Snooping Operation
Once IGMP snooping is enabled, the 3
switch will detect multicast enabled routers
and it does so by listening to the following
messages:
• IGMP General Query (0100.5e00.0001)
• OSPF (0100.5e00.0005 and
0100.5e00.0006)
• PIM version 1 and HSRP
(0100.5e00.0006)
• PIM version 2 (0100.5e00.000d)
• DVMRP (0100.5e00.0004)

When the switch detects a multicast enabled router then it will add the
corresponding entry in the CAM table. From now on, all multicast traffic
that has destination MAC address 0100.5e01.0101 will only be forwarded
on interface Gi0/1, Gi0/4 and the internal interface to the CPU.
Multicast Routing
• Multicast Routing &Forwarding
• Destination Group address doesn’t directly indicate where to
forward packet. Distributing trees are used to describe forwarding
path.
• Multicast Routing is Backwards from Unicast Routing
• Multicast Routing builds a Multicast Distribution tree backwards
from the receivers to the source.
• Trees are built via connection requests (Joins) “sent” toward the
source.
• Joins follow the unicast routing table backwards toward the
source.
• Joins create Multicast tree/forwarding state in the routers along the
tree.
• Trees are rebuilt dynamically in case of network topology changes.
• Only when a tree is completely built from receiver backwards to
the source can source traffic flow down the tree to the receivers.
• Multicast routing use separate routing table -mroute
Multicast Distribution Trees – Source Tree (S,G)

• A source tree implies that the


route between the multicast
source and receivers is the
shortest available path.
• Source of Multicast Traffic is
located at root of the tree.
Receivers are located at the end
of branches.
• The multicast forwarding table
consists of series of (S,G)
entries, where S is a Source and
G is the multicast group joined
by receivers who are interested
for multicast feed.
Multicast Distribution Trees – Shared Tree (*,G)

• Shared trees differ from source


trees in that the root of the tree is a
common point somewhere in the
network, referred to as the
rendezvous point (RP).
• The RP is the point at which
hosts/receivers join to learn of
active sources. Multicast sources
must transmit their traffic to the RP.
• An RP can be the root for all
multicast groups in the network, or
different ranges of multicast groups
can be associated with different
RPs.
Multicast Routing Protocols
To route multicast traffic, we need to use a multicast routing
protocol. There are two types of multicast routing protocols:
• Dense Mode
• Sparse Mode
Dense Mode: In dense mode
operation, routers initially flood
multicast traffic for all groups
out all multicast-enabled
interfaces. Routers which
determine they have no clients
interested in receiving the
traffic then send prune
messages up toward the
source, requesting that the flow
• DVMRP (Distance Vector Multicast Routing
of multicast traffic downstream Protocol)
be stemmed. • MOSPF (Multicast OSPF)
• PIM Dense Mode
Multicast Routing Loops
Multicast routing is vulnerable to routing loops. One simple loop-
prevention mechanism is that routers will never forward multicast
packets on the interface where they received the packet on.

There is one additional check however called RPF (Reverse Path


Forwarding). Reverse path forwarding (RPF) is a technique used in
modern routers for the purposes of ensuring loop-free forwarding of
multicast packets in multicast routing and to help prevent IP address
spoofing in unicast routing.
RPF (Reverse Path Forwarding)
Let us, based on figure , consider the scenario:

1. The multicast host sender sends the multicast stream out to the
multicast client (receiver)
2. R1 sends the packet out of both of its interfaces
3. R2 and R3 then both send the traffic out of their interfaces to R4
4. R4 then receives two copies of the multicast packet
5. R4 then sends on both copies to the receiver.
RPF (Reverse Path Forwarding)
When the router receives the multicast packet, RPF will check the
routing table and check which egress interface the router would use
if it were to send traffic back to the multicast sender. If the interface
matches the interface the multicast packet has just been received
on, the packet is accepted, otherwise, it is dropped. Below shows
an example. Because R4's routing table states that the multicast
sender is located via gi0/1 traffic on gi0/2 is dropped.
Multicast Routing Protocols
Sparse Mode: Sparse mode multicast routing protocols only forward
the multicast traffic when another router requests it. It’s the complete
opposite of dense mode:

Now there is a problem, to whom do we request the multicast traffic?.

To fix this issue, sparse mode uses a special router called the RP
(Rendezvous Point). All multicast traffic is forwarded to the RP and
when other routers want to receive it, they’ll have to find their way
towards the RP.
Rendezvous Point Discovery
So how does the network know where the RP is?

• Option 1: Static RP configuration: Configure ALL routers in the


network with the IP address of the RP

ip pim rp-address 192.168.0.1

• Option 2: Dynamic RP configuration: Configure the RP to tell all


other routers that it is the RP.
• Cisco proprietary mechanism is called “Auto-RP”
• IETF standard is known as Bootstrap Router (BSR) –RFC5059

• Option 3: Anycast RP
Protocol-Independent Multicast (PIM)
• Protocol Independent Multicast (PIM) is a special signaling protocol
that uses existing the unicast routing table to build distribution trees and
to perform Reverse Path Forwarding (RPF) checks.
• 3 main classifications of PIM
• PIM Dense Mode (PIM-DM) (RFC 3973 – 01/2005)
• PIM Sparse Mode (PIM-SM) (RFC 4601 – 08/2006)
• Bidirectional PIM (BIDIR-PIM) (RFC 5015 – 10/2007)
Router-Router Signalling:PIM-SM
• Each PIM router forms neighbour relationship with adjacent PIM routers
using PIM “hello” messages every 30 seconds.

• When a PIM router wants to receive a multicast stream, it sends a PIM


“join” message towards the IP address of the multicast source.
• When a PIM router wants to stop receiving a multicast stream, it sends a
PIM “prune” message towards the IP address of the multicast source.
PIM-SM Lab
Configure IGP – R1
Configure IGP – R2
Configure IGP
– R3
Configure IGP – R4
Configure IGP – R5
Configure IGP – R6
Configure Multicast on Routers

• Configure Multicast Routing


1 • ip multicast-routing

• Define Rendenvouz Point


2 • ip pim rp-address ip

• Configure PIM on all Interface


3 • ip pim sparse-mode
Configure Multicast on Routers
Configure Multicast on Routers
Check RPF from R2
Check PIM Neighbors from R1
Check PIM Hello PDU
Check Multicast Routing Table
Configure VLC Server Streaming
Configure VLC Server Streaming
Configure VLC Server Streaming
Configure VLC Server Streaming
Configure VLC Server Streaming
Configure VLC Client Streaming
Configure VLC Client Streaming
Check Multicast Routing Table

You might also like