464
CCN TCP/IP

CCN

  • Upload
    nice

  • View
    695

  • Download
    4

Embed Size (px)

DESCRIPTION

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 [email protected]

Citation preview

Page 1: CCN

CCN

TCP/IP

Page 2: CCN

SIGNALS

Page 3: CCN

TYPES OF SIGNALS• ANALOG• DIGITAL

• PERIODIC• NONPERIODIC

Page 4: CCN

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

Page 5: CCN

PERIODIC

• A signal is periodic if it repeats itself after a fixed period T.

Page 6: CCN

NON-PERIODIC SIGNAL

• A signal is periodic if it does not repeats itself after a fixed period T.

Page 7: CCN

ANALOG PERODIC SIGNAL

Page 8: CCN
Page 9: CCN

ANALOG NON-PERIODIC SIGNAL

Page 10: CCN

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.

Page 11: CCN
Page 12: CCN

TIME PERIOD

• The time taken to complete one cycle by a wave.

• T= 1/f

Page 13: CCN

• Amplitude is the magnitude of change in the oscillating variable, with each oscillation, within an oscillating system.

Page 14: CCN

WAVELENGHT

• The distance between peaks (high points) is called wavelength.

Page 15: CCN
Page 16: CCN

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.

Page 17: CCN
Page 18: CCN
Page 19: CCN

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

Page 20: CCN
Page 21: CCN

COMPOSITE SIGNAL

• A signal that is made up of signals of more than one frequency.

Page 22: CCN
Page 23: CCN

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.

Page 24: CCN
Page 25: CCN

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.

Page 26: CCN

2 LEVEL DIGITAL SIGNAL

Page 27: CCN

6 LEVEL DIGITAL SIGNAL

Page 28: CCN

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

Page 29: CCN

BIT DURATION

• The time taken to transmit one bit of data.

Page 30: CCN

BIT LENGHT

• The distance that one bit occupies in a transmission medium.

• Bit Length= bit duration x speed

Page 31: CCN

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.

Page 32: CCN

High Pass Channel

Page 33: CCN

Low Pass Channel

Page 34: CCN

Band Pass Channel

Page 35: CCN

OSCILLOSCOPE

Page 36: CCN
Page 37: CCN

DIGITAL COMMUNICATION

1) BASE BAND

2) BROADBAND

Page 38: CCN

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.

Page 39: CCN

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

Page 40: CCN

FEATURES OF DIGITAL TRANSMISSION.

Advantages :• 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

Page 41: CCN

Disadvantages :• 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.

Page 42: CCN

FEATURES OF ANALOG

Advantages:• Uses less bandwidth• More accurate

Disadvantages:• The effects of random noise can make signal

loss and distortion impossible to recover

Page 43: CCN

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.

Page 44: CCN

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

Page 45: CCN

Attenuation

• It is the gradual loss in intensity of any kind of signal through a medium.

Page 46: CCN

Signal After Attenuation

Page 47: CCN

Distortion

• The signal changes its shape. It normally happens in composite signals where the different signals get out of phase.

Page 48: CCN
Page 49: CCN
Page 50: CCN

Noise

• Unwanted impurities added to signal.• Several types of noise like thermal noise,

induced noise, cross talk, magnetic noise etc can corrupt a signal.

Page 51: CCN
Page 52: CCN

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.

Page 53: CCN

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.

Page 54: CCN
Page 55: CCN

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

Page 56: CCN

• 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 log2 L

Page 57: CCN

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.

Page 58: CCN

• Here the sender sends 10110001. but the receiver gets 110111000011.

Page 59: CCN

Line coding Schemes

Page 60: CCN

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.

Page 61: CCN
Page 62: CCN

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.

Page 63: CCN
Page 64: CCN

NRZ (Non Return to Zero)

• Here the signal is always either +ve or –ve but never zero. There are two popular NRZ schemes.– NRZ-L– NRZ-I

Page 65: CCN

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.

Page 66: CCN

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.

Page 67: CCN
Page 68: CCN

RZ (Return to Zero)

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

Page 69: CCN
Page 70: CCN

• The major disadvantage of this scheme is that it requires two signal changes per bit and hence requires more band width.

Page 71: CCN

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.

Page 72: CCN
Page 73: CCN

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.

Page 74: CCN
Page 75: CCN

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

Page 76: CCN

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.

Page 77: CCN
Page 78: CCN

2B1Q

• This encoding scheme is similar to NRZ-L but it has four voltage levels hence two bits can be represented by each pulse.

Page 79: CCN
Page 80: CCN

MLT-3

• It is very similar to NRZ-I with the difference that it has three voltage levels.

Page 81: CCN
Page 82: CCN

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

Page 83: CCN

DIVISION

• In this step the sequence of bits to be transmitted is divided into a series of equal size groups of m bits.

Page 84: CCN

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.

Page 85: CCN

LINE CODING

• After substitution the coded bits are transformed into signals using any of the line coding schemes.

Page 86: CCN

• Some common block codes are:-– 4B/5B– 8B/10B– 8B/6T

Page 87: CCN

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.

Page 88: CCN
Page 89: CCN

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

Page 90: CCN

Quantization

Quantization refers to the process of approximating the continuous set of values in the data with a finite (preferably small) set of values.

Page 91: CCN

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

Page 92: CCN

Quantized Digital Signal

Page 93: CCN

TRANSMISSION MODES

Page 94: CCN

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.

Page 95: CCN
Page 96: CCN

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.

Page 97: CCN
Page 98: CCN

Asynchronous transmission uses start and stop bits to signify the beginning bit ASCII character would actually be transmitted using 10 bits e.g.: A "0100 0001" would become "1 0100 0001 0". The extra one (or zero depending on parity bit) at the start and end of 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.

Page 99: CCN
Page 100: CCN

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.

Page 101: CCN
Page 102: CCN

CHAPTER 5

ANALOG TRASNMISSION

Page 103: CCN

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.

Page 104: CCN

We will further discuss…

• The exact definition of modulation.• Modulation of binary data.• Modulation of analog signals.

Page 105: CCN

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 Modulation1. Amplitude Modulation2. Frequency Modulation3. Phase Modulation

Page 106: CCN

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.

Page 107: CCN

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.

Page 108: CCN

Techniques for digital modulation

Page 109: CCN

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

Page 110: CCN
Page 111: CCN

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

Page 112: CCN

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.

Page 113: CCN
Page 114: CCN

Frequency-shift keying

It is a frequency modulation scheme in which digital information is transmitted through discrete frequency changes of a carrier wave.

Page 115: CCN
Page 116: CCN

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.

Page 117: CCN
Page 118: CCN

• It is a technique that combines both ASK and PSK to get more efficient modulation.

Page 119: CCN
Page 120: CCN

ANALOG SIGNAL MODULATION

Page 121: CCN
Page 122: CCN

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.

Page 123: CCN
Page 124: CCN
Page 125: CCN

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.

Page 126: CCN
Page 127: CCN

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

Page 128: CCN
Page 129: CCN

CHAPTER 6

MULTIPLEXING

Page 130: CCN

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.

Page 131: CCN

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.

Page 132: CCN
Page 133: CCN

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.

Page 134: CCN

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.

Page 135: CCN

Total channel width= 42 KHzTotal Signal Width= 37 KHz

1st Signal (10 KHz)

Guard Band (2 KHz)

2nd Signal (20 KHz)

Guard Band (3 KHz)

3rd Signal (7 KHz)

Page 136: CCN

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.

Page 137: CCN
Page 138: CCN
Page 139: CCN
Page 140: CCN

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.

Page 141: CCN

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.

Page 142: CCN
Page 143: CCN

WDMIt is a technology which multiplexesMultiple optical carrier signals on a

single optical fiber by usingdifferent 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.

Page 144: CCN
Page 145: CCN

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.

Page 146: CCN
Page 147: CCN
Page 148: CCN

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

Page 149: CCN

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.

Page 150: CCN
Page 151: CCN

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

Page 152: CCN

Framing bits

• To ensure synchronization an extra bit called ‘framing bit’ is often added to the frames.

Page 153: CCN
Page 154: CCN

Bit Padding

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

Page 155: CCN

• Then we have to allocate three slots to ‘a’, two slots to ‘b’ and one slot to ‘c’.

Page 156: CCN

• 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

Page 157: CCN

• Hence we can conclude that bit padding is the process of attaching extra bits to a data unit to make it an integer.

Page 158: CCN

Uses of TDM

• TDM is used by telephone companies through a hierarchy of digital signals called ‘Digital Signal Service’

Page 159: CCN
Page 160: CCN

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

Page 161: CCN
Page 162: CCN

CHAPTER 8

CIRCUIT SWITCHING

Page 163: CCN

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.

Page 164: CCN

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.

Page 165: CCN

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

Page 166: CCN

Types of switching

• There are three main types of switching:1) Circuit Switching2) Packet switching3) Message switching

Page 167: CCN

Circuit switching

• It creates a direct physical connection between two devices.

Page 168: CCN
Page 169: CCN

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

Page 170: CCN

Types of Circuit switching

• There are two types of circuit switching.1.Space-Division switch2.Time-Division switch

Page 171: CCN

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.

Page 172: CCN

Types of Space-Division Switching

1) Crossbar switch2) Multistage switch

Page 173: CCN

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.

Page 174: CCN
Page 175: CCN

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

Page 176: CCN

Advantages

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

Page 177: CCN

Disadvantages

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

Page 178: CCN

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.

Page 179: CCN
Page 180: CCN

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

Page 181: CCN

• 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

Page 182: CCN

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.

Page 183: CCN

Time division switch

• It employs TDM for switching.• There are two types of TDS:

1. Time –Slot interchange2. TDM Bus

Page 184: CCN

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 32 43 14 2

Page 185: CCN

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

Page 186: CCN
Page 187: CCN

Working of TSITSI 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.

Page 188: CCN
Page 189: CCN

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.

Page 190: CCN
Page 191: CCN

Advantage :-It requires no cross-points and reutilization of

the link is more.

Disadvantage :-Because of the need of either storing or retrieving of data or synchronized switching mechanism this is a bit slow process.

Page 192: CCN

Space-Time Division Switching

• We can combine the advantages of both the schemes and create an optimized technique for switching.

Page 193: CCN
Page 194: CCN

DATALINK LAYER

Page 195: CCN

APPLICATION

TRANSPORT

NETWORK

DATALINK

PHYSICAL

Page 196: CCN

• The Datalink layer is the second most lowest layer of the TCP/IP protocol suite.

• It lies between the Network and the Physical layer.

Page 197: CCN

Functions…

• Hop to hop delivery of packets.• Error detection and correction.• Medium access and control.

Page 198: CCN

Chapter 9

Error Detection and

Correction

Page 199: CCN

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

Page 200: CCN

Types of errors

There are two types of errors:– Single bit errors– Burst errors

Page 201: CCN
Page 202: CCN

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

Page 203: CCN

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.

Page 204: CCN
Page 205: CCN

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.

Page 206: CCN

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.

Page 207: CCN

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.

Page 208: CCN
Page 209: CCN

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’

Page 210: CCN

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

Page 211: CCN

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.

Page 212: CCN
Page 213: CCN

• To calculate and add the parity bit we pass the data through a special unit called a parity generator.

Page 214: CCN

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.

Page 215: CCN

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.

Page 216: CCN
Page 217: CCN

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

Page 218: CCN

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’

Page 219: CCN

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

Page 220: CCN

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

Page 221: CCN

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

Page 222: CCN

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.

Page 223: CCN
Page 224: CCN

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

Page 225: CCN
Page 226: CCN

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.

Page 227: CCN

Example

1000100 will be represented as:

X6+x2

Page 228: CCN

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.

Page 229: CCN

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

Page 230: CCN

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.

Page 231: CCN

Error correction

• Error correction is more a complicated activity than error detection.

• This requires more sophisticated techniques and more mathematical operations.

Page 232: CCN

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.

Page 233: CCN

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.

Page 234: CCN

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

Page 235: CCN

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

Page 236: CCN

• Consider the following data packet: 1110011If 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:1) Error at position 1 2) Error at position 23) Error at position 3 4) Error at position 4 ……… 8) No error

Page 237: CCN

Hence we can conclude that for a data packet of 7 bits we require ‘3’ redundant bits that can have 8 different states.

Page 238: CCN

But what if the redundant bits themselves become corrupt?

Page 239: CCN

• 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 2r

states.• Hence we can have the following relation

between ‘r’ and ‘k’

Page 240: CCN

2r ≥ 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.

Page 241: CCN

So for a packet of seven bits k=7 and we can calculate ‘r’ in the following way:

2r ≥ 7 + r + 1Or

r = 4This concept provides the basis for many error

correction mechanisms.

Page 242: CCN
Page 243: CCN

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…)

Page 244: CCN

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

Page 245: CCN

K = 8, r = 4

Page 246: CCN
Page 247: CCN
Page 248: CCN

How to determine which redundant bit will take care of which bits?

Page 249: CCN

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.

Page 250: CCN
Page 251: CCN

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

Page 252: CCN

Example

• Let us consider in the previous packet the bit number ‘7’ gets corrupt.

• i.e. it’s value changes from ‘1’ to ‘0’.

Page 253: CCN
Page 254: CCN

Burst error correction

Page 255: CCN

Flow and

Error Control

Page 256: CCN

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.

Page 257: CCN

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.

Page 258: CCN

Error Control

• Error control involves both error detection and error correction.

• Error correction in most often done by retransmission.

Page 259: CCN

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.

Page 260: CCN

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.

Page 261: CCN

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

Page 262: CCN

Operation

Page 263: CCN

Lost/Damaged Frames

Page 264: CCN

Lost ACK

Page 265: CCN

Delayed ACK

Page 266: CCN

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

Page 267: CCN

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 2m-1 numbers and can be repeated as per requirement.

Page 268: CCN

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 2m-1.

Page 269: CCN
Page 270: CCN

• 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

Page 271: CCN
Page 272: CCN

Control Variables

• The sender has three control variables S, SF , SL .

• S - the frame that is to be transmitted now.• SF - the first frame of the window.

• SL - the last frame of the window.

• The size of the window is ‘W’ where W= SL - SF + 1

• The receiver has only one variable ‘R’ which holds the sequence number of the expected frame.

Page 273: CCN
Page 274: CCN
Page 275: CCN
Page 276: CCN

???

Why is the sender window size less than or equal to 2m-1?

Page 277: CCN

Let M=2

Page 278: CCN
Page 279: CCN

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.

Page 280: CCN
Page 281: CCN

• The sender window size can be maximum ‘2m/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.

Page 282: CCN
Page 283: CCN
Page 284: CCN

Piggybacking

Page 285: CCN

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.

Page 286: CCN

HDLC Operation Modes

• HDLC Operation Modes:– Normal Response Mode (NRM)– Asynchronous Balanced Mode (ABM)

Page 287: CCN

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.

Page 288: CCN

NRM

Page 289: CCN

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

Page 290: CCN

ABM

Page 291: CCN

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.

Page 292: CCN

HDLC Frame Format

Page 293: CCN

FLAG

• The 8 bit pattern "01111110" 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.

Page 294: CCN

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

Page 295: CCN

ADDRESS

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

Page 296: CCN

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.

Page 297: CCN

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

Page 298: CCN

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

Page 299: CCN

INFORMATION

• This field carries user or system information. The size of this field is varible.

Page 300: CCN

Frame Classes

• In the HDLC protocol , three classes of frames are used :– Unnumbered frames– Information frames– Supervisory frames

Page 301: CCN
Page 302: CCN

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

Page 303: CCN
Page 304: CCN

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

Page 305: CCN

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

Page 306: CCN

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.

Page 307: CCN
Page 308: CCN

• The S-frame control field includes a leading "10" indicating that it is an S-frame.

• The next two bits represents one of the four types S-frames. – Receive Ready (RR)– Receive Not Ready (RNR)– Receive Not Ready (RNR)– Selective Reject (SREJ)

Page 309: CCN

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

Page 310: CCN

Receive Ready (00):• Indicate that the sender is ready to receive more

data (cancels the effect of a previous RNR).Receive Not Ready (10):• 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

Page 311: CCN

Selective Reject (11):• Requests retransmission of only the frame.• Used for Selective Repeat ARQ.

Page 312: CCN

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.

Page 313: CCN
Page 314: CCN

• 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

Page 315: CCN

Some Common Commands

Page 316: CCN

MULTIPLE ACCESS

Page 317: CCN

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

Page 318: CCN
Page 319: CCN

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.

Page 320: CCN

• 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?

Page 321: CCN

Types of Random Access Methods

Page 322: CCN

ALOHA

• Here a base station acts as the central controller.

• Al the stations communicate via the base station.

• The uploading transmission is done with a carrier frequency of 407MHz and the downloading is done with a carrier frequency of 413MHz.

Page 323: CCN
Page 324: CCN

Pure ALOHA

• The first version of the protocol (now called "Pure ALOHA") was quite simple:– If you have data to send, send the data– If the message collides with another transmission,

try resending "later"

Page 325: CCN

• Pure ALOHA does not check whether the channel is busy before transmitting. The critical aspect is the "later" 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.

Page 326: CCN
Page 327: CCN

Vulnerable Time = 2Ft

Page 328: CCN

Slotted ALOHA

• An improvement to the original ALOHA protocol was "Slotted ALOHA", 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

Page 329: CCN

Vulnerable Time = Ft

Page 330: CCN

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.

Page 331: CCN

Carrier Sense" 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.

Page 332: CCN

Multiple Access" 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.

Page 333: CCN

Types of CSMA

• Nonpersistent CSMA• p-persistent CSMA

Page 334: CCN

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.

Page 335: CCN

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)

Page 336: CCN

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

Page 337: CCN

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 "backoff delay") before trying to send that frame again.

Page 338: CCN

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

Page 339: CCN
Page 340: CCN

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.

Page 341: CCN
Page 342: CCN

Controlled Access

• Here the stations consult each other before transmitting a packet.

• There are three popular control access methods.– Reservations– Poll– Token passing

Page 343: CCN

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.

Page 344: CCN
Page 345: CCN

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

Page 346: CCN

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

Page 347: CCN

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

Page 348: CCN
Page 349: CCN

Wireless LAN

Page 350: CCN

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

Page 351: CCN

Architecture

• This standard defines two types of services.– BSS (Basic Service Set)– ESS (Extended Service Set)

Page 352: CCN

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.

Page 353: CCN
Page 354: CCN

ESS• An ESS is a combination of more than BSS.• Here the APs of all the BSS are connected

using usually a wired LAN.

Page 355: CCN
Page 356: CCN

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

Page 357: CCN

Station Mobility

• IEEE 802.11 defines three types of stations.– No- Transition Mobility– BSS- Transition Mobility– ESS- Transition Mobility

Page 358: CCN

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

Page 359: CCN

Physical Layer Specifications

Page 360: CCN

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.

Page 361: CCN
Page 362: CCN

• It uses the band of 2.4 GHz to 2.48GHz. This band is divided into 72 sub-bands.

• FSK is used for modulation.

Page 363: CCN

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.

Page 364: CCN
Page 365: CCN

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.

• The source contend with one another for access to the link.

• It uses PSK and QAM for modulation.

Page 366: CCN

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.

Page 367: CCN

OFDM-g

• This is a new and complex specification of OFDM that achieves higher data rates than OFDM.

Page 368: CCN

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.

Page 369: CCN

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

Page 370: CCN

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

Page 371: CCN

Disadvantages

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

Page 372: CCN

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

Page 373: CCN

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.

Page 374: CCN
Page 375: CCN

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

Page 376: CCN

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 "bandwidth on demand" features of packet-switching technology at the high speeds required for today's LAN and WAN networks.

Page 377: CCN

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

Page 378: CCN

Why ATM…?

Page 379: CCN

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.

Page 380: CCN

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.

Page 381: CCN

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

Page 382: CCN

ATM Interfaces

Three types of interfaces exist in this diagram:• User-to-Network Interface (UNI)• Network-to-Network Interface (NNI)• Inter-Carrier Interface (ICI)

Page 383: CCN

• 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

Page 384: CCN

The ATM Cell

Page 385: CCN

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

Page 386: CCN

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

Page 387: CCN

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

Page 388: CCN

• End User 1 encapsulates the file in 53-byte cells, each with its unique VPI/VCI "destination address" 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.

Page 389: CCN

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

Page 390: CCN

• 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., "hangs up," and the virtual path is dismantled.

Page 391: CCN

Advantages

• 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

Page 392: CCN

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

Page 393: CCN

Disadvantages • New customer premises hardware and

software are required.• Presently the applications that can benefit

from ATM such as multimedia are rare.

Page 394: CCN

Network Layer Protocols.

Page 395: CCN

• 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:

Page 396: CCN

• ARP• IGMP• ICMP• &• RARP

Page 397: CCN

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.

Page 398: CCN

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

Page 399: CCN

Steps Involved:-• The sender knows only the IP addr of the

receiver and not it’s physical addr.• The sender sends an ARP broadcast packet to

all the hosts.• This broadcast packet contains the physical

and logical addr of the sender and only the logical addr of the receiver.

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

Page 400: CCN

• It sends the reply to the sender machine telling about it’s own physical addr.

• Now when this reply reaches the sender then it can send the data packets to the intended receiver.

Page 401: CCN
Page 402: CCN
Page 403: CCN

IP

• It is a connectionless, unreliable and best effort protocol.

• Packets of the IP are called datagrams and contain two parts, ‘header’ and ‘data’.

Page 404: CCN

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.

Page 405: CCN
Page 406: CCN

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

Page 407: CCN

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

Page 408: CCN

Types of ICMP Messages

There are two types of ICMP messages:1. Error Reporting2. Query

Page 409: CCN

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

Page 410: CCN

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.

Page 411: CCN

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.

Page 412: CCN

IPv6

• It is the improved version of IPv4.• It is a classless addressing scheme and has the

following advantages over IPv4.

Page 413: CCN

• It has an addr of 128 bits compared to the 32 bits addr space of IPv4.

• It has better header format.• Its header has more fields for additional

functionality.• It can be extended if required by new

technologies.• Encryption and authentication options add

more confidentiality and integrity to the packet.

Page 414: CCN
Page 415: CCN
Page 416: CCN

TRANSPORT LAYER

Page 417: CCN

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

Page 418: CCN
Page 419: CCN
Page 420: CCN

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.

Page 421: CCN

TECHNIQUES TO IMPROVE QoS

• Scheduling• Traffic Shaping

Page 422: CCN

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

Page 423: CCN

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.

Page 424: CCN

Traffic Shaping• Here the effort is to control the traffic in the

network.• The most common approach for this is the

‘leaky bucket’ technique.

Page 425: CCN
Page 426: CCN
Page 427: CCN

Apart from these two other techniques that are employed are –Admission Control–Resource Reservation

Page 428: CCN

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.

Page 429: CCN

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)

Page 430: CCN

IANA RangesType 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

Page 431: CCN

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.

Page 432: CCN

User Datagram Format

Page 433: CCN

Transmission Control Protocol• It is connection oriented reliable but very

complex protocol.

Page 434: CCN

TCP Services• Stream Delivery Service• Sending and Receiving Buffers• Bytes and Segments• Connection Oriented Full Duplex Services

Page 435: CCN

Stream Delivery Service

Page 436: CCN

Bytes and Segments&

Sending and Receiving Buffers

Page 437: CCN

APPLICATION LAYER

Page 438: CCN

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.

Page 439: CCN

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

Page 440: CCN

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

Page 441: CCN
Page 442: CCN

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.

Page 443: CCN

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 "human-readable" results.•Present the results to the user.

Page 444: CCN

The server's functions include:

• Listen for a client's query.• Process that query.• Return the results back to the client

Page 445: CCN

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

Page 446: CCN
Page 447: CCN

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 "IP address”.

Page 448: CCN

But it is hard to remember everyone's IP address. The DNS makes it easier by allowing a familiar string of letters (the "domain name") 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 "mnemonic" device that makes addresses easier to remember.

Page 449: CCN

Translating the name into the IP address is called "resolving the domain name." 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.

Page 450: CCN

Working

• In an Internet address – such as icann.org – the .org part is known as a Top Level Domain, or TLD. So-called "TLD registry" 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.

Page 451: CCN

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.

Page 452: CCN

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.

Page 453: CCN

Scattered across the Internet are thousands of computers – called "Domain Name Resolvers" or just plain "resolvers" - 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.

Page 454: CCN

• 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 "resolved"!

Page 455: CCN

Why do we need the resolvers? Why not use the root servers directly?

Page 456: CCN
Page 457: CCN
Page 458: CCN

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

Page 459: CCN

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.

Page 460: CCN

• 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 "200" (or "200 OK.") 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>)

Page 461: CCN

• A file transfer in progress over the data connection can be aborted using an interrupt message sent over the control connection.

Page 462: CCN

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 "8-bit ASCII" 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.

Page 463: CCN

• 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

Page 464: CCN

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