Part III: Shipping and Logistics: Commerce Using the (Network) Roadways
|
|||
|
|||
|
|||
Chapter 8. Shipping Goods over a (Network) RoadwayWhat You Will Learn After reading this chapter, you should be able to
The U.S. Department of Transportation (DOT) designs and builds roadways. The
This chapter covers the details about what users need to send over a network. In particular, this chapter describes the types of data generated by typical network-based applications. Each application has different requirements for what it needs to ship over the network; that's one of the things that makes each application different. However, many applications have some similar needs in terms of what they send. For instance, many applications not only want to ship the data over the network, but they also want to make sure it gets there. They require a set of common transportation tools to provide important functions, such as error recovery. Those common tools are covered in the other chapter in this section, Chapter 9, "Choosing Shipping Options When Transporting Goods over the (Network) Roadway." But first, you need to read about the applications covered in this chapter. This chapter focuses on three applications: e-mail, file transfer, and World Wide Web. |
Neither Rain, Nor Sleet, Nor Dark of Night: E-MailThe United States Postal Service (USPS) promises to consistently deliver mail, no matter what's going on with the weather. Although e-mail services make no such promise, they have become equally as important. In fact, I know a lot of people who get nervous when they can't get to their e-mail for just a few minutes!
E-mail works a lot like paper mail with the postal service (
For those of you who might not have used e-mail before, it allows you to do basically the same thing, but without the paper. E-mail allows you to type some text, identify to whom you want to send the text by putting that person's e-mail address at the top of the e-mail, and send the e-mail. By sending the e-mail, you do the equivalent of giving the e-mail to the postal service. The service delivers the e-mail, and the
Each e-mail includes the text you typed, the recipient's e-mail address, and your e-mail address. Because the recipient now
Dropping Off and Getting Your (e)Mail
If you live in a house or apartment, a postal worker typically comes by your place every working day. He
Figure 8-1. Postal Worker Picking Up and Dropping Off the Mail
After the postal worker has picked up your mail, he
Simple and unsurprising, right? Well, e-mail works similarly. If you were to create and send an e-mail to your friend, your PC would not actually send the e-mail to your friend's PC. Instead, you would send the message to your e-mail server, which is the equivalent of dropping off a letter at the local post office. Your e-mail server would send the e-mail to your friend's e-mail server, which is the equivalent of the postal service delivering a paper letter to the post office near your friend. Then, at some point in the future, your friend would check her e-mail and retrieve the e-mail from her local e-mail server, which is the equivalent of retrieving her paper mail from her PO box. Figure 8-2 shows the same basic flow as snail mail, but instead now for e-mail, with Keith sending an e-mail to the sales department at fredsco.com (sales@fredsco.com). Figure 8-2. Sending E-Mail Using E-Mail Servers
Although not exactly like the postal service, the same general ideas apply. Each company has one (or more) e-mail servers, acting as local post offices. Also, Internet service providers (ISPs) have one (or more) e-mail servers. If you use e-mail from your corporation's enterprise network, you typically use your company's e-mail servers to drop off and pick up e-mail. If you connect to an ISP from home, you would use that ISP's e-mail servers to drop off and pick up e-mail. Postal Address Versus E-Mail Address
To send snail mail, you need to put the recipient's name and address on the front of the letter. The postal service then delivers the letter to the correct address. Similarly, to send an e-mail, you need to put the recipient's e-mail address on the e-mail. An
e-mail address
identifies the individual
E-mail addresses have two
Figure 8-3 shows why a two-part e-mail address is useful. Both Keith and Conner send an e-mail to different people inside Fredsco. The text following the figure explains how the e-mail address helps in delivering the e-mail. Figure 8-3. How a Two-Part E-Mail Address Is Used
Note that the e-mail software on Keith's and Conner's PCs do not think about the address at all. The PCs always send their e-
After Keith and Conner's e-mail servers have their respective e-mails, the servers look at the name after the @ sign, but they ignore the name before the @ sign. Their goal is to deliver the e-mail to the e-mail server at Fredsco, and the part after the @ identifies that e-mail server. It's much like how your local post office just looks at the city and state on a letter you give them, or they just look at the zip code, to figure out to which post office to send the letter. The local post office doesn't care about the name of the person on the letter or the street address; it just wants to send the letter to a post office near the recipient.
The ISP1 and ISP2 e-mail servers know how to find the e-mail server for fredsco.com because they ask another type of server called a Domain Name System (DNS) server. The DNS server
Finally, after the Fredsco e-mail server gets the e-mails, it holds the e-mail, waiting on the users to check the mail. When the person who uses the sales@fredsco.com account checks his e-mail, the Fredsco e-mail server must check the entire e-mail address of all e-mail it is holding for delivery. The e-mails with username sales get delivered to that PC. Likewise, when user fred checks his e-mail, Fredsco's e-mail server delivers the mail to Fred. Rules, Schmools: Even More Rules?Now that you have the general idea of how e-mail works, you should know about a few of the protocols and standards for e-mail. First, Table 8-1 lists the standards. Afterward, I'll explain a little about each. Table 8-1. TCP/IP E-Mail Standards
The protocols shown in Table 8-1 happen to be application layer protocols according to the TCP/IP model. Interestingly, there is an important distinction here between the application itself and the application layer protocol. Figure 8-4 provides a good backdrop to discuss the concept. Figure 8-4. E-Mail Client Application and Its Use of Application Layer Protocols
A user uses
e-mail client
software to generate, send, receive, and read e-mails. The e-mail client must do work that has nothing to do with communication. It must have a user interface, accept text typed from the keyboard, understand what a user clicks on the screen, store e-mails on the computer hard disk, and so on. None of those
The e-mail client also needs to use the network. To do so, the people who wrote the e-mail client software had to read, understand, and implement e-mail TCP/IP protocols in the e-mail client software. So, the e-mail client application is not the same thing as the application layer protocol; rather, to communicate, the e-mail client must implement the correct application layer e-mail protocols. Protocols for Addressing the Envelope Correctly: Internet Message FormatsWhen an e-mail client sends an e-mail and the e-mail servers forward it, they not only send the text of the e-mail message, but also a header. The header contains several fields, including the recipient's and sender's e-mail addresses, as shown in Figure 8-5. Figure 8-5. Sampling of the E-Mail Header Defined by RFC 2822
RFC 2822, "Internet Message Formats," defines the, well, uh, format of Internet e-mail messages. Yes, the name is a bit self-defining. RFC 2822 defines the header fields shown in Figure 8-5, and many more, so that all the
The KISS Principle and SMTP
The KISS principle refers to a wise adage to
Keep It Simple, Stupid
. Much of what you do every day might be better done if you make it uncomplicated. One of the most popular e-mail protocols also
E-mail clients and servers use SMTP protocols to manage the process of sending and receiving e-mail. As it turns out, instead of just sending an e-mail with the correct RFC 2822 header around it, the e-mail clients and servers need to talk about it first. For instance, a client should identify itself to the server before sending an e-mail. Also, the sender of the e-mail should identify the recipient before sending the e-mail; that way, if the next client/server in the
Figure 8-6. Simple SMTP Messages: Identifying the Client and the Recipient
The SMTP protocol defines messages so that the e-mail clients and servers can manage the e-mail forwarding process. The
Extended Hello (EHLO)
command identifies the client. The
Mail
command tells the server that the client wants to either send or receive e-mail. The
RCPT
(short for recipient) identifies the, well, uh, recipient of the e-mail that is about to be sent. After the server replies with an
Note that when any of the devices actually sends the e-mail, that message conforms to the Internet Message Format (RFC 2822) specifications for the contents of the header and text. The SMTP RFC (RFC 2821) defines the messages that control the process with SMTP, such as EHLO and MAIL. What to Do When You Need a Little POP in Your Network
The last e-mail protocol I'll cover here is called
Post Office Protocol (
POP
)
. The current version,
POP3
, also allows you to transfer e-mail, like SMTP. However, POP3 was designed
Yes, POP3
One of POP3's better features is authentication. Authentication refers to the process of one device identifying itself to another device via a name and a password. The other device then decides whether the first device is allowed access. For instance, if you have an e-mail account through your ISP, at some point you were given an e-mail address and password. When you check your e-mail, if you use POP3 (and you probably do), your e-mail client identifies itself and provides a password. The e-mail server decides if you should be allowed to get the e-mail. Figure 8-7 outlines the process with POP3. Figure 8-7. Basic Authentication with POP3
As you can see in the figure, Conner sends both a username and a password to the server. The server checks its list of usernames and passwords and finds a match. So, the server tells the client "OK," meaning that the server is ready to start forwarding e-mails to the client. POP3 also tells the user how many e-mails are waiting for him. To get the e-mails, the client asks for the e-mails, one at a time, as shown in the figure. SMTP and POP3 Working TogetherOften, networks use both SMTP and POP3. Clients use POP3 to get e-mail from their server, but they use SMTP to send e-mail. Servers use SMTP to forward e-mail to other servers. Figure 8-8 depicts the general flow. Figure 8-8. Typical Usage of SMTP and POP3
A couple of important facts show up in the figure. POP3 is used only to pull the e-mail from the server. Also, note that the e-mail servers are labeled as SMTP server and POP3 server . So far, I have simply referred to an e-mail server generically. In practice, to perform SMTP, you need server software that understands SMTP, and that software is cleverly called SMTP server software . So, for all this to work, the servers need to have SMTP server software running. Similarly, to allow a client to retrieve mail, the server hardware must be running POP3 server software in addition to the SMTP server software. In effect, a single computer needs to run both servers. The SMTP server and the POP3 server on the same computer store and retrieve e-mails from the same message storage location. For instance, in Figure 8-8, the Fredsco e-mail server received an e-mail using the SMTP server, storing it on the disk drive. Later, when the person using the sales@fredsco.com account checked his e-mail using POP3, the POP3 server, on that same computer, retrieved the e-mail, forwarding it to the client.
Well, at this point, you probably know more than you ever wanted to know about e-mail! Just like with the postal service, as a user, all you need to know is that you send the mail, and it gets there. Now that you are armed with a few more details, you can
|