Ads 468x60px

Showing posts with label Multicasting. Show all posts
Showing posts with label Multicasting. Show all posts

Monday, July 25, 2011

PIM – Assert Mechanism


As in last post, I discussed about Multicast DR and querier. In this post I would like to discuss about PIM assert messages.  When it is important ?
Coming to this subject – In shared LAN networks, There may be more than one routers for redundancy and they can have reachability to RP. But as the redundancy is important same time need to know, how the PIM messages will be handled ?  The topology would be similar to below figure.
        
In this topology, the Multicast group hosts will receive duplicate packets from multicast Routers. To overcome this issue PIM have assert messages mechanism. This will help to decide PIM designated forwarder.

In this example,
  1. Router 1 is the RP, forwards multicast traffic to entire network.
  2. Routers 2 and 3 are redundant routers in a enterprise location. These routers forward the multicast traffic to LAN Router.
  3. Assume Router 3 transmits first multicast packet. Router 2 receives the same multicast packet in its outgoing interface, In R2 multicast routing table this group is destined to go out from outgoing interface.
  4. Router 2 then forwards multicast packet to LAN and Router 3 receives it, which means that Router 3 has also received data on an outgoing interface.
  5. Receiving an unexpected packet on an outgoing interface of Routers. Both Routers get alerted to the fact that other PIM-SM neighbors on the LAN are also forwarding traffic to the group.
  6. This means group hosts will receive duplicate data.

 This will big issue in big enterprise network, To overcome this problem,
  1. Routers generate Assert messages to select a single router to forward traffic. Here Downstream routers can see the Assert messages so that they know which one was elected and where to send subsequent Join messages afterwards.
  2. In our example, LAN Router sent Join messages to both gateway Router 2 and Router 3. That means as Local router received query from 2 routers, It replied to both. This means in return it will duplicate packets.
  3. After the election of PIM forwarder using Assert messages, all Join messages will go to either Router 2 or Router 3, depending on which becomes the designated forwarder.

Election using Assert Messages
  1. The router generating an Assert message with the lowest Administrative distance is elected  as the forwarder.  If all the routers are running the same unicast protocol.
  2. Then router assert message with the best unicast routing metric will be elected. For example, if all the routers are using RIP, the router with the smallest hop count is elected. If the metrics are equal.
  3. The router with the highest IP address is elected.

4.      After selection of PIM designated forwarded, The other router will prune its interface on physical media. So that elected members should send join messages to elected Router.
Hope this explanation will help you to understand the use of PIM assert messages in network. It is used to select a PIM forwarder to avoid duplicate multicast packets generation in network.  
Hope this post is informative for you. 
For any feedback, Plz comment with your Name and mail id, you can use Name/ URL for new users. 

Sunday, July 24, 2011

Multicast - DR and Querying Router



Today I would like to share some important concept about Multicast PIM-Sparse Mode DR and querier elections in PIM and role of them.

As we all know, IGMP has IGMP versions v1, v2 and v3.

In every version, The concept and role is bit different.

First let’s see about roles.

Roles:

Querier – Querying Router tasks is to send IGMP query message to LAN network , ensuring that is any one is still interested to join this multicast stream. As any of host will send a leave message in IGMPv2 , the querier router will send out query addressing to 224.0.0.1 (all multicast host) is anyone else would like to access this stream. If any host sends membership report for particular group. Then It will continue its task, If not It will discontinue.

DR – The DR is responsible for sending Join/Prune messages to the RP. Another role of DR is it sends a source-register message to the rendezvous point, on behalf of a source.

Let’s come to concept –

Many times confusions happens that querier and DR is one router only or what is use of DR?
  • In IGMP v1 – Both tasks are performed by one router.
  • In IGMP v2 - 
    • At start up each router sends a query message to the all 224.0.0.1 from its own interface address. The router with the lowest ip address is elected IGMP querier.


                      AND
    • Among all PIM-SM enabled router, Highest IP address will win DR selection, One more criteria can change this election, interface DR priority. But by default priority will be 1 for every interface, you can change priority under interface. Then highest priority will win DR election. Then that particular router will be responsible to send your join messages to RP and ensure about your communication.


This concept mainly applies, in shared LAN segment with more PIM enabled routers. You need to make sure that who should be concern router for DR, to handle join messages.
                                      Otherwise many times, by mistakenly any router in LAN segment enabled with PIM can be DR due to by default selection parameters and will handle your join messages coming from LAN hosts. Which will disturb your Multicast flow, since that another router will not have path to reach RP, So make sure in shared LAN environment you configured proper DR in all PIM enabled router.

The Designated Router in Detail -

When multiple routers are connected to a multi-access network (for example, an Ethernet) one of them must be selected to act as the designated router (DR) for a given period of time. The DR is responsible for sending Join/Prune messages to the RP. To elect the DR, each PIM router on the network examines the received Hello messages and compares its IP address with those of its neighbors. The router with the highest address is the DR. But highest priority can overcome it. 


Configuration :

MP1800(config-if-fastethernet0)#ip pim dr-priority 200 ?   
To check more in Router, Plz use show ip igmp interface (int)(Cisco command) , It will show you querier Router IP address and DR router detail.  In Maipu Routers "show ip igmp interface" will show you querier router IP address and "show ip pim neighbor detail" will show you detail about DR. 
It will show details about querying router and DR to us. 

Hope this information will help you for more understanding about DR and querying router in PIM sparse mode. For more information you can refer RFC 2236.
Hope this post is informative for you.

For any feedback, Plz comment. For non bloggers users you can use Name/URL option
Thanks for reading… 

Wednesday, May 25, 2011

Multicasting – PIM Sparse Mode Test -1


We already discussed about PIM – Sparse Mode in previous posts. Let’s see one basic example for it. I hope it will help to understand PIM Sparse mode practically. For theory part , Plz refer previous post in Multicasting Tab..


In this example, I used Maipu routers. For Cisco Routers the configuration is same.


Maipu 3840 is BSR and RP
Maipu 7508 is receiver router
Multicast Source – 192.168.1.7
Multicast Receiver – 192.168.200.2


We used static Routing for connectivity,  you can use any routing protocol as per requirement. You can use any 3rd party software or tool like VLC for multicast testing.


Topology:


Multicast PIM -Sparse Mode Setup




Configuration template –


MP 3840- Multicast Source
ip access-list standard 1
 10 permit host 224.0.1.12
 exit


ip multicast-routing


 interface gigaethernet0
 ip address 192.168.1.137 255.255.252.0
 ip pim sparse-mode
 exit


 interface gigaethernet1
 ip address 192.168.100.2 255.255.255.0
 ip pim sparse-mode
 exit       


 ip pim bsr-candidate gigaethernet1
ip pim rp-candidate gigaethernet0 192 60 group-list 1


### We are configuring this router as BSR candidate and RP candidate ###
            
ip route 192.168.200.0 255.255.255.0 192.168.100.1
  
!end


Show Outputs 


MP3840#sh ip pim bsr-router
PIMv2 Bootstrap information
PIM VRF Name: Default
This system is the Bootstrap Router (BSR)   ##Check this information ##
  BSR address: 192.168.100.2
  BSR Priority: 0
  Hash mask length: 10
  Up time: 00:26:00
  Next bootstrap message in 00:00:05
  Role: Candidate BSR
  State: Elected BSR
  Candidate RP: 192.168.1.137(gigaethernet0)
    Advertisement interval 60 secs.
    Next Cand_RP_advertisement in 00:00:53


MP3840#sh ip pim rp mapping
PIM Group-to-RP Mappings Table:
PIM VRF Name: Default
Total 1 RP set entry
Total 1 RP entry
This system is the Bootstrap Router (v2)    ### Check this information ###


  Group(s): 224.0.1.12/32
  RP count: 1
    RP: 192.168.1.137
      Info source: 192.168.100.2, via bootstrap, priority 192
      Up time: 00:25:19
      Expiry time: 00:02:11


MP3840#sh ip pim mroute
IP Multicast Routing Table:
PIM VRF Name: Default
Total 0 (*,*,RP) entry
Total 4 (*,G) entries
Total 1 (S,G) entry
Total 1 (S,G,rpt) entry
Total 0 FCR entry
Up timer/Expiry timer




(*, 224.0.1.12)
Up time: 00:12:29
RP: 192.168.1.137
RPF nbr: 0.0.0.0
RPF idx: None
Upstream State: JOINED
  Local interface list:
  Joined interface list:
    gigaethernet1  00:12:29/00:03:01
  Asserted interface list:


(192.168.1.7, 224.0.1.12)                   ### We can see Multicast S,G entry ###
Up time: 00:25:27
KAT time: 00:02:05
RPF nbr: 0.0.0.0
RPF idx: None
SPT bit: TRUE
Upstream State: JOINED
  Local interface list:
  Joined interface list:
    gigaethernet1  00:12:29/00:03:01
  Asserted interface list:
  Outgoing interface list:
    gigaethernet1
  Packet count 37735


(192.168.1.7, 224.0.1.12, rpt)
Up time: 00:12:29
RP: 192.168.1.137
Upstream State: NOT PRUNED
  Local interface list:
  Pruned interface list:
  Outgoing interface list:
    gigaethernet1


(*, 224.0.1.41)
Up time: 00:46:23
RP: 0.0.0.0 
RPF nbr: 0.0.0.0
RPF idx: None
Upstream State: JOINED
  Local interface list:
    gigaethernet0
  Joined interface list:
  Asserted interface list:


(*, 225.102.116.110)
Up time: 00:46:23
RP: 0.0.0.0
RPF nbr: 0.0.0.0
RPF idx: None
Upstream State: JOINED
  Local interface list:
    gigaethernet0
  Joined interface list:
  Asserted interface list:


(*, 239.255.255.250)
Up time: 00:46:23
RP: 0.0.0.0
RPF nbr: 0.0.0.0
RPF idx: None
Upstream State: JOINED
  Local interface list:
    gigaethernet0
  Joined interface list:
  Asserted interface list:




MP7508 Configuration – Multicast Receiver 


ip multicast-routing


interface gigaethernet0
 ip address 192.168.200.1 255.255.255.0
 ip pim sparse-mode
 exit


 interface gigaethernet1
 ip address 192.168.100.1 255.255.255.0
 ip pim sparse-mode
 exit
                                      
ip route 192.168.0.0 255.255.252.0 192.168.100.2


!end


### As BSR is configured in network, It will be advertised in Multicast network , no need to configure RP ###


MP7508# sh ip pim bsr-router
PIMv2 Bootstrap information
PIM VRF Name: Default
  BSR address: 192.168.100.2                 ### BSR router Information ###
  BSR Priority: 0
  Hash mask length: 10
  Up time: 00:26:57
  Expiry time: 00:01:14
  Role: Non-candidate BSR
  State: Accept Preferred


MP7508#sh ip pim rp mapping
PIM Group-to-RP Mappings Table:
PIM VRF Name: Default
Total 1 RP set entry
Total 1 RP entry


  Group(s): 224.0.1.12/32
  RP count: 1
    RP: 192.168.1.137                                         ### RP information ###
      Info source: 192.168.100.2, via bootstrap, priority 192
      Up time: 00:26:02
      Expiry time: 00:02:29


MP7508#sh ip pim mroute
IP Multicast Routing Table:
PIM VRF Name: Default
Total 0 (*,*,RP) entry
Total 1 (*,G) entry
Total 1 (S,G) entry
Total 1 (S,G,rpt) entry
Total 0 FCR entry
Up timer/Expiry timer




(*, 224.0.1.12)
Up time: 00:13:22
RP: 192.168.1.137
RPF nbr: 192.168.100.2
RPF idx: gigaethernet1
Upstream State: JOINED
  Local interface list:
    gigaethernet0
  Joined interface list:
  Asserted interface list:


(192.168.1.7, 224.0.1.12)                 ### We can see multicast S,G entry , Multicast receiver is active##
Up time: 00:13:22
KAT time: 00:02:22
RPF nbr: 192.168.100.2
RPF idx: gigaethernet1
SPT bit: TRUE
Upstream State: JOINED
  Local interface list:
  Joined interface list:
  Asserted interface list:
  Outgoing interface list:
    gigaethernet0
  Packet count 41562


(192.168.1.7, 224.0.1.12, rpt)
Up time: 00:13:22
RP: 192.168.1.137
Upstream State: NOT PRUNED
  Local interface list:
  Pruned interface list:
  Outgoing interface list:


In this testing I included all outputs; it will help you in practice to compare it.
As I already mentioned above Cisco configuration will be same. If anyone is facing any issue, Plz put comments.
Hope this example will help you in configuring PIM Sparse mode..


For likes and any queries, Plz put comments with your mail id...


Friday, May 6, 2011

Multicast Solution – Redundant BSR and RP


As we discussed many things about Multicast in previous posts, it will be better to see some real time solution which will help us for better understanding. How multicast is deployed in large enterprises.

Test Requirements – Large Enterprise is having 2 redundant multicast servers with same multicast group 239.1.1.1. As any of multicast servers went faulty due to any reason, other multicast server will work as backup to serve network and avoid downtime. Same time they want redundant BSR and RP for network. In any case Primary is not available, that time backup should take care.

Test Topology

Testing description:

Customer requires redundancy for Multicast servers and RP. Master multicast server goes down due to any reason, and then backup server sends the same multicast traffic 239.1.1.1. We need to check the convergence time how long time the client side can receive the 239.1.1.1 and same time If Primary RP goes down, Backup RP should work as primary and spoke location can access backup multicast server.

Test Process:

Multicast host 6.1.1.2 wants to join multicast group 239.1.1.1. MP 2816 router check the RP mapping and send the request to Primary RP. As source receive Join request from host, Now 4.1.1.2 (Multicast source) sends the multicast traffic 239.1.1.1 to Multicast host 6.1.1.2, It  can receive the multicast stream properly.



Now 4.1.1.2 (Multicast source) is down due to some issue.



OR
Primary RP is down due to any reason. That time



Backup RP will work as Master and backup multicast server 5.1.1.2 send the same 239.1.1.1 multicast stream manually.


And finally the convergence time less than 5 second, Now Multicast host can receive same multicast stream 239.1.1.1.This solution is majorly deployed to achieve redundancy in multicast network.  


Test Configurations:

MP1800-36:

ip mef
ip load-sharing per-destination
ip multicast-routing

controller e1 1/0
 channel-group 0 timeslots 1-31
 framing crc4
 exit
!end
vlan 1
 exit

interface fastethernet0
 ip address 2.1.1.1 255.255.255.0
 ip pim sparse-mode
 exit

interface fastethernet1
 ip address 4.1.1.1 255.255.255.0
 ip pim sparse-mode
 exit

interface serial1/0:0
 encapsulation hdlc
 ip address 1.1.1.2 255.255.255.0
 bandwidth 1984
 ip pim sparse-mode
 exit
                               
router ospf 1
 network 0.0.0.0 255.255.255.255 area 0
 exit

ip pim bsr-candidate fastethernet0 10    ### Primary BSR ###
ip pim rp-candidate fastethernet0 190   ### Primary RP ###

MP801E:

ip multicast-routing
controller e1 0/0
 channel-group 0 timeslots 1-31
 framing crc4
 exit

interface fastethernet0
 ip address 3.1.1.1 255.255.255.0
 ip pim sparse-mode
 exit

interface fastethernet1
 ip address 5.1.1.1 255.255.255.0
 ip pim sparse-mode
 exit

interface serial0/0:0
 encapsulation hdlc
 ip address 1.1.1.1 255.255.255.0
 bandwidth 1984
 ip pim sparse-mode
 exit
                                 
router ospf 1
 network 0.0.0.0 255.255.255.255 area 0
 exit

ip pim bsr-candidate fastethernet0
ip pim rp-candidate fastethernet0


MP2816:

ip mef
ip load-sharing per-destination
ip multicast-routing

vlan 1
 description default
 port 0-23 untagged
 exit

interface fastethernet0
 ip address 3.1.1.2 255.255.255.0
 ip pim sparse-mode
 exit

interface fastethernet1
 ip address 2.1.1.2 255.255.255.0
 ip pim sparse-mode
 exit
            
interface switchethernet1
 ip address 6.1.1.1 255.255.255.0
 vlan 1
 ip pim sparse-mode
 exit
                            
router ospf 1
 network 0.0.0.0 255.255.255.255 area 0
 exit

### MP2816 router is spoke router it will learn BSR information with PIM messages and RP information from BSR. ###

Test Results:

  1. As Primary Multicast server goes down and Primary Master RP is still live, That time backup multicast server will register with Primary RP. It will send same multicast traffic 239.1.1.1 in network.
  2. As Primary multicast server 239.1.1.1 and Primary RP (MP1800) goes down. That time Backup RP (MP 801E) will work as Primary RP and backup Multicast server will register to available RP and it will send same multicast stream(239.1.1.1) in network.
That means this multicast solution will overcome both challenges, which normally enterprises has to deal.


Hope you like this solution. This above configuration is tested on Maipu Routers, Cisco routers will have same configurations.

Your comments will help me to improve my posts. For any queries put comments with your mail id…


Related Posts Plugin for WordPress, Blogger...