CS1Q Computer Systems Lecture 20 Simon Gay. Lecture 20CS1Q Computer Systems - Simon Gay2 DNS Optimisations The domain name system as described would be.

Slides:



Advertisements
Similar presentations
1 Electronic Mail u Three major components: u user agents u mail servers u simple mail transfer protocol: SMTP u User Agent u a.k.a. “mail reader” u composing,
Advertisements

Chapter 29 Structure of Computer Names Domain Names Within an Organization The DNS Client-Server Model The DNS Server Hierarchy Resolving a Name Optimization.
(SMTP, MIME) Message transfer protocol (SMTP) vs message format protocols (RFC 822, Multipurpose Internet Mail Extensions or MIME) Message transfer.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
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.
CPSC 441: FTP & SMTP1 Application Layer: FTP & Instructor: Carey Williamson Office: ICT Class.
Electronic Mail and SMTP
COS 420 DAY 25. Agenda Assignment 5 posted Chap Due May 4 Final exam will be take home and handed out May 4 and Due May 10 Today we will discuss.
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.
Simple Mail Transfer Protocol
Architecture of SMTP, POP, IMAP, MIME.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
Mail Server Fitri Setyorini. Content SMTP POP3 How mail server works IMAP.
Electronic Mail (SMTP, POP, IMAP, MIME)
SMTP, POP3, IMAP.
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
1 Chapter Internet Applications (DNS, )
1 Chapter Internet Applications (DNS, )
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
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.
Intro to Computer Networks Bob Bradley The University of Tennessee at Martin.
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.
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.
Application Protocols: ELECTRONIC MAIL (SMTP, POP) CSNB534 Semester 2, 2007/2008 Asma Shakil.
Internet Applications  DNS   TELNET  FTP  Web browsing.
Electronic Mail Originally –Memo sent from one user to another Now –Memo sent to one or more mailboxes Mailbox –Destination point for messages.
Telecooperation Technische Universität Darmstadt Copyrighted material; for TUD student use only Internet Standards: Julian Schröder-Bernhardi, Dirk.
1 Applications Electronic Mail. 2 Electronic Mail Many user applications use client-server architecture. Electronic mail client accepts mail.
 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.
Computer Networks26-1 Chapter 26. Remote Logging, Electronic Mail and File Transfer.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 3.1 Internet Applications Ch. 31,32,34 (DNS, , TELNET, FTP)
Simple Mail Transfer Protocol (SMTP)
Sending Topic 4, Chapters 9, 10 Network Programming Kansas State University at Salina.
15 Semester 1 JEOPARDY IndirectnetworksupportDNSDNSNetworkApps.NetworkApps.MoreNetworkApps.Misc.Misc
Electronic Mail. Client Software and Mail Hosts –Client PC has client software that communicates with user’s mail host –Mail hosts deliver.
SMTP( 简单邮件传输协议 ) SIMPLE MAIL TRANSFER PROTOCOL RFC 2812.
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)
TCP/IP Transport and Application (Topic 6)
CS1Q Computer Systems Lecture 17 Simon Gay. Lecture 17CS1Q Computer Systems - Simon Gay2 The Layered Model of Networks It is useful to think of networks.
CS1Q Computer Systems Lecture 18 Simon Gay. Lecture 18CS1Q Computer Systems - Simon Gay2 The Layered Model of Networks It is useful to think of networks.
CS1Q Computer Systems Lecture 19 Simon Gay. Lecture 19CS1Q Computer Systems - Simon Gay2 Domain Names Domain names such as have a hierarchical.
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.
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.
XP New Perspectives on The Internet, Sixth Edition— Comprehensive Tutorial 2 1 Evaluating an Program and a Web-Based Service Basic Communication.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
4343 X2 – Outline The Domain Name System The Web.
SMTP - Simple Mail Transfer Protocol RFC 821
Chapter 16: Distributed Applications Business Data Communications, 4e.
CS440 Computer Networks 1 Neil Tang 12/01/2008.
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.
Firewalls A brief introduction to firewalls. What does a Firewall do? Firewalls are essential tools in managing and controlling network traffic Firewalls.
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
COMP 431 Internet Services & Protocols
1 Kyung Hee University Chapter 22 Simple Mail Transfer Protocol (SMTP)
26.1 Electronic Mail Sending/Receiving Mail Addresses User Agent MIME Mail Transfer Agent Mail Access Protocols.
© 2010 Computer Science Faculty, Kabul University FTP AND ELECTRONICE MAIL 5 TH LECTURE 4, May, 2010 Baseer Ahmad Baheer.
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامه‌نویسی در اینترنت 1 SMTP, FTP.
© MMII JW RyderCS 428 Computer Networks1 Electronic Mail  822, SMTP, MIME, POP  Most widely used application service  Sometimes only way a person ever.
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
Remote Logging, Electronic Mail, and File Transfer
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
William Stallings Data and Computer Communications
Chapter 7 Network Applications
Presentation transcript:

CS1Q Computer Systems Lecture 20 Simon Gay

Lecture 20CS1Q Computer Systems - Simon Gay2 DNS Optimisations The domain name system as described would be very inefficient, because there would be too much traffic at the root servers: too many requests (every time someone mentions the name of a computer in a different part of the DNS tree) would be passed to the root servers. Two mechanisms are used to solve this problem: replication and caching (most important). Replication: there are several copies of each root server, in different parts of the world; a local DNS server will use a root server which is geographically nearby.

Lecture 20CS1Q Computer Systems - Simon Gay3 Caching Caching is an important technique in many areas of computing. A cache (from the French cacher, to hide) is a local copy of recently-used or frequently-used data, which can be accessed more easily than the original source of that data. In DNS caching, each server maintains a local table of names and their resolutions, including names for which the server may not be an authority. Requests are answered from the cache if possible; if not, the cache is extended when the unknown name has been resolved. Caching works well because name resolution exhibits temporal locality of reference: within a period of time, a user is likely to look up the same name repeatedly.

Lecture 20CS1Q Computer Systems - Simon Gay4 Electronic Mail Originally used for communication within an office or organisation, first between users of a single computer system, then over a LAN, then over the Internet. is now a very widely used Internet application. We’ll look at some details of the format and content of messages the operation of clients and servers protocols and data formats

Lecture 20CS1Q Computer Systems - Simon Gay5 Basic Concepts A mailbox is an area of storage ( a particular file or directory on disk) which contains messages sent to a particular user. An address is a combination of a mailbox and a domain name. Example: the name of a mailbox (often, but not necessarily, the same as a login name) the domain name of a computer which is able to receive

Lecture 20CS1Q Computer Systems - Simon Gay6 Addresses Because it is convenient for all addresses within an organisation to have a uniform format, it is usual for one particular computer to be designated as the mail gateway. For example, my address is rather than Our mail gateway is a computer called iona.dcs.gla.ac.uk, also known as mailhost.dcs.gla.ac.uk or just dcs.gla.ac.uk. All of these domain names resolve to the same IP address ( ). addressed to is received by iona and placed in my mailbox, which is a directory called /users/fda/simon/Mail/inbox (In fact, also works.)

Lecture 20CS1Q Computer Systems - Simon Gay7 Format of an Message An message consists of ASCII text (see next slide). There are a number of header lines of the form keyword : information, then a blank line, then the body of the message. The header lines To: From: Date: Subject are always included. Others are optional and many of them may be suppressed by reading software. software is free to add header lines which may or may not be meaningful to the software at the receiving end (e.g. some software is able to request an acknowledgement message when a message is read, but not all receiving software understands this).

Lecture 20CS1Q Computer Systems - Simon Gay8 Return-Path: Return-path: Envelope-to: Delivery-date: Wed, 24 Apr :48: Received: from mail.di.fc.ul.pt ([ ] helo=titanic.di.fc.ul.pt) by iona.dcs.gla.ac.uk with esmtp (Exim 3.13 #1) id 170ISA-00001y-00 for Wed, 24 Apr :48: Received: from di.fc.ul.pt (dialup06.di.fc.ul.pt [ ]) by titanic.di.fc.ul.pt (8.9.3/8.9.3) with ESMTP id JAA17140 for ; Wed, 24 Apr :48: Received: (from by di.fc.ul.pt (8.11.6/8.11.6) id g3O8oJM17793; Wed, 24 Apr :50: Date: Wed, 24 Apr :50: From: Vasco Thudichum Vasconcelos To: simon gay Subject: Re: Titles and Abstracts Message-Id: In-Reply-To: References: Organization: DI/FCUL X-Mailer: Sylpheed version (GTK ; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit thanks. vasco useful to the human reader information about the mail system of the sender the body of the message (in this case, dwarfed by the header!)

Lecture 20CS1Q Computer Systems - Simon Gay9 s are Text The body of an is text: specifically, characters from the ASCII (American Standard Code for Information Interchange) character set, which uses a 7 bit format to represent 128 characters including upper and lower case letters, digits, punctuation symbols, and 33 control characters such as newline. If non-text data (e.g. images, or binary data files produced by applications) are to be sent by , they must be encoded using only printable ASCII characters. (As is a lowest common denominator of Internet access, it’s convenient to be able to transmit data of all types by , despite the existence of special-purpose applications/protocols such as FTP.)

Lecture 20CS1Q Computer Systems - Simon Gay10 Encoding Non-Text Data One way of encoding arbitrary binary data into printable ASCII would be to encode binary 0 as the character ‘0’ (ASCII code 48) and binary 1 as the character ‘1’ (ASCII code 49). This would have the unfortunate effect of multiplying the size of the data by 8, because each ASCII character is represented by one byte (8 bits) in a data packet. A better way would be to think of a byte as a two digit hex number, and use the characters ‘0’… ‘9’ and ‘A’… ‘F’ to encode it. This would multiply the size of the data by 2, which is still not very good. Based on the same idea, but using a greater proportion of the printable ASCII range, we get base 64 encoding which is commonly used with .

Lecture 20CS1Q Computer Systems - Simon Gay11 Base 64 Encoding bytes = 24 bits 4 blocks of 6 bits numbers 0…63 = “digits” in base 64 DE ’ Tadd 32 to get the ASCII code of a printable character Each character is represented by 1 byte, so the data expansion is 8/6 = 33% larger (actually it’s slightly worse because extra information is introduced in relation to line breaks).

Lecture 20CS1Q Computer Systems - Simon Gay12 MIME and Attachments Modern applications provide attachments, a convenient way of combining text and non-text data (generally, several pieces of data, perhaps of various types and encoded in different ways) in a single message. This system is called MIME (Multipurpose Internet Mail Extensions). The application which creates the message uses the MIME format to specify what data is present and how it is encoded. The receiving application has the opportunity to decode it (although there is no guarantee that it will know how to do so). The next slide shows an example of the text form of a MIME-encoded message. Most applications will hide the non-text data, and just present a button (for example) allowing the attached data to be extracted.

Lecture 20CS1Q Computer Systems - Simon Gay13 Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="============_ ==_============" Date: Mon, 29 Apr :33: To: From: Tania Sprott Subject: CS1Q Questionnaire --============_ ==_============ Content-Type: text/plain; charset="us-ascii" Hi Simon Attached list of CS1Q tutors for PowerPoint as discussed. I'll be along shortly with the questionnaires. Tania --============_ ==_============ Content-Type: multipart/appledouble; boundary="============_ ==_D============" --============_ ==_D============ Content-Transfer-Encoding: base64 Content-Type: application/applefile; name="%CS1Q-Groups.doc" Content-Disposition: attachment; filename="%CS1Q-Groups.doc" AAUWBwACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAADAAAASgAAAA8AAAAJAAAAWQAAACAA AAAIAAAAeQAAABAAAAACAAAAiQAAAR5DUzFRLUdyb3Vwcy5kb2NXOEJOTVNXRAEAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HlNPUlQHAgCAABwAHv// --============_ ==_D============ Content-Type: application/octet-stream; name="CS1Q-Groups.doc" ; x-mac-type=" E" ; x-mac-creator="4D535744" Content-Disposition: attachment; filename="CS1Q-Groups.doc" Content-Transfer-Encoding: base64 0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAADAAAANgAA AAAAAAAAEAAAOQAAAAEAAAD+////AAAAADcAAAA8AAAAPQAAAP////////////////// ////////////////////////////////////////////////////////////////////

Lecture 20CS1Q Computer Systems - Simon Gay14 Sending Suppose I send an to my colleague Vasco, There are several stages: using my application, I compose a message and press “send” my application becomes a client of the mail server on the department’s mail gateway machine, iona.dcs.gla.ac.uk, and specifies the destination address and the content of the message (*) iona (actually, the sendmail program running on iona) becomes a client of the mail gateway in Vasco’s department, mail.di.fc.ul.pt ( ) and specifies the mailbox (vv) and the content (*) the message is delivered to Vasco’s mailbox directory Steps (*) use SMTP, the Simple Mail Transfer Protocol.

Lecture 20CS1Q Computer Systems - Simon Gay15 SMTP The application and the sendmail program live in layer 5 of the network hierarchy. Opening a connection to the destination mail gateway uses the same mechanism as opening a connection to a web server: TCP functions (layer 4) are called, which must resolve the domain name of the destination and send messages to establish the connection. The difference at this stage is that port 25 is used, instead of port 80. SMTP specifies a completely different (and more complex) exchange of messages than HTTP. For example, the first SMTP message is sent by the server, not the client (but remember that the first TCP message comes from the client side, to open the connection).

Lecture 20CS1Q Computer Systems - Simon Gay16 Example SMTP Session 220-Welcome to the dcs.gla.ac.uk mail relay iona.dcs.gla.ac.uk ESMTP Exim 3.13 Mon, 29 Apr :10: >>> EHLO marion.dcs.gla.ac.uk.dcs.gla.ac.uk 250-iona.dcs.gla.ac.uk Hello root at marion.dcs.gla.ac.uk [ ] 250-SIZE PIPELINING 250 HELP >>> MAIL From: SIZE= is syntactically correct >>> RCPT To: 250 verified >>> DATA 354 Enter message, ending with "." on a line by itself >>> >>> Hi there! >>> >>>. 250 OK id=172Efi-0005Dz-00 simon... Sent (OK id=172Efi-0005Dz-00) Closing connection to mailhost.dcs.gla.ac.uk. >>> QUIT 221 iona.dcs.gla.ac.uk closing connection from client

Lecture 20CS1Q Computer Systems - Simon Gay17 Receiving If a user directly logs in to the computer whose disk holds the mailbox, then the application simply looks at the mailbox. (Similarly in the department, although the mailbox may live on a different computer on the local network.) Alternatively, another protocol called POP (Post Office Protocol) allows a mailbox to be inspected remotely; this is typically used in situations where a user dials up (using a modem) to an service provider.

Lecture 20CS1Q Computer Systems - Simon Gay18 What’s Left? Week 25 (beginning 25th April): lab session (useful for the exam, and your last chance to ask your tutor about any problems) Tuesday 26th April: NO LECTURE Thursday 28th April, 12.00: HCI Revision Session (Chris Johnson) Tuesday 3rd May, 12.00: Databases Revision Session (Marilyn McGee) Thursday 5th May, 12.00: Systems Revision Session (Simon Gay) questions for revision sessions, in advance, to the lecturer concerned. If there are no questions then the session will be very short!

Lecture 20CS1Q Computer Systems - Simon Gay19 The Exam The CS1Q degree exam will take place on Tuesday 17 th May, 2.30 – 4.45, in Hunter Hall East. Make sure you know where this is. The exam will have 4 questions for 25 marks each. Question 1: HCI, similar in style to the class test HCI question. Question 2: Databases, similar in style to the class test databases qn. Question 3: Systems, mainly on the material from before Easter. Question 4: Systems, mainly on the material from after Easter, with the opportunity to display knowledge from HCI/Databases too.