Link-Layer Addressing

Link-Layer Addressing

Nodes that is hosts and routers have link-layer addresses. Now you might find this surprising, recalling from "The Network Layer" that nodes have network-layer addresses as well. You might be thinking, why in the world do we need to have addresses at both the network and link layers? As well as describing the syntax and function of the link-layer addresses, in this section we hope to shed some light on why the two layers of addresses are useful and, in fact, essential. Well also cover the Address Resolution Protocol (ARP), which provides a mechanism to translate IP addresses to link-layer addresses.

MAC Addresses

In fact, it is not a node (that is, host or router) that has a link-layer address but instead a nodes adapter that has a link-layer address. This is shown in Figure 1. A link-layer address is variously called a LAN address, a physical address, or a MAC address. Because MAC address seems to be the most popular term, well henceforth refer to link-layer addresses as MAC address. For most LANs (including Ethernet and 802.11 wireless LANs) the MAC address is 6 bytes long, giving 248 possible MAC addresses. As shown in Figure 1, these 6-byte addresses are usually

Each adapter connected to a LAN has a unique MAC address

expressed in hexadecimal notation, with each byte of the address expressed as a pair of hexadecimal numbers. Although MAC addresses were designed to be permanent, it is now possible to change an adapters MAC address via software. For the rest of this section, however, well assume that an adapters MAC address is fixed. One interesting property of MAC addresses is that no two adapters have the same address. This might seem surprising given that adapters are manufactured in many countries by many companies. How does a company manufacturing adapters in Taiwan make sure that it is using different addresses from a company manufacturing adapters in Belgium? The answer is that the IEEE manages the MAC address space. Particularly, when a company wants to manufacture adapters, it purchases a chunk of the address space consisting of 224 addresses for a nominal fee. IEEE allocates the chunk of 224 addresses by fixing the first 24 bits of a MAC address and letting the company create unique combinations of the last 24 bits for each adapter.

An adapters MAC address has a flat structure (as opposed to a hierarchical structure) and doesnt change no matter where the adapter goes. A portable computer with an Ethernet card always has the same MAC address, no matter where the computer goes. A PDA with an 802.11 interface always has the same MAC address, no matter where the PDA goes. Remember that, in contrast, IP address have a hierarchical structure (that is, a network part and a host part), and a nodes IP address needs to be changed when the host moves, i.e, changes the network to which it is attached. An adapters MAC address is similar to a persons social security number, which also has a flat addressing structure and which doesnt change no matter where the person goes. An IP address is similar to a persons postal address, which is hierarchical and which must be changed whenever a person moves. Just as a person may find it useful to have both a postal address and a social security number, it is useful for a node to have both a network-layer address and a MAC address.

As we expained at the beginning of this section, when an adapter wants to send a frame to some destination adapter, the sending adapter inserts the destination adapters MAC address into the frame and then sends the frame into the LAN. If the LAN is a broadcast LAN (such as 802.11 and many Ethernet LANs), the frame is received and processed by all other adapters on the LAN. In particular, each adapter that receives the frame will check to see whether the destination MAC address in the frame matches its own MAC address. If there is a match, the adapter extracts the enclosed datagram and passes the datagram up the protocol stack to its parent node. If there isnt a match, the adapter discards the frame, without passing the network-layer datagram up the protocol stack. In this way, only the destination node will be interrupted when the frame is received. On the other hand, sometimes a sending adapter does want all the other adapters on the LAN to receive and process the frame it is about to send. In this case, the sending adapter inserts a special MAC broadcast address into the destination address field of the frame. For LANs that use 6-byte address (such as Ethernet and token-passing LANs), the broadcast address is a string of 48 consecutive 1s (that is, FF-FF-FF-FF-FF-FF in hexadecimal notation).

KEEPING THE LAYERS INDEPENDENT


Tags

nodes, protocol stack, network layer, routers, hosts, ip address

Copy Right

The contents available on this website are copyrighted by TechPlus unless otherwise indicated. All rights are reserved by TechPlus, and content may not be reproduced, published, or transferred in any form or by any means, except with the prior written permission of TechPlus.