+ All Categories
Home > Documents > Application Protocols Ppts

Application Protocols Ppts

Date post: 28-Dec-2015
Category:
Upload: sivar22
View: 13 times
Download: 0 times
Share this document with a friend
Description:
Ethernet application protcals
Popular Tags:
64
Application Protocols
Transcript
Page 1: Application Protocols Ppts

Application Protocols

Page 2: Application Protocols Ppts

SMTP

Page 3: Application Protocols Ppts

Problems• Transferring mail across different networks• Use different transport services• Different domains• Appropriate messages and regular updating

mechanism • Security

Page 4: Application Protocols Ppts

E-Mail

• Allows you to send messages via computer networks to other computer users.– The message may include a file (attachments)– You must know the e-mail address of the

recipient, just as you need to know the phone number to use a phone.

Page 5: Application Protocols Ppts

Introduction

• What is SMTP? The Internet’s standard protocol used in sending and receiving e-mail in order to transfer mail reliably and efficiently

Page 6: Application Protocols Ppts

SMTP

• Simple Mail Transfer Protocol.

• The SMTP service is a modification of the FTP– SMTP is an electronic mail routing protocol

that uses TCP/IP to route mail messages between network hosts.

– SMTP does not deal with local mail user issues. This is handled by an e-mail tool (Outlook Express, Netscape Messenger)

Page 7: Application Protocols Ppts

Solutions

• 2-way transmission channel• Server confirmation• Host and the server identify each other• Commands and Replies• Extension services• Mail could be directly delivered or could be relayed

across networks • Server takes full responsibility

Page 8: Application Protocols Ppts

Solutions

• Mail object• Envelope and Content • Envelope-Originator address• - Recipient address or addresses• - Optional protocol extension

material

Page 9: Application Protocols Ppts

SMTP Mail Message Format

– Messages are a Human Readable Text File– Two Parts: Envelope and Contents

• Envelope:– Keyword/Value Pairs – One Per Line– Common Keywords

» Subject:» Date:» From:» Reply-To:

– Common Mailer Generated Keywords:» Received:» Message-Id:

• Message Contents– Separated From Envelope By a Blank Line

Page 10: Application Protocols Ppts

Definition :

Internet method of Transferring Electronic

Mails (Allows Message to be packed and

Delivered to remote systems

Transferring Mail Between Two Hosts

Page 11: Application Protocols Ppts

E-mail standards• Simple Mail Transfer Protocol (SMTP):

part of the TCP/IP protocol suite.• SMTP is the main e-mail standard for

mail transfer agents in use today, but was written to only handle text files.

• SMTP is usually implemented using a two-tier client-server architecture.

• Two other competing standards for e-mail are Common Messaging Calls (CMC) and X.400.

Page 12: Application Protocols Ppts

Simple Mail Transfer Protocol (SMTP)

• Sends and receive e-mail messages from one e-mail server to another.

• Defines a dialog between a sending and receiving system.

Page 13: Application Protocols Ppts

Two-Tier E-mail Architecture• SMTP’s uses two types of programs: • User agents, aka e-mail clients, are

programs running on client computers that send e-mail to e-mail servers and download e-mail from mailboxes on those servers.– Examples: Eudora, Outlook.

• Mail transfer agents, also called mail server software, are used by e-mail servers, sends e-mail through the Internet between e-mail servers and maintains individual mailboxes. – Post Office Protocol (POP) & Internet Mail Access

Protocol (IMAP) are the main protocols for user agent to mail server communications.

Page 14: Application Protocols Ppts

Complementary Protocols

• SMTP is limited in its ability to queue messages at the receiving end. One of two others are used in conjunction:– POP3– IMAP4 (Internet Message Access Protocol)

Page 15: Application Protocols Ppts

Client computer withe-mail client software(“user agent”)

Server computer withe-mail server

software

(“message transfer agent”)

SMTP packet

SMTP packet

LAN

Client computer withe-mail client software(“user agent”)

Server computer withe-mail server

software

(“message transfer agent”)

SMTP packet

LAN

SMTP packet

IMAP or SMTP packet

Internet

Page 16: Application Protocols Ppts

Simple Mail Transfer Protocol

• SMTP E-mail messages have the following structure:– Header: lists source and destination

addresses, date, subject and other information about the e-mail message.

– Body: the message itself– Attachments: additional files that have been

included along with the e-mail message.

Page 17: Application Protocols Ppts

Figure 2-13 Sample E-mail Message using SMTP

From: “Alan Dennis;”<[email protected]>TO: “Pat Someone” <[email protected]>Date: Mon 06 Aug 2001 19:03:02 GMTSubject: Sample NoteMessage-Id:

<[email protected]>DATA: This is an example of an e-mail message

Messageheader

Messagebody

Page 18: Application Protocols Ppts

How it works

• Sender SMTP establishes a two-way transmission channel to a receiver SMTP.

• Once the channel is established, there are three basic steps to SMTP mail transactions:– MAIL FROM:– RCPT TO:– DATA

• At each step, the procedure can be accepted (OK) or rejected (Failure reply)

Page 19: Application Protocols Ppts

How Mail Gets Transfer From One Hosts to Another

SMTP defines a set of commands with strict

Syntax that are used to move mail

Messages from one hosts to another. These

Functions are not user-visible.

SMTP delivers mail by establishing a

Transmission path between an SMTP

Client (“Sender-SMTP”)

Page 20: Application Protocols Ppts

SMTP Commands

• HELO - identifies sender• MAIL FROM: - starts a mail transaction and

identifies the mail originator• RCPT TO: - identifies individual recipient. There

may be multiple RCPT TO: commands.• DATA - sender ready to transmit a series of lines of

text, each ends with \r\n. A line containing only a period ‘.’ indicates the end of the data.

Page 21: Application Protocols Ppts

SMPT example

>MAIL FROM: <[email protected]>

>250 Mail.mydomain.com MYPC>HELO MYPC

>250 OK

>RCPT TO: <[email protected]>

>250 OK

>DATA >354 Start mail input, end with <CRLF>.<CRLF>.

>Hello Efrim <CRLF>.<CRLF>.>250 OK

>QUIT>221 Goodbye MYPC

Page 22: Application Protocols Ppts

Simple Mail Transfer Protocol (SMTP)

Page 23: Application Protocols Ppts

Attachments in MIME• Because SMTP was developed for transferring text files, a

special techniques needed to be developed to send graphical information.

• Graphics capable mail transfer agent protocols include MIME (Multipurpose Internet Mail Extension), uuencode and binhex.

• Included as part of an e-mail client, MIME translates graphical information into text allowing the graphic to be sent as part of an SMTP message.

• The receiver’s e-mail client then translates the MIME attachment from text back into graphical format.

Page 24: Application Protocols Ppts

Encoding: Header Information– MIME – Multipurpose Internet Mail Extensions

• Mime Format in Mail Header Identifies the Contents • MIME Body Types

– Text» Plain – No Encoding Needed» RTF – Allows Some Formatting

– Image– Audio– Application

» A Specific Application Format (e.g. Microsoft Word)– Structured

» Allows Multiple Types in One Document– Message

» Used To Identify Partial Messages

Page 25: Application Protocols Ppts

Encoding Techniques (2)

• Non-Portable Formats– Will Cause Corruption if an Intermediate Server Has

Limitations

– Eight-Bit• No Encoding• No Line Exceeds 1000 Characters

– Binary• No Encoding• Lines May Be Too Long

Page 26: Application Protocols Ppts

Retrieving Mail• Offline Model

– User Doesn’t Have to Be Connected In Order to Receive Messages

– Mail Server Stores Messages For a User Locally• User Then Downloads Them To a Local File

• POP – Post Office Protocol• Uses Port 110• Current Version: POP3 (Version 3)

– Allows Selective Downloading• Session Based:

– Authorization» User Name, Password

– Transaction» STAT – Request Statistics (Number of Messages, Size)» LIST – List of Messages With Size» RETR – Download a Message» DELE – Delete Message From Server» QUIT – End Session

Page 27: Application Protocols Ppts

SENDMAIL Client

Transport ControlProtocol

Internet Protocol

Network InterfaceProtocol

SENDMAIL Client

Transport ControlProtocol

Internet Protocol

Network InterfaceProtocol

Host A Host B

Messages

Physical Network

Page 28: Application Protocols Ppts

File Transfer Protocol (FTP) and Telnet

• FTP enables sending and receiving files over the Internet.

• Telnet allows remote logins over the Internet.

• Both were much more commonly used during the pre-WWW days of the Internet.

• FTP still commonly used today for uploading web pages.

Page 29: Application Protocols Ppts

E-mail Models

• Online– Email resides on the server, access to email

(including reading etc.) requires connection to server.

• Offline– Mail is retrieved from server during connection, and

stored on client.

• Disconnected– Mail is retrieved and manipulated on-line when

connected, cached on the local machine when off-line, and syncronized when connected again.

Page 30: Application Protocols Ppts

File Transfer Protocol (FTP)• Protocol that allows transfer of files across

Internet

• Both computers need to run FTP - one acts as a server (remote), the other as a client (local)

• Many shareware files available

• Often stored in ZIP format or self-extracting EXE

• Disadvantage - must know name of file

Page 31: Application Protocols Ppts

FTP

• The File Transfer Protocol allows files to be moved from one machine to another.

• FTP is client-Server based where the server acts as a store for files. Clients may connect and request files on the server

• FTP is becoming less popular with changes that have been made in HTTP.

Page 32: Application Protocols Ppts

How to FTP

• Steps to FTP:1. Log on to machine e.g. to csusap

2. Connect to a another remote machine by either:

i. anonymous FTP - very common - but can only access files in the pub directory

Login: anonymousPassword: <your email address>

ii. log in as yourself - this requires you to have an account on that machine i.e. username and password Gives you access to files that you own on that machine.

Page 33: Application Protocols Ppts

Pictorial representation of FTP

ComputerA

Computer B

file1.txt

file2.txtput file2.txt

get file1.txt

Computer Bestablishes an FTPsession with Computer A and issues the get and put statement

Both Computer A and Computer B have FTP running

Page 34: Application Protocols Ppts

Transferring Files Between Hosts

The File Transfer (ftp) commands is used to

Transfer files between hosts of possibly

Dissimilar file system.

FTP establishes two connection between

The client and the server

Page 35: Application Protocols Ppts

One for control information such as

Commands and responses,

And a second for transferring data

Page 36: Application Protocols Ppts

Which FTP Program• A number available:

WinQVT - traditionally used on Windows 3.1• Unix ftp - activated through Start, Run, ftp• CuteFTP - excellent, windows based, easy to use• WS_FTP - on most CSU machines (CSU

Applications)• Tucows - excellent repository for FTP programs:

Web browser - e.g. Netscape/Explorer can 'get' files.

Page 37: Application Protocols Ppts

How to Uses the ftp commands

• Transferring and managing

• Changing and listing contents of Directories

• Managing which files will be transferred

• Managing connections with remote hosts

Page 38: Application Protocols Ppts

Basic FTP commands (Unix)• ftp> open csusap.csu.edu.au - establishes FTP session ftp>

user ausernam – login as "ausernam" • ftp> ls -l - equivalent to dir on remote machine• ftp> cd ... - changes to new directory on remote machine • ftp> lcd ... - changes to new directory on local machine• ftp> lcd ... - changes to new directory on local machine • ftp> get filename - gets filename from remote machine • ftp> put filename - puts filename on remote machine • ftp> quit - terminates FTP session.

Page 39: Application Protocols Ppts

FTP Objectives• promote sharing of files• encourage indirect use of remote computers• shield user from variations in file storage• transfer data reliably and efficiently• “FTP, although usable directly by a user at a

terminal, is designed mainly for use by programs”

Page 40: Application Protocols Ppts

Control and Data Connections

• Control functions (commands) and reply codes are transferred over the control connection.

• All data transfer takes place over the data connection.

• The control connection must be “up” while data transfer takes place.

Page 41: Application Protocols Ppts

How the ftp server function

• Ftp commands and replies are exchanged

Through one connection, while

• Data is transferred over a separate

Connection

• The FTP client communicates with the

FTP server on the remote host using TCP

Page 42: Application Protocols Ppts

Standard Connection Model

ControlControl

DataDataAAAA BBBB

Page 43: Application Protocols Ppts

FTP Client/Server interaction

FTPControl

FTPTransfer

FTPControl

FTPTransfer

FTP Client User

FTP Client User

Commands

RepliesData

Data

Page 44: Application Protocols Ppts

FTP

Transport ControlProtocol

Internet Protocol

Network InterfaceProtocol

FTPServer

Transport ControlProtocol

Internet Protocol

Network InterfaceProtocol

Host A Host B

Messages

Physical Network

Page 45: Application Protocols Ppts

The TELNET Protocol

Page 46: Application Protocols Ppts

Telnet Protocol

• Telnet - complex protocol that allows one machine to log into another on the Internet

• Stilled based on TCP/IP• Why have a telnet session?• Local machine can access remote computer

hardware• Reduces organisations hardware costs.

Page 47: Application Protocols Ppts

TELNET

• This protocol enables users to log on to other machines remotely.– Essentially their terminal becomes the

equivalent of the dumb terminal of mainframe systems, allowing the user to run programs as if they were physically sitting at the machine.

– Normally requires a username and password

• Telnet Uses the client-server model

Page 48: Application Protocols Ppts

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 49: Application Protocols Ppts

The TELNET Protocol

• TCP connection

• data and control over the same connection.

• Network Virtual Terminal

• negotiated options

Page 50: Application Protocols Ppts

Network Virtual Terminal (NVT)

The Network virtual Terminal (NVT) is an

Imaginary device that is used as a model for

Real terminals.

The NVT is a bidirectional, character-based

Device with a printer and a keyboard

Page 51: Application Protocols Ppts

Pictorial representation of Telnet

ComputerA

Computer B

SoftwareData

Computer Bestablishes a Telnetsession with Computer A and can now access programs and resources on Computer A

Both Computer A and Computer B have Telnet running

Page 52: Application Protocols Ppts

Network Virtual Terminal

• intermediate representation of a generic terminal.

• provides a standard language for communication of terminal control functions.

Page 53: Application Protocols Ppts

Network Virtual Terminal

NVTNVT NVTNVT

ServerServerProcessProcess

TCPTCP TCPTCP

Page 54: Application Protocols Ppts

Negotiated Options

• All NVTs support a minimal set of capabilities.

• Some terminals have more capabilities than the minimal set.

• The 2 endpoints negotiate a set of mutually acceptable options (character set, echo mode, etc).

Page 55: Application Protocols Ppts

Connecting to Remote Host Telnet

The telnet command provides remote login

Services so that an interactive user on a

Client system can connect with a server on

A remote system

Page 56: Application Protocols Ppts

The telnet command uses TCP as the

Protocol to ensure error checking.

The telnet command establishes a

Connection with a remote host, it maps the

Local terminal into a model of a terminal

Called a “ Network Virtual Terminal “ (NVT)

Page 57: Application Protocols Ppts

Negotiated Options

• The protocol for requesting optional features is well defined and includes rules for eliminating possible negotiation “loops”.

• The set of options is not part of the TELNET protocol, so that new terminal features can be incorporated without changing the TELNET protocol.

Page 58: Application Protocols Ppts

How to use the telnet command

Entering the telnet command in its simplest

Form

telnet

Will start the telnet process, and the prompt

telnet>

To start a login session with a host, enter

The telnet command in the form

telnet Host

Page 59: Application Protocols Ppts

Option examples

• Line mode vs. character mode

• echo modes

• character set (EBCDIC vs. ASCII)

Page 60: Application Protocols Ppts

Telnet send command argumentsService Required Send Argument

Break or kill brk

Erase character ec

Erase line el

Interrupt process ip

Go Ahead ga

No operation nop

Page 61: Application Protocols Ppts

How the telnet server Functions

The telnet commands uses the TCP and IP

Protocol to establish communication with

Remote server

Page 62: Application Protocols Ppts

TELNET

Transport ControlProtocol

Internet Protocol

Network InterfaceProtocol

TELNETServer

Transport ControlProtocol

Internet Protocol

Network InterfaceProtocol

Host A Host B

Messages

Physical Network

Page 63: Application Protocols Ppts

World Wide Web (WWW)

• A protocol that uses hypertext links• Accessed by using a browser• Uniform Resource Locator (URL) - a specific

address to a particular resource protocol://host/directory/resource

• Examples• http://csu.edu.au/images/csu.gif• ftp://ftp.monash.edu.au/pub/win95/update.txt• telnet://lorenz.mur.csu.edu.au• news:aus:computing

Page 64: Application Protocols Ppts

Thank You


Recommended