IGMP and PIM Suman Pandey EECS 702 Topics

  • Slides: 43
Download presentation
IGMP and PIM Suman Pandey EECS 702: Topics in Computer Systems Future Internet (Spring

IGMP and PIM Suman Pandey EECS 702: Topics in Computer Systems Future Internet (Spring 2008) DPNM Lab 1

Modern Applications 2

Modern Applications 2

Outline n Concepts behind protocols IGMP and PIM n n n Multicasting Addressing scheme

Outline n Concepts behind protocols IGMP and PIM n n n Multicasting Addressing scheme Group management IGMP Multicast Routing PIM 3

RFC n n n n IGMP v 1 [RC 1112] IGMP v 2 [RFC

RFC n n n n IGMP v 1 [RC 1112] IGMP v 2 [RFC 2236] IGMP v 3 [draft] PIM v 2 –SM [RFC 2362] PIM v 2 –DM [RFC 2365] Supported on Macs, PCs, UNIX 4

Multicasting n Multicast communications refers to one-to-many or many-to-many communications. n n n Application

Multicasting n Multicast communications refers to one-to-many or many-to-many communications. n n n Application level multicast Network multicast IP Multicasting refers to the implementation of multicast communication in the Internet 5

Tools Multicasting Tools n SDR, VIC and RAT for Sun, Linux and Windows multicasting.

Tools Multicasting Tools n SDR, VIC and RAT for Sun, Linux and Windows multicasting. n Quicktime will be the Macintosh application for viewing multicast sessions. Products: n n n Apple's Quick. Time Conferencing software. ICAST Express Media, video, audio and text clients and servers, beta version available on request. Merit Network's mrouted, multicast router daemon (server). Microsoft's Net. Show-- Windows video/audio client and server. Multicastcapable. Precept's IP/TV -- Windows client for receiving video/audio/slide broadcasts. Van Jacobson's popular multimedia multicasting tools for a Unix X Window server: video (VIC), and audio (VAT). 6

Multicast 7

Multicast 7

Network Multicast 8

Network Multicast 8

Multicast Semantics n IP multicast works as follows: n n n Multicast groups are

Multicast Semantics n IP multicast works as follows: n n n Multicast groups are identified by IP addresses in the range 224. 0. 0. 0 - 239. 255 (class D address) Every host (more precisely: interface) can join and leave a multicast group dynamically Every IP datagram send to a multicast group is transmitted to all members of the group by routers n no security, no “floor control” 9

IP Multicast Protocol stack n n IP Multicasting only supports UDP as higher layer

IP Multicast Protocol stack n n IP Multicasting only supports UDP as higher layer There is no multicast TCP ! 10

Multicasting n There are three essential components of the IP Multicast service: n n

Multicasting n There are three essential components of the IP Multicast service: n n n IP Multicast Addressing IP Group Management (IGMP v 1 & v 2) Multicast Routing (PIM v 1 & v 2) 11

Addressing n n How do you talk to a group of hosts (our multicast

Addressing n n How do you talk to a group of hosts (our multicast group), where each host has a different MAC address. Ensure that the other hosts, which are not part of the multicast group, don't process the information ? Break things down n Hardware/Ethernet Multicasting IP Multicasting Mapping IP Multicast to Ethernet Multicast 12

Hardware/Ethernet multicasting n n n The network card (NIC) must be multicast aware, it

Hardware/Ethernet multicasting n n n The network card (NIC) must be multicast aware, it is configured, via its drivers, to watch out for particular multicast MAC addresses apart from its own Ethernet uses the low-order bit set to ZERO (0) for unicast and ONE (1) for multicast Lower order bit of the higher order octet is set to 1. The multicast MAC address is that can be recognized by computers that are part of the multicast group The IEEE group used a special Rule to determine the various MAC addresses that will be considered for multicasting for ex: MAC address 01: 00: 5 E: 00: 05 will be used for the OSPF protocol 13

IP Multicast n n n The IP Multicast combined with the hardware multicasting, gives

IP Multicast n n n The IP Multicast combined with the hardware multicasting, gives us a multicasting model that works for our Ethernet network Once Layer 2 (Datalink) picks the multicast packet from the network (because it recognises it, as the destination MAC address is a multicast) it will strip the MAC addresses off and send the rest to the above layer, which is the Network Layer. Class D IP address is used for multicast addresses (decided by IANA) Class D is “flat”- that is, subnetting is not used, so no network and host partition. In class D address first 4 bits will always be 1110, the rest of 28 bits are group id, and there can be 2 28 multicast groups The group can be permanent such as (assigned by IANA) n n n 224. 0. 0. 0 Base Address (Reserved) [RFC 1112, JBP] , 224. 0. 0. 1 All Systems on this Subnet [RFC 1112, JBP] , 224. 0. 0. 2 All Routers on this Subnet [JBP] , 224. 0. 0. 3 Unassigned [JBP] , 224. 0. 0. 4 DVMRP Routers [RFC 1075, JBP], 224. 0. 0. 5 OSPFIGP All Routers [RFC 2328, JXM 1] Group can be transient. IPv 6 has similar address allocations 14

Mapping IP multicast to Ethernet Multicast n Rule for the mapping n n n

Mapping IP multicast to Ethernet Multicast n Rule for the mapping n n n To map an IP Multicast address to the corresponding Hardward/Ethernet multicast address, place the low-order 23 bits of the IP multicast address into the low-order 23 bits of the special Ethernet multicast address. The rest of the high-order bits are defined by the IEEE (yellow color in the example) 23 bits are mapped to the base MAC address of the computer When combined makes one multicast Mac address 15

Group Management and IGMP n We will examine issues of joining and leaving group

Group Management and IGMP n We will examine issues of joining and leaving group n. Then see how these issues are handled by IGMP 16

Advertise Group membership One Way of Locating Multicast Groups Is Through Web-Based Announcements, Such

Advertise Group membership One Way of Locating Multicast Groups Is Through Web-Based Announcements, Such as This Schedule of MBone Sessions at www. cilea. it/MBone/browse. htm Applications Such as Multikit Listen for SDP and SAP and Display the Multicast Sessions Advertised by Those Protocols 17

Local and wide area multicast 18

Local and wide area multicast 18

IGMP Join and Leave 19

IGMP Join and Leave 19

Joining and Leaving a Group cont… 20

Joining and Leaving a Group cont… 20

Increasing efficiency of Joining and Leaving a Group cont… n Allowing host to sends

Increasing efficiency of Joining and Leaving a Group cont… n Allowing host to sends message to Router to join a group without waiting for query n n If routers have no group member then it doesn’t forward any message Allowing a host to explicitly notify its local router when it leaves a group can increase efficiency n n After receiving leave request, router sends query to subnet asking if there is any other group members, if it doest get response, it ceases the packet forwarding Then router can prune itself from the multicast tree 21

IGMP v 2 Host functions Membership Report messages • when host want to join

IGMP v 2 Host functions Membership Report messages • when host want to join a group • In response to the router query Leave Group message • when host want to leave group Version 1 Membership Report messages • IGMPv 2 hosts support IGMPv 1 Membership Reports for backward compatibility. 22

IGMP v 2 Host function cont. . Join n Multicast sessions are identified in

IGMP v 2 Host function cont. . Join n Multicast sessions are identified in the routers by a (source, group) pair of addresses n n n The destination address of the Membership Report message's IP header is the group address n n source is the address of the session's originator group is the Class D group address other group members that might be on the subnet hear the report in addition to the router. message itself also contains the group address host sends one or two duplicate reports separated by a short interval 10 sec. for reinsurance. The local router periodically polls the subnet with queries n n n Leave n n Each query contains a value called the Max Response Time 10 sec If timer expires, the host responds to the query with one Membership Report for each group to which it belongs. Other group member also hear it, but the timer plays a role, If the host receives a Membership Report for a group before its delay timer expires, it does not send a Membership Report for that group. In this way, the router is informed of the presence of at least one group member on the subnet, without all members flooding the subnet with reports. The message contains the address of the group being left, but unlike Membership Report messages, the Leave Group message is addressed to the "all routers on this subnet address of 224. 0. 0. 2 because only the multicast routers on the subnet need to know that the host is leaving; other group members do not. 23

IGMP v 2 Router Function General Query Group-Specific Query • when host want to

IGMP v 2 Router Function General Query Group-Specific Query • when host want to leave group 24

IGMP Querier Election n n Only one IGMP Querier per LAN Querier with lowest

IGMP Querier Election n n Only one IGMP Querier per LAN Querier with lowest numbered IP source address (v 2) 25

IGMP v 2 Router function cont. . n n General Query n For checking

IGMP v 2 Router function cont. . n n General Query n For checking the presence of the group members n queries are sent every 60 seconds n query also contains a value called the Max Response Time. By default, the Max Response Time is 10 seconds; n sent to the "all systems on this subnet" address of 224. 0. 0. 1 and does not contain a reference to any specific group n As a result, the single message polls for reports from members of any and all groups that might be active on the subnet. n The router tracks known groups and the interfaces attached to subnets with active members n If router does not hear anything from the group in the twice the query interval plus one Max Response Time interval, then it considers there is no members to the group Group-Specific Query n When a router receives a Leave Group message, it must determine whether any remaining members of that group are on the subnet by sending this query n It contains the group address. Uses that as a destination address 26

IGMPv 1 Vs IGMPv 2 n n IGMPv 1 has no Leave Group message,

IGMPv 1 Vs IGMPv 2 n n IGMPv 1 has no Leave Group message, meaning that there is a longer period between the time the last host leaves a group and the time the router stops forwarding the group traffic. IGMPv 1 has no Group-Specific Query. This follows from the fact that there is no Leave Group message. IGMPv 1 does not specify a Max Response Time in its query messages. Instead, hosts have a fixed Max Response Time of 10 seconds. IGMPv 1 has no querier election process. Instead, it relies on the IP multicast routing protocol to elect a designated router on the subnet. Because different protocols use different election mechanisms, it is possible under IGMPv 1 to have more than one querier on a subnet. RFC 2236 describes several mechanisms that allow IGMPv 2 to adapt in earlier versions IGMPv 3 inclusion of group to be identified not only by group address, but also by source address. If certain member wants to receive traffic from specific source or exclude to receive traffic from some specific source. The member can express these wants in a Membership Report with Include or Exclude filter requests. 27

IGMP message format 28

IGMP message format 28

PIM 29

PIM 29

Multicast Routing concepts n source-based tree: one tree per source n n shortest path

Multicast Routing concepts n source-based tree: one tree per source n n shortest path trees, reverse path forwarding group-shared tree: group uses one tree n minimal spanning (Steiner) , center-based trees 30

Shortest Path Tree 31

Shortest Path Tree 31

Reverse Path Forwarding n Rule n n n forward packet from Source (R 1)

Reverse Path Forwarding n Rule n n n forward packet from Source (R 1) to all interfaces if and only if packet arrives on the interface that corresponds to the shortest path to Source no need to remember past packets R 5 need not forward packet received from R 6 32

RPF / Pruning 33

RPF / Pruning 33

Core-based Trees: An Example n n One router identified as “center” of tree. To

Core-based Trees: An Example n n One router identified as “center” of tree. To join: n n edge router sends unicast join-msg addressed to center router join-msg “processed” by intermediate routers and forwarded towards center join-msg either hits existing tree branch for this center, or arrives at center path taken by join-msg becomes new branch of tree for this router 34

Core-based Trees: An Example Suppose R 6 chosen as center: 35

Core-based Trees: An Example Suppose R 6 chosen as center: 35

Core based tree pros and cons n Pros n n routers not part of

Core based tree pros and cons n Pros n n routers not part of a group are not involved in pruning explicit join/leave makes membership changes faster router needs to store only one record per group Cons n n all multicast traffic traverses core, which is a bottleneck traffic travels on non-optimal paths 36

PIM v 2 n n n Protocol independent because other protocols are dependent on

PIM v 2 n n n Protocol independent because other protocols are dependent on Link state routing (MOSPF) and distance vector routing (DVMRP) This is the only protocol fully supported by Cisco. PIMv 1 Vs PIMv 2 n n n Version 1 of the protocol encapsulates its messages in IP packets with protocol number 2 (IGMP) and uses the multicast address 224. 0. 0. 2. PIM v 2 uses its own protocol number of 103 and the reserved multicast address 224. 0. 0. 13. PIM Choose different strategies depending on whether multicast tree is dense or sparse n In dense mode the receivers are densely situated and most f the routes need to participate in the multicast forwarding n flood and prune good for dense groups n n n only need a few prunes CBT needs explicit join per source/group In sparse mode receivers are sparsely situated n n n Flood and prune is a wastage. Too many prune message. Join and prune is better Center based tree is good for sparse groups 37

PIM v 2 Continue n PIM uses a notion of central node (rendezvous point)

PIM v 2 Continue n PIM uses a notion of central node (rendezvous point) RP for each group, which maintains multicast shortest path tree for each group n We assume in a domain of routers each router knows the unicast IP address for RP of a particular group n In PIM sparse there are two type of trees : shared tree for a group and source specific tree n Typically shared tree is built first and then source specific tree if required 38

PIM-DM n Uses five PIMv 2 message n n n Hello Join/Prune Graft-Ack Assert

PIM-DM n Uses five PIMv 2 message n n n Hello Join/Prune Graft-Ack Assert Uses flood-and-prune to build the multicast tree. Flood hello to entire PIM domain, because it does not have a build in routing protocol Join and Prune happens the same way as explained in the IGMP protocol, same mechanism of waiting and prune overriding happens. The Graft message used mainly when there is change in topology. Recalculation of the RPF interface when the unicast routing table changes Needs to elect a Designated router. IGMP needs a DR. If there are two router to reach the destination, then PIM uses Assert to decide which route to select. (This is required because there is no routing protocol) 39

PIM-SM n n Supports both shared and source-based trees. This is why popular. It

PIM-SM n n Supports both shared and source-based trees. This is why popular. It has following packets n n n n Hello Bootstrap Candidate-RP-Advertisement Join/Prune Assert Register-Stop In Shared tree model we have core router. This is called rendezvous point (RP) in PIM-SM. n n RP can be configured in routers statically Open standard bootstrap protocol can be used Cisco-proprietary Auto-RP protocol can be used to designate and advertise the RP. In shared Tree the multicast tree is rooted towards the core rather than source. n n CBT uses bidirectional tree, because source might need to deliver the packets to the RP over the branches of the tree. This can lead to a loop in topology, because “RPF” checks can not be performed if there is “upstream” and “downstream” as it is protocol independent. To achieve this PIM-SM uses register and register stop message, and encapsulate the multicast packet in these messages. If there are too many encapsulated message then it sends register-stop message to stop this process and chooses “source based” STP rather than “Shared Once” STP Depending on the situation different scheme can be chosen. 40

Some experiments n n I wanted to see whether our network supports multicast of

Some experiments n n I wanted to see whether our network supports multicast of not http: //detective. internet 2. edu Try a simple multicast application n Vic, rat, sdr http: //www. openmash. org/ Listen to some multicast stream http: //people. internet 2. ed u/~bdr/dvguide. html There is no multicast streams in our network, no IGMP no PIM Tool for testing multicast enabled network List of multicast server 41

Some experiments cont… Enabling IP multicast n Configuring routers on your network n Enable

Some experiments cont… Enabling IP multicast n Configuring routers on your network n Enable multicast for the network (globally). n Determine the interfaces on which to use multicast, and enable multicast on those interfaces. n Enable multicast routing protocols on specific devices. For example: n PIM Sparse mode for links that have limited bandwidth. n PIM Dense mode for links that have broad bandwidth. n IGMP or DVMRP 4. Create access lists specifying the range of multicast group addresses allowed to cross the router. n Associate access lists with specific interfaces on different routers. n http: //technet 2. microsoft. com/windowsserver/en/library/1 eacd 6 d c-f 51 e-474 f-9 a 49 -ba 524 a 15 d 6691033. mspx? mfr=true 42

Finally we can see something like …… 43

Finally we can see something like …… 43