<?xml version="1.0" encoding="UTF-8"?>
<rfc version="3" ipr="trust200902" category="info"
     docName="draft-yang-multicast-mac-examples-00">
  <front>
    <title abbrev="Multicast MAC Examples">Reading Ethernet Multicast Addresses in IPv4 and IPv6 Packet Traces</title>
    <!-- Before submission, replace the author details and the "yourname"
         component of both the filename and docName. -->
    <author fullname="Yang ZhiXiong" initials="YZX" surname="Yang">
      <address><email>author@example.org</email></address>
    </author>
    <date/>
    <abstract>
      <t>A packet trace may show the same Ethernet destination address for
      two packets sent to different IP multicast groups. This note gives
      worked IPv4 and IPv6 examples for readers interpreting such traces.
      For each address family, one pair of inputs differs in a bit that the
      Ethernet mapping discards. A third input differs in a bit that the
      mapping retains. The examples exercise existing mapping rules.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="scope">
      <name>Scope</name>
      <t>Consider two packets observed on the same Ethernet link. A reader
      wants to determine whether they were sent to the same IP multicast
      group. The destination MAC address provides a quick consistency
      check. To identify the group, the reader also needs the destination
      address in the IP header.</t>
      <t>The examples below are calculated header values for ordinary
      multicast Ethernet delivery. <xref target="RFC6085"/> describes
      circumstances in which an IPv6 multicast packet can instead be sent
      to a unicast link-layer address. Such frames fall outside the worked
      examples.</t>
    </section>
    <section anchor="ipv4">
      <name>IPv4 Example: A Bit Discarded Within an Octet</name>
      <t>Section 6.4 of <xref target="RFC1112"/> specifies the Ethernet
      mapping. Begin with 01:00:5e. Clear the high bit of the second IPv4
      octet, then append that octet and the final two IPv4 octets. In the
      first row below, decimal 215 is hexadecimal d7. Clearing its high
      bit gives hexadecimal 57.</t>
      <table anchor="v4-pairs">
        <name>IPv4 Inputs and Expected Ethernet Destinations</name>
        <thead><tr><th>IPv4 destination</th><th>Ethernet destination</th></tr></thead>
        <tbody>
          <tr><td>224.215.168.211</td><td>01:00:5e:57:a8:d3</td></tr>
          <tr><td>224.87.168.211</td><td>01:00:5e:57:a8:d3</td></tr>
          <tr><td>224.87.168.210</td><td>01:00:5e:57:a8:d2</td></tr>
        </tbody>
      </table>
      <t>Between the first two rows, only the high bit of the second IP
      octet changes. Both packets have the same Ethernet destination.
      Between the second and third rows, the low bit of the last octet
      changes. That bit appears in both the IP and Ethernet destinations.</t>
    </section>
    <section anchor="ipv6">
      <name>IPv6 Example: The Last Four Octets</name>
      <t>Section 7 of <xref target="RFC2464"/> specifies the Ethernet
      multicast mapping for IPv6. Begin with 33:33 and append the last
      four octets of the expanded IPv6 destination. For ff12::1234 those
      four octets are 00:00:12:34.</t>
      <table anchor="v6-pairs">
        <name>IPv6 Inputs and Expected Ethernet Destinations</name>
        <thead><tr><th>IPv6 destination</th><th>Ethernet destination</th></tr></thead>
        <tbody>
          <tr><td>ff12::1234</td><td>33:33:00:00:12:34</td></tr>
          <tr><td>ff12::1:0:1234</td><td>33:33:00:00:12:34</td></tr>
          <tr><td>ff12::1:0:1235</td><td>33:33:00:00:12:35</td></tr>
        </tbody>
      </table>
      <t>To compare the first two rows, expand the addresses before
      counting octets. The extra 1 in ff12::1:0:1234 falls in the third
      16-bit group from the right, outside the 32 bits used for the MAC
      address. In the third row, changing 1234 to 1235 changes the last
      bit inside those 32 bits, so the Ethernet destination changes too.</t>
    </section>
    <section anchor="reading">
      <name>Interpreting a Trace</name>
      <t>Record the Ethernet destination and the IP destination from the
      same frame. Compute the expected Ethernet destination from the IP
      address. If two frames have the same expected value, compare their
      full IP destinations before counting them as traffic for one group.
      Grouping a trace by destination MAC alone would merge the first two
      IPv4 rows in <xref target="v4-pairs"/> into a single count.</t>
    </section>
    <section anchor="security">
      <name>Security Considerations</name>
      <t>A filter that permits traffic for a particular destination MAC
      address can also admit traffic for other multicast IP addresses
      with the same mapping. A policy that distinguishes destination
      groups therefore needs to inspect the IP destination as well.</t>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>This document requests no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>Informative References</name>
      <reference anchor="RFC1112" target="https://www.rfc-editor.org/info/rfc1112">
        <front>
          <title>Host Extensions for IP Multicasting</title>
          <author initials="S." surname="Deering"/>
          <date year="1989" month="August"/>
        </front>
        <seriesInfo name="RFC" value="1112"/>
        <seriesInfo name="DOI" value="10.17487/RFC1112"/>
      </reference>
      <reference anchor="RFC2464" target="https://www.rfc-editor.org/info/rfc2464">
        <front>
          <title>Transmission of IPv6 Packets over Ethernet Networks</title>
          <author initials="M." surname="Crawford"/>
          <date year="1998" month="December"/>
        </front>
        <seriesInfo name="RFC" value="2464"/>
        <seriesInfo name="DOI" value="10.17487/RFC2464"/>
      </reference>
      <reference anchor="RFC6085" target="https://www.rfc-editor.org/info/rfc6085">
        <front>
          <title>Address Mapping of IPv6 Multicast Packets on Ethernet</title>
          <author initials="S." surname="Gundavelli"/>
          <author initials="M." surname="Townsley"/>
          <author initials="O." surname="Troan"/>
          <author initials="W." surname="Dec"/>
          <date year="2011" month="January"/>
        </front>
        <seriesInfo name="RFC" value="6085"/>
        <seriesInfo name="DOI" value="10.17487/RFC6085"/>
      </reference>
    </references>
  </back>
</rfc>
