DCN Chapter 1 - Part 1
DCN Chapter 1 - Part 1
DCN Chapter 1 - Part 1
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
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
communication channel.
Bits will be reassembled at the destination
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
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.
the background.
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
receiver.
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
With this type of connection, each end of the connection transmits in turn.
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
In full-duplex mode, signals going in one direction share the capacity of the link: with
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
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
multiplexing.
data link.
23
Frequency-division Multiplexing
FDM is a signal transmission technology in which multiple signals
channel.
speeds.
networking technology.
frequencies.
25
Time-division multiplexing (TDM)
A multiplexing method for transmitting multiple data streams in a
as shown here:
A: A1, A2, A3,...
MUX(ABC) A1, B1, C1, A2, B2, C2, A3, B3, C3,...
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
30
occurs naturally on the line.
Detecting Errors
We need to build systems that are resilient to errors in data.
One way to cope with this is to detect errors and request that corrupted
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
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