Unit5 - 1
Unit5 - 1
APPLICATION LAYER
Unit: 5
Communication Networks
(ACSE0502) Purnima Pal
(Assistant Professor)
B Tech (DS) 5th Sem ECE
Department
Department of
Electronics and Communication Engineering
CN Unit-5 1
12/17/2024
Evaluation Scheme
12/17/2024 2
CN Unit-5
Syllabus by University
Course Contents / Syllabus
UNIT-I Introduction 8 Hr
Goals and applications of networks, Categories of networks, Organization of the
Internet, ISP, The OSI reference model, TCP/IP protocol suite, Network devices and
components, Mode of communications
Physical Layer: Network topology design, Types of connections, LAN, MAN and
MAN Transmission media, Signal transmission and encoding, Network
performance and transmission impairments, Switching techniques and
multiplexing, IEEE standards.
CN Unit-5 3
12/17/2024
Syllabus by University
Course Contents / Syllabus
UNIT-III Network Layer 8 Hr
Point-to-point networks, Logical addressing, Basic internetworking (IP, CIDR, ARP,
RARP, DHCP, ICMP), IPv4, Routing, forwarding and delivery, Static and dynamic
routing, Routing algorithms and protocols, Congestion control algorithms, IPv6.
CN Unit-5 4
12/17/2024
References
• Text Books:
1. B. A. Forouzan, “Data Communications and Networking”, 5th
Edition, TMH, 2017.
• Reference Books:
1. S. Tanenbaum, “Computer Networks”, 4th Edition, Pearson,
2013.
2. W. Stallings, “Data and Computer Communication”, 8th
Edition, Pearson, 2007.
12/17/2024 CN Unit-5 5
Branch Wise Applications
• Fiber optic cables find many uses in a wide variety of industries and applications. Some uses of
fiber optic cables include:
• Medical
Used as light guides, imaging tools and also as lasers for surgeries
• Defense/Government
Used as hydrophones for seismic waves and SONAR , as wiring in aircraft, submarines and other
vehicles and also for field networking
• Data Storage
Used for data transmission
• Telecommunications
Fiber is laid and used for transmitting and receiving purposes
• Networking
Used to connect users and servers in a variety of network settings and help increase the speed and
accuracy of data transmission
• Industrial/Commercial
Used for imaging in hard to reach areas, as wiring where EMI is an issue, as sensory devices to
make temperature, pressure and other measurements, and as wiring in automobiles and in
industrial settings
• Broadcast/CATV
Broadcast/cable companies are using fiber optic cables for wiring CATV, HDTV, internet, video
on-demand and other applications
12/17/2024 6
CN Unit-5
Course Objective
CN Unit-5
12/17/2024 7
Course Outcome
Outcomes
Cos
After Completion of the Course Student will be able to
Explain basic concepts, OSI reference model, services and role of each layer of
CO1 OSI model and TCP/IP, networks devices and transmission media, Analog and
digital data transmission.
CO2 Apply channel allocation, framing, error and flow control techniques and
describe the functions of Network Layer i.e. Logical addressing, subnetting &
Routing Mechanism.
CO3 Explain the different Transport Layer function i.e. Port addressing, Connection
Management, Error control and Flow control mechanism.
CO4 Explain the functions offered by session and presentation layer and their
Implementation.
CO5 Explain the different protocols used at application layer i.e. HTTP, SNMP, SMTP,
FTP,TELNET and VPN.
12/17/2024 CN Unit-5 8
Program Outcomes
1. Engineering knowledge
2. Problem analysis
3. Design/development of solutions
4. Conduct investigations of complex problems
5. Modern tool usage
6. The engineer and society
7. Environment and sustainability
8. Ethics
9. Individual and team work
10. Communication
11. Project management and finance
12. Life-long learning
12/17/2024 CN Unit-5 9
CO-PO Mapping
CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO1 3 2 2 2 2 2 3
CO2 3 3 2 3
CO3 3 3 3 3 2 2 2 3
CO4 3 2 2 2 3
CO5 3 3 2 2 3 2 3
12/17/2024 CN Unit-5 10
CO-PSO Mapping
Course Outcome
Program Specific
Outcomes CO1 CO2 CO3 CO4 C05
2 2 2 2 2
PSO1
2 2 2 2
PSO2 2
2 2 2 3 2
PSO3
AVERAGE 2 2 2 2.3 2
12/17/2024 CN Unit-5 11
Prerequisite and Recap
12/17/2024 CN Unit-5 12
Brief Introduction About Subject with videos
An introduction to Computer networks and covers fundamental topics
like data, information to the definition of communication and computer
networks.
12/17/2024 CN Unit-5 13
Topic Objective and its mapping with CO
12/17/2024 CN Unit-5 14
Prerequisite
Point-to-Point Protocol
12/17/2024 CN Unit-5 15
TCP/ IP model
Presentation
layer
Network
Translation Security Authentication compression
Encryption
/Decryption
12/17/2024 CN Unit-5 17
Translation
Objective: Study about basic concept of Network security and Cryptography and different
types of encryption algorithms
12/17/2024 CN Unit-5 19
Attacks with relation to security goals
12/17/2024 CN Unit-5 20
Attacks
Snooping : in a security context, is unauthorized access to another
person's or company's data.
Traffic analysis :
Traffic analysis is the process of intercepting and examining messages
in order to deduce information from patterns in communication, which
can be performed even when the messages are encrypted.
Eg. Military Intelligence
Replaying:
Replay attacks are the network attacks in which an attacker spies the
conversation between the sender and receiver and takes the
authenticated information e.g. sharing key and then contact to the
receiver with that key.
A repudiation attack occurs when the user denies the fact that he or she
has performed a certain action or has initiated a transaction. ... The
attacker plans to gain easy access to a computer system and gain control
12/17/2024 CN Unit-5 23
Network security : Encryption/ Decryption
cryptography referred only to the encryption and decryption of
messages using secret keys,
Today it is defined as involving three distinct mechanisms:
symmetric-key encipherment,
asymmetric-key encipherment, and
hashing
12/17/2024 CN Unit-5 24
Encryption/ Decryption Methods
12/17/2024 CN Unit-5 25
TRADITIONAL CIPHERS
Decryption : converting cipher msg to original msg (at the receiver side)
12/17/2024 CN Unit-5 26
General idea of traditional cipher
12/17/2024 CN Unit-5 27
Secret key encryption/ symmetric Key
12/17/2024 CN Unit-5 28
Symmetric-key: substitution Method
12/17/2024 CN Unit-5 29
Symmetric-key: Transposition cipher
Plaintext Plaintext
e n emy a t t a c k s t o n i g h t z e n emy a t t a c k s t o n i g h t z
e n e m y e n e m y
a t t a c a t t a c
k s t o n k s t o n
i g h t z i g h t z
E E M Y N E E M Y N
T A A C T T A A C T
T K O N S T K O N S
H I T Z G H I T Z G
Read column by column Write column by column
E T T H E AK I MAO T Y C N Z N T S G E T T H E AK I MAO T Y C N Z N T S G
Ciphertext Ciphertext
Transmission
12/17/2024 CN Unit-5 30
Asymmetric-key
In asymmetric-key cryptography, the secret is personal (unshared); each
person creates and keeps his or her own secret.
12/17/2024 CN Unit-5 31
Asymmetric-key
12/17/2024 CN Unit-5 32
Application Layer
Objective: Study about basic concept Application layer and its function
12/17/2024 CN Unit-5 33
Application Layer Protocols
12/17/2024 CN Unit-5 34
Application Layer services
An application layer allows a user to log on to a remote host. The user's computer
talks to the software terminal, which in turn, talks to the host. The remote host
thinks that it is communicating with one of its own terminals, so it allows the user
to log on.
12/17/2024 CN Unit-5 35
Application Layer services
3.Addressing:
4.Mail Services:
12/17/2024 CN Unit-5 36
Client Server Model
Objective: Study about basic concept of Client Server & Peer to Peer model and it uses
• The client initiates the exchange by requesting data from the server.
• The server responds by sending one or more
streams of data to the client.
• Application layer protocols describe the format
of the requests and responses between clients
and servers.
• The contents of the data exchange will depend
of the application in use.
• Email is an example of a Client-Server
interaction.
12/17/2024 CN Unit-5 37
FTP (File transfer Protocol)(CO5)
12/17/2024 CN Unit-5 38
FTP (File transfer Protocol)(CO5)
• Mechanism of FTP
The above figure shows the basic model of the FTP. The FTP client
has three components: the user interface, control process, and data
transfer process. The server has two components: the server control
process and the server data transfer process
12/17/2024 CN Unit-5 39
FTP (File transfer Protocol)(CO5)
12/17/2024 CN Unit-5 40
FTP (File transfer Protocol)(CO5)
12/17/2024 CN Unit-5 41
FTP (File transfer Protocol)(CO5)
FTP Clients
• FTP client is a program that implements a file transfer protocol
which allows you to transfer files between two hosts on the internet.
• It allows a user to connect to a remote host and upload or download
the files.
• It has a set of commands that we can use to connect to a host,
transfer the files between you and your host and close the
connection.
• The FTP program is also available as a built-in component in a Web
browser. This GUI based FTP client makes the file transfer very
easy and also does not require to remember the FTP commands
12/17/2024 CN Unit-5 42
FTP (File transfer Protocol)(CO5)
Objectives of FTP
•It provides the sharing of files.
•It is used to encourage the use of remote computers.
•It transfers the data more reliably and efficiently
Advantages of FTP:
•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.
•Efficient: It is more efficient as we do not need to complete all the
operations to get the entire file.
Security: To access the FTP server, we need to login with the username
and password. Therefore, we can say that FTP is more secure
12/17/2024 CN Unit-5 43
FTP (File transfer Protocol)(CO5)
Disadvantages of FTP:
• The standard requirement of the industry is that all the FTP
transmissions should be encrypted. However, not all the FTP
providers are equal and not all the providers offer encryption. So, we
will have to look out for the FTP providers that provide encryption.
• 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.
• 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.
• It is not compatible with every system
12/17/2024 CN Unit-5 44
Hypertext transfer protocol and markup language
12/17/2024 CN Unit-5 45
Hypertext transfer protocol and markup language
HTTP Protocol Step 2
• The browser sends a GET request
to the server’s IP address and asks
for the index.html file.
• The server sends the requested file
to the client.
12/17/2024 CN Unit-5 46
Hypertext transfer protocol
• HTTP
o Is a request/response protocol.
o Has three common message types: GET, POST,
PUT.
o Is not secure. Messages can be intercepted.
• HTTPS uses authentication and
encryption to secure data.
12/17/2024 CN Unit-5 47
WWW services and HTTP
12/17/2024 CN Unit-5 48
Email Protocols
• Email is a store-and-forward method of sending, storing, and
retrieving electronic messages.
• Email messages are stored in databases on mail servers.
• Email clients communicate with
mail servers to send and
receive email.
• Mail servers communicate with
other mail servers to transport
messages from one domain to
another.
• Email clients do not
communicate directly when
sending email.
• Email relies on three separate
protocols
for operation:
SMTP (sending),
POP (retrieving),
IMAP (retrieving).
12/17/2024 CN Unit-5 49
SMTP (Simple Mail Transfer Protocol) Operation
12/17/2024 CN Unit-5 50
POP ( post office protocol) Operation
12/17/2024 CN Unit-5 52
Domain name services (DNS)
• While IP addresses are crucial for network communication, they are not easy to
memorize.
• Domain names are created to make server addresses more user- friendly.
• Domain names such as http://www.google.com are user-friendly
addresses associated with the IP address of a specific server.
• However, computers still need the actual numeric address before they can
communicate.
12/17/2024 CN Unit-5 53
Domain name services
• The DNS protocol allows for the dynamic translation of a domain name into
the correct IP address.
• The DNS protocol communications using a single format called a message.
12/17/2024 CN Unit-5 54
Domain name services
• The user passes the host name to the file transfer client.
• The file transfer client passes the host name to the DNS client.
• Each computer, after being booted, knows the address of one DNS server.
The DNS client sends a message to a DNS server with a query that gives
the file transfer server name using the known IP address of the DNS server.
• The DNS server responds with the IP address of the desired file
transfer server. The DNS server passes the IP address to the file
transfer client.
• The file transfer client now uses the received IP address to access
the file transfer Server.
12/17/2024 CN Unit-5 55
Domain name server (DNS)
12/17/2024 CN Unit-5 56
Domain name services
• DNS supports different types of records. Some of these record types
are:
o A - An end device IPv4 address
o NS - An authoritative name server
o AAAA - An end device IPv6 address (pronounced quad-A)
o MX - A mail exchange record
• DNS servers will first look at its own records to resolve the name. If the
server is unable to resolve the name using its locally stored records, it
relays the query to other servers.
• The response is then
forwarded to the requesting
client.
• The DNS Client service on
Windows PCs also stores
previously resolved names in
memory.
• ipconfig /displaydns displays all
of the cached DNS entries on
Windows.
12/17/2024 CN Unit-5 57
DNS Hierarchy
• The DNS protocol uses a hierarchical system, with the root at the top
and branches below. The naming structure is broken down into
small, manageable zones.
• Each DNS server is only responsible for managing name-to-IP mappings
for that small portion of the DNS structure.
• Requests for zones not stored in a specific DNS server are forwarded to
other servers for translation.
• Top-level domains represent either the
type of domain or the country of origin.
Examples of top-level domains are:
o .com - a business or industry
o .org - a non-profit organization
o .au - Australia
o .co - Colombia
12/17/2024 CN Unit-5 58
Working of DNS
3. DNS implements a distributed database to store the name of all the hosts
available on the internet.
12/17/2024 CN Unit-5 59
Dynamic Host Configuration Protocol (DHCP)
12/17/2024 CN Unit-5 60
Dynamic Host Configuration Protocol Operation
• A DHCP client goes through the following basic steps to request an IP:
o The client broadcasts a DHCPDISCOVER.
o A DHCP server replies with a DHCPOFFER message
o The client sends a DHCPREQUEST message to the server it wants to
use (in case of multiple offers).
• A client may also choose to request an address that it had
previously been allocated by the server.
• The server returns a DHCPACK
message to confirm the lease has
been finalized.
12/17/2024 CN Unit-5 61
Dynamic Host Configuration Protocol Operation
12/17/2024 CN Unit-5 62
File transfer Protocol(FTP)
• FTP was developed to allow the transfer of files over the network.
• An FTP client is an application that runs on a client computer used
to push and pull data from an FTP server.
• FTP requires two connections between the client and the server:
one connection for commands and replies and another connection
for the actual file transfer.
• The client initiates and establishes the
first connection to the server for
control traffic on TCP port 21.
• The client then establishes the second
connection to the server for the
actual data transfer on TCP port 20.
• The client can download (pull) data
from
the server or upload (push) data to
the server.
12/17/2024 CN Unit-5 63
Telnet
• Developed in the early 1970’s – among the oldest of the application layer
protocols and services in the TCP/IP protocol suite.
• Allows users to follow text-based terminal devices over the network using
software.
• A connection is known as a ‘virtual terminal (vty)’ session.
• Can be run from the command prompt on a PC.
• You can use the device as if you were sitting there with all the rights and
priorities that you username will offer you.
• TELNET requires a login name and password, it is vulnerable to hacking
because it sends all data including the password in plaintext (not encrypted).
A hacker can eavesdrop and obtain the logging name and password.
Because of this security issue, the use of TELNET has diminished in favor
of another protocol, Secure Shell (SSH).
12/17/2024 CN Unit-5 64
Telnet
12/17/2024 CN Unit-5 65
Daily Quiz
1. Transport layer aggregates data from different applications into a single stream
before passing it to ____________
a) network layer
b) data link layer
c) application layer
d) physical layer
12/17/2024 CN Unit-5 66
Daily Quiz
6. Transport layer aggregates data from different applications into a single stream before
passing it to:
A. network layer
B. data link layer
C. application layer
D. physical layer
12/17/2024 CN Unit-5 67
Weekly Assignment
2. Define TCP.
12/17/2024 CN Unit-5 68
Recap
The Data Connection uses very complex rules as data types may
vary.
12/17/2024 CN Unit-5 69
Topic Links
https://www.youtube.com/watch?v=VdHFk39GEZ0
12/17/2024 CN Unit-5 70
E-Mail (CO5)
12/17/2024 CN Unit-5 72
E-Mail(CO5)
• E-mail Header
The first five lines of an E-mail message is called E-mail header. The
header part comprises of following fields:
From
Date
To
Subject
CC
BCC
12/17/2024 CN Unit-5 73
E-Mail(CO5)
IMAP: IMAP stands for Internet Mail Access Protocol. It was first
proposed in 1986. There exist five versions of IMAP as follows:
• Original IMAP
• IMAP2
• IMAP3
• IMAP2bis
• IMAP4
Key Points:
• IMAP allows the client program to manipulate the e-mail message
on the server without downloading them on the local computer.
• The e-mail is hold and maintained by the remote server.
12/17/2024 CN Unit-5 76
E-Mail protocols(CO5)
POP:
• POP stands for Post Office Protocol. It is generally used to support a
single client. There are several versions of POP but the POP 3 is the
current standard.
Key Points
• POP is an application layer internet standard protocol.
• Since POP supports offline access to the messages, thus requires less
internet usage time.
• POP does not allow search facility.
• In order to access the messaged, it is necessary to download them.
• It allows only one mailbox to be created on server.
• It is not suitable for accessing non mail data
12/17/2024 CN Unit-5 77
E-mail System(CO5)
12/17/2024 CN Unit-5 78
Working of E-mail(CO5)
Email working follows the client server approach. In this client is the
mailer i.e. the mail application or mail program and server is a device
that manages emails.
Following example will take you through the basic steps involved in
sending and receiving emails and will give you a better understanding
of working of email system:
• Suppose person A wants to send an email message to person B.
• Person A composes the messages using a mailer program i.e. mail
client and then select Send option.
• The message is routed to Simple Mail Transfer Protocol to person B’s
mail server.
• The mail server stores the email message on disk in an area
designated for person B.
12/17/2024 CN Unit-5 79
Daily Quiz
• Which is not a application layer protocol?
a) HTTP
b) SMTP
c) FTP
d) TCP
• The packet of information at the application layer is called
__________
a) Packet
b) Message
c) Segment
d) Frame
• E-mail is _________
a) Loss-tolerant application
b) Bandwidth-sensitive application
c) Elastic application
d) None of the mentioned
12/17/2024 CN Unit-5 80
Daily Quiz
• Application layer offers _______ service.
a) End to end
b) Process to process
c) Both End to end and Process to process
d) None of the mentioned
• Which of the following is an application layer service?
a) Network virtual terminal
b) File transfer, access, and management
c) Mail service
d) All of the mentioned
• Electronic mail uses which Application layer protocol?
a) SMTP
b) HTTP
c) FTP
d) SIP
12/17/2024 CN Unit-5 81
Weekly Assignment
3. What is the difference between a user agent (UA) and a mail transfer
agent? (MTA)?
12/17/2024 CN Unit-5 82
Recap
12/17/2024 CN Unit-5 83
Topic Links
https://www.youtube.com/watch?v=nP-p4R5Y55I
https://www.youtube.com/watch?v=6jKGSthvIjY
12/17/2024 CN Unit-5 84
TRADITIONAL CIPHERS
Decryption : converting cipher msg to original msg (at the receiver side)
12/17/2024 CN Unit-5 85
General idea of traditional cipher
12/17/2024 CN Unit-5 86
Secret key encryption/ symmetric Key
12/17/2024 CN Unit-5 87
Symmetric-key: substitution Method
12/17/2024 CN Unit-5 88
Symmetric-key: Transposition cipher
Plaintext Plaintext
e n emy a t t a c k s t o n i g h t z e n emy a t t a c k s t o n i g h t z
e n e m y e n e m y
a t t a c a t t a c
k s t o n k s t o n
i g h t z i g h t z
E E M Y N E E M Y N
T A A C T T A A C T
T K O N S T K O N S
H I T Z G H I T Z G
Read column by column Write column by column
E T T H E AK I MAO T Y C N Z N T S G E T T H E AK I MAO T Y C N Z N T S G
Ciphertext Ciphertext
Transmission
12/17/2024 CN Unit-5 89
Cryptography(CO5)
12/17/2024 CN Unit-5 91
Cryptography(CO5)
Cryptanalysis:
• The process of attempting to discover X or K or both is known as
cryptanalysis. The strategy used by the cryptanalysis depends on
the nature of the encryption scheme and the information available
to the cryptanalyst. There are various types of cryptanalytic attacks
based on the amount of information known to the cryptanalyst.
Cryptographic Attacks
• Passive Attacks
• Active attacks
12/17/2024 CN Unit-5 92
Cryptography(CO5)
• Symmetric Cryptography
Symmetric encryption is a technique which allows the use of only
one key for performing both the encryption and the decryption of
the message shared over the internet. It is also known as the
conventional method used for encryption.
12/17/2024 CN Unit-5 93
Cryptography(CO5)
12/17/2024 CN Unit-5 94
Cryptography(CO5)
12/17/2024 CN Unit-5 95
Cryptography(CO5)
12/17/2024 CN Unit-5 96
Cryptography(CO5)
• Asymmetric Cryptography:
Asymmetric encryption is an encryption technique that uses a pair of
key (private key and public key) for encryption and decryption.
Asymmetric encryption uses the public key for the encryption of the
message and the private key for the decryption of the message. The
public key is freely available to anyone who is interested in sending
the message.
12/17/2024 CN Unit-5 97
Daily Quiz
• Transport services available to applications in one or another form _________
a) Reliable data transfer
b) Timing
c) Security
d) All of the mentioned
• The number of objects in a Web page which consists of 4 jpeg images and HTML text
is ________
a) 4
b) 1
c) 5
d) 7
12/17/2024 CN Unit-5 98
Daily Quiz
• The time taken by a packet to travel from client to server and then back to the client is
called __________
a) STT
b) RTT
c) PTT
d) JTT
12/17/2024 CN Unit-5 99
Weekly Assignment
https://www.youtube.com/watch?v=y4KoiJmr8gE
https://www.youtube.com/watch?v=pnoWCK82apU
• Active Attacks
An active attack is a network exploit in which attacker attempts to
make changes to data on the target or data en route to the target.
• Passive Attacks
A passive attack is a network attack in which a system is monitored
and sometimes scanned for open ports and vulnerabilities, but does
not affect system resources.
https://www.youtube.com/watch?v=y4KoiJmr8gE
https://www.youtube.com/watch?v=pnoWCK82apU
• https://www.youtube.com/watch?v=lCy_KUfhBbw
• https://www.youtube.com/watch?v=fTPbiedSGMw
• https://www.youtube.com/watch?v=y4KoiJmr8gE
• https://www.youtube.com/watch?v=pnoWCK82apU
• https://www.youtube.com/watch?v=VdHFk39GEZ0
• Transport layer aggregates data from different applications into a single stream
before passing it to ____________
a) network layer
b) data link layer
c) application layer
d) physical layer
• Transport layer aggregates data from different applications into a single stream before
passing it to:
a). network layer
b) data link layer
c) application layer
d) physical layer
• The number of objects in a Web page which consists of 4 jpeg images and
HTML text is ________