0% found this document useful (0 votes)
51 views33 pages

CN Unit 1

This document provides an introduction to computer networks, including definitions and key concepts. It discusses the characteristics of performance, reliability, and security that networks should meet. It also describes basic network components like nodes, links, and communication channels. Additionally, it outlines transmission modes (simplex, half-duplex, and full-duplex), common network goals like resource sharing, and major network types (LAN, MAN, WAN).
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views33 pages

CN Unit 1

This document provides an introduction to computer networks, including definitions and key concepts. It discusses the characteristics of performance, reliability, and security that networks should meet. It also describes basic network components like nodes, links, and communication channels. Additionally, it outlines transmission modes (simplex, half-duplex, and full-duplex), common network goals like resource sharing, and major network types (LAN, MAN, WAN).
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

CS3591-COMPUTER NETWORKS

UNIT 1

INTRODUCTION

Introduction to Computer Networks

• A set of devices often mentioned as nodes connected by media link is called a


Network.
• A node can be a device which is capable of sending or receiving data generated by
other nodes on the network like a computer, printer etc. These links connecting the
devices are called Communication channels.
• Computer network is a telecommunication channel using which we can share data
with other computers or devices, connected to the same network. It is also called
Data Network. The best example of computer network is Internet.
• Computer network does not mean a system with one Control Unit connected to
multiple other systems as its slave. That is Distributed system, not Computer Network.
• A network must be able to meet certain criterias, these are mentioned below:
• Performance
• Reliability
• Security

Performance
It can be measured in the following ways:
• Transit time : It is the time taken to travel a message from one device to another.
• Response time : It is defined as the time elapsed between enquiry and response.

Other ways to measure performance are :


• Efficiency of software
• Number of users
• Capability of connected hardware

Reliability
It decides the frequency at which network failure take place. More the failures are, less is the
network's reliability.
Security
It refers to the protection of data from any unauthorised user or access. While travelling
through network, data passes many layers of network, and data can be traced if attempted.
Hence security is also a very important characteristic for Networks.

Properties of a Good Network


1. Interpersonal Communication: We can communicate with each other efficiently and
easily. Example: emails, chat rooms, video conferencing etc, all of these are possible
because of computer networks.
2. Resources can be shared: We can share physical resources by making them available
on a network such as printers, scanners etc.
3. Sharing files, data: Authorised users are allowed to share the files on the network.

Basic Communication Model


A Communication model is used to exchange data between two parties. For example:
communication between a computer, server and telephone (through modem).

Source
Data to be transmitted is generated by this device, example: telephones, personal computers
etc.

Transmitter
The data generated by the source system is not directly transmitted in the form its
generated. The transmitter transforms and encodes the data in such a form to produce
electromagnetic waves or signals.

Transmission System
A transmission system can be a single transmission line or a complex network connecting
source and destination.

Receiver
Receiver accepts the signal from the transmission system and converts it into a form which is
easily managed by the destination device.
Destination
Destination receives the incoming data from the receiver.

Data Communication
• The exchange of data between two devices through a transmission medium is called
Data Communication.
• The data is exchanged in the form of 0's and 1's. The transmission medium used is
wire cable.
• For data communication to occur, the communication device must be a part of a
communication system.
• Data Communication has two types - Local and Remote which are discussed below:

Local
Local communication takes place when the communicating devices are in the same
geographical area, same building, or face-to-face etc.

Remote
Remote communication takes place over a distance i.e. the devices are farther. The
effectiveness of a data communication can be measured through the following features :
• Delivery: Delivery should be done to the correct destination.
• Timeliness: Delivery should be on time.
• Accuracy: Data delivered should be accurate.
Components of Data Communication
1. Message: It is the information to be delivered.
2. Sender: Sender is the person who is sending the message.
3. Receiver: Receiver is the person to whom the message is being sent to.
4. Medium: It is the medium through which the message is sent. For example: A Modem.
5. Protocol: These are some set of rules which govern data communication.

Data Flow
Transmission Modes in Computer Networks (Simplex, Half-Duplex and Full-Duplex)

• Transmission mode means transferring of data between two devices. It is also known
as communication mode.
• Buses and networks are designed to allow communication to occur between
individual devices that are interconnected.
• There are three types of transmission mode:-
1. Simplex Mode
2. Half-Duplex Mode
3. Full-Duplex Mode

Simplex Mode
• In Simplex mode, the communication is unidirectional, as on a one-way street. Only
one of the two devices on a link can transmit, the other can only receive.
• The simplex mode can use the entire capacity of the channel to send data in one
direction.
• Example: Keyboard and traditional monitors. The keyboard can only introduce input,
the monitor can only give the output.

Half-Duplex Mode
• In half-duplex mode, each station can both transmit and receive, but not at the same
time. When one device is sending, the other can only receive, and vice versa.
• The half-duplex mode is used in cases where there is no need for communication in
both direction at the same time.
• The entire capacity of the channel can be utilized for each direction.
• Example: Walkie- talkie in which message is sent one at a time and messages are sent
in both the directions.

Full-Duplex Mode
• In full-duplex mode, both stations can transmit and receive simultaneously.
• In full_duplex mode, signals going in one direction share the capacity of the link with
signals going in other direction, this sharing can occur in two ways:
1. Either the link must contain two physically separate transmission paths, one for
sending and other for receiving.
2. Or the capacity is divided between signals travelling in both directions.
• Full-duplex mode is used when communication in both direction is required all the
time. The capacity of the channel, however must be divided between the two
directions.
• Example: Telephone Network in which there is communication between two persons
by a telephone line, through which both can talk and listen at the same time.
Goals of Computer Networks
The following are some important goals of computer networks:
1. Resource Sharing – Many organizations has a substantial number of computers in
operations, which are located apart. Ex. A group of office workers can share a
common printer, fax, modem, scanner etc.
2. High Reliability – If there are alternate sources of supply, all files could be replicated
on two or, machines. If one of them is not available, due to hardware failure, the other
copies could be used.
3. Inter-process Communication – Network users, located geographically apart, may
converse in an interactive session through the network. In order to permit this, the
network must provide almost error-free communications.
4. Flexible access – Files can be accessed from any computer in the network. The
project can be begun on one computer and finished on another.
Other goals include Distribution of processing functions, Centralized management, and
allocation of network resources, Compatibility of dissimilar equipment and software, Good
network performance, Scalability, Saving money, Access to remote information, Person to
person communication etc.
Types of Computer Network
• The Network allows computers to connect and communicate with different
computers via any medium.
• LAN, MAN and WAN are the three major types of the network designed to operate
over the area they cover.
• There are some similarities and dissimilarities between them. One of the major
differences is the geographical area they cover, i.e. LAN covers the smallest area;
MAN covers an area larger than LAN and WAN comprises the largest of all.
• There are other types of Computer Networks also, like :
• PAN (Personal Area Network)
• SAN (Storage Area Network)
• EPN (Enterprise Private Network)
• VPN (Virtual Private Network)

1. Local Area Network (LAN) –


• LAN or Local Area Network connects network devices in such a way that personal
computer and workstations can share data, tools and programs.
• The group of computers and devices are connected together by a switch, or
stack of switches, using a private addressing scheme as defined by the TCP/IP
protocol.
• Routers are found at the boundary of a LAN, connecting them to the larger WAN.
• Data transmits at a very fast rate as the number of computers linked are limited.
• LANs cover smaller geographical area (Size is limited to a few kilometers) and are
privately owned.
• One can use it for an office building, home, hospital, schools, etc.
• LAN is easy to design and maintain. A Communication medium used for LAN has
twisted pair cables and coaxial cables. It covers a short distance, and so the error
and noise are minimized.
• Early LAN’s had data rates in the 4 to 16 Mbps range. Today, speeds are normally
100 or 1000 Mbps.
• The fault tolerance of a LAN is more and there is less congestion in this network.

2. Metropolitan Area Network (MAN) –


• MAN or Metropolitan area Network covers a larger area than that of a LAN and
smaller area as compared to WAN.
• It connects two or more computers that are apart but resides in the same or
different cities.
• It covers a large geographical area and may serve as an ISP (Internet Service
Provider).
• MAN is designed for customers who need a high-speed connectivity. Speeds of
MAN ranges in terms of Mbps.
• It’s hard to design and maintain a Metropolitan Area Network.
• The fault tolerance of a MAN is less and also there is more congestion in the
network.
• It is costly and may or may not be owned by a single organization.
• Devices used for transmission of data through MAN are: Modem and Wire/Cable.
• Examples of a MAN are the part of the telephone company network that can
provide a high-speed DSL line to the customer or the cable TV network in a city.

3. Wide Area Network (WAN) –


• WAN or Wide Area Network is a computer network that extends over a large
geographical area, although it might be confined within the bounds of a state or
country.
• A WAN could be a connection of LAN connecting to other LAN’s via telephone
lines and radio waves and may be limited to an enterprise (a corporation or an
organization) or accessible to the public.
• The technology is high speed and relatively expensive.
• There are two types of WAN: Switched WAN and Point-to-Point WAN.
• WAN is difficult to design and maintain.
• Similar to a MAN, the fault tolerance of a WAN is less and there is more
congestion in the network.
• A Communication medium used for WAN is PSTN or Satellite Link.
• Due to long distance transmission, the noise and error tend to be more in WAN.
• WAN’s data rate is slow about a 10th LAN’s speed, since it involves increased
distance and increased number of servers and terminals etc. Speeds of WAN
ranges from few kilobits per second (Kbps) to megabits per second (Mbps).
• Devices used for transmission of data through WAN are: Optic wires, Microwaves
and Satellites.
• Example of a Switched WAN is the asynchronous transfer mode (ATM) network
and Point-to-Point WAN is dial-up line that connects a home computer to the
Internet.
Differences between LAN, WAN and MAN

LAN MA WA
N N
LAN for Local Are MAN stands for WAN for Wide are
stan a Metropolitan Area Network. stan a
ds ds network.
Network.
MAN’s ownership can be While WAN also might not
LAN’s ownership is private. private or public. be owned by one
organization.
The transmission speed of While the transmission Whereas the transmission
LAN is high. speed of MAN is average. speed of WAN is low.
The propagation delay is There is propagat Whereas there is long
short in LAN. moderate ion propagation delay.
delay in MAN.
While there is more Whereas there is more
There is less congestion in
congestion in MAN. congestion than MAN in
LAN.
WAN.

Whereas WAN’s design and


LAN’s design and While MAN’s design
maintenance is also difficult
maintenance is easy. and maintenance is
than LAN as well MAN.
difficult than LAN.
There is more fault In WAN, there is also less
While there is less fault
tolerance in LAN. fault tolerance.
tolerance.

Types of Network Topology


The arrangement of a network which comprises of nodes and connecting lines via sender
and receiver is referred as network topology. The various network topologies are :

a) Mesh Topology:
In mesh topology, every device is connected to another device via particular channel.
Figure 1: Every device is connected with another via dedicated channels. These channels are
known as links.

Advantages of this topology :


• It is robust.
• Fault is diagnosed easily. Data is reliable because data is transferred among the
devices through dedicated channels or links.
• Provides security and privacy.

Problems with this topology :


• Installation and configuration is difficult.
• Cost of cables are high as bulk wiring is required, hence suitable for less number of
devices.
• Cost of maintenance is high.

b) Star Topology:

In star topology, all the devices are connected to a single hub through a cable. This hub is
the central node and all others nodes are connected to the central node. The hub can be
passive in nature i.e. not intelligent hub such as broadcasting devices, at the same time the
hub can be intelligent known as active hubs. Active hubs have repeaters in them.

Figure 2: A star topology having four systems connected to single point of connection i.e. hub.
Advantages of this topology :
• If N devices are connected to each other in star topology, then the number of cables
required to connect them is N. So, it is easy to set up.
• Each device require only 1 port i.e. to connect to the hub.

Problems with this topology :


• If the concentrator (hub) on which the whole topology relies fails, the whole system
will crash down.
• Cost of installation is high.
• Performance is based on the single concentrator i.e. hub.

c) Bus Topology:
Bus topology is a network type in which every computer and network device is connected
to single cable. It transmits the data from one end to another in single direction. No bi-
directional feature is in bus topology.

Figure 3: A bus topology with shared backbone cable. The nodes are connected to the
channel via drop lines.

Advantages of this topology :


• If N devices are connected to each other in bus topology, then the number of cables
required to connect them is 1 which is known as backbone cable and N drop lines are
required.
• Cost of the cable is less as compared to other topology, but it is used to built small
networks.

Problems with this topology :


• If the common cable fails, then the whole system will crash down.
• If the network traffic is heavy, it increases collisions in the network. To avoid this,
various protocols are used in MAC layer known as Pure Aloha, Slotted Aloha,
CSMA/CD etc.
d) Ring Topology:
In this topology, it forms a ring connecting a devices with its exactly two neighbouring
devices.

The following operations takes place in ring topology are :


1. One station is known as monitor station which takes all the responsibility to perform
the operations.
2. To transmit the data, station has to hold the token. After the transmission is done, the
token is to be released for other stations to use.
3. When no station is transmitting the data, then the token will circulate in the ring.
4. There are two types of token release techniques : Early token release releases the
token just after the transmitting the data and Delay token release releases the token
after the acknowledgement is received from the receiver.

Figure 4: A ring topology comprises of 4 stations connected with each forming a ring..
Advantages of this topology :
• The possibility of collision is minimum in this type of topology.
• Cheap to install and expand.

Problems with this topology :


• Troubleshooting is difficult in this topology.
• Addition of stations in between or removal of stations can disturb the whole topology.
e) Hybrid Topology:
This topology is a collection of two or more topologies which are described above. This is a
scalable topology which can be expanded easily. It is reliable one but at the same it is a
costly topology.

Figure 5: A hybrid topology which is a combination of ring and star topology

Network Protocols
Network Protocols are a set of rules governing exchange of information in an easy, reliable
and secure way.
There are various types of protocols that support a major and compassionate role in
communicating with different devices across the network.

These are:

1. Transmission Control Protocol (TCP)


2. Internet Protocol (IP)
3. User Datagram Protocol (UDP)
4. Post office Protocol (POP)
5. Simple mail transport Protocol (SMTP)
6. File Transfer Protocol (FTP)
7. Hyper Text Transfer Protocol (HTTP)
8. Hyper Text Transfer Protocol Secure (HTTPS)
9. Telnet
10. Gopher

• Transmission Control Protocol (TCP): TCP is a popular communication protocol


which is used for communicating over a network. It divides any message into series of
packets that are sent from source to destination and there it gets reassembled at the
destination.
• Internet Protocol (IP): IP is designed explicitly as addressing protocol. It is mostly
used with TCP. The IP addresses in packets help in routing them through different
nodes in a network until it reaches the destination system. TCP/IP is the most popular
protocol connecting the networks.
• User Datagram Protocol (UDP): UDP is a substitute communication protocol to
Transmission Control Protocol implemented primarily for creating loss-tolerating and
low-latency linking between different applications.
• Post office Protocol (POP): POP3 is designed for receiving incoming E-mails.
• Simple mail transport Protocol (SMTP): SMTP is designed to send and distribute
outgoing E-Mail.
• File Transfer Protocol (FTP): FTP allows users to transfer files from one machine to
another. Types of files may include program files, multimedia files, text files, and
documents, etc.
• Hyper Text Transfer Protocol (HTTP): HTTP is designed for transferring a hypertext
among two or more systems. HTML tags are used for creating links. These links may
be in any form like text or images. HTTP is designed on Client-server principles which
allow a client system for establishing a connection with the server machine for
making a request. The server acknowledges the request initiated by the client and
responds accordingly.
• Hyper Text Transfer Protocol Secure (HTTPS): HTTPS is abbreviated as Hyper Text
Transfer Protocol Secure is a standard protocol to secure the communication among
two computers one using the browser and other fetching data from web server. HTTP
is used for transferring data between the client browser (request) and the web server
(response) in the hypertext format, same in case of HTTPS except that the transferring
of data is done in an encrypted format. So it can be said that https thwart hackers
from interpretation or modification of data throughout the transfer of packets.
• Telnet: Telnet is a set of rules designed for connecting one system with another. The
connecting process here is termed as remote login. The system which requests for
connection is the local computer, and the system which accepts the connection is the
remote computer.

ISO-OSI reference model


There are n numbers of users who use computer network and are located over the world.
So to ensure, national and worldwide data communication, systems must be developed
which are compatible to communicate with each other ISO has developed a standard. ISO
stands for International organization of Standardization. This is called a model for Open
System Interconnection (OSI) and is commonly known as OSI model.
The ISO-OSI model is a seven layer architecture. It defines seven layers or levels in a
complete communication system. They are:
1. Application Layer
2. Presentation Layer
3. Session Layer
4. Transport Layer
5. Network Layer
6. Datalink Layer
7. Physical Layer

Below we have the complete representation of the OSI model, showcasing all the layers and
how they communicate with each other.

Feature of OSI Model


• Big picture of communication over network is understandable through this OSI model.
• We see how hardware and software work together.
• We can understand new technologies as they are developed.
• roubleshooting is easier by separate networks.
• Can be used to compare basic functional relationships on different networks.
Principles of OSI Reference Model
The OSI reference model has 7 layers. The principles that were applied to arrive at the seven
layers can be briefly summarized as follows:
• A layer should be created where a different abstraction is needed.
• Each layer should perform a well-defined function.
• The function of each layer should be chosen with an eye toward defining
internationally standardized protocols.
• The layer boundaries should be chosen to minimize the information flow across the
interfaces.
• The number of layers should be large enough that distinct functions need not be
thrown together in the same layer out of necessity and small enough that
architecture does not become unwieldly.

Functions of Different Layers


Following are the functions performed by each layer of the OSI model. This is just an
introduction, we will cover each layer in details in the coming tutorials.

The Physical Layer


• Physical Layer is the lowest layer of the OSI Model.
• It activates, maintains and deactivates the physical connection.
• It is responsible for transmission and reception of the unstructured raw data over
network.
• Voltages and data rates needed for transmission is defined in the physical layer.
• It converts the digital/analog bits into electrical signal or optical signals.
• Data encoding is also done in this layer.

Data Link Layer


• Data link layer synchronizes the information which is to be transmitted over the
physical layer.
• The main function of this layer is to make sure data transfer is error free from one
node to another, over the physical layer.
• Transmitting and receiving data frames sequentially is managed by this layer.
• This layer sends and expects acknowledgements for frames received and sent
respectively. Resending of non-acknowledgement received frames is also handled by
this layer.
• This layer establishes a logical layer between two nodes and also manages the Frame
traffic control over the network. It signals the transmitting node to stop, when the
frame buffers are full.
The Network Layer
• Network Layer routes the signal through different channels from one node to other.
• It acts as a network controller. It manages the Subnet traffic.
• It decides by which route data should take.
• It divides the outgoing messages into packets and assembles the incoming packets
into messages for higher levels.

Transport Layer
• Transport Layer decides if data transmission should be on parallel path or single path.
• Functions such as Multiplexing, Segmenting or Splitting on the data are done by this
layer
• It receives messages from the Session layer above it, convert the message into
smaller units and passes it on to the Network layer.
• Transport layer can be very complex, depending upon the network requirements.

Transport layer breaks the message (data) into small units so that they are handled more
efficiently by the network layer.

The Session Layer


• Session Layer manages and synchronize the conversation between two different
applications.
• Transfer of data from source to destination session layer streams of data are marked
and are resynchronized properly, so that the ends of the messages are not cut
prematurely and data loss is avoided.

The Presentation Layer


• Presentation Layer takes care that the data is sent in such a way that the receiver will
understand the information (data) and will be able to use the data.
• While receiving the data, presentation layer transforms the data to be ready for the
application layer.
• Languages(syntax) can be different of the two communicating systems. Under this
condition presentation layer plays a role of translator.
• It perfroms Data compression, Data encryption, Data conversion etc.
Application Layer
• Application Layer is the topmost layer.
• Transferring of files disturbing the results to the user is also done in this layer. Mail
services, directory services, network resource etc are services provided by application
layer.
• This layer mainly holds application programs to act upon the received and to be sent
data.

Merits of OSI reference model


• OSI model distinguishes well between the services, interfaces and protocols.
• Protocols of OSI model are very well hidden.
• Protocols can be replaced by new protocols as technology changes.
• Supports connection oriented services as well as connectionless service.

Demerits of OSI reference model


• Model was devised before the invention of protocols.
• Fitting of protocols is tedious task.
• It is just used as a reference model.

TCP/IP architecture
TCP/IP means Transmission Control Protocol and Internet Protocol. It is the network model
used in the current Internet architecture as well. Protocols are set of rules which govern
every possible communication over a network. These protocols describe the movement of
data between the source and destination or the internet. They also offer simple naming and
addressing schemes.
Protocols and networks in the TCP/IP model:

Overview of TCP/IP reference model


TCP/IP that is Transmission Control Protocol and Internet Protocol was developed by
Department of Defence's Project Research Agency (ARPA, later DARPA) as a part of a
research project of network interconnection to connect remote machines.

The features that stood out during the research, which led to making the TCP/IP reference
model were:
• Support for a flexible architecture. Adding more machines to a network was easy.
• The network was robust, and connections remained intact untill the source and
destination machines were functioning.
The overall idea was to allow one application on one computer to talk to(send data packets)
another application running on different computer.

Below we have discussed the 4 layers that form the TCP/IP reference model:
Layer 1: Host-to-network Layer
1. Lowest layer of the all.
2. Protocol is used to connect to the host, so that the packets can be sent over it.
3. Varies from host to host and network to network.

Layer 2: Internet layer


1. Selection of a packet switching network which is based on a connectionless
internetwork layer is called a internet layer.
2. It is the layer which holds the whole architecture together.
3. It helps the packet to travel independently to the destination.
4. Order in which packets are received is different from the way they are sent.
5. IP (Internet Protocol) is used in this layer.
6. The various functions performed by the Internet Layer are:
• Delivering IP packets
• Performing routing
• Avoiding congestion

Layer 3: Transport Layer


1. It decides if data transmission should be on parallel path or single path.
2. Functions such as multiplexing, segmenting or splitting on the data is done by
transport layer.
3. The applications can read and write to the transport layer.
4. Transport layer adds header information to the data.
5. Transport layer breaks the message (data) into small units so that they are handled
more efficiently by the network layer.
6. Transport layer also arrange the packets to be sent, in sequence.

Layer 4: Application Layer


The TCP/IP specifications described a lot of applications that were at the top of the protocol
stack. Some of them were TELNET, FTP, SMTP, DNS etc.
1. TELNET is a two-way communication protocol which allows connecting to a remote
machine and run applications on it.
2. FTP(File Transfer Protocol) is a protocol, that allows File transfer amongst computer
users connected over a network. It is reliable, simple and efficient.
3. SMTP(Simple Mail Transport Protocol) is a protocol, which is used to transport
electronic mail between a source and destination, directed via a route.
4. DNS(Domain Name Server) resolves an IP address into a textual address for Hosts
connected over a network.
5. It allows peer entities to carry conversation.
6. It defines two end-to-end protocols: TCP and UDP
• TCP(Transmission Control Protocol): It is a reliable connection-oriented protocol
which handles byte-stream from source to destination without error and flow
control.
• UDP(User-Datagram Protocol): It is an unreliable connection-less protocol that
do not want TCPs, sequencing and flow control. Eg: One-shot request-reply kind
of service.
Merits of TCP/IP model
• It operated independently.
• It is scalable.
• Client/server architecture.
• Supports a number of routing protocols.
• Can be used to establish a connection between two computers.

Demerits of TCP/IP
• In this, the transport layer does not guarantee delivery of packets.
• The model cannot be used in any other application.
• Replacing protocol is not easy.
• It has not clearly separated its services, interfaces and protocols.

HTTP :

o HTTP stands for HyperText Transfer Protocol.


o It is a protocol used to access the data on the World Wide Web (www).
o The HTTP protocol can be used to transfer the data in the form of plain text, hypertext,
audio, video, and so on.
o This protocol is known as HyperText Transfer Protocol because of its efficiency that
allows us to use in a hypertext environment where there are rapid jumps from one
document to another document.

Features of HTTP:
o Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a
request and waits for a response from the server. When the server receives the request,
the server processes the request and sends back the response to the HTTP client after
which the client disconnects the connection. The connection between client and server
exist only during the current request and response time only.
o Media independent: HTTP protocol is a media independent as data can be sent as
long as both the client and server know how to handle the data content. It is required
for both the client and server to specify the content type in MIME-type header.
o Stateless: HTTP is a stateless protocol as both the client and server know each other
only during the current request. Due to this nature of the protocol, both the client and
server do not retain the information between various requests of the web pages.
HTTP Transactions
The figure shows the HTTP transaction between client and server. The client initiates a
transaction by sending a request message to the server. The server replies to the request
message by sending a response message.

Messages
HTTP messages are of two types: request and response. Both the message types follow the
same message format.

Request Message:

The request message is sent by the client that consists of a request line, headers, and
sometimes a body.
Response Message:

The response message is sent by the server to the client that consists of a status line, headers,
and sometimes a body.

Uniform Resource Locator (URL)


o A client that wants to access the document in an internet needs an address and to
facilitate the access of documents, the HTTP uses the concept of Uniform Resource
Locator (URL).
o The Uniform Resource Locator (URL) is a standard way of specifying any kind of
information on the internet.
o The URL defines four parts: method, host computer, port, and path.

o Method: The method is the protocol used to retrieve the document from a server. For
example, HTTP.
o Host: The host is the computer where the information is stored, and the computer is
given an alias name. Web pages are mainly stored in the computers and the computers
are given an alias name that begins with the characters "www". This field is not
mandatory.
o Port: The URL can also contain the port number of the server, but it's an optional field.
If the port number is included, then it must come between the host and path and it
should be separated from the host by a colon.
o Path: Path is the pathname of the file where the information is stored. The path itself
contain slashes that separate the directories from the subdirectories and files.

FTP

o FTP stands for File transfer protocol.It is a standard internet protocol provided by
TCP/IP used for transmitting the files from one host to another.
o It is mainly used for transferring the web page files from their creator to the computer
that acts as a server for other computers on the internet.
o It is also used for downloading the files to the computer from other servers.

Objectives of FTP
o It provides the sharing of files.
o It is used to encourage the use of remote computers.
o It transfers the data more reliably and efficiently.

Why FTP?
Although transferring files from one system to another is very simple and straightforward, but
sometimes it can cause problems. For example, two systems may have different file
conventions. Two systems may have different ways to represent text and data. Two systems
may have different directory structures. FTP protocol overcomes these problems by
establishing two connections between hosts. One connection is used for data transfer, and
another connection is used for the control connection.

Mechanism of FTP
The figure shows the basic model of the FTP. The FTP client has three components: the user
interface, control process, and data transfer process. The server has two components: the
server control process and the server data transfer process.
There are two types of connections in FTP:

o Control Connection: The control connection uses very simple rules for communication.
Through control connection, we can transfer a line of command or line of response at a
time. The control connection is made between the control processes. The control
connection remains connected during the entire interactive FTP session.
o Data Connection: The Data Connection uses very complex rules as data types may
vary. The data connection is made between data transfer processes. The data
connection opens when a command comes for transferring the files and closes when
the file is transferred.

Advantages of FTP:
o Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest way
to transfer the files from one computer to another computer.
o Efficient: It is more efficient as we do not need to complete all the operations to get
the entire file.
o Security: To access the FTP server, we need to login with the username and password.
Therefore, we can say that FTP is more secure.
o Back & forth movement: FTP allows us to transfer the files back and forth. Suppose
you are a manager of the company, you send some information to all the employees,
and they all send information back on the same server.

Disadvantages of FTP:
o FTP serves two operations, i.e., to send and receive large files on a network. However,
the size limit of the file is 2GB that can be sent. It also doesn't allow you to run
simultaneous transfers to multiple receivers.
o Passwords and file contents are sent in clear text that allows unwanted eavesdropping.
So, it is quite possible that attackers can carry out the brute force attack by trying to
guess the FTP password.
o It is not compatible with every system.

SMTP

○ SMTP stands for Simple Mail Transfer Protocol.

○ SMTP is a set of communication guidelines that allow software to transmit an electronic

mail over the internet called Simple Mail Transfer Protocol.

○ It is a program used for sending messages to other computer users based on e-mail

addresses.

○ It provides a mail exchange between users on the same or different computers, and it

also supports:

○ It can send a single message to one or more recipients.

○ Sending message can include text, voice, video or graphics.

○ It can also send the messages on networks outside the internet.


○ The main purpose of SMTP is used to set up communication rules between servers. The

servers have a way of identifying themselves and announcing what kind of

communication they are trying to perform. They also have a way of handling the errors

such as incorrect email address. For example, if the recipient address is wrong, then

receiving server reply with an error message of some kind.

○ First, we will break the SMTP client and SMTP server into two components such as user

agent (UA) and mail transfer agent (MTA). The user agent (UA) prepares the message,

creates the envelope and then puts the message in the envelope. The mail transfer

agent (MTA) transfers this mail across the internet.

Working of SMTP

1. Composition of Mail: A user sends an e-mail by composing an electronic mail

message using a Mail User Agent (MUA). Mail User Agent is a program which is used to

send and receive mail. The message contains two parts: body and header. The body is

the main part of the message while the header includes information such as the sender

and recipient address. The header also includes descriptive information such as the

subject of the message.


2. Submission of Mail: After composing an email, the mail client then submits the

completed e-mail to the SMTP server by using SMTP on TCP port 25.

3. Delivery of Mail: E-mail addresses contain two parts: username of the recipient and

domain name. For example, [email protected], where "vivek" is the username of the

recipient and "gmail.com" is the domain name.

If the domain name of the recipient's email address is different from the sender's

domain name, then MSA will send the mail to the Mail Transfer Agent (MTA). To relay

the email, the MTA will find the target domain. It checks the MX record from Domain

Name System to obtain the target domain. The MX record contains the domain name

and IP address of the recipient's domain. Once the record is located, MTA connects to

the exchange server to relay the message.

4. Receipt and Processing of Mail: Once the incoming message is received, the

exchange server delivers it to the incoming server (Mail Delivery Agent) which stores

the e-mail where it waits for the user to retrieve it.

5. Access and Retrieval of Mail: The stored email in MDA can be retrieved by using MUA

(Mail User Agent). MUA can be accessed by using login and password.

SNMP

○ SNMP stands for Simple Network Management Protocol.

○ SNMP is a framework used for managing devices on the internet.

○ It provides a set of operations for monitoring and managing the internet.

SNMP Concept

○ SNMP has two components Manager and agent.

○ The manager is a host that controls and monitors a set of agents such as routers.
○ It is an application layer protocol in which a few manager stations can handle a set of

agents.

○ The protocol designed at the application level can monitor the devices made by

different manufacturers and installed on different physical networks.

○ It is used in a heterogeneous network made of different LANs and WANs connected by

routers or gateways.

Managers & Agents

○ A manager is a host that runs the SNMP client program while the agent is a router that

runs the SNMP server program.

○ Management of the internet is achieved through simple interaction between a manager

and agent.

○ The agent is used to keep the information in a database while the manager is used to

access the values in the database. For example, a router can store the appropriate

variables such as a number of packets received and forwarded while the manager can

compare these variables to determine whether the router is congested or not.


○ Agents can also contribute to the management process. A server program on the agent

checks the environment, if something goes wrong, the agent sends a warning message

to the manager.

SMI

o The SMI (Structure of management information) is a component used in network

management. Its main function is to define the type of data that can be stored in an

object and to show how to encode the data for the transmission over a network.

MIB

○ The MIB (Management information base) is a second component for the network

management.

○ Each agent has its own MIB, which is a collection of all the objects that the manager can

manage. MIB is categorized into eight groups: system, interface, address translation, ip,

icmp, tcp, udp, and egp. These groups are under the mib object.
SNMP

SNMP defines five types of messages: GetRequest, GetNextRequest, SetRequest,


GetResponse, and Trap.

GetRequest: The GetRequest message is sent from a manager (client) to the agent (server) to
retrieve the value of a variable.

GetNextRequest: The GetNextRequest message is sent from the manager to agent to


retrieve the value of a variable. This type of message is used to retrieve the values of the
entries in a table. If the manager does not know the indexes of the entries, then it will not be
able to retrieve the values. In such situations, GetNextRequest message is used to define an
object.

GetResponse: The GetResponse message is sent from an agent to the manager in response
to the GetRequest and GetNextRequest message. This message contains the value of a
variable requested by the manager.

SetRequest: The SetRequest message is sent from a manager to the agent to set a value in a
variable.

Trap: The Trap message is sent from an agent to the manager to report an event. For
example, if the agent is rebooted, then it informs the manager as well as sends the time of
rebooting.
DNS

• The Domain Name System (DNS) is a hierarchical and decentralized naming system
for computers, services, or other resources connected to the Internet or a private
network.
• It associates various information with domain names assigned to each of the
participating entities.
• Most prominently, it translates more readily memorized domain names to the
numerical IP addresses needed for locating and identifying computer services and
devices with the underlying network protocols.
• By providing a worldwide, distributed directory service, the Domain Name System has
been an essential component of the functionality of the Internet since 1985.
• The Domain Name System delegates the responsibility of assigning domain names
and mapping those names to Internet resources by designating authoritative name
servers for each domain.
• It serves as the phone book for the Internet by translating human-friendly computer
hostnames into IP addresses.

There are 4 DNS servers involved in loading a webpage:

• DNS recursor - The recursor can be thought of as a librarian who is asked to go find
a particular book somewhere in a library. The DNS recursor is a server designed to
receive queries from client machines through applications such as web browsers.
Typically the recursor is then responsible for making additional requests in order to
satisfy the client’s DNS query.
• Root nameserver - The root server is the first step in translating (resolving) human
readable host names into IP addresses. It can be thought of like an index in a library
that points to different racks of books - typically it serves as a reference to other
more specific locations.
• TLD nameserver - The top level domain server (TLD) can be thought of as a specific
rack of books in a library. This nameserver is the next step in the search for a specific
IP address, and it hosts the last portion of a hostname (In example.com, the TLD
server is “com”).
• Authoritative nameserver - This final nameserver can be thought of as a dictionary
on a rack of books, in which a specific name can be translated into its definition. The
authoritative nameserver is the last stop in the nameserver query. If the authoritative
name server has access to the requested record, it will return the IP address for the
requested hostname back to the DNS Recursor (the librarian) that made the initial
request.
E-Mail
• Electronic mail (email) is a digital mechanism for exchanging messages through
Internet or intranet communication platforms.
• Email messages are relayed through email servers, which are provided by all Internet
service providers (ISP).
• Emails are transmitted between two dedicated server folders: sender and recipient. A
sender saves, sends or forwards email messages, whereas a recipient reads or
downloads emails by accessing an email server.

Email messages are comprised of three components, as follows:


• Message envelope: Describes the email’s electronic format
• Message header: Includes sender/recipient information and email subject line
• Message body: Includes text, image and file attachments

S/MIME
• Secure MIME (S/MIME) is an Internet standard for digitally signing MIME-based email
data and its public key encryption.
• It was initially developed by RSA Security, Inc. and is based on the company's public
key encryption mechanism.
• Most email services and software use S/MIME to secure email communication.
• S/MIME enables email security features by providing encryption, authentication,
message integrity and other related services.
• It ensures that an email message is sent by a legitimate sender and provides
encryption for incoming and outgoing messages.
• To enable S/MIME based communication, the sender and receiver must be integrated
with public key and signatures issued from a certificate authority (CA).
• A digital signature is used to validate a sender's identity, whereas a public key
provides encryption and decryption services.

IMAP
• Internet Message Access Protocol (IMAP) is a standard protocol for accessing email
on a remote server from a local client.
• IMAP is an application layer Internet Protocol using the underlying transport layer
protocols to establish host-to-host communication services for applications.
• This allows the use of a remote mail server. The well-known port address for IMAP is
143.
• The IMAP architecture enables users to send and receive emails through a remote
server, without support from a particular device.
• This type of email access is ideal for travelers receiving or answering emails from their
home desktop or office computer.
• This term is also known as interactive mail access protocol, Internet mail access
protocol, and interim mail access protocol
• With IMAP, all emails remain on the server until the client deletes them. IMAP also
permits multiple clients to access and control the same mailbox.
• Some of IMAP benefits include the ability to delete messages, search for keywords in
the body of emails, create and manage multiple mailboxes or folders, and view the
headings for easy visual scans of emails.
• IMAP is still used extensively, but is less important now that so much email is sent via
web-based interfaces such as Gmail, Hotmail, Yahoo Mail, etc.

You might also like