SlideShare a Scribd company logo
RAMCO INSTITUTE OF TECHNOLOGY
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.
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.
Nodes and Links
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
• The duty scope of the data-link layer is
node-to-node.
• 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.
• In other words, 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
Framing
• First service provided by the data-link layer
is framing. The data-link layer at each node
needs to encapsulate the datagram (packet
received from the network layer) in a frame
before sending it to the next node
Flow control
• Flow control is a technique that allows two
stations working at different speeds to
communicate with each other.
• It is a set of measures taken to regulate
the amount of data that a sender sends so
that a fast sender does not overwhelm a
slow receiver.
Error Control
• Error control in data link layer is the process
of detecting and correcting data frames that
have been corrupted or lost during transmission.
..
• Data link layer follows a technique to detect
transit errors and take necessary actions, which
is retransmission of frames whenever error is
detected or frame is lost.
Two Categories of Links
• Although two nodes are physically
connected by a transmission medium such
as cable or air, we need to remember that
the data-link layer controls how the
medium is used.
• We can have a data-link layer that uses the
whole capacity of the medium; we can also
have a data-link layer that uses only part of
the capacity of the link.
• In other words, we can have a point-to-
point link or a broadcast link.
• 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).
Two Sub layers
LINK-LAYER ADDRESSING
• 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.
• so we need link layer address
• IP addresses in a datagram should not be
changed.
• If the destination IP address in a datagram
changes, the packet never reaches its
destination;
• if the source IP address in a datagram changes,
the destination host or a router can never
communicate with the source if a response
needs to be sent back or an error needs to be
reported back to the source
Three Types of addresses
• Link-layer protocols define three types of
addresses:
• Unicast, Multicast, and Broadcast.
• Unicast Address
• Each host or each interface of a router is
assigned a unicast address.
• Unicasting means one-to-one communication.
• Multicast Address: Some link-layer protocols
define multicast addresses. Multicasting
means one-to-many communication.
• Broadcast Address
• Some link-layer protocols define a broadcast
address. Broadcasting means one-to-all
communication. A frame with a destination
broadcast address is sent to all entities in
the link
Address Resolution Protocol
• Anytime a node has an IP datagram to send
to another node in a link, it has the IP
address of the receiving node.
• 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.
Position of ARP in TCP/IP
protocol suite
• Anytime a host or a router needs to find the link-
layer address of another host or router
in its network, it sends an ARP request packet.
• The packet 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
ARP operation
• 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
ARP packet
• The hardware type field defines the type of
the link-layer protocol; Ethernet is given the
type 1.
• The protocol type field defines the network-
layer protocol: IPv4 protocol is (0800)16.
• The source hardware and source protocol
addresses are variable-length fields
defining the link-layer and network-layer
addresses of the sender

More Related Content

What's hot

Open shortest path first (ospf)
Open shortest path first (ospf)Open shortest path first (ospf)
Open shortest path first (ospf)Respa Peter
 
Mac protocols for ad hoc wireless networks
Mac protocols for ad hoc wireless networks Mac protocols for ad hoc wireless networks
Mac protocols for ad hoc wireless networks Divya Tiwari
 
What Is Sliding Window Protocol?
What Is Sliding Window Protocol?What Is Sliding Window Protocol?
What Is Sliding Window Protocol?Simplilearn
 
Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networksguesta81d4b
 
MPLS (Multi-Protocol Label Switching)
MPLS (Multi-Protocol Label Switching)MPLS (Multi-Protocol Label Switching)
MPLS (Multi-Protocol Label Switching)Vipin Sahu
 
Qos Quality of services
Qos   Quality of services Qos   Quality of services
Qos Quality of services HayderThary
 
Congestion control
Congestion controlCongestion control
Congestion controlAman Jaiswal
 
Ethernet Computer network
Ethernet Computer networkEthernet Computer network
Ethernet Computer networkmiteshppt
 
ccna summer training ppt ( Cisco certified network analysis) ppt. by Traun k...
ccna summer training ppt ( Cisco certified network analysis) ppt.  by Traun k...ccna summer training ppt ( Cisco certified network analysis) ppt.  by Traun k...
ccna summer training ppt ( Cisco certified network analysis) ppt. by Traun k...Tarun Khaneja
 
Ch 19 Network-layer protocols Section 1
Ch 19  Network-layer protocols Section 1Ch 19  Network-layer protocols Section 1
Ch 19 Network-layer protocols Section 1Hossam El-Deen Osama
 
Access Control List (ACL)
Access Control List (ACL)Access Control List (ACL)
Access Control List (ACL)ISMT College
 

What's hot (20)

Open shortest path first (ospf)
Open shortest path first (ospf)Open shortest path first (ospf)
Open shortest path first (ospf)
 
Computer networks - Channelization
Computer networks - ChannelizationComputer networks - Channelization
Computer networks - Channelization
 
IEEE 802.11
IEEE 802.11IEEE 802.11
IEEE 802.11
 
Mac protocols for ad hoc wireless networks
Mac protocols for ad hoc wireless networks Mac protocols for ad hoc wireless networks
Mac protocols for ad hoc wireless networks
 
What Is Sliding Window Protocol?
What Is Sliding Window Protocol?What Is Sliding Window Protocol?
What Is Sliding Window Protocol?
 
Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networks
 
Physical layer ppt
Physical layer pptPhysical layer ppt
Physical layer ppt
 
Issues in Data Link Layer
Issues in Data Link LayerIssues in Data Link Layer
Issues in Data Link Layer
 
Routing protocols
Routing protocolsRouting protocols
Routing protocols
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
MPLS (Multi-Protocol Label Switching)
MPLS (Multi-Protocol Label Switching)MPLS (Multi-Protocol Label Switching)
MPLS (Multi-Protocol Label Switching)
 
Qos Quality of services
Qos   Quality of services Qos   Quality of services
Qos Quality of services
 
Congestion control
Congestion controlCongestion control
Congestion control
 
Link state routing protocol
Link state routing protocolLink state routing protocol
Link state routing protocol
 
Ethernet Computer network
Ethernet Computer networkEthernet Computer network
Ethernet Computer network
 
Mac layer
Mac  layerMac  layer
Mac layer
 
ccna summer training ppt ( Cisco certified network analysis) ppt. by Traun k...
ccna summer training ppt ( Cisco certified network analysis) ppt.  by Traun k...ccna summer training ppt ( Cisco certified network analysis) ppt.  by Traun k...
ccna summer training ppt ( Cisco certified network analysis) ppt. by Traun k...
 
Ch 19 Network-layer protocols Section 1
Ch 19  Network-layer protocols Section 1Ch 19  Network-layer protocols Section 1
Ch 19 Network-layer protocols Section 1
 
Sub Netting
Sub NettingSub Netting
Sub Netting
 
Access Control List (ACL)
Access Control List (ACL)Access Control List (ACL)
Access Control List (ACL)
 

Similar to Introduction to data link layer

Similar to Introduction to data link layer (20)

CN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptxCN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptx
 
CS8591 Computer Networks - Unit II
CS8591 Computer Networks - Unit II CS8591 Computer Networks - Unit II
CS8591 Computer Networks - Unit II
 
lecture 2.pptx
lecture 2.pptxlecture 2.pptx
lecture 2.pptx
 
CN Unit 2 PPT.pptx
CN Unit 2 PPT.pptxCN Unit 2 PPT.pptx
CN Unit 2 PPT.pptx
 
Module_3_Part_3.pptx
Module_3_Part_3.pptxModule_3_Part_3.pptx
Module_3_Part_3.pptx
 
UNIT-3 network security layers andits types
UNIT-3 network security layers andits typesUNIT-3 network security layers andits types
UNIT-3 network security layers andits types
 
Connecting devices
Connecting devicesConnecting devices
Connecting devices
 
Network hardware essentials Lec#3
Network hardware essentials Lec#3Network hardware essentials Lec#3
Network hardware essentials Lec#3
 
Computer network transport layer MODUL 2.pptx
Computer network transport layer MODUL 2.pptxComputer network transport layer MODUL 2.pptx
Computer network transport layer MODUL 2.pptx
 
Routing Protocols
Routing ProtocolsRouting Protocols
Routing Protocols
 
Computer networks unit iii
Computer networks    unit iiiComputer networks    unit iii
Computer networks unit iii
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
TCPIP SLIDES.ppt
TCPIP SLIDES.pptTCPIP SLIDES.ppt
TCPIP SLIDES.ppt
 
CN UNIT III.pptx
CN UNIT III.pptxCN UNIT III.pptx
CN UNIT III.pptx
 
Networking and Internetworking Devices
Networking and Internetworking DevicesNetworking and Internetworking Devices
Networking and Internetworking Devices
 
27 Switching.pptx
27 Switching.pptx27 Switching.pptx
27 Switching.pptx
 
Network layer
Network layerNetwork layer
Network layer
 
TCP /IP
TCP /IPTCP /IP
TCP /IP
 
Routing and switching
Routing and switchingRouting and switching
Routing and switching
 
08 coms 525 tcpip - tcp 1
08   coms 525 tcpip - tcp 108   coms 525 tcpip - tcp 1
08 coms 525 tcpip - tcp 1
 

More from swarna sudha

Positioning, pointing and drawing in Human computer Interaction
Positioning, pointing and drawing in Human computer Interaction Positioning, pointing and drawing in Human computer Interaction
Positioning, pointing and drawing in Human computer Interaction swarna sudha
 
Range, quartiles, and interquartile range
Range, quartiles, and interquartile rangeRange, quartiles, and interquartile range
Range, quartiles, and interquartile rangeswarna sudha
 
Datatypes python programming
Datatypes   python programmingDatatypes   python programming
Datatypes python programmingswarna sudha
 
Foundations of hci the computer
Foundations of hci   the computerFoundations of hci   the computer
Foundations of hci the computerswarna sudha
 
Innovative teaching think pair share function
Innovative teaching think pair share  functionInnovative teaching think pair share  function
Innovative teaching think pair share functionswarna sudha
 

More from swarna sudha (6)

Positioning, pointing and drawing in Human computer Interaction
Positioning, pointing and drawing in Human computer Interaction Positioning, pointing and drawing in Human computer Interaction
Positioning, pointing and drawing in Human computer Interaction
 
Range, quartiles, and interquartile range
Range, quartiles, and interquartile rangeRange, quartiles, and interquartile range
Range, quartiles, and interquartile range
 
Datatypes python programming
Datatypes   python programmingDatatypes   python programming
Datatypes python programming
 
Foundations of hci the computer
Foundations of hci   the computerFoundations of hci   the computer
Foundations of hci the computer
 
Innovative teaching think pair share function
Innovative teaching think pair share  functionInnovative teaching think pair share  function
Innovative teaching think pair share function
 
Icmp
IcmpIcmp
Icmp
 

Recently uploaded

How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPCeline George
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryEugene Lysak
 
Keeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesKeeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesTechSoup
 
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...Abhinav Gaur Kaptaan
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfjoachimlavalley1
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...sanghavirahi2
 
Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxjmorse8
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTechSoup
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsCol Mukteshwar Prasad
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointELaRue0
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfQucHHunhnh
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxJenilouCasareno
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online PresentationGDSCYCCE
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17Celine George
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...Nguyen Thanh Tu Collection
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxCapitolTechU
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resourcesdimpy50
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringDenish Jangid
 

Recently uploaded (20)

How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
Keeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesKeeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security Services
 
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
 
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...
 
Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptx
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 

Introduction to data link layer

  • 1. RAMCO INSTITUTE OF TECHNOLOGY
  • 2. 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.
  • 3.
  • 4. 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.
  • 6. 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 • The duty scope of the data-link layer is node-to-node.
  • 7. • 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. • In other words, 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
  • 8.
  • 9. Framing • First service provided by the data-link layer is framing. The data-link layer at each node needs to encapsulate the datagram (packet received from the network layer) in a frame before sending it to the next node
  • 10. Flow control • Flow control is a technique that allows two stations working at different speeds to communicate with each other. • It is a set of measures taken to regulate the amount of data that a sender sends so that a fast sender does not overwhelm a slow receiver.
  • 11. Error Control • Error control in data link layer is the process of detecting and correcting data frames that have been corrupted or lost during transmission. .. • Data link layer follows a technique to detect transit errors and take necessary actions, which is retransmission of frames whenever error is detected or frame is lost.
  • 12. Two Categories of Links • Although two nodes are physically connected by a transmission medium such as cable or air, we need to remember that the data-link layer controls how the medium is used. • We can have a data-link layer that uses the whole capacity of the medium; we can also have a data-link layer that uses only part of the capacity of the link. • In other words, we can have a point-to- point link or a broadcast link.
  • 13. • 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).
  • 15. LINK-LAYER ADDRESSING • 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. • so we need link layer address
  • 16. • IP addresses in a datagram should not be changed. • If the destination IP address in a datagram changes, the packet never reaches its destination; • if the source IP address in a datagram changes, the destination host or a router can never communicate with the source if a response needs to be sent back or an error needs to be reported back to the source
  • 17.
  • 18. Three Types of addresses • Link-layer protocols define three types of addresses: • Unicast, Multicast, and Broadcast. • Unicast Address • Each host or each interface of a router is assigned a unicast address. • Unicasting means one-to-one communication.
  • 19. • Multicast Address: Some link-layer protocols define multicast addresses. Multicasting means one-to-many communication. • Broadcast Address • Some link-layer protocols define a broadcast address. Broadcasting means one-to-all communication. A frame with a destination broadcast address is sent to all entities in the link
  • 20. Address Resolution Protocol • Anytime a node has an IP datagram to send to another node in a link, it has the IP address of the receiving node. • 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.
  • 21. Position of ARP in TCP/IP protocol suite
  • 22. • Anytime a host or a router needs to find the link- layer address of another host or router in its network, it sends an ARP request packet. • The packet 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
  • 24. • 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
  • 26. • The hardware type field defines the type of the link-layer protocol; Ethernet is given the type 1. • The protocol type field defines the network- layer protocol: IPv4 protocol is (0800)16. • The source hardware and source protocol addresses are variable-length fields defining the link-layer and network-layer addresses of the sender