Computer Networks s1

Total Page:16

File Type:pdf, Size:1020Kb

Computer Networks s1

COMPUTER NETWORKS INTRODUCTION TO PHYSICAL LAYER DATA AND SIGNALS

Communication at the Physical Layer  A scientist working in a research company (Sky Research) needs to order a book from an online bookseller (Scientific Books).  We have five different levels of communication between Alice and Bob. Communication at application, transport, network, or data-link is logical; communication at the physical layer is physical.  For simplicity, we have shown only host-to-router, router-to-router, and router-to-host, but the switches are also involved in the physical communication.  Data need to be transmitted and received, can be represent in either analog or digital in form.

Analog and Digital Data  Data can be analog or digital. The analog data refers that information is continuous; digital data refers that information has discrete states.  For example, an analog clock that has hour, minute, and seconds gives information in a continuous form; the movements of the hands are continuous. A digital clock that reports the hours and the minutes will change suddenly from 8:05 to 8:06. P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 1 COMPUTER NETWORKS

Analog and Digital Signals  Like the data they represent, signals can be either analog or digital.  An analog signal has an infinite number of values along its path over a period of time. A digital signal can have only a limited number of defined values as 1 and 0.  The below figure illustrates an analog signal and a digital signal. The vertical axis represents the value or strength of a signal. The horizontal axis represents time.  The curve representing the analog signal passes through an infinite number of points.  The vertical lines of the digital signal, representing the sudden jump of the signal makes from value to value.

Periodic and Nonperiodic  Both analog and digital signals can take one of two forms: periodic or nonperiodic.  A periodic signal completes a pattern within a measurable time frame, called a period, and repeats that pattern over subsequent identical periods. The completion of one full pattern is called a cycle.  A nonperiodic signal changes without exhibiting a pattern or cycle that repeats over time.  Both analog and digital signals can be periodic or nonperiodic.

TRANSMISSION IMPAIRMENT

 The imperfection causes signal impairment. This means that the signal at the beginning of the medium is not the same as the signal at the end of the medium. What is sent is not what is received.  Three causes of impairment are attenuation, distortion, and noise.

Attenuation

 Attenuation means a loss of energy. When a signal travels through a medium, it loses some of its energy due to the resistance of the medium.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 2 COMPUTER NETWORKS  That is why a wire carrying electric signals gets warm, the electrical energy in the signal is converted to heat. To compensate for this loss, amplifiers are used to amplify the signal.

Decibel  To show that a signal has lost or gained strength, we use the unit of the decibel.  The decibel (dB) measures the relative strengths of two signals or one signal at two different points. Note that the decibel is negative if a signal is attenuated and positive if a signal is amplified.

 Variables PI and P2 are the powers of a signal at points 1 and 2, respectively.

Example 1

Suppose a signal travels through a transmission medium and its power is reduced to one-half. This means that P2 = ½ P1 In this case, the attenuation (loss of power) can be calculated as

10log10(P2/P1) = 10log10(0.5P1/P1) = 10log10 0.5 = 10(-0.3)= -3dB

Example 2

A signal travels through an amplifier, and its power is increased 10 times. This means that P2=10P1. In this case, the amplification (gain of power) can be calculated as

10log10(P2/P1) = 10log10(10P1/P1) = 10log10 10 = 10(1) = 10dB

Example 3

In the below figure a signal travels from point 1 to point 4. The signal is attenuated by the time it reaches point 2. Between points 2 and 3, the signal is amplified. Again, between points 3 and 4, the signal is attenuated. We can find the resultant decibel value for the signal just by adding the decibel measurements between each set of points.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 3 COMPUTER NETWORKS

In this case, the decibel value can be calculated as dB = -3 + 7 -3 = +1. The signal has gained in power.

Distortion  The change in the form or shape of the signal is called Distortion. Distortion can occur in a composite signal made of different frequencies.  Each signal has its own propagation speed through a medium and its own delay in arriving at the final destination.  If the delay is not exactly the same as the period duration, differences in delay may create a difference in phase. Figure 3.29 shows the effect of distortion on a composite signal.

Noise  Noise is another cause of impairment. Several types of noise, such as thermal noise, induced noise, crosstalk, and impulse noise, may corrupt the signal.  Thermal noise is the random motion of electrons in a wire, which creates an extra signal.  Induced noise comes from sources such as motors and appliances.  Crosstalk is the effect of one wire on the other. One wire acts as a sending antenna and the other as the receiving antenna.  Impulse noise is a spike (a signal with high energy in a very short time) that comes from power lines, lightning, and so on.  Figure shows the effect of noise on a signal.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 4 COMPUTER NETWORKS

Signal-to-Noise Ratio (SNR)  To find the bit rate limit, we need to know the ratio of the signal power to the noise power.  The signal-to-noise ratio is defined as

 We need to consider the average signal power and the average noise power because these may change with time.  SNR is actually the ratio of what is wanted (signal) to what is not wanted (noise).  A high SNR means the signal is less corrupted by noise; a low SNR means the signal is more corrupted by noise.

 Because SNR is the ratio of two powers, it is often described in decibel units, SNRdB, defined as

SNRdB = 10log10 SNR

Example 1

The power of a signal is 10 mW and the power of the noise is 1 µW; what are the values of SNR and SNRdB? Solution

The values of SNR and SNRdB can be calculated as follows: SNR = (10,000 µW)/ (1 µW) = 10,000

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 5 COMPUTER NETWORKS 4 SNRdB = 10 log10 (10,000) = 10 log10 10 = 40 Example 2

The values of SNR and SNRdB for a noiseless channel are

SNR = (signal power) / 0 = ∞  SNRdB = 10 log10 ∞ = ∞ We can never achieve this ratio in real life; it is an ideal. DATA RATE LIMITS

 In data communications we consider how fast we can send data (in bits per second), over a channel.  Data rate depends on three factors: 1. The bandwidth available 2. The level of the signals (the quality of the signal) 3. The level of noise (the quality of the channel)  Two theoretical formulas were developed to calculate the data rate: 1. Nyquist for a noiseless channel. 2. Shannon for a noisy channel. Noiseless Channel: Nyquist Bit Rate

 Nyquist formula for a noiseless channel to define a bit rate is BitRate = 2 x bandwidth x log2L

 Bandwidth is the bandwidth of the channel.  L is the number of signal levels used to represent data, and BitRate is the bit rate in bits per second.  If the number of levels (bits) in a signal is just 2, the receiver can easily distinguish between a 0 and a 1. If the level of a signal is 64, it is very difficult to the receiver to distinguish between 64 different levels.  When we increase the number of signal levels, we impose a burden on the receiver. Increasing the levels of a signal may reduce the reliability of the system. Example 1 Consider a noiseless channel with a bandwidth of 3000 Hz transmitting a signal with two signal levels. The maximum bit rate can be calculated as

BitRate = 2 x 3000 x log2 2 = 6000 bps

Example 2 Consider the same noiseless channel transmitting a signal with four signal levels (for each level, we send 2 bits). The maximum bit rate can be calculated as

BitRate = 2 x 3000 x log2 4 = 12,000 bps

Example 3 We need to send 265 kbps over a noiseless channel with a bandwidth of 20 kHz. How many signal levels do we need? Solution We can use the Nyquist formula as shown:

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 6 COMPUTER NETWORKS 6.625 265,000 = 2 x 20,000 x log2L  log2L = 6.625  L = 2 = 98.7levels Since this result is not a power of 2, we need to either increase the number of levels or reduce the bit rate. If we have 128 levels, the bit rate is 280 kbps. If we have 64 levels, the bit rate is 240 kbps.

Noisy Channel: Shannon Capacity

 Shannon capacity, to determine the highest data rate for a noisy channel:

Capacity = bandwidth x log2 (1 + SNR)

 Bandwidth is the bandwidth of the channel, SNR is the signal-to-noise ratio, and capacity is the capacity of the channel in bits per second.  In the Shannon formula there is no matter how many levels we have, we cannot achieve a data rate higher than the capacity of the channel.

Example 1

Consider an extremely noisy channel in which the value of the signal-to-noise ratio is almost zero. In other words, the noise is so strong that the signal is faint.

For this channel the capacity C is calculated as

C = B log2 (1 + SNR) = B log2(1 + 0) = B log21 = B x 0 = 0

This means that the capacity of this channel is zero. In other words, we cannot receive any data through this channel.

Example 2

A telephone line normally has a bandwidth of 3000 Hz (300 to 3300 Hz) assigned for data communications. The signal-to-noise ratio is usually 3162. For this channel the capacity is calculated as

C = B log2 (1 + SNR) = 3000 1og2(1 + 3162) = 3000 X 11.62 = 34,860 bps

Example 3

The signal-to-noise ratio in decibels SNRdB = 36 and the channel bandwidth is 2 MHz. The channel capacity can be calculated as

SNRdB/10 3.6 SNRdB = 10 log10 SNR  SNR = 10  SNR = 10 = 3981

6 C = B log2(1 + SNR) = 2 X 10 x log23982 = 24 Mbps

Using Both Limits To find the limits and signal levels we use both methods. Example 1 P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 7 COMPUTER NETWORKS We have a channel with a I-MHz bandwidth. The SNR for this channel is 63. What are the appropriate bit rate and signal level? Solution First, we use the Shannon formula to find the upper limit. 6 6 C = B log2 (1 + SNR) = 10 log2 (1 + 63) = 10 log2 64 = 6 Mbps The Shannon formula gives us 6 Mbps, the upper limit. For better performance we choose 4 Mbps. Then we use the Nyquist formula to find the number of signal levels.

4 Mbps = 2 x 1 MHz x log2L  L = 4

PERFORMANCE

 The performance of the network is measured by three characteristics.  Bandwidth  Throughput  Latency Bandwidth  The bandwidth has two different measuring values: bandwidth in hertz and bandwidth in bits per second. Bandwidth in Hertz  Bandwidth in hertz is the range of frequencies contained in a composite signal or the range of frequencies a channel can pass.  For example, we can say the bandwidth of a subscriber telephone line is 4 kHz. Bandwidth in Bits per Seconds  The bandwidth can also refer to the number of bits per second that a channel can transmit. Relationship  There is a relationship between the bandwidth in hertz and bandwidth in bits per second. Basically, an increase in bandwidth in hertz means an increase in bandwidth in bits per second. Throughput  The throughput is a measure of how fast we can actually send data through a network.  A link may have a bandwidth of B bps, but we can only send T bps through this link with T always less than B. The bandwidth is a potential measurement of a link; the throughput is an actual measurement of how fast we can send data.  For example, we may have a link with a bandwidth of 1 Mbps, but the device connected to the end of the link may handle only 200 kbps. This means that we cannot send more than 200 kbps through this link.

Example 1 A network with bandwidth of 10 Mbps can pass only an average of 12,000 frames per minute with each frame carrying an average of 10,000 bits. What is the throughput of this network? Solution We can calculate the throughput as Throughput = (12,000 x 10,000) /60 = 2 Mbps The throughput is almost one-fifth of the bandwidth in this case.

Latency (Delay)  The latency or delay defines how long it takes for an entire message to arrive completely at the destination from the time the first bit is sent out from the source.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 8 COMPUTER NETWORKS  The latency is calculated with propagation time, transmission time, queuing time and processing delay. Latency = propagation time + transmission time + queuing time + processing delay

Propagation Time  Propagation time measures the time required for a bit to travel from the source to the destination. The propagation time is calculated by dividing the distance by the propagation speed. Propagation time = Distance / (Propagation Speed) Example 2 What is the propagation time if the distance between the two points is 12,000 km? Assume the propagation speed to be 2.4 × 108 m/s in cable. Solution We can calculate the propagation time as Propagation time = (12,000 x 1,000) / (2.4 × 108) = 50 ms

Transmission Time  In data communications we don't send just 1 bit, we send a message. Each bit may take a time equal to the propagation time to reach its destination.  However, there is a time between the first bit leaving the sender and the last bit arriving at the receiver.  The transmission time of a message depends on the size of the message and the bandwidth of the channel. Transmission time = (Message size) / Bandwidth Example 3 What are the propagation time and the transmission time for a 2.5-KB (kilobyte) message (an email) if the bandwidth of the network is 1 Gbps? Assume that the distance between the sender and the receiver is 12,000 km and that light travels at 2.4 × 108 m/s. Solution We can calculate the propagation and transmission time as Propagation time == (12,000 x 1000) / (2.4 X 108) = 50 ms Transmission time == (2500 x 8) / 109 == 0.020 ms Because the message is short and the bandwidth is high, the dominant factor is the propagation time, not the transmission time. The transmission time can be ignored.

Example 4 What are the propagation time and the transmission time for a 5-MB (megabyte) message (an image) if the bandwidth of the network is 1 Mbps? Assume that the distance between the sender and the receiver is 12,000 km and that light travels at 2.4 × 108 m/s.

Solution We can calculate the propagation and transmission times as Propagation time = (12,000 × 1000) / (2.4 × 108) == 50 ms Transmission time == (5,000,000 ×8) /106 = 40 s Because the message is very long and the bandwidth is not very high, the dominant factor is the transmission time, not the propagation time. The propagation time can be ignored. Queuing Time

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 9 COMPUTER NETWORKS  The time needed for each intermediate or end device to hold the message before it can be processed is called queuing time.  The queuing time changes with the load imposed on the network.  When there is heavy traffic on the network, the queuing time increases. An intermediate device queues the arrived messages and processes them one by one.

Bandwidth-Delay Product  The bandwidth – delay product defines the number of bits that can fill the link. Case 1:

 Let us assume that we have a link with a bandwidth of 1bps. We also assume that the delay of the link is 5 sec  .  Looking at the figure, we can say that this product 1×5=5 bits is the maximum number of bits that can fill the link. There can be no more than 5 bits at any time on the link.

Case 2 :

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 10 COMPUTER NETWORKS

 Now assume we have a bandwidth of 5 bps. The above figure shows that there can be maximum 5×5 = 25 bits on the line. There are 5 bits on the line; the duration of each bit is 0.20 s.

Jitter  Another performance issue that is related to delay is jitter.  Jitter problem occurs if different packets of data encounter different delays, and application using the data at the receiver site is time-sensitive (audio and video data, for example).  If the delay for the first packet is 20 ms, for the second is 45 ms, and for the third is 40 ms, then the real- time application that uses the packets makes jitter.

TRANSMISSION MEDIA

 A transmission medium can be defined as anything that can carry information from a source to a destination.

 For the transmission of bit stream from one machine to another, various physical media can be used. They differ in terms of:  bandwidth,

 delay,  cost,

 Ease of installation and maintenance.  Media can be divided into:

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 11 COMPUTER NETWORKS

Bounded/Guided Transmission Media:  It is the transmission media in which signals are travel to a specific path using wire or cable.

Twisted Pair Cable:

 A twisted pair consists of two conductors (copper) twisted together. One of the wires is used to carry signals to the receiver, and the other is used only as a ground reference. The receiver uses the difference between the two.  If the two wires are parallel, the effect of unwanted signals is not the same in both wires because they are at different locations relative to the noise or crosstalk. This results in a difference at the receiver.

 By twisting the pairs, a balance is maintained. For example, suppose in one twist, one wire is closer to the noise source and the other is farther; in the next twist, the reverse is true. Twisting makes both wires are equally affected by external influences (noise or crosstalk). This means that the receiver receives no unwanted signals.  It is lightweight, cheap, can be installed easily, and they support many different types of network. Some important points:  Its frequency range is 0 to 3.5 kHz.  Typical attenuation is 0.2 dB/Km @ 1kHz.

 Typical delay is 50 µs/km.  Repeater spacing is 2km.  Twisted Pair is of two types :  Unshielded Twisted Pair (UTP)

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 12 COMPUTER NETWORKS  Shielded Twisted Pair (STP)

Unshielded Twisted Pair Cable:

 It consists of insulating copper wires (1mm thick) each with its own color plastic insulator to differentiate the wires. The wires are twisted together in a helical form to reduce electrical interference from similar pair.  UTP cables consist of 2 or 4 pairs of twisted cable. Cable with 2 pair use RJ-11 connector and 4 pair cable use RJ-45 connector.

Advantages:  Installation is easy

 Flexible  Cheap

 It has high speed capacity,  100 meter limit

Disadvantages:  Bandwidth is low when compared with Coaxial Cable

 Provides less protection from interference. Shielded Twisted Pair Cable:  This cable has a metal foil or braided-mesh covering which encases each pair of insulated conductors. Shielding also eliminates crosstalk.  It has same attenuation as unshielded twisted pair.  It is faster than unshielded and coaxial cable.  It is more expensive than coaxial and unshielded twisted pair.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 13 COMPUTER NETWORKS

Advantages:  Easy to install  Performance is adequate

 Can be used for Analog or Digital transmission  Higher capacity than unshielded twisted pair

 Eliminates crosstalk

Disadvantages:  Difficult to manufacture Applications  Twisted-pair cables are used in telephone lines to provide voice and data channels.

Coaxial Cable:  A coaxial cable consists of a stiff copper wire as the core, surrounded by an insulating material. The insulator is encased in an outer conductor of metal foil, braid, or a combination of the two. The outer conductor is covered in a protective plastic sheath.  Coaxial cable (or coax) carries signals of higher frequency ranges than those in twisted pair cable.

Coaxial Cable Standards:  50-Ohm RG-7 or RG-11 : used with thick Ethernet.

 50-Ohm RG-58 : used with thin Ethernet  75-Ohm RG-59 : used with cable television

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 14 COMPUTER NETWORKS

Types of Coaxial cables : BaseBand:  This is a 50 ohm (Ω) coaxial cable which is used for digital transmission. It is mostly used for LAN’s. Baseband transmits a single signal at a time with very high speed. The major drawback is that it needs amplification after every 1000 feet.

BroadBand:  This uses analog transmission on standard cable television cabling. It transmits several simultaneous signal using different frequencies. It covers large area when compared with Baseband Coaxial Cable.

Coaxial Cable Connectors:  The most common type of connector used is the Bayone-Neill-Concelman (BNC) connector.

Performance  The attenuation is much higher in coaxial cable than in twisted-pair cable. Although the coaxial cable has a much higher bandwidth, the signal weakens rapidly and requires the frequent use of repeaters.

Applications  Coaxial cable used in analog telephone networks where a single coaxial network could carry 10,000 voice signals. Later it was used in digital telephone networks where a single coaxial cable could carry digital data up to 600 Mbps.  Cable TV networks also use coaxial cables.  Another common application of coaxial cable used in Ethernet LANs. The 10Base-2 (Thin Ethernet), 10 specifies data rate and 2 specifies range of data transmission. The Thin Ethernet uses RG-58 coaxial P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 15 COMPUTER NETWORKS cable with BNC connectors to transmit data at 10 Mbps with a range of 185 m. The 10Base5 ( Thick Ethernet), uses RG-11 to transmit 10 Mbps with a range of 5000 m.

Advantages:  Bandwidth is high  Used in long distance telephone lines.

 Transmits digital signals at a very high rate.  Much higher noise immunity

 Data transmission without distortion.  They can travel to longer distance at higher speeds as they have better shielding when compared to twisted pair cable

Disadvantages:  Single cable failure can fail the entire network.

 Difficult to install and expensive when compared with twisted pair. Fiber Optics:

 A fiber-optic cable is made of glass or plastic and transmits signals in the form of light.  An optical transmission system has three components:  The light source - a pulse of light indicates a 1 bit and the absence of light indicates a 0 bit,  The transmission medium - ultra-thin fiber of glass,

 The detector - generates an electrical pulse when light falls on it.  By attaching a light source to one end of an optical fiber and a detector to the other, we get a unidirectional data transmission system.  Light travels in a straight line as long as it is moving through a single uniform substance. If a ray of light traveling through one substance suddenly enters another substance the ray changes direction.

Propagation Modes:  Current technology supports two modes (multimode and single mode) for propagating light along optical channels.  Multiple beams from a light source move through the core in different paths called a multimode fiber. Multimode can be implemented in two forms: step-index or graded-index.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 16 COMPUTER NETWORKS

Multimode step-index:  The core is evenly dense. The light travels straight until it reaches the interface of the core and cladding. The abrupt change causes it to be reflected back to the core. There are multiple paths with varying lengths, therefore varying transmission time which limits the data rate. This is the least expensive propagation mode and its commonly used for local area networks. Multimode graded-index:  The density decreases gradually towards the edge of the core. This varying density allows the light to bend. This allows focusing the signals more efficiently than step-index. This propagation mode is moderately expensive compared to step-index mode and is commonly used for telephone lines.  If the fiber's diameter is reduced to a few wavelengths of light, the light can only propagate in a straight line, without bouncing, called a single mode fiber. Single mode fibers are more expensive but can be used for longer distances (typically several Gbps for 30 km). Fiber Sizes:

Fiber-Optic Cable Connectors:  The subscriber channel (SC) connector is used for cable TV.  The straight-tip (ST) connector is used for connecting cable to networking devices.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 17 COMPUTER NETWORKS

Performance We need fewer repeaters when we use fiber-optic cable. Attenuation is flatter than in the case of twisted-pair cable and coaxial cable. Fiber Cables:  Fiber optic cables are similar to coax, except without the braid. In multimode fibers, the core is typically 50 microns in diameter, in single mode fibers the core is 8 - 10 microns.

 Fibers can be connected in three different ways:  terminating in connectors and plugged into fiber sockets,  spliced mechanically by a clamp,

 fused to form a solid connection.  Two kinds of light sources can be used to do the signaling:  LEDs,

 semiconductor lasers.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 18 COMPUTER NETWORKS  The receiving end of an optical fiber consists of a photo diode. The photodiode limits data rates to about 1Gbps. Comparison of Fiber Optics and Copper Wire: Advantages of fibers:

1. Noise resistance: It is immune to electromagnetic interference and crosstalk and external light. 2. Less signal Attenuation: It has transmission distance significantly greater than that of other guided media. 4. Higher bandwidth: Currently, fiber optic cable offers a large bandwidth compared to other media. Larger bandwidth offers larger capacity and faster transmission rate. 5. High security: Using fiber optic cables prevents the emanation of radiation and therefore, radiation- containing signal becomes difficult to tap. This makes fiber cable secure against signal leakage and interference. 6. Resistance to corrosive materials: Glass is more resistant to corrosive materials than copper. 6. Free from electrical problems: It does not require electrical ground loop preventing it from short circuit as light waves are being used the carrier of data signal. 7. Less number of repeaters: A repeater used to strengthen a signal is always required during the Course of signal transmission. Compared to copper media, it requires less number of repeaters. 7. Physical structure: It has small size, lightweight, flexibility, high strength, potential high temperature operation and no electrical hazard when cut or damaged.

Disadvantages of Optical Fiber

2. Cost - The cost of optical fiber is a trade-off between capacity and cost. At higher transmission capacity, it is cheaper than copper. At lower transmission capacity, it is more expensive. 3. Installation/Maintenance - It is difficult to splice. Special equipment and expertise are required to splice and install the cables. 3. Fragility - It has limited physical arc of cable, if it is bent too much it will break. 4. Unidirectional light propagation: Propagation of light is unidirectional. If we need bidirectional communication, two fibers are needed.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 19 COMPUTER NETWORKS

Difference between twisted pair, co-axial cable and fiber optics.

Twisted Pair Cable Co-axial Cable Optical fiber 1. Transmission of signals takes 1. Transmission of signals takes 1. Signal transmission takes place place in the electrical form place in the electrical form in an optical form over a glass over the metallic conducting over the inner conductor of the fiber. wires. cable. 2. In this medium the noise 2. Coaxial having higher noise 2. Optical fiber has highest noise immunity is low. immunity than twisted pair immunity as the light rays are cable. unaffected by the electrical noise. 3. It can be affected due to 3. Coaxial cable is less affected 3. Not affected by the external external magnetic field. due to external magnetic field. magnetic field. 4. Cheapest medium. 4. Moderate expensive. 4. Expensive. 5. Low Bandwidth. 5. Moderately high bandwidth. 5. Very high bandwidth. 6. Attenuation is very high. 6. Attenuation is low. 6. Attenuation is very low. 7. Installation is easy. 7. Installation is easy. 7. Installation is difficult.

Wireless Transmission

 Unguided media transport electromagnetic waves without using a physical conductor. When electrons move, they create electromagnetic waves that can propagate through free space. This type of communication is often referred to as wireless communication.  Unguided signals can travel from the source to destination in several ways: ground propagation, sky propagation, and line-of-sight propagation.  In ground propagation, radio waves travel through the lowest portion of the atmosphere, hugging the earth. These low-frequency signals travel in all directions from the transmitting antenna and follow the curvature of the planet. Distance depends on the amount of power in the signal: The greater the power, the greater the distance.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 20 COMPUTER NETWORKS  In sky propagation, higher-frequency radio waves radiate upward into the ionosphere (the layer of atmosphere where particles exist as ions) where they are reflected back to earth. This type of transmission allows for greater distances with lower output power.  In line-of-sight propagation, very high-frequency signals are transmitted in straight lines directly from antenna to antenna. Antennas must be directional, facing each other.

 The electromagnetic spectrum defined as radio waves and microwaves is divided into eight ranges, called bands. These bands are rated from very low frequency (VLF) to extremely highfrequency (EHF).

Radio Transmission:

 The electromagnetic waves ranging in frequencies between 3 kHz and 1 GHz are normally called radio waves.  Radio Waves are easy to generate, can travel long distances, and penetrate building easily, so they are widely used for communications, both indoors and outdoors.  Radio waves are omnidirectional. When an antenna transmits radio waves, they are propagated in all directions. This means that the sending and receiving antennas do not have to be aligned. A sending antenna sends waves that can be received by any receiving antenna.  The omnidirectional property has a disadvantage, too. The radio waves transmitted by one antenna are susceptible to interference by another antenna that may send signals using the same frequency or band.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 21 COMPUTER NETWORKS

 The properties of radio waves are frequency dependent. At low frequencies they pass through obstacles well. At high frequencies, radio waves tend to travel in straight lines and bounce off obstacles.

Applications:  The omnidirectional characteristics of radio waves make them useful for multicasting, in which there is one sender but many receivers.  AM and FM radio, television, cordless phones, and paging are examples of multicasting. Microwave Transmission:

 Electromagnetic waves having frequencies between 1 GHz and 300 GHz are called microwaves. Microwaves are unidirectional. The sending and receiving antennas need to be aligned. The unidirectional property has an advantage. A pair of antennas can be aligned without interfering with another pair of aligned antennas.

 Characteristics of microwave propagation:  Microwave propagation is line-of-sight. Since the antennas are direct sight of each other, blocking obstacles do not allow two short towers to communicate by using microwaves. Repeaters are needed for long distance communication.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 22 COMPUTER NETWORKS  Very high-frequency microwaves cannot penetrate walls. This characteristic can be a disadvantage if receivers are inside buildings.

 Two types of antennas are used for microwave communications: the parabolic dish antenna and the horn antenna.

 A parabolic dish antenna has every line parallel to the line of sight and all the lines intersect in a common point called the focus. Outgoing transmissions are hit the dish and are deflected outward in a reversal of the receipt path.  A horn antenna looks like a gigantic scoop. Outgoing transmissions are broadcast up a stem (resembling a handle) and deflected outward in a series of narrow parallel beams by the curved head. Received transmissions are collected by the scooped shape of the horn and are deflected down into the stem.

Applications  Microwaves are very useful when unicast (one-to-one) communication is needed between the sender and the receiver. They are used in cellular phones, satellite networks, and wireless LANs. Infrared:

 Infrared waves, with frequencies from 300 GHz to 400 THz can be used for short-range communication. Infrared waves cannot penetrate walls because of having high frequencies. This characteristic prevents interference between one system and another; when we use our infrared remote control, we do not interfere with the use of the remote by our neighbors.  However, this same characteristic makes infrared signals useless for long-range communication. We cannot use infrared waves outside a building because the sun's rays contain infrared waves that can interfere with the communication.

Light Transmission:

 A modern application is to connect the LANs in two buildings via lasers fixed on their rooftops. Optical signaling using lasers is unidirectional, so each end needs its own laser and its own photo detector.  This scheme offers very high bandwidth at very low cost and is relatively secure because it is difficult to tap a narrow laser beam. It is also relatively easy to install.

 Due to heat from the sun caused convection currents (The sun heats the earth's surface, then the air warms and rises creating an upward current in the atmosphere.) from the roof of the building, as shown in below figure. This air diverted the beam and made it dance around the detector. Switching

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 23 COMPUTER NETWORKS

 A network is a set of connected devices, it is possible to make one-to-one communication between each pair of devices (a mesh topology) or between a central device and every other device (a star topology) . These methods are impractical and wasteful when applied to very large networks.  The number and length of the links to be cost-efficient. A better solution is switching.  A switched network consists of a switches. Switches are devices capable of creating temporary connections between two or more devices linked to the switch. In a switched network, some of these nodes are connected to the end systems (computers or telephones, for example). Others are used only for routing.

 The end systems (communicating devices) are labeled A, B, C, D... J, and the switches are labeled I, II, III, IV, and V. Each switch is connected to multiple links.

METHODS OF SWITCHING

Switching at TCP/IP Layers Switching at Physical Layer At the physical layer, we can have only circuit switching. There are no packets exchanged at the physical layer. The switches at the physical layer allow signals to travel in one path or another. Switching at Data-Link Layer

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 24 COMPUTER NETWORKS At the data-link layer, we can have packet switching. The term packet in this case means frames. Packet switching at the data-link layer is normally done using a virtual-circuit approach. Switching at Network Layer At the network layer, we can have packet switching. Currently the Internet uses a datagram approach. Switching at Application Layer At the application layer, we can have only message switching. The communication at the application layer occurs by exchanging messages.

CIRCUIT-SWITCHED NETWORKS

 A circuit-switched network has a set of switches connected by physical links, in which each link is divided into n channels.  The below figure shows a trivial circuit-switched network with four switches and four links. Each link is divided into n channels by using Frequency Divison Multiplexing (FDM) or Time Divison Multiplexing (TDM).  The end systems, such as computers or telephones, are directly connected to a switch.  Circuit switching takes place at the physical layer.  Before starting communication, the stations must make a reservation for the resources to be used during the communication. These resources, such as channels (bandwidth in FDM and time slots in TDM), switch buffers and switch input/output ports reserved during the entire duration of data transfer until the teardown phase.

  Data transferred between the two stations are a continuous flow bit by bit, sometimes there may be periods of silence.  There is no addressing involved during data transfer. The addressing used during the setup phase. The switches route the data based on their occupied band (FDM) or time slot (TDM).

Example 1 A circuit-switched network connects eight telephones in a small area. Communication is through 4-kHz voice channels. We assume that each link uses FDM to connect a maximum of two voice channels. The bandwidth of each link is then 8 kHz. Figure 8.4 shows the situation. Telephone 1 is connected to telephone 7; 2 to 5; 3 to 8; and 4 to 6.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 25 COMPUTER NETWORKS

Example 2 Consider a circuit-switched network that connects computers in two remote offices of a private company. The offices are connected using a T-l line from a service provider. There are two 4 X 8 (4 inputs and 8 outputs) switches in this network. For each switch, four output ports are folded into the input ports to allow communication between computers in the same office. Four other output ports allow communication between the two offices.

Three Phases  The actual communication in a circuit-switched network requires three phases: connection setup, data transfer, and connection teardown. Setup Phase  Before the two parties can communicate, a dedicated circuit needs to be established.  For example, in trivial circuit-switched network, when system A needs to connect to system M, it sends a setup request that includes the address of system M, to switch I. Switch I finds a channel between itself and switch IV that can be dedicated for this purpose. Switch I then sends the request to switch IV, which finds a dedicated channel between itself and switch III. Switch III informs system M of system A's intention at this time.  In the next step, an acknowledgment from system M needs to be sent in the opposite direction to system A. The connection established only after system A receives this acknowledgment. Data- Transfer Phase

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 26 COMPUTER NETWORKS  After the establishment of the dedicated circuit (channels), the two parties can transfer data. Teardown Phase  When one of the parties needs to disconnect, a signal is sent to each switch to release the resources.

Efficiency

 The circuit-switched networks are not efficient because resources are allocated during the entire duration of the connection. These resources are unavailable to other connections even if there is no activity for a long time.

Delay  The delay in this type of network is minimal. Due to resources are allocated for the duration of the connection data are not delayed at each switch.  The total delay is calculated as the time needed to create the connection, transfer data, and disconnect the circuit.

 The delay caused by the setup is the sum of four parts: the propagation time of the source computer request (slope of the first green box), the request signal transfer time (height of the first green box), the propagation time of the acknowledgment from the destination computer (slope of the second green box), and the signal transfer time of the acknowledgment (height of the second green box).  The delay due to data transfer is the sum of two parts: the propagation time (slope of the colored box) and data transfer time (height of the colored box).  The third box shows the time needed to tear down the circuit. We have shown the case in which the receiver requests disconnection, which creates the maximum delay.

PACKET SWITCHING

 In packet switching, there is no resource allocation for a packet. This means that there is no reserved bandwidth on the links, and there is no scheduled processing time for each packet.  Resources are allocated on demand. The allocation is done on a first come, first-served basis.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 27 COMPUTER NETWORKS  When a switch receives a packet, the packet must wait if there are other packets being processed.  We can have two types of packet-switched networks: datagram networks and virtual circuit networks.

Datagram Networks

 In a datagram network, each packet is treated independently. Packets in this approach are referred to as datagrams. Datagram switching is normally done at the network layer.  The below figure shows how the datagram approach is used to deliver four packets from station A to station X. The switches used in a datagram network called as routers.  In this example, all four packets (or datagrams) belong to the same message, but may travel different paths to reach their destination.  This approach can cause the datagrams to arrive at their destination out of order. Packets may also be lost or dropped because of a lack of resources.  The datagram networks are sometimes referred to as connectionless networks.

Routing Table:  If there are no setup or teardown phases, how are the packets routed to their destinations. In this type of network, each switch (or packet switch) has a routing table which is based on the destination address. The routing tables are dynamic and are updated periodically.  The destination addresses and the corresponding forwarding output ports are recorded in the tables.

Destination Address:  Every packet in a datagram network carries a header that contains, the destination address of the packet. P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 28 COMPUTER NETWORKS  When the switch receives the packet, this destination address is examined from the routing table to find the corresponding port through which the packet should be forwarded.  This address, remains the same during the entire journey of the packet.

Efficiency  The efficiency of a datagram network is better than a circuit-switched network.  The resources are allocated only when there are packets to be transferred.  If there is a delay of a few minutes between packets sent by source, the resources can be reallocated for other packets from other sources during these minutes.

Delay  The packet travels through two switches. There are three transmission times (3T), three propagation delays(3τ), and two waiting times (w1+ w2). We ignore the processing time in each switch. The total delay is

Total delay = 3T + 3τ+ W1 + W2

Virtual-Circuit Networks

 A virtual-circuit network is a combination of a circuit-switched network and a datagram network. It has some characteristics of both.  As in a circuit-switched network, there are setup and teardown phases in addition to the data transfer phase.  Resources can be allocated during the setup phase, as in a circuit-switched network, or on demand, as in a datagram network.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 29 COMPUTER NETWORKS

 As in a datagram network, data are packetized and each packet carries an address in the header.  As in a circuit-switched network, all packets follow the same path established during the connection.  A virtual-circuit network is normally implemented in the data-link layer.

Addressing In a virtual-circuit network, two types of addressing are involved: global and local (virtual-circuit identifier). Global Addressing A source or a destination needs a global address (IP address). a global address in virtual-circuit networks is used only to create a virtual-circuit identifier.

Virtual-Circuit Identifier The identifier is used for data transfer is called the virtual-circuit identifier (VCI). When a frame arrives at a switch, it has a VCI; when it leaves, it has a different VCI.

Three Phases  Setup  Data transfer  Teardown In the setup phase, the source and destination use their global addresses to make table entries for the connection. In the teardown phase, the source and destination inform the switches to delete the corresponding entry. Data transfer occurs between these two phases.

Setup Phase: In the setup phase, a switch creates an entry for a virtual circuit. For example, If source A needs to create a virtual circuit to B. Two steps are required: the setup request and the acknowledgment. Setup request

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 30 COMPUTER NETWORKS

setup request frame is sent from the source to the destination.  Source A sends a setup frame to switch 1.  Switch 1 receives the setup request frame. It knows that a frame going from A to B goes out through port 3. The switch creates an entry in its table for this virtual circuit. The switch assigns the incoming port 1 and chooses an available incoming VCI 14 and the outgoing port 3.It does not know the outgoing VCI created by next switch, which will be found during the acknowledgment step. The switch then forwards the frame through port 3 to switch 2.  Switch 2 receives the setup request frame. The same events happen here as at switch 1. Three columns of the table are completed: incoming port 1, incoming VCI 66, and outgoing port 2.  Switch 3 receives the setup request frame. Again, three columns are completed: incoming port 2, incoming VCI 22, and outgoing port 3.  Destination B receives the setup frame, and if it is ready to receive frames from A, it assigns a VCI to the incoming frames that come from A.

Acknowledgment  An acknowledgment frame used to complete the entries in the switching tables.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 31 COMPUTER NETWORKS  The destination sends an acknowledgment to switch 3. The acknowledgment carries the global source and destination addresses so the switch knows which entry in the table is to be completed. The frame also carries VCI 77, chosen by the destination for A. Switch 3 uses this VCI to complete the outgoing VCI column entry.

 Switch 3 sends an acknowledgment to switch 2 that contains its incoming VCI 22. Switch 2 uses this VCI to complete the outgoing VCI column entry.

 Switch 2 sends an acknowledgment to switch 1 that contains its incoming VCI 66. Switch 1 uses this VCI to complete the outgoing VCI column entry.  Finally switch 1 sends an acknowledgment to source A that contains its incoming VCI 14.  The source uses this as the outgoing VCI for the data frames to be sent to the destination B.

Data- Transfer Phase:  To transfer a frame from a source to its destination, all switches need to have a table entry for this virtual circuit. The table has four columns.

 The above figure shows a frame arriving at port 1 with a VCI of 14. When the frame arrives, the switch looks in its table to find port 1 and a VCI of 14.  When it is found, the switch changes the VCI to 22 and send out the frame from port 3.  The below figure shows how a frame from source A reaches destination B and how its VCI changes during the trip. Each switch changes the VCI and routes the frame.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 32 COMPUTER NETWORKS

Teardown Phase:  In this phase, source A, after sending all frames to B, sends a special frame called a teardown request.

 Destination B responds with a teardown confirmation frame.

 All switches delete the corresponding entry from their tables.

Efficiency  The resource reservation in a virtual-circuit network can be made during the setup or can be on demand during the data-transfer phase.  In virtual-circuit switching, all packets belonging to the same source and destination travel the same path if resources are reserved.  The packets may arrive at the destination with different delays if resource allocation is on demand.  There is an advantage in a virtual-circuit network even if resource allocation is on demand. The source can check the availability of the resources, without actually reserving it.

Delay in Virtual-Circuit Networks  In a virtual-circuit network, there is a one-time delay for setup and a one-time delay for teardown. If resources are allocated during the setup phase, there is no wait time for individual packets.

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 33 COMPUTER NETWORKS

 The packet is travelling through two switches (routers). There are three transmission times (3T), three propagation times (3τ), a setup delay and a teardown delay. Total delay = 3T + 3τ + setup delay + teardown delay

P. RAGHUNATH NAIDU, Asst. Prof., CSE Department, ADITYA COLLEGE OF ENGINEERING (ACEM) 34

Recommended publications