Unit 3 Data Linl Layer
Unit 3 Data Linl Layer
Agenda:
Functions of Data Link Layer
Data Link Control : Framing, Flow and Error Control
Error Detection and Correction
High-Level Data Link Control(HDLC) and Point-To-Point Protocol(PPP)
Channel Allocation Problem
Multiple Access: Random Access(ALOHA,CSMA, CSMA/CD, CSMA/CA),
Controlled Access (Reservation, Polling, Token Passing), Channelization (
FDMA,TDMA,CDMA)
Wired LAN: Ethernet Standards and FDDI
Wireless LAN : IEEE 802.11x and Bluetooth Standards
Token Bus, Token Ring and Virtual LAN
Function of Data Link Layer:
The data link layer has three specific functions:
o Provide a well-defined interface to the network layer.
o Deal with transmission errors.
o Regulate the flow of data (so that slow receivers are not overloaded).
The Data Link Layer sits between the Network Layer and the Physical Layer.
The DLL provides an interface for the Network Layer to send information from one machine
to another.
Reliable delivery between adjacent nodes
– Guarantees to move each network-layer datagram across the link without error.
– Seldom used on low bit error link (fiber, some twisted pair)
– Wireless links: high error rates
Flow Control:
– pacing between adjacent sending and receiving nodes
– Technique for speed-matching of transmitter and receiver
Error Detection:
– Errors caused by signal attenuation, noise.
– Receiver detects presence of errors: signals sender for retransmission or drops
frame
Error Correction:
– Receiver identifies and corrects bit error(s) without resorting to retransmission
Half-duplex and full-duplex
– With full-duplex, the nodes at both ends of a link may transmit packets at the
same time.
– With half-duplex, a node cannot both transmit and receive at the same time.
1
Specific functions of the data link layer include the following,
In the physical layer, data transmission involves synchronised transmission of bits from the
source to the destination.
The data link layer packs these bits into frames.
Each frame holds the payload plus a header and a trailer (overhead).
Data-link layer takes the packets from the Network Layer and encapsulates them into frames.
If the frame size becomes too large, then the packet may be divided into small sized frames.
2
At receiver’ end, data link layer picks up signals from hardware and assembles them into
frames.
3
Purpose of Flow Control:
Any receiving device has a limited speed at which it can process incoming data and also a
limited amount of memory to store incoming data. If the source is sending the data at a faster
rate than the capacity of the receiver, there is a possibility of the receiver being swamped. The
receiver will keep loosing some of the frames simply because they are arriving too quickly and
the buffer is also getting filled up.
This will generate waste frames on the network. Therefore, the receiving device must have
some mechanism to inform the sender to send fewer frames or stop transmission temporarily.
In this way, flow control will control the rate of frame transmission to a value that can be
handled by the receiver. Example – Stop & Wait Protocol
2. Error Control :
The error control function of data link layer detects the errors in transmitted frames and re-
transmit all the erroneous frames.
Purpose of Error Control:
The function of the error control function of the data link layer helps in dealing with data
frames that are damaged in transit, data frames lost in transit, and the acknowledgement frames
that are lost in transmission. The method used for error control is called Automatic Repeat
Request which is used for the noisy channel. Example – Stop & Wait ARQ and Sliding
Window ARQ
Error detection and Error correction techniques: parity checks, checksum, CRC
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.
4
Burst error: In the received frame, more than one consecutive bits are corrupted.
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.
Error Detection Techniques
There are three main techniques for detecting errors in frames:
1. Parity Check,
2. Checksum and
3. Cyclic Redundancy Check (CRC).
1. 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.
5
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.
2. Checksum
This is a block code method where a checksum is created based on the data values in the data
blocks to be transmitted using some algorithm and appended to the data. When the receiver
gets this data, a new checksum is calculated and compared with the existing checksum. A non-
match indicates an error.
Error Detection by Checksums
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.
Example
Suppose that the sender wants to send 4 frames each of 8 bits, where the frames are 11001100,
10101010, 11110000 and 11000011.
The sender adds the bits using 1s complement arithmetic. While adding two numbers using 1s
complement arithmetic, if there is a carry over, it is added to the sum.
After adding all the 4 frames, the sender complements the sum to get the checksum, 11010011,
and sends it along with the data frames.
6
The receiver performs 1s complement arithmetic sum of all the frames including the checksum.
The result is complemented and found to be 0. Hence, the receiver assumes that no error has
occurred.
Step 3 - Disregard the quotient and add the remainder R(x)to the product x3 [M(x)] to yield the
code message polynomial T(x), which is represented as:
T(x) = x3 [M(x)] + R(x)
Put the remainder R(x)=100 in place of the three zeros added in Step 1.
110010 100
The message may now be transmitted
CRC Error Checking - No Errors
Upon reception, the entire received T(x) = "message + crc" can be checked simply by dividing
T(x)/G(x) using the same generating polynomial. If the remainder after division equals zero, then
no error was found.
9
Error Correction Techniques
Error correction techniques find out the exact number of bits that have been corrupted and as well as
their locations. There are two principle ways
Backward Error Correction (Retransmission) − If the receiver detects an error in the
incoming frame, it requests the sender to retransmit the frame. It is a relatively simple
technique. But it can be efficiently used only where 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.
Hamming Codes
Binary Convolution Code
Reed – Solomon Code
Low-Density Parity-Check Code
Data Link Layer Protocols:
10
High-Level Data Link Control (HDLC)
HDLC (High-level Data Link Control) is a WAN protocol intended to perform the
encapsulation of the data in the data link layer. The encapsulation of the data means to change
the format of the data. HDLC protocol is developed by IBM.
The HDLC protocol follows the bit-oriented concept and uses bit stuffing for achieving data
transparency.
Here bit oriented approach signifies that the single bit is used to present the control
information. The frame structure of HDLC contains the address, control, data, checksum and
flag fields.
The default encapsulation protocol in the Cisco devices is the HDLC. The Cisco proprietary
HDLC only works when the devices in both of the ends of the link are of cisco.
11
Checksum field -In this field, the bits are reserved for the performing the cyclic
redundancy code.
FCS – The Frame Check Sequence (FCS) enables a high level of physical error
control by allowing the integrity of the transmitted frame data to be checked.
PPP (Point-to-Point Protocol)
PPP is also a WAN protocol, but there are several enhancements made in the PPP protocol
after HDLC.
PPP is a data link layer (layer 2) communication protocol between two routers directly
without any host or any other networking in between. It can provide connection
authentication, transmission encryption, and data compression.
PPP protocol is not proprietary, which means that it can be used with two different type of
devices without committing changes over the format of the data.
The PPP frame contains two flag fields, a protocol filed to determine the type of packet
residing in the payload, and a payload field which can variate. However, the rest of the
fields are the same as the HDLC protocol.
In summary, the PPP protocol performs better than HDLC because there is no compulsion
of using the Cisco devices in both the ends, which means these are interoperable. PPP also
supports multiple protocols and support authentication
12
Interoperability between the non-cisco devices in HDLC is not achievable. However, this
limitation of HDLC is eliminated from the PPP protocol.
Channel allocation is a process in which a single channel is divided and allotted to multiple
users in order to carry user specific tasks. There are user’s quantity may vary every time
the process takes place.
If there are N number of users and channel is divided into N equal-sized sub channels, Each
user is assigned one portion. If the number of users are small and don’t vary at times, than
Frequency Division Multiplexing can be used as it is a simple and efficient channel
bandwidth allocating technique.
Channel allocation problem can be solved by two schemes: Static Channel Allocation in
LANs and MANs, and Dynamic Channel Allocation.
1. Station Model:
Assumes that each of N stations independently produce frames. The probability of
13
producing a packet in the interval IDt where I is the constant arrival rate of new frames.
3. Collision Assumption:
If two frames overlap in time-wise, then that’s collision. Any collision is an error, and both
frames must retransmitted. Collisions are only possible error.
Protocol Assumption:
N independent stations.
A station is blocked until its generated frame is transmitted.
Probability of a frame being generated in a period of length Dt is IDt where I is the arrival rate
of frames.
Only a single Channel available.
Time can be either: Continuous or slotted.
Carrier Sense: A station can sense if a channel is already busy before transmission.
No Carrier Sense: Time out used to sense loss data.
Multiple Access:
A. Random Access(ALOHA,CSMA, CSMA/CD, CSMA/CA),
B. Controlled Access (Reservation, Polling, Token Passing),
C. Channelization ( FDMA,TDMA,CDMA)
A. Random Access (ALOHA, CSMA, CSMA/CD, CSMA/CA)
I. ALOHA :
ALOHA is a system for coordinating and arbitrating access to a shared communication
Networks channel. It was developed in the 1970s by Norman Abramson and his colleagues
at the University of Hawaii.
A shared communication system like ALOHA requires a method of handling collisions that
occur when two or more systems attempt to transmit on the channel at the same time. In the
ALOHA system, a node transmits whenever data is available to send. If another node
transmits at the same time, a collision occurs, and the frames that were transmitted are lost.
Aloha means "Hello". Aloha is a multiple access protocol at the data link layer and proposes
how multiple terminals access the medium without interference or collision.
14
There are two different versions/types of ALOHA:
a. Pure Aloha
b. Slotted Aloha
a) Pure Aloha
In pure ALOHA, the stations transmit frames whenever they have data to send.
When two or more stations transmit simultaneously, there is collision and the frames are
destroyed.
In pure ALOHA, whenever any station transmits a frame, it expects the
Acknowledgement from the receiver.
If acknowledgement is not received within specified time, the station assumes that
the frame (or acknowledgement) has been destroyed.
If the frame is destroyed because of collision the station waits for a random amount of time
and sends it again. This waiting time must be random otherwise same frames will collide
again and again.
Therefore, pure ALOHA dictates that when time-out period passes, each station must wait
for a random amount of time before resending its frame. This randomness will help avoid
more collisions.
Figure shows an example of frame collisions in pure ALOHA.
15
In figure, there are four stations that contended with one another for access to shared
channel. All these stations are transmitting frames. Some of these frames collide because
multiple frames are in contention for the shared channel. Only two frames, frame 1.1 and
frame 2.2 survive. All other frames are destroyed.
Whenever two frames try to occupy the channel at the same time, there will be a collision
and both will be damaged. If first bit of a new frame overlaps with just the last bit of a
frame almost finished, both frames will be totally destroyed and both will have to be
retransmitted.
b) Slotted Aloha
Slotted ALOHA was invented to improve the efficiency of pure ALOHA as chances
of collision in pure ALOHA are very high.
In slotted ALOHA, the time of the shared channel is divided into discrete intervals called
slots.
The stations can send a frame only at the beginning of the slot and only one frame is
sent in each slot.
In slotted ALOHA, if any station is not able to place the frame onto the cha nnel at the
beginning of the slot i.e. it misses the time slot then the station has to wait until the
beginning of the next time slot.
In slotted ALOHA, there is still a possibility of collision if two stations try to send
at the beginning of the same time slot as shown in figure.
Slotted ALOHA still has an edge over pure ALOHA as chances of collision are
reduced to one-half.
16
Suppose there is only one channel and two computers C1 and C2 are willing to send data through
it. If C1 is transmitting data, it sends signals to all the other computers notifying that C1 is about
to send data. After the time slot has completed, only then C2 can transmit data through that
channel.
II. CSMA
Carrier Sense Multiple Access (CSMA): CSMA is a network access method used on
shared network topologies such as Ethernet to control access to the network.
Devices attached to the network cable listen (carrier sense) before transmitting. If
the channel is in use, devices wait before transmitting. MA (Multiple Access)
indicates that many devices can connect to and share the same network. All devices
have equal access to use the network when it is clear.
CSMA protocol was developed to overcome the problem found in ALOHA i.e. to
minimize the chances of collision, so as to improve the performance. CSMA protocol is
based on the principle of 'carrier sense'. The station senses the carrier or channel before
transmitting a frame. It means the station checks the state of channel, whether it is idle or
busy.
Even though devices attempt to sense whether the network is in use, there is a good chance
that two stations will attempt to access it at the same time. On large networks, the
transmission time between one end of the cable and another is enough that one station
may access the cable even though another has already just accessed it.
17
The chances of collision still exist because of propagation delay. The frame transmitted
by one station takes some time to reach other stations. In the meantime, other stations
may sense the channel to be idle and transmit their frames. This results in the collision.
Consider computers C1, C2, and C3 are willing to send data through a channel. At first,
C1 transmits data. In the due course of transmission, C2 and C3 check the status of the
channel at the same time. Both find the channel to be busy, so they wait for time T. After
time T, both C2 and C3 check the channel and find it free, so they start to initiate the
process of data transmission which can lead to collision.
CSMA modes:
1-persistent
2-Non-persistent
3-P-persistent
II.A) CSMA/CD
CSMA/CD is a protocol in which the station senses the carrier or channel before
transmitting frame just as in persistent and non-persistent CSMA. If the channel is
busy, the station waits.
Additional feature in CSMA/CD is that the stations can detect the collisions. The stations
abort their transmission as soon as they detect a collision. In CSMA, this feature is not
present. The stations continued their transmission even though they find that the collision
has occurred. This leads to the wastage of channel time.
However, this problem is handled in CSMA/CD. In CSMA/CD, the station that places
its data onto the channel after sensing the channel continues to sense the channel even
after the data transmission. If collision is detected, the station aborts its transmission
and waits for predetermined amount of time & then sends its data again.
As soon as a collision is detected, the transmitting station releases a jam signal.
Jam signal will alert the other stations. The stations are not supposed to transmit
immediately after the collision has occurred. Otherwise, there is a possibility that the
same frames would collide again.
After some back-off delay time, the stations will retry the transmission. If the collision
occurs again then the back-off delay time is increased progressively.
18
Therefore, t h e C S M A /CD m e t h o d c o n s i s t s o f a l t e r n a t i n g t r a n s m i s s i o n
p e r i o d a n d collisions with idle periods when none of the stations is transmitting.
19
II.B) CSMA/CA
CSMA/CA protocol is used in wireless networks because they cannot detect the
collision so the only solution is collision avoidance.
CSMA/CA avoids the collisions using three basic techniques.
a. Interframe space
b. Contention window
c. Acknowledgements
Whenever the channel is found idle, the station does not transmit immediately. It waits
for a period of time called Interframe space (IFS).
When channel is sensed to be idle, it may be possible that same distant station may
have already started transmitting and the signal of that distant station has not yet reached
other stations.
Therefore the purpose of IFS time is to allow this transmitted signal to reach other stations.
If after this IFS time, the channel is still idle, the station can send, but it still needs to
wait a time equal to contention time.
IFS variable can also be used to define the priority of a station or a frame.
b. Contention Window
Can two people speak at the same time and still understand each other's statements?
Well, not. The same goes for data-frames in a computer network. If we transmit
two frames at a time, they'll collide with each other, and data will get lost.
So how are controlled access protocols different from random access protocols?
The difference is, only that station can transmit the data which is approved by all other
stations in that network. And we saw that in random access protocols the transmission
is based on the availability of the transmission channel.
So, here in controlled access protocols only one station can transmit the data-frames
at a time, which leads us to a collision-free transmission through the communication
channel.
In controlled access, the stations seek information from one another to find which
station has the right to send. It allows only one node to send at a time, to avoid collision
of messages on shared medium.
The three controlled-access methods are:
1. Reservation
2. Polling
3. Token Passing
1. Reservation
Whenever we travel from a train or an airplane, the first thing we do is to reserve our
seats, similarly here a station must make a reservation first before transmitting any
data-frames.
In the reservation method, a station needs to make a reservation before sending data.
21
The time line has two kinds of periods:
1. Reservation interval of fixed time length
2. Data transmission period of variable frames.
If there are M stations, the reservation interval is divided into M slots, and each station
has one slot.
Suppose if station 1 has a frame to send, it transmits 1 bit during the slot 1. No other
station is allowed to transmit during this slot.
In general, i th station may announce that it has a frame to send by inserting a 1 bit into
i th slot. After all N slots have been checked, each station knows which stations wish
to transmit.
The stations which have reserved their slots transfer their frames in that order.
After data transmission period, next reservation interval begins.
Since everyone agrees on who goes next, there will never be any collisions.
The following figure shows a situation with five stations and a five slot reservation
frame. In the first interval, only stations 1, 3, and 4 have made reservations. In the
second interval, only station 1 has made a reservation.
Polling
Recall your school or college classroom, what was the first thing the teacher does after
entering the class? The answer is roll call or attendance. Let's compare the scenario.
The teacher calls roll number 1 and gets a response if he/she is present then switches
to the next roll number, say roll number two and roll number 2 is absent, so the teacher
gets no response in return or say a negative response.
Similarly, in a computer network there is a primary station or controller (teacher) and
all other stations are secondary (students), the primary station sends a message to each
station. The message which is sent by the primary station consists of the address of
the station which is selected for granting access.
The point to remember is that all the nodes receive the message but the addressed one
responds and sends data in return, but if the station has no data to transmit then it sends
a message called Poll Reject or NAK (negative acknowledgment).
But this method has some drawbacks like the high overhead of the polling messages
and high dependence on the reliability of the primary station.
We calculate the efficiency of this method in terms of time for polling & time required
for transmission of data.
Tpoll = time for polling
22
Tt = time required for transmission of data
Whenever the primary station wants to recieve the data, it asks the secondary stations
present in its channel, this method is polling.
In the first diagram, we see that primary station asks station A if it has any data ready
for transmission, since A does not have any data queued for transmission it sends NAK
(negative acknowledgement), and then it asks station B, since B has data ready for
transmission, so it transmits the data and in return receives acknowledgement from
primary station.
In the next case, if primary station wants to send data to the secondary stations, it sends
a select message, and if the secondary station accepts the request from the primary
station, then it sends back an acknowledgement and then primary station transmits the
data and in return receives an acknowledgement.
23
Token Passing
Now, say 4 people are sitting on a round table and only that person can speak who has
the token. In computer networks a token is a special bit pattern that allows the token
possessing system to send data or we can say that a token represents permission to
transmit data. The token circulation around the table (or a network ring) is in a
predefined order. A station can only pass the token to its adjacent station and not to
any other station in the network. If a station has some data queued for transmission it
cannot transmit the data until it receives the token and makes sure it has transmitted
all the data before passing on the received token.
This method has some drawbacks like duplication of token or sometimes the token is
damaged or lost during the circulation, or sometimes if we introduce a new station or
remove an existing station from the network, this leads to a huge disturbance, which
should be taken care of so that the efficiency of the method is not affected.
The performance of a token ring is governed by 2 parameters, which are delay and
throughput.
o Delay is a measure of the time; it is the time difference between a packet ready
for transmission and when it is transmitted. Hence, the average time required
to send a token to the next station is a/N.
o Throughput is a measure of the successful traffic in the communication
channel.
24
Tp = propagation delay &Tt = transmission delay
In the diagram below when station-1 possess the token it starts transmitting all the
data-frames which are in its queue. Now after transmission, station-1 passes the token
to station-2 and so on. Station-1 can now transmit data again, only when all the stations
in the network have transmitted their data and passed the token.
Note: A token can only work in that channel, for which it is generated and not for any other.
25
TDM is a physical layer technique that combines the data from slower channels and transmits
then by using a faster channel. This process uses physical multiplexer.
TDMA, on other hand, is an access method in the data link layer. The data link layer in each
station tells its physical layer to use the allocated time slot. There is no physical multiplexer
at the physical layer.
26
III. CDMA (Code Division Multiple Access)
CDMA (Code Division Multiple Access) also called spread-spectrum and code
division multiplexing, one o f t he c o m p e t i n g t r a n s m i s s i o n t e c h n o l o g i e s f o r
d i g i t a l M O B I L E PHONES.
The transmitter mixes the packets constituting a message into the digital signal stream
in an order determined by a PSEUDO-RANDOM NUMBER sequence that is also
known to the intended receiver, which uses it to extract those parts of the signal intended
for itself. Hence, each different random sequence corresponds to a separate
communication channel. CDMA is most used in the USA.
Unlike TDMA, in CDMA all stations can transmit data simultaneously, there is no
timesharing.
CDMA allows each station to transmit over the entire frequency spectrum all the time.
Multiple simultaneous transmissions are separated using coding theory.
In CDMA, each user is given a unique code sequence.
Preamble: It is seven bytes (56 bits) that provides bit synchronization. It consists of alternating
0s and 1s. The purpose is to provide alert and timing pulse.
Destination Address (DA): It is six byte field that contains physical address of packet's
destination.
Source Address (SA): It is also a six byte field and contains the physical address of source
or last device to forward the packet (most recent router to receiver).
Length: This two byte field specifies the length or number of bytes in data field.
Data: It can be of 46 to 1500 bytes, depending upon the type of frame and the length of
the information field.
Frame Check Sequence (FCS): This is for byte field, contains CRC for error detection.
FDDI
Fibber Distributed Data Interface
Similar to Token ring in the sense that it share some features such as topology (ring) and
media access technique (token-passing)
High performance Fiber Optic token ring running at 100 mbps over distance 200 KM and
permits up to 1000 stations
FDDI deals with network reliable issues as mission-critical applications were
implemented on high speed networks. It is frequently used as a backbone technology, and
to connect high speed computer on LAN
Based on two counter–rotating fiber rings, only one used at a time and next is for backup.
So if there is any problem in one ring, next ring works automatically
It allows 16 to 48 bits address and maximum frame size is 4500 bytes
It prefers multimode fiber optic cable rather than single mode as multimode reduces cost
for high data transmission
It prefers LEDs instead of Laser for light source not only for cheaper but also to remove
accidental chances at user end connector (if user open connector and sees cable by naked
eye, eye may damage on laser light)
It operates at low error (1 bit error for 2.5 x 1010 )
It uses 4B/5B encoding in place of Manchester encoding in Token Ring
It capture token before transmitting and does not wait for acknowledgement to regenerate
token as ring might be very long and may occurs much delay to wait for ACK.
In normal operation, the token and frames travel only on the primary ring in a single
direction. The second ring transmits idle signals in the opposite direction
If a cable or device becomes disabled, the primary ring raps back around onto the
secondary ring
Stations may be directly connected to FDDI dual ring or attached to FDDI concentrator.
There are three types of nodes:
-DAS (Dual attachment station)
28
-SAS (Single attachment station)
-DAC (Dual attachment concentrator)
FDDI deploys following timers:
-Token holding time: upper limit on how long a station can hold token
-Token Rotation time: how long it takes the token to traverse the ring or the
interval between two successive arrivals of the token
There are four specifications in FDDI.
Media Access control- deals with how medium is accessed, frame format, token
handling, addressing, fair and equal access of the ring through the use of the timed
token, guarantee bandwidth for special traffic etc.
Physical layer protocol-deals with data encoding/decoding procedures,
establish clock synchronization, data recovery from incoming signal etc.
Physical layer medium- defines characteristics of transmission medium, fiber optic
link type: single mode, multimode; power levels, bit error rates, optical components:
connectors, switches, LEDs, Pin etc.
Station Management- defines FDDI station configuration, ring configuration, ring
control features, station insertion and removal, initialization etc.
8B 1B 1B 2 or 6 B 2 or 6B 4500 B 4B 1 B 1B
29
Data: Contains either information destined for upper layers or control information
Frame Check Sequence: For Error
detection. End Delimiter: End of Frame.
Frame status: Allows the source station to determine whether an error occurred; identifies
whether the frame was recognized and copied by a receiving station.
IEEE 802.11n is on the process of standardization, uses Multiple Input Multiple Output
(MIMO) antennas.
IEEE 802.11 standard provides wireless communication with the use of infrared or
radio waves.
Two configurations:
Ad-hoc: no central control, no connection to the outside world
Infrastructure: uses fixed network access point to connect to the outside world.
It doesn‘t implement collision detection because it can‘t detect collisions at the receiver
end (hidden terminal problem)
To avoid collisions, the frames contains field containing the length of the transmissions.
30
Other stations defer transmissions.
802.11 lives in physical layer and data link layer in the OSI.
o IEEE 802.11b (Wi-Fi) is a wireless LAN technology that is growing rapidly in
popularity. It is convenient, inexpensive and easy to use.
o Uses: airports, hotels, bookstores, parks etc. Estimates: 70% of WLANs are insecure.
802.11b has a maximum raw data rate of 11 Mbit/s and uses the same media access
method defined in the original standard. 802.11b products appeared on the market in early 2000,
since 802.11b is a direct extension of the modulation technique defined in the original standard.
The dramatic increase in throughput of 802.11b (compared to the original standard) along with
simultaneous substantial price reductions led to the rapid acceptance of 802.11b as the definitive
wireless LAN technology.
802.11b devices experience interference from other products operating in the 2.4 GHz
band. Devices operating in the 2.4 GHz range include microwave ovens, Bluetooth devices,
baby monitors, cordless telephones and some amateur radio equipment.
31
Fig 802.11 frame structure
Frame Control: Contains following
– Version: Protocol version
– Type: data, control or mgmt.
– Subtype: RTS or CTS
– To/From DS: Going to or Coming from intercell distribution (e.g. Ethernet)
– MF: More fragments to follow
– Retry: Retransmission of earlier frame
– Pwr: used by base station to sleep or wake receiver
– More: sender has more frames for receiver
– W: WEP Encryption
– O : sequence of frames must be processed in order
Duration: time to occupy channel, used by other stations to manage
NAV
Addresses: Two are source and destination. Add, of sender and receiver, other two are
that of base stations for inter-cell traffic.
a) Bluetooth
Bluetooth is a wireless technology that allows the exchange of data between different devices.
While Bluetooth uses wavelength to transmit information, it generally only works within a short
distance for the devices to stay connected using short-wavelength UHF radio waves in the ISM
band from 2.4 to 2.485 GHz from fixed and mobile devices, and building personal area
networks (PANs).
Invented by telecom vendor Ericsson in 1994, it was originally conceived as a wireless
alternative to RS-232 data cables. It can connect several devices, overcoming problems of
synchronization.
Most Bluetooth devices have a maximum connectivity range of about 30 feet, and that
distance is reduced when obstacles (such as a wall) are present.
Most smartphones, tablets, and computers only allow pairing with one Bluetooth enabled device at a time.
Because you often won't even realize when devices are connecting to one another via
Bluetooth, it's a good idea to occasionally pop open your settings app on your phone (or any
other device with Bluetooth connectivity), head to the Bluetooth tab, and take a look at all
the devices that could potentially connect and note anything that is, in fact, already
connected.
And if you ever get rid of a Bluetooth device or plan not to use it for a long time, by all
means opt to "Forget this device" in your Settings app so you know you are maintaining
control of the connection.
33
Token Bus, Token Ring and Virtual LAN
Token Bus:
The token bus network is a standard in which tokens are passed along a virtual ring. In the
token bus network bus topology is used as physical media.
In this, the virtual ring is created with stations and therefore tokens are subsequently passed
from a station during a sequence with this virtual ring. Every station or node in toke bus
network knows the address of its predecessor station and its successor station. A node
(station) can transmit the data if and only if it has a token. Its working rule is analogous to
the token ring network.
Token Ring:
It is defined by the IEEE 802.5 standard. In the token ring network the token is passed over
a physical ring instead of virtual ring.
In this a token is a special frame and a station can transmit the data frame if and only if it
has a token. And the tokens are issued on successful receipt of the data frame.
34
In token ring special bit pattern, called the token, circulates around the ring whenever all
stations are idle. When a station wants to transmit a frame, it is required to seize the token
and remove it from the ring before transmitting. This action is done by inverting a single bit
in the 3 byte token, which instantly changes it into the first 3 bytes of normal data. Because
there is only one token, only one station can transmit at a given instant, thus solving the
channel access problem the same way token bus solves it.
A station may hold the token for the token holding time, which is 10ms unless an installation
sets a different value. After all frames transmitted or the transmission of another frame
would exceed the token holding time, the station regenerates the token.
SD AC FC DA SA Data Checksum ED FS
Bytes 1 1 1 2 or 6 2 or 6 >=0 4 1 1
Data/ Command
1 1 1
Token
35
End delimiter—Signals the end of the token or data/command frame. This field also
contains bits to indicate a damaged frame and identify the frame that is the last in a logical
sequence.
36
End Delimiter—Signals the end of the token or data/command frame. The end delimiter also
contains bits to indicate a damaged frame and identify the frame that is the last in a logical
sequence.
Frame Status—Is a 1-byte field terminating a command/data frame. The Frame Status field
includes the address-recognized indicator and frame-copied indicator.
A virtual local area network is a logical subnetwork that groups a collection of devices from
different physical LANs. Large business computer networks often set up VLANs to re-partition
a network for improved traffic management. Several kinds of physical networks support virtual
LANs, including Ethernet and Wi-Fi.
Network administrators partition the networks to match the functional requirements of the
VLANs so that each VLAN comprise of a subset of ports on a single or multiple switches or
bridges. This allows computers and devices in a VLAN to communicate in the simulated
environment as if it is a separate LAN.
The below topology depicts a network having all hosts inside the same virtual LAN:
37
Network having all hosts inside the same VLAN
Without VLANs, a broadcast sent from a host can easily reach all network devices. Each and
every device will process broadcast received frames. It can increase the CPU overhead on each
device and reduce the overall network security.
In case if you place interfaces on both switches into separate VLAN, a broadcast from host A
can reach only devices available inside the same VLAN. Hosts of VLANs will not even be aware
that the communication took place. This is shown in the below
Host A can reach only devices available inside the same VLAN
VLAN in networking is a virtual extension of LAN. A LAN is a group of computer and
peripheral devices which are connected in a limited area such as school, laboratory, home, and
38
office building. It is a widely useful network for sharing resources like files, printers, games, and
other applications.
Features of VLANs
A VLAN forms sub-network grouping together devices on separate physical LANs.
VLAN's help the network manager to segment LANs logically into different broadcast domains.
VLANs function at layer 2, i.e. Data Link Layer of the OSI model.
There may be one or more network bridges or switches to form multiple, independent VLANs.
Using VLANs, network administrators can easily partition a single switched network into
multiple networks depending upon the functional and security requirements of their systems.
VLANs eliminate the requirement to run new cables or reconfiguring physical connections in
the present network infrastructure.
VLANs help large organizations to re-partition devices aiming improved traffic management.
VLANs also provide better security management allowing partitioning of devices according to
their security criteria and also by ensuring a higher degree of control connected devices.
VLANs are more flexible than physical LANs since they are formed by logical connections.
This aids is quicker and cheaper reconfiguration of devices when the logical partitioning needs
to be changed.
VLAN Ranges
Here are the important ranges of VLAN:
Range Description
VLAN 0-4095 Reserved VLAN, which cannot be seen or used.
This is a default VLAN of switches. You cannot delete or edit this VLAN,
VLAN 1:
but it can be used.
VLAN 2-1001: It is a normal VLAN range. You can create, edit, and delete it.
These ranges are CISCO defaults for token rings and FDDI.
VLAN 1002-1005:
You cannot delete this VLAN.
VLAN 1006-4094: It is an extended range of VLANs.
Example of VLAN
In the below example, there are 6 hosts on 6 switches having different VLANs. You need 6 ports
to connect switches together. It means, if you have 24 various VLANs, you will have only 24
hosts on 45 port switches.
39
Example of VLAN
Characteristics of VLAN
Here are the important characteristics of VLAN:
Virtual LANs offer structure for making groups of devices, even if their networks are different.
It increases the broadcast domains possible in a LAN.
Implementing VLANs reduces the security risks as the number of hosts which are connected to
the broadcast domain decreases.
This is performed by configuring a separate virtual LAN for only the hosts having sensitive
information.
It has a flexible networking model that groups users depending on their departments instead of
network location.
Changing hosts/users on a VLAN is relatively easy. It just needs a new port-level configuration.
It can reduce congestion by sharing traffic as individual VLAN works as a separate LAN.
A workstation can be used with full bandwidth at each port.
Terminal reallocations become easy.
A VLAN can span multiple switches.
The link of the trunk can carry traffic for multiple LANs.
Types of VLANs
Port-Based VLAN
Port-based VLANs groups virtual local area network by port. In this type of virtual LAN, a
switch port can be configured manually to a member of VLAN.
40
Devices that are connected to this port will belong to the same broadcast domain that is because
all other ports are configured with a similar VLAN number.
The challenge of this type of network is to know which ports are appropriate to each VLAN.
The VLAN membership can’t be known just by looking at the physical port of a switch. You
can determine it by checking the configuration information.
Advantages of VLAN
Here are the important pros/benefits of VLAN:
Disadvantages of VLAN
Here are the important cons/ drawbacks of VLAN:
A packet can leak from one VLAN to other.
An injected packet may lead to a cyber-attack.
Threat in a single system may spread a virus through a whole logical network.
You require an additional router to control the workload in large networks.
You can face problems in interoperability.
A VLAN cannot forward network traffic to other VLANs.
Application/Purpose of VLAN
Here are the important uses of VLAN:
VLAN is used when you have 200+ devices on your LAN.
42
It is helpful when you have a lot of traffic on a LAN.
VLAN is ideal when a group of users need more security or being slow down by many
broadcasts.
It is used when users are not on one broadcast domain.
Make a single switch into multiple switches.
ARP
Address Resolution Protocol
Used to convert an IP address into a physical address (called a DLC address), such as an Ethernet
address.
RARP
Reverse ARP
Used by a host to discover its IP address
To convert physical address into IP address
******************The End************************
43