Uh-oh, it looks like your Internet Explorer is out of date.
For a better shopping experience, please upgrade now.
TCP/IP is always a hot topic because it is and always will be the glue that holds the Internet and the World Wide Web together. To be well connected (network-wise, that is), sooner or later you have to become familiar with TCP/IP. So if you want to understand what it is, what it does, what it’s for, why you need it, and what to do with it, but you just don’t know where to start – this book is for you. If you have to install and set up TCP/IP on your computer at home or on lots of computers for your company, you'll find lots of Hands-On sections that take you through the process step by step.
TCP/IP For Dummies, 5th Edition, is both an introduction to the basics and a reference to help you use TCP/IP applications and tools on all kinds of computers connected to networks. Here are some of the many subjects that this book covers:
- Uncovering the relationships among TCP/IP, the Net, and the Web
- Exploring client/server and how it is the foundation of TCP/IP
- Installing and configuring TCP/IP and its applications on clients and servers
- Understanding intranets, extranets, and virtual private networks (VPNs)
- Building and enforcing security
- Boldly going to the next generation: IPv6
If you’re concerned about the security of your data – and who isn’t? – don’t miss the practical security tips in this book, including a Quick Start Security Guide. You can read about advanced security topics, including the security protocols that are part of TCP/IP. You also find out how to use encryption, authentication, digital certificates, and signatures. And if you’re interested in e-commerce, walk through a secure Internet credit card transaction.
About the Author
Candace Leiden is the Chief Technologist at Cardinal Software Group, a training and consulting corporation.
Marshall Wilensky is a Solutions Architect with the ISV Consulting team at Lotus Development Corporation.
Read an Excerpt
Do You Have a Complete Set of TCP/IP Dinnerware?
In This Chapter
- Discovering most of what you need to know about protocols but were afraid to ask
- Investigating how many protocols there are in TCP/IP and what they do
- Receiving an update on TCP/IP's newest protocols
As you may have seen in Chapter 1, a protocol is the set of agreed-upon practices, policies, and procedures used for communication. In this book, we're concerned with TCP/IP as the protocol for communication between two or more computers. But TCP/IP is actually a large suite of pieces that work together.
The TCP/IP Protocol Suite
What's a suite, you ask? In a hotel, a suite is a collection of rooms that are treated as a single unit. Similarly, the TCP/IP suite is a collection of protocols, named after two of the original pieces, TCP and IP.
Now you might say, "A suite is too big. Can I just rent a room?" Nope. Sorry. The protocols in the TCP/IP suite move the data from one network layer to another and interact with one another. You can't really have a functional network with just one of the TCP/IP protocols.
In Chapter 5, we talk about layer cakes -- Figure 6-1 shows the TCP/IP five-layer cake with some of the protocols drawn on the layers. You don't need every protocol on the cake to run a network application, but you need at least a taste from each layer. So even though you may not use all the rooms in the suite, you definitely need more than one.
Getting the picture? Good, but this is as far as we're going in comparing TCP/IP to a hotel room. That's because you need to know that there's more to TCP/IP than just TCP and IP. To help you understand, we're going for an analogy that lets you compare all the pieces to something more familiar. Read on.
Many people try to compare the TCP/IP protocol to a Swiss Army knife, which has cutting blades of various sizes, a corkscrew, scissors, a nail file, and so on. The analogy works pretty well except for one thing. The really cool Swiss Army knives, with all those clever and handy pieces, are too big to have with you all the time. They'll poke a hole in your pocket!
So we have a different analogy for you. TCP/IP is like a complete set of dinnerware: plates, bowls, glasses, forks, spoons, and yes, even knives. And TCP/IP continues to expand, which means we can also include cups and saucers, wine glasses, the cream pitcher, finger bowls, and matching salt and pepper shakers. When we say complete, we mean complete! Okay, okay. We're getting carried away with the dinnerware idea, maybe. We suspect you probably eat off paper plates as often as we do. But TCP/IP doesn't know or care whether your plates are paper, stoneware, or bone china. A plate is a plate.
TCP/IP bowls you over
Many pieces of the TCP/IP suite function as protocols, applications, and services. In this and the next six chapters, as we talk about all the great things you can do with TCP/IP, we'll keep you well informed of whether you're using a TCP/IP protocol, a network service, or an application -- and highlight the places where the same name applies to one or more of these things.
To kick off the TCP/IP dinnerware analogy, imagine a large bowl. You can use that one bowl in various roles, in more than one room:
- To mix a cake batter (a mixing bowl in the kitchen)
- To hold Seinfeld-sized portions of your favorite cereal, or tonight's soup, or the cat's dinner (a serving bowl in the dining room)
- To hold flowers (a vase in the living room)
TCP/IP's modular, layered design makes it easy to innovate and add new components. If you envision a new network service, as you go about designing the server and client applications, you can simultaneously design a new protocol to add to the TCP/IP suite. The protocol enables the server application to offer the service and lets the client application consume that service. This elegant simplicity is a key advantage of TCP/IP.
RFC Alert: If you create a new protocol/application/service combination for the Internet, be sure to follow the RFC (Request For Comments) process described in Chapter 2. Follow the instructions in the Appendix, and get a copy of RFC 1543, "Instructions to RFC Authors."
Protocol, application, or service?
In the fabric of a network, you find the protocol/application/service relationship so tightly woven together that it may be very difficult to distinguish the threads in the cloth. We use FTP as an example. FTP stands for file transfer protocol, but it's not only a protocol -- FTP is also a service and an application. (Don't worry about FTP itself at this point -- it's just an example. If you need to learn how to use FTP, check out Chapter 9.) In this section, we show you how the FTP service, application, and protocol work together to move files around the network.
- FTP is a service for copying files. You connect to a remote computer offering this service, and you can "pull" and "push" files from or to that computer.
- FTP is also an application for copying files. You run a client application on your local computer to contact the FTP server application on the remote computer. Your client application is usually called FTP, the file transfer program. The server application is often called FTPD, the file transfer protocol daemon. (The term daemon comes from UNIX. Think of friendly demons haunting the computer to act on your behalf.) You tell the client what you want to do -- pull or push files -- and it works with the server to copy the files.
- Finally, FTP is a protocol for copying files. The client and server applications both use it for communication to ensure that the new copy of the file is, bit for bit and byte for byte, identical to the original.
FTP is three, three, three things at once -- application, service, and protocol. Suppose you need to copy a file from a remote computer. Without the application, your computer doesn't know that you want to copy. Without the service, you don't get a connection to the remote computer that has the files you need. Without the protocol, the client and server can't communicate.
Most of the time, you know from the context whether someone is referring to the service, the application, or the protocol. If you can't quite tell, maybe it doesn't really matter.
And now, on to the protocols!
The Protocols (And You Thought There Were Only Two!)
Hold on tight -- here come the pieces in the TCP/IP protocol suite, listed in no particular order.
IP: Internet Protocol
The Internet Protocol, IP, is responsible for basic network connectivity. IP is the plate in a basic place setting. When you're eating, you need a plate to hold your food. When you're networking, you need a place to put (send and receive) data -- that place is a network address.
The core of IP works with Internet addresses (you can find the details about these addresses in Chapters 13 and 14). Every computer on a TCP/IP network must have a numeric address. The IP on your computer understands how and where to send messages to these addresses.
While IP can take care of addressing, it can't do everything to make sure that your data gets to where it's going correctly and in one piece. IP doesn't know or care when a packet gets lost and doesn't arrive. So you need some other protocols to ensure that no packets and data are lost and that the packets are in the right order.
All of this is true for both IP version 4 and the new version 6 (IPv6, originally called IPng). IPv6 is just bigger and better. So if IP is a plate, IPv6 is a serving platter.
TCP: Transmission Control Protocol
Once the food is on your plate, you need something to get it into your mouth without dropping it all over your lap. In your place setting, this is the spoon. Yeah, sure, you could use a fork, and some of you can probably even eat your peas from a knife without losing any, but a spoon is the most reliable implement for most foods. Try eating soup with a fork!
TCP, the Transmission Control Protocol, is our network spoon. No matter what kind of data you have, TCP makes sure that nothing is dropped. TCP uses IP to deliver packets to those upper-layer applications and provides a reliable stream of data among computers on the network. Error checking and sequence numbering are two of TCP's more important functions. Once a packet arrives at the correct IP address, TCP goes to work. On both the sending and receiving computers, it establishes a dialog to communicate about the data that is being transmitted. TCP is said to be "connection oriented" because it tells the network to resend lost data.
Theoretically, you can have TCP without IP. Some other network mechanism besides IP can deliver the data to an address, and TCP can still verify and sequence that data. But in practice, TCP is always used with IP.
UDP: User Datagram Protocol
As just mentioned, your TCP network spoon does the best job on that homemade cream of mushroom soup. In contrast, the User Datagram Protocol, UDP, is like your fork. You can do a pretty good job of cleaning your plate with a fork, and though it's not as reliable as TCP, UDP nevertheless gets a lot of data across the network.
UDP uses IP to deliver packets to upper-layer applications and provides a flow of data among computers. UDP provides neither error checking nor sequence numbering, although these features can be added by the application that has chosen to use UDP. This protocol is said to be "connectionless" because it does not provide for resending data in case of error.
NFS (Network File System), DNS (Domain Name System), and RPC (Remote Procedure Call) application programming interfaces use UDP. The protocols, applications, and services for NFS and DNS are discussed in detail in Chapters 10 and 11 respectively.
Figure 6-2 shows the relationship between IP, TCP, and UDP, and the applications at the upper layers. All the applications shown are provided with TCP/IP. If you write your own TCP/IP applications, you can draw those in on the picture, too.
You have to have connections -- or do you?
TCP/IP communicates among the layers in different ways. These methods are either connectionless or connection oriented.
Connection-oriented communication is reliable and pretty easy to understand. When two computers are communicating with each other, they "connect." Each understands what the other one is doing. The sending computer lets the receiving computer know that data is on the way. The recipient acknowledges receipt of the data (called ACKs for short) or denies receipt of the data (negatively acknowledges, or NACKs). This ACKing and NACKing is called handshaking.
Suppose you send a fax to your friend Ken in Tokyo. If you want to be sure he gets it, you might call and say, "I'm faxing you the baseball results now. Call me when you get it." Once the fax comes in and Ken checks it over to make sure it is readable, he calls you and says, "Thanks. I'm thrilled to hear that the Cubs won the World Series." That's connection-oriented communication.
But suppose you send the fax without first notifying your friend. And, for some reason, it never gets there. Ken doesn't know to expect anything, so he doesn't know that anything is lost. That's connectionless communication. When connectionless data is sent, the computers involved know nothing about each other or the data being sent. If you're on the receiving end, no one tells you that you're about to get anything. If you're sending data, no one bothers to mention whether or not they got it or if it was totally garbled.
With this in mind, you might wonder why any data communications would be done in connectionless mode. But there's a time and place for everything. First, communication is faster without the ACKs and NACKs. Second, not every network message needs to be as accurate as your e-mail. Finally, some applications do their own error checking and reliability processing, so they don't need the connection-oriented overhead of TCP.
ARP: Address Resolution Protocol
When all you know is the TCP/IP address of the remote computer, the Address Resolution Protocol, ARP, finds that computer's network interface card hardware address. ARP is like your salad plate. With its load of addresses for the devices on the network, ARP is closely allied with IP, the dinner plate. (See Chapter 13 for more on TCP/IP addresses.)
RARP: Reverse Address Resolution Protocol
When all you know is the network interface card (NIC) hardware address of a remote computer, the Reverse Address Resolution Protocol, RARP, finds the computer's TCP/IP address. RARP is your salad fork because it goes with your salad plate. We don't mean to suggest any relationship to the UDP dinner fork, however. Hey, there are places where we have to stretch the analogy a little, okay?
ICMP: Internet Control Message Protocol
The Internet Control Message Protocol, ICMP, reports problems and relays other network-specific information, such as an error status from some network device. IP detects the error and passes it to ICMP. A very common use of ICMP is the echo request generated by the Ping command. ICMP is like your crystal water glass, the one that "pings" so nicely when you accidentally hit it with the fork you're waving around to emphasize your point in that argument about the greenhouse effect.
FTP: File Transfer Protocol
The File Transfer Protocol, FTP, is like your knife. Not a special steak knife or a little butter knife; just the regular dinner knife. It's FTP that helps you copy files between two computers. You use your FTP knife to either "pull" the files from the remote computer (known as downloading) or "push" them to the remote computer (known as uploading). As described earlier in this chapter, FTP is also the name of an application and a service, so we'll be looking at it again (and again).
Check out Chapter 9 for lots more on FTP.
TFTP: Trivial File Transfer Protocol
The Trivial File Transfer Protocol, TFTP, loads files down line from a TFTP server. Another use of TFTP is in Digital Equipment Corporation's remote installation service, where you install a computer's operating system from another computer's files via the TFTP protocol. This is called a network installation.
TFTP is your butter knife, a smaller version of the FTP dinner knife. You can see why we needed to be a little specific about your FTP knife.
SMTP: Simple Mail Transfer Protocol
The Simple Mail Transfer Protocol, SMTP, is the protocol for Internet e-mail. It transfers e-mail messages among computers. The messages may go directly from the sender's computer to the recipient's, or the messages may proceed through intermediary computers in a process known as store and forward.
SMTP is like your wine goblet. Again, a disclaimer is in order: We don't mean to suggest any relationship to the ICMP water glass, which you managed to knock over anyway as that discussion heated up.
E-mail, of course, is one of the Big Four network applications (along with file transfer, signing on to remote computers, and Web browsing), and many vendors have their own mail protocols. SMTP is the mail transfer protocol for the Internet. UNIX mail understands SMTP, but other operating systems do not. When users of SMTP-ignorant computers need to get out to the outside world (in other words, get to the Internet), a special SMTP gateway must be established for that communication.
Chapter 7 tells you more about SMTP gateways and e-mail in general.
POP3: Post Office Protocol, Version 3
The latest version of the Post Office Protocol, POP3, provides basic client/server features that help you download your e-mail from a POP3 mail server to your computer. POP3 is like the corkscrew that helps you get the e-mail wine out of the bottle and into your wine goblet. If your computer has an SMTP connection to a neighboring computer, you don't need to use POP3.
POP3 was designed to allow home users to move their e-mail off their Internet Service Provider's (ISP's) computers and onto their own. You need a POP3 mail client to communicate with a POP3 mail server.
See Chapter 7 for more information about POP3 clients and servers.
IMAP4: Internet Message Access Protocol, Version 4
The latest version of the Internet Message Access Protocol (Version 4, Revision 1), IMAP4, provides sophisticated client/server capabilities that give you choices about how you handle your e-mail. IMAP4 provides a richer set of features than POP3. IMAP4 is like a fancy decanter that holds the wine better than the bottle does but still helps you get the e-mail wine into your wine goblet. If your computer has an SMTP connection to a neighboring computer, you don't need to use IMAP4. You still might choose to use IMAP4, however, because of its sparkling functionality. You need an IMAP4 client to communicate with an IMAP4 mail server.
POP3 and IMAP4 don't interoperate. You can't use a POP3 client with an IMAP4 server or an IMAP4 client with a POP3 server, but you can find clients and servers that speak both protocols.
LDAP: Lightweight Directory Access Protocol
LDAP (pronounced as L-dap, which rhymes with cap) is the way to look up information such as user names and e-mail addresses in an X.500-compatible directory service. Whew! That's a mouthful. Think of the directory service as a big set of white pages containing all of the information you might need. The problem is, there isn't just one set of white pages. Each organization has several.
LDAP helps applications get what they need from any or all sets of white pages. LDAP is like the condiment tray filled with pickles, olives, capers, relishes, a little bit of this, a little bit of that, each in its own separate compartment.
X.500, part of ISO OSI, had its own Directory Access Protocol (DAP), but neither X.500 or DAP became popular. LDAP capitalizes on the work done by X.500 and DAP's visionary designers.
NTP: Network Time Protocol
The time-of-day clocks that computers maintain are synchronized by the Network Time Protocol, NTP. Time-stamping is important in all sorts of applications, providing everything from document creation dates to network routing date/time information. NTP gets the time data from a time-server computer, which gets it from an official source, such as the United States National Institute of Standards and Technology. In continental Europe, ISO provides a time service used with banking transactions and stock transfers.
NTP is like your seafood fork. You know, the tiny one you use (or try to, anyway) to get the lobster meat out. NTP is a special-purpose tool, just right for the job it's made for.
HTTP: HyperText Transfer Protocol
The HyperText Transfer Protocol (HTTP) transfers HyperText Markup Language (HTML) and other components from the servers on the World Wide Web to your browser client. (There's lots more about the World Wide Web in Chapter 12.)
HTTP is like a large pitcher filled with sangria -- a lot of delicious ingredients that are combined to make something even better. (Candace makes the world's best sangria; but in a sick twist of fate, she's become allergic to red wine.) The HTTP pitcher brings the various Web ingredients to you. It's similar to the wonders of e-mail brought to you by the SMTP wine goblet.
BOOTP: Boot Protocol
When you acquire a new computer, it needs an operating system. If the computer has no disks for storage, you can download the operating system into your computer's memory from another computer on the network. When you do, your diskless computer uses the Boot Protocol, BOOTP, to load its operating system (or other stand-alone application) via the network. Booting means loading the operating system.
If you do have disk storage on your new computer, you should install your own local operating system. Some vendors (Digital Equipment Corporation, for instance) let you perform a remote installation from another computer on the network. The remote installation copies all the operating system files to your computer's disk; from that point on, you can boot the operating system locally.
RIP, OSPF: Gateway (Router) Protocols
Under your network place settings is a tablecloth made of gateways and routers, which have various gateway and router protocols that allow them to exchange network topology and status information. Routing is the process of moving packets between networks. Here are the some of the most popular ones:
- Routing Information Protocol (RIP)
- Open Shortest Path First (OSPF)
- Inter Domain Routing Protocol (something rescued from the OSI effort)
Chapter 18 has more information on the gateways, routers, and other hardware devices that use these protocols.
PPTP: Point to Point Tunneling Protocol
The Point to Point Tunneling Protocol (PPTP) lets you create a Virtual Private Network (VPN) on the public Internet. Using PPTP, you can have a secure link to your organization's network -- as if you were inside the building and on the LAN -- even though you're actually connected to the Internet via an Internet Service Provider (ISP). Your communication traffic can even be encrypted to ensure that no miscreants can see your data. You get all of the benefits of a global private network without any of the hassles of launching your own satellites, laying your own undersea cables, or working with any of the boring pieces from Chapter 3.
PPTP is like your napkin because it augments the tablecloth provided by the router protocols. The encryption is like an optional napkin ring.
DHCP: Dynamic Host Configuration Protocol
We couldn't forget about you housekeeping haters out there when putting together the TCP/IP dinnerware. We knew you'd want a recyclable paper plate. DHCP, the Dynamic Host Configuration Protocol, is that paper plate. This protocol is a client/server solution for sharing numeric IP addresses. The DHCP paper plate (a DHCP server) maintains a pool of shared addresses -- and those addresses are recyclable. When a DHCP client computer wants to use a TCP/IP application, that client must first request an IP address from the DHCP server. The server checks the shared supply; if all the addresses are in use, the server notifies the client that it must wait until another client finishes its work and releases an IP address. If an address is available, the DHCP server sends a response to the client that contains the address.
This shared-supply approach makes sense in environments in which computers don't use TCP/IP applications all the time or in which there are not enough addresses available for all the computers that want them.
SSL: Secure Sockets Layer
SSL (the Secure Sockets Layer, version 2) provides security by allowing applications to encrypt data that goes from a client, such as a web browser, to the matching server. (Encrypting your data means converting to a secret code. Chapter 7 discusses encrypting your e-mail.) In other words, when you buy that Lamborghini over the Web, no one but the dealer can read your credit card number. SSL version 3 allows the server to authenticate that the client is who it says it is.
SSL is like the engraved invitation you must show at the front door before you are allowed to see your glorious dining table set with all this wondrous TCP/IP dinnerware. It's the way you convince the big brute of a bouncer to let you in.
SET: Secure Electronic Transaction
When the Web-based Lamborghini dealer checks with the bank to make sure your credit card is good, you don't want any Internet snoops to steal a peek at your credit card number. SET is the protocol that protects your credit card on the dealer's end of the sale.
And many, many more...
There are many more pieces of TCP/IP, and new ones are being developed this very minute! The ones described in this chapter are the most important, the most visible, and the most common. All of the protocols that use an IP address must be updated so that they understand the IPv6 address. Aren't you glad you're not a TCP/IP programmer? Here are some of the protocols that have undergone extensive updating:
The changes in IPv6 also affect services such as DNS. You can read about the details in Chapter 14.
Table of Contents
Part I: TCP/IP Basics and Buzzwords.
Chapter 1: Understanding TCP/IP Basics.
Chapter 2: What You Need to Know about Networks.
Chapter 3: Internetworking Technologies: Client/Server, P2P, and Grid.
Chapter 4: TCP/IP and Internets, Intranets, and Extranets.
Part II: Getting Technical with Protocols and Addresses.
Chapter 5: Introducing the TCP/IP Model and the Protocols.
Chapter 6: Nice Names and Agonizing Addresses.
Chapter 7: Not Enough Addresses? Try Subnets, DHCP, CIDR, NAT.
Chapter 8: Configuring TCP/IP.
Chapter 9: IPv6 IP on Steroids.
Part III: Using and Configuring TCP/IP Services.
Chapter 10: Resolving Names and Addresses with DNS.
Chapter 11: E-Mail and Other Communication Services.
Chapter 12: Getting Started with Web Clients and Servers.
Chapter 13: Sharing Files with FTP and rcp.
Chapter 14: Sharing Compute Power across a Network.
Chapter 15: Mobile IP, Dialup Networking, and IP Telephony.
Part IV: Network Hardware and Security.
Chapter 16: The Dreaded Hardware Chapter.
Chapter 17: Troubleshooting Connectivity Problems Step by Step.
Chapter 18: Protecting and Monitoring Network Security.
Chapter 19: Securing E-Mail and Other TCP/IP Applications.
Chapter 20: Advanced Security.
Part V: The Part of Tens.
Chapter 21: Ten Strange but Real TCP/IP Network Devices (No Kidding!).
Chapter 22: Watch Your Back Ten Practical Security Tips.
Chapter 23: Ten Ways to Get RFCs.
Appendix: About the CD.