Multicast Routing Babu Ram Dawadi Index a What
Multicast Routing Babu Ram Dawadi
Index a) What is a multicast routing protocol? b) What are the differences between dense mode and sparse mode protocols? c) What is PIM-SM? d) What is RPF (Reverse Path Forwarding)? e) What is MRIB? f) Explain the three phases of PIM-SM. GWE. g) Explain the roles of Designated Routers. h) Explain the roles of Rendezvous Points. i) Explain how a RPT to SPT switch is triggered. j) Learn how to see the above processes using XORP. GWE.
What is a multicast routing protocol?
Multicast Routing Protocol l Multicast communications is define as one-to-many or many-to-many communications l In multicasting, the router may forward the received packets through several of its interfaces. l In this case, router may copy the data when it is necessary, and forward it to the receivers. The router may forward received packets through several interfaces Fig. 1. Multicast Routing
Multicast Routing Protocol (cont) l Multicast routing protocol doesn’t support reliable transport layer protocol such as TCP – Source does not care about how many downstream receivers are receiving the data – It is impossible to maintain the reliable TCP connections with all of the receivers. UDP is commonly used for multicast traffic. If a packet is missed by receiver, the packet will simply lost and will not be retransmitted Fig. 2. Multicast Routing Protocol Stack
Multicast Routing Protocol l Multicast Routing Protocol consists of: – – – DVMRP (Distance Vector Multicast Routing Protocol) PIM-DM (Protocol Independent Multicast - Dense Mode) CBT (Core Based Tree) PIM-SM (Protocol Independent Multicast – Sparse Mode) and others……. l They each serve a different purpose. Routing Sparse Mode Dense Mode DVMRP PIM-DM PIM-SM Fig. 2. Types of Unicast Routing Protocol CBT
Dense Mode Multicast Routing Protocol l DVMRP and PIM-DM are the 2 examples of multicast routing protocol in this category. l As the name implies, Dense Mode is optimized for densely populated communities of receivers. l Using Source based tree (S, G) l Routers simply floods multicast traffic streams to all interfaces. (FLOOD) l If downstream routers have no receiver require this particular multicast stream, it will send “stop” message to upstream router. (PRUNE)
Dense Mode – Flood and Prune Routers simply floods multicast traffic streams (S, G) State created in to all interfaces every router in the network! Source Multicast Packets Receiver
Dense Mode – Flood and Prune Downstream routers have no receiver, so send a prune messages to prune unwanted traffic. Source Multicast Packets Prune Messages Receiver
Dense Mode – Flood and Prune Source Finally, after pruning, only downstream with receiver will receive the traffic. But the Flood and prune process will repeat every 3 minutes Multicast Packets Receiver
Sparse Mode Multicast Routing Protocol l PIM-SM or CBT l Routers must specifically request a particular multicast stream before the data is forwarded to them. l PIM SM implements forwarding trees for each multicast group – creating routing tree for a group with Rendezvous Point (RP) as a root for the tree – Rendezvous Point Tree (RPT) l Explicit join model – Receivers send Join towards the RP – Sender send Register towards the RP l Support both Source Based Tree (S, G) and Shared Based Tree (*, G)
Reverse Path Forwarding (RPF) l RPF is used to verify that a router receives a multicast packet on the correct incoming interface. l RPF algorithm – makes use of the existing unicast routing table to determine the upstream and downstream neighbors l Using unicast routing information – to create a distribution tree along the reverse path from the receivers towards the source l RPF check helps to guarantee that the distribution tree will be loop -free
Reverse Path Forwarding (RPF) eth 0 eth 2 Router 3 Receiver 2 eth 1 eth 0 eth 2 eth 1 Source FF 02: : 101/16 Router 1 eth 0 eth 2 Router 2 Receiver 1 Multicast Route Table Network Interface FF 02: : /16 eth 0
MRIB - Multicast Routing Information Base l Multicast topology table l Derived from the unicast routing table or from other routing protocols – Unicast routing table • OSPF l PIM-DM uses the MRIB to make decisions regarding RPF interfaces. – PIM know where to send (*, G) and (S, G) Join/Prune messages
Three phases of PIM-SM l 3 phases of PIM – SM to build a multicast distribution tree – RP Tree – Register Stop – Shortest Path Tree
Rendezvous Points Tree (RPT) l In shared tree – Root of the distribution tree is a router, not a host l In PIM-SM multicast routing protocol – the core router at the root of the shared tree is the rendezvous point (RP ) – The traffic from upstream and join/prune message from downstream routers “rendezvous” at this core router. l To join the Shared Tree (host want to receive multicast traffic) – Router or DR executes an RPF check on the RP address in its routing table – Produces the interface closest to the RP. – Send a join message (*, G) out on this interface. l These upstream routers – Repeat the those 3 processes until it reaches the RP. – It is building the shared tree or RPT as it goes until it reaches the RP.
Register Stop l Sources of multicast traffic don't necessarily join the group to which they are sending data – First Hop Router (FHR) or DR can receive the traffic without knowing the information on how to send the traffic to the RP through the tree. – It encapsulates the packet and send to RP as unicast packet. (Register Msg) – RP de-encapsulates the. Register message and forwards the extracted data packet to downstream members on the RPT l Encapsulation at DR and decapsulation for Register message at RP is not efficient – RP initiates a (S, G) Join toward S and the path to source is established. – DR starts sending traffic from S using both native multicast and Registerencapsulated messages – RP detected a duplicated multicast packets, it will send a “Register Stop” message to tell DR stop sending Register Message. – DR stop sending the Register message and RP now only receive the packet from native multicast packet.
Shortest Path Tree (SPT) l RP is a place for a source and receivers to meet – But if there is too many multicast group “rendezvous” there, it might become a bottleneck l Hence, establishing SPT might solve this problem and also reduce the path delay from Source to receives – SPT can be accomplish by specifying an SPT-Threshold in terms of bandwidth. – If this threshold is exceeded, the last-hop DR joins the SPT l To build the SPT – Router executes an RPF check on the source address in its routing table to find the interface closest to the source. – Issues an (S, G) Join to the RPF next router toward S.
Shortest Path Tree (SPT) (cont) l Each upstream router repeats this process, until – Arrives at the subnet of S – Router that already has (S, G) Join state. l The DR at the Source subnet then starts forwarding packets onto the source tree to the receiver l Now, the receiver's DR, it receives packets from Shared Tree (RP) and Source Tree (SPT). To stop receiving duplicating traffics, – Receiver's DR sends a PIM Prune message towards the RP router. – This message is known as (S, G, rpt) Prune, to tell RP this particular traffic coming in from the RPT are no longer needed l PIM Prune message is received by the RP router, then it stops sending this particular multicast traffic down to the receiver's DR.
Designated Routers (DR) l The DR is a router which directly-connected to receivers and sources. l Sets up multicast route entries l Sends corresponding Join/Prune and Register messages on behalf of receivers and sources. l The sender with the largest IP address assumes the role of DR RP Router A Router B 10. 207. 160. 1 10. 207. 160. 2 If multiple routers exist on a single segment, “designated router” will be elected DR 10. 207. 160. 0/24 10. 207. 160. 100 Receiver 1
Roles of Rendezvous Points l The RP is the root of particular group shared tree – RP-Tree. l The distribution center of PIM-SM – Multicast the traffic from the source to the downstream routers that have receivers – Responsible forwarding information from the source to all registered receivers.
PIM-SM – Joining the Shared Tree RP created the (*, G) state RP Source (*, G) was created only along the Receiver 1 Joins Group G, and shared tree Router (R 1) creates (*, G) state and send the (*, G) Join message to its upstream PIM neighbor, in the direction to the RP First Hop Router (FHR) R 1 Last Hop Router (LHR) IGMP or MLD, Receiver listen to Group, G Receiver 1
The multicast data from the source (including headers) is encapsulated in the register message so that the RP can forward the data while adding the source to the tree PIM-SM – Registering with the RP RP de-encapsulates each Register message and RP detects the normal forwards the extracted data multicast packets, it sends a packet to downstream Register-Stop to RP sends on PIMthe message members RPT FHR, ask FHR to stop sending “join” FHR. RP addto. FHR into the RPT register packets. Sources FHR will of send multicast a “register” traffic message canto always the RP. The send register the message traffic. They is a unicast no message need toaddressed Join to directly any to the group RP RP Source First Hop Router Once the shortest path is established, (FHR) Legend from the source to the RP, the FHR begins sending traffic to the RP as standard IP multicast packets as well as encapsulated within Register messages. RP will temporary receive some packets twice. R 1 Shared tree (S, G) Register message - - unicast Multicast Traffic Flow (S, G) Join Message Source Tree Multicast Traffic Flow Last Hop Router (LHR) Receiver 1
PIM-SM – Registering with the RP Source traffic flows natively along SPT to RP. RP Source First Hop Router (FHR) The multicast traffic flown down from RP to Receiver through Shared Tree Legend Shared tree Source Tree Multicast Traffic Flow R 1 Last Hop Router (LHR) Receiver 1
PIM-SM – Shortest Path Tree (switching) (S, G) traffic flow is no longer needed by the RP so it Prunes the flow of (S, G) traffic. Source First Hop Router (FHR) Traffic begins flowing down the new branch of the Source Tree Additional G) (S, G) Traffic flow is(S, now Statetoisthe created Legend only flowing Receiver along new of via a single branch part of the Shared tree the Source Tree is Source Tree and Receiver Source Tree traffic using SPT Multicast Trafficreceiving Flow (S, G) Prune Message (S, G) Traffic flow is now pruned off of the Shared Tree RP and is flowing to the Receiver via the Source Tree. When a downstream router The there LHR now two detects is anreceives available copies of it the multicast shorter path, can send a traffic packets PIM-SM “join” message - source node directly to the FHR. - Rendezvous Point (RP). R 1 Additional (S, G) State Last Hop Router is created along the (LHR) Shared Tree to prune off (S, G) traffic. Receiver 1
Summary: Dense mode vs Sparse mode diagram l Sparse Mode l Dense Mode
XORP Configuration
XORP Introduction l Extensible Open Router Platform l Multicast routing protocols for IPv 4 and IPv 6 l XORP is free l The XORP core developer team – International Computer Science Institute in Berkeley, California
XORP-Installation l XORP can be divided into two subsystems: – kernel-space – user-space l kernel-space – – – handles the forwarding path and provides API to the userspace MROUTING kernel option must be activated PIM kernel option must be activated in order to run PIM-SM l User-space – Default Configuration file: /usr/local/xorp/config. boot – Requirements : GNU make and Net-SNMP
XORP-Configuration interfaces { interface rl 0 { description: "upstream interface" disable: false default-system-config } Explicitly enables the two rl 0 and rl 1 physical interfaces for XORP operation. default-system-config -Tell FEA that the interface is configured using the existing interface information from the underlying system. interface rl 1 { description: "downstream interface" disable: false default-system-config } }
XORP-Configuration (cont) plumbing { mfea 6 { disable: false interface rl 0 { vif rl 0 { disable: false } } interface rl 1 { vif rl 1 { disable false } } interface register_vif { vif register_vif { disable: false } } mfea 6 (Multicast Forwarding Engine Abstraction) -must be configured if the XORP router is to be used for IPv 6 multicast routing. vif ( virtual interface) -To enable or disable vif to be used for multicast IPv 6 forwarding. In this example, we are not using it. interface register_vif -Enable it for PIM-SM operation, it is for PIMSM register messages and must enable in mfea is PIM-SM is configured.
XORP-Configuration (cont) protocols { mld { disable: false interface rl 0 { vif rl 0 { disable: false } } interface rl 1 { vif rl 1 { disable: false } } } MLD (Multicast Listener Discovery) -MLD is configured if the XORP router is to be used for multicast routing - Track multicast group membership for directly connected subnets.
XORP-Configuration (cont) pimsm 6 { disable: false interface rl 0 { vif rl 0 { disable: false } } interface rl 1 { vif rl 1 { disable: false } } interface register_vif { vif register_vif { disable: false } } pimsm 6 -If the XORP router is used for multicast routing for the PIM-SM domain, the PIM-SM should be configured. dr-priority - This command is used for setting the priority for the XORP router. If this command is not stated in the configuration, default priority value =1 will be used. -This parameter is used for the Designated Router election.
bootstrap -Mechanism for elect RP dynamically. XORP-Configuration (cont) cand-bsr -Configured the XORP routers as candidate Bootstrap Routers (BSR) bootstrap { disable: false cand-bsr { scope-zone ff 00: : /32 { cand-bsr-by-vif-name: "rl 1" bsr-priority: 128 hash-mask-len: 30 } } cand-rp { group-prefix ff 00: : /32 { cand-rp-by-vif-name: "rl 1" rp-priority: 192 rp-holdtime: 150 } } } Scope-zone -A router intended to be a Candidate. BSR it must advertise for each zone (scope-zone & non-scope-zone) bsr--priority -Router with the highest priority value will be elected as BSR. Hash-mask-len -Unknown, leave it as default cand-rp -XORP router is to be a Candidate-RP, group-prefix - Candidate-RP it must advertise for each zone rp-priority - Router with highest priority will be elected as RP
XORP-Configuration (cont) switch-to-spt-threshold { /*approximately 1 K bytes/s (10 Kbps) threshold */ disable: false interval: 100 Switch-to 0 spt-threshold bytes: 102400 -used to specify the multicast data bandwidth } threshold. -Used for Shortest Path Tree (SPT) switching } interval: 100 bytes: 102400 -if total 10240 bytes arrive within 100 seconds, switch to SPT
XORP-Configuration (cont) fib 2 mrib { disable: false } } fib 2 mrib -If the unicast routing protocol is not configured in and inject routes into MRIB, this parameter will be used. - It will get the Forwarding Information Base (FIB) from the system and pass it to the MRIB.
XORP – Case Study (Practical)
XORP – Case Study (Topology) 2001: d 30: 101: EF: : /64 Source rtadvd Router-51 em 1 : : 1: 1 2001: d 30: 1 EF: 1: : /64 em 0 : : 1: 2 Router-52 em 1 : : 2: 2 em 0 : : 2: 5 RP Router-55 2001: d 30: 1 EF: 5: : /64 em 1 : : 5: 5 em 0 : : 1: 3 Router-53 2001: d 30: 1 EF: 3: : /64 em 0 : : 3: 6 Router-56 rtadvd em 1 : : 4: 6 2001: d 30: 1 EF: 4: : /64 Receiver
Initial State – No Queries A Router-51 B To show bootstrap info only To show interfaces status D C To show RP info only To show Bootstrap and RP info Router 51 knows where is the RP located, it is at Router 2001: d 30: 1 ef: 5: 5 Router 51 knows where is the BSR located, it is at Router 2001: d 30: 1 ef: 5: 5
Initial State – No Queries (cont) A Router-52 B To show interfaces status To show bootstrap info only C D To show Bootstrap and RP info To show RP info only Router 52 knows where is the RP located, it is at Router 2001: d 30: 1 ef: 5: 5 Router 52 knows where is the BSR located, it is at Router 2001: d 30: 1 ef: 5: 5
Initial State – No Queries (cont) A Router-53 B To show interfaces status To show bootstrap info only D C To show Bootstrap and RP info To show RP info only Router 53 knows where is the RP located, it is at Router 2001: d 30: 1 ef: 5: 5 Router 53 knows where is the BSR located, it is at Router 2001: d 30: 1 ef: 5: 5
Initial State – No Queries (cont) A B RP BSR Router-55 To show interfaces status To show bootstrap info only D C To show Bootstrap and RP info To show RP info only Router 55 is configured as a BSR and RP statically, in the diagram B and C , there is an additional information about BSR and RP in Router 55.
Initial State – No Queries (cont) A Router-56 B To show interfaces status To show bootstrap info only D C To show Bootstrap and RP info To show RP info only Router 56 knows where is the RP located, it is at Router 2001: d 30: 1 ef: 5: 5 Router 56 knows where is the BSR located, it is at Router 2001: d 30: 1 ef: 5: 5
Initial State – No Queries (cont) All show pim 6 join return an empty result because there is no request from the receiver Router-51 Router-52 Router-53 Router-54 Router-55
Initial State – No Queries em 0 NOT DR Source Router-51 em 0 DR Router-52 em 1 NOT DR em 0 NOT DR Router-53 em 1 NOT DR em 1 DR em 0 NOT DR VIF Summary for the DR election on this topology RP BSR Router-55 em 1 DR Router-56 em 1 DR Receiver
Case Study : XORP Configuration & Observation Phase 1 Building RP Tree Phase 2 Register Start/Stop
Receiver wishes to receive - Request 2001: d 30: 101: EF: 20 c: 29 ff: fe 9 f: f 3 af 2001: d 30: 101: EF: : /64 Source Router-51 em 1 : : 1: 1 2001: d 30: 1 EF: 1: : /64 em 0 : : 1: 3 em 0 : : 1: 2 (*, G) Router-52 Router-53 em 1 : : 2: 2 (*, G) em 0 : : 2: 5 RP Router-55 2001: d 30: 1 EF: 5: : /64 em 1 : : 5: 5 2001: d 30: 1 EF: 3: : /64 (*, G) Now, the receiver intended to receive a traffic, Thus, receiver make a request to Router-56 em 0 : : 3: 6 Router-56 Request em 1 : : 4: 6 2001: d 30: 1 EF: 4: : /64 Receiver
Receiver wishes to receive - Request Receiver An example of the screen shot on using SSMPINGD at receiver
Building RP Tree Route-51 is directly connected to the source through em 0, and RP is connected at direction of em 1 Router-51 is connected to (S, G) through vif Router-51 Now there is a receiver request for the traffic. In show pim 6 join, it shows that Router-51 is directly connected to the source. In the upstream, there is no RP forwarder. But Router-51 knows where is the RP for this particular group. It sends the Register message to RP. The status now is the FHR had joined to the RP (Router-55)
Building RP Tree (cont) RP is connected towards at interface em 1 DR is at em 0. DR at em 0 join the multicast wildcard entry for the group Router-52 WC = Wild Card (*, G) If Router 52 found that there is no more specific match for particular source , the packet will be forwarded according to the next hop entry. Current status for Router-52 is joined to the multicast group
Building RP Tree (cont) RP is connected towards at interface em 0 DR is at em 1. DR at em 1 join the multicast wildcard entry for the group Router-53 WC = Wild Card (*, G) If Router 53 found that there is no more specific match for particular source , the packet will be forwarded according to the next hop entry. Current status for Router-52 is joined to the multicast group
Building RP Tree (cont) Router-55 is RP, it joins to the FHR through vif using Register Message Current status for Router-55 is joined to the multicast group Router-55
Building RP Tree (cont) RP is connected towards at interface em 0 DR is at em 1. DR at em 1 create the multicast wildcard entry for the group Router-56 WC = Wild Card (*, G) If Router 52 found that there is no more specific match for particular source , the packet will be forwarded according to the next hop entry. Current status for Router-52 is joined to the multicast group
Registering with the RP PIM-SM Register Message
XORP – Case Study (Practical) Phase 3 Shortest Path Tree
Shortest Path Tree (SPT) Source Router-51 X (*, G) em 0 em 1 X em 0 (*, G) Router-52 Router-53 X X em 0 RP Router-55 Router-56 em 1 (*, G) em 1 (S, G) (*, G) (S, G) em 0 (S, G) The distance becomes 3 hops Request Receiver
Shortest Path Tree (SPT) (cont) Receiver Receive 2 duplicated multicast packets Router immediately switch to SPT and send a Prune Message to RP, so now receiver only received single multicast packet using SPT
Shortest Path Tree (SPT) (cont) Router-52 now knows sources is at direction of em 0 and RP is at direction of em 1 Now the multicast group has switched to SPT. Since Router-52 is not in SPT path, a (S, G) Prune message is sent towards RP. This is known as (S, G, RPT) Prune and indicating that traffic from S for G should NOT be forwarded in this em 0 direction. Router-52
Shortest Path Tree (SPT) (cont) Router-53 now knows sources is at direction of em 0 and RP is at direction of em 1 Now the multicast group has switched to SPT. Router-53 is now in SPT path, it no longer using RPT, so (S, G, RPT) Prune is sent towards RP, indicating that traffic from S for G should NOT be forwarded in this direction Router-53 receive the traffic from the source using SPT
Shortest Path Tree (SPT) (cont) Router-55 Now the multicast group has switched to SPT. Since Router-55 is not in SPT path, and there is no other group receive traffic from the RP, the RP send a Prune Message to the FHR (router 51) to stop receiving traffic from FHR. No traffic will be forwarded in this em 0 direction.
Shortest Path Tree (SPT) (cont) Router-56 receive the traffic from the source using SPT
Thank you
- Slides: 62