DCN Chapter 1 - Part 1

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 45

Data Communication and

Computer Networks

Chapter One
INTRODUCTION
Main topics
Data Communication Basics
Introduction to Computer Networks
Transmission Medias
Network Protocol Stacks

2
Communication Basics
 Data communications (Transmission) are the exchange of data
between two devices via some form of transmission medium
such as a wire cable.
 For data communications to occur, the communicating devices

must be part of a communication system made up of a


combination of hardware (physical equipment) and software
(programs).
 The following figures show, the general (simplified) data communication model

and the communication between a workstation and a server computer system


over a public telephone network with all necessary hardware devices in each
stages of simplified communication model.

3
Five components of data
communication
1. Message: is the information (data) to be communicated. Popular
forms of information include text, numbers, pictures, audio, and
video.
2. Sender: is the device that sends the data message. It can be a
computer, workstation, telephone handset, video camera, and so on.
3. Receiver: is the device that receives the message. It can be a
computer, workstation, telephone handset, television, and so on.
4. Transmission medium: is the physical path by which a message
travels from sender to receiver. Some examples of transmission
media include twisted-pair wire, coaxial cable, fiberoptic cable, and
radio waves.
5. Protocol: is a set of rules that govern data communications. It
represents an agreement between the communicating devices.
Without a protocol, two devices may be connected but not
communicating, just as a person speaking French cannot be
4 understood by a person who speaks only Japanese.
Serial vs. parallel communications
In serial communications

 A single bit will be transferred at a time using the

communication channel.
 Bits will be reassembled at the destination

 Mostly used by computer peripherals like printers,

(why do they use such type of communication?)


In parallel communications

 Multiple bits (eg. Eight bits) will be transferred at a

time
5
 Needs multiple (parallel) communication channels
Communication tasks
 The table lists some of the key tasks that must be performed in a data
communications system.
 The list is somewhat arbitrary: Elements could be added; items on the list could
be merged; and some items represent several tasks that are performed at different
“levels” of the system (i.e. data communication system). However, the list as it
stands is suggestive of the coverage of this course.

6
Data Representation
Techniques
 The terms analog and digital correspond to continuous and discrete,
respectively.
 These two terms are used frequently in data communications in at least
three contexts: data, signaling, and transmission.
 Data is an entities that convey meaning, or information.
 Signals are electric or electromagnetic representations of data.
 Signaling is the physical propagation of the signal along a suitable
medium.
 Transmission is the communication of data by the propagation and
processing of signals.
 The next slide demonstrate how the digital and analog data and signals
can be processed and propagated using different communication devices
in the network.
 Both analog and digital signals may be transmitted on suitable
transmission media. The way these signals are treated is a function of the
transmission system.
7
Data Representation Techniques
cont’d…

8
Description of data representation Technique
Analog Signal Digital signal

Continuous wave that carries  Discrete on-off pluses that

information by altering the carry covey information in

characteristics of waves terms of 0s and 1s just like

Analog signal has infinitely CPU

many levels of intensity over a  It counts but not measures

period of time  Discrete pluses of data

It measures rather than transmission rather than

counts continues wave


9
Example : Voice and all  More prevalent in computer
Data transmission Formats
Analog transmission is a means of transmitting analog signals
without regard to their content; the signals may represent analog or
digital data.
In either case, the analog signal will become weaker (attenuate)
after a certain distance. To achieve longer distances, the analog
transmission system includes amplifiers that boost the energy in the
signal.
Unfortunately, the amplifier also boosts the noise components.
With amplifiers cascaded to achieve long distances, the signal
becomes more and more distorted.

10
Data Transmission Formats
cont’d…
Digital transmission, a digital signal can be transmitted only
a limited distance before attenuation, noise, and other impairments
endanger the integrity.
To achieve greater distances, repeaters are used. A repeater receives
the digital signal, recovers the pattern of 1s and 0s, and retransmits a
new signal. Thus the attenuation is overcome.
The question naturally arises as to which is the preferred method of
transmission. Both telecommunications facilities and intra-building
services have moved to digital transmission and, where possible,
digital signaling techniques.
The most important reasons are the following:
Digital technology
Data integrity
Capacity utilization
11
Security and privacy
Signal Encoding Technique
 Digital data, digital signals: it is to assign one voltage level to binary
one and another to binary zero.
 Digital data, analog signal: it converts digital data to an analog signal
so that it can be transmitted over an analog line.
 The basic techniques are amplitude shift keying (ASK), frequency
shift keying (FSK), and phase shift keying (PSK). All involve altering
one or more characteristics of a carrier frequency to represent binary
data.
 Analog data, digital signals: the simplest technique is pulse code
modulation (PCM), which involves sampling the analog data
periodically and quantizing the samples.
 Analog data, analog signals: these are modulated by a carrier
frequency to produce an analog signal in a different frequency band,
which can be utilized on an analog transmission system.
 The basic techniques are amplitude modulation (AM), frequency
12
modulation (FM), & phase modulation (PM).
Transmission Impairments
 Impairments are communication problems (barriers) that could
cause the signal degradation (signal quality loss or bit level
change) in the time data communication among or between
communication devices.
 For analog signals, these impairments can degrade the signal
quality.
 For digital signals, bit errors may be introduced, such that a binary
1 is transformed into a binary 0.
 The most common impairments are:
 Attenuation and attenuation distortion
 Delay distortion
 Noise

13
Attenuation
 Attenuation is the reduction in the power of a signal as it is transmitted.

 Attenuation is a problem because the signal eventually loses so much

power that it becomes difficult to distinguish it from the thermal noise in

the background.

 Attenuation introduces three considerations for the transmission engineer.


 First, a received signal must have sufficient strength so that the
electronic circuitry in the receiver can detect the signal.
Second, the signal must maintain a level sufficiently higher than
noise to be received without error.
Third, attenuation varies with frequency

14
Delay distortion

15
Transmission Impairments cont’d…
Noise :is a summation of unwanted or disturbing energy from natural
and sometimes man-made sources or it is unwanted signals that are
inserted somewhere between transmission and reception.
It is a major limiting factor in communications system performance.
Noise may be divided into four categories:
 Thermal noise: is due to thermal agitation of electrons.
 Intermodulation noise: is a situation when signals at different
frequencies share the same transmission medium.
 The effect of intermodulation noise is to produce signals at a
frequency that is the sum or difference of the two original
frequencies or multiples of those frequencies.
 Crosstalk: is an unwanted coupling between signal paths.
 Impulse noise: is non-continuous, consisting of irregular pulses or
noise spikes of short duration and of relatively high amplitude.
16
Modes of data transmission
 There are 3 different transmission modes characterized

according to the direction of the exchanges:

1.A simplex connection is a connection in which the data

flows in only one direction, from the transmitter to the

receiver.

 This type of connection is useful if the data do not need to

flow in both directions (for example, from your computer

to the printer or from the mouse to your computer...).

17
Contd.
2. A half-duplex connection (sometimes called an alternating connection or semi-

duplex) is a connection in which the data flows in one direction or the other, but not

both at the same time.

 With this type of connection, each end of the connection transmits in turn.

 This type of connection makes it possible to have bidirectional

communications using the full capacity of the line.


 In a half-duplex transmission, the entire capacity of a channel is taken over by

whichever of the two devices is transmitting at the time.

 Walkie-talkies and CB (citizens band) radios are both half-duplex systems.

 The half-duplex mode is used in cases where there is no need for communication in

both directions at the same time; the entire capacity of the channel can be utilized
18 for each direction.
Contd.
3. Full-Duplex: In full-duplex mode (also called duplex), both stations can

transmit and receive simultaneously


 The full-duplex mode is like a two-way street with traffic flowing in both directions at

the same time.

 In full-duplex mode, signals going in one direction share the capacity of the link: with

signals going in the other direction.

 This sharing can occur in two ways: Either the link must contain two physically

separate transmission paths, one for sending and the other for receiving; or the

capacity of the channel is divided between signals travelling in both directions.

 One common example of full-duplex communication is the telephone network. When

two people are communicating by a telephone line, both can talk and listen at the

same time.

 The full-duplex mode is used when communication in both directions is required all the

time.
19
 The capacity of the channel, however, must be divided between the two directions.
Contd.

20
Multiplexing
 In data communication, there might be a need to share a single media for

multiple communication (media sharing)

 Sharing of a single media (fiber, coaxial, microwave,..) is known as

multiplexing.

 In the above figure, there are n inputs to a


21 multiplexer. The multiplexer is connected by a single
Contd.
 The link is able to carry n separate channels of data.

 The multiplexer combines (multiplexes) data from the

n input lines and transmits over a higher capacity

data link.

 The de multiplexer accepts the multiplexed data

stream, separates (de multiplexes) the data according

to channel, and delivers them to the appropriate


22
output lines.
Types of Multiplexing
1. Frequency-division multiplexing (FDM)

2. Time-division multiplexing (TDM)

3. Code division multiplexing(CDM)

23
Frequency-division Multiplexing
 FDM is a signal transmission technology in which multiple signals

can simultaneously be transmitted over the same line or

channel.

 Frequency-division multiplexing (FDM) can be used in both wired and

wireless networking for transmitting large amounts of data at high

speeds.

 FDM is the simplest and oldest form of multiplexing in wireless

networking technology.

 Frequency division multiplexing involves simultaneously transmitting

multiple signals on different frequencies.


24
Contd.
 These different frequencies, called channels, share non-

overlapping portions of the total frequency band being used.

 Signals from different data sources are fed into a multiplexer

that modulates each signal and transmits them at different

frequencies.

 These signals are then transmitted over the wire or through

wireless communication and are separated at the destination

into individual data signals using a demultiplexer.

25
Time-division multiplexing (TDM)
 A multiplexing method for transmitting multiple data streams in a

single communication path.

 In TDM, the data from different input channels is divided into

fixed-length segments and then combined in round-robin fashion

into a single output data stream, which can then be transmitted

over a single channel transmission system and demultiplexed at

the destination location.

 The segments can be created by the multiplexer itself or can be

inherent in the input channel signals, such as fixed-length frames.


26
Contd.
 For example, if input streams A, B, and C are divided into segments

as shown here:
 A: A1, A2, A3,...

 B: B1, B2, B3,...

 C: C1, C2, C3,...

 the output stream will look like this:

 MUX(ABC) A1, B1, C1, A2, B2, C2, A3, B3, C3,...

 One weakness in TDM is that if an input channel does not have

anything important to carry for a time, empty segments are


inserted into the output stream anyway. For example, if channel A is
not transmitting data, one-third of the output channel is not being
used. You can overcome this weakness by using a more sophisticated
multiplexing technique called statistical multiplexing.
27
Code Division Multiple Access(CDMA)
 It allows each station to transmit over the entire frequency spectrum all the
time. Multiple simultaneous transmissions are separated using coding theory.
Thus, the key to CDMA is to be able to extract the desired signal while
rejecting everything else as random noise.
 In CDMA, each bit time is subdivided into m short intervals (for example 8
chips/bit) called chips.
 Each station is assigned a unique m-bit code called a chip sequence.
 For example, it is convenient to use a bipolar notation to write these codes as
sequences of −1 and +1. To transmit a 1 bit, a station sends its chip sequence.
To transmit a 0 bit, it sends the negation of its chip sequence. Thus, for m = 8,
if station A is assigned the chip sequence (−1 −1 −1 +1 +1 −1 +1 +1), it can
send a 1 bit by transmitting the chip sequence and a 0 by transmitting (+1 +1
+1 −1 −1 +1 −1 −1).

28
Code devisor Multiplexing cont’d…..
Example: Let d1 and d2 are a set of data which are going to sent and c1 and c2 are a
code.
Assume d=1 and d2=0
To find the common channel we should multiply a given data which a given code.
Common channel=d1.c1+c2.d2……….
Chip sequence data representation
C1=+1 +1 +1 +1 0=>-1 and 1=> +1
C2=+1 -1 +1 -1
Station one use the channel as d1.c1=> (+1)(+1 +1 +1 +1)=+1 +1 +1 +1
Station 2 as d2.c2 => (-1)(+1-1+1-1) =-1 +1 -1 +1
Common channel =(+1 +1 +1 +1)+(-1 +1 -1 +1) which is multiplexing
The receiver side or the de multiplexing process can represent as the following
Assume that station 1 want to receive station 2’s data, so in order to do this we
should have to multiply common channels data with station 2’s code.
(+1 +1 +1 +1)+(-1 +1 -1 +1) (+1 -1 +1 -1 )=+1-1+1-1-1-1-1+1
= -2 then divide the result gain by the number of channels in our case number of
channels =2
-2/2=-1 which is station 2’s data
Data Transmission : Error Detection
and Correction

Errors in transmitted data can occur for a variety


of reasons.

1.Some errors are due to equipment failure.

2.Some errors are due dispersion in optical

fibers (i.e. light pulses spread out).

3.Some errors are due to attenuation (loss of

signal power over a line).

4.Most errors are due to thermal noise that

30
occurs naturally on the line.
Detecting Errors
 We need to build systems that are resilient to errors in data.

 There is no way to guarantee that all bits will be sent uncorrupted.

 One way to cope with this is to detect errors and request that corrupted

data should be retransmitted.

 Because errors occur randomly, there is no way of knowing with

complete certainty if the data is correct.

 The best we can do is detect most errors.

31
Parity Checking (Vertical Redundancy Check (VRC)
 One of the most common ways of checking to
see if an error is to count the bits in a
character to see if there is an even or odd
number.
 Before transmission, an extra bit (parity bit) is
appended to the character to force the
number of bits to be even (or odd).
 If the received character does not have an
even (or odd) number of bits then an error
must have occurred.

32
Parity
Both the sender and receiver must know which

form of parity to use.


A character such as 0110001 would be
Odd Parity: 01100010
transmitted as: (There are an odd number of 1s)

Even Parity: 01100011 (There are an even number of 1s)

Parity checking will detect a single error in a

character but not double errors.


33
Hamming Distance
 The Hamming distance between two bit patterns is the

number of dissimilar bits.


 It measures the minimum number of substitutions

required to change one string into the other, or the


number of errors that transformed one string into the
other.
 For example, the Hamming distance between
01000001 (‘A’) and 01000011 (‘C’) is 1 because there
is only one dissimilar bit.
34
 One error in the wrong place can turn an ‘A’ into a ‘C’.
Hamming Distance
The Hamming distance between 01000001 (‘A’)

and 01000010 (‘B’) is 2 because there are two


dissimilar bits.
It would take two errors in the wrong place to

turn an ‘A’ into a ‘B’.


Adding a parity bit ensures that there is at least

a Hamming distance of 2 between any two


code words.

35
Checksum
 Another simple way of checking if there has been an
error in a block of data is to find a checksum.
 Imagine we send the data 121, 17, 29 and 47. Adding
these numbers up, we get 214.
 We actually send 121,17,29,47 and 214.
 The receiver can total up the first numbers and
compare it to the last one.
 A difference means an error has occurred.
 Typically pairs of bytes are joined to make 16 bit
numbers. It is these 16 bit numbers that are totaled to
make the checksum.
 If the checksum becomes larger than 65535 (the
largest possible 16 bit number) then the carried bits are
discarded.
 Checksums are common but not particularly good at
catching errors. Later errors can easily hide earlier
36 ones.
Check sum…..
Example
Given an segmented of 32bit data 10011001111000100010010010000100
Then detect the error using check sum
Senders side
To do this follow the following steps
1.Segment the data into 8 bits as the following
10011001
11100010
00100100
10000100
2. Sum the data to find check sum
10011001
11100010
00100100
10000100
1000100011 since the result contains 10 bits wrapped around 2 bits
Check sum…..
00100011+10=00100101
3. Find 1’S complement(change 0->1 and 1->0) of the above 8 bits
check sum = 11011010
Receiver side
4. All segment along with check sum value are added
sum of total data+ check sum
00100101+11011010=11111111
5.Then to find the original data and check if error is occurred by
complementing the above data. If the complement data =0 the data is
free from errors but if the result is different the data contains error
there fore error correction mechanism should be applied to correct it.
1’s 11111111=00000000 there fore this data is free from errors
Cyclic Redundancy Code
(CRC)
A far more effective way of detecting errors
in a block of data is to use a Cyclic
Redundancy Code.
In CRC, a number is mathematically
calculated for a packet by its source
computer, and then recalculated by the
destination computer.
If the original and recalculated versions at
the destination computer differ, the packet
is corrupt and needs to be resent or
ignored.
39
The mathematical procedure for performing a
CRC is specified by the International
Telecommunication Union (ITU) and involves
applying a 16-bit polynomial to the data being
transmitted by the packet for packets of 4 KB
of data or less, or a 32-bit polynomial for
packets larger than 4 KB.
The results of this calculation are appended to
the packet as a trailer. The receiving station
applies the same polynomial to the data and
compares the results to the trailer appended
to the packet. Implementations of Ethernet
use 32-bit polynomials to calculate their CRC.
40
Cyclic redundancy check(CRC)
Error correction
 Correction of errors using an error-detecting code, requires that block of data
be retransmitted. But this solution is very difficult and highly resource
consumption.
 Instead, it would be desirable to enable the receiver to correct errors in an
incoming transmission on the basis of the bits in that transmission.

42
cont’d……
This block is passed through an FEC decoder, with one of four possible outcomes:
1. If there are no bit errors, the input to the FEC decoder is identical to the original
code word, and the decoder produces the original data block as output.
2. For certain error patterns, it is possible for the decoder to detect and correct
those errors. Thus, even though the incoming data block differs from the
transmitted code word, the FEC decoder is able to map this block into the original
data block.
3. For certain error patterns, the decoder can detect but not correct the errors. In
this case, the decode simply reports an uncorrectable error.
4. For certain, typically rare, error patterns, the decoder does not detect that any
errors have occurred and maps the incoming n-bit data block into a k-bit block that
differs from the original k-bit block.
There are a number of algorithms (like Hamming codes, Binary convolutional
codes, Reed-Solomon codes and Low-Density Parity Check codes) used in the
FEC decoder but these algorithms are out of the scope of this course. One of the
algorithm used to decode the data is block error-correcting code.
43
Error correction cont’d……
This error correction method are included under
automatic Report and request(ARQ).
1.Stop and wait (ARQ): The sender send a number of
data to the destination if some data send
acknowledgment to the source and some data is not
responding this technique stop and wait until the
receiver acknowledge for all data.
2. Go back ARQ : Resending n data which delivered or
not to destination due to one data is not delivered
correctly.
3. Selective reject: In this mothed only selective data
which are not reach the destination correctly are resend.
So redundant resend are avoided in this technique.

44
Next
Part II

45

You might also like