Summary

This document provides an introduction to data communication and computer networks, outlining fundamental concepts such as communication basics, components, and various techniques. It covers topics like data representation, transmission methods, and signal encoding.

Full Transcript

Data communication and computer networks (CoSc2032) Chapter One INTRODUCTION Main topics  Data Communication Basics  Transmission Medias  Introduction to Computer  Network Protocol Stacks Net...

Data communication and computer networks (CoSc2032) Chapter One INTRODUCTION Main topics  Data Communication Basics  Transmission Medias  Introduction to Computer  Network Protocol Stacks Networks Communication Basics  Data communications(Transmission) are the exchange of data between two devices via some form of transmission medium such as a wire cable.  Data communications (DC) is the process of using computing and communication technologies to transfer data from one place to another.  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). Figure 1.components of data communication Five components of data communication 1. Message: is the information (data) to be 4.Transmission medium: is the physical path by which a communicated. Popular forms of information message travels from sender to receiver. Some examples of include text, numbers, pictures, audio, and video. transmission media include twisted-pair wire, coaxial cable, fiberoptic cable, and radio waves. 2. Sender: is the device that sends the data message. It can be a computer, workstation, telephone 5.Protocol: is a set of rules that govern data handset, video camera, and so on. communications. It represents an agreement between the 3. Receiver: is the device that receives the message. communicating devices. Without a protocol, two devices It can be a computer, workstation, telephone may be connected but not communicating, just as a person handset, television, and so on. speaking French cannot be understood by a person who speaks only Japanese. Serial vs. parallel communications Parallel communication VS Serial communication More expensive Less expensive Needs N wires to transfer N bits Needs minimum of one wire to of data transfer all bits Harder and more expensive to Easier to implement implement. Most used for short distance Better for long distance communication communication Transfer more data at a time Slow data transmission speed Easier to analyze harder to analyze Cross talk is more problem Less cross talk Interference 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. 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. Description of data representation Technique Analog Signal Digital signal Continuous wave that carries information by altering the  Discrete on-off pluses that carry covey information in characteristics of waves terms of 0s and 1s just like CPU Analog signal has infinitely many levels of intensity over  It counts but not measures a period of time  Discrete pluses of data transmission rather than It measures rather than counts continues wave Example : Voice and all sounds are analog, traveling to  More prevalent in computer based devices human ears in the forms of waves.  Require repeater Require amplifier 8 Data transmission Formats Analog transmission is a means of transmitting analog Digital transmission, a digital signal can be transmitted only a limited distance before attenuation, noise, and other impairments endanger the integrity. signals without regard to their content; the signals may  To achieve greater distances, repeaters are used. A repeater receives the digital signal, recovers the pattern of 1s and 0s, represent analog or digital data. and retransmits a new signal. Thus the attenuation is overcome.   The question naturally arises as to which is the preferred In either case, the analog signal will become weaker method of transmission. Both telecommunications facilities and intra-building services have moved to digital (attenuate) after a certain distance. To achieve transmission and, where possible, digital signaling techniques. longer distances, the analog transmission system  The most important reasons are the following:  Digital technology includes amplifiers that boost the energy in the  Data integrity  Capacity utilization signal. 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), - (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 modulation (FM), & phase modulation (PM). 10 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 11 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 12 Delay distortion Distortion is any change in a signal that alters the basic waveform or the relationship between various frequency components; it is usually a degradation of the signal. Delay Distortion: is a guided transmission media phenomenon that occurs when signal velocity(speed) and frequency vary.  For a band-limited signal, the velocity tends to be highest near the center frequency and fall off toward the two edges of the band.  Thus various frequency components of a signal will arrive at the receiver at different times, resulting in phase shifts between the different frequencies.  Delay distortion is particularly critical for digital data. Equalizing techniques can also be used for delay distortion. 13 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. 14 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...). 15 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 for each direction. 16 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.  The capacity of the channel, however, must be divided between the two directions. 17 Contd. 18 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 multiplexer. The multiplexer is connected by a single 19 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 output lines. 20 Types of Multiplexing 1. Frequency-division multiplexing (FDM) 2. Time-division multiplexing (TDM) 3. Code division multiplexing(CDM) 21 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. 22 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 23 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 DE multiplexed at the destination location.  The segments can be created by the multiplexer itself or can be inherent in 24 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. 25 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). 26 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 occurs naturally on the line. 28 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. 29 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. 30 Parity Both the sender and receiver must know which form of parity to use. AOdd Parity: such character 01100010 (There as 0110001 are an would beodd number of as: transmitted 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. 31 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.  One error in the wrong place can turn an ‘A’ into a ‘C’. 32 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. 33 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. 34 Later errors can easily hide earlier 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 Cont’d….. Example: Consider a header that consists of 10 octets, with the checksum in the last two octets (this does not correspond to any actual header format) with the following content (in hexadecimal): 00 01 F2 03 F4 F5 F6 F7 00 00 37 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. 38 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. 39 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. 41 Error correction 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. 42 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. 43 Next Part II 44

Use Quizgecko on...
Browser
Browser