Networking Chapter 4 Data Link Layer

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Chapter 4: Data Link Layer

Introuction
● Responsible for moving messages from one device to another
● Controls the way messages are sent on media
● 2 Sublayer:
○ Logical Link Control (LLC)
■ Connection to Network Layer above
■ Sending
● Surround IP PDU with Data Link PDU, often Ethernet Frame
■ Recieving
● Removes Data Link PDU, then pass to network layer
○ Media Access Control (MAC) sublayer software
■ Controls the physical hardware
■ Sending
● controls how and when the physical layer converts bits into the
physical symbols that are sent down the circuit.
■ Receiving
● takes the data link layer PDU from the LLC sublayer, converts it
into a stream of bits, and controls when the physical layer actually
transmits the bits over the circuit
● receives a stream of bits from the physical layer and translates it
into a coherent PDU, ensures that no errors have occurred in
transmission, and passes the data link layer PDU to the LLC
sublayer
● Protocol
○ Both sender and receiver follow the same protocol that govern how their data link
layer will communicate with one another
○ Three Functions
■ Media Access Control
● Controls when computers transmit
■ Error Control
● Detects and corrects transmission errors
■ Message Delineation
● Identifies the start and end of a message by using a PDU
Media Access Control
● Controlling when and what computer transmit
● Contention
○ Computer Wait until Circuit is Free (No other Computer are Transmitting) and
then transmit whenever they have to send a data
○ Analogy
■ Sometimes, two people attempt to talk at the same time, so there must be
some technique to continue the conversation after such a verbal collision
occurs
● Controlled Access
○ One device controls the circuit and determines which clients can transmit at what
time
○ Controlled Access Techniques
■ Access Request
● client computers that want to transmit, sends a request to transmit
to the device that is controlling the circuit
● All computer wait until the sender is finished transmitting
● Use contention techniques to send an access request
■ Polling
● process of sending a signal to a client computer that gives it
permission to transmit
● Periodically, the controlling device (e.g., a wireless access point)
polls the client to see if it has data to send, if it does then send,
else respond negatively, then controller ask another client if it has
a data to send.
■ Types of Polling
● Roll-call Polling
○ controller works consecutively through a list of clients
○ Some client may be prioritized, hence call more often
○ Involves waiting, because controller wait for response from
client
■ Time-out period threshold waiting time of the
controller
■ Times out when time-out period expires
● Hub Polling (Token Passing)
○ Used on Multipoint circuit
○ One computer starts the poll
○ Pass to next computer Until the first computer then
○ Restart the process again
○ Relative Performance
■ Contention is better for small networks
■ Controlled access is great for large networks
Error Control
● Handling of network errors caused by problems in transmission
● Types of Problems in Transmission
○ Human Errors
■ Can be a mistake in typing a number
■ Controlled by application programs
○ Network Errors
■ Can be a changing a bit value during transmission
■ Controlled by network hardware and software
● Categories of Errors
○ Corrupted
■ Data is changed from what it is
○ Lost Data
■ Can not find the data at all
● Error Rate
○ 1 bit error per n bits transmitted, e.g., 1 in 500,000
● Burst Error
○ Many bits corrupted at the same time
○ Errors not uniformly distributed
■ e.g., 100 in 50,000,000 -> 1 in 500,000
● Major Functions
○ Preventing errors
○ Corrective errors
○ Detective errors
● Sources of Errors
○ Line Noise (usually on wired communication except fiber-optic)
○ Noise (usually on wireless communication media)

Source of Error Cause Prevention

Movement of Electrons Increase signal strength


White Noise

Sudden increase in electricity Shield or move wires


Impulse Noise

● Multiplexer guardbands ● Increase


Cross-talk too small guardbands
● Wires too close to each ● Move ore shield
other wire

Poor Connections ● Fix connection


Echo ● Tune equipment
Gradual decrease of signal over Use repeater or amplifier
Attenuation distance

Signals from different circuits Move or shield wires


Intermodulation combine
noise

● Error Detection
○ Detect if error has occurred
○ Error Detection Techniques
■ Parity Checks
● Add extra bit, parity bit
● Add 1 if number of 1 is odd, else 0 if even
● Can’t detect
○ which bit is switched
○ If two bits are switched
■ Checksum
● Add extra byte at the end of the message
● Calculated by adding the decimal value of each character in the
message, then divide sum by 255, use remainder as checksum.
● The receiver calculates its own checksum in the same way and
compares it with the transmitted checksum.
● No error if the values is the same when receiver calculates the
checksum
■ Cyclic Redundancy Check (CRC)
● It adds 8, 16, 24, or 32 bits to the message
● a message is treated as one long binary number, which is divided
by a preset number, and the remainder is used as the CRC code.
● Error Correction
○ Error Correction via Retransmission
■ When an is error detected, retransmit the data
○ Forward Error Correction (FEC)
■ Receiving device can correct incoming messages itself (without
retransmission)
■ Requires extra corrective information sent along with the data
■ Allows data to be checked and corrected by the receiver
■ Amount of extra information: usually 50-100% of the data
○ Automatic Repeat Request (ARQ)
■ Process of requesting that a data transmission be resent
■ Protocols
● Stop and Wait (Half-Duplex Technique)
● Continuous (Full-Duplex Technique)
Data Link Protocol
● Data Link Layer protocols govern the way data is framed, transmitted, and received over
the physical medium.
● Methods of Transmission
○ differ primarily in
■ how they synchronize the sender and receiver
■ Message Delineation
■ Frame Length
■ Frame Field Structure
○ Asynchronous Transmission
■ In asynchronous transmission, each data byte is sent individually, with
start and stop bits added to each byte to indicate the beginning and end
of the data.
■ Asynchronous transmission does not require the sender and receiver to
be synchronized with each other, which makes it simpler and more
cost-effective for short-distance communication.
■ However, asynchronous transmission is generally slower and less
efficient than synchronous transmission due to the overhead of start and
stop bits.
○ Synchronous Transmission
■ Frame
● all the letters or data in one group of data are transmitted at one
time as a block of data
■ Synchronization
● Start and end of a frame
■ Data is sent in a continuous stream, and the sender and receiver must be
synchronized with each other. This synchronization is usually achieved
through the use of a clock signal.
■ often faster and more efficient than asynchronous transmission because
there is no need for start and stop bits to indicate the beginning and end
of each data byte.
■ Synchronous transmission requires more complex hardware to maintain
synchronization between the sender and receiver.
■ Synchronous Data Link Control
■ High-Level Data Link Control
■ Ethernet 2
■ Point-to-Point Protocol

Transmission Efficiency
● Network efficiency is affected by characteristics of the circuits such as error rates and
maximum transmission speed, as well as by the speed of transmitting and receiving
equipment, the error-detection and control methodology, and the protocol used by the
data link layer.
● Information Bits - are those used to convey the user’s meaning
● Overhead Bits - are used for purposes such as error checking and marking the start and
end of characters and packets.
● Transmission efficiency
○ is defined as the total number of information bits
○ Total Info bits / Total Bits Transmitted
● Throughput
○ is the total number of information bits received per second, after taking into
account the overhead bits and the need to retransmit frames containing errors

You might also like