CH 2
CH 2
COMMUNICATION
& SWITCHING
1
Introduction
Information must be transformed
into signals before it can be transported
across communication media. How
information is transformed depends on
its original format and on the format used
by the communication media. Data
stored in a computer are in the form of
0's and 1's, for example, using American
Standard Code for Information
Interchange (ASCII).
2
Introduction
To be carried from one place to
another (inside or outside the computer),
data are usually converted to digital
signals. This is called digital-to-digital
conversion or encoding digital data into a
digital signal.
3
Introduction
At other times, we want to send a
digital signal coming out of a computer
through a medium designed for an
analog signal. For example, to send data
from one place to another using the
public telephone line, the digital signal
produced by the computer should be
converted to an analog signal. This is
called digital-to-analog conversion or
modulating a digital signal.
4
MODEM
MODEM
Telephone network
5
Transmission Media
6
Transmission Media
Point-to-point links may also be
used to connect two local networks in
different buildings. Multi-point links, on
the other hand, are used to connect
multiple devices as in the bus and tree
topologies
7
Characteristics of transmission media
• Physical description.
• Transmission characteristics.
• Connectivity.
• Geographic Scope.
• Noise immunity.
• Relative Cost.
8
Characteristics of transmission media
10
Characteristics of transmission media
- Noise immunity:
It refers to resistance of the medium to
contamination of transmitted data.
- Relative Cost:
The cost is based on cost of components,
installation and maintenance.
11
Common transmission media
Various physical media can be used for
the actual transmission of signals. Each
one has its own niche in terms of
bandwidth, delay, cost, end ease of
installation and maintenance. Media are
roughly grouped into guided media such
as copper wires and fiber optics, and
unguided media such as radio and
lasers through the air.
12
Insulated
conductor
Insulated
conductor
(a) Twisted pair.
Braided outer
conductor
Insulator
Inner core
conductor
Protective
sheath
(b) Coaxial cable.
cladding
Highly refractive
core fiber
Protective
sheath
14
Twisted Pair
Transmission characteristics
Twisted pair may be used to transmit both
analog and digital signals. For analog
signals, amplifiers are required every 5-6
Km. For digital stream, repeaters are used
every 2-3 Km.
Connectivity
The twisted pair can be used for both
point–to–point and multi-point connections.
15
Twisted Pair
Geographic Scope
It provides data transmission to a range of 15
km or more. It is used within a single building
or a few buildings.
Noise immunity
The noise immunity of the twisted pair is
achieved by proper shielding.
Cost
The twisted pair is less expensive than other
media in terms of cost. Because of its
connectivity limitations, installation costs may
approach others.
16
Insulated
conductor
Insulated
conductor
(a) Twisted pair.
Braided outer
conductor
Insulator
Inner core
conductor
Protective
sheath
(b) Coaxial cable.
cladding
Highly refractive
core fiber
Protective
sheath
Physical description
Coaxial cable consists of stiff copper as a core
surround by an insulating material. The insulator is
encased by a braided cylindrical conductor which is
covered by a protective plastic sheath.
18
Coaxial Cable
Transmission characteristics
The 50Ω cable is used exclusively for digital
transmission data rates of up to 10 Mbps can be
achieved.
The 75Ω cable is used for both analog and digital
signaling. For analog signal data rate is 20 Mbps,
for digital signal data rate achieved is 50 Mbps.
The smaller the diameter of the wire, the greater
is its resistance to the propagation of a signal.
Increased resistance results in a decreased bit
rate across the communication path.
19
Coaxial Cable
Connectivity
Coaxial cable is applicable to point–to–point
and to multipoint configurations. Baseband
50Ω cable can support 100 devices per
segment. Broadband 75 Ωcan support
thousands of devices.
Geographic Scope
The maximum distance in baseband 50Ω is a
few kilometers. Broadband can span ranges of
tens of kms.
20
Coaxial Cable
Noise immunity
Coaxial is superior to that of twisted pair for
higher frequencies.
Cost
The cost of installed coaxial cable falls
between that of twisted pair and optical fiber.
Techniques for installation, transmission
control and connection are well developed.
21
Insulated
conductor
Insulated
conductor
(a) Twisted pair.
Braided outer
conductor
Insulator
Inner core
conductor
Protective
sheath
(b) Coaxial cable.
cladding
Highly refractive
core fiber
Protective
sheath
25
An optical transmission system has 3
components:
(1) The light source
It may be Light Emitting Diode LED or Laser
Diode (LD). LED emits light when a current
is applied. LED is simpler to install, less
costly and has a longer operation life. LD is
more efficient and can sustain greater data
rates. It also couples more usable optical
power into the fiber.
26
(2) The transmission medium
It is an ultra-thin fiber of glass or fused silica.
(3) The photo detector
It is used at the receiving end to convert the light
into electrical energy. It may be a PIN photodiode
or avalanche photodiode APD. PIN is less
expensive. Modulation of the light carrier is a form
of ASK called intensity modulation. Two binary
digits are represented by the presence and
absence of light at a given frequency, i.e., OOK.
Data rate is 1000Mbps.
27
Optical
detector
Core
Optical source
Cladding
28
Optical Fiber
Connectivity
The most common use is for point–to– point
links. However, multipoint systems are
possible but too expensive today. The fiber
provides extremely high bandwidth with little
power loss. Fiber networks are inherently
unidirectional and the interfaces are
considerably more expensive than electrical
interface. Fibers are difficult to splice and to
tap. It is also an unfamiliar technology.
Geographic Scope
Transmission is possible over distances of 6 to
8 km without repeaters. Hence, optical fiber is
suitable for linking LANs in several buildings
via point–to–point links.
29
Optical Fiber
Noise immunity
Optical fibers are not affected by EM interfaces or
noise and corrosive chemicals in the air. This
characteristics permits high data rates over long
distances and provides excellent security. Fibers can
be used in harsh factory environments unsuitable for
coaxial cables.
Cost
Fiber optic systems are more expensive than twisted
pair and coaxial cable in terms of cost per foot and
required components. Most of the cost was contained
in the termination hardware, and in the cost of fiber
hubs, bridges and routers. Labor cost associated with
cable pulls were the same regardless of cable type. A
low cost plastic optical fiber cable was introduced.
30
Wireless transmission media
When electrons move, they create
electromagnetic waves that can propagate through
free space (even in vacuum). These waves were
predicted by the British physicist James Clerk
Maxwell. The number of oscillations per second of
an electromagnetic wave is called its frequency,
and is measured in Hz. The distance between two
consecutive maxima (or minima) is called the
wavelength. By attaching an antenna of the
appropriate size to an electrical circuit, the EM
waves can be broadcast efficiently into the medium
and received by a receiver some distance away by
allowing its antenna to pick up EM waves from the
surrounding medium.
31
Wireless transmission media
In vacuum, all EM waves travel at the
same speed, no matter what their
frequency. This speed, usually called the
speed of light, is approximately 3108
m/sec. In copper or fiber, the speed slows
to about 2/3 of this value and becomes
slightly frequency dependent. The speed of
light is the ultimate speed limit. No object or
signal can ever move faster than it. The EM
spectrum is shown in Table 2.1.
32
Wavelength
Abbreviation Frequency
Classification
Very low frequency VLF 3-30 kHz 100-10 km
39
Transmission media comparison
- Electromagnetic interference
It is the susceptibility of the medium to
external electromagnetic energy inadvertently
introduced onto a link that interferes with the
intelligibility of a signal.
- Security
This is the protection against eavesdropping.
Some media, like broadcast radio, are easily
intercepted. Others, like fiber optic cable, are
more secure.
40
Digital-to-digital encoding
A digital signal is a sequences of
discrete (discontinuous) voltage pulses.
Each pulse is a signal element. Binary
data are transmitted by encoding each
data bit into signal elements. The
encoding scheme is simply the mapping
from data bits to signal elements. In
other words, digital-to-digital encoding or
conversion is the representation of digital
information by a digital signal.
41
Digital-to-digital encoding
For example, when you transmit data from
your computer to your printer, both the
original data and the transmitted data are
digital. In this type of coding, the binary 1s
and 0s generated by a computer are
translated into a sequence of voltage pulses
that can be propagated over a wire.
42
01011101 Digital/digital
Encoding
43
In polar signaling, one logic state is represented by
a positive voltage level and the other by a negative
voltage level. Data rate in bits per second of a
signal is the rate at which data are transmitted, i.e.,
how many bits can be transferred per second. It is
sometimes called the speed of transmission. The
modulation rate is the rate at which signal level is
changed. The modulation rate is expressed in bauds
which mean the number of signal elements
(changes) per second. It is also called the baud rate
or the signaling rate.
44
Encoding performance parameters
There is variety of approaches that could be used for encoding
the digital data. The ways of comparing between them can be
summarized as follows:
Signal spectrum
- A lack of high frequency components means that less
bandwidth is required for transmission.
- A lack of the DC component permits AC coupling via
transformer. This provides excellent electrical isolation and
therefore reducing the interference.
- The transfer function of a channel is worse near the band
edges. Therefore, a good signal design should concentrate the
transmitted power in the middle of the transmission bandwidth by
shaping the spectrum of transmitted signal.
45
Signal synchronization capability
We need to determine the beginning and end of each
bit position. This may require a separate clock
transmission in order to synchronize the transmitter
and receiver. This choice is an expensive approach.
Some coding schemes avoid this requirement by
providing some synchronization mechanism that is
based on the transmitted signal itself.
Signal error detecting capability
It is useful to have some primitive error-detection
capability built into the physical signaling-encoding
scheme. Some coding schemes can provide this
capability while others cannot.
46
Signal interference and noise immunity
Certain codes exhibit superior performance in
the presence of noise.
Cost and complexity
Although digital logic continues to drop in
price, the cost and complexity of the
equipment should not be ignored. The higher
the signaling rate to generate a given data
rate, the greater the cost.
47
The tasks involved in interpreting digital
signals at the receiver are as follows:
1- The receiver must know the timing of each
bit. The receiver must know with some
accuracy when a bit begins and ends.
2- The receiver must determine whether the
signal level for each bit position is high (1) or
low (0).
This can be accomplished by sampling each
bit in the middle and comparing its level to a
threshold. Because of noise and other
impairments there will be some errors.
48
Digital-to-Analog Encoding
Digital-to-analog conversion or digital-to-
analog modulation is the process of changing
one of the characteristics of an analog signal
based on the information in a digital signal (0s
and 1s). When you transmit data from one
computer to another across a public access
phone line, for example, the original data are
digital, but because telephone wires carry
analog signals, the data must be converted.
The digital data must be modulated on an
analog signal that has been manipulated to
look like two distinct values corresponding to
binary 1 and binary 0.
68
Digital/analog
encoding
69
Switching Techniques
It is often impractical for two computers to be
directly connected. Instead, communication is
achieved by transmitting data from source to
destination through a network of intermediate
nodes. These nodes are not concerned with the
content of the data; rather, their purpose is to
provide a switching facility that will move the
data from node to node until they reach their
destination. Three switching techniques are in
common use; namely:
• circuit switching.
• message switching.
• packet switching.
71
Circuit switching
In circuit switching, a dedicated line is necessary
(actual connection) before data can be transmitted.
Therefore, three phases take place for connection:
(1) Circuit establishment
During this phase, a circuit is set-up between source
and destination.
(2) Data transfer
After completion of a connection, a signal confirming
circuit establishment is returned and data transfer
begins.
(3) Circuit disconnect
After completion of data transfer, the circuit is
disconnected and become available for other
connections.
72
Features of circuit switching
73
Disadvantages of circuit switching
Inefficient
For burst data, channel may be idle for a
significant portion of time, yet remain
unavailable to another users.
Slow
Delay prior to data transfer of few seconds for
only few micro seconds for data transmission.
Relatively expensive
Charge is based on time and distance not on
data transmitted.
74
Message switching
In message switching, an address is appended to
the message and the message passes from one
node to another. At each node, the message is
received, inspected for errors, stored until link
become available, it is then forward on to the
next node. It is therefore called a store and
forward method. The node is a general-purpose
minicomputer with sufficient storage. Leased line
facilities are usually used, so circuit switching
delays are not involved but queuing delay occurs.
Since message may be competing with other
messages for access to facilities, a queuing
delay may be incurred while waiting for the link to
become available.
76
Features of message switching:
• no dedicated physical path is necessary in
advance between the two stations.
• no simultaneous availability of the two stations
is required.
• header information must be included with
each message.
• node is a general purpose minicomputer.
• fully transactional; i.e., at each node, the
message is stored and forward.
• delay at each node en route to destination
may occur for receiving, queuing.
77
• no limit on message size.
Advantages of message switching:
• simultaneous availability of the two is not
necessary.
• no blocking is encountered but queuing delay
may occur.
• efficiency is greater as channel is used only
when transmitting data.
• capable to send the message to many
destinations by appending addresses.
• providing priority to users is possible.
• if error is discovered, it is possible to request
retransmission.
78
• speed and code conversion can be employed.
Disadvantages of message switching:
• large storage capacity must be available at
each node.
• long queuing delay with great variance may
occur.
• not suitable for interactive connections.
Usage of message switching:
• It is not used in LAN due to delay and storage
limitations.
• It is used in governmental, military and
business applications for legal and historical
79
reasons.
Packet switching
Packet switching is devised to overcome
the long transmission delays inherent in
message switching. It combines the
features and advantages of circuit and
packet switching. There is an upper limit to
the block size to be transmitted (e.g., of the
order of 1000 - 5000 bits). Therefore, the
message is divided into as many packets
as necessary.
81
Packet switching
Features of packet switching
• Message is divided into fixed-length
packets.
• Each packet is hold temporary at each
node and then forward to the next node
after confirming successful reception.
• Suitable for interactive traffic.
82
Packet switching
Advantages over message switching
Pipelining
Packet 1 is transmitted from node B to node C at
the same time that packet 2 is transmitted from
node A to B. This simultaneous use of
communication circuits yields considerable gains
in efficiency and minimizing delay.
Lower errors
As packets are short, they are less likely subject
to errors than complete messages. This leads to
lower probability of retransmission.
Lower congestion
As packets may be routed through the network
independently, congestion may be minimized by
taking different routes to their destinations.
83
Packet Format
The exact format of a packet varies widely. However,
the basic elements that make up a typical packet are:
Preamble “ start of packet indicator “
This field informs all other nodes that a packet is being
transmitted. It is a sequence that never occurs in
normal data and may be used for synchronizing the
clock speeds in the transmitting and receiving nodes.
Addressing information
Each node is identified by a fixed address, which is set
by some form of hardware switch. This field includes
the destination node address as well as sender’s
address to recognize where a packet comes form. A
broadcast address could also be used to cause the
packet to be received by all nodes on the network.
84
Packet Format
Control information
This field is used to state the purpose of the
packet. Some packets may be used for
network management purposes.
Data field
This field contains the actual data to be
transferred between nodes and may be either
fixed or variable in length.
Error check
This field allows the network hardware to
detect transmission errors. It may be simple
parity bits or CRC.
85
Address Control Error
Preamble
Control field information field
Data check
86
Error Control
An error control is necessary for successful
transmission of data. The bit stream is
segmented into blocks and redundant bits are
added in a well–defined pattern to each block.
Errors will destroy the pattern, so error
detection is possible, and retransmission of
the flawed blocks is necessary. This type of
error control is called error detection with
Automatic Repeat request (ARQ). The excess
redundancy is a measure of cost for the error
code used. It is the ratio of the number of
redundant bits to the number of data bits. The
measure of quality is the probability of
undetected errors for a particular code.
87
Parity checks
In its simplest form, a parity check applied to a binary bit stream
of 0’s and 1’s, adds one redundant bit to a sequence of (n-1) bits
to form a block of n bits. The parity bit is chosen at the transmitter
so that the whole block has an even (odd) number of ones, or
even (odd) parity. An odd number of errors results in an odd
number of ones at the receiver. The receiver can thus detect any
odd number of errors by checking, i.e., by determining whether
the number of ones is even or odd. Excess redundancy for a
single parity check is 1/(n-1) = 0.11, 0.01 for n = 10,100. For a
simple independent error model with bit error probability p, the
probability of m errors in a block of n bits is
pm (1-p) n-m ……………….(2.5)
if errors are in specified locations. If errors can be in any possible
location, the result becomes
pm (1-p)n-m. ……………….(2.6)
The problem with the use of the parity bit is that noise impulses
are often long enough to destroy more than one bit, particularly of
high data rates.
88
Automatic Repeat Request (ARQ)
Forward Error Correction (FEC) uses codes to correct
errors at the receiver. The alternative approach is error
detection with automatic repeat request. For FEC, the
receiver attempts to correct errors, but for ARQ it simply
detects errors and asks the transmitter to retransmit
erroneous blocks. So, the receiving station must be able to
inform the transmitting station whether or not a
transmission is received correctly, without errors.
To accomplish this, a reverse channel from the receiver to
the transmitter, must always exist. Over this reverse
channel, the receiver can send back positive and negative
acknowledgements (ACK & NAK), or only positive
acknowledgement. If only ACK is used, the existence of a
bad transmission is discovered through the absence of an
ACK in some specified time out period; but negative ACK
can speed retransmissions since they may be returned
before the original transmitter would finish timing out.
89
The primary advantage of using both ACK and NAK is
greater efficiency, but pure ACK approach is more
elegant since it eliminates superfluous messages. The
pure NAK protocol is not logically valid.
There are two ARQ Schemes; namely, stop and wait
ARQ and continuous ARQ. The choice of the scheme
is based on:
- the channel propagation delay
- the packet size
- the bit error rate on the channel
- trade-off between channel utilization and nodal
storage
For both types of ARQ, a copy of the transmitted
packet is retained at the transmitting node until there
is confirmation that it has been received with out error
90
Stop–and-Wait ARQ
91
Frame 1 Frame 1
ACK 1 ACK 1
Frame 2 Frame 2
X Timeout
X
period
NAK 2
Frame 2 Frame 2
ACK 2 ACK 2
time
Location A Location B
92
Continuous ARQ
The blocks are transmitted continuously without
waiting for ACK; although some ceiling is usually put
on the number of unacknowledged messages that are
outstanding. This approach is called “Sliding Window
Scheme“, where the size of the window is the
maximum number of unacknowledged messages
permitted. Stop and wait-ARQ can be regarded as a
special case where window size is 1.
Both frame transmission and ACK occur
simultaneously. This eliminates dead time waiting for
ACKs. A disadvantage of the sliding window method is
that for a sending window of size n, the transmitting
node must have n buffers to store copies of the n
messages in transit that may require retransmission.
93
There are two main variants of continuous ARQ. When a NAK is
received at the original transmitter, it may already have transmitted
several frames following the one in error. Handing the errors may be
achieved by two basic approaches:
Go–back–N ARQ
In this approach, the transmitter must retransmit the block that was
detected in error as well as all succeeding blocks as displayed in Fig.
2.22(a). This ensures that the blocks at the receiver are in correct
sequence. The disadvantage of that approach is that it is inefficient
with respect to channel utilization especially at high errors.
Selective repeat ARQ
Only the block detected in error is retransmitted in this approach as
shown in Fig. 2.22(b). It is much more efficient with respect to channel
utilization, but more buffer space and more complex processing are
required at the receiving node to store all the blocks received correctly
and then reassemble them into the correct sequence after the block
originally in error is properly retransmitted. A further drawback to
selective repeat is that multiple errors in different blocks can lead to
very complex recovery sequences.
Although selective repeat ARQ is more efficient in using the capacity
of a data link by requiring fewer retransmissions, Go-back-N is more
widely implemented. It simplifies software by not requiring the receiver
to reorder messages.
94
Frame 1
Frame 1
Frame 2 ACK 1
Frame 2 ACK 1
NAK 2
NAK 2
Frame 3
Frame 3
Frame 2
Frame 2
Frame 3
ACK 2 Frame 4
ACK 2
time
Location A Location B
95