7/27/2019 Data Communications Lecture 1: Netwoking
1/36
1
Data CommunicationsMITC 213 Data Communication and Networking
7/27/2019 Data Communications Lecture 1: Netwoking
2/36
2
Introduction
Moving data among computers involvemany different components andmethodologies
Goal of Data Communication:
To allow different hardware and OS tocommunicate and understand eachother
Transmission media have to meet certainhardware specifications
Software used to access the transmissionmedia must also conform to standards
7/27/2019 Data Communications Lecture 1: Netwoking
3/36
3
concerns the transmission of digitalmessages to devices external to themessage source
It is the aim of any communicationssystem to provide the highest possibletransmission rate at the lowest possiblepower and with the least possible noise.
Data Communications
7/27/2019 Data Communications Lecture 1: Netwoking
4/36
4
Communications Channels
Information sent through acommunications channel has a sourcefrom which the information originates, anda destination to which the information is
delivered, has no obvious physicalpresence.
In a digital communications channel, theinformation is represented by individualdata bits, which may be encapsulated intomultibit message units.
7/27/2019 Data Communications Lecture 1: Netwoking
5/36
5
Any communications channel has adirection associated with it
The message source is the transmitter,and the destination is the receiver.
Communications Channels
7/27/2019 Data Communications Lecture 1: Netwoking
6/36
6
Communications Channels
Transmitter Receiver
Simplex Channel
CHANNEL TYPES
Transmitter
Receiver
Receiver
TransmitterHalf-Duplex Channel
Transmitter
Receiver
Receiver
Transmitter
Full-Duplex Channel
7/27/2019 Data Communications Lecture 1: Netwoking
7/367
Simplex
A channel whose direction of transmissionis unchanging
For example, a radio station is a simplexchannel because it always transmits the
signal to its listeners and never allowsthem to transmit back.
7/27/2019 Data Communications Lecture 1: Netwoking
8/368
Half-Duplex
single physical channel in which thedirection may be reversed.
Messages may flow in two directions, butnever at the same time, in a half-duplex
system. In a telephone call, one party speaks while
the other listens. After a pause, the otherparty speaks and the first party listens.Speaking simultaneously results in garbledsound that cannot be understood.
7/27/2019 Data Communications Lecture 1: Netwoking
9/369
Full Duplex
allows simultaneous message exchange inboth directions.
It really consists of two simplex channels,a forward channel and a reverse channel,
linking the same points. The transmission rate of the reverse
channel may be slower if it is used only forflow control of the forward channel.
7/27/2019 Data Communications Lecture 1: Netwoking
10/3610
Data Transmission
the physical transfer of data over a point-to-point or point-to-multipointcommunication channel
Examples of such channels are copper
wires, optical fibers, wirelesscommunication channels, and storagemedia.
The data is often represented as anelectro-magnetic signal, such an electricalvoltage signal, a radiowave or microwavesignal or an infra-red signal.
7/27/2019 Data Communications Lecture 1: Netwoking
11/3611
Data Transmission
Serialized data is not generally sent at auniform rate through a channel
there is usually a burst of regularly spacedbinary data bits followed by a pause, afterwhich the data flow resumes.
timing information should be known by thereceiver to be synchronized with thetransmitter
Failure to remain synchronized throughouta transmission will cause data to becorrupted or lost
7/27/2019 Data Communications Lecture 1: Netwoking
12/36
12
Types of Transmission
Synchronous Transmission
Asynchronous Transmission
7/27/2019 Data Communications Lecture 1: Netwoking
13/36
13
Synchronous Transmission
separate channels are used to transmitdata and timing information.
The timing channel transmits clock pulsesto the receiver.
Upon receipt of a clock pulse, the receiverreads the data channel and latches the bitvalue found on the channel at thatmoment.
7/27/2019 Data Communications Lecture 1: Netwoking
14/36
14
The data channel is not read again untilthe next clock pulse arrives.
Because the transmitter originates boththe data and the timing pulses, the
receiver will read the data channel onlywhen told to do so by the transmitter (viathe clock pulse), and synchronization isguaranteed.
Synchronous Transmission
7/27/2019 Data Communications Lecture 1: Netwoking
15/36
15
Synchronous Transmission
uses start and stop bits to signify thebeginning bit ASCII character wouldactually be transmitted using 10 bits
e.g.: A "0100 0001" would become "1
0100 0001 0 The extra one (or zero depending on
parity bit) at the start and end of thetransmission tells the receiver first that acharacter is coming and secondly that thecharacter has ended.
7/27/2019 Data Communications Lecture 1: Netwoking
16/36
16
Asynchronous Transmission
a separate timing channel is not used.
The transmitter and receiver must bepreset in advance to an agreed-upon baudrate.
A very accurate local oscillator within thereceiver will then generate an internalclock signal that is equal to thetransmitter's within a fraction of a percent.
7/27/2019 Data Communications Lecture 1: Netwoking
17/36
17
uses no start and stop bits but insteadsynchronizes transmission speeds at boththe receiving and sending end of thetransmission using clock signals built into
each component. A continual stream of data is then sent
between the two nodes.
Due to there being no start and stop bitsthe data transfer rate is quicker althoughmore errors will occur
Asynchronous Transmission
7/27/2019 Data Communications Lecture 1: Netwoking
18/36
18
Error Detection and Correction
Error detection is the ability to detect thepresence of errors caused by noise orother impairments during transmissionfrom the transmitter to the receiver.
Error correction is the additional ability toreconstruct the original, error-free data.
7/27/2019 Data Communications Lecture 1: Netwoking
19/36
19
Error Checking Mechanisms
Even Parity
Checksum
Cyclic Redundancy Check
Hamming Code
7/27/2019 Data Communications Lecture 1: Netwoking
20/36
20
Even Parity
A parity bit is added to a data packet for
the purpose of error detection.
In the even-parity convention, the value ofthe parity bit is chosen so that the total
number of '1' digits in the combined dataplus parity packet is an even number.
Upon receipt of the packet, the parityneeded for the data is recomputed by local
hardware and compared to the parity bitreceived with the data. If any bit haschanged state, the parity will not match,and an error will have been detected.
7/27/2019 Data Communications Lecture 1: Netwoking
21/36
21
Even Parity Computation
Even Parity Computation
Data Parity Bit
10110001 1
10000110 0
7/27/2019 Data Communications Lecture 1: Netwoking
22/36
22
Example
A wants to transmit: 1001
A computes parity bit value: 1^0^0^1 = 0
A adds parity bit and sends: 10010
B receives: 10010
B computes parity: 1^0^0^1^0 = 0
B reports correct transmission afterobserving expected even result.
7/27/2019 Data Communications Lecture 1: Netwoking
23/36
23
Parity Bit
This mechanism enables the detection ofsingle bit errors, because if one bit getsflipped due to line noise, there will be anincorrect number of ones in the received
data. parity is used in many hardware
applications where an operation can berepeated in case of difficulty, or where
simply detecting the error is helpful.
7/27/2019 Data Communications Lecture 1: Netwoking
24/36
24
Checksum
the packets that constitute a message areadded arithmetically.
A checksum number is appended to thepacket sequence so that the sum of data
plus checksum is zero. If the sum is nonzero, an error has
occurred.
As long as the sum is zero, it is highlyunlikely (but not impossible) that any datahas been corrupted during transmission.
7/27/2019 Data Communications Lecture 1: Netwoking
25/36
25
Checksum Computation
Checksum Computation
10110001100001100100110011111111+10100000
001100100010001000101101111000000000Sum + Checksum = Zero
Data
Arithmetic Sum
Sum Truncated to 8 bitsChecksum
mod (256)
7/27/2019 Data Communications Lecture 1: Netwoking
26/36
26
Cyclic Redundancy Check (CRC)
an error-detecting code
a type of function that takes as input adata stream of any length, and producesas output a value of a certain space,
commonly a 32-bit integer A CRC can be used as a checksum to
detect alteration of data duringtransmission or storage.
7/27/2019 Data Communications Lecture 1: Netwoking
27/36
27
Take a binary message and convert it to apolynomial then divide it by anotherpredefined polynomial called the key.
The remainder from this division is the
CRC. Now transmit both the message andthe CRC.
Cyclic Redundancy Check (CRC)
7/27/2019 Data Communications Lecture 1: Netwoking
28/36
28
Cyclic Redundancy Check (CRC)
The recipient of the transmission does thesame operation (divides the message bythe same key) and compares his CRC withyours.
If they differ, the message must havebeen mangled. If, on the other hand, theyare equal, the odds are pretty good thatthe message went through uncorrupted.
7/27/2019 Data Communications Lecture 1: Netwoking
29/36
29
Hamming Code
a linear error-correcting code named afterits inventor, Richard Hamming.
Hamming codes can detect up to twosimultaneous bit errors, and correct
single-bit errors; thus, reliablecommunication is possible when theHamming distance between thetransmitted and received bit patterns is
less than or equal to one.
7/27/2019 Data Communications Lecture 1: Netwoking
30/36
30
Correcting Errors
Error detection
Positive acknowledgment
Packet passed error checking routine
Negative acknowledgment
Packet failed the error-checkingroutine
Retransmission
If receiver has not received thepacket within a certain period of time
Negative acknowledgment
7/27/2019 Data Communications Lecture 1: Netwoking
31/36
31
Flow Control
Managing the rate of data communication
Devices on a network do not talk and
listen at the same rates
Stop-and-Go or the Stop-and-Wait
Sliding Window
7/27/2019 Data Communications Lecture 1: Netwoking
32/36
32
Stop-and-Go or the Stop-and-Wait
The sender does not send any moreinformation until the receiver hasindicated that it is ready to accept thenext packet.
Very inefficient reduces the capacity ofthe network
7/27/2019 Data Communications Lecture 1: Netwoking
33/36
33
Sliding Window
Defines a window size the max amountof data the sender can transmit beforeacknowledgment must be sent
Size is agreed upon by both parties
Both the sender and receiver maintain afinite size buffer to hold outgoing andincoming packets from the other side.
7/27/2019 Data Communications Lecture 1: Netwoking
34/36
34
Every packet sent by the sender, must beacknowledged by the receiver. The sendermaintains a timer for every packet sent,and any packet unacknowledged in a
certain time, is resent. The sender may send a whole window of
packets before receiving anacknowledgement for the first packet in
the window.
Sliding Window
7/27/2019 Data Communications Lecture 1: Netwoking
35/36
35
Sliding Window
This results in higher transfer rates, as thesender may send multiple packets withoutwaiting for each packet'sacknowledgement.
The Receiver advertises a window sizethat tells the sender how much data it canreceive, in order for the sender not to fillup the receivers buffers.
7/27/2019 Data Communications Lecture 1: Netwoking
36/36
36
Any questions?