0% found this document useful (0 votes)
5 views51 pages

Module 2

The document discusses physical layer design issues in network communication, including media types, signal strength, and interference. It covers guided media like twisted-pair, coaxial, and fiber-optic cables, as well as unguided media such as radio waves and microwaves. Additionally, it highlights the importance of signal strength and interference on network performance, detailing factors affecting them and techniques to mitigate issues.

Uploaded by

tewan35698
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views51 pages

Module 2

The document discusses physical layer design issues in network communication, including media types, signal strength, and interference. It covers guided media like twisted-pair, coaxial, and fiber-optic cables, as well as unguided media such as radio waves and microwaves. Additionally, it highlights the importance of signal strength and interference on network performance, detailing factors affecting them and techniques to mitigate issues.

Uploaded by

tewan35698
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

MODULE 2

Physical layer design issues - Media, Signal strength and interference. Data
encoding, Multiplexing (TDM, FDM). Data Link layer Design Issues – Flow
Control and ARQ techniques. Data link Protocols – HDLC. IEEE 802 FOR LANs
IEEE 802.3, 802.5. Wireless LANs - 802.11.

Physical layer design issues??


The design issues of physical layers are as follows:
Establishing the Physical Connections
Whenever there is a requirement for data transmission by a device to another device, the request
travels from the application layer to the data link layer. Thus the data link layer moves it to the
physical layer, and the physical layer activates a physical link for the communication of bits.
Physical Service Data Unit and Data Transparency
The data link layer fist over the physical service data unit (PSDU) with one bit is the serial
communication and "n" bits in parallel communication. It can support transparency of information, i.e.,
the bit sequences can be shared on a transmission medium through it without diminishing them.
Sequential Delivery of Data
Though the physical layer does not have some error control structure or flow control structure, it
attempts to deliver the data bits in the similar series in which they were received from the data link
[Link] to the lack of error and flow controls, it can appear that some data bits are duplicated,
modified, or lost.
Fault Detection
The physical layer is answerable for fault detections in the physical link. If it can recognize any fault in
the physical connection, it can update the data link layer.
Terminating the Physical Connection
When the data sent is over, or the user requires a disconnection, the physical layer disconnects the
connection by deactivating the physical link at the user’s request.
Use of Intermediate Relay
A physical link can use an intermediate relay to reduce the issues like degradation of signal by noise,
attenuation, etc., because of the interconnecting channel characteristics.
For this signal changing units are utilized in an intermediate relay where the computer signals are
recreated, amplified, modulated, or equalized of media characteristics according to requirement. The
physical layer gives out the activation and deactivation of the relay.
Media??
 Transmission media are located below the physical layer
 Computers use signals to represent data
 Signals are transmitted in the form of Electromagnetic energy

GUIDED MEDIA

 Guided media, which are those that provide a medium from one device to
another, include twisted-pair cable, coaxial cable, and fiber-optic cable.
 Any transmission system has limited band of frequencies. This limits the data
rate which can be carried through the transmission media
 Bandwidth: It is the difference of the highest and the lowest frequency in the
channel. Higher bandwidth gives higher data rate.
 Transmission impairments or data loss can occur during transmission eg
: Attenuation
 Interference of the signals can also occur.
 Types of guided media include twisted-pair cable, coaxial cable, and fiber-optic cable
1. TWISTED PAIR CABLE

 One of the oldest and still most common transmission media is twisted pair. A
twisted pair consists of two insulated copper wires, typically about 1 mm thick. The
wires are twisted together in a helical form, just like a DNA molecule.
 One of the wire carries signal and other is used as ground reference
 Twisting is done because two parallel wires constitute a fine antenna. When the wires
are twisted, the waves from different twists cancel out, so the wire radiates less
effectively.
 The most common application of the twisted pair is the telephone system. Nearly all
telephones are connected to the telephone company (telco) office by a twisted pair.
Both telephone calls and ADSL Internet access run over these lines.
 Twisted pairs can run several kilometers without amplification, but for longer
distances the signal becomes too attenuated and repeaters are needed. When many
twisted pairs run in parallel for a substantial distance, such as all the wires coming
from an apartment building to the telephone company office, they are bundled
together and encased in a protective sheath.
 Twisted pairs can be used for transmitting either analog or digital information. The
bandwidth depends on the thickness of the wire and the distance travelled Due to their
adequate performance and low cost, twisted pairs are widely used.
 Classified into two
a. Unshielded Twisted pair (UTP)
b. Shielded Twisted
pair Unshielded Twisted Pair
 Used as ordinary telephone wire
 It is cheapest
 Easy to install
 Suffers from external Electromagnetic Interferences

Shielded Twisted pair (STP)


 It has a metal braid or sheathing that reduces interference
 It is more expensive
 It is thick and heavy so harder to handle
2. COAXIAL CABLE

 Another common transmission medium is the coaxial cable (also known as just
‘‘coax’’). It has better shielding and greater bandwidth than unshielded twisted pairs,
so it can span longer distances at higher speeds
 coax has a central core conductor of solid or stranded wire (usually copper) enclosed
in an insulating sheath, which is, in turn, encased in an outer conductor of metal foil.
 The outer metallic wrapping serves both as a shield against noise and as the second
conductor, which completes the circuit.

 Coaxial cable is categorized by the radio government (RG) ratings. Each RG number
denotes a unique set of physical specification, including the wire gauge of the inner
conductor, thickness and type of the inner insulator,
Performance
 Attenuation is much higher in coaxial cables than in twisted-pair cable. In other
words, although coaxial cable has a much higher bandwidth, the signal weakens
rapidly and requires the frequent use of repeaters.
Application
 Coaxial cable was widely used in analog telephone networks where a single coaxial
network could carry 10,000 voice signals. Later it was used in digital telephone
networks where a single coaxial cable could carry digital data up to 600 Mbps.
 Cable TV networks also use coaxial cables. In the traditional cable TV network, the
entire network used coaxial cable. Cable TV uses RG-59 coaxial cable
 Another common application of coaxial cable is in traditional Ethemet LANs Because
of its high bandwidth, and consequently high data rate, coaxial cable was chosen for
digital transmission in early Ethemet LANs. The 10Base-2, or Thin Ethernet, uses
RG- 58 coaxial cable with BNC connectors to transmit data at 10 Mbps
The 10Base5, or Thick Ethernet, uses RG-11 (thick coaxial cable)
to transmit 10 Mbps with a range of 5000 m. Thick Ethernet has specialized connectors.
3. FIBRE OPTICS
 A fiber-optic cable is made of glass or plastic and transmits signals in the form of
light. Light travels in a straight line as long as it is moving through a single uniform
substance. If a ray of light traveling through one substance suddenly enters another
substance (of a different density), the ray changes direction.

Working

Total Internal Reflection(TIR)

 When a ray of light travels from a denser to a rarer medium such that the angle of
incidence is greater than the critical angle, the ray reflects back into the same medium
this phenomena is called TIR.
 In the optical fiber the rays undergo repeated total number of reflections until it
emerges out of the other end of the fiber, even if fiber is bend
Structure
 Core - central tube of very thin size made up of optically transparent material and
carries the light form transmitter to receiver
 Cladding- outer optical material surrounding the core having less density than core. It
helps to keep the light within the core
 Coating- plastic coating that protects the fiber made of silicon rubber

Propagation Modes
• Optical Fibre is classified into two categories based on
1. Number of modes
– Single mode
– Multi mode
2. Densities
– Step Index optical Fibre
– Graded Index optical

fibre Single mode fiber


• In single mode fiber only one mode can propagate through the fiber.
• It has small core diameter (5um) and cladding diameter (70um).
• Difference between the refractive index of core and cladding is very small.

Multi- mode fiber


• It allows a large number of modes for light ray travelling through it.
• The core diameter is 40um and that of cladding is 70um.
• Difference between the refractive index of core and cladding is large

On the basis of densities There are two type of optical fiber:-


1) Step index optical fiber
2) Graded- index optical fiber

Step-index optical fiber


• In step-index fiber, the density of the core remains constant from the center to
the edges.
• A beam of light moves through this constant density in a straight line until it
reaches the interface of the core and cladding

Graded Index Fiber


• A graded-index fiber, therefore, is one with varying densities. Density is highest at
the center of the core and decreases gradually to its lowest at the edge.
• The cladding has a uniform density.
• The light rays propagate through it in the form of helical rays.

Advantage of Optical Fiber


• Immense bandwidth to utilize
• Total electrical isolation in the transmission medium
• Very low transmission loss
• Small size and light weight
• High signal security
• Very low power consumption and wide scope of system expansion

Unguided media

• Unguided media transport electromagnetic waves without using a physical conductor


• Signals are normally broadcast through free space and thus are available to anyone
who has a
device capable of receiving them.
1. Radio Waves
• Electromagnetic waves ranging in frequencies between 3 kHz and 1 GHz are
normally called radio waves
• Radio waves are omnidirectional.
(When an antenna transmits radio waves, they are propagated in all directions. This
means that the sending and receiving antennas do not have to be aligned. A
sending antenna sends waves that can be received by any receiving antenna.)
• Radio waves, particularly those waves that propagate in the sky mode, can travel
long distances. This makes radio
waves a good candidate for long-distance broadcasting such as AM radio.
• Radio waves, particularly those of low and medium frequencies, can penetrate walls.
• The radio wave band is relatively narrow, just under 1 GHz, compared to the
microwave band. When this band is
divided into sub-bands, the sub-bands are also narrow, leading to a low data rate for digital
communications.
• Radio waves use omnidirectional antennas that send out signals in all
directions Applications:
• The omnidirectional characteristics of radio waves make them useful for multicasting,
in which there is one sender but
many receivers. AM and FM radio, television, maritime radio, cordless phones, and
paging are examples of multicasting.
2. Microwaves
• Electromagnetic waves having frequencies between I and 300 GHz are called
microwaves.
• Microwaves are unidirectional.
• When an antenna transmits microwave waves, they can be narrowly focused.
This means that the sending and receiving antennas need to be aligned.
• The unidirectional property has an obvious advantage. A pair of antennas can be
aligned without interfering with another pair of aligned antennas
Characteristics:
• Microwave propagation is line-of-sight. (Since the towers with the mounted antennas
need to be in direct sight of each other, towers that are far apart need to be very
tall. The curvature of the earth as well as other blocking obstacles do not allow two
short towers to communicate by using microwaves. Repeaters are often needed for
long distance communication.)
• Very high-frequency microwaves cannot penetrate walls. This characteristic can be a
disadvantage
if receivers are inside buildings.
• The microwave band is relatively wide, almost 299 GHz. Therefore wider sub
bands can be assigned, and a high data rate is possible
• Use of certain portions of the band requires permission from authorities
• Microwaves need unidirectional antennas that send out signals in one direction.
• Two types of antennas are used for microwave communications: the parabolic dish
and the horn
Applications
• cellular telephones
• satellite networks
• wireless LANs
3. Infrared
• Infrared waves having frequencies from 300 GHz to 400 THz (wavelengths from 1
mm to 770 nm)
• can be used for short-range communication.
• Infrared waves, having high frequencies, cannot penetrate walls.
• Infrared signals useless for long-range communication.
• In addition, we cannot use infrared waves outside a building because the sun's
rays contain infrared waves that can interfere with the communication.
Applications
• Infrared signals can be used for short-range communication in a closed area using
line- of-sight propagation.
Signal strength and interference??
The physical layer is the foundation of network communication, responsible for the actual
transmission and reception of raw data bits over a physical medium. The effectiveness of this
layer is greatly influenced by two crucial factors: signal strength and interference.
Signal strength
Signal strength, often measured in dBm (decibel-milliwatts) in wireless communication, refers to the
power level of the signal reaching the receiver. A stronger signal generally leads to better data
transmission performance.
Factors affecting signal strength:
 Distance: As the distance between the transmitter and receiver increases, signal strength
naturally decreases due to path loss.
 Obstacles: Physical obstructions like walls, buildings, and furniture can block or reflect signals,
leading to attenuation (reduction in signal strength).
 Antenna characteristics: Antenna gain and directional focus can significantly impact signal
strength at the receiver.
 Frequency: Higher frequencies tend to experience greater attenuation over distance compared to
lower frequencies.
 Transmission power: The strength at which a signal is transmitted directly affects its initial
power and thus the received signal strength.
Interference
Interference in wireless communication refers to unwanted signals or disturbances that disrupt the
transmission and reception of data. These unwanted signals can make it difficult for the receiver
to correctly interpret the intended message.
Types of interference
 Co-channel interference: Occurs when different wireless devices transmit on the same frequency
channel, causing their signals to overlap and interfere.
 Adjacent channel interference: Happens when signals on nearby frequencies interfere with each
other, particularly when channels are too close together or filters are imperfect.
 Electromagnetic interference (EMI): External electromagnetic signals from various electronic
devices (microwaves, cordless phones, etc.) can interfere with wireless signals.
 Multipath interference: When signals reflect off surfaces and arrive at the receiver at different
times, they can interfere with each other, causing distortion.
 Noise: Unwanted, random signals from various sources like thermal noise, induced noise, and
crosstalk can also degrade the quality of the transmitted signal.
 Self-interference (SI): This happens when a transceiver's transmitted signal leaks into its own
receiver, a significant challenge in full-duplex systems.
Impact on performance
Both low signal strength and high interference can severely impact network performance at the
physical layer:
 Reduced data rates: Weak or noisy signals necessitate the use of simpler modulation and coding
schemes, leading to slower data speeds.
 Increased error rates: Interference and noise can corrupt transmitted data, requiring
retransmissions and reducing efficiency.
 Dropped connections: When the signal strength falls below a critical threshold or interference
levels become too high, connections can be dropped.
 Increased latency: Delays caused by retransmissions and processing of impaired signals can
increase latency, impacting real-time applications.
Importance of the Signal-to-Interference-Plus-Noise Ratio (SINR)
The SINR is a crucial metric that quantifies the quality of a received signal in the presence of both
interference and noise. It is the ratio of the desired signal power to the combined power of
interference and noise. A higher SINR indicates a clearer signal and better communication
quality. Mitigating interference and improving signal strength
Several techniques can be employed at the physical layer to address these challenges:
 Signal amplification and repeaters: These devices boost the strength of attenuated signals,
compensating for loss over distance.
 Antenna tuning and optimization: Proper antenna selection, placement, and orientation can
increase the received signal strength and focus energy in desired directions.
 Shielding and proper grounding: Using shielded cables and ensuring correct grounding can
minimize electromagnetic interference and noise pickup.
 Filtering and equalization: Filtering can remove unwanted frequency components from the
signal, while equalization techniques compensate for distortion caused by variations in signal
frequencies and propagation delays.
 Channel planning and resource allocation: Optimizing channel selection and allocating resources
strategically can minimize co-channel and adjacent channel interference.
 Adaptive modulation and coding: Dynamically adjusting modulation and coding schemes based
on channel conditions allows devices to maintain stable connections even with varying signal
strengths and interference levels.
 Beam forming: Advanced antenna systems can focus signals in specific directions, increasing
signal strength and reducing interference from other directions.
 Interference cancellation: Techniques like interference alignment and successive interference
cancellation aim to actively identify and eliminate or suppress interference.
Data Encoding??
Data encoding in the physical layer is the process of converting digital data (sequences of 0s and 1s)
into signals that can be transmitted over a physical medium, like cables or wireless
channels. This conversion is necessary because raw binary data is not directly suitable for
transmission over most media.
Purpose of Encoding:

 Make data transmittable:


Raw binary data needs to be transformed into electrical, optical, or radio wave signals that can
propagate through the chosen medium.
 Ensure reliable transmission:
Encoding techniques help in error detection and correction, making the transmission more robust.
 Support synchronization:
Encoding methods can facilitate bit synchronization, ensuring the receiver knows when a bit starts
and ends.
 Enable efficient use of bandwidth:
Some encoding techniques optimize the use of the available bandwidth by minimizing
redundancy.
Types of Encoding:
1. Digital-to-digital encoding:
Converts digital data (0s and 1s) into different voltage levels, signal transitions, or other digital
representations.
 Examples:
 Non-Return-to-Zero (NRZ): Uses different voltage levels for 0s and 1s.
 Manchester Encoding: Uses signal transitions (high to low or low to high) in the middle of
each bit to represent 0s and 1s, improving synchronization.
 Bipolar Encoding: Uses three voltage levels (positive, negative, and zero) to represent data,
with alternating positive and negative levels for consecutive 1s.
2. Digital-to-analog encoding (modulation):
Converts digital data into analog signals for transmission over analog channels.
a. Examples:
i. Amplitude Shift Keying (ASK): Changes the amplitude of the carrier signal to represent
different bits.
ii. Frequency Shift Keying (FSK): Changes the frequency of the carrier signal.
iii. Phase Shift Keying (PSK): Changes the phase of the carrier signal.
The Encoding Process:
1. 1. Data Source:
The data to be transmitted is represented in a digital format (e.g., sequences of 0s and 1s).
2. 2. Encoding:
The physical layer encoding process converts this digital data into a specific signal pattern
(electrical, optical, or radio wave).
3. 3. Transmission:
The encoded signal is then transmitted over the physical medium (cable, fiber optic, or wireless
channel).
4. 4. Decoding:
At the receiver, the signal is decoded back into its original digital representation.
4. Importance of Synchronization:
Data encoding is a fundamental process in the physical layer that bridges the gap between digital
data and the physical world, enabling reliable and efficient communication over various
transmission media.
MULTIPLEXING??
Multiplexing is 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.
Following Figure shows the basic format of a multiplexed system. The lines on the left direct
their transmission streams to a multiplexer (MUX), which combines them into a single stream
(many- to one). At the receiving end, that stream is fed into a demultiplexer (DEMUX), which
separates the stream back into its component transmissions (one-to-many) and directs them to
their corresponding lines.

MULTIPLEXING TECHNQUIES: There are three basic multiplexing techniques: frequency-


division multiplexing and time-division multiplexing. The first technique is designed for analog
signals, the second, for digital signals.
Frequency-division multiplexing (FDM):
 Frequency-division multiplexing (FDM) is an analog technique that can be applied when the
bandwidth of a link is greater than the combined bandwidths of the signals to be transmitted.
 In FDM, signals generated by each sending device modulate different carrier frequencies.
 These modulated signals are then combined into a single composite signal that can be
transported by the link.
 Carrier frequencies are separated by sufficient bandwidth to accommodate the modulated signal.
 These bandwidth ranges are the channels through which the various signals travel.
 Channels can be separated by strips of unused bandwidth-guard bands-to prevent signals from
overlapping.
 In addition, carrier frequencies must not interfere with the original data frequencies.
Above Figure gives a conceptual view of FDM. In this illustration, the transmission path is divided
into three parts, each representing a channel that carries one transmission.
Multiplexing Process:
Following Figure is a conceptual illustration of the multiplexing process. Each source generates a
signal of a similar frequency range. Inside the multiplexer, these similar signals modulates
different carrier frequencies (f1, f2, and f3). The resulting modulated signals are then combined
into a single composite signal that is sent out over a media link that has enough bandwidth to
accommodate it.

Demultiplexing Process:
The demultiplexer uses a series of filters to decompose the multiplexed signal into its constituent
component signals. The individual signals are then passed to a demodulator that separates them
from their carriers and passes them to the output lines. Following Figure is a conceptual
illustration of demultiplexing process.
Applications of FDM: A very common application of FDM is AM and FM radio broadcasting.
Time-Division Multiplexing
 Time-division multiplexing (TDM) is a digital process that allows several connections to share
the high bandwidth of a link.
 Instead of sharing a portion of the bandwidth as in FDM, time is shared.
 Each connection occupies a portion of time in the link. In the figure, portions of signals 1, 2, 3,
and 4 occupy the link sequentially.
 TDM into two different schemes: synchronous and statistical.
1. Synchronous TDM: Time slots are preassigned and are fixed. Each source is given it's time slot at
every turn due to it. This turn may be once per cycle, or several turns per cycle ,if it has a high data
transfer rate, or may be once in a no. of cycles if it is slow. This slot is given even if the source is not
ready with data. So this slot is transmitted empty.

2. Asynchronous TDM: In this method, slots are not fixed. They are allotted dynamically
depending on speed of sources, and whether they are ready for transmission.
DATA LINK LAYER DESIGN ISSUES
The data link layer uses the services of the physical layer to send and receive bits over
communication channels.
It has a number of functions, including:
1. Providing a well-defined service interface to the network layer.
2. Dealing with transmission errors.
3. Regulating the flow of data so that slow receivers are not swamped by fast senders.
To accomplish these goals, the data link layer takes the packets it gets from the network layer
and encapsulates them into frames for transmission.
Each frame contains:
a frame header,
a payload field for holding the packet,
a frame trailer

Frame management forms the heart of what the data link layer does.

Function1 : service provided to network layer


The principal service is transferring data from the network layer on the source machine to the
network layer on the destination machine.
various services offered are:
1. Unacknowledged connectionless service.
2. Acknowledged connectionless service.
3. Acknowledged connection-oriented service

1. Unacknowledged connectionless service consists of having the source machine send


independent frames to the destination machine without having the destination machine
acknowledge them. Eg : Ethernet. No logical connection is established beforehand or released
afterward. If a frame is lost due to noise on the line, attempt is made to detect the loss or
recover from it in the data link layer. This class of service is appropriate when the error rate is
very low, so recovery is left to higher layers. It is also appropriate for real-time traffic, such as
voice, in which late data are worse than bad data.
2. Acknowledged connectionless service. there are still no logical connections used, but each
frame sent is individually acknowledged. The sender knows whether a frame has arrived
correctly or been lost. If it has not arrived within a specified time interval, it can be sent again.
This service is useful over unreliable channels, such as wireless systems. 802.11 (WiFi).

[Link]-oriented service. The source and destination machines establish a connection


before any data are transferred. Each frame sent over the connection is numbered, and the data
link layer guarantees that each frame sent is indeed received. It guarantees that each frame is
received exactly once and that all frames are received in the right order. Connection-oriented
service thus provides the network layer processes with the equivalent of a reliable bit stream.
In this transfers go through three distinct phases.
In the first phase, the connection is established by having both sides initialize variables and
counters needed to keep track of which frames have been received and which ones have not. In
the second phase, one or more frames are actually transmitted.
In the third and final phase, the connection is released, freeing up the variables, buffers, and other
resources used to maintain the connection.

Function2 : Framing:
The data link layer have to detect and, if necessary, correct errors in the bit stream received from
the physical layer.
The data link layer to break up the bit stream into discrete frames, compute a short token called a
checksum for each frame, and include the checksum in the frame when it is transmitted. When
a frame arrives at the destination, the checksum is recomputed. If the newly computed
checksum is different from the one contained in the frame, the data link layer knows that an
error has occurred and takes steps to deal with it.
Four methods of breaking up the bit stream into frames:
1. Byte count.
2. Flag bytes with byte stuffing.
3. Flag bits with bit stuffing.
4. Physical layer coding violations.
1. Byte count :
A field in the header is used to specify the number of bytes in the frame. When the data link
layer at the destination sees the byte count, it knows how many bytes follow and hence where
the end of the frame is. Example frames of sizes 5, 5, 8, and 8 bytes, respectively.

Drawback: The count can be garbled by a transmission error. For example, if the byte count of 5
in the second frame of Fig. 3-3(b) becomes a 7 due to a single bit flip, the destination will get out
of synchronization. It will then be unable to locate the correct start of the next frame. Even if
the checksum is incorrect so the destination knows that the frame is bad, it still has no way of
telling where the next frame starts. Sending a frame back to the source asking for a
retransmission does not help either, since the destination does not know how many bytes to
skip over to get to the start of the retransmission.

2. Flag bytes with byte stuffing:


This method gets around the problem of resynchronization after an error by having each frame start
and end with special bytes. In the past, the starting and ending bytes were different, but in recent
years most protocols have used the same byte, called a flag byte, as both the starting and ending
delimiter, as shown in Fig. 3-5(a) as FLAG.
If the receiver ever loses synchronization, it can just search for the flag byte to find the end of
the current frame. Two consecutive flag bytes indicate the end of one frame and start of the
next one.
Problem: when binary data, are being transmitted. The flag byte's bit pattern occurs in the data.
The sender's data link layer insert a special escape byte (ESC) just before each ''accidental''
flag byte in the data. The data link layer on the receiving end removes the escape byte before
the data are given to the network layer. This technique is called byte stuffing or character
stuffing. Thus, a framing flag byte can be distinguished from one in the data by the absence or
presence of an escape byte before it.
Any single escape byte is part of an escape sequence, whereas a doubled one indicates that a
single escape occurred naturally in the data.
Disadvantage: It is closely tied to the use of 8-bit characters.
New technique had to be developed to allow arbitrary sized characters.

3. Flag bits with bit stuffing:


This technique allows data frames to contain an arbitrary number of bits and allows character
codes with an arbitrary number of bits per character.
Each frame begins and ends with a special bit pattern, 01111110 (in fact, a flag byte).
Whenever the sender's data link layer encounters five consecutive 1s in the data, it
automatically stuffs a 0 bit into the outgoing bit stream. This bit stuffing is analogous to byte
stuffing, in which an escape byte is stuffed into the outgoing character stream before a flag
byte in the data.
When the receiver sees five consecutive incoming 1 bits, followed by a 0 bit, it automatically
deletes the 0 bit. Just as byte stuffing is completely transparent to the network layer in both
computers, so is bit stuffing. If the user data contain the flag pattern, 01111110, this flag is
transmitted as 011111010 but stored in the receiver's memory as 01111110.

The boundary between two frames can be unambiguously recognized by the flag pattern. Thus,
if the receiver loses track of where it is, all it has to do is scan the input for flag sequences,
since they can only occur at frame boundaries and never within the data.

4. Physical layer coding violations.


It is only applicable to networks in which the encoding on the physical medium contains some
redundancy. For example, some LANs encode 1 bit of data by using 2 physical bits. Normally,
a 1 bit is a high-low pair and a 0 bit is a low-high pair. The scheme means that every data bit
has a transition in the middle, making it easy for the receiver to locate the bit boundaries. The
combinations high-high and low-low are not used for data but are used for delimiting frames in
some protocols.
Many data link protocols use a combination of a character count with one of the other methods
for extra safety. When a frame arrives, the count field is used to locate the end of the frame.
Only if the appropriate delimiter is present at that position and the checksum is correct is the
frame accepted as valid. Otherwise, the input stream is scanned for the next delimiter.

Function3 : Error Control:


Making sure all frames are eventually delivered to the network layer at the destination and in
the proper order.
To ensure reliable delivery is to provide the sender with some feedback : Typically, the
protocol calls for the receiver to send back special control frames bearing positive or negative
acknowledgements about the incoming frames. If the sender receives a positive
acknowledgement about a frame, it knows the frame has arrived safely. A negative
acknowledgement means that something has gone wrong, and the frame must be transmitted
again.

The hardware troubles may cause a frame to vanish completely. Then introducing timers into
the data link layer. When the sender transmits a frame, it generally also starts a timer. The
timer is set to expire after an interval long enough for the frame to reach the destination, be
processed there, and have the acknowledgement propagate back to the sender. Normally, the
frame will be correctly received and the acknowledgement will get back before the timer runs
out, in which case the timer will be canceled.
Either the frame or the acknowledgement is lost, the timer will go off, alerting the sender. The
solution is to just transmit the frame again. However, when frames may be transmitted multiple
times there is a danger that the receiver will accept the same frame two or more times and
pass it to the network layer more than once. To prevent this from happening, it is generally
necessary to assign sequence numbers to outgoing frames, so that the receiver can distinguish
retransmissions from originals.

Function4: Flow Control:


Design issue associated when sender is fast and receiver is slow. The sender keeps pumping
the frames out at a high rate until the receiver is completely swamped. At a certain point the
receiver will simply be unable to handle the frames as they arrive and will start to lose some.
Two approaches are commonly used.
1. feedback-based flow control, the receiver sends back information to the sender giving
it permission to send more data or at least telling the sender how the receiver is doing.
2. rate-based flow control, the protocol has a built-in mechanism that limits the rate at
which senders may transmit data, without using feedback from the receiver.
FLOW CONTROL

Flow control is a set of procedures which tells the sender how much data can be transmitted before
it must wait for an acknowledgment from the receiver.
Flow of data must not overload the receiver
Receiver must also be able to inform the sender before it reaches the limit. Flow
control techniques are of two types :
1. stop and wait / request-reply FC
2. sliding window FC
1. Stop-and-Wait Flow Control:
This method is the easiest and simplest form of flow control. A message or data is broken down
into various multiple frames, and then receiver indicates its readiness to receive frame of
data. When acknowledgment is received, then only sender will send or transfer the next frame.
This process is continued until sender transmits EOT (End of Transmission) frame. In this
method, only one of frames can be in transmission at a time. It leads to inefficiency i.e. less
productivity if propagation delay is very much longer than the transmission delay.
Sender sends one data packet and then waits for its acknowledgement.
Sender sends the next packet only after it receives the acknowledgement for the previous packet.
Advantages –
This method is very easiest and simple and each of the frames is checked and acknowledged
well.
It can also be used for noisy channels.
This method is also very accurate.
Disadvantages –
This method is fairly slow.
In this, only one packet or frame can be sent at a time.
It is very inefficient and makes the transmission process very slow.

2. Sliding Window Flow Control:


This method is required where reliable in-order delivery of packets or frames is very much
needed like in data link layer. It is point to point protocol that assumes that none of the other
entity tries to communicate until current data or frame transfer gets completed. The sender
transmits or sends various frames or packets before receiving any acknowledgment. Both the
sender and receiver agree upon total number of data frames after which acknowledgment is
needed to be transmitted. Data Link Layer requires and uses this method that simply allows
sender to have more than one unacknowledged packet ―in-flight‖ at a time. This increases and
improves network throughput.

For any sliding window protocol to work without any problem, the following condition must
be satisfied-
Available Sequence Numbers <= Sender Window Size + Receiver Window Size
Advantages –
It performs much better than stop-and-wait flow control.
This method increases efficiency.
Multiples frames can be sent one after another.
Disadvantages –
The main issue is complexity at the sender and receiver due to the transferring of multiple
frames.
The receiver might receive data frames or packets out the sequence.

Maximum number of frames that sender can send without acknowledgement = Sender window
size

Sliding window protocol again is of three types:


1. stop and wait ARQ
2. go back n ARQ
3. Selective repeat ARQ

Stop and Wait ARQ

Stop and Wait ARQ


= Stop and Wait Protocol + Time Out Timer + Sequence Numbers for Data Packets
and Acknowledgement
Stop and wait ARQ is a one bit sliding window protocol where-
Sender window size = 1
Receiver window size = 1

Thus, in stop and wait ARQ,


Minimum number of sequence numbers required = Sender Window Size + Receiver Window
Size
= 1+1 =2.

Minimum number of sequence numbers required in Stop and Wait ARQ = 2.


Two sequence number used are 0 and 1

Go back N ARQ / continuous arq


In Go back N, sender window size is N and receiver window size is always 1.
Go back N uses cumulative acknowledgements – sender keep on sending without waiting for
the acknowledgement. Sender keeps a copy of the message till ack received. Receiver sends
ack if message delivered correct or else negative acknowledgement nack.
Receiver maintains an acknowledgement timer.
Each time the receiver receives a new frame, it starts a new acknowledgement timer.
After the timer expires, receiver sends the cumulative acknowledgement for all the frames that
are unacknowledged at that moment.
If receiver receives a frame that is corrupted, then it silently discards that frame.
The correct frame is retransmitted by the sender after the time out timer expires.
Go back N does not accept out of order frames and silently discards them.
Go back N leads to retransmission of entire window if for any frame, no ACK is received by
the sender.

Over all go back n

Selective Repeat Protocol-


In SR protocol, sender window size is always same as receiver window size. SR protocol uses
independent acknowledgements only.
In SR protocol,
 If receiver receives a frame that is corrupted, then it does not silently discard that frame.
 Receiver handles the situation efficiently by sending a negative acknowledgement
(NACK).
 Negative acknowledgement allows early retransmission of the corrupted frame.
 It also avoids waiting for the time out timer to expire at the sender side to retransmit the
frame.
Consider receiver receives a frame whose sequence number is not what the receiver expects.
Then, it does not discard that frame rather accepts it and keeps it in its window.

In SR protocol,
 Receiver window is implemented as a linked list.
 When receiver receives a new frame, it places the new frame at the end of the linked list.
 When the received frames are out of order, receiver performs the sorting.
 Sorting sorts the frames in the correct order.
Only the missing frame has to be sent by the sender.
 For sending the missing frame, sender performs searching and finds the missing frame.
 Then, sender selectively repeats that frame.
 Thus, only the selected frame is repeated and not the entire window.
SR protocol leads to retransmission of lost frames after expiry of time out timer.

Piggy Backing
To improve the efficiency of bidirectional protocols. Full duplex transmission can be achieved using
two separate communicating channels that is wastage of bandwidth.
When a data frame arrives a receiver, it will not send the acknowledgment immediately instead it
waits until its network layer passes data to data link layer. The acknowledgement is attached to
data frame. The technique in which out going acknowledgement is delayed is called as
piggybacking.

DATA LINK PROTOCOLS – HDLC,PPP


PPP – Point to Point Protocol
HDLC - High level Data Link Control Is a
bit oriented protocol.

Three types of station are being defined in HDLC:


1) Primary station – responsible for connecting and disconnecting data link. The frames
sent by them are called commands.
2) Secondary station – operates under the control of primary station. The frames sent by
them are called response.
3) Combined station – can act as a primary and secondary station. The frames can be
command or response.
Frame format:
HDLC There are three kinds of frames:
1) Information frame / I frame – used to transport user data and control information
related to user data.
2) Supervisory frame / S frame - used to transport control information.
3) Unnumbered frame / U frame - is reserved for system management and information
carried for managing the link.

Each frame acts as an envelope for the transmission of different type of message. Each frame may
carry up to six fields
frame structure.

01111110 – flag field – 8 bit sequence that identifies beginning an end of frames. This helps as
synchronization pattern for the receiver. The frame is delimited with another flag sequence
(01111110).
The Address field is used to identify one of the terminals. This can be 1 byte or more. 1 byte can
identify 128 stations.
The Control field is 1 or 2 bytes used for flow control or error control. This bits depends on the
frame type.

The Data field may contain any information. It may be arbitrarily long. The
Checksum field – error detection field
The minimum frame contains three fields and totals 32 bits, excluding the flags on either end. The

contents of the Control field vary for these three kinds:

Control field of I frame :

I frame is used to carry data from network layer. Iframe include flow control and error control
information.
 1st bit is 0 – denotes that frame is of type I
 Next 3 bits -The Seq field is the frame sequence number. (0 -7)
 The P/F bit stands for Poll/Final.
P/F = 1 poll : frame sent by primary to secondary.
P/F = 0 final : frame sent by secondary to primary.
 The Next field is a piggybacked acknowledgement number. Instead of piggybacking
the number of the last frame received correctly, they use the number of the first frame
not yet received (i.e., the next frame expected). The choice of using the last frame
received or the next frame expected is arbitrary.
Control field of S frame :

Supervisory frame are used for flow and error control when piggybacking is inappropriate. Eg:
when station has no data to send of its own or have to send some thing othe than
acknowledgement.
S frame do not have information field.
 First two bits 1 0 means its S frame.
 3 and 4 bit – Type of S frame :
The various kinds of Supervisory frames are distinguished by the Type field.
 Type 00 / Receive Ready is an acknowledgement frame used to indicate the next
frame expected.
 Type 01/ Reject S frame is a negative acknowledgement frame. It is used to
indicate that a transmission error has been detected. The Next field indicates the
first frame in sequence not received correctly (i.e., the frame to be retransmitted).
The sender is required to retransmit all outstanding frames starting at Next.
 Type 10/ Receive not ready - mentions receiver is busy and cannot receive any
frame.
 Type 11 / Selective reject. It calls for retransmission of only the frame specified.
 The P/F bit stands for Poll/Final.
P/F = 1 poll : frame sent by primary to secondary.
P/F = 0 final : frame sent by secondary to primary.
 The Next field is a piggybacked acknowledgement number

Control field of U frame :


The third class of frame is the Un-numbered frame. It is sometimes used for control purposes but
can also carry data when unreliable connectionless service is called for.

2 bits befor P/F and 3 bits after together they contribute upto 32 different types of u frames. HDLC

provides two communication transfer modes:


1) Normal Response Mode (NRM)
2) Asynchronous Balanced Mode (ABM)

Normal Response Mode (NRM)


Is having unbalanced station configuration. One primary station and multiple secondary stations.
NRM is used for both point to point and multi point links.

Asynchronous Balanced Mode (ABM)


Configuration is balanced. Link is
point to point.
Each station can function as primary and secondary. Frame
transmitted as full duplex mode.
1. logical link control (LLC) and
2. media access control (MAC).

Logical Link Control (LLC)


Data link control handles framing, flow control, and error control.
In IEEE Project 802, flow control, error control,and part of the framing duties are collected
into one sublayer called the logical link control.
Framing is handled in both the LLC sublayer and the MAC sublayer. The LLC provides one
single data link control protocol for all IEEE LANs. In this way, the LLC is different from the
media access control sublayer, which provides different protocols for different LANs.
A single LLC protocol can provide interconnectivity between different LANs because it makes
the MAC sublayer transparent.

Framing LLC defines a protocol data unit (PDU).


 The header contains a control field for flow and error control.
 The two other header fields define the upper-layer protocol at the source and
destination that uses LLC. These fields are called the destination service access point
(DSAP) and the source service access point (SSAP).
 The other fields defined in a typical data link control protocol are moved to the MAC
sublayer.
 In other words, a frame defined in HDLC is divided into a PDU at the LLC sublayer
and a frame at the MAC sublayer, as shown in Fig 2.

Media Access Control (MAC)


IEEE Project 802 has created a sublayer called media access control that defines the specific access
method for each LAN.
For example, it defines CSMA/CD as the media access method for Ethernet LANs and the token
passing method for Token Ring and Token Bus LANs. A part of the framing function is also
handled by the MAC layer. The MAC sublayer contains a number of distinct modules; each
defines the access method and the framing format specific to the corresponding LAN protocol.

Functions of MAC:
1. Perform control of access to media
2. Perform unique addressing to station directly connected to LANS
3. Error detection

Channel allocation problem:


1. Static channel allocation - eg: FDM, TDM
2. Dynamic channel allocation – eg: no fixed
time and frequency

Multiple access protocols:


1. ALOHA 1. Random access
a. Pure aloha 2. Controlled access
b. Slotted aloha 3. Channelization
2. Carrier sense multiple access (CSMA)
a. Persistent and non-persistent
CSMA
b. CSMA with collision detection
3. Wavelength division multiplexing

MAC – MEDIA ACCESS CONTROL


ALOHA system, used groundbased radio broadcasting, the basic idea is applicable to any system
in which uncoordinated users are competing for the use of a single shared channel. There are
two versions of ALOHA: pure and slotted. They differ with respect to whether time is
continuous, as in the pure version, or divided into discrete slots into which all frames must fit.

Pure ALOHA
The basic idea of an ALOHA system is simple: users transmit whenever they have data to be sent.
The colliding frames will be damaged. Senders need some way to find out the collision.
After each station has sent its frame to the central computer, this computer rebroadcasts the
frame to all of the stations. A sending station thus listen for the broadcast from the hub to see if
its frame has gotten through.
In other systems, such as wired LANs, the sender might be able to listen for collisions while
transmitting. If the frame was destroyed, the sender just waits a random amount of time and
sends it again. The waiting time must be random or the same frames will collide over and over,
in lockstep. Systems in which multiple users share a common channel in a way that can lead to
conflicts are known as contention systems.

All the frames are with the same length because the throughput of ALOHA systems is
maximized by having a uniform frame size rather than by allowing variable-length frames.
Whenever two frames try to occupy the channel at the same time, there will be a collision (as
seen in Fig. 4-1) and both will be garbled. If the first bit of a new frame overlaps with just the
last bit of a frame that has almost finished, both frames will be totally destroyed (i.e., have
incorrect checksums) and both will have to be retransmitted later. The checksum does not (and
should not) distinguish between a total loss and a near miss.

If N > 1, the user community is generating frames at a higher rate than the channel can handle,
and nearly every frame will suffer a collision. For reasonable throughput, we would expect
0 <N< 1.

A frame will not suffer a collision if no other frames are sent within one frame time of its start,
as shown in Fig. 4-2.
Let t be the time required to send one frame. If any other user has generated a frame between
time t 0 and t 0 + t, the end of that frame will collide with the beginning of the shaded one. In
fact, the shaded frame‘s fate was already sealed even before the first bit was sent, but since in
pure ALOHA a station does not listen to the channel before transmitting, it has no way of
knowing that another frame was already underway. Similarly, any other frame started between
t 0 + t and t 0 + 2t will bump into the end of the shaded frame.

The probability that k frames are generated during a given frame time, in which G frames are
expected, is given by the Poisson distribution.
Slotted ALOHA
A method for doubling the capacity of an ALOHA system. His proposal was to divide time
into discrete intervals called slots, each interval corresponding to one frame. This approach
requires the users to agree on slot boundaries. One way to achieve synchronization would be to
have one special station emit a pip at the start of each interval, like a clock the continuous time
ALOHA is turned into a discrete time one. This halves the vulnerable period. To see this, look
at Fig. 4-3 and imagine the collisions that are now possible. The probability of no other traffic
during the same slot as our test frame is then e −G, which leads to
S = Ge −G
The slotted ALOHA peaks at G = 1, with a throughput of S = 1/e or about 0.368, twice that of
pure ALOHA. The probability of a collision is then just 1 − e −G. The probability of a
transmission requiring exactly k attempts (i.e., k − 1 collisions followed by one success) is

With slotted ALOHA, the best channel utilization that can be achieved is 1/e

Carrier sense multiple access (CSMA)


Protocols in which stations listen for a carrier (i.e., a transmission) and act accordingly are
called carrier sense protocols.
a. Persistent and non-persistent CSMA
b. CSMA with collision detection

Persistent and Nonpersistent CSMA:


1-persistent CSMA - When a station has data to send, it first listens to the channel to see if
anyone else is transmitting at that moment. If the channel is idle, the stations sends its data.
Otherwise, if the channel is busy, the station just waits until it becomes idle. Then the station
transmits a frame. If a collision occurs, the station waits a random amount of time and starts all
over again. The protocol is called 1-persistent because the station transmits with a probability
of 1 when it finds the channel idle. If two stations become ready in the middle of a third
station‘s transmission, both will wait politely until the transmission ends, and then both will
begin transmitting exactly simultaneously, resulting in a collision. This chance depends on the
number of frames that fit on the channel, or the bandwidth-delay product of the channel.

nonpersistent CSMA- As before, a station senses the channel when it wants to send a frame,
and if no one else is sending, the station begins doing so itself. However, if the channel is
already in use, the station does not continually sense it for the purpose of seizing it
immediately upon detecting the end of the previous transmission. Instead, it waits a random
period of time and then repeats the algorithm. Consequently, this algorithm leads to better
channel utilization but longer delays than 1-persistent CSMA.

p-persistent CSMA. It applies to slotted channels.. When a station becomes ready to send, it
senses the channel. If it is idle, it transmits with a probability p. With a probability q = 1 − p, it
defers until the next slot. If that slot is also idle, it either transmits or defers again, with
probabilities p and q. This process is repeated until either the frame has been transmitted or
another station has begun transmitting. In the latter case, the unlucky station acts as if there had
been a collision (i.e., it waits a random time and starts again). If the station initially senses that
the channel is busy, it waits until the next slot and applies the above algorithm. IEEE 802.11
uses a refinement of p-persistent CSMA

CSMA with Collision Detection:


CSMA/CD (CSMA with Collision Detection), is the basis of the classic Ethernet LAN.
Collision detection is an analog process. The station‘s hardware must listen to the channel
while it is transmitting. If the signal it reads back is different from the signal it is putting out, it
knows that a collision is occurring. The implications are that a received signal must not be tiny
compared to the transmitted and that the modulation must be chosen to allow collisions to be
detection.

At the point marked t 0, a station has finished transmitting its frame. Any other station having
a frame to send may now attempt to do so. If two or more stations decide to transmit
simultaneously, there will be a collision. If a station detects a collision.
Our model for CSMA/CD will consist of alternating contention and transmission periods, with
idle periods occurring when all stations are quiet.

IEEE 802 STANDARDS:


IEEE has developed the layered architecture and other standards of LAN. In LAN all station
share a common cable. So IEEE developed 3 mechanisms of media access control.
 Carrier Sense Multiple Access / Collision Detection (CSMA/CD)- IEEE 802.3-
ETHERNET
 Token bus – IEEE 802.4
 Token Ring – IEEE 802.5

IEEE 802.3

The IEEE has standardized a number of local area networks and metropolitan area networks
under the name of IEEE 802(Ethernet).
Two kinds of Ethernet exist:
 Classic Ethernet, which solves the multiple access problem using the techniques. ran
at rates from 3 to 10 Mbps
 Switched Ethernet, in which devices called switches are used to connect different
computers. runs at 100, 1000, and 10,000 Mbps, in forms called fast Ethernet, gigabit
Ethernet, and 10 gigabit Ethernet.

ETHERNET cabling:
The first number is the speed in Mbps. Then comes the word ''Base'' (or sometimes ''BASE'') to
indicate baseband transmission.
 10Base5 cabling, popularly called thick Ethernet –
It has markings every 2.5 meters to show where the taps go. Connections to it are
generally made using vampire taps. It operates at 10 Mbps, uses baseband signaling,
and can support segments of up to 500 meters.
 10Base2, or thin Ethernet - covers 200m
Connections to it are made using industrystandard BNC connectors to form T
junctions, rather than using vampire taps. BNC connectors are easier to use and more
reliable. Thin Ethernet is much cheaper and easier to install, but it can run for only 185
meters persegment. It can handle up to 30 machines.
 10BaseT – Twisted pair cable – covers 100m and can connect up to 1024 machines.
 10BaseF – Fiber Optics – covers 2000m

10base5 and 10base2 uses bus topology, 10baseT and 10baseF uses star topology.

The Ethernet MAC Sublayer Protocol

 Each frame starts with a Preamble of 8 bytes (preamble 7 bytes + SFD 1 byte),
each containing the bit pattern 10101010.
 The frame contains two addresses, one for the destination and one for the source.
The standard allows 2-byte and 6-byte addresses. When a frame is sent to a group
address, all the stations in the group receive it. Sending to a group of stations is
called multicast. The address consisting of all 1 bits is reserved for broadcast. A
frame containing all 1s in the destination field is accepted by all stations on the
network.
The difference between multicast and broadcast is: A multicast frame is sent to a
selected group of stations on the Ethernet; a broadcast frame is sent to all stations
on the Ethernet. Multicast is more selective, but involves group management.
Broadcasting is coarser but does not require any group management.
o the destination address – physical address of destination station.
o Source address – physical address of the node which send the packets.
 The Type field, which tells the receiver what to do with the frame.
 Next come the data, up to 1500 bytes.
 If the data portion of a frame is less than 46 bytes, the Pad
field is used to fill out
the frame to the minimum size.
 The final Ethernet field is the Checksum. It is effectively a 32-bit hash code of the
data for error detection. There is a restriction imposed on minimum(512 bits) and
maximum(12144 bits) length of frame. The restriction of minimum length is to
ensure correct option of CSMA/CD.

Addressing
Each station on an Ethernet network (such as a PC, workstation, or printer) has its own
network interface card (NIC). The NIC fits inside the station and provides the station with a 6-
byte physical address.
The Ethernet address is 6 bytes (48 bits), normally written in hexadecimal notation, with a
colon between the bytes.
06:01 :02:01:2C:4B
6 bytes =12 hex digits =48 bits

Type of address – last significant bit of first byte decides the type of addressing. If its 0 –
unicast else multicast. Broadcasting is a special type of multicasting in which all bits are 1‘s.
1) Unicast – source address is always unicast addressing
2) Multicast -
3) Broadcast

A unicast destination address defines only one recipient; the relationship between the sender
and the receiver is one-to-one. A multicast destination address defines a group of addresses;
the relationship between the sender and the receivers is one-to-many. The broadcast address is
a special case of the multicast address; the recipients are all the stations on the LAN. A
broadcast destination address is forty-eight.
Frame format:

 Start frame delimiter (SFD) – Alerts each station for the arrival of token(or data
frame) or start of the frame. It is used to synchronize clocks.

 Access control (AC)-


Priority bits and reservation bits help in implementing priority. Priority bits = reservation
bits = 3.
Token bit is used to indicate presence of token frame. If token bit = 1 –> token frame and if
token bit = 0 –> not a token frame.
Monitor bit helps in solving orphan packet problem. It is covered by CRC as monitor are
powerful machines which can recalculate CRC when modifying monitor bit. If monitor bit = 1 –
> stamped by monitor and if monitor bit = 0 –> not yet stamped by monitor.

 Frame control (FC) – First 2 bits indicates whether the frame contains data or control
information. In control frames, this byte specifies the type of control information.
 Destination address (DA) and Source address (SA) – consist of two 6-byte fields
which is used to indicate MAC address of source and destination.

 Data – Data length can vary from 0 to maximum token holding time (THT) according
to token reservation strategy adopted. Token ring imposes no lower bound on size of
data i.e. an advantage over Ethernet.
 Cyclic redundancy check (CRC) – 32 bit CRC which is used to check for errors in the frame, i.e., whether
the frame is corrupted or not. If the frame is corrupted, then its discarded.

 End delimiter (ED) – It is used to mark the end of frame. In Ethernet, length field is used for this purpose.
It also contains bits to indicate a damaged frame and identify the frame that is the last in a logical
sequence.

 Frame status (FS) – It Is a 1-byte field terminating a data frame


802.11 Architecture
There are two modes:
1) Infrastructure mode - The most popular mode is to connect clients, such as laptops
and smart phones, to another network, such as a company intranet or the Internet. This
mode is shown in Fig. 4-23(a). In infrastructure mode, each client is associated with an
AP (Access Point) that is in turn connected to the other network. The client sends and
receives its packets via the AP. Several access points may be connected together,
typically by a wired network called a distribution system, to form an extended 802.11
network. In this case, clients can send frames to other clients via their APs.
2) Adhoc mode - This mode is a collection of computers that are associated so that they
can directly send frames to each other. There is no access point.

The 802.11 Protocol Stack

The physical layer corresponds to the OSI physical layer.


The data link layer in all the 802 protocols is split into two or more sublayers. In 802.11, the
MAC (Medium Access Control) sublayer determines how the channel is allocated, that is,
who gets to transmit next. Above it is the LLC (Logical Link Control) sublayer, whose job it
is to hide the differences between the different 802 variants and make them indistinguishable
as far as the network layer is concerned.
1. The 802.11 Physical Layer
The 802.11 standard specifies three transmission techniques allowed in the physical layer. The
infrared method uses much the same technology as television remote controls do. The other
two use short-range radio, using techniques called FHSS and DSSS. Both of these use a part
of the spectrum that does not require licensing. Cordless telephones and microwave ovens also
use this band. All of these techniques operate at 1 or 2 Mbps and at low enough power that
they do not conflict too much.
Two new techniques were introduced to achieve higher bandwidth. These are called OFDM
and HR-DSSS. They operate at up to 54 Mbps and 11 Mbps, respectively.
A second OFDM modulation was introduced, but in a different frequency band from the first
one.

The infrared option uses diffused (i.e., not line of sight) transmission at 0.85 or 0.95 microns.
Two speeds are permitted: 1 Mbps and 2 Mbps. At 1 Mbps, an encoding scheme is used in
which a group of 4 bits is encoded as a 16-bit codeword containing fifteen 0s and a single 1,
using what is called Gray code. Infrared signals cannot penetrate walls, so cells in different
rooms are well isolated from each other. Nevertheless, due to the low bandwidth (and the fact
that sunlight swamps infrared signals), this is not a popular option.

FHSS (Frequency Hopping Spread Spectrum) uses 79 channels, each 1-MHz wide, starting
at the low end of the 2.4-GHz ISM band. A pseudorandom number generator is used to
produce the sequence of frequencies hopped to. As long as all stations use the same seed to the
pseudorandom number generator and stay synchronized in time, they will hop to the same
frequencies simultaneously. The amount of time spent at each frequency, the dwell time, is an
adjustable parameter, but must be less than 400 msec. FHSS' randomization provides a fair
way to allocate spectrum in the unregulated ISM band. It also provides a modicum of security
since an intruder who does not know the hopping sequence or dwell time cannot eavesdrop on
transmissions. Over longer distances, multipath fading can be an issue, and FHSS offers good
resistance to it. It is also relatively insensitive to radio interference, which makes it popular for
building-to-building links. Its main disadvantage is its low bandwidth.

DSSS (Direct Sequence Spread Spectrum), is also restricted to 1 or 2 Mbps. Each bit is
transmitted as 11 chips, using what is called a Barker sequence. It uses phase shift modulation
at 1 Mbaud, transmitting 1 bit per baud when operating at 1 Mbps and 2 bits per baud when
operating at 2 Mbps.

The first of the high-speed wireless LANs, 802.11a, uses OFDM (Orthogonal Frequency
Division Multiplexing) to deliver up to 54 Mbps. Different frequencies are used—52 of them,
48 for data and 4 for synchronization.

HR-DSSS (High Rate Direct Sequence Spread Spectrum), another spread spectrum
technique, which uses 11 million chips/sec to achieve 11 Mbps in the 2.4-GHz band. It is
called 802.11b but is not a follow-up to 802.11a. In fact, its standard was approved first and it
got to market first. Data rates supported by 802.11b are 1, 2, 5.5, and 11 Mbps. The two slow
rates run at 1 Mbaud, with 1 and 2 bits per baud, respectively, using phase shift modulation
(for compatibility with DSSS). The two faster rates run at 1.375 Mbaud, with 4 and 8 bits per
baud, respectively, using Walsh/Hadamard codes. The data rate may be dynamically adapted
during operation to achieve the optimum speed possible under current conditions of load and
noise. In practice, the operating speed of 802.11b is nearly always 11 Mbps. Although 802.11b
is slower than 802.11a, its range is about 7 times greater.

An enhanced version of 802.11b, 802.11g, was approved by IEEE. It uses the OFDM
modulation method of 802.11a but operates in the narrow 2.4-GHz ISM band along with
802.11b. It can operate at up to 54 MBps. The 802.11 committee has produced three different
high speed wireless LANs: 802.11a, 802.11b, and 802.11g.

2. The 802.11 MAC Sublayer Protocol


two problems persist:
The hidden station problem : . Since not all stations are within radio range of each other,
transmissions going on in one part of a cell may not be received elsewhere in the same cell. In
this example, station C is transmitting to station B. If A senses the channel, it will not hear
anything and falsely conclude that it may now start transmitting to B.

The exposed station problem, illustrated in Fig. 4- 26(b). Here B wants to send to C so it
listens to the channel. When it hears a transmission, it falsely concludes that it may not send to
C, even though A may be transmitting to D (not shown). In addition, most radios are half
duplex, meaning that they cannot transmit and listen for noise bursts at the same time on a
single frequency. As a result of these problems, 802.11 does not use CSMA/CD.

To deal with this problem, 802.11 supports two modes of operation. The first, called DCF
(Distributed Coordination Function), does not use any kind of central control (in that
respect, similar to Ethernet). The other, called PCF (Point Coordination Function), uses the
base station to control all activity in its cell. All implementations must support DCF but PCF is
optional.

When DCF is employed, 802.11 uses a protocol called CSMA/CA (CSMA with Collision
Avoidance). In this protocol, both physical channel sensing and virtual channel sensing are
used. Two methods of operation are supported by CSMA/CA.
 In the first method, when a station wants to transmit, it senses the channel. If it is idle,
it just starts transmitting. It does not sense the channel while transmitting but emits its
entire frame, which may well be destroyed at the receiver due to interference there. If
the channel is busy, the sender defers until it goes idle and then starts transmitting. If a
collision occurs, the colliding stations wait a random time, using the Ethernet binary
exponential backoff algorithm, and then try again later.

 The other mode of CSMA/CA operation is based on MACAW and uses virtual channel
sensing, as illustrated in Fig. 4-27. In this example, A wants to send to B. C is a station
within range of A (and possibly within range of B, but that does not matter). D is a
station within range of B but not within range of A. Figure 4-27. The use of virtual
channel sensing using CSMA/CA. The protocol starts when A decides it wants to send
data to B. It begins by sending an RTS frame to B to request permission to send it a
frame. When B receives this request, it may decide to grant permission, in which case it
sends a CTS frame back. Upon receipt of the CTS, A now sends its frame and starts an
ACK timer. Upon correct receipt of the data frame, B responds with an ACK frame,
terminating the exchange. If A's ACK timer expires before the ACK gets back to it, the
whole protocol is run again.
Now let us consider this exchange from the viewpoints of C and D. C is within range of
A, so it may receive the RTS frame. If it does, it realizes that someone is going to send
data soon, so for the good of all it desists from transmitting anything until the exchange
is completed. From the information provided in the RTS request, it can estimate how
long the sequence will take, including the final ACK, so it asserts a kind of virtual
channel busy for itself, indicated by NAV (Network Allocation Vector) in Fig. 4-27. D
does not hear the RTS, but it does hear the CTS, so it also asserts the NAV signal for
itself. Note that the NAV signals are not transmitted; they are just internal reminders to
keep quiet for a certain period of time.
 To deal with the problem of noisy channels, 802.11 allows frames to be fragmented into
smaller pieces, each with its own checksum. The fragments are individually numbered
and acknowledged using a stop-and-wait protocol (i.e., the sender may not transmit
fragment k + 1 until it has received the acknowledgment for fragment k). Once the
channel has been acquired using RTS and CTS, multiple fragments can be sent in a
row, as shown in Fig. 4-28. sequence of fragments is called a fragment burst.
Fragmentation increases the throughput by restricting retransmissions to the bad fragments rather
than the entire frame. The fragment size is not fixed by the standard but is a parameter of each
cell and can be adjusted by the base station. The NAV mechanism keeps other stations quiet
only until the next acknowledgement, but another mechanism (described below) is used to
allow a whole fragment burst to be sent without [Link] of the above discussion applies
to the 802.11 DCF mode. In this mode, there is no central control, and stations compete for air
time, just as they do with Ethernet.

The other allowed mode is PCF, in which the base station polls the other stations, asking them if
they have any frames to send. Since transmission order is completely controlled by the base
station in PCF mode, no collisions ever occur. The standard prescribes the mechanism for
polling, but not the polling frequency, polling order, or even whether all stations need to get
equal service.
The basic mechanism is for the base station to broadcast a beacon frame periodically (10 to 100
times per second). The beacon frame contains system parameters, such as hopping sequences
and dwell times (for FHSS), clock synchronization, etc. It also invites new stations to sign up
for polling service. Once a station has signed up for polling service at a certain rate, it is
effectively guaranteed a certain fraction of the bandwidth, thus making it possible to give
quality-of-service guarantees.

PCF and DCF can coexist within one cell. At first it might seem impossible to have central control
and distributed control operating at the same time, but 802.11 provides a way to achieve this
goal. It works by carefully defining the interframe time interval. After a frame has been sent, a
certain amount of dead time is required before any station may send a frame. Four different
intervals are defined, each for a specific purpose. The four intervals are depicted in Fig. 4-29.
Figure 4-29. Interframe spacing in 802.11
The shortest interval is SIFS (Short InterFrame Spacing). It is used to allow the parties in a
single dialog the chance to go first. This includes letting the receiver send a CTS to respond to
an RTS, letting the receiver send an ACK for a fragment or full data frame, and letting the
sender of a fragment burst transmit the next fragment without having to send an RTS again.

There is always exactly one station that is entitled to respond after a SIFS interval. If it fails to
make use of its chance and a time PIFS (PCF InterFrame Spacing) elapses, the base station
may send a beacon frame or poll frame. This mechanism allows a station sending a data frame
or fragment sequence to finish its frame without anyone else getting in the way, but gives the
base station a chance to grab the channel when the previous sender is done without having to
compete with eager users.

If the base station has nothing to say and a time DIFS (DCF InterFrame Spacing) elapses,
any station may attempt to acquire the channel to send a new frame. The usual contention rules
apply, and binary exponential backoff may be needed if a collision occurs.

The last time interval, EIFS (Extended InterFrame Spacing), is used only by a station that
has just received a bad or unknown frame to report the bad frame. The idea of giving this event
the lowest priority is that since the receiver may have no idea of what is going on, it should
wait a substantial time to avoid interfering with an ongoing dialog between two stations.

The 802.11 Frame Structure


The 802.11 standard defines three different classes of frames on the wire: data, control, and
management.

 The Frame Control field. It itself has 11 subfields.


o Protocol version, which allows two versions of the protocol to operate at the
same time in the same cell.
o The Type (data, control, or management) and Subtype fields (e.g., RTS or
CTS).
o The To DS and From DS bits indicate the frame is going to or coming from the
intercell distribution system (e.g., Ethernet).
o The MF bit means that more fragments will follow.
o The Retry bit marks a retransmission of a frame sent earlier.
o The Power management bit is used by the base station to put the receiver into
sleep state or take it out of sleep state.
o The More bit indicates that the sender has additional frames for the receiver.
o The W bit specifies that the frame body has been encrypted using the WEP
(Wired Equivalent Privacy) algorithm.
o The O bit tells the receiver that a sequence of frames with this bit on must be
processed strictly in order.
 the Duration field, tells how long the frame and its acknowledgement will occupy the
channel.
 The frame header contains four addresses, all in standard IEEE 802 format. The source
and destination. The other two addresses are used for the source and destination base
stations for intercell traffic.
 The Sequence field allows fragments to be numbered. Of the 16 bits available, 12
identify the frame and 4 identify the fragment.
 The Data field contains the payload, up to 2312 bytes, followed by the usual
Checksum.
 Management frames have a format similar to that of data frames, except without one
of the base station addresses, because management frames are restricted to a single cell.
 Control frames are shorter still, having only one or two addresses, no Data field, and
no Sequence field. The key information here is in the Subtype field, usually RTS, CTS,
or ACK.

services
The 802.11 standard states that each conformant wireless LAN must provide nine services. These
services are divided into two categories: five distribution services and four station services. The
distribution services relate to managing cell membership and interacting with stations outside
the cell. In contrast, the station services relate to activity within a single cell.

The five distribution services are provided by the base stations and deal with station mobility as
they enter and leave cells, attaching themselves to and detaching themselves from base
stations. They are as follows.
1. Association. This service is used by mobile stations to connect themselves to base
stations.
2. Disassociation. Either the station or the base station may disassociate, thus breaking the
relationship.
3. Reassociation. A station may change its preferred base station using this service.
4. Distribution. This service determines how to route frames sent to the base station.
5. Integration. If a frame needs to be sent through a non-802.11 network with a different
addressing scheme or frame format, this service handles the translation from the 802.11
format to the format required by the destination network.
The remaining four services are intracell (i.e., relate to actions within a single cell). They are used
after association has taken place and are as follows.
1. Authentication. Because wireless communication can easily be sent or received by unauthorized
stations, a station must authenticate itself before it is permitted to send data. After a mobile
station has been associated by the base station (i.e., accepted into its cell), the base station sends
a special challenge frame to it to see if the mobile station knows the secret key (password) that
has been assigned to it. It proves its knowledge of the secret key by encrypting the challenge
frame and sending it back to the base station. If the result is correct, the mobile is
**********************************************************************************************
Important Questions

1. Explain the following flow control protocols 6 marks


a. Stop -and -wait protocol
b. Sliding window protocol
c. Go -back -N ARQ
d. Selective Repeat ARQ
2. What are the various design issues of the data link layer? 5 marks
3. Compare Twisted Pair, Coaxial Cable and Optical Fibre guided transmission media. 5 marks
4. Explain the working of High-Level Data Link Control (HDLC) protocol. 6 marks
5. Explain the working of IEEE 802.11 MAC sub layer. 6 marks
6. Distinguish between Bridges and Switches 3 marks
7. Explain various transmission media. 6 marks
8. Which are the devices operating in the data link layer and physical layer? Explain the 6 marks
function of each of them.
9. Discuss IEEE 802.3 standard in detail. / What is Ethernet? What is the frame format of 6 marks
Ethernet?
10. Discuss the IEEE 802.11 standard in detail./What is wireless LAN? What is the frame 6 marks
format of IEEE 802.11 frame?

You might also like