0% found this document useful (0 votes)
44 views50 pages

CSC413 - Computer Networks and Communication - BOSU

The document discusses introduction to computer networks and communication. It covers topics like data and information, data communication characteristics and components, data representation, data flow modes, computer networks categories, protocols and their elements. Computer networks allow effective exchange of data between devices over transmission medium using agreed upon communication protocols.

Uploaded by

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

CSC413 - Computer Networks and Communication - BOSU

The document discusses introduction to computer networks and communication. It covers topics like data and information, data communication characteristics and components, data representation, data flow modes, computer networks categories, protocols and their elements. Computer networks allow effective exchange of data between devices over transmission medium using agreed upon communication protocols.

Uploaded by

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

Department of Mathematics and Computer Science

Faculty of Science
Borno State University, Maiduguri

CSC413: Computer Networks and Communication

Course Content

Introduction, wares, Fourier analysis, measure of communication, channel characteristics,


transmission media, noise and distortion, modulation and demodulation, multiplexing TDM,
FDM, and FCM parallel and serial transmissions (synchronous vs asynchronous). Bus
structures and loop systems, computer network examples and design consideration, data
switching principles, broadcast techniques, network structure for packet switching,
protocols, description of network for example, ARPANET and so on.

1.1 Introduction to Computer Networks

The main objective of data communication and networking is to enable seamless exchange
of data between any two points in the world. This exchange of data takes place over a
computer network.

1.2 Data and Information

Data refers to the raw facts that are collected while information refers to processed data that
enables us to take decisions. Ex. When result of a particular test is declared it contains data
of all students, when you find the marks you have scored you have the information that lets
you know whether you have passed or failed. The word data refers to any information which
is presented in a form that is agreed and accepted upon by its creators and users.

1.3 Data Communication

Data Communication is a process of exchanging data or information In case of computer


networks this exchange is done between two devices over a transmission medium.

This process involves a communication system which is made up of hardware and software.
The hardware part involves the sender and receiver devices and the intermediate devices
through which the data passes. The software part involves certain rules which specify what
is to be communicated, how it is to be communicated and when.

It is also called as a Protocol. The following sections describes the fundamental


characteristics that are important for the effective working of data communication process
and is followed by the components that make up a data communications system.

1.3.1 Characteristics of Data Communication

1
The effectiveness of any data communications system depends upon the following four
fundamental characteristics:

 Delivery: The data should be delivered to the correct destination and correct user.
 Accuracy: The communication system should deliver the data accurately, without
introducing any errors. The data may get corrupted during transmission affecting the
accuracy of the delivered data.
 Timeliness: Audio and Video data has to be delivered in a timely manner without
any delay; such a data delivery is called real time transmission of data.
 Jitter: It is the variation in the packet arrival time. Uneven Jitter may affect the
timeliness of data being transmitted.

1.3.1 Component of Data Communication

A Data Communication system has five components as shown in Figure 1.

Figure 1: Components of a Data Communication System

 Message is the information to be communicated by the sender to the receiver.


 Sender is any device that is capable of sending the data (message).
 Receiver is a device that the sender wants to communicate the data (message).
 Transmission Medium is the path by which the message travels from sender to
receiver. It can be wired or wireless and many subtypes in both.
 Protocol
-It is an agreed upon set or rules used by the sender and receiver to communicate
data. A protocol is a set of rules that governs data communication.
-A Protocol is a necessity in data communications without which the communicating
entities are like two persons trying to talk to each other in a different language
without knowing the other language.

1.4 Data Representation

Data is collection of raw facts which is processed to deduce information. There may be
different forms in which data may be represented. Some of the forms of data used in
communications are as follows:

1. Text
 Text includes combination of alphabets in small case as well as upper case.
 It is stored as a pattern of bits. Prevalent encoding system: ASCII, Unicode.

2. Numbers

2
 Numbers include combination of digits from 0 to 9.
 It is stored as a pattern of bits. Prevalent encoding system : ASCII, Unicode
3. Images
 An image is worth a thousand words‖ is a very famous saying. In computers images
are digitally stored.
 A Pixel is the smallest element of an image. To put it in simple terms, a picture or
image is a matrix of pixel elements.
 The pixels are represented in the form of bits. Depending upon the type of image
(black n white or color) each pixel would require different number of bits to
represent the value of a pixel.
 The size of an image depends upon the number of pixels (also called resolution) and
the bit pattern used to indicate the value of each pixel.
 Example: if an image is purely black and white (two color) each pixel can be
represented by a value either 0 or 1, so an image made up of 10 x 10 pixel elements
would require only 100 bits in memory to be stored.
 On the other hand an image that includes gray may require 2 bits to represent every
pixel value (00 - black, 01 – dark gray, 10– light gray, 11 –white). So the same 10 x
10 pixel image would now require 200 bits of memory to be stored.
 Commonly used Image formats : jpg, png, bmp, etc.
4. Audio
 Data can also be in the form of sound which can be recorded and broadcasted.
Example: What we hear on the radio is a source of data or information.
 Audio data is continuous, not discrete.
5. Video
 Video refers to broadcasting of data in form of picture or movie

1.5 Data Flow

Two devices communicate with each other by sending and receiving data. The data can flow
between the two devices in the following ways.

 Simplex
 Half Duplex
 Full Duplex
1.5.1 Simplex
 In Simplex, communication is unidirectional.
 Only one of the devices sends the data and the other one only receives the data.
 Example: in the below diagram: a cpu send data while a monitor only receives data.
Figure 2 depicts the concept of simplex communication.

Figure 2: Simplex Mode of Communication

3
1.5.2 Half Duplex
In half duplex both the stations can transmit as well as receive but not at the same time.
When one device is sending other can only receive and vice versa. Example: A walkie-
talkie. Figure 3 depicts the concept of half duplex communication.

Figure 3: Half Duplex Mode of Communication

1.5.3 Full Duplex


In Full duplex mode, both stations can transmit and receive at the same time. Example:
mobile phones Figure 4 depicts the concept of full duplex communication.

Figure 4: Full Duplex Mode of Communication

1.6 Computer Networks


Computer Networks are used for data communications

Definition:
A computer network can be defined as a collection of nodes. A node can be any device
capable of transmitting or receiving data. The communicating nodes have to be connected
by communication links.

A Computer network should ensure;


 Reliability of the data communication process
 Security of the data
 Performance by achieving higher throughput and smaller delay time

1.6.1 Categories of Network


Networks are categorized on the basis of their size. The three basic categories of computer
networks are:

A. Local Area Networks (LAN) is usually limited to a few kilometers of area. It may be
privately owned and could be a network inside an office on one of the floor of a building or
a LAN could be a network consisting of the computers in an entire building.

B. Wide Area Network (WAN) is made of all the networks in a (geographically) large
area. The network in the entire state of Maharashtra could be a WAN

C. Metropolitan Area Network (MAN) is of size between LAN & WAN. It is larger than
LAN but smaller than WAN. It may comprise the entire network in a city like Maiduguri.

4
1.7 Protocol
A Protocol is one of the components of a data communications system. Without protocol
communication cannot occur. The sending device cannot just send the data and expect the
receiving device to receive and further interpret it correctly.

When the sender sends a message it may consist of text, number, images, etc. which are
converted into bits and grouped into blocks to be transmitted and often certain additional
information called control information is also added to help the receiver interpret the data.

For successful communication to occur, the sender and receiver must agree upon certain
rules called protocol.

A Protocol is defined as a set of rules that governs data communications.

A protocol defines what is to be communicated, how it is to be communicated and when it


is to be communicated.
1.7.1 Element of a Protocol
There are three key elements of a protocol:
A. Syntax
 It means the structure or format of the data.
 It is the arrangement of data in a particular order.

B. Semantics
 It tells the meaning of each section of bits and indicates the interpretation of each
section.
 It also tells what action/decision is to be taken based on the interpretation.

C. Timing
 It tells the sender about the readiness of the receiver to receive the data.
 It tells the sender at what rate the data should be sent to the receiver to avoid
overwhelming the receiver.

1.8 Standards in Networking


Standards are necessary in networking to ensure interconnectivity and interoperability
between various networking hardware and software components.

Without standards we would have proprietary products creating isolated islands of users
which cannot interconnect.

1.7.1 Concept of Standard


Standards provide guidelines to product manufacturers and vendors to ensure national and
international interconnectivity.

Data communications standards are classified into two categories:

1. De facto Standard
 These are the standards that have been traditionally used and mean by fact or by
convention.
 These standards are not approved by any organized body but are adopted by
widespread use.

2. De jure standard
 It means by law or by regulation.

5
 These standards are legislated and approved by a body that is officially
recognized.

1.7.2 Standard Organizations in field of Networking


 Standards are created by standards creation committees, forums, and government
regulatory agencies.
 Examples of Standard Creation Committees :
1. International Organization for Standardization (ISO)
2. International Telecommunications Union – Telecommunication Standard (ITU-T)
3. American National Standards Institute (ANSI)
4. Institute of Electrical & Electronics Engineers (IEEE)
5. Electronic Industries Associates (EIA)

Examples of Forums
1. ATM Forum
2. MPLS Forum
3. Frame Relay Forum

Examples of Regulatory Agencies:


1. Federal Communications Committee (FCC)

2.1 Introduction to data communications and networking


Computer networks are designed to transfer data from one point to another. During transit
data is in the form of electromagnetic signals. Hence it is important to study data and signals
before we move to further concepts in data communication.

2.2 Data and Signals

A signal is an electrical impulse or radio wave transmitted or received.

In order for data to be transmitted, data must be transformed to electromagnetic signals.

2.2.1 Types of Data


1. Analog data refers to information that is continuous;

Example. A sounds made by a human voice

2. Digital data refers to information that has discrete states. Digital data take on discrete
values.

For example, data are stored in computer memory in the form of 0s and 1s.

2.2.2 Types of Signals

1. Analog Signal: They have infinite values in a range.

2. Digital Signal: They have limited number of defined values

6
Figure: a) Analog Signal b) Digital Signal

2.2.3 Periodic and Non Periodic Signals

Signals which repeat itself after a fixed time duration are called Periodic Signals (E.g.
simple pendulum or movement of planet around the sun).

Signals which do not repeat itself after a fixed time period are called Non-Periodic Signals
(E.g. Speech wave form). In data communications, we commonly use periodic analog
signals and non-periodic digital signals.

2.3 Analog Signal

An analog signal has infinitely many levels of intensity over a period of time.

As the wave moves from value A to value B, it passes through and includes an infinite
number of values along its path as it can be seen in the figure below.

A simple analog signal is a sine wave that cannot be further decomposed into simpler
signals.

Figure: Sine Wave

A sine wave is characterized by three (3) parameters:

1. Peak Amplitude
2. Frequency
3. Phase

2.3.1 Characteristics of an Analog Signal

7
2.3.1.1 Peak Amplitude
 The amplitude of a signal is the absolute value of its intensity at time t.
 The peak amplitude of a signal is the absolute value of the highest intensity.
 The amplitude of a signal is proportional to the energy carried by the signal

Figure: Amplitude of a Sine Wave


2.3.1.2. Frequency
 Frequency refers to the number of cycles completed by the wave in one second.
 Period refers to the time taken by the wave to complete one second.

Figure: Frequency and Period of Sine Wave

2.3.1.3. Phase
Phase describes the position of the waveform with respect to time (specifically relative to
time 0).
 Phase indicates the forward or backward shift of the waveform from the axis.
 It is measured in degrees or radian.
 The figure below shows the sine waves with same amplitude and frequency but
different phases.

2.3.2 Relation between Frequency and Period

 Frequency & Period are inverse of each other.


 It is indicated by the following formula:

8
T=1/f
OR
F=1/T

Example 1. A wave has a frequency of 100hz. Its period (T) is given by T = 1/ F = 1/ 100 =
0.01 sec

Example 2. A wave completes its one cycle in 0.25 seconds. Its frequency is given by
F = 1 / T = 1 / 0.25 = 4 Hz

2.3.3 Wavelength
 The wavelength of a signal refers to the relationship between frequency (or period)
and propagation speed of the wave through a medium.
 The wavelength is the distance a signal travels in one period.
 It is given by
Wavelength = Propagation Speed X Period
OR
Wavelength = Propagation Speed X 1/ Frequency.
 It is represented by the symbol: λ (pronounced as lamda).
 It is measured in micrometers.
 It varies from one medium to another.

2.3.4. Time Domain and Frequency domain representation of signals

A sine wave can be represented either in the time domain or frequency domain. The time-
domain plot shows changes in signal amplitude with respect to time. It indicates time and
amplitude relation of a signal. The frequency-domain plot shows signal frequency and peak
amplitude. The figure below show time and frequency domain plots of three sine waves.

9
Figure: Time domain and frequency domain plots of three sine waves

A complete sine wave in the time domain can be represented by one single spike in the
frequency domain.

2.3.5. Composite Signal

A composite signal is a combination of two or more simple sine waves with different
frequency, phase and amplitude. If the composite signal is periodic, the decomposition
gives a series of signals with discrete frequencies; if the composite signal is non-periodic,
the decomposition gives a combination of sine waves with continuous frequencies.

Figure: A Composite signal with three component signals

 For data communication a simple sine wave is not useful, what is used is a
composite signal which is a combination of many simple sine waves.
 According to French Mathematician, Jean Baptist, any composite signal is a
combination of simple sine waves with different amplitudes and frequencies and
phases.
 Composite signals can be periodic or non-periodic.
 A periodic composite signal can be decomposed into a series of signals with discrete
frequencies.
 A non-periodic signal when decomposed gives a combination of sine waves with
continuous frequencies.

10
Figure: The time and frequency domains of a non-periodic composite analog signal

2.4. Digital Signal

Information can also be explained in the form of a digital signal. A digital signal can be
explained with the help of following points;

A digital signal is the signal that has discrete values. The signal will have value that is not
continuous.

Information in a digital signal can be represented in the form of voltage levels. For example,
in the signal shown in figure below a ‘1’ is represented by a positive voltage and a ‘0’ is
represented by a Zero voltage.

Figure: A digital signal with two levels. ‘1’ represented by a positive voltage and ‘0’
represented by a negative voltage

 A Signal can have more than two levels

Figure: A digital signal with four levels

11
 In general, if a signal has L levels then, each level need Log2L bits.
 Example: Consider a digital Signal with four levels, how many bits are required per
level?
 Answer: Number of bits per level = Log2L
= Log24
= 2.

Hence, 2 bits are required per level for a signal with four levels.

2.4.3 BIT LENGTH or Bit Interval (Tb)

 It is the time required to send one bit.


 It is measured in seconds

2.4.4 BIT RATE

 It is the number of bits transmitted in one second.


 It is expressed as bits per second (bps).
 Relation between bit rate and bit interval can be as follows
Bit rate = 1 / Bit interval

2.4.5 Baud Rate

 It is the rate of Signal Speed, i.e the rate at which the signal changes.
 A digital signal with two levels ‘0’ & ‘1’ will have the same baud rate and bit rate.
 The diagram below shows three signal of period (T) 1 second

a) Signal with a bit rate of 8 bits/ sec and baud rate of 8 baud/sec

b) Signal with a bit rate of 16 bits/ sec and baud rate of 8 baud/sec

c) Signal with a bit rate of 16 bits/ sec and baud rate of 4 baud/sec

12
Figure: Three signals with different bit rates and baud rates

2.5. Types of Channels

Each composite signal has a lowest possible (minimum) frequency and a highest possible
(maximum) frequency.

From the point of view of transmission, there are two types of channels:

2.5.1 Low pass Channel

This channel has the lowest frequency as ‘0’ and highest frequency as some non-zero
frequency ‘f1’. This channel can pass all the frequencies in the range 0 to f1.

2.5.2 Band pass Channel

This channel has the lowest frequency as some non-zero frequency ‘f1’ and highest
frequency as some non-zero frequency ‘f2’. This channel can pass all the frequencies in the
range f1 to f2.

Figure: Lowpass Channel and Bandpass Channel

13
2.6 Transmission of Digital signal

Digital signal can be transmitted in the following two ways:

Baseband and Broad band Transmission

2.6.1 Baseband Transmission

 The signal is transmitted without making any change to it (i.e. without modulation).
 In baseband transmission, the bandwidth of the signal to be transmitted has to be less
than the bandwidth of the channel.
 Example, Consider a Baseband channel with lower frequency 0Hz and higher frequency
100Hz, hence, its bandwidth is 100 (Bandwidth is calculated by getting the difference
between the highest and lowest frequency).
 We can easily transmit a signal with frequency below 100Hz, such a channel whose
bandwidth is more than the bandwidth of the signal is called Wideband channel.
 Logically a signal with frequency say 120Hz will be blocked resulting in loss of
information, such a channel whose bandwidth is less than the bandwidth of the signal is
called Narrowband channel

2.6.2 Broad band Transmission

 Given a bandpass channel, a digital signal cannot be transmitted directly through it.
 In broadband transmission we use modulation, i.e. we change the signal to analog signal
before transmitting it.
 The digital signal is first converted to an analog signal, since we have a bandpass channel
we cannot directly send this signal through the available channel. Example. Consider the
bandpass channel with lower frequency 50Hz and higher frequency 80Hz, and the signal
to be transmitted has frequency 10Hz.
 To pass the analog signal through the bandpass channel, the signal is modulated using a
carrier frequency. Example. The analog signal (10Hz) is modulated by a carrier
frequency of 50Hz resulting in a signal of frequency 60Hz which can pass through our
bandpass channel. The signal is demodulated and again converted into a digital signal at
the other end as shown in the figure below.

Figure: Broadband Transmission Involving Modulation and Demodulation

14
3.1 Bandwidth

This section gives insights to the concept of bandwidth. It tells about bandwidth of signal
and medium. Also explains how to calculate the bandwidth for a noisy and noiseless
channel.

3.2 Fourier Analysis

In the 19th century, French mathematician Jean-Baptiste Fourier proved that any composite
signal is a combination of simple sine waves with different frequencies, amplitudes, and
phases.

 A Composite signal can be periodic as well as non-periodic.


 A periodic composite signal when decomposed gives a series of simple sine waves with
discrete frequencies i.e. frequencies that have integer values (1, 2, 3, etc).
 A non-periodic composite signal when decomposed gives a combination of an infinite
number of simple sine waves with continuous frequencies i.e. frequencies that have real
values.

3.3 Bandwidth of a Signal

 Bandwidth can be defined as the portion of the electromagnetic spectrum occupied


by the signal.
 It may also be defined as the frequency range over which a signal is transmitted.
 Different types of signals have different bandwidth. Ex. Voice signal, music signal,
etc.
 Bandwidth of analog and digital signals are calculated in separate ways; analog
signal bandwidth is measured in terms of its frequency (hz) but digital signal
bandwidth is measured in terms of bit rate (bits per second, bps).
 Bandwidth of signal is different from bandwidth of the medium/channel

3.3.1 Bandwidth of an analog signal

 Bandwidth of an analog signal is expressed in terms of its frequencies.


 It is defined as the range of frequencies that the composite analog signal carries.
 It is calculated by the difference between the maximum frequency and the minimum
frequency. Consider the signal shown in the diagram below:
 The signal shown in the diagram is an composite analog signal with many component
signals.
 It has a minimum frequency of F1 = 30Hz and maximum frequency of F2 = 90Hz.
 Hence, the bandwidth is given by F2 – F1 = 90 – 30 = 60 Hz

3.3.2 Bandwidth of a digital signal


 It is defined as the maximum bit rate of the signal to be transmitted.
 It is measured in bits per second.

15
Figure: Bandwidth of a signal in time domain and frequency domain

3.4 Bandwidth of a Channel


 A channel is the medium through which the signal carrying information will be
passed.
 In terms of analog signal, bandwidth of the channel is the range of frequencies
that the channel can carry.
 In terms of digital signal, bandwidth of the channel is the maximum bit rate
supported by the channel. i.e. the maximum amount of data that the channel can
carry per second.
 The bandwidth of the medium should always be greater than the bandwidth of the
signal to be transmitted else the transmitted signal will be either attenuated or
distorted or both leading in loss of information.
 The channel bandwidth determines the type of signal to be transmitted i.e. analog
or digital.

3.5 Maximum Data Rate of a Channel

Data rate depends on three factors:

1. The bandwidth available

2. The level of the signals we use 3.

The quality of the channel (the level of noise)

The quality of the channel indicates two types:


16
a) A Noiseless or Perfect Channel
 An ideal channel with no noise.
 The Nyquist Bit rate derived by Henry Nyquist gives the bit rate for a
Noiseless Channel.
b) A Noisy Channel
 A realistic channel that has some noise.
 The Shannon Capacity formulated by Claude Shannon gives the bit rate
for a Noisy Channel

3.5.1 Nyquist Bit Rate

The Nyquist bit rate formula defines the theoretical maximum bit rate for a noiseless
channel.

Bitrate = 2 x Bandwidth x Log2L

Where,

 Bitrate is the bitrate of the channel in bits per second.


 Bandwidth is the bandwidth of the channel.
 L is the number of signal levels.

Example: What is the maximum bit rate of a noiseless channel with a bandwidth of 5000
Hz transmitting a signal with two signal levels?

Solution: The bit rate for a noiseless channel according to Nyquist Bit rate can be calculated
as follows:

BitRate = 2 x Bandwidth x Log2 L = 2 x 5000 x log2 2 =10000 bps

3.5.2 Shannon Capacity

The Shannon Capacity defines the theoretical maximum bit rate for a noisy channel.

Capacity = bandwidth X log2 (1 +SNR)

Where,

 Capacity is the capacity of the channel in bits per second.


 Bandwidth is the bandwidth of the channel.
 SNR is the Signal to Noise Ratio

Shannon Capacity for calculating the maximum bit rate for a noisy channel does not
consider the number of levels of the signals being transmitted as done in the Nyquist bit
rate.

Example: Calculate the bit rate for a noisy channel with SNR 300 and bandwidth of
3000Hz Solution:

17
The bit rate for a noisy channel according to Shannon Capacity can be calculated as follows:

Capacity = bandwidth X log2 (1+SNR)

= 3000 x log2 (1 + 300)


= 3000 x log2 (301)
= 3000 x 8.23
= 24,690 bps

SWITCHING METHODS

4.1 Introduction

Switching is the generic method for establishing a path for point-to-point communication in
a network. It involves the nodes in the network utilizing their direct communication lines to
other nodes so that a path is established in a piecewise fashion. Each node has the capability
to ‘switch’ to a neighboring node (i.e., a node to which it is directly connected) to further
stretch the path until it is completed.

One of the most important functions of the network layer is to employ the switching
capability of the nodes in order to route messages across the network. There are two basic
methods of switching circuit switching and packet switching.

4.1.1 Circuit Switching

In circuit switching, two communicating stations are connected by a dedicated


communication path which consists of intermediate nodes in the network and the links that
connect these nodes.

Figure: A switched path.

The Figure below, shows a simple circuit switch which consists of a 3×3 matrix, capable of
connecting any of its inlets (a, b, and c) to any of its outlets (d, e, and f). Each crosspoint
appears as a circle. A hollow circle means that the crosspoint is off (i.e., the two crossing
wires are not connected). A solid circles means that the crosspoint is on (i.e., the crossing

18
wires are connected). Switches may also have more inlets than outlets, or more outlets than
inlets.)

Figure: A simple circuit switch.

When the two hosts shown in the figure initiate a connection, the network determines a path
through the intermediate switches and establishes a circuit which is maintained for the
duration of the connection. When the hosts disconnect, the network releases the circuit.

Figure: Circuit Switching

Communication through circuit switching implies that there is a dedicated communication


path between the two stations. The path is a connected through a sequence of links between
network nodes. On each physical link, a logical channel is dedicated to the connection.
Circuit switching is commonly used technique in telephony, where the caller sends a special
message with the address of the callee (i.e. by dialling a number) to state its destination. It
involved the following three distinct steps, as shown in the Figure above.

Circuit Establishment: To establish an end-to-end connection before any transfer of data.


Some segments of the circuit may be a dedicated link, while some other segments may be
shared.

Data transfer:

Transfer data is from the source to the destination. The data may be analog or digital,
depending on the nature of the network. The connection is generally full-duplex.

19
Circuit disconnect:

Terminate connection at the end of data transfer.

• Signals must be propagated to deallocate the dedicated resources.

Figure: Circuit Switching Technique

4.1.2 Switching Node

Let us consider the operation of a single circuit switched node comprising a collection of
stations attached to a central switching unit, which establishes a dedicated path between any
two devices that had the intention to communicate.

Major elements of a single-node network are summarized as follows:

I. Digital switch: It provides a transparent (full-duplex) signal path between any


pair of attached devices.
II. Network interface: It represents the functions and hardware needed to connect
digital devices to the network (like telephones).
III. Control unit: It establishes, maintains, and break a connection.

An important characteristic of a circuit-switch node is whether it is blocking or non-


blocking.

A blocking network is one, which may be unable to connect two stations because all
possible paths between them are already in use.

A non-blocking network permits all stations to be connected (in pairs) at once and grants
all possible connection requests as long as the called party is free. For a network that
supports only voice traffic, a blocking configuration may be acceptable, since most phone
calls are of short duration. For data applications, where a connection may remain active for
hours, non-blocking configuration is desirable.

20
Figure: Schematic Diagram of a Switching node

Circuit switching uses any of the three (3) technologies: Space division switches, Time-
division switches or a combination of both.

In Space-division switching, the paths in the circuit are separated with each other spatially,
i.e. different ongoing connections, at a same instant of time, uses different switching paths,
which are separated spatially. This was originally developed for the analog environment,
and has been carried over to the digital domain. Some of the space switches are crossbar
switches, Multistage switches (e.g. Omega Switches). Basic building block of the switch is a
metallic cross-point or semiconductor gate that can be enabled or disabled by a control unit.

Some of the limitations crossbar can be overcome with the help of multistage space
division switches. By splitting the crossbar switch into smaller units and interconnecting
them, it is possible to build multistage switches with fewer cross-points.

4.1.3 Time Division Switching

Both voice and data can be transmitted using digital signals through the same switches. All
modern circuit switches use digital time-division multiplexing (TDM) technique for
establishing and maintaining circuits. Synchronous TDM allows multiple low-speed bit
streams to share a high-speed line.

21
Figure: Time Division Multiplexing

Time-division switching uses time-division multiplexing to achieve switching, i.e. different


ongoing connections can use same switching path but at different interleaved time intervals.

4.1.4 Packet Switching

Packet switching was designed to address the shortcomings of circuit switching in dealing
with data communication. Unlike circuit switching where communication is continuous
along a dedicated circuit, in packet switching, communication is discrete in form of packets.
Each packet is of a limited size and can hold up to a certain number of octets of user data.
Larger messages are broken into smaller chunks so that they can be fitted into packets. In
addition to user data, each packet carries additional information (in form of a header) to
enable the network to route it to its final destination.

A packet is handed over from node to node across the network. Each receiving node
temporarily stores the packet, until the next node is ready to receive it, and then passes it
onto the next node. This technique is called store-and-forward and overcomes one of the
limitations of circuit switching. A packet-switched network has a much higher capacity for
accepting further connections. Additional connections are usually not blocked but simply
slow down existing connections, because they increase the overall number of packets in the
network and hence increase the delivery time of each packet. Figure below depicts a simple
packet switch with six I/O channels (a through f). Each channel has an associated buffer
which is used to store packets in transit. The operation of the switch is controlled by a
microprocessor. A packet received on any of the channels can be passed onto any of the
other channels by the microprocessor moving it to the corresponding buffer.

22
Figure: A simple packet switch

Two variations of packet switching exist: virtual circuit and datagram.

The virtual circuit method (also known as connection oriented) is closer to circuit
switching. In this, a complete route is worked out prior to sending data packets. The route is
established by sending a connection request packet along the route to the intended
destination. This packet informs the intermediate nodes about the connection and the
established route so that they will know how to route subsequent packets. The result is a
circuit somewhat similar to those in circuit switching, except that it uses packets as its basic
unit of communication. Hence it is called a virtual circuit.

Each packet carries a virtual circuit identifier which enables a node to determine to which
virtual circuit it belongs and hence how it should be handled. The virtual circuit identifier is
essential because multiple virtual circuits may pass through the same node at the same time.
Because the route is fixed for the duration of the call, the nodes spend no effort in
determining how to route packets.

The figure below illustrates the virtual circuit method using the switch. When the two hosts
initiate a connection, the network layer establishes a virtual circuit (denoted by shaded
switches) which is maintained for the duration of the connection. When the hosts
disconnect, the network layer releases the circuit. The packets in transit are displayed as
dark boxes within the buffers. These packets travel only along the designated virtual circuit.

Figure: Packet switching with virtual circuit

23
The datagram method (also known as connectionless) does not rely on a pre-established
route, instead each packet is treated independently. Therefore, it is possible for different
packets to travel along different routes in the network to reach the same final destination. As
a result, packets may arrive out of order, or even never arrive (due to node failure). It is up
to the network user to deal with lost packets, and to rearrange packets to their original order.
Because of the absence of a pre-established circuit, each packet must carry enough
information in its header to enable the nodes to route it correctly. The figure below
illustrates the datagram method. Noting how the packets exercise different routes.

Figure: Packet switching with datagrams

The advantage of the datagram approach is that because there is no circuit, congestion and
faulty nodes can be avoided by choosing a different route. Also, connections can be
established more quickly because of reduced overheads. This makes datagrams better suited
than virtual circuits for brief connections. For example, database transactions in banking
systems are of this nature, where each transaction involves only a few packets.

The advantage of the virtual circuit approach is that because no separate routing is required
for each packet, they are likely to reach their destination more quickly; this leads to
improved throughput. Furthermore, packets always arrive in order.

Virtual circuits are better suited to long connections that involve the transfer of large
amounts of data (e.g., transfer of large files). Because packet switching is the more
dominant form of switching for data communication, we may need to focus our attention on
this form of switching from now on.

4.1.5 Switching Modes

24
Any delay in passing traffic is known as latency. Switches offer three ways to switch the
traffic depending upon how thoroughly you want the frame to be checked before it is passed
on. The more checking you want, the more latency you will introduce to the switch.

The three (3) switching modes to choose from are:

 Cut-through
 Store-and-forward
 Fragment-free
 Cut-through Mode: Cut-through switching is the fastest switching method,
meaning it has the lowest latency. The incoming frame is read up to the destination
MAC address. Once it reaches the destination MAC address, the switch then checks
its MAC table for the correct port to forward the frame out of and sends it on its
way. There is no error checking, so this method gives you the lowest latency. The
consequence is that the switch will forward any frames containing errors.
 Store-and-forward Mode: in this, the switch reads the entire frame and copies it
into its buffers. A cyclic redundancy check (CRC) takes place to check the frame for
any errors. If errors are found, the frame is dropped. Otherwise the switching table is
examined and the frame forwarded.
 Fragment-free (modified cut-through/runt-free) Mode: Since cut-through can’t
ensure that all frames are good and store-and-forward takes too long, we need a
method that is both reliable and fast. Using an example of a nightclub security,
imagine you are asked to make sure that everyone has an ID and that the picture on
the ID matches the person. With this method you have to make sure everyone is who
they say they are, but you do not have to take down all the information. In switching,
we accomplish this by using the fragment-free method of switching.

NETWORK MODELS

5.1 Introduction

In the study of computer networks it is essential to study the way our networks work.
Computer networks are operated by network models; most prominently the Open Systems
Inter Connection Reference Model (OSIRM) and the Transmission Control Protocol/
Internet Protocol (TCP/ IP) Model. This section provides the understanding of the OSI
reference model.

25
5.2 The Concept of Layered Task

i. The main objective of a computer network is to be able to transfer the data from
sender to receiver. This task can be done by breaking it into small sub tasks, each
of which are well defined.
ii. Each subtask will have its own process or processes to do and will take specific
inputs and give specific outputs to the subtask before or after it. In more technical
terms we can call these sub tasks as layers.
iii. In general, every task or job can be done by dividing it into sub task or layers.
Consider the example of sending a letter where the sender is in City A and receiver
is in city B.

The process of sending letter is shown below:

Figure: Concept of layer task: sending a letter

iv. The above figure depicts


a) Sender, receiver and carrier. b) Hierarchy of layers.
v. At the sender site, the activities take place in the following descending order:
a. Higher Layer: The sender writes the letter along with the sender and receivers
address and put it in an envelope and drop it in the mailbox.
b. Middle Layer: The letter is picked up by the post man and delivered to the post
office c. Lower Layer: The letters at the post office are sorted and are ready to be
transported through a carrier.
vi. During transition the letter may be carried by truck, plane or ship or a combination of
transport modes before it reaches the destination post office.

26
vii. At the Receiver side, the activities take place in the following ascending order:
a. Lower Layer: The carrier delivers the letter to the destination post office
b. Middle Layer: After sorting, the letter is delivered to the receivers’ mail box
c. Higher Layer: The receiver picks up the letter, opens the envelope and reads it.
viii. Hierarchy of layers: The activities in the entire task are organized into three layers.
Each activity at the sender or receiver side occurs in a particular order at the hierarchy.
ix. The important and complex activities are organized into the Higher Layer and the
simpler ones into middle and lower layer.
5.3 Open System Inter Connection Reference Model

5.3.1 OSI Model and its Layers

 The Open Systems Interconnection (OSI) Model was developed by International


Organization for Standardization (ISO).
 ISO is the organization, OSI is the model.
 It was developed to allow systems with different platforms to communicate with each
other. Platform could mean hardware, software or operating system.
 It is a network model that defines the protocols for network communications.
 It is a hierarchical model that groups its processes into layers. It has 7 layers as follows:
(Top to Bottom) (APSTNDP).
1. Application Layer
2. Presentation Layer
3. Session Layer
4. Transport Layer
5. Network Layer
6. Data Link Layer
7. Physical Layer
 Each layer has specific duties to perform and has to cooperate with the layers above and
below it.

5.3.2 Layered Architecture of OSI Model

 The OSI model has 7 layers each with its own dedicated task.
 A message sent from Device A to Device B has to pass through all layers at A from top
to bottom then all layers at B from bottom to top as shown in the figure below.
 At Device A, the message is sent from the top layer i.e. Application Layer of A then all
the layers till it reaches its physical layer and then it is transmitted through the
transmission medium.

27
 At Device B, the message received by the physical layer passes through all its other
layers and moves upwards till it reaches its Application Layer.

Figure: Flow of data from Device A to Device B via the various layers
 As the message travels from device A to device B, it may pass through many
intermediate nodes. These intermediate nodes usually involve only the first three layers
of the OSI model as shown below.
 The Data Link layer determines the next node where the message is supposed to be
forwarded and the network layer determines the final recipient.

Figure: Data Transfer through Intermediate nodes


5.3.3 Communication and Interfaces
 For communication to occur, each layer in the sending device adds its own
information to the message it receives from the layer just above it and passes the
whole package to the layer just below it. Each layer in the receiving device removes
the information added at the corresponding layer and sends the obtained data to the
layer above it.
 Every Layer has its own dedicated function or services and is different from the
function of the other layers.
 On every sending device, each layer calls upon the service offered by the layer
below it.

28
 On every receiving device, each layer calls upon the service offered by the layer
above it.
 Between two devices, the layers at corresponding levels communicate with each
other .i.e. layer 2 at receiving end can communicate and understand data from layer
2 of sending end. This is called peer-to-peer communication.
 For this communication to be possible between every two adjacent layers there is an
interface. An interface defines the service that a layer must provide. Every layer has
an interface to the layer above and below it as shown in the figure below.

Figure: Communication and Interfaces in the OSI model

Figure: Encapsulation

29
 As shown in the figure above the data at layer 7 i.e. the Application layer along with
the header added at layer 7 is given to layer 6, the Presentation layer. This layer adds
its header and passed the whole package to the layer below.
 The corresponding layers at the receiving side removes the corresponding header
added at that layer and sends the remaining data to the above layer.
 The above process is called encapsulation.

4.3.5 Description of Layers in the OSI Model

Physical Layer

i. The Physical Layer provides a standardized interface to physical transmission media,


including:
a. Mechanical specification of electrical connectors and cables, for example maximum
cable length.
b. Electrical specification of transmission line.
c. Bit-by-bit or symbol-by-symbol delivery.
ii. On the sender side, the physical layer receives the data from Data Link Layer and
encodes it into signals to be transmitted onto the medium. On the receiver side, the
physical layer receives the signals from the transmission medium decodes it back into
data and sends it to the Data Link Layer as shown in the figure below:

Figure: Transmission of data to and from Physical Layer

iii. Interface: the Physical Layer defines the characteristics of interfaces between the
devices and transmission medium.
iv. Representation of bits: the physical layer is concerned with transmission of signals
from one device to another which involves converting data (1‘s & 0‘s) into signals and
vice versa. It is not concerned with the meaning or interpretation of bits.
v. Data rate: the physical layer defines the data transmission rate i.e. number of bits sent
per second. It is the responsibility of the physical layer to maintain the defined data rate.
vi. Synchronization of bits: to interpret correct and accurate data the sender and receiver
have to maintain the same bit rate and also have synchronized clocks.
vii. Line configuration: the physical layer defines the nature of the connection .i.e. a
point to point link, or a multi-point link.

30
viii. Physical Topology: the physical layer defines the type of topology in which the
device is connected to the network. In a mesh topology it uses a multipoint connection
and other topologies it uses a point to point connection to send data.
ix. Transmission mode: the physical layer defines the direction of data transfer between the
sender and receiver. Two devices can transfer the data in simplex, half duplex or full
duplex mode.
x. Main responsibility of the physical layer Transmission of bits from one hop to the next.

Data Link Layer

i. The Data Link layer adds reliability to the physical layer by providing error detection and
correction mechanisms.
ii. On the sender side, the Data Link layer receives the data from Network Layer and
divides the stream of bits into fixed size manageable units called as Frames and sends it
to the physical layer. On the receiver side, the data link layer receives the stream of bits
from the physical layer and regroups them into frames and sends them to the Network
layer. This process is called Framing. It is shown in the figure below:

Figure: Data Link Layer: The process of framing

iii. Physical Addressing (inside /outside senders network)


a. The Data link layer appends the physical address in the header of the frame before
sending it to physical layer.
b. The physical address contains the address of the sender and receiver.
c. In case the receiver happens to be on the same physical network as the sender; the
receiver is at only one hop from the sender and the receiver address contains the
receiver‘s physical address.
d. In case the receiver is not directly connected to the sender, the physical address is the
address of the next node where the data is supposed to be delivered.
iv. Flow control
a. the data link layer makes sure that the sender sends the data at a speed at which the
receiver can receive it, else if there is an overflow at the receiver side the data will be
lost.
b. the data link layer imposes flow control mechanism over the sender and receiver to
avoid overwhelming of the receiver.
v. Error control
a. The data link layer imposes error control mechanism to identify lost or damaged
frames, duplicate frames and then retransmit them.

31
b. Error control information is present in the trailer of a frame.
vi. Access Control
a. The data link layer imposes access control mechanism to determine which device has
right to send data in a multipoint connection scenario.

vii.Main Responsibility
i. the main responsibility of the data link layer is hop to hop transmission of frames.

Network Layer
i. The network layer makes sure that the data is delivered to the receiver despite multiple
intermediate devices.
ii. The network layer at the sending side accepts data from the transport layer, divides it into
packets, adds addressing information in the header and passes it to the data link layer. At
the receiving end the network layer receives the frames sent by data link layer, converts
them back into packets, verifies the physical address (verifies if the receiver address
matches with its own address) and then send the packets to the transport layer.

Figure: Network Layer

iii. The network layer is responsible for source to destination of delivery of data. Hence, it
may have to route the data through multiple networks via multiple intermediate devices.
In order to achieve this the network layer relies on two things:
a. Logical Addressing
b. Routing
iv. Logical Addressing: the network layer uses logical address commonly known as IP
address to recognize devices on the network.
 An IP address is a universally unique address which enables the network layer to
identify devices outside the sender‘s network.
 The header appended by the network layer contains the actual sender and receiver IP
address.
 At every hop the network layer of the intermediate node check the IP address in the
header, if its own IP address does not match with the IP address of the receiver found in
the header, the intermediate node concludes that it is not the final node but an
intermediate node and passes the packet to the data link layer where the data is
forwarded to the next node.
v. Routing
 The network layer divides data into units called packets of equal size and bears a
sequence number for rearranging on the receiving end.

32
 Each packet is independent of the other and may travel using different routes to reach
the receiver hence may arrive out of turn at the receiver.
 Hence, every intermediate node which encounters a packet tries to compute the best
possible path for the packet. The best possible path may depend on several factors such
as congestion, number of hops, etc.
 This process of finding the best path is called as Routing. It is done using routing
algorithms.
vi. The Network layer does not perform any flow control or error control.
vii. Main Responsibility
 The main responsibility of Network Layer is transmission of packets from source to
destination.

Transport Layer

i. A logical address at network layer facilitates the transmission of data from source to
destination device. But the source and the destination both may be having multiple
processes communicating with each other. Therefore, it is important to deliver the data
not only from the sender to the receiver but from the correct process on the sender to
the correct process on the receiver. The transport layer takes care of process to process
delivery of data and makes sure that it is intact and in order.
ii. At the sending side, the transport layer receives data from the session layer, divides it
into units called segments and sends it to the network layer. At the receiving side, the
transport layer receives packets from the network layer, converts and arranges into
proper sequence of segments and sends it to the session layer.

Figure: Transport Layer

iii. To ensure process to process delivery the transport layer makes use of port address to
identify the data from the sending and receiving process. A Port Address is the name
or label given to a process. It is a 16 bit address. Example, TELNET uses port address
23, HTTP uses port address 80. Port address is also called as Service Point Address.
iv. The data can be transported in a connection oriented or connectionless manner. If the
connection is connection oriented then all segments are received in order else they are
independent of each other and are received out of order and have to be rearranged.
v. The Transport layer is responsible for segmentation and reassembly of the message
into segments which bear sequence numbers. This numbering enables the receiving
transport layer to rearrange the segments in proper order.

33
vi. Flow Control and Error control: the transport layer also carries out flow control and
error control functions; but unlike data link layer these are end to end rather than node
to node.
vii. Main Responsibility
The main responsibility of the transport layer is process to process delivery of the
entire message.

Session Layer

i. The session layer establishes a session between the communicating devices called
dialog and synchronizes their interaction. It is the responsibility of the session layer to
establish and synchronize the dialogs. It is also called the network dialog controller.
ii. The session layer at the sending side accepts data from the presentation layer adds
checkpoints to it called syn bits and passes the data to the transport layer. At the
receiving end, the session layer receives data from the transport layer removes the
checkpoints inserted previously and passes the data to the presentation layer.
iii. The checkpoints or synchronization points is a way of informing the status of the data
transfer. Example, A checkpoint after first 500 bits of data will ensure that those 500
bits are not sent again in case of retransmission at 650th bit.
iv. Main responsibility of session layer is dialog control and synchronization

Figure: Session Layer

Presentation Layer

i. The communicating devices may be having different platforms. The presentation layer
performs translation, encryption and compression of data.
ii. The presentation layer at sending side receives the data from the application layer adds
header which contains information related to encryption and compression and sends it
to the session layer. At the receiving side, the presentation layer receives data from the
session layer decompresses and decrypts the data as required and translates it back as
per the encoding scheme used at the receiver.
iii. Translation: The sending and receiving devices may run on different platforms
(hardware, software and operating system). Hence it is important that they understand
the messages that are used for communicating. Hence a translation service may be
required which is provided by the Presentation layers

34
iv. Compression ensures faster data transfer. The data compressed at sender has to be
decompressed at the receiving end, both performed by the Presentation layer.
v. Encryption It is the process of transforming the original message to change its meaning
before sending it. The reverse process called decryption has to be performed at the
receiving end to recover the original message from the encrypted message.
vi. Main responsibility of Presentation layer is translation, compression and encryption.

Figure: Presentation Layer

Application Layer
i. The application layer enables the user to communicate its data to the receiver by
providing certain services. For example, Email is sent using X.400 service.
ii. X500 is a directory service used to provide information and access to distributed
objects.
iii. X400 is services that provides basis for mail storage and forwarding.
iv. FTAM (File transfer, access and management) provides access to files stored on remote
computers and mechanism for transfer and manage them locally.
v. Main Responsibility Main Responsibility of Application layer is to provide access to
network resources.

Figure: Application Layer


Summary
The responsibilities of the 7 layers of OSI model can be summarized as follows:
1. Application Layer: To provide the users access to network resources
2. Presentation Layer: To provide the functions of translation, encryption and
compression.

35
3. Session Layer: To establish, manage and terminate sessions.
4. Transport Layer: To provide process to process delivery of message.
5. Network Layer: To provide source to destination delivery of packets.
6. Datalink Layer: To provide hop to hop delivery of frames
7. Physical Layer: To transmit data over a bit stream from one hop to the next and
provide electrical and mechanical specification.

TCP/IP MODEL, ADDRESSING IN TCP/IP – IPV4

6.1 Introduction
After understanding the concept of layered task and understanding the OSI model we
introduce the TCP/IP model. This model is currently being used on our systems.
TCP/IP model is a collection of protocols often called a protocol suite. It offers a rich
variety of protocols from which we can choose from.
 It is also called as the TCP/IP protocol suite. It is a collection of protocols.
 It is a hierarchical model, i.e. there are multiple layers and higher layer protocols are
supported by lower layer protocols.
 It existed even before the OSI model was developed.
 Originally had four layers (bottom to top):
1. Host to Network Layer
2. Internetwork Layer (Network Layer)
3. Transport Layer
4. Application Layer
 The figure for TCP/IP model is as follows:

Figure: Layers of TCP/IP Reference Model


 The structure of TCP/IP model is very similar to the structure of the OSI reference
model. The OSI model has seven layers where the TCP/IP model has four layers.
 The Application layer of TCP/IP model corresponds to the Application Layer of
Session, Presentation & Application Layer of OSI model.
 The Transport layer of TCP/IP model corresponds to the Transport Layer of OSI
model.

36
 The Network layer of TCP/IP model corresponds to the Network Layer of OSI
model.
 The Host to network layer of TCP/IP model corresponds to the Physical and
Datalink Layer of OSI model.
 The diagram showing the comparison of OSI model and TCP/IP model along with
the protocols is as shown below:

Figure: Comparison of OSI model and TCP/IP model

Functions of the Layers of TCP/IP model:

A. Host to Network Layer.

This layer is a combination of protocols at the physical and data link layers. It supports all
standard protocols used at these layers.

B. Network Layer or IP
 Also called as the Internetwork Layer (IP). It holds the IP protocol which is a network
layer protocol and is responsible for source to destination transmission of data.
 The Internetworking Protocol (IP) is a connection-less and unreliable protocol.

37
 It is a best effort delivery service. i.e. there is no error checking in IP, it simply sends
the data and relies on its underlying layers to get the data transmitted to the destination.
 IP transports data by dividing it into packets or datagrams of same size. Each packet is
independent of the other and can be transported across different routes and can arrive
out of order at the receiver.
 In other words, since there is no connection set up between the sender and the receiver
the packets find the best possible path and reach the destination. Hence, the word
connection-less.
 The packets may get dropped during transmission along various routes. Since IP does
not make any guarantee about the delivery of the data its call an unreliable protocol.
 Even if it is unreliable IP cannot be considered weak and useless; since it provides only
the functionality that is required for transmitting data thereby giving maximum
efficiency. Since there is no mechanism of error detection or correction in IP, there will
be no delay introduced on a medium where there is no error at all.
 IP is a combination of four (4) protocols:
1. Address Resolution Protocol (ARP)
2. Reverse Address Resolution Protocol (RARP)
3. Internet Control Message Protocol (ICMP)
4. Internet Group Message Protocol (IGMP)

1. ARP – Address Resolution Protocol

i. It is used to resolve the physical address of a device on a network, where its logical
address is known.
ii. Physical address is the 48 bit address that is imprinted on the NIC or LAN card, Logical
address is the Internet Address or commonly known as IP address that is used to
uniquely and universally identify a device.

2. RARP– Reverse Address Resolution Protocol

i. It is used by a device on the network to find its Internet address when it knows its
physical address.

3. ICMP- Internet Control Message Protocol

i. It is a signaling mechanism used to inform the sender about datagram problems that
occur during transit.
ii. It is used by intermediate devices.

38
iii. In case and intermediate device like a gateway encounters any problem like a corrupt
datagram it may use ICMP to send a message to the sender of the datagram.

4. IGMP- Internet Group Message Protocol

i. It is a mechanism that allows to send the same message to a group of recipients.


C. Transport Layer
 Transport layer protocols are responsible for transmission of data running on a process
of one machine to the correct process running on another machine.
 The transport layer contains three protocols:
1. Transmission Control Protocol (TCP)
2. User Datagram Protocol (UDP)
3. Stream Control Transmission Protocol (SCTP)

1. TCP – Transmission Control Protocol

i. TCP is a reliable connection-oriented, reliable protocol. i.e. a connection is established


between the sender and receiver before the data can be transmitted.

ii. It divides the data it receives from the upper layer into segments and tags a sequence
number to each segment which is used at the receiving end for reordering of data.

2. UDP – User Datagram Protocol

i. UDP is a simple protocol used for process to process transmission.

ii. It is an unreliable, connectionless protocol for applications that do not require flow
control or error control.

iii. It simply adds port address, checksum and length information to the data it receives from
the upper layer.

3. SCTP – Stream Control Transmission Protocol

i. SCTP is a relatively new protocol added to the transport layer of TCP/IP protocol suite.

ii. It combines the features of TCP and UDP.

iii. It is used in applications like voice over Internet and has a much broader range of
applications.

D. Application Layer

39
i. The Application Layer is a combination of Session, Presentation and Application Layers
of OSI models and define high level protocols like File Transfer (FTP), Electronic Mail
(Simple Mail Transfer Protocol-SMTP), Virtual Terminal (Text-based Network protocol-
TELNET), Domain Name Service (DNS) and so on.

6.2 Addressing in TCP/IP

The TCP/IP protocol suited involves 4 different types of addressing:

1. Physical Address
2. Logical Address
3. Port Address
4. Specific Address

Figure: Addressing in TCP/IP Model


Each of these addresses are described below:
1. Physical Address.
i. Physical Address is the lowest level of addressing, also known as link address.
ii.It is local to the network to which the device is connected and unique inside it.
iii. The physical address is usually included in the frame and is used at the data link
layer.
iv. MAC is a type of physical address that is 6 byte (48 bit) in size and is imprinted on
the Network Interface Card (NIC) of the device.

40
v. The size of physical address may change depending on the type of network. Example.
An Ethernet network uses a 6 byte MAC address.
2. Logical Address
i. Logical Addresses are used for universal communication.
ii.Most of the times the data has to pass through different networks; since physical
addresses are local to the network there is a possibility that they may be duplicated
across multiples networks also the type of physical address being used may change
with the type of network encountered. For example, Ethernet to wireless to fiber optic.
Hence, physical addresses are inadequate for source to destination delivery of data in
an internetwork environment.
iii. Logical Address is also called as IP Address (Internet Protocol address).
iv. At the network layer, device i.e. computers and routers are identified universally by
their IP Address.
v. IP addresses are universally unique.
vi. Currently, there are two versions of IP addresses being used:
a. IPv4: 32 bit address, capable of supporting 232 nodes
b. IPv6: 128 bit address, capable of supporting 2128 nodes.
3. Port Address
i. A logical address facilitates the transmission of data from source to destination device.
But the source and the destination both may be having multiple processes communicating
with each other.
Example. Users A and B are chatting with each other using Google Talk, Users B and C are
exchanging emails using Hotmail. The IP address will enable transmitting data from A to B,
but still the data needs to be delivered to the correct process. The data from A cannot be
given to B on yahoo messenger since A and B are communicating using Google Talk.
ii. Since the responsibility of the IP address is different there is a need of addressing that
helps identify the source and destination processes. In other words, data needs to be
delivered not only on the correct device but also on the correct process on the correct
device.
iii. A Port Address is the name or label given to a process. It is a 16 bit address.
iv. Example. TELNET uses port address 23, HTTP uses port address 80
4. Specific Address
i. Port addresses address facilitates the transmission of data from process to process but still
there may be a problem with data delivery.

41
For Example: Consider users A, B and C chatting with each other using Google Talk. Every
user has two windows open, user A has two chat windows for B and C, user B has two chat
windows for A and C and so on for user C.
Now a port address will enable delivery of data from user A to the correct process (in this
case Google Talk) on user B but now there are two windows of Google Talk for user A and
C available on B where the data can be delivered.
ii. Again the responsibility of the port address is over here and there is a need of addressing
that helps identify the different instances of the same process.
iii. Such address are user friendly addresses and are called specific addresses.
iv. Other Examples: Multiple Tabs or windows of a web browser work under the same
process that is HTTP but are identified using Uniform Resource Locators (URL), Email
addresses.
6.3 IP Protocol -IPV4
Packets in the IPv4 format are called datagram. An IP datagram consists of a header part
and a text part (payload). The header has a 20-byte fixed part and a variable length optional
part. It is transmitted in big-endian order: from left to right, with the high order bit of the
Version field going first. IPv4 can be explained with the help of following points:
1. IP addresses
2. Address Space
3. Notations used to express IP address
4. Classfull Addressing
5. Subnetting
6. Class Inter-Domain Routing (CIDR)
7. Network Address Translation (NAT)
8. IPv4 Header Format
6.3.1 IP addresses
 Every host and router on the Internet has an IP address, which encodes its network
number and host number.
 The combination is unique: in principle, no two machines on the Internet have the same
IP address.
 An IPv4 address is 32 bits long.
 They are used in the Source address and Destination address fields of IP packets.
 An IP address does not refer to a host but it refers to a network interface.
6.3.2 Address Space

42
 An address space is the total number of addresses used by the protocol. If a protocol uses
N bits to define an address, the address space is 2 N because each bit can have two
different values (0 or 1) and N bits can have 2N values.
 IPv4 uses 32-bit addresses, which means that the address space is 2 32 or 4,294,967,296
(more than 4 billion).
6.3.3 Notations
There are two notations to show an IPv4 address:
1. Binary notation
The IPv4 address is displayed as 32 bits. Example. 11000001 10000011 00011011
11111111.
2. Dotted decimal notation
To make the IPv4 address easier to read, Internet addresses are usually written in
decimal form with a decimal point (dot) separating the bytes. Each byte (octet) is 8
bits hence each number in dotted-decimal notation is a value ranging from 0 to 255.
Example. 129.11.11.239.
6.3.4 Classful addressing
In classful addressing, the address space is divided into five classes: A, B, C, D, and E.

Figure: Classful Addressing: IPV4


Net_id and Host_id
 In classful addressing, an IP address in class A, B, or C is divided into net_id and
host_id.
 These parts are of varying lengths, depending on the class of the address as shown above.
Information on the Number of networks and host in each class is given below:

43
 The IP address 0.0.0.0 is used by hosts when they are being booted.
 All addresses of the form 127.xx.yy.zz are reserved for loopback testing, they are
processed locally and treated as incoming packets.
6.3.5 Subnetting.
 It allows a network to be split into several parts for internal use but still act like a single
network to the outside world.
 To implement subnetting, the router needs a subnet mask that indicates the split between
network + subnet number and host. Example. 255.255.252.0/22. A”/22” to indicate that
the subnet mask is 22 bits long.
 Consider a class B address with 14 bits for the network number and 16 bits for the host
number where some bits are taken away from the host number to create a subnet number.

Figure: Class B network subnetted into 64 subnets.


 If 6 bits from the host Id are taken for subnet then available bits are :
14 bits for network + 6 bits for subnet + 10 bits for host.
 With 6 bits for subnet the number of possible subnets is 26 which is 64.
 With 10 bits for host the number of possible host are 210 which is 1022 (0 & 1 are not
available)
6.3.6 CIDR
A class B address is far too large for most organizations and a class C network, with
256 addresses is too small. This leads to granting Class B address to organizations
who do not require all the address in the address space wasting most of it.

44
This is resulting in depletion of Address space. A solution is CIDR (Classless Inter-
Domain Routing). The basic idea behind CIDR, is to allocate the remaining IP
addresses in variable-sized blocks, without regard to the classes.
6.3.7 NAT (Network Address Translation)
 The scarcity of network addresses in IPv4 led to the development of IPv6.
 IPv6 uses a 128 bit address, hence it has 2128 addresses in its address space which is
larger than 232 addresses provided by IPv4.
 Transition from IPv4 to IPv6 is slowly occurring, but will take years to complete,
because of legacy hardware and its incompatibility to process IPv6 address.
 NAT (Network Address Translation) was used to speed up the transition process.
 The only rule is that no packets containing these addresses may appear on the
Internet itself. The three reserved ranges are:
10.0.0.0 – 10.255.255.255/8 (16,777,216 hosts)
172.16.0.0 – 172.31.255.255/12 (1,048,576 hosts)
192.168.0.0 – 192.168.255.255/16 (65,536 hosts).
 Operation:
Within the Organization, every computer has a unique address of the form 10.x.y.z.
However, when a packet leaves the organization, it passes through a NAT box that
converts the internal IP source address, 10.x.y.z, to the organizations true IP address,
198.60.42.12 for example.
6.3.6 IP Header

Figure: The IPv4 (Internet Protocol) header


The description of the fields shown in the diagram is as follows:

45
Summary

1. TCP/IP has 4 layers: host to network, IP, Transport & Application.

2. It uses 4 levels of address: physical, logical, port & specific

3. IP address uniquely identifies a device on the Internet

Example of subnetting:

Subnetting basics

46
 Subnet mask
 Network ID
 Host ID
RRRR XXXX YYYY ZZZZ
8 bits (octet) 8 bits (octet) 8 bits (octet) 8 bits (octet)

+
Network Bits Host Bits (Denoted
(Denoted by ‘1’) by ‘0’)

The major 3 classes that are often used;

Class A, Class B and Class C.

Class A- (0-127) N H H H
Class B- (128-191)
N N H H
Class C- (192-223)
N N N H

Now let us have the binary representation of the network classes

Class A
11111111 00000000 00000000 00000000 16,777,216 Hosts
Class B 16
11111111 11111111 00000000 00000000 65,536 Hosts
Class C
11111111 11111111 11111111 00000000 256 Hosts

For us to understand how this values are obtained, we can use power of 2 approach.

2 2 2 2 24 25 26 27 28
0 1 2 3

1 2 4 8 1 3 6 12 25
145.65.16.0
6 2 4 8 6

145.65.0.0
Subnetting
Router

145.65.32.0
Subnet Mask of

Class A is 255. 0. 0. 0

Class B is 255. 255. 0. 0

Class C is 255. 255. 255. 0

47
CIDR is represented with slash ‘/’ notation.

For example, 204.195.150.10/27 it will be represented as follows.

11111111 11111111 11111111 11100000 204 means it is a class c network


address.

Then how to obtain Network ID?

Number of Host?

Broadcast ID?

1) Example; Let us consider the following.

Create the subnet of the following IP address 203.155.67.0/26. Then generate the;

 Subnet mask
 Network ID
 Number of Host
 Broadcast IP
 Number of Subnets

Solution

11111111 11111111 11111111 11000000

 Subnet mask is
255.255.255.2^7+2^6 = 255.255.255.128+64 = 255.255.255.192 is the subnet mask
 Network ID is

To get the Network ID, you need to perform logical AND operation for the binary bits of all
the subnet mask and the initial (given) IP address.

203.155.67.0 x y AND
1 1 1
AND 1 0 0
0 1 0
255. 255. 255. 192 0 0 0

Therefore, the Network ID is 203.155.67.0

 Number of Host is

We need to count the number of ‘0’ bits in the last octet of the IP address

11111111 11111111 11111111 11000000

And the formula is, number of host = 2n-2. The n is the number of ‘0’ bits

Number of host is 26-2 = 64-2 = 62

48
 Number of Subnet

This is represented as 2n, where n is the number of ‘1’ bits in the last octet or subnet part.

Number of subnet = 22 = 4. Therefore, we can have four (4) different subnets.

 Broadcast IP

You will need to consider the number of host calculated and then add a one (1) to the last
values.

Host range is 203.155.67.1


.
.
.
203.155.67.62
Therefore, the broadcast IP will be 203.155.67.63

2) Another example, considering the following IP address 207.144.77.0/24, create 10


subnets.

Solution

This is a Class C IP address.

To create 10 subnets, you need to use the formula for finding number of subnets which is 2 n.
Thus, we start from 20 = 1, 1 is less than 10, 21 = 2, 2 is less than 10, 22 = 4, 4 is less than 10,
23 = 8, 8 is less than 10, 24 =16, 16 is greater than 10.

Hence, we use n = 4

And the representation in binary is as follows.

11111111 11111111 11111111 11110000

Thus, the CIDR is 207.144.77.0/28

 Subnet mask is
255.255.255.2^7+2^6+2^5+2^4 = 255.255.255.128+64+32+16 = 255.255.255.240 is
the subnet mask
 Network ID

To get the Network ID, you need to perform logical AND operation for the binary bits of all
the subnet mask and the initial (given) IP address.

207.144.77.0 x y AND
1 1 1
AND 1 0 0
0 1 0
255. 255. 255. 240 0 0 0

49
Therefore, the Network ID is 207.144.77.0

 Number of Host is

We need to count the number of ‘0’ bits in the last octet of the IP address

11111111 11111111 11111111 11110000

And the formula is, number of host = 2n-2. The n is the number of ‘0’ bits

Number of host is 24-2 = 16-2 = 14 Hosts

 Number of Subnet

This is represented as 2n, where n is the number of ‘1’ bits in the last octet or subnet part.

Number of subnet = 24 = 16. Therefore, we can have sixteen (16) different networks/subnets.

 Broadcast IP

You will need to consider the number of host calculated and then add a one (1) to the last
values.

Host range is 207.144.77.1


.
.
.
207.144.77.14
Therefore, the broadcast IP will be 207.144.77.15

Assignment

Write short note on the following.

1. Parallel and serial transmissions (synchronous vs asynchronous).


2. Bus structures and loop systems
3. Give description of network based on ARPANET

50

You might also like