Multicast
- The source IPs in multicast packets remain Unicast
- The destination IPs represent the Multicast Group
- Multicast Address range
- 224.0.0.0 - 239.255.255.255
- Class D is flat IP space; there is no concept of Subnetting
- IGMPv2 is the most common
- Every Single IP represents a multicast Group.
- The Querier is elected based on the IP, the router with the lower IP becomes the querier.
- There are some reserved sub-ranges
- 224.0.0.0/24 - Local Network control block (Routing protocols)
- Link local Scope
- TTL of 1 or 2 - TTL for NMBA
- Eg. 224.0.0.5 and 224.0.0.6 for OSPF and 224.0.0.9 for EIGRP
- 232.0.0.0/8 - SSM Block
- For multicast block whose source are already known
- 239.0.0.0/8 - Organization - Local Scope (Private IPs)
- Compared to RFC 1918
- Should be limited to use withing an AS
- A receiver already knows which L3 multicast it will accept.
- This is at the application layer
- Works its way down the TCP/IP stack
- Ultimately results in the NIC "tuned" to the L3 multicast IP address.
- Multicast L2 address must be dynamic and well known.
- Dynamic because the L3 multicast groups are highly arbitrary
- Well known because a unique L3 multicast address must have a consistent L2 address.
- To provide this, a simple mapping procedure is used to generate a well-known multicast MAC address.
- For IP multicast, there is a well-known MAC OUI that is used exclusively.
- 01-00-5E - These 24 bits identify IP multicast
- Looking into the first 8 bit 00000001, the last bit is the Individual group bit. The remaining bits 00-5E always indicate multicast.
- If the bit is 0, it identifies individual address or unicast
- If the bit is 1, it identifies group or multicast
- There are 48 bits in MAC address and 24 have been fixed for OUI and can only be 01-00-5E
- Of the remaining 24 bits, the most significant bit is fixed to 0 (01-00-5E-0 the 0 in this case).
- This leaves with 23 bits (48-24-1=23) to map the L3 IP.
- The Lower Order 23 bits of the IP are simply copied to LO 23 bits of the MAC.
- Since the 28 bits of the IP are being mapped onto 23 bits of the MAC, there is ambiguity. 28 bits = (11100000.0.0.0, the first half of the first octet is already fixed to multicast 224, so 32 - 4 = 28. )
- Eg. 230.1.2.3, 230.129.2.3 and 239.1.2.3 all map to 0100-5E01-0203
- Two major interface types per multicast source
- Upstream
- Closest to the source
- Downstream
- Where interested receivers are
- There is always a single incoming interface
- IIF or incoming interface
- There is an interface list which can contain one or more interface as the receivers join or leave the group.
- OIL
- Multicast routing protocol has three main responsibilities.
- Identify Upstream interface or IIF
- FIB is utilized
- The interface on the shortest path to the source is the upstream interface
- Can be overridden with MC specific interfaces
- Identify downstream Interface OIL
- Routing protocol will provide procedures for the receivers to signal interest
- As the request come into the router, OIL is created
- Maintain dynamic multicast trees
- Add and removes both IIF and OIL dynamically as the source and receivers come online and go offline.
- Multicast packet always arrives at router IIF and is forwarded to OIL
- Multicast tree
- (S,G) Trees are rooted at the source.
- Shortest path tree
- (*,G) Trees
- Shared tree
- RPF Check avoids loop.
- MC packets go through a reverse path forwarding check (RPF)
- As MC packet arrives, the router inspects the source IP of the packet.
- The IIF is identified
- If the packet was not received on a valid IIF, it is dropped.
- By Default, as with MC routing table, unicast FIB information is utilized.
- Information can be overridden with specific information.
- RPF check override
- There can be cases where the MC topology does not match the Unicast topology.
- RPF checks utilizing UC routing table will cause problem.
- Most vendors implementation allow for RPF overrides.
- Separate routing table for RPF
- cans be populated statically or via multi-topology IGP implementations
- MBGP can also be used
- Static RPF override
- This is the so called static multicast route
- ip mroute <Network> <Mask> <Next-hop> These are unicast IP.
Layer 2 multicast
- L2 multicast Flows
- Mostly automatic
- Basic switches treat MC as BC
- Send it out all ports except the ingress
- All host in the vlan receive the stream
- Interested receivers accept the packet, other drop them.
- Not very efficient but works.
- MC aware switches
- Inspect the MC signaling between receivers and routers
- Create proper MC state for each switchport
- Only interested receivers are forwarded the MC packets.
- IGMP
- Once a receiver knows which MC group to receive, it must inform a local, multicast enabled router.
- Receiver Acquires the information from the application layer.
- T e router is called last hop router (LHR)
- Reachable at layer2
- this is the step that separates multicast from broadcast
- Makes joining the group explicit vs implicit
- Receiver sends an IGMP message to join the group.
- A MC router on the segment listens for all IGMP messages.
- Once it receives the relevant IGMP message on an interface, the interface is added to the OIL for this group.
- IGMPv1
- Silent leaves.
- MC routing protocol was responsible for querier selection.
- Messages
- Membership report
- How receivers signal their interest in a MC group to MC routers.
- Informally called the IGMP join.
- Membership query
- How MC router confirms continued interest of receivers in a MC group.
- V1 only support one form, which is the General.
- Generated periodically to update status of all MC groups
- IGMPv2
- Added few new features to V1.
- Mechanisms for receivers to leave a certain group.
- Election of a querier.
- This is the default version on a cisco device.
- Messages
- Membership report
- How receivers signal their interest in a MC group to MC routers.
- Informally called the IGMP join.
- Leave Group
- How receivers inform the MC router when they are no longer interested in a group.
- Membership query
- How MC router confirms continued interest of receivers in a MC group.
- Queries can be of two forms:
- General
- Generated periodically to update status of all MC groups
- Group specific
- Event-driven to update status of a particular MC group
- The event is a host leaving the group.
- IGMP Membership Report
- Membership report is how receivers join MC groups.
- The MC router on the local segment is being signaled
- The MC router listens to all MC traffic
- IP Packets
- Source IP - Hot's configured IP
- Destination IP - The group's MC IP.
- IP Options - Router Alert (TTL)
- The MC router accepts because it is listening to all MC traffic
- The MC router processes this because of the Router Alert option
- IGMP Leave Group
- Membership Report is how the receivers leave MC groups
- The MC router on the local segment is being signaled
- IGMPv2 specific enhancement - not used in IGMPv1
- IP Packet
- Source IP - Host's configured IP
- Destination IP - 224.0.0.2 (special IP known as ALL-ROUTERS)
- IP Option - Router Alert
- The MC router accepts as any MC router must accepts ALL-ROUTERS multicast
- The MC router processes this because of the Router Alert option
- IGMP Membership Query
- Membership Query is how MC router update IGMP states
- Sent to all MC hosts on a segment
- One host per group must respond for the group to remain active
- IP Packet
- Source IP - Designated querier's (MC router) IP.
- Destination IP - Depends on General vs Group-specific Query
- General Query - 224.0.0.1 (Special IP knows as ALL-SYSTEMS)
- Group-Specific Query - MC IP of the group being queried
- IP Options - Router Alert
- IGMPv1/v2 Mechanism
- Receiver Joins a new group
- A receiver wants to join a group and send a membership report (Join)
- Multicast on the Group IP address
- Unsolicited to reduce join latency
- Recipient
- MC routers - Listens to all MC messages
- Other group members - Listens to the MC group
- Actions
- Group members
- No action/Cancel any pending Reports for the group
- MC routers:
- Create new state for the group if none existed
- Refresh timers on current stated if group exists.
- Periodic General Queries and reports
- Every IGMP state (for each group) on a router has a timer
- Must be refreshed periodically to keep the state active
- General queries ensure the groups(s) still has interested receivers
- Sent on 224.0.0.1 (ALL-SYSTEMS) MC IP
- Recipients:
- All IP devices (routers and hosts)
- Actions
- Hosts:
- Start random timer (<Max Resp Time) per active group
- If timer expires, send and IGMP report
- Cancel timer if another IGMP report group is heard
- MC Routers
- Querier election
- Lower IP becomes the querier
- State refresh of the group in reception of a Report.
- Receiver Leaves a new group
- A receiver on the LAN decides to leave a group and multicasts a leave group message
- Unsolicited to reduce leave latency
- Sent on 244.0.0.2 (ALL-ROUTERS)
- Recipients:
- MC Routers - ALL-ROUTERS address
- Actions:
- MC routers:
- Send Group-Specific query if other members exist for the group
- Delete group state if no other member exists.
- Group Specific query
- When a member leaves a group, the router polls the remaining group members.
- Only sent if the host to leave was not the only host on that group.
- Unlike general queries, these are event driven and for specific groups.
- Multicasted on the group IP address
- Recipients
- All members subscribed to the group
- Actions:
- Hosts:
- Starte a random timer (< Max Resp Time) per active group
- If timer expires, send an IGMP Report for the group
- Cancel timer if another IGMP Report for group is heard
- MC Routers:
- No action
- IGMPv3
- It adds one major feature
- Allows for the signaling source information along with the group
- This was not possible with V1/V2
- Enhancement allows for the use of SSM
- It has a mechanism for excluding certain sources.
- New MC address for Membership Reports
- 224.0.0.22
- Backwards compatibility with IGMPv1 and v2
- IGMPv1/v2 messages are processed by the IGMPv3 LHR
- Can be encapsulated either in IGMPv1/2 or IGMPv3 packets
- IGMPv3 also provided mechanisms to replicate IGMPv1/2 functions natively.
- Messages
- IGMPv3 Membership reports (V3 Joins)
- Membership report is how receivers join MC groups
- The MC router local segment is being signaled
- The MC router listens to all MC traffic (224.0.0.22)
- IP Packet
- Source IP - Host's configured IP
- Destination IP - 224.0.0.22
- It eliminates the "one report per group" requirement of v1/v2.
- Multiple groups can now be included in a single report.
- IP Options - Router Alert
- The MC router accepts because it is listening to 224.0.0.22
- Packet structure
- More complex than IGMPv1/v2
- Record Type
- New fields in IGMPv3
- Provides great flexibility to IGMPv3 including the ability to signal SSM and ASM groups
- Allows the report also to carry Leave message.
- Concept of filter mode is used
- Include
- MC stream is required only from source included
- Exclude
- MC stream is requested from sources excluding the record.
- Record type
- Current-state Record (steady state signaling)
- MODE_IS_INCLUDE
- MODE_IS_EXCLUDE
- Filter-Mode-Change (when the mode of a group changes)
- CHANGE_MODE_IS_INCLUDE
- CHANGE_MODE_IS_EXCLUDE
- Source-List-Change (when sources for a group change)
- ALLOW_NEW_SOURCES
- BLOC_OLD_SOURCES
- IGMPv3 Membership Query (Hello! Is anyone there? v3 style?)
- This is how MC routers update IGMP states
- Sent to all MC hosts on a segment.
- One host per group must respond for the group to remain active
- IP packet
- Source IP - Designated querier's (MC router) IP
- Destination IP - Depends on General vs Group-Specific Query
- General Query - 224.0.0.1 (same as v1/v2)
- Group-specific Query - MC IP of the group being queried (same as v1/v2)
- Group-and-source-specific Query - MC IP of the g4oup being Queried (same as v1/v2)
- IP Options - Router alert
- IGMPv3 Mechanisms
- Receiver joins a new ASM Group "*,G" (Any-Source-Multicast)
- A receiver wants to join a group and sends a membership report (join)
- Sent to 224.0.0.22
- Unsolicited to reduce join latency
- Record type (Majority cases):
- CHANGE_TO_EXCLUDE_MODE
- Default mode is include (majority cases)
- Number of sources
- 0 to indicated ASM
- Recipients
- MC router - Listens to 224.0.0.22
- Actions
- Create new state for the group if none existed
- Refresh timers for current state if group exists
- Receiver joins a new SSM Group "S,G" (Any-Source-Multicast)
- A receiver wants to join a group and sends a membership report (join)
- Sent to 224.0.0.22
- Unsolicited to reduce join latency
- Record type (Majority cases):
- ALLOW_NEW_SOURCES
- Default mode was already include
- Number of sources
- >=1 to indicated SSM
- Recipients
- MC router - Listens to 224.0.0.22
- Actions
- Create new SSM state for the group if none existed
- Refresh timers on current SSM state if group exists
- Periodic general Queries
- Every IGMP state (for each group) on the router has a timer.
- Must be refreshed periodically to keep the state active
- General queries ensure the groups(s) still has interested receivers
- Sent on 224.0.0.1 (ALL-SYSTEMS) MC IP
- Recipients
- All IP devices (routers and hosts)
- Actions
- Hosts
- Start a random timer (< Max Resp Time) per active group
- When timer expires, send a IGMP Report
- Major difference - The timer will expire (vs may expire in v1/v2)
- MC Router
- Querier election
- State refresh of the group on reception of a Report
- Tunning of Query interval to match that of the Designated Querier
- Receiver wants to leave an ASM group and sends a membership report
- Sent to 224.0.0.22
- No separate Leave Group message in v3
- Unsolicited to reduce leave latency.
- Record type
- CHANGE_TO_INCLUDE_MODE
- Mode for active ASM groups is exclude
- Number of sources
- 0 to indicate a leave
- Recipient
- MC routers - Listen to 224.0.0.22
- Actions
- Group-specific-query for the Group
- Receiver wants to leave an SSM group and sends a membership report
- Sent to 224.0.0.22
- No separate Leave Group message in v3
- Unsolicited to reduce leave latency.
- Record type
- BLOCK_OLD_SOURCES
- Mode for SSM groups is exclude
- Number of sources
- >1 to indicate an SSM leave
- Recipient
- MC routers - Listen to 224.0.0.22
- Actions
- Group-specific-query for the SSM Group
- Group Specific query
- When a member leaves an ASM group, the router polls the remaining group members.
- Unlike general queries, these are event driven and for specific groups.
- Multicasted on the group IP address
- Recipients
- All members subscribed to the group
- Actions:
- Hosts:
- Start a random timer (< Max Resp Time) for the ASM group
- When timer expires, send an IGMP Report
- Major difference - The timer will expire (vs. may expire in v1/2)
- Cancel timer if another IGMP Report for group is heard
- MC Routers:
- State refresh of the ASM group on reception of a report
- Tuning of Query interval for the ASM group to match that of the Designated Querier
- Group-and-source-specific Query
- When a member leaves an SSM group, the Router polls the remaining members
- Unlike General Queries, these are event driven and for specific groups
- Multicasted on the group IP address
- Recipients
- All members subscribed to the group
- Actions
- Hosts:
- Start a random timer (<Max Resp Time) for the SSM group
- When timer expires, send an IGMP Report
- Major difference - The timer will expire (vs. may expire in v1/2)
- MC Routers:
- State refresh of the SSM group on reception of a report
- Tuning of Query interval for the SSM group to match that of the Designated Querier
- Source Signaling
- MC Packet on an MC Enabled Interface
- MC source signaling is a much easier concept than MC receiver signaling.
- Happens entirely in the data plane.
- The router connecte4d tot he MC source is called First Hop Router on an FHR
- When this router receives a multicast packet on a multicast enabled interface, it creates and (S,G) entry.
- This router becomes the Root of the Source tree or the Shortest Path Tree (SPT)
- After this state is created, multicast routing protocol takes over.
No comments:
Post a Comment