KEMBAR78
Introduction To Data-Link Layer | PDF | Internet Protocols | Computer Network
0% found this document useful (0 votes)
3 views17 pages

Introduction To Data-Link Layer

Chapter 9 introduces the data-link layer, which facilitates communication between nodes in a network by managing data framing, flow control, error control, and congestion control. It explains the importance of link-layer addressing, including unicast, multicast, and broadcast addresses, and the role of the Address Resolution Protocol (ARP) in mapping IP addresses to link-layer addresses. The chapter emphasizes that data units must pass through multiple networks and routers, with link-layer addresses changing at each hop between links.

Uploaded by

deshani bandara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views17 pages

Introduction To Data-Link Layer

Chapter 9 introduces the data-link layer, which facilitates communication between nodes in a network by managing data framing, flow control, error control, and congestion control. It explains the importance of link-layer addressing, including unicast, multicast, and broadcast addresses, and the role of the Address Resolution Protocol (ARP) in mapping IP addresses to link-layer addresses. The chapter emphasizes that data units must pass through multiple networks and routers, with link-layer addresses changing at each hop between links.

Uploaded by

deshani bandara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Chapter 9

Introduction To
Data-Link Layer

9.1
Chapter 9: Outline

9.1 INTRODUCTION

9.2 LINK-LAYER ADDRESSING

9.2
9-1 INTRODUCTION

 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.

9.3
Figure 9.1: Communication at the data-link layer

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.4
9.1.1 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.

Fig. 9.2 Nodes and Links


9.5
9.1.2 Services

 The data-link layer is located between the physical and


the network layers.
 The data-link layer provides services to the network
layer; it receives services from the physical layer.
 Framing
 Flow Control
 Error control
 Congestion Control

9.6
Fig. 9.3 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 destination host

9.7
9.1.3 Two Categories of Links

 Point-to-point link
 The link is dedicated to the two devices.
 Broadcast link
 The link is shared between several pairs of devices

9.8
9.1.4 Two Sublayers

 We can divide the data-link layer into two sublayers:


 Data Link Control (DLC)
 Media Access Control (MAC)

Fig. 9.4 Dividing the data-link layer into two sublayers

9.9
9-2 LINK-LAYER ADDRESSING
 However, 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.
 The reason is that each datagram in the Internet, from the same
source host to the same destination host, may take a different path.
 IP addresses in a datagram should not be changed.
 A link-layer address is called as link address / physical address /
MAC address.
 When a datagram passes from the network layer to the data-link layer,
the datagram will be encapsulated in a frame and two data-link
addresses are added to the frame header.
 These two addresses are changed every time the frame moves from
one link to another.
9.10
9.2.3 An Example of Communication

Figure 9.10: The internet for our


example

 Source (NA) and destination (NB) network-layer addresses


are not changed during the whole journey.

9.11
Figure 9.5: IP addresses and link-layer addresses in a small
internet

9.12
9.2.1 Three Types of addresses

 Some link-layer protocols define three types of


addresses:
1. Unicast
 Each host or each interface of a router is assigned a unicast
address. Unicasting means one-to-one communication. A frame
with a unicast address destination is destined only for one entity
in the link.
 The second digit needs to be an odd number.

A3:34:45:11:92:F1

9.13
2. Multicast
 one-to-many communication.
 The second digit needs to be an odd number.

A2:34:45:11:92:F1
3. Broadcast
 one-to-all communication. A frame with a destination broadcast
address is sent to all entities in the link.
 The following shows a broadcast address:

9.14
9.2.2 Address Resolution Protocol 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.
 Source host knows the IP address of the default router. Each router
gets the IP address of the next router by using its forwarding table.
The last router knows the IP address of the destination host.
 However, the IP address of the next node is not helpful in moving
a frame through a link;
 We need the link-layer address of the next node. This is the time
when the Address Resolution Protocol (ARP) becomes helpful.
 The ARP protocol is one of the network layer protocols.
 ARP maps an IP address to a logical-link address.

9.15
Figure 9.7: ARP
operation
When a host or a router needs to find the link-layer address of another host or router in its
network,
 A host or a router sends an ARP
request packet that includes the
link-layer and IP addresses of the
sender and the IP address of the
receiver.

 Because the sender does not know


the link-layer address of the
receiver, the query is broadcast
over the link using the link-layer
broadcast address.

 Every host or router on the


network receives and processes
the ARP request packet, but only
the intended recipient recognizes
its IP address and sends back an
ARP response packet.
 The response packet contains the
recipient’s IP and link-layer
addresses. The packet is unicast
directly to the node that sent the
request packet.
9.16
Figure 9.8: ARP
packet

9.17

You might also like