0% found this document useful (0 votes)
58 views

Clase 7. Multticast-IPv4

IPv4 Multicast Applications can be sent using unicast, broadcast, or multicast transmission. Unicast requires sending multiple copies which does not scale well. Broadcast sends one copy to all devices, using excess bandwidth. Multicast sends one copy to a multicast group address, allowing replication only where needed. This is the most efficient solution. IGMP is used by hosts to join multicast groups and by routers to manage multicast traffic forwarding. IP multicast uses UDP and virtual addresses to deliver data from one source to multiple receivers.

Uploaded by

Andrés Mena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Clase 7. Multticast-IPv4

IPv4 Multicast Applications can be sent using unicast, broadcast, or multicast transmission. Unicast requires sending multiple copies which does not scale well. Broadcast sends one copy to all devices, using excess bandwidth. Multicast sends one copy to a multicast group address, allowing replication only where needed. This is the most efficient solution. IGMP is used by hosts to join multicast groups and by routers to manage multicast traffic forwarding. IP multicast uses UDP and virtual addresses to deliver data from one source to multiple receivers.

Uploaded by

Andrés Mena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 76

CONMUTACIÓN Y RUTEO II

Clase 7. IPv4 Multicast

Alberto Arellano A. Ing. Msc.


[email protected]
CCNA – CCNP - CCSP
IP Multicast Applications
IP Multicast Application - ESPN
Multimedia traffic using
Unicast

Best case:
known unicasts

Worst case:
unknown unicasts

Application sends one copy of each packet to every client's


unicast address.
As a result, unicast transmission has significant scaling restrictions.
If the group is large, the same information must be carried multiple
times, even on shared links.
Multimedia
traffic using
Broadcast

• Application sends only one copy of each packet using a broadcast.


• Inefficient, if only for a small subset of the network.
• Every host device must process the broadcast multimedia data frame.
• Transmissions may reach data rates as high as 13 Mbps or more.
• All devices must still process the broadcast traffic, even if not using it.
• May use most, if not all, of the allocated bandwidth for each device.
• it is not recommended broadcast implementation for applications
delivering data, voice, or video to multiple receivers.
Multimedia
traffic using
Multicast

• The most efficient solution – in between broadcast and unicast.


• Server sends one copy of each packet to a special address that
represents multiple clients.
• Server sends out a single data stream to multiple clients.
• Client device decides whether or not to listen to the multicast
address.
• Saves bandwidth and controls network traffic by forcing the network to
replicate packets only when necessary.
• Reduces network bandwidth consumption and host processing.
Less stress on Server

In a unicast scenario, the server sequences through


transmission of multiple copies of the data, so variability in
delivery time is large, especially for large transmissions or
large distribution lists.
Multicast Advantages
• Enhanced efficiency: Controls network traffic and reduces
server and CPU loads
• Optimized performance: Eliminates traffic redundancy
• Distributed applications: Makes multipoint applications
possible
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.
IP Multicast Routing
• IP multicast uses a virtual group
address called the multicast IP
address.
• IP unicast, a packet is routed from
a source address to a destination
address, hop by hop.
• IP multicast, the packet's
destination address is not assigned
to a single destination.
• Instead, receivers join a group.
• All members of the group receive
the packet.
• A host must be a member of the
group to receive the packet.
• Multicast sources do not need to
be members of that group.
IP Multicast Routing
With unicast routing, each router advertises its directly connected
interfaces in a routing protocol. Routers who receive unicast packets
only care about the destination address. They check their routing
tables, find the outgoing interface and forward the packets towards the
destination.

With multicast routing, things are not that simple, the destination is a
multicast group address and the multicast packets have to be
forwarded to multiple receivers throughout the network.

To accomplish this, we use a multicast routing protocol:

• DVMRP (Distance Vector Multicast Routing Protocol)


• MOSPF (Multicast Open Shortest Path First)
• PIM (Protocol Independent Multicast)
Multicast IP 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 IP Address Structure

Destin. IP: Multicast Src. IP: Unicast

• The Internet Assigned Numbers Authority (IANA) controls


the assignment of IP multicast addresses.
• The Class D address range is used only for the group
address or destination address of IP multicast traffic.
• The source address for multicast datagrams is always the
unicast source address.
Multicast IP Address
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
IGMP

• Internet Group ManagementProtocol

• 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 specifies version 2 ofIGMP(a form of ASM


-Any source Multicast), most widely deployed
andsupported

• RFC 3376 specifies version 3 ofIGMP(a form of SSM


-source specific Multicast), good network support.
IGMPv2 (RFC 2236) – Joining a Group
IGMPv2 (RFC 2236) – Joining a Group
IGMPv2 (RFC 2236) – Maintaining/leaving a Group
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
IGMPv3 – Leaving Group
IGMPv3 – Changing Group
IPv4 vs IPv6 Multicast
Multicast over LAN

• 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. With
this mechanism, Multicast Group Joins and leaves become effective
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 thesource.
• Trees are built via connection requests (Joins) “sent” toward
thesource.
• 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 topologychanges.
• Only when a tree is completely built from receiver backwards to
the source can source traffic flow down the tree to thereceivers.
• Multicast routing use separate routing table -mroute
Source Tree

• Traffic travels from source (root) to


receivers (leaves), shortest path
taken
• Packets replicated at Branch point
• Forwarding entry states
represented as (S,G) in mroute
table
Source Tree

• Root is a common point.


Rendezvous Point
• Receivers join RP. To learn
of sources
• Sources only transmit to
RP. RP forward to receivers
• Forwarding represented as
(*, G) in mroute table.
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: Dense mode multicast routing protocols are used for
networks where most subnets in your network should receive the
multicast traffic. When a router receives the multicast traffic, it will flood it
on all of its interfaces except the interface where it received the multicast
traffic on.
Multicast Routing Protocols

Above we see R1 that receives the multicast traffic from our video server. It
floods this multicast traffic to R2 and R3, but these two routers don’t have
any interest in the multicast traffic. They will send a prune message to
signal R1 that it should no longer forward the multicast traffic.

There are a number of dense mode routing protocols:


• DVMRP (Distance Vector Multicast Routing Protocol)
• 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).
RPF (Reverse Path Forwarding)
RPF is a way to avoid flood loops in both PIM-DM (Dense Mode) and PIM-
SM (Sparse Mode) or dispersed mode), consisting in that before forwarding
a packet, the router performs the following testing:
1. Analyze the packet's input interface and its source address (unicast)
2. Check in the route table the interface of the optimal route to the origin
direction
3. If the input interface matches that of the optimal route, the packet is
accepted and redistributed by flood.
4. Otherwise the package is discarded since it is probably a duplicate.
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:

• Dense mode floods multicast traffic until a router asks you to


stop.
• Sparse mode sends multicast traffic only when a router
requests it.

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.
Multicast Routing Protocols

1. The video server is sending multicast traffic to R1.


2. R1 is the RP for this network.
3. H3 wants to receive this multicast traffic so it sends an IGMP join
message for multicast group 239.1.1.1.
4. R3 receives the IGMP join and will request R1 to start sending the
multicast traffic.
Multicast Routing Protocols
R1 will now start forwarding the multicast traffic to R3.

When using sparse mode, all routers need to know the IP address of 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
• Used by a router to notify an upstream router that it wishes to receive (or
stop receiving) multicast traffic for a given group(G).
• 3 main classifications of PIM
• Any Source Multicast (asm-pim) –3“submodes”
• Dense, sparse, sparse-dense
• Source-Specific Multicast(pim-ssm)
• Bidirectional(pim-bidir)
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
AUTO-RP
Auto-RP is a Cisco proprietary protocol that uses two different
roles:
• Candidate RP
• Mapping Agent

The candidate RP is a router that announces itself that it wants


to be an RP for the network. It does so by sending RP
announcement packets to the 224.0.1.39 multicast address.

The mapping agent listens to the RP announcement packets


from our RP candidates and makes a list of all possible RPs. It
will then elect an RP and informs the rest of the network
with RP mapping packets that are sent to multicast address
224.0.1.40.
AUTO-RP
In the network, R1 and
R5 are advertising
themselves as
rendezvous points in the
network.

These two routers will


send their RP
announcements packets
to 224.0.1.39 on all
directly connected
interfaces where PIM is
enabled. One of our
routers will become the
mapping agent.
AUTO-RP
R3 is the mapping agent
in our network. It has
received the RP
announcement packets
from R1 and R5, and has
elected R5 as the RP that
will be advertised to the
network. When two
candidate RPs want to
become RP for the same
group(s) then the mapping
agent will prefer the RP
with the highest IP
address.
AUTO-RP
R2 and R6 didn’t receive the RP
mapping packets. Why?

Keep in mind we are using PIM


sparse mode here, multicast
traffic is only forwarded when a
router requests it with a PIM
join message. This PIM join
message is sent to the RP.
• R1 and R4 are not going to
forward multicast packets to
224.0.1.40 to R2 unless R2
requests it.
• R5 and R4 are not going to
forward multicast packets to
224.0.1.40 to R6 unless R6
requests it. • PIM Sparse-Dense mode
• PIM Auto-RP Listener
PIM Sparse-Mode Auto RP
Configure RP Router (R1 & R5)
Configure Multicast Agent Router (R3)
Configure Others Routers (R2 & R4)
Show RP Mapping
PIM Dense Mode - Homework

You might also like