PIM Dense Mode Configuration
Protocol Independent Multicast - Dense Mode (PIM-DM) is a data-driven multicast routing protocol that builds source-based multicast distribution trees that operate on the flood-and-prune principle. PIM-DM requires unicast-reachability information, but it does not depend on a specific unicast routing protocol.
Terminology
Following is a brief description of terms and concepts used to describe the PIM-DM protocol:
Reverse Path Forwarding
Reverse Path Forwarding (RPF) is an optimized form of flooding, in which the router accepts a packet from SourceA through Interface IF1, only when IF1 is the interface the router would use in order to reach SourceA. It determines whether the interface is correct by consulting its unicast routing tables. The packet that arrives through interface IF1 is forwarded because the routing table lists this interface as the shortest path to the network. The router's unicast routing table determines the shortest path for the multicast packets. Because a router accepts a packet from only one neighbor, it floods the packet only once, meaning that (assuming point-to-point links) each packet is transmitted over each link once in each direction.
Forwarding Multicast Packets
PIM-DM routers forward multicast traffic to all interfaces that lead to receivers that have explicitly joined a multicast group. Messages are sent to a group address in the local subnetwork. The router performs an RPF check, and forwards the packet. Traffic that arrives on the correct interface is sent to all outgoing interfaces that lead to downstream receivers, if the downstream router is a member of this group.
Upstream
Upstream traffic is traffic that is going towards the source.
Downstream
Downstream traffic is anything other than the upstream interface for that group.
Nexthop
PIM-DM does periodic lookups for prefixes to check router reachability. The nexthop lookup mechanism avoids periodic lookup. During start-up, PIM-DM notifies NSM (Network Services Manager) about the prefixes that pertain to them. NSM notifies the protocols if a better nexthop is available, or if a nexthop becomes unavailable. In this way, PIM-DM does not expend resources to do periodic lookups, because NSM is proactive in their maintenance.
Configuration
Configuring PIM-DM requires the following steps:
This section provides the configuration steps for configuring PIM-DM and examples for a relevant scenario.
Topology
In this network topology, the Source_1 address is 10.10.1.52 and the group address is set to 224.0.1.3.
Similarly for ipv6, Source_1 address is 5001::2 and the group address is set to ff06::2.
PIM-DM Configuration Topology
In this example, all routers are running PIM-DM.
1. Host_1 sends an IGMP/MLD membership report to Subnet 1.
2. After Router-C receives this report, it associates its receiving interface, eth1, with the group reported in the IGMP/MLD message, for example, group1.
3. Source_1 then sends a data packet for group1.
4. Every router creates an (S,G) entry in the multicast routing table.
5. When the data packet reaches Router-C, it forwards via the interface, eth1, because there is a local member on this interface for this group. Router-C has a downstream receiver, so it does not send a prune message to its upstream neighbor router, Router-B.
Enabling IP Multicast Routing
Enable IP multicast routing(V4/V6) on all of the PIM routers inside the PIM domain:
#configure terminal | Enter Configure mode. |
(config)#ip multicast-routing | Enable IP multicast routing. |
(config)#commit | Commit the transaction. |
#configure terminal | Enter Configure mode. |
(config)#ipv6 multicast-routing | Enable IPV6 multicast routing. |
(config)#commit | Commit the transaction. |
Enabling PIM-DM
Enable PIM-DM(V4/V6) on all participating interfaces within each of routers inside the PIM domain on which you want to run PIM.
#configure terminal | Enter Configure mode. |
(config)#interface eth1 | Enter interface mode. |
(config-if)#ip address 10.10.15.12/24 | Configure the IP address for eth1. |
(config-if)#ip pim dense-mode | Enable PIM dense mode on the interface. |
(config-if)#exit | Exit interface mode. |
(config)#interface eth2 | Enter interface mode. |
(config-if)#ip address 10.10.14.12/24 | Configure the IP address for eth1. |
(config-if)#ip pim dense-mode | Enable PIM dense mode on the interface. |
(config-if)#commit | Commit the transaction. |
(config-if)#end | Enter the global configuration mode. |
#configure terminal | Enter Configure mode. |
(config)#interface eth1 | Enter interface mode. |
(config-if)#ipv6 address 2001::1/64 | Configure the IPv6 address for eth1. |
(config-if)#ipv6 pim dense-mode | Enable PIMv6 dense mode on the interface. |
(config-if)#exit | Exit interface mode. |
(config)#interface eth2 | Enter interface mode. |
(config-if)#ipv6 address 3001::1/64 | Configure the IPv6 address for eth2. |
(config-if)#ipv6 pim dense-mode | Enable PIMV6 dense mode on the interface. |
(config-if)#commit | Commit the transaction. |
Following is a sample configuration for Router-C:
hostname Router_C
!
interface eth0
!
interface eth1
ip pim dense-mode
!
interface eth2
ip pim dense-mode
!
interface lo
!
!
ip multicast-routing
!
For ipv6:
hostname Router_C
!
interface eth0
!
interface eth1
ipv6 pim dense-mode
!
interface eth2
ipv6 pim dense-mode
!
interface lo
!
!
Ipv6 multicast-routing
Validation
The show ip pim interface command displays the interface details for Router_C.
Router_C#show ip pim interface
Address Interface VIFindex Ver/ Nbr DR
Mode Count prior
192.168.1.10 eth1 0 v2/D 0 1
172.16.1.10 eth2 2 v2/D 1 1
The show ip mroute command displays the IP multicast routing table.
Router_C#show ip mroute
IP Multicast Routing Table
Flags: I - Immediate Stat, T - Timed Stat, F - Forwarder installed
Timers: Uptime/Stat Expiry
Interface State: Interface (TTL)
(10.10.1.52, 224.0.1.3), uptime 00:00:15
Owner PIM-DM, Flags: F
Incoming interface: eth2
Outgoing interface list:
eth1 (1)
The show ip pim mroute displays the IP PIM-DM multicast routing table.
Router_C#show ip pim mroute
PIM-DM Multicast Routing Table
(10.10.1.52, 224.0.1.3)
RPF Neighbor: 172.16.1.2, Nexthop: 172.16.1.2, eth2
Upstream IF: eth2
Upstream State: Forwarding
Assert State: NoInfo
Downstream IF List:
eth1, in 'olist':
Downstream State: NoInfo
Assert State: NoInfo
Validation for ipv6-PIM-DM
The show ipv6 pim interface command displays the interface details for Router_C.
ROUTER_C#show ipv6 pim interface
Total number of PIM interfaces:2
Interface VIFindex Ver/ Nbr DR
Mode Count Prior
eth2 0 v2/D 1 1
Address : fe80::eac5:7aff:fea8:7cb9
Global Address: 3001::1
eth1 1 v2/D 0 1
Address : fe80::eac5:7aff:fea8:7cc3
Global Address: 2001::1
The show ipv6 mroute command displays the IPv6 multicast routing table.
ROUTER_C# show ipv6 mroute
IPv6 Multicast Routing Table
Flags: I - Immediate Stat, T - Timed Stat, F - Forwarder installed
B - BIDIR
Timers: Uptime/Stat Expiry
Interface State: Interface
(5001::2, ff06::2), uptime 00:00:15
Owner PIM, Flags: F
Incoming interface: eth2
Outgoing interface list:eth1
The show ipv6 pim mroute displays the IPV6 PIM-DM multicast routing table.
Router_C# show ipv6 pim mroute
PIM-DM Multicast Routing Table
(5001::2, ff06::2)
RPF Neighbor: fe80::fa8e:a1ff:fe52:b247, Nexthop: fe80::fa8e:a1ff:fe52:b247, xe5
Upstream IF: eth2
Upstream State: Forwarding
Upstream Prune Limit Timer Expiry: 0 secs
Assert State: NoInfo
Source Active Timer Expiry: 0 secs
State Refresh Timer Expiry: 0 secs
Downstream IF List:
eth1, in 'olist':
Downstream State: NoInfo
Assert State: NoInfo