© 2012 Cisco and/or its affiliates. All rights reserved. 1
“Tech Session” IPv6 Multicast Primer
Tim Martin
CCIE #2020
Solutions Architect
Fall 2013
© 2012 Cisco and/or its affiliates. All rights reserved. 2
• Link Operations • Routing Protocols • Distance Learning • Surveillance • Metering • Broadcast Video Services • Efficient Delivery
© 2012 Cisco and/or its affiliates. All rights reserved. 3
• Mechanism for transmitting information from a single source (root) to many receivers (leaves)
• Single copy of a datagram is sent from the source and replicated through the tree to receivers
• No restriction on physical or geographical boundary
Source D
own
the
tree
Single copy of datagram
Replication
Receivers Receivers
© 2012 Cisco and/or its affiliates. All rights reserved. 4
IPv6 Address Family
Multicast Anycast Unicast
Assigned Solicited Node
Unique Local Link Local Global Special Embedded
*IPv6 does not use broadcast addressing
© 2012 Cisco and/or its affiliates. All rights reserved. 5
© 2012 Cisco and/or its affiliates. All rights reserved. 6
• IPv6 has a specific Ethernet Protocol ID • IPv6 relies heavily on Multicast
Destination Ethernet Address!
Source Ethernet Address!
0x0800!!
IPv4 Header and Payload!
Destination Ethernet Address!
Source Ethernet Address!
0x86DD!!
IPv6 Header and Payload!
xx 33 33 xx xx xx
I bit = Local Admin, L bit = Multicast/Broadcast
0000 00IL
© 2012 Cisco and/or its affiliates. All rights reserved. 7
• IPv6 multicast address to Ethernet mapping
• Destination address based mechanism
FF02:0000:0000:0000:0000:0001:FF17:FC0F IPv6 Multicast Address
Corresponding Ethernet Address 33 33 17 FC 0F FF
Low order 32 bits
IPv6 Ethernet Frame Multicast Prefix
© 2012 Cisco and/or its affiliates. All rights reserved. 8
© 2012 Cisco and/or its affiliates. All rights reserved. 9
Node A can start using address A
B A C
• Probe neighbors to verify address uniqueness
ICMP Type 135 NS IPv6 Source UNSPEC = ::
IPv6 Dest. A Solicited Node Multicast FF02::1:FF00:A
Data FE80::A Query Anyone using A?
NS
© 2012 Cisco and/or its affiliates. All rights reserved. 10
• For each Unicast and Anycast address configured there is a corresponding solicited-node multicast
• Multicast for resolution, Unicast for reachability
• Solicited-node multicast consists of FF02::1:FF/104 {lower 24 bits from IPv6 Unicast interface ID}
FF02 0000 0000 0000 0000 0001 FF17 FC0F
2001 0DB8 1234 0001 0200 CAFF FE17 FC0F
© 2012 Cisco and/or its affiliates. All rights reserved. 11
R1#sh ipv6 int e0 Ethernet0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::200:CFF:FE3A:8B18 Global unicast address(es):
2001:DB8:0:1234::1 subnet is 2001:DB8:0:1234::/64 Joined group address(es): FF02::1 FF02::2 FF02::1:FF00:1 FF02::1:FF3A:8B18 MTU is 1500 bytes ICMP error messages limited to one every 100 milliseconds ICMP redirects are enabled ND DAD is enabled, number of DAD attempts: 1 ND reachable time is 30000 milliseconds ND advertised reachable time is 0 milliseconds ND advertised retransmit interval is 0 milliseconds ND router advertisements are sent every 200 seconds *If EUI format is used then the 1rst solicited node mcast addr is used for both the LL & GU
Solicited-Node Multicast Address*
© 2012 Cisco and/or its affiliates. All rights reserved. 12
A! B!
ICMP Type 135 NS IPv6 Source FE80::A
IPv6 Destination B Solicited Node Multicast FF02::1:FF00:B
Target Address 2001:db8:1:46::B Code 0 (need link layer) Query What is B link layer
address?
ICMP Type 136 NA IPv6 Source FE80::B
IPv6 Destination FE80::A Target Type 2
Data Link Layer address of B *Flags R = Router
S = Response to Solicitation O = Override cache information
NS NA
• Local Link only, Not Routed
• ARP replacement, Map’s L3 to L2.
• Multicast for resolution, Unicast for reachability
© 2012 Cisco and/or its affiliates. All rights reserved. 13
© 2012 Cisco and/or its affiliates. All rights reserved. 14
• Multicast is a normal IPv6 packet Destination
• An IPv6 multicast group address always starts with the prefix FF00::/8 (1111 1111)
• Multicast Listener Discovery (MLD)
• Multicast traffic is forwarded along a multicast tree which can be either a Source Tree (S, G) Shared Tree (*, G)
• IPv6 supports Protocol Independent Multicast (PIM) routing protocols only PIM creates the trees that multicast streams are forwarded on
PIM operation is the same in IPv6 as IPv4 (RFC 4601 specifies operation over IPv4 and IPv6) PIM identified by the IPv6 next header 103 (same protocol type as IPv4)
14
© 2012 Cisco and/or its affiliates. All rights reserved. 15
• General Any Source Multicast (ASM) PIM-SM, PIM-BiDir Default for generic multicast and unicast prefix-based multicast Start with FF3x::/12
• Source Specific Multicast (SSM) Used by PIM-SSM FF3x::/32 is allocated for SSM by IANA However, at present prefix and plen must be zero so FF3x::/96 is usable as SSM
• Embedded RP groups PIM-SM, PIM-BiDir Start with FF70::/12
© 2012 Cisco and/or its affiliates. All rights reserved. 16
• Prefix FF00::/8 8-bit 4-bit 4-bit 112-bit
1111 1111 0 R P T Scope Variable format
Flags
O Reserved
R = 0 R = 1
No embedded RP Embedded RP
P = 0 P = 1
Without Prefix Address based on Prefix
T = 0 T = 1
Well Known Address (IANA assigned) Temporary address (local assigned)
Scope 1 Node
2 Link
3 Subnet
4 Admin
5 Site
8 Organization
E Global
© 2012 Cisco and/or its affiliates. All rights reserved. 17
• Every Unicast prefix can build custom multicast addresses
• Last 32 bits of unicast address mapped into Group ID (112 Bits) 8 Bits 4 Bits 4 Bits 8 Bits 8 Bits 64 Bits 32 Bits
1111 1111 0 0 1 1 1110 Rsvd plen Unicast Prefix Group ID
Example plen 40 = 64 bits
Prefix 2001:db8:cafe:1::
Group ID 11d7:4cd3
FF3E:0040:2001:DB8:CAFE:1:11D7:4CD3
© 2012 Cisco and/or its affiliates. All rights reserved. 18
• Special case of unicast prefix-based address Based on Unicast based multicast format
• Prefix Len=0, Network Prefix=0
• FF3x::/32 pool is reserved for SSM addresses FF3x::/96 initial block allocated from this pool
Example Unicast Prefix 0::
Flags No RP, Unicast, Temporary
Scope 8 (Organisation)
Group ID 8000:247
ff38::8000:247
32 Bits 8 Bits 4 Bits
0011 Group ID 1111 1111 1000
4 Bits
Network Prefix=0 Plen=0
64 Bits 8 Bits
Rsvd
8 Bits
Tem
porary (T)
Unicast B
ased (P)
Range Usage
FF3x::4000:0001 - FF3x::7FFF:FFFF IANA allocation
FF3x::8000:0000 - FF3x::FFFF:FFFF Dynamic allocation
FF3x::0000:0000 - FF3x::3FFF:FFFF Invalid for IPv6 SSM
© 2012 Cisco and/or its affiliates. All rights reserved. 19
• Static mapping of RP into Multicast group
• Solves MSDP and scaling issues 8 Bits 4 Bits 4 Bits 4 Bits 4 Bits 8 Bits 64 Bits 32 Bits
1111 1111 0 1 1 1 1110 Rsvd RPid plen Unicast Prefix Group ID
Example Rsvd/RPid 0000 | 0101
Prefix 2001:db8:cafe:1::
Group ID 645
FF7E:0540:2001:DB8:CAFE:1:0000:0645
FF7E:540:2001:db8:cafe:1::645
2001:db8:cafe:1::5
© 2012 Cisco and/or its affiliates. All rights reserved. 20
Address Scope Meaning FF01::1 Node-Local This Node
FF05::2 Site-Local All Routers
FF02::1 Link-Local All Nodes
FF02::2 Link-Local All Routers
FF02::5 Link-Local OSPFv3 Routers
FF02::6 Link-Local OSPFv3 DR Routers
FF02::9 Link-Local RIPng
FF02, is a permanent address and has link scope
Link Operations, Routing Protocols, Streaming Services
© 2012 Cisco and/or its affiliates. All rights reserved. 21
© 2012 Cisco and/or its affiliates. All rights reserved. 22
Type Code Data
Checksum
• Neighbor Discovery, Router Discovery, Path MTU Discovery and (MLD) Type – (1-127) = Error Messages, (128-255) = Informational Messages Code – More Granularity within the Type Checksum – computed over the entire ICMPv6 Data - Original Header Return (8 bytes), then fill to Min MTU (1280)
58
IPv6 basic header
ICMPv6 Header
Next Header *58, not 1 (ICMP)
© 2012 Cisco and/or its affiliates. All rights reserved. 23
• MLD uses LL source addresses
• 3 msg types: Query, Report, Done
• MLD packets use “Router Alert” in HBH
• MLDv1 = (*,G) shared, MLDv2 = (S,G) source
MLD snooping
MLD IGMP Message Type
ICMPv6 Type Function
MLDv1 (RFC2710) IGMPv2 (RFC 2236) Listener Query
Listener Report
Listener Done
130
131
132
Used to find out if there are any multicast listeners
Response to a query, joins a group
Sent by node to report it has stopped listening
MLDv2 (RFC 3810) IGMPv3 (RFC 3376) Listener Query
Listener Report
130
143
Used to find out if there are any multicast listeners
Enhanced reporting, multiple groups and sources
© 2012 Cisco and/or its affiliates. All rights reserved. 24
• Hosts send MLD report to alert router they wish to join a multicast group
• Router then joins the tree to the source or RP
MLD Report (A)
ICMP Type 131
IPv6 Source fe80::209:5bff:fe08:a674
IPv6 Destination FF38::276
Hop Limit 1
Group Address ff38::276
Hop-by-Hop Header
Router Alert Yes
MLD Report
A MLD Report
B I wish to receive
ff38::276 I wish to receive
ff38::276
MLD Report (B)
ICMP Type 131
IPv6 Source fe80::250:8bff:fE55:78de
IPv6 Destination FF38::276
Hop Limit 1
Group Address ff38::276
Hop-by-Hop Header
Router Alert Yes
(S, G)
Source for multicast ff38::276
fe80::209:5bff:fe08:a674 fe80::250:8bff:fE55:78de fe80::207:85ff:fe80:692
© 2012 Cisco and/or its affiliates. All rights reserved. 25
MLD Done (A)
ICMP Type 132
IPv6 Source fe80::209:5bff:fe08:a674
IPv6 Destination FF02::2 (All routers)
Hop Limit 1
Group Address ff38::276
Hop-by-Hop Header
Router Alert Yes
MLD Done (A)
A
fe80::209:5bff:fe08:a674 MLD Report (B)
B
fe80::250:8bff:fE55:78de
I wish to leave ff38::276
I am watching ff38::276
MLD Query (C)
ICMP Type 130
IPv6 Source fe80::207:85ff:fe80:692
IPv6 Destination FF38::276
Hop Limit 1
Hop-by-Hop Header
Router Alert Yes Q
uery (C)
fe80::207:85ff:fe80:692
C MLD Report (B)
ICMP Type 131
IPv6 Source fe80::250:8bff:fE55:78de
IPv6 Destination FF38::276
Hop Limit 1
Group Address ff38::276
Hop-by-Hop Header
Router Alert Yes
© 2012 Cisco and/or its affiliates. All rights reserved. 26
MLD Report (A)
ICMP Type 143
IPv6 Source fe80::209:5bff:fe08:a674
IPv6 Destination FF02::16
Hop Limit 1
# of Records Include/exclude
Group Address FF38::4000:BA11
Hop-by-Hop Header
Router Alert Yes
MLD Report
A I wish to receive FF38:4000:BA11
(S, G)
Source for multicast FF38::4000:BA11
fe80::209:5bff:fe08:a674
© 2012 Cisco and/or its affiliates. All rights reserved. 27
• General Query FF02::1
Group list empty, who’s listening?
• Group Specific Query FF38::4000:BA11
Anyone still interested in this stream?
• Group & Source Specific Query 2001:DB8:CAFÉ::1, FF38::4000:BA11
• Filter Mode, Change Record
• Multiple routers on link Lowest address value assumes Querier role
A
Query
Source for multicast FF38::4000:BA11
© 2012 Cisco and/or its affiliates. All rights reserved. 28
© 2012 Cisco and/or its affiliates. All rights reserved. 29
• Provides the forwarding entries for packet distribution down a tree
• Consists of the Source Address (S) and the Destination Group (G) of the multicast stream
• Expressed as (S, G) for Source Trees Means an explicit source for a multicast group More Memory, Optimal Paths, Less Delay
• Expressed as (*, G) for Shared Trees Means ALL sources for a multicast group Less Memory, Sub Optimal paths, Extra Delay
29
© 2012 Cisco and/or its affiliates. All rights reserved. 30
• PIM is Join and Prune or PULL mode protocol, and transparent to the IP version It is the only multicast protocol supported for IPv6 and uses next header type 103
• PIM Sparse-Mode (PIM-SM) - RP is required Sparse-Mode for many-to-many applications (Multiple sources, single group) Uses shared tree initially but may switch to source tree
• Bi-directional PIM (PIM-BiDir) - RP is required Bi-Directional many-to-many (hosts can be sources and receivers) Like PIM-SM but uses a BiDIR shared tree for all traffic
• PIM Source-Specific Multicast (PIM-SSM) - No RP is required For one-to-many applications (Single source, single group) Always uses a (S, G) source tree – (S) is learned or known from an out of band mechanism
30
© 2012 Cisco and/or its affiliates. All rights reserved. 31
• Root is a common point Rendezvous Point Many multicast groups at RP
• Receivers join RP To learn of sources
• Sources only transmit to RP RP forward to receivers
• Forwarding represented as (*, G)
• Less state required At expense of optimal routing
• Service model is ASM
Source 2001:db8:1::20 transmitting to
group ff38::8000:247!
(*, G) entries (*, ff38::8000:247) (*, ff38::8000:212)
Receiver for ff38::8000:247
Receiver for ff38::8000:212!
Source 2001:db8:2::35 transmitting togroup ff38::8000:212!
Rendezvous Point!
© 2012 Cisco and/or its affiliates. All rights reserved. 32
• Simplest form of tree Receiver requires knowledge of source
• Traffic from source (root) to receivers (leaves)
• Shortest path taken
• Packets replicated at branch point
• Forwarding entry states represented as (S, G)
• Provides Optimal routing At the expense of more state (S, G)
• Service model is SSM or ASM that has moved to an SPT
(S, G) entry is (2001:db8::1,ff38::8000:247)
Receiver for ff38::8000:247
Source 2001:db8::1 Group ff38::800:247
Receiver for ff38::8000:247
© 2012 Cisco and/or its affiliates. All rights reserved. 33
• Traffic can travel in both directions Up and Down the tree
• Source packets do not necessarily have to travel via the RP
• Forwarding entries represented as (*, G)
• Offers improved routing optimality than uni-directional shared tree
• Service model is ASM
(*, G) entry (*, ff38::8000:247)!
Receiver B for ff38::8000:247
Receiver A for ff38::8000:247
Source 2001:db8:1::20 transmitting togroup ff38::8000:247
Rendezvous Point!
© 2012 Cisco and/or its affiliates. All rights reserved. 34
• Multicast forwarding is the opposite of Unicast forwarding Unicast is concerned about where the packet is going Multicast is concerned about where the packet came from
• Multicast uses Reverse-Path Forwarding (RPF) Checks if arriving packet is on reverse path back to source If successful, packets is forwarded, otherwise dropped
• RPF procedure for PIM uses unicast routing table to find source
IPv6 Intranet √
IPv6 Intranet/Internet
© 2012 Cisco and/or its affiliates. All rights reserved. 35
Packet has arrived on wrong Interface Discard the packet!
E0 S1
S0
S2
Multicast packet from source 2001:db8:face::1
Unicast Route Table Network Interface 2001:db8:face::/48 S1
2001:db8:beef::/48 S0
2001:db8:f00d::/48 E0
© 2012 Cisco and/or its affiliates. All rights reserved. 36
Packet arrived on correct interface! Forward via all outgoing interfaces (i.e. down the distribution tree)
E0
S1
S0
S2
Multicast Packet from Source 2001:db8:face::1
Unicast Route Table Network Interface 2001:db8:face::/48 S1
2001:db8:beef::/48 S0
2001:db8:f00d::/48 E0
© 2012 Cisco and/or its affiliates. All rights reserved. 37
© 2012 Cisco and/or its affiliates. All rights reserved. 38
• PIM-SSM and PIM-BiDir require a method to discover RPs and their related groups
• Static RP assignment Provides static group-to-RP mapping Works the same as IPv4 configuration Bidirectional PIM (Bidir) can also use static RP assignment Anycast for redundancy
• Embedded-RP Special case of unicast prefix-based addresses starting with FF70::/12 RP and associated group address embedded in IPv6 multicast address Single RP address only can be mapped to a group, no PIM BiDir support Some form of redundancy can be provided via Anycast technique
• Boot-Strap Router (BSR) Provides automated group-to-RP mapping and RP redundancy
© 2012 Cisco and/or its affiliates. All rights reserved. 39
• BSR is a non-proprietary mechanism for a router to learn RP information. Ensure routers in the PIM domain have the same RP cache as the BSR Information regarding several RPs for different groups is automatically communicated to all routers
• Elected BSR receives candidate-RP messages from all candidate-RPs BSR advertises information about all the candidate-RPs. Each router uses a common algorithm to select the same RP address for a given multicast group.
• Can be used with third-party routers (which support the BSR mechanism). • There is no configuration necessary on every router separately (except on
candidate-BSRs and candidate-RPs). • Robust mechanism permits back-up RPs to be configured.
Secondary RP for the group can take over as the RP for the group in the event of failure
© 2012 Cisco and/or its affiliates. All rights reserved. 40
• ASM Model always requires an RP PIM-SM and Bidir-PIM must have RP
• RP is single point of failure and redundancy is a basic operational requirement
BSR is today the only available RP redundancy solution for IPv6 (poor convergence, protocol complexity) Static-RP and Embedded RP do not have redundancy
• Anycast-RP solution for IPv6 can help provide redundancy
© 2012 Cisco and/or its affiliates. All rights reserved. 41
• Designate a primary and a secondary (tertiary, etc.. are possible too) RP for the anycast group.
• Configure Primary RP with longest subnet mask on the loopback, secondary has shorter mask
• Distribute loopback interfaces routes into IGP
Primary RP
DR 1 DR 2
Secondary RP
Loopback 1 2001:db8:fab0::1/48
Loopback 1 2001:db8:fab0::1/47
© 2012 Cisco and/or its affiliates. All rights reserved. 42
© 2012 Cisco and/or its affiliates. All rights reserved. 43
Personal Computer Operating Systems • Windows • Mac OS X • Linux
Appliances & Networking • Printers • Access Points • Switches • Routers
Mobile Devices • Smartphones • Tablets • Android / iOS based
AV Equipment • Speakers • Cameras • Displays • AV Receivers
Software • Applications • Network Management Software
Zeroconf - enables communications of hosts and services on a network that may not contain configuration services such as DNS and DHCP
© 2012 Cisco and/or its affiliates. All rights reserved. 44
• BYOD: Massive influx of consumer devices to be placed on Enterprise networks
• Consumer devices are typically located within a single Layer 2 domain in the home
• Users may expect to have the same type of services in the Enterprise / Campus but also across L3 boundaries
• Device types include mobile devices (iOS, Android), printers, cameras, PCs etc.
© 2012 Cisco and/or its affiliates. All rights reserved. 45
Same L2 Domain
Where’s my
Printer?
Different L2 Domain (other subnet)
I’m here! Talk to me...
© 2012 Cisco and/or its affiliates. All rights reserved. 46
Same L2 Domain
Where’s my
Printer?
Different L2 Domain (other subnet)
Nobody's talking to
me!?
Service Browsing
© 2012 Cisco and/or its affiliates. All rights reserved. 47
• Service Naming and Service Discovery
• Apple = Bonjour, Windows = Rally
• FF02::FB – mDNS – Multicast DNS • FF02::C – SSDP – Simple Service Discovery Protocol
FF02::C – UPnP – Universal Plug and Play
• FF02::1:3 – LLMNR – Link Local Multicast Name Resolution • Apple has a light weight approach, adopted quicker
• Microsoft has a more robust, heavier implementation and has moved slower
© 2012 Cisco and/or its affiliates. All rights reserved. 48
• Service Discovery Is your Phone Book. Tell me, where I can reach Mr. Printer Doesn’t necessarily mean that you can actually reach / talk to Mr. Printer
• Access Control Is like caller screening Even if a person is not listed in the phone book, you might call that person because you know the number “I know Mr. Printer is at 1.2.3.4, let’s call him even if I don’t see him in the phone book”
• Better Together use the phone book for easy lookup (Service Discovery) use the caller screening for security (ACL / SGT / SGACL ...)
© 2012 Cisco and/or its affiliates. All rights reserved. 49
VLAN 200 VLAN 100
CAPWAP
Advertisement
• Link Local Multicast seen in SAME VLAN only
• Cached at Gateway
• Instance Name, Type, Interface Name, TTL, Resource Record data etc.
enabled
Training ATV RAOP Service VLAN 100 CTO Office IPP Service VLAN 200 Instance name Other VLAN XYZ
RAOP! IPP!
© 2012 Cisco and/or its affiliates. All rights reserved. 50
VLAN 200 VLAN 100
CAPWAP
Query
• Service query seen and answered by Gateway
• Original Device not bothered
• Cache maintenance done on TTL / when device goes offline
enabled
Training ATV RAOP Service VLAN 100 CTO Office IPP Service VLAN 200 Instance name Other VLAN XYZ
IPP?
IPP!
RAOP?
RAOP!
© 2012 Cisco and/or its affiliates. All rights reserved. 51
VLAN 200 VLAN 100
CAPWAP
Cache Entry removed when • Device disappears when
TTL expired • Service is explicitly
removed by Device
enabled
Training ATV RAOP Service VLAN 100 Instance name Other Services
VLAN XYZ CTO Office IPP Service VLAN 200 Instance name Other VLAN XYZ
© 2012 Cisco and/or its affiliates. All rights reserved. 52
© 2012 Cisco and/or its affiliates. All rights reserved. 53
• Applications We Haven't Even Built Yet
• Large Privately Owned Multicast Address Space
• Built-in Scoping
• No NAT required
• Embedded RP, Anycast, Etc..
• Multicast is Foundational in IPv6
• Invest in your future - IPv6, the future is now
53
© 2012 Cisco and/or its affiliates. All rights reserved. 54