Configuring PIM-DM on Cisco routers is a relatively simple
exercise.
Figure 6-32: Basic PIM-DM router configuration
The first step is to enable multicast routing in global
configuration mode using the command:
ip multicast-routing
Next, enable PIM-DM on the router interfaces using the
interface command:
ip pim dense-mode
The router in Figure 6-32 has a basic configuration shown in
the diagram. Although the configuration has EIGRP as the routing
protocol, any of the IP routing protocols could have been
used.
The PIM version can be configured using the interface
configuration command:
ip pim version [1 | 2]
If an interface is configured for version 2 (the default) and
a PIM version 1 neighbor is discovered on the interface, the router
will automatically switch to PIM version 1. If the PIM version 1
neighbors somehow go away, the router will switch the interface back
to PIM version 2.
The default interval for PIM query messages is 30 seconds.
This can be adjusted using the interface command:
ip pim query-intervalseconds
seconds
1—65535 seconds
The following command changes the PIM query interval to 60
seconds.
interface Serial 0
ip pim query-interval 60
Monitoring and Debugging PIM Dense Mode
The network in Figure 6-33 is configured with PIM-DM and will
be used to demonstrate the PIM show and debug commands. The
configurations for the routers in Figure 6-33 are listed on the
following page.
Figure 6-33: The network used to demonstrate PIM-DM show and debug
commands
Router A
ip multicast-routing
interface Ethernet 0
ip address 172.16.1.1
255.255.255.0
ip pim dense-mode
interface Serial 0
ip address 172.16.2.1
255.255.255.0
clock rate 1540000
ip pim dense-mode
interface Serial 1
ip address 172.16.3.1
255.255.255.0
clock rate 1540000
ip pim dense-mode
router eigrp 100
network 172.16.0.0
Router B
ip multicast-routing
interface Ethernet 0
ip address 172.16.4.1
255.255.255.0
ip pim dense-mode
interface Serial 1
ip address 172.16.3.2
255.255.255.0
clock rate 1540000
ip pim dense-mode
router eigrp 100
network 172.16.0.0
Router C
ip multicast-routing
interface Serial 0
ip address 172.16.2.2
255.255.255.0
ip pim dense-mode
interface Serial 1
ip address 172.16.5.1
255.255.255.0
clock rate 1540000
ip pim dense-mode
router eigrp 100
network 172.16.0.0
Router D
ip multicast-routing
interface Ethernet 0
ip address 172.16.4.2
255.255.255.0
ip pim dense-mode
interface Serial 1
ip address 176.16.5.2
255.255.255.0
clock rate 1540000
ip pim dense-mode
router eigrp 100
network 172.16.0.0
Use the EXEC command show
ip pim
neighbor to view the
state of the PIM interfaces on the routers.
Bashow ip pim neighbor
PIM Neighbor Table
Neighbor Address
Interface
Uptime
Expires
Ver
Mode
172.16.3.1
Serial 1
00:09:40
00:01:35
v2
Dense
172.16.4.2
Ethernet0
00:41:57
00:01:19
v2
Dense (DR)
The fields in the neighbor address are described
below.
Neighbor address
IP Address of the PIM neighbor.
Interface
Interface on which the neighbor is attached.
Uptime
How long in hours, minutes, and seconds the neighbor has been
in the PIM neighbor table.
Expires
Time to elapse before the neighbor is removed from the table
in hours, minutes, and seconds.
Mode
PIM mode of the interface.
(DR)
The neighbor is the designated router on a multi-access
network.
The state of a PIM interface can be displayed using the
show ip
pim interface
command.
show ip pim interface [interface-type interface-number] [count]
interface-type interface-number
Optional. Type and number of the interface (Ethernet 0,
Serial 1, etc.)
Optional.
Number of packets that have been sent and received on the
interface
B4ashow ip pim interface
Address
Interface
Version/Mode
Nbr Count
Query Intvl
DR
172.16.4.2
Ethernet0
v2/Dense
1
30
172.16.4.1
172.16.3.1
Serial1
v2/Dense
1
30
0.0.0.0
Address
IP address of the next hop router.
Interface
PIM interface type and number.
Version/Mode
Configured PIM mode and version number for the
interface.
Neighbor Count
Number of discovered PIM neighbors on this
interface.
Query Intvl
Configured PIM query interval.
DR
Address of the designated router. Serial interfaces do not
have a designated router so this field is set to 0.0.0.0.
B#show ip pim interface count
Address
Interface
FS
Mpackets In/Out
172.16.4.2
Ethernet0
*
686/0
172.16.3.1
Serial1
*
738/0
FS
* indicates that fast switching is enabled
Mpackets In/Out
Number of multicast packets sent or received on the
interface.
The operation of PIM can be verified by executing the
debug ip
pim command:
Badebug ip pim
PIM debugging is on:
B#
08:18:03: PIM: Send v2 Hello on
Ethernet0
08:18:06: PIM: Received v2 Hello on
Ethernet0 from 172.16.4.2
08:18:10: PIM: Received v2 Hello on
Serial1 from 172.16.3.1
08:18:16: PIM: Send v2 Hello on
Serial1
08:18:33: PIM: Send v2 Hello on
Ethernet0
08:18:36: PIM: Received v2 Hello on
Ethernet0 from 172.16.4.2
08:18:40: PIM: Received v2 Hello on
Serial1 from 172.16.3.1
08:18:46: PIM: Send v2 Hello on
Serial1
Notice that PIM queries to or from a particular neighbor are
30 seconds apart. This is the default query interval for
PIM.
References
IETF draft, “Protocol Independent Multicast Version 2 Dense
Mode Specification,” S. Deering et. al., 1998,
draft-ietf-pim-v2-dm-01.txt