Link-Layer Addressing

 

Link-Layer Addressing

Every device communicating over a network needs an addressing mechanism to identify where data should be delivered. In computer networks, IP addresses and link-layer addresses serve two different purposes.

An IP address identifies the source and destination hosts at the network layer, whereas a link-layer address identifies the nodes involved in transferring a frame over a particular link.

Why do we need link-layer addresses?

Consider a situation in which Alice wants to send data to Bob, who is connected through two routers.

The data may travel through several links before reaching Bob. The IP addresses of Alice and Bob remain the same throughout the journey, but the link-layer addresses change at every link.


IP addresses remain unchanged; link-layer addresses change at each link.

When a datagram moves from the network layer to the data-link layer, it is encapsulated inside a frame. The frame header contains two link-layer addresses:

  • Source link-layer address: Identifies the node sending the frame on that link.

  • Destination link-layer address: Identifies the next node that should receive the frame on that link.

When a router receives the frame, it removes the frame header, processes the IP datagram, and encapsulates the datagram in a new frame for the next link. The new frame contains different link-layer addresses.



IP addressing vs link-layer addressing

Feature

IP address

Link-layer address

Layer

Network layer

Data-link layer

Purpose

Identifies source and destination hosts across networks

Identifies nodes communicating over a particular link

Changes during routing

Source and destination IP addresses normally remain unchanged

Addresses change at each link

Used in

IP datagram header

Frame header

Important point: A link-layer address is also called a link address, physical address, or MAC address. 

The link-layer addresses in the most common LAN, Ethernet, are 48 bits (six bytes) that are presented as 12 hexadecimal digits separated by colons; for example, the following is a link-layer address of a computer.

A2:34:45:11:92:F1

In short, IP addresses help a datagram reach the destination across networks, while link-layer addresses help deliver the frame to the next node on each individual link. Both are necessary for communication in a connectionless internetwork such as the Internet.

Comments

Popular posts from this blog

Computer Networks PCCST501 Semester 5 KTU CS 2024 Scheme - Dr Binu V P

Model Question Paper Computer Networks PCCST501 KTU 2024 Scheme and Answer Key

Introduction to Computer Networks