© Janice Regan, CMPT 128, 2007-2012 CMPT 371 Data Communications and Networking SMTP 0.

Slides:



Advertisements
Similar presentations
Internet – Part I. What is Internet? Internet is a global computer network of inter-connected networks.
Advertisements

Trivial Protocols CS-328 Dick Steflik. What’s a Protocol The rules that govern the exchange of information between to hosts –when a dignitary visits a.
Chapter 29 Structure of Computer Names Domain Names Within an Organization The DNS Client-Server Model The DNS Server Hierarchy Resolving a Name Optimization.
TCP/IP Protocol Suite 1 Chapter 20 Upon completion you will be able to: Electronic Mail: SMTP, POP, and IMAP Understand four configurations of architecture.
Application Layer At long last we can ask the question - how does the user interface with the network?
CPSC 441: FTP & SMTP1 Application Layer: FTP & Instructor: Carey Williamson Office: ICT Class.
Chapter 2: Application layer  2.1 Web and HTTP  2.2 FTP 2-1 Lecture 5 Application Layer.
Electronic Mail and SMTP
1 Networking A computer network is a collection of computing devices that are connected in various ways in order to communicate and share resources. The.
Chapter 30 Electronic Mail Representation & Transfer
Esimerkki: Sähköposti. Lappeenranta University of Technology / JP, PH, AH Electronic Mail Three major components: user agents mail servers simple mail.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols Network Fundamentals – Chapter.
Chapter 25 Domain Name System
1 CMPT 471 Networking II DNS © Janice Regan,
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
-I CS-3505 Wb_ -I.ppt. 4 The most useful feature of the internet 4 Lots of different programs, but most of them can talk to each.
Introduction 1-1 Chapter 2 FTP & Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 IC322 Fall.
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
Electronic Mail (SMTP, POP, IMAP, MIME)
Chapter Eleven An Introduction to TCP/IP. Objectives To compare TCP/IP’s layered structure to OSI To review the structure of an IP address To look at.
SMTP, POP3, IMAP.
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
Chapter 16 – DNS. DNS Domain Name Service This service allows client machines to resolve computer names (domain names) to IP addresses DNS works at the.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Mail Services.
CSE401N: Computer Networks Lecture-5 Electronic Mail S. M. Hasibul Haque Lecturer Dept. of CSE, BUET.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
Review: –How do we address “a network end-point”? –What services are provided by the Internet? –What is the network logical topology observed by a network.
Application Layer Protocols Simple Mail Transfer Protocol.
1 Computer Communication & Networks Lecture 27 Application Layer: Electronic mail and FTP Waleed.
Lecturer: Maxim Podlesny Sep CSE 473 File Transfer and Electronic in Internet.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 12 Electronic Mail.
Networking Basics TCP/IP TRANSPORT and APPLICATION LAYER Version 3.0 Cisco Regional Networking Academy.
 TCP/IP is the communication protocol for the Internet  TCP/IP defines how electronic devices should be connected to the Internet, and how data should.
Domain names and IP addresses Resolver and name server DNS Name hierarchy Domain name system Domain names Top-level domains Hierarchy of name servers.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Network Services Networking for Home and Small Businesses – Chapter.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 25 (Data Communication & Networking Book): Domain Name System (DNS) 1.
Chapter 17 Domain Name System
Simple Mail Transfer Protocol (SMTP)
Chapter 29 Domain Name System (DNS) Allows users to reference computer names via symbolic names translates symbolic host names into associated IP addresses.
October 8, 2015 University of Tulsa - Center for Information Security Microsoft Windows 2000 DNS October 8, 2015.
Electronic Mail. Client Software and Mail Hosts –Client PC has client software that communicates with user’s mail host –Mail hosts deliver.
1 Blackboard To Log In: Go To: Click On: Login Username: Firstname.Lastname Password: Last 4 digits of S.S. # View often for.
What is and How Does it Work?  Electronic mail ( ) is the most popular use of the Internet. It is a fast and inexpensive way of sending messages.
File Transfer Protocol (FTP)
1 SMTP - Simple Mail Transfer Protocol –RFC 821 POP - Post Office Protocol –RFC 1939 Also: –RFC 822 Standard for the Format of ARPA Internet Text.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
1 Kyung Hee University Chapter 18 Domain Name System.
CS 3830 Day 9 Introduction 1-1. Announcements r Quiz #2 this Friday r Demo prog1 and prog2 together starting this Wednesday 2: Application Layer 2.
TCP/IP (Transmission Control Protocol / Internet Protocol)
INTERNET PROTOCOLS. Microsoft’s Internet Information Server Home Page Figure IT2031 UNIT-3.
A Quick Look At How Works Understanding the basics of how works can make life a lot easier for any user. Especially those who are interested.
4343 X2 – Outline The Domain Name System The Web.
CITA 310 Section 6 Providing Services (Textbook Chapter 8)
Slides based on Carey Williamson’s: FTP & SMTP1 File Transfer Protocol (FTP) r FTP client contacts FTP server at port 21, specifying TCP as transport protocol.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Dr. Adil Yousif University of Alneelian – Master of CS - IT Electronic Mail.
Application Layer instructors at St. Clair College in Windsor, Ontario for their slides. Special thanks to instructors at St. Clair College in Windsor,
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking FTTP 0.
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
Networking Applications
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Networking for Home and Small Businesses – Chapter 6
Net 323 D: Networks Protocols
Web Development & Design Chapter 1, Sections 4, 5 & 6
Networking for Home and Small Businesses – Chapter 6
William Stallings Data and Computer Communications
Networking for Home and Small Businesses – Chapter 6
Presentation transcript:

© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking SMTP 0

 Simple Mail Transfer Protocol  An application supporting communication across the Internet  We can use SMTP without connecting through the WWW  Primarily a push protocol (sends to server)  In contrast HTTP is a pull protocol (requests from server) Janice Regan ©

SMTP  Part of the Internet system which includes  User agents (your mail browser)  servers  SMTP is a protocol to communicate between user agents and servers, and between different servers  For SMTP see RFC 1982 and RFC 2821 Janice Regan ©

Mail user agents  A user agent will provide the tools to  Compose mail  Read mail  Send mail (to a recipient through their mail server)  Receive mail (download mail from the server)  Archive received mail  Forward mail  Examples of agents  Thunderbird  Eudora  Outlook Janice Regan ©

Infrastructure of the system  Every server includes both a SMTP client and an SMTP server  Users sending are SMTP clients  servers sending mail are SMTP clients  servers receiving mail are SMTP servers  Every server communicates directly (TCP) with other servers it wishes to send to. s are sent directly from the senders server to the receivers server. No other servers take part in the transfer of the . Janice Regan ©

Sending Janice Regan © User 1 User 2 User 1’s server User 2’s server User 1’s agent

Mail servers: normal operation  When user 1 sends an to user 2. The will  be sent to user 1’s mail server  be queued on user 1’s mail server  User 1’s mail server will then use TCP to connect to User 2’s server  User 1’s mail server will then use SMTP to  send the to the user 2’s mail server  When an arrives at user 2’s mail server it is placed in user 2’s mail box  User 2 can later retrieve the message Janice Regan ©

Mail servers: problems?  When user 1’s mail server uses SMTP to try to send an to user 2’s mail server  User 1’s server will try to create a TCP connection to the user 2’s server  Why might it be impossible to reach user 2’s server?  The requested server is down (not operating)  The requested server does not exist  The requested server is too busy and can not accept the senders TCP connection Janice Regan ©

If user 2’s server is not reached  What happens if user 2’s mail server is not available  User 1’s server will leave the message in the queue and try to resend it again later  After some number of retries user1 will received a mail from his mail server indicating that the mail he sent could not be delivered  The user1 sent will be dropped from user 1’s mail server's queue by the mail server Janice Regan ©

SMTP: legacy protocol  SMTP is an relatively old protocol  It requires all messages be sent in ASCII (text) format  If the message is not in text format then it must be somehow translated into text format (even if you are sending images)  Unlike SMTP the newer protocol HTTP does not require this translation Janice Regan © User (sender) agent Sender’s Mail Server SMTP messages Through direct TCP connection Recipient’ s Mail Server User (recipient) agent

MIME extensions  For inclusion of non text information in mails  Provides methods for translation of non text information into text for transmission using SMTP  Information on encodings used will be placed in the header by the sending agent so that the receiving agent can decode the information and reconstruct the non textual information  Other information like the RECEIVED line that indicates when the message arrived and from where are added by the receiving mail server before being forwarded to the receiving agent  For details see RFC 2045 Janice Regan ©

You own SMTP server?  Where should the SMTP server be?  If we place the server on our PC or MAC  Machines (receiver and sender) must always be on  Machines must always be connected to internet  Machines must run server software itself  Usually better to have servers on a network server that is maintained, always on, and always accessible Janice Regan ©

Sending user1 to user2 Janice Regan © User 1 User 2 User 1’s server User 2’s server SMTP push SMPT push POP3 IMAP pull

Agents communicate with servers  Mail access protocols are used by agents communicating with mail servers to request download of mail (pull operation not push so we don’t use SMTP)  Such protocols include  POP3 (post office protocol v3)  IMAP (internet mail access protocol)  HTTP (hotmail and webmail) Janice Regan ©

POP3 (post office protocol)  Details in RFC 1939  A simple mail server access protocol (for downloading received mail)  The user agent connects to the mail server through a TCP connection  Once the connection is made POP3 will check the authorization (username, password etc.) of the user  The user agent then performs transactions needed to download the user’s Janice Regan ©

POP 3: login session S: +OK POP3 server ready C: user janice S: +OK C: pass tigermoth S: +OK user successfully logged on Janice Regan ©

POP 3: download session C: list S: S: S:. C: retr 1 S: S:. C: dele 1 …… C: retr 2 S: S:. C: dele 2 C: quit S: +OK POP3 server signing off Janice Regan © User selects “download only” or “download and delete”. Red commands only used when “download and delete” mode is selected

POP3  The user agent then performs transactions  retrieves the users messages from the mail server across the TCP connection (may delete messages as they are retrieved or not. Two modes available)  records agent requested deletions etc. and replies to such requests  The agent breaks the connection and then the server completes outstanding deletion/modification requests from the agent  Once mail is downloaded the user agent allows classification into folders locally. (Not on the mail server) Janice Regan ©

Pop 3 from multiple clients  If a user accesses her from two different locations, her office and her home then POP has some limitations  If POP uses download and delete mode any messages accessed at home have been deleted and cannot be accessed from the office  If POP3 uses download only, then the user needs to remember to manually delete mail that she has downloaded in both places Janice Regan ©

IMAP  Details in RFC 2060  A more complex and feature rich mail server access protocol  Allows organization of mail into folders on the mail server, so that those folders can be accessed from anywhere, (not just the machine they were downloaded to in the case of POP3) Janice Regan ©

IMAP  This requires more commands in the communication protocol to allow the user to instruct the server to move files and save them in particular folders, to create and move those folders.  More flexibility.  Accessing from low bandwidth location you can request only message headers be downloaded, than only download the desired messages that are immediately needed. Janice Regan ©

© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking DNS 21

Host names  In addition to identifying a host by the IP address of a connected interface we also identify the interface by an hostname  Hostnames are easier for a human to use and remember that the IP address  In the early Internet names were recorded at a central registry at the Network Information Center (NIC).  New hosts/names were submitted to the central registry and added to the hosts file  The hosts file was available for distribution to all other sites.  This was a flat naming structure Janice Regan ©

Hierarchical name space  The central naming system worked well until the Internet grew larger than it could handle (soon after TCP/IP was adopted)  The central servers could no longer deal with the volume of traffic  The manual updating of names was slow, and maintaining network wide consistency was difficult  Enforcing the use of unique names became more difficult (then impossible) Janice Regan ©

DNS  The primary use of DNS is to answer queries requesting the IP address that corresponds to a given host name.  Reverse queries, finding the name of a host with a particular IP address are also possible  DNS can also support multiple, different names for the same host (computer, mail server, …).  The primary name of a host is the canonical hostname  A host can be called by names other than it’s canonical hostname, these alternate names are called aliases  DNS can also support multiple IPs for the same canonical hostname (used to distribute load) Janice Regan ©

Addresses an names  IP address is a hierarchical system.  An IP address consists of four integers between 0 and 256 separated by.’s (example ).  As we scan each group starting at the left and proceeding towards the right we obtain more and more specific information Janice Regan ©

Addresses an names  DNS also uses a hierarchical classification system for domain names.  Domain names may represent a network a sub network or even a host  Consists of. separated names. As we read from left to right each name represents a smaller and more localized network or even a single host Janice Regan ©

Hierarchical name space  The hierarchical DNS name system was designed to replace this original flat namespace in which each machine had a unique name  Administration was decentralized using a distributed database  Local administrators were given responsibility for building and maintaining a database relating IP address and name for their designated groups of local networks Janice Regan ©

DNS Name Tree Janice Regan © cs arpa com edu gov us uk ca fr bc sfu fraser In-addr ny ca sun nasa jpl. hp Labels may have up to 63 characters fraser Labels (names) may refer to domains (hosts +nets) hosts or networks

DNS Name Tree Janice Regan © cs arpa com edu gov us uk ca fr bc sfu fraser In-addr ny ca sun nasa jpl. hp All children of a given parent must have unique names fraser fred hp1 NO! Children of different parents can have the same name

Constructing names: name tree  Start at the leaves of the tree  The domain for the chosen leaf will be the first part of the name.  Add a period to the first part of the name  Check the domain name of the root of the current position in the tree.  If it is not the root of the tree  The domain name of the root of the current position in the tree is added after the period  If it is the root of the tree the name is complete  Repeat steps 3 and 4 until the name is complete Janice Regan ©

jpl.nasa.gov. Janice Regan © cs arpa com edu gov us uk ca fr bc sfu fraser In-addr ny ca sun nasa jpl hp fraser

Fully Qualified Domain Name  DNS uses fully qualified domain names  FQDNs are complete domain names including all parts of the domain name from the domain of interest up to the root  Ends in a. to indicate root. For example fraser.sfu.ca.  The terminating. Indicates that the name is absolute ( relative to root, not to any other position in the DNS tree) Janice Regan ©

Domain Names: not fully qualified  Domain names that are not fully qualified (do not end at root, like fraser.sfu) may be interpreted by some software as relative to some particular location (other than root) in the DNS tree.  Your host must be configured to tell these software applications how to complete a domain name that is not fully qualified (how to convert it to a fully qualified domain name). You must tell the software what locations these names may be relative to. Janice Regan ©

Authority for the DNS namespace  The central internet authority was ICANN (Internet corporation for assigned numbers and names) and is now IANA (Internet assigned numbers authority).  Responsibility for the root level. domain rests with IANA  TLDs, top level directories for the internet namespace include generic TLDs (gTLDs) like.com or.org for classification of domain names by type of use include country code TLDs (ccTLDs) like.ca or.us for geographical classification of domain names  Responsibility for administering the TLDs has been delegated to other contractors by IANA Janice Regan ©

DNS Name Tree: Domains Janice Regan © “” Root domain arpa com edu gov us uk ca fr bc sfu cs fraser In-addr ny ca nasa jpl hp Generic Top level domains gTLDS Country code Top level domains ccTLDS

Authority for the DNS namespace  Any organization to which responsibility for a DNS domain is delegated  must provide at least two independent DNS servers to service that domain These DNS servers must be geographically separated These servers must be configured to provide continuous service  may delegate authority for parts of the DNS domain for which they are responsible to other organizations. Janice Regan ©

Authority for the DNS namespace  Each DNS server must know the name/address of the servers it has delegated responsibility to.  The delegator of authority need not inform all organizations it delegates to of changes made by other such organizations. This is an unreasonable load in a rapidly growing/changing internet. Janice Regan ©

Authority for the DNS namespace  Each DNS server must know the name/address of the servers it has delegated responsibility to.  The delegated authority has a responsibility to inform the delegator if address or name of the DNS name server changes. This is necessary to guarantee that address queries can be passed down the tree. Janice Regan ©

Examples of delegation  TLD.ca delegates authority to sfu to manage the domain sfu.ca  TLD.ca delegates authority to BC to manage top level domain.bc  Domain.bc delegates authority to the BC government to manage domain gov.bc.ca Janice Regan ©

DNS Name Tree: sub-trees Janice Regan © cs arpa com edu gov us ca fr bc sfu fraser ny ca nasa jpl. mycomp fraser myhost mynet us domain mycomp domain

How many DNS servers?  Extrapolating this model we discussed before would have a DNS server for each domain  What is the smallest domain?  1 host, host name = domain name Clearly this makes too many servers  1 local network = 2 DNS servers Still too many (lots of small networks)  At some reasonable point we need to stop delegating authority Janice Regan ©

Domain Name System  A DNS domain is a sub tree  The name of the domain is the domain name of the node at the root of the sub tree  The domain includes all domains and hosts below the root of the sub tree.us domain, includes.ca domain and.ny domain.mycomp domain include.mynet domain and host.myhost  The administrative responsibility for the domain and its subdomains may be arranged in different ways Janice Regan ©