CN Notes-1
CN Notes-1
Data Communication:
The information is shared when we communicate. This sharing can be local or over long distance.
Data refers to information presented in whatever form is agreed upon by the parties creating and
using it. Data communications are the exchange of data between two devices via some form of
transmission medium such as a wire cable. A communication service enables the exchange of
information between users at different locations. The communicating devices must be a part of a
communication system made up of a combination of hardware (physical equipment) and software
(programs).
Communication services & applications are everywhere. Some examples are given below:
Components:
The essential components of a data communication system are:
Message: The information to be communicated. It can consist of text, pictures, numbers, sound,
video or audio.
Sender: The sender is the device that sends the data message. It can be a computer or workstation
telephone handset, video camera and so on.
Receiver: The receiver is the device that receives the message. It can be a computer or workstation
telephone handset, video camera and so on.
Medium: The transmission medium is the physical path connecting both the sender as well as the
receiver by which a message travels from sender to receiver. It could be a twisted pair wire, coaxial
cable, fiber optic cable, or radio waves.
Protocol: A protocol is a set of rules that governs data communications. It represents an agreement
between the communicating devices.
Data representation:
Information can be in any form such as text, numbers, images, audio and video.
Text
Text is represented as a bit pattern
The number of bits in a pattern depends on the number of symbols in that language. Code is the
set of bit patterns designed to represent text symbols.
ASCII
The American National Standards Institute developed a code called the American Standard code
for Information Interchange (ASCII) .This code uses 7 bits for each symbol.
Extended ASCII
To make the size of each pattern 1 byte (8 bits), an extra 0 is augmented at the left the ASCII bit
patterns which doesn’t change the value of the pattern.
Unicode
To represent a symbol or code in any language Unicode is used. It uses 32 bits to represent.
ISO
The international organization for standardization known as ISO has designed a code using a 32 –
bit pattern. This code can represent up to 4,294,967,296 symbols.
Numbers
Numbers are also represented by using bit patterns. Instead of using ASCII to represent numbers,
the number is directly converted to a binary number.
Images
Images are also represented by bit patterns. An image is divided into a matrix of pixels (The
smallest element of an image) where each pixel is a small dot having dimension. Each pixel is
assigned a bit pattern. The size and value of the pattern depends on the image.
Audio
Audio is the recording or broadcasting of sound or music. Audio is by nature different from text,
numbers or images. It is continuous not discrete.
Video
Video is the recording or broadcasting of picture or movie. Video can be produced either a
continuous entity or it can be a combination of images.
Simplex:
In simplex mode, the communication is unidirectional. Only one of the devices on a link can
transmit; the other can only receive.
Ex. Keyboard and monitor
Half-duplex
In half-duplex mode, each station can both transmit and receive but not at the same time. When
one device is sending, the other can only receive.
Ex. Walkie-talkies and CB (citizen band radios)
Full-duplex
In full-duplex mode, both stations can transmit and receive simultaneously. Ex. Telephone network
When two people are communicating by a telephone line, both can listen and talk at the same time.
Network:
Definition:
Distributed Processing
Networks use distributed processing in which a task divided among multiple computers. Separate
computers handle a subset instead of a single machine responsible for all aspects of a process.
Performance
Performance can be measured in terms of transit time, response time, number of users, type of
transmission medium, and capabilities of the connected hardware and the efficiency of the
software.
Transit time
The time required for a message to travel from one device to another.
Response time
The time spent between an inquiry and a response
Reliability
It is measured by the frequency of failure and time required to recover from a failure.
Security
Network security is protecting data from unauthorized access.
Type of connection
Two types of connections
a. Point-to-point
b. Multipoint
In point-to-point connection the two devices are connected by a dedicated link. The entire capacity
of the link is reserved for transmission between those two devices.
A multipoint (also known as multidrop) connection is one in which more than two specific devices
share a single link. The capacity of the channel is shared either spatially or temporally.
Physical Topology
Physical Topology refers to the way in which network is laid out physically. The topology of a
network is the geometric representation of the relationship of all the links and the linking devices.
The physical or logical arrangement of a network is also topology.
The basic topologies are
• Mesh
• Star
• Bus
• Ring
Mesh
Advantages:
Dedicated link guarantees that each connection can carry its own data load and thus
eliminates the traffic problems that occur when links shared by multiple devices.
If one link becomes unusable, it does not incapacitate the entire system.
As every message travels along a dedicated line only the intended recipient, so it is secure.
Disadvantages
Star
Dedicated point-to-point links to central controller (hub)
Controller acts as exchange
Advantages
Less expensive than a mesh topology. Each device needs only one link and I/O port to
connect with Hub
Installation and reconfigure is easier.
If one link fails only that link is affected.
Requires less cable than a mesh.
Disadvantages
Yet requires more cable compared to bus and ring topologies.
Bus
Multipoint configuration
One long cable acts as a backbone to link all devices.
Stations are connected through tap and drop lines.
Advantages
Ease of installation.
Uses less cabling than mesh or star topologies.
Disadvantages
Difficult reconnection and isolation.
Signal reflection at the taps can cause degradation in quality.
A fault or break in the bus cable stops all transmission.
Ring
Advantages
Easy to install and reconfigure.
Only two connections are to be changed to add or delete a device.
If one device does not receive the signal within a specified period, it issue an alarm that
alerts the network operator to the problem and its location
Disadvantages
• A break in the ring breaks the entire network.
Categories of Network
LAN
Usually privately owned and links the devices in a single office, building, or campus
LAN size is limited to a few kilometers.
LANs are designed to allow resources to be shared (hardware , software and data )
Today LANs to have data rates of 100 Mbps to 10Gbps
Backbone Networks (BN), have a scale of a few hundred meters to a few
kilometers. Include a high speed backbone linking the LANs at various locations.
MAN
A MAN is designed to cover an entire city.
May be a single network such as cable TV network
May be a means of connecting a number of LANs into a larger network
MANs have data rates of 1 Mbps to 100 Mbps
Resources may be shared LAN to LAN as well as device to device
A company can use a MAN to connect the LANs in all its offices throughout a city.
A MAN can be owned by a private company or it may be a service provided by a public
company
,such as local telephone company
Telephone companies provide a popular MAN service called (SMDS) Switched Multi-
megabit Data Services.
WAN
WAN provides long distance transmission of data, voice, image, and video information
over large geographical areas
Comprise a country, a continent, or even the whole world (Interlink age of many LANs and
MANs)
Low data transmission rate (below 1 Mbps)
Unlimited number of miles example: Internet Network
Internetwork
Connection of two or more networks by the use of internetworking devices which include
routers and gateways
Internet is a generic term used to mean an interconnection of networks
The Internet is the name of a specific worldwide network.
Protocols
A protocol is a set of rules that governs data communication; the key elements of a protocol
are
Purpose of the reference model was to provide a framework for the development of protocols
Physical Layer
• It coordinates the functions required to transmit a bit stream over a physical medium.
• It deals with the mechanical and electrical specifications of the interface and transmission
media. Mechanical: cable, plugs, pins...
Electrical/optical: modulation, signal strength, voltage levels, bit times,
• It also defines the procedures and functions that physical devices and interfaces have to
perform for transmission to occur
Major responsibilities of Physical layer are
• Physical characteristics of interfaces and media:
It defines the characteristics of the interface between the devices and the transmission media.
Also defines the type of transmission medium.
• Representation of bits:
To transmit the bits, it must be encoded into electrical or optical signals. It defines the type of
representation how 0s and 1s are changed to signals.
• Data rate:
The number of bits sent each second is also defined by the physical layer.
• Synchronization of bits:
Sender and the receiver must be synchronized at the bit level .i.e the sender and the receiver clocks
must be synchronized.
Data link layer
The data link layer is responsible for hop-to-hop (node-to-node) delivery. It transforms the physical
layer a raw transmission facility to a reliable link. It makes physical layer appear error free to the
network layer. The duties of the data link layer are
• Framing: The data link layer divides the stream of bits received from the network layer into
manageable data units called frames.
• Physical Addressing: If the frames are to be distributed to different systems on the network
the data link layer adds a header to the frame to define the receiver or sender of the frame. If the
frame is intended
for a system located outside the senders’ network then the receiver address is the address of the
connecting device that connects the network to the next one.
• Flow Control: If the rate at which the data absorbed by the receiver is less than the rate
produced in the sender, the data link layer imposes a flow control mechanism to overwhelming the
receiver.
• Error control: Reliability is added to the physical layer by data link layer to detect and
retransmit loss or damaged frames. and also to prevent duplication of frames. This is achieved
through a trailer added to the end of the frame
• Access control: when two or more devices are connected to the same link it determines
which device has control over the link at any given time.
Network Layer
The network layer is responsible for source-to-destination delivery of a packet across multiple
networks. It ensures that each packet gets from its point of origin to its final destination .It does
not recognize any relationship between those packets. It treats each one independently as though
each belong to separate message.
The functions of the network layer are
• Logical Addressing If a packet has to cross the network boundary then the header contains
information of the logical addresses of the sender and the receiver.
Networking When independent networks or links are connected to create an internetwork or a large
network the connective devices route the packet to the final destination.
Transport Layer
The network layer is responsible for process-to-process delivery that is source to destination
delivery of the entire message.
The responsibilities of Transport layer are
• Service-point (port) addressing: Computers run several programs at the same time. Source-
to- destination delivery means delivery from a specific process on one computer to a specific
process on the other. The transport layer header therefore includes a type of address called a service
– point address.
• Segmentation and reassembly A message is divided into segments and each segment
contains a sequence number. These numbers enable the Transport layer to reassemble the message
correctly upon arriving at the destination. The packets lost in the transmission is identified and
replaced.
• Connection control: The transport layer can be either connectionless or connection-
oriented. A connectionless transport layer treats segment as an independent packet and delivers it
to the transport layer. A connection-oriented transport layer makes a connection with the transport
layer at the destination machine and delivers the packets. After all the data are transferred the
connection is terminated.
• Flow control: Flow control at this layer is performed end to end.
• Error Control: Error control is performed end to end. At the sending side, the transport
layer makes sure that the entire message arrives at the receiving transport layer with out error.
Error correction is achieved through retransmission.
Session Layer: Session layer is the network dialog controller. It establishes, maintains, and
synchronizes the interaction between communicating systems. Specific responsibilities of the layer
are
• Dialog Control: Session layer allows two systems to enter in to a dialog. Communication
between two processes takes place either in half-duplex or full-duplex. Example: the dialog
between a terminal connected to a mainframe. Can be half-duplex.
• Synchronization. The session layer allows a process to add checkpoints into a stream of
data. Example If a system is sending a file of 2000 pages, check points may be inserted after every
100 pages to ensure that each 100 page unit is advised and acknowledged independently. So if a
crash happens during the transmission of page 523, retransmission begins at page 501, pages 1 to
500 need not be retransmitted.
Presentation layer: It is concerned with the syntax and semantics of the information exchanged
between two systems. Responsibilities of the presentation layer are
• Translation .The processes in two systems are usually exchanging information in the form
of character strings, numbers, and so on. The Since different computers use different encoding
systems, the presentation layer is responsible for interoperability between these different encoding
methods. At the sender, the presentation layer changes the information from its sender-dependent
format into a common format. The presentation layer at the receiving machine changes the
common format into its receiver dependent format.
• Encryption. The sender transforms the original information from to another form and sends
the resulting message over the entire network. Decryption reverses the original process to
transform the message back to its original form.
• Compression. It reduces the number of bits to be transmitted. It is important in the
transmission of text, audio and video.
Application Layer: It enables the user (human/software) to access the network. It provides user
interfaces and support for services such as electronic mail, remote file access and transfer, shared
database management and other types of distributed information services. Services provided by
the application layer are
• Network Virtual terminal. A network virtual terminal is a software version of a physical
terminal and allows a user to log on to a remote host.
• File transfer, access and management. This application allows a user to access files in a
remote computer, to retrieve files from a remote computer and to manage or control files in a
remote computer.
• Mail services. This application provides the basis for e-mail forwarding and storage.
• Directory services. It provides distributed database sources and access for global
information about various objects and services.
PHYSICAL LAYER
Like data signals can be analog or digital. Analog signals can have an infinite number of values in
a range; digital signals can have only a limited number of values.
In data communications, we commonly use periodic analog signals and nonperiodic digital signals.
Comparison of analog and digital signals
DIGITAL TRANSMISSION
DIGITAL-TO-DIGITAL CONVERSION:
• We can represent digital data by using digital signals.
• The conversion involves three techniques: line coding, block coding, and scrambling.
• Line coding is always needed.
• Block coding and scrambling may or may not be needed.
Line Coding & Decoding:
Line Coding is the process of converting Binary data into digital signals.
Manchester
It uses the inversion at the middle of each bit interval for both synchronization and bit
representation.
The bit 1 is represented by negative -to-positive transition.
The bit 0 is represented by positive-to-negative transition
Transition at the middle is used for synchronization
The minimum bandwidth is 2 times that of NRZ
Differential Manchester
Inversion at the middle of the bit interval is used for synchronization.
Presence or absence of additional transition at the beginning of the interval is used to identify the
bit.
A bit 0 is represented by a transition. A bit 1 means no transition.
It requires two signal changes to represent binary 0,but only one to represent binary 1.
The minimum bandwidth of Manchester and differential Manchester is 2 times that of NRZ.
Bipolar schemes: AMI and pseudo ternary:
In bipolar encoding, we use three levels: positive, zero, and negative.
• The bit 0 is represented by zero level
• The 1s are represented by alternate positive and negative voltages. If the first 1 bit is
represented by positive amplitude, the second will be represented by the negative amplitude, and
so on.
Bipolar Alternate Mark Inversion
A binary 0 is represented by zero voltage.
A binary 1s are represented by alternate positive and negative voltages.
Merits
By inverting on each occurrence of 1, The dc component is zero A long sequence of 1s stays
synchronized.
Pseudoternary
A binary 0 alternate between positive and negative voltages.
Guided media
Guided media, which are those that provide a conduit from one device to another, include twisted-
pair cable, coaxial cable, and fiber-optic cable.
1. Twisted-Pair Cable
A twisted pair consists of two conductors (normally copper), each with its own plastic insulation,
twisted together.
One of the wires is used to carry signals to the receiver, and the other is used only as a ground
reference. The receiver uses the difference between the two. In addition to the signal sent by the
sender on one of the wires, interference (noise) and crosstalk may affect both wires and create
unwanted signals.
The most common twisted-pair cable used in communications is referred to as unshielded twisted-
pair (UTP). IBM has also produced a version of twisted-pair cable for its use called shielded
twisted- pair (STP). STP cable has a metal foil or braided- mesh covering that encases each pair
of insulated conductors. Although metal casing improves the quality of cable by preventing the
penetration of noise or crosstalk, it is bulkier and more expensive.
Connector: Registered Jack (RJ 45)
Applications
Twisted-pair cables are used in telephone lines to provide voice and data channels.
2. Coaxial Cable
Coaxial cable (or coax) carries signals of higher frequency ranges than those in twisted- pair cable,
in part because the two media are constructed quite differently. Instead of having two wires, 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, braid, or a combination of
the two. The outer metallic wrapping serves both as a shield against noise and as the second
conductor completing the circuit. This outer conductor is also enclosed in an insulating sheath, and
the whole cable is protected by a plastic cover
A glass or plastic core is surrounded by a cladding of less dense glass or plastic. The difference in
the density of the two materials must be such that a beam of light moving through the core is
reflected off the cladding.
Propagation Modes
There are two modes for propagating light along optical channels; each requires fiber with different
physical characteristics
Multimode
Single mode
Multimode
Multiple beams from a light source move through the core in different paths. Multimode can be
implemented in two forms
Step-index
Graded index
Single-Mode
It uses step-index fiber and a highly focused source of light that limits beams to a small
range of angles, all close to the horizontal
The Single-Mode fiber itself is manufactured with a smaller diameter than that of
multimode fiber and with lower density.
This results in a critical angle that is close enough to 90. to make it horizontal.
All the beams arrive at the destination together and can be recombined with little distortion
to the signal.
Fiber Sizes
Optical fibers are defined by the ratio of the diameter of their core to the diameter of their cladding
expressed in micrometers.
Fiber-optic cable connectors.
Three different types of connectors are used by fiber –optic cable. SC (subscriber channel)
Connector:
It is used in cable TV.
ST (Straight-tip) Connector:
It is used for connecting cable to networking devices.
Performance:
Attenuation is flatter than in the case of twisted pair cable and coaxial cable.
Few repeaters are needed when we use fiber optic cable.
Application
It is used in cable TV and LAN (Fast Ethernet and 100Base –X.
Advantages
Higher bandwidth: It can support higher bandwidth than twisted pair or coaxial cable.
Less signal attenuation: Transmission distance is greater than that of other guided media. Signals
can be transmitted for 50 km without requiring regeneration.
Immunity to electromagnetic Interference: Electromagnetic noise can not affect fiber-optic cables
Resistance to corrosive materials: glass is more resistant to corrosive materials.
Light-weight: It is of less weight than the copper cables.
More Immune to taping: Fiber-optic cables are more immune to taping than copper cables.
Disadvantages:
Installation/Maintenance. Installation/Maintenance need expertise since it is a new technology.
Unidirectional: Propagation of light is unidirectional. Bidirectional communication is achieved by
means of two optical fibers.
Cost: It is more expensive and the use of optical fiber cannot be justified if the need for bandwidth
is not high.
UNGUIDED MEDIA: WIRELESS
Unguided media transport electromagnetic waves without using a physical conductor. This type of
communication is often referred to as wireless communication.
Unguided signal can travel from the source to destination in several ways:
1. Ground Propagation:
⦿ Radio waves travel through the lowest portion of the atmosphere, hugging the earth.
⦿ The low frequency signal follows the curvature of the planet.
⦿ Distance depends on the amount of the power.
2. Sky Propagation:
⦿ Higher frequency radio radiate upward into the ionosphere where they arereflected
back to the earth.
⦿ Sky propagation allow for greater distance with lower power output.
3. line-of-sight Propagation: Very high frequency signals are transmitted in straight lines
directly from antenna to antenna.
Radio Waves:
⦿ Radio Waves: Between 3 KHz – 1 GHz.
⦿ Radio waves use omnidirectional antenna.
⦿ Radio waves used for multicast communication, such as radio and television.
⦿ Sky Propagation. This makes radio waves a good candidate for long-distance broadcasting
such as AM radio.
Micro Waves:
1. 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.
2. Very high-frequency microwaves cannot penetrate walls. This characteristic can be a
disadvantage if receivers are inside buildings.
3. The microwave band is relatively wide, almost 299 GHz. Therefore wider subbandscan be
assigned, and a high data rate is possible Use of certain portions of the band requires permission
from authorities.
Infrared waves:
⦿ Between 300 GHz-400 THz
⦿ Used for short-range communication.
⦿ Very common with remote control devices, but can also be used for device-to-device
transfers, such as PDA to computer.
⦿ Line-of-sight propagation.
CIRCUIT SWITCHING AND TELEPHONE NETWORK
.
ERROR DETECTION AND CORRECTION
ERROR:
Data can be corrupted during transmission. For reliable communication, errors must be detected
and corrected.
TYPES OF ERRORS:
Single bit Error:
The term single bit error means that only one bit of a given data unit is changed from 1 to 0 or 0
to 1. 010101 is changed to 110101 here only one bit is changed by single bit error.
Burst Error:
A burst error means that 2 or more bits in the data unit have changed. Example:
Here two bits are corrupted.
Redundancy
Error detection use the concept of redundancy, which means adding extra bits for detecting errors
at the destination .i.e., instead of repeating the entire data stream, a shorter group of bits may be
appended to the end of each unit.
Detection methods
Parity check
Cyclic redundancy check
checksum
Parity check
A redundant bit called parity bit is added to every data unit so that the total number of 1’s in the
unit becomes even (or odd).
SIMPLE PARITY CHECK
In a simple parity check a redundant bit is added to a string of data so that total number of 1’s in
the data become even or odd.
The total data bit is then passed through parity checking function. For even parity, it checks for
even number of 1’s and for odd parity it checks even number of 1’s. If an error is detected the data
is rejected.
Form data into a 2-dimensional array; add single parity check bits to each row and each column;
transmit row-by-row
Example: data = 1110001 1000111 0011001
• Form 3×7 array and add row and column parity bits: Data bits
1110001 0
1000111 0 row
0011001 1 parity bits
0101111 1
Column parity bits
column 1 parity check fails column 2 parity check ok column 3 parity check fails column 4 parity
check ok column 5 parity check ok column 6 parity check ok column 7 parity check ok
Therefore the receiver can detect that bit errors Occurred, but it cannot Correct them (here, if the
Bit errors were in positions (1,3) and (2,1) instead, the receiver parity checks would be the same)
CYCLIC REDUNDANCY CHECK
CRC is based on binary division. In CRC, instead of adding bits to achieve the desired parity, a
sequence of redundant bits, called the CRC or the CRC remainder, is appended to the end of the
data unit so that the resulting data unit becomes exactly divisible by a second, predetermined binary
number. At its destination, the incoming data unit is assumed to be intact and is therefore accepted.
A remainder indicates that the data unit has been damaged in transit and therefore must be rejected.
CRC GENERATOR:
CRC CHECKER:
POLYNOMIALS
The divisor in the CRC most often represented not as a string of 1s and 0s, but as an algebraic
polynomial. The polynomial format is useful to solve the concept mathematically.
Standard Polynomials:
Checksum:
~ used by the higher layer protocols
~ is based on the concept of redundancy (VRC, LRC, CRC ….)
To create the checksum the sender does the following:
The unit is divided into K sections, each of n bits.
Section 1 and 2 are added together using one’s complement.
Section 3 is added to the result of the previous step.
Section 4 is added to the result of the previous step.
The process repeats until section k is added to the result of the previous step.
The final result is complemented to make the checksum.
At Sender:
Original data: 10101001 00111001
10101001
00111001
11100010 Sum
00011101 Checksum
10101001 00111001 00011101
At Receiver:
Received data: 10101001 00111001 00011101
10101001
00111001
00011101
11111111 Sum
00000000 Complement
each r bit is the VRC bit for one combination of data bits r1 = bits 1, 3, 5, 7, 9, 11
r2 = bits 2, 3, 6, 7, 10, 11
r4 = bits 4, 5, 6, 7
r8 = bits 8, 9, 10, 11
Error Detection and Correction:
.FLOW CONTROL
Flow control coordinates that amount of data that can be sent before receiving ACK It is one of
the most important duties of the data link layer.
ERROR CONTROL
• Error control in the data link layer is based on ARQ (automatic repeat request), which is
the retransmission of data.
• The term error control refers to methods of error detection and retransmission.
• Anytime an error is detected in an exchange, specified frames are retransmitted. This
process is called ARQ.
OPERATION:
The possible operations are Normal operation
lost frame ACK lost delayed ACK.
The sender sends frame 0 and wait to receive ACK 1. when ACK 1 is received it sends frame 1
and then waits to receive ACK 0, and so on.
The ACK must be received before the time out that is set expires. The following figure shows
successful frame transmission.
Lost or damaged acknowledgement
o When the receiver receives the damaged frame it discards it, which essentially means the
frame is lost. The receiver remains silent about a lost frame and keeps its value of R.
o For example in the following figure the sender transmits frame 1, but it is lost. The receiver
does nothing, retaining the value of R (1). After the timer at the sender site expires, another copy
of frame 1 is sent.
Lost acknowledgement
o A lost or damaged ACK is handled in the same by the sender; if the sender receives a
damaged ACK, it discards it.
o The following figure shows a lost ACK 0.the waiting sender does not know if frame 1 has
been received. When the timer for frame 1 expires the sender retransmits frame 1.
o Note that the receiver has already received frame 1 and is expecting to receive frame 0.
Therefore, its silently discards the second copy of frame 1.
o The following figure shows a lost ACK 0.the waiting sender does not know if frame 1 has
been received. When the timer for frame 1 expires the sender retransmits frame 1.
o Note that the receiver has already received frame 1 and is expecting to receive frame 0.
Therefore, its silently discards the second copy of frame 1.
• Delayed acknowledgement
o An ACK can be delayed at the receiver or by some problem with the link. The following
figure shows the delay of ACK 1; it ids received after the timer for frame 0 as already expired.
o The sender has already retransmitted a copy of frame 0. The receiver expects frame 1 so
its simply discards the duplicate frame 0.
o The sender has now received two ACK’s, one that was delayed and one that was sent after
the duplicate frame 0 arrived. The second ACK 1 is discarded.
BIDIRECTIONAL TRANSMISSION
The stop – and – wait mechanism is unidirectional. We can have bi-directional transmission if the
two parties have two separate channels for full duplex communication or share the same channel
for off duplex transmission. In this case, each party needs both S and R variables to track frames
sent and expected.
PIGGYBACKING
It’s a method to combine a data frame with an ACK. In following figure both the sender and the
receiver have data to send. Instead of sending separate data and ACK frames. It can save bandwidth
because the overhead from a data frame and an ACK frame can be combined into just one frame.
GO-BACK-N ARQ
• As in Stop-and-wait protocol senders has to wait for every ACK then next frame is
transmitted. But in GO-BACK-N ARQ number of frames can be transmitted without waiting for
ACK. A copy of each transmitted frame is maintained until the respective ACK is received.
Features of GO-BACK-N ARQ
1. sequence numbers.
Sequence numbers of transmitted frames are maintained in the header of frame. If k is the number
of bits for sequence number, then the numbering can range from 0 to 2k-1. Example: if k=3 means
sequence numbers are 0 to 7.
2. sender sliding window:
• Window is a set of frames in a buffer waiting for ACK. This window keeps on sliding in
forward direction, the window size is fixed. As the ACK is received, the respective frame goes out
of window and new frame to sent come into window. Figure illustrates the sliding window.
• If Sender receives. ACK 4, then it knows Frames upto
and including Frame 3 were correctly received
Window size=7
6 7 0 1 2 3 4 5 6 7
4. Control variables:
Sender variables and Receiver variables: Sender deals with three different variables
S -> sequence number of recently sent frame
SF -> sequence number of first frame in the window. SL -> sequence number of last frame in the
window.
The receiver deals with only one variable
Normal operation: Following diagram shows this mechanism. The sender keeps track of the
outstanding frames and updates the variables and windows as acknowledgements arrive.
Delayed Acknowledgement:
A delayed ACK also triggers the resending of frames.
RANDOM ACCESS:
Random Access (or contention) Protocols:
No station is superior to another station and none is assigned the control over another.
A station with a frame to be transmitted can use the link directly based on a procedure
defined by the protocol to make a decision on whether or not to send.
ALOHA Protocols
Was designed for wireless LAN and can be used for any shared medium
Pure ALOHA Protocol Description
All frames from any station are of fixed length (L bits)
Stations transmit at equal transmission time (all stations produce frames with equal frame
lengths).
A station that has data can transmit at any time
After transmitting a frame, the sender waits for an acknowledgment for an amount of time
(time out) equal to the maximum round-trip propagation delay = 2* tprop(see next slide)
If no ACK was received, sender assumes that the frame or ACK has been destroyed and
resends that frame after it waits for a random amount of time
If station fails to receive an ACK after repeated transmissions, it gives up
Channel utilization or efficiency or Throughput is the percentage of the transmitted frames
that arrive successfully (without collisions) or the percentage of the channel bandwidth that will
be used for transmitting frames without collisions
ALOHA Maximum channel utilization is 18% (i.e, if the system produces F frames/s, then
0.18 * F frames will arrive successfully on average without the need of retransmission).
Procedure for ALOHA protocol
Advantage of ALOHA protocols
A node that has frames to be transmitted can transmit continuously at the full rate of channel
(R bps) if it is the only node with frames
Simple to be implemented
No master station is needed to control the medium
Disadvantage
If (M) nodes want to transmit, many collisions can occur and the rate allocated for each
node will not be on average R/M bps
This causes low channel utilization
After sending the jam signal, backoff (wait) for a random amount of time, then
Transmit the frame again
Restrictions of CSMA / CD:
Packet transmission time should be at least as long as the time needed to detect a collision
(2 * maximum propagation delay + jam sequence transmission time)
Otherwise, CSMA/CD does not have an advantage over CSMA
Flow diagram for the CSMA/CD
Virtual-Circuit Networks:
In the Virtual Circuit approach a pre-planned route is established before any packets are
sent.
There is a call set up before the exchange of data (handshake).
A logical connection is established before any packets are sent
All packets follow the same path through the network
This does not mean that there is a dedicated path, as in circuit switching
All packets follow the same route and therefore arrive in sequence.
Virtual circuits can be either permanent, called Permanent virtual Circuits (PVC), or temporary,
called Switched Virtual Circuits (SVCs).
Permanent Virtual Circuit (PVC)
A Permanent Virtual Circuit (PVC) is a virtual circuit that is permanently available to the user.
PVC is defined in advance by a network manager. The actual identifier used for data transfer is
virtual circuit identifier (VCI). If permanent, an outgoing VCI is given to the source, and an
incoming VCI is given to the destination.
The source always uses this out going VCI to send frames to this particular destination.
The destination knows that the frame is coming from that particular source if the frame carries the
corresponding incoming VCI.
Once a communication session is complete, the virtual circuit is disabled.
Switched Virtual Circuit (SVC)
A switched virtual circuit is an automatically and temporarily created logical path with aid of some
switch control for a communication session switch control for a communication session
Once a communication session is complete, the virtual circuit is disabled.