1. Dense
2. Sparse
3. Sparse-Dense
Dense mode is flooding the traffic while Sparse mode is only forwarding the traffic to the requesting host. Sparse Mode requires a Rendezvous Point to achieve this. Sparse-Dense is a mode which combine the both functionalities so that the traffic will be flooded (Dense mode operation) when there is no Rendezvous Point.
Please read the following post to understand how Dense mode works and more about understanding the multicast routing tables.
PIM Dense Mode Operation & Behavior of Multicast Routing Table
In this post, I am enabling the PIM Sparse Mode and see how it is changing it's Multicast Routing Tables and forwards traffic.
IP addresses are configured according to the diagram and OSPF is enabled in routers to advertise all the networks.
First of all, let's globally enable Multicast routing on IOS.
R1(config)#ip multicast-routing
R2(config)#ip multicast-routing
R3(config)#ip multicast-routing
Concept of Rendezvous Point (RP) is simple. Each router that receives a multicast feed will forward it to the RP and each router that wants to receive a multicast feed will go to the RP..
RP should be manually configured in all routers or manually configured in RP itself and advertised using a protocol. Anyhow the RP must be manually configured..
Such 2 RP advertising protocols are Cisco's Auto-RP and standardized BSR (Boot-Strap Router).
In this post I am discussing only the manual configuration of RP and manual advertising of RP..
Following are the PIM Sparse mode related configuration.
R1(config)#int range e0/0-1
R1(config-if-range)#ip pim sparse-mode
R1(config)#int range e0/0-1
R1(config-if-range)#ip pim sparse-mode
R1(config)#int range e0/0-1
R1(config-if-range)#ip pim sparse-mode
As soon as the above commands entered, PIM Hello packets will be sent which will initiate PIM neighbor relationships.
show ip pim interface & show ip pim neighbor will display the PIM enabled interfaces and the neighbor relationships formed.
After issuing these commands, the multicast routing tables will look like the following..
Command to see the Multicast Routing table is show ip mroute
All the 3 routers will have the same entry in the routing table. As we can see, there is already an entry for a multicast group. The group address is 224.0.1.40 which is a well known address used in Cisco Auto-RP protocol to listen RP-Discovery messages from RP Mapping Agent. Because this post only consider about the manual configuration, let's ignore this for now..
Let's decide that R2 should be the RP.. All the routers should be configured with the RP address..
Note that the address should be reachable in unicast routing table..
R1(config)#ip pim rp-address 2.2.2.2
R2(config)#ip pim rp-address 2.2.2.2
R3(config)#ip pim rp-address 2.2.2.2
As soon as entering this command, new Tunnel interface will be created on every router and 2 Tunnel interfaces will be created on RP. These tunnels are used to encapsulate and decapsulate the 1st multicast packet in PIM register messages.
RP should be manually configured in all routers or manually configured in RP itself and advertised using a protocol. Anyhow the RP must be manually configured..
Such 2 RP advertising protocols are Cisco's Auto-RP and standardized BSR (Boot-Strap Router).
In this post I am discussing only the manual configuration of RP and manual advertising of RP..
Following are the PIM Sparse mode related configuration.
R1(config)#int range e0/0-1
R1(config-if-range)#ip pim sparse-mode
R1(config)#int range e0/0-1
R1(config-if-range)#ip pim sparse-mode
R1(config)#int range e0/0-1
R1(config-if-range)#ip pim sparse-mode
As soon as the above commands entered, PIM Hello packets will be sent which will initiate PIM neighbor relationships.
show ip pim interface & show ip pim neighbor will display the PIM enabled interfaces and the neighbor relationships formed.
After issuing these commands, the multicast routing tables will look like the following..
Command to see the Multicast Routing table is show ip mroute
All the 3 routers will have the same entry in the routing table. As we can see, there is already an entry for a multicast group. The group address is 224.0.1.40 which is a well known address used in Cisco Auto-RP protocol to listen RP-Discovery messages from RP Mapping Agent. Because this post only consider about the manual configuration, let's ignore this for now..
Let's decide that R2 should be the RP.. All the routers should be configured with the RP address..
Note that the address should be reachable in unicast routing table..
R1(config)#ip pim rp-address 2.2.2.2
R2(config)#ip pim rp-address 2.2.2.2
R3(config)#ip pim rp-address 2.2.2.2
As soon as entering this command, new Tunnel interface will be created on every router and 2 Tunnel interfaces will be created on RP. These tunnels are used to encapsulate and decapsulate the 1st multicast packet in PIM register messages.
show ip pim rp mapping will show the RPs and the corresponding groups..
Scenario 1 - Feed is available, No Listeners
Let's send a feed from IPTV_Svr;
Here is what happens when the multicast feed from IPTV_Svr hits R1;
It will encapsulate the 1st multicast packet and send it to R2 (RP) as a PIM Register.
RP will send a PIM Register Stop to R1 because there are no listeners downstream.
R1 will prune sending traffic on it's interface to RP for 60 seconds (default).
When this timer is over, R1 again sends a PIM Register message to RP to check whether RP is now is now interested or not..
If RP is still not interested it will send another PIM Register Stop to R1.
Now like in Dense mode, 2 new entries are added. P Flag indicate that this traffic is pruned.
Let's see the routing table of RP;
Scenario 2 - Feed is not available, Have Listeners
What will happen now is that R3 will send PIM Joins to RP but because RP has no feed in, it will just stay as it is. Following entries will be displayed in routing tables starting from R3,R2,R1..
R1 will have not even an entry..
Scenario 3 - Feed is available, Have Listeners
Now the IPTV_Svr will get replies..
What happens here back end is that, now RP will also send a PIM Join to R1 and R1 will unprune the interface which leads traffic to flow through..
Routing tables will be like the following, starting from R1,R2,R3..
Pruning flag has removed and interfaces have become forwarding..
Note :-
Even after the traffic coming without a problem and if R3 has a better path to the source, R3 will send PIM Joins to the router which is more closer to the source and traffic will take that path ignoring the path through RP.
This path which the RP is in is called RPT (Root Path Tree)
This path which is closer to source is called SPT (Source Path Tree)
Those above are indicated with the flags R & T
No comments:
Post a Comment