SlideShare a Scribd company logo
UNIT II
DATA LINK LAYER
OVERVIEW
Data Link Control
Error Detection
VRC
LRC
CRC
Checksum
Error Correction
Hamming Codes
MAC
Ethernet
Token ring
Token Bus
Wireless LAN
Bluetooth
Bridges
Data Link Control
Minimum 2 devices are needed for data
communication. So line discipline is necessary
for co-operation b/w2 devices.
The 2 important functions of data link layer
is flow control and error control.This
functions are otherwise called as Data link
control.
Communication
Line Discipline
It coordinates the link system
It is done in 2 ways
ENQ (Enquiry)
Used in peer peer communication
Enquire whether there is arequired link b/w
two devices
Check whether the intended device is capable to receive
ACK (Acknowledgment)
Used in Primary secondary communication
The intended device willacknowledge about its status to the
receiver
There are2 categoriesinline
discipline
ENQ/ACK LineDiscipline
Select
It is a line discipline used in topologies
with primary secondary relationship.
Select
It is uses whenever the primary device
has something to send.ie)Primary
controls the link.
Select
Select
Poll
The polling function is used by the
primary device to Select transmissions
from the secondary devices.
If the primary device is ready to receive
data , It ask each device in turn if it has
anything to send.
Poll
Flow Control
It is a set of procedures to tell the sender
how much data it can transmit before it must
wait for an acknowledgement from the
receiver.
Two categories of flow control:
Stop-and-wait
Send one frame at a time.
Sliding window
Send several frames at a time.
Data Link layer Presentation form Behrouz and furozen
Stop-and-wait
Sender sends one frame and waits for an
acknowledgement before sending the next frame.
Stop-and-wait
Advantages:
Simplicity
.
Each frame is checked and acknowledged
before the next frame is sent.
Disadvantages:
Slow.
Can add significantly to the total transmission time
ifthe distance betweendevices is long.
Inefficiency
Each frame is alone on the line.
SlidingWindow
Sender can send several frames before
needing an acknowledgement.
Advantages:
The link can carry several frames at once.
Its capacity can be used efficiently.
ErrorControl
Data Link layer Presentation form Behrouz and furozen
Error Detection
Error Detection
Can detect all single-bit errors. Can detect burst errors only if the total
number of errors in each data unit is odd.
Even number of ones
add 0
Odd number of ones
add 1
Increases the likelihood of detecting burst errors.
n bits LRC can detect a burst error of n bits.
Errors may be undetected if:
Have even number of errors in that position.
Data Link layer Presentation form Behrouz and furozen
Data Link layer Presentation form Behrouz and furozen
You will experience a painful
sharpening from time to time, but
this is required if you are to become
a better pencil.
Error Correction
RedundancyBits
You have the
ability to
correct any
mistakes you
might make.
Hamming Codes-Error correction
Hamming codes, like polynomial codes,
are appended to the transmitted message
Hamming codes, unlike polynomial codes,
contain the information necessary to
locate asingle bit error
CalculatingtheHamming Code
The key to the Hamming Code is the use of extra parity bits to allow the
identificationof asingle error. Create the code word as follows:
Mark allbit positions that are powers of two as parity bits.(positions 1,2,4,8, 16,
32, 64,etc.)
All other bit positions are for the data to be encoded. (positions 3,5,6,7,9,10,
11,12,13,14,15,17,etc.)
Each parity bit calculatesthe parity for some of the bits in the code word.The
position of the parity bit determines the sequence of bits that it alternately
checks and skips.
Position 1:check 1 bit,skip 1 bit,check 1 bit,skip 1 bit,etc.(1,3,5,7,9,11,13,15,...)
Position 2:check 2 bits,skip 2 bits,check 2 bits,skip 2 bits,etc.
(2,3,6,7,10,11,14,15,...)
Position 4:check 4 bits,skip 4 bits,check 4 bits,skip 4 bits,etc.
(4,5,6,7,12,13,14,15,20,21,22,23,...)
Position 8:check 8 bits,skip 8 bits,check 8 bits,skip 8bits,etc.(8-15,24-31,40-
47,...)
Position 16:check 16 bits,skip 16 bits,check 16 bits,skip 16 bits,etc.(16-31,48-
63,80-95,...)
Position 32:check 32 bits,skip 32 bits,check 32 bits,skip 32 bits,etc.(32-63,96-
127,160-191,...)
etc.
Set aparity bit to 1 ifthe totalnumber of ones in the positions it checks is odd.
Set aparity bit to 0 ifthe total number of ones in the positions itchecks is even.
Position ofRedundancy bitin
Hamming code
Error
Error Control
Stop-and-WaitARQ
Sliding windowARQ
Data Link layer Presentation form Behrouz and furozen
Data Link layer Presentation form Behrouz and furozen
Data Link layer Presentation form Behrouz and furozen
MAC
IEEE has subdivided(Project 802) the data
link layer into two sub layers:
Logical Link Control
Medium access control
Functions of MAC
It resolves the contention of shared media
It contains allinformation to move information
from one placeto another
It contains the physical address of next station
to route packet.
MAC protocol are specific to LAN
The project 802 which governs internet working. Here each
subdivision is identified by a number
802.1(internetworking)
802.2(LLC)
and MAC modules
802.3(CSMA/CD)
802.4(Tokenbus)
802.5(Tokenring)
Figure 13.1 IEEE standard for LANs
MAC protocol arespecifictoLAN
LAN is aLocal Area Network used for
communication inside building
Protocols for LAN are,
Ethernet
Token Ring
Token bus
FDDI
IEEE STANDARDS
Ethernet: It is a LAN protocol that is used in Bus and Star topologiesand
implements CSMA/CD as the medium access method
Original (traditional) Ethernet developed in 1980 by
three companies: Digital, Intel, Xerox (DIX).
In 1985, the Computer Society of the IEEE started a
project, called Project 802, to set standards to enable
intercommunication among equipment from a variety of
manufacturers.
Current version is called IEEE Ethernet
IEEE 802.3 supports LAN standardEthernet
IEEE802.3 defines two categories
Baseband
Broadband
Base band has fivedifferent category
10Base5
10Base2
10BaseT
1Base5 etc.,
Broad band has a category
10Broad36
Access Method:CSMA/CD
When multiple user access the single line ,there is a
danger of signals overlapping and destroying each
other(Traffic) .such anoverlap is called Collisions.
To avoid this the access method used in Ethernet is
carrier sense multiple access/collision detection
In CSMA any workstation wishing to transmit must
listen to existing traffic on the line
If no voltage is detected,lineis considered idle
CSMA cuts down the number of collisions, but cant
eliminate. Collisions still occur if both station try to
listen ata time.
Figure 13.4 802.3 MAC frame
IEEE Ethernet
In IEEE 802.3 Ethernet Data link layeris splitinto two sublayers:
Bottom part:MAC
The frameis called IEEE 802.3
Handles framing,MAC addressing,MediumAccess control
Specific implementation for each LAN protocol
Defines CSMA/CD as the access method for Ethernet LANs
and Token passing
method for Token Ring.
Implemented in hardware
Top part:LLC (Logical Link Control)
The subframe is called IEEE 802.2
Provides error and flow control ifneeded
It makes the MAC sublayer transparent
Allows interconnectivitybetween different LANs data link layers
Used to multiplex multiplenetwork layer protocols in the datalink
layer
frame
Implemented in software
Ethernet Provides Unreliable, connectionless Service
Ethernet data link layer protocol provides
connectionless service to the network layer
No handshaking between sending and receiving
adapter.
Ethernet protocol provides Unreliable service to the
network layer :
Receiving adapter doesn t send ACK or NAK to
sending adapter
This means stream of datagrams passed to network
layer can have gaps (missing data)
Gaps will be filled if application is using reliable transport layer
protocol
Otherwise, application will see the gaps
Ethernet
Frame formats. (a) DIX Ethernet ,(b) IEEE
802.3.
FCS
FCS
Ethernet Frame format
8 bytes with pattern 10101010 used to synchronize receiver, sender clock rates.
In IEEE 802.3, eighth byte is start of frame (10101011)
Addresses: 6 bytes (explained latter)
Type (DIX)
Indicates the type of the Network layer protocol being carried in the payload
(data) field, mostly IP but others may be supported such as IP (0800), Novell IPX
(8137) andAppleTalk (809B),ARP (0806) )
Allow multiple network layer protocols to be supported on a single machine
(multiplexing)
Its value starts at 0600h (=1536 in decimal)
Length (IEEE 802.3): number of bytes in the data field.
Maximum 1500 bytes (= 05DCh)
CRC: checked at receiver, if error is detected, the frame is discarded
CRC-32
Data: carries data encapsulated from the upper-layer protocols
Pad: Zeros are added to the data field to make the minimum data length = 46 bytes
Ethernet Frame
PREAMBLE
Ethernet address
Six bytes = 48 bits
Flat address not hierarchical
Burned into the NIC ROM
First three bytes from left specify the vendor. Cisco 00-00-
0C, 3Com 02-60-8C and the last 24 bit should be created
uniquely by the company
Destination Address canbe:
Unicast: second digit from left is even (one recipient)
Multicast: Second digit from left is odd (group of stations
to receive the frame conferencing applications)
Broadcast (ALL ones) (all stations receive theframe)
Source address is always Unicast
Figure 13.3 Ethernet evolution through four generations
Categories of traditional Ethernet
<data rate><Signaling method><Max segment length or cable type>
IEEE 802.3 Cable Types
Name Cable Max. Max Cable
Segment
Length
Nodes
/segment
Toplogy
10Base5 thick coax 500 meters 100
Bus
10Base2 thin coax 185 meters 30
Bus
10BaseT twisted pair 100 meters 1 Star
10BaseF Fiber Optic 2Km 1
Star
Figure 13.10 10Base5 implementation
Connection of stations to the medium using 10Base2
10BaseT
Uses twisted pair Cat3 cable
Star-wire topology
A hub functions as a repeater with additional functions
Fewer cable problems, easier to troubleshoot than coax
Cable length at most 100 meters
Figure 13.12 10Base-T implementation
Figure 13.13 10Base-F implementation
Fast Ethernet
100 Mbps transmission rate
same frame format, media access, and collision
detection rules as 10 Mbps Ethernet
can combine 10 Mbps Ethernet and Fast Ethernet
on same network using a switch
media: twisted pair (CAT 5) or fiber optic cable
(no coax)
Star-wire topology
Similar to 10BASE-T
CAT 3
CAT 5
Figure 13.19 Fast Ethernet topology
Figure 13.20 Fast Ethernet implementations
Gigabit Ethernet
Speed 1Gpbs
Minimum frame length is 512 bytes
Operates in full/halfduplex modes mostly
full duplex
In the full-duplex mode of Gigabit Ethernet,
there is no collision;
the maximum length of the cable is
determined by the signal attenuation
in the cable.
Figure 13.23 Gigabit Ethernet implementations
10Gbps Ethernet
Maximum link distances cover 300 m to 40 km
Full-duplex mode only
No CSMA/CD
Uses optical fiber only
TokenRing
It allows each station to sent one frame
.
The access control mechanism used by
Ethernet is inefficient sometimes because
of collision.
It solves the collision problem by passing
token
Initially astation waits for token, ifa
token is free the station maysend adata
frame
Cont..,
This frame proceeds around the ring ,being
regenerated by each station .Eachstation
examines the destination address finds the
frame is addressed to another station and relays
it to its neighbor
.
The intended recipient recognizes its own
address and copies the message and set the
address bit
The token finallyreach the sender and it
recognizes that the datais delivered through
address bit
Token is passed from NIC to NIC
TokenRing
TokenBus
It combines the feature of token ring and
Ethernet
FDDI
Fiber Distributed Data Interface
local area network protocol standardized by ANSI
100-Mbps token passing
Dual-ring LAN
A high-speed backbone technology
High bandwidth
Optical fiber transmission
Allows up to 1000 stations
FDDI Architecture
Components of FDDI
Fiber optic cable
A concentrator (ring)
Stations: 2 types
DAS (Dual Attachment Station) or Class
A:
Connected to both the rings
SAS (Single Attachment Station) or Class
B:
Connected to primary ring
FDDI Frame Format
Similar to token ring
frame
Networking andinternetworking
devices:
An internet is ainterconnection of
individualnetwork. So to create ainternet
we need ainternetworking devices. ie)
Linking anumber of
Internet -WWW
internet-Interconnection of LAN
Why Interconnect?
To separate / connect one corporate division with another.
To connect two LANs with differentprotocols.
To connect a LAN to the Internet.
To break a LAN into segments to relieve traffic congestion.
To provide a security wall between two different types ofusers.
Connecting Devices
Networking Devices
Repeaters Bridges
Internetworking
Devices
Routers Gateways
Introduction
Many times it is necessary to connect a local area network to anotherlocal
area network or to a wide area network.
Local area network to local area network connections are usually performed
with a bridge.
Local area network to wide area network connections are usually performed
with a router.
A third device, the switch, can be used to interconnect segmentsof a local
area network.
98/
25
Connecting Devices
Hub
Repeater:
A repeater is aregenerator, not an
amplifier
A repeater installed on alink receives the
signal before it becomes too weak or
corrupted ,regenerates the original bit
pattern, and put the refreshed copy back
onto the link.
Gateways:
A gatewayis aprotocolconvertor.
It accepts apacket format for one
protocol(e.g.,Apple T
alk) and convertsit
into apacket format for another
protocol(e.g.,TCP/IP).
104
/ 25
A gateway
SNA network (IBM)
Netware network (Novell)
105
/ 25
Bridges
Divide alarge network into smaller segment
It filters the traffic . It contains logic(Bridge
table) that allows them to keep the traffic for
each segment separate.
Ie) Isolating and controlling the link problems
(e.g.congestion)
Bridges have look-up table that contains physical
address of every station connected to it.
Data Link layer Presentation form Behrouz and furozen
108
/ 25
Bridge
When aframeentersabridge,itchecks theaddressof
thedestinationand forward thenewcopyonlyto the
segmentto whichtheaddresswhich belongs
Types
Simple
Multiport
Transparent
Remote
Source routing
Simple Bridge
It is aless expensive type of bridge
It links 2 segments (LANS) and lists the
address of all the stations in table
included in each of them.
Here address must be entered manually.
The table is modified when stations are
added and removed.
Multiport Bridge
It is used to connect more than two LANS.
So the bridge has 3 tables.
Here address must be entered manually
Transparent Bridge:
A transparent or learning bridge builds its table of
station on its own (automatically).
The table is empty when it is installed, it builds its table
when it encounters the packet for transmission. It
uses the source address for building table.
It identifies the changes and update the table when
system moved from one station to another
113
/ 25
Multiport bridge
Cont.,
Bridges are normally installed
redundantly,that is two LANS may be
connected by more than one bridge.in
this cases they maycreate a loop.
So packet may go round and round,It can
be avoided by algorithms like
Spannig tree algorithm
Source routing
115
/ 25
Functionofa bridge
Data Communications and Computer Networks
Remote Bridges
A remote bridge is capable of passing a data frame
from one local area network to another when the two
LANs are separated by a long distance and there is a
wide area network connecting the two LANs.
A remote bridge takes the frame before it leaves the
first LAN and encapsulates the WAN headers and
trailers.
When the packet arrives at the destination remote
bridge, that bridge removes the WAN headers and
trailers leaving the original frame.
Data Communications and Computer Networks
Switches
A switch is a combination of a hub and a bridge (multi-
port bridge).
It can interconnect two or more workstations, but like a
bridge, it observes traffic flow and learns.
When a frame arrives at a switch, the switch examines the
destination address and forwards the frame out the one
necessary connection.
Workstations that connect to a hub are on a shared
segment.
Workstations that connect to a switch are on a switched
segment.
Wireless LANs
LAN/WLANWorld
LANs provide connectivity for interconnecting
computing resources atthe local levels of an
organization
Wired LANs
Limitations because of physical,hard-
wired infrastructure
Wireless LANs provide
Flexibility
Portability
Mobility
Ease of Installation
Wireless LAN Applications
Medical Professionals
Education
Temporary Situations
Airlines
Security Staff
Emergency Centers
IEEE 802.11 Wireless LAN
Standard
In response to lacking standards, IEEE
developed the first internationally
recognized wireless LAN standard IEEE
802.11
IEEE published 802.11 in 1997, after seven
years of work
Scope of IEEE 802.11 is limited to Physical
and Data Link Layers.
Benefitsof802.11 Standard
Appliance Interoperability
Fast Product Development
Stable Future Migration
Price Reductions
The 802.11 standard takes into account the
following significant differences between
wireless and wired LANs:
Power Management
Security
Bandwidth
WLAN Topology
Ad-Hoc Network
The BSS without an AP is a stand-alone network and cannot send data to otherBSSs.
they can locate one another and agree to be part of a BSS.
WLAN Topology
Infrastructure
EX: cellular network if we consider each BSS to be a cell and
each AP to be a basestation.
Basic service sets (BSSs)
StationTypes
IEEE 802.11 defines three types of stations
based on their mobility in awireless LAN:
no-transition
A station is either stationary (not moving) or moving only inside a BSS
BSS-transition
station can move from one BSS to another
, but the movement is confined
inside one ESS.
and ESS-transition mobility
.
A station can move from one ESS to another
collisionavoidanceCSMAICA
network allocation vector (NAV) used to
avoid collision.
RTS frame includes the duration of time that it needs to occupy
the channel.
stations affected by this transmission create a timer called (NAV)
the network allocation vector (NAV) shows the time must pass
before these stations allowed to check the channel for idleness.
there is no mechanism for collision detection,ifthe
sender has not received aCTS frame from the receiver
,
assumes there has been acollision ,thesender tries
again.
BLUETOOTH
Bluetooth is a wireless LAN technology
designed to connect devices of different functions
such as telephones, notebooks, computers,
cameras, printers, coffee makers, and so on. A
Bluetooth LAN is an ad hoc network, which
means that the network is formed spontaneously.
Bluetooth defines two types of networks:
piconet and scatternet.
Piconet
A Bluetooth network is calledapiconet, or asmall net.
It can haveup to eight stations, one of which is called the master; the rest
are called slaves.
Maximum of seven slaves. Only one master
.
Slaves synchronize their clocks and hopping sequence with the master
.
But anadditionaleight slaves canstay in parked state,which means they
canbe synchronized with the master but cannot takepart in
communication until it is moved from the parked state.
Scatternet
Piconets canbecombined to form what is calleda
scatternet.
A slavestation inone piconet canbecome the
master in
another piconet.
Bluetooth devices hasabuilt-inshort-range radio
transmitter.
Bluetooth layers
Radio Layer: Roughly equivalent to physical layerof the Internet model.
Physical links canbe synchronous or asynchronous.
Uses Frequency-hopping spread spectrum [Changing frequencyof usage].
Changes it modulation frequency1600 times per second.
Uses frequencyshift keying (FSK )with Gaussian bandwidth filtering to
transform bits to a signal.
Baseband layer: Roughly equivalent to MAC sublayer in LANs. Access is
usingTime Division (Time slots).
Length of time slot = dwell time = 625 microsec. So, during one frequency
,a
sender sends aframe to aslave,or aslave sends aframe to themaster
.
Time division duplexing TDMA (TDD-TDMA) is akind of half-duplex
communication in which the slave and receiver send and receive data,but
not atthe same time (half-duplex). However
, the communication for each
direction uses different hops, like walkie-talkies.
Bluetooth layers
PhysicalLinks
Synchronous connection-oriented (SCO)
Latency is important than integrity
.
Transmission using slots.
No retransmission.
Asynchronous connectionless link (ACL)
Integrity is important than latency
.
Does like multiple-slave communication.
Retransmission is done.
L2CAP (Logical Link Control andAdaptationProtocol)
Equivalent to LLC sublayer in LANs.
Used for data exchange on ACL Link. SCO channels do not use L2CAP
.
Frame format has 16-bit length [Size of data coming from upper layer in bytes],
channel ID, data and control.
Can do Multiplexing, segmentation and Reassembly, QoS [with no QoS, best-
effort delivery is provided] and Group mangement [Can do like multicast group,
using some kind of logical addresses].
Data Link layer Presentation form Behrouz and furozen

More Related Content

PPTX
UNIT-2 PPT Data link layer.pptx
PPTX
Link layer, checksum, ethenet.pptx
PPT
Direct Link Lan
PDF
Cs8591 Computer Networks
PDF
CS8591 Unit 2 Computer networks basics.pdf
PDF
Cs8591 Computer Networks
PPTX
Ethernet
PPTX
module 2 cn new.pptx
UNIT-2 PPT Data link layer.pptx
Link layer, checksum, ethenet.pptx
Direct Link Lan
Cs8591 Computer Networks
CS8591 Unit 2 Computer networks basics.pdf
Cs8591 Computer Networks
Ethernet
module 2 cn new.pptx

Similar to Data Link layer Presentation form Behrouz and furozen (20)

PPS
Introduction to the OSI 7 layer model and Data Link Layer
PPTX
Ethernet 802.3.pptx
PPT
Media Access and Internetworking
PPTX
M5 L4 Ethernet-Wired LAN.pptx communication
DOCX
Expt no.3
PDF
Communication Networks basics and very important topic
PPTX
CN UNIT II.pptx
PPTX
CN-Unit_2-DLL-Etherne nnnnnnnnnnnt .pptx
PDF
Unit-2 Media Access Protocols.pdf
PPTX
Multiple Access Protocal
PPTX
Computer Networks
PPTX
Chapter 2.1.1.pptx
PPT
PDF
Ethernet_Networks
PPT
wired Lans ethernet in routing and switching
PPTX
Local Area Network – Wired LAN
PPTX
Ethernet Computer network
PPT
PPTX
Advanced Networking link layer..chap-5.pptx
Introduction to the OSI 7 layer model and Data Link Layer
Ethernet 802.3.pptx
Media Access and Internetworking
M5 L4 Ethernet-Wired LAN.pptx communication
Expt no.3
Communication Networks basics and very important topic
CN UNIT II.pptx
CN-Unit_2-DLL-Etherne nnnnnnnnnnnt .pptx
Unit-2 Media Access Protocols.pdf
Multiple Access Protocal
Computer Networks
Chapter 2.1.1.pptx
Ethernet_Networks
wired Lans ethernet in routing and switching
Local Area Network – Wired LAN
Ethernet Computer network
Advanced Networking link layer..chap-5.pptx
Ad

Recently uploaded (20)

PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PPTX
Amdahl’s law is explained in the above power point presentations
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PPTX
Software Engineering and software moduleing
PDF
Visual Aids for Exploratory Data Analysis.pdf
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PPTX
communication and presentation skills 01
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PPTX
Module 8- Technological and Communication Skills.pptx
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PDF
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
PPTX
Feature types and data preprocessing steps
PPTX
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
PPTX
introduction to high performance computing
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
distributed database system" (DDBS) is often used to refer to both the distri...
Amdahl’s law is explained in the above power point presentations
August 2025 - Top 10 Read Articles in Network Security & Its Applications
Software Engineering and software moduleing
Visual Aids for Exploratory Data Analysis.pdf
"Array and Linked List in Data Structures with Types, Operations, Implementat...
communication and presentation skills 01
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
Module 8- Technological and Communication Skills.pptx
Exploratory_Data_Analysis_Fundamentals.pdf
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
Feature types and data preprocessing steps
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
introduction to high performance computing
August -2025_Top10 Read_Articles_ijait.pdf
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Ad

Data Link layer Presentation form Behrouz and furozen

  • 2. OVERVIEW Data Link Control Error Detection VRC LRC CRC Checksum Error Correction Hamming Codes MAC Ethernet Token ring Token Bus Wireless LAN Bluetooth Bridges
  • 3. Data Link Control Minimum 2 devices are needed for data communication. So line discipline is necessary for co-operation b/w2 devices. The 2 important functions of data link layer is flow control and error control.This functions are otherwise called as Data link control. Communication
  • 4. Line Discipline It coordinates the link system It is done in 2 ways ENQ (Enquiry) Used in peer peer communication Enquire whether there is arequired link b/w two devices Check whether the intended device is capable to receive ACK (Acknowledgment) Used in Primary secondary communication The intended device willacknowledge about its status to the receiver
  • 7. Select It is a line discipline used in topologies with primary secondary relationship. Select It is uses whenever the primary device has something to send.ie)Primary controls the link.
  • 10. Poll The polling function is used by the primary device to Select transmissions from the secondary devices. If the primary device is ready to receive data , It ask each device in turn if it has anything to send.
  • 11. Poll
  • 12. Flow Control It is a set of procedures to tell the sender how much data it can transmit before it must wait for an acknowledgement from the receiver. Two categories of flow control: Stop-and-wait Send one frame at a time. Sliding window Send several frames at a time.
  • 14. Stop-and-wait Sender sends one frame and waits for an acknowledgement before sending the next frame.
  • 15. Stop-and-wait Advantages: Simplicity . Each frame is checked and acknowledged before the next frame is sent. Disadvantages: Slow. Can add significantly to the total transmission time ifthe distance betweendevices is long. Inefficiency Each frame is alone on the line.
  • 16. SlidingWindow Sender can send several frames before needing an acknowledgement. Advantages: The link can carry several frames at once. Its capacity can be used efficiently.
  • 21. Can detect all single-bit errors. Can detect burst errors only if the total number of errors in each data unit is odd. Even number of ones add 0 Odd number of ones add 1
  • 22. Increases the likelihood of detecting burst errors. n bits LRC can detect a burst error of n bits. Errors may be undetected if: Have even number of errors in that position.
  • 25. You will experience a painful sharpening from time to time, but this is required if you are to become a better pencil.
  • 28. You have the ability to correct any mistakes you might make.
  • 29. Hamming Codes-Error correction Hamming codes, like polynomial codes, are appended to the transmitted message Hamming codes, unlike polynomial codes, contain the information necessary to locate asingle bit error
  • 30. CalculatingtheHamming Code The key to the Hamming Code is the use of extra parity bits to allow the identificationof asingle error. Create the code word as follows: Mark allbit positions that are powers of two as parity bits.(positions 1,2,4,8, 16, 32, 64,etc.) All other bit positions are for the data to be encoded. (positions 3,5,6,7,9,10, 11,12,13,14,15,17,etc.) Each parity bit calculatesthe parity for some of the bits in the code word.The position of the parity bit determines the sequence of bits that it alternately checks and skips. Position 1:check 1 bit,skip 1 bit,check 1 bit,skip 1 bit,etc.(1,3,5,7,9,11,13,15,...) Position 2:check 2 bits,skip 2 bits,check 2 bits,skip 2 bits,etc. (2,3,6,7,10,11,14,15,...) Position 4:check 4 bits,skip 4 bits,check 4 bits,skip 4 bits,etc. (4,5,6,7,12,13,14,15,20,21,22,23,...) Position 8:check 8 bits,skip 8 bits,check 8 bits,skip 8bits,etc.(8-15,24-31,40- 47,...) Position 16:check 16 bits,skip 16 bits,check 16 bits,skip 16 bits,etc.(16-31,48- 63,80-95,...) Position 32:check 32 bits,skip 32 bits,check 32 bits,skip 32 bits,etc.(32-63,96- 127,160-191,...) etc. Set aparity bit to 1 ifthe totalnumber of ones in the positions it checks is odd. Set aparity bit to 0 ifthe total number of ones in the positions itchecks is even.
  • 32. Error
  • 39. MAC IEEE has subdivided(Project 802) the data link layer into two sub layers: Logical Link Control Medium access control Functions of MAC It resolves the contention of shared media It contains allinformation to move information from one placeto another It contains the physical address of next station to route packet. MAC protocol are specific to LAN
  • 40. The project 802 which governs internet working. Here each subdivision is identified by a number 802.1(internetworking) 802.2(LLC) and MAC modules 802.3(CSMA/CD) 802.4(Tokenbus) 802.5(Tokenring)
  • 41. Figure 13.1 IEEE standard for LANs
  • 42. MAC protocol arespecifictoLAN LAN is aLocal Area Network used for communication inside building Protocols for LAN are, Ethernet Token Ring Token bus FDDI
  • 43. IEEE STANDARDS Ethernet: It is a LAN protocol that is used in Bus and Star topologiesand implements CSMA/CD as the medium access method Original (traditional) Ethernet developed in 1980 by three companies: Digital, Intel, Xerox (DIX). In 1985, the Computer Society of the IEEE started a project, called Project 802, to set standards to enable intercommunication among equipment from a variety of manufacturers. Current version is called IEEE Ethernet
  • 44. IEEE 802.3 supports LAN standardEthernet IEEE802.3 defines two categories Baseband Broadband Base band has fivedifferent category 10Base5 10Base2 10BaseT 1Base5 etc., Broad band has a category 10Broad36
  • 45. Access Method:CSMA/CD When multiple user access the single line ,there is a danger of signals overlapping and destroying each other(Traffic) .such anoverlap is called Collisions. To avoid this the access method used in Ethernet is carrier sense multiple access/collision detection In CSMA any workstation wishing to transmit must listen to existing traffic on the line If no voltage is detected,lineis considered idle CSMA cuts down the number of collisions, but cant eliminate. Collisions still occur if both station try to listen ata time.
  • 46. Figure 13.4 802.3 MAC frame
  • 47. IEEE Ethernet In IEEE 802.3 Ethernet Data link layeris splitinto two sublayers: Bottom part:MAC The frameis called IEEE 802.3 Handles framing,MAC addressing,MediumAccess control Specific implementation for each LAN protocol Defines CSMA/CD as the access method for Ethernet LANs and Token passing method for Token Ring. Implemented in hardware Top part:LLC (Logical Link Control) The subframe is called IEEE 802.2 Provides error and flow control ifneeded It makes the MAC sublayer transparent Allows interconnectivitybetween different LANs data link layers Used to multiplex multiplenetwork layer protocols in the datalink layer frame Implemented in software
  • 48. Ethernet Provides Unreliable, connectionless Service Ethernet data link layer protocol provides connectionless service to the network layer No handshaking between sending and receiving adapter. Ethernet protocol provides Unreliable service to the network layer : Receiving adapter doesn t send ACK or NAK to sending adapter This means stream of datagrams passed to network layer can have gaps (missing data) Gaps will be filled if application is using reliable transport layer protocol Otherwise, application will see the gaps
  • 49. Ethernet Frame formats. (a) DIX Ethernet ,(b) IEEE 802.3. FCS FCS Ethernet Frame format
  • 50. 8 bytes with pattern 10101010 used to synchronize receiver, sender clock rates. In IEEE 802.3, eighth byte is start of frame (10101011) Addresses: 6 bytes (explained latter) Type (DIX) Indicates the type of the Network layer protocol being carried in the payload (data) field, mostly IP but others may be supported such as IP (0800), Novell IPX (8137) andAppleTalk (809B),ARP (0806) ) Allow multiple network layer protocols to be supported on a single machine (multiplexing) Its value starts at 0600h (=1536 in decimal) Length (IEEE 802.3): number of bytes in the data field. Maximum 1500 bytes (= 05DCh) CRC: checked at receiver, if error is detected, the frame is discarded CRC-32 Data: carries data encapsulated from the upper-layer protocols Pad: Zeros are added to the data field to make the minimum data length = 46 bytes Ethernet Frame PREAMBLE
  • 51. Ethernet address Six bytes = 48 bits Flat address not hierarchical Burned into the NIC ROM First three bytes from left specify the vendor. Cisco 00-00- 0C, 3Com 02-60-8C and the last 24 bit should be created uniquely by the company Destination Address canbe: Unicast: second digit from left is even (one recipient) Multicast: Second digit from left is odd (group of stations to receive the frame conferencing applications) Broadcast (ALL ones) (all stations receive theframe) Source address is always Unicast
  • 52. Figure 13.3 Ethernet evolution through four generations
  • 53. Categories of traditional Ethernet <data rate><Signaling method><Max segment length or cable type>
  • 54. IEEE 802.3 Cable Types Name Cable Max. Max Cable Segment Length Nodes /segment Toplogy 10Base5 thick coax 500 meters 100 Bus 10Base2 thin coax 185 meters 30 Bus 10BaseT twisted pair 100 meters 1 Star 10BaseF Fiber Optic 2Km 1 Star
  • 55. Figure 13.10 10Base5 implementation
  • 56. Connection of stations to the medium using 10Base2
  • 57. 10BaseT Uses twisted pair Cat3 cable Star-wire topology A hub functions as a repeater with additional functions Fewer cable problems, easier to troubleshoot than coax Cable length at most 100 meters
  • 58. Figure 13.12 10Base-T implementation
  • 59. Figure 13.13 10Base-F implementation
  • 60. Fast Ethernet 100 Mbps transmission rate same frame format, media access, and collision detection rules as 10 Mbps Ethernet can combine 10 Mbps Ethernet and Fast Ethernet on same network using a switch media: twisted pair (CAT 5) or fiber optic cable (no coax) Star-wire topology Similar to 10BASE-T CAT 3 CAT 5
  • 61. Figure 13.19 Fast Ethernet topology
  • 62. Figure 13.20 Fast Ethernet implementations
  • 63. Gigabit Ethernet Speed 1Gpbs Minimum frame length is 512 bytes Operates in full/halfduplex modes mostly full duplex
  • 64. In the full-duplex mode of Gigabit Ethernet, there is no collision; the maximum length of the cable is determined by the signal attenuation in the cable.
  • 65. Figure 13.23 Gigabit Ethernet implementations
  • 66. 10Gbps Ethernet Maximum link distances cover 300 m to 40 km Full-duplex mode only No CSMA/CD Uses optical fiber only
  • 67. TokenRing It allows each station to sent one frame . The access control mechanism used by Ethernet is inefficient sometimes because of collision. It solves the collision problem by passing token Initially astation waits for token, ifa token is free the station maysend adata frame
  • 68. Cont.., This frame proceeds around the ring ,being regenerated by each station .Eachstation examines the destination address finds the frame is addressed to another station and relays it to its neighbor . The intended recipient recognizes its own address and copies the message and set the address bit The token finallyreach the sender and it recognizes that the datais delivered through address bit Token is passed from NIC to NIC
  • 70. TokenBus It combines the feature of token ring and Ethernet
  • 71. FDDI Fiber Distributed Data Interface local area network protocol standardized by ANSI 100-Mbps token passing Dual-ring LAN A high-speed backbone technology High bandwidth Optical fiber transmission Allows up to 1000 stations
  • 73. Components of FDDI Fiber optic cable A concentrator (ring) Stations: 2 types DAS (Dual Attachment Station) or Class A: Connected to both the rings SAS (Single Attachment Station) or Class B: Connected to primary ring
  • 74. FDDI Frame Format Similar to token ring frame
  • 75. Networking andinternetworking devices: An internet is ainterconnection of individualnetwork. So to create ainternet we need ainternetworking devices. ie) Linking anumber of Internet -WWW internet-Interconnection of LAN
  • 76. Why Interconnect? To separate / connect one corporate division with another. To connect two LANs with differentprotocols. To connect a LAN to the Internet. To break a LAN into segments to relieve traffic congestion. To provide a security wall between two different types ofusers.
  • 77. Connecting Devices Networking Devices Repeaters Bridges Internetworking Devices Routers Gateways
  • 78. Introduction Many times it is necessary to connect a local area network to anotherlocal area network or to a wide area network. Local area network to local area network connections are usually performed with a bridge. Local area network to wide area network connections are usually performed with a router. A third device, the switch, can be used to interconnect segmentsof a local area network.
  • 80. Repeater: A repeater is aregenerator, not an amplifier A repeater installed on alink receives the signal before it becomes too weak or corrupted ,regenerates the original bit pattern, and put the refreshed copy back onto the link.
  • 81. Gateways: A gatewayis aprotocolconvertor. It accepts apacket format for one protocol(e.g.,Apple T alk) and convertsit into apacket format for another protocol(e.g.,TCP/IP).
  • 82. 104 / 25 A gateway SNA network (IBM) Netware network (Novell)
  • 83. 105 / 25 Bridges Divide alarge network into smaller segment It filters the traffic . It contains logic(Bridge table) that allows them to keep the traffic for each segment separate. Ie) Isolating and controlling the link problems (e.g.congestion) Bridges have look-up table that contains physical address of every station connected to it.
  • 86. When aframeentersabridge,itchecks theaddressof thedestinationand forward thenewcopyonlyto the segmentto whichtheaddresswhich belongs
  • 88. Simple Bridge It is aless expensive type of bridge It links 2 segments (LANS) and lists the address of all the stations in table included in each of them. Here address must be entered manually. The table is modified when stations are added and removed.
  • 89. Multiport Bridge It is used to connect more than two LANS. So the bridge has 3 tables. Here address must be entered manually Transparent Bridge: A transparent or learning bridge builds its table of station on its own (automatically). The table is empty when it is installed, it builds its table when it encounters the packet for transmission. It uses the source address for building table. It identifies the changes and update the table when system moved from one station to another
  • 91. Cont., Bridges are normally installed redundantly,that is two LANS may be connected by more than one bridge.in this cases they maycreate a loop. So packet may go round and round,It can be avoided by algorithms like Spannig tree algorithm Source routing
  • 93. Data Communications and Computer Networks Remote Bridges A remote bridge is capable of passing a data frame from one local area network to another when the two LANs are separated by a long distance and there is a wide area network connecting the two LANs. A remote bridge takes the frame before it leaves the first LAN and encapsulates the WAN headers and trailers. When the packet arrives at the destination remote bridge, that bridge removes the WAN headers and trailers leaving the original frame.
  • 94. Data Communications and Computer Networks Switches A switch is a combination of a hub and a bridge (multi- port bridge). It can interconnect two or more workstations, but like a bridge, it observes traffic flow and learns. When a frame arrives at a switch, the switch examines the destination address and forwards the frame out the one necessary connection. Workstations that connect to a hub are on a shared segment. Workstations that connect to a switch are on a switched segment.
  • 96. LAN/WLANWorld LANs provide connectivity for interconnecting computing resources atthe local levels of an organization Wired LANs Limitations because of physical,hard- wired infrastructure Wireless LANs provide Flexibility Portability Mobility Ease of Installation
  • 97. Wireless LAN Applications Medical Professionals Education Temporary Situations Airlines Security Staff Emergency Centers
  • 98. IEEE 802.11 Wireless LAN Standard In response to lacking standards, IEEE developed the first internationally recognized wireless LAN standard IEEE 802.11 IEEE published 802.11 in 1997, after seven years of work Scope of IEEE 802.11 is limited to Physical and Data Link Layers.
  • 99. Benefitsof802.11 Standard Appliance Interoperability Fast Product Development Stable Future Migration Price Reductions The 802.11 standard takes into account the following significant differences between wireless and wired LANs: Power Management Security Bandwidth
  • 100. WLAN Topology Ad-Hoc Network The BSS without an AP is a stand-alone network and cannot send data to otherBSSs. they can locate one another and agree to be part of a BSS.
  • 101. WLAN Topology Infrastructure EX: cellular network if we consider each BSS to be a cell and each AP to be a basestation.
  • 103. StationTypes IEEE 802.11 defines three types of stations based on their mobility in awireless LAN: no-transition A station is either stationary (not moving) or moving only inside a BSS BSS-transition station can move from one BSS to another , but the movement is confined inside one ESS. and ESS-transition mobility . A station can move from one ESS to another
  • 104. collisionavoidanceCSMAICA network allocation vector (NAV) used to avoid collision. RTS frame includes the duration of time that it needs to occupy the channel. stations affected by this transmission create a timer called (NAV) the network allocation vector (NAV) shows the time must pass before these stations allowed to check the channel for idleness. there is no mechanism for collision detection,ifthe sender has not received aCTS frame from the receiver , assumes there has been acollision ,thesender tries again.
  • 105. BLUETOOTH Bluetooth is a wireless LAN technology designed to connect devices of different functions such as telephones, notebooks, computers, cameras, printers, coffee makers, and so on. A Bluetooth LAN is an ad hoc network, which means that the network is formed spontaneously. Bluetooth defines two types of networks: piconet and scatternet.
  • 106. Piconet A Bluetooth network is calledapiconet, or asmall net. It can haveup to eight stations, one of which is called the master; the rest are called slaves. Maximum of seven slaves. Only one master . Slaves synchronize their clocks and hopping sequence with the master . But anadditionaleight slaves canstay in parked state,which means they canbe synchronized with the master but cannot takepart in communication until it is moved from the parked state.
  • 107. Scatternet Piconets canbecombined to form what is calleda scatternet. A slavestation inone piconet canbecome the master in another piconet. Bluetooth devices hasabuilt-inshort-range radio transmitter.
  • 108. Bluetooth layers Radio Layer: Roughly equivalent to physical layerof the Internet model. Physical links canbe synchronous or asynchronous. Uses Frequency-hopping spread spectrum [Changing frequencyof usage]. Changes it modulation frequency1600 times per second. Uses frequencyshift keying (FSK )with Gaussian bandwidth filtering to transform bits to a signal. Baseband layer: Roughly equivalent to MAC sublayer in LANs. Access is usingTime Division (Time slots). Length of time slot = dwell time = 625 microsec. So, during one frequency ,a sender sends aframe to aslave,or aslave sends aframe to themaster . Time division duplexing TDMA (TDD-TDMA) is akind of half-duplex communication in which the slave and receiver send and receive data,but not atthe same time (half-duplex). However , the communication for each direction uses different hops, like walkie-talkies.
  • 110. PhysicalLinks Synchronous connection-oriented (SCO) Latency is important than integrity . Transmission using slots. No retransmission. Asynchronous connectionless link (ACL) Integrity is important than latency . Does like multiple-slave communication. Retransmission is done. L2CAP (Logical Link Control andAdaptationProtocol) Equivalent to LLC sublayer in LANs. Used for data exchange on ACL Link. SCO channels do not use L2CAP . Frame format has 16-bit length [Size of data coming from upper layer in bytes], channel ID, data and control. Can do Multiplexing, segmentation and Reassembly, QoS [with no QoS, best- effort delivery is provided] and Group mangement [Can do like multicast group, using some kind of logical addresses].