DCNnotes 1
DCNnotes 1
1.0 OBJECTIVES:
Introduce the readers
to
data
communication
and
its
fundamentals
Define networks
Define protocols
Standards in networking
2
1.1 INTRODUCTION
This chapter provides an introduction to Computer networks and
covers fundamental topics like data, information to the definition
of communication and 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 & 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 is 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
The effectiveness of any data communications system depends
upon the following four fundamental characteristics:
3
1. Delivery: The data should be delivered to the correct
destination and correct user.
2. 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.
3. 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.
4. Jitter: It is the variation in the packet arrival time. Uneven Jitter
may affect the timeliness of data being transmitted.
1.3.2 Components of Data Communication
A Data Communication system has five components as
shown in the diagram below:
Fig. Components of a Data Communication System
1. Message
Message is the information to be communicated by the sender to
the receiver.
2. Sender
The sender is any device that is capable of sending the data
(message).
3. Receiver
The receiver is a device that the sender wants to communicate the
data (message).
4. Transmission Medium
It is the path by which the message travels from sender to receiver.
It can be wired or wireless and many subtypes in both.
4
5. 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 know 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
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
5
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
wo devices communicate with each other by sending and
receiving data. The data can flow between the two devices in the
following ways.
1. Simplex
2. Half Duplex
3. Full Duplex
1.5.1 Simplex
Figure: Simplex mode of communication
In Simplex, communication is unidirectional
Only one of the devices sends the data and the other one
only receives the data.
Example: in the above diagram: a cpu send data while a
monitor only receives data.
1.5.2 Half Duplex
6
Figure: Half Duplex Mode of Communication
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 (as shown in figure above.)
Example: A walkie-talkie.
1.5.3 Full Duplex
Figure: Full Duplex Mode of Communication
In Full duplex mode, both stations can transmit and receive
at the same time.
Example: mobile phones
1.6 COMPUTER NETWORK
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 Compute network should ensure
reliability of the data communication process, should c
security of the data
7
performance by achieving higher throughput and
smaller delay times
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
a 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 Mumbai.
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 Elements of a Protocol
There are three key elements of a protocol:
8
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.7 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
o These are the standards that have been traditionally
used and mean by fact or by convention
o These standards are not approved by any organized
body but are adopted by widespread use.
2. De jure standard
o It means by law or by regulation.
o These standards are legislated and approved by
an body that is officially recognized.
1.7.2 Standard Organizations in field of Networking
9
oStandards are created by standards creation committees,
forums, and government regulatory agencies.
oExamples of Standard Creation Committees :
1. International Organization for Standardization(ISO)
2. International Telecommunications Union
Telecommunications Standard (ITU-T)
3. American National Standards Institute (ANSI)
4. Institute of Electrical & Electronics Engineers
(IEEE)
5. Electronic Industries Associates (EIA)
o Examples of Forums
1. ATM Forum
2. MPLS Forum
3. Frame Relay Forum
o Examples of Regulatory Agencies:
1. Federal Communications Committee (FCC)
1.8 REVIEW QUESTIONS
1. Differentiate between data & information. What are the different
forms in which data can be represented?
2. What are the characteristics of data communication?
3. What are the components of a data communication system?
4. Define computer network and categorize.
5. Explain protocols in details
1.9 REFERENCES
1. Data Communication & Networking Behrouz Forouzan
10
4
NETWORK MODELS
Unit Structure
4.0 Objectives
4.1 Introduction
4.2 Concept of Layered task
4.3 OSIRM
4.3.1 Introduction to OSI Model & its layers
4.3.2 Layered Architecture of OSI Model
4.3.3 Communication & Interfaces
4.3.4 Encapsulation of Data
4.3.5 Description of Layers in the OSI Model
4.4 Summary
4.5 Review Questions
4.6 References & Further Reading
4.0 OBJECTIVES
Understand concept of dividing a job into layered tasks
Get introduced to the OSIRM
Understand the functions of the various layers of the OSI
Mode.
4.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 OSIRM and the TCP/ IP
Model. This chapter gives the understanding of the OSI reference
model.
4.2 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.
11
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.
iv. The process of sending letter is shown below:
Fig: Concept of layer task: sending a letter
v. The above figure shows
a. Sender, Receiver & Carrier
b. Hierarchy of layers
vi. 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.
12
vii. 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.
viii. At the Receiver site, 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.
ix. 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.
x. The important and complex activities are organized into the
Higher Layer and the simpler ones into middle and lower
layer.
4.3 OPEN SYSTEMS INTER CONNECTION
REFERENCE MODEL (OSIRM )
4.3.1 Introduction to OSI Model & 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)
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 co-
operate with the layers above and below it.
13
4.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 passes 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 A then all the layers till it reaches its
physical layer and then it is transmitted through the
transmission medium.
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.
Fig: Flow of Data from Device A to Device B through 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.
14
Fig: Data Transfer through Intermediate nodes
The Data Link layer determines the next node where the
message is supposed to be forwarded and the network layer
determines the final recipient.
4.3.3 Communication & 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.
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
15
Fig: Communication & Interfaces in the OSI model
4.3.4 Encapsulation of Data
Fig: Encapsulation
16
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
4.3.5.1 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:
Fig: Transmission of data to and from Physical Layer
III. Interface
The Physical Layer defines the characteristics of interfaces
between the devices & transmission medium.
17
IV. Representation of bits
The physical layer is concerned with transmission of signals
from one device to another which involves converting data
(1s & 0s) 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.
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.
4.3.5.2 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:
18
Fig: 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 receivers 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.
b. Error control information is present in the trailer of a
frame.
19
VI. Access Control
a. The data link layer imposes access control
mechanism to determine which device has right to
send data in an multipoint connection scenario.
VII. Main Responsibility
i. The main responsibility of the data link layer is hop to
hop transmission of frames.
4.3.5.3 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 the send the packets to
the transport layer.
Fig: 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.
20
An IP address is a universally unique address which
enables the network layer to identify devices outside the
senders 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
VI. The network layer divides data into units called
packets of equal size and bears a sequence number for
rearranging on the receiving end.
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
4.3.5.4 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.
Hence 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.
21
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.
Fig: 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. Ex. 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.
VI. Flow Control & 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.
22
VII. Main Responsibility
The main responsibility of the transport layer is
process to process delivery of the entire message.
4.3.5.5 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. Ex. A
checkpoint after first 500 bits of data will ensure that
those 500 bits are not sent again in case of
retransmission at 650
th
bit.
IV. Main responsibility of session layer is dialog
control and synchronizatoin
4.3.5.6 Presentation Layer
I. The communicating devices may be having different
platforms. The presentation layer performs translation,
encryption and compression of data.
23
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.
Fig : Presentation Layer
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
IV. Compression
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
The main responsibility of the Presentation layer is
translation, compression and encryption.
4.3.5.7Application Layer
I. The application layer enables the user to
communicate its data to the receiver by providing
24
certain services. For ex. Email is sent using X.400
service.
Fig : Application Layer
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.
4.4 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.
3. Session Layer: To establish, manage and terminate sessions
25
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
26
TCP/IP IPV4
Unit Structure
5.0 Objectives
5.1 Introduction
5.2 TCP/IP Model,
5.3 Addressing In TCP/IP
5.4 IPv4
5.4.1 IP addresses
5.4.2 Address Space
5.4.3 Notations used to express IP address
5.4.4 Classfull Addressing
5.4.5 Subnetting
5.4.6 CIDR
5.4.7 NAT
5.4.8 IPv4 Header Format
5.5 Summary
5.6 Review Questions
5.7 References & Further Reading
5.0 OBJECTIVES
Understand the basics of TCP/IP model
Understand the functions of the different layers and
protocols involved
Understand the Addressing mechanisms used under the
TCP/IP
Understand IPv4 and importantly IP address and IP
header format
5.1 INTRODUCTION
After an understand of the concept of layered task and then
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.
27
5.2 TCP/IP MODEL
It is also called as the TCP/IP protocol suite. It is a collection
of protocols.
IT is a hierarchical model, ie. 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. Internet Layer
3. Transport Layer
4. Application Layer
The figure for TCP/IP model is as follows:
Application
Transport
Network or IP
Host to Network
Fig: Layers of TCP/IP Reference Model
The structure 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
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:
28
Fig: 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 an connection-less
& unreliable protocol.
29
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 protocols:
1. ARP
2. RARP
3. ICMP
4. 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 & 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.
30
II. It is used by intermediate devices.
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. TCP
2. UDP
3. 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
31
D. Application Layer
I. The Application Layer is a combination of Session,
Presentation & Application Layers of OSI models and
define high level protocols like File Transfer (FTP),
Electronic Mail (SMTP), Virtual Terminal (TELNET),
Domain Name Service (DNS), etc.
5.3 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
APPLICATION
LAYER
Processes
SPECIFIC
ADDRESS
TRANSPORT
LAYER
TCP UDP SCTP
PORT
ADDRESS
NETWORK
LAYER
IP and other
associated
protocols
LOGICAL
ADDRESS
HOST TO
NETWORK
LAYER
Protocols of underlying network used
at physical & data link layer
PHYSICAL
ADDRESS
Fig: Addressing in TCP/IP model
32
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.
v. The size of physical address may change depending on the
type of network. Ex. 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
ex: 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 2
32
nodes
b. IPv6: 128 bit address, capable of supporting 2
128
nodes
3. Port Address
VIII. 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.
33
Ex. Users A & B are chatting with each other using
Google Talk, Users B & 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 & B
are communicating using Google Talk.
IX. Since the responsibility of the IP address is over here
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.
X. A Port Address is the name or label given to a
process. It is a 16 bit address.
XI. Ex. 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.
For Ex: Consider users A, B & C chatting with each other
using Google Talk. Every user has two windows open, user
A has two chat windows for B & C, user B has two chat
windows for A & 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 &
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.
34
5.4 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. CIDR
7. NAT
8. IPv4 Header Format
5.4.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.
5.4.2 Address Space
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 2
N
values.
IPv4 uses 32-bit addresses, which means that the address
space is 2
32
or 4,294,967,296 (more than 4 billion).
5.4.3 Notations
There are two notations to show an IPv4 address:
1. Binary notation
The IPv4 address is displayed as 32 bits.
ex. 11000001 10000011 00011011 11111111
35
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.
Ex. 129.11.11.239
5.4.4 Classful addressing
In classful addressing, the address space is divided into five
classes: A, B, C, D, and E.
Figure: Classful addressing : IPv4
Netid and Hostid
In classful addressing, an IP address in class A, B, or C is
divided into netid and hostid.
These parts are of varying lengths, depending on the
class of the address as shown above.
36
Information on the Number of networks and host in each
class is given below:
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.
5.4.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. Ex. 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.
4Fig: A Class B network subnetted into 64 subnets.
37
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 2
6
which is 64.
With 10 bits for host the number of possible host are 2
10
which is 1022 (0 & 1 are not available)
5.4.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.
This is resulting in depletion of Address space.
A solution is CIDR (Classless InterDomain Routing) The
basic idea behind CIDR, is to allocate the remaining IP addresses
in variable-sized blocks, without regard to the classes.
5.4.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 2
128
addresses in
its address space which is larger than 2
32
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.
38
5.4.8 IP Header
Figure: The IPv4 (Internet Protocol) header
The description of the fields shown in the diagram is as
follows:
No Field Name Description
1 Version
Keeps track of the version of the protocol the
datagram belongs to (IPV4 or IPv6)
2 IHL
Used to indicate the length of the Header.
Minimum value is 5 Maximum value 15
3 Type of service Used to distinguish between different classes
of service
4 Total length It includes everything in the datagramboth
header and data. The maximum length is
65,535 bytes
5 Identification Used to allow the destination host to identify
which datagram a newly arrived fragment
belongs to. All the fragments of a datagram
contain the same Identification value
39
6 DF 1 bit field. It stands for Don't Fragment.
Signals the routers not to fragment the
datagram because the destination is
incapable of putting the pieces back together
again
7 MF MF stands for More Fragments. All fragments
except the last one have this bit set. It is
needed to know when all fragments of a
datagram have arrived.
8 Fragment offset
Used to determine the position of the
fragment in the current datagram.
9 Time to live It is a counter used to limit packet lifetimes. It
must be decremented on each hop. When it
hits zero, the packet is discarded and a
warning packet is sent back to the source
host.
10 Header
checksum
It verifies Header for errors.
11 Source address IP address of the source
12 Destination
address
IP address of the destination
13 Options The options are variable length. Originally,
five options were defined:
1. Security : specifies how secret the
datagram is
2. Strict source routing : Gives complete
path to be followed
3. Loose source routing : Gives a list of
routers not to be missed
4. Record route: Makes each router
append its IP address
5. Timestamp: Makes each router
append its IP address and timestamp
40
TRANSMISSION MEDIUM
Unit Structure
10.0 Objectives
10.1 Introduction
10.2 Transmission Medium
10.2.1 Categories of Transmission Medium
10.3 Guided Transmission Media
10.3.1 Twisted Pair Cable
10.3.1.1 Unshielded & Shielded Twisted Pair Cable
10.3.2 Co-axial Cable
10.3.3 Fiber Optic Cable
10.4 Unguided (wireless) Transmission Medium
10.4.1 Propagation Method of wireless signals
10.4.2. Types of wireless transmission
10.4.2.1. Radio waves
10.4.2.2. Microwaves
10.4.2.3. Infrared
10.5 Comparison between wired and wireless media
10.6 Comparison between twisted pair cable, co-axial cable and
optical fiber
10.7 Review Questions
10.8 References & Further Reading
10.0 OBJECTIVES
In this chapter, you will understand:
Definition of Transmission Medium and its types
Different types of Guided Transmission medium
Different types of UnGuided Transmission medium
Different ways in which wireless signals are transmitted
10.1 INTRODUCTION
In Data Communication networking, it is worth understanding
the medium through which data passes and what are the available
41
mediums and their types. This chapter give a thorough
understanding of the different types of transmission medium used
for data communication
10.2 TRANSMISSION MEDIA
Transmission media is ameans by which a communication
signal is carried from one system to another
A transmission medium can be defined as anything that can
carry information from a source to a destination.
The transmission medium is usually free space, metallic
cable or fiber optic cable.
Figure: Transmission of data from sender to receiver through
a medium
10.2.1 Categories of transmission media
Figure : Categories of Transmission Medium
42
10.3 GUIDED MEDIA
Guided Transmission media uses a cabling system that
guides the data signals along a specific path.
Guided media also known as Bounded media, which are
those that provide a conduit from one device to another,
include twisted-pair cable, coaxial cable, and fiber-optic
cable.
Out of these twisted-pair cable, coaxial cable transport
signals in the form of electric signals and fiber-optic cable
transport signals in the form of light.
Types:
1. Twisted-Pair Cable
2. Coaxial Cable
3. Fiber-OpticCable
10.3.1 Twisted-pair cable
Figure: Twisted Pair Cable
The wires is twisted twisted together in pairs.
Each pair would consist of wire used for the +ve data signal
and a wire used for the ve data signal. Any noise that
appears on +ve/ve wire of the pair would occur on
the other wire.
Because the wires are opposite polarities, they are 180
degrees out of phase (180 degree phases or definition of
opposite polarity) when the noise appears on both wires, it
cancels or nulls itself out at the receiving used.
Twisted pair cables are most effectively used in a system
that uses a balanced line method of transmission.
43
10.3.1.1 Unshielded Twisted Pair Cable (UTP)& Shielded
Twisted Pair Cable (STP)
Fig. Unshielded Twisted Pair Cable
Fig. Shielded Twisted Pair Cable
Cables with the shield are called shielded twisted pair and
commonly abbreviated STP.
Cables without a shield are called unshielded twisted pair or
UTP.
Twisting the wires together results in characteristics
impedance for the cable.
UTP or unshielded twisted pair cable is used on Ethernet
UTP cables are used for Ethernet cabling where 4 twisted pair
cables (a total of 8 wires are used)
10.3.2 Co-Axial Cable
Figure: Co-axial cable
Coaxial cable consists of 2 conductors.
The inner conductor is contained inside the insulator with the
other conductor weaves around it providing a shield.
An insulating protective coating called a jacket covers the
outer conductor.
44
The outer shield protects the inner conductor from outside
electrical signals.
The distance between the outer conductor (Shield) and inner
conductor plus the type of material used for insulating the
inner conductor determine the cable properties or
impedance. The excellent control of the impedance
characteristics of the cable allow higher data rates to be
transferred than twisted pair cable.
10.3.3 Fibre Optic Cable
Figure Fiber Optic Cable
Optical fiber consists of thin glass fiber that can carry
information at frequencies in the visible light spectrum.
The typical optical fiber consists of a very narrow strand of glass
called the cladding.
A typical core diameter is 62.5 microns.
Typically cladding has a diameter of 125 minors. Coating the
cladding is a protective coating consisting of plastic, it is called
the jacket.
The device generating the message has it in electromagnetic
form (electrical signal); this has to be converted into light (i.e.
optical signal) to send it on optic fiber cable. The process of
converting light to electric signal is done on the receiving side.
Advantages:
1. Small size and light weight: The size of the optical fibers is
very small.Therefore a large number of optical fibers can fit into
a cable of small diameter.
2. Easy availability and low cost: The material used for the
manufacturing of optical fibers is Silica glass. this material is
easily available. So the optical fibers cost lower than the cables
with metallic conductors.
45
3. No electrical or electromagnetic interference: Since the
transmission takes place in the form of light rays the signal is
not affected due to any electrical or electromagnetic
Interference.
4. Large Bandwidth: As the light rays have a very high frequency
in GHz range, the bandwidth of the optical fiber is extremely
large.
5. Other advantages: - No cross talk inside the optical fiber cable.
Signal can be sent up to 100 times faster.
10.4 UNGUIDED (WIRELESS) TRANSMISSION
MEDIUM
Unguided media transport data without using a physical
conductor. This type of communication is often referred to as
wireless communication.
It uses wireless electromagnetic signals to send data.
There are three types of Unguided Media
(i) Radio waves
(ii) Micro waves
(iii) Infrared.
Before understanding the different types of wireless
transmission medium, let us first understand the ways in which
wireless signals travel. These signals can be sent or propagated
in the following three ways:
1. Ground-wave propagation
2. Sky-wave propagation
3. Line-of-sight propagation
1. Ground-wave propagation
Figure : Ground Propagation of waves
46
Characteristics of Ground-wave propagation are as follows:
i. Follows contour of the earth
ii. Can Propagate considerable distances
iii. Frequencies up to 2 MHz
iv. Example
a. AM radio
2. Sky-wave propagation
Figure :of waves
Characteristics of Sky Propagation are as follows:
i. Signal reflected from ionized layer of atmosphere back down
to earth
ii. Signal can travel a number of hops, back and forth between
ionosphere and earths surface
iii. Reflection effect caused by refraction
iv. Examples
a. Amateur radio
b. CB radio
3. Line-of-sight propagation
Figure : Line of Sight Propagation of waves
Characteristics of Line of Sight Propagation are as follows:
47
i. Transmitting and receiving antennas must be within line of
sight
a. Satellite communication signal above 30 MHz not
reflected by ionosphere
b. Ground communication antennas within effective
line of site due to refraction
1. Radio waves:
Electromagnetic wave ranging in frequencies between 3 KHz
and 1GHz are normally called radio waves.
Radio waves are omni-directional when an antenna transmits
radio waves they are propagated in all directions. This means
that sending and receiving antenna do not have to he aligned. A
sending antenna can send waves that can be received by any
receiving antenna.
Radio waves particularly those waves that propagate in sky
mode, can travel long distances. This makes radio waves a
good candidate for long-distance broadcasting such as AM
radio.
Radio waves particularly those of low and medium frequencies
can penetrate walls. It is an advantage because; an AM radio
can receive signals inside a building. It is the disadvantage
because we cannot isolate a communication to first inside or
outside a building.
2. Microwaves:
Electromagnetic waves having frequencies between 1 and 300
GHz are called microwaves.
Microwaves are unidirectional; when an antenna transmits
microwaves they can be narrowly focused. This means that the
sending and receiving antennas need to be aligned. The
unidirectional property has an obvious advantage. A pair of
antennas can be aligned without interfering with another pair of
aligned antennas.
Microwaves propagation is line-of-sight. Since the towers with
the mounted antennas needs to be in direct sight of each other,
towers that are far apart need to be very tall, the curvature of
the earth as well as other blocking obstacles do not allow two
short towers to communicate using microwaves, Repeaters are
often needed for long distance communication very high
frequency microwaves cannot penetrate walls.
Parabolic dish antenna and horn antenna are used for this
means of transmission
48
3. Infrared
Infrared signals with frequencies ranges from 300 GHz to 400
GHz can be used for short range communication.
Infrared signals, having high frequencies, cannot penetrate
walls. This helps to prevent interference between one system
and another. Infrared Transmissionin one room cannot be
affected by the infrared transmission in another room.
Infrared band, has an excellent potential for data transmission.
Transfer digital data is possible with a high speed with a very
high frequency. There are number of computer devices which
are used to send the data through infrared medium e.g.
keyboard mice, PCs and printers. There are some
manufacturers provide a special part called the IrDA port that
allows a wireless keyboard to communicate with a PC.
10.5 COMPARISON BETWEEN WIRED AND
WIRELESS MEDIA
Wired media Wireless media
The signal energy is contained
and guided within a solid
medium
The signal energy propagates
in the form of unguided
electromagnetic waves.
Twisted pair wires, coaxial
cable, optical fiber cables are
the examples of wired media.
Radio and infrared lights are
the examples of wireless
media.
Used for point to point
communication
Used for radio broadcasting in
all direction
Wired media lead to discrete
network topology
Wireless media leads to
continuous network topology
Additional transmission capacity
can be procured by adding more
wire
It is not possible procure
additional capacity.
Installation is costly and time
consuming
Installation needs less time
and money
Attenuation depends
exponentially on the distance
Attenuation is proportional to
square of the distance.
49
10.6 COMPARISON BETWEEN TWISTED PAIR
CABLE, CO-AXIAL CABLE AND OPTICAL FIBER
Twisted pair cable
Co-axial cable
Optical fiber
Transmission of
signals take place in
the electrical form
over the metallic
conducting wires.
Transmission of
signals take place in
the inner conductor
of the cable
Signal transmission
takes place in an
optical form over a
glass fiber.
Noise immunity is
low. Therefore more
distortion
Higher noise
immunity than the
twisted pair cable
due to the presence
of shielding
conductor
Higher noise
immunity as the light
rays are unaffected
by the electrical
noise.
Affected due to
external magnetic
field
Less affected due to
external magnetic
field
Not affected by the
external magnetic
field.
Short circuit
between the two
conductor is
possible
Short circuit
between the two
conductor is
possible
Short circuit is not
possible
Cheapest
Moderately
expensive
Expensive
Can support low
data rates
Moderately high
data rate
Very high data
rates.
Low bandwidth
Moderately high
bandwidth
Very high bandwidth
Easy to installed
Installation is fairly
easy
Installation is difficult
NETWORK TOPOLOGIES
50
Unit Structure
11.0 Objectives
11.1 Introduction
11.2 An Overview of network
11.3 Types of network
11.3.1 Local Area Network
11.3.2 Wide Area Network
11.4 Comparing types of network coverage
11.5 An Illustrated Example of a University Network
11.6 What is a Topology?
11.6.1 The Technical Connotation of Topology
11.6.2 What are the Basic Types of Topology?
11.6.3 How Is the Physical Topology Classified?
11.7 Summary and exercise
11.8 Review Question
11.9 References
11.0 OBJECTIVES
51
To understand various network strategies and topologies,
you will:
Examine three common strategies used to connect nodes on
a network.
Explore network processing strategies and establish the
differences between centralized and distributed processing.
Identify and compare three common network classifications.
Identify and define three common network topologies.
11.1 INTRODUCTION
This chapter presents an outline on Network topology is the
layout pattern of interconnections of the various elements
(links, nodes, etc.) of a computer or biological network. Network
topologies may be physical or logical.
Physical topology refers to the physical design of a network
including the devices, location and cable installation. Logical
topology refers to how data is actually transferred in a network as
opposed to its physical design. In general physical topology relates
to a core network whereas logical topology relates to basic network.
This chapter also presents an insight into the various networking
strategies and the platform needed for networking.
11.2 AN OVERVIEW OF NETWORK
A network consists of two or more computers that are linked
in order to share resources (such as printers and CDs), exchange
files, or allow electronic communications. The computers on a
network may be linked through cables, telephone lines, radio
waves, satellites, or infrared light beams.
Two very common types of networks include:
Local Area Network (LAN)
Wide Area Network (WAN)
You may also see references to a Metropolitan Area Networks
(MAN), a Wireless LAN (WLAN), or a Wireless WAN (WWAN).
52
11.3 WHAT IS A NETWORK TYPE
11.3.1 Local Area Network
A Local Area Network (LAN) is a network that is confined to
a relatively small area. It is generally limited to a geographic area
such as a writing lab, school, or building.
Computers connected to a network are broadly categorized
as servers or workstations. Servers are generally not used by
humans directly, but rather run continuously to provide "services" to
the other computers (and their human users) on the network.
Services provided can include printing and faxing, software hosting,
file storage and sharing, messaging, data storage and retrieval,
complete access control (security) for the network's resources, and
many others.
Workstations are called such because they typically do have
a human user which interacts with the network through them.
Workstations were traditionally considered a desktop, consisting of
a computer, keyboard, display, and mouse, or a laptop, with with
integrated keyboard, display, and touchpad. With the advent of the
tablet computer, and the touch screen devices such as iPad and
iPhone, our definition of workstation is quickly evolving to include
those devices, because of their ability to interact with the network
and utilize network services.
Servers tend to be more powerful than workstations,
although configurations are guided by needs. For example, a group
of servers might be located in a secure area, away from humans,
and only accessed through the network. In such cases, it would be
common for the servers to operate without a dedicated display or
keyboard. However, the size and speed of the server's
processor(s), hard drive, and main memory might add dramatically
to the cost of the system. On the other hand, a workstation might
not need as much storage or working memory, but might require an
expensive display to accommodate the needs of its user. Every
computer on a network should be appropriately configured for its
use.
11.3.2 Wide Area Network
53
Wide Area Networks (WANs) connect networks in larger
geographic areas, such as Maharashtra, India, or the world.
Dedicated transoceanic cabling or satellite uplinks may be used to
connect this type of global network.
Using a WAN, schools in Maharashtra can communicate
with places like Tokyo in a matter of seconds, without paying
enormous phone bills. Two users a half-world apart with
workstations equipped with microphones and a webcams might
teleconference in real time. A WAN is complicated. It uses
multiplexers, bridges, and routers to connect local and metropolitan
networks to global communications networks like the Internet. To
users, however, a WAN will not appear to be much different than a
LAN.
11.4Comparing types of network coverage
The table below compares the three types of networks:
LAN MAN
WAN
Relatively small.
Can incorporate multiple
LANs.
Contained within a
Uses data
transmission
networks to
single building or
campus.
Generally inexpensive
to implement and
maintain.
Typically owned
Contained within a single city
or metropolitan area.
Expensive to implement and
maintain.
incorporate LANs
and MANs.
Essentially
unlimited
geographic area.
Cost varies widely,
privately.
Typically owned by private
providers.
depending on how
it is configured.
11.5 AN ILLUSTRATED EXAMPLE OF A UNIVERSITY
NETWORK
Advantages of Installing a Network
User access control.
Modern networks almost always have one or more servers
which allows centralized management for users and for
network resources to which they have access. User
credentials on a privately-owned and operated network may
be as simple as a user name and password, but with ever-
increasing attention to computing security issues, these
servers are critical to ensuring that sensitive information is
only available to authorized users.
54
Information storing and sharing.
Computers allow users to create and manipulate information.
Information takes on a life of its own on a network. The
network provides both a place to store the information and
mechanisms to share that information with other network
users.
Connections.
Administrators, instructors, and even students and guests
can be connected using the campus network.
Services.
The institution can provide services, such as registration,
college directories, course schedules, access to research,
and email accounts, and many others. (Remember, network
services are generally provided by servers).
Internet.
The institution can provide network users with access to the
internet, via an internet gateway.
Computing resources.
The institution can provide access to special purpose
computing devices which individual users would not normally
own. For example, an institution network might have high-
speed high quality printers strategically located around a
campus for instructor or student use.
Flexible Access.
Institution networks allow students to access their
information from connected devices throughout the school.
Students can begin an assignment in their classroom, save
part of it on a public access area of the network, then go to
the media center after school to finish their work. Students
can also work cooperatively through the network.
Workgroup Computing.
55
Collaborative software allows many users to work on a
document or project concurrently. For example, educators
located at various institution within a county could
simultaneously contribute their ideas about new curriculum
standards to the same document, spreadsheets, or website.
Disadvantages of Installing a Network
Expensive to Install.
Large campus networks can carry hefty price tags. Cabling,
network cards, routers, bridges, firewalls, wireless access
points, and software can get expensive, and the installation
would certainly require the services of technicians. But, with
the ease of setup of home networks, a simple network with
internet access can be setup for a small campus in an
afternoon.
Requires Administrative Time.
Proper maintenance of a network requires considerable time
and expertise. Many schools have installed a network, only
to find that they did not budget for the necessary
administrative support.
Servers Fail.
Although a network server is no more susceptible to failure
than any other computer, when the files server "goes down"
the entire network may come to a halt. Good network design
practices say that critical network services (provided by
servers) should be redundant on the network whenever
possible.
Cables May Break.
The Topology chapter presents information about the
various configurations of cables. Some of the configurations
are designed to minimize the inconvenience of a broken
cable; with other configurations, one broken cable can stop
the entire network.
Security and compliance.
Network security is expensive. It is also very important. An
institution network would possibly be subject to more
56
stringent security requirements than a similarly-sized
corporate network, because of its likelihood of storing
personal and confidential information of network users, the
danger of which can be compounded if any network users
are minors. A great deal of attention must be paid to network
services to ensure all network content is appropriate for the
network community it serves.
11.6 WHAT IS A TOPOLOGY?
A topology is a description of the layout of a specific region
or area. A network topology is a description of the layout of the
region or area covered by that network.
There are two types of connections that describe how many
devices connect to a single cable or segment of transmission
media. They are: point-to-point and multi-point.
Point-to-point connections provide a direct link between two
devices; for example, a computer connected directly to a printer, or
a modem to a mainframe.
Multi-point connections provide a link between three or more
devices on a network. All computer networks rely upon point-to-
point and multi-point connections.
11.6.1 The Technical Connotation of Topology
The virtual shape or structure of a network is referred as
topology.
The pattern or layout of interconnections of different
elements or nodes of a computer network is a network topology
that might be logical or physical.
However, the complete physical structure of the cable (or
transmission media) is called the physical topology. The physical
topology of a network refers to the configuration of cables,
computers, and other peripherals.
The way data flows through the network (or transmission
media) is called the logical topology. A logical topology is the
method used to pass information between workstations.
57
11.6.2What are the Basic Types of Topology?
There are seven basic topologies in the study of network topology:
1. Point-to-point topology,
2. Bus (point-to-multipoint) topology,
3. Ring topology,
4. Star topology,
5. Hybrid topology,
6. Mesh topology and
7. Tree topology.
The interconnections between computers whether logical or
physical are the foundation of this classification.
Logical topology is the way a computer in a given network
transmits information, not the way it looks or connected, along with
the varying speeds of cables used from one network to another.
On the other hand the physical topology is affected by a number
of factors:
Troubleshooting technique,
Installation cost,
Office layout and
Cables types.
The physical topology is figured out on the basis of a
networks capability to access media and devices, the fault
tolerance desired and the cost of telecommunications circuits.
The classification of networks by the virtue of their physical span is
as follows: Local Area Networks (LAN), Wide Area Internetworks
(WAN) and Metropolitan Area Networks or campus or building
internetworks.
11.6.3 How Is the Physical Topology Classified?
Point-to-Point Network Topology
It is the basic model of typical telephony. The simplest
topology is a permanent connection between two points. The value
58
of a demanding point-to-point network is proportionate to the
number of subscribers potential pairs. It is possible to establish a
permanent circuit within many switched telecommunication
systems: the telephone present in a lobby would always connect to
the same port, no matter what number is being dialed. A switch
connection would save the cost between two points where the
resources could be released when no longer required.
Bus Network
Topology
LANs that make use of bus topology connects each node to
a single cable. Some connector connects each computer or server
to the bus cable. For avoiding the bouncing of signal a terminator is
used at each end of the bus cable. The source transmits a signal
that travels in both directions and passes all machines unless it
finds the system with IP address, the intended recipient. The data is
ignored in case the address is unmatched. The installation of one
cable makes bus topology an inexpensive solution as compared to
other topologies; however the maintenance cost is high. If the cable
is broken all systems would collapse.
o Linear Bus: If all network nodes are connected to a combine
transmission medium that has two endpoints the Bus is Linear. The
data transmitted between these nodes is transmitted over the
combine medium and received by all nodes simultaneously.
o Distributed Bus: If all network nodes are connected to a
combine transmission medium that has more than two endpoints
created by branching the main section of the transmitting medium.
A linear bus topology consists of a main run of cable with a
terminator at each end (See fig. 1). All nodes (file server,
workstations, and peripherals) are connected to the linear cable. A
bus topology uses one long cable (backbone) to which network
59
devices are either directly attached or are attached by using short
drop cables. Because all workstations share this bus, a workstation
checks for any information that might be coming down the
backbone before sending their messages. All messages pass the
other workstations on the way to their destinations. Each
workstation then checks the address of each message to see if it
matches its own. Note that bus network topologies, the backbone
must be terminated at both ends to remove the signal from the wire
after it has passed all devices on the network.
Fig. 1. Linear Bus topology
Advantages of a Linear Bus Topology
Easy to connect a computer or peripheral to a linear bus.
Requires less cable length than a star topology.
Disadvantages of a Linear Bus Topology
Entire network shuts down if there is a break in the
main cable.
Terminators are required at both ends of the
backbone cable.
Difficult to identify the problem if the entire network
shuts down.
Not meant to be used as a stand-alone solution in a
large building.
60
Star Network
Topology
The topology when each network host is connected to a
central hub in LAN is called Star. Each node is connected to the
hub with a point-to-point connection. All traffic passes through the
hub that serves as a repeater or signal booster. The easiest
topology to install is hailed for its simplicity to add more nodes but
criticized for making hub the single point of failure. The network
could be BMA (broadcast multi-access) or NBMA (non-broadcast
multi-access) depending on whether the signal is automatically
propagated at the hub to all spokes or individually spokes with
those who are addressed.
o Extended Star: A network that keeps one or more than one
repeaters between the central node or hub and the peripheral or
the spoke node, supported by the transmitter power of the hub and
beyond that supported by the standard of the physical layer of the
network.
o Distributed Star: The topology is based on the linear
connectivity that is Daisy Chained with no top or centre level
connection points.
Advantages of a Star Topology
Easy to install and wire.
No disruptions to the network when connecting or removing
devices.
Easy to detect faults and to remove parts.
61
Disadvantages of a Star Topology
Requires more cable length than a linear topology.
If the hub, switch, or concentrator fails, nodes attached are
disabled.
More expensive than linear bus topologies because of
the cost of the hubs, etc.
Ring Network Topology
Ring topology is one of the old ways of building computer
network design and it is pretty much obsolete. FDDI, SONET or
Token Ring technologies are used to build ring technology. It is not
widely popular in terms of usability but incase if you find it
anywhere it will mostly be in schools or office buildings.
Such physical setting sets up nodes in a circular manner
where the data could travel in one direction where each device on
the right serves as a repeater to strengthen the signal as it moves
ahead.
Mesh Network
Topology
The exponent of the number of subscribers is proportionate to the
value of the fully meshed networks.
o Fully Connected: For practical networks such topology is
too complex and costly but highly recommended for small number
of interconnected nodes.
62
o Partially Connected: This set up involves the connection of
some nodes to more than one nodes in the network via point-to-
point link. In such connection it is possible to take advantage of the
redundancy without any complexity or expense of establishing a
connection between each node.
Hybrid Topology
Hybrid topologies are a combination of two or more different
topologies. WANs sometimes have hybrid topologies because they
connect a variety of LAN topologies. The big advantage of hybrid
topologies is that they connect disparate topologies. However, the
disadvantage of hybrid topologies is that they are potentially
complex to establish and manage.
Tree Network
Topology
The top level of the hierarchy, the central root node is connected to
some nodes that are a level low in the hierarchy by a point-to-point
link where the second level nodes that are already connected to
central root would be connected to the nodes in the third level by a
point-to-point link. The central root would be the only node having
no higher node in the hierarchy. The tree hierarchy is symmetrical.
The BRANCHING FACTOR is the fixed number of nodes
connected to the next level in the hierarchy. Such network must
have at least three levels. Physical Linear Tree Topology would be
of a network whose Branching Factor is one.
63
Advantages of a Tree Topology
Point-to-point wiring for individual segments.
Supported by several hardware and software venders.
Disadvantages of a Tree Topology
Overall length of each segment is limited by the type
of cabling used.
If the backbone line breaks, the entire segment goes down.
More difficult to configure and wire than other topologies.
Considerations When Choosing a Topology
Money. A linear bus network may be the least
expensive way to install a network; you do not have to
purchase concentrators.
Length of cable needed. The linear bus network
uses shorter lengths of cable.
Future growth. With a star topology, expanding a network
is easily done by adding another concentrator.
64
Cable type. The most common cable in schools
is unshielded twisted pair,
11.7 SUMMARY
Knowledge of networking topologies is of core importance of
computer networking design. Computer networks can only
be developed using the knowledge about these topologies
and decide to which topology design is best suited according
to the requirement.
A computer network consists of nodes and communication
links whichimplement its protocols. It interconnects a set of
hosts which conform to thenetwork protocols.
A network may be classified as a LAN, MAN, or WAN,
depending on itsgeographic spread, and as private or
public, depending on its accessrestrictions.
It may employ a point-to-point or a broadcast
communication model. A point-to-point model may be based
on circuit switching or packetswitching.
INTRODUCTION TO ROUTING
65
Unit Structure
12.0 Objective
12.1 What Is Routing?
12.1.1 Components
12.1.2 Path Determination
12.2Switching
12.3 Introduction to algorithm
12.3.1 Design Goals
12.3.2 Routing Algorithm Types
12.4 Routing Metrics
12.5 Summary
12.6 Review question
12. References
12.0 OBJECTIVE
Introduction to switches and router
Routing concept
Concept of switching
Routing algorithms
Static and dynamic routing
Routing metrics
66
12.0 WHAT IS ROUTING?
Routing is the act of moving information across an
internetwork from a source to a destination. Along the way, at least
one intermediate node typically is encountered. Routing is often
contrasted with bridging, which might seem to accomplish precisely
the same thing to the casual observer. The primary difference
between the two is that bridging occurs at Layer 2 (the link layer) of
the OSI reference model, whereas routing occurs at Layer 3 (the
network layer). This distinction provides routing and bridging with
different information to use in the process of moving information
from source to destination, so the two functions accomplish their
tasks in different ways.
12.1.1 Routing Components
Routing involves two basic activities: determining optimal
routing paths and transporting information groups (typically called
packets) through an internetwork. In the context of the routing
process, the latter of these is referred to as packet switching.
Although packet switching is relatively straightforward, path
determination can be very complex.
12.1.2 Path Determination
Routing protocols use metrics to evaluate what path will be
the best for a packet to travel. A metric is a standard of
measurement, such as path bandwidth, that is used by routing
algorithms to determine the optimal path to a destination. To aid the
process of path determination, routing algorithms initialize and
maintain routing tables, which contain route information. Route
information varies depending on the routing algorithm used.
Routing algorithms fill routing tables with a variety of
information. Destination/next hop associations tell a router that a
particular destination can be reached optimally by sending the
packet to a particular router representing the next hop on the way
to the final destination. When a router receives an incoming packet,
it checks the destination address and attempts to associate this
address with a next hop.
67
Fig. Destination/Next Hop Associations Determine the Datas
Optimal Path
Routing tables also can contain other information, such as
data about the desirability of a path. Routers compare metrics to
determine optimal routes, and these metrics differ depending on the
design of the routing algorithm used.
Routers communicate with one another and maintain their
routing tables through the transmission of a variety of messages.
The routing update message is one such message that generally
consists of all or a portion of a routing table. By analyzing routing
updates from all other routers, a router can build a detailed picture
of network topology. A link-state advertisement, another example of
a message sent between routers, informs other routers of the state
of the senders links. Link information also can be used to build a
complete picture of network topology to enable routers to determine
optimal routes to network destinations.
12.2 SWITCHING
Switching algorithms is relatively simple; it is the same for
most routing protocols. In most cases, a host determines that it
must send a packet to another host. Having acquired a routers
address by some means, the source host sends a packet
addressed specifically to a routers physical (Media Access Control
[MAC]-layer) address, this time with the protocol (network layer)
address of the destination host.
As it examines the packets destination protocol address, the
router determines that it either knows or does not know how to
forward the packet to the next hop. If the router does not know how
to forward the packet, it typically drops the packet. If the router
knows how to forward the packet, however, it changes the
destination physical address to that of the next hop and transmits
the packet. The next hop may be the ultimate destination host. If
not, the next hop is usually another router, which executes the
same switching decision process. As the packet moves through the
68
internetwork, its physical address changes, but its protocol address
remains constant.
The preceding discussion describes switching between a
source and a destination end system. The International
Organization for Standardization (ISO) has developed a
hierarchical terminology that is useful in describing this process.
Using this terminology, network devices without the capability to
forward packets between subnetworks are called end systems
(ESs), whereas network devices with these capabilities are called
intermediate systems (ISs). ISs are further divided into those that
can communicate within routing domains (intradomain ISs) and
those that communicate both within and between routing domains
(interdomain ISs). A routing domain generally is considered a
portion of an internetwork under common administrative authority
that is regulated by a particular set of administrative guidelines.
Routing domains are also called autonomous systems.With certain
protocols, routing domains can be divided into routing areas, but
intradomain routing protocols are still used for switching both within
and between areas.
Fig.of switching
69
12.3 INTRODUCTION TO ALGORITHM
Routing Algorithms- Introduction
Routing algorithms can be differentiated based on several
key characteristics. First, the particular goals of the algorithm
designer affect the operation of the resulting routing protocol.
Second, various types of routing algorithms exist, and each
algorithm has a different impact on network and router resources.
Finally, routing algorithms use a variety of metrics that affect
calculation of optimal routes. The following sections analyze these
routing algorithm attributes.
12.3.1Design Goals
Routing algorithms often have one or more of the following
design goals:
Optimality
Simplicity and low overhead
Robustness and stability
Rapid convergence
Flexibility
Optimality refers to the capability of the routing algorithm to
select the best route, which depends on the metrics and
metric weightings used to make the calculation.
For example, one routing algorithm may use a number of
hops and delays, but it may weigh delay more heavily in the
calculation. Naturally, routing protocols must define their metric
calculation algorithms strictly.
Routing algorithms also are designed to be as simple as
possible. In other words, the routing algorithm must offer its
functionality efficiently, with a minimum of software and
utilization overhead. Efficiency is particularly important when
the software implementing the routing algorithm must run on
a computer with limited physical resources.
Routing algorithms must be robust, which means that they
should perform correctly in the face of unusual or unforeseen
circumstances, such as hardware failures, high load
conditions, and incorrect implementations. Because routers
are located at network junction points, they can cause
considerable problems when they fail. The best routing
70
algorithms are often those that have withstood the test of
time and that have proven stable under a variety of network
conditions.
In addition, routing algorithms must converge rapidly.
Convergence is the process of agreement, by all routers, on
optimal routes. When a network event causes routes to
either go down or become available, routers distribute
routing update messages that permeate networks,
stimulating recalculation of optimal routes and eventually
causing all routers to agree on these routes. Routing
algorithms that converge slowly can cause routing loops or
network outages.
Routing algorithms should also be flexible, which means that
they should quickly and accurately adapt to a variety of
network circumstances. Assume, for example, that a network
segment has gone down. As many routing algorithms
become aware of the problem, they will quickly select the
next-best path for all routes normally using that segment.
Routing algorithms can be programmed to adapt to changes
in network bandwidth, router queue size, and network delay,
among other variables.
12.3.2 Routing Algorithm Types
Routing algorithms can be classified by type. Key
differentiators include these:
1. Static versus dynamic
2. Single-path versus multipath
3. Flat versus hierarchical
4. Host-intelligent versus router-intelligent
5. Intradomain versus interdomain
6. Link-state versus distance vector
1. Static Versus Dynamic
Static routing algorithms are hardly algorithms at all, but are
table mappings established by the network administrator before the
beginning of routing. These mappings do not change unless the
network administrator alters them. Algorithms that use static routes
are simple to design and work well in environments where network
traffic is relatively predictable and where network design is
relatively simple.
71
Because static routing systems cannot react to network
changes, they generally are considered unsuitable for todays large,
constantly changing networks. Most of the dominant routing
algorithms today are
Dynamic routing algorithms, which adjust to changing
network circumstances by analyzing incoming routing update
messages. If the message indicates that a network change has
occurred, the routing software recalculates routes and sends out
new routing update messages. These messages permeate the
network, stimulating routers to rerun their algorithms and change
their routing tables accordingly.
Dynamic routing algorithms can be supplemented with static
routes where appropriate. A router of last resort (a router to which
all unroutable packets are sent), for example, can be designated to
act as a repository for all unroutable packets, ensuring that all
messages are at least handled in some way.
2. Single-Path Versus Multipath
Some sophisticated routing protocols support multiple paths
to the same destination. Unlike single-path algorithms, these
multipath algorithms permit traffic multiplexing over multiple lines.
The advantages of multipath algorithms are obvious: They can
provide substantially better throughput and reliability. This is
generally called load sharing.
3. Flat Versus Hierarchical
Some routing algorithms operate in a flat space, while others
use routing hierarchies.
In a flat routing system, the routers are peers of all others. In
a hierarchical routing system, some routers form whatamounts to a
routing backbone. Packets from nonbackbone routers travel to the
backbone routers, wherethey are sent through the backbone until
they reach the general area of the destination. At this point,
theytravel from the last backbone router through one or more
nonbackbone routers to the final destination.Routing systems often
designate logical groups of nodes, called domains, autonomous
systems, or areas.
In hierarchical systems, some routers in a domain can
communicate with routers in other domains, while others can
communicate only with routers within their domain. In very large
networks, additional hierarchical levels may exist, with routers at
the highest hierarchical level forming the routing backbone.
72
The primary advantage of hierarchical routing is that it mimics
the organization of most companies and therefore supports their
traffic patterns well. Most network communication occurs within
small company groups (domains). Because intradomain routers
need to know only about other routers within their domain, their
routing algorithms can be simplified, and, depending on the routing
algorithm being used, routing update traffic can be reduced
accordingly.
4. Host-Intelligent Versus Router-Intelligent
Some routing algorithms assume that the source end node
will determine the entire route. This is usually referred to as source
routing. In source-routing systems, routers merely act as store-and-
forward devices, mindlessly sending the packet to the next stop.
Other algorithms assume that hosts know nothing about routes. In
these algorithms, routers determine the path through the
internetwork based on their own calculations. In the first system,
the hosts have the routing intelligence. In the latter system, routers
have the routing intelligence.
5. Intradomain Versus Interdomain
Some routing algorithms work only within domains; others
work within and between domains. The nature of these two
algorithm types is different. It stands to reason, therefore, that an
optimal intradomain-routing algorithm would not necessarily be an
optimal interdomain-routing algorithm.
6. Link-State Versus Distance Vector
Link-state algorithms (also known as shortest path first
algorithms) flood routing information to all nodes in the
internetwork. Each router, however, sends only the portion of the
routing table that describes the state of its own links. In link-state
algorithms, each router builds a picture of the entire network in its
routing tables.
Distance vector algorithms (also known as Bellman-Ford
algorithms) call for each outer to send all or some portion of its
routing table, but only to its neighbors. In essence, link-state
algorithms send small updates everywhere, while distance vector
algorithms send larger updates only to neighboring routers.
Distance vector algorithms know only about their neighbors.
Because they converge more quickly, link-state algorithms are
somewhat less prone to routing loops than distance vector
algorithms. On the other hand, link-state algorithms require more
CPU power and memory than distance vector algorithms. Link-state
algorithms, therefore, can be more expensive to implement and
support. Link-state protocols are generally more scalable than
distance vector protocols.
73
12.4 ROUTING METRICS
Routing tables contain information used by switching
software to select the best route. Routing algorithms have used
many different metrics to determine the best route. Sophisticated
routing algorithms can base route selection on multiple metrics,
combining them in a single (hybrid) metric. All the following metrics
have been used:
Path length
Reliability
Delay
Bandwidth Load
Communication cost
Path length is the most common routing metric. Some routing
protocols allow network administrators to assign arbitrary costs
to each network link. In this case, path length is the sum of the
costs associated with each link traversed. Other routing
protocols define hop count, a metric that specifies the number of
passes through internetworking products, such as routers, that a
packet must take en route from a source to a destination.
Reliability, in the context of routing algorithms, refers to the
dependability (usually described in terms of the bit-error rate) of
each network link. Some network links might go down more
often than others. After a network fails, certain network links
might be repaired more easily or more quickly than other links.
Any reliability factors can be taken into account in the
assignment of the reliability ratings, which are arbitrary numeric
values usually assigned to network links by network
administrators.
Routing delay refers to the length of time required to move a
packet from source to destination through the internetwork.
Delay depends on many factors, including the bandwidth of
intermediate network links, the port queues at each router along
the way, network congestion on all intermediate network links,
and the physical distance to be travelled. Because delay is a
conglomeration of several important variables, it is a common
and useful metric.
74
Bandwidth refers to the available traffic capacity of a link. All
other things being equal, a 10-Mbps Ethernet link would be
preferable to a 64-kbps leased line. Although bandwidth is a
rating of the maximum attainable throughput on a link, routes
through links with greater bandwidth do not necessarily provide
better routes than routes through slower links. For example, if a
faster link is busier, the actual time required to send a packet to
the destination could be greater.
Load refers to the degree to which a network resource, such as
a router, is busy. Load can be calculated in a variety of ways,
including CPU utilization and packets processed per second.
Monitoring these parameters on a continual basis can be
resource-intensive itself.
Communication cost is another important metric, especially
because some companies may not care about performance as
much as they care about operating expenditures. Although line
delay may be longer, they will send packets over their own lines
rather than through the public lines that cost money for usage
time.
12.5 SUMMARY
Routing is the act of moving information across an
internetwork from a source to a destination.
Routing involves two basic activities: determining optimal
routing paths and transporting information groups (typically
called packets) through an internetwork.
Routing protocols use metrics to evaluate what path will be
the best for a packet to travel.
Routing protocols use metrics to evaluate what path will be
the best for a packet to travel.
Switching algorithms is relatively simple; it is the same for
most routing protocols.
Routing algorithms often have one or more of the following
design goals:
Optimality
Simplicity and low overhead
Robustness and stability
Rapid convergence
Flexibility
75
Routing tables contain information used by
switching software to select the best route.
SWITCHING CONCEPTS
76
Unit Structure
13.0 Objective
13.1 Introduction
13.2 Switching Methods
13.2.1 Circuit Switching
13.2.2Switching Node
13.2.3 Time Division Switching
13.2.4 Packet Switching
13.2.5 Switching Modes
13.3 Summary
13.4Review Questions
13.5References
13.0 OBJECTIVE
Introduce switching concept
Define switching node
Define packet switching
Switching mode
13.1 INTRODUCTION
Switching is the generic method for establishing a path for
point-to-point communication in a network. It involves the nodes in
77
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 neighbouring 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 theswitching capability of the nodes in order to route
messages across the network.There are two basic methods of
switching circuit switching and packet switching.
13.2.1. Circuit Switching
Figure 13.2.1 A switched path.
In circuit switching, two communicating stations are
connected by a dedicated communication path which consists of
intermediate nodes in the network and thelinks that connect these
nodes.
Figure 13.2.1 shows a simple circuit switch which consists of a 33
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 wires are connected).
78
Switches may also have more inlets than outlets, or more outlets
than inlets.)
Figure 13.2.2 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.
Fig 13.2.3 Circuit switching.
Communication via 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 Fig. 13.2.3
Circuit Establishment: To establish an end-to-end connection
before any transfer of data.
79
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.
Circuit disconnect:
Terminate connection at the end of data transfer.
Signals must be propagated to deallocate the dedicated
resources.
Fig: 13.2.4 Circuit Switching technique
13.2.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 wish to communicate.
Major elements of a single-node network are summarized below:
Digital switch: That provides a transparent (full-duplex) signal path
between any pair of attached devices.
80
Network interface:That represents the functions and hardware
needed to connect digital devices to the network (like telephones).
Control unit:That establishes, maintains, and tears down 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.
Fig 13.2.5 Schematic Diagram of a Switching node
Circuit switching uses any of the three 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
81
for the analog environment, and has been carried over to the digital
domain. Some of the space switches are crossbar switches, Multi-
stage switches (e.g. Omega Switches). A crossbar switch is shown
in Fig. Fig 13.2.6 . Basic building block of the switch is a metallic
crosspoint or semiconductor gate that can be enabled or disabled
by a control unit.
Fig 13.2.6 Schematic diagram of a crossbar switch
Limitations of crossbar switches are as follows:
The number of crosspoints grows with the square of the number
of attached stations.
Costly for a large switch.
The failure of a crosspoint prevents connection between the two
devices whose lines intersect at that crosspoint.
The crosspoints are inefficiently utilized.
Only a small fraction of crosspoints are engaged even if all of
the attached devices are active.
Some of the above problems 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 crosspoints.
82
Fig 13.2.6 A three-stage space division
switch
Fig 13.2.7 Block nature of the switch
Figure Fig 13.2.6 shows a three-stage space division switch. In
this case the number of crosspoints needed goes down from 64 to
40. There is more than one path through the network to connect
two endpoints, thereby increasing reliability. Multistage switches
may lead to blocking. The problem may be tackled by increasing
the number or size of the intermediate switches, which also
increases the cost. The blocking feature is illustrated in Fig. Fig
13.2.7 . As shown in Fig. Fig 13.2.7 , after setting up connections
for 1-to-3 and 2-to-4, the switch cannot establish connections for 3-
to-6 and 4-to-5.
83
13.2.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.
13.2.8 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.
13.2.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
84
(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 13.2.9 shows a simple packet
switch with six I/O channels (a through f). Each channel has an
associated buffer which it uses to store packets in transit. The
operation of the switch is controlled by a microprocessor. A packet
received on anynof the channels can be passed onto any of the
other channels by the microprocessor moving it to the
corresponding buffer.
Figure 13.2.9 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. Here 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
85
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.
Fig 13.2.10 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 designatedvirtual circuit.
Figure 13.2.10 Packet switching with virtual circuits.
The datagram method (also known as connectionless)
does not rely on a pre-established route, instead each packet is
treated independently. Therefore, it ispossible 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 preestablishedcircuit, each
packet must carry enough information in its header to enable the
nodes to route it correctly.
86
Figure 13.2.11 illustrates the datagram method. Note how the
packets exercise different routes.
13.2.11 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 will focus our attention on
this form of switching from now on.
13.2.5 Switching Modes
87
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 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 CAM 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 price,
however, is that the switch will forward any frames containing
errors.
The process of switching modes can best be described by
using a metaphor.
Store-and-forward Mode
Here 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 ensure that all frames are good and
store-and-forward takes too long, we need a method that is both
quick and reliable. Using our example of the nightclub security,
imagine you are asked to make sure that everyone has an ID and
that the picture matches the person. With this method you have
made 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.
13.3 SUMMARY
The generic method for establishing a path for point-to-point
communication in anetwork is called switching. There are two
general switching methods: circuitswitching and packet switching.
In circuit switching two communicating stations are connected by
a dedicatedcommunication path.
88
In packet switching communication is discrete in form of
packets. The packetsare handled by the intermediate nodes in a
store-and-forward fashion. Packetswitching is either based on virtual
circuits or on datagrams.
The task of selecting a path for the transport of packets across
the network iscalled routing. The three classes of routing
algorithms are: flooding, staticrouting, and dynamic routing.