0% found this document useful (0 votes)
17 views

Chapter-9 Introduction To Data-link Layer

The document provides an introduction to the data-link layer of the TCP/IP protocol suite, detailing its functions, services, and addressing mechanisms. It explains the importance of link-layer addressing, the difference between IP and MAC addresses, and the role of the Address Resolution Protocol (ARP) in mapping IP addresses to link-layer addresses. Additionally, it covers various types of communication methods such as unicast, multicast, and broadcast, highlighting their characteristics and use cases.

Uploaded by

cocic79333
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Chapter-9 Introduction To Data-link Layer

The document provides an introduction to the data-link layer of the TCP/IP protocol suite, detailing its functions, services, and addressing mechanisms. It explains the importance of link-layer addressing, the difference between IP and MAC addresses, and the role of the Address Resolution Protocol (ARP) in mapping IP addresses to link-layer addresses. Additionally, it covers various types of communication methods such as unicast, multicast, and broadcast, highlighting their characteristics and use cases.

Uploaded by

cocic79333
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 43

INTRODUCTION TO

D ATA - L I N K L AY E R

Chapter - 9
2

CONTENTS
o Introduction to Data-Link Layers

o Services

o Link-Layer Addressing

o Network Address

o Address Resolution Protocol(ARP)


3

Layers in the TCP/IP protocol suite


INTRODUCTION TO
D ATA - L I N K L AY E R S
5

I N T R O D U C T I O N T O D ATA -
L I N K L AY E R
The Internet is a combination of networks glued
together by connecting devices (routers or switches).
If a packet is to travel from a host to another host, it
needs to pass through these networks.

Communication at the data-link layer is made up of five separate


logical connections between the data-link- layers in the path.
6
What is LAN and WAN

LAN – Local Area Network


WAN – Wide Area Network
7
What is LAN and WAN

There are also WLAN and WWAN


WLAN – Wireless Local Area Network
WWAN – Wireless Wide Area Network
8 Communication at the data-link la
The data-link layer at Alice’s
computer communicates with the
data-link layer at router R2. The
data-link layer at router R2
communicates with the data-link
layer at router R4, and so on.
Finally, the data-link layer at router
R7 communicates with the data-
link layer at Bob’s computer.

Only one data-link layer is involved


at the source or the destination,
but two data-link layers are
involved at each router.

The reason is that Alice’s and Bob’s


computers are each connected to a
single network, but each router
takes input from one network and
sends output to another network.
9
NODES AND LINKS

Communication at the data-link layer is node-to-node. A data unit from one point in the
Internet needs to pass through many networks (LANs and WANs) to reach another
point. Theses LANs and WANs are connected by routers. It is customary to refer to the
two end hosts and the routers as nodes and the networks in between as links.
SERVICES
11
SERVIC
ES
 The datalink layer provides services to the network layer; it receives
services from the physical layer.
 The duty scope of the data-link layer is node-to-node. When a packet
is travelling in the Internet, the data-link layer of a node (host or
router) is responsible for delivering a datagram to the next node in
the path.
 For this purpose, the data-link layer of the sending node needs to
encapsulate the datagram received from the network in a frame, and
the data-link layer of the receiving node needs to decapsulate the
datagram from the frame.
 The data-link layer of the source host needs only to encapsulate, the
data-link layer of the destination host needs to decapsulate, but
each intermediate node needs to both encapsulate and decapsulate.
 The reason is that each link may be using a different protocol with a
different frame format. Even if one link and the next are using the
same protocol, encapsulation and decapsulation are needed because
the link-layer addresses are normally different.
12 A communication with only three
nodes

 The datagram received by the data-link layer of the source host is


encapsulated in a frame. The frame is logically transported from
the source host to the router. The frame is decapsulated at the
data-link layer of the router and encapsulated at another frame.
The new frame is logically transported from the router to the
13
Framing
 The first service provided by the data-link layer is
 framing .
A packet at the data-link layer is normally called a frame.

Two Categories of Links


 We can have a point-to-point link or a broadcast link.

 In a point-to-point link, the link is dedicated to the two


devices.
 In a broadcast link, the link is shared between several
pairs of devices.
 For example, when two friends use the traditional home
phones to chat, they are using a point-to-point link; when
the same two friends use their cellular phones, they are
using a broadcast link.
14

Two Sublayers
 To better understand the functionality of and the services
provided by the link layer, we can divide the data-link layer
into two sublayers: data link control (DLC) and media access
control (MAC).
 LAN protocols actually use the
same strategy.
 The data link control sublayer deals with all issues common to both
point-to-point and broadcast links.

 The media access control sublayer deals only with issues


specific to broadcast links.
15

Dividing the data-link layer into two


sublayers
L I N K- L AY E R
A D D R E SS I N G
17 LINK-LAYER ADDRESSING
Link-layer Addressing
 Link-layer addresses are crucial for the data-link layer in
networking .
 IP Addresses identify the exact points on the Internet where the
source and destination hosts are connected.

Connectionless Internetwork
 In connectionless Internetwork such as the Internet, datagrams
can’t reach its destination by using only IP Address.
 Because datagrams from the same source to the same
18

Importance of IP Address
IP addresses in the datagram should not be change
Changing the destination IP address prevents the packet
from reaching its destination.
Changing the source IP address disrupts the
communication between the destination host or a router
with the source.
Source and destination IP addresses define the two
endpoints but cannot define which specific links the
19

 Link-layer addressing are necessary for nodes in a


connections interworks.
 They are also known as link address, physical address or
MAC address
 Since a link is controlled at the data-link layers, the
addresses need to belong to the data-link layer.
 As datagrams pass from the network layer to the data-link
layer, the datagrams are encapsulated in frames with two
link-layer addresses added to the frame header.
 Link-layer addresses change every time a frame moves
20 IP addresses and link-layer addresses in a
small internet
N E T W O R K A D D R E SS E S
22

N E T W O R K A D D R E SS E S
 A network address is a unique identifier assigned to a
device connected to a network. This address allows
devices to find and communicate with each other.

 There are mainly two types.

1. IP Addresses(IPV4/IPV6)[32bits/128bits]

2. MAC Addresses
23
1. IP Addresses(Internet Protocol Address)
 It’s a numerical label assigned to every device
connected to a network that uses the Internet
Protocol.
 e.g.192.168.1.1(dotted decimal notation)

 It’s is divided into two parts.

i. Network Portion: Identifies the network that device


belongs

ii. Host Portion: Identifies the specific device within


2. MAC
24

Addresses
 MAC Address (Media Access Control Address): This is a
hardware address
assigned to every network interface card (NIC).
 It's unique to each device and can't be never changed.

Comparison of IP address and MAC address

 IP addresses are used to route data packets. They allow


devices to find each other and communicate.
 MAC addresses are primarily used within a local network
between devices.
25
HOW THEY WORK

 To work IP and MAC address, we use mainly

ARP(address resolution protocol).

 The function or main duty of ARP is to change IP

address to

MAC address and perform to send information and

data between devices.

 So, ARP is an important protocol in network


26 IP Address and MAC address
27
DIFFERENCES OF IP AND
M A C A D D R E SS
Category MAC IP
Size Six-byte Four-byte
hexadecima (IPv4) and
l address sixteen-
byte (IPv6)
Provider NIC Card’s Internet
Manufactur Service
er Provider
Layer Data link Network
layer Layer
Protocol Can Can
Retrieval retrieve by retrieve
ARP protoc By RARP
ol protocol
Purpose Identifying Identifying
the device the device
connection
28
Ethernet
Address
 Ethernets are 48 bits (six bytes) that are presented as 12
hexadecimal digits separated by columns:(colon separated
hexadecimal notation)
eg.A2:34:45:11:92:F1, FF:FF:FF:FF:FF:FF
o Three types of ethernet addresses
in link-layer protocols.
1. Unicast address
2. Multicast address and
3. Broadcast address.
29

1 . U N I C A S T A D D R E SS
 Unicast is one-to-one communication.

 Each host or each interface of a router is assigned a

unicast address.

 Unicast is a type of data transmission where

information is sent from one single sender to one

specific receiver.

 It's like a direct phone call between two people.


30
Uses
KEY CHARACTERISTICS Cases
Web browsing(HTTP)
 One sender, one receiver: Only
Email(SMTP)
the intended recipient receives
File Transfer(FTP)
the data.
Video call(e.g. .Zoom,
Skype)
 Efficiency: Resources are
Online gaming
optimized as data is sent directly
to the target.

 Privacy: Data is typically private


between the sender and receiver.
31
2 . M U LT I C A S T A D D R E S S
o Multicasting means one-to-many or many-to-many
communication.

o In computer networking, multicast is a type of group


communication where data transmission is addressed
to a group of destination computers simultaneously.

o A multicast address is a logical identifier for a group


of hosts on a computer network.

o It's used to efficiently send data to multiple recipients


simultaneously.
32

KEY CHARACTERISTICS
Use
•One-to-many delivery: Data is sent to multiple cases:

recipients at once. Video


conferenci
ng
•Group membership: Devices interested in
Live
receiving data join a multicast group. streaming
•Efficiency: Reduces network traffic compared to
Online
broadcasting data to all devices.. gaming

•Address range: Typically uses the IP address


IPTV
range 224.0.0.0 to 239.255.255.255.
33
3.BROADCAST
A D D R E SS ( I P V 4 )
o Broadcasting means one-to-all communications.

o Broadcast address is a network address used to transmit data


all devices

connected to a network.
There are primarily two types.
1. Local Broadcast(Limited broadcast)
e.g. In IPv4,the local broadcast address is typically
255.255.255.255.
2. Directed Broadcast
e.g. While less common in IPv4,it is more prevalent in IPv6.
34
PURPOSE OF
B R OA D C A S T A D D R E SS
o Discovery: Protocols like ARP(Address Resolution
Protocol)use broadcasts to find MAC address of a device
based on its IP address.
o Network Management: Administrators use broadcasts to
send configuration updates or notifications to all devices
.
o Specific applications: Some applications like file sharing
Example:
or network discovery tools utilize broadcasts.
•Network address: 192.168.1.0
•Subnet mask: 255.255.255.0
•Broadcast address: 192.168.1.255
35
Comparison
Table
Feature Unicast Multicast Broadcast

Sender One One One

Multiple
Receiver One All
(interested)

Efficiency High Medium Low

In summary:
 Unicast is the most common and efficient method for
point-to-point communication.
 Multicast is ideal for distributing data to a specific
group of interested recipients.
 Broadcast is generally less efficient , limited in sending
data or information
but most commonly used it everywhere broadly.
A D D R E SS R E S O LU T I O N
PROTOCOL(ARP)
37

Address Resolution
Protocol (ARP)  When sending an IP datagram, a
node needs the link-layer address
of the next node to move the frame
through the network.

 While nodes have IP addresses for


the destination and intermediate
routers, these addresses are not
directly useful for frame
transmission.

 The Address Resolution Protocol


(ARP) helps by mapping IP
addresses to link-layer addresses.
ARP operation
38

 To find another device's physical  All devices receive the ARP request,
address on the same network, a but only the target replies with its IP
device sends a broadcast ARP and physical address.
request

 The request includes sender and


receiver IP addresses, and is
broadcast as the sender doesn't
know the target's physical address.
39

Most often asked Question for using


ARP Request
 If system A can broadcast a frame to find the
link- layer address of system B, why can’t system
A send the datagram for system B using a
broadcast frame?

 In other words, instead of sending one broadcast


frame (ARP request), one unicast frame (ARP
response), and another unicast frame (for sending
the datagram), system A can encapsulate the
datagram and send it to the network. System B
receives it and keep it; other systems discard it
40 ARP packet

Hardware : LAN or WAN


protocol
Protocol : Network-layer
protocol
41

Flow of packets at Alice’s


computer

 The network layer knows it’s given


NA, NB, and the packet and needs to
find link-layer address of the next
node.

 the network layer first uses ARP to


find (R1) the router's physical
address (L1). And then
42

Flow of activities at
router R1

 R1 uses ARP to find R2's physical


address (L3) and sends the data to
the data link layer.

 The link layer takes the data


(datagram), adds addressing
information (source and destination
addresses) and creates a frame.

 This frame is then converted into


signals by the physical layer and sent
to the next device (R2).
 Activities at router R2 are almost the
same as in R1
THANK
YO U

You might also like