112
Computer Networks Unit I Application layer (2012 pattern) By Prof. B.A.Khivsara Assistant Prof. Department of Computer Engg. SNJB’s KBJ COE, Chandwad Introduction 1-1

Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

  • Upload
    buidat

  • View
    218

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Computer NetworksUnit I

Application layer(2012 pattern)

By Prof. B.A.Khivsara

Assistant Prof.

Department of Computer Engg.

SNJB’s KBJ COE, ChandwadIntroduction 1-1

Page 2: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Chapter 1: IntroductionWhat is Internet?

network edge; hosts, access net, physical media

OSI Layer

Introduction to application layer services

HTTP

FTP

SMTP

DNS

DHCP

TELNET Introduction 1-2

Page 3: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-3

Chapter 1: ROAD MAP

What is Internet?

network edge; hosts, access net, physical media

OSI Layer

Introduction to application layer services

HTTP

FTP

SMTP

DNS

DHCP

TELNET

Page 4: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-4

What’s the Internet: “nuts and bolts” view

millions of connected computing devices: hosts = end systems

running network apps Home network

Institutional network

Mobile network

Global ISP

Regional ISP

router

PC

server

wirelesslaptop

cellular handheld

wiredlinks

access points

communication links

fiber, copper, radio, satellite

transmission rate = bandwidth

routers: forward packets (chunks of data)

Page 5: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-5

What’s the Internet: “nuts and bolts” view

protocols control sending, receiving of msgs e.g., TCP, IP, HTTP, Skype,

Ethernet

Internet: “network of networks” loosely hierarchical

public Internet versus private intranet

Internet standards RFC: Request for comments

IETF: Internet Engineering Task Force

Home network

Institutional network

Mobile network

Global ISP

Regional ISP

Page 6: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-6

What’s the Internet: a service view

communication infrastructure enables distributed applications:

Web, VoIP, email, games, e-commerce, file sharing

communication services provided to apps:

reliable data delivery from source to destination

“best effort” (unreliable) data delivery

Page 7: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-7

Chapter 1: ROAD MAP

What is Internet?

network edge; hosts, access net, physical media

OSI Layer

Introduction to application layer services

HTTP

FTP

SMTP

DNS

DHCP

TELNET

Page 8: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-8

The network edge:

end systems (hosts): run application programs

e.g. Web, email

at “edge of network”

client/server

peer-peer

client/server model client host requests, receives

service from always-on server

e.g. Web browser/server; email client/server

peer-peer model: minimal (or no) use of

dedicated servers

e.g. Skype, BitTorrent

Page 9: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Connection oriented and conn.less services

Connection oriented Connectionless

1> Connection Establishment use it and Release it.

1>No connection establishment

2> Reliable 2>Not Reliable

3>Information can be resent to receiver if data is missed or with error

3>It is not Possible

4>Packets come in sequence 4>No sequencing

5>Each packet uses same route

5>Different route

6>If connection fails cannot sent data

6>Can sent data using diff route

Page 10: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-10

Chapter 1: ROAD MAP

What is Internet?

network edge; hosts, access net, physical media

OSI Layer

Introduction to application layer services

HTTP

FTP

SMTP

DNS

DHCP

TELNET

Page 11: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

OSI

Open Systems Interconnection (OSI) is a set of internationally recognized, non-proprietary standards for networking and for operating system involved in networking functions.

Page 12: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

OSI model block diagram

Page 13: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

7 Layers

7. Application Layer

6. Presentation Layer

5. Session Layer

4. Transport Layer

3. Network Layer

2. Data Link Layer

1. Physical Layer

All

People

Seem

To

Need

Data

Processing

Page 14: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

LAYER 7 – The APPLICATION

Layer

The application layer is responsible for providing services to the user.

Resource sharing

Provides a set of interfaces for sending and receiving applications to gain access to and use network services,

such as: networked file transfer, message handling and database query processing

Email, File transfer

Page 15: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

LAYER 6 – The PRESENTATION Layer

Manages data-format information for networked communications (the network’s translator)

For outgoing messages, it converts data into a generic format for network transmission; for incoming messages, it converts data from the generic network format to a format that the receiving application can understand

This layer is also responsible for certain protocol conversions, data encryption/decryption, or data compression/decompression

Page 16: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

LAYER 5 – The SESSION Layer

Enables two networked resources to hold ongoing communications (called a session) across a network

Applications on either end of the session are able to exchange data for the duration of the session

Responsible for initiating, maintaining and terminating sessions

Responsible for security and access control to session information (via session participant identification)

Responsible for synchronization services, and for checkpoint services

Page 17: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

LAYER 4 – The TRANSPORT Layer

Manages the flow of data between parties by segmenting long data streams into smaller data chunks (based on allowed “packet” size for a given transmission medium)

Reassembles chunks into their original sequence at the receiving end

Reliable transmission (Provides acks of successful transmissions and requests resends for packets which arrive with errors)

Provides Congestion control and flow control

Multiplexing and demultiplexing

End-to-end data delivery

Page 18: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

LAYER 3 – The NETWORK Layer

Handles addressing messages for delivery, as well as translating logical network addresses and names into their physical counterparts

Responsible for deciding how to route transmissions between computers

Find best route to route the packet

This layer also handles packet switching and network congestion control

Page 19: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

LAYER 2 – The DATA LINK Layer

Handles special data frames (packets) between the Network layer and the Physical layer

At the receiving end, this layer packages raw data from the physical layer into data frames for delivery to the Network layer

At the sending end this layer handles conversion of data into raw formats that can be handled by the Physical Layer

Error control

Flow control

Framing

Page 20: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

LAYER 1 – The PHYSICAL Layer

Converts bits into electronic signals for outgoing messages

Converts electronic signals into bits for incoming messages

This layer manages the interface between the computer and the network medium (coax, twisted pair, etc.)

This layer tells the driver software for the MAU (media attachment unit, ex. network interface cards (NICs, modems, etc.)) what needs to be sent across the medium

The bottom layer of the OSI model

Page 21: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input
Page 22: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-22

Chapter 1: ROAD MAP

What is Internet?

network edge; hosts, access net, physical media

OSI Layer

Introduction to application layer services

HTTP

FTP

SMTP

DNS

DHCP

TELNET

Page 23: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 23

Some network apps

e-mail

web

instant messaging

remote login

P2P file sharing

multi-user network games

streaming stored video clips

voice over IP

real-time video conferencing

grid computing

Page 24: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 24

Application architectures

Client-server

Peer-to-peer (P2P)

Hybrid of client-server and P2P

Page 25: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 25

Client-server architecture

server:

always-on host

permanent IP address

server farms for scaling

clients: communicate with server

may be intermittently connected

may have dynamic IP addresses

do not communicate directly with each other

client/server

Page 26: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 26

Pure P2P architecture

no always-on server

arbitrary end systems directly communicate

peers are intermittently connected and change IP addresses

Highly scalable but difficult to manage

peer-peer

Page 27: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 27

Processes communicating

Process: program running within a host.

within same host, two processes communicate using inter-process communication (defined by OS).

processes in different hosts communicate by exchanging messages

Client process: process that initiates communication

Server process: process that waits to be contacted

Note: applications with P2P

architectures have client

processes & server

processes

Page 28: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 28

Sockets

process sends/receives messages to/from its socket

socket analogous to door sending process shoves

message out door

sending process relies on transport infrastructure on other side of door which brings message to socket at receiving process

process

TCP with

buffers,

variables

socket

host or

server

process

TCP with

buffers,

variables

socket

host or

server

Internet

controlled

by OS

controlled by

app developer

API: (1) choice of transport protocol; (2) ability to fix a few

parameters (lots more on this later)

Page 29: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 29

Addressing processes

to receive messages, process must have identifier

host device has unique 32-bit IP address

Q: does IP address of host on which process runs suffice for identifying the process?

A: No, manyprocesses can be running on same host

identifier includes both IP address and port numbers associated with process on host.

Example port numbers: HTTP server: 80

Mail server: 25

to send HTTP message to gaia.cs.umass.edu web server: IP address: 128.119.245.12

Port number: 80

more shortly…

Page 30: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 30

App-layer protocol defines

Types of messages exchanged, e.g., request, response

Message syntax: what fields in messages &

how fields are delineated

Message semantics meaning of information in

fields

Rules for when and how processes send & respond to messages

Public-domain protocols:

defined in RFCs

allows for interoperability

e.g., HTTP, SMTP

Proprietary(Private) protocols:

e.g., Skype

Page 31: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-31

Chapter 1: ROAD MAP

What is Internet?

network edge; hosts, access net, physical media

OSI Layer

Introduction to application layer services

HTTP

FTP

SMTP

DNS

DHCP

TELNET

Page 32: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 32

Web and HTTP

First some jargon

Web page consists of objects

Object can be HTML file, JPEG image, Java applet, audio file,…

Web page consists of base HTML-file which includes several referenced objects

Each object is addressable by a URL

Example URL:

www.someschool.edu/someDept/pic.gif

host name path name

Page 33: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 33

HTTP overview

HTTP: hypertext transfer protocol

Web’s application layer protocol

client/server model

client: browser that requests, receives, “displays” Web objects

server: Web server sends objects in response to requests

HTTP uses port no 80

PC running

Explorer

Server

running

Apache Web

server

Mac running

Navigator

Page 34: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 34

HTTP overview (continued)

Uses TCP: client initiates TCP

connection (creates socket) to server, port 80

server accepts TCP connection from client

HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server)

TCP connection closed

HTTP is “stateless” server maintains no

information about past client requests

Page 35: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 35

HTTP connections

Nonpersistent HTTP

At most one object is sent over a TCP connection.

Persistent HTTP

Multiple objects can be sent over single TCP connection between client and server.

Page 36: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 36

Nonpersistent HTTP Suppose user enters URL(contains text, references to 10

jpeg images)

1a. HTTP client initiates TCP connection to HTTP server

2. HTTP client sends HTTP request

message into TCP connection

socket. Message indicates that

client wants object.

1b. HTTP server waiting for TCP

connection at port 80. “accepts”

connection, notifying client

3. HTTP server receives request

message, forms response message

containing requested object, and

sends message into its socket

time

Page 37: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 37

Nonpersistent HTTP (cont.)

5. HTTP client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects

6. Steps 1-4 repeated for each of 10

jpeg objects

4. HTTP server closes TCP

connection.

time

Page 38: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 38

Non-Persistent HTTP: Response time

Definition of RTT(Round Trip Time): time for a small packet to travel from client to server and back.

Response time:

one RTT to initiate TCP connection

one RTT for HTTP request

file transmission time

total = 2RTT+transmit time

time to

transmit

file

initiate TCP

connection

RTT

request

file

RTT

file

received

time time

Page 39: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 39

Persistent HTTP

Nonpersistent HTTP Shortcomings

requires 2 RTTs per object

OS overhead for each TCP

connection

New connection must be

established and maintained

for each requested object

Persistent HTTP

server leaves connection open after sending response

subsequent HTTP messages between same client/server sent over open connection

client sends requests as soon as it encounters a referenced object

as little as one RTT for all the referenced objects

Page 40: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

HTTP Message Formats

Two types of message

1. HTTP Request message

2. HTTP Response Message

Introduction 1-40

Page 41: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 41

HTTP request message: general format

Page 42: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 42

HTTP request message Example

HTTP request message: ASCII (human-readable format)

GET /somedir/page.html HTTP/1.1

Host: www.someschool.edu

User-agent: Mozilla/4.0

Connection: close

Accept-language:fr

(extra carriage return, line feed)

request line

(GET, POST,

HEAD commands)

header

lines

Carriage return,

line feed

indicates end

of message

Page 43: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 43

Uploading form input

Post method:

Web page often includes form input

Input is uploaded to server in entity body

URL method:

Uses GET method

Input is uploaded in URL field of request line:

Example

www.somesite.com/animalsea

rch?monkeys&banana

Page 44: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

HTTP Methods

The GET method requests the server to send the page . The page is suitably encoded in

MIME. The vast majority of the requests on the web are GETs.

GET filename HTTP/1.1

Where filename is the resource name to be fetched and 1.1 is the protocol version being

used

The HEAD method just asks for the message header, without the actual page. This method

can be used to get a page’s time of last modification, to collect information for indexing

purposes, or just to test an URL for validity

The PUT method is the reverse of GET. Instead of reading a page, it writes a page. This

method makes it possible to build a collection of web pages on a remote web server. The

body of the request contains the page. It may be encoded using MIME, in which case, the

lines following the PUT might include Content-Type and authentication headers to prove

that the caller indeed has permission to perform the operation

POST is similar to PUT. It too, bears an URL, but instead of replacing the existing data, it

appends it to any existing data. Posting a message to a newsgroup or adding a file to a

bulletin board are example of the usage.

DELETE does what you expect: deletes a page from a remote web server; authentication

and permissions play a major role here. There is no guarantee that a DELETE operation is

successful since even if the remote web server is willing to delete a page, the file

permissions may be set in such a way that the server process doesn’t have rights to do it.

TRACE method is used for debugging. It instructs the server to send back the request. This

is useful when requests are not processed correctly and the client wants to know it sent the

proper request.

CONNECT – is not used at the moment

OPTIONS – provides a way for the client to query the server about its properties or those of

a specified file

Page 45: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

HTTP response message: general format

Introduction 1-45

Page 46: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 46

HTTP response message example

HTTP/1.1 200 OK

Connection close

Date: Thu, 06 Aug 1998 12:00:15 GMT

Server: Apache/1.3.0 (Unix)

Last-Modified: Mon, 22 Jun 1998 …...

Content-Length: 6821

Content-Type: text/html

data data data data data ...

status line

(protocol

status code

status phrase)

header

lines

data, e.g.,

requested

HTML file

Page 47: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 47

HTTP response status codes

200 OK

request succeeded, requested object later in this message

301 Moved Permanently

requested object moved, new location specified later in this message (Location:)

400 Bad Request

request message not understood by server

404 Not Found

requested document not found on this server

505 HTTP Version Not Supported

In first line in server->client response message.

A few sample codes:

Page 48: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 48

HTTP Version differences

HTTP/1.0

Have only 16 status codes

Provides only basic authentication

Uses Non persistent connection

RTT is more so bandwidth waste is vast

Stateless

Supports only GET POST and HEAD method

HTTP/1.1

Have introduced new 24 status code

Provides strong authentication

Uses Persistent connection

RTT is less so bandwidth utilization is good

Uses cookies as state management mechanism

Supports GET, POST, HEAD,PUT and DELETE

Page 49: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 49

User-server state: cookies

Many major Web sites use cookies

Four components:1) cookie header line of

HTTP response message2) cookie header line in

HTTP request message3) cookie file kept on

user’s host, managed by user’s browser

4) back-end database at Web site

Example:

Susan always access Internet always from PC

visits specific e-commerce site for first time

when initial HTTP requests arrives at site, site creates:

unique ID

entry in backend database for ID

Page 50: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 50

Cookies: keeping “state” (cont.)

clientserver

usual http response msg

usual http response msg

cookie file

one week later:

usual http request msgcookie: 1678 cookie-

specific

action

access

ebay 8734usual http request msg

Amazon server

creates ID

1678 for user createentry

usual http response Set-cookie: 1678

ebay 8734

amazon 1678

usual http request msgcookie: 1678 cookie-

spectific

action

accessebay 8734

amazon 1678

backend

database

Page 51: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 51

Cookies (continued)

What cookies can bring:

authorization

shopping carts

recommendations

user session state (Web e-mail)

Cookies and privacy:

cookies permit sites to

learn a lot about you

you may supply name and

e-mail to sites

aside

How to keep “state”:

protocol endpoints: maintain state at

sender/receiver over multiple transactions

cookies: http messages carry state

Page 52: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 52

Web caches (proxy server)

user sets browser: Web accesses via cache

browser sends all HTTP requests to cache object in cache: cache

returns object

else cache requests object from origin server, then returns object to client

Goal: satisfy client request without involving origin server

client

Proxy

server

clientorigin

server

origin

server

Page 53: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 53

More about Web caching

Why Web caching?

reduce response time for client request

reduce traffic on an institution’s access link.

Internet dense with caches: enables “poor”

content providers to effectively deliver

content (but so does P2P file sharing)

Page 54: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-54

Chapter 1: ROAD MAP

What is Internet?

network edge; hosts, access net, physical media

OSI Layer

Introduction to application layer services

HTTP

FTP ( File Transfer Protocol)

SMTP

DNS

DHCP

TELNET

Page 55: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

FTP (File Transfer Protocol)

Objective

1. Allow file sharing between remote machine

2. Transfer data reliably and efficiently

FTP Protocol falls within client server model

Both client & server have 2 process allowing information (Data & command) to be managed , they are

1. DTP(Data transfer Process)

2. PI(Protocol Interpreter)Introduction 1-55

Page 56: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

FTP model/connection

Introduction 1-56

Page 57: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 57

FTP: the file transfer protocol

During FTP Connection 2 transmission channels are open

1. Control Channel (For command)

2. Data Channel (For data)

Control uses port no 21

Data connection uses Port no 20

file transferFTP

server

FTP

user

interface

FTP

client

local file

system

remote file

system

user

at host

Page 58: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 58

FTP: separate control, data connections

FTP client contacts FTP server at port 21, TCP is transport protocol

client authorized over control connection

client browses remote directory by sending commands over control connection.

when server receives file transfer command, server opens 2nd TCP connection (for file) to client

after transferring one file, server closes data connection.

FTP

client

FTP

server

TCP control connection

port 21

TCP data connection

port 20

server opens another TCP data

connection to transfer another file.

control connection: “out of band”

FTP server maintains “state”:

current directory, earlier

authentication

Page 59: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 59

FTP commands, responses

Sample commands: sent as ASCII text over

control channel

USER username

PASS password

LIST return list of file in current directory

RETR filename retrieves (gets) file

STOR filename stores (puts) file onto remote host

Sample return codes status code and phrase (as

in HTTP)

331 Username OK,

password required

125 data connection

already open;

transfer starting

425 Can’t open data

connection

452 Error writing

file

Page 60: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Comparison between HTTP and FTP

HTTP uses TCP

Only one TCP connection between client and server

Send its control information in-band

HTTP is stateless

FTP uses TCP

Two parallel TCP connection, one for data and one for control

Send its control information out-of-order

FTP maintains State

Introduction 1-60

Page 61: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-61

Chapter 1: ROAD MAP

What is Internet?

network edge; hosts, access net, physical media

OSI Layer

Introduction to application layer services

HTTP

FTP ( File Transfer Protocol)

SMTP (Simple Mail Transfer Protocol)

DNS

DHCP

TELNET

Page 62: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

E-Mail

Functions

Architecture and services

Message formats

Message transfer agents SMTP

POP3 and IMAP

Page 63: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

E-Mail functions

E-mail system functions Composition –

Transfer –

Reporting –

Displaying –

Disposition –

Page 64: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 64

Electronic Mail System Architecture

Three major components: user agents

mail servers

simple mail transfer protocol: SMTP

User Agent

“mail reader”

composing, editing, reading mail messages

e.g., Eudora, Outlook, elm, Mozilla Thunderbird

outgoing, incoming messages stored on server

user mailbox

outgoing

message queue

mail

server

user

agent

user

agent

user

agentmail

server

user

agent

user

agent

mail

server

user

agent

SMTP

SMTP

SMTP

Page 65: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 65

Electronic Mail: mail servers

Mail Servers mailbox contains incoming

messages for user

message queue of outgoing (to be sent) mail messages

SMTP protocol between mail servers to send email messages

client: sending mail server

“server”: receiving mail server

mail

server

user

agent

user

agent

user

agentmail

server

user

agent

user

agent

mail

server

user

agent

SMTP

SMTP

SMTP

Page 66: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

E-mail message format

RFC 822

header fields

related to

message

transport.

Some fields used in the RFC 822 message header.

Page 67: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

SMTP – Simple Mail Transfer Protocol

Source machine establishes a TCP connection on

port 25 on destination machine, where SMTP

daemon listens. This daemon accepts the

incoming connections and copies messages from

them into the appropriate mailboxes

If a message can’t be delivered, an error report

containing the first part of the undeliverable

message is returned to the sender

It is a simple ASCII protocol

Page 68: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 68

Electronic Mail: SMTP [RFC 2821]

uses TCP to reliably transfer email message from client to server, port 25

direct transfer: sending server to receiving server

three phases of transfer

handshaking (greeting)

transfer of messages

closure

command/response interaction

commands: ASCII text

response: status code and phrase

messages must be in 7-bit ASCII

Page 69: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 69

Scenario: Alice sends message to abc

1) Alice uses UA to compose message and “to” [email protected]

2) Alice’s UA sends message to her mail server; message placed in message queue

3) Client side of SMTP opens TCP connection with abc’s mail server

4) SMTP client sends Alice’s message over the TCP connection

5) abc’s mail server places the message in abc’s mailbox

6) abc invokes his user agent to read message

user

agent

mail

server

mail

server user

agent

1

2 3 45

6

Page 70: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 70

Try SMTP interaction for yourself:

telnet servername 25

see 220 reply from server

enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands

above lets you send email without using email client (reader)

Page 71: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 71

SMTP: final words

SMTP uses persistent connections

SMTP requires message (header & body) to be in 7-bit ASCII

SMTP server uses CRLF.CRLF to determine end of message

Comparison with HTTP:

HTTP: pull

SMTP: push

both have ASCII command/response interaction, status codes

HTTP: each object encapsulated in its own response msg

SMTP: multiple objects sent in multipart msg

Page 72: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 72

Mail message format

SMTP: protocol for exchanging email msgs

RFC 822: standard for text message format:

header lines, e.g., To:

From:

Subject:

different from SMTP commands!

body the “message”, ASCII

characters only

header

body

blank

line

Page 73: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 73

Message format: multimedia extensions

MIME: multimedia mail extension, RFC 2045, 2056

additional lines in msg header declare MIME content type

From: [email protected]

To: [email protected]

Subject: Picture of yummy crepe.

MIME-Version: 1.0

Content-Transfer-Encoding: base64

Content-Type: image/jpeg

base64 encoded data .....

.........................

......base64 encoded data

multimedia data

type, subtype,

parameter declaration

method used

to encode data

MIME version

encoded data

Page 74: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 74

Mail access protocols

SMTP: delivery/storage to receiver’s server

Mail access protocol: retrieval from server

POP: Post Office Protocol [RFC 1939]

• authorization (agent <-->server) and download

IMAP: Internet Mail Access Protocol [RFC 1730]

• more features (more complex)

• manipulation of stored msgs on server

HTTP: gmail, Hotmail, Yahoo! Mail, etc.

user

agent

sender’s mail

server

user

agent

SMTP SMTP access

protocol

receiver’s mail

server

Page 75: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

POP3

Starts when the user starts the mail reader

Mail reader calls up the ISP (if there is no connection) and establishes a TCP connection with the message transfer agent on port 110; Authorization

• Having user logged in by sending its username and password

Transactions• User collecting the e-mails and marking them for deletion

Update• Causes the e-mails to be deleted

Page 76: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

IMAP

POP3 works fine for users with one e-mail account with one ISP, accessed from one PC

If mail was accessed from different locations, user may loose e-mails, security issues may appear, etc

An alternative final delivery protocol, IMAP (Internet Message Access Protocol), defined in RFC2060

Instead assuming that all messages will be downloaded and work offline after that (like POP3), IMAP assumes that all e-mail will remain on the server indefinite in multiple mailboxes

Provides extensive mechanisms to read messages or parts of messages, mechanisms to create, destroy and manipulate multiple mailboxes.

Page 77: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

POP3 vs. IMAP

Page 78: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-78

Chapter 1: ROAD MAP

What is Internet?

network edge; hosts, access net, physical media

OSI Layer

Introduction to application layer services

HTTP (Hyper text transfer Protocol)

FTP ( File Transfer Protocol)

SMTP (Simple Mail Transfer Protocol)

DNS (Domain Name System)

DHCP

TELNET

Page 79: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

DNS (Domain Name System)Basic

[email protected] would be difficult to remember

• If JohnDoe’s mail server moves to another machine, then his e-mail address would not be valid anymore

• Something like [email protected] would be appropriate

IP addresses are difficult to remember

Need some mechanisms to translate gmail.com to the IP address.

To solve this problem DNS was invented

DNS is a hierarchical, domain-based naming scheme and a distributed database system for implementing this naming scheme

Usage: Map URL name into an IP address

Page 80: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

DNS: Domain Name System Basic:

Maps URL to IP address and vice versa

Runs over UDP and TCP

Uses port No 53

Application layer protocol

2: Application Layer 80

Page 81: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

DNS : DNS services

hostname to IP address translation

host aliasing

Canonical, alias names

mail server aliasing

load distribution

replicated Web servers: set of IP addresses for one

canonical name

2: Application Layer 81

Page 82: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

DNS components

Name space

Name Servers

Resolver

Introduction 1-82

Page 83: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

The Name Space The name space is the structure of the DNS

database An inverted tree with the root node at the top

Each node has a label The root node has a null label, written as “”

third-level node

second-level node second-level node

top-level node

third-level node third-level node

second-level node

top-level node

second-level node second-level node

top-level node

The root node

""

Page 84: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

DNS Name Space (Top level Domain)

Internet is divided into over 200 top

level domains

Each domain is divided into sub-domains, which are

further partitioned, etc..

Top level domains could be generic and country

domains

Page 85: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

DNS Name Space (Domain Names)

A domain name is the sequence of labels from a node to the root, separated by dots (“.”s), read left to right

A node’s domain name identifies its position in the name space

dakota

west

tornado

east www

nominum metainfo

com

berkeley nwu

edu gov

nato

int

army

mil

uu

net org

""

Page 86: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

DNS Name servers

One DNS server could service all requests

But in practice it will be overloaded

To solve this, DNS name space is divided in non overlapping zones

Each zone contains some part of the tree and name servers

holding zone info

Page 87: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

DNS Name Resolver

Resolver maps a name to an IP address and vice versa

DNS uses large no of servers organized in

hierarchical and distributed around

the world.

There are 3 classes of DNS servers

• Root DNS Server

• Top-Level Domain(TLD) Server

• Authoritative DNS Server

2: Application Layer 87

Resolver Name Server

Query

Response

Page 88: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

DNS Resolver (Types of Servers)

• 13 root DNS server

• Labeled A to M

Root DNS Server

• Responsible for top level domains

• Ex. Com,org,edu,gov and all country domains

Top-Level Domain(TLD)

Servers

• Contains DNS record for every publically accessible organization on Internet

• DNS record maps names to IP address

Authoritative DNS Servers

1-88

Page 89: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

DNS Resolver ways

Resolving can be done in two ways

Iterative resolution

Recursive resolution

Introduction 1-89

Page 90: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 90

requesting hostcis.poly.edu

gaia.cs.umass.edu

root DNS server

local DNS serverdns.poly.edu

1

23

4

5

6

authoritative DNS server

dns.cs.umass.edu

78

TLD DNS server

(for edu)

DNS name Iterative resolution example

Host at cis.poly.edu wants IP address for gaia.cs.umass.edu

iterated query: contacted server replies

with name of server to

contact

“I don’t know this name,

but ask this server”

Page 91: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

2: Application Layer 91

requesting hostcis.poly.edu

gaia.cs.umass.edu

root DNS server

local DNS serverdns.poly.edu

1

2

45

6

authoritative DNS server

dns.cs.umass.edu

7

8

TLD DNS server

3recursive query: puts burden of name

resolution on contacted

name server

heavy load?

DNS name Recursive resolution example

Page 92: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Resource Records When a resolver gives a domain name to DNS, what it

gets back are the resource records associated with that name;

Thus the primary function of DNS is to map domain names onto resource records

A DNS zone database is made up of a collection of resource records.

Each resource record specifies information about a particular object.

For example, address mapping (A) records map a host name to an IP address, and reverse-lookup pointer (PTR) records map an IP address to a host name.

The server uses these records to answer queries for hosts in its zone

Page 93: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Resource Records

A resource record has five parts: Domain name Time to Live Class Type Value

The Domain_name tells the domain to which this record applies

Time_to_live field gives an indication of how stable the record is

Class field is always IN for Internet information

Page 94: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-94

Chapter 1: ROAD MAP

What is Internet?

network edge; hosts, access net, physical media

OSI Layer

Introduction to application layer services

HTTP

FTP ( File Transfer Protocol)

SMTP (Simple Mail Transfer Protocol)

DNS

DHCP (Dynamic Host Configuration Protocol)

TELNET

Page 95: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

95

Need of Dynamic Assignment of IP addresses

Need of Dynamic assignment of IP addresses

• IP addresses are assigned on-demand

• Avoid manual IP configuration

• Support mobility of laptops

• Support temporary allocation of IP addresses

Three Protocols:

• RARP (until 1985, no longer used)

• BOOTP (1985-1993)

• DHCP (since 1993)

Only DHCP is widely used today.

Page 96: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

96

DHCP

Designed in 1993

Uses UDP

An extension of BOOTP (Many similarities to BOOTP)

IP addresses are assigned dynamically on demand

Supports temporary allocation (“leases”) of IP addresses

DHCP client can acquire all IP configuration parameters

DHCP can interoperate with BOOTP clients.

Page 97: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

97

DHCP Interaction (simplified)

Argon

128.143.137.144

00:a0:24:71:e4:44 DHCP ServerDHCP Response:

IP address: 128.143.137.144

Default gateway: 128.143.137.1

Netmask: 255.255.0.0

Page 98: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

98

BOOTP/DHCP Message Format

Number of Seconds

OpCode Hardware Type

Your IP address

Unused (in BOOTP)

Flags (in DHCP)

Gateway IP address

Client IP address

Server IP address

Hardware Address

LengthHop Count

Server host name (64 bytes)

Client hardware address (16 bytes)

Boot file name (128 bytes)

Transaction ID

Options

(There are >100 different options)

Page 99: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

99

BOOTP/DHCP

OpCode: 1 (Request), 2(Reply)Note: DHCP message type is sent in an option

Hardware Type: 1 (for Ethernet) Hardware address length: 6 (for Ethernet) Hop count: set to 0 by client Transaction ID: Integer (used to match reply to

response) Seconds: number of seconds since the client

started to boot Client IP address, Your IP address, server IP

address, Gateway IP address, client hardware address, server host name, boot file name:client fills in the information that it has, leaves rest blank

Page 100: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

DHCP Message Type

Value Message Type

1 DHCPDISCOVER

2 DHCPOFFER

3 DHCPREQUEST

4 DHCPDECLINE

5 DHCPACK

6 DHCPNAK

7 DHCPRELEASE

8 DHCPINFORM

100

Page 101: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

102

DHCP Operation

DCHP DISCOVER

DHCP Client

00:a0:24:71:e4:44 DHCP Server

DHCPDISCOVERSent to 255.255.255.255

DHCP Server

DHCP Client

00:a0:24:71:e4:44 DHCP Server

DHCP Server

DHCPOFFER

DHCPOFFER

DCHP OFFER

Page 102: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

104

DHCP Operation

DHCP Client

00:a0:24:71:e4:44 DHCP Server

DHCP Server

DHCPRELEASE

DHCP RELEASE

At this time, the DHCP client has released the IP address

Page 103: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Introduction 1-105

Chapter 1: ROAD MAP

What is Internet?

network edge; hosts, access net, physical media

OSI Layer

Introduction to application layer services

HTTP

FTP ( File Transfer Protocol)

SMTP (Simple Mail Transfer Protocol)

DNS

DHCP (Dynamic Host Configuration Protocol)

TELNET

Page 104: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Netprog: TELNET 106

TELNET vs. telnet

TELNET is a protocol that provides “a

general, bi-directional, eight-bit byte

oriented communications facility”.

telnet is a program that supports the

TELNET protocol over TCP.

Many application protocols are built upon

the TELNET protocol.

Page 105: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

TELNET Protocol

TELNET is a general-purpose client-server application program.

TELNET is an abbreviation for TErminaL NETwork

Uses Port No 23 and TCP Protocol

Used for Virtual terminal service

TELNET enables the establishment of a connection to a remote system in such a way that the local terminal appears to be a terminal at the remote system.

1-107

Page 106: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

TCP/IP Protocol Suite108

Local login

Page 107: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

TCP/IP Protocol Suite109

Remote login

Page 108: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

TCP/IP Protocol Suite110

Concept of NVT

Page 109: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Network Virtual Terminal

Via a universal interface called the Network Virtual Terminal (NVT) character set, the TELNET client translates characters (data or commands) that come from the local terminal into NVT form and delivers them to the network. The TELNET server translates data and commands from NVT form into the form acceptable by the remote computer.

Introduction 1-111

Page 110: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

Netprog: TELNET 112

Network Virtual Terminal

intermediate representation of a generic terminal.

provides a standard language for communication of terminal control functions.

NVT uses two sets of characters, one for data(0) and other for control(1)

Page 111: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

TELNET Command Structure

Introduction 1-113

Page 112: Computer Networks Unit I Application layer (2012 pattern) · PDF fileComputer Networks Unit I Application layer (2012 pattern) ... communication links ... Uploading form input

TELNET Basic Commands

• Are you ThereAYT

• Erase CharacterEC

• Abort OutputAO

• Quit SessionQUITIntroduction 1-114