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

Multicast - introduction

What is Multicast

- multicast is defines as the flow of traffic from Single/


Multiple source(s) to many recipients

- Mcast recipients have control over whether they


want the stream or not, unlike Broadcast

- in true multicast, source sends the packet only once


always, Unlike Replicated Unicast
Multicast
- only single copy of packet from source ever
- also, any link carries that packet only once

Head End Replication / Replicated Unicast


- as many copies as the no of receivers
- links may carry the same copy more than once
Advantages of Multicast over HER
- Less load/ processing at the source/ sender
- sender sends only one copy unlike HER
- Optimised resource utilization at the source

- Better bandwidth utilization


- Any link carries packets only once

Advantages of Multicast over Bcast


- Less load at receiver end
- Receivers don’t receive packets unnecessarily
- Receivers can decide if they want to receive

- Better bandwidth utilization


- packets go to receivers only if they requested.
- No unnecessary processing at receiving end before drop.
Unicast transmission will not scale.
Traffic level and clients increase at a 1:1 rate with unicast transmission.
Multicast scales well with regard to demand
Disadvantages of multicast

• Multicast is based on User Datagram Protocol (UDP)


• Retransmission of the lost data at the application layer in these applications is not feasible.
•Loss of data during multicast transmission results in poor application performance
•Duplicate packets and Out-of-sequence delivery of packets may occasionally occur as multicast network topologies change.
•No reliable data transfer because mcast is based on UDP.
•Eavesdropping issues are not sufficiently solved yet.

Types of Multicast applications

•One-to-many model, where one sender sends data to many receivers


•Many-to-many model, where a host can simultaneously be a sender and a receiver.
•Many-to-one, where many receivers are sending data back to one sender, or few-to-many) are also used
Multicast Addressing
IPv4 Multicast Addressing Reserved range

- IP starting with 1110 224.0.0.0/24


- 224.0.0.0 to 224.0.0.255
- IPv4 Multicast range = 224.0.0.0/4
- Link Local Address
- 224.0.0.0 to 239.255.255.255 - local network control block
- ex: 224.0.0.5 / 224.0.0.6 for ospf
- called as Class D range
- block of 228 million addresses 232.0.0.0/8
- Source Specific Multicast
- called Flat IP space, as no subnetting - 232.0.0.0 to 232.255.255.255
- each ip is a GDA - source specific multicast block
- used when multicast source address is known

239.0.0.0/8
- Administrative scope
Global scope - private ip
- organization local scope
- allocated over internet - 239.0.0.0 to 239.255.255.255
- 224.0.1.0 to 238.255.255.255
L2 Multicast Addressing (ipv4)

01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF

L2 Multicast Addressing (ipv6)


33-33-00-00-00-00 to 33-33-FF-FF-FF-FF
IPv4 to mac multicast mapping

https://www.dqnetworks.ie/toolsinfo.d/multicastaddressing.html
Multicast Model
Components of a Multicast Model

- source
- receivers
- multicast routers
- first hop router
- last hop router
Multicast Model

Sender / source
Sends one copy addressed to multicast ip
and has no need to know the receivers

Receiver
Receivers use multicast ip address to
receive multicast traffic by registering/
subscribing at the last hop routers through
IGMP or MLD

Routers
Routers build multicast distribution trees
with the help of PIM and replicates
datagrams along the path wherever
branches exist
Protocols used in Mcast

- Source → no protocol
- Receivers → igmp

- routers → interdomain / intradomain


Intradomain →dvmrp, mospf, pim, cbt
Interdomain → mbgp, msdp
Multicast Group Membership Protocols
Multicast group membership protocols
Multicast Receivers announce their willingness to
join a multicast group to the last hop router through
the membership protocols

Examples:
Internet Group Management Protocol(IPv4)
Multicast Listener Discovery (IPv6)
Internet Group Management Protocol
IGMP Versions
– v1, v2 and v3
IGMP Version 1

- Obsolete
- Defined by Rfc1112, standard protocol, not a cisco proprietary

Message types in Igmp V1


Group Membership Report
General Query
General Query

- originates from the querier


- sent out every query-interval
- sent to 224.0.0.1

Group Membership Report

- host may send a report through application


- reports are also sent in response to a query
- sent to the GDA

Process
1. Query
2. Timer
3. Report
4. Host report suppression
Query Interval in Igmp

- interval in which every igmp general query is sent from the querier
- this interval can be changed
- by default, this value is 60 seconds in Ios
- and 125 seconds in Nxos

Querier – timeout in Igmp

- there may be many capable queriers in a subnet


- among them lowest config’d ip interface is elected as querier
- elected querier becomes eligible to send queries at query-interval
- if the active querier is not heard for querier- timeout interval, then
there is re-election
- by def, this value is 120 seconds in Ios
- and 255 seconds in Nxos
Configuring Query Interval

In Nxos

In Ios

Disadvantages in Igmp V1

If any host wants to leave the group, there is no way to inform the router
Router keeps sending IGMP general queries. Router waits for 3 queries before closing the
group. This accounts to atleast 3 minutes (180 seconds)
IGMP V2
IGMP Versions 2

- This is the default version in Nx-os


- Supports any source multicast
- Equivalent to MLD

Message types in Igmp V2


Group Membership Report
General Query
Leave Message
Group Specific Query
Process
1. Querier sends general query
2. Hosts receive query, start timer
3. Host send report within MRT
4. Host report suppression occur

5. If host wants to leave the GDA, host sends leave msg


6. In response, Router sends group specific query
Configuring Query Interval

Configuring Max response time


Leave Message & Group Specific Query
Leave Message & Group Specific Query

Leave message

- host sends leave message


- addressed only to routers
- sent to 224.0.0.2

Group Specific Query

- sent by querier in response to Leave msg


- addressed to GDA
- MRT value is less compared to general query
- sent multiple times depending on the last
member query count
- this query mentions the GDA within the packet
Working of Leave Message in Igmp V2

IGMP v2 Leave message is directed to 224.0.0.2

Type code for Leave


message is 0x17

Querier generates Group Specific Membership Report on reception of Leave message


Comparison of General Query and Group Specific Query

IGMP V2 Group Specific Membership Query is sent from Querier after leave message
This Query is sent to GDA
This query has Group address in the packet

IGMP V2 General Membership Query is sent from Querier during Query Interval
This Query is sent to 224.0.0.1
This query has No Group address in the packet
Configure Last member Query Response Time

Configure Last member Query Count


IGMP V3
- Allows source specific multicast
- No Host Suppression
Igmp V2 is used in ASM deployments because it cannot specify the source = MLD V1
Igmp V3 is used in SSM deployments because it can specify the list of source = MLD V2
Configure Igmp Version 3

Configure source for the Group in an IGMP join


IGMP Packets
IGMP Packet Structures over versions
Type codes

0x11 – Version 1/2/3 Group membership query


0x12 – version 1 group membership report
0x16 – version 2 group membership report
0x17 – version 2 leave message
0x22 – version 3 group membership report
IGMP in NXos
IGMP in NX-OS

- Nxos supports IGMPv2 and V3


- Enables V2 by default
- Manual changeover to V3 is required on interface

Enable IGMP in NX-OS

Igmp is enabled globally.


In Nxos, there is no feature igmp
We can change the Igmp Version on interface level

Enabling PIM on an interface leads to


Enabling Igmp V2 as a by product
Pictorial representation of IGMP in work
IGMP Querier Election
Election of Querier

- When more than one IGMP routers are


present in a Broadcast Domain
- Election happens to elect an IGMP Querier
on the basis on configured IP address
- Router with lowest configured Ip address
is elected as the IGMP Querier for the
subnet
Election of Querier
Election of Querier
- When more than one IGMP routers are present in a Broadcast Domain
- Election happens to elect an IGMP Querier on the basis on configured IP address
- Router with lowest configured Ip address is elected as the IGMP Querier for the subnet

Querier Timeout
IGMP Snooping
IGMP snooping
Benefits of IGMP snooping

- snooping stops host report suppression because switch


needs to know the receivers for specific GDA individually

- maintains the list of receivers for a GDA, so switch shall


not flood the entire vlan for a GDA
- this results in the optimization of bandwidth

- snooping rate limits reports per GDA basis


- only one copy per GDA is sent to the router within MRT
- switch gathers report within MRT

- switch does not forward leaves unless it is the last


member. Switch knows the last member because it manages
the snooping table

- switch also gobbles group specific query when router


forwards the same. This is why MRT in last query is 1-2
seconds.
Enable IGMP snooping
Enable or disable IGMP snooping globally.
IGMP snooping is enabled by default
globally
IGMP snooping per vlan
Enable IGMP on a per vlan level

Configure explicit host tracking per vlan. Tracks Igmpv3 membership reports
from hosts on each port. This feature is enabled by default globally

Fast leave is used to wind up the group without last member query. Usually used when there is
only one listener for a multicast group
Multicast Routing
Multicast Routing

- works opposite to Unicast Routing


- unicast focus on destination / where packet is going to
- multicast focus on source / where packet is coming from
- mcast uses Reverse Path Forwarding (RPF) to prevent loops
Components in Multicast Routing Table
OIL
- Outgoing Interface List
- can be Null, Single, Many
- depends upon the interfaces where join is received

When the router receives the multicast stream


For the specific GDA
Then the traffic is forwarded out these OIL interfaces
IIF
- Incoming Interface
- there is only one IIF for a GDA on a router
- only one interface is selected as IIF for a specific GDA

- this is the interface where the multicast stream arrives


- the interface with the best metric to reach the source is IIF
Protocol Independent Multicast
PIM functions
- used between multicast-capable routers
- advertises group membership (host interest) across a routing domain
- constructs multicast distribution trees
- PIM builds trees
- shared distribution trees on which packets from multiple sources are forwarded
- source distribution trees on which packets from a single source are forwarded.

PIM in NXos
- Cisco NX-OS does not support PIM dense mode
- Cisco NX-OS supports PIM sparse mode only
- We can configure PIM and PIM6 to run simultaneously on a router.
- In NX-OS, multicast is enabled only after you enable the PIM and PIM6 feature on each router
PIM
Enable Pim /Pim6

DR – designated router elected per subnet


Highest Ip is elected as Designated router
Pim Hellos are used in the election
Only DR can send Pim Joins and Prunes

No dense-mode in Nxos
PIM
- Protocol Independent Multicast
- Pim tracks sources and receivers and also topology changes
- Versions = Pim v4 and pim v6
- Modes = Sparse mode and Dense mode
- Objective = to build the multicast distribution tree from
receiver to source

PIM IN NEXUS
Only Sparse mode is supported in Nexus
PIM VERSIONS
- Version 1 and Version 2
- V1 used IGMP as the transport protocol
- V1 is obsolete
- In V2, Pim had become an individual IP protocol
- Also, PIM BSR is available only in version 2
- Only V2 is supported in NXos
PIM Hello msg
Pim Hellos
- Contains information about DR priority and Hold time
- Sent to multicast address 224.0.0.13
- Hello is exchanged at an interval of 30 seconds by default.
This value can be configured.
- Authentication can be configured for hello messages

Information in PIM Hello


- DR priority
- Hold Time (3.5x)
Configuration of PIM Hellos
- We can configure the Pim Hello interval

- We can configure the Pim Hello Authentication also


Verification of pim

To check interfaces configured with PIM

To check PIM neighbors


PIM Trees
Pim helps tree building
- Source tree
- Shared tree

PIM MODES
- Sparse; multicasts to specific receiver
- Dense; pushes to all; use of prune messages

ASM
- Uses both source tree and shared tree as needed
- Can learn Rp address statically or dynamically
- Default mode

SSM mode
- Need to change to IGMPv3
- Forms source tree between receiver and source
- No need for RP configuration
Distribution modes

•Any Source Multicast (ASM) provides discovery of multicast sources. It builds a shared tree between sources and
receivers of a multicast group and supports switching over to a source tree when a new receiver is added to a group. ASM
mode requires that you configure an RP.

•Source-Specific Multicast (SSM) builds a source tree originating at the designated router on the LAN segment that
receives a request to join a multicast source. SSM mode does not require you to configure RPs. Source discovery must be
accomplished through other means.

•Bidirectional shared trees (Bidir) build a shared tree between sources and receivers of a multicast group but do not
support switching over to a source tree when a new receiver is added to a group. Bidir mode requires that you configure an
RP. Bidir forwarding does not require source discovery because only the shared tree is used.
Shortest path tree
Shared path tree with RP

Source tree from source to RP


Tree from RP to receivers
Formation of shared tree
PIM Join and Prune msgs
PIM Joins
- A PIM join is not generated unless a receiver
announces its willingness to join a group
- PIM join message types – (*, G) and (S,G)
PIM joins to 239.4.5.6 and 239.9.8.7
PIM Prune
PIM – Sparse mode
Pim Sparse mode
- Pull model
- Explicit join is required
- Supports both source tree and shared tree
- RP config is mandatory

- Uses Join / Prune messages


- Pim register is sent by DR connected to source
(until register-stop is received back from the RP)
Multicast Source
PIM Register
Multicast source routers use
Pim Register messages to register at RP
RP in turn uses Register-Stop messages

Pim Register are unicast messages


Pim Register stop messages are used to
stop the register for a specific group
from a specific source
Rendezvous Points
RENDEZVOUS POINTS

- Shared distribution models use the concept of RP


- SSM deployments don’t use RP
- RP becomes the root (pseudo source) for the tree
- Path between source and RP is built using Source tree
- Placement of RP is important in the topology
RP Selection
- Manual / static
- Not scale well
- BSR
- Standardized; RP & BSR candidates
- Auto RP
- Cisco Proprietary; RP candidates & Mapping agents
- Anycast RP
- Based on anycast
Static Rp configuration

Verification of Rp configuration
Auto RP

- Many candidate RPs are listed to provide redundancy


- A mapping agent receives candidate announcements regularly
- Candidate RP with highest IP is elected
- Only available for IPv4

-Auto RP is cisco proprietary


-Provides dynamic learning, selection, announcement and redundancy for RP
-Overcomes failure due to single RP
-Works based on Rp-candidates, Rp- mapping agents

-Rp candidates announce themselves capable of being RP


-Mapping agents collect information on all candidates present
-Mapping agents also select best RP among candidates and announce it to others

-Uses 224.0.1.40 and 224.0.1.39 for Auto-rp


Rp candidates
- Manually config’d
- Sends Rp-announce messages
- By default, they announce Rp capability for 224.0.0.0/4.
- The above parameter can be changed

Dense mode is used to propagate announce & discovery messages


All interfaces to be config’d in sparse-dense-mode generally to
handle autorp traffic

Rp candidates configuration
Rp announcements
- Encap’d in UDP
- Uses UDP port 496
- Information in announce msg
- Interval -60seconds
- Rp address, GDA, Hold time
- Hold time -180seconds
- Also check TTL and UDP ports
- Sent to 224.0.1.39
- Only mapping agents are listening at above address
Rp Mapping agents
- Listens for announce messages
- If more than one RP is announced for same GDA, elects best
- Elects based on higher IP address.
- Send Rp-Discovery messages which has list of Rp per GDA

Dense mode is used to propagate announce & discovery messages


All interfaces to be config’d in sparse-dense-mode

Rp Mapping Agent configuration


Rp discovery / mapping
- Encap’d in UDP
- Information in announce msg
- Uses UDP port 496
- Rp address, GDA, Hold time
- Interval -60seconds
- Also check TTL and UDP ports
- Hold time -180seconds
- Sent to 224.0.1.40
- Routers are listening at above address as soon as you start a multicast RIB
AutoRp verification commands
AutoRp announce filter
BSR
- Available for both IPv4 and IPv6
- Election for BSR from among candidate BSR
- Elected BSR sends periodic BSR messages
- BSR messages include candidate Rp announcements and IP address of BSR
- RP Candidates unicast to BSR

-Open standard
-Similar to Auto RP
-Compatible with Pim Version2
-Cant define scope
-Supports sparse mode

Candidate BSR election


- Based on highest priority (priority = 0 by def )
- If tie, based on Highest Ip address
- Election is Preemptive
Candidate BSR configuration
Candidate RP configuration

-RP Candidates unicast to BSR


Verification
ANY CAST RP

- multiple RPs are represented by same ip address.


- this common ip represented by RPs is configured on the mcast routers
- reachability to this IP is advertised by the IGP

You might also like