Published on

This presentation is for students of NICE Balangir to help them cover their CCN course. It cannot be called complete but I have made all efforts to make it simple and easy to understand. For suggestions please mail me at

Published in: Education, Technology, Business
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. CCN TCP/IP
  2. 2. SIGNALS
  3. 3. TYPES OF SIGNALS <ul><li>ANALOG </li></ul><ul><li>DIGITAL </li></ul><ul><li>PERIODIC </li></ul><ul><li>NONPERIODIC </li></ul>
  4. 4. ANALOG SIGNALS <ul><li>An  Analog  or  analogue signal  is any continuous signal for which the time varying feature (variable) of the signal is a representation of some other time varying quantity </li></ul>
  5. 5. PERIODIC <ul><li>A signal is periodic if it repeats itself after a fixed period T. </li></ul>
  6. 6. NON-PERIODIC SIGNAL <ul><li>A signal is periodic if it does not repeats itself after a fixed period T. </li></ul>
  9. 10. FREQUENCY <ul><li>The number of cycles per unit of time is called the  frequency . For convenience, frequency is most often measured in  cycles per second (cps) or the interchangeable  Hertz (Hz)  (60 cps = 60 Hz), named after the 19th C. physicist. 1000 Hz is often referred to as 1 kHz (kilohertz) or simply '1k' in studio parlance. </li></ul>
  10. 12. TIME PERIOD <ul><li>The time taken to complete one cycle by a wave. </li></ul><ul><ul><ul><li>T= 1/f </li></ul></ul></ul>
  11. 13. <ul><li>Amplitude  is the magnitude of change in the oscillating variable, with each oscillation, within an oscillating system.  </li></ul>
  12. 14. WAVELENGHT <ul><li>The distance between peaks (high points) is called wavelength. </li></ul>
  13. 16. PHASE <ul><li>  Phase is a term used to describe the position of one sound wave relative to another sound wave, Two identical waves are 'in-phase' when the crests and troughs of the waves meet and are 'out-of-phase' when the crests of one wave meets the trough of another wave. </li></ul>
  14. 19. TIME AND FREQUENCY DOMAIN <ul><li>A time-domain graph shows how a signal changes over time, whereas a frequency-domain graph shows how much of the signal lies within each given frequency band over a range of frequencies </li></ul>
  15. 21. COMPOSITE SIGNAL <ul><li>A signal that is made up of signals of more than one frequency. </li></ul>
  16. 23. BAND WIDTH <ul><li>  Bandwidth is the width of the range (or band) of frequencies that an electronic signal uses on a given transmission medium. In this usage, bandwidth is expressed in terms of the difference between the highest-frequency signal component and the lowest-frequency signal component. </li></ul>
  17. 25. DIGITAL SIGNALS <ul><li>Digital signal is a form of signal that has got discreet states. i.e it can take only some specified values and not the intermediate ones. </li></ul>
  20. 28. BIT RATE <ul><li>In digital telecommunication, the bit rate is the number of bits that pass a given point in a telecommunication network in a given amount of time, usually a second. Thus, a bit rate is usually measured in some multiple of bits per second - for example, kilobits, or thousands of bits per second (Kbps). The term  bit rate  is a synonym for data transfer rate (or simply  data rate ). back </li></ul>
  21. 29. BIT DURATION <ul><li>The time taken to transmit one bit of data. </li></ul>
  22. 30. BIT LENGHT <ul><li>The distance that one bit occupies in a transmission medium. </li></ul><ul><ul><ul><li>Bit Length= bit duration x speed </li></ul></ul></ul>
  23. 31. CHANNELS <ul><li>It is the medium through which the signal passes. More exactly it the precise specification of the medium through which a signal would be transmitted. </li></ul><ul><li>Types:- </li></ul><ul><li>High pass. </li></ul><ul><li>Low pass. </li></ul><ul><li>Band pass. </li></ul>
  24. 32. High Pass Channel
  25. 33. Low Pass Channel
  26. 34. Band Pass Channel
  28. 37. DIGITAL COMMUNICATION <ul><li>1) BASE BAND </li></ul><ul><li>2) BROADBAND </li></ul>
  29. 38. BASEBAND <ul><li>The digital signal is transmitted over a low pass channel without converting it into analog signal. </li></ul><ul><li>This type of transmission is required when we have a low pass band with a very high bandwidth. </li></ul>
  30. 39. BROADBAND <ul><li>The digital signal is transmitted over a band-pass channel only after converting it into analog form. </li></ul><ul><li>When the available channel is band pass then we cannot transmit the digital signal directly. We have to then transform it into anolog format. </li></ul><ul><li>The transformation of a digital signal to analog is called modulation and the reverse process is called de modulation. </li></ul>
  31. 40. FEATURES OF DIGITAL TRANSMISSION. <ul><li>Advantages : </li></ul><ul><li>  Less expensive </li></ul><ul><li>More reliable </li></ul><ul><li>Easy to manipulate </li></ul><ul><li>Flexible </li></ul><ul><li>Compatibility with other digital systems </li></ul><ul><li>Only digitized information can be transported through a noisy channel without degradation </li></ul>
  32. 41. <ul><li>Disadvantages : </li></ul><ul><li>Sampling Error </li></ul><ul><li>Digital communications require greater bandwidth than analogue to transmit the same information. </li></ul><ul><li>The detection of digital signals requires the communications system to be synchronized, whereas generally speaking this is not the case with analogue systems. </li></ul>
  33. 42. FEATURES OF ANALOG <ul><li>Advantages: </li></ul><ul><li>Uses less bandwidth </li></ul><ul><li>More accurate </li></ul><ul><li>Disadvantages: </li></ul><ul><li>The effects of random noise can make signal loss and distortion impossible to recover </li></ul>
  34. 43. WHEN TO USE WHAT? <ul><li>For now we can say that we can use digital transmission when the available channel is having a band width of a range starting from zero to infinity or at least a very high value. </li></ul><ul><li>But if we have a band pass channel then we have to use analog transmission. </li></ul>
  35. 44. TRANSMISSION IMPAIRMENT <ul><li>The signal does not reach the receiver in the desired shape. i.e what is not is not received. </li></ul><ul><ul><ul><ul><li> TRANSMISSION IMPAIRMENT </li></ul></ul></ul></ul>Attenuation Distortion Noise
  36. 45. Attenuation <ul><li>It is the gradual loss in intensity of any kind of signal through a medium. </li></ul>
  37. 46. Signal After Attenuation
  38. 47. Distortion <ul><li>The signal changes its shape. It normally happens in composite signals where the different signals get out of phase. </li></ul>
  39. 50. Noise <ul><li>Unwanted impurities added to signal. </li></ul><ul><li>Several types of noise like thermal noise, induced noise, cross talk, magnetic noise etc can corrupt a signal. </li></ul>
  40. 52. DIGITAL TRANSMISSION <ul><li>Schemes and techniques that can be used to transmit digital signal over a medium. </li></ul><ul><ul><li>Line coding (conversion of binary to digital signals) </li></ul></ul><ul><ul><li>How to increase the efficiency of line coding. </li></ul></ul><ul><ul><li>Sampling (i.e. analog to binary conversion) </li></ul></ul><ul><ul><li>Serial and Parallel transmission. </li></ul></ul>
  41. 53. LINE CODING <ul><li>It is the process of converting the binary bits into digital signals. Every data in a computer is stored in the form combination of 1s and 0s. These combinations are transmitted through a medium by representing each bit by a specific voltage. This is done through line coding. </li></ul>
  42. 55. Signal Level Vs Data Level <ul><li>A digital signal can have only some specifies values. Hence there are only some particular levels available for the signal. This number of available signal levels is called ‘signal level’. </li></ul><ul><li>It happens that only some signal levels are used to carry data and the rest to carry other information. The number of signal levels that are used to carry data are called ‘data levels’. </li></ul>
  43. 56. <ul><li>A pulse it the minimum amount of time required to transmit a symbol. Pulse rate means the number of pulses transmitted per second. If the pulse carries one bit then pulse rate is equal to bit rate. If it is more than one bit then the pulse rate is more than bit rate. We use the following formula to relate bit rate and pulse rate. </li></ul><ul><ul><li>Bitrate= Pulserate x log 2 L </li></ul></ul>
  44. 57. Self Synchronization <ul><li>To enable correct communication the receiver's as well as the sender’s clocks must work together. If there will be a mismatch then it may result in a change of the signal. Therefore it is desirable if the signal itself carries synchronizing information hence avoiding clock pulse mismatch. </li></ul>
  45. 58. <ul><li>Here the sender sends 10110001. but the receiver gets 110111000011. </li></ul>
  46. 59. Line coding Schemes
  47. 60. Unipolar <ul><li>It uses only one voltage level to represent the bits. i.e. a binary 0 is represented by zero voltage and a binary 1 is represented by some positive voltage. </li></ul>
  48. 62. Polar <ul><li>It uses two voltage levels to represent 1 and 0. normally a +ve voltage is used to represent 1 and a –ve voltage for 0. </li></ul><ul><li>There are four major types of polar encoding. </li></ul>
  49. 64. NRZ (Non Return to Zero) <ul><li>Here the signal is always either +ve or –ve but never zero. There are two popular NRZ schemes. </li></ul><ul><ul><li>NRZ-L </li></ul></ul><ul><ul><li>NRZ-I </li></ul></ul>
  50. 65. NRZ - L <ul><li>Here a positive voltage is used to represent 1 and a –ve one to represent 0. </li></ul><ul><li>But here a problem can arise when there is a continuous sequence of 1s or 0s. The receiver receives a continuous series of voltage and determines the number of bits received by relying on its clock which might not be synchronized. </li></ul>
  51. 66. NRZ-I <ul><li>Here the same two levels are used but with a different approach. Here the voltage changes whenever an 1 is encountered and doesn't change with the encounter of a 0. </li></ul><ul><li>Because of this transition in voltage the receiver can easily understand the arrival of 1s and hence can synchronize it’s clock. </li></ul>
  52. 68. RZ (Return to Zero) <ul><li>Here the signal comes down tom zero level during the transmission of a bit. Here a positive to zero level transition represents 1 and a –ve to zero transition represents 0. </li></ul><ul><li>This approach is more efficient than NRZ because here both the bits and the synchronization is represented by the voltage transitions. </li></ul>
  53. 70. <ul><li>The major disadvantage of this scheme is that it requires two signal changes per bit and hence requires more band width. </li></ul>
  54. 71. MANCHESTER <ul><li>Here like RZ the bits are represented using the transition of voltages but with only two levels. A –ve to +ve transition is used to represent 1 and a +ve to –ve transition is used to represent 0. </li></ul>
  55. 73. Differential Manchester <ul><li>A '1' bit is indicated by making the first half of the signal equal to the last half of the previous bit's signal i.e. no transition at the start of the bit-time. A '0' bit is indicated by making the first half of the signal opposite to the last half of the previous bit's signal i.e. a zero bit is indicated by a transition at the beginning of the bit-time. In the middle of the bit-time there is always a transition, whether from high to low, or low to high. </li></ul>
  56. 75. BIPOLAR <ul><li>Bipolar like RZ uses three voltage levels. But here zero voltage is used to represent 0 and the positive and –ve voltages are used to represent 1. </li></ul><ul><li>The most popular Bipolar encoding schemes are:- </li></ul><ul><ul><li>AMI </li></ul></ul><ul><ul><li>2B1Q </li></ul></ul><ul><ul><li>MLT-3 </li></ul></ul>
  57. 76. AMI (Alternate Mark Inversion) <ul><li>In this scheme a 0 is represented by no voltage and 1 is represented by a +ve or –ve voltage. I.e if the first 1 is represented by a +ve voltage then the next 1 will be represented by a –ve voltage. </li></ul>
  58. 78. 2B1Q <ul><li>This encoding scheme is similar to NRZ-L but it has four voltage levels hence two bits can be represented by each pulse. </li></ul>
  59. 80. MLT-3 <ul><li>It is very similar to NRZ-I with the difference that it has three voltage levels. </li></ul>
  60. 82. BLOCK CODING <ul><li>To improve the performance of line coding block coding was introduced. Block coding to some extent provides the ability to improve synchronization and error detection but with a trade in increased redundancy. </li></ul><ul><li>There are three steps in block coding: </li></ul><ul><ul><li>Division </li></ul></ul><ul><ul><li>Substitution </li></ul></ul><ul><ul><li>Line coding </li></ul></ul>
  61. 83. DIVISION <ul><li>In this step the sequence of bits to be transmitted is divided into a series of equal size groups of m bits. </li></ul>
  62. 84. SUBSTITUTION <ul><li>In this phase we substitute the m bit bocks by n bit codes. With normally n>m. For example in 4B/5B encoding m=4 and n=5 . </li></ul><ul><li>Here we can see that there are more codes available than reqiured. Hence we have the freedom to chose only those codes to represent our blocks that we find most easy to transmit. </li></ul>
  63. 85. LINE CODING <ul><li>After substitution the coded bits are transformed into signals using any of the line coding schemes. </li></ul>
  64. 86. <ul><li>Some common block codes are:- </li></ul><ul><ul><li>4B/5B </li></ul></ul><ul><ul><li>8B/10B </li></ul></ul><ul><ul><li>8B/6T </li></ul></ul>
  65. 87. SAMPLING <ul><li>In signal processing,  sampling  is the reduction of a continuous signal to a discrete signal. </li></ul><ul><li>Here the signal is measured in equal intervals of time and the measurement is noted down and later on is used to form a digital signal. </li></ul>
  66. 89. SAMPLE NUMBER AMPLITUDE 1 2.5 2 5 3 4 4 2.7 5 3 6 4 7 2.5 8 0.5 9 -2.3 10 -4.6 11 -5 12 -4 13 -1.7
  67. 90. Quantization <ul><li>Quantization refers to the process of approximating the continuous set of values in the data with a finite (preferably small) set of values. </li></ul>
  68. 91. SAMPLE NUMBER AMPLITUDE QUANTIZED VALUES QUANTIZATION ERROR 1 2.5 2.5 0 2 5 5 0 3 4 4 0 4 2.7 3 +0.3 5 3 3 0 6 4 4 0 7 2.5 2.5 0 8 0.5 1 +0.5 9 -2.3 -2 +0.3 10 -4.6 -5 -0.4 11 -5 -5 0 12 -4 -4 0 13 -1.7 -2 -0.3
  69. 92. Quantized Digital Signal
  71. 94. PARALLEL TRANSMISSION <ul><li>In parallel transmission, multiple  bits  (usually 8 bits or a byte/character) are sent simultaneously on different channels (wires, frequency channels) within the same cable, or radio path, and  synchronized  to a clock. </li></ul><ul><li>As a result, there is a speedup in parallel transmission bit rate over serial transmission bit rate. However, this speedup is a tradeoff versus cost. </li></ul>
  72. 96. SERIAL TRANSMISSION <ul><li>In serial transmission, bits are sent  sequentially  on the same channel (wire) which reduces costs for wire but also slows the speed of transmission. Also, for serial transmission, some overhead time is needed since bits must be assembled and sent as a unit and then disassembled at the receiver. </li></ul><ul><li>Serial transmission can be either synchronous or  asynchronous .  </li></ul>
  73. 98. <ul><li>Asynchronous transmission  uses start and stop bits to signify the beginning bit ASCII character would actually be transmitted using 10 bits e.g.: A &quot;0100 0001&quot; would become &quot; 1  0100 0001  0 &quot;. The extra one (or zero depending on parity bit) at the start and end of the transmission tells the receiver first that a character is coming and secondly that the character has ended. This method of transmission is used when data are sent intermittently as opposed to in a solid stream. The start and stop bits must be of opposite polarity. This allows the receiver to recognize when the second packet of information is being sent. </li></ul>
  74. 100. <ul><li>Synchronous transmission  uses no start and stop bits but instead synchronizes transmission speeds at both the receiving and sending end of the transmission 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 bits the data transfer rate is quicker although more errors will occur, as the clocks will eventually get out of sync, and the receiving device would have the wrong time that had been agreed in protocol for sending/receiving data, so some bytes could become corrupted (by losing bits). Ways to get around this problem include re-synchronization of the clocks and use of check digits to ensure the byte is correctly interpreted and received. </li></ul>
  75. 102. CHAPTER 5 <ul><li>ANALOG TRASNMISSION </li></ul>
  76. 103. We know that… <ul><li>Digital transmission requires a low pass channel. </li></ul><ul><li>Analog transmission requires a band pass channel. </li></ul><ul><li>Digital transmission is more efficient but we cannot always have digital transmission. </li></ul>
  77. 104. We will further discuss… <ul><li>The exact definition of modulation. </li></ul><ul><li>Modulation of binary data. </li></ul><ul><li>Modulation of analog signals. </li></ul>
  78. 105. Modulation <ul><li>The process of varying some characteristic of a periodic wave with an external signals. </li></ul><ul><li>Modulation is utilized to send an information bearing signal over long distances. </li></ul><ul><li>Types of Modulation </li></ul><ul><ul><li>Amplitude Modulation </li></ul></ul><ul><ul><li>Frequency Modulation </li></ul></ul><ul><ul><li>Phase Modulation </li></ul></ul>
  79. 106. Digital modulation <ul><li>It is the process of changing some characteristics of an analog signal based on the information from some digital signal. </li></ul><ul><li>In simple terms it is just like translating the information from digital format to analog format. Just like a story or article is translated from one language to another language. </li></ul>
  80. 107. Why is it needed? <ul><li>Digital transmission even though is efficient still it has some limitations. Hence we need to employ analog transmission. </li></ul><ul><li>For example two computers connected via a telephone line. Here the computers generate digital signals that cannot be transmitted over a telephone line that is designed to transmit analog signals. Hence modulation is required. </li></ul>
  81. 108. Techniques for digital modulation
  82. 109. Bit Rate Vs Baud Rate <ul><li>Bit Rate </li></ul><ul><li>Baud Rate is the number of signal units per second required to transmit these bits. </li></ul><ul><li>The actual definition of baud rate is the number of times per second a signal in a communications channel changes. </li></ul><ul><li>Bit rate= baud rate x no of bits per second </li></ul>
  83. 111. Carrier signal <ul><li>A carrier signal is a transmitted wave at a steady base frequency of alternation on which information can be imposed by increasing signal strength, varying the base frequency, varying the wave phase, or other means. This variation is called modulation </li></ul>
  84. 112. Amplitude-shift keying <ul><li>It is a form of modulation that represents digital data as variations in the amplitude of a carrier wave. </li></ul><ul><li>The amplitude of an analog carrier signal varies in accordance with the bit stream (modulating signal), keeping frequency and phase constant. The level of amplitude can be used to represent binary logic 0s and 1s. </li></ul>
  85. 114. Frequency-shift keying <ul><li>It is a frequency modulation scheme in which digital information is transmitted through discrete frequency changes of a carrier wave. </li></ul>
  86. 116. Phase-shift keying <ul><li>Phase-shift keying (PSK) is a method of digital communication in which the phase of a transmitted signal is varied to convey information. </li></ul>
  87. 118. <ul><li>It is a technique that combines both ASK and PSK to get more efficient modulation. </li></ul>
  88. 120. <ul><li>ANALOG SIGNAL MODULATION </li></ul>
  89. 122. Amplitude modulation <ul><li>The process or result of the process whereby the amplitude of a carrier wave is changed in accordance with a modulating wave. This means using sinusoidal carriers, pulse carriers, or any other form of carrier, the amplitude factor of which changes in accordance with the modulating wave in any unique manner. </li></ul><ul><li>Here the band width of the modulated signal is twice that of the modulating signal. </li></ul>
  90. 125. Frequency Modulation <ul><li>It conveys information over a carrier wave by varying its frequency. In analog applications, the instantaneous frequency of the carrier is directly proportional to the instantaneous value of the input signal. </li></ul><ul><li>Here the band width of the modulated signal is ten times that of the modulating signal. </li></ul>
  91. 127. Phase modulation <ul><li>It is a form of modulation that represents information as variations in the instantaneous phase of a carrier wave. </li></ul><ul><li>PM is not very widely used for radio transmissions. This is because it tends to require more complex receiving hardware and there can be ambiguity problems in determining whether, for example, the signal has changed phase by +180° or -180°. PM is used, however, in digital music synthesizers </li></ul>
  92. 129. CHAPTER 6 <ul><li>MULTIPLEXING </li></ul>
  93. 130. <ul><li>Multiplexing is sending multiple signals or streams of information on a carrier at the same time in the form of a single, complex signal and then recovering the separate signals at the receiving end. </li></ul><ul><li>The process of recovering the signals at the receiver’s end includes the separation of the different signals and is called Demultiplexing . </li></ul>
  94. 131. Why is it required? <ul><li>Many times it happens that the available bandwidth is much more than that required to carry all the signals to be transmitted and hence can be shared between multiple devices to carry multiple signals. This allows us to make parallel transmission of signals in a cost effective manner. </li></ul>
  95. 133. FDM <ul><li>It a technique that is used for multiplexing of analog signals in terms of their frequencies. Here the prerequisite is that the available band width should be more than that of the combined frequencies of all the signals. </li></ul>
  96. 134. Guard bands <ul><li>When FDM is done then there is a gap of frequency that is kept between two consecutive frequency signals. This gap is called the guard band and is maintained to ensure least inter-signal interference. </li></ul>
  97. 135. Total channel width= 42 KHz Total Signal Width= 37 KHz 1 st Signal (10 KHz) Guard Band (2 KHz) 2 nd Signal (20 KHz) Guard Band (3 KHz) 3 rd Signal (7 KHz)
  98. 136. Step 1 (Multiplexing):- <ul><li>In this process we take the signals generated by all the devices in view and then frequency modulate each signal individually into different frequencies. </li></ul><ul><li>Then the modulated signals are often combined to form a composite signal and are transmitted. Otherwise in some cases they are also transmitted as it is. </li></ul>
  99. 140. Uses <ul><li>FDM finds applications in several communication systems like telephony systems, cellular systems, radio broadcast etc. </li></ul><ul><li>The most wide and appealing application of FDM is the analog hierarchy that is used in case of telephone communication systems. </li></ul>
  100. 141. Analog Hierarchy <ul><li>Here multiplexing is done in several stages to obtain higher band widths from lower band widths. </li></ul><ul><li>Some channels are multiplexed to form a group. A fixed number of groups are multiplexed to form a super-group. A fixed number of super groups then form a master group which are again multiplexed to form a jumbo-group. </li></ul>
  101. 143. WDM <ul><li>It is a technology which multiplexes </li></ul><ul><li>Multiple  optical carrier signals on a single optical fiber by using </li></ul><ul><li>different wavelengths (colours) of laser light to carry different signals. This allows for a multiplication in capacity, in addition to enabling bidirectional communications over one strand of fiber. This is a form of frequency division multiplexing (FDM) but is commonly called wavelength division multiplexing. </li></ul>
  102. 145. TDM <ul><li>Time-division multiplexing (TDM) is a method of putting multiple data streams in a single signal by separating the signal into many segments, each having a very short duration. Each individual data stream is reassembled at the receiving end based on the timing. </li></ul>
  103. 148. The Process of TDM <ul><li>The data flow of each connection is divided into a number of equal length units. </li></ul><ul><li>One unit of each connection is combined to form a frame. </li></ul><ul><li>For ‘n’ connections a frame is divided into ‘n’ slots. </li></ul><ul><li>If the data rate of every connection is ‘r’ and there are ‘n’ connections then the data rate of the link should be equal to ‘n x r’. </li></ul>
  104. 149. Inerleaving <ul><li>It is the process with the help of which TDM works. </li></ul><ul><li>We can visualize the entire TDM setup as a combination of two switches that work synchronized but in opposite directions. </li></ul>
  105. 151. <ul><li>On the multiplexing side when the switch is open for a connection then the connection sends data, and at the same time the de-multiplexing side also opens it’s switch for the corresponding connection. </li></ul><ul><li>This process is called interleaving. </li></ul><ul><li>Here synchronization of the switch is very important because without it the entire setup would run into errors. </li></ul>
  106. 152. Framing bits <ul><li>To ensure synchronization an extra bit called ‘framing bit’ is often added to the frames. </li></ul>
  107. 154. Bit Padding <ul><li>When we are connecting devices with different time rates then different connections take different time slots. </li></ul><ul><li>For example let us consider a frame consisting of ‘6’ time slots and connecting ‘3’ devices ‘a’, ‘b’ and ‘c’. </li></ul><ul><li>Let the data rate of ‘a’ be thrice that of ‘c’ and the data rate of ‘b’ be twice that of ‘c’. </li></ul>
  108. 155. <ul><li>Then we have to allocate three slots to ‘a’, two slots to ‘b’ and one slot to ‘c’. </li></ul>
  109. 156. <ul><li>Now let us assume that in the previous case the data rate of ‘a’ is 2.5 times that of ‘c’. </li></ul><ul><li>Then it is not possible to allocate ‘a’ with 2.5 time slots. Therefore we have to change this 2.5 into 3. </li></ul><ul><li>This we can do by attaching some extra bits to it. This process is called bit padding </li></ul>
  110. 157. <ul><li>Hence we can conclude that bit padding is the process of attaching extra bits to a data unit to make it an integer. </li></ul>
  111. 158. Uses of TDM <ul><li>TDM is used by telephone companies through a hierarchy of digital signals called ‘Digital Signal Service’ </li></ul>
  112. 160. T-Lines <ul><li>To employ DSS at it’s various levels telephone companies use lines called ‘T-Lines’. </li></ul><ul><li>There are four types of T-Lines, ranging from T-1 to T-4. </li></ul><ul><li>Each type of line is used to carry signals at a specific level of the DSS. </li></ul><ul><li>In Europe there is a similar set of lines used called E-Lines </li></ul>
  113. 162. CHAPTER 8 <ul><li>CIRCUIT SWITCHING </li></ul>
  114. 163. Switching <ul><li>It is the process of establishing a connection between two communicating devices. </li></ul><ul><li>Such connections are normally temporary and are established only when required and are broken after the communication is over. </li></ul>
  115. 164. Why do we need switching? <ul><li>When we want to connect multiple devices then the easiest option is to connect them in a mesh topology. </li></ul><ul><li>But this technique is very expensive and impractical when we want to connect a large number of devices. </li></ul><ul><li>It is impractical because a mesh provides a dedicate link between every device and every other device which is always not required. </li></ul>
  116. 165. <ul><li>Because seldom it happens that every device wants to communicate at the same time to every device. </li></ul><ul><li>Hence it is better to employ a technique that provides us with the reusability of the connection. i.e the same physical link can be used for communication between many devices in a shared manner. </li></ul><ul><li>To obtain this we require switching. </li></ul>
  117. 166. Types of switching <ul><li>There are three main types of switching: </li></ul><ul><li>1) Circuit Switching </li></ul><ul><li>2) Packet switching </li></ul><ul><li>3) Message switching </li></ul>
  118. 167. Circuit switching <ul><li>It creates a direct physical connection between two devices. </li></ul>
  119. 169. <ul><li>Hence a circuit switch is a device that establishes a connection between ‘n’ input and ‘m’ output devices. </li></ul><ul><li>The number of devices on the input and out put side do not need to be the same. </li></ul>
  120. 170. Types of Circuit switching <ul><li>There are two types of circuit switching. </li></ul><ul><li>Space-Division switch </li></ul><ul><li>Time-Division switch </li></ul>
  121. 171. Space-Division switch <ul><li>Here the paths in the circuit are separated from each other spatially. i.e they are physically separate from each other. </li></ul><ul><li>In other words no two devices can have the same path of communication. </li></ul>
  122. 172. Types of Space-Division Switching <ul><li>1) Crossbar switch </li></ul><ul><li>2) Multistage switch </li></ul>
  123. 173. Crossbar switch <ul><li>It is a switch that connects ‘n’ inputs to ‘m’ outputs in the form of a grid of connections in a matrix manner. </li></ul>
  124. 175. <ul><li>The points of intersection of the links are called cross-points. </li></ul><ul><li>Each cross-point has a very miniature switch that opens or closes according to requirement. </li></ul><ul><li>Hence if there are ‘m’ inputs and ‘n’ outputs then we require ‘mxn’ number of crosspoints with switches. </li></ul>
  125. 176. Advantages <ul><li>A major advantage of cross-bar switching is that, as the traffic between any two devices increases, it does not affect traffic between other devices. </li></ul><ul><li>  In addition to offering more flexibility, a cross-bar switch environment offers greater scalability than a bus environment. </li></ul>
  126. 177. Disadvantages <ul><li>One of the disadvantages of the crossbar switch is that an excessive number of cross-points (M. times. N) are required to implement a large space switch. </li></ul><ul><li>One more disadvantage is that, statistics show that at any point of time there are less than 25% of active cross-points and the rest are idle and hence are useless. </li></ul>
  127. 178. Multistage switch <ul><li>A multistage switch overcomes the limitations of crossbar switches by combing a number of crossbar switches. </li></ul><ul><li>In multistage switches the devices are connected to switches which in turn are connected to other switches. </li></ul><ul><li>The output of every device in any stage should be connected to the inputs of every device of the next stage. </li></ul>
  128. 180. <ul><li>Suppose we want to connect 15 input connections to 15 output connections. </li></ul><ul><li>Then by using a single grid of crossbar switch we need to have 225 (15x15) cross-points. </li></ul><ul><li>Now let us make the same connection using three level multistage switches. </li></ul><ul><li>Hence in the first we have three switches each having ‘5’ inputs and ‘2’ outputs. </li></ul><ul><li>Hence each of the three switches in the first layer has ’10’ cross-points. And hence there are ‘30’ cross-points in the entire stage. </li></ul>
  129. 181. <ul><li>Similarly the second stage switches have ‘18’ cross points. </li></ul><ul><li>The third stage switches have again ‘30’ cross-points. </li></ul><ul><li>Hence the total number of cross-points required are ‘30+18+30’=‘78’. </li></ul><ul><li>Hence here we can see that the connection that took ‘255’ cross-points using a single crossbar switch can be established with only ‘78’ cross-points using ‘multistage’ switch. </li></ul><ul><li>One more advantage of multistage switch is, it provides us with multiple paths between two devices </li></ul>
  130. 182. Blocking <ul><li>The employment of multistage switches reduces costs substantially but this comes with a price. </li></ul><ul><li>In such a design we very often face a problem called blocking at the times of heavy traffic. </li></ul><ul><li>Blocking is the situation when an input cannot be connected to an output because all the possible paths are occupied by other connections. </li></ul>
  131. 183. Time division switch <ul><li>It employs TDM for switching. </li></ul><ul><li>There are two types of TDS: </li></ul><ul><ul><li>Time –Slot interchange </li></ul></ul><ul><ul><li>TDM Bus </li></ul></ul>
  132. 184. Time –Slot interchange <ul><li>Let us assume that we want to connect ‘4’ input devices to ‘4’ output devices. </li></ul><ul><li>Let the devices be connected in the following order. </li></ul><ul><li>1 3 </li></ul><ul><li>2 4 </li></ul><ul><li>3 1 </li></ul><ul><li>4 2 </li></ul>
  133. 185. <ul><li>Then just TDM will not work because TDM will connect the devices sequentially. </li></ul><ul><li>Therefore we need to use a ‘time slot interchanger’ (TSI). </li></ul><ul><li>The work of a ‘TSI’ is to rearrange the slots in such a manner that every device will receive it’s data irrespective of it’s order. </li></ul>
  134. 187. Working of TSI <ul><li>TSI works with the help of two different switches (one sequential and the other one selective) and a dynamic memory (RAM). </li></ul><ul><li>The RAM is connected to the input with the sequential switch and to the output with the selective switch. </li></ul><ul><li>Data comes to the RAM in a sequential manner and gets stored there. </li></ul><ul><li>Then the selective switch closes according to the requirement and the data from the RAM gets transferred to the receiver devices. </li></ul>
  135. 189. TDM Bus <ul><li>It is a very simple technique where all the input lines are connected to all the output lines using a shared connection. </li></ul><ul><li>Each i/p and o/p line has a switch to turn it on or off. </li></ul><ul><li>At any point of time only one pair of i/p and o/p are closed so that the devices can communicate. </li></ul>
  136. 191. <ul><li>Advantage :- </li></ul><ul><li>It requires no cross-points and reutilization of the link is more. </li></ul><ul><li>Disadvantage :- </li></ul><ul><li>Because of the need of either storing or retrieving of data or synchronized switching mechanism this is a bit slow process. </li></ul>
  137. 192. Space-Time Division Switching <ul><li>We can combine the advantages of both the schemes and create an optimized technique for switching. </li></ul>
  138. 194. <ul><li>DATALINK LAYER </li></ul>
  140. 196. <ul><li>The Datalink layer is the second most lowest layer of the TCP/IP protocol suite. </li></ul><ul><li>It lies between the Network and the Physical layer. </li></ul>
  141. 197. Functions… <ul><li>Hop to hop delivery of packets. </li></ul><ul><li>Error detection and correction. </li></ul><ul><li>Medium access and control. </li></ul>
  142. 198. Chapter 9 <ul><li>Error Detection </li></ul><ul><li>and </li></ul><ul><li>Correction </li></ul>
  143. 199. <ul><li>However sophisticated a system be, it cannot guarantee the integrity of packets. Even the finest communication hardware also cannot be trusted to handle data transmission in a purely error free manner. </li></ul><ul><li>This is because errors creep in due to many reasons that are beyond our control. </li></ul><ul><li>Hence we need to have schemes to let us know when an error has occurred and how to rectify it. </li></ul>
  144. 200. Types of errors <ul><li>There are two types of errors: </li></ul><ul><ul><li>Single bit errors </li></ul></ul><ul><ul><li>Burst errors </li></ul></ul>
  145. 202. <ul><li>In single bit error only one bit of the data packet is corrupt. </li></ul><ul><li>It is the most unlikely type of error and normally happens in parallel transmission. </li></ul>
  146. 203. Burst error <ul><li>In burst error more than one bit are corrupt. </li></ul><ul><li>The length of a burst is calculated from the first corrupt bit to the last corrupt bit. </li></ul>
  147. 205. Error detection <ul><li>If we want to rectify errors then first of all we should be able to know that an error has occurred. </li></ul><ul><li>To do this we employ a few error detection techniques. </li></ul>
  148. 206. Redundancy <ul><li>Redundancy is the presence of extra bits in a data packet. </li></ul><ul><li>We add extra bits with the data to help us identify the presence of errors. </li></ul>
  149. 207. Double transmission <ul><li>One error detection mechanism is to transmit every packet of data twice. </li></ul><ul><li>By doing this we can definitely identify errors that are present but it would be too costly and slow a process. </li></ul><ul><li>Hence we need to devise other techniques to trace errors. </li></ul><ul><li>All the given method use redundant bits to detect errors. </li></ul>
  150. 209. Parity check <ul><li>Parity is the information about the number of 1s present in a data packet. </li></ul><ul><li>If the total number of 1s in the packet is odd then we call it an odd parity and is represent it as ‘1’. </li></ul><ul><li>Otherwise we call it even parity and represent it as ‘0’ </li></ul>
  151. 210. <ul><li>110001110 </li></ul><ul><li>Total number of 1s is ‘5’. Hence the packet has odd parity ‘1’. </li></ul><ul><li>11001100011 </li></ul><ul><li>Total number of 1s is ‘6’. Hence the packet has even parity ‘0’. </li></ul>
  152. 211. The process <ul><li>Calculate the parity of the packet. </li></ul><ul><li>Append the parity representation to the packet. </li></ul><ul><li>Transmit the packet. </li></ul><ul><li>On receiving check if the total number of 1s is even or not. </li></ul><ul><li>If even then drop the parity bit and accept the data. </li></ul><ul><li>If odd then reject the packet. </li></ul>
  153. 213. <ul><li>To calculate and add the parity bit we pass the data through a special unit called a parity generator. </li></ul>
  154. 214. Performance <ul><li>A simple parity check can detect single bit errors. </li></ul><ul><li>It can also detect burst errors as long as the number of corrupt bits is odd. </li></ul>
  155. 215. Two-dimensional parity check <ul><li>This approach was devised to overcome the limitations of a simple parity check. </li></ul><ul><li>Here data bits are arranged in table. </li></ul><ul><li>The parity for every row as well as for every column is calculated. </li></ul><ul><li>The packets are appended with their row parity as in simple parity check. </li></ul><ul><li>The column parities are arranged in form of a packet and are transmitted following the original packets. </li></ul>
  156. 217. <ul><li>This approach helps us nab burst errors by looking at the column parities and then comparing them with the number of 1s per column. </li></ul><ul><li>Using this approach we can also find out the exact position of a single bit error. </li></ul>
  157. 218. Cyclic Redundancy Check <ul><li>It is the most powerful of all the error detection techniques based on redundancy. </li></ul><ul><li>It is based on binary division. </li></ul><ul><li>Here instead of adding only the parity bit, we append the data unit with a series of bits called the ‘CRC’ </li></ul>
  158. 219. Process <ul><li>A binary sequence that is less than the sequence of bits to be transmitted is selected . Let the number of bits in this sequence be ‘n’ and let this sequence be called ‘D’. </li></ul><ul><li>The original data bits (O) are then appended with ‘n-1’ number of zeros. </li></ul><ul><li>Then we do binary division O/D and get reminder ‘CRC’. </li></ul>
  159. 220. <ul><li>We then replace the appended zeros with this reminder. </li></ul><ul><li>By doing this we convert ‘O’ to a stream that is purely divisible by our pre-determined divisor ‘D’. </li></ul><ul><li>Then the data is transmitted and at the receiving end it is again divided by the same pre-determined divisor. </li></ul><ul><li>If the reminder is ‘0’ then there are no errors. Otherwise the data is corrupt somewhere and is rejected. </li></ul>
  160. 221. <ul><li>The process of reckoning and appending the CRC is done by a unit called a CRC generator. </li></ul><ul><li>The CRC generator carries out ‘modulo 2’ division to find out the CRC. </li></ul><ul><li>At the receiving end the CRC checker also follows a similar process to check for the packet’s integrity. </li></ul>
  161. 222. Example <ul><li>Let us assume that we want to transmit the following unit of data (O): </li></ul><ul><ul><li>100100. </li></ul></ul><ul><ul><li>Let the predetermined divisor be 1101 (D). </li></ul></ul><ul><ul><li>Then we need to append three zeros to ‘O’. </li></ul></ul><ul><ul><li>And then divide the result with ‘D’. </li></ul></ul><ul><ul><li>The reminder we obtain will be the CRC. </li></ul></ul>
  162. 224. <ul><li>At the receivers’ end we again divide the data packet with CRC and if we get ‘zero’ as reminder then the unit is free from errors otherwise it has some errors. </li></ul>
  163. 226. Polynomials <ul><li>In real practice we represent the pre-determined divisor in the form of polynomials. </li></ul><ul><li>This we do for two reasons: </li></ul><ul><ul><li>It is short representation. </li></ul></ul><ul><ul><li>It is easy to calculate polynomials than binary data. </li></ul></ul>
  164. 227. Example <ul><li>1000100 </li></ul><ul><li>will be represented as: </li></ul><ul><li>X 6 +x 2 </li></ul>
  165. 228. Checksum <ul><li>This process also uses the concept of redundancy but in a different manner. </li></ul><ul><li>Here the entire data unit is divided into small segments of equal size (say ‘n’). </li></ul><ul><li>These segments are then added using 1’s compliment. </li></ul><ul><li>The sum is then complimented (and called the checksum) and is appended to the end of the original data unit and the extended data unit is then transmitted across the network. </li></ul>
  166. 229. <ul><li>The task of generating and transmitting the checksum is done on the sender side and is done by a unit called the checksum generator. </li></ul><ul><li>The work of checking the data packets for errors after transmission is done on the receiver side and is done by a unit called the checksum checker. </li></ul>
  167. 230. Checksum checker <ul><li>The data packet is divided into segments of ‘n’ bits. </li></ul><ul><li>All the segments are added up. </li></ul><ul><li>The sum thus obtained is the added with the ‘checksum’. </li></ul><ul><li>If the data is error free the result of the above step will be zero. </li></ul><ul><li>Otherwise it will be non-zero. </li></ul>
  168. 231. Error correction <ul><li>Error correction is more a complicated activity than error detection. </li></ul><ul><li>This requires more sophisticated techniques and more mathematical operations. </li></ul>
  169. 232. Error correction by Retransmission <ul><li>Retransmission is one simple technique than can be employed to deal with errors. </li></ul><ul><li>Whenever a data packet is found to be corrupt then the easiest thing we can do is to drop the packet and request for it’s retransmission. </li></ul><ul><li>Many different schemes are used to do this. </li></ul>
  170. 233. Forward error correction <ul><li>This is the second approach to handle errors. </li></ul><ul><li>The receiver here instead of demanding the retransmission of the corrupt packet, tries to find out the position of the error and correct it. </li></ul>
  171. 234. <ul><li>Let us start with the simplest of all errors. i.e single bit errors. </li></ul><ul><li>We know that to detect a single bit error we can use one redundant bit. </li></ul><ul><li>This we can do because here we want to differentiate between two states: </li></ul><ul><li> error/no-error. </li></ul><ul><li>As a bit has also two states 1/0 , hence one state can be used to represent error and the other to represent no-error . </li></ul>
  172. 235. <ul><li>But when we want to rectify an error then we need to find out the exact location of the error. </li></ul><ul><li>Using only one redundant bit here is not enough. </li></ul>
  173. 236. <ul><li>Consider the following data packet: </li></ul><ul><ul><li>1110011 </li></ul></ul><ul><ul><li>If we want to only know that the packet is corrupt we can use only one redundant bit. Let us say this bit will be 1 when the packet will be having no errors and 0 when the packet will have some errors. </li></ul></ul><ul><ul><li>But when we want to find out the exact location of the error then we need to have to find out which of the seven bits has changed. </li></ul></ul><ul><ul><li>Hence we want eight different states to represent: </li></ul></ul><ul><ul><li>Error at position 1 2) Error at position 2 </li></ul></ul><ul><ul><li>Error at position 3 4) Error at position 4 </li></ul></ul><ul><ul><li>……… 8) No error </li></ul></ul>
  174. 237. <ul><li>Hence we can conclude that for a data packet of 7 bits we require ‘3’ redundant bits that can have 8 different states. </li></ul>
  175. 238. <ul><li>But what if the redundant bits themselves become corrupt? </li></ul>
  176. 239. <ul><li>We therefore need a redundant bit stream that can have enough states to detect errors in the original data as well as in itself. </li></ul><ul><li>Let us suppose we have a data packet of ‘k’ bits. </li></ul><ul><li>Let our redundant data stream be of ‘r’ bits. </li></ul><ul><li>Here we want this stream to have at least </li></ul><ul><ul><ul><li>K+r+1 states. </li></ul></ul></ul><ul><ul><ul><li>But ‘r’ bits can have a maximum of 2 r states. </li></ul></ul></ul><ul><ul><ul><li>Hence we can have the following relation between ‘r’ and ‘k’ </li></ul></ul></ul>
  177. 240. <ul><li>2 r ≥ k+r+1 </li></ul><ul><li>Where ‘k’ is the number of bits in the original data and ‘r’ is the number of bits in the redundant bit stream. </li></ul>
  178. 241. <ul><li>So for a packet of seven bits k=7 and we can calculate ‘r’ in the following way: </li></ul><ul><li>2 r ≥ 7 + r + 1 </li></ul><ul><li>Or </li></ul><ul><li>r = 4 </li></ul><ul><li>This concept provides the basis for many error correction mechanisms. </li></ul>
  179. 243. Hamming code <ul><li>The hamming code uses the data and redundant bit length relationship. </li></ul><ul><li>First the number of required redundant bits is calculated. </li></ul><ul><li>Then these bits are put at various positions of the data packet. Where each position is a power of ‘2’ (i.e. 1,2,4,8,16…) </li></ul>
  180. 244. <ul><li>Each redundant bit is in charge of some specific bits of the packet. </li></ul><ul><li>A bit of the original data packet can be included in the group of two different redundant bits but a redundant bit can be included only in one group. </li></ul>
  181. 245. K = 8, r = 4
  182. 248. <ul><li>How to determine which redundant bit will take care of which bits? </li></ul>
  183. 249. Calculating the values of redundant bits <ul><li>Every redundant bit represents the parity value of the combination of bits it is in charge of. </li></ul><ul><li>Consider the code 1001101. </li></ul><ul><li>Then we have to place four redundant bits at positions 1,2,4 and 8. </li></ul><ul><li>The following will be the bits that will be placed in these positions. </li></ul>
  184. 251. <ul><li>At the receiver’s end the receiver recalculates the parity of every redundant bit and it’s data bits. </li></ul><ul><li>Then it assembles the new parity values in the order ‘r8,r4,r2,r1’ to form a binary number. </li></ul><ul><li>The decimal value of this binary number gives the exact location of the error. </li></ul>
  185. 252. Example <ul><li>Let us consider in the previous packet the bit number ‘7’ gets corrupt. </li></ul><ul><li>i.e. it’s value changes from ‘1’ to ‘0’. </li></ul>
  186. 254. Burst error correction
  187. 255. <ul><li>Flow </li></ul><ul><li>and </li></ul><ul><li>Error Control </li></ul>
  188. 256. Flow control <ul><li>This refers to the amount of data that a device can send before it receives an acknowledgement (conformation that the sent data has been properly received) from the receiver device. </li></ul>
  189. 257. Need of Flow Control <ul><li>The data that is received by a device has to be processed and checked before being used. This is a slower process in comparison to the transmission speed itself. </li></ul><ul><li>Hence there should be a mechanism to restrict the speed of the transmission to ensure that the receiver device does not get it’s buffer over flown. </li></ul>
  190. 258. Error Control <ul><li>Error control involves both error detection and error correction. </li></ul><ul><li>Error correction in most often done by retransmission. </li></ul>
  191. 259. <ul><li>Flow and error control go hand in hand and involve a number of schemes, the major of which is ‘Automatic Repeat Request’(ARQ) and its variants. </li></ul>
  192. 260. Stop and Wait ARQ <ul><li>It is the simplest kind of automatic repeat-request (ARQ) method. </li></ul><ul><li>The sender sends one frame at a time. After sending each frame, the sender doesn't send any further frames until it receives an ACK (acknowledgement) signal. </li></ul><ul><li>For identification purpose both data and acknowledgment frames are numbered alternately ‘1’ and ‘0’. </li></ul><ul><li>After receiving a good frame, the receiver sends an ACK. </li></ul>
  193. 261. <ul><li>If the receiver receives a damaged frame or it receives a frame that is out of order then it does not send any acknowledgement. </li></ul><ul><li>If the ACK does not reach the sender before a certain time, known as the timeout, the sender sends the same frame again. </li></ul>
  194. 262. Operation
  195. 263. Lost/Damaged Frames
  196. 264. Lost ACK
  197. 265. Delayed ACK
  198. 266. <ul><li>Stop-wait-ARQ is a slow process and also suffers from inefficient use of bandwidth. </li></ul><ul><li>Therefore we need to have a protocol that can handle frame transmission with greater efficiency and speed. </li></ul><ul><li>‘ Go-Back-N-ARQ’ and ‘Selective Repeat ARQ’ are two such protocols. </li></ul>
  199. 267. GO BACK-N ARQ <ul><li>In this protocol the sender can send a specific number of frames (w) before getting an ACK. </li></ul><ul><li>The frames are given sequence numbers depending on the capacity of the sequence header field. </li></ul><ul><li>If the field has a capacity of ‘m’ bits then the sequence can consists of at max 2 m -1 numbers and can be repeated as per requirement. </li></ul>
  200. 268. Working <ul><li>The sender keeps a record of un-acknowledged frames in a window. </li></ul><ul><li>Every time it gets an ACK for a frame it discards that frame and the frames sent before it and includes the next unsent frames. i.e. it slides the window over the unsent frames. </li></ul><ul><li>The size of the sender window is always less than or equal to 2 m -1 . </li></ul>
  201. 270. <ul><li>The receiver also maintains a window of size ‘1’. </li></ul><ul><li>The frame number in the window is the one it is expecting. </li></ul><ul><li>If it gets the frame it is expecting then it places the window over the next expected frame and sends an acknowledgement. </li></ul><ul><li>If it gets any frame other than it is expecting then it discards the frame and remains silent. </li></ul><ul><li>When the sender doesn’t get an ACK within the specified time then it resends all the frames starting from the last unacknowledged one </li></ul>
  202. 272. Control Variables <ul><li>The sender has three control variables S, S F , S L . </li></ul><ul><li>S - the frame that is to be transmitted now. </li></ul><ul><li>S F - the first frame of the window. </li></ul><ul><li>S L - the last frame of the window. </li></ul><ul><li>The size of the window is ‘W’ where W= S L - S F + 1 </li></ul><ul><li>The receiver has only one variable ‘R’ which holds the sequence number of the expected frame. </li></ul>
  203. 276. ??? <ul><li>Why is the sender window size less than or equal to 2 m -1? </li></ul>
  204. 277. Let M=2
  205. 279. Selective Repeat ARQ <ul><li>This protocol doesn't requires the buffering of all the sent frames. </li></ul><ul><li>Here the receiver doesn't expect a specific frame, rather it expects a range of frames. </li></ul><ul><li>Whenever it gets a frame that is in the range but is out of order then it accepts the frame and informs the sender about the lost frame through NAK n. where n is the sequence of the lost frame. </li></ul>
  206. 281. <ul><li>The sender window size can be maximum ‘ 2 m /2 ’. </li></ul><ul><li>Let us take m=2. </li></ul><ul><li>Then the sender window size should be maximum ‘2’. </li></ul><ul><li>If it will be more than that then we will experience problems similar in Go-Back-N-ARQ when all the acknowledgements for the first range of frames are lost. </li></ul>
  207. 284. Piggybacking
  208. 285. HDLC <ul><li>The HDLC protocol is defined by ISO for use on both point-to-point and multipoint (multidrop) data links. It supports full duplex transparent-mode operation and is now extensively used in both multipoint and computer networks. </li></ul>
  209. 286. HDLC Operation Modes <ul><li>HDLC Operation Modes: </li></ul><ul><ul><li>Normal Response Mode (NRM) </li></ul></ul><ul><ul><li>Asynchronous Balanced Mode (ABM) </li></ul></ul>
  210. 287. NRM <ul><li>Normal Response Mode is used in unbalanced configurations. In this mode, slave stations (or secondary) can only transmit when specially instructed by the master (primary station). The link may be point-to-point or multipoint. In the latter case only one primary station is allowed. </li></ul>
  211. 288. NRM
  212. 289. ABM <ul><li>The Asynchronous Balanced Mode (ABM), is used mainly on full duplex point-to-point links for computer to computer communications and for connections between a computer and a packed switched data network, in this case each station has an equal status and performs the role of both primary and secondary functions. This mode is used in the protocol set known as X.25.) </li></ul>
  213. 290. ABM
  214. 291. HDLC FRAME <ul><li>In HDLC, data is organized into a unit (called a  frame ) and sent across a network to a destination that verifies its successful arrival. </li></ul><ul><li>The HDLC protocol also manages the flow or pacing at which data is sent.  </li></ul>
  215. 292. HDLC Frame Format
  216. 293. FLAG <ul><li>The 8 bit pattern &quot;01111110&quot; which signals the beginning and end of an HDLC frame. </li></ul><ul><li>  If a piece of data within the frame to be transmitted contains a series of 5 or more 1's, the transmitting station must insert a 0 to distinguish this set of 1's in the data from the flags at the beginning and end of the frame. This technique of inserting bits is called  bit-stuffing.   </li></ul>
  217. 294. <ul><li>These bits are detected and removed upon receipt. If a pattern of five 1's is followed by a 1 and then a 0, it marks the end of the frame. If a pattern of five ones is followed by two more 1's, it is a signal from the transmitting station to abort. </li></ul>
  218. 295. ADDRESS <ul><li>The address field always contains the address of a secondary station. When the primary station transmits, it is the receiving secondary station's address, if it is a secondary responding, it is it's own address. This field is only populated for Unbalanced connections, it is otherwise empty for point-to-point (Balanced) links. </li></ul>
  219. 296. FCS <ul><li>The frame check sequence (FCS) is a 16-bit  or a 32-bit CRC computed over the Address, Control, and Information fields. It provides a means by which the receiver can detect errors that may have been induced during the transmission of the frame, such as lost bits, flipped bits, and extraneous bits. </li></ul>
  220. 297. <ul><li>If the receiver's calculation of the FCS does not match that of the sender's, indicating that the frame contains errors, the receiver can either send a negative acknowledge packet to the sender, or send nothing. After either receiving a negative acknowledge packet or timing out waiting for a positive acknowledge packet, the sender can retransmit the failed frame. </li></ul>
  221. 298. CONTROL <ul><li>The 8 or 16 bit control field provides a flow control number and defines the frame type (control or data). The exact use and structure of this field depends upon the protocol using the frame </li></ul>
  222. 299. INFORMATION <ul><li>This field carries user or system information. The size of this field is varible. </li></ul>
  223. 300. Frame Classes <ul><li>In the HDLC protocol , three classes of frames are used : </li></ul><ul><ul><li>Unnumbered frames </li></ul></ul><ul><ul><li>Information frames </li></ul></ul><ul><ul><li>Supervisory frames </li></ul></ul>
  224. 302. I-Frames <ul><li>Information frames, or  I-frames , transport user data from the network layer. In addition they also include flow and error control information piggybacked on data. The sub-fields in the control field define these functions </li></ul>
  225. 304. <ul><li>The least significant bit (first transmitted) defines the frame type. 0 means an I-frame. </li></ul><ul><li>The next three bits called N(S) define the sequence number of the frame in travel. Here it is to be noted that the frames ca have sequence numbers only up to 7. </li></ul>
  226. 305. <ul><li>The next single bit is the P/F (poll/final) bit.  It is called Poll when set by the primary station to obtain a response from a secondary station, and Final when set by the secondary station to indicate a response or the end of transmission. In all other cases, the bit is clear. </li></ul><ul><li>The secondary only sends a Final when it has received a Poll from the primary. The primary only sends a Poll when it has received a Final back from the secondary. </li></ul><ul><li>The next three bits N(R) shows the value of ACK when piggybacking is used. </li></ul>
  227. 306. S-Frames <ul><li>Supervisory Frames, or  S-frames , are used for flow and error control whenever piggybacking is impossible or inappropriate, such as when a station does not have data to send. S-frames  do not  have information fields. </li></ul>
  228. 308. <ul><li>The S-frame control field includes a leading &quot;10&quot; indicating that it is an S-frame. </li></ul><ul><li>The next two bits represents one of the four types S-frames. </li></ul><ul><ul><li>Receive Ready (RR) </li></ul></ul><ul><ul><li>Receive Not Ready (RNR) </li></ul></ul><ul><ul><li>Receive Not Ready (RNR) </li></ul></ul><ul><ul><li>Selective Reject (SREJ) </li></ul></ul>
  229. 309. <ul><li>This is followed by a 2-bit type, a poll/final bit. </li></ul><ul><li>The last three bits N(R) correspond to the ACK and NAK values. </li></ul>
  230. 310. <ul><ul><li>Receive Ready (00): </li></ul></ul><ul><ul><li>Indicate that the sender is ready to receive more data (cancels the effect of a previous RNR). </li></ul></ul><ul><ul><li>Receive Not Ready (10): </li></ul></ul><ul><ul><li>Acknowledge some packets and request no more be sent until further notice. </li></ul></ul><ul><ul><li>Reject (01): </li></ul></ul><ul><li>Requests immediate retransmission of lost packets. </li></ul><ul><li>Sent in response to an observed sequence number gap. </li></ul><ul><li>Used for Go Back – N ARQ </li></ul>
  231. 311. <ul><li>Selective Reject (11): </li></ul><ul><li>Requests retransmission of only the frame. </li></ul><ul><li>Used for Selective Repeat ARQ. </li></ul>
  232. 312. U-Frames <ul><li>Unnumbered frames, or  U-frames , are used for link management. They exchange session management and control information between connected devices, and some U-frames contain an information field, used for system management information or user data. </li></ul>
  233. 314. <ul><li>The first 2 bits (11) mean it is a U-frame. </li></ul><ul><li>The 5 type bits (2 before P/F bit and 3 bit after P/F bit) can create 32 different types of U-frame </li></ul>
  234. 315. Some Common Commands
  235. 316. <ul><li>MULTIPLE ACCESS </li></ul>
  236. 317. <ul><li>In the previous chapter we assumed that there is a single dedicated link between two devices. </li></ul><ul><li>This assumptions is not always true. For example when we use wireless communication then the same medium is used by multiple devices to communicate with each other. </li></ul><ul><li>Such a situation is in which more than one device share the link is called Multiple Access. </li></ul>
  237. 319. Random Access <ul><li>In this method every station has equal status. i.e. every station can transmit data without seeking permission from any other station. </li></ul><ul><li>But problems arise when more than one stations try to access the link at a single point of time. Hence to avoid this the devices follow a procedure before sending the frames. The procedure involves the answering of the following questions. </li></ul>
  238. 320. <ul><li>When can the station access the medium? </li></ul><ul><li>What can the station do if the medium is busy? </li></ul><ul><li>How can the station decide if the communication is successful or not. </li></ul><ul><li>What can the station do if there is an access conflict? </li></ul>
  239. 321. Types of Random Access Methods
  240. 322. ALOHA <ul><li>Here a base station acts as the central controller. </li></ul><ul><li>Al the stations communicate via the base station. </li></ul><ul><li>The uploading transmission is done with a carrier frequency of 407MHz and the downloading is done with a carrier frequency of 413MHz. </li></ul>
  241. 324. Pure ALOHA <ul><li>The first version of the protocol (now called &quot;Pure ALOHA&quot;) was quite simple: </li></ul><ul><ul><li>If you have data to send, send the data </li></ul></ul><ul><ul><li>If the message collides with another transmission, try resending &quot;later&quot; </li></ul></ul>
  242. 325. <ul><li>Pure ALOHA does not check whether the channel is busy before transmitting. The critical aspect is the &quot;later&quot; concept: the quality of the backoff scheme chosen significantly influences the efficiency of the protocol, the ultimate channel capacity, and the predictability of its behavior. </li></ul>
  243. 327. Vulnerable Time = 2 Ft
  244. 328. Slotted ALOHA <ul><li>An improvement to the original ALOHA protocol was &quot;Slotted ALOHA&quot;, which introduced discrete timeslots and increased the maximum throughput. A station can send only at the beginning of a timeslot, and thus collisions are reduced </li></ul>
  245. 329. Vulnerable Time = Ft
  246. 330. Carrier Sense Multiple Access  ( CSMA ) <ul><li>It is a probabilistic Media Access Control (MAC) protocol in which a node verifies the absence of other traffic before transmitting on a shared transmission medium. </li></ul>
  247. 331. <ul><li>Carrier Sense &quot; describes the fact that a transmitter listens for a carrier wave before trying to send. That is, it tries to detect the presence of an encoded signal from another station before attempting to transmit. If a carrier is sensed, the station waits for the transmission in progress to finish before initiating its own transmission. </li></ul>
  248. 332. <ul><li>Multiple Access &quot; describes the fact that multiple stations send and receive on the medium. Transmissions by one node are generally received by all other stations using the medium. </li></ul>
  249. 333. Types of CSMA <ul><li>Nonpersistent CSMA </li></ul><ul><li>p-persistent CSMA </li></ul>
  250. 334. Nonpersistent CSMA <ul><li>When the sender (station) is ready to transmit data, it checks if the physical medium is busy. If so, it senses the medium continually until it becomes idle, and then it transmits a piece of data (a frame). In case of a collision, the sender waits for a random period of time and attempts to transmit again. </li></ul>
  251. 335. 1-persistent CSMA <ul><li>Step 1 : If the medium is idle, transmit immediately </li></ul><ul><li>Step 2 : If the medium is busy, continue to listen until medium    becomes idle, and then transmit immediately </li></ul><ul><li>  (usually you stop transmission attempts after few tries)  </li></ul>
  252. 336. p - persistent   CSMA <ul><li>Step 1 : If the medium is idle, transmit with probability  p , and delay   for worst case propagation delay for one packet with probability   (1- p ) </li></ul><ul><li>Step 2 : If the medium is busy, continue to listen until medium    becomes idle,  then go to  Step 1 </li></ul><ul><li>Step 3 : If transmission is delayed by one time slot, continue with  Step 1   </li></ul>
  253. 337. Carrier Sense Multiple Access With Collision Detection(CSMA/CD) <ul><li>In this method a station sends a frame and monitors the medium for collision. </li></ul><ul><li>If there is no collision then the transmission is successful. </li></ul><ul><li>If a collision occurs then the station stops transmitting that frame, transmits a jam signal, and then waits for a random time interval (known as &quot;backoff delay&quot;) before trying to send that frame again. </li></ul>
  254. 338. <ul><li>A  jam signal  is a signal that carries a 32-bit binary pattern sent by a data station to inform the other stations that they must not transmit. </li></ul><ul><li>For continuous collisions of a frame the ‘backoff delay’ is incremented. </li></ul><ul><li>The backoff delay can be incremented for a limited number of times after which the transmission will be aborted. </li></ul>
  255. 340. Carrier Sense Multiple Access With Collision Avoidance (CSMA/CA) <ul><li>This protocol is used for avoiding collisions. </li></ul><ul><li>Here after an idle channel is sensed then the sender still waits for some time called Inter Frame Gap (IFG). </li></ul><ul><li>Then after the IFG it again waits for a random time and then sends the frame. </li></ul><ul><li>Is case of a collision it undergoes the backoff delay and retransmits the packet. </li></ul>
  256. 342. Controlled Access <ul><li>Here the stations consult each other before transmitting a packet. </li></ul><ul><li>There are three popular control access methods. </li></ul><ul><ul><li>Reservations </li></ul></ul><ul><ul><li>Poll </li></ul></ul><ul><ul><li>Token passing </li></ul></ul>
  257. 343. Reservations <ul><li>Here time is divided into intervals. </li></ul><ul><li>In each interval there is a reservation frame that precedes the data frame. </li></ul><ul><li>If there are ‘n’ devices then the reservation frame is also divided into ‘n’ fields. </li></ul><ul><li>When a device wants to send some data then it sets its corresponding field to 1. </li></ul>
  258. 345. Polling <ul><li>It works in topologies where one device acts as primary and all the other devices act as secondary. </li></ul><ul><li>When the primary has something to send then it warns the secondary devices of the forthcoming transmission so that they can be ready. </li></ul><ul><li>This is called ‘select’ . </li></ul>
  259. 346. <ul><li>When the primary wants to get some data then it asks every device in turns if they have something to transmit. </li></ul><ul><li>If a secondary has to transmit something then it sends its frame. If it has nothing to send then it send a NAK. </li></ul><ul><li>This is called ‘ poll’ . </li></ul>
  260. 347. Token Passing <ul><li>Here stations are arranged in the form of a logical ring. </li></ul><ul><li>A token keeps on circulating in the link. </li></ul><ul><li>When a device wants to send something then it takes the token and sends it’s data. </li></ul><ul><li>After transmission the token is again relinquished. </li></ul><ul><li>A device can keep the token for a limited period of time after which it is forced to realize it </li></ul>
  261. 349. <ul><li>Wireless LAN </li></ul>
  262. 350. <ul><li>A  wireless local area network  ( WLAN ) links devices via a wireless distribution method and usually provides a connection through an access point to the wider internet. This gives users the mobility to move around within a local coverage area and still be connected to the network. </li></ul><ul><li>IEEE defines the wireless LAN using the standard 820.11. </li></ul>
  263. 351. Architecture <ul><li>This standard defines two types of services. </li></ul><ul><ul><li>BSS (Basic Service Set) </li></ul></ul><ul><ul><li>ESS (Extended Service Set) </li></ul></ul>
  264. 352. BSS <ul><li>The  basic service set  is the basic building block of an IEEE 802.11 wireless LAN . </li></ul><ul><li>Here a single access point (AP) together with stations is called a BSS. </li></ul><ul><li>An AP acts as a master to control the stations within that BSS. </li></ul><ul><li>Each BSS is identified by a  BSSID . </li></ul><ul><li>A BSS can also be formed without an AP. Such a BSS is called an Ad Hoc Network . </li></ul>
  265. 354. ESS <ul><li>An ESS is a combination of more than BSS. </li></ul><ul><li>Here the APs of all the BSS are connected using usually a wired LAN. </li></ul>
  266. 356. <ul><li>The stations of one BSS can communicate within themselves without the help of APs. </li></ul><ul><li>But to communicate with a station of another BSS they need to take the help of the APs. </li></ul>
  267. 357. Station Mobility <ul><li>IEEE 802.11 defines three types of stations. </li></ul><ul><ul><li>No- Transition Mobility </li></ul></ul><ul><ul><li>BSS- Transition Mobility </li></ul></ul><ul><ul><li>ESS- Transition Mobility </li></ul></ul>
  268. 358. <ul><li>No- Transition Mobility : A station cannot move at all or can move only within the BSS. </li></ul><ul><ul><li>BSS- Transition Mobility : A station can move in only one ESS. </li></ul></ul><ul><ul><li>ESS- Transition Mobility : A station can move within various ESS. </li></ul></ul>
  269. 359. Physical Layer Specifications
  270. 360. FHSS <ul><li>Frequency-hopping spread spectrum  is a method of transmitting radio signals by rapidly switching a carrier among many frequency channels. </li></ul><ul><li>Spread-spectrum signals are difficult to intercept. An FHSS signal simply appears as an increase in the background noise to a narrowband receiver. An eavesdropper would only be able to intercept the transmission if the pseudorandom sequence was known. </li></ul>
  271. 362. <ul><li>It uses the band of 2.4 GHz to 2.48GHz. This band is divided into 72 sub-bands. </li></ul><ul><li>FSK is used for modulation. </li></ul>
  272. 363. DSSS <ul><li>Direct Sequence Spread Spectrum is used for signal generation of 2.4 GHz. </li></ul><ul><li>Here each bit is replaced by a stream of bits. </li></ul><ul><li>Modulation is done through PSK. </li></ul>
  273. 365. OFDM <ul><li>Orthogonal Frequency Division Multiplexing is used for signal generation of 5 GHz. </li></ul><ul><li>It is similar to FDM with the only difference, that all the sub-bands are used by only one source at any given point of time. </li></ul><ul><li>The source contend with one another for access to the link. </li></ul><ul><li>It uses PSK and QAM for modulation. </li></ul>
  274. 366. HR-DSSS <ul><li>High Rate- DSSS is same as DSSS. The only difference is in the encoding scheme used. </li></ul><ul><li>Here the encoding scheme used is CCK. </li></ul>
  275. 367. OFDM-g <ul><li>This is a new and complex specification of OFDM that achieves higher data rates than OFDM. </li></ul>
  276. 368. Virtual circuit-switching <ul><li>Virtual circuit switching is a packet switching methodology whereby a path is established between the source and the final destination through which all the packets will be routed during a call. This path is called a virtual circuit because to the user, the connection appears to be a dedicated physical circuit. However, other communications may also be sharing the parts of the same path. </li></ul>
  277. 369. <ul><li>Before the data transfer begins, the source and destination identify a suitable path for the virtual circuit. All intermediate nodes between the two points put an entry of the routing in their routing table for the call. Additional parameters, such as the maximum packet size, are also exchanged between the source and the destination during call setup. The virtual circuit is cleared after the data transfer is completed. </li></ul>
  278. 370. Advantages <ul><li>Packets are delivered in order, since they all take the same route; </li></ul><ul><li>The overhead in the packets is smaller,  since there is no need for each packet to contain the full address; </li></ul><ul><li>The connection is more reliable, network resources are allocated at call setup so that even during times of congestion, provided that a call has been setup, the subsequent packets should get through; </li></ul><ul><li>Billing is easier,  since billing records need only be generated per call and not per packet. </li></ul>
  279. 371. Disadvantages <ul><li>The switching equipment needs to be more powerful, since each switch needs to store details of all the calls that are passing through it and to allocate capacity for any traffic that each call could generate; </li></ul><ul><li>Resilience to the loss of a trunk is more difficult, since if there is a failure all the calls must be dynamically reestablished over a different route. </li></ul>
  280. 372. Frame Relay <ul><li>Frame Relay is a packet switching  methodology that is designed in the late 1980s and widely deployed in the 1990s. Frame Relay uses virtual circuits.  </li></ul><ul><li>Here the systems are connected through permanent or switched virtual circuits are extensively used for connecting LANs and WANs to the internet. </li></ul>
  281. 373. Working <ul><li>Every switch here contains a table that has entry to help it rout the incoming packet to the destination machine. </li></ul><ul><li>When a packet arrives then the switch looks into it’s table and sends the packet to the next device. </li></ul><ul><li>To connect a LAN or WAN to the internet we require a router to be connected to the frame relay cloud. </li></ul>
  282. 375. Advantages  <ul><li>Because virtual circuits consume bandwidth only when they transport data, many virtual circuits can exist simultaneously across a given transmission line. In addition, each device can use more of the bandwidth as necessary, and thus operate at higher speeds. </li></ul><ul><li>The improved reliability of communication lines and increased error-handling sophistication at end stations allows the Frame Relay protocol to discard erroneous frames and thus eliminate time-consuming error-handling processing. </li></ul>
  283. 376. Asynchronous Transfer Mode <ul><li>ATM is a cell-relay technology that divides upper-level data units into 53-byte cells for transmission over the physical medium. It operates independently of the type of transmission being generated at the upper layers AND of the type and speed of the physical-layer medium below it. </li></ul><ul><li>ATM offers the economically sound &quot;bandwidth on demand&quot; features of packet-switching technology at the high speeds required for today's LAN and WAN networks. </li></ul>
  284. 377. <ul><li>ATM technology transports all kinds of transmissions (e.g. data, voice, video, etc.) in a single integrated data stream over any medium, at speeds of 155 Mbps, and beyond. </li></ul>
  285. 378. Why ATM…?
  286. 379. <ul><li>Consider a speech signal reduced to packets, and forced to share a link with bursty data traffic (traffic with some large data packets). No matter how small the speech packets could be made, they would always encounter full-size data packets, and under normal queuing conditions, might experience maximum queuing delays. That's why all packets should have the same small size, cells precisely. </li></ul><ul><li>Hence ATM with cell-traffic was introduced. </li></ul>
  287. 380. ATM Standards <ul><li>TU-T I.361 - Defines the ATM Layer functions. </li></ul><ul><li>ITU-T I.363- Defines the ATM Adaptation Layer protocols. </li></ul><ul><li>ITU-T I.610- Defines the ATM Operation and Maintenance (OAM) functions. </li></ul>
  288. 381. The ATM Network <ul><li>The technology allows both public and private (i.e., LAN or LAN-to-internal switch) ATM networks. This capability gives a seamless and transparent (to the user) connection from one end user to another end user, whether in the same building or across two continents </li></ul>
  289. 382. ATM Interfaces <ul><li>Three types of interfaces exist in this diagram: </li></ul><ul><li>User-to-Network Interface (UNI) </li></ul><ul><li>Network-to-Network Interface (NNI) </li></ul><ul><li>Inter-Carrier Interface (ICI) </li></ul>
  290. 383. <ul><li>The UNI exists between a single end user and a public ATM network, between a single end user and a private ATM switch, or between a private ATM switch and the public ATM network. </li></ul><ul><li>The NNI exists between switches in a single public ATM network. NNIs may also exist between two private ATM switches. </li></ul><ul><li>The ICI is located between two public ATM networks </li></ul>
  291. 384. The ATM Cell
  292. 385. Working <ul><li>End User 1 in Chicago wishes to transfer a data file to End User 2 in Los Angeles. </li></ul><ul><li>A virtual channel is created and a virtual path is established from switch to switch within the public ATM network in Chicago (ATM Network 1). </li></ul><ul><li>The Chicago telephone exchange, in turn, establishes contact with the public ATM network in Los Angeles (ATM Network 2). </li></ul>
  293. 386. <ul><li>ATM Network 2 also establishes a virtual path from switch to switch within the network and with the Private ATM Switch at the destination. </li></ul><ul><li>The private ATM network completes the virtual path by establishing a virtual channel with End User 2. </li></ul>
  294. 387. <ul><li>At each interface in this network, a unique virtual path identifier (VPI) and virtual channel identifier (VCI) are established for this transmission. </li></ul><ul><li>These identifiers are of local significance ONLY: the identifier is significant only for a specific switch and the two nodes adjacent to it in the virtual path. </li></ul>
  295. 388. <ul><li>End User 1 encapsulates the file in 53-byte cells, each with its unique VPI/VCI &quot;destination address&quot; in the header. </li></ul><ul><li>These cells are streamed and sent across the UNI to the ATM network switch. </li></ul><ul><li>This switch reads the ATM header, consults the routing table created during the virtual path setup, changes the VPI/VCI as necessary, and sends each cell in the stream out of the appropriate port and across the NNI to the next switch in the virtual path. </li></ul>
  296. 389. <ul><li>The last switch within the virtual path for ATM Network 1 repeats this process and sends the cell out through the ICI to ATM Network 2. </li></ul><ul><li>ATM Network 2 continues the process in a similar manner until the cell is carried through the UNI to the Private ATM Switch which, in turn, sends the cell to End User 2. </li></ul>
  297. 390. <ul><li>End User 2 then reconstructs the file from the sequential cells, stripping the 5-byte header from each cell. </li></ul><ul><li>End User 1 or End User 2 terminates the call, i.e., &quot;hangs up,&quot; and the virtual path is dismantled. </li></ul>
  298. 391. Advantages <ul><li>ATM supports voice, video and data allowing multimedia and mixed services over a single network. </li></ul><ul><li>Data is transmitted in fixed length cells which gives it advantages over other methods of data transfer. </li></ul><ul><li>Cable can be twisted-pair, coaxial or fiber-optic  </li></ul>
  299. 392. <ul><li>Ability to connect LAN to WAN </li></ul><ul><li>Scalability  </li></ul><ul><li>  High speed Mbps and possibly Gbps. </li></ul><ul><li>Fixed cell structure means that ATM can be readily switched by hardware without the inherent delays introduced by software switched and routed frames. </li></ul>
  300. 393. Disadvantages <ul><li>New customer premises hardware and software are required. </li></ul><ul><li>Presently the applications that can benefit from ATM such as multimedia are rare. </li></ul>
  301. 394. <ul><li>Network Layer Protocols. </li></ul>
  302. 395. <ul><li>There are numerous protocols used in the network layer. </li></ul><ul><li>The major of which is the Internet Protocol or IP. </li></ul><ul><li>But this protocol cannot single handedly do all the required works. Hence it takes the help of few other protocols. Namely: </li></ul>
  303. 396. <ul><li>ARP </li></ul><ul><li>IGMP </li></ul><ul><li>ICMP </li></ul><ul><li>& </li></ul><ul><li>RARP </li></ul>
  304. 397. ARP <ul><li>The internet is a collection of interconnected networks of many types. </li></ul><ul><li>A packet that moves from one node to another has to pass through a number of different hosts each of which is identified by its IP address at the network level. But each of these hosts is identified by its own MAC address at. This MAC addr is physical and has local jurisdiction. i.e it should be unique locally but not necessarily universally. </li></ul>
  305. 398. <ul><li>We need the help of both the addresses to identify a host in the entire network because the local network (like the Ethernet) can have different protocols. Or the packet en-route to a host nay travel through multiple physical networks like Ethernet or Token Ring. </li></ul><ul><li>This activity or correlating a physical address to its corresponding IP addr is called mapping and is done by the ARP. </li></ul>
  306. 399. Steps Involved:- <ul><li>The sender knows only the IP addr of the receiver and not it’s physical addr. </li></ul><ul><li>The sender sends an ARP broadcast packet to all the hosts. </li></ul><ul><li>This broadcast packet contains the physical and logical addr of the sender and only the logical addr of the receiver. </li></ul><ul><li>Every host on the network receives the ARP packet but only the one which matches the IP receiver IP addr of the packet recognizes it. </li></ul>
  307. 400. <ul><li>It sends the reply to the sender machine telling about it’s own physical addr. </li></ul><ul><li>Now when this reply reaches the sender then it can send the data packets to the intended receiver. </li></ul>
  308. 403. IP <ul><li>It is a connectionless, unreliable and best effort protocol. </li></ul><ul><li>Packets of the IP are called datagrams and contain two parts, ‘header’ and ‘data’. </li></ul>
  309. 404. Fragmentation: <ul><li>Every protocol has it’s own maximum frame length called the maximum transfer unit (MTU). When a packet passes the protocol then it’s length is kept less than the MTU. </li></ul><ul><li>For convenience the length of the IP datagram is equal to the largest MTU. For other physical networks the packet has to be broken and has to be re-capsulated. This process is called fragmentation. </li></ul>
  310. 406. ICMP <ul><li>The main two drawbacks of IP are: </li></ul><ul><ul><li>It does not provide any error checking or correction mechanism. </li></ul></ul><ul><ul><li>It does not provide any host or management query. </li></ul></ul><ul><ul><li>These two drawbacks are handled by using ICMP </li></ul></ul>
  311. 407. <ul><li>ICMP is a network layer protocol but it’s messages are not passed to the datalink layer directly. </li></ul><ul><li>Instead they are first encapsulated in an IP datagram. </li></ul><ul><li>In such a case the value of the field ‘protocol’ is set to ‘1’ to represent an ICMP message. </li></ul>
  312. 408. Types of ICMP Messages <ul><li>There are two types of ICMP messages: </li></ul><ul><li>Error Reporting </li></ul><ul><li>Query </li></ul>
  313. 409. Error Reporting Messages <ul><li>ICMP only reports errors to the original source. This is because it is the only source addr present in its’ header. </li></ul><ul><li>There are four types of error messages: </li></ul><ul><ul><li>Destination Unreachable </li></ul></ul><ul><ul><li>Source Quench </li></ul></ul><ul><ul><li>Time Exceed </li></ul></ul><ul><ul><li>Parameter Problems </li></ul></ul><ul><ul><li>Redirection </li></ul></ul>
  314. 410. <ul><ul><li>Destination Unreachable: </li></ul></ul><ul><ul><li>When a router cannot route a datagram of the datagram is not delivered. </li></ul></ul><ul><ul><li>Source Quench: </li></ul></ul><ul><ul><li>As because the IP is a connectionless unreliable protocol hence there are no means to know if the receiving host is ready to take further datagrams. Hence a situation may arise when the data grams are discarded because the destination machine is overwhelmed with messages. Such a situation is reported using this message. </li></ul></ul>
  315. 411. <ul><ul><li>Time Exceed: </li></ul></ul><ul><li>When a datagram does not reach the destination in time then this message is transmitted. </li></ul><ul><li>Parameter Problems: </li></ul><ul><li>When some ambiguity in the header part is felt then the packet is discarded and this message is sent. </li></ul><ul><ul><li>Redirection: </li></ul></ul><ul><ul><li>When a data packet due to some reason is sent to some host other than the desired one then this message is sent. </li></ul></ul>
  316. 412. IPv6 <ul><li>It is the improved version of IPv4. </li></ul><ul><li>It is a classless addressing scheme and has the following advantages over IPv4. </li></ul>
  317. 413. <ul><li>It has an addr of 128 bits compared to the 32 bits addr space of IPv4. </li></ul><ul><li>It has better header format. </li></ul><ul><li>Its header has more fields for additional functionality. </li></ul><ul><li>It can be extended if required by new technologies. </li></ul><ul><li>Encryption and authentication options add more confidentiality and integrity to the packet. </li></ul>
  318. 416. <ul><li>TRANSPORT LAYER </li></ul>
  319. 417. CONGESTION CONTROL <ul><li>Congestion occurs in a network if the traffic load on the network is greater than the capacity of the network. </li></ul><ul><li>Such a situation decreases the quality of services that the network provides by increasing delay time and discarding of data packets. </li></ul><ul><li>Congestion is related to delay and throughput of the network </li></ul>
  320. 420. QUALITY OF SERVICE <ul><li>Quality of service is closely related to congestion control and vice versa. </li></ul><ul><li>It refers to how efficiently the data packets submitted to the network pass through it. </li></ul><ul><li>It is directly dependent on the flow of the data and its characteristics. </li></ul>
  321. 421. TECHNIQUES TO IMPROVE QoS <ul><li>Scheduling </li></ul><ul><li>Traffic Shaping </li></ul>
  322. 422. Scheduling <ul><li>Here we try develop techniques to schedule the data packets in such a way that they can be processed efficiently with minimum delay. </li></ul><ul><li>There are two techniques used for this: </li></ul><ul><ul><li>FIFO </li></ul></ul><ul><ul><li>Weighted Fair Queuing </li></ul></ul>
  323. 423. <ul><li>FIFO: </li></ul><ul><li>Here all the arriving packets are stored in a buffer and are submitted to the network device (for example a router) in a first come first service basis. </li></ul><ul><ul><li>Weighted Fair Queuing: </li></ul></ul><ul><ul><li>Here different packets are given different priorities. All the arriving packets are stored in a buffer and the packets with high priority is processed first. </li></ul></ul>
  324. 424. Traffic Shaping <ul><li>Here the effort is to control the traffic in the network. </li></ul><ul><li>The most common approach for this is the ‘leaky bucket’ technique. </li></ul>
  325. 427. <ul><li>Apart from these two other techniques that are employed are </li></ul><ul><ul><li>Admission Control </li></ul></ul><ul><ul><li>Resource Reservation </li></ul></ul>
  326. 428. Process to Process Delivery <ul><li>The network layer oversees the delivery of the packets between two hosts. </li></ul><ul><li>But at any point of time there are a number of processes running at every host. Hence it becomes important to make it sure that the packets must reach the intended process only. </li></ul><ul><li>This is called process to process delivery and is overseen by the transport layer. </li></ul>
  327. 429. <ul><li>This objective is accomplished by providing each process with an unique address called the ‘Port ID’ that are numeric and range in between </li></ul><ul><li>0-65,535. </li></ul><ul><li>Process that run on the server side are assigned with universal port numbers, and are called ‘Well-known ports’ . </li></ul><ul><li>The body that controls the distribution and naming of ports is IANA (Internet Assigned Numbers Authority) </li></ul>
  328. 430. IANA Ranges Type Range Description Well Known Ports 0-1023 Assigned and controlled by IANA Registered Ports 1024-49,151 Not assigned by IANA but can be registered with it to prevent duplication Dynamic Ports 49,152-65,535 Neither assigned nor registered with IANA
  329. 431. User Datagram Protocol <ul><li>It is an unreliable, connectionless protocol that provides almost no error checking facility. </li></ul><ul><li>It adds no extra service to the network layer except providing it with process to process delivery mechanism. </li></ul><ul><li>In spite of its’ backdrops it is still widely used because of its’ simplicity and low requirement of resources. </li></ul><ul><li>UDP packets are called User Datagrams and have a fixed size header of 8 bytes. </li></ul>
  330. 432. User Datagram Format
  331. 433. Transmission Control Protocol <ul><li>It is connection oriented reliable but very complex protocol. </li></ul>
  332. 434. TCP Services <ul><li>Stream Delivery Service </li></ul><ul><li>Sending and Receiving Buffers </li></ul><ul><li>Bytes and Segments </li></ul><ul><li>Connection Oriented Full Duplex Services </li></ul>
  333. 435. Stream Delivery Service
  334. 436. Bytes and Segments & Sending and Receiving Buffers
  335. 437. <ul><li>APPLICATION LAYER </li></ul>
  336. 438. Client Server Model <ul><li>  Client/server describes the relationship between two computer programs in which one program, the client, makes a service request from another program, the server, which fulfills the request. </li></ul><ul><li>In a network, the client/server model provides a convenient way to interconnect programs that are distributed efficiently across different locations. </li></ul>
  337. 439. <ul><li>For example, to check your bank account from your computer, a client program in your computer forwards your request to a server program at the bank. </li></ul><ul><li>That program may in turn forward the request to its own client program that sends a request to a database server at another bank computer to retrieve your account balance.  </li></ul>
  338. 440. <ul><li>The balance is returned back to the bank data client, which in turn serves it back to the client in your personal computer, which displays the information for you. </li></ul><ul><li>Relative to the Internet, your Web browser is a client program that requests services (the sending of Web pages or files) from a Web server (which technically is called a Hypertext Transport Protocol or HTTP server) in another computer somewhere on the Internet.  </li></ul>
  339. 442. <ul><li>To truly understand how much of the Internet operates, including the Web, it is important to understand the concept of client/server computing. The client/server model is a form of distributed computing where one program (the client) communicates with another program (the server) for the purpose of exchanging information. </li></ul>
  340. 443. <ul><li>The client's responsibility is usually to: </li></ul><ul><li>Handle the user interface. </li></ul><ul><li>Translate the user's request into the desired protocol. </li></ul><ul><li>Send the request to the server. </li></ul><ul><li>Wait for the server's response. </li></ul><ul><li>Translate the response into &quot;human-readable&quot; results. </li></ul><ul><li>Present the results to the user. </li></ul>
  341. 444. <ul><li>The server's functions include: </li></ul><ul><li>Listen for a client's query. </li></ul><ul><li>Process that query. </li></ul><ul><li>Return the results back to the client </li></ul>
  342. 445. <ul><li>A typical client/server interaction goes like this: </li></ul><ul><li>The user runs client software to create a query. </li></ul><ul><li>The client connects to the server. </li></ul><ul><li>The client sends the query to the server. </li></ul><ul><li>The server analyzes the query. </li></ul><ul><li>The server computes the results of the query. </li></ul><ul><li>The server sends the results to the client. </li></ul><ul><li>The client presents the results to the user. </li></ul><ul><li>Repeat as necessary </li></ul>
  343. 447. Domain Name System <ul><li>The Domain Name System (DNS) helps users to find their way around the Internet. Every computer on the Internet has a unique address – just like a telephone number – which is a rather complicated string of numbers. It is called its &quot;IP address”. </li></ul>
  344. 448. <ul><li>But it is hard to remember everyone's IP address. The DNS makes it easier by allowing a familiar string of letters (the &quot;domain name&quot;) to be used instead of the arcane IP address. So instead of typing, you can type It is a &quot;mnemonic&quot; device that makes addresses easier to remember. </li></ul>
  345. 449. <ul><li>Translating the name into the IP address is called &quot;resolving the domain name.&quot; The goal of the DNS is for any Internet user any place in the world to reach a specific website IP address by entering its domain name. Domain names are also used for reaching e-mail addresses and for other Internet applications. </li></ul>
  346. 450. Working <ul><li>In an Internet address – such as – the .org part is known as a Top Level Domain, or TLD. So-called &quot;TLD registry&quot; organizations house online databases that contain information about the domain names in that TLD. The .org registry database, for example, contains the Internet whereabouts – or IP address – of So in trying to find the Internet address of your computer must first find the .org registry database. </li></ul>
  347. 451. How is this done? <ul><li>At the heart of the DNS are 13 special computers, called root servers. They are coordinated by ICANN and are distributed around the world. All 13 contain the same vital information – this is to spread the workload and back each other up. </li></ul>
  348. 452. <ul><li>The root servers contain the IP addresses of all the TLD registries – both the global registries such as .com, .org, etc. and the 244 country-specific registries such as .fr (France), .cn (China), etc. This is critical information. If the information is not 100% correct or if it is ambiguous, it might not be possible to locate a key registry on the Internet. In DNS parlance, the information must be unique and authentic. </li></ul>
  349. 453. <ul><li>Scattered across the Internet are thousands of computers – called &quot;Domain Name Resolvers&quot; or just plain &quot;resolvers&quot; - that routinely cache the information they receive from queries to the root servers. These resolvers are located strategically with Internet Service Providers (ISPs) or institutional networks. They are used to respond to a user's request to resolve a domain name – that is, to find the corresponding IP address. </li></ul>
  350. 454. <ul><li>So a user's request to reach, the request is forwarded to a local resolver. </li></ul><ul><li>The resolver splits the request into its component parts. It knows where to find the .org registry – remember, it had copied that information from a root server beforehand – so it forwards the request over to the .org registry to find the IP address of </li></ul><ul><li>This answer is forwarded back to the user's computer. And we're done. It's that simple! The domain name has been &quot;resolved&quot;! </li></ul>
  351. 455. <ul><li>Why do we need the resolvers? Why not use the root servers directly?  </li></ul>
  352. 458. File Transfer Protocol <ul><li>  FTP is a standard network protocol used to copy a file from one host to another over a TCP/IP-based network, such as the Internet. FTP is built on a client-server architecture. </li></ul><ul><li>FTP is most commonly used to download a file from a server using the Internet or to upload a file to a server (e.g., uploading a Web page file to a server). </li></ul>
  353. 459. Working <ul><li>FTP uses two connections for two ports and takes the help of TCP. </li></ul><ul><li>A client makes a connection to the server on TCP port 21. This connection, called the  control connection , remains open for the duration of the session, with a second connection, called the  data connection , on port 20 opened as required to transfer file data. </li></ul>
  354. 460. <ul><li>The control connection is used to send administrative data (i.e., commands, identification, passwords). </li></ul><ul><li>he server responds on the control connection with three digit status codes in ASCII with an optional text message, for example &quot;200&quot; (or &quot;200 OK.&quot;) means that the last command was successful. The numbers represent the code number and the optional text represent explanations (i.e., <OK>) or needed parameters (i.e., <Need account for storing file>) </li></ul>
  355. 461. <ul><li>  A file transfer in progress over the data connection can be aborted using an interrupt message sent over the control connection. </li></ul>
  356. 462. <ul><li>While transferring data over the network, four data representations can be used: </li></ul><ul><li>ASCII mode: used for text. Data is converted, if needed, from the sending host's character representation to &quot;8-bit ASCII&quot; before transmission, and (again, if necessary) to the receiving host's character representation. As a consequence, this mode is inappropriate for files that contain numeric data in binary, floating point or binary coded decimal form. </li></ul>
  357. 463. <ul><li>Image mode (commonly called Binary mode): the sending machine sends each file byte for byte and as such the recipient stores the bytestream as it receives it. (Image mode support has been recommended for all implementations of FTP). </li></ul><ul><li>EBCDIC mode: use for plain text between hosts using the EBCDIC character set. This mode is otherwise like ASCII mode. </li></ul><ul><li>Local mode: Allows two computers with identical setups to send data in a proprietary format without the need to convert it to ASCII </li></ul>
  358. 464. <ul><li>Data transfer can be done in any of three modes: </li></ul><ul><li>Stream mode: Data is sent as a continuous stream, relieving FTP from doing any processing. Rather, all processing is left up to TCP. No End-of-file indicator is needed, unless the data is divided into records. </li></ul><ul><li>Block mode: FTP breaks the data into several blocks (block header, byte count, and data field) and then passes it on to TCP. </li></ul><ul><li>Compressed mode: Data is compressed using a single algorithm (usually Run-length encoding). </li></ul>