MAC Address vs IP Address

IP networks require two types of addresses  .  .  .  MAC and IP.  Each station stores it's MAC address and IP address in it's own IP stack.  It stores MAC and IP addresses of other stations on it's LAN or subnet in the ARP cache.

When the packet is being sent out to a statipn that is on the same network LAN segment, only the MAC address is needed.  When the packet goes beyond, to different networks and travels through routers, the MAC address is still contained in the packet, but only the IP address is used by the routers.

Pairs of matched MAC/IP addresses are stored in the ARP cache.

NOTE:  The order that Source/Destination MAC and IP addresses are sent, is reversed:

MAC address (Layer2 - Data Link layer)  

The hard coded 48-bit (6 byte) address, burned into the ROM of the NIC (Network Interface Card) - it is also called the Hardware address, or Ethernet address. They are expressed as six pairs of hexadecimal digits.  The following is a MAC address for a Linksys Ethernet NIC :

The first 3 bytes are vendor numbers (also called the OUI - Organizationally Unique Identifier), and the last 3 are NIC serial numbers, or station address. This gives a theoretical 281,474,976,710,656 addresses. This is more than 56,000 MAC addresses for each person on the planet!

OUI -this is the identifier for a particular Vendor.  The example above shows that all NIC's from Linksys have MAC addresses that begin with 00A0CC.  Other vendor OUI's are:

00000C  Cisco
00001D  Cabletron
0020AF  3COM
08001B  Data General
08002B  DEC
etc

UAA - since all cards from a given manufacturer have the same first 3 bytes - sometimes the MAC addresses are given as only the last 3 bytes (the station address) and it is called a UAA (Universally Administered Address). 

LAA - Some low-level protocols can add an overlay to those 3 bytes, basically renaming them with 6 bytes store in software, but keeping a table for cross-referencing (some printer sharing Ethernet boxes do this) and then they are called an LAA (Locally Administered Address).  This allows a network administrator to number the NIC's with meaningful digits  .  .  .the last 3 bytes of the UAA address can be renamed to an LAA and contain information about the building, department, room, machine, wiring circuit, or owner's telephone number.

2 Special Bits

There are two special bits in a MAC address. They are the first two bits sent out on the wire in the MAC - the two least significant bits.  They are shown as the last bits of the first byte of the MAC.  Ethernet bytes are transmitted big-endian but the bits are transmitted little-endian.

The first bit (bit 0) is used by Ethernet II.  The second bit is used by IEEE 802.3.

Ethernet II special bit -  if the first bit (bit 0, the LSB) is 0, then it is a physical MAC address (unicast), if it is 1, then it is a multicast address.

IEEE 802.3 special bit - if the second bit (bit 1) is 0, then the UAA address is used.  If the bit is 1, then the LAA is used.

*** in most cases, the two bits are 00  !!!

In any case, a MAC address with an odd first byte is clearly not legal as a source address.  Sources can never be multicast !!

 

The IP address (layer 3 - Network layer) 

A 32-bit (4 byte) software stored address, and is assigned to represent the same NIC as MAC address represents.  The 32-bit IP address is like a shorter nickname for the 48-bit MAC address.

We will discuss IP addressing in detail in the later sections.  But the main point in differentiating IP from MAC addresses, is this: