CIS131 Chapter 08
From Cis131
Summary - Shipping Goods over a (Network) Roadway
In this chapter we will explain how email uses multiple servers, we will look at the two parts of an email address, and name the two most popular email protocols. We will also see what happens before a web browser tries to access a webpage, and describe the process and protocols used between a web browser and a web server.
Neither Rain, Nor Sleet, Nor Dark of Night: Email
Email is an application that is used as a primary means of communication by many people throughout the world. Email works a lot like the postal service, also known as snail mail. With email you put an address on the message and send it. Your address is included in the message which allows the receiver to respond with ease. You also have the ability to send a message to more then one user at a time, and attach files.
Dropping Off and Getting Your (e)Mail
In real life you have a mailbox or a PO box that you use to receive your snail mail. You can also send mail by placing the mail in your mailbox with the flag up, or place it in a public mailbox. When you do this the mail person picks it up and brings it to your local post office. From there the mail is sent to the post office in the town of the recipient. Then their local mail person delivers it to the correct mailbox, and the recipient retrieves the message from the mailbox. This is the same process with email. When you send an email to someone it doesn't go directly to the user. The message first goes through your outbox (mailbox) to your mail server (local post office). Then your mail server talks to the destination users mail server (remote post office) and transmits the email. The message is then put in the users inbox (destination mailbox) on the destination mail server. The recipient receives the message from the mail server the next time they check their email.
Postal Address Verses Email Address
An email address is made up of two parts. The two parts are separated by an @ symbol. The part after the @ symbol is used to locate the destination server address. A system called Domain Name System (DNS) is used to help. DNS is covered in more detail in Chapter 13. Once the message gets to the destination server the part before the @ is used to locate the mailbox. The part before the @ is the recipients username (or alias).
Rules, Schmools: Even More Rules?
In order for email to work properly there needs to be a set of rules that the servers use when sending email. The three that we will look at are Internet Message Format, Simple Mail Transport Protocol, and Post Office Protocol Version 3. These protocols are application layer (layer 7) protocols. Applications, such as an email client, implement the correct protocols in their software. An email client is not the same thing as an application layer protocol.
Protocols for Addressing the Envelope Correctly: Internet Message Formats
When you send an email to someone not only the message is sent but a bunch of other information is sent as well. This extra information is stored in a header. The extra information that is included includes the source and destination email addresses, and the subject of the message. Below is an example of an internet header from a message sent from mrhull@cis131.com to homework@cis131.com.
Return-path: <mrhull@cis131.com> Envelope-to: homework@cis131.com Delivery-date: Sun, 25 Sep 2005 13:51:32 -0500 Received: from [xxx.xxx.xxx.xxx] (helo=xxxxxxxxx) by xxxxxxx.xxxxxxxxxxxx.com with esmtp (Exim 4.52) id 1EJbb2-0003HB-0q for homework@cis131.com; Sun, 25 Sep 2005 13:51:32 -0500 From: "Mr Hull" <mrhull@cis131.com> To: <homework@cis131.com> Subject: Chapter 1 Homework Date: Sun, 25 Sep 2005 14:51:14 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0000_01C5C1E0.944804B0" X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Thread-Index: AcXCAhn7PyCtsGy6TXm6GsFVxQOUEQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
The KISS Principle and SMTP
Simple Mail Transfer Protocol (SMTP) is used to send email from an email client to an email server and to send email between email servers. When SMTP is used to send mail the two computers that talk to each other have a dialogue before data is sent. Below is an outline of the communication that takes place.
You can connect to an email server using telnet on port 25. Below is a screenshot that shows the connection where a EHLO is sent. You can see the list of supported extensions that are returned. Then a Quit is sent and the connection is closed.
When this connection happens the conversation is logged in a log file. Below is an example of a log file that shows a message being transmitted from one server to another. This log can be used to troubleshoot problems with a mail server.
2005-09-25 19:21:27 xx.xxx.xx.xx xx.xx.xx.x 0 EHLO 250 315 26 2005-09-25 19:21:27 xx.xxx.xx.xx xx.xx.xx.x 0 MAIL 250 39 36 2005-09-25 19:21:27 xx.xxx.xx.xx xx.xx.xx.x 0 RCPT 250 0 38 2005-09-25 19:21:27 xx.xxx.xx.xx xx.xx.xx.x 0 DATA 250 114 9919 2005-09-25 19:21:27 xx.xxx.xx.xx xx.xx.xx.x 0 QUIT 240 72 4
What to Do When You Need a Little POP in Your Network
Post Office Protocol version 3 is designed to be used by an email client to retrieve email from a server. POP3 supports authentication which makes it perfect for this task. Authentication is the process of supplying a username and a password to prove you are allowed to retrieve the email from the server. Below is an outline of a connection between a client and a server.
SMTP and POP3 Working Together
SMTP and POP3 work together to provide email functionality. Mail servers usually run both SMTP server software, and POP3 server software. These applications are usually part of an over all mail server package and support sending and receiving mail. Below is an outline that shows how POP3 and SMTP work together.
Building a Centralized Warehouse: File Transfer
When you want to share large files with others, usually attaching them to an email message isn't an option. Most mail servers usually limit that size of attachments. In this scenario you would need a place to put the files so the recipients can go and get them. This can be done with an FTP server (File Transfer Protocol). An FTP server is a place where users can log into to share data. If I place a file on an FTP server I have to tell the recipient where it is so they can go access it.
Warehouse Lingo and Procedures
When a user wants to put data on the server the processes is as follows.
Once the data is on the FTP server someone can connect and get the file. The process is outlined below.
When a "get" is done it copies the data from the server to the client, it doesn't delete it off the server.
Rules, Schmools for FTP
FTP uses two TCP connections, one connection is used for the control messages, and the other is used to actually sends and receive data.
Browsing Around the Internet Shopping Mall: The World Wide Web
In Chapter 2 we went over a lot of terms related to the Internet. Let's review them now.
- Web browser (browser) - A program install on a users computer that allows them to view web pages.
- Web server - Software installed on a computer that hosts websites.
- Web content - The data viewed with a web browser.
- Web pages - The individual pages that contain the web content.
- Website - A collection of related web pages.
Rules, Schmools for Web Retailing
When a user requests a webpage they type a URL (Uniform Resource Locator) into their web browser. An example of a URL is http://www.cis131.com. The HTTP defines the protocol, in this case it is HTTP (Hypertext Transfer Protocol) which is the TCP/IP protocol used to send web pages from a web server to a web browser. The part after the two forward slashes (//) is the address of the web server. We will learn more about how this name works in Chapter 13. In the above example there is nothing after the .com. After the .com you would find the path to the web page you want to display. If no page is defined then the web server will send the default web page (home page) to you. This is outlined in the diagram below.
The file that is returned to the user is an HTML (Hypertext Markup Language) file. Your browser knows how to take this text file and present it to you in a user friendly layout.
Buy One, Get a Bunch for Free
When you visit a web page you usually get more then the single HTML file that is sent to you. Inside the HTML file are instructions on where to download graphics and other content. Your web browser goes to the web server to retrieve this information. This process is outlined below.

