23 Multicast+Basics+-+IGMP+Principles
23 Multicast+Basics+-+IGMP+Principles
23 Multicast+Basics+-+IGMP+Principles
IGMP
PC 1
PC 2
IP packet
PC 3
• In unicast transmission mode, a data packet is destined only for a single host.
• The data source needs to send a copy of a data packet to each host that requires the packet.
• When hundreds of hosts require the same data packet, the data source creates and sends many copies of the same data
packet to the hosts, which greatly burdens the source, reduces network devices' performance, and consumes link
bandwidth resources.
Broadcast Transmission in One-to-Many Communication Scenarios
PC 1
PC 2
IP packet
• In broadcast transmission, a data packet is transmitted to all devices within a specific broadcast domain.
• Once a node sends a broadcast data packet, all devices in the same broadcast domain receive and process the data
packet, wasting the resources of those devices that do not need the packet. Especially when there are a large number of
broadcast data packets, much network bandwidth and device resources will be consumed.
• IPv6 does not use the broadcast transmission mode.
Multicast Transmission in One-to-Many Communication Scenarios
PC 1
PC 2
Multicast
server
IP packet
PC 3
• In multicast transmission, a source sends a data packet only to hosts that have joined a multicast group. The source sends a
single data packet even when many hosts require the packet. Multicast devices (that run multicast routing protocols)
replicate or forward the packet as needed.
• The data packet is sent only to users who have joined this group, so users who do not need the data will not receive the
data.
• Only one copy of the service flow is transmitted on each link, which greatly improves network resource utilization.
Advantages, Disadvantages, and Applications of Multicast
Advantages: Applications:
• Improves transmission efficiency by reducing the • Applies to scenarios in which multiple hosts require
traffic volume and hardware processing workload. the same traffic.
• Improves performance by preventing unnecessary • Applies to scenarios in which data receivers'
traffic transmission and reducing bandwidth addresses (or locations) are unknown.
consumption and network devices' workload. • Typical multicast applications include live multimedia
• Supports distributed applications, allowing hosts content (such as IPTV), online education, tele-
to be both traffic senders and receivers learning, data warehousing, stock trading, and one-to-
many data delivery.
Disadvantages:
• Is based on UDP and uses the best-effort
transmission mechanism.
• Does not have mechanisms for preventing
congestion.
• May cause duplicate or disordered packets.
Multicast Service Models
Source: multicast traffic sender, such as a multimedia server. A multicast source does not need to run any
multicast protocols. It only needs to send out multicast data.
Receiver: a multicast group member that needs to receive the data of a multicast group, such as a PC that
receives live multimedia content.
Multicast group: a set of hosts that require the traffic of the same multicast program. A multicast group is
identified by a multicast IP address. For example, 224.1.1.1 is an IPv4 multicast group address, to which a
multicast source can send data. If a host wants to receive the data of this group, it needs to join the group.
Multicast router: a network device that runs a multicast protocol. A multicast router is an example of a
multicast device, as are switches and firewalls that support multicast routing protocols.
First-hop router: a multicast router directly connected to a multicast source. A first-hop router is responsible
for receiving multicast data from a multicast source and forwarding the data to the multicast network.
Last-hop router: a multicast router directly connected to multicast group members. A last-hop router is
responsible for forwarding multicast data to the directly connected network segment and for managing and
maintaining multicast group members.
Multicast Distribution Trees
Source
R2 R3
R4 R5 R6
PC 1 PC 2 PC 3
Receiver Receiver
Multicast IP Addresses
In IPv4, Class D IP addresses (224.0.0.0/4) are multicast addresses. A multicast IP address identifies a group of
receives who are interested in the same traffic.
The IANA defines Class D IP addresses as follows:
Permanent multicast group addresses reserved by the IANA for special purposes and
designated for multicasting on local links only. The meanings of some commonly
used addresses in this range include:
224.0.0.1: identifies all nodes.
224.0.0.0 – 224.0.0.255
224.0.0.2: identifies all multicast routers.
224.0.0.9: identifies RIPv2 routers.
224.0.0.5: identifies OSPF routers.
224.0.0.6: identifies OSPF DRs.
User group addresses valid on the entire network. The IANA further classifies
224.0.1.0 – 238.255.255.255
addresses in this range into SSM group addresses and GLOP group addresses.
Destination Source MAC Payload of the The source IP address is the IP address of a multicast sender.
MAC address address multicast packet The destination IP address is a multicast group IP address.
Must identify a
group of receivers
0100-5e00-0000
Multicast MAC address
0000 0001 0000 0000 0101 1110 0000 0000 0000 0000 0000 0000
230 20 15 33
Multicast IP address
11100110000101000000111100100001
One-to-one mapping
Fixed 5 bits lost for the last 23 bits
bits
Fixed bits
000000010000000001011110000101000000111100100001
Multicast MAC address
01 00 5E 20 15 33
• The last bit in the first octet of a multicast MAC address is fixed at 1.
• The last bit in the first octet of a unicast MAC address is fixed at 0.
• A total of 32 IPv4 multicast addresses are mapped to each MAC address, because of a loss of 5 bits in the multicast IP
address.
Contents
IGMP
Source
No signaling
protocol needed
• A multicast router replicates and
R1
forwards multicast data to the network
branches that are attached to multicast
Multicast routing protocol
R2 R3 group members.
For example, PIM
• How is the multicast traffic forwarding
path determined?
R4 R5 R6
• How can devices ensure correct
Group member multicast traffic forwarding?
management protocol • How can loops be prevented in
PC 1 PC 2 PC 3 IGMP multicast traffic transmission?
Receiver Receiver
Multicast Routing Protocols
A unicast data packet is sent from a source to a single receiver. The routers involved in this process focus on
sending the packet to the correct destination without caring about the packet's source address. However, multicast
transmission is done in one-to-many mode — a multicast data packet is sent from a source to a group of hosts. The
multicast routers involved are responsible for sending the packet to all hosts that require the data. How does a
multicast router identify the packet destinations? Which interfaces require the packet? How is the forwarding path of
the packet determined? All these issues can be resolved by multicast routing protocols.
Any loops that exist cause much more severe problems on a multicast network than they would on a unicast
network, because each single multicast data packet is sent to a group of hosts. Therefore, all multicast routers must
know the multicast source of a multicast packet and also forward the packet from the source (incoming direction) to
destinations.
Each multicast router maintains a multicast routing table (also called multicast forward table) to ensure correct data
forwarding from the upstream node to the downstream node.
A unicast routing protocol does not care about data sources; instead, it focuses on the selection of the shortest path
to a destination. A multicast routing protocol, however, must determine upstream interfaces closer to data sources.
Key Functions of Multicast Routing Protocols
Source No signaling
protocol needed
• Checking whether a multicast packet is
received from the correct interface and
R1
ensure the loop-free forwarding of the
packet
Multicast • Setting up a multicast distribution tree to
R2 R3
routing protocol
determine the multicast data forwarding
For example, PIM
path
R4 R5 R6 • Creating (S, G) or (*, G) multicast
forwarding entries on each multicast
Group member router on a multicast distribution tree
management protocol
PC 1 PC 2 PC 3 IGMP
Receiver Receiver
Multicast Routing Entries
PIM routing entries are multicast routing entries created by PIM. Two types of PIM routing entries exist: (S, G)
and (*, G). S indicates a specific multicast source, * indicates any multicast source, and G indicates a multicast
group.
An (S, G) entry is created if the multicast source address is known. (S, G) entries are used for setting up a shortest path
tree (SPT). This type of entry applies to PIM-DM and PIM-SM networks.
An (*, G) entry is created if the multicast source address is unknown. (*, G) entries are mainly used by PIM routers to
set up a rendezvous point tree (RPT). This type of entry applies to PIM-SM and BIDIR-PIM networks.
A PIM router may have both (*, G) and (S, G) entries. After receiving a packet that contains both a source
address and group address, the PIM router processes the packet as follows:
If an (S, G) entry is found for the packet, the router determines the packet forwarding path based on the (S, G) entry
information.
If only an (*, G) entry is found for the packet, the router creates an (S, G) entry based on the (*, G) entry information,
and then determines the packet forwarding path based on the (S, G) entry information.
Multicast Distribution Tree Classification
SPT:
An SPT has a multicast source at the root and receivers at the branches.
An SPT provides the shortest path for multicast data transmission.
SPTs apply to PIM-DM and PIM-SM networks.
RPT:
An RPT has an RP at the root.
The RP is shared by multiple multicast groups. An RPT branch is created between the RP and a multicast router
attached to group members. In RPT scenarios, all multicast data sent by a source is forwarded by the RP to
branches that need the data.
RPTs apply to PIM-SM and BIDIR-PIM networks.
SPT
GE 0/0/0
GE 0/0/2 PC 2
Receiver
An SPT mainly uses (S, G) entries, such as
GE 0/0/1
the following:
(10.10.10.10, 239.1.1.1)
Upstream interface: GE0/0/0
Downstream interface(s): GE0/0/1, GE0/0/2 PC 3
PC 1 SPT
Receiver
RPT
Source 2
Source 1 11.11.11.11
10.10.10.10
PC 2
RP
Receiver
An RPT mainly uses (*, G) entries,
such as the following:
(*, 239.1.1.1)
Upstream interface: GE0/0/0 GE 0/0/0
SPT
PC 1
Receiver RPT
RPF
/0 /0
G E0
Receiver Multicast data
GE 0/0/1
R1 R2
• Any loops that exist cause much more severe problems on a multicast network than they would on a unicast network.
Besides the destination address of a multicast packet, a multicast router also cares about the source address of the packet.
The router performs reverse path forwarding (RPF) checks to ensure the loop-free forwarding of multicast packets.
• The RPF mechanism enables the router to check whether a multicast data packet is received on the correct interface. The
router forwards the packet if it passes the check, but discards the packet if not. The correct interface refers to the RPF
interface (also known as the upstream interface). Generally, RPF checks are based on unicast routing entries.
RPF
R3
Unicast routing table of R1
Destination network Outbound
address/mask interface Source
11.6.3.2/24
11.6.3.0/24 GE 0/0/0
/0 /0
G E0
Receiver Multicast data
GE 0/0/1
R1 R2
• R1 receives the same multicast data packet on both its GE 0/0/0 and GE 0/0/1 interfaces.
• The unicast routing table of R1 contains a route to the source 11.6.3.2. So, R1 checks whether the packet is
received on the correct interface based on the outbound interface of the unicast route.
• The local outbound interface connected to the source is GE 0/0/0 on R1. Therefore, the packet received on this
interface passes the RPF check, and the packet received on GE 0/0/1 fails to pass the check. Based on the check
result, R1 permits the packet on GE 0/0/0 and discards the packet on GE 0/0/1.
Multicast Routing Protocol Classification
PIM-DM
PIM-DM is used on small-scale networks with densely distributed receivers. It uses the "push" mode to
forward multicast data packets. In this mode, a router assumes that at least one source-specific group
member exists on each subnet and therefore pushes multicast data packets to each subnet. A subnet is
later pruned if it does not need the packets.
PIM-SM
PIM-SM uses the pull transmission mode, not the push mode. In this mode, a router assumes that no
network segments require the multicast traffic of a group. Instead, the router sends traffic only to hosts that
have joined the multicast group.
PIM-DM: Flood and Prune
10.1.1.1
PC 1 Multicast
Receiver data flow
PIM-DM: Flood and Prune
PC 1
Receiver PIM Prune
PIM-DM: Flood and Prune
PC 1
Receiver SPT
PIM-DM: Graft
PC 1
Receiver
PIM-DM: Graft
PC 2
Receiver
After grafting is complete, a new SPT is created,
PI M
Gr
af t
along which multicast traffic is sent to receivers.
- AC PI M
K Gr
af t
PC 3
New receiver
PC 1
Receiver
PIM-SM: Join
RP
A
B C
in
Jo
M
PI
D E
PIM Join
PC
Receiver
PIM-SM uses the pull transmission mode, instead of the push mode used by PIM-DM. In pull mode, a router assumes
that no network segments require the multicast traffic of a group. Instead, the router sends traffic only to hosts that have
joined the multicast group.
An important PIM router, called the rendezvous point (RP), is maintained on the network. The RP provides services for
existing and new multicast sources or group members. When a host starts to request the traffic of a multicast group, the
last-hop router sends a Join packet to the RP, during which an (*, G) entry is created on each device that the packet
passes through. Finally, an RPT is created, with the RP at the root.
Contents
IGMP
R4 R5 R6
• IGMP works between last-hop routers and multicast receivers on a multicast network. It defines how
hosts and multicast routers on a network segment maintain group member information.
• IGMP messages are carried in IP packets with a protocol number of 2 and TTL of 1.
• There are three versions of IGMP:
IGMPv1 (defined in RFC 1112)
IGMPv2 (defined in RFC 2236)
IGMPv3 (defined in RFC 3376)
IGMPv2 Messages
• General Query: standard query message periodically sent by IGMP routers to obtain information about
multicast groups
• Group-Specific Query: query message sent to a specified group to determine whether the group
contains any members
• Membership Report: report message sent from hosts to routers to join a multicast group or respond to a
query
• Leave Group: message sent from hosts to routers to indicate their intention to leave a specified
multicast group
• Version 1 Membership Report: included for compatibility with IGMPv1
IGMPv2 Messages
• Type: indicates the message type (Membership Query, Membership Report, Leave Group, or Version 1 Membership
Report)
• Maximum Response Time: (only valid in queries; set to 0x00 in other messages) indicates the longest time that hosts can
wait to respond to a Membership Report message. The default value is 10s. This can be changed using the igmp max-
response-time command, with the desired time specified in seconds.
• Multicast Group Address:
Set to 0.0.0.0 in General Query messages
Set to the target multicast group address in Group-Specific Query messages
Set to the target multicast group address in Membership Report and Leave Group messages
IGMPv2 Membership Query (Type: 0x11)
• General Query
Routers use General Query messages to obtain information about all hosts on a network segment.
These messages are sent to 224.0.0.1 (all multicast hosts) and the group address carried in them is
0.0.0.0. Hosts that receive a General Query respond with a Membership Report message if they
require multicast data.
If a Membership Report packet is not received from a certain network segment before the Multicast
Listener Interval expires, the router advertises the segment as having no multicast group members
and does not send further multicast data to the segment. The Multicast Listener Interval is equal to
two Query Intervals plus 10 seconds, so its default value is 130s (2x60s + 10s).
You can change the Query Interval by running the igmp timer query command.
You can change the maximum response time (longest time hosts can wait to respond to queries) by
running the igmp max-response-time command. The default value is 10.
IGMPv2 Membership Query (Type: 0x11)
• Group-Specific Query
When routers receive a Leave Group message from a multicast group member, they respond by
sending a Group-Specific Query message to the multicast group involved to determine whether any
members remain in the group.
The destination IP address of a Group-Specific Query is the address of the group containing the host
that sent the Leave Group message.
Queriers send a second Group-Specific Query after 1 second to ensure that groups are not
inadvertently considered empty due to dropped or damaged packets. They only remove groups after
receiving no reply to the second query.
IGMPv2 Membership Report (Type: 0x16)
Hosts use Membership Report messages to inform routers that they are multicast group members.
The destination IP address of a Membership Report is the host's current or target multicast group.
Routers use Membership Report messages to discover multicast group members on a
network segment.
Membership Report messages are also used to respond to queries.
IGMPv2 Leave Report (Type: 0x17)
IGMPv1 did not define a way for members to leave groups; to do so, they simply stopped responding
to queries. This mechanism was improved in IGMPv2 by the addition of the Leave Group
mechanism.
To leave a multicast group, an IGMPv2 host must send a Leave Group message destined for
224.0.0.2 (all multicast routers).
When a router receives a Leave Group message from a multicast group member, it responds by
sending a Group-Specific Query message to the multicast group involved to determine whether any
members remain in the group. Remaining members must respond to the Group-Specific Query with a
Membership Report message. If the router receives no response, it decides that the network
segment does not contain any group members and removes the group.
IGMPv2 Querier
IGMP
R1 Querier R2
GE 0/0/0 GE 0/0/0
192.168.1.1/24 192.168.1.2/24
• It would be inefficient for all multicast routers on a network segment to send their own IGMP queries.
• IGMP therefore selects one router (interface) per segment to act as the querier.
• In IGMPv2, the router with the lowest IP address is selected as the IGMP querier.
• In the diagram here, GE 0/0/0 on R1 has a lower IP address than GE 0/0/0 on R2, so GE 0/0/0 on R1 is chosen as the IGMP querier
for this segment.
• If non-queriers (such as GE 0/0/0 on R2) do not receive any query messages from the querier before the Other Querier Present
Timer expires (125s by default), they decide that the querier has gone down and select a new querier using the same process
(lowest IP address).
IGMPv2 General Query
R1
IGMPv2 Querier
Periodically sends
General Query messages 1
to 224.0.0.1
PC 1 PC 3
224.1.1.1 member 224.1.1.1 member
R1's interface is the IGMP querier for this segment and periodically sends General Query messages to determine
whether attached group members are online. It sends a General Query once every Query Interval (60s by default).
Responding to IGMPv2 General Queries
R1
IGMPv2 Querier
Periodically sends
General Query messages 1
to 224.0.0.1
Sends
Membership
Report message
2 to 224.1.1.1
PC 1 PC 3
224.1.1.1 member 224.1.1.1 member
When PC 1 and PC 3 receive these queries, the report delay timer on each host is started at a number chosen uniformly
between 0 and the value of the maximum response time field included in the query (10 seconds by default). This timer counts
down to 0, at which point the host sends a Membership Report message.
Hosts that receive a Membership Report from another host before the timer expires do not send a Membership Report of their
own. This suppresses duplicate reports on the network segment.
Responding to General Queries and Suppressing Membership Reports
R1
IGMPv2 Querier
Periodically sends
General Query messages 1
to 224.0.0.1
Sends
Membership
Report message
2 to 224.1.1.1 3
PC 1 PC 3
224.1.1.1 member 224.1.1.1 member
PC 1 in this figure has received a query and its report delay timer has just reached 0. PC 1 sends a Membership Report
message to inform R1 that it is a member of multicast group 224.1.1.1. PC 3 is in the same multicast group as PC 1 but its
timer has not reached 0. When it receives PC 1's Membership Report message, it suppresses its own message to prevent
duplicate reports.
IGMPv2 Leave Group Process (Scenario 1)
R1
IGMPv2 Querier
Sends Group-Specific Query
messages to 224.1.1.1 2
(two queries at 1s interval)
Sends Leave
Group message Sends
(group address Membership
1 224.1.1.1) Report message 3
PC 1 to 224.0.0.2 to 224.1.1.1 PC 3
224.1.1.1 member 224.1.1.1 member
R1
IGMPv2 Querier
Sends Group-Specific Query
messages to 224.2.2.2 2 3 224.2.2.2 does not respond
(two queries at 1s interval) and is removed
Sends Leave
Group message
(group address
224.2.2.2)
1
to 224.0.0.2 PC 2
224.2.2.2 member
Query Interval 60s Interval for sending General Query messages igmp timer query
Maximum response time 10s Longest time hosts can wait to respond to General igmp max-response-time
Query messages
Last Member Query 1s Time after receiving a Leave Group message that a igmp lastmember-queryinterval
Interval querier will respond with Group-Specific queries
GigabitEthernet0/0/1(10.1.1.253):
IGMP is enabled
IGMP state: up
IGMP limit: -
Robustness (negotiated): -
Robustness (configured): 2
Require-router-alert: disabled
Send-router-alert: enabled
Ip-source-policy: disabled
Prompt-leave: disabled
SSM-Mapping: disabled
Startup-query-timer-expiry: off
Other-querier-present-timer-expiry: off
IGMP Group and Routing Tables
• Group table entries are created when an IGMP join message is received from a host. This table is used to maintain
group information and instruct multicast routing protocols (such as PIM) to create corresponding (*, G) entries. The
table exists on every device interface that has IGMP enabled and has received a join message. Entries are created in
the following format:
<HUAWEI> display igmp group
Interface group report information of VPN-Instance: public net
GigabitEthernet1/0/0 (10.1.6.2):
Total 1 IGMP Group reported
Group Address Last Reporter Uptime Expires
225.1.1.2 10.1.6.10 00:02:04 00:01:17
• IGMP routing table entries are only created on interfaces that do not have PIM enabled. These entries are
maintained by IGMP itself. The main purpose of the table is to extend the egress interface of multicast routing
entries. Routing table entries are created in the following format:
<HUAWEI> display igmp routing-table
Routing table of VPN-Instance: public net
Total 1 entry
IGMP