Lab 4-1 Multicast, IGMP, And PIM DM Protocols
Lab 4-1 Multicast, IGMP, And PIM DM Protocols
Learning Objectives
Topology
Scenario
Tasks
S2 is located between R1 and R3, but does not need to be configured. Before the
experiment, clear the configuration on S2 and restart S2.
Configure IP addresses and masks for all the routers. All loopback interfaces must
have 24-bit masks.
<Huawei>system-view
[Huawei]sysname R1
[R1-Serial1/0/0]quit
[R1-Serial3/0/0]quit
[R1-GigabitEthernet0/0/2]quit
[R1]interface LoopBack 0
[R1-LoopBack0]quit
<Huawei>system-view
[Huawei]sysname R2
[R2-Serial1/0/0]quit
[R2-GigabitEthernet0/0/0]quit
[R2-GigabitEthernet0/0/1]quit
[R2]interface LoopBack 0
[R2-LoopBack0]quit
<Huawei>system-view
[Huawei]sysname R3
[R3-GigabitEthernet0/0/2]quit
[R3-Serial3/0/0]quit
[R3]interface LoopBack 0
[R3-LoopBack0]quit
<Huawei>system-view
[Huawei]sysname R4
[R4-Serial1/0/0]quit
[R4-GigabitEthernet0/0/1]
[R4]interface LoopBack 0
[R4-LoopBack0]quit
<Huawei>system-view
[Huawei]sysname R5
[R5-Serial1/0/0]quit
[R5-GigabitEthernet0/0/0]quit
[R5]interface LoopBack 0
[R5-LoopBack0]quit
After the configurations are complete, test the connectivity between routers.
[R1]ping -c 1 10.0.13.3
1 packet(s) transmitted
1 packet(s) received
[R1]ping -c 1 10.0.12.2
1 packet(s) transmitted
1 packet(s) received
[R1]ping -c 1 10.0.14.4
1 packet(s) transmitted
1 packet(s) received
[R5]ping -c 1 10.0.35.3
1 packet(s) transmitted
1 packet(s) received
[R5]ping -c 1 10.0.25.2
1 packet(s) transmitted
1 packet(s) received
Enable multicast routing on R1, R2, R3, R4, and R5. To enable multicast, run the
multicast routing-enable command in the system view.
By default, the multicast function is disabled on VRP. Before using PIM or IGMP,
enable multicast globally.
[R1]multicast routing-enable
To run PIM DM on an interface, run the pim dm command in the interface view.
[R1-GigabitEthernet0/0/2]pim dm
[R1-GigabitEthernet0/0/2]quit
[R1-Serial1/0/0]pim dm
[R1-Serial1/0/0]quit
[R1-Serial3/0/0]pim dm
[R1-Serial3/0/0]quit
Perform the same configurations on R2, R3, R4, and R5. Enable PIM DM on the
interfaces between routers.
[R2]multicast routing-enable
[R2-Serial1/0/0]pim dm
[R2-Serial1/0/0]quit
[R2-GigabitEthernet0/0/0]pim dm
[R2-GigabitEthernet0/0/0]quit
[R3]multicast routing-enable
[R3-GigabitEthernet0/0/2]pim dm
[R3-GigabitEthernet0/0/2]quit
[R3-Serial3/0/0]pim dm
[R3-Serial3/0/0]quit
[R4]multicast routing-enable
[R4-Serial1/0/0]pim dm
[R4-Serial1/0/0]quit
[R4-GigabitEthernet0/0/1]pim dm
[R4-GigabitEthernet0/0/1]quit
[R5]multicast routing-enable
[R5-Serial1/0/0]pim dm
[R5-Serial1/0/0]quit
[R5-GigabitEthernet0/0/0]pim dm
[R5-GigabitEthernet0/0/0]quit
GE0/0/2 up 1 30 1 10.0.13.3
S1/0/0 up 1 30 1 10.0.12.2
S3/0/0 up 1 30 1 10.0.14.4
R1 has three interfaces running PIM and each interface has a neighbor (NbrCnt). On
a network segment, the router with a larger interface IP address becomes the DR.
PIM version: 2
PIM state: up
By default, the hello interval of PIM DM is 30s, the hello hold time is 3.5 times of the
hello interval (105s).
Check the neighbor list of R1. Three routers established PIM neighbor relationships
with R1. The default DR priority of neighbors is 1.
Check details about neighbor R3. Uptime indicates the neighbor relationship setup
time, Expiry time indicates the remaining time of the PIM neighbor, LAN delay
indicates the delay in transmitting the prune messages, and Override interval
indicates the interval for overriding the prune messages.
Neighbor: 10.0.13.3
Interface: GigabitEthernet0/0/2
Uptime: 01:41:00
DR Priority: 1
Holdtime: 105 s
In this experiment, multicast users are connected to S1. Enable IGMP on G0/0/1 of
R2 and R4. To enable IGMP, run the igmp enable command in the interface view.
[R2-GigabitEthernet0/0/1]igmp enable
[R2-GigabitEthernet0/0/1]quit
[R4-GigabitEthernet0/0/1]igmp enable
[R4-GigabitEthernet0/0/1]quit
Add static multicast groups to G0/0/1 of R2 and R4. Then the interfaces always
forward multicast traffic with destination address 225.1.1.1.
[R2-GigabitEthernet0/0/0]quit
[R4-GigabitEthernet0/0/1]quit
By default, VRP uses IGMPv2. The command output shows that R2 (10.0.24.2) is the
querier of the network segment where G0/0/1 is located. IGMPv2 selects the router
with a smaller IP address as the querier.
Interface information
GigabitEthernet0/0/1(10.0.24.2):
IGMP is enabled
IGMP state: up
IGMP limit: -
Interface information
GigabitEthernet0/0/1(10.0.24.4):
IGMP is enabled
IGMP state: up
IGMP limit: -
Check static IGMP groups on the interfaces. Group 225.1.1.1 is the manually added
multicast group.
Routing table
Total 1 entry
GigabitEthernet0/0/1 (10.0.24.2),
Protocol: STATIC
IGMP routing entries are generated on an interface only when the interface has
IGMP but not PIM enabled, and the interface is an IGMP querier. The routing entries
are not displayed on R4 because R2 is the querier of network segment 10.0.24.0/24.
By default, the query interval of the querier is 60s. To increase the speed of user
addition to multicast groups, run the igmp timer query command to shorten the
interval for sending query packets.
[R2-GigabitEthernet0/0/1]quit
GigabitEthernet0/0/1(10.0.24.2):
IGMP is enabled
IGMP state: up
IGMP limit: -
<R1>terminal monitor
<R2>terminal debugging
<R2>
<R2>
<R2>
<R2>
The default robustness variable of a router is 2. Shut down the interface to test
robustness.
<R2>terminal monitor
<R2>terminal debugging
<R2>
<R2>system-view
[R2-GigabitEthernet0/0/1]shutdown
[R2-GigabitEthernet0/0/1]undo shutdown
[R2-GigabitEthernet0/0/1]
[R2-GigabitEthernet0/0/1]
[R2-GigabitEthernet0/0/1]
When the interface is not shut down, the router's interface sends a General Query
message every 20s. when the interface is shut down and enabled, the interval for
sending the first two query messages is 5s. When a router starts, it sends N General
Query messages (N is the robustness variable). The message sending interval is 1/4
of the configured interval for sending General Query messages.
Run the robust-count command to set the IGMP robustness variable. This
parameter is valid only for IGMPv2 and IGMPv3. Change the robustness variable on
R2's G0/0/1 to 3.
[R2-GigabitEthernet0/0/1]igmp robust-count 3
[R2-GigabitEthernet0/0/1]shutdown
[R2-GigabitEthernet0/0/1]undo shutdown
[R2-GigabitEthernet0/0/1]
[R2-GigabitEthernet0/0/1]
[R2-GigabitEthernet0/0/1]
[R2-GigabitEthernet0/0/1]return
After the robustness variable is changed to 3, the interval for sending the first three
General Query messages is 5s, and the interval for sending later messages is 20s.
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]quit
[R1-ospf-1]quit
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]quit
[R2-ospf-1]quit
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]quit
[R3-ospf-1]quit
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]quit
[R4-ospf-1]quit
[R5-ospf-1]area 0
[R5-ospf-1-area-0.0.0.0]quit
[R5-ospf-1]quit
After the configuration, check whether the routers can learn the loopback addresses
of other routers.
----------------------------------------------------------------------------
Destinations : 7 Routes : 8
Destinations : 7 Routes : 8
Destinations : 0 Routes : 0
After several minutes, the multicast routing entries can be seen on all the other
routers. View the multicast routing table on R2.
(*, 225.1.1.1)
UpTime: 00:09:04
(10.0.3.3, 225.1.1.1)
UpTime: 00:00:52
The first entry (*, 225.1.1.1) is generated after static IGMP group is configured on an
interface.
The second entry (10.0.3.3, 225.1.1.1) is generated after multicast traffic is spread on
the router.
After PIM is enabled, routers use the unicast routing table for RPF check. The
command output shows that the RPF neighbor of multicast source 10.0.3.3 is
10.0.25.5.
If you do not want the traffic to be transmitted to the destination through a unicast
route, run the rpf-route-static command to change the RPF path. In this experiment,
change the RPF path from 10.0.25.5 to 10.0.12.1.
To observe the PIM prune and graft messages, delete and add static IGMP groups to
simulate the user deletion and addition operations. Enable debugging on R2.
<R1>terminal monitor
<R2>terminal debugging
<R2>system-view
Dec 31 2011 15:00:05.300.1+00:00 R2 PIM/7/JP:(public net): PIM ver 2 JP sending 10.0.12.2 -> 224.0.0.13 on
Serial1/0/0 (P012689)
Dec 31 2011 15:00:05.300.2+00:00 R2 PIM/7/JP:(public net): Upstream 10.0.12.1, Groups 1, Holdtime 210
(P012693)
Dec 31 2011 15:00:05.300.3+00:00 R2 PIM/7/JP:(public net): Group: 225.1.1.1/32 --- 0 joins 1 prunes (P012701)
Dec 31 2011 15:00:05.350.1+00:00 R2 PIM/7/JP:(public net): PIM ver 2 JP receiving 10.0.12.1 -> 224.0.0.13 on
Serial1/0/0 (P012689)
Dec 31 2011 15:00:05.350.2+00:00 R2 PIM/7/JP:(public net): Upstream 10.0.12.1, Groups 1, Holdtime 207
(P012693)
Dec 31 2011 15:00:05.350.3+00:00 R2 PIM/7/JP:(public net): Group: 225.1.1.1/32 --- 0 joins 1 prunes (P012701)
Dec 31 2011 15:00:19.440.1+00:00 R2 PIM/7/JP:(public net): PIM ver 2 GFT sending 10.0.12.2 -> 10.0.12.1 on
Serial1/0/0 (P012633)
Dec 31 2011 15:00:19.440.2+00:00 R2 PIM/7/JP:(public net): Upstream 10.0.12.1, Groups 1, Holdtime 0 (P012639)
Dec 31 2011 15:00:19.440.3+00:00 R2 PIM/7/JP:(public net): Group: 225.1.1.1/32 --- 1 joins 0 prunes (P012648)
Dec 31 2011 15:00:19.480.1+00:00 R2 PIM/7/JP:(public net): PIM ver 2 GAK receiving 10.0.12.1 -> 10.0.12.2 on
Serial1/0/0 (P012633)
Dec 31 2011 15:00:19.480.2+00:00 R2 PIM/7/JP:(public net): Upstream 10.0.12.2, Groups 1, Holdtime 0 (P012639)
Dec 31 2011 15:00:19.480.3+00:00 R2 PIM/7/JP:(public net): Group: 225.1.1.1/32 --- 1 joins 0 prunes (P012648)
[R2-GigabitEthernet0/0/1]return
The prune message is sent from multicast address 224.0.0.13, while prune messages
are sent to the upstream device through unicast.
If you need to transmit multicast traffic within a specified range, you can run the
multicast boundary command on an interface to specify the range of a multicast
group or multicast address segment.
Prevent the traffic from multicast group 225.1.1.2 from being transmitted to R4.
Perform the following configuration on R1's interface connected to R4:
[R1-Serial3/0/0]quit
Check the multicast routing table on R2 and R4. R2 has the entry (10.0.3.3, 225.1.1.2),
while R4 does not have a routing entry of this multicast group. This indicates that
multicast traffic is not spread to R4.
(*, 225.1.1.1)
UpTime: 00:09:04
(10.0.3.3, 225.1.1.1)
UpTime: 00:02:11
(10.0.3.3, 225.1.1.2)
UpTime: 00:00:08
(*, 225.1.1.1)
UpTime: 00:08:03
1: GigabitEthernet0/0/1
(10.0.3.3, 225.1.1.1)
UpTime: 00:02:43
1: GigabitEthernet0/0/1
By default, PIM DM selects the router connected to the interface with a greater IP
address as the DR.
GE0/0/0 up 1 30 1 10.0.25.5
Check the interface status on R2. R5 is the DR. You can change the interface priority
to affect the DR election result. The priority is a 32-bit value. The default value is 1. In
the following example, change the priority of the R2's interface connected to R5 to
100.
[R2-GigabitEthernet0/0/0]quit
For security purposes, you can disable the user-side interface from sending and
receiving PIM hello packets by running the pim silent command.
[R4-GigabitEthernet0/0/1]pim silent
[R4-GigabitEthernet0/0/1]quit
PIM version: 2
PIM state: up
----End
For which networks you will configure PIM DM? What are the characteristics of these
networks?
Device Configurations
<R1>display current-configuration
[V200R007C00SPC600]
sysname R1
interface Serial1/0/0
link-protocol ppp
pim dm
interface Serial3/0/0
link-protocol ppp
pim dm
pim dm
interface LoopBack0
area 0.0.0.0
return
<R2>display current-configuration
[V200R007C00SPC600]
sysname R2
interface Serial1/0/0
link-protocol ppp
pim dm
interface GigabitEthernet0/0/0
pim dm
interface GigabitEthernet0/0/1
igmp enable
igmp robust-count 3
interface LoopBack0
area 0.0.0.0
return
<R3>display current-configuration
[V200R007C00SPC600]
sysname R3
interface Serial3/0/0
link-protocol ppp
pim dm
interface GigabitEthernet0/0/2
pim dm
interface LoopBack0
area 0.0.0.0
return
<R4>display current-configuration
[V200R007C00SPC600]
sysname R4
interface Serial1/0/0
link-protocol ppp
pim dm
interface GigabitEthernet0/0/1
pim silent
igmp enable
interface LoopBack0
area 0.0.0.0
return
<R5>display current-configuration
[V200R007C00SPC600]
sysname R5
interface Serial1/0/0
link-protocol ppp
pim dm
interface GigabitEthernet0/0/0
pim dm
interface LoopBack0
area 0.0.0.0
return
Learning Objectives
Topology