Multicast for IPv6

2,074 views

Published on

This is from an IPv6 old training materials

Published in: Technology

Multicast for IPv6

  1. 1. IPv6 Multicast ©Fred Bovy EIRL 2012 1
  2. 2. Topicsn  Multicast IPv6 Addressesn  PIM n  PIM SM n  PIM-SSM n  PIM Bidirn  Rendez-Vous point n  Static n  Anycast RP n  BSRn  MLD n  MLDv1 n  MLDv2 © Fred Bovy EIRL 2012 2
  3. 3. Multicast. RFC 4291 128 bits FF Flag Scope 0 Interface ID n  Scope – 4 bits n  1=node n  2=linkn  R n  4=admin n  Embedded Rendez-Vous n  5=site n  RFC 3956 n  8=Organizationn  P n  E=Global n  Multicast based unicast n  6, 7, 9-D not assigned. F est reserved. n  RFC 3956 et RFC 3306n  T n  Only the link-local is filtered by the routers, others must n  0 Permanent address be fitered by routers (Access-List) n  1 for temporary © Fred Bovy EIRL 2012 3
  4. 4. Multicast IPv4 and IPv6IP Service IPv4 Solution IPv6 SolutionÉtendue d’adresse 32-bits, Class D 128 bits. 112 bits GroupsRouting PIM, MBGP, DVMRP, PIM and MBGP MOSPFForwarding PIM-DM, PIM-SM, PIM- PIM-SM, PIM-SSM, PIM- SSM, PIM-Bidir BidirGroups Management IGMPv1, v2, v3 MLDv1, v2Domain Control Boundary, Border ScopeInterdomains Solutions MSDP Unic RP © Fred Bovy EIRL 2012 4
  5. 5. PIMv6 Basicsn  PIM uses the unicast routing protocol to implement the Reverse Path Forwardingn  MP-BGP can be used to build divergent routing tablesn  PIMv6 between Routers, MLD between Hosts and Routers © Fred Bovy EIRL 2012 5
  6. 6. PIMv6 Sparse Mode Basics. RFC 4601n  The Rendez-Vous point allows Source and Receivers (listeners) to meet..n  The result is a tree shared by all sources (shared tree) toward a group of listeners.n  Once the traffic start to flow on the Shared Tree, it is possible to switch on the Shortest Path Tree (SPT) © Fred Bovy EIRL 2012 6
  7. 7. The PIM Designated Routern  The 1st Hop Router, near the source is the PIMv6 Designated Routern  Elected with PIMv6 Hello Protocoln  Highest Priorityn  Highest IPv6 addressn  Forward traffic from the source to the RP (Register) © Fred Bovy EIRL 2012 7
  8. 8. The MLD Queriern  The Last Hop Router is the MLD Queriern  Lowest IPv6 Addressn  Discover the local Listeners and start to build a path to the RPn  A shared tree is then built from the RP to the listener © Fred Bovy EIRL 2012 8
  9. 9. Multicast Routing Initializationn  Routers must be IPv6 Multicast Routing enabled n  PIM and MLD are started on their interfacesn  Rendez-Vous Point address MUST be configured n  Static, Embedded or n  Dynamic with BSR © Fred Bovy EIRL 2012 9
  10. 10. PIMv6-SM: Shared Tree Initialisationn  When a listener starts to listen to a given group, it sends Unsolicited Reportsn  A (*.G) entry is created in the Last Hop Router Multicast Routing Table (MRIB) (*,G) (*,G) MLD Multicast Listener Report (*,G) Hop-by-Hop Router Alert. Hop Limit=1 © Fred Bovy EIRL 2012 10
  11. 11. PIMv6-SM: PIM Join travel toward the RPn  Because it has a (*,G) entry in its MRIB, the Last Hop Router starts to send PIM Join (*,G) to its Rendez-Vous Point Upstream Neighbor.n  The reception of a PIM Join (*,G) creates a (*,G) entry in the MRIB which triggers the sending of a PIM Join (*,G) to its Rendez-Vous Point Upstream Neighbor PIM Join (*,G)n  PIM Join reaches the RP Dest: ff02::d Router Alert (*,G) (*,G) (*,G) (*,G) MLD Multicast Listener Report (*,G) Hop-by-Hop Router Alert. Hop Limit=1 © Fred Bovy EIRL 2012 11
  12. 12. PIMv6-SM: Source starts to send trafficn  The source can start to send traffic at any timen  No Signaling requires © Fred Bovy EIRL 2012 12
  13. 13. PIMv6-SM: Source Registers with the RPn  First Hop Multicast Router intercepts the Multicast flown  Multicast traffic is encapsulated in PIM Register unicast paquets to the RP Register © Fred Bovy EIRL 2012 13
  14. 14. PIMv6-SM: Register at the RPn  The RP removes the unicast encapsulation of the PIM Registern  The RP duplicates (if multiple outgoing interfaces) and forwards the multicast toward all the Listeners © Fred Bovy EIRL 2012 14
  15. 15. PIMv6-SM: Join toward the Sourcen  When the RP receives multicast in Register paquets, it initializes a native multicast path by sending a PIM Join (S,G) toward the sourcen  It travels hop by hop to until it reaches the first hop router PIM Join (S,G) © Fred Bovy EIRL 2012 15
  16. 16. PIMv6-SM: Building the Multicast Shared Treen  When the First Hop DR receives the PIM join, it is able to forward the multicast natively to the RPn  When the RP receives two copies of the same multicast paquet, it discards the encapsulated copy © Fred Bovy EIRL 2012 16
  17. 17. PIMv6-SM: Register-Stopn  … and sends a PIMv6 Register-Stop to the First Hop DR.n  The DR knows that it does not have to encapsulate the multicast traffic in unicast anymore Register-Stop © Fred Bovy EIRL 2012 17
  18. 18. PIMv6-SM: Flowing down the Shared Treen  Traffic can now travel from the Source to all the listeners using the Shared Tree © Fred Bovy EIRL 2012 18
  19. 19. PIMv6-SM: PIM Last-Hop Switchover to the SPTn  Last Hop Router notices that it receives the traffic from an interface which does not point to the best path back to the Source (RPF). !!! © Fred Bovy EIRL 2012 19
  20. 20. PIMv6-SM: Last-Hop Switchover to the SPTn  Last Hop Router sends a PIMv6 Join (S,G) toward the Sourcen  (S,G) states are created in the MRIB by the PIMv6 Join (S,G) travelling hop by hop to the Source PIM JOIN (S,G) © Fred Bovy EIRL 2012 20
  21. 21. PIMv6-SM: Building the Shortest Path Tree (SPT) n  When the DR receives the PIM JOIN (S,G), it starts to forward paquets down the Shortest Path Tree but also down the Shared Tree. © Fred Bovy EIRL 2012 21
  22. 22. PIMv6-SM: Pruning the Shared Treen  When the Last Hop router receives two copies of the same flow, it decides to prune the Shared Treen  It sends a (S,G,rpt-bit) Prune toward the RP (S,G,rpt-bit) Prune © Fred Bovy EIRL 2012 22
  23. 23. PIMv6-SM: Shortest Path Tree Only (SPT)n  When the Shortest Path Tree has been Pruned, traffic only flows on the Shortest Path Treen  If traffic on the Shortest Path goes down below a configurable threshold, it is possible to switch back to the Shared Tree. © Fred Bovy EIRL 2012 23
  24. 24. PIM-SM Summaryn  Sources and Listeners meet at the Rendez-Vous pointn  It is possible to stay forever on the Shared Tree to minimize the states on the routers.n  The Rendez-Vous point must be carefully choosen on the networkn  It is possible to use an Anycast Address for the RP with longest match prefix to choose a primary.n  BSR is the only dynamic RP configuration methodn  Using MLDv2 and SSM, there is no more need for a RP © Fred Bovy EIRL 2012 24
  25. 25. Introduction to MLDn  ICMPv6 with IPv6 Hop-by-Hop Router Alert Optionn  Hop Limit is 1n  On each link a Querier is elected. §  Lower IPv6 address is elected.n  The Querier sends a Query on a regular basis to ask if there any receiver present. I won ! 3 I am the I am the Querier Querier 2 1 FE80::1 FE80::100 Query FE80::1 FF02::1
  26. 26. Query Interval Host A Host B Query FE80::1 FF02::1z  The interval between General Query sent by the Querier.Default: 125 seconds © Fred Bovy EIRL 2012 26
  27. 27. Robustness Host A Host BState Change R FE80::1 FF02::1n  This is the basis for the computation of many parametersn  MLD is robust to [Variable Robustness] – 1 paquet lossn  Default: 2. MLD has no problem loosing one MLD paquet © Fred Bovy EIRL 2012 27
  28. 28. Introduction to MLDv1n  All MLD paquets are sent with Link-Local address as source.n  Hop Limit is 1n  MLDv1 (RFC 2710) is IPv6 version of IGMP Version 2 (RFC 2236)o  Multicast Listener Query ü  General Query. Sent to the all-nodes Link-Local multicast address to figure out which group has members. ü  Address-Specific Query is used to identify the members of a given group. It is sent to the address of the group which is being queried.o  Multicast Listener Report ü  Response to a Queryo  Multicast Listener Done ü  Sent by a Listener which does not listen to this group any more.
  29. 29. MLDv1 General Query Host A Host BGeneral Query FE80::1 FF02::1n  The Querier sends a general Queryn  A and B starts a random timer © Fred Bovy EIRL 2012 29
  30. 30. MLDv1 Listener Report Host A Host B Listener Report FE80::A FF02::1n  Host timer A expiresn  Host A responds to the Queryn  B listens that A replied to the router Query, stops its timer and suppress its response not to send a duplicate response. © Fred Bovy EIRL 2012 30
  31. 31. MLDv1 Leave Process Host A Host B Done FF1E::1 FE80::1 FF02::2n  A is no longer interested by FF1E::1 and sends a Done message © Fred Bovy EIRL 2012 31
  32. 32. MLDv1 Leave Process Host A Host BAddress-Specific Query FE80::5 FF1E::1 n  Router sends a Last Listener Query to the Multicast address left by A © Fred Bovy EIRL 2012 32
  33. 33. MLDv1 Leave Process Host A Host B Report FE80::5 FF1E::1n  If B is still interested it sends a Listener Report and the router ignores the Done messagen  If B is not interested it does not send anything and the group is removed © Fred Bovy EIRL 2012 33
  34. 34. MLDv2 (RFC 3810)n  MLDv2 is the IPv6 translation of IGMP Version 2 (RFC 3376)n  MLDv2 is backward compatible with MLDv1n  No duplicate response suppressionn  No Done messagen  IANA allocated FF02::16 called all MLDv2-capable routersn  MLDv2 introduced source filtering n  INCLUDE Mode : if the message includes all the source we want to ear n  EXCLUDE Mode : if the message includes all the source we don’t want to ear © Fred Bovy EIRL 2012 34
  35. 35. Queries¥ General Queries Ø  Sent periodically Ø  Responses are sent in Current State Report¥ Multicast Address Specific Queries ¥ Multicast Address and Source Specific Queries. Ø  Sent after a state change. Ø  Sent in response to a State Change Report © Fred Bovy EIRL 2012 35
  36. 36. Multicast Listener ReportsMLDv2 needs two types of Reports :¥  Current State Change Report. o  Sent in response to a Query o  MODE_IS_INCLUDE o  MODE_IS_EXCLUDE¥  State Change Report o  Sent after a state change o  Sent many times (Robustness) o  Filter Mode Change Records •  CHANGE_TO_INCLUDE •  CHANGE _TO_EXCLUDE o  Source List Change Records •  ALLOW_NEW_SOURCE •  BLOCK_OLD_SOURCES © Fred Bovy EIRL 2012 36
  37. 37. MLDv2 Query Messages Type = 130 Code Checksum Maximum Response Code Reserved Multicast Address Resv S QRV QQIC Number of Sources (N) Source Address [ 1 ] Source Address [ 2 ] Source Address [ N ] © Fred Bovy EIRL 2012 37
  38. 38. MLDv2 Multicast Listener Report Messages Type = 143 Code Checksum Reserved Nr of Mcast Address Records (M) Multicast Address Record [1] Multicast Address Record [2] … Multicast Address Record [M] © Fred Bovy EIRL 2012 38
  39. 39. MLDv2 Multicast Address Record Record Type Aux data Len Number of Sources (N) Multicast Address Source Address [ 1 ] Source Address [ 2 ] Source Address [ N ] Auxiliary Data © Fred Bovy EIRL 2012 39
  40. 40. MLDv2 General Query Host A Host BGeneral Query FE80::1 FF02::1n  Sent periodically to discover which group has listener on a linkn  Includes: n  Multicast Address=0, n  Number of Source=0 © Fred Bovy EIRL 2012 40
  41. 41. MLDv2 Multicast Address Specific Query Host A Host BMulticast @ specific Query FF34::16 S:0 FE80::1 FF34::16 n  The Querier sends this Query to ask if a particular group has Listener on a particular interface. n  Includes: n  The address, by example: FF34::16 n  Number of Source:0 © Fred Bovy EIRL 2012 41
  42. 42. MLDv2 Multicast Listener QueryEthernet II, Src: ca:01:3a:67:00:08 (ca:01:3a:67:00:08), Dst: IPv6mcast_00:00:00:16 (33:33:00:00:00:16)Internet Protocol Version 6 0110 .... = Version: 6 .... 1110 0000 .... .... .... .... .... = Traffic class: 0x000000e0 .... .... .... 0000 0000 0000 0000 0000 = Flowlabel: 0x00000000 Payload length: 52 Next header: IPv6 hop-by-hop option (0x00) Hop limit: 1 Source: fe80::2038:148e:b9df:fd6d (fe80::2038:148e:b9df:fd6d) Destination: ff34::16 (ff34::16) Hop-by-Hop Option Next header: ICMPv6 (0x3a) Length: 0 (8 bytes) Router alert: MLD (4 bytes) PadN: 2 bytesInternet Control Message Protocol v6 Type: 130 (Multicast listener query) Code: 0 Checksum: 0x9549 [correct] Maximum response delay[ms]: 1000 Multicast Address: ff34::16 S Flag: OFF Robustness: 2 QQI: 125 Source Address: 2001:db8:cafe::7 (2001:db8:cafe::7) © Fred Bovy EIRL 2012 42
  43. 43. MLDv2 Address and Source Specific Query Host A Host BMulticast Listener Query FF34::16 S:1 FE80::1 FF34::16n  The Querier sends this message to discover if a multicast address with one or many source addresses has a Listener on a particular interface.n  Elle contient n  The address, by example: FF34::16 n  Number of Source, by example: 1 © Fred Bovy EIRL 2012 43
  44. 44. Reception of a Query Source is valid Link-Local ? NO Hop Limit = 1 ? DROP Router Alert set in the Hop- by-Hop Option ? YESProcess the Query.Wait before the Response. Delay max= Maximum Response Delay © Fred Bovy EIRL 2012 44
  45. 45. MLDv2 State Change Report Host A Host B State Change FE80::1 FF02::1 Reportn  The State Change Report contains a change: n  Filter Change Report n  Source List Change Report n  Both Change Reportn  Reports are sent robustness times on the link n  Default Robustness: 2 © Fred Bovy EIRL 2012 45
  46. 46. MLDv2 State Change Report ExempleInternet Protocol Version 6 0110 .... = Version: 6 .... 1110 0000 .... .... .... .... .... = Traffic class: 0x000000e0 .... .... .... 0000 0000 0000 0000 0000 = Flowlabel: 0x00000000 Payload length: 52 Next header: IPv6 hop-by-hop option (0x00) Hop limit: 1 Source: fe80::38b1:e73c:c0f0:4442 (fe80::38b1:e73c:c0f0:4442) Destination: ff02::16 (ff02::16) Hop-by-Hop Option Next header: ICMPv6 (0x3a) Length: 0 (8 bytes) Router alert: MLD (4 bytes) PadN: 2 bytesInternet Control Message Protocol v6 Type: 143 (Multicast Listener Report Message v2) Code: 0 (Should always be zero) Checksum: 0x50d2 [correct] Allow new sources: ff34::16 (ff34::16) Mode: Allow new sources Aux data len: 0 Multicast Address: ff34::16 Source Address: 2001:db8:cafe::7 (2001:db8:cafe::7) © Fred Bovy EIRL 2012 46
  47. 47. PIM-SSMn  With PIM-SSM the Listener must provide the Source address.n  Rendez-Vous point are no more needed. n  The source can be configured statically n  The source can be learned from DNS with the Record Gn  PIM-SSM is supported with MLDv2n  RFC 3306. Unicast-Prefix-based IPv6 Multicast Flags: 00PT. P=1, T=1 plen = 0 network prefix = 0 FF3x::/96 x=n’importe quel scope valide © Fred Bovy EIRL 2012 47
  48. 48. Rendez-Vous Pointn  Static ü  Must be manually configured on each multicast routern  Anycast RP ü  Static but the same address is configured many time with different mask length ü  Longest match select the preferred RPn  Embedded RP ü  RP address is embedded in the Multicast Groupn  Dynamic with PIM BSR ü  BSR is a dynamic protocol which allow the Rendez-vous point automatic configuration. © Fred Bovy EIRL 2012 48
  49. 49. Anycast RP + Longest Matchn  RP1 is preferred because routing prefers the longest match RP1: RP2: 2001:db8:1::1/64 2001:db8:1::1/63 © Fred Bovy EIRL 2012 49
  50. 50. Embedded RP – RFC 3956n  The RP address can be embedded in the Multicast Group © Fred Bovy EIRL 2012 50
  51. 51. Embedded RP – Flags FF76:0130:2001:db8:9abc::4321 Flags: 7 R: Rendez-Vous Point = 1 then P: Prefix =1 and T: Temporary Prefix = 1 © Fred Bovy EIRL 2012 51
  52. 52. Embedded RP – Prefix FF76:0130:2001:db8:9abc::4321 Plen = 30 Hex = 48 dec 2001:db8:9abc:: © Fred Bovy EIRL 2012 52
  53. 53. Embedded RP – Adresse du RP FF76:0130:2001:db8:9abc::4321 Rendez-Vous Point Address 2001:db8:9abc::1 o  RFC3956 © Fred Bovy EIRL 2012 53
  54. 54. PIM Boot Strap Routern  Many routers are Candidates BSR (C-BSR).n  The C-BSR elect a BSR by sending C-BSR message with prioritiesn  The message travels hop by hop.n  The C-BSR with the best priority becomes the BSRn  During the election it announces its presence on the network.n  This is similar to the election of the root of the spanning-tree.n  Some routers are configured as Candidates RP (C-RP).n  C-RP unicast their presence of C-RP to the C-BSR.n  The C-BSR sends its list of C-RP to all the PIM routersn  All the PIM routers receive the list of C-RP and execute the same hashing function to choose a RP for each group. © Fred Bovy EIRL 2012 54
  55. 55. Books on the Web: Safari Books Online © Fred Bovy EIRL 2012 55
  56. 56. REFERENCES © Fred Bovy EIRL 2012 56

×