A Caution On The Canonical Ordering Of Link-Layer Addresses
RFC 2469

Document Type RFC - Informational (December 1998; No errata)
Last updated 2013-03-02
Stream Legacy
Formats plain text pdf html bibtex
Stream Legacy state (None)
Consensus Unknown
RFC Editor Note (None)
IESG IESG state RFC 2469 (Informational)
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                          T. Narten
Request for Comments: 2469                                     C. Burton
Category: Informational                                              IBM
                                                           December 1998

      A Caution On The Canonical Ordering Of Link-Layer Addresses

Status of this Memo

   This memo provides information for the Internet community.  It does
   not specify an Internet standard of any kind.  Distribution of this
   memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (1998).  All Rights Reserved.

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.

Table of Contents

   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........................................    3
   4.  Security Considerations..................................    3
   5.  References...............................................    4
   6.  Authors' Addresses.......................................    4
   7.  Full Copyright Statement.................................    5

Narten & Burton              Informational                      [Page 1]
RFC 2469       Canonical Ordering Of Link-Layer Addresses  December 1998

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
   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

Narten & Burton              Informational                      [Page 2]
RFC 2469       Canonical Ordering Of Link-Layer Addresses  December 1998

   The implication of this inconsistency is that addresses extracted
Show full document text