UNIT-1 Chap-2 computer networks
UNIT-1 Chap-2 computer networks
By SHILPA KAREGOUDRA
Assistant Professor
Department of Computer Science and Engineering
NMAMIT
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
c f c T
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.
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.
SNRdB = 10log10SNR
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.
C B . log 2 (1 SNR)
AND
Bit Rate 2 . B . log 2 L
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.
Bandwidth
One characteristic that measure network performance is bandwidth.
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
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.
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.
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.
• 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.
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
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
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
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).
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.
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.
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.
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.
• 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.
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.
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.
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
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.
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.
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.
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.
Acknowledgment
A special frame, called the acknowledgment frame, completes the
entries in the switching
tables. Figure 8.15 shows the process.
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