Computer Networks
Application Layer
Date:
Department of Computer Engineering
Jain Group of Institution, Bangalore
Presented By:
Rubal Sagwal
Assistant Professor
Department of Computer Engineering
1ADAD
Contents
• DHCP
• HTTP
• HTTPS
• FTP
• TFTP
• SFTP
• Talnet
• Email
ADAD 2
Application Layer
DHCP – DNS – HTTP – HTTPS – FTP – TFTP – SFTP
ADAD 3
DHCP (Dynamic Host Configuration Protocol)
• Mapping Physical to Logical Address – sometimes host
knows its physical address, but needs to know its logical
address.
• Cases –
• Sometimes host moves from one physical network to another
network.
• Host wants a temporary IP address.
• Why DHCP – because other address resolution protocols are
static in nature.
• DHCP provide static and dynamic address allocation that can
be manual or automatic.
ADAD 4
Contd..
DHCP
• Static Address Allocation: Any client can request a
static address from a DHCP server.
• A DHCP server has a database that statically binds the
physical addresses to IP addresses.
• Dynamic Address Allocation: needed – when a host
moves from network to network or connected and
disconnected from a network.
• DHCP has a second database – which has pool of available IP
addresses.
• Second DB make it dynamic.
• When a DHCP client requests a temporary IP address, the
DHCP server goes to the pool of available (unused) IP
addresses and assigns an IP address for a limited period of
time.
ADAD 5
Contd..
DHCP
• Dynamic Address Allocation:
• When a DHCP client sends a request to DHCP server –
the server first checks its static database.
• If an entry with the requested physical address exist in
the static data base – the permeant IP address of the
client is returned.
• If entry doesn’t exist in the static database – the server
select an IP address from the available pool – assign the
address to the client – adds to dynamic table.
ADAD 6
HTTP
HTTPS
ADAD 7
Hyper Text Transfer Protocol
• Http used – to access data on world wide web.
• WWW -> collection of web sites -> collection of web
pages -> HTML pages -> Data <- accessed by browser <-
client.
• Http function with – FTP and SMTP.
• Similar to ftp – transfer files and uses the services of
TCP.
• Http messages are not designed to read by human –
read and interpreted by the Http server and client.
• Port number over TCP – well known port 80.
ADAD 8
Contd…
Http Transaction
ADAD 9
Request
Response
Request and Response message
Request and Status Line of Http
ADAD 10
1. Request Type:
Contd…
Request and Status Line of Http
2. URL
3. Version: Version of Http.
4. Status Code:
ADAD 11
Contd…
Request and Status Line of Http
ADAD 12
Contd…
Request and Status Line of Http
5. Header:
1. General header – general info like date etc.
2. Request header – client configuration.
3. Response header – server’s configuration.
4. Entity header – info about the body of the document.
Request message can contain only general, request
and entity header.
Response message can contain general, response
and entity header.
ADAD 13
Contd…
Request and Status Line of Http – General Header
ADAD 14
Contd…
Request and Status Line of Http – Request Header
ADAD 15
Contd…
Request and Status Line of Http – Response Header
ADAD 16
6. Body: contain the document to be sent.
HTTPS
• Hyper Text Transfer Protocol Secure (HTTPS) is the
secure version of HTTP – the protocol over which
data is sent between your browser and the website
that you are connected to.
• The 'S' at the end of HTTPS stands for 'Secure’.
• It means all communications between your
browser and the website are encrypted.
• HTTPS is often used to protect highly confidential
online transactions like online banking and online
shopping order forms.
ADAD 17
HTTPS
ADAD 18
How does HTTPS
• HTTPS pages typically use one of two secure
protocols to encrypt communications - SSL (Secure
Sockets Layer) or TLS (Transport Layer Security).
• Both the TLS and SSL protocols use what is known
as an 'asymmetric' Public Key Infrastructure (PKI)
system.
• An asymmetric system uses two 'keys' to encrypt
communications, a 'public' key and a 'private' key.
• Anything encrypted with the public key can only be
decrypted by the private key and vice-versa.
ADAD 19
How does HTTPS
• When you request a HTTPS connection to a webpage, the
website will initially send its SSL certificate to your browser.
• This certificate contains the public key needed to begin the
secure session.
• Based on this initial exchange, your browser and the
website then initiate the 'SSL handshake’.
• The SSL handshake involves the generation of shared secrets
to establish a uniquely secure connection between yourself
and the website.
• When a trusted SSL Digital Certificate is used during
a HTTPS connection, users will see a padlock icon in the
browser address bar. When an Extended Validation
Certificate is installed on a web site, the address bar will
turn green.
ADAD 20
File Transfer Protocol
TFTP – SFTP
ADAD 21
File Transfer Protocol
• File Transfer – from one computer to another –
most common task.
• FTP – standard mechanism provided by TCP/IP for
copying a file from one host to another.
• Why FTP –
• Two systems may have different ways to represent text
and data.
• Two systems may have different directory structures.
• Different formats, etc.
ADAD 22
Contd…
FTP
• FTP uses well-known TCP ports :
• Well-known port 20 – data connection.
• Well-known port 21 – control connection.
ADAD 23
Contd…
FTP
• Control Connection – remains connected during the
entire interactive FTP session.
• Data Connection – opened and then closed for
each file transferred.
• While the control connection is open – the data
connection can be opened and closed multiple
times.
ADAD 24
Contd…
FTP – Communication over Control Connection
ADAD 25
• Uses 7- bit ASCII character set.
• Communication is achieved through Command and
Response.
• Each line is terminated with a two-character end-
of-line token.
Contd…
FTP – Communication over Data Connection
ADAD 26
• A file is copied form the server to the client –
retrieving a file – done under the supervision of
the RETR command.
• A file is copied form the client to the server –
storing a file – done under the supervision of the
STOR command.
• A list of directory or file name is to be sent from the
server to the client – done under the supervision of
the LIST command.
Contd…
FTP – Communication over Data Connection
ADAD 27
• The client must define the type of the file to be
transferred, the structure of the data and the
transmission mode.
Contd…
FTP – Communication over Data Connection
ADAD 28
• File Type: ASCII file, EBCDIC file or image file.
• Data Structure:
• File Structure – file is continuous stream of bytes.
• Record Structure – file is divided into records.
• Page Structure – file is divided into pages.
• Transmission mode:
• Stream mode – default mode – continuous stream of
mode.
• Block Mode – in blocks.
• Compressed Mode – if a file is big, then we can
compress.
Trivial File Transfer Protocol (TFTP)
• Trivial File Transfer Protocol (TFTP) is a simple protocol
used for transferring files.
• It uses the User Datagram Protocol (UDP) to transport
data from one end to another.
• TFTP is mostly used to read and write files/mail to or
from a remote server.
• Trivial File Transfer Protocol is very simple in design and
has limited features as compared to File Transfer
Protocol (FTP).
• TFTP provides no authentication and security while
transferring files.
• Data transfer through TFTP is usually initiated through
port 69.
ADAD 29
Secure File Transfer Protocol (SFTP)
• Secure File Transfer Protocol (SFTP) – secure
version of File Transfer Protocol (FTP).
• Facilitates data access and data transfer over a
Secure Shell (SSH) data stream.
• It is part of the SSH Protocol. This term is also
known as SSH File Transfer Protocol.
• SFTP was designed by the Internet Engineering Task
Force (IETF) as an extended version of SSH 2.0,
allowing file transfer over SSH and use with
Transport Layer Security (TLS) and VPN
applications.
ADAD 30
Secure File Transfer Protocol (SFTP)
• Both the commands and data are encrypted in order to
prevent passwords and other sensitive information
from being transferred over the network.
• The functionality of SFTP is similar to that of FTP.
• However, SFTP uses SSH to transfer files.
• SFTP requires that the client user must be
authenticated by the server and the data transfer must
take place over a secure channel (SSH).
• It allows a wide range of operations to be performed on
remote files, acting somewhat like a remote file system
protocol.
• SFTP allows operations such as resuming from halted
transfers, directory listings and remote file removal.
ADAD 31
TELNET
ADAD 32
TELNET
• Abbreviation for – Terminal network.
• TCP/IP suite protocol – proposed by ISO.
• Why Telnet – for remote logging.
• Remote Logging – accessing any application at local
site from remote location.
• Client/ server Application Program.
• Enable the establishment of a connection to a
remote system in such a way that the local terminal
appears to be terminal at remote system.
ADAD 33
TELNET – key terms
1. Time sharing – a large computer supports multiple
users.
• Interaction between a computer and a server – through
a terminal – combination of keyboard, monitor and
mouse etc.
2. Logging – as we know timesharing environment.
• Users are the part of the system with some right to
access resources.
• Each authorized user has an identification and a
password.
• User identification – define identity of a user that it is a
part of the system.
ADAD 34
TELNET – key terms
• User logging – with user ID and Password.
• At system – Password checking – to prevent an
unauthorized access.
• Local log-in – user types at terminal or at a workstation
running a terminal emulator – terminal passes character
to the Operating system.
• Remote log-in – need client and server program.
ADAD 35
TELNET – Local Logging
ADAD 36
TELNET – Remote Logging
ADAD 37
TELNET – Mode of Operation
ADAD 38
1. Default mode – Echoing is done by the client.
• User type a character – the client echoes the character
on the screen but does not send it until a whole line is
completed.
2. Character mode – each character typed sent by
the client – to the server.
• Echoing done by server.
• Transmission delayed – because of server echoing.
3. Line Mode – line editing (echoing, character
erasing, line erasing) done by client.
• The client then send the whole line to the server.

Application Layer and Protocols

  • 1.
    Computer Networks Application Layer Date: Departmentof Computer Engineering Jain Group of Institution, Bangalore Presented By: Rubal Sagwal Assistant Professor Department of Computer Engineering 1ADAD
  • 2.
    Contents • DHCP • HTTP •HTTPS • FTP • TFTP • SFTP • Talnet • Email ADAD 2
  • 3.
    Application Layer DHCP –DNS – HTTP – HTTPS – FTP – TFTP – SFTP ADAD 3
  • 4.
    DHCP (Dynamic HostConfiguration Protocol) • Mapping Physical to Logical Address – sometimes host knows its physical address, but needs to know its logical address. • Cases – • Sometimes host moves from one physical network to another network. • Host wants a temporary IP address. • Why DHCP – because other address resolution protocols are static in nature. • DHCP provide static and dynamic address allocation that can be manual or automatic. ADAD 4
  • 5.
    Contd.. DHCP • Static AddressAllocation: Any client can request a static address from a DHCP server. • A DHCP server has a database that statically binds the physical addresses to IP addresses. • Dynamic Address Allocation: needed – when a host moves from network to network or connected and disconnected from a network. • DHCP has a second database – which has pool of available IP addresses. • Second DB make it dynamic. • When a DHCP client requests a temporary IP address, the DHCP server goes to the pool of available (unused) IP addresses and assigns an IP address for a limited period of time. ADAD 5
  • 6.
    Contd.. DHCP • Dynamic AddressAllocation: • When a DHCP client sends a request to DHCP server – the server first checks its static database. • If an entry with the requested physical address exist in the static data base – the permeant IP address of the client is returned. • If entry doesn’t exist in the static database – the server select an IP address from the available pool – assign the address to the client – adds to dynamic table. ADAD 6
  • 7.
  • 8.
    Hyper Text TransferProtocol • Http used – to access data on world wide web. • WWW -> collection of web sites -> collection of web pages -> HTML pages -> Data <- accessed by browser <- client. • Http function with – FTP and SMTP. • Similar to ftp – transfer files and uses the services of TCP. • Http messages are not designed to read by human – read and interpreted by the Http server and client. • Port number over TCP – well known port 80. ADAD 8
  • 9.
  • 10.
    Request and StatusLine of Http ADAD 10 1. Request Type:
  • 11.
    Contd… Request and StatusLine of Http 2. URL 3. Version: Version of Http. 4. Status Code: ADAD 11
  • 12.
    Contd… Request and StatusLine of Http ADAD 12
  • 13.
    Contd… Request and StatusLine of Http 5. Header: 1. General header – general info like date etc. 2. Request header – client configuration. 3. Response header – server’s configuration. 4. Entity header – info about the body of the document. Request message can contain only general, request and entity header. Response message can contain general, response and entity header. ADAD 13
  • 14.
    Contd… Request and StatusLine of Http – General Header ADAD 14
  • 15.
    Contd… Request and StatusLine of Http – Request Header ADAD 15
  • 16.
    Contd… Request and StatusLine of Http – Response Header ADAD 16 6. Body: contain the document to be sent.
  • 17.
    HTTPS • Hyper TextTransfer Protocol Secure (HTTPS) is the secure version of HTTP – the protocol over which data is sent between your browser and the website that you are connected to. • The 'S' at the end of HTTPS stands for 'Secure’. • It means all communications between your browser and the website are encrypted. • HTTPS is often used to protect highly confidential online transactions like online banking and online shopping order forms. ADAD 17
  • 18.
  • 19.
    How does HTTPS •HTTPS pages typically use one of two secure protocols to encrypt communications - SSL (Secure Sockets Layer) or TLS (Transport Layer Security). • Both the TLS and SSL protocols use what is known as an 'asymmetric' Public Key Infrastructure (PKI) system. • An asymmetric system uses two 'keys' to encrypt communications, a 'public' key and a 'private' key. • Anything encrypted with the public key can only be decrypted by the private key and vice-versa. ADAD 19
  • 20.
    How does HTTPS •When you request a HTTPS connection to a webpage, the website will initially send its SSL certificate to your browser. • This certificate contains the public key needed to begin the secure session. • Based on this initial exchange, your browser and the website then initiate the 'SSL handshake’. • The SSL handshake involves the generation of shared secrets to establish a uniquely secure connection between yourself and the website. • When a trusted SSL Digital Certificate is used during a HTTPS connection, users will see a padlock icon in the browser address bar. When an Extended Validation Certificate is installed on a web site, the address bar will turn green. ADAD 20
  • 21.
  • 22.
    File Transfer Protocol •File Transfer – from one computer to another – most common task. • FTP – standard mechanism provided by TCP/IP for copying a file from one host to another. • Why FTP – • Two systems may have different ways to represent text and data. • Two systems may have different directory structures. • Different formats, etc. ADAD 22
  • 23.
    Contd… FTP • FTP useswell-known TCP ports : • Well-known port 20 – data connection. • Well-known port 21 – control connection. ADAD 23
  • 24.
    Contd… FTP • Control Connection– remains connected during the entire interactive FTP session. • Data Connection – opened and then closed for each file transferred. • While the control connection is open – the data connection can be opened and closed multiple times. ADAD 24
  • 25.
    Contd… FTP – Communicationover Control Connection ADAD 25 • Uses 7- bit ASCII character set. • Communication is achieved through Command and Response. • Each line is terminated with a two-character end- of-line token.
  • 26.
    Contd… FTP – Communicationover Data Connection ADAD 26 • A file is copied form the server to the client – retrieving a file – done under the supervision of the RETR command. • A file is copied form the client to the server – storing a file – done under the supervision of the STOR command. • A list of directory or file name is to be sent from the server to the client – done under the supervision of the LIST command.
  • 27.
    Contd… FTP – Communicationover Data Connection ADAD 27 • The client must define the type of the file to be transferred, the structure of the data and the transmission mode.
  • 28.
    Contd… FTP – Communicationover Data Connection ADAD 28 • File Type: ASCII file, EBCDIC file or image file. • Data Structure: • File Structure – file is continuous stream of bytes. • Record Structure – file is divided into records. • Page Structure – file is divided into pages. • Transmission mode: • Stream mode – default mode – continuous stream of mode. • Block Mode – in blocks. • Compressed Mode – if a file is big, then we can compress.
  • 29.
    Trivial File TransferProtocol (TFTP) • Trivial File Transfer Protocol (TFTP) is a simple protocol used for transferring files. • It uses the User Datagram Protocol (UDP) to transport data from one end to another. • TFTP is mostly used to read and write files/mail to or from a remote server. • Trivial File Transfer Protocol is very simple in design and has limited features as compared to File Transfer Protocol (FTP). • TFTP provides no authentication and security while transferring files. • Data transfer through TFTP is usually initiated through port 69. ADAD 29
  • 30.
    Secure File TransferProtocol (SFTP) • Secure File Transfer Protocol (SFTP) – secure version of File Transfer Protocol (FTP). • Facilitates data access and data transfer over a Secure Shell (SSH) data stream. • It is part of the SSH Protocol. This term is also known as SSH File Transfer Protocol. • SFTP was designed by the Internet Engineering Task Force (IETF) as an extended version of SSH 2.0, allowing file transfer over SSH and use with Transport Layer Security (TLS) and VPN applications. ADAD 30
  • 31.
    Secure File TransferProtocol (SFTP) • Both the commands and data are encrypted in order to prevent passwords and other sensitive information from being transferred over the network. • The functionality of SFTP is similar to that of FTP. • However, SFTP uses SSH to transfer files. • SFTP requires that the client user must be authenticated by the server and the data transfer must take place over a secure channel (SSH). • It allows a wide range of operations to be performed on remote files, acting somewhat like a remote file system protocol. • SFTP allows operations such as resuming from halted transfers, directory listings and remote file removal. ADAD 31
  • 32.
  • 33.
    TELNET • Abbreviation for– Terminal network. • TCP/IP suite protocol – proposed by ISO. • Why Telnet – for remote logging. • Remote Logging – accessing any application at local site from remote location. • Client/ server Application Program. • Enable the establishment of a connection to a remote system in such a way that the local terminal appears to be terminal at remote system. ADAD 33
  • 34.
    TELNET – keyterms 1. Time sharing – a large computer supports multiple users. • Interaction between a computer and a server – through a terminal – combination of keyboard, monitor and mouse etc. 2. Logging – as we know timesharing environment. • Users are the part of the system with some right to access resources. • Each authorized user has an identification and a password. • User identification – define identity of a user that it is a part of the system. ADAD 34
  • 35.
    TELNET – keyterms • User logging – with user ID and Password. • At system – Password checking – to prevent an unauthorized access. • Local log-in – user types at terminal or at a workstation running a terminal emulator – terminal passes character to the Operating system. • Remote log-in – need client and server program. ADAD 35
  • 36.
    TELNET – LocalLogging ADAD 36
  • 37.
    TELNET – RemoteLogging ADAD 37
  • 38.
    TELNET – Modeof Operation ADAD 38 1. Default mode – Echoing is done by the client. • User type a character – the client echoes the character on the screen but does not send it until a whole line is completed. 2. Character mode – each character typed sent by the client – to the server. • Echoing done by server. • Transmission delayed – because of server echoing. 3. Line Mode – line editing (echoing, character erasing, line erasing) done by client. • The client then send the whole line to the server.