Ch12 Multicasting and Multicast Routing Protocols

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

Chapter 12

Multicasting
And
Multicast
Routing
Protocols
1
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
OBJECTIVES:
 To compare and contrast
1)unicasting,
2) multicasting, and
3)broadcasting communication.
 To define multicast addressing space in IPv4 and show the
division of the space into several blocks.
 To discuss the IGMP protocol, which is responsible for collecting
group membership information in a network. => for
multicasting

2
OBJECTIVES (continued):
 To discuss multicast routing protocols(3 concepts )
I. To discuss the general idea behind multicast routing protocols and their
division into two categories based on the creation of the shortest path
trees.
1) To discuss multicast link state routing in general and its implementation in the
Internet: a protocol named MOSPF.
2) To discuss multicast distance vector routing in general and its implementation in the
Internet: a protocol named DVMRP.

II. To discuss core-based protocol (CBT)


III. To discuss two independent multicast protocols
1) PIM-DM
2) PIM-SM.

 To discuss multicast backbone (MBONE) that shows how to


create a tunnel when the multicast messages need to pass
through an area with no multicast routers. 3
Chapter 12.1 Introduction
Outline 12.2 Multicast Addresses
12.3 IGMP
12.4 Multicast Routing
12.5 Routing Protocols
12.6 MBONE

4
12-1 INTRODUCTION

• Forwarding a datagram is normally based on the


prefix of the destination address(network address)
in the datagram.
• Understanding the above forwarding principle, we
can now define unicasting, multicasting, and
broadcasting.
• Let us clarify these terms as they relate to the
Internet.

5
Topics Discussed in the Section
 Unicasting
 Multicasting
 Broadcasting

6
 communication between one destination and one
destination
Source Legend
Ethernet switch
Point-to-point WAN
Unicast router
4
R1 3
1 2
R2 R3 3 R4

1 2

Recipient
is here
N1 N2 N3 N4 N5 N6
Figure 12.1 Unicasting 7
Note

In unicasting, the router forwards the


received datagram through
only one of its interfaces.

8
Multicasting
 one-to-many communication.
 Multiple destination addresses
belonging to one sender and one
destination group.
 Sender address: Unicast address
 Reciver address: Destination group address
(defining members within the group)

9
Some comments
 A network designed to deliver a
multicast service using IGMP might use
this basic architecture:

10
Multicast Groups
 The set of receivers for a multicast transmission is
called a multicast group
 A multicast group is identified by a multicast address
 A user that wants to receive multicast transmissions joins
the corresponding multicast group, and becomes a
member of that group

 After a user joins, the network builds the necessary


routing paths so that the user receives the data sent to
the multicast group

 Important: One multicast group is separated by


a multicast address.
11
Source
Legend
Ethernet switch
Point-to-point WAN
Multicast router
R1 4 3
1 2
3 3
R2 R3 R4
1 2 1 2

No No At leasts No At leasts At leasts


member member one member member one member one member

Figure 12.2 Multicasting 12


Note

In multicasting, the router may


forward the received datagram
through several of its interfaces.

13
Legend

S1 Multicast router S1
Unicast router
Di Unicast destination
Gi Group member

G1 G1 G1 G1 D1 D2 D3 D4

a. Multicasting b. Multiple unicasting

Figure 12.3 Multicasting versus multiple unicasting

14
Note

Emulation of multicasting through


multiple unicasting is not
efficient and may create
long delays, particularly
with a large group.

15
12-2 MULTICAST ADDRESSES

• A multicast address is a destination address for a


group of hosts that have joined a multicast group.
• A packet that uses a multicast address as a
destination can reach all members of the group
unless there are some filtering restriction by the
receiver.

16
Multicast Application
 Accessing Distributed Database

 Send information

 Send News

 Remote Conference

 A remote lecture

17
The IP Protocol Stack
 IP Multicasting only supports UDP as
higher layer
 There is no multicast TCP !
User Layer

Socket Layer

Stream Sockets Datagram Sockets Multicast Sockets

TCP UDP

IP IP Multicast

Network Interface

18
IP Multicasting
 There are three essential components of the
IP Multicast service:

1. IP Multicast Addressing
2. IP Group Management
3. Multicast Routing

19
12-2 Multicast Address

• The set of receivers for a multicast


transmission is called a multicast group
• A multicast group is identified by a
multicast address
• A user that wants to receive multicast
transmissions joins the corresponding
multicast group, and becomes a member
of that group

20
Topics Discussed in the Section
 Multicast Addresses in IPv4
 Selecting Multicast Addresses
 Delivery of Multicast Packets at Data Link Layer

21
1) Multicast Addressing
• All Class D addresses are multicast addresses:

Class D 1 1 1 0 multicast group id


28 bits

Class From To

D 224.0.0.0 239.255.255.255

1. Multicast addresses are dynamically assigned.


2. An IP datagram sent to a multicast address is forwarded to everyone
who has joined the multicast
3. If an application is terminated, the multicast address is (implicitly)
released.

22
23
Network Control Block
 The range of addresses between
224.0.0.0 and 224.0.0.255,
inclusive, is reserved for the use
of routing protocols 1)and other
low-level topology discovery 2) or
maintenance protocols 3)

 Multicast routers should not


forward any multicast datagram
with destination addresses in this
range.

 Examples of special and reserved


Class D addresses, e.g,

224.0.0.1 All systems on this subnet


224.0.0.2 All routers on this subnet
224.0.1.1 NTP (Network Time Protocol)
224.0.0.9 RIP-2 (a routing protocol)

24
Types of Multicast addresses
 Local Network Control Block
 The first block is called local network control block
(224.0.0.1/24).
 The addresses in this block are used for protocol
control traffic.
 They are not used forgeneral multicast
communication.
 TTL= 1
 Table 12.2 shows the assignment of some of these
addresses.

25
Types of Multicast addresses
 Internetwork Control Block
 The addresses in this block are also used for protocol control traffic
 Stream Multicast Group Block
 is allocated for stream multimedia.
 SAP/SDP Block
 is used for Session Announcement Protocol and Session Directory
Protocol (RFC 2974).
 SSM Block
 is used for Source Specific Multicasting. We discuss SSS later in the
chapter, when we introduce IGMPv3.
 GLOP Block
 This block defines a range of globally assigned addresses that can be use
inside an autonomous system (AS).
 Administratively Scoped Block
 Netstat Utility
 can be used to find the multicast addresses supported by an interface.

26
Example 12.1
• We use netstat with three options, -n, -r, and -a. The -n option
gives the numeric versions of IP addresses, the -r option gives
the routing table, and the -a option gives all addresses (unicast
and multicast).
• Note that we show only the fields relative to our discussion. The
multicast address is shown in color.

27
Why Multicast Address Translation
 As shown in the following figure, a Source
multicast packet must receive a Legend
Ethernet switch
single packet and be forwarded to
Point-to-point WAN
several multicast routers. Multicast router
R1 4 3
 Each received router must derive an 1 2
IP packet of the same D class R2 R3
3 3
R4
address. 1 2 1 2

 Multiple MAC ridicule must be


computed from one IP address (1: No
member
No
member
At leasts
one member
No At leasts At leasts
member one member one member
Multi-address mapping)
 MAC address derivation method using
ARP is not available (1:1 address
mapping)

28
Figure 12.4 Mapping class D to Ethernet physical address

29
Multicast Address Mapping

Identifes Ignored 23-bit


Class D
address

Ethernet Addresses Class D


1110xxxx x------- -------- -------- IP Address
with 01:00:5e in the
first 3 bytes are
reserved for IP
multicast

Ethernet
00000001 00000000 01011110 0------- -------- -------- Address

30
Note

An Ethernet multicast physical


address is in the range
01:00:5E:00:00:00
to
01:00:5E:7F:FF:FF.

31
Example 12.2
Change the multicast IP address 232.43.14.7 to an Ethernet multicast
physical address.

Solution
We can do this in two steps:
a. We write the rightmost 23 bits of the IP address in
hexadecimal. This can be done by changing the rightmost 3 bytes to
hexadecimal and then subtracting 8 from the leftmost digit if it is
greater than or equal to 8. In our example the result is 2B:0E:07.
b. We add the result of part a to the starting Ethernet multicast address,
which is 01:00:5E:00:00:00. The result is

01005E16

32
Example 12.3
Change the multicast IP address 238.212.24.9 to an Ethernet
multicast address.

Solution
We can do this in two steps:
a. The rightmost 3 bytes in hexadecimal are D4:18:09. We need to
subtract 8 from the leftmost digit, resulting in 54:18:09.
b. We add the result of part a to the Ethernet multicast starting
address. The result is

33
Network with No Multicast Support
 Multicast Filtering Switches
 An IP Multicast aware switch can automatically
set up multicast filters so the multicast traffic is
only directed to the partcipateing end nodes.

34
Network with No Multicast Support
 Tunneling

35
Figure 12.5 Tunneling

36
12-3 IGMP

• Multicast communication means that a sender


sends a message to a group of recipients that are
members of the same group.
• Each multicast router needs to know the list of
groups that have at least one loyal member related
to each interface.
• Collection of this type of information is done at two
levels: locally and globally.
• The first task is done by the IGMP protocol;
• The second task is done by the multicast
routing protocols.
37
IGMP

 The Internet Group Management Protocol


(IGMP) is a simple protocol for the support of
IP multicast.
 IGMP is defined in RFC 1112.
 IGMP operates on a physical network (e.g.,
single Ethernet Segment.
 IGMP is used by multicast routers to keep track
of membership in a multicast group.
 Support for:
 Joining a multicast group
 Query membership
 Send membership reports

38
IGMP Protocol(between a
multicast router and a host)
 A host sends an IGMP report when it joins a multicast
group (Note: multiple processes on a host can join. A
report is sent only for the first process).
 No report is sent when a process leaves a group
 A multicast router regularly multicasts an IGMP query to
all hosts (group address is set to zero).
 A host responds to an IGMP query with an IGMP report.
 Multicast router keeps a table on the multicast groups
that have joined hosts. The router only forwards a
packet, if there is a host still joined.
 Note: Router does not keep track which host is joined.

39
Topics Discussed in the Section
 Group Management
 IGMP Messages
 IGMP Protocol Applied to host
 IGMP Protocol Applied to Router
 Role of IGMP in Forwarding
 Variables and Timers
 Encapsulation
 Compatibility with other Versions

40
Figure 12.6 Position of IGMP in the network layer

41
Note

IGMP is a group management protocol.


It helps a multicast router create and
update a list of loyal members related
to each router interface.

42
Figure 12.7 IGMP messages

43
Figure 12.8 Membership query message format

44
Figure 12.9 Three forms of query messages

45
Figure 12.10 Membership report message format

46
47
Example 12.4
• Figure 12.11 shows a host with three processes: S1, S2, and S3.
• The first process has only one record;
• the second and the third processes each have two
records.
• We have used lowercase alphabet to show the source
address.

48
Figure 12.11 Socket state

• include mode : lists the unicast source addresses


• exclude mode : will not accept the group messages

49
 Duplicate information present in the Socket record
 Different sockets have the same group record (226.14.5.2)
 Each multicast group has only one record.
 Ultimately, the group has one of the two record modes (include/exclude).
 Different overlapping records should be combined in two ways.
 Exclude mode filter
 a : Apply the set intersection operation on all the address lists with exclusive filters.
 b: Apply the set difference operation on the result of part a and all the address lists with
inclusive filters.
 Include mode filter:
 set union operations on all the address lists

50
Note

Each time there is a change in any


socket record, the interface state
will change using the
above-mentioned rules.

51
Example 12.5
We use the two rules described above to create the interface state
for the host in Example 12.4. First we found the list of source
address for each multicast group.
a. Multicast group 226.14.5.2 has two exclude lists and one
include list. The result is an exclude list as calculated
below. {b,c} – {a,b,d,e} = {c}

b. Multicast group: 228.24.21.4 has two include lists. The


result is an include list as calculated below. We use the
plus sign for the union operation.

Figure 12.12 shows the interface state.

52
Figure 12.12 Interface state

53
Figure 12.13 Sending change state reports(for one group)

• If there is any change in the interface state, the host needs to


immediately send a membership report message for that group, using
the appropriate group record(s).
• 4 different cases may occur in the change, based on the old-state filter
and the new state filter.
• in the first two cases,
• the report contains two group records;
• in the last two cases,
• the report contains only one group record.
54
Receiving Query Reports
 When a host receives a query, it does not respond
immediately; it delays the response by a random amount
of time calculated from the value of the Max Resp Code
field as described later.
 The action of the host depends on the type of the query
received as shown below:
 1. If the received query is a general query, the host reset the
interface timer (see Figure 12.12) to the calculated delay
value. This means if there is any previous delayed response,
it is cancelled.
 2. If the received query is a group-specific query, then the
corresponding group time (see Figure 12.12) is reset to the
shorter value of the remaining time for the timer or the
calculated delay. If a timer is not running, its remaining time
is considered to be infinity.
 3. If the received query is a group-and-source-specific query,
then the action is the same as the previous case. In addition,
the list of sources is recorded for the delayed response.
55
Timer Expiration
 Membership report messages are sent by a host when
a timer expires. (depends on 3 types)
 1. If the expired timer is the interface timer set after a
general query received, then the host sends one
membership report that contains one Current-State-Record
for each group in the interface state.
 The type of each record is Mode-Is-Include / Mode-Is-Exclude (type
2)
 2. If the expired timer is the group timer set after a group-
specific query received
 the host sends one membership report that contains only one
Current-State-Record for that particular group if, and only if, the
group is still active.
 The single record contained in the report is of type Mode-Is-Include (type
1) or Mode-Is-Exclude (type 2)

56
Timer Expiration(con’t)
 3. If the expired timer is the group timer set after
a group-and-source-specific query received
 then the host sends one membership report that
contains only one Current-State-Record for that
particular group if, and only if, the group is still active.
 The type of the single record contained in the report
and source list depends on the filter mode of the group:
 a. If the group filter is include, the record type is
Mode_Is_Include (type 1) and the source list is (A . B)
 b. If the group filter is exclude, the record type is
Mode_Is_Exclude (type 2) and the source list is (B − A)

57
Figure 12.14 Router States

58
Figure 12.15 Change of state related to general query report

59
Figure 12.16 Change of state related to other report types

60
Role of IGMP in Forwarding
 In previous versions of IGMP,
 the forwarding recommendation was based only on the destination
multicast address of a packet.
 in IGMPv3
 based on both the destination address and the source address.
 six different recommendations in fig 12.14

61
Figure 12.17 Calculation of maximum response time

Ex) 31.469 = 0.314 x 10-2


62
63
64
12-4 MULTICAST ROUTING

• Now we show how information collected by IGMP is


disseminated to other routers using multicast
routing protocols.
• However, we first discuss the idea of optimal
routing, common in all multicast protocols.

65
Topics Discussed in the Section
 Optimal Routing: Shortest Path Trees

66
Multicast Routing Protocols
 Goal: Build a spanning tree between all
members of a multicast group

67
Objectives

 Every member should receive only one


copy
 Non members should not receive a copy
 There should be no loops
 Source to destination must be shortest
path

68
Multicast routing as a graph
problem

 Problem: Embed a tree


such that all multicast
group members are
connected by the tree

69
Multicast routing as a graph
problem
 Problem: Embed a tree such that all
multicast group members are connected by
the tree

 Solution 1: Shortest Path


Tree or source-based tree
(Build a tree that minimizes
the path cost from the source
to each receiver)
 Good tree if there is a single sender
 If there are multiple senders, need one
tree per sender
 Easy to compute
70
Multicast routing as a graph
problem

 Solution 2: Minimum-
Cost Tree Build a tree that
minimizes the total cost of
the edges
 Good solution if there are multiple
senders
 Very expensive to compute (not practical
for more than 30 nodes)

71
Multicast routing in practice
 Routing Protocols implement one of two approaches:

1. Source Based Tree:


– Essentially implements Solution 1.
– Builds one shortest path tree for each sender
– Tree is built from receiver to the sender  reverse shortest path /
reverse path forwarding

2. Core-based Tree:
– Build a single distribution tree that is shared by all senders
– Does not use Solution 2 (because it is too expensive)
– Selects one router as a “core” (also called “rendezvous point”)
– All receivers build a shortest path to the core  reverse shortest
path / reverse path forwarding

72
Note

In unicast routing, each router in the


domain has a table that defines a
shortest path tree to possible
destinations.

73
Figure 12.18 Shortest path tree in multicast routing

74
Note

In multicast routing, each involved


router needs to construct a shortest
path tree for each group.

75
Note

In the source-based tree approach, each


router needs to have one shortest path
tree for each group.

76
Figure 12.19 Source-based tree approach

77
Note

In the group-shared tree approach, only


the core router, which has a shortest
path tree for each group, is involved
in multicasting.

78
Figure 12.20 Group-shared tree approach

79
12-4 ROUTING PROTOCOLS

• During the last few decades, several multicast


routing protocols have emerged.
• Some of these protocols are extensions of
unicast routing protocols; some are totally new.

80
Topics Discussed in the Section
 Multicast Link State Routing: MOSPF
 Multicast Distance Vector: DVMRP
 Core-Based Tree: CBT
 Protocol Independent Multicast: PIM

81
Figure 12.21 Taxonomy of common multicast protocols

82
Multicast routing protocols in
the Internet
 Distance Vector Multicast Routing Protocol (DVMRP):
 First multicast routing protocol
 Implements flood-and-prune : (prune : remove)
 Multicast Open Shortest Path First (MOSPF):
 Multicast extensions to OSPF. Each router calculates a shortest-path
tree based on link state database
 Not widely used
 Core Based Tree (CBT):
 First core-based tree routing protocol
 Protocol Independent Multicast (PIM):
 Runs in two modes: PIM Dense Mode (PIM-DM) and PIM Sparse
Mode (PIM-SM).
 PIM-DM builds source-based trees using flood-and-prune
 PIM-SM builds core-based trees as well as source-based trees with
explicit joins.

83
Multicast Routing protocols
 Source based tree
1. DVMRP
 Reverse path forwarding (RPF)
 Reverse path Broadcasting (RPB)
 Reverse path multicasting (RPM)
2. MOSPF
 Core based Tree (CBT)
 PIM ( Protocol Independent Multicast)
 PIM-DM
 PIM-SM

84
Note

Multicast link state routing uses the


source-based tree approach.

85
Note

Flooding broadcasts packets, but


creates loops in the systems.

86
RPF(reverse path forwarding)

To prevent loops, only one copy is


forwarded; the other copies are
dropped. I

Figure 12.22 RPF


87
Note

RPF eliminates the loop in the


flooding process.

Flooding
• Flooding is the first strategy that comes to mind.
• A router receives a packet and without even looking at the
destination group address, sends it out from every interface except
the one from which it was received.

88
Figure 12.23 Problem with RPF

89
Figure 12.24 RPF versus RPB(Reverse Path Broadcasting)

• To eliminate duplication, we must define only one parent router for


each network.
• We must have this restriction:
• A network can receive a multicast packet from a particular source only
through a designated parent route
90
Note

RPB creates a shortest path broadcast


tree from the source to each destination.

It guarantees that each destination


receives one and only one copy
of the packet.

91
Reverse Path Multicasting (RPM)
 RPB does not multicast the packet, it broadcasts it.
 the multicast packet must reach only those
networks that have active members for that
particular group.
 This is called reverse path multicasting (RPM).
 To convert broadcasting to multicasting, the
protocol uses two procedures,
 pruning and grafting.
 pruning : the router sends a prune message to the
upstream router so that it can prune the corresponding
interface.
 Grafting :
 The graft message forces the upstream router to resume
sending the multicast messages .

92
Figure 12.25 RPF, RPB, and RPM

93
Note

RPM adds pruning and grafting to RPB


to create a multicast shortest path tree
that supports dynamic membership
changes.

94
Figure 12.26 Group-shared tree with rendezvous router

95
Figure 12.27 Sending a multicast packet to the rendezvous router

96
Note

In CBT, the source sends the multicast


packet (encapsulated in a unicast
packet) to the core router. The core
router decapsulates the packet and
forwards it to all interested
interfaces.

97
Note

PIM-DM is used in a dense multicast


environment, such as a LAN.

98
Note

PIM-DM uses RPF and pruning/grafting


strategies to handle multicasting.

However, it is independent from the


underlying unicast protocol.

99
Note

PIM-SM is used in a sparse multicast


environment such as a WAN.

100
Note

PIM-SM is similar to CBT but uses a


simpler procedure.

101
12-6 MBONE

 Multimedia and real-time communication have increased the


need for multicasting in the Internet.
 However, only a small fraction of Internet routers are
multicast routers.
 Although this problem may be solved in the next few
years by adding more and more multicast routers, there is
another solution for this problem.
 The solution is tunneling.
 The multicast routers are seen as a group of routers
on top of unicast routers. The multicast routers may
not be connected directly, but they are connected
logically.

102
Figure 12.28 Logical tunneling

103
Figure 12.29 MBONE

104

You might also like