Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CMPT 471 Networking II IGMP (IPv4) and MLD (IPv6) © Janice Regan, 2006-2013.

Similar presentations


Presentation on theme: "1 CMPT 471 Networking II IGMP (IPv4) and MLD (IPv6) © Janice Regan, 2006-2013."— Presentation transcript:

1 1 CMPT 471 Networking II IGMP (IPv4) and MLD (IPv6) © Janice Regan, 2006-2013

2 2 Group Management Protocols  Internet Group Management Protocol (IGMP)  RFC 2236 IGMPv2, RFC 3376 IGMPv3  Multicast Listener Discover Protocol (MLD)  Part of ICMPv6  RFC 2710 MLDv1, RFC 3810 MLDv2  Governs exchange of multicast group information between hosts and multicast routers, and between multicast routers  IGMPv3 and MLDv2 support SFM (source filtered multicast)

3 © Janice Regan, 2006-2013 3 IGMPv2 (MLDv1) and IGMPv3 (MLDv2)  Three types of Messages transmitted in IP datagrams  Membership Query: sent by router to monitor group membership  Membership Report: sent by hosts to join a group, leave a group Update source filtering information for the host (ICMPv3 and MLDv2 only) Reply to a membership query and indicate desire to remain a member of the group  Leave group message (ICMPv2 only)

4 Encapsulation IGMP  IGMP messages are sent in the IP layer  ttl for IGMP messages is 1 © Janice Regan, 2006-2013 4 IP HeaderIGMP message

5 Encapsulation MLD  Hop by hop options header contains Router Alert Option to allow routers to receive messages sent to multicast addresses to which the router is not yet listening  MLD messages are sent with a hop count of 1 using link local addresses © Janice Regan, 2006-2013 5 IP Header Next Header = 0 MLD message Hop by Hop Header Next header = 58

6 © Janice Regan, 2006-2013 6 IGMP and MLD Group membership  A host can send traffic to any multicast group, group membership is not required.  A host must be a member of a multicast group to receive multicast messages from that group  A host leaves a group by sending and IGMP or MLD message indicating it is leaving the group  A host joins group by sending an IGMP or MLD message indicating it is joining the group  Details of joining and leaving groups (including details of message types) are different for IGMPv2, IGMPv3, MLDv1 and MLDv2

7 © Janice Regan, 2006-2013 7 IGMP and MLD Operation  Routers periodically issue query message  Sent to all-hosts multicast address ( 224.0.0.1 or FF02::1), includes records for each multicast group that has been joined by at least one host in the net  Hosts that want to stay in groups must read all-hosts query messages and respond with one or more reports  To prevent overload caused by many reports from many members on a LAN each host will be assigned a random delay before it will transmit its response.  Details of how the reports are generated and sent are dependent on the version of IGMP or MLD being used

8 © Janice Regan, 2006-2013 8 IGMPv2 and MLDv1 Operation: (1) Each host receiving the query chooses the multicast groups to which belongs. For each group it is a member of the host builds a response message and 1. Sets a timer, (random time between 0 and maximum response time, the maximum time before a response can be sent ) 2. Watches for response messages to the same multicast group sent by other hosts on the network.

9 © Janice Regan, 2006-2013 9 IGMPv2 and MLDv1 Operation:(2) Each host receiving the query chooses the multicast groups to which belongs. For each group it is a member of the host builds a response message and 3. Drops its own response message and stops its timer, if it sees a response message for the same multicast group from another host 4. Transmits the response when the timer expires, and no other response messages have been seen

10 IGMPv2 and MLDv1 messages  Begin by considering report messages MLDv1 done messages and ICMPv2 leave group messages  Report messages are used to  Maintain membership in a group  Join a group  MLDv1 done messages and ICMPv2 leave messages are used to  Leave a multicast group © Janice Regan, 2006-2013 10

11 IGMPv2 report messages © Janice Regan, 2006-2013 11 Diagram from RFC 2236 Reply to query:type 0x16 Membership Report sent to group address in response to a membership query, join message: type 0x16 Membership Report, sent to group address, unsolicited, sent when host wants to join a group Leave message: type 0x17 sent to the all routers address (224.0.0.20 when host wishes to leave the group, not always sent, must be sent by the last host to respond to a membership solicitation for the group. Group address field hold the multicast address of the group

12 MLDv1 Multicast listener report © Janice Regan, 2006-2013 12 Type (131 ) Message Checksum Multicast address of group Type 131: response to query send to the multicast address in response to query Type 131: join message: send to the multicast address, unsolicited Type 132: done (leave) send to all routers multicast address (FF02::2), may not be sent if node did not reply to the last periodic query Diagram from RFC 2710

13 IGMPv2 and MLD1 queries  Sent by multicast router  General query (to 224.0.0.1, or :: )  Which groups have members on attached network  Group address field and number of sources are 0  Group-specific query (to group address)  Does group have members on an attached network  Group address field contains IP address of the multicast group being queried  Send to verify if there are any remaining hosts on the network after the router receives leave msg © Janice Regan, 2006-2013 13

14 IGMPv2 query messages © Janice Regan, 2006-2013 14 Diagram from RFC 2236 Checksum for all IGMPv2 messages is the ones complement of the ones complement sum of all 16 bit words in the IGMPv2 message Membership query:type 0x11. General query, used to learn which groups have members on the network attached to the router. Group address is 0.0.0.0. message sent to all hosts (224.0.0.1) Group specific query: used to learn if a particular group still has members on the network attached to the router. Group address is the group being queried Sent to group being queried.

15 MLDv1 query © Janice Regan, 2006-2013 15 Type (130 ) Multicast address of group Analogous to ICMPv3 query IPv6 all hosts address is FF02::1 : Diagram from RFC 2710

16 © Janice Regan, 2006-2013 16 Joining a group  To join group, host sends either  IGMP membership report message  or MLD multicast listener report  The multicast address of the multicast group being joined is in both  the multicast address field of the IGMPv2 or MLDv1 message  the Destination Address field in the encapsulating IP header.  Router will receive report message and add the group if there are no current members of the group, or add the host to the group if there are current members.

17 © Janice Regan, 2006-2013 17 Leaving a group  An IGMPv2 host leave a multicast group by sending leave group message to all-routers static multicast address (224.0.0.2). The multicast address is the leave message is the multicast address of the group being lef t.  An MLDv1 host leaves a multicast group by sending a multicast listener done message to the all routers multicast address (FF02::2). The multicast address in the done message is the multicast address of the group being left

18 © Janice Regan, 2006-2013 18 Leaving a group  If the process that joined the multicast group is terminated a leave message is also sent  When the multicast router for the network receives a leave message it determines if there are any remaining group members using group-specific query message (more about query messages later)  If there are any other hosts who are member of the multicast group the host just left they will send reports to the router and the router will know to keep the multicast group alive.

19 © Janice Regan, 2006-2013 19 IGMPv2, MLDv1: Keeping Lists Valid  Router does not need to know every host in a group  Needs to know at least one group member still active  Each host in group sets timer with random delay  Host that hears another claim membership cancels own report  If timer expires, host sends report  Only one member of each group reports to router

20 © Janice Regan, 2006-2013 20 State machine for an entry in host's multicast route table Comer 2000: fig 17.4

21 © Janice Regan, 2006-2013 21 IGMP states: 1  Consider a router with at least one host on a connected network that is a member of a particular multicast group  Every 125 seconds the router will generate a query and send it to the multicast group..  When the host receives the query it moves from member state to delaying member state, it builds its report and sets its random delay timer (random in a specified interval which defaults to 10 sec)  If it hears another report before it is due to send its own it will drop the report without sending an moves back to idle member state.  When its timer expires it sends its report and moves back to idle member state.

22 © Janice Regan, 2006-2013 22 IGMP states: 2  Consider a router with a connected network. No host on that connected network is a member of the multicast group. Then consider that one host on the connected network wishes to join the multicast group  The host will be in the nonmember state.  The host builds a membership report packet.  The host starts a timer and sends the membership report packet  The host moves into the delaying member state.  When the timer expires the host resends the member report packet and moves into the member state.  Sending the membership report twice (each time in a best effort UDP packet) provides a measure of security that the membership report will reach the server

23 23 IGMPv3 and MLDv2 Operation  Each host receiving the query chooses the multicast groups it belongs to  Each host builds a response message, containing information (one record per multicast group) for all multicast groups it belongs to  Each host sets a timer for a random time (0-maximum response delay), and transmits the report when that timer expires (sent to 224.0.0.22 or FF02::16)  Responses to multiple queries may in some cases be sent as a single response. A responses to a previous query will be dropped if a response to a newer query for the same group is being scheduled © Janice Regan, 2006-2013

24 IGMPv3 and MLDv2 messages  Begin by considering report messages  Report messages are used to  Maintain membership in a group  Join a group  Leave a group  To filter group membership accepting or rejecting traffic from certain members in the group © Janice Regan, 2006-2013 24

25 © Janice Regan, 2006-2013 25 IGMPv3 Membership Report Stallings 2003:

26 © Janice Regan, 2006-2013 26 IGMPv3 Message types  Type Number Message Name 0x11 Membership Query 0x22 V 3 Membership Report 0x16 V2 Membership Report 0x17 V2 Leave Group  Unrecognized message types are silently ignored

27 MLDv2 Multicast listener report © Janice Regan, 2006-2013 27 Type (143 )Reserved Checksum Number of multicast address records Multicast address record of group Can be many such records one for each group...... Sent to all MLDv2 capable routers (multicast address FF01::16

28 © Janice Regan, 2006-2013 28 membership report fields  Reserved fields are filled with zeros  The IGMPv3 checksum the ones complement of the ones complement sum of all 16 bit words in the IP payload (the membership message)  The MLDv2 checksum also includes a pseudo- header in the calculation.  Group records each contain information about one multicast group. This information included the list of hosts to include or exclude

29 © Janice Regan, 2006-2013 29 IGMP or MLD Group Record Stallings 2003:

30 © Janice Regan, 2006-2013 30 Other group record fields  Auxiliary data length should be 0, there is no auxiliary data defined for IGMP3 or MLDv2, this field is available for future expansion of the protocols

31 © Janice Regan, 2006-2013 31 IGMPv3 and MLDv2 group records  The number of group records included in the membership report.  When joining a single group there will be one group record  When joining multiple groups there will be one group record for each group  When responding to a query one response will be built. It will include one group record for each multicast groups.  Each group record will include a multicast address, a record type (see next slide) and may include a list of hosts to include / exclude

32 © Janice Regan, 2006-2013 32 Record type  Value Name 1 MODE_IS_INCLUDE 2 MODE_IS_EXCLUDE indicates the interface filter mode for the specified multicast addresses. 3 CHANGE_TO_INCLUDE_MODE. 4 CHANGE_TO_EXCLUDE_MODE indicates that the interface has changed filter mode 5 ALLOW_NEW_SOURCES 6 BLOCK_OLD_SOURCES this Group Record contains a list of the sources that the system wishes to add or no longer wishes to hear from,

33 33 IGMPv3 and MLDv2 Operation  A member host will send a report packet containing updates to its filtering information for a group as soon as the filtering information changes. This report package may modify the list of included or excluded hosts, or change from include mode to/from exclude mode.  This report can be a MLDv2 multicast listener report or IGMPv3 report containing “state change” records  “filter mode change” records that allow changes from include mode to exclude mode  “source list change” records that add new hosts to or remove existing hosts from the list of excluded or included hosts © Janice Regan, 2006-2013

34 34 Joining a group: IGMPv3, MLDv2  A member host will send a report packet containing updates to its filtering information for a group as soon as the filtering information changes.  To join a group, a host sends a report message  Message is sent to multicast group address  Message contains multicast group address of group to join  The host filtering information indicates EXCLUDE mode, and specifies no host list.

35 © Janice Regan, 2006-2013 35 Leaving a group: IGMPv3, MLDv2  A member host will send a report packet containing updates to its filtering information for a group as soon as the filtering information changes.  To leave a group, a host sends a report message  Message is sent to multicast group address  Message contains multicast group address of group to join  The host filtering information indicates INCLUDE mode, and specifies no host list.

36 © Janice Regan, 2006-2013 36 ICMPv3, MLDv2: Keeping Lists Valid  Routers periodically issue general query message in a datagram with all-systems multicast address (224.0.0.1 or FF02::1)  Hosts that wish to remain in groups must read datagrams with this all-hosts address  Every host on the network that belongs to a least one of the queried multicast groups responds by preparing a report message The report message contains one group record for every multicast group the host is a member of  The host sends the prepared report (after waiting a randomized time)

37 © Janice Regan, 2006-2013 37 Membership Query: IGMPv3 + MLDv2 Stallings 2003:

38 © Janice Regan, 2006-2013 38 Membership Query Fields (1)  Max Response Time  Max time before sending report in units of 1/10 second. (>=128 indicates floating point, see RFC)  The IGMPv3 checksum the ones complement of the ones complement sum of all 16 bit words in the IP payload (the membership message)  The MLDv2 checksum also includes a pseudo- header in the calculation.  S Flag  1 indicates that receiving routers should suppress normal timer updates done on hearing query

39 © Janice Regan, 2006-2013 39 Membership Query Fields (2)  QRV (querier's robustness variable)  Routers adopt value from most recently received query  A default or statically configured value used if most recently received QRV is 0  RV dictates number of retransmissions to assure report not missed (maximum 7)  QQIC (querier's querier interval code)  Timer for sending multiple queries  Routers not current querier adopt most recently received QI  Unless QI was zero, when default QI value used  If you want to know what these are for and understand the details of how these work see RFC’s

40 © Janice Regan, 2006-2013 40 IGMPv3, MLDv2 Membership Queries  Sent by multicast router  General query (to 224.0.0.1, or :: )  Which groups have members on attached network  Group address field and number of sources are 0  Group-specific query (to group address)  Does group have members on an attached network  Group address field contains IP address of the multicast group being queried, number of sources is 0  Group-and-source specific query (to group address)  Do attached devices want packets sent to specified multicast address (response to leave by BLOCKing all sources)  From any of specified list of sources


Download ppt "1 CMPT 471 Networking II IGMP (IPv4) and MLD (IPv6) © Janice Regan, 2006-2013."

Similar presentations


Ads by Google