You are on page 1of 83

Computer Basics

Physical and Data Link Layers

Mettu University
Engineering and Technology College
Electrical & Computer Eng. Department

Advanced
Computer Networking

Estifanos T. (MSc in Computer Networking)


Computer Basics
Physical and Data Link Layers

Lecture Two
Physical and Data Link Layers

Engineering and Technology College Mettu University 2


09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Outline
• Lesson 1: Physical Layer

• Lesson 2: Data Link Layer

Engineering and Technology College Mettu University 3


09/09/2022
Computer Basics
Physical and Data Link Layers

Lesson One
Physical Layer

Engineering and Technology College Mettu University 4


09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Introduction to Physical Layer


• The layer that actually interacts with the transmission media
• The physical part of the network that connects network components
together
• Involved in physically carrying information from one node in the
network to the next

1
Engineering and Technology College Mettu University 5
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Introduction…
• The position of the physical layer

2
Engineering and Technology College Mettu University 6
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Introduction…
• Bit-to-Signal Transformation
• Since a transmission medium (cable or air) cannot carry bits, the bits
must be represented by a signal, electromagnetic energy that can
propagate through a medium
• Bit Rate Control
• The transmission medium determines the upper limit of the data rate,
the physical layer is the controller
• Bit Synchronization
• The timing of bit transfer is controlled by providing clocking
mechanisms that control both the sender and the receiver 3
Engineering and Technology College Mettu University 7
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Introduction…
• Multiplexing
• To share a transmission medium when its bandwidth is greater than
the bandwidth needs of the two communicating devices

4
Engineering and Technology College Mettu University 8
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Introduction…
• Switching
• There are three methods
• Circuit Switching – a physical layer function
• Message Switching - data link and network layer function
• Packet Switching - also data link and network layer function
• Switching will be covered later after the data link layer

5
Engineering and Technology College Mettu University 9
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Analog and Digital Data/Signals


• Analog Signal – is a smoothly and continuously varying voltage or
current
• Sine Wave, Voice, Video (TV) and etc…
• Digital Signal – is change in steps or in discrete increments
• Telegraph (Morse Code), Serial binary code and etc…
• Bandwidth (the range of frequencies that a medium can pass - for analog
signals) and bit rate (bps, the number of bits transmitted per second - for
digital signals)
• Data rate limits (Niquist Theorem for noiseless channels, and Shannon’s
Theorem for noisy channels; both are functions of bandwidth), 6
Engineering and Technology College Mettu University 10
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Analog and Digital Data/Signals…


• Transmission Impairments
• Attenuation: loss of energy or degradation of signal
• Distortion: the signal changes its shape; for signals made of different
frequencies
• Noise: is random, undesirable electronic energy that enters the
communication system via the communicating medium and interferes
with the transmitted message

7
Engineering and Technology College Mettu University 11
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Data Transmission and Multiplexing


• Information (digital or analog) must be converted to either digital or
analog signal
• Digital Transmission
• Line coding and block coding are used to convert binary data to
digital signals
• Sampling - to convert analog data to digital data; then use line coding
or block coding or a combination to convert to digital signals
• PAM - Pulse Amplitude Modulation - not used much in
computer communications
8
Engineering and Technology College Mettu University 12
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Data Transmission and Multiplexing…


• PCM - Pulse Code Modulation
• The original signal is sampled at equal intervals
• Quantization - a method of assigning integral values in a
specific range of sampled instances
• Transmission Mode of Binary Data
• Parallel - sending n bits with each clock tick to speed up
transmission; n lines are needed hence costly
• Serial - 1 bit is sent with each clock tick; needs one line hence less
expensive but slow
• Serial transmission could be synchronous or asynchronous 9
Engineering and Technology College Mettu University 13
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Data Transmission and Multiplexing…


• Analog Transmission
• Modulation of Digital Data – Digital-to-Analog Conversion
• Based on the three characteristics of a Sine wave - amplitude,
Frequency, Phase..
• ASK (Amplitude Shift Keying), FSK (Frequency Shift Keying),
PSK (Pulse Shift Keying)
• MODEM - Modulator/Demodulator
• Modulation of Analog Signals - representing analog information by
analog signal
• AM (Amplitude Modulation), FM (Frequency Modulation), PM
(Pulse Modulation) 10
Engineering and Technology College Mettu University 14
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Data Transmission and Multiplexing…


• Multiplexing
• The set of techniques that allows the simultaneous transmission of
multiple signals across a single data link
• In a multiplexed system, n lines share the bandwidth of one link
• MUX (multiplexer by the sender) and DEMUX (de-multiplexer by the
receiver) required

11
Engineering and Technology College Mettu University 15
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Data Transmission and Multiplexing…


• Multiplexing…
• Categories of Multiplexing
• For Analog Signals
• FDM - Frequency-Division Multiplexing
• WDM - Wave-Division Multiplexing; mainly for fiber optic cable
• For Digital Signals
• TDM - Time-Division Multiplexing

12
Engineering and Technology College Mettu University 16
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices
• NIC - Network Interface Card
• Amplifies electronic signals
• Packages data for transmission
• Physically connects a computer to the transmission medium
• Transmission Media - actually below the physical layer, but controlled by it
• Two Categories
• Guided (wired) - copper wire (twisted-pair cable, coaxial cable) and
fiber-optic cable
• Unguided (wireless) - terrestrial radio, microwave, satellite -
signals broadcast through air
• Comparison Factors: bandwidth, delay, cost, ease of installation and
maintenance 13
Engineering and Technology College Mettu University 17
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Twisted-Pair Cable
• Consists of two insulated copper wires - one to carry signals and
the other to serve as a ground reference. The receiver uses the
difference between the two levels. If the two wires are equally
affected by noise or crosstalk, the receiver is immune (the difference
is zero). The twisting is important here
• Repeaters needed for longer distances
• Bandwidth depends on the thickness of the wire and distance
• Two important varieties for computer communications

14
Engineering and Technology College Mettu University 18
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Twisted-Pair Cable…
• Two important varieties for computer communications

(a) Category 3 UTP (Unshielded Twisted Pair) (b) Category 5 UTP - more twists per cm

15
Engineering and Technology College Mettu University 19
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Twisted-Pair Cable…
• EIA (Electronic Industries Association) developed standards to
classify UTP cables; 7 categories - Category 1 to Category 7; 1
with the lowest quality and 7 the highest. Classification based on
bandwidth, data rate, whether it can carry analog, digital or both
signals, and use (Telephone, LANs)
• STP - Shielded Twisted Pair - by IBM where a metal foil covers
each insulated wire. Bulkier and expensive; hence not used outside
of IBM
16
Engineering and Technology College Mettu University 20
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Coaxial Cable
• Better shielding than twisted pair – can span longer distances at
higher speeds
• Bandwidth dependent on cable quality, length, … - close to 1 GHz
for modern cables

• Stiff copper wire at the core, surrounded by an insulating material in


turn covered by a cylindrical conductor, then by a protective plastic
sheath

17
Engineering and Technology College Mettu University 21
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Coaxial Cable…

18
Engineering and Technology College Mettu University 22
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Fiber-Optic Cable
• Three key components
• The light source (on one end): a pulse of light indicates a 1 bit,
absence of light indicates a 0 bit
• The transmission medium: an ultra-thin fiber or glass
• The detector (on the other end): generates an electrical pulse
when light falls on it

19
Engineering and Technology College Mettu University 23
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Fiber-Optic Cable…
• At the center is a glass core through which the light propagates; it is
surrounded by a glass cladding with a lower index of refraction
than the core to keep all the light in the core; then comes a thin
plastic jacket to protect the cladding (Fig. a)
• Fibers are typically grouped in bundles, protected by an outer sheath
(Fig. b)

20
Engineering and Technology College Mettu University 24
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Fiber-Optic Cable…

Side view of a single fiber End view of a sheath with three fibers

21
Engineering and Technology College Mettu University 25
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Fiber-Optic Cable…
• Advantages of fiber optic cables:
• Repeaters required only about every 50 km (saves cost)
• Not affected by power surge, electromagnetic interference,…
• Do not leak light and difficult to tap – security

22
Engineering and Technology College Mettu University 26
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication
• The electromagnetic spectrum and its uses for communication

Official ITU names: low, medium, high, very high, ultra high, super high, extremely high,
tremendously high frequency 23
Engineering and Technology College Mettu University 27
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Radio, microwave, infrared, and visible light can be used for
transmitting information by modulating the amplitude, frequency, or
phase of the waves
• The rest would have been better, but are hard to produce and
modulate, do not propagate well through buildings, are dangerous to
life – like Gamma Ray

24
Engineering and Technology College Mettu University 28
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Radio Transmission
• Range in frequencies between 3 KHz to 1 GHz
• Omnidirectional, i.e., radio waves propagate in all directions
• Hence no need of aligning the transmitting and receiving
antennas
• Can be used for multicast transmission
• Cons: two antennas using the same frequency band are
susceptible to interference with each other
• The band is regulated by a government authority
25
• Can travel long distances, penetrate buildings (can be used indoors and
Engineering and Technology College Mettu University 29
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Microwave Transmission
• Range in frequencies between 1 GHz to 300 GHz
• Unidirectional (in nearly straight lines); can be narrowly focused
• The transmitting and receiving antennas must be aligned
• Interference between antennas can be easily avoided
• VHF microwaves cannot penetrate walls
• Used for unicast communication such as cellular phones and
wireless LANs

26
Engineering and Technology College Mettu University 30
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Satellite Transmission
• A node in the network can be a satellite, an earth station, an end-user
terminal or telephone
• Real (such as the Moon) versus artificial satellites
• Real satellites would have been possible, but artificial satellites are
preferred since we can install electronic equipment to regenerate the
signal that has lost its energy during travel; real satellites are also far
from the earth creating a long delay in communication

27
Engineering and Technology College Mettu University 31
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Satellite Transmission…
• Can provide transmission capability to and from any location on
earth; good for us poor people
• A satellite (artificial) contains several transponders, each listening to
some portion of the spectrum, amplifies the incoming signal, and then
rebroadcasts it at another frequency to avoid interference with the
incoming signal
• Transmission from the earth to the satellite is called uplink; from the
satellite to the earth is called downlink
28
Engineering and Technology College Mettu University 32
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Satellite Transmission…
• Satellites are inherently broadcast media - security and privacy
issues (encryption may be essential)
• Orbit: the path in which a satellite travels around the earth
• Footprint: the area that the signal from a satellite is aimed at (the
signal power is maximum at the center of the footprint and decreases
as we move away from it)

29
Engineering and Technology College Mettu University 33
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Satellite Transmission…
• Period: is the time required for a satellite to make a complete trip
around the earth and is determined by Kepler’s law, which defines
the period as a function of the distance of the satellite from the center
of the earth
• Period = C x distance1.5, where C = 1/100, period is in
seconds and distance in kms

30
Engineering and Technology College Mettu University 34
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Satellite Transmission…
• Ex. 1. the period of the Moon
• Located approximately 384,000 km above the earth
• The radius of the earth is 6378 km
• Period = (1/100) (384,000+6378)1.5  2,439,090 s  28.23 days 
1 month

31
Engineering and Technology College Mettu University 35
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Satellite Transmission…
• Ex. 2. the period of a satellite located at an orbit approximately 35,786
km
period = (1/100) (35,786+6378)1.5  86,579 s  24 hours (the same as
the rotation speed of the earth - called Geosynchronous Earth Orbit)
• How many satellites can there be on the sky?
• Satellites are spaced not closer than 2 degrees
Þ There can be only 360/2=180 satellites in the
Geosynchronous Earth Orbit - too few
32
Engineering and Technology College Mettu University 36
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Satellite Transmission…

Þ Use other orbits


• There exist two Van Allen belts: layers that contain high
charged particles. A satellite orbiting in one of these two
belts would be totally destroyed by the energetic
charged particles

33
Engineering and Technology College Mettu University 37
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Satellite Transmission…

• Three categories of satellites - based on the location of the orbit


• Geosynchronous Earth Orbit - GEO
• Medium-Earth Orbit - MEO
• Low-Earth Orbit - LEO

34
Engineering and Technology College Mettu University 38
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Satellite Transmission…

Acceptable for
Audio
Communication

Communication satellites and altitude above the earth, round trip delay time, number of 35
satellites (usually equally spaced) needed for global coverage
Engineering and Technology College Mettu University 39
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Satellite Transmission…
• GEO - at 35,786 km
• The satellite moves at the same speed as the earth so that it
remains fixed above a certain spot - the name geosynchronous
• VSATs - Very Small Aperture Terminals
• Have great potential in rural areas
• They do not have enough power to communicate; hence a
special ground station, the hub, with a large, high gain
antenna is used to relay traffic between VSATs (creates longer
36
delay) College
Engineering and Technology Mettu University 40
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Satellite Transmission…

37
Engineering and Technology College Mettu University 41
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Satellite Transmission…
• MEO - between 5,000 – 15,000 km – many orbits
• A satellite at this orbit takes approximately 6 hours to circle the
earth
• E.g. of a MEO system: GPS - Global Positioning System
(consists of 24 satellites and used for land and sea navigation to
provide time and location for ships and vehicles; not used for
communication)
• LEO - below 2,000 km – many orbits
• A satellite at this orbit takes between 90 and 120 minutes to circle the38
earth
Engineering and Technology College Mettu University 42
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Unguided (Wireless) Communication…
• Light Transmission

• Convection currents can interfere with laser communication systems


• A bidirectional system with two lasers is pictured here 39
Engineering and Technology College Mettu University 43
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Connectors - to connect cables with devices
• RJ45 (Registered Jack) connector for UTP cables
• BNC (Bayone-Neill-Concelman) connectors for coaxial cables
• ST (straight-tip) connector for fiber optic cables and
• MT-RJ is a new one with the same size as RJ45
• Devices to connect LANs or segments of LANs
• They operate in different layers since different devices use different
pieces of information to decide how to switch

40
Engineering and Technology College Mettu University 44
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…

41
Engineering and Technology College Mettu University 45
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Repeater
• To overcome attenuation; it receives a signal before it becomes too weak
or corrupted, regenerates the original bit pattern and then sends the
refreshed signal
• For example, to extend the 500 m limit of 10Base5 Ethernet
• Does not understand frames, packets, or headers; understands only volts

42
Engineering and Technology College Mettu University 46
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Repeater…
• It does not connect two LANs (of different protocols); it connects
segments of a LAN
• The location of a repeater is important; it must be placed so that a
signal reaches it before any noise changes the bits completely

43
Engineering and Technology College Mettu University 47
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Hub
• In general refers to any connecting device, but has a specific meaning
• It is a multiport repeater (a number of lines)
• Used to create connections between stations in a physical star topology
• Frames arriving on any of the lines are sent out on all the others
• If two frames arrive at the same time, they
may collide
• All the lines must operate at the same
speed

44
Engineering and Technology College Mettu University 48
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Bridge and Switch
• Connect two or more LANs and operate in both the
physical and the data link layers
• As a physical layer device, it regenerates the
signal it receives
• As a data link layer device, it can check the
physical addresses (source and destination)
contained in the frame
• It has a filtering capability to decide whether a
frame has to be forwarded or dropped using a
switching table (that maps addresses to ports) 45
Engineering and Technology College Mettu University 49
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Router
• Operate at the network layer to connect different networks
• When a packet arrives, the frame header and trailer are stripped off
and the packet located in the frame’s payload field is passed to the
routing software. The software uses the packet header to choose an
output line

46
Engineering and Technology College Mettu University 50
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Gateway
• Connects networks that use different protocols
• Transport Gateway: connects two computers that use different
transport protocols, reformatting packets as need be
• Application Gateway: understands the format and content of the data
and translates messages from one format to another, e.g., an e-mail
gateway could translate Internet messages to SMS messages for mobile
phones
• Routers and gateways can be used to provide additional services
• Example: transcoding and adaptation of audiovisual material 47
Engineering and Technology College Mettu University 51
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Gateway…

48
Engineering and Technology College Mettu University 52
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Digital Subscriber Line

• A typical ADSL equipment configuration 49


Engineering and Technology College Mettu University 53
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Devices…
• Fiber to the Home

• Passive optical network for Fiber to the Home 50


Engineering and Technology College Mettu University 54
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Mobile Telephone System


• First-Generation (1G) Mobile Phones Analog Voice
• Second-Generation (2G) Mobile Phones Digital Voice
• Third-Generation (3G) Mobile Phones Digital Voice + Data
• 4G/LTE
• 5G (On progress)
• 6G (Yet not applicable)
• 7G (Yet not applicable)
• FG (Yet not applicable)
51
Engineering and Technology College Mettu University 55
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Mobile Telephone System…


• GSM – The Global System for Mobile Communication (2G)

• GSM mobile network architecture 52


Engineering and Technology College Mettu University 56
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Mobile Telephone System…


• GSM – The Global System for Mobile Communication (2G)…
• Basic services intend by IMT-2000 network
• High-quality voice transmission
• Messaging (replacing email, fax, SMS, chat)
• Multimedia (music, videos, films, television)
• Internet access (Web surfing, incl. audio, video)

53
Engineering and Technology College Mettu University 57
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Mobile Telephone System…


• GSM – The Global System for Mobile Communication (2G)…

• Soft handoff (a) before, (b) during, and (c) after 54


Engineering and Technology College Mettu University 58
09/09/2022
Computer Basics
Physical and Data Link Layers

Lesson Two
Data Link Layer

Engineering and Technology College Mettu University 59


09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Introduction to Data Link Layer


• The data link layer is responsible for carrying a frame/packet from one
hop (computer or router) to the next hop; i.e., it has local responsibility
unlike the network layer
• The position of the data link layer

55
Engineering and Technology College Mettu University 60
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Error Detection and Correction


• Mainly a data link layer function
• Networks must be able to transfer data from one device to another with complete
accuracy – our wish
• Data can be corrupted during transmission – many factors exist - like transmission
impairments
• Hence, reliable systems must have a mechanism for detecting and correcting errors
• Two types of errors: Single-bit and Burst
• Single-Bit Error: only one bit in a data unit (byte, character, packet, ...) has
changed; less likely to occur in serial transmission (since noise normally lasts
longer than the transmission time of 1 bit, e.g. 1 microsecond if speed is 1
Mbps), but most likely to occur in parallel transmission
56
Engineering and Technology College Mettu University 61
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Error Detection and Correction…

Single-Bit Error Example


Burst Error Example

• Burst Error: 2 or more bits in the


data unit have changed; most likely
to occur in serial transmissions
57
Engineering and Technology College Mettu University 62
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Error Detection and Correction…


• Include redundant error-detection (and correction) codes with the data
• Two Possibilities
• Include enough redundant information (called error-correcting
codes) to enable the receiver to deduce what the transmitted data
must have been; this method is often referred to as forward error
correction; applicable on unreliable channels such as wireless links
• Include only enough redundant information (called error-
detecting codes) to allow the receiver to deduce that an error
occurred, but not which error, and have it request retransmission;
applicable on reliable channels such as fiber 58
Engineering and Technology College Mettu University 63
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Data Link Control and Protocols

• For reliable data delivery across the link, the data link layer has two
most important responsibilities: flow control and error control,
collectively known as data link control
• Flow Control
• It refers to a set of procedures used to restrict the amount of data
that the sender can send before receiving an acknowledgement
• It is an end-to-end mechanism for regulating traffic between source
and destination

59
Engineering and Technology College Mettu University 64
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Data Link Control and Protocols…

• Congestion Control
• A mechanism used by the network to limit congestion
• Flow control and Congestion control are not really separable, and we
will refer to both as flow control

• Error Control
• It refers to both error detection and error correction
• Anytime an error is detected, specified frames are retransmitted;
this process is called Automatic Repeat request (ARQ)

60
Engineering and Technology College Mettu University 65
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Data Link Control and Protocols…


• Examples of Data Link Protocols
• HDLC – High-level Data Link Control
• An ISO standard
• An actual protocol designed to support both half-duplex and full-
duplex communication over point-to-point and multipoint links that
implements the ARQ mechanisms
• PPP – Point-to-Point Protocol
• It used in the Internet for router-to-router and home user-to-ISP
traffic

61
Engineering and Technology College Mettu University 66
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control


• The MAC Sub-layer: In a network, two devices can be connected by a
dedicated link (like a reserved highway, may be on certain occasions!) or a
shared link (like a public highway)
• Point-to-Point Access: when two devices are connected by a
dedicated link and this link can be used by them at any time; PPP is
used
• Multiple Access: When two devices are connected by a shared link;
when two devices in a multiple access situation get access to the link or
a channel in the link, they may need to use a point-to-point access
protocol to exchange data
62
Engineering and Technology College Mettu University 67
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Multiple Access Protocols
• The problem of controlling the access to the medium is similar to
the rules of speaking in an assembly (the right to speak is upheld;
two people do not speak at the same time; do not interrupt each
other; do not monopolize the discussion; ...)

63
Engineering and Technology College Mettu University 68
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Three categories of multiple access protocols
• Random Access Protocols – try your best like taxis do
• MA - Multiple Access
• CSMA - Carrier Sense MA
• CSMA/CD - CSMA with Collision Detection
• CSMA/CA - CSMA with Collision Avoidance
• Controlled-Access Protocols – get permission
• Reservation
• Polling
• Token Passing
64
Engineering and Technology College Mettu University 69
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Three categories of multiple access protocols…
• Channelization Protocols – simultaneous use
• FDMA - Frequency-Division MA
• TDMA - Time-Division MA
• CDMA - Code-Division MA

65
Engineering and Technology College Mettu University 70
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Random Access Protocols
• Each station has the right to use the medium without being controlled
by any other station
• Collision may occur if more than one station tries to send
• We need a procedure to answer the following questions
• When can a station access the medium?
• What can the station do if the medium is busy?
• How can the station determine the success or failure of the transmission?
• What can the station do if there is an access conflict?
66
Engineering and Technology College Mettu University 71
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Random Access Protocols…
• MA – Multiple Access
• ALOHA is the earliest RA method developed at the University of
Hawaii in the early 1970s
• Originally designed to be used on a radio LAN with a data rate of 9600
bps
• Can also be used in satellite and wireless transmissions
• Aloha (in Hawaiian language) means hello and goodbye

67
Engineering and Technology College Mettu University 72
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Random Access Protocols…
• CSMA – Carrier Sense MA – polite version of ALOHA
• To minimize the chance of collision, each station first listens to the
medium before sending; “listen before talk”
• If the channel is busy, it waits until it is idle
• Otherwise it transmits; if a collision occurs, it waits a random
amount of time and starts listening again
• The chance of collision is minimized, but may still occur because of
the propagation delay (a station doesn’t know if another one has just
started transmitting); or if two or more stations start transmitting at the
68
same time
Engineering and Technology College Mettu University 73
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Random Access Protocols…
• CSMA/CD – CSMA with Collision Detection
• Adds a procedure to handle a collision
• If a collision is detected and to reduce the probability of collision the
second time, the sender waits; it has to back off
• It waits a little the first time, more if a collision occurs again, much more if
it happens a third time, and so on; finally gives up
• Primarily, it is good in wired network infrastructure

69
Engineering and Technology College Mettu University 74
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Random Access Protocols…
• CSMA/CA – CSMA with Collision Avoidance

• It avoids collision
• It uses one of the persistence strategies; after it finds the line idle, it
waits an IFG (inter-frame gap) amount of time; it then waits another
random amount of time; after that it sends the frame and sets a
timer;
• If it receives an ACK before the timer expires, the transmission is
successful; otherwise something is wrong (the frame or the ACK is
lost); waits for a backoff amount of time and re-senses the line
70
• It used in wireless LANs
Engineering and Technology College Mettu University 75
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Controlled Access Protocols
• The stations consult one another to find which station has the right to
send; a station can not send unless it has been authorized by other stations
• Reservation
• A station needs to make a reservation before sending data
• Time is divided into intervals; in each interval, a reservation frame
precedes the data frames sent in that interval; if there are N stations
in the system, there are exactly N reservation mini-slots in the
reservation frame

71
Engineering and Technology College Mettu University 76
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Controlled Access Protocols…
• Polling

• For topologies in which one device is designated as a primary station


and the other stations are secondary stations
• The primary asks the secondary stations if they have data to send
(polling); when it has data to be sent, the primary tells the secondary
to get ready to receive (selecting)

72
Engineering and Technology College Mettu University 77
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Controlled Access Protocols…
• Polling…

Poll Select
73
Engineering and Technology College Mettu University 78
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Controlled Access Protocols…
• Token Passing
• A station is authorized to send data when it receives a special frame called a
token
• The stations are arranged around a ring (each station has a predecessor and a
successor)
• A token circulates around the ring when no data is transmitted
• Token: a bit sequence
• Free token: 01111110
• Busy token: 01111111
• When a node wants to transmit
• Wait for a free token
• Remove token from ring (replace with busy token)
• Transmit message
• When done transmitting, replace free token on ring 74
Engineering and Technology College Mettu University 79
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Channelization Protocols
• The available bandwidth of a link is shared in time, frequency, or
through code, between different stations

• FDMA – Frequency-Division MA
• The available bandwidth is divided into channels; each station uses
its allocated band to send its data; each band is reserved for a
specific station (it belongs to it all the time)
• FDMA is a layer 2 protocol that uses FDM at the physical layer
• It used in cellular telephone and satellite networks

75
Engineering and Technology College Mettu University 80
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Channelization Protocols…

• TDMA – Time-Division MA
• The entire bandwidth is just one channel; the stations share the
capacity of the channel in time; each station is allocated a time slot
during which it can send data;
• TDMA is a layer 2 protocol that uses TDM at the physical layer
• It also used in cellular telephone

76
Engineering and Technology College Mettu University 81
09/09/2022
Estifanos T. (MSc in Computer Networking)
Computer Basics
Physical and Data Link Layers

Medium Access Control…


• Channelization Protocols…

• CDMA – Code-Division MA
• It differs from FDMA because only one channel occupies the entire
bandwidth of the link; differs from TDMA because all stations can
send data simultaneously (no time sharing)
• It based on coding theory; proposed several decades ago, but
implemented recently due to advances in technology

77
Engineering and Technology College Mettu University 82
09/09/2022
Computer Basics
Physical and Data Link Layers

End of Lecture Two

Engineering
Estifanos and
T. (MSc Technology
in Computer College
Networking) Mettu
Lecture 2: University
Distributed Architectures 09/09/2022

You might also like