Unit-II Data Link Layer
Unit-II Data Link Layer
Unit-II Data Link Layer
Relates to Lab 2.
This module covers data link layer issues, such as local area networks
(LANs) and point-to-point links, Ethernet, and the Point-to-Point Protocol
(PPP).
3
Data Link Layer
• The main tasks of the data link layer are:
• Transfer data from the network layer of one machine to
the network layer of another machine using hop by hop
transmission over single links.
• Convert the raw bit stream of the physical layer into
groups of bits (“frames”)
Network Network
Layer Layer
Data Link Data Link
Layer Layer
Physical Physical
Layer Layer
4
Types of Single Segment Networks
• There are two types of communication networks:
– Broadcast Networks: All stations share a single
communication channel
– Point-to-Point Networks: Pairs of hosts (or routers) are
directly connected
5
Local Area Network
• Local area networks (LANs) typically connect
computers within a building or a campus
• Almost all LANs are broadcast networks
• Typical topologies of LANs are bus or ring or
star
• We will work with Ethernet LANs. Ethernet has
a bus or star (Wifi) topology.
6
Bus LAN Ring LAN
MAC and LLC
• In any broadcast network, the stations must ensure that
only one station transmits at a time on the shared
communication channel
• The protocol that determines who can transmit on a
broadcast channel is called the Medium Access Control
(MAC) protocol
• The MAC protocol is implemented
in the MAC sublayer which is the to Network Layer
Data Link
Logical Link
Layer
• The MAC is physical layer/topology Control
Medium Access
dependent Control
• The higher portion of the data link
layer is often called the Logical Link to Physical Layer
Control (LLC)
7
IEEE 802 Standards
• IEEE 802 is a family of standards for LANs,
which defines an LLC and several MAC
sublayers
IEEE 802 standard
IEEE Higher
Reference Layer
802.1 Model
Logical Link
802.2 Control Data Link
Medium Layer
802.3
802.4
802.5
802.6
Access
Control
Physical Physical
Layer Layer
8
Ethernet
• Speed: 10-1000 Mbps
• Standard: 802.3, Ethernet II (DIX)
9
Bus Topology
• 10Base5 and 10Base2 Ethernets have a bus
topology
Ethernet
10
Star Topology
• With 10Base-T and higher bit rates, stations
are connected to a hub in a star configuration.
• Wifi, basically wireless Ethernet, is also a star,
Multiple stations connected to one Access
Point (AP).
11
Hub
Ethernet Hubs vs. Ethernet Switches
• An Ethernet switch is a packet switch for Ethernet frames
• Buffering of frames prevents collisions.
• Each port is isolated and builds its own collision domain
• An Ethernet Hub does not perform buffering:
• Collisions occur if two frames arrive at the same time.
Hub Switch
HighSpeed
CSMA/CD CSMA/CD CSMA/CD CSMA/CD
Backplane
CSMA/CD CSMA/CD CSMA/CD CSMA/CD
Input Output
Buffers Buffers
12
Ethernet II, (RFC 894)
1. Minimum Ethernet Frame size (legacy) has to be 64bytes
2. Minimum Ethernet data payload = 64 – 6 – 6 – 2 - 4 = 46bytes
3. Padding is used to fill up the data field if the IP datagram is less
than 46 bytes
Etherne
802.3 MAC
t
destination source
type data CRC
address address
6 6 2 46-1500 4
0800 IP datagram
2 38-1492
2 28 10
2 28 10
13
Video1
Video 2