顯示具有 Multicast 標籤的文章。 顯示所有文章
顯示具有 Multicast 標籤的文章。 顯示所有文章

2009年9月27日

IP - MLD (in IPv6) Multicast Listener Discovery (Study Note)

MLD (in IPv6) Multicast Listener Discovery

1). MLD Overview:

§ IPv6 multicast does not use the IGMP but rather the Multicast Listener Discovery (MLD) protocol.

§ MLD is derived from Version 2 of IPv4 IGMPv2.

§ MLD is used by an IPv6 router to discover the presence of multicast listeners on directly attached links and to discover which multicast addresses are of interest to those neighboring nodes.

§ MLDv1 is similar to IGMPv2, and MLDv2 is similar to IGMPv3.

§ MLDv2 adds the ability for a node to report interest in listening to packets with a particular multicast address only from specific source addresses, or from all sources except for specific source addresses, this being similar to SSM.

§ Recall that SSM is a form of multicast where a receiver must specify both the network layer address of the source and the multicast destination address to receive the multicast datagrams of interest.

§ MLD is based on RFC 2710 Version 1 Multicast Listener Discovery (MLD) for IPv6, and RFC 3810, Multicast Listener

Discovery Version 2 (MLDv2) for IPv6.

§ MLD [RFC 2710, RFC 3550, RFC 3810] specifies the protocol used by an IPv6 router to discover the presence of multicast listeners (i.e., nodes wishing to receive multicast packets) on its directly attached links and to discover which multicast addresses are of interest to those neighboring nodes.

§ MLD enables IPv6 routers to discover the presence of multicast listeners. This information is then provided to the multicast routing protocol being used by the router to ensure that multicast packets are delivered to all links where there are interested receivers.

§ MLD is an asymmetric protocol, specifying different behaviors for multicast listeners and for routers.

§ For those multicast addresses to which a router itself is listening, the router performs both parts of the protocol, the “multicast router part” and the “multicast address listener part”, including responding to its own messages.

§ If a router has more than one interface to the same link, it needs to perform the router part of the MLD over only one of those interfaces.

§ Listeners, on the contrary, must perform the listener part of MLD on all interfaces from which an application or upper layer protocol has requested reception of multicast packets.

§ Note that a multicast router may itself be a listener of one or more multicast addresses; in this case it performs both the multicast router part and the multicast address listener part of the protocol to collect the multicast listener information needed by its multicast routing protocol on the one hand and to inform itself and other neighboring multicast routers of its listening state on the other hand.

2). MLD Message Overview:

§ MLD is a subprotocol of ICMPv6, namely, MLD message types are a subset of the set of ICMPv6 messages

§ One important difference is that MLD uses ICMPv6 message types (IP 58) rather than IGMP message types (IP 2).

§ MLD messages are identified in IPv6 packets by a preceding next header value of 58. All MLD messages are sent with a link-local IPv6 source address, an IPv6 hop limit of 1, and an IPv6 Router Alert option in a Hop-by-Hop Options header.

3). There are three types of MLDv1 messages:

1. Multicast Listener Query (type decimal 130), also known as “Query” (or Join)

§ There are two subtypes of Multicast Listener Query messages (differentiated by the contents of the Multicast Address field):

§ General Query, used to learn which multicast addresses have listeners on an attached link.

§ Multicast-Address-Specific Query, used to learn if a particular multicast address has any listeners on an attached link.

2. Multicast Listener Report (type decimal 131), also known as “Report”

3. Multicast Listener Done (type decimal 132), also known as “Done” (or Leave)

4). MLDv1 Message Format:

http://docs.google.com/View?id=ddh56dhg_221hp74wwgg

§ The Code field is initialized to zero by the sender; ignored by receivers.

§ The Checksum field is the standard ICMPv6 checksum, covering the entire MLD message plus a “pseudoheader” of IPv6 header fields.

§ The Maximum Response Delay field is meaningful only in Query messages and specifies the maximum allowed delay before sending a responding report, in units of milliseconds. In all other messages, it is set to zero by the sender and ignored by receivers.

§ The Reserved field is initialized to zero by the sender; ignored by receivers.

§ In a Query message, the Multicast Address field is set to zero when sending a general query and set to a specific IPv6 multicast address when sending a multicastaddress-specific query. In a Report or Done message, the Multicast Address field holds a specific IPv6 multicast address to which the message sender is listening or is ceasing to listen, respectively.

§ The length of a received MLD message is computed by taking the IPv6 payload length value and subtracting the length of any IPv6 extension headers present between the IPv6 header and theMLDmessage.

5). IGMP Message Type:

http://docs.google.com/View?id=ddh56dhg_223fkq32xxx

6). MLDv2 Message Overview:

§ There are three types of MLDv2 query messages: general queries, multicast address specific queries, and multicast address- and

source-specific queries.

§ Nodes respond to these queries by reporting their per-interface multicast address listening state through Current State Report messages sent to a specific multicast address of all MLDv2 routers on the link listen to. On the contrary, if the listening state of a node changes, the node immediately reports these changes through a State Change Report message.

§ Source filtering is based on RFC 4604. The term “Source Filtering GMP (SFGMP)” is used to refer jointly to the IGMPv3 and MLDv2 group management protocols.

7). Multicast Address Record Types

§ There are a number of different types of Multicast Address Records that may be included in a Report message:

§ Current State Record

  • IS_IN ( x ) =1 - Type MODE_IS_INCLUDE, source addresses x
  • IS_EX ( x ) =2 - Type MODE_IS_EXCLUDE, source addresses x

§ Filter Mode Change Record

  • TO_IN ( x ) =3 - Type CHANGE_TO_INCLUDE_MODE, source addresses x
  • TO_EX ( x ) =4 - Type CHANGE_TO_EXCLUDE_MODE, source addresses

§ Source List Change Record

  • ALLOW ( x ) =5 - Type ALLOW_NEW_SOURCES, source addresses x
  • BLOCK ( x ) =6 - Type BLOCK_OLD_SOURCES, source addresses x

8). MLDv2 Message Type:

§ There are two MLD message types of concern to the MLDv2 protocol described in this document:

§ Version 2 Multicast Listener Query (Type = decimal 130)

§ Version 2 Multicast Listener Report (Type = decimal 143).

§ To assure the interoperability with nodes that implement MLDv1, an implementation of MLDv2 must also support the following two message types:

§ Version 1 Multicast Listener Report (Type = decimal 131) [RFC2710]

§ Version 1 Multicast Listener Done (Type = decimal 132) [RFC2710]

9). MLDv2 Message Format:

Version 2 Multicast Listener Query

http://docs.google.com/View?id=ddh56dhg_225c6v5w6dw

Version 2 Multicast Listener Report

http://docs.google.com/View?id=ddh56dhg_227ftpm48c6


2009年9月8日

IP - IGMP OV (Study Note) for IPv4


1.1. IGMP Overview Summary

IGMP Summary

What is IGMP

§ Internet Group Management Protocol (IGMP) is a protocol that manages host membership in IP multicast groups. IGMPInternet Group Management Protocol協定很簡單它由主機成員關係協定發展而來。

§ IGMP: Internet Group Management Protocol - Used in IP multicast

§ IGMP is an Internet Layer protocol

§ IGMP is an asymmetric protocol.

§ IGMP carries group membership information

§ IGMP: “signaling” protocol to establish, maintain, remove groups on a subnet.

§ IGMP is required for all machines that receive IP multicast

§ IGMP operates at the IP Layer

§ Technically embeds its information in IP packets

§ IP Protocol Number = 2 to identify IGMP messages

Host and Group Membership in IGMP

§ Host and router exchange of multicast group info. IGMP主機和它直接連接的路由器間工作。

§ Hosts use IGMP to dynamically register themselves in a multicast group on a particular LAN. 主機使用IGMP消息通告本地的組播路由器它想接收組播流量的組播組位址

§ Host registration is accomplished using IGMP.

§ How hosts tell routers about group membership. Hosts identify group memberships by sending IGMP messages to their local multicast router.

§ IGMP is used by host receivers to join or leave a multicast host group.

§ IGMP is used by IPv4-based receivers.

§ An IP multicast group, also known as a host group, is a set of hosts that listen for IP traffic destined for a specific multicast IP address.

§ A host group can be of any size.

§ Host group membership is dynamic, hosts can join and leave the group at any time.

§ Members of a host group can span IP routers across multiple networks. This situation requires IP multicast support on the IP routers and the ability for hosts to register their group membership with local routers.

§ A host can send traffic to an IP multicast address without belonging to the corresponding host group.

§ Each host keeps track of which mcast groups are subscribed to

  • Socket API informs IGMP process of all joins

§ Hosts send memberships reports

  • use response suppression

Multicast Router (Mrouter) in IGMP

§ Objective: keep router up-to-date with group membership of entire LAN

  • Routers need not know who all the members are, only that members exist

§ Used by mrouters to learn about Multicast Group Memberships on their directly attached subnets

  • the existence of at least one member/group

§ Routers and multilayer switches, configured for IGMP, listen to IGMP messages and periodically send out queries to discover which groups are active or inactive on a particular subnet or VLAN.

§ Routers solicit group membership from directly connected hosts

§ IGMP messages not forwarded by routers

§ Router queries periodically (every 60s.)

  • mcast query to all-hosts group: 224.0.0.1
  • maintains list of “active” groups
  • entries time-out if hosts do not respond

§ 已使用的有兩個版本IGMPv1IGMPv2

§ The latest version at press time was Version 3.

  • IGMPv3 supports receivers that explicitly signal sources from which they wish to receive traffic.

The following list indicates the current versions of IGMP:

§ IGMP version 1 (IGMPv1) RFC 1112

§ IGMP version 2 (IGMPv2) RFC 2236

§ IGMP version 3 (IGMPv3) RFC 3376

§ IGMP version 3 lite (IGMPv3 lite)

IGMP v1 – version v1

§ No way to expressly leave a multicast group.

§ It’s up to the router to timeout the group membership

§ 組播路由器通過IGMP協議為其每個埠都維護一張組播組成員表,並定期探詢表中的組播組成員,以確定該組播組是否存活(即該網段是否仍有屬於某個組播組的成員),實現所連網路組成員關係的收集與維護。

§ 當路由器接收到某個組G的資料分組後,只向那些有G的成員的埠上轉發資料分組

§ 而資料分組在路由器之間如何轉發則由路由協定決定IGMP協定並不負責。

IGMP v2 – version v2

§ Includes “leave processing” mechanism

§ IGMPv2向前相容IGMPv1協定,IGMPv1的設備可以接收處理IGMPv2的消息分組

§ IGMPv2中允許路由器對指定的組播組位址做"成員詢問",非該組的主機不必回應。如果某主機想退出,它可以主動向路由器發送"退出組播組"消息,而不必像IGMPv1中那樣只能被動退出。

  • explicit leave message - reduces leave latency
  • group-specific query – reduces bandwidth

IGMP v3 – version v3

§ Supports "source filtering," which enables a multicast receiver host to signal to a router which groups it wants to receive multicast traffic from, and from which source(s) this traffic is expected.

Please refer further for the following topics: http://docs.google.com/fileview?id=0B71FtRlv0N1DNWJhNTI1NDktNDlmYy00OWUzLTljMGEtZmM4ZDI1NTY3Yzdh&hl=en

1.2. Overview - Multicast

Multicast

Broadcast

Multicast Overview

Possible levels of participation of a host in multicasting:

Multicast Routing

Unicast vs. Multicast routing

Multicast Forwarding Algorithms

IP Multicast Addresses

1.3. IGMP Protocol Overview

1.4. IGMP Protocol Packet Overview

1.5. IGMPv1 Message and Packet Format

1.6. IGMPv2 Message and Packet Format

1.7. IGMPv3 Message and Packet Format

1.8. IGMP Operation

To join a group, hosts sends report (Membership Report) message

Routers periodically issue request (Membership Query) message

Host Operations

Multicast Router Operations

IGMP Operation

1.9. Functions in IGMP Operation

Switches Using IGMP Snooping

Multicast Forwarding and Routing

Flooding:

DoS: IGMP Blasting

Spanning tree

Group Table for IGMP