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

The Data Link Layer

The document discusses the data link layer of the OSI model. It describes the services provided by the data link layer, including framing, flow control, error control, and addressing. The data link layer encapsulates data packets from the network layer into frames and performs node-to-node delivery. It uses link-layer addressing, such as MAC addresses, rather than IP addresses. The document also explains how the Address Resolution Protocol (ARP) is used to map IP addresses to MAC addresses to allow communication within a local area network.

Uploaded by

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

The Data Link Layer

The document discusses the data link layer of the OSI model. It describes the services provided by the data link layer, including framing, flow control, error control, and addressing. The data link layer encapsulates data packets from the network layer into frames and performs node-to-node delivery. It uses link-layer addressing, such as MAC addresses, rather than IP addresses. The document also explains how the Address Resolution Protocol (ARP) is used to map IP addresses to MAC addresses to allow communication within a local area network.

Uploaded by

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

The Data Link Layer

2 Nodes and Links


❑ Two end hosts and the routers are nodes
❑ The networks in between the nodes are links
3 Data Link Layer Services
❑ The datalink layer receives services from the physical layer and provides services
to the network layer
❑ The duty scope of the data-link layer is node-to-node
❑ The data-link layer of the sending node encapsulates the datagram received from
the network in a frame
❑ The data-link layer of the receiving node needs to decapsulate the datagram
❑ Each intermediate node needs to both encapsulate and decapsulate
4 Data Link Layer Services
Framing
❑ The data-link layer at each node needs to encapsulate
the datagram in a frame before sending it to the next
node
❑ The node also needs to decapsulate the datagram
from the frame received on the logical channel
❑ A frame may have both a header and a trailer
5 Data Link Layer Services
Flow Control
❑ Producer consumer problem
 If rate of produced frames is higher than the rate of consumed
frames, frames at the receiving end need to be buffered while
waiting to be consumed (processed).
❑ Due to limited buffer size at the receiving side, either:
 Receiving data-link layer drops the frames if its buffer is full
 Receiving data-link layer sends a feedback to the sending
data-link layer to ask it to stop or slow down.
❑ Flow control also occurs at the transport layer, with a
higher degree of importance
6 Data Link Layer Services
Error Control
❑ Frame are susceptible to errors.
 Errors need first to be detected
 Then, either corrected at the receiver node or discarded and
retransmitted by the sending node
❑ Error detection and correction is an issue in every layer
Congestion Control
❑ Congestion may result in frame losses
❑ Most data-link-layer protocols do not directly use congestion
control
❑ Some wide-area networks use congestion control at data-
link-layer
❑ Congestion control is considered an issue in the network
layer or the transport layer because of its end-to-end nature
7 Two sub-layers
❑ Most LAN protocols divide the data-link layer into two
sublayers:
 Data Link Control (DLC): deals with all issues common to
both point-to-point and broadcast links
 Media Access Control (MAC): deals only with issues specific
to broadcast links
8 Link-Layer Addressing
❑ IP addresses are the identifiers at the network layer.
❑ In a internetwork such as the Internet we cannot make
a datagram reach its destination using only IP
addresses.
❑ The source and destination IP addresses define the
two ends but cannot define which links the packet
should pass through
❑ A link-layer address is sometimes called a link
address, sometimes a physical address, and
sometimes a MAC address
9 IP and link-layer addresses
11 ARP
❑ Anytime a node has an IP datagram to send to another
node in a link, it has the IP address of the receiving
node
❑ IP address of next node is not helpful in moving a
frame through a link
❑ We need the link-layer address of the next node
❑ This is when the Address Resolution Protocol (ARP)
becomes helpful
12 Position of ARP in TCP/IP protocol suite
13 ARP operation
14 ARP Packet
❑Hardware type: defines the type of the link-layer
protocol; Ethernet is given the type 1
❑Protocol type: defines the network-layer protocol: IPv4
protocol is (0800)16
❑Source hardware and source protocol addresses are
variable-length fields defining the link-layer and
network-layer addresses of the sender
15 ARP
❑ Use to capture some ARP packets and check all fields
❑ To clear ARP cache, run cmd prompt as Admin then enter:
netsh interface ip delete arpcache
16 Example
❑ A host with IP address N1 and MAC address L1 has a packet to
send to another N2, L2 (which is unknown to the first host). The
two hosts are on the same network.
17 Example

❑ Alice needs to send a datagram to Bob


❑ Alice finds the network-layer address of
Bob using DNS
18 Flow of packets at Alice site
19 Flow of activities at router R1
20 Flow of activities at router R2
21 Activities at Bob’s site

You might also like