|
Canonical
Also Known As:
LSB Format
Least Significant Bit Format
Ethernet Format
|
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
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. |