Unit - 1
Unit - 1
COMPUTER NETWORKS
UNIT - I
Introduction
Unit I 0
Computer networks
It first establishes a circuit across the links and allows source node
to send stream of bits across this circuit to the destination node
Unit I 1
Computer networks
Unit I 2
Computer networks
Unit I 3
Computer networks
Unit I 4
Computer networks
Unit I 5
Computer networks
Unit I 6
Computer networks
OSI Architecture
Unit I 7
Computer networks
Unit I 8
Computer networks
1. Physical Layer
The physical layer coordinates the functions required to transmit a
bit stream over a physical medium.
Unit I 9
Computer networks
Unit I 10
Computer networks
3. NETWORK LAYER
This layer is responsible for the delivery of packets from source to
destination.
Unit I 11
Computer networks
Unit I 12
Computer networks
6.PRESENTATION LAYER
This layer enables the user to access the n/w. This allows the user
to log on to remote user.
Unit I 13
Computer networks
Unit I 14
Computer networks
Summary of layers
PHYSICAL LINKS
Guided Media
Guided media conduct signals 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 current. Optical
fiber is a glass cable that accepts and transports signals in the form of
light.
Twisted Pair Cable
A twisted pair consists of two conductors (normally copper) each
with its own plastic insulation, twisted together.
One of the wires is used to carry signals to the receiver
Other is used as ground reference
Unit I 15
Computer networks
Interference and cross talk may affect both the wires and create
unwanted signals, if the two wires are parallel.
By twisting the pair, a balance is maintained. Suppose in one twist
one wire is closer to noise 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.
Twisted Pair Cable comes into two forms:
Unshielded
Shielded
Unshielded versus shielded Twisted-Pair Cable
Shielded Twisted-Pair (STP) Cable has a metal foil or braided-
mesh covering that encases each pair of insulated conductors.
Metal casing improves that quality of cable by preventing the
penetration of noise or cross talk.
It is more expensive. The following figure shows the difference
between UTP and STP
Applications
Twisted Pair cables are used in telephone lines to provide voice
and data channels.
Local area networks also use twisted pair cables.
Connectors
The most common UTP connector is RJ45.
Unit I 16
Computer networks
Coaxial Cable
Coaxial cable (coax) carries signals of higher frequency ranges than
twisted pair cable.
Instead of having two wires, coax has a central core conductor of
solid or stranded wire (usually copper) enclosed in an insulating sheath,
and with outer conductor of metal foil.
The outer metallic wrapping serves both as a shield against noise
and as the second conductor and the whole cable is protected by a
plastic cover.
Applications
It is used in analog and digital telephone networks
It is also used in Cable TV networks
It is used in Ethernet LAN
Connectors
BNC connector – to connect the end of the cable to a device
BNC T - to branch out network connection to computer
BNC terminator - at the end of the cable to prevent the
reflection of the signal.
Fiber Optic Cable
Unit I 17
Computer networks
If the angle of incidence(the angle the ray makes with the line
perpendicular to the interface between the two medium) is less than the
critical angle the ray refracts and move closer to the surface.
If the angle of incidence is equal to the critical angle, the light
bends along the interface.
If the angle of incidence is greater than the critical angle, the ray
reflects and travels again in the denser substance. Critical angle differs
from one medium to another medium.
Optical fiber use reflection to guide light through a channel.
Propagation Modes
Unit I 18
Computer networks
Mode
Step- Graded -
Index Index
Multimode
In the multiple mode, multiple light beams from a source move
through the core in different paths.
Unit I 19
Computer networks
Unit I 20
Computer networks
Radio Waves
Electromagnetic waves ranging in frequencies between 3 kHz and 1
GHz are normally called radio waves.
Properties
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.
Radio waves, particularly those of low and medium
frequencies, can penetrate walls.
Fig:Omnidirectional
antenna
Disadvantages
The omnidirectional property has a disadvantage, that the radio
waves transmitted by one antenna are susceptible to
Unit I 21
Computer networks
Microwaves
Electromagnetic waves having frequencies between 1 and 300 GHz
are called microwaves.
Properties
Microwaves are unidirectional.
Sending and receiving antennas need to be aligned
Microwave propagation is line-of-sight
Very high-frequency microwaves cannot penetrate walls
Unit I 22
Computer networks
f
f5
f4
f3
f2
f1
Unit I 23
Computer networks
Each station is allocated a time slot during which it can send data.
The main problem with TDMA lies in achieving synchronization
between the different stations.
Each station needs to know the beginning of its slot and the
location of its slot.
f1 f2 f3 f4 f5 f6 T
Code c
C5
c4
c3
c2
c1
Frequency f
Issues in the data link layer
Framing
Unit I 24
Computer networks
Unit I 25
Computer networks
Byte-Counting Approach
The number of bytes contained in a frame can he included as a
field in the frame header. DDCMP protocol is used for this approach. The
frame format is
Unit I 26
Computer networks
HDLC denotes both the beginning and the end of a frame with the
distinguished bit sequence 01111110.
This sequence might appear anywhere in the body of the frame, it
can be avoided by bit stuffing.
On the sending side, any time five consecutive 1’s have been
transmitted from the body of the message (i.e., excluding when the
sender is trying to transmit the distinguished 01111110 sequence),
the sender inserts a 0 before transmitting the next bit.
On the receiving side, five consecutive 1’s arrived, the receiver
makes its decision based on the next bit it sees (i.e., the bit
following the five is).
If the next bit is a 0, it must have been stuffed, and so the receiver
removes it. If the next bit is a 1, then one of two things is true,
either this is the end-of-frame marker or an error has been
introduced into the bit stream.
By looking at the next bit, the receiver can distinguish between
these two cases:
8 If it sees a 0 (i.e., the last eight bits it has looked at are 01111110),
then it is the end-of- frame marker.
9 If it sees a 1 (i.e., the last eight bits it has looked at are 01111111),
then there must have been an error and the whole frame is
discarded.
Unit I 27
Computer networks
Unit I 28
Computer networks
Types of Errors
Single-bit error
The term Single-bit error means that only one bit of a given data
unit (such as byte, character, data unit or packet) is changed from 1 to 0
or from 0 to 1.
Burst Error
The term Burst Error means that two or more bits in the data unit
have changed from 1 to 0 or from 0 to 1.
Redundancy
One method is to send every data twice, so that receiver checks
every bit of two copies and detect error.
Drawbacks
Sends n-redundant bits for n-bit message.
Many errors are undetected if both the copies are corrupted.
Instead of adding entire data, some bits are appended to each unit.
This is called redundant bit because the bits added will not give
any new information. These bits are called error detecting codes.
The three error detecting techniques are:
Parity check
Check sum algorithm
Cyclic Redundancy Check
Parity Check
Unit I 29
Computer networks
Unit I 30
Computer networks
1010 1
1 1111 0
1
0110
9 1001 15 1111
0 0000
Unit I 31
Computer networks
Steps
Error Correction
Unit I 32
Computer networks
Unit I 33
Computer networks
Hamming Code
Unit I 34
Computer networks
The combination used to calculate each of the four r values for a seven-
bit data sequence are as follows
The r1 bit is calculated using all bits positions whose binary
representation include a 1 in the rightmost position
r2 is calculated using all bit position with a 1 in the second
position and so on
r1: bits 1,3,5,7,9,11
r2: bits 2, 3, 6, 7, 10, 11
r3: bits 4, 5, 6, 7
r4: bits 8, 9, 10, 11
Unit I 35
Computer networks
For example,
Now imagine the received data has 7th bit changed from 1 to 0.
Single-bit error
Unit I 36
Computer networks
The receiver takes the transmission and recalculates four new data
using the same set of bits used by the sender plus the relevant parity (r)
bit for each set.
Error detection
Unit I 37
Computer networks
Unit I 38
Computer networks
In Fig (a) ACK is received before the timer expires, (b) and (c) show the
situation in which the original frame and the ACK, respectively, are
lost, and (d) shows the situation in which the timeout fires too soon..
Suppose the sender sends a frame and the receiver acknowledges it,
but the acknowledgment is either lost or delayed in arriving. This
situation is in (c) and (d). In both cases, the sender times out and
retransmit the original frame, but the receiver will think that it is the
next frame, since it correctly received and acknowledged the first
frame.
This makes the receiver to receive the duplicate copies. To avoid this
two sequence numbers (0 and 1) must be used alternatively.
Unit I 39
Computer networks
Unit I 40
Computer networks
Receiver Window
The receive window is an abstract concept defining an imaginary
box of size 1 with one single variable Rn.
The window slides when a correct frame has arrived, sliding
occurs one slot at a time.
Unit I 41
Computer networks
When the timer expires, the sender resends all outstanding frames.
For example, suppose the sender has already sent frame 6, but the timer
for frame 3 expires. This means that frame 3 has not been acknowledged;
the sender goes back and sends frames 3, 4,5, and 6 again. That is why
the protocol is called Go-Back-N.
Selective Repeat
Sender Window
Receiver window
The Selective Repeat Protocol allows as many frames as the size of the
receive window to arrive out of order and be kept until there is a set of
in-order frames to be delivered to the network layer.
Because the sizes of the send window and receive window are the
same, all the frames in the send frame can arrive out of order and be
stored until they can be delivered.
If any frame lost, sender has to retransmit only that lost frames.
Unit I 42
Computer networks
Unit I 43