Like this presentation? Why not share!

# CCN

## by NICE on Jun 16, 2010

• 840 views

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 ...

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 sambit_khuas@yahoo.co.in

### Views

Total Views
840
Views on SlideShare
840
Embed Views
0

Likes
0
23
0

No embeds

### Categories

Uploaded via SlideShare as Microsoft PowerPoint

## CCNPresentation Transcript

• CCN TCP/IP
• SIGNALS
• TYPES OF SIGNALS
• ANALOG
• DIGITAL
• PERIODIC
• NONPERIODIC
• ANALOG SIGNALS
• 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
• PERIODIC
• A signal is periodic if it repeats itself after a fixed period T.
• NON-PERIODIC SIGNAL
• A signal is periodic if it does not repeats itself after a fixed period T.
• ANALOG PERODIC SIGNAL
•
• ANALOG NON-PERIODIC SIGNAL
• FREQUENCY
• 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.
•
• TIME PERIOD
• The time taken to complete one cycle by a wave.
• T= 1/f
• Amplitude  is the magnitude of change in the oscillating variable, with each oscillation, within an oscillating system.
• WAVELENGHT
• The distance between peaks (high points) is called wavelength.
•
• PHASE
•   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.
•
•
• TIME AND FREQUENCY DOMAIN
• 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
•
• COMPOSITE SIGNAL
• A signal that is made up of signals of more than one frequency.
•
• BAND WIDTH
•   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.
•
• DIGITAL SIGNALS
• 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.
• 2 LEVEL DIGITAL SIGNAL
• 6 LEVEL DIGITAL SIGNAL
• BIT RATE
• 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
• BIT DURATION
• The time taken to transmit one bit of data.
• BIT LENGHT
• The distance that one bit occupies in a transmission medium.
• Bit Length= bit duration x speed
• CHANNELS
• 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.
• Types:-
• High pass.
• Low pass.
• Band pass.
• High Pass Channel
• Low Pass Channel
• Band Pass Channel
• OSCILLOSCOPE
•
• DIGITAL COMMUNICATION
• 1) BASE BAND
• BASEBAND
• The digital signal is transmitted over a low pass channel without converting it into analog signal.
• This type of transmission is required when we have a low pass band with a very high bandwidth.
• The digital signal is transmitted over a band-pass channel only after converting it into analog form.
• When the available channel is band pass then we cannot transmit the digital signal directly. We have to then transform it into anolog format.
• The transformation of a digital signal to analog is called modulation and the reverse process is called de modulation.
• FEATURES OF DIGITAL TRANSMISSION.
•   Less expensive
• More reliable
• Easy to manipulate
• Flexible
• Compatibility with other digital systems
• Only digitized information can be transported through a noisy channel without degradation
• Sampling Error
• Digital communications require greater bandwidth than analogue to transmit the same information.
• The detection of digital signals requires the communications system to be synchronized, whereas generally speaking this is not the case with analogue systems.
• FEATURES OF ANALOG
• Uses less bandwidth
• More accurate
• The effects of random noise can make signal loss and distortion impossible to recover
• WHEN TO USE WHAT?
• 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.
• But if we have a band pass channel then we have to use analog transmission.
• TRANSMISSION IMPAIRMENT
• The signal does not reach the receiver in the desired shape. i.e what is not is not received.
• TRANSMISSION IMPAIRMENT
Attenuation Distortion Noise
• Attenuation
• It is the gradual loss in intensity of any kind of signal through a medium.
• Signal After Attenuation
• Distortion
• The signal changes its shape. It normally happens in composite signals where the different signals get out of phase.
•
•
• Noise
• Unwanted impurities added to signal.
• Several types of noise like thermal noise, induced noise, cross talk, magnetic noise etc can corrupt a signal.
•
• DIGITAL TRANSMISSION
• Schemes and techniques that can be used to transmit digital signal over a medium.
• Line coding (conversion of binary to digital signals)
• How to increase the efficiency of line coding.
• Sampling (i.e. analog to binary conversion)
• Serial and Parallel transmission.
• LINE CODING
• 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.
•
• Signal Level Vs Data Level
• 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’.
• 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’.
• 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.
• Bitrate= Pulserate x log 2 L
• Self Synchronization
• 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.
• Here the sender sends 10110001. but the receiver gets 110111000011.
• Line coding Schemes
• Unipolar
• 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.
•
• Polar
• 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.
• There are four major types of polar encoding.
•
• Here the signal is always either +ve or –ve but never zero. There are two popular NRZ schemes.
• NRZ-L
• NRZ-I
• NRZ - L
• Here a positive voltage is used to represent 1 and a –ve one to represent 0.
• 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.
• NRZ-I
• 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.
• Because of this transition in voltage the receiver can easily understand the arrival of 1s and hence can synchronize it’s clock.
•
• 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.
• This approach is more efficient than NRZ because here both the bits and the synchronization is represented by the voltage transitions.
•
• The major disadvantage of this scheme is that it requires two signal changes per bit and hence requires more band width.
• MANCHESTER
• 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.
•
• Differential Manchester
• 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.
•
• BIPOLAR
• 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.
• The most popular Bipolar encoding schemes are:-
• AMI
• 2B1Q
• MLT-3
• AMI (Alternate Mark Inversion)
• 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.
•
• 2B1Q
• This encoding scheme is similar to NRZ-L but it has four voltage levels hence two bits can be represented by each pulse.
•
• MLT-3
• It is very similar to NRZ-I with the difference that it has three voltage levels.
•
• BLOCK CODING
• 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.
• There are three steps in block coding:
• Division
• Substitution
• Line coding
• DIVISION
• In this step the sequence of bits to be transmitted is divided into a series of equal size groups of m bits.
• SUBSTITUTION
• 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 .
• 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.
• LINE CODING
• After substitution the coded bits are transformed into signals using any of the line coding schemes.
• Some common block codes are:-
• 4B/5B
• 8B/10B
• 8B/6T
• SAMPLING
• In signal processing,  sampling  is the reduction of a continuous signal to a discrete signal.
• 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.
•
• 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
• Quantization
• Quantization refers to the process of approximating the continuous set of values in the data with a finite (preferably small) set of values.
• 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
• Quantized Digital Signal
• TRANSMISSION MODES
• PARALLEL TRANSMISSION
• 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.
• 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.
•
• SERIAL TRANSMISSION
• 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.
• Serial transmission can be either synchronous or  asynchronous .
•
• 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.
•
• 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.
•
• CHAPTER 5
• ANALOG TRASNMISSION
• We know that…
• Digital transmission requires a low pass channel.
• Analog transmission requires a band pass channel.
• Digital transmission is more efficient but we cannot always have digital transmission.
• We will further discuss…
• The exact definition of modulation.
• Modulation of binary data.
• Modulation of analog signals.
• Modulation
• The process of varying some characteristic of a periodic wave with an external signals.
• Modulation is utilized to send an information bearing signal over long distances.
• Types of Modulation
• Amplitude Modulation
• Frequency Modulation
• Phase Modulation
• Digital modulation
• It is the process of changing some characteristics of an analog signal based on the information from some digital signal.
• 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.
• Why is it needed?
• Digital transmission even though is efficient still it has some limitations. Hence we need to employ analog transmission.
• 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.
• Techniques for digital modulation
• Bit Rate Vs Baud Rate
• Bit Rate
• Baud Rate is the number of signal units per second required to transmit these bits.
• The actual definition of baud rate is the number of times per second a signal in a communications channel changes.
• Bit rate= baud rate x no of bits per second
•
• Carrier signal
• 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
• Amplitude-shift keying
• It is a form of modulation that represents digital data as variations in the amplitude of a carrier wave.
• 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.
•
• Frequency-shift keying
• It is a frequency modulation scheme in which digital information is transmitted through discrete frequency changes of a carrier wave.
•
• Phase-shift keying
• Phase-shift keying (PSK) is a method of digital communication in which the phase of a transmitted signal is varied to convey information.
•
• It is a technique that combines both ASK and PSK to get more efficient modulation.
•
• ANALOG SIGNAL MODULATION
•
• Amplitude modulation
• 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.
• Here the band width of the modulated signal is twice that of the modulating signal.
•
•
• Frequency Modulation
• 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.
• Here the band width of the modulated signal is ten times that of the modulating signal.
•
• Phase modulation
• It is a form of modulation that represents information as variations in the instantaneous phase of a carrier wave.
• 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
•
• CHAPTER 6
• MULTIPLEXING
• 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.
• The process of recovering the signals at the receiver’s end includes the separation of the different signals and is called Demultiplexing .
• Why is it required?
• 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.
•
• FDM
• 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.
• Guard bands
• 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.
• 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)
• Step 1 (Multiplexing):-
• In this process we take the signals generated by all the devices in view and then frequency modulate each signal individually into different frequencies.
• 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.
•
•
•
• Uses
• FDM finds applications in several communication systems like telephony systems, cellular systems, radio broadcast etc.
• The most wide and appealing application of FDM is the analog hierarchy that is used in case of telephone communication systems.
• Analog Hierarchy
• Here multiplexing is done in several stages to obtain higher band widths from lower band widths.
• 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.
•
• WDM
• It is a technology which multiplexes
• Multiple  optical carrier signals on a single optical fiber by using
• 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.
•
• TDM
• 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.
•
•
• The Process of TDM
• The data flow of each connection is divided into a number of equal length units.
• One unit of each connection is combined to form a frame.
• For ‘n’ connections a frame is divided into ‘n’ slots.
• 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’.
• Inerleaving
• It is the process with the help of which TDM works.
• We can visualize the entire TDM setup as a combination of two switches that work synchronized but in opposite directions.
•
• 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.
• This process is called interleaving.
• Here synchronization of the switch is very important because without it the entire setup would run into errors.
• Framing bits
• To ensure synchronization an extra bit called ‘framing bit’ is often added to the frames.
•
• When we are connecting devices with different time rates then different connections take different time slots.
• For example let us consider a frame consisting of ‘6’ time slots and connecting ‘3’ devices ‘a’, ‘b’ and ‘c’.
• Let the data rate of ‘a’ be thrice that of ‘c’ and the data rate of ‘b’ be twice that of ‘c’.
• Then we have to allocate three slots to ‘a’, two slots to ‘b’ and one slot to ‘c’.
• Now let us assume that in the previous case the data rate of ‘a’ is 2.5 times that of ‘c’.
• Then it is not possible to allocate ‘a’ with 2.5 time slots. Therefore we have to change this 2.5 into 3.
• This we can do by attaching some extra bits to it. This process is called bit padding
• Hence we can conclude that bit padding is the process of attaching extra bits to a data unit to make it an integer.
• Uses of TDM
• TDM is used by telephone companies through a hierarchy of digital signals called ‘Digital Signal Service’
•
• T-Lines
• To employ DSS at it’s various levels telephone companies use lines called ‘T-Lines’.
• There are four types of T-Lines, ranging from T-1 to T-4.
• Each type of line is used to carry signals at a specific level of the DSS.
• In Europe there is a similar set of lines used called E-Lines
•
• CHAPTER 8
• CIRCUIT SWITCHING
• Switching
• It is the process of establishing a connection between two communicating devices.
• Such connections are normally temporary and are established only when required and are broken after the communication is over.
• Why do we need switching?
• When we want to connect multiple devices then the easiest option is to connect them in a mesh topology.
• But this technique is very expensive and impractical when we want to connect a large number of devices.
• It is impractical because a mesh provides a dedicate link between every device and every other device which is always not required.
• Because seldom it happens that every device wants to communicate at the same time to every device.
• 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.
• To obtain this we require switching.
• Types of switching
• There are three main types of switching:
• 1) Circuit Switching
• 2) Packet switching
• 3) Message switching
• Circuit switching
• It creates a direct physical connection between two devices.
•
• Hence a circuit switch is a device that establishes a connection between ‘n’ input and ‘m’ output devices.
• The number of devices on the input and out put side do not need to be the same.
• Types of Circuit switching
• There are two types of circuit switching.
• Space-Division switch
• Time-Division switch
• Space-Division switch
• Here the paths in the circuit are separated from each other spatially. i.e they are physically separate from each other.
• In other words no two devices can have the same path of communication.
• Types of Space-Division Switching
• 1) Crossbar switch
• 2) Multistage switch
• Crossbar switch
• It is a switch that connects ‘n’ inputs to ‘m’ outputs in the form of a grid of connections in a matrix manner.
•
• The points of intersection of the links are called cross-points.
• Each cross-point has a very miniature switch that opens or closes according to requirement.
• Hence if there are ‘m’ inputs and ‘n’ outputs then we require ‘mxn’ number of crosspoints with switches.
• 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.
•   In addition to offering more flexibility, a cross-bar switch environment offers greater scalability than a bus environment.
• 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.
• 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.
• Multistage switch
• A multistage switch overcomes the limitations of crossbar switches by combing a number of crossbar switches.
• In multistage switches the devices are connected to switches which in turn are connected to other switches.
• The output of every device in any stage should be connected to the inputs of every device of the next stage.
•
• Suppose we want to connect 15 input connections to 15 output connections.
• Then by using a single grid of crossbar switch we need to have 225 (15x15) cross-points.
• Now let us make the same connection using three level multistage switches.
• Hence in the first we have three switches each having ‘5’ inputs and ‘2’ outputs.
• 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.
• Similarly the second stage switches have ‘18’ cross points.
• The third stage switches have again ‘30’ cross-points.
• Hence the total number of cross-points required are ‘30+18+30’=‘78’.
• 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.
• One more advantage of multistage switch is, it provides us with multiple paths between two devices
• Blocking
• The employment of multistage switches reduces costs substantially but this comes with a price.
• In such a design we very often face a problem called blocking at the times of heavy traffic.
• Blocking is the situation when an input cannot be connected to an output because all the possible paths are occupied by other connections.
• Time division switch
• It employs TDM for switching.
• There are two types of TDS:
• Time –Slot interchange
• TDM Bus
• Time –Slot interchange
• Let us assume that we want to connect ‘4’ input devices to ‘4’ output devices.
• Let the devices be connected in the following order.
• 1 3
• 2 4
• 3 1
• 4 2
• Then just TDM will not work because TDM will connect the devices sequentially.
• Therefore we need to use a ‘time slot interchanger’ (TSI).
• 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.
•
• Working of TSI
• TSI works with the help of two different switches (one sequential and the other one selective) and a dynamic memory (RAM).
• The RAM is connected to the input with the sequential switch and to the output with the selective switch.
• Data comes to the RAM in a sequential manner and gets stored there.
• Then the selective switch closes according to the requirement and the data from the RAM gets transferred to the receiver devices.
•
• TDM Bus
• It is a very simple technique where all the input lines are connected to all the output lines using a shared connection.
• Each i/p and o/p line has a switch to turn it on or off.
• At any point of time only one pair of i/p and o/p are closed so that the devices can communicate.
•
• It requires no cross-points and reutilization of the link is more.
• Because of the need of either storing or retrieving of data or synchronized switching mechanism this is a bit slow process.
• Space-Time Division Switching
• We can combine the advantages of both the schemes and create an optimized technique for switching.
•
• APPLICATION TRANSPORT NETWORK DATALINK PHYSICAL
• The Datalink layer is the second most lowest layer of the TCP/IP protocol suite.
• It lies between the Network and the Physical layer.
• Functions…
• Hop to hop delivery of packets.
• Error detection and correction.
• Medium access and control.
• Chapter 9
• Error Detection
• and
• Correction
• 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.
• This is because errors creep in due to many reasons that are beyond our control.
• Hence we need to have schemes to let us know when an error has occurred and how to rectify it.
• Types of errors
• There are two types of errors:
• Single bit errors
• Burst errors
•
• In single bit error only one bit of the data packet is corrupt.
• It is the most unlikely type of error and normally happens in parallel transmission.
• Burst error
• In burst error more than one bit are corrupt.
• The length of a burst is calculated from the first corrupt bit to the last corrupt bit.
•
• Error detection
• If we want to rectify errors then first of all we should be able to know that an error has occurred.
• To do this we employ a few error detection techniques.
• Redundancy
• Redundancy is the presence of extra bits in a data packet.
• We add extra bits with the data to help us identify the presence of errors.
• Double transmission
• One error detection mechanism is to transmit every packet of data twice.
• By doing this we can definitely identify errors that are present but it would be too costly and slow a process.
• Hence we need to devise other techniques to trace errors.
• All the given method use redundant bits to detect errors.
•
• Parity check
• Parity is the information about the number of 1s present in a data packet.
• If the total number of 1s in the packet is odd then we call it an odd parity and is represent it as ‘1’.
• Otherwise we call it even parity and represent it as ‘0’
• 110001110
• Total number of 1s is ‘5’. Hence the packet has odd parity ‘1’.
• 11001100011
• Total number of 1s is ‘6’. Hence the packet has even parity ‘0’.
• The process
• Calculate the parity of the packet.
• Append the parity representation to the packet.
• Transmit the packet.
• On receiving check if the total number of 1s is even or not.
• If even then drop the parity bit and accept the data.
• If odd then reject the packet.
•
• To calculate and add the parity bit we pass the data through a special unit called a parity generator.
• Performance
• A simple parity check can detect single bit errors.
• It can also detect burst errors as long as the number of corrupt bits is odd.
• Two-dimensional parity check
• This approach was devised to overcome the limitations of a simple parity check.
• Here data bits are arranged in table.
• The parity for every row as well as for every column is calculated.
• The packets are appended with their row parity as in simple parity check.
• The column parities are arranged in form of a packet and are transmitted following the original packets.
•
• This approach helps us nab burst errors by looking at the column parities and then comparing them with the number of 1s per column.
• Using this approach we can also find out the exact position of a single bit error.
• Cyclic Redundancy Check
• It is the most powerful of all the error detection techniques based on redundancy.
• It is based on binary division.
• Here instead of adding only the parity bit, we append the data unit with a series of bits called the ‘CRC’
• Process
• 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’.
• The original data bits (O) are then appended with ‘n-1’ number of zeros.
• Then we do binary division O/D and get reminder ‘CRC’.
• We then replace the appended zeros with this reminder.
• By doing this we convert ‘O’ to a stream that is purely divisible by our pre-determined divisor ‘D’.
• Then the data is transmitted and at the receiving end it is again divided by the same pre-determined divisor.
• If the reminder is ‘0’ then there are no errors. Otherwise the data is corrupt somewhere and is rejected.
• The process of reckoning and appending the CRC is done by a unit called a CRC generator.
• The CRC generator carries out ‘modulo 2’ division to find out the CRC.
• At the receiving end the CRC checker also follows a similar process to check for the packet’s integrity.
• Example
• Let us assume that we want to transmit the following unit of data (O):
• 100100.
• Let the predetermined divisor be 1101 (D).
• Then we need to append three zeros to ‘O’.
• And then divide the result with ‘D’.
• The reminder we obtain will be the CRC.
•
• 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.
•
• Polynomials
• In real practice we represent the pre-determined divisor in the form of polynomials.
• This we do for two reasons:
• It is short representation.
• It is easy to calculate polynomials than binary data.
• Example
• 1000100
• will be represented as:
• X 6 +x 2
• Checksum
• This process also uses the concept of redundancy but in a different manner.
• Here the entire data unit is divided into small segments of equal size (say ‘n’).
• These segments are then added using 1’s compliment.
• 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.
• The task of generating and transmitting the checksum is done on the sender side and is done by a unit called the checksum generator.
• 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.
• Checksum checker
• The data packet is divided into segments of ‘n’ bits.
• All the segments are added up.
• The sum thus obtained is the added with the ‘checksum’.
• If the data is error free the result of the above step will be zero.
• Otherwise it will be non-zero.
• Error correction
• Error correction is more a complicated activity than error detection.
• This requires more sophisticated techniques and more mathematical operations.
• Error correction by Retransmission
• Retransmission is one simple technique than can be employed to deal with errors.
• 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.
• Many different schemes are used to do this.
• Forward error correction
• This is the second approach to handle errors.
• The receiver here instead of demanding the retransmission of the corrupt packet, tries to find out the position of the error and correct it.
• Let us start with the simplest of all errors. i.e single bit errors.
• We know that to detect a single bit error we can use one redundant bit.
• This we can do because here we want to differentiate between two states:
• error/no-error.
• 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 .
• But when we want to rectify an error then we need to find out the exact location of the error.
• Using only one redundant bit here is not enough.
• Consider the following data packet:
• 1110011
• 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.
• 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.
• Hence we want eight different states to represent:
• Error at position 1 2) Error at position 2
• Error at position 3 4) Error at position 4
• ……… 8) No error
• Hence we can conclude that for a data packet of 7 bits we require ‘3’ redundant bits that can have 8 different states.
• But what if the redundant bits themselves become corrupt?
• We therefore need a redundant bit stream that can have enough states to detect errors in the original data as well as in itself.
• Let us suppose we have a data packet of ‘k’ bits.
• Let our redundant data stream be of ‘r’ bits.
• Here we want this stream to have at least
• K+r+1 states.
• But ‘r’ bits can have a maximum of 2 r states.
• Hence we can have the following relation between ‘r’ and ‘k’
• 2 r ≥ k+r+1
• Where ‘k’ is the number of bits in the original data and ‘r’ is the number of bits in the redundant bit stream.
• So for a packet of seven bits k=7 and we can calculate ‘r’ in the following way:
• 2 r ≥ 7 + r + 1
• Or
• r = 4
• This concept provides the basis for many error correction mechanisms.
•
• Hamming code
• The hamming code uses the data and redundant bit length relationship.
• First the number of required redundant bits is calculated.
• 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…)
• Each redundant bit is in charge of some specific bits of the packet.
• 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.
• K = 8, r = 4
•
•
• How to determine which redundant bit will take care of which bits?
• Calculating the values of redundant bits
• Every redundant bit represents the parity value of the combination of bits it is in charge of.
• Consider the code 1001101.
• Then we have to place four redundant bits at positions 1,2,4 and 8.
• The following will be the bits that will be placed in these positions.
•
• At the receiver’s end the receiver recalculates the parity of every redundant bit and it’s data bits.
• Then it assembles the new parity values in the order ‘r8,r4,r2,r1’ to form a binary number.
• The decimal value of this binary number gives the exact location of the error.
• Example
• Let us consider in the previous packet the bit number ‘7’ gets corrupt.
• i.e. it’s value changes from ‘1’ to ‘0’.
•
• Burst error correction
• Flow
• and
• Error Control
• Flow control
• 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.
• Need of Flow Control
• 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.
• 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.
• Error Control
• Error control involves both error detection and error correction.
• Error correction in most often done by retransmission.
• 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.
• Stop and Wait ARQ
• It is the simplest kind of automatic repeat-request (ARQ) method.
• 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.
• For identification purpose both data and acknowledgment frames are numbered alternately ‘1’ and ‘0’.
• After receiving a good frame, the receiver sends an ACK.
• If the receiver receives a damaged frame or it receives a frame that is out of order then it does not send any acknowledgement.
• If the ACK does not reach the sender before a certain time, known as the timeout, the sender sends the same frame again.
• Operation
• Lost/Damaged Frames
• Lost ACK
• Delayed ACK
• Stop-wait-ARQ is a slow process and also suffers from inefficient use of bandwidth.
• Therefore we need to have a protocol that can handle frame transmission with greater efficiency and speed.
• ‘ Go-Back-N-ARQ’ and ‘Selective Repeat ARQ’ are two such protocols.
• GO BACK-N ARQ
• In this protocol the sender can send a specific number of frames (w) before getting an ACK.
• The frames are given sequence numbers depending on the capacity of the sequence header field.
• 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.
• Working
• The sender keeps a record of un-acknowledged frames in a window.
• 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.
• The size of the sender window is always less than or equal to 2 m -1 .
•
• The receiver also maintains a window of size ‘1’.
• The frame number in the window is the one it is expecting.
• If it gets the frame it is expecting then it places the window over the next expected frame and sends an acknowledgement.
• If it gets any frame other than it is expecting then it discards the frame and remains silent.
• When the sender doesn’t get an ACK within the specified time then it resends all the frames starting from the last unacknowledged one
•
• Control Variables
• The sender has three control variables S, S F , S L .
• S - the frame that is to be transmitted now.
• S F - the first frame of the window.
• S L - the last frame of the window.
• The size of the window is ‘W’ where W= S L - S F + 1
• The receiver has only one variable ‘R’ which holds the sequence number of the expected frame.
•
•
•
• ???
• Why is the sender window size less than or equal to 2 m -1?
• Let M=2
•
• Selective Repeat ARQ
• This protocol doesn't requires the buffering of all the sent frames.
• Here the receiver doesn't expect a specific frame, rather it expects a range of frames.
• 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.
•
• The sender window size can be maximum ‘ 2 m /2 ’.
• Let us take m=2.
• Then the sender window size should be maximum ‘2’.
• 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.
•
•
• Piggybacking
• HDLC
• 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.
• HDLC Operation Modes
• HDLC Operation Modes:
• Normal Response Mode (NRM)
• Asynchronous Balanced Mode (ABM)
• NRM
• 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.
• NRM
• ABM
• 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.)
• ABM
• HDLC FRAME
• In HDLC, data is organized into a unit (called a  frame ) and sent across a network to a destination that verifies its successful arrival.
• The HDLC protocol also manages the flow or pacing at which data is sent.
• HDLC Frame Format
• FLAG
• The 8 bit pattern &quot;01111110&quot; which signals the beginning and end of an HDLC frame.
•   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.
• 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.
• 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.
• FCS
• 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.
• 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.
• CONTROL
• 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
• INFORMATION
• This field carries user or system information. The size of this field is varible.
• Frame Classes
• In the HDLC protocol , three classes of frames are used :
• Unnumbered frames
• Information frames
• Supervisory frames
•
• I-Frames
• 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
•
• The least significant bit (first transmitted) defines the frame type. 0 means an I-frame.
• 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.
• 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.
• 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.
• The next three bits N(R) shows the value of ACK when piggybacking is used.
• S-Frames
• 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.
•
• The S-frame control field includes a leading &quot;10&quot; indicating that it is an S-frame.
• The next two bits represents one of the four types S-frames.
• Selective Reject (SREJ)
• This is followed by a 2-bit type, a poll/final bit.
• The last three bits N(R) correspond to the ACK and NAK values.
• Indicate that the sender is ready to receive more data (cancels the effect of a previous RNR).
• Acknowledge some packets and request no more be sent until further notice.
• Reject (01):
• Requests immediate retransmission of lost packets.
• Sent in response to an observed sequence number gap.
• Used for Go Back – N ARQ
• Selective Reject (11):
• Requests retransmission of only the frame.
• Used for Selective Repeat ARQ.
• U-Frames
• 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.
•
• The first 2 bits (11) mean it is a U-frame.
• The 5 type bits (2 before P/F bit and 3 bit after P/F bit) can create 32 different types of U-frame
• Some Common Commands
• MULTIPLE ACCESS
• In the previous chapter we assumed that there is a single dedicated link between two devices.
• 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.
• Such a situation is in which more than one device share the link is called Multiple Access.
•
• Random Access
• In this method every station has equal status. i.e. every station can transmit data without seeking permission from any other station.
• 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.
• When can the station access the medium?
• What can the station do if the medium is busy?
• How can the station decide if the communication is successful or not.
• What can the station do if there is an access conflict?
• Types of Random Access Methods
• ALOHA
• Here a base station acts as the central controller.
• Al the stations communicate via the base station.
•
• Pure ALOHA
• The first version of the protocol (now called &quot;Pure ALOHA&quot;) was quite simple:
• If you have data to send, send the data
• If the message collides with another transmission, try resending &quot;later&quot;
• 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.
•
• Vulnerable Time = 2 Ft
• Slotted ALOHA
• 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
• Vulnerable Time = Ft
• Carrier Sense Multiple Access  ( CSMA )
• 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.
• 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.
• 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.
• Types of CSMA
• Nonpersistent CSMA
• p-persistent CSMA
• Nonpersistent CSMA
• 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.
• 1-persistent CSMA
• Step 1 : If the medium is idle, transmit immediately
• Step 2 : If the medium is busy, continue to listen until medium    becomes idle, and then transmit immediately
•   (usually you stop transmission attempts after few tries)
• p - persistent   CSMA
• 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 )
• Step 2 : If the medium is busy, continue to listen until medium    becomes idle,  then go to  Step 1
• Step 3 : If transmission is delayed by one time slot, continue with  Step 1
• Carrier Sense Multiple Access With Collision Detection(CSMA/CD)
• In this method a station sends a frame and monitors the medium for collision.
• If there is no collision then the transmission is successful.
• 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.
• 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.
• For continuous collisions of a frame the ‘backoff delay’ is incremented.
• The backoff delay can be incremented for a limited number of times after which the transmission will be aborted.
•
• Carrier Sense Multiple Access With Collision Avoidance (CSMA/CA)
• This protocol is used for avoiding collisions.
• Here after an idle channel is sensed then the sender still waits for some time called Inter Frame Gap (IFG).
• Then after the IFG it again waits for a random time and then sends the frame.
• Is case of a collision it undergoes the backoff delay and retransmits the packet.
•
• Controlled Access
• Here the stations consult each other before transmitting a packet.
• There are three popular control access methods.
• Reservations
• Poll
• Token passing
• Reservations
• Here time is divided into intervals.
• In each interval there is a reservation frame that precedes the data frame.
• If there are ‘n’ devices then the reservation frame is also divided into ‘n’ fields.
• When a device wants to send some data then it sets its corresponding field to 1.
•
• Polling
• It works in topologies where one device acts as primary and all the other devices act as secondary.
• When the primary has something to send then it warns the secondary devices of the forthcoming transmission so that they can be ready.
• This is called ‘select’ .
• When the primary wants to get some data then it asks every device in turns if they have something to transmit.
• If a secondary has to transmit something then it sends its frame. If it has nothing to send then it send a NAK.
• This is called ‘ poll’ .
• Token Passing
• Here stations are arranged in the form of a logical ring.
• A token keeps on circulating in the link.
• When a device wants to send something then it takes the token and sends it’s data.
• After transmission the token is again relinquished.
• A device can keep the token for a limited period of time after which it is forced to realize it
•
• Wireless LAN
• 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.
• IEEE defines the wireless LAN using the standard 820.11.
• Architecture
• This standard defines two types of services.
• BSS (Basic Service Set)
• ESS (Extended Service Set)
• BSS
• The  basic service set  is the basic building block of an IEEE 802.11 wireless LAN .
• Here a single access point (AP) together with stations is called a BSS.
• An AP acts as a master to control the stations within that BSS.
• Each BSS is identified by a  BSSID .
• A BSS can also be formed without an AP. Such a BSS is called an Ad Hoc Network .
•
• ESS
• An ESS is a combination of more than BSS.
• Here the APs of all the BSS are connected using usually a wired LAN.
•
• The stations of one BSS can communicate within themselves without the help of APs.
• But to communicate with a station of another BSS they need to take the help of the APs.
• Station Mobility
• IEEE 802.11 defines three types of stations.
• No- Transition Mobility
• BSS- Transition Mobility
• ESS- Transition Mobility
• No- Transition Mobility : A station cannot move at all or can move only within the BSS.
• BSS- Transition Mobility : A station can move in only one ESS.
• ESS- Transition Mobility : A station can move within various ESS.
• Physical Layer Specifications
• FHSS
• Frequency-hopping spread spectrum  is a method of transmitting radio signals by rapidly switching a carrier among many frequency channels.
• 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.
•
• It uses the band of 2.4 GHz to 2.48GHz. This band is divided into 72 sub-bands.
• FSK is used for modulation.
• DSSS
• Direct Sequence Spread Spectrum is used for signal generation of 2.4 GHz.
• Here each bit is replaced by a stream of bits.
• Modulation is done through PSK.
•
• OFDM
• Orthogonal Frequency Division Multiplexing is used for signal generation of 5 GHz.
• 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.
• It uses PSK and QAM for modulation.
• HR-DSSS
• High Rate- DSSS is same as DSSS. The only difference is in the encoding scheme used.
• Here the encoding scheme used is CCK.
• OFDM-g
• This is a new and complex specification of OFDM that achieves higher data rates than OFDM.
• Virtual circuit-switching
• 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.
• 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.
• Packets are delivered in order, since they all take the same route;
• The overhead in the packets is smaller,  since there is no need for each packet to contain the full address;
• 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;
• Billing is easier,  since billing records need only be generated per call and not per packet.
• 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;
• 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.
• Frame Relay
• 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.
• Here the systems are connected through permanent or switched virtual circuits are extensively used for connecting LANs and WANs to the internet.
• Working
• Every switch here contains a table that has entry to help it rout the incoming packet to the destination machine.
• When a packet arrives then the switch looks into it’s table and sends the packet to the next device.
• To connect a LAN or WAN to the internet we require a router to be connected to the frame relay cloud.
•
• 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.
• 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.
• Asynchronous Transfer Mode
• 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.
• 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.
• 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.
• Why ATM…?
• 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.
• Hence ATM with cell-traffic was introduced.
• ATM Standards
• TU-T I.361 - Defines the ATM Layer functions.
• ITU-T I.363- Defines the ATM Adaptation Layer protocols.
• ITU-T I.610- Defines the ATM Operation and Maintenance (OAM) functions.
• The ATM Network
• 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
• ATM Interfaces
• Three types of interfaces exist in this diagram:
• User-to-Network Interface (UNI)
• Network-to-Network Interface (NNI)
• Inter-Carrier Interface (ICI)
• 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.
• The NNI exists between switches in a single public ATM network. NNIs may also exist between two private ATM switches.
• The ICI is located between two public ATM networks
• The ATM Cell
• Working
• End User 1 in Chicago wishes to transfer a data file to End User 2 in Los Angeles.
• 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).
• The Chicago telephone exchange, in turn, establishes contact with the public ATM network in Los Angeles (ATM Network 2).
• ATM Network 2 also establishes a virtual path from switch to switch within the network and with the Private ATM Switch at the destination.
• The private ATM network completes the virtual path by establishing a virtual channel with End User 2.
• At each interface in this network, a unique virtual path identifier (VPI) and virtual channel identifier (VCI) are established for this transmission.
• 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.
• End User 1 encapsulates the file in 53-byte cells, each with its unique VPI/VCI &quot;destination address&quot; in the header.
• These cells are streamed and sent across the UNI to the ATM network switch.
• 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.
• 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.
• 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.
• End User 2 then reconstructs the file from the sequential cells, stripping the 5-byte header from each cell.
• End User 1 or End User 2 terminates the call, i.e., &quot;hangs up,&quot; and the virtual path is dismantled.
• ATM supports voice, video and data allowing multimedia and mixed services over a single network.
• Data is transmitted in fixed length cells which gives it advantages over other methods of data transfer.
• Cable can be twisted-pair, coaxial or fiber-optic
• Ability to connect LAN to WAN
• Scalability
•   High speed Mbps and possibly Gbps.
• Fixed cell structure means that ATM can be readily switched by hardware without the inherent delays introduced by software switched and routed frames.
• New customer premises hardware and software are required.
• Presently the applications that can benefit from ATM such as multimedia are rare.
• Network Layer Protocols.
• There are numerous protocols used in the network layer.
• The major of which is the Internet Protocol or IP.
• But this protocol cannot single handedly do all the required works. Hence it takes the help of few other protocols. Namely:
• ARP
• IGMP
• ICMP
• &
• RARP
• ARP
• The internet is a collection of interconnected networks of many types.
• 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.
• 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.
• This activity or correlating a physical address to its corresponding IP addr is called mapping and is done by the ARP.
• Steps Involved:-
• The sender sends an ARP broadcast packet to all the hosts.
• 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.
• Now when this reply reaches the sender then it can send the data packets to the intended receiver.
•
•
• IP
• It is a connectionless, unreliable and best effort protocol.
• Packets of the IP are called datagrams and contain two parts, ‘header’ and ‘data’.
• Fragmentation:
• 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.
• 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.
•
• ICMP
• The main two drawbacks of IP are:
• It does not provide any error checking or correction mechanism.
• It does not provide any host or management query.
• These two drawbacks are handled by using ICMP
• ICMP is a network layer protocol but it’s messages are not passed to the datalink layer directly.
• Instead they are first encapsulated in an IP datagram.
• In such a case the value of the field ‘protocol’ is set to ‘1’ to represent an ICMP message.
• Types of ICMP Messages
• There are two types of ICMP messages:
• Error Reporting
• Query
• Error Reporting Messages
• ICMP only reports errors to the original source. This is because it is the only source addr present in its’ header.
• There are four types of error messages:
• Destination Unreachable
• Source Quench
• Time Exceed
• Parameter Problems
• Redirection
• Destination Unreachable:
• When a router cannot route a datagram of the datagram is not delivered.
• Source Quench:
• 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.
• Time Exceed:
• When a datagram does not reach the destination in time then this message is transmitted.
• Parameter Problems:
• When some ambiguity in the header part is felt then the packet is discarded and this message is sent.
• Redirection:
• When a data packet due to some reason is sent to some host other than the desired one then this message is sent.
• IPv6
• It is the improved version of IPv4.
• It is a classless addressing scheme and has the following advantages over IPv4.
• It has an addr of 128 bits compared to the 32 bits addr space of IPv4.
• It has better header format.
• It can be extended if required by new technologies.
• Encryption and authentication options add more confidentiality and integrity to the packet.
•
•
• TRANSPORT LAYER
• CONGESTION CONTROL
• Congestion occurs in a network if the traffic load on the network is greater than the capacity of the network.
• Such a situation decreases the quality of services that the network provides by increasing delay time and discarding of data packets.
• Congestion is related to delay and throughput of the network
•
•
• QUALITY OF SERVICE
• Quality of service is closely related to congestion control and vice versa.
• It refers to how efficiently the data packets submitted to the network pass through it.
• It is directly dependent on the flow of the data and its characteristics.
• TECHNIQUES TO IMPROVE QoS
• Scheduling
• Traffic Shaping
• Scheduling
• Here we try develop techniques to schedule the data packets in such a way that they can be processed efficiently with minimum delay.
• There are two techniques used for this:
• FIFO
• Weighted Fair Queuing
• FIFO:
• 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.
• Weighted Fair Queuing:
• 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.
• Traffic Shaping
• Here the effort is to control the traffic in the network.
• The most common approach for this is the ‘leaky bucket’ technique.
•
•
• Apart from these two other techniques that are employed are
• Resource Reservation
• Process to Process Delivery
• The network layer oversees the delivery of the packets between two hosts.
• 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.
• This is called process to process delivery and is overseen by the transport layer.
• This objective is accomplished by providing each process with an unique address called the ‘Port ID’ that are numeric and range in between
• 0-65,535.
• Process that run on the server side are assigned with universal port numbers, and are called ‘Well-known ports’ .
• The body that controls the distribution and naming of ports is IANA (Internet Assigned Numbers Authority)
• 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
• User Datagram Protocol
• It is an unreliable, connectionless protocol that provides almost no error checking facility.
• It adds no extra service to the network layer except providing it with process to process delivery mechanism.
• In spite of its’ backdrops it is still widely used because of its’ simplicity and low requirement of resources.
• UDP packets are called User Datagrams and have a fixed size header of 8 bytes.
• User Datagram Format
• Transmission Control Protocol
• It is connection oriented reliable but very complex protocol.
• TCP Services
• Stream Delivery Service
• Sending and Receiving Buffers
• Bytes and Segments
• Connection Oriented Full Duplex Services
• Stream Delivery Service
• Bytes and Segments & Sending and Receiving Buffers
• APPLICATION LAYER
• Client Server Model
•   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.
• In a network, the client/server model provides a convenient way to interconnect programs that are distributed efficiently across different locations.
• 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.
• 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.
• 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.
• 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.
•
• 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.
• The client's responsibility is usually to:
• Handle the user interface.
• Translate the user's request into the desired protocol.
• Send the request to the server.
• Wait for the server's response.
• Translate the response into &quot;human-readable&quot; results.
• Present the results to the user.
• The server's functions include:
• Listen for a client's query.
• Process that query.
• Return the results back to the client
• A typical client/server interaction goes like this:
• The user runs client software to create a query.
• The client connects to the server.
• The client sends the query to the server.
• The server analyzes the query.
• The server computes the results of the query.
• The server sends the results to the client.
• The client presents the results to the user.
• Repeat as necessary
•
• Domain Name System
• 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”.
• 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 192.0.34.65, you can type www.icann.org. It is a &quot;mnemonic&quot; device that makes addresses easier to remember.
• 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.
• Working
• In an Internet address – such as icann.org – 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 icann.org. So in trying to find the Internet address of icann.org your computer must first find the .org registry database.
• How is this done?
• 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.
• 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.
• 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.
• So a user's request to reach icann.org, the request is forwarded to a local resolver.
• 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 icann.org.
• This answer is forwarded back to the user's computer. And we're done. It's that simple! The domain name icann.org has been &quot;resolved&quot;!
• Why do we need the resolvers? Why not use the root servers directly?
•
•
• File Transfer Protocol
•   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.
• 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).
• Working
• FTP uses two connections for two ports and takes the help of TCP.
• 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.
• The control connection is used to send administrative data (i.e., commands, identification, passwords).
• 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>)
•   A file transfer in progress over the data connection can be aborted using an interrupt message sent over the control connection.
• While transferring data over the network, four data representations can be used:
• 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.
• 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).
• EBCDIC mode: use for plain text between hosts using the EBCDIC character set. This mode is otherwise like ASCII mode.
• Local mode: Allows two computers with identical setups to send data in a proprietary format without the need to convert it to ASCII
• Data transfer can be done in any of three modes:
• 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.
• Block mode: FTP breaks the data into several blocks (block header, byte count, and data field) and then passes it on to TCP.
• Compressed mode: Data is compressed using a single algorithm (usually Run-length encoding).