Professional Documents
Culture Documents
Data-link Layer
Introduction
Data Link Layer is second layer of OSI Layered Model. This layer is one of the most
complicated layers and has complex functionalities and liabilities. Data link layer hides
the details of underlying hardware and represents itself to upper layer as the medium to
communicate.
Data link layer works between two hosts which are directly connected in some sense.
This direct connection could be point to point or broadcast. Systems on broadcast
network are said to be on same link. The work of data link layer tends to get more
complex when it is dealing with multiple hosts on single collision domain.
Data link layer is responsible for converting data stream to signals bit by bit and to send
that over the underlying hardware. At the receiving end, Data link layer picks up data
from hardware which are in the form of electrical signals, assembles them in a
recognizable frame format, and hands over to upper layer.
Logical Link Control: It deals with protocols, flow-control, and error control
Media Access Control: It deals with actual control of media
Data link layer does many tasks on behalf of upper layer. These are:
Framing
Data-link layer takes packets from Network Layer and encapsulates them into
Frames.Then, it sends each frame bit-by-bit on the hardware. At receiver’ end,
data link layer picks up signals from hardware and assembles them into frames.
1
Addressing
Data-link layer provides layer-2 hardware addressing mechanism. Hardware
address is assumed to be unique on the link. It is encoded into hardware at the
time of manufacturing.
Synchronization
When data frames are sent on the link, both machines must be synchronized in
order to transfer to take place.
Error Control
Sometimes signals may have encountered problem in transition and the bits are
flipped.These errors are detected and attempted to recover actual data bits. It also
provides error reporting mechanism to the sender.
Flow Control
Stations on same link may have different speed or capacity. Data-link layer
ensures flow control that enables both machine to exchange data on same speed.
Multi-Access
When host on the shared link tries to transfer the data, it has a high probability of
collision. Data-link layer provides mechanism such as CSMA/CD to equip
capability of accessing a shared media among multiple Systems.
Data Link Layer Design Issues
The data link layer in the OSI (Open System Interconnections) Model, is in between the
physical layer and the network layer. This layer converts the raw transmission facility
provided by the physical layer to a reliable and error-free link.
The main functions and the design issues of this layer are
2
Flow Control
Framing
The data link layer encapsulates each data packet from the network layer into frames
that are then transmitted.
3
A frame has three parts, namely −
Frame Header
Payload field that contains the data packet from network layer
Trailer
Error Control
The data link layer ensures error free link for data transmission. The issues it caters to
with respect to error control are −
Flow Control
The data link layer regulates flow control so that a fast sender does not drown a slow
receiver. When the sender sends frames at very high speeds, a slow receiver may not be
4
able to handle it. There will be frame losses even if the transmission is error-free. The
two common approaches for flow control are −
What are the Data Link Layer services provided to the Network Layer?
In the OSI (Open System Interconnections) Model, each layer uses the services of the
layer below it and provides services to the layer above it. The primary function of the
data link layer is to provide a well-defined service interface to the network layer above
it.
5
Virtual Communication versus Actual Communication
The main service provided is to transfer data packets from the network layer on the
sending machine to the network layer on the receiving machine. Data link layer of the
sending machine transmits accepts data from the network layer and sends them to the
data link layer of the destination machine which hands them to the network layer there.
In actual communication, the data link layer transmits bits via the physical layers and
physical medium. However virtually, this can be visualized as the two data link layers
communicating with each other using a data link protocol.
6
Types of Services
The data link layer offers three types of services.
7
receive the acknowledgment within a stipulated time, then it resends the frame.
This is used in Wifi (IEEE 802.11) services.
Acknowledged connection-oriented service − This is the best service that the
data link layer can offer to the network layer. A logical connection is set up
between the two machines and the data is transmitted along this logical path. The
frames are numbered, that keeps track of loss of frames and also ensures that
frames are received in correct order. The service has three distinct phases −
o Set up of connection – A logical path is set up between the source and the
destination machines. Buffers and counters are initialised to keep track of
frames.
o Sending frames – The frames are transmitted.
o Release connection – The connection is released, buffers and other
resources are released.
It is appropriate for satellite communications and long-distance telephone
circuits.
Various kind of Framing in Data link layer
Framing is function of Data Link Layer that is used to separate message from source or
sender to destination or receiver or simply from all other messages to all other
destinations just by adding sender address and destination address. The destination or
receiver address is simply used to represent where message or packet is to go and sender
or source address is simply used to help recipient to acknowledge receipt.
Frames are generally data unit of data link layer that is transmitted or transferred among
various network points. It includes complete and full addressing, protocols that are
essential, and information under control. Physical layers only just accept and transfer
stream of bits without any regard to meaning or structure. Therefore it is up to data link
layer to simply develop and recognize frame boundaries.
8
This can be achieved by attaching special types of bit patterns to start and end of the
frame. If all of these bit patterns might accidentally occur in data, special care is needed
to be taken to simply make sure that these bit patterns are not interpreted incorrectly or
wrong as frame delimiters.
1. Character Count
4. Encoding Violations
1. Character Count :
This method is rarely used and is generally required to count total number of
characters that are present in frame. This is be done by using field in header.
Character count method ensures data link layer at the receiver or destination about
total number of characters that follow, and about where the frame ends.
There is disadvantage also of using this method i.e., if anyhow character count is
disturbed or distorted by an error occurring during transmission, then destination or
receiver might lose synchronization. The destination or receiver might also be not able
to locate or identify beginning of next frame.
9
Character Stuffing :
Character stuffing is also known as byte stuffing or character-oriented framing and is
same as that of bit stuffing but byte stuffing actually operates on bytes whereas bit
stuffing operates on bits. In byte stuffing, special byte that is basically known as ESC
(Escape Character) that has predefined pattern is generally added to data section of the
data stream or frame when there is message or character that has same pattern as that of
flag byte.
But receiver removes this ESC and keeps data part that causes some problems or issues.
In simple words, we can say that character stuffing is addition of 1 additional byte if
there is presence of ESC or flag in text.
10
1.
Bit Stuffing :
Bit stuffing is also known as bit-oriented framing or bit-oriented approach. In bit
stuffing, extra bits are being added by network protocol designers to data streams.
It is generally insertion or addition of extra bits into transmission unit or message
to be transmitted as simple way to provide and give signaling information and
data to receiver and to avoid or ignore appearance of unintended or unnecessary
control sequences.
It is type of protocol management simply performed to break up bit pattern that results
in transmission to go out of synchronization. Bit stuffing is very essential part of
transmission process in network and communication protocol. It is also required in USB.
11
Error Detection and Correction in Data link Layer
Data-link layer uses error control techniques to ensure that frames, i.e. bit streams
of data, are transmitted from the source to the destination with a certain extent of
accuracy.
Errors
When bits are transmitted over the computer network, they are subject to get
corrupted due to interference and network problems. The corrupted bits leads to
spurious data being received by the destination and are called errors.
Types of Errors
Errors can be of three types, namely single bit errors, multiple bit errors, and burst
errors.
Single bit error − In the received frame, only one bit has been corrupted,
i.e. either changed from 0 to 1 or from 1 to 0.
Multiple bits error − In the received frame, more than one bits are
corrupted.
Burst error − In the received frame, more than one consecutive bits are
corrupted.
12
Error Control
Error control can be done in two ways
Error detection − Error detection involves checking whether any error has
occurred or not. The number of error bits and the type of error does not
matter.
Error correction − Error correction involves ascertaining the exact number
of bits that has been corrupted and the location of the corrupted bits.
For both error detection and error correction, the sender needs to send some
additional bits along with the data bits. The receiver performs necessary checks
based upon the additional redundant bits. If it finds that the data is free from
errors, it removes the redundant bits before passing the message to the upper
layers.
Parity Check
The parity check is done by adding an extra bit, called parity bit to the data to
make a number of 1s either even in case of even parity or odd in case of odd
parity.
While creating a frame, the sender counts the number of 1s in it and adds the
parity bit in the following way
In case of even parity: If a number of 1s is even then parity bit value is 0. If
the number of 1s is odd then parity bit value is 1.
In case of odd parity: If a number of 1s is odd then parity bit value is 0. If a
number of 1s is even then parity bit value is 1.
13
On receiving a frame, the receiver counts the number of 1s in it. In case of even
parity check, if the count of 1s is even, the frame is accepted, otherwise, it is
rejected. A similar rule is adopted for odd parity check.
The parity check is suitable for single bit error detection only.
Checksum
In this error detection scheme, the following procedure is applied
Data is divided into fixed sized frames or segments.
The sender adds the segments using 1’s complement arithmetic to get the
sum. It then complements the sum to get the checksum and sends it along
with the data frames.
The receiver adds the incoming segments along with the checksum using 1’s
complement arithmetic to get the sum and then complements it.
If the result is zero, the received frames are accepted; otherwise, they are
discarded.
14
retransmitting is not expensive as in fiber optics and the time for
retransmission is low relative to the requirements of the application.
Forward Error Correction − If the receiver detects some error in the
incoming frame, it executes error-correcting code that generates the actual
frame. This saves bandwidth required for retransmission. It is inevitable in
real-time systems. However, if there are too many errors, the frames need
to be retransmitted.
The four main error correction codes are
Hamming Codes
Binary Convolution Code
Reed – Solomon Code
Low-Density Parity-Check Code
Satellites
Computer Memory
Modems
PlasmaCAM
Open connectors
Shielding wire
15
Embedded Processor
Hamming code method is effective on networks where the data streams are
given for the single-bit errors.
Hamming code not only provides the detection of a bit error but also helps
you to indent bit containing error so that it can be corrected.
The ease of use of hamming codes makes it best them suitable for use in
computer memory and single-error correction.
Single-bit error detection and correction code. However, if multiple bits are
founded error, then the outcome may result in another bit which should be
correct to be changed. This can cause the data to be further errored.
The process used by the sender to encode the message includes the following three
steps:
When the above redundant bits are embedded within the message, it is sent to the
user.
16
Let assume that the message contains:
p – number of redundant bits which are added to it so that np can indicate at
least (n + p + 1) different states.
The p redundant bits should be placed at bit positions of powers of 2. For example,
1, 2, 4, 8, 16, etc. They are referred to as p 1 (at position 1), p2 (at position 2), p3 (at
position 4), etc.
The redundant bits should be parity bits makes the number of 1s either even or
odd.
Total numbers of bits in the message is made even is called even parity.
The total number of bits in the message is made odd is called odd parity.
Here, all the redundant bit, p1, is must calculated as the parity. It should cover all
the bit positions whose binary representation should include a 1 in the 1st position
excluding the position of p1.
P1 is the parity bit for every data bits in positions whose binary representation
includes a 1 in the less important position not including 1 Like (3, 5, 7, 9, …. )
P2 is the parity bit for every data bits in positions whose binary representation
include 1 in the position 2 from right, not including 2 Like (3, 6, 7, 10, 11,…)
P3 is the parity bit for every bit in positions whose binary representation includes a
1 in the position 3 from right not include 4 Like (5-7, 12-15,… )
17
Explain the Cyclic Redundancy Checks (CRCs)
The Cyclic Redundancy Checks (CRC) is the most powerful method for Error-
Detection and Correction. It is given as a kbit message and the transmitter creates
an (n – k) bit sequence called frame check sequence. The out coming frame,
including n bits, is precisely divisible by some fixed number. Modulo 2
Arithmetic is used in this binary addition with no carries, just like the XOR
operation.
Redundancy means duplicacy. The redundancy bits used by CRC are changed by
splitting the data unit by a fixed divisor. The remainder is CRC.
Qualities of CRC
It should have accurately one less bit than the divisor.
Joining it to the end of the data unit should create the resulting bit sequence
precisely divisible by the divisor.
CRC generator and checker
Process
A string of n 0s is added to the data unit. The number n is one smaller than
the number of bits in the fixed divisor.
The new data unit is divided by a divisor utilizing a procedure known as
binary division; the remainder appearing from the division is CRC.
The CRC of n bits interpreted in phase 2 restores the added 0s at the end of
the data unit.
Example
18
Message D = 1010001101 (10 bits)
Predetermined P = 110101 (6 bits)
FCS R = to be calculated 5 bits
Hence, n = 15 K = 10 and (n – k) = 5
The message is generated through 25:accommodating 1010001101000
The product is divided by P.
19
Because of no remainder, there are no errors.
Flow Control
o It is a set of procedures that tells the sender how much data it can transmit
before the data overwhelms the receiver.
o The receiving device has limited speed and limited memory to store the data.
Therefore, the receiving device must be able to inform the sending device to
stop the transmission temporarily before the limits are reached.
o It requires a buffer, a block of memory for storing the information until they
are processed.
o Stop-and-wait
o Sliding window
Stop-and-wait
20
o In the Stop-and-wait method, the sender waits for an acknowledgement after
every frame it sends.
o When acknowledgement is received, then only next frame is sent. The
process of alternately sending and waiting of a frame continues until the
sender transmits the EOT (End of transmission) frame.
Advantage of Stop-and-wait
Disadvantage of Stop-and-wait
Stop-and-wait technique is inefficient to use as each frame must travel across all
the way to the receiver, and an acknowledgement travels all the way before the
next frame is sent. Each frame sent and received uses the entire time needed to
traverse the link.
Sliding Window
21
o Frames can be acknowledged even when the window is not completely
filled.
o The window has a specific size in which they are numbered as modulo-n
means that they are numbered from 0 to n-1. For example, if n = 8, the
frames are numbered from 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1........
o The size of the window is represented as n-1. Therefore, maximum n-1
frames can be sent before acknowledgement.
o When the receiver sends the ACK, it includes the number of the next frame
that it wants to receive. For example, to acknowledge the string of frames
ending with frame number 4, the receiver will send the ACK containing the
number 5. When the sender sees the ACK with the number 5, it got to know
that the frames from 0 through 4 have been received.
Sender Window
22
Receiver Window
o At the beginning of transmission, the receiver window does not contain n
frames, but it contains n-1 spaces for frames.
o When the new frame arrives, the size of the window shrinks.
o The receiver window does not represent the number of frames received, but
it represents the number of frames that can be received before an ACK is
sent. For example, the size of the window is w, if three frames are received
then the number of spaces available in the window is (w-3).
o Once the acknowledgement is sent, the receiver window expands by the
number equal to the number of frames acknowledged.
o Suppose the size of the window is 7 means that the receiver window
contains seven spaces for seven frames. If the one frame is received, then the
receiver window shrinks and moving the boundary from 0 to 1. In this way,
window shrinks one by one, so window now contains the six spaces. If
frames from 0 through 4 have sent, then the window contains two spaces
before an acknowledgement is sent.
23
Error Control
Error Control is a technique of error detection and retransmission.
Stop-and-wait ARQ
24
This technique works on the principle that the sender will not transmit the next
frame until it receives the acknowledgement of the last transmitted frame.
o The sending device keeps a copy of the last transmitted frame until the
acknowledgement is received. Keeping the copy allows the sender to
retransmit the data if the frame is not received correctly.
o Both the data frames and the ACK frames are numbered alternately 0 and 1
so that they can be identified individually. Suppose data 1 frame
acknowledges the data 0 frame means that the data 0 frame has been arrived
correctly and expects to receive data 1 frame.
o If an error occurs in the last transmitted frame, then the receiver sends the
NAK frame which is not numbered. On receiving the NAK frame, sender
retransmits the data.
o It works with the timer. If the acknowledgement is not received within the
allotted time, then the sender assumes that the frame is lost during the
transmission, so it will retransmit the frame.
25
o Lost Frame: Sender is equipped with the timer and starts when the frame is
transmitted. Sometimes the frame has not arrived at the receiving end so that
it can be acknowledged neither positively nor negatively. The sender waits
for acknowledgement until the timer goes off. If the timer goes off, it
retransmits the last transmitted frame.
o In this case, the sender keeps the copies of all the transmitted frames until
they have been acknowledged. Suppose the frames from 0 through 4 have
been transmitted, and the last acknowledgement was for frame 2, the sender
has to keep the copies of frames 3 and 4 until they receive correctly.
o The receiver can send either NAK or ACK depending on the conditions. The
NAK frame tells the sender that the data have been received damaged. Since
the sliding window is a continuous transmission mechanism, both ACK and
NAK must be numbered for the identification of a frame. The ACK frame
consists of a number that represents the next frame which the receiver
expects to receive. The NAK frame consists of a number that represents the
damaged frame.
o The sliding window ARQ is equipped with the timer to handle the lost
acknowledgements. Suppose then n-1 frames have been sent before
receiving any acknowledgement. The sender waits for the
acknowledgement, so it starts the timer and waits before sending any more.
If the allotted time runs out, the sender retransmits one or all the frames
depending upon the protocol used.
26
Two protocols used in sliding window ARQ:
In the above figure, three frames have been transmitted before an error discovered
in the third frame. In this case, ACK 2 has been returned telling that the frames 0,1
have been received successfully without any error. The receiver discovers the error
27
in data 2 frame, so it returns the NAK 2 frame. The frame 3 is also discarded as it
is transmitted after the damaged frame. Therefore, the sender retransmits the
frames 2,3.
o Lost Data Frame: In Sliding window protocols, data frames are sent
sequentially. If any of the frames is lost, then the next frame arrive at the
receiver is out of sequence. The receiver checks the sequence number of
each of the frame, discovers the frame that has been skipped, and returns the
NAK for the missing frame. The sending device retransmits the frame
indicated by NAK as well as the frames transmitted after the lost frame.
o Lost Acknowledgement: The sender can send as many frames as the
windows allow before waiting for any acknowledgement. Once the limit of
the window is reached, the sender has no more frames to send; it must wait
for the acknowledgement. If the acknowledgement is lost, then the sender
could wait forever. To avoid such situation, the sender is equipped with the
timer that starts counting whenever the window capacity is reached. If the
acknowledgement has not been received within the time limit, then the
sender retransmits the frame since the last ACK.
Selective-Reject ARQ
28
o The sender must consist of a searching mechanism that selects only the
requested frame for retransmission.
29
Electrotechnical Commission, an international electrical and electronic standards
body that often works with the ISO.
In HDLC, data is organized into a unit (called a frame) and sent across a network
to a destination that verifies its successful arrival. The HDLC protocol also
manages the flow or pacing at which data is sent.
When sending HDLC frames, the frame check sequence of an HDLC frame is
either a 16-bit CRC-CCITT or a 32-bit CRC-32 transmitted over Information,
Control or Address fields (CRC stands for cyclic redundancy check). HDLC
frames provide the medium for a receiver to use algorithms for error detection of
any errors that may have been created during transmission. If the recipient's FCS
algorithm doesn't match the sender's, this is an indication of an error.
30
(NOTE: CCITT stands forConsultative Committee for International Telegraphy
and Telephony . Also known as ITU-T(Telecommunication Standardization
Sector of the International Telecommunications Union), CCITT is an international
body that fosters cooperative standards for telecommunications systems and
equipment.)
There are three types of commonly used HDLC frame structures. They are as
follows:
Information frames (I-frames), which transmit user data from the computer
network layer and incorporate error control information with the data. I-frames also
contain control fields used to define data functions.
Supervisory frames (S-frames), which transmit error and flow control data
whenever it becomes impossible to "piggyback" on transmitted data. For this reason,
S-frames don't contain information fields.
Unnumbered frames (U-frames), which are for all other miscellaneous purposes,
including link management. Some of these contain information fields, and others do
not.
31
32
Encapsulation is basically a process in which lower-layer protocol basically
receives data from higher layer protocol and then further places this data
portion of its frame.
33
PPP encapsulation frame basically contains three types of fields as given
below :
1.Protocol Field –
This field is of 1 or 2 bytes i.e., 8 or 16 bits that are used to identify datagram that
is being encapsulated in the information field of packet.
It simply indicates protocol that is used in the frame. Least significant bit of
lower bytes is usually set to 1 and on the other hand, most significant bit is
usually set to 0. Types of protocols that can be present are Link Control
Protocol (LCP),Password Authentication Protocol (PAP),Challenge
Handshake Authentication Protocol (CHAP), etc.
Protocol
Protocol Name
Number
807d Unused
34
Protocol
Protocol Name
Number
1.Information Field –
This field is of 0 or more bytes. It also has maximum length of 1500 bytes
including padding and excluding protocol field. It usually contains datagram for
the protocol that is specified and identified in protocol field. A datagram is
basically a transfer unit that is associated with networking.
2.Padding Field –
This field is optional. On transmission, Information field may be padded up to the
Maximum Receive Unit (MRU). Both of peers must be capable of recognizing and
distinguish padding bytes from true data or real information.
35
Difference between HDLC and PPP
S.
No Parameters HDLC PPP
.
HDLC is an ISO-
developed bit-
PPP is a data link layer
oriented code-
communication protocol
1. Basics transparent
for establishing a direct
synchronous data
link between two nodes.
link layer
protocol.
HDLC is
implemented by
PPP is implemented by
Configuration Point-to-point link
4. Point-to-Point
type configuration and
configuration only.
also multi-point
link configurations.
36
S.
No Parameters HDLC PPP
.
Layer). Layer).
Dynamic
Dynamic While in this Dynamic
6. addressing is not
Addressing addressing is offered.
offered by HDLC.
PPP is used in
HDLC is used in
synchronous media as
7. Media Type synchronous
well as asynchronous
media.
media.
HDLC is not
PPP is compatible with
9. Compatibility compatible with
non-Cisco devices.
non-Cisco devices.
HDLC protocols
have two types- PPP uses a defined
10. Format
ISO HDLC and format of HDLC.
CISCO HDLC.
authentication using
protocols like PAP
(Password
provide link Authentication
authentication. Protocol) and CHAP
(Challenge Handshake
Authentication
Protocol).
HDLC is more
PPP is comparatively
12. Cost costly
less costly.
comparatively.
38
What is a multiple access protocol?
When a sender and receiver have a dedicated link to transmit data packets,
the data link control is enough to handle the channel. Suppose there is no
dedicated path to communicate or transfer the data between two devices. In
that case, multiple stations access the channel and simultaneously transmits
the data over the channel. It may create collision and cross talk. Hence, the
multiple access protocol is required to reduce the collision and avoid
crosstalk between the channels.
Following are the types of multiple access protocol that is subdivided into
the different process as:
39
A. Random Access Protocol
In this protocol, all the station has the equal priority to send the data over a
channel. In random access protocol, one or more stations cannot depend on
another station nor any station control another station. Depending on the
channel's state (idle or busy), each station transmits the data frame.
However, if more than one station sends the data over a channel, there may
be a collision or data conflict. Due to the collision, the data frame packets
may be lost or changed. And hence, it does not receive by the receiver end.
Aloha
CSMA
CSMA/CD
CSMA/CA
40
ALOHA Random Access Protocol
It is designed for wireless LAN (Local Area Network) but can also be used
in a shared medium to transmit data. Using this method, any station can
transmit data across a network simultaneously when a data frameset is
available for transmission.
Aloha Rules
3.Collision and data frames may be lost during the transmission of data
through multiple stations.
Pure Aloha
41
without checking whether the channel is idle or not, the chances of collision
may occur, and the data frame can be lost. When any station transmits the
data frame to a channel, the pure Aloha waits for the receiver's
acknowledgment. If it does not acknowledge the receiver end within the
specified time, the station waits for a random amount of time, called the
backoff time (Tb). And the station may assume the frame has been lost or
destroyed. Therefore, it retransmits the frame until all the data are
successfully transmitted to the receiver.
42
As we can see in the figure above, there are four stations for accessing a
shared channel and transmitting data frames. Some frames collide because
most stations send their frames at the same time. Only two frames, frame 1.1
and frame 2.2, are successfully transmitted to the receiver end. At the same
time, other frames are lost or destroyed. Whenever two frames fall on a
shared channel simultaneously, collisions can occur, and both will suffer
damage. If the new frame's first bit enters the channel before finishing the
last bit of the second frame. Both frames are completely finished, and both
stations must retransmit the data frame.
Slotted Aloha
43
CSMA (Carrier Sense Multiple Access)
1-Persistent: In the 1-Persistent mode of CSMA that defines each node, first
sense the shared channel and if the channel is idle, it immediately sends the
data. Else it must wait and keep track of the status of the channel to be idle
and broadcast the frame unconditionally as soon as the channel is idle.
44
inactive, it immediately sends the data. Otherwise, the station must wait for
a random time (not continuously), and when the channel is found to be idle,
it transmits the frames.
45
CSMA/ CD
46
CSMA/ CA
Following are the methods used in the CSMA/ CAto avoid the collision:
Interframe space: In this method, the station waits for the channel to
become idle, and if it gets the channel is idle, it does not immediately send
the data. Instead of this, it waits for some time, and this time period is called
the Interframe space or IFS. However, the IFS time is often used to define
the priority of the station.
47
B. Controlled Access Protocol
C. Channelization Protocols
Following are the various methods to access the channel based on their time,
distance and codes:FDMA (Frequency Division Multiple Access)
FDMA
48
TDMA
CDMA
49
The code division multiple access (CDMA)is a channel access method. In
CDMA, all stations can simultaneously send the data over the same channel.
It means that it allows each station to transmit the data frames with full
frequency on the shared channel at all times. It does not require the division
of bandwidth on a shared channel based on time slots. If multiple stations
send data to a channel simultaneously, their data frames are separated by a
unique code sequence. Each station has a different unique code for
transmitting the data over a shared channel. For example, there are multiple
users in a room that are continuously speaking. Data is received by the users
if only two-person interact with each other using the same language.
Similarly, in the network, if different stations communicate with each other
simultaneously with different code language
When more than one stations send their frames simultaneously, collision
occurs. Back-off algorithm is a collision resolution mechanism which is
commonly used to schedule retransmissions after collisions in Ethernet. The
waiting time that a station waits before attempting retransmission of the
frame is called as back off time.
Algorithm of CSMA/CD
Step 1) When a frame is ready, the transmitting station checks whether the
channel is idle or busy.
50
Step 2) If the channel is busy, the station waits until the channel becomes
idle.
Step 3) If the channel is idle, the station starts transmitting and continually
monitors the channel to detect collision.
Step 5) The station resets the retransmission counters and completes frame
transmission.
Step 2) The station increments the retransmission counter, c, that denote the
number of collisions.
Step 3) The station selects a random number of slot times in the range 0 and
2c – 1. For example, after the first collision (i.e. c = 1), the station will wait
for either 0 or 1 slot times. After the second collision (i.e. c = 2), the station
will wait anything between 0 to 3 slot times. After the third collision (i.e. c =
3), the station will wait anything between 0 to 7 slot times, and so forth.
51
Step 5) And the end of the backoff time, the station attempts retransmission
by continuing with the CSMA/CD algorithm.
Advantage –
Disadvantages –
Classic Ethernet is the original form of Ethernet that provides data rates
between 3 to 10 Mbps. The varieties are commonly referred as 10BASE-X.
Here, 10 is the maximum throughput, i.e. 10 Mbps, BASE denoted use of
baseband transmission, and X is the type of medium used. Most varieties of
classic Ethernet have become obsolete in present communication scenario.
52
A switched Ethernet uses switches to connect to the stations in the LAN. It
replaces the repeaters used in classic Ethernet and allows full bandwidth
utilization.
There are a number of versions of IEEE 802.3 protocol. The most popular
ones are
IEEE 802.3: This was the original standard given for 10BASE-5. It used a
thick single coaxial cable into which a connection can be tapped by drilling
into the cable to the core. Here, 10 is the maximum throughput, i.e. 10
Mbps, BASE denoted use of baseband transmission, and 5 refers to the
maximum segment length of 500m.
IEEE 802.3a:This gave the standard for thin coax (10BASE-2), which is a
thinner variety where the segments of coaxial cables are connected by BNC
connectors. The 2 refers to the maximum segment length of about 200m
(185m to be precise).
IEEE 802.3i:This gave the standard for twisted pair (10BASE-T) that uses
unshielded twisted pair (UTP) copper wires as physical layer medium. The
further variations were given by IEEE 802.3u for 100BASE-TX, 100BASE-
T4 and 100BASE-FX.
IEEE 802.3i:This gave the standard for Ethernet over Fiber (10BASE-F)
that uses fiber optic cables as medium of transmission.
53
What are the IEEE 802.11 Wireless LAN Standards?
IEEE 802.11 standard, popularly known as WiFi, lays down the architecture
and specifications of wireless LANs (WLANs). WiFi or WLAN uses high
frequency radio waves for connecting the nodes.
There are several standards of IEEE 802.11 WLANs. The prominent among
them are 802.11, 802.11a, 802.11b, 802.11g, 802.11n and 802.11p. All the
standards use carrier-sense multiple access with collision avoidance
(CSMA/CA). Also, they have support for both centralised base station based
as well as ad hoc networks.
54
IEEE 802.11
IEEE 802.11 was the original version released in 1997. It provided 1 Mbps
or 2 Mbps data rate in the 2.4 GHz band and used either frequency-hopping
spread spectrum (FHSS) or direct-sequence spread spectrum (DSSS). It is
obsolete now.
IEEE 802.11a
55
of 54 Mbps operating in the 5 GHz band. Besides it provides error correcting
code. As 2.4 GHz band is crowded, relatively sparsely used 5 GHz imparts
additional advantage to 802.11a.
IEEE 802.11b
IEEE 802.11g
802.11g was indorsed in 2003. It operates in the 2.4 GHz band (as in
802.11b) and provides a average throughput of 22 Mbps. It uses OFDM
technique (as in 802.11a). It is fully backward compatible with 802.11b.
802.11g devices also faces interference from other devices operating in 2.4
GHz band.
IEEE 802.11n
802.11n was approved and published in 2009 that operates on both the 2.4
GHz and the 5 GHz bands. It has variable data rate ranging from 54 Mbps to
56
600 Mbps. It provides a marked improvement over previous standards
802.11 by incorporating multiple-input multiple-output antennas (MIMO
antennas).
IEEE 802.11p
57