CN Unit 1
CN Unit 1
UNIT 1
INTRODUCTION
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.
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.
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)
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.
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.
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.
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.
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.
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:
Below we have the complete representation of the OSI model, showcasing all the layers and
how they communicate with each other.
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.
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:
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.
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 :
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.
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
○ 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:
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
○ 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
Working of SMTP
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
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
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
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
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 Concept
○ 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
routers or gateways.
○ A manager is a host that runs the SNMP client program while the agent is a router that
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
checks the environment, if something goes wrong, the agent sends a warning message
to the manager.
SMI
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
GetRequest: The GetRequest message is sent from a manager (client) to the agent (server) to
retrieve the value of a variable.
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.
• 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.
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.