TCP / IP For Dummies
By Candace Leiden and Marshall Wilensky
5/5
()
About this ebook
TCP/IP is a hot topic, because it's the glue that holds the Internet and the Web together, and network administrators need to stay on top of the latest developments. TCP/IP For Dummies, 6th Edition, is both an introduction to the basics for beginners as well as the perfect go-to resource for TCP/IP veterans.
The book includes the latest on Web protocols and new hardware, plus very timely information on how TCP/IP secures connectivity for blogging, vlogging, photoblogging, and social networking. Step-by-step instructions show you how to install and set up TCP/IP on clients and servers; build security with encryption, authentication, digital certificates, and signatures; handle new voice and mobile technologies, and much more.
- Transmission Control Protocol / Internet Protocol (TCP/IP) is the de facto standard transmission medium worldwide for computer-to-computer communications; intranets, private internets, and the Internet are all built on TCP/IP
- The book shows you how to install and configure TCP/IP and its applications on clients and servers; explains intranets, extranets, and virtual private networks (VPNs); provides step-by-step information on building and enforcing security; and covers all the newest protocols
- You'll learn how to use encryption, authentication, digital certificates, and signatures to set up a secure Internet credit card transaction
Find practical security tips, a Quick Start Security Guide, and still more in this practical guide.
Related to TCP / IP For Dummies
Related ebooks
CCNA Certification All-in-One For Dummies Rating: 5 out of 5 stars5/5Linux All-In-One For Dummies Rating: 2 out of 5 stars2/5Linux All-in-One For Dummies Rating: 3 out of 5 stars3/5Cisco Networking Essentials Rating: 0 out of 5 stars0 ratingsStorage Area Networks For Dummies Rating: 4 out of 5 stars4/5Cisco Networking All-in-One For Dummies Rating: 4 out of 5 stars4/5Wireless Home Networking For Dummies Rating: 4 out of 5 stars4/5Mastering Windows Server 2022 with Azure Cloud Services: IaaS, PaaS, and SaaS Rating: 0 out of 5 stars0 ratingsTCP/IP for Everyone Rating: 4 out of 5 stars4/5CompTIA Cloud+ Study Guide: Exam CV0-003 Rating: 0 out of 5 stars0 ratingsCompTIA A+ Complete Study Guide: Core 1 Exam 220-1101 and Core 2 Exam 220-1102 Rating: 0 out of 5 stars0 ratingsCompTIA Network+ Study Guide: Exam N10-007 Rating: 1 out of 5 stars1/5Kali Linux Penetration Testing Bible Rating: 0 out of 5 stars0 ratingsThe Compete Ccna 200-301 Study Guide: Network Engineering Edition Rating: 5 out of 5 stars5/5CompTIA A+ Complete Review Guide: Core 1 Exam 220-1101 and Core 2 Exam 220-1102 Rating: 5 out of 5 stars5/5CompTIA Network+ Study Guide: Exam N10-008 Rating: 0 out of 5 stars0 ratingsCisco Network Administration Interview Questions: CISCO CCNA Certification Review Rating: 5 out of 5 stars5/5CompTIA CySA+ Study Guide: Exam CS0-003 Rating: 2 out of 5 stars2/5CompTIA Security+: Network Attacks Rating: 5 out of 5 stars5/5Wireshark Essentials Rating: 0 out of 5 stars0 ratingsCCST Cisco Certified Support Technician Study Guide: Networking Exam Rating: 0 out of 5 stars0 ratingsNetworking All-in-One For Dummies Rating: 4 out of 5 stars4/5Networking For Dummies Rating: 0 out of 5 stars0 ratingsNetworking Fundamentals: Develop the networking skills required to pass the Microsoft MTA Networking Fundamentals Exam 98-366 Rating: 0 out of 5 stars0 ratingsUNIX For Dummies Rating: 3 out of 5 stars3/5Home Networking Do-It-Yourself For Dummies Rating: 4 out of 5 stars4/5CompTIA Linux+ Study Guide: Exam XK0-005 Rating: 0 out of 5 stars0 ratings
Networking For You
Linux Bible Rating: 0 out of 5 stars0 ratingsThe Compete Ccna 200-301 Study Guide: Network Engineering Edition Rating: 5 out of 5 stars5/5AWS Certified Cloud Practitioner Study Guide: CLF-C01 Exam Rating: 5 out of 5 stars5/5Cybersecurity: The Beginner's Guide: A comprehensive guide to getting started in cybersecurity Rating: 5 out of 5 stars5/5The Windows Command Line Beginner's Guide: Second Edition Rating: 4 out of 5 stars4/5CompTIA Network+ Certification Guide (Exam N10-008): Unleash your full potential as a Network Administrator (English Edition) Rating: 0 out of 5 stars0 ratingsAmazon Web Services (AWS) Interview Questions and Answers Rating: 5 out of 5 stars5/5Networking For Dummies Rating: 5 out of 5 stars5/5Concise and Simple Guide to IP Subnets Rating: 5 out of 5 stars5/5CompTIA Network+ Study Guide: Exam N10-009 Rating: 0 out of 5 stars0 ratingsCompTIA Network+ Practice Tests: Exam N10-008 Rating: 0 out of 5 stars0 ratingsGroup Policy: Fundamentals, Security, and the Managed Desktop Rating: 5 out of 5 stars5/5Home Networking Do-It-Yourself For Dummies Rating: 4 out of 5 stars4/5A Beginner's Guide to Ham Radio Rating: 0 out of 5 stars0 ratingsEmergency Preparedness and Off-Grid Communication Rating: 3 out of 5 stars3/5Nmap Essentials Rating: 4 out of 5 stars4/5Raspberry Pi Electronics Projects for the Evil Genius Rating: 3 out of 5 stars3/5Windows Command Line Administration Instant Reference Rating: 0 out of 5 stars0 ratingsNetworking All-in-One For Dummies Rating: 5 out of 5 stars5/5OSINT 101 Handbook: Expert-Level Intelligence Gathering: Advanced Reconnaissance, Threat Assessment, And Counterintelligence Rating: 0 out of 5 stars0 ratingsQuantum Computing For Dummies Rating: 0 out of 5 stars0 ratingsMicrosoft Azure For Dummies Rating: 0 out of 5 stars0 ratingsPractical Ethical Hacking from Scratch Rating: 5 out of 5 stars5/5SharePoint For Dummies Rating: 0 out of 5 stars0 ratingsPacket Tracer Network Simulator Rating: 5 out of 5 stars5/5Programming Arduino: Getting Started with Sketches Rating: 4 out of 5 stars4/5CCNA Certification Study Guide, Volume 2: Exam 200-301 Rating: 4 out of 5 stars4/5Microsoft Certified Azure Fundamentals Study Guide: Exam AZ-900 Rating: 0 out of 5 stars0 ratings
Reviews for TCP / IP For Dummies
1 rating0 reviews
Book preview
TCP / IP For Dummies - Candace Leiden
Part I
TCP/IP from Names to Addresses
450604-pp0101.epsIn this part . . .
You can’t play the game if you don’t know the rules. And TCP/IP is the set of rules, or protocols, for networks. TCP/IP is the software underpinning of the Internet and its World Wide Web. TCP/IP also includes services and applications that work with the protocols. Before we get into the hairy details of the protocols themselves, we give you some background on the people and committees who decide the direction of TCP/IP’s growth. Did you know that you can be part of these groups? We tell you how. You also become familiar with TCP/IP and Internet buzzwords.
Part I then delves into the ingredients of the TCP/IP suite: the protocols and services themselves and IP addressing. You see how the protocols fit into the layers of the TCP/IP network model, and you take a look at the most important ones. TCP/IP is a suite because it consists of more protocols than the two it’s named for, plus a set of services and applications. The TCP/IP protocols, services, and applications in the suite work together just like the rooms in a hotel suite or the pieces in a furniture suite work together. The set of protocols is also referred to as a stack.
From there, we go into Internet addressing.
People love names. Computers love numbers. You’ll hear this in each part of this book.
If your computer is named Woodstock, for example, the Internet may think of it as 198.162.1.4. You get to see how to build and understand these numeric addresses. Also, if you’re worried because you think that the Internet is running low on addresses, Part I eases your worries by cluing you in to a couple of different ways to make IP addresses go further: subnetting and NAT (Network Address Translation).
Bear in mind that TCP/IP stays alive by morphing regularly — at times, daily. So, the list of protocols we describe here — the Internet’s rules — will be even longer by the time you read this book.
Chapter 1
Understanding TCP/IP Basics
In This Chapter
Protocols in this chapter: IP, TCP, IPSec, PPTP, L2TP
Introducing TCP/IP
Defining a protocol
Understanding RFCs — the protocol documentation
Differentiating between intranets, extranets, and Virtual Private Networks (VPNs)
Figuring out who’s in charge of TCP/IP and the Internet
Investigating different types of networks that rely on TCP/IP software
You bought or borrowed this book, or maybe you’re just flipping through it to pick up some information and tips about TCP/IP and its pieces and parts. Transmission Control Protocol/Internet Protocol, or TCP/IP, is the internationally accepted software for networking in general and, specifically, for making the Internet’s services possible.
As you read this book, you get a behind-the-scenes look at how TCP/IP makes the Internet work. You also see how to use TCP/IP to set up your own home, office, or even international network. This chapter gets started by defining a protocol in general and TCP/IP protocols specifically. Proposals known as Requests for Comment, or RFCs, document how TCP/IP should function. You may wonder who’s in charge of defining these protocols that rule the Internet. The answer is: lots of people who join international committees. This chapter describes the main Internet governing committees and what they do.
The Internet is one giant worldwide network that consists of tens of thousands of other networks. We give you an idea in this chapter of the different kinds of networks that connect via TCP/IP into the Internet.
The TCP/IP pronunciation guide
Pronouncing TCP/IP is easy — you just say the name of each letter and ignore the slash (/). Ready? It sounds like this:
Tee cee pee eye pee
Skip the silly jokes, please. We’ve made them all. By the way, some people find five letters too much to pronounce, so they just say IP
to refer to the whole thing.
Following Rules for the Internet: TCP/IP Protocols
A protocol is a set of behavior-related rules that people follow. Some protocols are formally defined. For example, when people meet and greet each other, they might say, Enchante de faire votre conaissance
or How do you do
? We also hear our niece, Emily, and her friends saying Hey, dude!
All these examples are widely accepted behaviors for people to start communicating — they are protocols. The more formal greetings are written down in etiquette books. Hey, dude
has become accepted (at least by people much younger than we are) because of its wide use. Common ways of connecting aren’t enough, though. After you meet, you need a common language in order to communicate. Just as people connect and communicate in accepted ways, computers connect and communicate with each other and with you. In the world of computers and networks, TCP/IP is a common language used for both connection and communication.
Although TCP/IP sounds like it consists of just two protocols, it’s a whole set of protocols for connecting computers to the Internet. This set of protocols is the TCP/IP stack, or protocol suite. We describe in Chapter 2 the most well-known protocols in the TCP/IP stack. Before we get to the protocols themselves, the following sections look at who’s in charge of the Internet and who decides what gets to be a standard part of the TCP/IP protocol suite. You also get familiar with Requests for Comments (RFCs), the documents that describe TCP/IP standards.
Who’s in charge of the Internet and TCP/IP?
You’re in charge. Or, you might say that everyone is, and no one is, in charge of the Internet and TCP/IP. No one person, organization, corporation, or government owns or controls the TCP/IP protocols or the Internet. Moreover, no one person, organization, corporation, or government finances the TCP/IP protocols or the Internet. To say that no one controls TCP/IP and the Internet doesn’t mean, however, that protocols magically appear with no control or that the Internet just does whatever it wants.
This list describes some of the important organizations and committees that steer TCP/IP and Internet policies:
Internet Society (ISOC): The Internet Society (www.isoc.org) guides the future of the Internet by overseeing Internet standards, public policy, education, and training. ISOC members include corporations, international and governmental organizations, and individuals. The Internet Activities Board (refer to third bullet), the Internet Engineering Task Force (refer to fourth bullet), and the Internet Research Task Force are all part of the ISOC.
Internet Corporation for Assigned Names and Numbers (ICANN): The nonprofit corporation ICANN, at www.icann.org, is in charge of assigning Internet addresses. ICANN, pronounced eye can,
is run by an international board of directors and funded by the Internet community.
Internet Activities Board (IAB): IAB, at www.iab.org, defines the architecture for the Internet. The IAB — just say its letters, i-a-b
— also oversees the Internet’s protocols (TCP/IP). The IAB contains subcommittees of volunteers who set standards and work on new solutions to Internet growth problems.
Internet Engineering Task Force (IETF): IETF, at www.ietf.org, is a community of more than 70 informal committees responsible for keeping the Internet up and running every day. The IAB supervises the IETF, which is pronounced simply i-e-t-f.
You can join the IETF working groups to help draft and develop standards for TCP/IP protocols.
Figure 1-1 shows how these Internet management groups are organized.
Figure 1-1: ISOC and ICANN are influential Internet steering groups.
450604-fg0101.epsChecking out RFCs: The written rules
TCP/IP protocols are written down in special Request for Comments (RFC) documents. An RFC (pronounced r-f-c
) document is available for everyone to read and comment on — it’s part of the democracy of the Internet.
Toasting the RFC Editor
Surprise! The RFC Editor isn’t just one person. It consists of a small group of people who work for the Internet Society. The RFC Editor Web site, at www.rfc-editor.org, keeps the official index of all RFCs ever written. You can find any RFC there. We find this site to be one of the most useful when we want information about what’s going on with TCP/IP. You can search RFCs by number, author, title, or keyword. For example, click the link Search for an RFC and Its Meta-Data and then search for the keyword security. Notice how many pages it takes to display the results. And the list of results only grows — an RFC is never removed. It may be declared obsolete, but it stays available.
Knowing who writes RFCs
If you come up with an idea for a new or an improved capability for TCP/IP, you write your proposal as an RFC and submit it to an Internet committee for review. Working groups from various committees collaborate on most RFCs. You can join these working groups if you want to help but don’t want to write a whole RFC on your own. For example, to join an IETF working group, send an e-mail to [email protected].
Understanding RFC categories
Three categories of RFCs are on the standards track:
Standard (STD): An approved technical standard
Draft standard: On its way to being adopted as a standard
Proposed standard: On its way to being adopted as a draft standard
Here are some other RFC categories:
Best current practices (BCP): Guidelines and recommendations, such as RFC 4107, Guidelines for Cryptographic Key Management
Experimental (EXP): Part of a research or development project, such as RFC 5335, Internationalized Email Headers
Historic: Refers to the fact that most historic RFCs are former standards that are now obsolete and have been replaced by more current RFCs
Informational (FYI): Provides general information, such as RFC 4677, The Tao of IETF — A Novice’s Guide to the Internet Engineering Task Force
If you have time and a sense of humor, check out the RFCs written on April 1, but do not take them seriously!
Examining Other Standards Organizations That Add to the Rules
Although the Internet corporations, committees, and groups listed in the preceding section specify the rules for using TCP/IP, other groups set standards for related technologies, as described in this list:
Institute of Electrical and Electronics Engineers (IEEE): The IEEE (pronounce it eye-triple-e
) sets hardware standards, such as the hardware that connects Local Area Networks (LANs) and Wireless Local Area Networks (WLANs).
World Wide Web Consortium (W3C): Although the Web is part of the Internet and follows TCP/IP standards, the W3C (say the letters and number w-c-3
) sets standards related to Web services.
International Organization for Standardization (ISO): ISO (eye-so
) sets all kinds of standards, not just for networks. One of its standards indicates how the computers that run your car should interconnect.
Open Systems Interconnection (OSI): The OSI (o-s-i
) sets networking protocol standards similar to TCP/IP, but different. At one time, OSI thought that its protocols would replace TCP/IP, but as hard as its members worked, it didn’t happen.
Free Software Foundation (FSF) General Public License (GPL): The FSF set up the GNU (pronounced guh-new
) project to create and distribute free software. GNU software, licensed under the GPL, is the reason that the Linux operating system is available for free or for a very low cost. GNU also provides lots of network tools and utilities as well as complete TCP/IP stacks.
Distinguishing Between the Internet, an Internet, and an Intranet
Yes, we realize that you already know what the Internet is. But just so that we’re all using the same definition, the Internet is the worldwide collection of interconnected computer networks that use the TCP/IP protocol. These networks reach every continent — even Antarctica — and nearly every country.
The Internet also consists of much more than its network connections. It’s all the individual computers connected to those individual networks, plus all the users of those computers, all the information accessible to those users, and all the knowledge those people possess. The Internet is just as much about people and information as it is about computers and computer networks.
Although the Internet is public, many organizations (companies and universities, for example) have their own, private internets that may connect to it. An internet is built the same way as the Internet, except that an internet is private. You might even have an internet in your home.
Remember.eps Both the Internet and internets run on TCP/IP protocol software. In this book, we distinguish the Internet from an internet by capitalizing the Internet.
The difference between an internet and an intranet is just terminology. The term intranet is fairly recent. Old-timers (such as the authors of this book) grew up with "an internet and now we use both terms. The important concept is that all kinds of
nets" run with TCP/IP.
Extending Intranets to Extranets
Intranets are the building blocks of extranets. If part of your intranet is available to people outside your organization, such as customers and suppliers, the part you share with the outside world is an extranet. An extranet has these characteristics:
It consists of multiple, interconnected intranets/internets.
An organization’s extended family of partners work together electronically.
It might not exist physically — it’s a virtual network.
Because an intranet is a private network within an organization or a department, you might find a few different intranets in a large institution. A university on the east coast, for example, might have one intranet for its medical school, another intranet for its college of liberal arts, and a third intranet for its business school. That university may also network those intranets into an even bigger intranet. Then, so that the university community can reach the rest of the world, the university intranet needs to be connected to the (capital I) Internet.
When that university needs to share data with a different university on the west coast, the two universities can link their respective intranets to create an extranet. Figure 1-2 shows how the east and west coast universities form an extranet.
Figure 1-2: Intranets link to form an extranet.
450604-fg0102.epsAn extranet consists of as many intranets as you need in order to communicate with your partners.
Introducing Virtual Private Networks
A Virtual Private Network, or VPN (v-p-n
), is a private network that runs over public facilities, such as the Internet. Although it may seem like a contradiction to run a private network over the (very) public Internet, it works. In the olden days of computers (which is often six months ago, but we’re talking as long as five years ago), if you wanted to work away from your office, you usually used a very slow modem to dial in across your phone line to the office computer. This method was slow and not secure because bad people could steal the data you were sending and receiving across the telephone lines.
Nowadays, most telecommuters connect to their offices through VPNs. They let you work as though you’re on-site when you’re not. You run VPN client software to establish a secure connection over the Internet to your organization’s network. It’s just like being in the office.
A VPN
Is safe and secure because it scrambles (encrypts) data before sending it over the public lines
Uses special tunneling and security protocols on the public network
See the section about the IPSec, PPTP, and L2TP protocols in Chapter 22 for more information.
Saves money for a large organization’s networks because sharing the public Internet is cheaper than leasing private telecommunication lines
Connects both intranets and extranets
Tip.eps The extranet shown earlier, in Figure 1-2, is also a VPN.
Exploring Geographically Based Networks
Whether you’re sending e-mail or browsing the Web, your data gets broken up into small pieces called packets. In other words, your data is packetized
before it goes onto a network. Packets of data travel over many different kinds of geographical distances, ranging from local to global and beyond to space. TCP/IP doesn’t care about earthly distance — just that your data gets where it’s going. In this section, get ready for a lot of jargon-y terms that look a lot alike. If you aren’t interested in network architecture, feel free to skip this section and save your brain from getting muddled.
Networks connected by wires and cables
Networks come in different shapes and sizes. Two main architectures for networks — LANs (Local Area Networks) and WANs (Wide Area Networks) — are usually based on these factors:
The distance the network covers
Architecture and connection media
Speed
Purpose
(For example, does the network connect a city, a campus, or just a bunch of storage devices?)
Exploring LANs
Pronounce LAN as a word — lan
(rhymes with pan
). The computers and other devices in a LAN communicate over small geographical areas, such as these:
Your home office — or even the whole house
One wing of one floor in a building
Maybe the entire floor, if it’s a small building
Several buildings on a small campus
Incorporating WANs
Imagine a company that has several buildings in different towns and provinces, or even in different countries. Does that mean that all the people who work in the company can’t be on the same network because a LAN is limited by distance? Of course not. The Internet is worldwide and beyond, so you can even bounce data off satellites in outer space, to create a WAN.
A WAN (wan
) spans geographical distances that are too large for LANs. Figure 1-3 shows two LANs connected to form a WAN.
Wireless networks
You don’t need cables and wires to connect the computers that comprise a network. You can go wireless, and cables can be expensive. (Air, a wireless connection media, is free — at least for now.) Just as cabled LANs and WANs exist, wireless LANs (WLANs) and wireless WANs (WWANS) also exist.
You pronounce WLAN as the letter w followed by the word LAN: double-you-lan.
Pronounce WWAN as the letter w followed by the word WAN: (double-you wan
).
Although the following network technologies differ, your packets of data can fly through the air faster than Superwoman:
WLAN: Uses radio waves to connect computers and networks. It shows up in homes, cafés, malls — even whole cities.
WWAN: WWANs are based on telecommunications (mobile cellular networks) and use Worldwide Interoperability for Microwave Access (WiMAX) technology. A WWAN lets anyone with a computer work anywhere within a mobile phone network.
The geography of TCP/IP
TCP/IP fits everywhere. Regardless of your geographical network technology, in the end it’s TCP/IP that carries your data, such as e-mail or Web pages, to you.
Figure 1-3: A special piece of hardware converts two LANs into a WAN.
450604-fg0103.epsChapter 2
Layering TCP/IP Protocols
In This Chapter
Taking a quick look at some network hardware
Examining the TCP/IP layered approach
Watching packets munch through the TCP/IP layers
Discovering that TCP/IP consists of much more than just two protocols
Investigating the major protocols and services that make up TCP/IP
If you already read Chapter 1, you know that a protocol is the set of agreed-on practices, policies, and procedures used for communication. In this book, we look at TCP/IP as the protocol set for communication between two or more computers. Remember that TCP/IP is a large suite of components that work together. In this chapter, we first describe the layered TCP/IP organization and then the protocols themselves.
TCP/IP technology is designed to allow all parts of your network to work together, regardless of which suppliers you bought them from. To make your network parts cooperate, TCP/IP divides network functions (for example, sending data or connecting different computer hardware) into layers and defines how those layers should interact.
Taking a Timeout for Hardware
There’s no point in having software if you have no hardware on which to run it. Although TCP/IP protocols are software, we need to discuss network connection media and Ethernet — the most widely used local-area network (LAN) technology on the Internet. Talking about software without occasionally mentioning hardware is almost impossible, so we mention Ethernet in the following sections of this chapter and in other chapters in this book.
Starting with network connection media
Suppose that you want to connect all your networked devices — computers, printers, mobile phone, television, and game system — on your home network. Connection media and devices include much more than cables and wires. You can connect devices by using wireless access points, fiber optics, microwaves, infrared signals, and signals beamed to and from satellites.
The most important connection device is the network interface card (or NIC, also known as a network adapter or a network card). This computer circuit board (or card, for short) lets your computer be connected to a network by cables or air. The NIC converts data into electrical signals. Most computers come with a NIC, either wireless or wired or both, already installed inside the case. The NIC’s manufacturer hardcodes on every NIC a unique hardware address known as the Media Access Control (MAC). Some protocols access this address. Figure 2-1 shows an example of a NIC with its MAC highlighted. Your card may look a little different, but all NICs function exactly the same.
Figure 2-1: Every NIC has a unique MAC address.
450604-fg0201.epsColliding with Ethernet
Ethernet is by far the most widely used LAN technology. (See the nearby sidebar, How fast can Ethernet go?
) Ethernet hardware ranges from fat, orange cables to plain old air. Ethernet allows any device on a network, from a giant corporate database server to the cash register in the local delicatessen, to send and receive packetized data.
How fast can Ethernet go?
The IEEE defines different kinds of Ethernet, depending on the connection media and the speed at which Ethernet moves the network data. In an Ethernet LAN, devices connect to the bus, not to each other. When the first edition of this book was written, Ethernet transmitted 1 gigabit (1 billion bits) of data across the network per second. That’s equal to 125 megabytes. Fast, huh? Ethernet can now move data at 10 gigabits per second. If you do the math, you see lots of zeros. Wait — there’s more! An IEEE group working on faster Ethernet is developing standards for 40 gigabits per second and 100 gigabits per second.
Ethernet uses the Carrier Sense Multiple Access/Collision Detection (CSMA/CD) technique. This very long name has a simple meaning: When a network device realizes that a packet collision has occurred, it knows when to wait and retry. With Ethernet, the data from the small deli’s cash register is just as important as anything that the headquarters’ big server has to send. All devices on the network are equal. You see in Figure 2-2 a basic LAN connected by Ethernet. Each device on the network, including the printer, has a NIC and TCP/IP software running.
Figure 2-2: Ethernet watches for collisions in a very small LAN.
450604-fg0202.epsStacking the TCP/IP Layers
TCP/IP software organizes the protocols in layers so that five layers are stacked up in the TCP/IP model. We love desserts and snacks, so we like to describe TCP/IP as a five-layer cake. Figure 2-3 gives you an idea of how the layers are structured.
Figure 2-3: Check out these yummy
layers.
Technically, the five layers in the cake
comprise a stack, and the protocols that sit in these layers comprise a protocol stack.
Each layer of the stack depends on the layers below it; that is, each layer services the layer above or below it. When two computers communicate, each computer has its own set of layers. When you send a message to another computer on the network, your information starts at the top layer of your computer, travels down all the layers to the bottom of the stack, and then jumps to the other computer. When your information arrives on the other computer, it starts at the bottom layer and moves up the stack to the application in the top layer.
Each layer has a special function: The lower layers are hardware oriented, and the highest layer provides user services, such as e-mail, file transfers, and general network monitoring. Look at Figure 2-4 to see how data moves through these layers.
In the following sections, we examine each layer, starting with Layer 1, at the bottom of the cake.
How many TCP/IP stacks exist?
The answer is only one, yet many.
Or, It depends.
Only one set of standards exists for a TCP/IP stack. Those standards come from RFCs, described in Chapter 1. On the other hand, the protocols, services, and applications are software programs. Somebody has to write the programs to implement TCP/IP software. And — oh, boy! — are there ever a lot of somebodies. A TCP/IP stack usually is supplied with your computer. If you buy a computer that runs a version of Microsoft Windows, a team of Microsoft programmers most likely wrote the programs that make your computer’s stack run. If your computer is a Mac, Apple Computer programmers wrote the stack. It doesn’t matter who wrote the TCP/IP stack. What’s important is that the programs work the way they’re supposed to, according to the RFCs.
Most Linux and Unix operating systems (and there are so many) have built-in TCP/IP protocol stacks.
If you don’t like the way your stack is programmed, you can swap in another stack. Even better, you can download and swap in a free stack, or just part of a stack, from the Internet. If you search for the phrase free software TCP/IP at www.google.com, you see a long list of TCP/IP programs.
Figure 2-4: Data travels up and down through each layer.
450604-fg0204.epsLayer 1: The physical layer
The physical layer at the bottom of the stack is pure hardware, including the cable or satellite (or other) connection medium and the network interface card. This layer is where electrical signals move around (and we try not to think too hard about how it works). Protocols in the two bottom hardware layers aren’t part of the TCP/IP stack. The physical layer transforms data into bits that move across the network media. The protocols in the physical layer include protocols related to cables, or to air, in the case of wireless. The physical layer also has protocols for connection methods.
Layer 2: The data link layer
This layer is another one that we don’t want to strain our brains trying to figure out — again, hardware is involved. This layer splits data into packets to be sent across the connection medium, and then wiring, such as Ethernet or token ring, gets involved. The data link layer moves data up through the higher layers for transportation across networks and through tunnels to Virtual Private Networks (VPNs).
The data link layer also includes protocols that work with your Media Access Control (MAC) address and your network interface card (NIC).
Remember.eps A MAC address is a hardwired special address on your NIC. Every NIC has a unique MAC address.
For example, after the information is on the wire (or in the air, in the case of wireless), the data link layer handles any interference. If heavy sunspot activity occurs, the data link layer works hard to ensure that the interference doesn’t garble the electric signals.
Layer 3: The internet layer
The bottom two layers are hardware related, whereas TCP/IP is software. Layer 3 (sometimes called the network layer) is the first place where a TCP/IP protocol fits into the networking equation: IP is this TCP/IP protocol. This layer receives packets from the data link layer (Layer 2) and sends them to the correct network address. If more than one possible route (or path) is available for the data to travel, the internet layer works out the best route. Without it, the data couldn’t reach the correct location. We explain the IP protocol, and others, in the later section Internet layer protocols.
Layer 4: The transport layer
Although the internet layer routes your information to its destination, it can’t guarantee that the packets holding your data will arrive in the correct order or won’t pick up any errors during transmission. That’s one of the transport layer’s jobs. TCP works at the transport layer to ensure that the packets have no errors and that all packets arrive and are reassembled in the correct order. Without this layer, you couldn’t trust your network. UDP also works at the transport layer and shares one function with TCP: to move your data up to the next layer. However, sometimes network services would rather be fast than correct, so UDP does no error checking on your packets, saving transport time. (We explain in more detail what TCP and UDP do in the section Transport layer protocols,
later in this chapter.)
Layer 5: The application layer
The TCP/IP protocols that sit on Layer 5 receive packets from the lower protocols, de-packetize them back into their original form, and let the various TCP/IP applications and services manage the data according to the original user request, such as, Please browse the Web.
Layer 5
Establishes and coordinates a session, which is a connection between two computers: Before two computers can transmit data between themselves, they must establish a session. The session announces that a transmission is about to occur and, at the end of it, determines whether the transmission was successful.
Works with operating systems to convert files from one format to another, if the server and client use different formats: Without file format conversion, file transfers could happen only between computers that have the same file format.
Sets up the environment so that applications can communicate with each other and with users: Requests for service and data start at the application layer and move down through the remaining four layers before going out across a network. The application layer is also where secure protocols for specific applications, such as Web browsing and e-mail, reside.
Chewing through Network Layers: A Packet’s Journey
TCP/IP slices your network message into packets (little bites) and sends them out to the network. When the packets arrive at their destination, TCP/IP reassembles them into your original message. We use the life span of a packet to explain the layers in the network model.
A packet’s life begins when an application creates it. Each packet then travels down the layers of the sending host (computer), across the network cables, up the layers of the destination host, and into the appropriate application.
As the packets travel down the layers of the sending host, headers containing control and formatting information and directions are added. When the packets reach the destination host, that information is read and stripped as the packets move upward through each layer. For example, if you FTP a file from Computer A to Computer B, the data in the file is packetized at the application layer and sent through all layers on Computer A. By the time the packets are sent out across the wire, they have gained some weight
(all that added network information). After the roly-poly packets reach the destination host, they start to slim down; when they arrive at the top layer and deposit your file, they’re positively svelte again.
Figure 2-5 shows a Web browser request that uses the Hypertext Transfer Protocol (HTTP) to start at the application layer. The packet travels from the application layer on Computer A (Sarah’s computer) onto the network and then up to the application layer on Computer B (Emily’s computer). You can see how the packet gains weight at each of Computer A’s layers and then goes on a diet (so to speak) as it moves up through computer B’s layers. Yo-yo dieting may be unhealthy for humans, but it works well for packets on the network.
The TCP/IP stack (or suite) is a large collection of protocols, named after the two original pieces: TCP and IP. You may say, A suite is too big. Can I just have the protocols I need?
Nope. (Sorry.) The protocols in the TCP/IP suite move the data from one layer to another and interact with each other. You can’t have a truly functional network by using just one of the TCP/IP protocols.
Figure 2-3, earlier in this chapter, shows the TCP/IP five-layer cake
with some protocols drawn on the individual layers. You don’t need every protocol on the stack to run a network application, but you need at least something from each layer in the stack. So, even though you may not use every protocol on each layer, you definitely need more than one.
Figure 2-5: Packets eat TCP/IP layer cake
on the network.
Now that you’ve gotten used to the idea that TCP/IP includes numerous protocols in its stack, you’re about to find out that TCP/IP is even more than the stack. TCP/IP also includes services and applications. The stack alone would be useless if there were no services and applications to take advantage of them. Most of these services and applications sit at the top layer of the TCP/IP cake,
and Parts III and IV of this book describe them in detail. The following section uses FTP as an example of a TCP/IP component that functions as protocol, service, and application.
Understanding TCP/IP: More than just protocols
Many pieces of the TCP/IP suite have multiple functions: protocols, applications, and services. As we talk about all the useful things you can do with TCP/IP, we let you know whether you’re using a TCP/IP protocol, a service, or an application — and highlight the places where the same name applies to one or more of these concepts.
The layered design of TCP/IP works the same way as a new cake recipe does. Suppose that you’re a pastry chef and you create a new recipe for the cake components — the layers, the frosting, and the decorations. If you decide that you want to change the frosting to chocolate, you can simply swap out the vanilla recipe — no problem. You don’t have to change the layers or the decorations. At the same time, you’re thinking about using a new serving plate to show off your fabulous cake. When your cake is done baking, you serve your clients (friends and customers, for example), and they happily consume the result of your tasty baking service.
The layered design of TCP resembles baking a cake: You can easily add new components. If you’re a programmer who dreams up a new network service (such as applying the frosting) and then you design the client and server 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 level of simplicity is a key advantage of TCP/IP.
Determining whether your network has a protocol, an application, or a service
In a network, you find the protocol/application/service relationship so tightly bound together that you might have difficulty determining what’s what. We use the File Transfer Protocol, or FTP, as an example. It’s not only a protocol — it’s also a service and an application. (Don’t worry about FTP itself at this point — it’s just an example. If you need to find out how to use it, check out Chapter 18.) In the following list, we show you how the FTP service, application, and protocol work together to move files on the network:
FTP is a service for copying files: You connect to a remote computer running the FTP service, and you can then pull files from, or push files to, that computer.
Remember.eps Pull is a more technical term for download, and you may have already realized that push is a technical synonym for upload.
FTP is also an application for copying files: You run a client application on your local computer to contact the FTP server service on the remote computer. The client application is either FTP or your Web browser. The browser uses the FTP protocol behind the scenes for downloads. The server application is known as the file transfer protocol daemon, or FTPD. (The term