Skip to main content

A Caution On The Canonical Ordering Of Link-Layer Addresses
draft-narten-canonical-ordering-00

The information below is for an old version of the document that is already published as an RFC.
Document Type
This is an older version of an Internet-Draft that was ultimately published as RFC 2469.
Authors Dr. Thomas Narten , Charles Burton
Last updated 2013-03-02 (Latest revision 1997-11-05)
RFC stream Legacy stream
Intended RFC status Informational
Formats
Stream Legacy state (None)
Consensus boilerplate Unknown
RFC Editor Note (None)
IESG IESG state Became RFC 2469 (Informational)
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-narten-canonical-ordering-00
INTERNET-DRAFT                                             Thomas Narten
                                                                     IBM
<draft-narten-canonical-ordering-00.txt>                  Charles Burton
                                                                     IBM
                                                        November 5, 1997

        A Caution On The Canonical Ordering Of Link-Layer Addresses

                 <draft-narten-canonical-ordering-00.txt>

Status of this Memo

   This document is an Internet-Draft. Internet-Drafts are working
   documents of the Internet Engineering Task Force (IETF), its areas,
   and its working groups. Note that other groups may also distribute
   working documents as Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time. It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   To learn the current status of any Internet-Draft, please check the
   "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
   Directories on ds.internic.net (US East Coast), nic.nordu.net
   (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific
   Rim).

   Distribution of this memo is unlimited.

   This Internet Draft expires May 5, 1998.

Abstract

   Protocols such as ARP and Neighbor Discovery have data fields that
   contain link-layer addresses. In order to interoperate properly, a
   sender setting such a field must insure that the receiver extracts
   those bits and interprets them correctly.  In most cases, such fields
   must be in "canonical form." Unfortunately, not all LAN adaptors are
   consistent in their use of canonical form, and implementations may
   need to explicitly bit swap individual bytes in order to obtain the
   correct format. This document provides information to implementors to
   help them avoid the pitfall of using non-canonical forms when
   canonical forms are required.

draft-narten-canonical-ordering-00.txt                          [Page 1]
INTERNET-DRAFT                                           October 6, 1997

   Contents

   Status of this Memo..........................................    1

   1.  Introduction.............................................    2

   2.  Canonical Form...........................................    2

   3.  Implementors Beware: Potential Trouble Spots.............    3
      3.1.  Neighbor Discovery in IPv6..........................    3
      3.2.  IPv4 and ARP........................................    4

   4.  Security Considerations..................................    4

   5.  References...............................................    4

   6.  Authors' Addresses.......................................    4

1.  Introduction

   Protocols such as ARP [ARP] and ND [DISCOVERY] have data fields that
   contain link-layer addresses. In order to interoperate properly, a
   sender setting such a field must insure that the receiver extracts
   those bits and interprets them correctly.  In most cases, such fields
   must be in "canonical form." Unfortunately, not all LAN adaptors are
   consistent in their use of canonical form, and implementations may
   need to explicitly bit swap individual bytes in order to obtain the
   correct format.

2.  Canonical Form

   Canonical form (also known as "LSB format" and "Ethernet format") is
   the name given to the format of a LAN adapter address as it should be
   presented to the user according to the 802 LAN standard.  It is best
   defined as how the bit order of an adapter address on the LAN media
   maps to the bit order of an adapter address in memory: The first bit
   of each byte that appears on the LAN maps to the least significant
   (i.e., right-most) bit of each byte in memory (the figure below
   illustrates this).  This puts the group address indicator (i.e., the
   bit that defines whether an address is unicast or multicast) in the
   least significant bit of the first byte.  Ethernet and 802.3 hardware
   behave consistently with this definition.

   Unfortunately, Token Ring (and some FDDI) hardware does not behave
   consistently with this definition; it maps the first bit of each byte
   of the adapter address to the most significant (i.e., left-most) bit

draft-narten-canonical-ordering-00.txt                          [Page 2]
INTERNET-DRAFT                                           October 6, 1997

   of each byte in memory, which puts the group address indicator in the
   most significant bit of the first byte.  This mapping is variously
   called "MSB format", "IBM format", "Token-Ring format", and "non-
   canonical form".  The figure below illustrates the difference between
   canonical and non-canonical form  using the canonical form address
   12-34-56-78-9A-BC as an example:

   In memory,      12       34       56       78       9A       BC
   canonical:   00010010 00110100 01010110 01111000 10011010 10111100

                1st bit appearing on LAN (group address indicator)
                |
   On LAN:      01001000 00101100 01101010 00011110 01011001 00111101

   In memory,
   MSB format:  01001000 00101100 01101010 00011110 01011001 00111101
                   48       2C       6A       1E       59       3D

   The implication of this inconsistency is that addresses extracted
   from adaptors, assigned to adaptors, or extracted from link-layer
   packet headers obtained from adaptors may need to be bit-swapped to
   put them into canonical form. Likewise, addresses in canonical form
   that are handed to adaptors (e.g., to set an address, to specify a
   destination address in a link-layer header, etc.) may need to be
   bit-swapped in order for the adaptor to process the request as
   expected.

3.  Implementors Beware: Potential Trouble Spots

3.1.  Neighbor Discovery in IPv6

   All of the IPv6 over specific link layers documents specify that
   link-layer addresses must be transmitted in canonical order [IPv6-
   ETHER, IPv6-FDDI, IPv6-TOKEN].  As far as the authors can tell, all
   Ethernet LAN adaptors use canonical order and no special processing
   by implementations is needed. In contrast, some FDDI and all Token
   Ring adaptors appear to use non-canonical format. Implementors must
   insure that any addresses that appear in link-layer address options
   of Neighbor Discovery [DISCOVERY] messages are sent in canonical
   order and that any link-layer addresses extracted from ND packets are
   interpreted correctly on the local machine and its adaptors.

draft-narten-canonical-ordering-00.txt                          [Page 3]
INTERNET-DRAFT                                           October 6, 1997

3.2.  IPv4 and ARP

   Ethernet addresses that appear in ARP packets are in canonical order.
   In contrast, when running ARP over Token Ring, the de facto practice
   is to transmit addresses in non-canonical order. Because all Token
   Ring adaptors assume non-canonical ordering, no interoperability
   problems result between communicating nodes attached to the same
   Token Ring.

   In some environments, however, Token Rings and Ethernets are
   connected via a bridge. When a node on the Token Ring attempts to
   communicate with a node on the Ethernet, communication would normally
   fail, since the Ethernet will misinterpret the Token Ring address
   (and vice versa). To get around this problem, bridges that forward
   packets between dissimilar network types perform bit swaps of the
   addresses in the address fields of ARP packets that are forwarded
   from a network of one type to one of the other.

4.  Security Considerations

   There are no known security issues raised by this document.

5.  References

     [ARP] D. Plummer, "An Ethernet Address Resolution Protocol", STD
             37, RFC 826, November 1982.

     [DISCOVERY] Narten, T., Nordmark, E., and W. Simpson, "Neighbor
             Discovery for IP Version 6 (IPv6)", draft-ietf-ipngwg-
             discovery-v2-00.txt.

     [IPv6-ETHER] M. Crawford, "Transmission of IPv6 Packets over
             Ethernet Networks", draft-ietf-ipngwg-trans-ethernet-
             03.txt.

     [IPv6-FDDI] M. Crawford, "Transmission of IPv6 Packets over FDDI
             Networks", draft-ietf-ipngwg-trans-fddi-net-03.txt.

     [IPv6-TOKEN] S. Thomas, "Transmission of IPv6 Packets over Token
             Ring Networks", draft-ietf-ipngwg-trans-tokenring-03.txt.

6.  Authors' Addresses

   Thomas Narten
   IBM Corporation
   3039 Cornwallis Ave.
   PO Box 12195

draft-narten-canonical-ordering-00.txt                          [Page 4]
INTERNET-DRAFT                                           October 6, 1997

   Research Triangle Park, NC 27709-2195

   Phone: 919-254-7798
   EMail: narten@raleigh.ibm.com

   Charles F. Burton, III
   IBM Corporation
   3039 Cornwallis Ave.
   PO Box 12195
   Research Triangle Park, NC 27709-2195

   Phone: 919-254-4355
   EMail: burton@rtp.vnet.ibm.com

draft-narten-canonical-ordering-00.txt                          [Page 5]