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

MCA Computer Network 1 PDF

Uploaded by

Haji Lucky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
368 views

MCA Computer Network 1 PDF

Uploaded by

Haji Lucky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 218

F.Y. M.CA.

(CBCS)
SEMESTER - II
COMPUTER NETWORKS
SUBJECT CODE : MCA203
© UNIVERSITY OF MUMBAI

Prof. Suhas Pednekar


Vice-Chancellor,
University of Mumbai,

Prof. Ravindra D. Kulkarni Prof. Prakash Mahanwar


Pro Vice-Chancellor, Director,
University of Mumbai, IDOL, University of Mumbai,

Programme Co-ordinator : Shri Mandar Bhanushe


Asst. Prof. cum Asst. Director in Mathematics,
IDOL, University of Mumbai, Mumbai
Course Co-ordinator : Mrs. Reshma Kurkute
Asst. Professor, Dept. of MCA
IDOL, University of Mumbai, Mumbai
: Mr. Shardul Gavande
Asst. Professor, Dept. of MCA
IDOL, University of Mumbai, Mumbai

Course Writers : Prof. Shailesh Sutar


I.C.S. College of Arts, Commerce & Science
Khed, Ratnagiri

: Dr. Vaibhav Narawade


Ramrao Adhik Institute of Technology,
Nerul, Navi Mumbai

: Prof. Puja Padiya


Ramrao Adhik Institute of Technology,
Nerul, Navi Mumbai

: Prof. Milind Thorat


K.J. Somaiya Institute of Engineering & I.T.
Sion, Mumbai

April 2021, Print - I


Published by : Director
Institute of Distance and Open Learning ,
University of Mumbai,
Vidyanagari, Mumbai - 400 098.
ipin Enterprises
DTP Composed TantiaArts
: Ashwini Jogani Industrial Estate, Unit No. 2,
VileGround Floor,
Parle (E), Sitaram
Mumbai Mill
- 400 Compound,
099.
J.R. Boricha Marg, Mumbai - 400 011
Printed by :
CONTENTS
Unit No. Title Page No.

1. Basic of Digital Communication 01

2. Network Organization and Models 22

3. Networking Devices 44

4. A ppl i cati on, Presentati on & Sessi on L ayer - I 50

4A . A ppl i cati on, Presentati on & Sessi on L ayer - I I 64

5. Transport L ayer 84

6. Qual i ty of Servi ce 103

7. N etw ork L ayer - Routi ng 117

8. N etw ork L ayer Routi ng & U ni cast Routi ng Protocol s 137

9. AT M N etw ork s 153

10. D ata L i nk L ayer 172

11. Physi cal L ayer 195


I

Syllabus
M.CA.
Semester - II
Computer Networks

Pre-requisites:
Digital Computer Fundamentals and computer architecture

Course Educational Objectives (CEO) :

CEO 1 To help learners get a grounding of basic network components


and architecture
CEO 2 To explore basic networking models
CEO 3 To learn the way protocols are used in networks and their design
issues.

Course Outcomes : At the end of the course, the students should be able
to :

MCA203.1 Comprehend the basic concepts of computer networks and


data communication systems.
MCA203.3 Analyze basic networking protocols and their use in network
design
MCA203.3 Explore various advanced networking concepts.

Sr. Module / Unit Detailed Contents


No.
1. Basics of Digital Introduction to digital communication, Signal
Communication propagation, Signal types, Signal parameters ,
Switching & forwarding, Transmission
impairments, Attenuation, Delay distortion,
Noise, Effects of limited bandwidth, Data rate
limits-Nyquist’s theorem and Shannon’s
theorem.
2. Network Basics of computer Network, topology &
Organization and types of topologies, types of networks(LAN,
Models MAN, WAN), Concept of Intranet &
Extranet, Ad-Hoc Networks, types of
communications (Asynchronous and
synchronous), modes of communications
(simplex, half duplex, full duplex), Protocols,
Networking models, ISO-OSI Reference
Model, Design issues of the layer, Internet
Model (TCP/IP), Comparison of ISO-OSI &
TCP/IP Model
3. Networking Connectivity Devices : Passive & Active
Hubs, Repeaters, Switches (2-Layer Switch,
II

Devices 3-Layer switch (Router), Bridges


(Transparent Bridges, Spanning Tree,
Bridges, Source Routing Bridges) , Brouters,
Gateways.
4. Application, Principles of Application Layer Protocols,
Presentation & The Web and HTTP, FTP, Telnet, Electronic
Session Layer Mail in the Internet (SMTP, MIME, POP3,
IMAP), DNS, Introduction to SNMP.
5. Transport Layer Transport-Layer Services, port addressing,
Multiplexing and Demultiplexing, Principles
of Reliable Data Transfer, Congestion
Control, TCP’s Congestion Control.
Quality of Service : Introduction, Queue
Analysis, QoS Mechanisms, Queue
management Algorithms, Feedback,
Resource, Reservation.
6. Network Layer Network Service Model, Data gram & Virtual
Circuit, Routing Principles, The Internet
Protocol, (ipv4 & ipv6), IP addressing and
subnetting, Routing Algorithms., Hierarchical
Routing, Routing in the Internet: Intra and
inter domain routing; Unicast Routing
Protocols RIP, OSPF, BGP, Multicast
Routing Protocols : MOSPF, DVMRP.
ATM Networks: Need for ATM, ATM
Layers, ATM adaptation Layers, IP over
ATM, Multi protocol Label switching
(MPLS), Drawbacks of traditional routing
methods, Idea of TE, TE and Different Traffic
classes
7. Data Link Layer Data Link Layer, Error Detection and
Correction Techniques, Multiple Access
Protocols, LAN Addresses and ARP &
RARP, PPP: The Point-to-Point Protocol,
Ethernet standards – IEEE 802.3, 802.5,
FDDI, 802.6.
8. Physical Layer Physical Layer, Types of media wired and
wireless media

Reference Books:
1. Computer Networking: A Top-Down Approach Featuring the Internet,
J. F. Kurose and K. W. Ross, Seventh Edition, Addison-Wesley.
2. Computer Networks: Principles, Technologies and Protocols for
Network design, N. Olifer and V. Olifer, Wiley India
III

3. Data Communication and Networking, B. A. Forouzan, Fourth


Edition, McGraw Hill.
4. Computer Networks, Andrew Tenenbaum, Fifith Edition, PHI .
5. TCP/IP Protocol Suite, B. A. Forouzan, Third Edition, Tata McGraw
Hill edition.
6. Data and Computer Communications, William Stallings, Ninth
Edition, Pearson Education

Assessment:
Internal:
Assessment consists of two tests (T1 and T2). The final marks should be
the average of the two tests.

End Semester Theory Examination: Guidelines for setting up the


question paper.

1. Question paper will comprise of total six questions.


2. Question Number One should be compulsory.
3. All question carry equal marks.
4. Students can attempt any three from the remaining.
5. Questions will be mixed in nature (for example supposed Q.2 has part
(a) from module 3 then part (b) will be from any module other than
module 3).

In question paper weightage of each module will be proportional to


number of respective lecture hours as mention in the syllabus.


1

Unit-1
BASICS OF DIGITAL COMMUNICATION
Unit Structure:

1.0 Objective
1.1 Introduction
1.2 Basic Elements of Digital Communication System:
1.3 Signal Propagation
1.3.1 Mechanism of Signal Propagation
1.3.2 Propagation Modelling
1.4 Signal Types
1.4.1 Analog Signal
1.4.2 Digital Signal
1.5 Signal Parameters
1.6 Switching and Forwarding
1.6.1 Switching
1.6.2 Forwarding
1.7 Transmission Impairments
1.7.1 Consequences
1.7.2 Causes of Impairment
1.8 Effects of Limited Bandwidth
1.8.1 Types of Bandwidth
1.8.2 Common Issues
1.9 Data Rate Limit
1.9.1 Data Rate Limit Factors
1.9.2 Nyquist’s Theorem
1.9.3 Shannon’s Capacity
1.10 Summary
1.11 References
1.12 Exercise

1.0 OBJECTIVE

In this lesson you will be able to,


 define digital communication system
 describe types of signal
2

 illustrate switching and forwarding


 classify transmission impairments and its causes
 understand effects of limited bandwidth
 describe data rate limit
 explain Nyquist’s Shannon’s Theorem

1.1 INTRODUCTION:

The process to transmission data by using digital signals (i.e.,


0 and 1) is called as digital communication.

It is method of transmission where the material or the data is


convert numerically to signals which are discreet and transmitted to
the recipients electronically. Digital transmission is among the one
of the maximum generally used type of communication in the
present situation. This included an organization's online
communication efforts.

In the intention of big and multifaceted digital systems, there


is often necessary to take one application communicate digital data
to and from other application. Some benefit of digital data is that it
inclines to be far extra resistant to conveyed and interpreted mistakes
than information represented in an analog medium. Communication
presented in previous year went for a big way due to digital means.

Communication which done digitally has presented in a big


way in the previous years. It is the physical transmission of
information over one to one or one to many communication network.
In this transmission of discrete messages is done. When Digital
communication we use in transfer data it shows a vital part in
today’s electronic world or media. In this the data or information
transmission ratio is determined by its characteristics. Digital
communication can be done over large distances through internet
and other things.

 FEATURES:
 Digital Communication is Expanding at a Rapid Rate.
 Creative Expression were Encourages by digital communication.
 Digital Communication Can Reach New Audiences.
 Digital Communication Uses Web Code as a Tool.
 The medium of digital communications is infinitely growing.
 Enhanced employee engagement and empowerment
 Employees are able to work better and faster
 It spare a lot of efforts, money and time.
 Raises important economic, public policy and societal questions.
3

1.2 BASIC ELEMENTS OF DIGITAL


COMMUNICATION SYSTEM:

The elements of system which used digital communication is


specified in the stated block diagram:

1) SOURCE:
In this data input, is generally given in analog form, which is
convert digital form means to a binary numbers order, named as
information sequence. The originator can be an analog signal.

For e.g., vocal signal.

2) INPUT TRANSDUCER:
This are existent at the entry point of the system so it is
known as input transducer.

Transducer are which basically takes an input physically and


decodes it in a mandatory form of electrical signal. Non-electrical
sign is transformed into a required electrical signal by the input
transducer.

3) SOURCE ENCODER:
The waves created with cause is altered to digital signal
which contains 1’s and 0’s. The medium who convert the data is
compress the data to a least number of bits. It is a process which
helpful in effective use of the bandwidth. This process eliminates the
unnecessary excess bits or redundant bits.
4
4) CHANNEL ENCODER:
The information sequence is passed through the channel
encoder. It does the coding for error correction. At the time of
transferring of signal, for the reason that the noise in the signal, the
signal might be become reformed and therefore to change this, the
network encoder enhances approximately dismissed bits to the
transmitted information. It is known as the error correcting bits. This
might be utilize for the receiver to defeat the effects of noise.

5) DIGITAL MODULATOR:
In this the signal which to be transferred is modified here by a
carrier. Signal is correspondingly changed to analog from the digital
system, in direction to create it travel over the medium or channel.

6) CHANNEL:
This is the term which represents the transmission of the
signals from the sender to respective receiver over the physical
medium is known as communication channel.

7) DIGITAL DEMODULATOR:
It is known as initial step towards the receiver side. The sign
is transformed into analog to digital and it is also demodulated again.

8) CHANNEL DECODER:
This sequence of numbers then passed through the channel
decoder. The channel translator, after spotting the order, does some
in accuracy improvements. The misrepresentations which may
betake place at the time of transmission, are fixed by adding several
redundant bits. Addition of bits benefits in the widespread retrieval
of the new signal.

9) SOURCE DECODER:
This decoder attempt to decode the order from the knowledge
of the encoding set of rules. The subsequent signal is one time again
digitized by selection and quantizing thus, the clean output is
achieved without the information loss.

The source decoder recreates the source output.

10) OUTPUT TRNASDUCER:


Finally, we get the desired signal in desired format analog or
digital. It is a rearmost block which changes the signal to the main
form i.e., physical form of signal that is at the involvement of the
source. In this electrical signals are converted into physical output.
5
11) OUTPUT SIGNAL:
The amount formed post the entire process that is output
signal.

1.3 SIGNAL PROPOGATION:

Systems of communications which is wireless are made up of


one or extra “Tower Sites”, “Cell Sites” or “Antenna Sites”. In this
antennas were used for wireless communication which pump out the
signal towards the devices in the area of electromagnetic waves.

In this procedure of getting the indications from the sites,


devices of user will transfer the similar types of signals again
towards sites, which is make two-way communication.

The project of wireless receiver has most impact on


propagation channel.

The wireless network give rise to the transmitted signal to


lose power, when it propagates from the sender to the receiver

1.3.1 MECHANISM OF SIGNAL PROPOGATION:


The apparatuses of propagation in the situation of an enclosed
WAN. The LOS track is clear amongst the access point and client 1.
These client is as well accepts signals which is weaker are shown as
a result of a replication off of a wall.

For the client 2 the LOS pathway will congested, who as a


replacement for receives indications done diversion in the doorway
and also separate off of a rough wall. In propagation which is None
Line of Sight, a signal transferred to a wireless channel extents to the
6
receiver over more than one indirect paths, individually taking
diverse attenuations and delays.

Movement of these transistor waves (at the speed light which


is change) to and from these sites and devices, in wireless media is
known as Signal propagation, signals propagate by principles as
follows:-

a) Reflection
b) Scattering
c) Diffraction

a) Reflection:
This happens when a signals effect on an article that is plane,
which means that any protrusions have dimensions much greater as
compare to wavelength.

b) Scattering:
It is what follows once a wave imposes on an object that is
uneven or has misdeeds with boundaries on the direction of the
wavelength. Scattering is effect that occurs on course or has
misdeeds with wavelength dimensions order.

c) Diffraction:
The significant example of diffraction are include waves
which is bending through the street corners, buildings top, and over a
doorways.

There are other apparatuses of broadcast as well, like


wiseionospheric or tropospherics cattering, but these are not mutual
in land mobile structures. They fix have though, bearing, for battle
ground systems and for unprofessional radio systems.
7
1.3.2 PROPOGATION MODELLING:
It might be effect on several features of wireless link
presentation. It determines the established signal power and
consequently the signal is to noise proportion, throughput, and
probability of error. The propagation similarly plays a foremost part
in structure design and execution. For example, it regulates the span
of the discrete-time signal, which controls how much equalization is
essential and in shot exactly how much preparation is prerequisite.
Speediness where the station varies regulates the frequency of
equalization and the frequency of training—in other term we can
say, how frequently the channel must be estimated again.

An imperative factor of the learning of wireless


communication study is propagation modelling. Propagation system
is a systematic model (usually stochastic) to characterize the
propagation signal or various purpose of the transmission channel.
Approximately replicas try to be typical the wish comeback of the
channel, although others attempt to model specific appearances of
the channel similar the established control. Propagation mock-ups
are typically encouraged by measurement campaigns. Several
models have numerous factors and are designed to model stated real-
world propagation situations. Another models have limited bounds
and are more manage for controllable statistical analysis.

It has various ways to categorize propagation models. To


demonstrate diverse large-scale and small-scale incident, think
through the normal received signal power as a purpose of distance in
total, Representation of the extensive (distance-dependent
shadowing and path loss) and minimal (fading) propagation things:
8

1.4 SIGNAL TYPES:

A signal is a purpose that carries data about a phenomenon it


is named as a signal processing. In a microchip technology and
communications, it states to time changing current, electromagnetic
wave or varying voltage that transmits data.

We can defined signal in such a technique that it is an


observable modification in a quality, like as quantity.

Signals may categorized according to numerous standards,


primarily: according to the various feature of standards, categorised
to digital signals and analog signals; as per the determinacy of
motions, categorised to random signals and deterministic signals; as
per the power of signals, categorized to an power signals and energy
signals.

There are two main types of signals come across in


observation are analog and digital.

1.4.1 Analog signal:


The signal is any unbroken signal at which the time variable
article for the sign is a demonstration of some extra time changing
measure, i.e., analogous to another time varying signal. The
term analog signal typically refers to electrical signals; other way
round analog signals can use new mediums like pneumatic,
hydraulic or mechanical. The analog signal practices approximate
stuff of the middle to transport the signal's data. Some info may be
conveyed by an analog signal; frequently these kind of signal is a
restrained reply to modifications in physical marvels, like pressure,
temperature, position, light, sound.
9

1.4.2 Digital signal:


The signal that is created by a discrete set of waveforms of a
physical capacity to signify an order of separate values. This signal
has only dual probable values is a logic, and states an random bit
stream. This signals are also represent three-valued logic or
advanced valued logics.

Then again, this signals may be considered to be the sequence


of codes represented by such a physical quantity. This signals often
get up through sampling of analog signals.

1.5 SIGNAL PARAMETERS:

Some of the features or attributes of a signal, such as the


signal frequency, amplitude, magnitude, modulation, duration,
phase, polarization, shape, irradiance or level.

For multifaceted waveforms, it's often incompetently to


stipulate only the real or usual worth. Occasionally there are bounds
on strictures such as buzzing, exceed and high and low times, and
must also be stated.
10

1.6 SWITCHING AND FORWARDING:

1.6.1 SWITCHING:
Switching is the mechanism in computer networks that helps
in deciding the finest direction for data broadcast. Information
Technology is procedure to forward packets upcoming from a port
towards a destination port. It is called ingress when statistics
originates on a port, and egress means when information leaves a
haven or drives out. A communication system may include number
of switches and nodes.

There might be many paths to sender and receiver in large


networks. The finest direction of transmission data will decided by
switching technique

 Circuit switching:
In this type of switching the source and terminator may
connected during communication session and one dedicated channel
is made for single connection.

In circuit switching a device communicates with devices an


enthusiastic way (circuit)is made in them through the network.

 Message switching:
In message switching, there is no devoted track recognised
between the source and destination, as in circuit switching. Here,
when the source knob shows the message, the terminus address is
added to the message.
11

 Packet switching:
Packet is called as small pieces of data or small amount of
data. When we are sending a message over network that text or
message is distributed to a minor quantity of smithereens it is known
as packets. Packets takes a shortest way as possible to travel over the
communication network.

1.6.2 Forwarding:
Forward error correction works by addition of terminated bits
to a bit stream to aid the cryptographer notice and rectify some
broadcast errors deprived of the essential for retransmission. The
term forward stems from the truths that the movement of data is
constantly in the forward way.
12

1.7 TRANSMISSION IMPAIRMENTS

In the networking system, analog signals transportable over


communication media, which inclines to deteriorate the excellence
of analog signal, which state that the sign at the starting of the
middle is a sign which not the equal as the signal as the finish of the
middle. Imperfection happens signal impairment.

Signals goes over a transmission channels, those are not


perfect. That Faultiness origins signal impairment. It is state that the
sign at the initial of the average is a signal which not the equivalent
as the sign at the finish of the medium. Whatever we have is transfer
is not same as whatever is established. The indication that we get can
diverge from the signal transmitted. The outcome will destroy the
signal superiority for analog signals and present some errors for
digital signals.

There are random impairments as well. They include,


Gaussian noise
White noise
Thermal noise

1.7.1 Consequences:
For a digital signal, there may take place bit errors.

For analog signals, the outcome will destroy the signal


superiority.

1.7.2 CAUSES OF IMPAIRMENT:


13
A) Attenuation:
It is happens with any kind of signal, it might be digital or
analog. It means loss of energy. The power of signal declines with
growing distance which origins defeat of energy in overwhelming
resistance of medium. It is then referred as attenuated signal. It then
could be second-hand to amplify the attenuated indicators which
provides the original indication returns and pay off for this loss.

What causes attenuation?


Noise
Physical surrounding
Travel distance

B) Distortion:
Distortion is a variations in the form of the signal. It is usually
realised in complex signals prepared up with dissimilar frequencies.
Every frequency unit has its separate broadcast speed going through
a medium so, it delays in arriving to end point. Each module reaches
at diverse time which result to distortion. For that reason, they have
various phases at receiver point from what they had at source’s end.

 DIFFERENT TYPES OF DISTORTION:


a) Amplitude distortion
b) Harmonic distortion
c) Frequency response
d) Distortion Phase distortion
e) Group delay distortion
14
a) Amplitude distortion:
It is type of distortion that happening in an application, device
or subsystem, while the output amplitude is not a correct purpose for
idea amplitude under stated circumstances.

b) Harmonic distortion:
This adds overtones that are whole number multiples of a
complete signal frequencies. The nonlinearities is help to
enlargement amplitude alteration in audio systems are maximum
frequently calculate in relation of the harmonics (overtones) added to
a pure sine wave fed to the system.

c) Frequency response distortion:


In this a response of non-flat frequency is a method distortion
where various frequencies were amplified with various values in a
filter.

d) Phase distortion:
It is away of alteration where number of time distortion
happens because of electrical reactance. In this, every modules of the
contribution signal aren’t amplified using the similar phase shift,
therefore building several parts of the result sign out of point through
the remaining of the output result.

e) Group delay distortion:


This type of distortion form mainly in dispersive media. In
a waveguide, phase velocity diverges with frequency. At afiltration
process group delay inclines to select nearest most of the cut-off
frequency and pulse distortion will be result in this.

C) Noise:
In original signal the unwanted signal mixes is known as
Noise.

There are various noise which corrupt the signal are there like
crosstalk noise, induced noise, impulse noise and thermal noise.

The noise which noise originates from causes such as engines


and appliances is known as Induced noise. In this application work
as distribution antenna and communication medium act as getting
antenna. The electron movement in wire which generates an
additional signal is called as Thermal noise. After one wire disturbs
the additional wire is called as Crosstalk noise. The signal which
arisessincespeedy or influence lines with high energy is called as
Impulse noise.
15

 DIFFERENT TYPES OF NOISE:


a) Thermal noise
b) Intermodulation noise
c) Crosstalk
d) Impulse noise
a) Thermal noise:
In this accidental wave of electrons in a electrode that makes
an additional signal not initially directed by the source. It is
dispersed transversely the entire range, so, termed as white noise.
b) Inter modulation noise:
It is produced when one or better signal allocate a signal
broadcast network. For example: S1, S2 are two signals will make
signals of occurrences, which can disturb with similar signal
occurrences sent over the sender. In any share of the statement
system nonlinearity is current then inter modulation sound will be
formed.
c) Cross talk:
It is a sort of noise anywhere, at the track of relocated signal a
distant signal attains. So, cross talk is triggered of construction amid
two wires that are handy to each other. It occurs when we are
conversation on phone, we catch cross related that is we be able to
heed another dialog in the background, it is recognised as cross talk.
d) Impulse noise:
It is uneven beats or points (aupsurge by strange energy in an
careful minortime-span) shaped overmarvelsalike to that creates as
from fast, stimulus, control outlines due to misplace assembly in
electric paths and extra. It is a main basis of bit-problems in digital
data message that form of sound crops much offaults or difficulties.

1.8 EFFECTS OF LIMITED BANDWIDTH:

 What is bandwidth?
The extreme quantity of information transferred through an
internet link in a stated time quantity.
16
It is known as how much data is transferring through the
internet in a specified number of time.

It is the size of information which is transferring through a


network in a calculated time amount which is calculated in Mbps
i.e., megabits per second basically.

1.8.1 Types of Bandwidth

Symmetric Bandwidth
Symmetric bandwidth mentions to the similar size and hurries
the quantity of statistics is interconnected or voyages amongst two
given station. Downloading and uploading and of data will consume
the similar capacity – symmetrical. This category of message has
seen in the various countries throughout the world through using of
cable internet and fibre optic. Video conferencing is best example
for symmetric bandwidth. We enjoy ease transmission of video files
by using symmetric bandwidth.

Asymmetric Bandwidth
It is not same as the symmetrical, in this both ways won’t
have the equal quantity of information transfer per next. The upload
information transfer is inferior to the download information stream.
This the good example of this form of bandwidth and this is
similarly identified as Irregular Digital Subscriber Line

(ADSL). The speed of download in ADSL is greater than


speed of upload mostly because files and media downloading are the
mainly used rather than other feature like uploading which need to
send request which only needs to send by user.

1.8.2 Common Issues


In this day and age, the power comes to those who know the
news as it happens – real time. This is the age which is digital where
every being can say regarding the present activities beside them and
17
it is essential that a dominant network is obtainable for it to occur.
An issue which are common for operators is discovering ways to
increase their network bandwidth and to access the internet faster.
Strength of your wireless router to the processer greatly touches the
wireless bandwidth of the signal.

Increasing bandwidth and transmission haste can be


accredited to enhance in the wireless signal which are in between the
router to your computer. Further down are some effect of wireless
bandwidth.

Wireless router should be placed in the mid of your office or


house. To keep it in single lateral of the office or house will chances
to get a weak signal on the extra lateral of your house or office, thus
lower bandwidth.

Remove all that can chunk the sign from your wireless router
– sugard is plays, steel folder cupboards, and ramparts. In obtaining
a battery phone or any sign broadcasting apparatus, choose
approximately that works on a incidence excluding 2.4GHz.

Deliberate substituting your wireless router's feeler as wanted.


Connect a hi-gain antenna that broadcasts a sign in one way if one
custom own computer in one way only to have a sturdier sign from
the router and upsurge the bandwidth.

One can make use of a wireless repeater and place it in


alternative share of the dynasty where the sign is squat to
improvement the bandwidth of one processer. Greatest wireless
repeaters are vended at an amount of connected and trade openings.

Hardware builder’s kind projects that accompaniment one


alternative. Mark certain you purchase and usage of the identical
brand for it to exertion finest. Dissimilar makes work well all
composed but swapping to objective one can upsurge your
bandwidth effortlessly.

The internet is motionless developing and is still discovery


customs to revolutionise and recover its amenities every single day.
To make the most of the aids of your internet provision, you can
crisscross with your facility earner for apprises on your plan and try
the diverse guidelines in improving your bandwidth as quantified
above.
18

1.9 DATA RATE LIMIT:


In information message it is reflect to be that how reckless
data is distribution, in bits per next, done a channel.
The statistics rate analyses the speed of data transmission
over a channel. It is commonly planned in bits per second i.e., bps.
Maximum data charges are conditions as Kbps i.e., 1000 bps as in
Kilobits per second, Megabits per second as in Mbps i.e., 1000
Kbps, Giga bits per second as in Gbps i.e., 1000 Mbps after that
Gbps here is Tera bits per second that is Tbps. i.e., 1000 Gbps.
1.9.1 Data rate limit factors:
Unique of the leading meanings of information conveyance
network is to advancement the data rate. So, there are three reasons
that describe the facts rate for a network:
 Amount of levels in digital signal.
 Quality of the signal – level of noise.
 The bandwidth available.

Formulae which are used to calculate data rate are as follows:-


 Formulae for noiseless () channel Nyquist Bit Rate
 Formulae for noisy channel-Shannon’s Capacity
1.9.2 NYQUIST’S THEOREM:
Henry Nyquist advance Nyquist bit rate, who formal that
the transmission volume of a perfect channel with no sound has an
extreme limit.
This Formula specified that the better certain for
the broadcast scheme data rate by calculating the bit frequency right
from the quantity of the base band of the scheme and quantity of
signal heights.
Bits per second, where B is the bandwidth i.e., Hz and M is
the quantity of signal heights.

It describes faultless (noiseless) systems have insufficient size

It formularizes as:
Formula for the maximum bit rate is:

maximum bit rate = 2 × Bandwidth × log2V


19
Bps is done to calculate the extreme bit rate.
Here, Bandwidth is specified that bandwidth of the signal.
Quantity of distinct stages in the sign is shown here by the V.

 Maximum bit rate:


It is a maximum number of bits necessary for all short-range
block of compressed information.

 Bandwidth:
The determined quantity of information conveyed over an
internet assembly in a stated amount of time.

For e.g.: - If there bandwidth of noiseless channel which is


communicating a sign thru 4 distinct levels, then the thoroughgoing
bit amount will be calculated

As, maximum bit amount = 2 × 4000 × log24 = 16,000 bps = 16


kbps

1.9.3 SHANNON’S CAPACITY:


Claude Shannon extended Nyquist's effort for actual networks
that are theme to sound. Noise has many types like cross-talks,
impulse noise, thermal noise etc. Among all this types of noise,
thermal noise is a kinds of noise which is inevitable.

The unequal undertaking of electrons in the network makes


an inessential signal which are not current in the original signal,
called the thermal noise. The quantity of thermal noise is designed as
the fraction of the sign control to noise power, SNR.
20
Nyquist Theorem protracted - describes theoretical max bit
rate in noisy channel [1949], if chance noise is existing, stateworsens
rapidly!

Signal-to-Noise Ratio, SNR = Average Signal Power/Average Noise


Power

Since SNR is the relation of two powers that differs over a


very big range, it is frequently spoken in decibels, called SNRdb and
calculated as: SNRdb = 10log10 SNR.

Shannon's Capacity gives the theoretical maximum data rate


or volume of anear-splitting network. It is uttered as:

Capacity = Bandwidth × log2(1+SNR)


Here,
Volume is the all-out statistics rate of the station in bps
Bandwidth is the bandwidth of the network
SNR is the signal – to – noise ratio
For example,
For the bandwidth of a deafening network is 4 KHz, and the
sign to noise fraction is 100, then the extreme bit rate can be
calculated as:

Volume = 4000 × log2(1+100) = 26,633 bps = 26.63 kbps

1.10 SUMMARY

In this lesson we have studied about


 Basic elements of Digital communication system
 Signal and we discussed about types of signal
 Switching, forwarding and its techniques
 Transmission impairments and its causes i.e. Attenuation
Distortion Noise
21

 Effects of limited bandwidth


 About data rate limit
 Also, we had seen Nyquist’s Shannon’s Theorem

1.11 REFERENCES

 Computer Networks : Andrew Tanenbaum


 https://www.speedcheck.org/wiki/bandwidth/
 https://www.geeksforgeeks.org/analog-to-digital-conversion/
 https://www.slideshare.net/udaypallyreddy/
 https://www.academia.edu/34887670/Unit_1_Information_Techn
ology_Notes
 https://www.tutorialspoint.com/
 https://www.researchgate.net/
 https://www.javatpoint.com/
 https://www.geeksforgeeks.org
 https://www.scribd.com/presentation/3378
 http://www.tmv.edu.in/
 https://www.tutorialspoint.com/the-maximum-data-rate-of-a-
channel

1.12 EXERCISE

1. Explain Digital Communication System


2. State and explain types of signal
3. What is switching and forwarding?
4. Explain techniques of switching.
5. Describe distortion and its type.
6. Write short note on causes of impairment.
7. State the common issues of bandwidth.
8. Explain Nyquist’s Shannon’s Theorem.



22

Unit–2
NETWORK ORGANIZATION AND
MODELS
Unit Structure
2.0 Objectives
2.1 Basics of Computer Network
2.2 Topology & Types of Topologies
2.2.1 Bus Topology
2.2.2 Ring Topology
2.2.3 Star Topology
2.2.4 Mesh Topology
2.3 Types of Networks
2.3.1 LAN
2.3.2 MAN
2.3.3 WAN
2.4 Concept of Intranet & Extranet
2.5 Ad-Hoc Networks
2.6 Types of Communications
2.6.1 Asynchronous
2.6.2 Synchronous
2.7 Modes of communications
2.7.1 Simplex, Half duplex,
2.7.2 Full duplex
2.8 Protocols
2.9 Networking models,
2.9.1 ISO-OSI
2.9.2. Reference Model,
2.9.3 Design Issues of the layer, Internet
2.9.4. Model (TCP/IP),
2.9.5 Comparison of ISO-OSI & TCP/IP Model
2.10 References
23

2.0 OBJECTIVES

After going through this unit, student will able to able to


 Understand the Definition of Computer Network
 Able to

2.1 BASICS OF COMPUTER NETWORK

Before going to computer network let us understand the


Network. A group of interconnection of more than two entities
called as network. E.g. Friends Network, Railway Lines, Roads etc.
these are separate entities connected to each other.

Computer Network – In general when communication happened it


share the data either locally or remotely. The tern locally means face
to face and remotely means take place over distance. This term is
called as telecommunication. Data communication refers the
exchange of data between devices through some form of
transmission medium such as wired cable or wireless medium hence
to occur the data communication there is need for communication
devices such as computers, printers etc.

Computer Network is a two or more than two computers


interconnected in order to share data, resources such as printer,
exchange files or allow communication between them. The
computers can be connected through wired or wireless such as
cables, radio waves, telephone lines, infrared light beams etc.

Fig – 2.1 Basic Computer Network

The Figure-2.1 shows that basic computer network in which


many communication devices connected to each other through some
transmission medium.
24
Elements of Computer Network – There are five types of elements
present in system which form computer network.

 End Devices – These are actual devices such as computer, printer


etc connected to share the information.
 Medium – The medium such as cable or wireless transmission
between the end devices use for sending / receiving information.
 Networking Devices – The devices which place between the end
device to route the information accurately to end devices such as
switch, router. We will discuss these devices in detail in Unit -3.
 Message / Data – Message or Data is the actual shared
information between the end devices.
 Rules – For exchanging the data between the network

2.2 TOPOLOGY & TYPES OF TOPOLOGIES

Topology – In network we saw that two or more than two devices


connected through communication links. In the network topology it
refers how the links connected in the network. Basically it is the
representation of all links and devices connected to each other. It is
a physical and logical layout of the network.

Logical Topology refers to see how data actually move across


the network through network protocol. It mainly concern about the
transmission of data where as Physical topology refers the
arrangement of different networks elements. Physical topology
mainly concern about the physical layout of the network.

Types of Topologies – There are three types of physical topology


namely Bus Topology, Ring Topology, Star Topology and Mesh
Topology.

Fig -2.2 – Types of Topology


BUS Topology – In Bus topology all nodes (computers, printer and
peripherals) are connected to a single cable. In this network only one
long cable act as link to all the devices.
25

Fig -2.3 – BUS Topology


Advantage –
1. It is easy to installation for small networks.
2. Easy to extend by joining the cables
3. It require less cabling than star and mesh topology

Disadvantage –
1. Cables are always of a limited length.
2. In case if the common cable fails, then the entire system will
crash down.
3. Whenever network traffic is heavy, or nodes are too many, the
performance of the network goes down.

STAR Topology – In the star topology, all the computers connect


with the help of a hub. This cable is called a central node, and all
other nodes are connected using this central node. It is most popular
on LAN networks as they are inexpensive and easy to install.

Fig -2.4 – STAR Topology


Advantage –
1. Easy to troubleshoot, set up, and modify.
2. In case of nodes failed, only those are affected.
3. Fast performance with few nodes and very low network traffic.
4. We can add, delete, and move devices are easily in Star topology.
26
Disadvantage –
1. If case of hub or concentrator fails, attached nodes are disabled.
2. Installation cost of star topology is high.
3. Heavy network traffic can sometimes slow the bus considerably.
4. Performance depends on the hub's capacity
5. A damaged cable may bring the network down.

MESH Topology – The mesh topology has a unique network design


in which each computer on the network connects to every other. It is
develops a P2P (point-to-point) connection between all the devices
of the network. It offers a high level of redundancy, so even if one
network cable fails, still data has an alternative path to reach its
destination.

Fig -2.5 – MESH Topology

Advantages: -
1. The network can be expanded without disrupting current users.
2. Need extra capable compare with other LAN topologies.
3. Complicated implementation.
4. No traffic problem as nodes has dedicated links.
5. P2P links make the fault identification isolation process easy.
6. It helps you to avoid the chances of network failure by
connecting all the systems to a central node.

Disadvantages: -
1. Installation is complex because every node is connected to every
node.
2. Dedicated links help you to eliminate the traffic problem.
27
3. A mesh topology is robust.
4. Every system has its privacy and security
5. It is expensive due to the use of more cables.
6. No proper utilization of systems.
7. It requires more space for dedicated links.

2.3 TYPES OF NETWORKS (LAN, MAN, WAN)

A computer network is a group of computers linked to each


other that enables the computer to communicate with another
computer and share their resources, data, and applications.

Fig -2.6 – Types of Computer Network

A computer network can be categorized by their size. A


computer network is mainly of four types:

1. LAN (Local Area Network)


2. PAN (Personal Area Network)
3. MAN (Metropolitan Area Network)
4. WAN (Wide Area Network)

Local Area Network (LAN) -


 Local Area Network is a group of computers connected to each
other in a small area such as building, office.
 Communication medium used in LAN network such as twisted
pair, coaxial cable etc.
 Two or more personal computers are connected to each other
LAN.
 To build the LAN low-priced hardware such as hubs, network
adapters, and Ethernet cables.
 In the LAN data can be transferred with high speed.
 It is highly secured network.
28

Fig -2.7 – Local Area Network (LAN)


Personal Area Network (PAN) –
There are two types of personal area network
1. Wired Personal Area Network
2. Wireless Personal Area Network

Wireless Personal Area Network:- Wireless Personal Area


Network is created by simply using wireless technologies such as
WiFi, Bluetooth. It contains low range network.
Wired Personal Area Network:- Wired Personal Area Network is
developed by using the USB.

Examples of wired Personal Area Network are as follows:


 Body Area Network: The network always moves with a person.
Example of this is a mobile network moves with a person.
 Offline Network: An offline network can be created inside the
home, so it is also called as a home network. A home network is
designed to integrate the devices such as printers, computer,
television but they are not linked to the internet.
 Small Home Office: It is used to connect a variety of devices to
the internet and to a corporate network using a VPN
Metropolitan Area Network (MAN) –
 A metropolitan area network is a network that covers a larger
geographic area.
 It is interconnecting a different LAN to form a larger network.
 Government agencies use MAN to connect to the citizens and
private industries.
 In MAN many LANs are connected to each with the help of
exchange line.
 It has a higher range as compared to Local Area Network(LAN).
29

Fig -2.8 – Metropolitan Area Network (MAN)

Wide Area Network (WAN) –


 A Wide Area Network is a network that extends over a large
geographical area such as states or countries.
 A Wide Area Network is quite larger than the LAN.
 A Wide Area Network is not limited to a single location, but it
spans over a large geographical area through a telephone line,
fibre optic cable or satellite links.
 The internet is one of the biggest WAN in the world.
 A Wide Area Network is widely used in the field of Business,
government, and education.

Fig -2.9 – Wide Area Network (WAN)


30

2.4 CONCEPT OF INTRANET AND EXTRANET

Intranet:
 Intranet is owned by a single organization and is a tool for sharing
information throughout the organization.
 It is the type of Internet that is used privately.
 Since, intranet is a private network so no one can use the intranet
whose have not valid username and password.
 In intranet, there are a limited number of connected devices as
compared to internet. Intranet is highly secure and has a small
number of visitors.
 It is used in order to get employee information, telephone
directory etc.

Extranet:
 Either a single or a many organization owns Extranet.
 It is managed on a contractual basis between organizations and is a
tool for sharing information between the internal members and
external members.
 Like intranet, it is also a private network so only those who have a
valid username and password can use the extranet.
 Extranet is used to check status, access data, send mail, place order
etc.

2.5 AD-HOC NETWORK

An Ad-Hoc network is one that is spontaneously formed


when devices connect and communicate with each other. The term
ad hoc is a Latin word that literally means "for this," implying
improvised.

Ad-Hoc networks are mostly wireless local area networks


(LANs). The devices communicate with each other directly instead
of relying on a base station or access points as in wireless LANs for
data transfer co-ordination. Each device participates in routing
activity, by determining the route using the routing algorithm and
forwarding data to other devices via this route.
31

2.6 TYPES OF COMMUNICATIONS

Synchronous Transmission:
 Data is sent in the form of blocks or frames in synchronous
transmission.
 It is the full duplex type of transmission where both sender and
receiver are to be synchronized.
 There is no gap present between data, in the synchronous
transmission
 It is more efficient and more reliable than asynchronous
transmission.
 It is responsible to transfer the large amount of data.

Asynchronous Transmission:
 In this asynchronous transmission, data is sent in form of byte or
character.
 This transmission is the half duplex type transmission.
 In this transmission start bits and stop bits are added with data. It
does not require synchronization.
32

2.7 MODES OF COMMUNICATIONS

There are three modes of communication/transmission,


namely: simplex, half duplex, and full duplex. The transmission
mode defines the direction of signal flow between two connected
devices.

Simplex: In simplex transmission mode, the communication


between sender and receiver happens in only one direction. The
sender can only send the data, and the receiver can only receive the
data. The receiver cannot reply to the sender.

Simplex transmission is an example of as a one-way road in


which the traffic travels only in one direction. There is no entry for
vehicle coming from the opposite direction is allowed.

Half Duplex: In half duplex transmission the communication


between sender and receiver occurs in both directions ,but only one
at a time. The sender and receiver can both send and receive the
information, but only one is allowed to send the data at any given
period. Half duplex perform better than simplex.

Half duplex is still considered a one-way road, in which a


vehicle traveling in the opposite direction of the traffic has to wait
till the road is empty before it can pass through.

Full Duplex: In full duplex transmission mode, the communication


between sender and receiver can occur simultaneously.

The sender and receiver can both transmit and receive at the
same time.

While full duplex can perform better than half duplex.

Full duplex transmission mode is like a two-way road, in


which traffic can flow in both directions at the same time.

For example, in a telephone conversation, two people


communicate, and both are free to speak and listen at the same time.

Key Differences of the Three Transmission Modes


 In simplex mode, the signal is sent in one direction.
 In half duplex mode, the signal is sent in both directions, but one
at a time.
33
 In full duplex mode, the signal is sent in both directions at the
same time.
 In simplex mode, only one device can transmit the signal. In half
duplex mode, both devices can transmit the signal, but one at a
time. In full duplex mode, both devices can transmit the signal at
the same time.
 Full duplex performs better than half duplex, and half duplex in
turn performs better than simplex.
 Simplex: The keyboard sends the command to the monitor. The
monitor cannot reply to the keyboard.
 Half duplex: Using a walkie-talkie, both speakers can
communicate, but they have to take turns.
 Full duplex: Using a telephone, both speakers can communicate
at the same time.
 The full duplex transmission mode offers the best performance
among the three, on account of the fact that it maximizes the
amount of bandwidth available.

2.8 PROTOCOL

A network protocol is an established set of rules that


determine how data is transmitted between different devices in the
same network. Essentially, it allows connected devices to
communicate with each other, regardless of any differences in their
internal processes, structure or design. Network protocols are the
reason you can easily communicate with people all over the world,
and thus play a critical role in modern digital communications.

Similar to the way that speaking the same language simplifies


communication between two people, network protocols make it
possible for devices to interact with each other because of
predetermined rules built into devices’ software and hardware.
Neither local area networks (LAN) nor wide area networks
(WAN) could function the way they do today without the use of
network protocols.

How Network Protocols Work


Network protocols take large-scale processes and break them
down into small, specific tasks or functions. This occurs at every
level of the network, and each function must cooperate at each level
to complete the larger task at hand. The term protocol suite refers to
a set of smaller network protocols working in conjunction with each
other.
34
Network protocols are typically created according to industry
standard by various networking or information technology
organizations.

The following groups have defined and published different


network protocols:

 The Institute of Electrical and Electronics Engineers (IEEE)


 The Internet Engineering Task Force (IETF)
 The International Organization for Standardization (ISO)
 The International Telecommunications Union (ITU)
 The World Wide Web Consortium (W3C)

While network protocol models generally work in similar


ways, each protocol is unique and operates in the specific way
detailed by the organization that created it.

Who Uses Network Protocols?


Network protocols aren’t only relevant to certified network
specialists or IT professionals. Billions of people use network
protocols daily, whether they know it or not.

Every time you use the internet, you leverage network


protocols. Though you may not know how network protocols work
or how frequently you encounter them, they are necessary for using
the internet or digital communications in any capacity.

2.9 NETWORKING MODELS

Introduction: For data communication to take place and two or


more users can transmit data from one to other, a systematic
approach is required. This approach enables users to communicate
and transmit data through efficient and ordered path. It is
implemented using models in computer networks and are known as
computer network models.

Computer network models are responsible for establishing a


connection among the sender and receiver and transmitting the data
in a smooth manner respectively.

There are two types of computer network models i.e.


I. OSI Model
II. TCP/IP Model
35
The OSI (Open System Interconnection) Reference Model
OSI stands for “Open System Interconnection” and the name
of this reference model was given by an organization known as
“International Organization for Standardization”(ISO).ISO is
basically responsible for generating and promoting industrial and
commercial standards applicable for all user universally.

 The OSI Model is one of the general purpose networking or


communication model.
 It establishes the connection in an open manner between all the
communicable devices present across the world.
 OSI model is also called as “Open Source” because of it has
ability “fit anywhere”.
 OSI model does not support protocol establishment. Because
any connection can be established using the OSI model unless
and until any protocols are not used as.
 OSI model having a layered architecture.
 There are in total seven layers in general purpose OSI model.
 OSI Model used as reference model.

i) The Physical Layer


The Physical Layer is the bottom most layer and it is
associated with representation of the bits .It deals with setting up
physical connection to the network and also transmitting and
receiving the signals.

ii) The Data Link Layer


The Data Link Layer is second layer from bottom. It ensures
that the data must be synchronized; error detection and control are
enabled. The main task of the data link layer is to transform a raw
transmission facility into a line that appears free of undetected
transmission errors to the network layer.

iii) The Network Layer


The Network Layer is third layer from bottom in OSI model
and it establishes data communication channel between multiple
networks or devices or hosts or nodes. Network layer controls the
operation of the subnet. The main aim of network layer is to deliver
packets from source to destination across multiple links (networks).

iv) The Transport Layer


Transport Layer is the middle most layer in OSI model and it
also acts as Network Independent Layer. The Transport layer is a
36
true end-to-end layer, all the way from the source to the destination.
The basic function of the Transport layer is to accept data from the
layer above, split it up into smaller units, pass these data units to the
Network layer, and ensure that all the pieces arrive correctly at the
other end.

v) The Session Layer


Session Layer is the fifth layer of OSI model. The Session
Layer allows users on different machines to establish active
communication sessions between them. In Session layer, streams of
data are marked and are resynchronized properly, s

vi) The Presentation Layer


This is the sixth layer of OSI model. The main aim of this
layer is to take care of the syntax and semantics of the information,
which is to be exchanged between two communication devices. it
provides appropriate representation of data through various data
presentation techniques. Under this condition presentation layer
plays a role translator.

vii) The Application Layer


Application Layer is the topmost layer of the OSI model and
It is responsible for providing interface between various users and
application .In this layer manipulation of data (information) is done
in various ways. This layer, which enables user or software to get
access to the network. Some other services are provided by
application layer includes: E-Mail, transferring files, distributing the
results to user, directory services, network resources, etc.

Computer Network Models: Advantages of OSI Model


The OSI Model being one of the most widely used computer
network models does posses some major advantages which makes it
so popular. These are :

Each layer has its definite structure and functionality which


makes OSI model simple and easy to use.

It is a general purpose reference model that can be used for


data communication.

Connection oriented and connection-less services are supported.

Connection between any type of devices or host or hardware


or software is possible.

Computer Network Models : Disadvantages Of OSI Model


37
Because of its inability to fit protocols, this model was
replaced by TCP/IP Internet Model.
Session and Presentation layers does not provide high end
functionalities and are not of much use as compared to other layers.
Connection oriented and connection-less services are
supported.
Connection between any type of devices or host or hardware
or software is possible.

TCP/IP model
 The TCP/IP model stands for Transmission Control
Protocol/Internet Protocol models.
 It has five layers: the application layer, transport layer, network
layer, data link layer and physical layer.
 TCP/IP is a hierarchical protocol made up of interactive modules,
and each of them provides specific functionality.
 Here, hierarchical means that each upper-layer protocol is
supported by two or more lower-level protocols.
38

Network Access Layer


 It is the lowest layer of the TCP/IP model.
 It is the combination of the Physical layer and Data Link layer
defined in the OSI reference model.
 It defines how the data has been sent physically through the
network.
 It is mainly responsible for the transmission of the data between
two devices on the same network.
 The functions carried out by this layer are encapsulating the IP
datagram into frames transmitted by the network and mapping of
IP addresses into physical addresses.
 The protocols used in this layer are ethernet, token ring, FDDI,
X.25, frame relay.

Internet Layer
 It is the second layer of the TCP/IP model.
 It is also known as the network layer.
 It is also responsible for send the packets from any network, and
they arrive at the destination irrespective of the route they take

Following are the protocols used in the internet layer :

IP Protocol: IP protocol is used in this layer, and it is the most


important part of the entire TCP/IP suite.
39
Following are the responsibilities of this protocol:
o This protocol implements logical host addresses known as IP
addresses. The internet and higher layers to identify the device
and to provide inter network routing use the IP addresses.
o It determines the path through which the data to be transmitted.
o An IP protocol accepts the data from the transport layer protocol.
An IP protocol ensures that the data is sent and receive securely;
it encapsulates the data into message known as IP datagram.
o The limit imposed on the size of the IP datagram by data link
layer protocol is known as Maximum Transmission unit (MTU).
If the size of IP datagram is greater than the MTU unit, then the
IP protocol splits the datagram into smaller units so that they can
travel over the local network. The sender or intermediate router
can do fragmentation. At the receiver side, all the fragments are
reassembled to form an original message.
o When IP datagram is sent over the same local network such as
LAN, MAN, WAN, it is known as direct delivery. When source
and destination are on the distant network, then the IP datagram
is sent indirectly. This can be accomplished by routing the IP
datagram through various devices such as routers.

ARP Protocol
o ARP stands for Address Resolution Protocol.
o ARP is a network layer protocol which is used to find the
physical address from the IP address.
o The two terms are mainly associated with the ARP Protocol:
o ARP request: When a sender wants to know the physical
address of the device, it broadcasts the ARP request to the
network.
o ARP reply: Every device attached to the network will accept the
ARP request and process the request, but only recipient
recognize the IP address and sends back its physical address in
the form of ARP reply. The recipient adds the physical address
both to its cache memory and to the datagram header

ICMP Protocol
o It stands for Internet Control Message Protocol.
o It is a mechanism used by the hosts or routers to send
notifications regarding datagram problems back to the sender.
40
o A datagram travels from router-to-router until it reaches its
destination. If a router is unable to route the data because of some
unusual conditions such as disabled links, a device is on fire or
network congestion, then the ICMP protocol is used to inform the
sender that the datagram is undeliverable.
o An ICMP protocol mainly uses two terms:
o ICMP Test: ICMP Test is used to test whether the destination is
reachable or not.
o ICMP Reply: ICMP Reply is used to check whether the
destination device is responding or not.
o The core responsibility of the ICMP protocol is to report the
problems, not correct them. The responsibility of the correction
lies with the sender.
o ICMP can send the messages only to the source, but not to the
intermediate routers because the IP datagram carries the
addresses of the source and destination but not of the router that
it is passed to.

Transport Layer
This layer is responsible for the reliability, flow control, and
correction of data which is being sent over the network.

There are two protocols used in the transport layer are:


i)User Datagram protocol
ii) Transmission control protocol.

User Datagram Protocol (UDP)


o It is connectionless protocol.
o It provides end-to-end delivery of transmission.
o It is an unreliable protocol as it determines the errors but not
specify the error.
o User Datagram Protocol discovers the error, and ICMP protocol
reports the error to the sender that user datagram has been
damaged.

UDP consists of the following fields:

Source port address: The source port address is the address of the
application program that has created the message.

Destination port address: The destination port address is the


address of the application program that receives the message.
41
Total length: It defines the total number of bytes of the user
datagram in bytes.

Checksum: The checksum is a 16-bit field used in error detection.

o UDP does not specify which packet is lost.


o UDP contains only checksum; it does not contain any ID of a
data segment.

Transmission Control Protocol (TCP)


 It is connection-oriented protocol.
 It is reliable protocol as it detects the error and retransmits the
damaged frames.
 It firstly set up connection between the sender and receiver.
 At the sender side, TCP divides the whole message into smaller
units known as segment, and each segment contains a sequence
number which is required for reordering the frames to form an
original message.
 At the receiver side, TCP collects all the segments and reorders
them based on sequence numbers.

Application Layer
 It is the topmost layer in the TCP/IP model.
 It is responsible for handling high-level protocols, issues of
representation.
 This layer allows the user to interact with the application.
 When one application layer protocol wants to communicate with
another application layer, it forwards its data to the transport
layer.
 There is an ambiguity occurs in the application layer. Not every
application can be placed inside the application layer except
those who interact with the communication system. For example:
text editor cannot be considered in application layer while web
browser using HTTP protocol to interact with the network
where HTTP protocol is an application layer protocol.

Following are the main protocols used in the application layer:


 HTTP: It stands for Hypertext transfer protocol. This protocol
allows us to access the data over the world wide web. It transfers
the data in the form of plain text, audio, video. It is known as a
42
Hypertext transfer protocol as it has the efficiency to use in a
hypertext environment where there are rapid jumps from one
document to another.
 SNMP: SNMP stands for Simple Network Management
Protocol. It is a framework used for managing the devices on the
internet by using the TCP/IP protocol suite.
 SMTP: SMTP stands for Simple mail transfer protocol. The
TCP/IP protocol that supports the e-mail is called as a Simple
mail transfer protocol. This protocol is used to send the data to
another e-mail address.
 DNS: DNS stands for Domain Name System. An IP address is
used to identify the connection of a host to the internet uniquely.
But, people prefer to use the names instead of addresses.
Therefore, the system that maps the name to the address called as
Domain Name System.
 TELNET: It is an abbreviation for Terminal Network. It
establishes the connection between the local computer and
remote computer in such a way that the local terminal appears to
be a terminal at the remote system.
 FTP: FTP stands for File Transfer Protocol. FTP is a standard
internet protocol used for transmitting the files from one
computer to another computer.
2.95 Comparison between TCP/IP and OSI model

OSI TCP
It is reference Model It is implemented from OSI
model
It has seven layers It has four layers
Considered to be reference tool Considered to be more reliable
Has separate session and Has Combined session and
presentation layer Presentation layer
Support only connectionless and Support only connectionless
connection oriented communication in the network
communication in the network layer
layer
Vertical Approach Horizontal approach
Model was developed before the Protocol was developed first
development of protocols then the model was developed
Protocol depend standard Protocol independant
43

2.10 REFERENCES :
1. Computer Networks : Andrew Tanenbaum
2. www.geeksforgeeks.org
3. www.javatpoint.com
4. vibdoc.com
5. www.iare.ac.in
6. www.tutorialspoint.com
7. docs.com



44

Unit-3
NETWORKING DEVICES
To understand what connecting/networking devices are, it is
important to know about Backbone Networks. Backbone Network is
a means of connecting to the LAN’s. It provides a transmission
channel for packets from being transmitted from one LAN to the
other. The individual LANs are connected to the Backbone Network
by using some types of devices such as Hubs, Repeaters, Switches,
Bridges, Routers and Gateways.

Hub
 A hub works in the physical layer of the OSI model. It is a non-
intelligent device, and has no decision-making capability. What a
Hub basically does is take the input data from one of the ports and
broadcast the information to all the other ports connected to the
network

Fig 3.1 port network

To demonstrate its working, consider a for port network as


shown in Fig 1. There are four computers connected to the four
ports. Suppose, if Computer A wants to send some data to Computer
B using a Hub, then, Computer A broadcasts the data on the
network, and Computer B, being connected to the network, has
access to the data. But, in this case all the other ports connected to
the network has access to the data that is being transmitted by
Computer A. This happens because, the Hub works in the Physical
Layer and hence it does not know about the MAC addresses of the
ports connected to the network. So, there is a lack of security in the
Hub.
45
Repeater
A repeater is a device similar to the Hub, but has additional
features. It also works in the Physical layer. The repeaters are used
in places where amplification of input signal is necessary. But, the
kind of amplification done by the repeater is different from the
regular amplification by amplifiers. The regular amplifies everything
fed into it. That means, if the input signal has noise induced into it,
both the desired signal and noise signal are together amplified. But,
in the case of a repeater, it regenerates the input signal, and amplifies
only the desirable signal. Hence, the noise component of the signal is
eliminated.

Fig 3.2: Repeater

Switch
A switch is an intelligent device that works in the data link layer.
The term intelligent refers to the decision making capacity of the
Switch. Since it works in the Data link layer, it has knowledge of the
MAC addresses of the ports in the network.

Fig 3.3: Switch

Hence, in the Fig 1, if data has to be sent from Computer A to


Computer B, then, the data is transferred to the Computer B only,
and not to any other computers connected on the network. Hence, it
establishes a link between the sender and the receiver based on the
MAC addresses. This also means that when data is being sent from
46
A to B, Computer C can establish a link with Computer D and
communication can take place between them. So, simultaneous data
transfer is possible in a switch. Also, Hub divides bandwidth, but a
Switch does not.

Bridge
A bridge is also a device which works in the Data Link Layer,
but is more primitive when compared to a switch. Initial bridges
were used to connect only two LAN‟s, but the most recent ones
perform similar operation as the switches. It also works on the
principle of transfer of information using the MAC addresses of the
ports.

Fig 3.4: Bridge

It can be noted is that the normal ADSL modem can be


connected via bridging also. The only difference is that, when
bridging is used, each time the device has to be connected to the
internet, it has to dial to the internet and establish a connection. Also,
a bridge alone cannot be used to connect to the internet, because, the
bridge works in the Data Link Layer, and has no knowledge of the
IP Addresses, which are used in the Internet.

Router
Any computer can be connected to the internet via MODEM,
which performs the Modulation and the Demodulation operations.
But, when there are more than one computer at home or in an
organization, and you have a single internet connection, you need a
Router. Router is a device which is used when multiple devices need
to connect to the Internet using the same IP.

Any Internet Service Provider (ISP) provides a single IP, and


especially for personal use, the IP address is assigned dynamically.
This is done because, suppose, an ISP has 1000 IP addresses, it does
not mean that it has 1000 customers. An ISP assumes that not all
devices will be connected to the internet at the same time. Hence,
when a user wants to access the internet, any IP address from the
pool of IP addresses from the ISP will be assigned to connect the
user to the internet.
47

Fig 3.5: Router


Hence, the router does the job of connecting multiple devices
in a LAN to the internet using the same IP address. Since the router
works in the Network Layer, it does forwarding on the basis of IP
addresses.

IEEE 802.11
IEEE 802.11 is a standard for Wi-Fi. There are several
different technologies/ generations that have been implemented. As
mentioned, the recent modems are IEEE 802.11 b/g modems. The
word b/g has the meaning as follows:

An IEEE 802.11 b standard uses 2.4GHz band and has a


maximum transfer rate of 11 Mbps, while the IEEE 802.11 g
standard uses 2.4 GHz band and has maximum transfer rate of 54
Mbps. Thus the b/g modem refers to a dual bandwidth modem,
which is compatible with both the b and g standards. The standards
are mainly differentiated based on the distance and speed of data
transfer.

The more recent IEEE 802.11 N standard has the capability to


provide speeds of over 100 Mbps. It basically uses multiple wireless
signals and antennas, and has increased signal intensity in order to
be able to provide network for greater distances. It employs MIMO
technology, wherein spatial encoding is used. The spatial pre-coding
is done at the transmitter and the post-coding is done at the receiver.
Recently, Reliance Communications was in news for implementing
MIMO technology to improve its 3G data transfer speeds.

Brouter
Brouter (Bridging Router) is a device which has two
functions. Brouter acts as a router for known protocols (known by
the router and those on the network) and hence works in the network
layer. For data packets with unknown protocols, it acts as a bridge
by connecting two different networks which is the function of a
bridge - and this works in the data-link layer.
48
Gateway
The Gateway devices work in the Transport layer and above, where
the different network technologies are implemented. A gateway is
necessary when there are different technologies implemented by the
different LANs which are to be connected together.

Fig 3.6: Gateway function

The Fig 1.6 shows the working of a gateway. Consider two


networks, say in New York, and a network in London. If data has to
be sent from one place to another, we need to ensure that the
network technologies that are being used by both the networks are
the same. If not, we need to use a Gateway.

In the more common example, we use a telephone network


and internet networks, which works on different technologies. The
telephone network follows the ISDN, and the Internet follows the IP.
Here, two different technologies are being used. In this case, the
router fails to work, since the router cannot understand the
functionalities of both the networks. Hence, we require a Gateway,
which acts as a translator in communicating between the two
networks.

Connecting Cables
While connecting different networks, we come across
different connecting cables, which are as follows:

1. RJ45/ RJ 11 Connectors: The RJ45 (Registered Jack 45) cable or


the Cat 5 cable, is used to connect the two different LAN‟s
together. This is normally confused with the RJ11 cable, which is
used in the interconnections in the telephone network.
2. Crossover cables: Crossover cables are generally used when two
different computers are to be connected together. They get the
name because, in these cables, a crossover is made between the
Transmitter and Receiver ports, i.e., Transmitter of one end of
49
the cable is connected to the Receiver port at the other end and
vice versa.
3. Null Modem Cables: The null modem cables are also those
which are used in connecting two different computers to form a
network. They also have a crossover, but generally, the term null
modem cables are used for RS232 standard cables.
4. Optical Fibers: The optical fibers are used when gigabit Ethernet
is used, and very high rates of data transmission is necessary.

Fig 3.7 Connecting Cables

REFERENCES
1. Computer Networks : Andrew Tanenbaum
2. www.geeksforgeeks.org
3. www.javatpoint.com
4. vibdoc.com
5. https://www.guru99.com/type-of-network-topology.html
6. https://minigranth.in/computer-networks-tutorial/computer-network-
models
7. https://www.coursehero.com/file/56309017/tcp-ip-modeldocx/


50

Unit-4
APPLICATION, PRESENTATION &
SESSION LAYER (Part 1)
Unit Structure:

4.1 Objectives
4.2 Introduction
4.3 Principles of Application Layer Protocols
4.4 The Web and HTTP
4.5 FTP
4.6 Telnet
4.7 Summary

4.1 OBJECTIVES

The objective of this chapter is to study the way the three


upper OSI model layers provide network services to end-user
applications. TCP/IP application layer protocols provide the services
specified by the upper layers of the OSI model. One will understand
how do people use the application layer to communicate by using
several network technologies such as HTTP, FTP, Telnet.

4.2 INTRODUCTION

The OSI model application layer is the nearest layer to the


end user, enabling the application layer and end user to directly
communicate with the software application. Client and server are
used by the application layer programs. There are layers below the
application layer for efficient transport, but no actual work is
performed for the customer. We will review some true network
applications in this chapter. However, aid protocols are required
even in the application layer to make the applications run. We will
then discuss one of these before the apps themselves begin.

This chapter focuses on network applications technical


dimensions. We start by identifying main application layer
principles, including networks for users, clients and servers,
processes and interfaces for transport layers. Several network
51
technologies such as the Internet, e-mail, DNS, etc. are being
explored.

4.3 PRINCIPLES OF APPLICATION, PRESENTATION


AND SESSION LAYER PROTOCOLS

The session layer allows the starting, closure and


management of the session between end-user processes, i.e. a
seminal dialog. The communication sessions consist of request and
response between requests. Session-layer services are commonly
used in application environments. Since the TCP/IP reference model
is unconcerned with the OSI model's specifics of device or transport
protocol semantics, it does not have a session layer. OSI control of
the session is used in transport-layer protocols in accordance with
the typical transport protocol (TCP, SCTP) or is considered the
realm of the application-layer protocol.

The application layer determines how different systems'


processes work and collaborate with each other. The application
level contains the user interface from the app to the network. This
layer functions and integrates protocols for different network
applications. The application layer defines:

a) The type of message (request and response message)


b) The syntax of various messages
c) The semantics that is the meaning of messages
d) Rules for message sharing -that is when and how messages are
transmitted

Functionality of session layer and presentation layer is


included in the application layer itself.

Multimedia apps are readily accessible over the internet and


include several simple applications, such as text email, remote file
access, file transfer, news group and text chat. Major application
Layer's application are Streaming Video, Internet, telephony, and
video conferencing instant messages with peer-to-peer sharing.

In many network applications, the Internet places the


Software Code for the programme. And the different application
protocols Keep these applications, some of which are the following
principal network application.

 Electronic Mail.
 The Web and HTTP
52
 Electronic Mail in the Internet such as SMTP, MIME, POP3,
IMAP
 Instant Messaging.
 Login into a Remote Computer Such as Telnet Login.
 P2P File Sharing
 Multiuser Networked Games.
 Streaming stored video Clips.
 Internet Phone.
 Real Time video Conferencing.

The Network Application program works on various end


systems. For example, a program for web browsers running on a
client machine and another running on a web server machine.

For P2P applications you need a P2P program which is


installed in your computer, generates and connects a community of
P2P applications. A P2P app is used primarily for music, movies,
games, and other files sharing.

The architecture of applications is distinct from that of the


network. The network architecture is fixed and offers a range of
applications services. On the other hand, the application architecture
is constructed by the application designer and sets out how the
application should be organized across different end systems.

Application architecture is of two types:


 Client-server architecture: An application program that works
on a local machine is referred as a client and a program that serves a
request is called a server. For example, when a client's host request
is received by a web server, the client's host request is answered.
Customers do not interact directly with each other in the client-
server architecture. Two browsers do not interact directly with each
other in a web program, for example. A server is set and well-known
as the IP address because it is always accessible, while the recipient
can always contact it by sending the packet to the IP address of the
sender. Client- server architecture is a server-based architecture.

 P2P (peer-to-peer) architecture: The server is not dedicated.


Peer-to-peer networking is regarded as peer-to-peer architecture
without transferring theinformation into a dedicated server. The P2P-
based technologies include the exchange of files and Internet
telephony.A network program consists of a pair of processes that
relay messages over a network.A file is moved from one process in
one process to another process in the P2P file-sharing method. The
files can be uploaded and downloaded by a process.
53

4.4 THE WEB AND HTTP

A protocol at the application level for distributed, shared,


hyper mediated information systems is the Hypertext Transfer
Protocol (HTTP). Since 1990, this has become the basis of the
World Wide Web data exchange (i.e., internet). HTTP is a generic
and stateless protocol, that can also be used with extensions to its
request methods, error codes and headers for other purposes. The
HTTP is primarily a TCP/IP networking protocol used for
delivering World Wide Web data (HTML files, picture files, query
results, and so on). TCP 80 is the main port, although other ports
can also be used. Computers interact with each other in a structured
manner. The HTTP defines how the request data of clients are
constructed, transmitted and responded to the server by the servers.

Features of HTTP are:


There are three basic features that make HTTP a simple but
powerful protocol:

 HTTP is connectionless:
The HTTP client, i.e., a browser starts an HTTP request and
the client waits for the answer after a request is made. The server
handles the request and sends a reply to the client, then client
disconnects the link. Thus, during current request and response, the
client and server know each other. New connections are made with
new requests.

 HTTP is media independent:


HTTP is a media-independent protocol that means every data
form can be transmitted via HTTP, as long as both the server and
the recipient know how to manage the data contents. The type of
content must be specified in the MIME type header for both the
client and the server.

 HTTP is stateless:
HTTP is a stateless protocol as both the client and server
know each other only during the current request. Due to this nature
of the protocol, both the client and server do not retain the
information between various requests of the web pages.

Basic Architecture
The following diagram shows a very basic architecture of a
web application and depicts where HTTP sits:
54

Figure 4.1: HTTP Protocol Architecture

The HTTP protocol is an architectural client/server


request/response protocol where web browsers, robots and search
engines, etc. function as HTTP clients, and the Web server functions
as a server. The HTTP uses the principle of Uniform Resource
Locator (URL)for clients who wish to access a database over the
internet and who need address and promote access to documents.
The figure above shows the HTTP transaction from client to server.
Through sending the request message to the server, the recipient
initiates a transaction. A response message is sent from the server to
the request.

4.5 FTP

While it is very convenient and simple to move files from one


device to another, it can also create problems. There may be separate
file conventions on two systems, for example. Two systems can
interpret text and data in various ways. The different directory
structures can be present in two systems. By creating two
connections between hosts, FTP protocol overcomes this issue. For
data transfer, one link is used and for the control connection another
connection is used.

FTP is the standard for File Transfer Protocol. FTP is a


simple TCP/IP Internet protocol used for sending data from one host
to the next. It is used mostly to move the website file from its author
to the computer, which serves as a server for other computers on the
internet. It is also used to import the files from other servers onto the
device.
55
Objectives of FTP
 It provides the sharing of files.
 It is used to encourage the use of remote computers.
 It transfers the data more reliably and efficiently.

Figure 4.2: FTP Services

Mechanism of FTP

Figure 4.3 : Mechanism of FTP

The above figure shows the basic model of the FTP. The FTP
client has three components: the user interface, control process, and
data transfer process. The server has two components: the server
control process and the server data transfer process.

FTP is a client-server protocol that relies on two


communications channels between client and server: a command
channel for controlling the conversation and a data channel for
transmitting file content. Clients initiate conversations with servers
by requesting to download a file. Using FTP, a client can upload,
download, delete, rename, move and copy files on a server. A user
typically needs to log on to the FTP server, although some servers
make some or all of their content available without login, known
as anonymous FTP.
56
There are two types of connections in FTP:
o Control Connection: The control connection uses very simple
rules for communication. Through control connection, we can
transfer a line of command or line of response at a time. The control
connection is made between the control processes. The control
connection remains connected during the entire interactive FTP
session.

o Data Connection: The Data Connection uses very complex rules


as data types may vary. The data connection is made between data
transfer processes. The data connection opens when a command
comes for transferring the files and closes when the file is
transferred.

How does FTP Works?


In FTP, the control connection is to be established first by
server FTP and client FTP. Foropening the control connection,
initially the FTP server opens in passive mode on port 21 as shown
in the Figure 4.4.

Figure 4.4: Passive open by FTP Server for Control Connection

When client has to transfer data using FTP, Client FTP


completes the control connection using any ephemeral port i.e., the
control connection is now said to be active open by FTP client as
shown in Figure 4.4.The client side of FTP sends the user
identification and password over this control connection. The client
side of FTP also sends, over the control connection, commands to
change the remote directory.
57

Figure 4.5: Active open by FTP Client for Control Connection

After the control connection is completely established, now


FTP client is in listening mode for data connection as shown in
Figure 4.5.

Figure 4.6: Passive open by FTP Client for Data Connection

When the server side receives a command for a file transfer


over the control connection (either to, or from, the remote host), the
server side actively open a TCP data connection to the client side
(Figure 4.6). FTP sends exactly one file over the data connection and
then closes the data connection.
58

Figure 4.7: Active open by FTP Server for Data Connection

If, during the same session, the user wants to transfer another
file, FTP opens another data connection. Thus, with FTP, the control
connection remains open throughout the duration of the user session,
but a new data connection is created for each file transferred within a
session (that is, the data connections are non-persistent).

Advantages of FTP:
 Speed: The FTP is one of the fastest ways to transfer the files
from one computer to another computer directly.
 Efficient: It is more efficient as we do not need to complete all
the operations to get the entire file.
 Security: To access the FTP server, we need to login with the
username and password. Therefore, we can say that FTP is
secure.
 Back & forth movement: FTP allows us to transfer the files
back and forth.

Security of FTP
FTP does not encrypt traffic, and individuals can capture
packets to read usernames, passwords and other data.

FTP may still be vulnerable to brute force attacks, packet


capture, spoofing, FTP bounce and other attacks such as username
enumeration or DDoS.
59
FTP clients
FTP clients are used to upload, download and manage files on
a server. FTC clients include:
 WinSCP is a Windows FTC client that supports FTP, SSH and
SFTP.
 WS FTP is another Windows FTC client which also supports
SSH.
 Transmit is an FTP client for Mac, supporting FTP, SSH and
FTP.

4.6 TELNET

The primary function of the internet is to offer services to its


users. For example, users may wish to run numerous application
programs at a remote site and then move the results to a local site.
This necessitates the use of a client-server application such as FTP
or SMTP. However, this would prevent us from developing a
customized software for each demand. The most realistic approach is
to include a general client-server program that allows the user to
view any application program on a remote device. As a
consequence, a program that allows a user to connect to a remote
device. Telnet, a common client-server program, is used to satisfy
those specifications. Terminal Network is abbreviated to Telnet.
Telnet links to a central device in such a manner that a nearby
terminal appears to be on the remote side.

Figure 4.8: Telnet


Telnet is a 1969 protocol that provides a command line
interface for communicating with a remote computer or server. It is
often used for remote control but is often used for initial device
configuration, such as network hardware. Telnet is a bidirectional
interactive text-oriented networking device that uses an 8-byte
virtual terminal link. Over the transmission control protocol, user
data is interspersed in-band with telnet control information (TCP).
Telnet was often used on a terminal to remotely perform functions.
The user connects to the server using the Telnet protocol,
which is inserted into a command prompt using the following
syntax: telnet hostname port. After that, the user executes commands
on the computer by typing basic Telnet commands into the Telnet
60
prompt. Telnet can be used to test or troubleshoot remote web or
mail servers, as well as for remote access to MUDs (multi-user
dungeon games) and trusted internal networks. Telnet was designed
for timesharing wherein multiple users can simultaneously logged
into the terminal. There are two types of login for Telnet namely
local login and remote login.
4.6.1 Local Login

Figure 4.9: Telnet – Local Login


As shown in figure 4.9, when the user logs into a local
timesharing environment, it is known as local login. The terminal
driver accepts keystrokes inserted by the user while the workstation
is operating terminal emulator. The terminal driver then forwards
these characters to the operating system, which then launches the
requested application software.
4.6.2 Remote Login

Figure 4.10: Telnet – Remote Login


As shown in figure 4.10, when the user wants to access an
application program on a remote computer, then the user must
perform remote login. At the local site, the user sends keystrokes to
the terminal driver, who then sends the characters to the TELNET
device. The TELNET client converts the characters to a common
61
character collection known as network virtual terminal characters
and sends them to the local TCP/IP stack. The network virtual
terminal is an interface that defines how data and commands are sent
across the network. The commands in NVT form are sent to the
remote machine via TCP/IP. The characters are transmitted to the
operating system and then to the TELNET server from here. The
TELNET server translates the characters so that they can be
interpreted by a remote computer. The characters, though, cannot be
transferred directly to the operating system since a remote operating
system does not receive the characters from the TELNET server. As
a result, certain program that can accept characters from the
TELNET server is needed. The characters are then transferred to the
relevant application software by the operating system.

4.6.3 NVT

NVT uses two sets of characters, one for data and one for
control. Both are 8-bit bytes. Telnet uses only one TCP connection.
The same connection is used for sending both data and control
characters. Telnet accomplishes this by embedding the control
characters (Table 5.1) in the data stream. To distinguish data from
control characters, each sequence of control characters is preceded
by a special control character called interpret as control (IAC).
Table 5.1: Some NVT control characters
62
Options (Table 5.2) are extra features available to a user with a more
sophisticated terminal. Telnet lets the client and server negotiate
options before or during the use of the service.

Table 5.2: Some NVT options

Figure 4.11: Telnet – Remote Login Example


63
In the example as in Figure 4.11, the default mode concept is
represented. The client and the server negotiate the terminal type and
terminal speed and then the server checks the login and password of
the user.

4.7 SUMMARY

In this chapter we studied the how TCP/IP application layer


protocols provide the services specified by the upper layers of the
OSI model and embeds the functionality of presentation layer and
session layer in the application layer itself (Some of them is taken
care by transport layer). The brief overview of World Wide Web and
HTTP along with its architecture, File transfer Protocol and its
working and TELNET was the focus of the chapter. In the next part
we will have brief discussion on Electronic Mail in the Internet,
DNS and SNMP.


64

Unit-4A
APPLICATION, PRESENTATION &
SESSION LAYER (Part 2)
Unit Structure:
4A.1 Objectives
4A.2 Introduction
4A.3 Electronic Mail in the Internet
4A.3.1 SMTP
4A.3.2 MIME
4A.3.3 POP3
4A.3.4 IMAP
4A.4 DNS
4A.5 Introduction to SNMP
4A.6 Summary

4A.1 OBJECTIVES

The objective of this chapter is to study the way TCP/IP


application layer protocols provide the services specified by the
upper layers of the OSI model. One will understand how do people
use the application layer to communicate by using several network
technologies such as SMTP, MIME, POP3, IMAP, DNS and SNMP.

4A.2 INTRODUCTION

The OSI model application layer is the nearest layer to the


end user, enabling the application layer and end user to directly
communicate with the software application. Client and server are
used by the application layer programs. There are layers below the
application layer for efficient transport, but no actual work is
performed for the customer. We will review some true network
applications in this chapter. However, aid protocols are required
even in the application layer to make the applications run. We will
then discuss one of these before the apps themselves begin.
65
This chapter focuses on network applications technical
dimensions. Several network technologies such as the Internet, e-
mail, DNS, etc. are being explored.

4A.3 ELECTRONIC MAIL IN THE INTERNET

The transfer of messages over the Internet is referred to as e-


mail. It is one of the most frequently used communications network
features and can include text, folders, photographs or other
appendices. In principle, it is information which is saved to a
particular entity or group of persons on a device transmitted through
a network. Email messages are sent via email servers, which employ
a number of protocols from the TCP/IP suite. For e.g., SMTP is a
protocol that stands for simple mail transfer protocol which is used
to send messages, while IMAP and POP are used to receive
messages from a mail server. To access your mail account, simply
enter a valid email address, password, and the mail servers used to
send and receive messages.

Even if most webmail servers set up your mail account


automatically, you just need to input your password and email
address. If you use an email client such as Microsoft Outlook or
Apple Mail, you may need to manually customize each account. In
addition to the email address and password, you will need to enter
the incoming and outgoing mail servers, as well as the necessary
port numbers for each. Email messages include three components,
which are as follows:

o Message envelope: It depicts the email's electronic format.


o Message header: It contains email subject line and sender /
recipient information.
o Message body: It comprises images, text, and other file
attachments.

4A.3.1 SMTP

The TCP / IP protocol used to send and get emails is an


SMTP (Simple Mail Transfer Protocol). However, since it is limited
in its ability to queue messages at the receiving end, it is typically
used in conjunction with one of two other protocols, POP3 (Post
Office Protocol) or IMAP (Internet Message Access Protocol),
which allow the user to store messages in a server mailbox and
regularly retrieve them from the server.
66
SMTP (Simple Mail Transfer Protocol) is a collection of
communications directives which allow software to email over the
internet. It offers a correspondence on the same or separate machines
between users. It may send one or more recipients with a single
letter. Text, voice, video or graphics may be used in the post. It can
even transmit the messages beyond the internet on networks.
SMTP's main function is to establish communication rules between
servers. The servers will mark themselves and announce how they
are attempting to communicate. You should also treat mistakes like
the wrong e-mail address. For eg, if the address of the receiver is
incorrect, the server will respond with a kind of error message.

How SMTP works


SMTP operates on a client/server model as a three-stage
operation. Initially, an electronic mail server uses SMTP to deliver
an e-mail to the e-mail server from the Outlook or Gmail clients.
Second, the e-mail server sends an e-mail to the e-mail server via
SMTP as a relay tool. Third, to upload inbound mails via IMAP and
position them on the recipient's inbox, the receiving server uses an
email client.

Components of SMTP
First, we split down the SMTP client and the SMTP server
into two elements such as User Agent (UA) and Message Teansfer
Agent (MTA). The User Agent (UA) plans the message and
produces the box. The message is then inserted in the envelope. This
mail is transferred over the internet through the mail transfer agent
(MTA).

Figure 4A.1:User Agent (UA) and Message Teansfer Agent


(MTA) of SMTP
67
By incorporating a relay system, SMTP permits a more
complex system. More MTAs may be included, either as a client or
server in order to transmit the e-mail, ratherthan just an MTA at
sending and an MTA at the receiving end.

You may also use the relaying device without a TCP/IP


protocol to send the e-mails to the user using the mailing portal. The
mail gateway is an MTA relay and is emailable.

Figure 4A.2: Message Transfer Agents as Relay Agents

Figure 4A.3: Message Transfer Agents as Mail Gateway


68
1. Composition of Mail: A recipient sends an e-mail using an
email agent to assemble an e-mail message (UA). The Mail User
Agent is a mail sending and receiving program. There are two
sections of the message: body and header. The body is the key
component of the message while the header contains things like
the transmitter and the receiver. The header provides material
descriptive of the topic of the message as well. The message
body is like a letter in this situation, and the header is like a
packet containing the address of the recipient.
2. Submission of Mail: After composing an email, the mail client
then submits the completed e-mail to the SMTP server by using
SMTP on TCP port 25.
3. Delivery of Mail: There are two components of the e-mail
addresses: the recipient's username and the domain name. For
instance, vivek@gmail.com, in which "vivek" is a recipient's
username and the domain name "gmail.com."
4. If the recipient's domain name is different from the recipient's
domain name, MSA transfers the mail to the mail transfer
handler (MTA). The MTA will locate the target domain to
transmit the text. It tests the Domain Name Scheme MX record
for the destination domain. The MX record includes the domain
name and IP address of the domain of the receiver. Upon
logging, MTA can bind to the exchange server to relay the post.
5. Receipt and Processing of Mail: The exchange server will
forward the inbound message to the incoming server (mail
delivery agent), which stores e-mail where it will be retrieved by
the recipient.
6. Access and Retrieval of Mail: The stored email in MDA can be
retrieved by using MUA (Mail User Agent). MUA can be
accessed by using login and password.

Limitations of Simple Mail Transfer Protocol (SMTP):


1. SMTP has a very simple structure
2. It’s simplicity however comes with a price as it only sends
messages in NVT 7-bit ASCII format.
3. It cannot be used for languages that do not support 7-bit ASCII
format such as- French, German, Russian, Chinese and
Japanese, etc. so it cannot be transmitted using SMTP. So, in
order to make SMTP broader we use MIME.
4. It cannot be used to send binary files or video or audio data.
69
4A.3.2 MIME

Bell Communications proposed a multi-purpose Mail


Extension (MIME), in 1991 to extend narrow e-mail capabilities.
MIME is a kind of add-on or additional protocol that enables the
transmission of non-ASCII data via SMTP. It helps users to share
data files in numerous ways over the Internet: audio, video,
pictures and software programs.

When people want to express themselves in terms of


multimedia, growing demand for an e-mail message. MIME is also
added another email service as it is not limited to textual
information. MIME converts non-ASCII data to 7-bit NVT sender
side and supplies it to the SMTP client. The message will be
returned to the initial data on the recipient side. We can also send
video and audio information via MIME when it is transmitted in 7-
bit ASCII files.

You may send a single message with many attachments.


Email length is unlimited.

Binary files, can be divided if required (executables,


images, audio or video). MIME allowed various forms of content
and multi-part communications.

Working of MIME

If a user needs to send an e-mail using the ASCII format and


there is a MIME protocol to translate the mail into a 7-bit NVT
ASCII format. MIME protocol translates the message back to non-
ASCII code by means of a 7-bit email scheme, which is then read by
the recipient user's agent and information is then eventually read by
the receiver. At the beginning of every e-mail transfer, MIME
header is practically inserted.

MIME with SMTP and POP:

SMTP moves the email from the senders' side to the reception
mailbox and saves it and adds a MIME header to the original
header and gives additional detail. As a message access agent,
POP organizes messages to the mail recipients' machine from the
mail server. POP enables the user agent to bind to a transmitting
agent.
70
MIME Header:
It is added to the original e-mail header section to define
transformation. There are five headers which we add to the
original header:

1. MIME Version – Defines version of MIME protocol. It must


have the parameter Value 1.0, which indicates that message is
formatted using MIME.
2. Content Type – Type of data used in the body of message.
They are of different types like text data (plain, HTML), audio
content or video content.
There are seven different types and fourteen sub-types of
content. The various content type are listed in the table below:

Table 4A.1: Various content type of MIME


71
3. Content Type Encoding – It defines the method used for
encoding the message. Like 7-bit encoding, 8-bit encoding, etc.
Thus it specifies the method used to encode the message into 0s
and 1s for transport. The content transfer encoding field is
represented as :

Content-transfer-encoding : <type>
The various encoding methods used are given in the table
below:

Table 4A.2: Various encoding methods of MIME

4. Content Id – It is used for uniquely identifying the message.


i.e. it uniquely identifies the whole message in a multiple
message environment. This field is represented as:
Content-id : id = <content-id>
5. Content description – It defines whether the body is actually
image, video or audio. This field is represented as:
Content-description: <description>

The various fields in the MIME header are

Figure 4A.4: MIME Header


72
4A.3.3 POP3
It is an easy protocol to access the e-mail boxes remotely. The
RFC 1225 is the protocol. Version 3 (POP3) of the Post Office
Protocol is the protocol that helps a recipient to accept an email from
the remote mail server.

SMTP requires the host that receives the mail to be still


online; otherwise it would be impossible to bind to TCP. On behalf
of the customers, the POP server collects the mail.

Figure 4A.5: Delivery by POP3


A POP3 server can hold messages for each user before a
POP3 client such as Microsoft Outlook 98, Microsoft Outlook
Express and Microsoft Mail and News links to the downloads and
reads. A POPS client sits in a Transmission Control Protocol
session (TPT) using a TCP port 110, logs in to the internet and then
issues a set of POP3 commands to receive a POP3 message from a
POP3 server.

stat: It asks the server for the number of messages waiting to be


retrieved.
list: It determines the size of each message to be retrieved.
retr: It retrieves individual messages d. Quit: Ends the POP3
session.

Though POP3 has experienced a number of changes, the


developers maintained that a three-stage process was followed
between the customer and the server during mail retrieval. They tried
to make this protocol very easy and today it is very popular with this
simplification.
73

Let's understand the working of the POP3 protocol.

Figure 4A.6:Working of POP3

The POP3 server asks for the POP3 client user name in order
to create a connection between the server POP3 and the POP3 client.
If the POP3 server identifies the user name, the ok message is sent.
Then it asks the POP3 client's password and then transfers the POP3
client to the POP3 server. The POP3 server sends an OK message if
the password fits, and the link is established. The client will see the
POP3 mail server mail list after establishing a connection. In the
mail list, the customer gets the server email numbers and sizes. The
user will launch mail recovery from this collection. Once the client
receives all of the user addresses, all the server emails will be
removed. We may also assume that emails are only contained on a
certain computer, so that the same mails cannot be read on another
machine. The emailed settings can be modified to leave an email
copy on the email server to resolve this condition.

Advantages of POP3 protocol

The following are the advantages of a POP3 protocol:


 Users can read an electronic offline email. Only when uploading
e-mails from the cloud would an internet connection entail. Until
the emails are downloaded from the cloud, all of the mails
downloaded can be obtained without internet from our PC or
74
hard disk of your phone. There is, therefore, no permanent
Internet connectivity in the POP3 protocol.
 Secure and fast access to e-mails, because they are saved on our
PC already.
 The size of the email we receive or send does not restrict.
 Less space for server store is needed when all the mail on the
local computer is stored.
 The mailbox has the full mailbox capacity, but the hard disk size
is limited.
 The protocol is simple, so it is one of today's most common
protocols. Configuring and using is simple.

Disadvantages of POP3 protocol

The following are the advantages of a POP3 protocol:


 When e-mails from a server are downloaded, all mails are default
removed from the server. Therefore, mails from other computers
cannot be read without a backup of the email on the server being
configured.
 It can be difficult to move the mail folder from the local
computer to another machine.
 Since all attachments are placed on your local computer, if the
virus scanner does not search them, then the possibility of a virus
attack would be high. The assault of the virus could destroy the
machine.
 The downloaded email directory of the mail server will corrupt it
as well.
 The mail would be stored at the local machine, allowing anyone
on the computer to enter the folder of the email.

4A.3.4 IMAP

IMAP stands for the Access Protocol for the Internet


Message. This is a protocol for the application layer used for
processing mail from the mail server. That is the most widely used
email retrieval protocols such as POP3.

The client/server paradigm is also followed. On the one hand,


we have an IMAP client that is a machine operation. We have an
IMAP server on the other hand, which is just a machine running on a
separate device. Both machines are network linked.
75

Figure 4A.7: Working of IMAP

The TCP/IP transport layer is used to support the IMAP


protocol, which includes using the protocol durability indirectly. The
IMAP server is able to listen to port 143 by default after the TCP
link between an IMAP client and an IMAP server is created but it
can be modified as well. For the secure encrypted communication
port, 993 is used.

Features of IMAP :
 It is able to manage and organize many mailboxes into
different categories.
 Provides the inclusion of message flags to track messages.
 It will decide to get emails before uploading from a mail
server.
 Download multimedia quickly as you connect many files.

Some of the limitations of IMAP are:


 Management of IMAP is complicated.
 Only where an internet connection occurs, user email is
open.
 Loading messages is slower.
 IMAP is not supported in some email that makes
management challenging.

POP Vs IMAP:
The following table lists the differences between POP and IMAP-
Table 4A.3: Differences between POP and IMAP
Post Office Protocol Internet Message Access
Protocol
You can only read the mail after Before uploading, you can
POP has been downloaded. review your email content via
IMAP.
You should upload the email The email is saved on the mail
address to local machine and server.
remove the copy on the server.
76

In the mail box of the mail server The customer is able to organize
the recipient cannot organise server mails.
mails.
Only from a single computer can The customer is able to organize
mails be read. server mails.
The main benefit is that mails
can be read from different
computers.
The POP does not synchronize The mail and the mail account of
mail server and mail account the recipient are synced in
recipient. IMAP.
Therefore, no modifications to Thus, modifications to the mail
the client's mail account on the account of the customer are
online mail mailbox can be immediately seen on the online
found. mailbox.
Example- Example-

If you are using POP and marks a If you are using IMAP and
mail as read, it does not get marks a mail as read, it gets
marked as read in the web mail marked as read in the web mail
inbox because the mails are inbox too because the changes
downloaded to the computer and are taking place on the server.
so the changes won’t be visible
on the server.
POP is a stateful protocol before IMAP is a stateful protocol and
all e-mail and stateless sessions for each device, the IMAP server
are downloaded. needs to keep a folder hierarchy.

For those who don't search their For people who routinely search
mail on other machines, POP is a their mails on other machines,
great option. IMAP is a safer option.

4A.4 DNS

DNS (Domain Name System) is a protocol on the application


layer specifies how the application processes are communicated by
the messages on various networks. DNS is a directory utility that
maps the name of a network host to its numerical address.

For the operation of the Internet, DNS is essential. Each tree


node has a domain name and the entire domain is a symbol series of
points. DNS is an IP address passing service to the domain name.
This helps users of networks, instead of recalling IP addresses, to use
user-friendly names while searching other hosts. For examples,
77
presume that the FTP server at EduSoft has a 132.147.165.50 IP
address, most users reaching the site using ftp.EduSoft.com. The
domain name therefore is more trustworthy than the IP address.

Figure 4A.8: Domains of DNS

DNS is a protocol used on various networks, TCP/IP. The


Domain Name Space is split into three sections: generic, region, and
opposite.

Generic Domains: The registered hosts are determined by their


generic behaviour. Each tree node specifies the domain name, which
is a DNS database index. It uses 3-character codes, which identify
the form of organisation.

Table 4A.4:Generic Domains

Label Description
aero Airlines and aerospace companies
biz Businesses or firms
com Commercial Organizations
coop Cooperative business Organizations
edu Educational institutions
gov Government institutions
info Information service providers
int International Organizations
mil Military groups
museum Museum & other nonprofit organizations
name Personal names
net Network Support centers
org Nonprofit Organizations
pro Professional individual Organizations
78
Country Domain
The country domain format is the same as the generic
domains, but instead of three organizational abbreviations, it uses
two-character country abbreviations (for example, for us in the
United States).

Inverse Domain
For mapping an address to a name, the inverse domain is used.
When a client requested the server and only approved client’s files
are in the server. To see if the client is included or not, a question is
sent to the DNS server and a request is made for an address to be
mapped to the name.

Figure 4A.9: Example of DNS

Working of DNS:
DNS is a networking protocol client/server network. DNS
clients submit server questions while DNS servers send the client
answers. The requests for the Client include a name transformed in a
DNS-lookup IP address, with requests that contain an IP-address
translated into a DNS-lookup name. DNS implements the
hierarchical directory to store online the names of all hosts. While a
client such as a Web browser sends an application with a hostname,
the DNS resolver will submit a request for the IP address of a
hostname to the DNS server. When a DNS server does not have a
79
hostname IP address, it transfers the message to a different DNS
server. If the IP address has entered the resolver, the response will be
completed by the Internet protocol.

Case Study

Figure 4A.10: Case Study


This diagram provides an overview of what happens when
emails are sent using the conventional approach from one person to
another. Alice sends an email to Bob in this case.
1. First, in its email application, Alice sends a letter to Bob. Alice’s
e-mail program will provide the letter along with some other
stuff, such as your e-mail address, your address, the time your
message will be sent to, and so forth. The mail software of Alice
is ready to deliver a fax, using rules known as the Simple Mail
Transfer Protocol, to a central computer called a mail server (or a
Mail Transfer agent).
2. Alice's mail server (smtp.a.org) takes the letter from Alice and
looks at the address to verify the messaging location. The mail
server then leaves the network and fails to search the mail server
Bob uses. This is done by speaking with a Domain Name
Systems server, which tracks how various devices, such as mail
servers, can be found on the internet.
3. A DNS server supplies the required mail address to Alice's mail
server for Bob's email receipt servers (mx.b.org).
80
4. The mail server Alice sends a message into the Bob mailbox on
Bob's email server.
5. Bob opens his email program and downloads his emails with one
of the two rules, POP, or the Internet Message Protocol
Access(IMAP). His messages contain Alice's latest post.

4A.5 INTRODUCTION TO SNMP

SNMP stands for the for simple network management


protocol. SNMP is an internet device control system. It offers a
series of internet surveillance and management activities. SNMP has
the boss and agent in two components. The director is a host who
manages and tracks a variety of organizations like routers. It is a
protocol on the application layer where a few manager stations can
accommodate a number of operators. On the level of
implementation, the protocol can monitor devices produced by
various manufacturers and deployed on various physical networks.
This network consists of heterogeneous LANs and WANs linked by
routers or gateway.

Managers & Agents


A controller is a host operating SNMP client, while the agent
is a router running the SNMP server software. Internet management
is accomplished by simple dialog between a boss and an agent. The
agent is used to maintain records in a database while the manager is
used for data access. For example, a router can store suitable
variables such as certain received and forwarded packets, while the
manager can compare those variables to decide whether the router is
loaded or not. Agents are also able to assist with the management
process. When something goes wrong, an agent sends an alert to the
server software on the agent

Management with SNMP has three basic ideas:


A manager tests the agent by asking the data which represents
the agent's behaviour.

A manager also forces a certain role to be exercised by


resetting the value in the agent database.

An Agent also contributes by advising the manager of an


unusual situation to the management process.

Management Components
Management is not only accomplished through the SNMP
protocol but also by using other SNMP protocols. The other two
81
protocols, SMI (Management knowledge structure), and MIB,
accomplish management (management information base).

SMI, MIB and SNMP are the combinations of management.


All three protocols including the abstract notation 1 (ASN.1) and the
basic principles of encoding; (BER).

Figure 4A.11: Components of Management


SMI
The SMI (Information Management Structure) is a network
management system component. Its primary purpose is for the data
form to be defined in an entity and for the data to be engraved over a
network to be saved.

MIB
The second aspect of network management is the MIB
(Management Knowledge Base).Each agent has a MIB, a list of all
items managed by the manager. MIB is divided into eight classes, ip,
ip, tcp, udp, egp, etc. MIB is the following. These classes are the
object of the mib.

Figure 4A.11: Classes of MIB


82
SNMP
SNMP defines five types of messages: Get Request, Get Next
Request, Set Request, Get Response, and Trap.
Get Request: The Get Request message is sent to the agent (server)
from a manager (client) to get the variable value.
Get Next Request: The Message Get Next Request is sent from the
administrator to the agent to get the variable value. The value of the
entries in a table is derived from this sort of post. If the manager
does not know the entry indices, he cannot locate the values. The
Message Get Next Request is used to describe an entity in such
contexts.
Get Response: In addition to the Get Request and Get Next Request
query, the Get Reponse message is submitted by the agent to the
boss. This message includes the manager's requested value for an
attribute.
Set Request: The message Set Request is sent by the manager to the
agent to specify a value in a variable.

Figure 4A.12: Types of SNMP Messages


83
Trap: Trap message is sent by an employee to an event planner. For
instance, if the agent is restarted, it notifies the manager and sends
the reboot time.

4A.6 SUMMARY

In this chapter we studied the how TCP/IP application layer


protocols provide the services specified by the upper layers of the
OSI model. The brief overview of electronic mail in the internet
along with the architecture and working of SNMP, MIME, POP3
and IMAP, was the focus of the chapter. The details of how the
application processes are communicated by the messages on various
networks using DNS and the way internet surveillance and
management activities is done with help of SNMP are also part of
the chapter.


84

Unit-5
TRANSPORT LAYER
Unit Structure :

5.1 Objectives
5.2 Introduction
5.3 Transport-Layer Services
5.4 Port addressing
5.5 Multiplexing and Demultiplexing
5.6 Principles of Reliable Data Transfer
5.7 Congestion Control
5.8 TCP’s Congestion Control
5.9 Summary

5.1 OBJECTIVES

The objective of the chapter is to study the transparency and


reliability provided by the transport layer between end users. The
transport layer, including its services, concepts and performance,
error control and flow control along with congestion handling in this
chapter will be studied in depth.

5.2 INTRODUCTION

The transport layer is a core component of the layered


network infrastructure between the application layer and the network
layer.

Figure5.1: Position of Transport Layer


85
It has a vital role to play in offering connectivity services to
applications on various hosts directly. Their duty is to ensure the
reliable and economical transmission of data from the source
machine to the destination machine, regardless of the actual physical
network or networks. The entire idea of layered protocols does not
make any sense without the transportation layer. The transport layer
manages the flow control, segmentation/designation, and error
control over the reliability of the given channel. Some protocols are
state-and link-oriented. In other words, the transport layer will trace
the segments and retransmit the failed segments. The transportation
layer often acknowledges the effective transmitting of information
and sends the next data if its error free.

The next section describes the services provided by transport


layer.

5.3 TRANSPORT-LAYER SERVICES

The transport layer is responsible for delivering information


on the host computers for the related application process.
Transportation layer facilities will be distributed through the
transportation layer protocol programming interface to the
application. It is considered an end-to-end layer since it provides a
point-to-point connection between the source and the destination to
deliver the services efficiently. It does not provide a hop-to-hop
connection. The data encapsulation unit is a segment in the transport
layer. TCP (Transmission Control Protocol) and UDP (User
Datagram Protocell) are the protocols used by Transport Lager to
provide its functionalities.

Transportation layer protocol services can be broken down into


following groups:

Figure 5.2: Transport Layer Services

5.3.1 End-to-end Delivery


The transport layer is also responsible for creating the end-to-
end Connection between hosts for which it mainly uses TCP and
UDP. The network layer delivers the packet to the correct
86
destination host using IP address (Internet Protocol address)
associated at network layer. On the source host and destination host,
multiple processes are executed. There is a certain mechanism
essential for the delivery from the source host to the target host. The
transport layer allows to deliver a packet or part of a message from
one process to another.

5.3.2 Port addressing


When a packet arrives at destination, transport layer needs a
port number that properly transmits the data segments to the proper
process across many processes operating on a given host. For
example, a port number is a 16-bit address used to identify any
client-server program uniquely.

5.3.3 Multiplexing and De-multiplexing


Multiplexing encourages multiple programs to be
concurrently used over a network operating on a host. This function
is given by the transport layer that allows us to concurrently transfer
packet streams through a network of different applications. These
packets may be accepted from the various processes, which have
their port numbers and passed to the network layer after proper
headers have been inserted. Also, it is necessary to multiplex the
data from separate processes on the recipient side. Transport collects
the data segments from the network layer and delivers them to the
required system process.

5.3.4 Reliable Delivery


Many transport layer protocols are primarily responsible for
ensuring efficient delivery. The reliable and orderly transfer of data
is assured. It is geared towards byte streams. In other words, it does
not supply packets, but bytes. The received bytes are delivered, but
not always in the same units in the order sent. Owing to network
congestion and errors packets can be lost during transport. The
transport protocol will use an error detecting code like a checksum to
ensure the data is not compromised by giving the sender an ACK or
NACK message. Automatic retransmission of missing or corrupted
data can be used.

5.3.5 Flow Control


A flow control function between the neighbouring layers of
the TCP/IP model is given by the transport layer. TCP also avoids
data loss by imposing such flow management methods because of a
fast sender and slow recipient. It uses the sliding window protocol
approach executed by the recipient by transmitting to the sender a
window telling them of how much data they can receive.
87
5.3.5 Congestion Control
Congestion is a condition where too many hosts want to
transmit data over a network and router buffers or links tend to
overload leading to packet loss. Which raises the congestion further
by retransmitting packets from the sources. In this case, congestion
management is carried out in various directions by the transport
layer. The congestion management is used for open loops in order to
avoid congestion and closed loops in order to eliminate congestion
in the network after it has happened. TCP offers AIMD- additive
increase multiplicative decrease for congestion control.

In the next section, the port addressing by transport layer is


covered in detail.

5.4 PORT ADDRESSING

Operating systems today support multi user and


multiprogramming environment. To deliver information, we need
address. MAC address is needed for node-to-node communication.
IP address delivers the information to the correct destination host.
Now among various applications running on the destination host, to
which application (process) the information must be delivered? For
this, port is the communication endpoint. Port number is the logical
construct that identifies a specific application or process.

Figure 5.3 indicates the role of port numbers. The header


fields TCP and UDP are capable of identifying certain applications.
The port numbers are these special features. Each section or
datagram's header consists of different fields; the source and
destination port are two of these fields. The source port number is
the number of a certain connection and the originating process is
connected with the local device. The port number of the destination
is the number of the same connection on the remote host that
receives the request.
88

Figure 5.3: Role of Port Numbers

Port numbers are distributed in many ways, based on whether


the message is a local host request or a remote host response.
Although the server processes have static port numbers, clients can
dynamically select a port number to ensure that no port is already
being used by each communication. A port number is a 16-bit
unsigned integer, thus ranging from 0 to 65535 and are divided into
three ranges- well-known port numbers, registered port numbers and
dynamic port numbers.

Well-known Ports (0 to 1023): These are reserved and typically


used by HTTP, SMTP, POP3, FTP, DNS, and others. Because client
applications are reserved, it is possible to request a connection to a
certain port and its related transport layer service (TCP or UDP).
These pre-defined port numbers are registered with the Internet
Assigned Numbers Authority (IANA).

Table 5.1 Some well-known port numbers


Port Application Transport
Description
number protocol protocol
21 FTP File transfer TCP
23 Telnet Remote login TCP
25 SMTP E-mail TCP
53 DNS Domain Name System UDP
79 Finger Lookup information about a user TCP
80 HTTP World wide web TCP
110 POP-3 Remote e-mail access TCP
119 NNTP Usenet news TCP
Simple Network Management
161 SNMP UDP
Protocol
89
Registered Ports (1024 to 49151): There are application processes
or software that usually require network access to programs you
want to run on the device (e.g. games and messaging services). They
can be used in the same way as dynamic ports, if not allocated to a
specific installed application.

Private or Dynamic ports (49152 to 65535): They are dynamically


assigned to the client. They are also called as ephemeral ports as
they are lost as soon as the application or process to which it is
assigned is closed.

Figure 5.4: Socket Address

The pairing of the Transportation layer port number and the


IP address of the network layer assigned to the host defines a
particular process on a specific host computer and is called a socket.
The word socket refers to the special IP address and port number
combination. A socket pair composed of IP addresses and ports of
the source and destination addresses is also unique and defines a
dialog between the two hosts.

5.5 MULTIPLEXING AND DEMULTIPLEXING

Multiplexing and demultiplexing of transportation layer


means that the network layer host-to-host supply service is
generalized to a process-to-process distribution service for hosts-
operating systems. Both data networks are subject to a multiplexing-
demultiplexing operation.

The transmission layer on the destination host receives


fragments from the lower network layer. In these segments, the
transport layer is responsible for supplying data to the host for the
applications process.

Let's look at a case in point. Consider the figure 5.5. Two web
host clients, Yajat and Kkomal are connecting to same HTTP web-
server at Port 80. Yajat runs two tabs to connect to web server. Two
ephemeral port numbers 7533 and 7530 are assigned to each.
Transport layer at his system, multiplex the two segments and sends
to network layer. At server side, transport layer de-multiplexes the
90
segments received from Yajat’s process and Kkomal’s process and
delivers to the appropriate processes. A socket pair, consisting of the
source and destination IP addresses and port numbers, is also unique
and identifies the conversation between the two hosts. Therefore, the
communication with socket address1: Yajat m/c IP + 7533 and with
socket address2 Yajat m/c IP +7530 is different and there is no clash
of information while processing received response at Yajat’s
machine by transport layer.

Figure 5.5 Multiplexing and De-multiplexing at Transport Layer

5.6 PRINCIPLES OF RELIABLE DATA TRANSFER

The service on the transportation layer may be reliable or not.


If the application layer program requires reliability, we use a
protocol for a stable transport layer by introducing transport layer
flow and error controls. This service is slower and more detailed.
Where the software does not need reliability because of its own flow
and error control system or because it does not need error and flow
control, it uses an inefficient protocol. (Realtime Application) The
trust of two nodes is between the data link layer. The network layer
is untrustworthy and makes full effort possible to deliver packets. To
achieve reliability between two ends, we must enforce reliability on
the transport layer. UDP (User Datagram Protocol) of the transport
layer provides connectionless, unreliable service and TCP
(Transmission Control Protocol) provides connection-oriented,
reliable service.

5.6.1 Introduction to UDP


UDP is a protocol used primarily to create low latency and
loss-tolerant links between Internet applications. UDP is called a
91
connectionless Protocol because before any data transmission occurs
it does not need a virtual circuit to be built. The communications
protocol only transfers packets, meaning that the overhead and delay
are considerably lower. As a consequence, UDP is useful for time
sensitive communication, such as Internet Protocol Voice (VoIP),
Domain Name System (DNS) and video or audio playback.

Figure 5.6 UDP Segment

UDP packets are called as user datagrams, which contain the


fixed-size header of 8-bytes.

Source Port Number: Source Port Number is 16 bit long and is


running on the source host. If the source host is a client and sends a
message, the port number is dynamic, which is demanded by the
process and only acknowledged by the UDP program. If the source
host is a server (a server that sends a reply), the port number is well-
known or registered.

Destination Port Number: Destination Port Number is 16 bit long


and is running on the destination host. If the destination host is a
client and sends a message (reply), the port number is dynamic,
which is demanded by the process and only acknowledged by the
UDP program. If the destination host is a server (a server that sends
a reply), the port number is well-known or registered.

Total Length: This is the total length of the user datagram and it is
16 bit (0 to 65535 bytes) long. A UDP user datagram can be stored
in an IP datagram with a length of 65535 bytes.
UDP segment total length = IP length – IP header’s length.
Checksum: Checksum is used to detect the errors in the whole user
datagram (Data + header).
Some of the well known ports are given in table 5.2.

5.6.2 Introduction to TCP


TCP is connection-oriented, end-to-end reliable protocol
and a connection between the client and the server is formed before
the data can be transmitted. The server must listen (passively open)
92
to clients' link requests before a connection is created. Three-way
handshake (actively open), retransmission, and error-detection adds
stability but lengthens latency. TCP is a stable protocol, following
the flow and error management process. It also supports the
recognition function, which tracks the state and the sound arrival of
the results.

Table 5.2 UDP Ports

TCP Segment

Figure 5.7 TCP Segment


93
Source Port Number: Source Port Number is 16 bit long and is
running on the source host. If the source host is a client and sends a
message, the port number is dynamic, which is demanded by the
process and only acknowledged by the UDP program. If the source
host is a server (a server that sends a reply), the port number is well-
known or registered.

Destination Port Number: Destination Port Number is 16 bit long


and is running on the destination host. If the destination host is a
client and sends a message (reply), the port number is dynamic,
which is demanded by the process and only acknowledged by the
UDP program. If the destination host is a server (a server that sends
a reply), the port number is well-known or registered.

Sequence Number: This field contains the sequence number of data


bytes in a particular session.

Acknowledgement Number: When the ACK flag is set, then this


contains the next sequence number of the data byte and works as an
acknowledgment for the previous data received.

Header Length: It specifies the length of the header indicated by the


4-byte words in the header. The size of the header lies between 20
and 60 bytes. Therefore, the value of this field would lie between 5
and 15.

Reserved: It is a 4-bit field reserved for future use, and by default,


all are set to zero.

Flags: There are six control bits or flags:

URG: It represents an urgent pointer. If it is set, then the data is


processed urgently.

ACK: If the ACK is set to 0, then it means that the data packet does
not contain an acknowledgment.

PSH: If this field is set, then it requests the receiving device to push
the data to the receiving application without buffering it.

RST: If it is set, then it requests to restart a connection.


SYN: It is used to establish a connection between the hosts.
FIN: It is used to release a connection, and no further data exchange
will happen.
94
Window size: It is a 16-bit field. It contains the number of bytes that
the receiver can accept. This field is used for the flow control
between the sender and receiver and also determines the amount of
buffer allocated by the receiver for a segment. The value of this field
is determined by the receiver.

Checksum: It is a 16-bit field. This field is optional in UDP, but in


the case of TCP/IP, this field is mandatory.16-bit CRC (Cyclic
Redundancy Check) over header and data.

Urgent pointer: It is a pointer that points to the urgent data byte if


the URG flag is set to 1. It defines a value that will be added to the
sequence number to get the sequence number of the last urgent byte.

Options: It provides additional options. The optional field is


represented in 32-bits. If this field contains the data less than 32-bit,
then padding is required to obtain the remaining bits.

TCP Connection Establishment using three-way handshaking


TCP is connected-oriented, and a connection between the client and
the server is formed before data can be transmitted. To establish a
reliable connection, TCP uses a three-way handshake. The
connection is full duplex, and the two sides synchronize (SYN) and
accept (ACK) each other.

Figure 5.7 TCP Connection Establishment

Consider figure 5.7. A connection between the client and the


server is formed before data can be transmitted. To establish a
reliable connection, server must be in listening mode that is
95
passively open. Client initiates connection by sending the TCP
segment with sequence number 2020 and SYN flag is set. Server
TCP replies with segment containing its own segment number and
acknowledging the segment received stating acknowledgement
number as 2021 with ACK and SYN flag set. It also announces its
receiver window as 3000 indicating it can at most accept 3000 bytes
in a segment. The client in response to this, sends ACK segment,
containing same sequence number 2020 and acknowledging stating
acknowledgement number as 7001.The client announces its
receiving capacity as 5000 bytes.

TCP Connection termination using three-way handshaking

TCP terminates the connection by a 3-way handshake, when


host TCP who initiates termination sends a FIN and the other host
TCP replies with a FIN & ACK and then initiator host replies with
an ACK. This is perhaps the most common method as depicted in
figure 5.8. FIN and ACK consumes one sequence number if it does
not carry any data.

Figure 5.8 TCP Connection Termination

TCP Connection termination half close


In TCP half close, one end stops sending data while still
receiving data. Normally it is initiated by client. It can occur when
the server needs all data before processing can begin. Figure 5.9
depicts TCP half close. Consider sorting example where the client,
after sending all data to be sorted, can close the connection in the
outbound direction.
96
However, the inbound direction must remain open to receive
the sorted data.

Figure 5.9 TCP Half Close

5.6.3 Flow Control in TCP


TCP uses an end-to-end flow control protocol to avoid having
the sender send data too fast for the TCP receiver. It uses sliding
window protocol for this. In each TCP segment, the receiver
specifies in the receive window field the amount of additionally
received data that it is willing to buffer for the connection. The size
of the window is determined by the lesser of two values: rwnd
(number of bytes the receiver can accept before its buffer overflows)
or cwnd (value determined by the network to avoid congestion). A
receiver can control the data which is sent by the user. This action is
taken to prevent the data crash at the receiver's end. TCP uses byte-
oriented flow control, according to numbering system.

To perform its operation smoothly, most TCP implementations


use at least four timers as shown in figure 5.10.
97

Figure 5.10 Timers in TCP

Retransmission Time out (RTO) is mainly utilised for error control.

Persistence Timer: When acknowledgment with non-zero window


size after zero window size is lost, to correct deadlock, TCP uses a
persistence timer for each connection. When the sending TCP
receives an acknowledgment with a window size of zero, the
persistence timer is started. When persistence timer goes off, the
sending TCP sends a special segment called a probe. The probe
alerts the receiving TCP that the acknowledgment was lost and
should be resent. If a response is not received, the sender continues
sending the probe segments and doubling, and resetting the value of
the persistence timer until the value reaches a threshold (usually 60
seconds). After that sender sends one probe segment every 60s until
the window is reopened

Keepalive Timer: Used to prevent a long idle connection between


two TCPs. Each time the server hears from a client, it resets this
timer. Time-out is usually 2 hours. After 2 hours, sending 10 probes
to client (each 75 secs), then terminates connection
TIME-WAIT Timer: The time-wait timer is used during
connection termination.

5.6.4 Error Control in TCP


Error control in TCP is finding out corrupted segments,
missing segments, out-of-order segments and duplicated segments.
Each segment includes a check-sum field that is used to locate the
corrupted segment. If the segment is corrupted, the segment is
discarded by the destination TCP and is deemed missing. TCP has
another method called an acknowledgment to validate that the data
segments have been delivered. Control segments that do not contain
data yet have sequence number would also be acknowledged, but
ACK segments are not acknowledged. If a segment is lost,
postponed transmission to the receiver, corrupted when it is
examined by the receiver, the segment is retransmitted. Segments are
retransmitted only at two events: when the sender receives three
duplicate acknowledgements (ACKs) or when the retransmission
timer expires.
98

5.7 CONGESTION CONTROL

Congestion in a network may occur if the load on the network


is greater than the capacity of the network. Congestion is a condition
where too many outlets want to transmit data over a network, and the
buffers tend to flood due to packet loss. As a consequence of the
retransmission of packets from the source, the congestion is further
rising. Congestion control refers to the mechanism and techniques to
control the congestion and keep the load below the capacity.
Congestion control mechanisms refers to techniques and
mechanisms that can either prevent congestion, before it happens, or
remove congestion, after it has happened.

Figure 5.11 Network performance: Delay versus Load

Figure 5.11 depicts the network performance. Till the


network is performing within capacity, the delay is less. But as the
network starts getting overloaded, the congestion occurs and the
delay increases due to loss of packets and retransmission.

Figure 5.12 Network performance: Throughput versus Load


99
Figure 5.12 depicts the network performance with respect to
throughput. Till the network is performing within capacity, the
throughput is high. But as the network starts getting overloaded, the
congestion occurs and the through put decreases due to loss of
packets and retransmission.

5.8 TCP’S CONGESTION CONTROL

The Transport layer provides Congestion Control in different


ways. It uses open loop congestion control to prevent the congestion
and closed loop congestion control to remove the congestion in a
network once it occurred. TCP provides AIMD- additive increase
multiplicative decrease technique for congestion control.

Sender must send data according to The size of the window is


determined by the lesser of two values: rwnd (number of bytes the
receiver can accept before its buffer overflows)or cwnd (value
determined by the network to avoid congestion). TCP’s general
policy for handling congestion consists of following three phases-

1. Slow start algorithm


Slow start algorithm is used to control the congestion in TCP.
In this algorithm, the size of window grows exponentially till the
timeout occurs or the receiver's window is reached to the maximum
threshold (64 kb = 65535 bytes). It follows Slow start: exponential
increase technique. Initially, MSS (max. segment size) = 1
segment.

Figure 5.13 TCP Congestion Control: Slow start exponential


increase
100
Example:
Suppose that, the sender starts with congestion window =
0
2 = 1 MSS (Maximum Segment Size, each segment consists of
1byte). After receiving acknowledgement for segment 1, the size of
window can be increased by one. Thus, the total size of congestion
window = 21 = 2. When all the segments are acknowledged, the total
size of congestion window = 23 = 8.

2. Congestion avoidance algorithm


In slow start algorithm, the size of the congestion window
increases exponentially. To avoid the congestion before it happens,
it is necessary to slow down the exponential growth. The
Congestion avoidance algorithm works with an additive increase
instead of the exponential growth. In this algorithm, after receiving
each acknowledgement receipt (for one round), the size of the
congestion window can be increased by one.

Figure 5.14 TCP Congestion Avoidance: Additive Increase

Start with, Congestion window = 1

By adding 1, congestion window = 1 + 1 = 2

3. Congestion detection algorithm


If the congestion occurs, it is required to decrease the
congestion window size. There are two conditions in which
congestion may occur: the connection time out and the reception of
101
three acknowledgements. In both cases, the threshold size can be
dropped to one half of the previous window size.

Figure5.15 TCP Congestion Detection

Example: Consider Figure 5.16


Assume that the window size = 64 and threshold is set to 32.

In slow start algorithm, the window size starts from window


size = 1, and then grows exponentially.

Thereafter, when it reaches to threshold value, the congestion


avoidance method allows the window size to increase linearly (by
adding 1). However, the connection time-out occurs and the window
size = 36. At this phase, the multiplicative decrease method is
applied to the window size 36/2 = 18 (new threshold). Again, TCP
starts working with slow start algorithm and the transmission is
carried out.

Figure5.16 TCP Congestion Detection Algorithm Working


102

5.9 SUMMARY

In this chapter, we have looked at the transport layer in the


OSI model. We have discussed some of its functions as well as the
protocols TCP and UPD of transport layer. We have also discussed
the role of ports in addressing different communication streams
from the application layers. Various services of TCP such as end-to-
end communication, Port addressing, error control, flow control and
congestion control were focus of this chapter. We studied how TCP
provides reliable data transmission using handshake connection
establishment, data transfer and retransmission if required and
proper connection termination. In the next chapter, we will discuss
quality of service, queue analysis, queue management algorithms,
feedback, and resource reservation mechanism of transport layer.


103

Unit-6
QUALITY OF SERVICE
Unit Structure :

6.1 Objectives,
6.2 Introduction,
6.2.1 Flow Characteristics
6.2.2 Flow Classes
6.3 Queue Analysis
6.4 QoS Mechanisms
6.5 Queue management Algorithms
6.6 Feedback,
6.7 Resource
6.8 Reservation
6.9 Summary
6.10 Reference for further reading
6.11 Unit End Exercises

6.1 OBJECTIVES

a. To learn different techniques to improve quality of service


(QoS).
b. To help learners get a grounding of basic network components
and architecture.
c. To explore basic networking models.
d. To learn the way protocols are used in networks and their design
issues.

6.2 INTRODUCTION

Quality of Service and congestion control both are


interrelated. That basically means, if we are able to improve any one
of them then it automatically improves the other one. In simple
words, if we try to avoid the congestion, we are indirectly helping in
improving the quality of service. The quality of service term is not
only present in one single layer, but also present in other layers.
104
QoS and congestion is a major factor in total three layers namely :
● Data link layer
● Network Layer
● Transport Layer

QoS can be applied to both textual data and multimedia


content, Quality of services is something a flow seeks to attain.

6.2.1 Flow Characteristics

Fig. 6.1 Types of Flow Characteristics.

1. Reliability is a characteristic that a flow needs. Absence of


authenticity means losing a packet or acknowledgment, which
entails retransmission. For example, electronic mail, file transfer,
and Internet access have reliable transmissions. It is more important
than telephony or audio conferencing.

2. Delay, sending bits from source to destination delay is another


flow characteristic. Again applications can tolerate delay in different
degrees. In this characteristic, telephony, audio conferencing, video
conferencing, and remote log-in need minimum delay, while delay in
file transfer or e-mail is less important.

3. Jitter is the disparity in delay for packets belonging to the same


flow.

4. Bandwidth Different applications need different bandwidths.


Video meetings need to send millions of bits per second to refresh a
color screen while the total number of bits in an email may not reach
even a million.

6.2.2 Flow Classes


In the flow characteristics, It classifies flows into groups, with
each group having similar levels of characteristics. This
categorization is not formal or universal; some protocols such as
Asynchronous Transfer Mode (ATM) have defined classes.
105

6.3 QUEUE ANALYSIS

In Queue analysis, the flow of packets in queue processing


through different techniques. The packets arrive at a switch from
different flows or routers for processing. A good scheduling
technique handles the different flows in a fair and appropriate
manner. Scheduling techniques are intentional to improve the quality
of service.

Scheduling techniques:
1. FIFO queuing,
2. priority queuing, and
3. Weighted fair queuing.

1. FIFO Queuing
In FIFO queuing, packets reside in a buffer or queue until the
node (router or switch) is ready to process them. If the arrival rate of
a packet is more than the processing rate, the queue will fill up and
new packets will be thrown away. A FIFO queue is close to those,
for example who have had to wait for a bus at a bus stop. Figure 2
shows a conceptual view of a FIFO queue.

Fig. 6.2 FIFO Queuing

2. Priority Queuing
In priority queuing, first packets are allocated to a priority
class. Every priority class has its own queue system. The packets
belonging to the highest priority queue are processed first. Packets in
the lowest-priority queue are processed last. the system continues to
serve a queue until it is empty. Figure 3 shows priority queuing with
two priority levels. Priority queuing is non-preemptive. This
technique lead to complete starvation of low-priority traffic, but only
if the high-priority traffic consumes 100% of the outbound
bandwidth.
106

Fig. 6.3 Priority Queuing

A priority queue supplies better quality of service than the


FIFO queuing because higher priority traffic, such as multimedia,
can reach the destination with less delay. There is a potential
drawback in this queuing. If there is an uninterrupted flow of packets
in a high priority queue, the packets in the lower priority queues will
never get a possibility to be processed. This situation is called
starvation.

3. Weighted Fair Queuing


Weighted fair queuing is the finest scheduling method. In this
method, the packets are allocated to different classes or groups and
acknowledged to different queues. The queues are weighted based
on the priority of the queues, higher the priority means a more the
weight. The system processes packets in each queue in a round robin
fashion with the number of packets selected from each queue based
on the weight. For e.g. bandwidth percentages of 10%, 30% and
60% to three different units. If all three sub queues are active, each
gets the listed like percentage. If the 60% sub queue is idle, then the
others get 25% and 75% respectively, preserving the 1:3 ratios of
their allocations to units. Figure 4 shows the technique with three
classes.

Fig. 6.4 Weighted Fair Queuing


107

6.4 QoS MECHANISMS

QoS mechanisms manage quality of data traffic and maintain


the QoS requirements specified. These mechanisms come under
specific categories depending on the roles they play in managing the
network.

● Classification and marking tools transform between


applications and sort packets into different traffic types.
Classification and marking are implemented on routers, switches
and access points.

● Congestion management tools use packet classification and


marking to find which queue to place the packets in. Congestion
management tools include priority queuing; first-in, first-out; and
low-latency queuing mechanism.

● Congestion avoidance tools observing the network traffic for


congestion and will drop low-priority packets when congestion
happens.

● Shaping tools operate traffic come in the network and prioritize


real-time applications over less time-sensitive applications such
as email and messaging. Traffic shaping tools comprise buffers,
Generic Traffic Shaping and Frame Relay Traffic Shaping.

● Link efficiency tools maximize bandwidth use and minimize


delay for packets accessing the network. While not exclusively
for QoS, link efficiency tools are used in co-occurrence with
other QoS mechanisms. Link efficiency tools add Real Time
Transport Protocol header compression, Transmission Control
Protocol header compression and link compression.

6.5 QUEUE MANAGEMENT ALGORITHMS

In queue management algorithms, there are two techniques


which can shape the traffic: leaky bucket and token bucket.

6.5.1 Traffic Shaping


Traffic shaping is a method for adjusting the average rate and
burstiness of a flow of data that enters the network. The aim is to
allow applications to transmit a wide variety of traffic. This has a
simple and useful way to describe the possible traffic patterns to the
network. When a flow is set up, the customer and the provider agree
on a certain traffic shape for that flow.
108
6.5.2 Leaky Bucket
 If a bucket has a small hole at the bottom, the water escapes from
the bucket at a constant rate.
 The rate at which the water escapes does not depend on the rate
at which the water is added to the bucket unless the bucket is
vacant.
 The input rate can different, but the output rate remains constant.
In addition, in networking, a technique called leaky bucket can
smooth out bursty traffic.
 Bursty blocks are stored in the bucket and sent out at an average
rate. Figure 5 shows a leaky bucket and its effects.
 In the figure, the network has carried out a bandwidth of 3 Mbps
for a host.
 The leaky bucket forms the incoming traffic to make it conform
to this commitment.
 The host transfers a burst of data at a rate of 12 Mbps for 2 s, for
a total of 24 Mbits of data. The host sleeps for 5 s and then sends
data at a rate of 2 Mbps for 3 s, for a total of 6 Mbits of data. the
host has transferred 30 Mbits of data in 10 s.
 The leaky bucket makes the traffic simpler by sending out data at
a rate of 3 Mbps during the same 10 s. Without the leaky bucket,
the network consumes more bandwidth than is set aside for this
host. a leaky bucket prevents congestion.

Fig. 6.5 Leaky Bucket


109
A leaky bucket implementation is shown in Figure 6. A FIFO
queue carries the data packets. If the traffic consists of stable size
packets, the process removes a fixed number of packets from the
queue at each tick of the clock. If the traffic consists of changeable
length packets, the fixed output rate must be based on the number of
bytes or bits.

Fig. 6.6 Leaky Bucket Algorithm

The algorithm for variable length packets:


1. Initialization of a counter to n at the tick of the clock.
2. If n is greater than the packet size, send the packet and decrement
the counter by the packet size. Repeat this step until n is smaller
than the packet size.
3. Reset the counter and go to step 1.

A leaky bucket algorithm shapes bursty traffic into fixed rate


traffic by mean the data rate. It will drop the packets if the bucket is
full.

6.5.3 Token Bucket


 The token bucket algorithm permits the idle hosts to gather credit
for the future in the form of tokens. For each tick of the clock,
the system sends a n number of tokens to the bucket.

 The system removes one token at a time for every cell of data
sent to the network. For example, if n is 50 and the host is idle
for 50 ticks, the bucket collects 2500 tokens. Now the host can
consume all these tokens in one tick with 2500 cells.

 The host can send bursty data as long as the bucket is not empty.
110

Fig 7. Token Bucket

 The token bucket is implemented with a counter.


 The token is initialized to zero. Every time a token is added, the
counter is incremented by 1. Every time a unit of data is sent, the
counter is decremented by 1.
 When the counter is zero, the host stops sending data. The token
bucket allows divide/split the traffic at a regulated maximum
rate.

6.6 FEEDBACK, RESOURCE & RESERVATION

Reservations
 Using reservation congestion is avoided and also to provide
confident service to applications is called a reservation scheme.
 This scheme is an integral part of ATM networks. When a logical
connection is established between user and network, the network
and the user comes inside a traffic contract, which states a data
rate and other characteristics of the traffic flow.
 The network agrees to give a defined QoS so long as the traffic
flow is within contract parameters; surplus traffic is either
discarded or managed on a best-effort basis, subject to discard.
 If the current outstanding reservations are such that the network
resources are insufficient to meet the new reservation, then the
new reservation is contradictory.
 One feature of a reservation scheme is traffic policing. A
node in the network, generally the node to which the end
system attaches, monitors the traffic flow and compares it to the
traffic contract.
111

 Excess traffic is either discarded or marked to indicate that it is


responsible to discard or delay

Resource Reservation
 A flow of data needs resources such as a buffer, bandwidth, CPU
time, and so on.
 The quality of service is improved if these resources are reserved
in advance.

Admission Control
 Admission control refers to the equipment used by a router, or a
switch, to accept or reject a flow based on pre-decided
parameters called flow specifications.

 Prior to a router accepting a flow for processing, it checks the


flow specifications to see if its capacity of bandwidth, buffer
size, CPU speed, etc.

6.6.1 Integrated Services & Differentiated Services


These two models are designed to provide quality of service
on the Internet:
1. Integrated Services.
2. Differentiated Services.
 Both models indicate the use of quality of service at the network
layer (IP), although the model can also be used in other layers
such as the data link.
 IP was originally designed for best-effort delivery.
 This provides that every user accepts the same level of services.
 This type of delivery does not provide assurance of the minimum
of a service, such as bandwidth, to applications such as real-time
audio and video.
 If such an application accidentally gets extra bandwidth, it may
be harmful to other applications, resulting in congestion.

1. Integrated Services,

 Occasionally called IntServ, is a flow-based QoS model, which


means that a user needs to create a flow, a type of virtual circuit,
from the source to the destination and inform all routers regarding
the requirement of resource.
112
Signaling
 The IP is a connectionless, datagram, packet-switching protocol.
 This can implement a flow-based model over a connectionless
protocol.
 The signaling protocol to run over IP that provides the signaling
mechanism for creating a reservation scheme.
 This protocol is called Resource Reservation Protocol (RSVP).

Flow Specification
When a source makes a reservation, it is required to explain a
flow specification. A flow specification has two parts:

1. Rspec (resource specification)


Rspec defines the resource that the flow needs to reserve like
buffer, bandwidth, etc.

2. Tspec (traffic specification).


Tspec defines the traffic characterization of the flow.

Admission
When a router receives the flow specification from an
application, the router decides to acknowledge or deny the service.
The decision is based on the previous dedication of the router and
the current availability of the resource.

Service Classes
Two classes of services have been defined for Integrated
Services: guaranteed service and controlled-load service.

1. Guaranteed Service Class


 This type of service is a used or plan for real-time traffic that
needs a guaranteed minimum end-to-end delay.
 The end-to-end delay in this class is the sum of the delays in the
routers, the propagation delay in the media, and the setup
mechanism.
 This type of service assures that the packets will arrive within a
certain period of time and are not discarded if flow traffic stays
within the border line of TSpec.
 Guaranteed services are a quantitative service, in which the
amount of end-to-end delay and the data rate must be defined by
the application.
113
2. Controlled-Load Service Class
 This type of service is a plan for applications that can accept
some amount of delays, but are perceptive to an overburdened
network and to the danger of losing packets.
 The best examples of these types of applications are file transfer,
e-mail, and Internet access.

RSVP
 Integrated Services model, an application program needs a
resource reservation scheme. The resource reservation is used for
a flow.
 IntServ will be used at the IP level, for that requires creating a
flow, a kind of virtual-circuit network, out of the IP, which was
originally designed as a datagram packet-switched network.
 A VC network needs a signaling system to set up the virtual
circuit before data traffic can start.
 The Resource Reservation Protocol (RSVP) is a signaling
protocol to help IP create a flow and in consequence make a
resource reservation.

1. Features of RSVP
 RSVP is a receiver oriented signaling protocol. The receiver
initiates and maintains resource reservation.
 It is used both for sending data from one source to one
destination and sending data simultaneously to a group of
destination computers.
 RSVP supports dynamic automatic adaptation to changes in
network.
 It provides a number of reservation styles. It also provides
support for addition of future styles.

2. RSVP Messages
There are two types of RSVP messages
a. Path Messages: A path message is sent by the sender to all
receivers by multicasting storing the path state at each node in its
path. It stores the necessary information so that the receivers can
make the reservation.
114
b. Reservation messages: The resv message is sent by the receiver
to the sender along the reverse path of the path message. It
identifies the resources that is requires by the data flow.

2. Differentiated Services
 Differentiated Services is a class-based QoS model designed for
IP.
 Differentiated Services was introduced by the IETF (Internet
Engineering Task Force) to handle the shortcomings of
Integrated Services.
 Two fundamental changes were made:

1. The main processing was going from the core of the network to
the edge of the network. This solves the scalability problem. The
routers do not store the information about flows. The applications, or
hosts, define the type of service they need to send a packet each
time.

2. The flow service is changed to class service. The router routes


the packet through a network based on the class of service defined in
the packet, and not the flow. This resolves the service type limitation
problem. This defines different types of classes based on the needs
of applications.

DS Field
 In Diffserv, each packet consists of a field called the DS field.
 The value of this field is set at the perimeter of the network by
the host or the first router appointed as the boundary router.
 IETF proposes to replace the existing TOS (type of service) field
in IPv4 or the class field in IPv6 by the DS field, as shown in
Figure 8.

Fig 8. DS field

The DS field contains two subfields:


1. DSCP
2. CU.
115

 The Differentiated Services Code Point is a 6-bit subfield that


explains the per-hop behavior.
 The 2-bit CU subfield is not currently used.
 The Diffserv capable router uses the DSCP 6 bits as an index to a
table defining the packet-handling mechanism for the current
packet being processed.

Traffic Conditioner
To implement Diffserv, the DS node uses traffic conditioners
such as meters, markers, shapers, and droppers, as shown in
Figure 9.

 Meters The meter examines to see if the incoming flow matches


the arranged traffic profile. The meter sends this output to other
elements. The meter can use various tools such as a token bucket
to check the profile.

 Marker A marker can comment on a packet that is using best-


effort delivery or down-mark a packet based on information
received from the meter. Down marking is called lowering the
class of the flow occurs if the flow does not equal with the
profile. A marker does not encourage the class.

 Shaper A shaper uses the information received from the meter to


reshape the traffic if it is not manageable with the negotiated
profile.

 Dropper A dropper, which works as a shaper with no buffer,


discards packets if the flow badly violates the negotiated profile.

Fig. 9 Traffic Conditioner


116

6.9 SUMMARY

1. A flow can be characterized by its reliability, delay, jitter, and


bandwidth. Scheduling, traffic shaping, resource reservation, and
admission control are techniques to improve quality of service
(QoS).
2. Integrated Services is a flow-based QoS model designed for IP.
The Resource Reservation Protocol (RSVP) is a signaling
protocol that helps IP create a flow and makes a resource
reservation. Differential Services is a class-based QoS
modeldesigned for IP.
3. Scheduling, traffic shaping, resource reservation, and admission
control are techniques to improve quality of service (Qos).
4. FIFO queuing, priority queuing and weighted fair queuing are
scheduling techniques.
5. Leaky bucket and token bucket are traffic shaping techniques.
6. Integrated services are a flow-based Qos model designed for IP.
7. The Resource Reservation Protocol (RSVP) is a signaling
protocol that helps IP create a flow and makes a resource
reservation.
8. Differential Services is a class-based QoS model designed for IP.

6.10 REFERENCE FOR FURTHER READING

1. Data Communication and Networking, B. A. Forouzan, Fourth


Edition, McGraw Hill.
2. TCP/IP Protocol Suite, B. A. Forouzan, Third Edition, Tata
McGraw Hill edition
3. https://www.tutorialspoint.com

6.11 UNIT END EXERCISES

1. What are four general techniques to improve quality of service?


2. What is trafficking shaping? Name two methods to shape traffic.
3. What is the major difference between integrated services and
differential Services?
4. How is resource reservation protocol related to integrated
services?
5. What attribute can be used to describe the flow of data?


117

Unit-7
NETWORK LAYER - ROUTING
Unit Structure :

7.1 Objectives,
7.2 Introduction,
7.3 Network Service Model
7.4 Datagram & Virtual Circuit
7.5 Routing Principles
7.6 The Internet Protocol
7.7 IPv4 & IPv6
7.8 IP addressing and subnetting
7.9 Routing Algorithms
7.10 Hierarchical Routing,
7.11 Summary
7.12 Reference for further reading
7.13 Unit End Exercises

7.1 OBJECTIVES

● To understand the network layer implements the host to-host


Communication service.
● To understand the overview of the network layer and the services
it can provide
● To examine the examine two broad approaches towards
structuring network-layer packet delivery the datagram and the
virtual-circuit model
● To understand the fundamental role that addressing plays in
delivering a packet to its destination host.
● To Learn an important distinction between the forwarding and
routing functions of the network layer

7.2 INTRODUCTION

The network layer is complex layers in the protocol stack.


This layer provides an overview of the network layer and the
different services. The network layer examines the two broad
118
approaches towards structuring network-layer packet delivery: the
datagram and the virtual-circuit model and the fundamental role that
addressing plays in delivering a packet to its destination host.

Network layer is a crucial distinction between the forwarding


and routing functions of the network layer. Forwarding involves the
transfer of a packet from an incoming link to an outgoing link within
one router. Routing involves all of a network’s routers, whose
collective interactions via routing protocols determine the paths that
packets combat their trips from source to destination node.

7.3 NETWORK SERVICE MODEL

● When the transport layer at a sending host transmits a packet into


the network (that is, passes it right down to the network layer at
the sending host),
● The answers to following questions et al. are obtained by the
service model provided by the network layer.
1. Can the transport layer believe the network layer to deliver
the packet to the destination?
2. When multiple packets are sent, will they be delivered to the
transport layer within the receiving host within the order
during which they were sent?
3. Will the quantity of your time between the sending of two
sequential packet transmissions be an equivalent because of
the amount of your time between their receptions?
4. Will the network provide any feedback about congestion
within the network? What's the abstract view (properties) of
the channel connecting the transport layer within the sending
and receiving hosts?
● The network service model explains the characteristics of end-to-
end transport of packets between sending and receiving systems.

In the sending host, when the transport layer move a packet to


the network layer, specific services that could be provided by the
network layer include:

● Guaranteed delivery.
This service guarantees that the packet will ultimately arrive
at its destination.
119
● Guaranteed delivery with bounded delay.
This service not only guarantees delivery of the packet, but
also delivery within a specified delay bound, for example, within
100 msec.

The following is a list of services provided to a flow of


packets between a source and destination:

● In-order packet delivery.


This service gives assurance that packets arrive at the
destination in the order that they were sent.

● Guaranteed minimum bandwidth.


This network-layer service emulates the behavior of a
transmission link of a specified bit rate between sending and
receiving hosts.

● Guaranteed maximum jitter.


This service gives assurance that the amount of time between
the transmissions of two successive packets at the sender is equal to
the amount of time between their receipts at the destination.

● Security services.
Using a secret session key known only by a source and destination
end system, the network layer in the source host could encrypt the
capacity of all datagrams being sent to the destination host.

Two important ATM service models:


● Constant bit rate (CBR) ATM network service.
1. CBR service for bear real-time, constant bit rate audio and
video traffic.
2. The aim of CBR service is conceptually simple to supply a
flow of packets with a virtual pipe whose properties are
equivalent as if a committed fixed-bandwidth transmission
link existed between sending and receiving hosts.
3. A flow of ATM cells is carried across the network in such a
way that a cell’s end-to-end delay, the variability during a
cell’s end-to-end delay, and therefore the selection of cells
that are lost or delivered late are all bound to be but specified
values.
120
● Available bit rate (ABR) ATM network service.
1. This service is additionally called best-effort service; ATM’s
ABR might best be characterized as being a slightly-better-
than-best-effort service.
2. As with the web service model, cells could also be lost under
ABR service. Unlike within the Internet, however, cells can't
be reordered (although they'll be lost), and a minimum cell
transmission rate (MCR) is bound to a connection using ABR
service.
3. If the network has enough free resources at a given time, a
sender can also be ready to send cells successfully at a better
rate than the MCR.

7.4 DATAGRAM & VIRTUAL CIRCUIT

● A network layer provides connectionless service or connection


service between two hosts.
● This is parallel transport-layer connection-oriented and
connectionless services. For example, a network layer connection
service starts with handshaking between the source and
destination hosts; and a network-layer connectionless service
does not have any handshaking introductory.
● The network-layer connection and connectionless services have
some parallels with transport-layer connection-oriented and
connectionless services, there are key differences:

1. In the network layer, services are host-to-host services


provided by the network layer for the transport layer. In the
transport layer services are process to process services
provided by the transport layer for the application layer.
2. The network layer provides either a host-to-host
connectionless service or a host-to-host connection service,
but not both.
3. Computer networks that provide only a connection service at
the network layer are called virtual-circuit (VC) networks;
computer networks that provide only a connectionless service
at the network layer are called datagram networks.
4. The implementations of connection-oriented service in the
transport layer and the connection service in the network
layer are fundamentally different.
121
Virtual-Circuit Networks
A virtual circuit (VC) is a means of transporting data over a
packet-switched network in such a way that it appears as though
there is a dedicated physical link between the source and destination
end systems of this data.

Implementation of VC services in a computer network:


A VC consists of
1. A path between the source and destination,
2. VC numbers, one number for each link along with the Path,
3. Adding in the forwarding table in each router along the path. A
packet belonging to a virtual circuit will carry a VC number in its
header part. Because a virtual circuit may have a different VC
number on each link, each intervening router must replace the
VC number of each traversing packet with a new VC number.
The new VC number is picking up from the forwarding table.

Example, the network shown in Figure 1. The numbers next


to the links of R1 are the link interface numbers. Suppose now that
Host A requests that the network establish a VC between itself and
Host B. Suppose also that the network chooses the path A-R1-R2-B
and assigns VC numbers 12, 22, and 32 to the three links in this path
for this virtual circuit. In this case, when a packet in this VC leaves
Host A, the value in the VC number field in the packet header is 12;
when it leaves R1, the value is 22; and when it leaves R2, the value
is 32.

Fig. 7.1 A simple virtual circuit network

There are three identifiable phases in a virtual circuit:


1. Virtual Circuit setup.
● In this setup phase, the sending transport layer communicates
with the network layer, specifies the receiver’s address, and
waits for the network to set up the VC.
122
● The network layer finds the path between sender and receiver,
that is, the series of links and routers through which all
packets of the VC will route.
● The network layer also finds the VC number for each link
along the path. At last, the network layer adds an entry in the
forwarding table in each router along the path. During setup,
the network layer may also reserve resources along the path
of the VC.

2. Data transfer.
● As shown in Figure 2, once the VC has been set up, packets can
begin to flow together with the VC.

3. VC teardown.
● This begins when the sender or receiver informs the network
layer of its desire to terminate the VC. The network layer informs
the end system on the other side of the network of the call
termination and updates the forwarding tables in each of the packet
routers on the path to specify that the VC no longer exists.

4. The messages that the end systems send into the network to begin
or end a VC, and the messages passed between the routers to set up
the VC are known as signaling messages, and the protocols.

Fig 2 Virtual-circuit setup

Datagram Networks
● In a datagram network, each time an end system needs to send a
packet; it punches the packet with the address of the destination
end system and then sends the packet into the network.
● As shown in Figure 3, there is no VC setup and routers do not
maintain any VC state information.
123
● A packet is transmitted from source to destination; it passes
through a series of different routers. Packet’s destination address
is used to forward the packet to the destination.
● Each router contains a forwarding table that maps destination
addresses to link interfaces; when a packet arrives at the router,
the router uses the packet’s destination address to look up the
appropriate output link interface in the forwarding table.
● The router then purposely forwards the packet to that output link
interface.
● To get some further insight into the lookup operation, let’s look
at a specific example.
\

If all destination addresses are 32 bits. A brute-force


implementation of the forwarding table would have one entry for
every possible destination address.

Fig 3. Datagram network

Router has four links, numbered 0 through 3, and that packets


are to be send on to the link interfaces as follows:

Destination Address Range Link


Interface
11001000 00010111 00010000 00000000
through 0
11001000 00010111 00010111 11111111
11001000 00010111 00011000 00000000
through 1
11001000 00010111 00011000 11111111
11001000 00010111 00011001 00000000
through 2
11001000 00010111 00011111 11111111
Otherwise 3
124
For this example, it is not important to have 4 billion entries in the
routers

Forwarding table. We could, for example, have the following


forwarding table with just four entries:

Prefix Match Link Interface


11001000 00010111 00010 0
11001000 00010111 00011000 1
11001000 00010111 00011 2
otherwise 3

7.5 ROUTING PRINCIPLES

● A Router is a process of selecting a path along which the data can


be transferred from source to the destination. Routing is done by
a special device known as a router.
● A Router function at the network layer in the OSI model and
internet layer in TCP/IP model
● A router is an internet device that forwards the packet based on
the information available in the packet header and forwarding
table.
● The routing algorithms are used for routing the packets. The
routing algorithm is nothing but software responsible for finding
the optimal path through which packets can be transmitted on the
internet.
● The routing protocols use the metric method to find the best path
for the packet delivery. The metric is used for measurement such
as hop count, bandwidth, delay, current load on the path, etc.
used by the routing algorithm to determine the minimum path to
the destination.
● The routing algorithm updates and maintains the routing table for
the process of path determination.

7.6 THE INTERNET PROTOCOL

● Internet Protocol is connectionless and unreliable protocol. It


ensures no guarantee of successful transmission of data.
● In order to make it reliable, it must be paired with reliable
protocols such as TCP at the transport layer.
125
● The function of the internet protocol is to provide addressing to
the hosts, encapsulating the data into a packet structure, and
routing or moving the data from source to the destination across
one or more IP networks.
● In order to achieve these functionalities & objectives, internet
protocol provides two major things which are given below.

An internet protocol defines two things:


● Format of IP packet
● IP Addressing system

Internet protocol transmits the data in form of a datagram as


shown in the following diagram:

Fig 7.4 Format of IP

Version Number
These 4 bits specify the IP protocol version of the datagram.
By looking at the version number, the router can determine how to
interpret the remainder of the IP datagram. Different versions of IP
use different datagram formats. The datagram format for the current
version of IP, IPv4 is shown in the figure 4 above.

Header Length
Because an IPv4 datagram can contain a variable number of
options, these 4 bits are needed to determine where in the IP
datagram the data actually begins. Most IP datagrams do not contain
options, so the typical IP datagram has a 20-byte header.
126
Type of Service
The types of service (TOS) bits were included in the IPv4
header to allow different types of IP datagrams to be distinguished
from each other.

Datagram Length
This is the total length of the IP datagram (header plus data),
measured in bytes. Since this field is 16 bits long, the theoretical
maximum size of the IP datagram is 65,535 bytes. However,
datagrams are rarely larger than 1,500 bytes.

Identifier, Flags, Fragmentation Offset


These three fields have to do with so-called IP fragmentation,
interestingly, the new version of IP, IPv6, does not allow
fragmentation at routers.

Time-to-live
The time-to-live (TTL) field is included to ensure that
datagrams do not circulate forever in the network. This field is
decremented by one each time the datagram is processed by a router.
If the TTL field reaches 0, the datagram must be dropped.

Protocol
This field is used only when an IP datagram reaches its final
destination. The value of this field indicates the specific transport-
layer protocol to which the data portion of this IP datagram should
be passed. For example, a value of 6 indicates that the data portion is
passed to TCP, while a value of 17 indicates that the data is passed
to UDP.

Header Checksum
The header checksum aids a router in detecting bit errors in a
received IP datagram. The header checksum is computed by treating
each 2 bytes in the header as a number and summing these numbers
using 1s and complement arithmetic.

Source and Destination IP Addresses


When a source creates a datagram, it inserts its IP address
into the source IP address field and inserts the address of the
ultimate destination into the destination IP address field. Often the
source host determines the destination address via a DNS lookup.

Options
The options fields allow an IP header to be extended. Header
options were meant to be used rarely hence the decision to save
127
overhead by not including the information in options fields in every
datagram header.

Data (Payload)
The data field of the IP datagram contains the transport-layer
segment (TCP or UDP) to be delivered to the destination. However,
the data field can carry other types of data, such as ICMP messages.

7.7 IPV4 & IPV6

IPv4

● A host contains only a single link into the network; when the IP
datagram in the host needs to send a datagram, it is done over the
link.

● The border between the host and the physical link is called an
interface. Because a router’s responsibility is to receive a
datagram on one link and forward the datagram on some other
required link over network, a router necessarily has two or more
links to which it is connected to each other.

● The boundary between the router and any one link is also called
as an interface.

● A router has multiple interfaces, one for each of its links.


Because every host and router is efficient at sending and
receiving IP datagrams, IP requires each host and router interface
to have its own IP address.

● Thus, an IP address is technically coupled with an interface,


rather than with the host or router containing that interface.

Example:

● Each IP address is 32 bits long (equivalently, 4 bytes), and there


are thus a total of 232 possible IP addresses.

● By approximating 210 by 103, it is easy to see that there are


about 4 billion possible IP addresses.

● These addresses are typically written in so-called dotted-decimal


notation, in which each byte of the address is written in its
decimal form and is separated by a period (dot) from other bytes
in the address.
128
Example:
● Consider the IP address 193.36.1216.9. The 193 is the decimal
equivalent of the first 8 bits of the address; the 32 is the decimal
equivalent of the second 8 bits of the address, and so on.
● Thus, the address 193.36.1216.9 in binary notation is
11000001 00100000 11011000 00001001

IPv6

● IPv6 is the newest version of the Internet Protocol, which


identifies devices on the internet so they can be discovered.
● Every device that uses the internet is identified through its own
IP address / physical address in order for internet communication
to work. In that reverence, it’s just like the street addresses and
zip codes you need to know in order to mail a letter.
● The previous version, IPv4, uses a 32-bit addressing scheme to
support 4.3 billion devices, which was thought to be enough.
● The world needed more addresses because of the growth of the
internet, personal computers, smart phones and now the Internet
of Things.

Fig 7.5 IPv6 Message format

Version:
This 4-bit field identifies the IP version number. IPv6 carries
a value of 6 in this field. Note that putting a 4 in this field does not
create a valid IPv4 datagram.

Traffic class:
This 8-bit field is similar in spirit to the TOS field we saw in
IPv4.
129
Flow label:
This 20-bit field is used to identify a flow of Datagrams.

Payload length:
This 16-bit value is treated as an unsigned integer giving the
number of bytes in the IPv6 datagram following the fixed-length, 40-
byte datagram header.

Next header:
This field identifies the protocol to which the contents data
field of this datagram will be delivered (for example, to TCP or
UDP). The field uses the same values as the protocol field in the
IPv4 header.

Hop limit:
The contents of this field are decremented by one by each
router that forwards the datagram. If the hop limit count reaches
zero, the datagram is discarded.

Source and destination addresses:


The various formats of the IPv6 128-bit addresses are
described in RFC 4291.
Data:
This is the payload portion of the IPv6 datagram. When the
datagram reaches its destination, the payload will be removed from
the IP datagram and passed on to the protocol specified in the next
header field.

7.8 IP ADDRESSING AND SUBNETTING

● IP addresses were initially designed with two levels of


addressing. To acquire a host on the Internet, we must first reach
the network and then the host.
● The Internet needs more than two hierarchical levels, for two
reasons.
1. First, a management that was granted a block in class A or B
needed to divide its large network into several sub networks for
better security and management.
2. Second, the blocks in class A and B were almost diminished and
the blocks in class C were smaller than the needs of most
organizations, an organization that has been granted a block in
class A or B could divide the block into smaller subblocks and
share them with other organizations.
130
● The idea of breaking a block to smaller blocks is referred to as
subnetting. In subnetting, a network is divided into a number of
smallersubnetworks (subnets) with each subnetwork having its
own subnetwork address.
● Example
Three-level addressing can be used in the telephone system,
the local part of a telephone number as an exchange and a subscriber
connection:
(626) 358 - 1301
In which 626 is the area code, 358 is the exchange, and 1301
is the subscriber connection.
Class A Subnets
● In Class A, only the first octet is used as Network classifier and
the rest of three octets are used to be assigned to Hosts (i.e.
16777214 Hosts per Network). To make more subnets in Class
A, bits from the Host part are borrowed and the subnet mask is
changed appropriately.
● For example, if one Most Significant Bit is carried off from host
bits of a second octet and added to a Network address, it creates
two Subnets (21=2) with (223-2) 8388606 hosts per subnet.
● The Subnet mask is changed appropriately to reflect subnetting.

Class B Subnets
● In Class B subnet, by default, using Classful Networking, 14 bits
are used as network bits providing (214) 16384 Networks and
(216-2) 65534 Hosts.
● Class B IP Addresses can be subnetted the same way as Class A
addresses, by borrowing bits from Host bits.

Class C Subnets
● Class C IP addresses are normally assigned to a very small size
network because it can only have 254 hosts in a network.

Fig 6. In classful addressing, the address space is divided into five


classes:A, B, C, D, and E.
131
Some values calculated in subnetting :
1. Number of subnets : Given bits for mask – No. of bits in default
mask
2. Subnet address : AND result of subnet mask and the given IP
address
3. Broadcast address : By putting the host bits as 1 and retaining the
network bits as in the IP address
4. Number of hosts per subnet : 2(32 – Given bits for mask) – 2
5. First Host ID : Subnet address + 1 (adding one to the binary
representation of the subnet address)
6. Last Host ID : Subnet address + Number of Hosts

Netid and Hostid


● In classful addressing, an IP address in classes A, B, and C is
divided into netid and hostid.
● These parts are of varying lengths, depending on the class of the
address. Figure 7 shows the netid and hostid bytes.

Fig 7 Netid and hostid

7.9 ROUTING ALGORITHMS

● Routing algorithms are static or dynamic.


● In static routing algorithms, routes change very steadily over
time, often as a result of human intervention.
● Dynamic routing algorithms modify the routing paths as the
network traffic loads or topology change.
● A dynamic algorithm can be run on occasionally or in direct
reaction to topology or link cost changes. While dynamic
algorithms are more reactive to network changes, they are also
more susceptible to problems such as routing loops and
oscillation in routes.
The Link-State (LS) Routing Algorithm
● Link-state algorithm, the network topology and all link costs are
known and this is available as input to the LS algorithm.
132
● This is fulfilled by having each node broadcast link-state packets
to all other nodes in the network, with each link-state packet
containing the identification and costs of its attached links.
● This is often fulfilled by a link-state broadcast algorithm
● The result of the nodes’ broadcast is that all nodes have an exact
and complete view of the network.
● Each node can then run the LS algorithm and calculate the same
set of least-cost routes as every other node.
● The link-state routing algorithm also known as Dijkstra’s
algorithm.
● A closely related and identical algorithm is Prim’s algorithm;
● Dijkstra’s algorithm computes the least-cost or minimum path
from one node to all other nodes in the network.
● Dijkstra’s algorithm is iterative and has the assets that after the
kth iteration of the algorithm, the least-cost paths are known to k
destination nodes, and between the least-cost paths to all
destination nodes, these k paths will have the k smallest costs.
● Let us define the following notation:
1. D(v): cost of the least-cost path from the source node to
destination v as of this iteration of the algorithm.
2. p(v): previous node (neighbor of v) along the current least-cost
path from the source to v.
3. N : subset of nodes; v is in N if the least-cost path from the
source to v is definitively known.

Link-State (LS) Algorithm


1. for Source Node u
2. Initialization:
3. N’ = {u}
4. for all nodes v
5. if v is a neighbor of u
6. then D(v) = c(u,v)
7. else D(v) = ∞
8. Loop
9. find w not in N’ such that D(w) is a minimum
10. add w to N’
11. update D(v) for each neighbor v of w and not in N’:
12. D(v) = min( D(v), D(w) + c(w,v) )
13. /* new cost to v is either old cost to v or known least path cost
to w plus cost from w to v */
14. until N’= N
133
The Distance-Vector Routing Algorithm

● The distance vector algorithm is iterative, asynchronous, and


distributed.
● It is allocated in that each node receives some information from
one or more of its neighbors, performs a calculation, and then
distributes the results of its calculation back to its neighbors for
calculation. It is constant in that this process continues on until
no more information is exchanged between its neighbors.
● The algorithm is asynchronous in that it does not require all of
the nodes to handle in lockstep with each other.
● An important relationship that exists among the costs of the least-
cost routes or paths.
● Let dx(y) be the cost of the least-cost path from node x to node y.
Then the least costs are related by the celebrated Bellman-Ford
equation, namely, dx(y) = minv{c(x,v) + dv(y)},
where the minv in the equation is taken over all of x’s neighbors.
The Bellman-Ford equation is rather intuitive. Indeed, after
traveling from x to v, if we then take the least-cost path from v to
y, the path cost will be c(x,v) + dv(y). Since we must begin by
traveling to some neighbor v, the least cost from x to y is the
minimum of c(x,v) + dv(y) taken over all neighbors v.

Distance-Vector (DV) Algorithm


1. At each node, x:
2. Initialization:
3. for all destinations y in N:
4. Dx(y) = c(x,y) /* if y is not a neighbor then c(x,y) = ∞ */
5. for each neighbor w
6. Dw(y) = ? for all destinations y in N
7. for each neighbor w
8. send distance vector Dx = [Dx(y): y in N] to w
9. loop
10. wait (until I see a link cost change to some neighbor w or
11. until I receive a distance vector from some neighbor w)
12. for each y in N:
13. Dx(y) = minv{c(x,v) + Dv(y)}
14. if Dx(y) changed for any destination y
15. send distance vector Dx = [Dx(y): y in N] to all neighbors
16. forever
134
Difference between DV & LS Routing:

Distance Vector Routing Link State Routing

Distance vector protocols use a Link State protocols track the


distance calculation plus an status and connection type of
outgoing network interface (a each link and produces a
vector) to choose the best path calculated metric based on
to a destination network these and other factors,
including some set by the
network administrator

Each router maintains routing It is the advanced version of


table indexed by and containing distance vector routing
one entry for each router in the
subnet

Algorithm took too large to Algorithm is faster


converge

Distance Vector routing Link State routing protocols


protocols support dis- support contiguous subnets
contiguous subnets

Distance Vector routing Cost is the metric of the Link


protocols uses hop count and State routing protocols
composite metric

Bandwidth is less Wide bandwidth is available

Router measure delay directly All delays measured and


with special ECHO packets distributed to every router

It doesn’t take line bandwidth It considers the line bandwidth


into account when choosing the into account when choosing the
routes routes

Distance Vector routing Link State routing protocols are


protocols are less scalable such very much scalable; supports
as RIP supports 16 hops and infinite hops
IGRP has a maximum of 100
hops

Distance vector require less Link state require more


memory memory
135

7.10 HIERARCHICAL ROUTING

● Hierarchical Routing is the method of routing in networks that is


based on hierarchical addressing.
● Most transmission control protocol, Internet protocol (DCPIP).
● Routing is based on two levels of hierarchical routing in which
an IP address is divided into a network, person and a host person.
● Gateways use only the network a person tells an IP data until
gateways deliver it directly.
● It addresses the growth of routing tables.
● Routers are further divided into regions and they know the route
of their own regions only. It works like a telephone routing.
Example City, State, Country, Continent.
● One router was indistinguishable from another in the sense that
all routers executed the same routing algorithm to compute
routing paths through the entire network.
● This model and its view of a homogenous set of routers all
executing the same routing algorithm is a bit simplistic for at
least two important reasons:

1. Scale.
As the number of routers becomes large, the overhead involved
in computing, storing, and communicating routing information (for
example, LS updates or least-cost path changes) becomes
prohibitive.

2. Administrative autonomy.
Although researchers tend to ignore issues such as a company’s
desire to run its routers as it please (for example, to run whatever
routing algorithm it chooses) or to hide aspects of its network’s
internal organization from the outside, these are important
considerations. Ideally, an organization should be able to run and
administer its network as it wishes, while still being able to connect
its network to other outside networks.

7.11 SUMMARY

● Learned that the network layer involves each and every host and
router in the network. Because of this, network-layer protocols
are among the most challenging in the protocol stack.
136
● Learned that a router may need to process millions of flows of
packets between different source-destination pairs at the same
time.
● To permit a router to process such a large number of flows,
network designers have learned over the years that the router’s
tasks should be as simple as possible. Many measures can be
taken to make the router’s job easier, including using a datagram
network layer rather than a virtual-circuit network layer, using a
streamlined and fixed-sized header, eliminating fragmentation,
and providing the one and only best-effort service.
● Understand the underlying principles of routing algorithms.
● Learned how routing algorithms abstract the computer network
to a graph with nodes and links.
● Understand how hierarchy is used to deal with the problem of
scale by partitioning large networks into independent
administrative domains called autonomous systems (ASs).

7.12 REFERENCE FOR FURTHER READING

● TCP/IP Protocol Suite fourth edition Behrouz A. Forouzan


● Computer Networking, a Top-Down Approach, James f. Kurose

7.13 UNIT END EXERCISES

1. What are the two most important network-layer functions in a


datagram network?
2. What are the three most important network-layer functions in a
virtual circuit network?
3. Compare and contrast the IPv4 and the IPv6 header fields. Do
they have any fields in common?
4. Compare and contrast link-state and distance-vector routing
algorithms?


137

Unit-8
NETWORK LAYER ROUTING & UNICAST
ROUTING PROTOCOLS
Unit Structure :

8.1 Objectives,
8.2 Introduction,
8.3 Routing in the Internet
8.4 Intra and inter domain routing
8.5 Unicast Routing Protocols RIP, OSPF, BGP
8.6 Summary
8.7 Reference for further reading
8.8 Unit End Exercises

8.1 OBJECTIVES

1. To learn how the routers create their routing tables to support


unicast communication.
2. To introduce the idea of autonomous systems (ASs) that divide
the internet into smaller administrative regions for the purpose of
exchanging routing information.
3. To understand the idea of distance vector routing as the first
intra-AS routing method and how it uses the Bellman-Ford
algorithm to update routing tables.
4. To understand how the Routing Information Protocol (RIP) is
used to implement the idea of distance vector routing in the
Internet.
5. To understand the idea of link state routing as the second intra-
AS routing method and how it uses Dijkstra algorithm to update
the routing tables.
6. To understand how Open Shortest Path First (OSPF) is used to
implement the idea of link state routing in the Internet.
7. To learn the idea of path vector routing as the dominant inter-AS
routing method and explain the concept of policy routing.
8. To learn how Border Gateway Protocol (BGP) is used to
implement the idea of path vector routing in the Internet.
138

8.2 INTRODUCTION

A router is a device which is used in networking that forwards


data packets between computer networks. On the internet traffic
directing functions done by Routers.

● A Router is a process of deciding a path along which the data can


be transferred from source to the destination. Routing of data is
performed by a special device known as a router.
● A Router resides at the network layer in the OSI model and
internet layer in TCP/IP model.
● A router forwards the packet to the destination based on the
information available in the packet header and forwarding table.
● With the help of routing algorithms, the packet is routed in the
different networks. The routing algorithm is responsible for
deciding the optimal or minimum path through which packets
can be transmitted.
● The routing protocols use the metric to find the best path for the
packet delivery. The metric is the standard of measurement such
a standard is called as hop count, bandwidth, delay, current load
on the path, etc. used by the routing algorithm to find the optimal
path to the destination.
● The routing algorithm initializes and updates the routing table for
the process of optimal path determination.

8.3 ROUTING IN THE INTERNET

An autonomous system (AS) is a collection of routers under


the same network administrative and technical control, and that all
run through the same routing protocol among themselves. Each AS,
in turn, typically contains multiple subnets.

Cost or Metric
To assign a cost for a packet passing through a network is
called a cost metric. Higher the cost results in delay packets. Lower
the cost can be thought of as something good. For example, if
maximizing the throughput in a network, the high throughput means
low cost and the low throughput means high cost.

8.3.1 The metric values:


● Hop count: Hop count is a metric that identifies the number of
passes through a number of different routers, a packet must move in
139
a route from source to the destination. If the routing protocol thinks
about the hop as a primary metric value, then the path with the least
hop count will be considered as the best path.

● Delay: The time taken by the router to process, queue and


transmit a datagram to an interface. The protocols use this metric to
determine the delay times for all the links along the path from source
to destination. lower the delay value will be the best path.

● Bandwidth: The size of the link is known as a bandwidth of the


link. The bandwidth is measured in terms of bits per second. The
protocol finds the bandwidth capacity for all the links along with the
path, and the overall higher bandwidth will be considered as the best
route.

● Load: This refers to the degree to which the network assets like
router or network link are busy. A Load can be calculated as CPU
utilization, packets processed per second. If the traffic increases in
the network, then the load value will also be increased. The load
value changes as regards the change in the traffic.

● Reliability: This is a metric factor that may be composed of a


fixed value. It fully depends on the network links, and its value is
measured. If networks go down more often than others. When
network failure, some network links are repaired more easily than
other links. This reliability factor is considered for the assignment of
reliability ratings, which are generally numeric values assigned by
the system admin.

8.3.2 Types of routing:

Routing can be classified into three categories:


1. Static Routing
2. Default Routing
3. Dynamic Routing
140
1. Static Routing
❏ Static Routing is also known as Non Adaptive Routing.
❏ In this technique administrator manually adds the routes in a
routing table.
❏ A Router sends the packets to the destination with the route
decided by the administrator.
❏ In this type, routing decisions are not a based on the topology
of the networks

2. Default Routing
❏ Default Routing is a technique in which a router is arranged
such that to send all the packets to the same hop device. A
Packet is transmitted to the particular device for which it is
configured in default routing.
❏ Default Routing is used for the deal with the single exit point.
❏ It is useful when the mass transmission networks have to
transmit the data to the same hop device.
❏ The router will choose the specific route rather than the
default route.
❏ When a specific route is not mentioned the default route is
selected in the routing table.

3. Dynamic Routing
❏ It is also called Adaptive Routing.
❏ In this technique a router adds a new route in the routing table
for each packet after the changes in the topology of the
network.
❏ Dynamic protocols are used to find the new routes to reach
the destination.
❏ In Dynamic Routing, RIP and OSPF are the protocols used to
locate the new routes.
❏ If any route goes down or not available, then the automatic
adjustment will be made to reach the destination.

8.4 INTRA AND INTER DOMAIN ROUTING

An internet can be so huge and complex that a single routing


protocol is not able to manage the task of updating the routing tables
of all routers simultaneously. For this cause, an internet is divided
141
into autonomous systems. An autonomous system (AS) is a
collection of networks and routers under the authority of a single
administration.
Intra-domain routing:
Routing inside an autonomous system is referred to as intra-
domain routing.

Inter-domain routing
Routing between two or more autonomous systems is referred
to as inter-domain routing. Each autonomous system can choose one
or more intradomain routing protocols to handle routing inside the
autonomous system.

Fig. 8.1 Intra and inter domain routing

Intra-domain routing protocols:


1. Distance vector
2. Link state
3. Path Vector

Routing Information Protocol (RIP) is the execution of the


distance vector protocol. Open Shortest Path First (OSPF) is the
execution of the link state protocol. Border Gateway Protocol (BGP)
is the execution of the path vector protocol. RIP and OSPF are
interior routing protocols; BGP is an exterior routing protocol.
142

Fig. 2 Classification of routing protocol

8.5 UNICAST ROUTING PROTOCOLS RIP, OSPF, BGP

Unicast is the transmission from a single sender to a single


receiver. It is a point to point communication between sender end
and receiver end. Example of unicast protocols such as TCP, HTTP,
etc.

● TCP is the most commonly used unicast protocol. It is a


connection oriented protocol that relies on acknowledgement
from the receiver side.
● HTTP stands for Hyper
● Text Transfer Protocol. It is an object oriented protocol for
communication.

There are three major protocols for unicast routing:


1. Distance Vector Routing
2. Link State Routing
3. Path-Vector Routing

1 Distance Vector Routing


In distance vector routing, every node shares its routing table
with its neighbors periodically and when there is a change in the
route. In distance vector routing, the minimum cost route between
any two or more nodes is the route with minimum distance. In this
routing protocol, node maintains a vector table of minimum
distances to every other node. The table at each node guides the
packets to the desired node by showing the next stop in the route.
Example, nodes as the cities in an area and the lines as the roads
connecting them. A vector table can show a tourist the minimum
143
distance between cities. In Figure 3, we show a system of five nodes
with their corresponding tables.

Fig. 8.3 Distance vector routing tables

1. Initialization of DV table
This state is stable, each node knows how to reach any other
node and the cost of that node. At the beginning, anyhow this is not
the case. Each node can know only the distance between itself and
its immediate neighbors, those directly connected to it through
proper link. Let us assume that each node can send a message to the
immediate neighbors and find the distance between itself and these
neighbors’ nodes. Figure 3 shows the initial vector tables for each
node. The distance for any entry that is not a neighbor is marked as
an infinite loop.

Fig. 8.4 Initialization of tables in distance vector routing


144
2. Sharing the vector table
The distance vector routing is the sharing of information
(vector table) between neighbors nodes. Even through node A does
not know about node E, node C does. So if node C shares its routing
table with node A, node A can also know how to reach node E. On
the other side, node C does not know how to reach node D, but node
A does. If node A gives update information about its routing table
with node C, node C also knows how to reach node D. In other
words, nodes A and C, as immediate neighbor’s node, can improve
their routing tables if they help each other. A node is not aware of a
neighbor's node table. The finest solution for each node is to send its
entire table to the neighbor node and let the neighbor node decide
what part to use and what part to discard. The third column of a
routing table (next stop) is not useful for the neighbor node. After
the neighbor node receives a table, this column needs to be replaced
with the sender's name. If any of the rows can be used, the next node
is the sender of the routing table. A node therefore can send only the
first two columns of its table to any neighbor node.

3. Updating the vector table


When a node receives an updated table from a neighbor node,
it needs to update its routing table. Updating of routing tables takes
three steps:
1. The receiving node or routing table needs to add the cost between
itself and the sending node to each value in the second column.
The logic is clear. If node C holds that its distance to a
destination is x mi, and the distance between A and C is y mi,
then the distance between A and that destination, through C, is x
+ y mi.
2. The receiving node is add the name of the sending node to each
row as the third column if the receiving node uses information
from any other row. The sending/dispatch node is the next node
in the route.
3. The receiving node requires cross check each row of its old table
with the corresponding row of the modified version of the
received table.
a. If the next-node entry is different from one, the receiving
node chooses the row with the smaller cost. If there is a bind,
the old one is kept.
b. If the next node appearance is the same, the receiving node
chooses the new row.
c. For example that now there is no path between C and X; node
C now advertises this route with a distance of infinity. Node
145
A must not ignore this value even though its old entry is
smaller than the new one. The old route does not exist
anymore. The new route has a distance of infinity.

Figure 8.5 shows how node A updates its routing table after
receiving the partial table from node C.

Fig. 8.5 Updating in distance vector routing

Periodic Update A node table sends its routing table,


generally every 30 s, in a periodic update. The period depends on the
protocol that is using distance vector routing algorithm. Triggered
Update A node sends its two-column routing table to its neighbor’s
node anytime there is a change in its routing table. This is called a
triggered update. The change can result from the following.

1. A node receives a table from its neighbor, on the basis of its


changes in its own table after updating.
2. A node notices the failure in the neighboring links which results
in a distance is change to infinity.

RIP
The Routing Information Protocol is an intradomain routing
protocol used inside an autonomous system. It is a very
straightforward protocol based on distance vector routing. RIP used
distance vector routing directly with considerations:

1. In an autonomous system, trading with routers and networks or


links. The routers have routing tables; networks do not have the
same.
2. The destination in a routing table is a network node, which
means the first column defines a network address.
146
3. In RIP metric the distance is defined as the number of links or
networks to reach the destination. The metric in RIP protocol is
called a hop count.
4. Infinity is defined as 16 hops, which means that any route in an
autonomous system using RIP cannot have more than 15 hops.
5. The next-node table’s column defines the address of the router to
which the packet is to be sent to reach its destination.

2. Link State Routing


Link state routing has a different ideology from that of
distance vector routing. In link state routing, if each node in the
domain has the whole topology of the domain the list of nodes and
links, they are connected each other including the type, cost (metric),
and condition of the links (up or down) the node can use Dijkstra's
algorithm to build a routing table. Figure 6 shows the concept.

Fig. 8.6 Concept of link state routing

The above diagram shows a simple domain network with five


nodes. Each node uses the same topology to create a routing table,
but the routing table for each node is distinctive because the
calculations are based on different interpretations of the topology.
This is comparable to a city map. While each person may have the
same map, each needs to take a different route to reach her specified
destination.

Link state routing is based, the global knowledge about the


topology is not clearly mentioned, and each node has partial
knowledge about the same: it knows the state (type, condition, and
cost) of its links. the entire topology can be compiled from the
partial knowledge of each node. Figure 7 shows the same domain as
in Figure 14, indicating the part of the knowledge belonging to each
node.
147

Fig. 8.7 Link state knowledge

Node A realizes that it is connected to node B with metric 5,


to node C with metric 2, and to node D with metric 3. Node C
realizes that it is connected to node A with metric 2, to node B with
metric 4, and to node E with metric 4. Node D realizes that it is
connected only to node A with metric 3. And so on. There is an
overlap in the knowledge, the overlap assurance the creation of a
common topology-a picture of the whole domain for each node.

Building Routing Tables


In link state routing, four sets of steps are required to confirm
that each node has the routing table showing the least-cost node to
every other node.

1. Design of the states of the links by each node, called the link
state packet (LSP).
2. Circulation of LSPs to every other router, called flooding, in an
efficient and reliable way.
3. Origin of a shortest path tree for each node.
4. Computation of a routing table based on the shortest path tree.

OSPF
The Open Shortest Path First OSPF protocol is an
intradomain routing protocol, its based on the concept of link state
routing protocol. Its domain is also called an autonomous system.
OSPF protocol divides an autonomous system into areas and
subsections. An area is a group of networks, hosts, and routers all
contained within an autonomous system. An autonomous system can
be split into many different areas. All networks inside an area must
be connected to each other through a link. Routers inside an area
flood the area with the help of routing information. At the border or
boundary of an area, special routers called area border routers. the
areas inside an autonomous system is a special area called the
148
backbone AS. All the areas inside an AS must be connected to the
backbone of the system. The area identification of the backbone is
zero. Figure 8.8 shows an autonomous system and its areas.

Fig. 8.8 Areas in an autonomous system

Types of Links in OSPF:


A connection is called a link. Four types of links have been
defined:
1. point-to-point,
2. transient,
3. stub, and
4. virtual

1. A point-to-point link connects two routers without any help of


any other host or router in between. An example of this type of link
is two routers connected to each other by a telephone line or a T line.
There is no requirement to assign a network address to this type of
link.

Fig. 8.9 Point-to-point link

2. A transient link is a network link with several routers attached


with each other. The data can come into the network through any of
the routers and leave through any router. For example, consider the
149
Ethernet in Figure 18. Router A has routers B, C, D, and E as
neighbor’s nodes. Router B has routers A, C, D, and E as neighbor’s
nodes.

Fig. 8.10 Transient link

3. A stub link is a network that is connected to only one router in


the network. The data packets come into the network through this
single router and leave the network through this same router.

Fig. 8.11 Stub link

4. When the link between two routers is broken, the management


may create a virtual link between two routers, using a longer path
that probably goes through several routers.

3. Path Vector Routing


Distance vector routing is subject to uncertainty if there are
more than a few hops in the domain of operation. Link state routing
needs a large amount of resources to calculate routing tables. It also
creates heavy traffic due to flooding. There is a requirement for a
third routing protocol which we call path vector routing. Path vector
routing demonstrates to be useful for interdomain routing. The idea
of path vector routing is similar to that of distance vector routing.

BGP
Border Gateway Protocol is an interdomain routing protocol,
It uses path vector routing. For example, a large business that
manages its own network and has full control over it is an
autonomous system. A local ISP that provides services to local
customers is called an autonomous system. This divides autonomous
systems into three categories: stub, multihomed, and transit.
150
Stub AS. A stub AS has only one connection to another AS. The
interdomain data traffic in a stub AS can be either created or
terminated in the AS.

Multihomed AS. A multihomed AS has more than one connection


to other ASs, but it is still only a source or sink for data traffic.

Transit AS. A transit AS is a multihomed AS that also allows


temporary traffic. Good examples of transit ASs are national and
international ISPs (Internet backbones).

External and Internal BGP


BGP has two types of sessions: external BGP (E-BGP) and
internal BGP sessions. The E-BGP session is used to interchange
information between two speaker nodes. It belongs to two different
AS. The I-BGP session is used to exchange routing information
between two routers inside an AS. Figure 21 shows the details

Fig. 12 Internal and external BGP sessions

BGP squint advertises routes to each other on the network.


Two of the more important attributes are AS-PATH and NEXT-
HOP:

AS-PATH:
This attribute contains the ASs through which the
advertisement for the prefix has passed. When a prefix is passed into
an AS, the AS adds its ASN to the ASPATH attribute.

NEXT-HOP:
Providing the critical link between the inter-AS and intra-AS
routing protocols, the NEXT-HOP attribute has a subtle but
important use. The NEXT-HOP is the router interface that begins the
AS-PATH.

BGP Route Selection


AS BGP uses eBGP and iBGP to distribute routes to all the
routers. From this issue, a router may learn about more than one
route to any one prefix, in which case the router must select one of
151
the possible routes. The input into the route selection process is the
set of all routes that have been acquired and accepted by the router.
If there are more than two routes to the same prefix, then BGP
sequentially invokes the following elimination rules until one route
remains:

1. Routes are assigned a local priority value as one of their


attributes. The local priority of a route could have been set by the
router. This is a policy decision that is boosted up to the AS’s
network administrator. The routes with the giant local preference
values are selected.
2. The route with the shortest path (AS-PATH) is selected. If this
rule applies the only rule for route selection, then BGP would be
using a DV algorithm for path determination, where the distance
metric uses the number of AS hops preferably than the number of
router hops.
3. From the endure routes the route with the closest NEXT-HOP
router is selected. Here, closest means cost of the least-cost path,
set on by the intra-AS algorithm, is the smallest
4. If more than one route is still leftover, the router uses BGP
identifiers to select the route.

8.6 SUMMARY

● A static routing table's entries are updated manually by an


administrator; a dynamic routing table's entries are updated
automatically by a routing protocol.
● A metric is the cost assigned for passage of a packet through a
network.
● An autonomous system (AS) is a group of networks and routers
under the authority of a single administration.
● RIP is based on distance vector routing, in which each router
shares, at regular intervals, its knowledge about the entire AS
with its neighbors.
● Two shortcomings associated with the RIP protocol are slow
convergence and instability. Procedures to remedy RIP instability
include triggered update, split horizons, and poison reverse.
● D OSPF divides an AS into areas, defined as collections of
networks, hosts, and routers.
152
● OSPF is based on link state routing, in which each router sends
the state of its neighborhood to every other router in the area. A
packet is sent only if there is a change in the neighborhood.
● OSPF routing tables are calculated by using Dijkstra's algorithm.
● BGP is an inter autonomous system routing protocol used to
update routing tables.
● BGP is based on a routing protocol called path vector routing. In
this protocol, the ASs through which a packet must pass are
explicitly listed.

8.7 REFERENCE FOR FURTHER READING

● TCP/IP Protocol Suite, B. A. Forouzan, Third Edition, Tata


McGraw Hill edition.
● Data Communication and Networking, B. A. Forouzan, Fourth
Edition, McGraw Hill.

8.8 UNIT END EXERCISES

1. What is the purpose of RIP?


2. What are the functions of a RIP message?
3. Why is the expiration timer value 6 times that of the periodic
timer value?
4. What is the basis of classification for the four types of links
defined by OSPF?
5. What is the purpose of BGP?


153

Unit-9
ATM NETWORKS
Unit Structure
9.1 Objectives,
9.2 Introduction,
9.3 ATM Networks:
9.3.1 Need for ATM,
9.3.2 ATM Layers,
9.3.3 ATM adaptation Layers,
9.3.4 IP over ATM,
9.4 Multi-protocol Label switching (MPLS),
9.5 Drawbacks of traditional routing methods,
9.6 Idea of TE, TE and Different Traffic classes
9.7 Summary
9.8 Reference for further reading
9.9 Unit End Exercises

9.1 OBJECTIVES

● Learning the ATM, as a high-speed protocol, can be the


superhighway of communication when it deploys physical layer
carriers.
● To understand the need of ATM, & ATM layers.

9.2 INTRODUCTION

ATM stands for Asynchronous Transfer Mode. It is a


switching method that enables time division multiplexing (TDM) for
data communications.

ATM networks are connection oriented networks for cell relay


that supports voice, video and data communications and more. It
encodes data into small fixed size cells so that they are suitable for
TDM network and transmits them over a physical medium of
network.
154
The capacity of an ATM cell is 53 bytes: 5 byte header and 48
byte payload. There are two different cell formats - user-network
interface (UNI) and network-network interface (NNI).

The below image shows the Functional Reference Model of


the Asynchronous Transfer Mode.

Fig. 9.1 ATM

Design Goals

Challenges faced by the designers of ATM:


1. Need for a transmission system to optimize the use of high data
rate transmission media, like optical fiber. In addition to offering
large bandwidths, newer transmission media and equipment are
adequately less susceptible to noise deterioration. A technology
is needed to take advantage of both factors and therefore
maximize data rates.

2. The system must interact with existing systems and provide wide
area interconnectivity between them without lowering their
effectiveness or requiring their replacement.

3. The designer must be implemented inexpensively so that cost


would not be a barrier to adoption. If ATM is to become the
backbone of international communications, as intended, it must
be available at low cost to every user who wants it for their
needs.

4. The new system is capable of working with and supporting the


existing telecommunications hierarchies for example local loops,
local providers, long-distance carriers, and so on.
155
5. The new system must be connection-oriented to ensure accurate
and predictable delivery of service.

6. One target is to move as many of the functions to hardware as


possible (for speed) and eliminate as many software functions as
possible.

Problems associated with existing systems.

1. Frame Networks
● Prior to ATM, data communications at the data link layer had
been based on frame switching and frame networks.
● Different protocols use frames of varying size and intricacy. As
networks are more complex, the information that must be carried
in the header becomes more extensive.
● The result is huge and larger headers relative to the size of the
data unit. Protocols have bigger the size of the data unit to make
header use more efficient (sending more data with the same size
header).
● regrettably, large data fields create waste. If there is no
information to transmit, the field goes unused. To improve
utilization, some protocols provide different frame sizes to users.

2. Mixed Network Traffic


● The variety of frame sizes makes traffic unpredictable.
● Switches, multiplexers, and routers must include elaborate
software systems to manage the various sizes of frames.
● A header information should be read, and each bit counted and
evaluated to ensure the integrity of every frame.
● Internetworking among the different frame networks is slow and
costly at best, and impossible at worst.
● Another problem is that of providing homogeneous data rate
delivery when frame sizes are unpredictable and can vary so
dramatically.
● A traffic must be time-division multiplexed onto network shared
paths. Imagine the results of multiplexing frames from two
networks with different requirements (and frame designs) onto
one link (Figure 2).
156

Fig. 9.2 Multiplexing using different frame sizes

Example, If 1’s frame X arrives at the multiplexer even a


moment earlier than line 2's frames, the multiplexer puts frame X
onto the new path first. After all, even if line 2's frames have
priority, the multiplexer has no way of knowing to wait for them and
so processes the frame that has arrived. Frame A must therefore wait
for the entire X bit stream to move into place before it can follow.
The sheer size of X creates an unfair delay for frame A. The same
imbalance can affect all the frames from line 2.

3. Cell Networks
● Numerous problems associated with frame internetworking are
solved by adopting a concept called cell networking.
● A cell is a small data unit of fixed size length.
● In a cell network, which uses the cell as the basic unit of data
exchange, all data are loaded into same size cells that can be
transmitted with complete monotony and uniformity.
● As frames with different sizes and formats reach the cell network
from a side stream network, they are split into multiple small
data units of equal length and are loaded into cells.
● The cells are then multiplexed with other cells networks and
routed through the cell network. Because each cell is the same
size and all are small, the problems correlate with multiplexing
different-sized frames are avoided.

A cell network uses the cell as the basic unit of data


interchange. A cell is defined as a small, fixed-size block of
information.

Example, Figure 3 shows the multiplexer from Figure 2 with


the two lines sending cells instead of frames. Frame X has been
segmented into three cells: X, Y, and Z. the first cell from line 1 gets
put on the link before the first cell from line 2. The cells from the
two lines are dispersed so that none suffers a long delay.
157

Fig. 3 Multiplexing using cells

4. Asynchronous TDM
● ATM uses asynchronous time-division multiplexing to multiplex
cells corning from different channels.
● It uses fixed-size slots or the size of a cell. ATM multiplexers
pack a slot with a cell from any input channel that has a cell. If
the slot is empty then none of the channels has a cell to send.
● Figure 4 shows how cells from three inputs are multiplexed. At
the first mark of the clock: channel 2 has no cell (empty input
slot), so the multiplexer fills the slot with a cell from the third
channel.
● When all the cells from all the channels are multiplexed, the
output slots are empty.

Fig. 4 ATM multiplexing

Architecture of ATM network


● ATM is a cell-switched network.
● The user access devices, also called as the endpoints, are
connected through a user-to-network interface (UNI) to the
switches inside the network area.
● The switches are connected through network-to-network
interfaces (NNIs). Figure 5 shows an example of an ATM
network.
158

Fig. 9.5 Architecture of an ATM network

Virtual Connection
● Connection between two endpoints is fulfilled through
transmission paths (TPs), virtual paths (YPs), and virtual circuits
(YCs).
● A transmission path (TP) is the physical connection (wire, cable,
satellite, and so on) between two endpoints and a switch or
between two switches.
● Example, two switches as two cities. A transmission path is the
set of all roads that directly connect the two cities. A
transmission path is divided into a number of virtual paths. A
virtual path (VP) provides a connection between two switches on
the network. Think of a virtual path as a road that connects two
cities. Each road is a virtual path; the set of all roads is the
transmission path. Cell networks are based on virtual circuits
(VCs). All cells belonging to a single message follow the same
virtual circuit and remain in their original order until they reach
their destination. Think of a virtual circuit as the lanes of a road
(virtual path).
● Figure 6 shows the relationship between a transmission path (a
physical connection), virtual paths (a combination of virtual
circuits that are bundled together because parts of their paths are
the same), and virtual circuits that logically connect two points.

Fig. 6 Tp, VPs, and VCs


159
● To better understand the concept of VPs and VCs, look at Figure
7. In this figure, eight endpoints are communicating using four
virtual circuits.
● However, the first two virtual circuits seem to share the same
virtual path from switch I to switch III, so it is reasonable to
bundle these two virtual circuits together to form one VP.
● It is clear that the other two virtual circuits share the same path
from switch I to switch IV, so it is also reasonable to combine
them to form one VP.

Fig. 7 Example ofVPs and VCs

9.3.1 Need of ATM

Importance of ATM Networks are


● It provides the dynamic bandwidth that is particularly suited for
bursty traffic.
● All data are encoded into identical cells; data transmission is
simple, uniform and predictable.
● Uniform packet size ensures that mixed traffic in a network is
handled efficiently.
● Small sized header reduces packet overload, thus ensuring
effective bandwidth usage.
● ATM networks are scalable both in size and speed.
● ATM was a powerful step in the convergence of real-time and
non-real-time applications on a single communications
infrastructure.
● ATM was the first protocol suite to enable accurate
differentiation of traffic classes and certainly set the standards by
which subsequent technologies are measured.
160
● ATM is a virtual circuit-based technology through which a
connection is established between the two end systems before the
data exchange begins.
● The term asynchronous mentions the switching of cells, whereas
the bit stream that carries the cell is actually synchronous.
● In Asynchronous ATM, means that sources are not limited to
sending data (or cells) during a set timeslot, which is the case
with circuit switching.
● ATM was conceived as the transport technology for the
Broadband Integrated Services Digital Network (B-ISDN) that
was intended to be the new-generation communications standard.
● The ATM standard was defined to feed to the telecommunications
community and the computer internetworking community.
● ATM is a highly complex technology. ATM has been a partial
success as a comprehensive technology, but the intended goal of
providing a single integrated technology for LANs, public
networks, and user services was never truly realized.
● The ATM cell idea is streamlined to allow very high-speed
switching. The fixed length of the ATM cell clarifies the
transmission and reception of the cell compared with the
variable-length packets of Frame Relay and Ethernet.
● The Design objective of the ATM protocol suite was to
efficiently provide bandwidth to both time and delay-sensitive,
real-time services such as voice and video and to loss-sensitive,
non-real-time services such as computer data.
● ATM QoS classes:
○ Constant Bit Rate (CBR),
○ Variable Bit Rate–Real Time (VBR-RT),
○ Variable Bit Rate–Non-Real Time (VBR-nRT),
○ Unspecified Bit Rate (UBR), and
○ Available Bit Rate (ABR).
● The CBR service class is conscious for real-time applications—
those applications sensitive to delay and jitter. Applications
susceptible on TDM, such as “raw” voice or video, are the
perfect candidates for CBR QoS.
● The real-time VBR service class is conscious for real-time
applications that are sensitive to delay and jitter. Sources are
supposed to transmit at a rate that varies with time. Examples are
compressed voice or video.
● The non-real-time VBR service class is intended for non-real-
time applications that have bursty traffic.
161
● The UBR service class is conscious for applications that are not
sensitive to delay and nervousness. Sources are expected to
transmit in short cracks. The UBR service is also called a best-
effort service that does not specify bit rate or traffic parameters.

9.3.2 ATM Layers


● The ATM standard defines three layers.
● They are three layers, from top to bottom,

1. Application adaptation layer,


2. ATM layer,
3. Physical layer.

● The end systems use all three layers while the switches use only
the two bottom layers
● Ethernet and wireless LANs & ATM cells can be carried by any
physical layer carrier.

Fig. 8 ATM layers

Fig. 8.1 ATM layers in endpoint devices and switches

● The original design of the ATM was based on SONET as the


physical layer transporter.
● SONET is preferred for two reasons.
○ The high data rate of SONET's carrier reflects the design and
philosophy of the ATM.
162
○ Using SONET, the boundaries of cells can be clearly defined.
● The ATM layer provides routing, traffic management, switching,
and multiplexing services. It processes outgoing traffic by
accepting 48-byte segments from the AAL sub layers and
transforming them into 53-byte cells by the addition of a 5-byte
header (see Figure 9).

Fig. 9.9 ATM layer

● Header Format ATM uses two formats for this header, one for
user-to-network interface (UNI) cells and another for network-to-
network interface (NNI) cells. Figure 10 shows these headers in
the byte-by-byte format preferred by the ITU-T.

Fig. 9.10 ATM headers

9.3.3 ATM adaptation Layers


● The application adaptation layer (AAL) was designed to enable
two ATM concepts.
○ First, ATMs must accept any type of payload, both data
frames and streams of bits. A data frame can come from an
upper-layer protocol that creates a clearly defined frame to be
sent to a carrier network such as an ATM. A good example is
163
the Internet. ATMs must also carry multimedia payload. It
can accept regular bit streams and break them into chunks to
be encapsulated into a cell at the ATM layer. AAL uses two
sub layers to accomplish these tasks.
○ The second, in data communications. AALI supports
applications that transfer information at constant bit rates,
such as video and voice. It allows ATMs to connect existing
digital telephone networks such as voice channels and T lines.
● AAL2 supports a variable-data-rate bit stream, but it has been
redesigned.
● It is now used for low-bit-rate traffic and short-frame traffic such
as audio like compressed or uncompressed, video, or fax. A good
example of AAL2 use is in mobile telephony. AAL2 enables the
multiplexing of short frames into one cell.

Fig. 11 AAL 1 ATM

AAL1 ATM
Figure 11 shows the process of encapsulating a short frame
from the same source (the same user of a mobile phone) or from
several sources (several users of mobile telephones) into one cell.
164

Fig. 12 AAL2

The CS layer overhead contains five fields:


● Channel identifier (CID). Defines the 8-bit CID field defines the
channel (user) of the short packet.
● Length indicator (LI). Defines the 6-bit LI field indicates how
much of the final packet is data.
● Packet payload type (PPT). The PPT field defines the type of
packet.
● User-to-user indicator (UUI). Defines the UUI field that can be
used by end-to-end users.
● Header error control (HEC). Defines the last 5 bits is used to
correct errors in the header.

9.3.4 IP over ATM,

● Datagrams are moving are either LANs or point-to-point WANs.


IP datagram is traveled through a switched WAN such as an
ATM.
● The IP packet is encapsulated in cells. An ATM network contains
a definition for the physical address of a device.
● IP address and a physical address is binding together and attained
through a protocol called ATMARP.

ATM WANs
ATM, a cell-switched network, can be a highway for an IP
datagram. Figure 13 shows how an ATM network can be used in the
Internet.
165

Fig. 9.13 An ATM WAN in the Internet

The AAL layer used by the IP protocol is AAL5.

Example, Use of AAL5.


If an IP datagram is to be encapsulated in a cell, the data at
the IP level must be 53 − 5 − 20 = 27 bytes because a minimum of
20 bytes is required for the IP header and 5 bytes is needed for the
ATM header. The efficiency is 27/53, or almost 51 percent. By
allowing an IP datagram span over several cells, we are dividing the
IP overhead (20 bytes) among those cells and increasing efficiency.

Routing the Cells


● The ATM network generates a route between two routers.
● These routers have entering point and exiting-point routers.
● The cells start from the entering-point router and end at the
exciting-point router which is shown in Figure 14

Fig. 9.14 Entering-point and exiting-point routers

Addresses
● Routing the cells from one distinct entering-point router to one
distinct exiting-point router requires three types of addressing: IP
addresses, physical addresses, and virtual circuit identifiers.
166
● IP Addresses Each router is connected to the ATM network
containing an IP address.
● Physical Addresses Each router (or any other device) is
connected to the ATM network has a physical address. The
physical address is correlate with the ATM network and does not
have anything to do with the Internet.
● Virtual Circuit Identifiers The switches inside the ATM
network route the cells based on the virtual circuit identifiers
(VPIs and VCIs), This virtual circuit identifiers are used during
data transfer.

Address Binding
1. The entering-point router receives an IP datagram. It uses the
destination address and its routing table to find the IP address of
the next router, the exciting-point router. This is absolutely the
same step followed when a datagram passes through a LAN.
2. The entering-point router uses the services of a protocol called
ATMARP to find the physical address of the existing-point
router. ATMARP is similar to ARP.
3. The virtual circuit identifiers are bound to the physical addresses.

9.4 MULTIPROTOCOL LABEL SWITCHING (MPLS)

● Multiprotocol Label Switching (MPLS) is used to improve the


forwarding speed of IP routers by adopting a key concept from
the world of virtual-circuit network a fixed-length label.
● These techniques work hand-in-hand with IP, using IP addressing
and routing.
● The IETF unified these efforts in the MPLS protocol effectively
blending VC techniques into a routed datagram network.
● MPLS, the format of a link-layer frame that is handled by an
MPLS-capable router.
● Figure 15 shows that a link-layer frame transmitted between
MPLS-capable devices has a small MPLS header added between
the layer-2 (e.g., Ethernet) header and layer-3 (i.e., IP) header.
167

Fig. 9.15 MPLS header: Located between link- and network-


layer headers

● An MPLS-enhanced frame is sent between routers.


● An MPLS-capable router is often referred to as a label-switched
router, since it forwards an MPLS frame by looking up the
MPLS label in its forwarding table and then immediately passing
the datagram to the appropriate output interface. Thus, the
MPLS-capable router need not extract the destination IP address
and perform a lookup of the longest prefix match in the
forwarding table.
● In the example in Figure 16, routers R1 through R4 are MPLS
capable. R5 and R6 are standard IP routers. R1 has advertised to
R2 and R3 that it can route to destination A, and that a received
frame with MPLS label 6 will be forwarded to destination A.
Router R3 has advertised to router R4 that it can route to
destinations

Fig. 9.16 MPLS-enhanced forwarding

9.5 DRAWBACKS OF TRADITIONAL ROUTING


METHODS

a. Speed: drawback of the speed the forwarding paradigm


employed by MPLS is based on the notion of label swapping. The
routers transfer packets faster, since they only need to inspect a short
168
label, instead of the traditional longest-match forwarding used at the
network layer.

b. Connectionless Service and Connectionless VPN: unlike FR


and ATM, a significant technical advantage of MPLS VPNs is that
they are connectionless services. TCP/IP is a connectionless
protocol. This means that no earlier action is necessary to form
communication between hosts, making it easy for two parties to
interact. Legacy VPN's using connectionless TCP/IP networks had
to add a connection-oriented service, point-to-point overlay on the
network. MPLS offer a connectionless VPN, and accordingly do not
need the tunnels and encryption for network privacy, thus
eliminating significant complexity.

c. Any-to-Any Connectivity: An MPLS-based IP VPN solves this


problem because it creates a private network or a meshed network of
the customer’s sites. An MPLS-based IP VPN solves the proverbial
“N squared''7 scaling dilemma of Layer2 networks such as Frame
Relay and ATM where many committed permanent virtual circuits
(PVCs)/Virtual Circuits(VCs) are needed if all customer locations
must communicate with each other.

d. With an MPLS: based IP VPN, approved customer locations are


provided with VPN connectivity to all other authorized customer
sites within the same VPN in a completely meshed trend, similar to a
private Internet in operation. But unlike the Internet, an MPLS-based
IP VPN is as secure as frame relay or ATM, and is designed to avoid
traffic from unauthorized origin from accessing a customer’s VPN.

e. Smooth Layer2-to-Layer3 Transition: This support for Layer2


protocols also authorize customers to smoothly transition from a
traditional Layer2 network, such as frame relay and ATM, to an
MPLS-based IP VPN without making costly and troublesome
changes in their equipment or addressing. For carriers, Layer2
support provides a platform for network convergence as it authorizes
legacy Layer2 services to be transported across an MPLS cloud.

f. Flexible Addressing Support : This an MPLS-based IP VPN


supports any type of customer IP addressing in network, providing
maximum flexibility to enterprises – renumbering is not required
when connecting to a carrier’s MPLS network. absolutely because of
the privacy of the VPN; the customer’s IP addresses are only clear
within that VPN and not beyond.

g. NAT (Network Address Translation) is not needed – In


MPLS, the private addresses are perfectly lawful. So there is no need
169
to NAT them – let them stay as they are, and turn off NAT in the
customer’s routers during address translation.

h. Routing Simplicity - connecting to an MPLS-based IP VPN


service is straightforward for an enterprise customer. Customers
need not run MPLS within their networks in order to take benefits of
an MPLS-based IP VPN. MPLS is completely managed by the
carrier, giving enterprises the benefits of a secure, scalable, virtual
private network without administrative complexity.

9.6 IDEA OF TE, TE AND DIFFERENT TRAFFIC


CLASSES

Providing desired QoS for different applications is very


complex. For example, voice is delay-sensitive but not loss-
sensitive, data is loss- sensitive but not delay-sensitive, while some
other applications may be both delay-sensitive and loss-sensitive.

To easier to manage, the traffic in ATM is divided into five


service classes:

● CBR: Constant Bit Rate Quality requirements: constant cell rate,


i.e. CTD and CDV are tightly constrained; low CLR. Example
applications: interactive video and audio.

● rt-VBR: Real-Time Variable Bit Rate Quality requirements:


variable cell rate, with CTD and CDV are tightly constrained; a
small nonzero random cell loss is possible as the result of using
statistical multiplexing. Example applications: interactive
compressed video.

● nrt-VBR: Non-Real-Time Variable Bit RateQuality


requirements: variable cell rate, with only CTD are tightly
constrained; a small nonzero random cell loss is possible as the
result of using statistical multiplexing. Example applications:
response time critical transaction processing.

● UBR: Unspecified Bit Rate Quality requirements: using any left-


over capacity, no CTD or CDV or CLR constrained. Example
applications: email and news feed.

● ABR: Available Bit Rate Quality requirements: using the


capacity of the network when available and controlling the source
rate by feedback to minimize CTD, CDV and CLR. Example
170
applications: critical data transfer, remote procedure call and
distributed file service.

These service categories associate traffic characteristics and


QoS requirements to network behavior. The QoS requirement for
each class are dissimilar. The traffic management policies for them
are different.

The QoS and Usage parameters for these classes are


summarized in Table 1:

Table 1. ATM Service Categories

9.7 SUMMARY

● Asynchronous Transfer Mode (ATM) is a cell relay protocol that,


in combination with SONET, allows high-speed connections.
● A cell is a small, fixed-size block of information.
● The ATM data packet is a cell composed of 53 bytes (5 bytes of
header and 48 bytes of payload).
● ATM eliminates the varying delay times associated with
different-size packets.
● ATMs can handle real-time transmission.
● A user-to-network interface (UNI) is the interface between a user
and anATM switch.
● A network-to-network interface (NNI) is the interface between
two ATM switches.
● In ATM, connection between two endpoints is accomplished
through transmission paths (TPs), virtual paths (VPs), and virtual
circuits (VCs).
● In an ATM, a combination of a virtual path identifier (VPI) and a
virtual-circuit identifier identifies a virtual connection.
● The ATM standard defines three layers:
171
a. Application adaptation layer (AAL) accepts transmissions from
upper-layer services and maps them into ATM cells.
b. ATM layer provides routing, traffic management, switching, and
multiplexing serVIces.
c. Physical layer defines the transmission medium, bit transmission,
encoding, and electrical-to-optical transformation.

9.8 REFERENCE FOR FURTHER READING

1. Computer Networking A Top-Down Approach by kurose and


ross.

9.9 UNIT END EXERCISES

1. What is an ATM? Need of an ATM in the computer network.


2. Explain the different ATM layer.
3. Write a short note on IP over ATM
4. What is MPLS?
5. What are the different Traffic classes in ATM network?


172

Unit-10
DATA LINK LAYER
Unit Structure
10.1 Objectives
10.2 Introduction
10.3 Data Link Layer
10.4 Error Detection and Correction Techniques
10.5 Multiple Access Protocols
10.6 LAN Addresses and ARP & RARP
10.7 PPP: The Point-to-Point Protocol
10.8 Ethernet standards – IEEE 802.3, 802.5
10.9 FDDI,
10.10 802.6.
10.11 Summary
10.12 Reference for further reading
10.13 Unit End Exercises

10.1 OBJECTIVES

1. To study the datagrams encapsulated in the link-layer frames for


transmission over a single link.
2. To understand the two fundamentally different types of link-layer
channels
3. To learn the Error detection and correction techniques.
4. To learn different address resolution protocols.
5. To understand the Ethernet standards.

10.2 INTRODUCTION:

● Links are communication channels that connect neighboring


nodes along the communication path.
● A datagram to be transferred from source host to destination host,
it must be route over each of the individual links in the end-to-
end path on the network.

Example, inside company network shown at the bottom of


Figure 1, considers sending a datagram from one of the wireless
173
hosts to one of the servers. This datagram will actually pass through
six links: a WiFi link between sending host and WiFi access point,
an Ethernet link between the access point and a link-layer switch; a
link between the switch and the router, a link between the two
routers; an Ethernet link between the router and a link-layer switch;
and finally an Ethernet link between the switch and the server.

● A transmitting node encloses the datagram in a link-layer frame


and transmits the frame into the link.

Fig. 10.1 Six link-layer hops between wireless host and server

The Services Provided by the Link Layer

● To datagram move from one node to a neighbor node over a


single communication link, the details of the provided service
can differ from one link-layer protocol to the next.
● Services that can be provided by a link-layer protocol include:
174
1. Framing.
All link-layer protocols encapsulate each network-layer
datagram within a link-layer frame before transmission over the link.
A frame contains a data field, in which the network-layer datagram
is inserted, and a number of header fields.

2. Link access.
Medium access control protocol describes the rules by which
a frame is transmitted onto the link. For point-to-point links that
have a single sender at one end of the link and a single receiver at
the other end of the link, the MAC protocol is simple the sender can
send a frame whenever the link is idle.

3. Reliable delivery.
When a link-layer protocol gives reliable delivery service, it
guarantees to move each network-layer datagram all over the link
without error. Transport-layer protocols also provide a reliable
delivery service. Similar to a transport-layer reliable delivery
service, a link-layer reliable delivery service can be achieved with
acknowledgments and retransmissions.

4. Error detection and correction.


The link-layer hardware in a receiving node can wrongly
decide that a bit in a frame is zero when it was transmitted as a one,
and vice versa. This type of bit errors are introduced by signal
attenuation and electromagnetic noise. Because it is unnecessary to
forward a datagram that has an error, many link-layer protocols
provide a mechanism to detect such bit errors. This is done by
having the transmitting node include error-detection bits in the
frame, and having the receiving node perform an error check.

10.3 DATA LINK LAYER AND ITS IMPLEMENTATION

● In DLL, Figure 2 shows typical host architecture. The best one,


the link layer is implemented in a network adapter, also
sometimes known as a network interface card (NIC).
● The Data link-layer is the heart of the network adapter, usually a
single, special-purpose chip that implements many of the link-
layer services. Thus, much of a link-layer controller’s
functionality is implemented in hardware.
● For example, Intel’s 8254 controller implements the Ethernet
protocols, the Atheros AR5006 controller implements the 802.11
WiFi protocols
175
● On the sender side, the controller takes a datagram that has been
created and stored in host memory by the higher layers of the
protocol stack, enclose the datagram in a link-layer frame, and
then transmits the frame into the communication link, followed
the link-access protocol.
● On the receiving side, a controller receives the whole frame, and
extracts the network-layer datagram. If the link layer does the
error detection, then it is the sending controller that sets the error-
detection bits in the frame header and it is the receiving
controller that performs error detection.

Fig 10. 2. Network adapter: its relationship to other host


components and to protocol stack functionality

● Figure 2 shows a network adapter attaching to a host’s bus (e.g.,


a PCI or PCI-X bus), where it looks much like any other I/O
device to the other host components.
● Above figure also shows that while most of the link layer is
implemented in hardware, part of the link layer is implemented in
software that runs on the host’s CPU.
● The software components of the link layer implement higher-
level link layer functionality such as assembling link-layer
addressing information and activating the controller hardware.
● On the receiving side, link-layer software responds to controller
interrupts, handling error conditions and passing a datagram up
to the network layer.
● Thus, the link layer is a combination of hardware and software in
the protocol stack where software meets hardware.
176

10.4 ERROR DETECTION AND CORRECTION


TECHNIQUES

● Bit error detection and correction and correcting the corruption of


bits in a data link-layer frame sent from one node to another.
● Error detection and correction services are also provided at the
transport layer as well.
● Figure 3 shows, at the sending node, data, D, to be protected
against bit an error is accelerated with error-detection and
correction bits (EDC). Generally, the data to be protected
includes not only the datagram passed down from the network
layer for transmission across the link, but also link-level
addressing information, sequence numbers, and other fields in
the link frame header.
● Both D and EDC are sent to the receiving node in a link-level
frame for correction.
● At the receiving node, a sequence of bits, D and EDC is received.
D and EDC may differ from the original D and EDC as a result
of in-transit bit flips.
● The receiver’s responsibility is to determine whether or not D is
the same as the original D, given that it has only received D and
EDC.

Fig. 10.3 Error-detection and -correction scenario

● Error detection and correction techniques allow the receiver to


sometimes, but not always, detect that bit errors have occurred.
177
Parity Checks
● Error detection is the use of a single parity bit. Suppose that the
information to be sent, D in Figure 4, has d bits.
● In an even parity scheme, the sender simply includes one
additional bit and chooses its value such that the total number of
1s in the d + 1 bits is even.
● For odd parity, the parity bit value is chosen such that there is an
odd number of 1s.
● Figure 4 shows an even parity, with the single parity bit being
stored in a separate field.

Fig. 10.4 One-bit even parity

Check summing Methods

● In check summing techniques, the d bits of data in Figure 4 are


treated as a sequence of k-bit integers.
● One easy check summing method is to simply sum these k-bit
integers and use the resulting sum as the error-detection bits.
● The Internet checksum is based on this approach; bytes of data
are treated as 16-bit integers and summed.
● The 1s complement of this sum then builds the Internet
checksum that is carried in the segment header.

Cyclic Redundancy Check (CRC)

● Cyclic Redundancy Check codes are also known as polynomial


codes; after all it is possible to view the bit string to be sent as a
polynomial whose coefficients are the 0 and 1 value in the bit string,
with operations on the bit string clarify as polynomial arithmetic.

● Example
Consider the d-bit piece of data, D, that the sending node wants to
send to the receiving node. The sender and receiver must first agree
on an r + 1 bit pattern, known as a generator, which we will denote
as G. It requires that the most significant (leftmost) bit of G be a 1.
The key ideas behind CRC codes are shown in Figure 5. For a given
178
piece of data, D, the sender will choose r additional bits, R, and
append them to D such that the resulting d + r bit pattern (interpreted
as a binary number) is exactly divisible by G using modulo-2
arithmetic. The process of error checking with CRCs is thus simple:
The receiver divides the d + r received bits by G. If the remainder is
nonzero, the receiver knows that an error has occurred; otherwise the
data is accepted as being correct.

● All CRC calculations are done in modulo-2 arithmetic without


carries in addition or borrow in subtraction. This means that addition
and subtraction are identical, and both are equivalent to the bitwise
exclusive-or (XOR) of the operands. Thus, for example,
1011 XOR 0101 = 1110
1001 XOR 1101 = 0100
d bits r

Fig. 10.5 CRC

Fig. 10.6 A Simple CRC Calculations


179

10.5 MULTIPLE ACCESS PROTOCOLS,

When nodes or stations are connected to / or use a common


link, called a multipoint or / broadcast link, it needs a multiple
access protocol to coordinate access to the link.

Broadly speaking Multiple Access Protocols can be


categories as:

1.Random Access: Any station can transmit anytime


2.Controlled Access and
3.Channelization

If more than one machine transmits packets on a shared


channel at the same time there can be a conflict. This is normally
known as a “Collision”

Collision means loss of data and the transmitter machine


needs to transmit the packet all over again To avoid collision we
need to have some strategy.

Channel Partitioning Protocols

● In Channel protocol, Time division multiplexing (TDM) and


frequency-division multiplexing (FDM) are two techniques that
can be used to partition a broadcast channel’s bandwidth among
all nodes sharing that channel on the network.
● For example, suppose the channel supports N nodes and that the
transmission rate of the channel is R bit per seconds.
180
● TDM divides time into time frames and further divides each time
frame into N time slots. Every time slot is then assigned to one of
the N nodes.
● At any moment a node has a packet to send, it transmits the
packet’s bits during its assigned time slot in the revolving TDM
frame.
● Generally, slot sizes are picked up so that a single packet can be
transmitted during a slot time. Figure 7 shows a simple four-node
TDM example.

Fig. 10.7 A four-node TDM and FDM example


Random Access Protocols
● The second broad class of multiple access protocols is random
access protocols.
● In a random access protocol, a transmitting node every time
transmits at the full rate of the channel, namely, R bps.
● When there is a collision, each node involved in the collision
again and again retransmits its frame until its frame gets through
without a collision. But when a node has a collision, it doesn’t
necessarily retransmit the frame right away.
● Instead it waits a random delay before retransmitting the frame.
Each node involved in a collision selects independent random
delays.
● Because the random delays are independently selected, it is
possible that one of the nodes will pick a delay that is sufficiently
less than the delays of the other colliding nodes and will
therefore be able to sneak its frame into the channel without a
collision.
181
Slotted ALOHA
In protocols with one of the simplest random access
protocols, the slotted ALOHA protocol. In our description of slotted
ALOHA:

1. All frames consist of exactly L number of bits.


2. Time is divided into slots of size L/R seconds i.e. a slot equals
the time to transmit one frame.
3. Nodes start to transmit frames only at the start of the slots.
4. The nodes are synchronized so that each node knows when the
slots start.
5. If two or more frames crash in a slot, then all the nodes detect the
collision event before the slot ends.

Aloha
● The slotted ALOHA protocol required that all nodes to be
synchronize their transmissions to start.
● At the beginning ALOHA protocol was aunslotted, and fully
decentralized protocol.
● In pure ALOHA, when a frame first arrives, that is, a network-
layer datagram is passed down from the network layer at the
sending node, the node immediately transmits the frame in its
entirety into the broadcast channel.
● If a transmitted frame got a collision with one or more other
transmissions, the node will then instantly retransmit the frame
with probability of p. If not the node waits for a frame
transmission time.
● After this waiting time, it then transmits the frame with
probability of p, or waits for another frame time with probability
1 – p.

Carrier Sense Multiple Access (CSMA)


● In human communication, human protocols allow not only to
behave with more civility, but also to decrease the amount of
time spent “colliding” with each other in conversation and,
consequently, to increase the amount of data exchange in human
conversations.
182
● There are two important rules for proper communication:
1. Carrier sensing. A node listens to the channel before
transmitting. If a frame from another node is currently being
transmitted into the channel, a node then waits until it detects no
transmissions for a short amount of time and then begins
transmission.
2. Collision detection. A transmitting node listens to the channel
while it is transmitting data. If it determines that another node is
transmitting an interfering frame, it stops transmitting and waits a
random amount of time before repeating the sense-and-transmit-
when-idle cycle.

Carrier Sense Multiple Access with Collision Detection


(CSMA/CD)
● It is a carrier sense multiple access based on media access
protocol to sense the traffic on a channel whether it is idle or
busy, before transmitting the data. It means that if the channel is
idle, the station can send data to the channel. Otherwise, it must
wait until the channel becomes idle. Hence, it reduces the
chances of a collision on a transmission medium.
● In the figure 8 nodes do not perform collision detection; both B
and D continue to transmit their frames in their entirety even
though a collision has occurred.
● When a node performs collision detection, it discontinues
transmission as soon as it detects a collision. Figure 8 shows the
same storyline as in Figure 9, except that the two nodes each
abort their transmission a short time after detecting a collision.
● operation from the perspective of an node attached to a broadcast
channel:
1. The adapter finds a datagram from the network layer, develops a
link-layer frame, and adds the frame adapter buffer.
2. If the adapter senses that the channel is idle, it starts sending the
frame. If, on the other side, the adapter senses that the channel is
busy, it waits until it senses no signal energy and then starts
sending the frame.
3. While transmitting, the adapter observes for the presence of
signal energy coming from other adapters using the broadcast
channel.
4. If the adapter transmits the whole frame without detecting signal
energy from other adapters, the adapter is finished with the
183
frame. If, on the other side, the adapter detects signal energy
from other adapters while transmitting, it aborts the transmission.
5. while aborting, the adapter waits a random amount of time and
then returns to step 2.

Fig. 10.8 Space-time diagram of two CSMA nodes with colliding


transmissions

Fig. 10.9 CSMA with collision detection


184
CSMA/CD Efficiency
● When only one node has a frame to send, the node can transmit
at the full channel rate e.g., for Ethernet typical rates are 10
Mbps, 100 Mbps, or 1 Gbps
● If many nodes have frames to transmit, the effective transmission
rate of the channel can be much less.
● The efficiency of CSMA/CD to be the long-run fraction of time
during which frames are being transmitted on the channel
without collisions when there is a large number of active nodes,
with each node having a large number of frames to send.
● Here we simply state the following approximation:

10.6 LAN ADDRESSES AND ARP &RARP,

● A LAN address is also called a physical address, an Ethernet


address, or a MAC (media access control) address. For most LANs,
including Ethernet and token-passing LANs, the LAN address is six-
bytes long, giving 248 possible LAN addresses.
● These six-byte addresses are generally indicated in hexadecimal
notation, with each byte of the address expressed by a pair of
hexadecimal numbers.

Example:
Switched local network connecting three departments, two
servers and a router with four switches. Because these switches
operate at the link layer, they switch link-layer frames Instead of
using IP addresses.
185

Fig. 10.10 An institutional network connected together by four


switches

ARP & RARP:


In Address Resolution Protocol (ARP), the Receiver's MAC
address is fetched. Through ARP, (32-bit) IP address mapped into
(48-bit) MAC address.

Whereas, In Reverse Address Resolution Protocol (RARP),


IP address is fetched through the server. Through RARP, (48-bit)
MAC address of 48 bits mapped into (32-bit) IP address.
186
Difference between ARP & RARP:

ARP stands for Address Whereas RARP stands for Reverse


Resolution Protocol. Address Resolution Protocol.

Through ARP, (32-bit) IP Whereas through RARP, (48-bit)


address mapped into (48-bit) MAC address of 48 bits mapped
MAC address. into (32-bit) IP address.

In ARP, broadcast MAC While in RARP, broadcast IP


address is used. address is used.

In ARP, ARP table is While in RARP, RARP table is


managed or maintained by managed or maintained by RARP
local host. server.

In Address Resolution While in RARP, IP address is


Protocol, Receiver’s MAC fetched.
address is fetched.

In ARP, ARP table uses While in RARP, RARP table uses


ARP reply for its updation. RARP reply for configuration of IP
addresses .

Hosts and routers uses ARP While RARP is used by small users
for knowing the MAC having less facilities.
address of other hosts and
routers in the networks.

10.7 PPP: THE POINT-TO-POINT PROTOCOL

● The Point-to-Point Protocol (PPP) was designed to provide a


dedicated line for users who need Internet access via a telephone
line or a cable TV connection.
● A PPP connection goes through these phases: idle, establishing,
authenticating (optional), networking, and terminating.
● At the data link layer, PPP employs a version of HDLC.
● The Link Control Protocol (LCP) is responsible for establishing,
maintaining, configuring, and terminating links.
● Password Authentication Protocol (PAP) and Challenge
Handshake Authentication Protocol (CHAP) are two protocols
used for authentication in PPP.
187
● PAP is a two-step process. The user sends authentication
identification and a password. The system determines the validity
of the information sent.
● CHAP is a three-step process. The system sends a value to the
user. The user manipulates the value and sends its result. The
system verifies the result.
● Network Control Protocol (NCP) is a set of protocols to allow the
encapsulation of data coming from network layer protocols; each
set is specific for a network layer protocol that requires the
services of PPP.
● Internetwork Protocol Control Protocol (IPCP), an NCP protocol,
establishes and terminates a network layer connection for IP
packets.

Fig. 10.12 PPP Protocol

PPP provides several services that such as:


1. It defines the format of the frame to be exchanged between
devices.
2. It defines how two devices can negotiate the establishment of the
link and the exchange of data
3. It defines how network layer data are encapsulated in the data
link frame and
4. It defines how two devices can authenticate each other
188

● The Link Control Protocol (LCP) is responsible for establishing,


maintaining, configuring, and terminating links.

Fig. 10.13 LCP


● Password Authentication Protocol (PAP) and Challenge
Handshake Authentication Protocol (CHAP) are two protocols
used for authentication in PPP.
● PAP is a two-step process. The user sends authentication
identification and a password. The system determines the validity
of the information sent.
● CHAP is a three-step process. The system sends a value to the
user. The user manipulates the value and sends its result. The
system verifies the result.

Fig. 10.14 PAP


189
● Network Control Protocol (NCP) is a set of protocols to allow
the encapsulation of data coming from network layer protocols; each
set is specific for a network layer protocol that requires the services
of PPP.

● Inter network Protocol Control Protocol (IPCP), an NCP


protocol, establishes and terminates a network layer connection for
IP packets.

10.8 ETHERNET STANDARDS – IEEE 802.3, 802.5

IEEE 802 specifies to a group of IEEE standards. IEEE


standards 802 are used for Controlling the Local Area Network and
Metropolitan Area Network. The user layer in IEEE 802 is serviced
by the two layers- the data link layer and the physical layer.

The generally uses specifications of IEEE 802 are:

1. IEEE 802.3
The IEEE 802.3 standard determines the CSMA/CD access
control protocol. The best known scheme for controlling a local area
network on a bus structure is carrier sense multiple action with
collision detection (CSMA/CD).

2. IEEE 802.5
IEEE 802.5 describes the token ring standards. In a token ring
a special bit pattern, called the token, circulates around the ring
whenever all stations are idle. The sequence of token is determined
by the physical locations of the stations on the ring.

IEEE 802.3 IEEE 802.5

Topology used in IEEE 802.3 is Topology used in IEEE 802.5 is


Bus Topology. Ring Topology.

Size of the frame format in Frame format in IEEE 802.5


IEEE 802.3 standard is 1572 standard is of the variable size.
bytes.

There is no priority given in this In IEEE 802.5 priorities are


standard. possible

Size of the data field is 0 to No limit is of the size of the


1500 bytes. data field.
190

Minimum frame required is 64 It supports both short and large


bytes. frames.

Efficiency decreases when Throughput & efficiency at very


speed increases and throughput high loads are outstanding.
is affected by the collision.

Modems are not required. Like IEEE 802.4, modems are


also required in it.

Protocol is very simple. Protocol is moderately complex.

It is not applicable on Real time It can be applied for Real time


applications, interactive applications and interactive
Applications and Client-Server applications because there is no
applications. limitation on the size of data.

10.9 FDDI

● FDDI is an ANSI (American National Standards Institute).


● FDDI supports IEEE logical link control protocols and can be
used with IEEE-compliant upper layer protocols.
● FDDI has a sequential logical topology, physical ring topology,
data rates of 100 mbps over fiber, and uses modified token-
passing for MAC.
● Standards for FDDI over copper wire, Copper Distributed Data
Interface (CDDI), have been developed.
● FDDI networks are typically connected to two counter-rotating
rings, offering reliability.
● The cost of an FDDI network can be decreased by attaching
devices to only one ring, but reliability is diminished. Even with
dual-attached devices.
● FDDI is fault-tolerant against a single failure only. Due to its
reliability and throughput, FDDI is often used for backbone
networks to interconnect LANs within an organization.
● FDDI uses modified token-passing, since the speeds and
distances involved do not require the “free” state of the token to
be set to “busy” until the sending station receives delivery
confirmation, as in token ring.
191
● In FDDI, a sending station removes the token from the ring,
sends its frame, and releases the token immediately. Collisions
are still avoided since a station cannot transmit without the token.

Fig. 10.15 FDDI

FDDI Frame Format


The frame format of FDDI is similar to that of token bus as
shown in the following diagram −

Fig. 10.16 FDDI format


192
The fields of an FDDI frame are:
● Preamble: 1 byte for synchronization.
● Start Delimiter: 1 byte that marks the beginning of the frame.
● Frame Control: 1 byte that specifies whether this is a data frame
or control frame.
● Destination Address: 2-6 bytes that specifies address of
destination station.
● Source Address: 2-6 bytes that specifies address of source
station.
● Payload: A variable length field that carries the data from the
network layer.
● Checksum: 4 bytes frame check sequence for error detection.
● End Delimiter: 1 byte that marks the end of the frame.

10.10 802.6.

● IEEE 802.6 standard i.e. Distributed Queue Dual Bus is a


Metropolitan Area Network protocol.
● It is a high speed shared medium access control protocol that is
used over a bus network. It has two unidirectional buses, for
controlling purposes, where the bus carries data, video, and voice
over a network with bandwidth being allocated as per time slots.
● The benefits of using the paired bus are that it is used to tackle
failure configuration. It can be enlarged up to 30 miles at 34-55
Mbps.

Fig. 17 802.6 working


193
Directional Traffic:
● Every bus supports traffic in only one direction and is opposite to
one another.
● The start of the bus being represented as a square and the end of
the bus being represented as a triangle (Fig.17).
● Bus A traffic moves from right to left whereas the bus B traffic
moves from left to right

Upstream and Downstream:


● The association of stations of the DQDB network depends on the
directional flow of traffic of the buses.
● Considering bus A in Fig.17, which has station 1 & 2 marked as
upstream w.r.t station 3 and station 4 & 5 are downstream w.r.t
station 3.
● Here in bus A, station 1 is head of the bus as there is no upstream
station and station 5 has no downstream station and it is regarded
as the end of bus A.

Working:
● The head of bus A i.e. station 1 generates an empty slot for use of
bus A.
● Similarly, the head of bus B i.e. station 5 generates an empty slot
for use of bus B.
● The empty slot travels down its bus until the transmission station
drops data into it and the intended destination reads the data.
10.11 SUMMARY

● Link layer its services, the principles underlying its operation,


and a number of important specific protocols that use these
principles in implementing link-layer services.
● Link-layer protocols operate by encapsulating a network-layer
datagram within a link-layer frame before transmitting the frame
over the link to the adjacent node.
● Link-layer protocols provide very different link access, delivery,
and transmission Services.
● Link-layer addresses were quite different from network layer
addresses and that, in the case of the Internet, a special protocol
(ARP—the Address Resolution Protocol) is used to translate
between these two forms of addressing and studied the hugely
successful Ethernet protocol in detail.
194

10.12 REFERENCE FOR FURTHER READING

1. TCP/IP Protocol Suite fourth edition Behrouz A. Forouzan


2. Computer Networking, a Top-Down Approach, James f. Kurose

10.13 UNIT END EXERCISES

1. Explain the different error detection & correction techniques?


2. Write a short note on ARP &RARP?
3. Explain the difference between IEEE 802.3 & 802.5?
4. What is FDDI? Explain with help of a diagram?
5. Write a short note on aloha & Slotted-Aloha?
















195

Unit -11
PHYSICAL LAYER
Unit Structure
11.0 Objective
11.1 Introduction
11.2 OSI Physical layer
11.2.1 Physical layer functions
11.3 Signals
11.3.1 Digital Signal
11.3.2 Analog Signal
11.3.3 Signal Representation
11.3.4 Analog and Digital Data
11.4 Transmission media
11.4.1 Features
11.4.2 Causes of Transmission Media
11.4.3 Guided Media
11.4.4 Unguided Media
11.5 Summary
11.6 List of References
11.7 Exercises

11.0 OBJECTIVE

In this lesson you will be able to,


 define OSI Physical layer
 illustrate the role of Signals
 describe types of signals
 classify Transmission media
 state the causes of Transmission Impairment

11.1 INTRODUCTION:-

Physical layer in the OSI model has the role of cooperating with
actual hardware and signaling tool. This is the individual layer of
OSI network model which in factwork with the physical connectivity
of two different devices.
196
Physical layer translates it into electrical pulses, which
characterize binary data. The binary statistics is at that point sent
over the guided or unguided media. It deals with the mechanical and
electrical specifications either we say devices.
The OSI model contains seven layers and it is known as
referenced model of computer networking. The OSI layers are
generally classified into higher layers and lower layers. The OSI
model upper layers are:
• Application
• Presentation
• Session
The Computer Science organizations who are involved in
planning and developing network operating structures and services
to applications are mainly concerned with the protocols defined at
OSI upper layers. For example, Microsoft and Novell who
established network services and associated applications are
typically organized with protocols defined at higher of the OSI
model.
The lower layers of OSl model are:
• Transport
• Network
• Data link
• Physical
The lower layers are focused more towards the flow of data
from beginning to end through the network. The devices like hubs,
bridges, switches, and the OSI model routers- are more related with
the lesser transport, network, data link, physical layer of the
company like Cisco, Intel, Nortel, 3com-who are developing lively
networking components.

11.2 OSI PHYSICAL LAYER

This is the first layer of OSI model. Over a communication


network, this layer is functioned through spreading raw bits. When
there we sends a 1 bit, it is received towards other side as a 1 bit only
not as a 0 bit or other, the design issues checks issue like this.
Physical Layer defines:
• Connection types Physical topologies
• Automatic and electrical terms for using the transmission
medium
• Bit transmission and synchronization.
197
The network connectivity hardware which are normally
associated with the OSI physical Layer are as follows:
 Electrical signals regenerates by repeaters, hubs, and
multiplexers.
 Regenerates electrical signals join devices internally to the
transmission media by Transmission media connectors
 analog and digital transformations which is performs by Modems
and codecs,

11.2.1 Physical Layer Functions:-


Several functions performed over the Physical layer are as
follows:-

Representation of Bits: Information in this layer is developed by


stream of bits. For transmission the bits must be encrypted into
signals. It describes the sympathetic converting i.e. how 0's and 1's
are changed to signal.

Data Rate: This layer describes the percentage of conversion which


is the quantity of bits per second.

Synchronization: It makes the receiver and transmitter well-


organized. The receiver and transmitter are coordinated at bit level.

Interface: It expresses the transmission interface among devices and


transmission medium.

Line Configuration: In this typeOne to One configuration medium


and Multipoint configuration medium were used in this layer to
connect devices.

Topologies: Mesh, Star, Ring and Bus this are the technologies uses
to connect the devices.

Transmission Modes:
Full Duplex, Half Duplex and Simplex are direction of
communication amongst two application defined by physical layer.

Compacts using broadband and base band transmission.


198

DATA:-
Information formatted in human as well as machine readable

form.
For example: vocal sound, music/audio data, image/picture, file etc.

11.3 SIGNALS

Electromagnetic or electric or illustration of data.

Communication media work by steering energy through a


physical path, thus to be transferred, information must be twisted
into energy in the method of electromagnetic waves.

It prerequisites to be initially change into electromagnetic


signals, when data is conducted over physical medium. Files itself
can bedigital such as computer file (e.g., data written by digital pens)
on the disk or analog such as audio recorded by human.

Both digital and analog data can shows in digital or analog signals.

11.3.1 Digital Signals


This signals are diverse in nature and signify sequence of
voltage pulses. Digital signals are used inside the circuitry of a PC
system.
199

11.3.2 Analog Signals


This are continuous electromagnetic waves and represented by
uninterrupted wave form in environment are known as analog
signals.

11.3.3 SIGNAL REPRESENTATION:-

For example: in 2D space, as a purpose of period, space or


regularity.

Graph shows the rate of a motion at one particular point in


space as a purpose of time, when time is as horizontal axis.

At one particular point in time as a role of space graph


displays the value of a signal, when horizontal axis is space.
200

11.3.4 ANALOG AND DIGITAL DATA:-


This is also called as information which is continuous.
Digital information (data)denotes that information that
consumes separate states.

Example:
1.0 Analog clocks gives information in a continuous form that shows
hour, minute and seconding. hands clocks, Movements of hands
are continuous.
2.0 Digital clocks that describe the hours and the minute changes
suddenly from 5:01 to 5:04

11.4 TRANSMISSIONMEDIA

Transmission media is a networking medium that carries the


statistics from the receiver transmitter or transmitter to receiver.

The media through which the data between two PC systems is


sent, called transmission media. Transmission media comes in two
forms.

 Guided Media(wired)
All wires/cables which used for communication are guided
media, such as coaxial cables, UTP, and fiber Optics. In this
applications, the transmitter and the information is send (directed)
through this media when the receiver and transmitter are connected
to each other.

 Unguided Media(Wireless)
Unguided media is also known as open air space or wireless,
because the sender who send the data and receiver has no
connectivity.
201
In this the data is transfer through the wave, and all who want
to collect the data they can access including recipient.

11.4.1 Factors considered for designing the transmission media


are as follows:
o Bandwidth: All the elements are remaining persistent,
bandwidth which is greater, transmission rate of a signal will be
higher.
o Transmission impairment: When the expected signal is not
identical to the transferred one because of the transmission
impairment. Due to transforming impairment the importance of
the signals will get destroyed
o Interference: The process of disturbing a signal when it transfer
through a communication channel on the totalling of some
annoying signal is called as interference.

11.4.2 Causes of Transmission Impairment:


While motions travel over the channel, they tend to worsen.
This may have several reasons as follows:

Attenuation
For the receiver to detect the data correctly, the signal
necessity is to be satisfactorily strong. When the signal transform
over the channel, it come to be weaker. As it covers distance, it
misses strength.

Dispersion
The signal will lean towards spread and intersections if as
signal goes over and done with the media. The dispersion amount
depends upon the used of frequency.
202
Delay distortion
The signals are transfer through media with determine
frequency and speed. If the signal frequency and speed don’t get
equal, then there are potentials that signal touches destination in
arbitrary manner. In digital media, this is actually serious that
approximately bits reach earlier than the previously sent ones.

Noise
Arbitrary trouble or difference in digital and analog signal is
said to be Noise in signal, which might bemisled the actual data
being passed. Noise can be considered in one of the following class:

Thermal Noise
Heat flustered the electronic conductors of a channel which
may announce noise in the media. Up to a definite level, thermal
noise is unescapable.

Intermodulation
When several frequencies share a medium, their interfering
can harm to noise in the medium. Intermodulation noise happens if
dual diverse frequencies are sharing a medium and one of them has
extreme strength or the module itself is not working properly, at that
moment the resulting rate might not be received as predictable.

Crosstalk
This kind of noise occurs when a foreign signal arrives into
the media. This is because signal in medium affects the other
medium.

Impulse
Lightening, electricity, short-circuit, or faulty components
this are the unequal turbulences which is presented in this noise.
Information which is digital is generally affect over this kind of
noise.

11.4.3 Guided Media


The physical medium from the signals are transmitted is
called Guided media. It is as well-known as Bounded media.

Types of Guided media are as given below:

Twisted pair:
This pair is basically physical media and this is developed
with a couple of cables that are twisted by each other. This type of
pair cable is low-priced as related to another broadcast media.
Connection in this type of pair cable is easy, and it is a lightweight
203
cable. 0 to 3.5 KHz is the range frequency range of twisted pair
cable.

A twisted pair made up of two shielded copper wires that


organized in a consistent twisting form.

The degree of reduction in noise intervention is calculated by


number of repeated task per foot. Aggregate amount of repeated task
per foot reduce noise interference.

Forms of Twisted pair:

Unshielded Twisted Pair(UTP):


This cable is extensively used telecommunication.
Categories of the UTP cable are given below:
1 Category: This Category is used for phone lines which haspoor-
speed data.
2 Category: This category maintain about 4Mbps.
3Category: The category 3sustenance about 16Mbps.
4 Category: The category 4 maintain about 20Mbps. Hence, this
usage for long-distance or intercity communication also.
5 Category: The category 4 maintain about 200Mbps.

Advantages of UTP:
Cost for UTP is less.
Configuration of the UTP is simple.
For high-speed LAN, we can useunshielded twisted pair.
204
Disadvantage:
The UTP cable can just usage for shorter area because of
attenuation.

 Shielded Twisted Pair Cable (STP):


This cable permits to use for the greater broadcasting
frequency because of mesh surrounding.

Characteristics of Shielded Twisted Pair:


The charges of the STP cable is not costly and not very low.
A configuration of STP is easy.
As equaled to UTP cable the STP cable has sophisticated capacity.
Shielded twisted pair has advanced attenuation.
In this rate of transmission is data are high.

Disadvantages
The STP is extra costly asequaledto UTP.
STP cable has higher attenuation rate.

Coaxial Cable
This cable are very frequently used communication medium,
for example, TV connection is typically a coaxial cable.

As it encloses two conductors equivalent to each other hence,


the name of cable is coaxial

As compared to twisted pair cable it contains higher frequency


rate.

The internal or we can say corepart of the coaxial cable is


prepared with used of copper, and the on the outside conductor
which is prepared with copper mesh. The middle layer is throughno
conducting cover that splits the internal conductor from the external
conductor.

The middle layer is in charge meant for the information


transporting while the external conductor that is copper mesh used to
stop from the Electromagnetic interference i.e., EMI
205
Coaxial cable is of two types:

Baseband transmission: It is used for transfer signal at higher


speed.
Broadband transmission: This type of transmission is known for
transferring multiple signals concurrently.

Advantages:
The information can spread at higher speed.
The shielding of coaxial cable is better as equaled to twisted pair
cable.
It offers advanced bandwidth.

Disadvantages:
When we compared coaxial cable and other cables then
coaxial cable seems costly.

If any error take place in the cable causes the failure in the
whole system or network.

Fibre Optic
For communication, this cable are uses electrical signals.
This is cable which encompasses the optical fibers, this cable
are plastic shielded that are mainly work to initiate the records by
beats of light.
Optical fibres It safeguard from higher temperature, lover
temperature, electromagnetic intrusion by using plastic covering
safeguards.
Fibre optics contains quicker data communication than copper
wires.

Diagram of fibre optic cable:


206
Fundamentals of Fibre optic cable:

Core: The optical fibre develop by using a contracted element of


plastic or glass known as a core. It is an area of light transmission.
The extra larger zone of the core, additional signals will be
transmitted from the fibre.

Cladding: This layer fundamentally concentric coating layer of


glass which isrecognized as cladding. Basically the working of
cladding is to supply the lesser refractive index at the core line so it
causes the reflection inside the core that’s why the light waves are
extent through the fibre.

Jacket: The layer containing of plastic is well-known as a jacket. It


is shielding layer. The foremost objective of a jacket is to conserve
the fibre strength, soak up shock and additional fibre protection.

Advantages as compared to copper:

Greater Bandwidth: More bandwidth is provided by fibre optic


cable as compared copper hence, fibre optic contains large data as
compared to copper.

Faster speed: To transmit the wave at a rapidly these optic cable


transmits the information in type of light.

Longer distances: If we compared this cable to copper cable, then


the fibre optic transmits the information at a larger area.

Better reliability: The fibre optic cable has large immune in any
environment as compared to fibre optic so it is reliable also by using
copper cable in some environment it sometimes hard to do while
gives connection.

Thinner and Sturdier: As equaled to copper we can give most


pressure on fibre opticmedium as it is light in weight and slight.

11.4.4 Unguided Transmission


Medium where signals transmitted without using physical
medium called Unguided Media Transmission. It is as also called as
wireless communication too.

The electromagnetic energy stream easily through unguided


media.
207
Unguided transmission of unguided media is categorized into
three part:

Radio waves
This are the waves which transmit in any directions of the area in
any free space

This waves are mainly called as omni directional, because it the


signals are spread in any way or directions.
It has 3 kHz to 1 kHz frequency of range.
An example of the radio wave is FM radio.

Radio waves Applications:


This wave is beneficial to multicasting when there are several
receivers and only single sender.

Some examples of radio wave are like TV, Mobile phones.

Advantages of Radio transmission:


In Mobile devices and WAN type of network primarily Radio
transmission is used.

Radio waves protect a large amount of area, and they


canpassed from the walls.

Radio waves are infiltrate the boundary of obstacle for e.g.


wall. They can cover large amount of area.

Radio wave gives a greater transmission frequency.


208
Microwaves

Microwaves:
There are two types of microwaves mainly
i) Terrestrial microwave
ii) Satellite microwave communication.

Terrestrial Microwave Transmission


Technology which transfers the intensive beam of a wireless
signal from one ground-based microwave conduction antenna to a
new is known as Terrestrial Microwave transmission.

The frequency speed is approximately from 1GHz towards


1000 GHz in electromagnetic waves.

Microwaves are unidirectional as the transferring and


accepting antenna is to be associated, i.e., the waves conducted by
the transferring antenna are hardly focused.

In this type of circumstance, antennas which send a ray


towards other antenna for long distance are attached on the towers.

The towers has attached with antennas gives them direct sight
transmission as it provides sight transmission feature.

Microwave Characteristics:
Frequency range: It has 4 GHz towards23 GHz is frequency of this
microwave.
Bandwidth: It has 1Mbps towards 10 Mbps is frequency of this
bandwidth.
Short distance: It is at low costly for short distance.
Long distance: It requires a large tower to cover large distance
hence it is costly.
209
Attenuation: It said to be losing of signal. It has some amount of
chance to affected by ecological conditions.

Advantages of Microwave:
Microwave transmission is cheaper than using cables.
It doesn’t need any ground surface for its setup configuration.
So it is free from ground surface procurement.
In mountain and rough seashore it provides easy
communication, the configuration of cables is difficult task at certain
situation in this type of area.
The microwave transmission is mostly use to communicate
over the oceans.

Disadvantages of Microwave transmission:


Eavesdropping: It is a term where any unauthorized person can
enter into your signal by using its own antenna like devices.
Able to relocate signal: By use of microwave transmission a signal
will be able to relocate out of segment.
Susceptible to weather condition: This wave transformation is may
be vulnerable for climate in critical conditions.
This affect in climate change like storm, heavy rain which
result in disturb of network.
Bandwidth limited: In term of microwave transmission it has limit
on bandwidth allocation.

Satellite Microwave Communication


Around the earth object which is known as satellite are rotates
at some certain height.
The communication through satellite is reliable in nature as it
has feature of flexibility than other cable like fibre optic etc.
By using a satellite communication network we can transfer
or communicate to everywhere through the globe.

How Does Satellite work?


The satellite received the indication that is spreadover the
radio station, and it magnifies the signal. The magnifies indication
which is again transfer to another radio station.

The transfers from radio station and it increase the signal


which is accepted by satellite.
210
The increased the network are transmit again to other radio station.

Satellite Microwave Communication Advantages:


As compared to terrestrial microwave satellite microwave can
cover more area.
The transmission cost of the satellite is autonomous of the
distance from the centre of the exposure area.
The cost of transmission is autonomous as of the center of the
exposure area where that is cover by signal.
This type of communication is mostly used by portable
devices and wireless applications.
It is easy to install.
It is mainly used in several applications like weather
forecasting, TV channels broadcasting, Radio broadcasting,
Communication Wireless devices like mobile phones, etc.,

Disadvantages of Satellite Microwave Communication:


Satellite planning and expansion needs extra period and
higher budget.

The maintenance of satellite is need to checked and measured


on regular time of period hence it remains in orbit.

Satellite has 12-15 years of lifecycle, because of this reason


the one more satellite launch planned is need to organize before it
gets non-functional.

Infrared
Mainly wireless technology is directed for communication
over diminutive ranges.

300 GHz towards 400 THz is a frequency range of infrared


communication.

It is used for short-distance network communication like


transferring data from one mobile to another mobile, working of
television remote, transfer of information from pc to mobile in
similar region.

Infrared Characteristics:
The data rate in infrared is very high because it hold high
bandwidth.
211
Infrared waves cannot enter through the walls and as a result,
the communication of infrared in one chamber cannot be disturbed
by the nearby chamber or rooms.

An infrared communication network gives the superior


security with least intrusion.

Sun rays are creates the interfere between infrared waves as it


becomes defective outside while communicating.

11.5 SUMMARY:

In this lesson we have studied about


 Computer use electronic voltage pulses or electromagnetic waves
to send signals.
 OSI physical layer functions, also about signals and types of
signals like analog
 Digital signals.
 About Signal representations.
 The physical path through which the electrical voltages and EM
waves travel is called Transmission Media. Transmission media
can be classified as cable(bounded) or wireless (unbounded).
 In this we also studied different type of cables are used as a
transmission media Coaxial Cable, Twisted-pair, Fiber optic
cable
 Causes of Transmission impairment. Factor for design
transmission media.

11.6 LIST OF REFERENCES

 https://www.tutorialspoint.com/data_communication_computer_
network/data_link_layer_introduction.htm
 Computer Networks : Andrew Tanenbaum
 https://www.computer-
networking.info/1st/html/network/network.html
 https://www.researchgate.net/
 https://www.javatpoint.com/
 https://www.geeksforgeeks.org
212

 https://www.researchgate.net/publication/287994107_WIRED_
WIRELESS_COMMUNICAT ION
 https://study.com/academy/lesson/osi-model-using-open-
systems-interconnection-to-s end-and-receive-data.html
 http://www.tmv.edu.in/

11.7 EXERCISES

1. What are the functions of physical layer?


2. Explain Digital signal.
3. Explain Analog signal.
4. What are the factors considered for designing the transmission
media?
5. Write note on purpose of OSI physical layer.
6. Explain Guided media with their types and examples.





You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy