0% found this document useful (0 votes)
2 views

UNIT-1 Chap-2 computer networks

Uploaded by

ziyanhussain61
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

UNIT-1 Chap-2 computer networks

Uploaded by

ziyanhussain61
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 78

Introduction to Physical Layer

By SHILPA KAREGOUDRA
Assistant Professor
Department of Computer Science and Engineering
NMAMIT

© McGraw Hill, LLC 1


Chapter 2: Outline

2.1 SIGNALS – data , signals both analog and digital

2.2 SIGNAL IMPAIRMENT – transmission( atteneuation, distortion,


noise) and performance of network

2.3 DIGITAL TRANSMISSION – analog and digital data to digital


signal

2.4 ANALOG TRANSMISSION –analog and digital data to analog


signals

2.5 MULTIPLEXING- achieve higher bandwidth, FDM and TDM

2.6 TRANSMISSION MEDIA – guided(wires and cables) and


unguided(air)
© McGraw Hill, LLC 2
2-1 SIGNALS

Figure 2.1 Communication at the physical layer : A scenario where a scientist Alice working at sky research
needs to order a book for her research from bob, the manager of scientific books, an online bookstore

© McGraw Hill, LLC 3


2-1 SIGNALS
What is exchanged between Alice and Bob is data, but what goes
through the network at the physical layer is signals.

© McGraw Hill, LLC 5


2-1 SIGNALS
When alice sends a message to bob , the message is changed to electrical signals,
when bob receives the message . The signals are changed back to the message. The
reverser situation happens when bob sends a message to alice. The signals can
analog or digital

Figure 2.2 Comparison of analog and digital signals


Two graphs of value versus time are shown. The first graph shows an analog
signal that has wavy patterns with positive and negative peaks. The second graph
shows a digital signal that shows square waveforms that lies at a positive value
for a certain period, which then remains constant at the minimum value and then
drops down to a negative value with increasing time.

© McGraw Hill, LLC 6


2.1.1 Analog Signal
An analog signal can take one of the two forms: periodic or aperiodic. In data
communication, we normally use periodic signals. A simple periodic signal, a sine
wave, cannot be decomposed into simpler signals.

A graph shows a continuous sine waveform that originates


Figure 2.3 A sine wave
from a positive value. The waveform with three crests and three troughs has a
total period of 1 second. The period between any two crests is 'T ' that equals a
period of 1 over 3 seconds. The amplitude is marked 'A. ' The half of the first
crest lies on the negative x-axis. The distance between the origin and the point
where the waveform meets the x-axis is marked 'P' that represents the phase, 1
over 4 period that equals 90 degrees.
© McGraw Hill, LLC 7
2.1.1 Analog Signal
Peak Amplitude
The peak amplitude of a signal is the absolute value of its highest intensity.
Period and Frequency
The period (T) refers to the amount of time, in seconds, that a signal needs to
complete one cycle. The frequency (f), measured in Hertz (Hz), refers to the number
of periods in one second. Note that period and frequency are just one characteristic
defined in two ways. Period and frequency are inverse of each other, in other words
(f = 1/ T).
Example 2.1 The voltage of a battery is constant. However, this can be considered
as periodic with frequency of 0 and period of infinity.
Example 2.2 The electrical voltage in every house in US is periodic with peak
value of 120 to 120 volts. Its frequency is 60 Hz.

© McGraw Hill, LLC 8


2.1.1 Analog Signal
Phase
The term phase describes the position of the waveform relative to
time 0. If we think of the wave as something that can be shifted
backward or forward along the time axis, phase describes the
amount of that shift.
Wavelength
The wavelength is the distance a simple signal can travel in one
period. Wavelength binds the period or the frequency of a simple
sine wave to the propagation speed in the medium. If we represent
wavelength by l, propagation speed by c, and frequency by f, and
period by T, we get

 c f c T

© McGraw Hill, LLC 9


Analog Signal

Time and Frequency Domain


A sine waves is comprehensively defined by its amplitude, frequency, and phase.
This can be done in both time and frequency domain.

© McGraw Hill, LLC 10


Analog Signal

Composite Signal
• So far, we have focused on simple sine waves( convey no message-
just hear a buzz). A composite signal is made of many simple sine
waves.
• The range of frequencies contained in a composite signal is its
bandwidth. The bandwidth of a signal is the difference between the
lowest and highest frequencies in the signal.

The bandwidth of a composite signal is the difference between the highest


and the lowest frequencies contained in that signal.

© McGraw Hill, LLC 11


Digital Signal
Information can also be represented by a digital signal.
For example, a value 1 can be encoded as a positive voltage and a value 0 as zero
voltage.
A digital signal can have more than two levels. In this case, we can send more
than 1 bit for each level.

© McGraw Hill, LLC 12


Digital Signal
Bit Rate
Most digital signal are nonperiodic, and thus period and frequency
are not appropriate characteristics.
Another term-bit rate (instead of frequency) is used. The bit rate is
the number of bits sent in 1 second.

Example 2.3 Assume we have downloaded text documentation at the


rate of 100 pages per minute. A page is an average of 24 lines with
80 characters per line. If we assume that one character requires 8
bits, the bit rate is:

100 * 24 * 80 * 8 = 1,536,000 bps = 1.536 Mbps

© McGraw Hill, LLC 13


Digital Signal

Bit Length
We discuss the concept of a wavelength for an analog signal.

We can define something similar for a digital signal: the bit length.
The bit length is the distance one bit occupy on the transmission
medium.

bit length = 1 / bit rate

© McGraw Hill, LLC 14


2.1.2 Digital Signal
Transmission of Digital Signal A digital signal is a composite
analog signal with frequency between zero and infinity.
We can have two types of transmission: baseband and broadband.
The first means sending the digital signal without changing it to
analog signal.
The second means changing the digital signal to analog signal and
send the analog signal.

© McGraw Hill, LLC 15


2-2 SIGNAL IMPAIRMENT

Signals travel through transmission media, which are not perfect.


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.

© McGraw Hill, LLC 16


2-2 SIGNAL IMPAIRMENT

Attenuation and Amplification


Attenuation means a loss of energy.
To compensate for this loss we need amplification. When a signal,
simple or composite, travels through a medium, it loses some of its
energy in overcoming the resistance of the medium.

© McGraw Hill, LLC 17


2-2 SIGNAL IMPAIRMENT

Example 2.5 Suppose a signal travels through a transmission


medium and its power is reduced to one half. This means that P 2 =
0.5 P1. In this case, the attenuation (loss of power) can be
calculated as
10 log10 P2 P1 10 log10 (0.5P1 ) P1 10 log10 0.5 10 (  0.3)  3dB.

A loss of 3 dB (−3 dB) is equivalent to losing one-half the power.

© McGraw Hill, LLC 18


2-2 SIGNAL IMPAIRMENT
Distortion
Distortion means that the signal changes its form or shape.
Distortion can occur in a composite signal made up of different
frequencies.
Noise
Noise is another cause of impairment. Several type of noise may
occur during the signal transmission.
Signal-to-Noise Ratio (SNR) is defined as
SNR = (average signal power) / (average noise power)

SNRdB = 10log10SNR

© McGraw Hill, LLC 19


Data Rate Limits

A very important consideration in data communications is 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 we use
3. The quality of the channel (the level of noise)
Two theoretical formulas were developed to calculate the data rate:
one by Nyquist for a noiseless channel, another by Shannon for a
noisy channel.

© McGraw Hill, LLC 20


2.2.3 Data Rate Limits
Noiseless Channel: Nyquist Bit Rate
For a noiseless channel, the Nyquist bit rate formula defines the
theoretical maximum bit rate.
Bit Rate 2 . B . log 2 L

Where B is the bandwidth


L is the Levels in signal

© McGraw Hill, LLC 21


2.2.3 Data Rate Limits
Example 2.6
We need to send 265 kbps over a noiseless (ideal) channel with a
bandwidth of 20 kHz. How many signal levels do we need? We can
use the Nyquist formula as shown:

265,000 2 20,000 log 2 L  log 2 L 6.625 L 26.625 98.7 levels

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.

© McGraw Hill, LLC 22


Noisy Channel: Shannon Capacity
For a noisy channel, we have
C B . log 2 (1  SNR)

© McGraw Hill, LLC 23


2.2.3 Data Rate Limits

Example 2.7 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 shown below.
C B log 2 (1  SNR) B log 2 (1  0) B log 2 1 B 0 0

This means that the capacity of this channel is zero regardless of


the bandwidth. In other words, the data is so corrupted in this
channel that it is useless when received.

© McGraw Hill, LLC 24


2.2.3 Data Rate Limits
Example 2.8 We can calculate the theoretical highest bit rate of a
regular telephone line. 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 shown below.

C B log 2 (1  SNR) 3000 log 2 (1  3162) 34,881 bps

This means that the highest bit rate for a telephone line is 34.881
kbps. If we want to send data faster than this, we can either
increase the bandwidth of the line or improve the signal-to noise
ratio.

© McGraw Hill, LLC 25


Using Both Limits

In practice, we need to use both limits.

C B . log 2 (1  SNR)
AND
Bit Rate 2 . B . log 2 L

© McGraw Hill, LLC 26


2.2.3 Data Rate Limits
Example 2.9
We have a channel with a 1-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.

C B log 2 (1  SNR) 106 log 2 (1  63) 10 6 log 2 64 6 Mbps

The Shannon formula gives us 6 Mbps, the upper limit. For better performance
we choose something lower, 4 Mbps, for example. Then we use the Nyquist
formula to find the number of signal levels.

4 Mbps 2 1 MHz log 2L  log 2L 2  L 4

© McGraw Hill, LLC 27


2.2.4 Performance
Up to now, we have discussed the tools of transmitting data (signals)
over a network and how the data behave.
One important issue in networking is the performance of the network
—how good is it?

Bandwidth
One characteristic that measure network performance is bandwidth.

© McGraw Hill, LLC 28


2.2.4 Performance

Throughput The throughput is the measure of how fast we can


actually send data through a network.

Latency (Delay) The latency or delay defines how long it takes for
an entire message to completely arrive at the destination from the
time the first bit is sent out from the source.
We say that normally have four types of delay: propagation delay,
transmission delay, queuing delay, and processing delay. The
latency or total delay is
Latency = propagation delay + transmission delay + queuing delay
+ processing delay

© McGraw Hill, LLC 31


Bandwidth-Delay Product Bandwidth and delay are two
performance metric of a link.
However, what is very important in data communications is the
product of the two, the bandwidth-delay product.

© McGraw Hill, LLC 32


2.2.4 Performance
Example 2.12
We can think about the link between two points as a pipe. We can
say that the volume of the pipe defines the bandwidth-delay
product

Figure 2.7 Bandwidth-delay product A cylindrical tube is shown. The length of the
tube represents delay. The Cross-section of the tube represents bandwidth.
Volume is given by the multiplication of bandwidth and delay.

© McGraw Hill, LLC 33


2.2.4 Performance

Jitter Another performance issue that is related to delay is jitter.

We can roughly say that jitter is a problem if different packets of


data encounter different delays and the 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 endures jitter.

© McGraw Hill, LLC 34


2-3 DIGITAL TRANSMISSION

A computer network is designed to send information


from one point to another.

This information needs to be converted to either a


digital signal or an analog signal for transmission.

© McGraw Hill, LLC 35


2.3.1 Digital-to-Digital Conversion

In this section, we see how we can represent digital data by using


digital signals.
The conversion involves three techniques: line coding, block
coding, and scrambling.
Line coding is always needed; block coding and scrambling may or
may not be needed.

© McGraw Hill, LLC 36


Line Coding

Line coding is the process of converting digital data to digital


signals.

We assume that data, in the form of text, numbers, graphical


images, audio, or video, are stored in computer memory as
sequences of bits.

© McGraw Hill, LLC 37


Line Coding
Line coding converts a sequence of bits to a digital signal. At the
sender, digital data are encoded into a digital signal; at the
receiver, the digital data are recreated by decoding the digital
signa
Signal Element Versus Data Element
• Let us distinguish between a data element and a signal element.
In data communications, our goal is to send data elements.
• A data element is the smallest entity that can represent a piece
of information: this is the bit. In digital data communications, a
signal element carries data elements.
• A signal element is the shortest unit (timewise) of a digital
signal. In other words, data elements are what we need to send;
signal elements are what we can send. Data elements are being
carried; signal elements are the carriers.
© McGraw Hill, LLC 38
Line Coding

We define a ratio r which is the number of data elements carried by


each signal element. Figure 4.2 shows several situations with
different values of r.

© McGraw Hill, LLC 39


Line Coding Schemes

We can roughly divide line coding schemes into five broad


categories,

© McGraw Hill, LLC 40


Unipolar Scheme
In a unipolar scheme, all the signal levels are on one side of the
time axis, either above or below.
NRZ (Non-Return-to-Zero)
• Traditionally, a unipolar scheme was designed as a non-return-
to-zero (NRZ) scheme in which the positive voltage defines bit
1 and the zero voltage defines bit 0.
• It is called NRZ because the signal does not return to zero at the
middle of the bit.

© McGraw Hill, LLC 41


Unipolar Scheme

© McGraw Hill, LLC 42


Polar Schemes

In polar schemes, the voltages are on both sides of the time axis.
For example, the voltage level for 0 can be positive and the voltage
level for 1 can be negative.
Non-Return-to-Zero (NRZ)
In polar NRZ encoding, we use two levels of voltage amplitude.
We can have two versions of polar NRZ: NRZ-L and NRZ-I, as
shown in Figure 4.6. The figure also shows the value of r, the
average baud rate, and the bandwidth.

© McGraw Hill, LLC 43


Polar Schemes

• In the first variation, NRZ-L (NRZ-Level), the level of the


voltage determines the value of the bit.
• In the second variation, NRZ-I (NRZ-Invert), the change or
lack of change in the level of the voltage determines the value of
the bit.
• If there is no change, the bit is 0; if there is a change, the bit is 1.

© McGraw Hill, LLC 44


Polar Schemes

© McGraw Hill, LLC 45


Unipolar versus polar scheme

• Compared with its polar counterpart (see the next section), this
scheme is very costly.
• The normalized power (the power needed to send 1 bit per unit
line resistance) is double that for polar NRZ. For this reason,
this scheme is normally not used in data communications today.
• Although baseline wandering is a problem for both variations, it
is twice as severe in NRZ-L. If there is a long sequence of 0s or
1s in NRZ-L, the average signal power becomes skewed.
• The synchronization problem (sender and receiver clocks are not
synchronized) also exists in both schemes. Again, this problem
is more serious in NRZ-L than in NRZ-I.

© McGraw Hill, LLC 46


Transmission Media
Transmission media are actually located below the
physical layer and are directly controlled by the
physical layer. We could say that transmission media
belong to layer zero.
Figure 7.1 shows the position of transmission media
in relation to the physical layer.

© McGraw Hill, LLC 47


Transmission Media

A transmission medium can be broadly defined as anything that


can carry information from a source to a destination.
For example, the transmission medium for two people having a
dinner conversation is the air. The air can also be used to convey
the message in a smoke signal or semaphore.
For a written message, the transmission medium might be a mail
carrier, a truck, or an airplane.
In data communications the definition of the information and the
transmission medium is more specific.
The transmission medium is usually free space, metallic cable, or
fiber-optic cable. The information is usually a signal that is the
result of a conversion of data from another form.

© McGraw Hill, LLC 48


Transmission Media

In telecommunications, transmission media can be divided into two


broad categories: guided and unguided.
Guided media include twisted-pair cable, coaxial cable, and fiber-
optic cable.
Unguided medium is free space. Figure 7.2 shows this taxonomy

© McGraw Hill, LLC 49


Guided Media

Guided media, which are those that provide a conduit from one
device to another, include twisted-pair cable, coaxial cable, and
fiber-optic cable.
• A signal traveling along any of these media is directed and
contained by the physical limits of the medium.
• Twisted-pair and coaxial cable use metallic (copper) conductors
that accept and transport signals in the form of electric

© McGraw Hill, LLC 50


Guided Media

1. Twisted-Pair Cable:
A twisted pair consists of two conductors (normally copper), each with
its own plastic
insulation, twisted together, as shown in Figure 7.3.

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.
In addition to the signal sent by the sender on one of the wires,
interference (noise)
© McGraw Hill, LLC 51
Guided Media

• If the two wires are parallel, the effect of these unwanted


signals is not the same in both wires because they are at
different locations relative to the noise or crosstalk sources
(e.g., one is closer and the other is farther). 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 it probable that both wires are equally
affected by external influences (noise or crosstalk).
Unshielded Versus Shielded Twisted-Pair Cable:
• The most common twisted-pair cable used in communications is
referred to as unshielded twisted-pair (UTP). IBM has also
produced a version of twisted-pair cable for its use, called shielded
twisted-pair (STP).
• STP cable has a metal foil or braided mesh covering that encases
each pair of insulated conductors. Although metal casing improves
© McGraw Hill, LLC 52
Guided Media

© McGraw Hill, LLC 53


Guided Media

Connectors
The most common UTP connector is RJ45 (RJ stands for registered
jack), as shown
in Figure 7.5. The RJ45 is a keyed connector, meaning the connector
can be inserted in
only one way.

Performance
One way to measure the performance of twisted-pair cable is to
compare attenuation
© McGraw Hill, LLC 54
Guided Media

Figure 7.6 shows that with increasing frequency, the attenuation,


measured in
decibels per kilometer (dB/km), sharply increases with frequencies
above 100 kHz. Note
that gauge is a measure of the thickness of the wire.

© McGraw Hill, LLC 55


Guided Media

2. Coaxial Cable
Coaxial cable (or coax) carries signals of higher frequency ranges than
those in twisted pair cable, in part because the two media are
constructed quite differently.
• Instead of having two wires, coax has a central core conductor of
solid or stranded wire (usually copper) enclosed in an insulating
sheath, which is, in turn, encased in an outer conductor of metal foil,
braid, or a combination of the two.
• The outer metallic wrapping serves both as a shield against noise
and as the second conductor, which completes the circuit.
• This outer conductor is also enclosed in an insulating sheath, and the
whole cable is
• protected by a plastic cover (see Figure 7.7).

© McGraw Hill, LLC 56


Guided Media

Coaxial Cable Standards


Coaxial cables are categorized by their Radio Government (RG) ratings. Each
RG number denotes a unique set of physical specifications, including the wire
gauge of the inner conductor, the thickness and type of the inner insulator, the
construction of the shield, and the size and type of the outer casing. Each cable
defined by an RG rating is adapted for a specialized function, as shown in Table
7.2.

© McGraw Hill, LLC 57


Guided Media

Coaxial Cable Connectors


To connect coaxial cable to devices, we need coaxial connectors. The most
common type of connector used today is the Bayonet Neill-Concelman (BNC)
connector.
Figure 7.8 shows three popular types of these connectors: the BNC connector,
the BNC T connector, and the BNC terminator.

© McGraw Hill, LLC 58


Guided Media

Performance
• As we did with twisted-pair cable, we can measure the performance
of a coaxial cable.
• The attenuation is much higher in coaxial cable than in twisted-pair
cable.
• In other words, although coaxial cable has a much higher bandwidth,
the signal weakens rapidly and requires the frequent use of
repeaters.

© McGraw Hill, LLC 59


Switching

Introduction
• A network is a set of connected devices. Whenever we have
multiple devices, we have the problem of how to connect
them to make one-to-one communication possible.
• One solution is to make a point-to-point connection between
each pair of devices (a mesh topology) or between a central
device and every other device (a star topology). These
methods, however, are impractical and wasteful when applied
to very large networks.
• A better solution is switching. A switched network consists of a series of
interlinked nodes, called switches. Switches are devices capable of creating
temporary connections between two or more devices linked to the switch.

© McGraw Hill, LLC 60


Switching

The end systems (communicating devices) are labeled A, B, C, D, and so on,


and the switches are labeled I, II, III, IV, and V. Each switch is connected to
multiple links.

© McGraw Hill, LLC 61


Packet Switching
• In data communications, we need to send messages from one end system to
another. If the message is going to pass through a packet-switched network,
it needs to be divided into packets of fixed or variable size. The size of the
packet is determined by the network and the governing protocol.
• 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. When a switch receives a
packet, no matter what the source or destination is, the
packet must wait if there are other packets being processed.
We can have two types of packet-switched networks:
1. datagram networks and
2. virtual circuit networks.

© McGraw Hill, LLC 62


Packet Switching

1. Datagram Networks
In a datagram network, each packet is treated independently of all
others. Even if a packet is part of a multipacket transmission, the
network treats it as though it existed alone. Packets in this approach
are referred to as datagrams.

© McGraw Hill, LLC 63


Packet Switching

Figure 8.7 shows how the datagram approach is used to deliver four packets from
station A to station X. The switches in a datagram network are traditionally referred
to
as routers.

© McGraw Hill, LLC 64


Packet Switching

• In this example, all four packets (or datagrams) belong to the same message,
but may travel different paths to reach their destination.
• This is so because the links may be involved in carrying packets from other
sources and do not have the necessary bandwidth available to carry all the
packets from A to X.
• The datagram networks are sometimes referred to as connectionless networks.
The term connectionless here means that the switch (packet switch) does not
keep information about the connection state.
• There are no setup or teardown phases. Each packet is treated the same by a
switch regardless of its source or destination.

© McGraw Hill, LLC 65


Packet Switching

© McGraw Hill, LLC 66


Packet Switching

Destination Address
Every packet in a datagram network carries a header that contains, among other
information, the destination address of the packet. When the switch receives the
packet, this destination address is examined; the routing table is consulted to find
the corresponding port through which the packet should be forwarded.

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

© McGraw Hill, LLC 67


Packet Switching

Delay
There may be greater delay in a datagram network than in a
virtual-circuit network. Although there are no setup and
teardown phases, each packet may experience a wait at a
switch before it is forwarded. In addition, since not all packets in
a message necessarily travel through the same switches, the
delay is not uniform for the packets of a message. Figure 8.9
gives an example of delay in a datagram network for one
packet.

© McGraw Hill, LLC 68


Packet Switching

Virtual-Circuit Networks
A virtual-circuit network is a cross between a circuit-switched network and a
datagram network. It has some characteristics of both.
1. As in a circuit-switched network, there are setup and teardown
phases in addition
to the data transfer phase.
2. Resources can be allocated during the setup phase, as in a circuit-
switched network,
or on demand, as in a datagram network.
3. As in a datagram network, data are packetized and each packet
carries an address in the header. However, the address in
the header has local jurisdiction (it defines what the next switch
should be and the channel on which the packet is being carried), not
end-to-end jurisdiction. The reader may ask how the intermediate
switches know where to send the packet if there is no final
destination address carried by a packet. The answer will be clear
when we discuss virtual-circuit identifiers in the next section.
© McGraw Hill, LLC 69
Packet Switching

4. As in a circuit-switched network, all packets follow the same path


established during
the connection.
5. A virtual-circuit network is normally implemented in the data-link
layer, while a circuit-switched network is implemented in the
physical layer and a datagram network in the network layer. But this
may change in the future.
Figure 8.10 is an example of a virtual-circuit network.

© McGraw Hill, LLC 70


Packet Switching

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 to have a global address—an
address that can be unique in the scope of the network or
internationally if the network is part of an international network.
However, we will see that a global address in virtual-circuit
networks is used only to create a virtual-circuit identifier, as
discussed next.

© McGraw Hill, LLC 71


Packet Switching

Three Phases
As in a circuit-switched network, a source and destination need
to go through three
phases in a virtual-circuit network: setup, data transfer, and
teardown.
In the setup phase, the source and destination use their
global addresses to help switches make table entries for the
connection.
In the teardown phase, the source and destination inform the
switches to delete the corresponding entry.

© McGraw Hill, LLC 72


Packet Switching

© McGraw Hill, LLC 73


Packet Switching

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, in its
simplest form, has four columns. This means that the switch
holds four pieces of information for each virtual circuit that is
already set up.

© McGraw Hill, LLC 74


Packet Switching

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

© McGraw Hill, LLC 75


Packet Switching

a. Source A sends a setup frame to switch 1.


b. Switch 1 receives the setup request frame. It knows that a frame
going from A to B
goes out through port 3. How the switch has obtained this information
is a point covered in future chapters. The switch, in the setup phase,
acts as a packet switch; it has a routing table which is different from
the switching table. For the moment, assume that it knows the output
port. The switch creates an entry in its table for this virtual circuit, but
it is only able to fill three of the four columns. The switch assigns the
incoming port (1) and chooses an available incoming VCI (14) and the
outgoing port (3). It does not yet know the outgoing VCI, which will be
found during the acknowledgment step. The switch then forwards the
frame through port 3 to switch 2.
c. Switch 2 receives the setup request frame. The same events happen here as at switch 1;
three columns of the table are completed: in this case, incoming port (1), incoming VCI
(66), and outgoing port (2).
d. Switch 3 receives the setup request frame. Again, three columns are completed:
incoming port (2), incoming VCI (22), and outgoing port (3).
© McGraw Hill, LLC 76
Packet Switching

e. 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, in this case
77. This VCI lets the destination know that the frames come from A, and not
other sources.

© McGraw Hill, LLC 77


Packet Switching

Acknowledgment
A special frame, called the acknowledgment frame, completes the
entries in the switching
tables. Figure 8.15 shows the process.

a. 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 as
the incoming VCI for frames from A. Switch 3 uses this VCI to complete
the outgoing
VCI column for this entry. Note that 77 is the incoming VCI for
destination B,
but the outgoing VCI for switch 3.
© McGraw Hill, LLC 78
Packet Switching

c. Switch 2 sends an acknowledgment to switch 1 that contains


its incoming VCI in the table, chosen in the previous step.
Switch 1 uses this as the outgoing VCI in the table.
d. Finally switch 1 sends an acknowledgment to source A that
contains its incoming VCI in the table, chosen in the previous
step.
e. The source uses this as the outgoing VCI for the data frames
to be sent to destination

© McGraw Hill, LLC 79


Packet Switching

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
As we said before, resource reservation in a virtual-circuit network can
be made during
the setup or can be on demand during the data-transfer phase. In the
first case, the delay
for each packet is the same; in the second case, each packet may
encounter different
delays. There is one big advantage in a virtual-circuit network even if
resource allocation
is on demand. The source can check the availability of the resources,
without
© McGraw Hill, LLC actually 80
Packet Switching

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. Figure 8.16 shows the delay for a packet traveling
through two
switches in a virtual-circuit network.

© McGraw Hill, LLC 81

You might also like