Publisher : Cisco Press Pub Date : December 03, 2004 ISBN : 1-58720-108-9 Pages : 432 Your first step into the world of TCP/IP No TCP/IP experience required Includes clear and easily und
Trang 1Publisher : Cisco Press Pub Date : December 03, 2004 ISBN : 1-58720-108-9 Pages : 432
Your first step into the world of TCP/IP
No TCP/IP experience required Includes clear and easily understood explanations Makes learning easy
Your first step to understanding TCP/IP begins here!
Learn TCP/IP basics Discover the power of TCP/IP components and subcomponents
Use hands-on activities to understand TCP/IP Benefit from examples that illustrate the power of TCP/IP Welcome to the world of TCP/IP!
TCP/IP is the world's de facto communications protocol It is the official protocol of the Internet and, consequently, has become the predominant communications protocol suite in many private networks and internetworks.
No TCP/IP experience needed!
TCP/IP First-Step explores TCP/IP concepts in a reader-friendly
manner that assumes no previous experience Learn about packetized data transfer, open networking, reference models, and standards bodies Understand the architecture of the TCP/IP protocol suite and learn about its components, functions, and
respective uses TCP/IP First-Step helps you understand TCP/IP's
role in the network.
Learn more about the First-Step Series at www.ciscopress.com/firststep.
Trang 2Publisher : Cisco Press Pub Date : December 03, 2004 ISBN : 1-58720-108-9 Pages : 432
Trang 6information storage and retrieval system, without written
permission from the publisher, except for the inclusion of briefquotations in a review
complete and as accurate as possible, but no warranty or
fitness is implied
The information is provided on an "as is" basis The authors,Cisco Press, and Cisco Systems, Inc shall have neither liabilitynor responsibility to any person or entity with respect to anyloss or damages arising from the information contained in thisbook or from the use of the discs or programs that may
Trang 7The opinions expressed in this book belong to the author andare not necessarily those of Cisco Systems, Inc
Trademark Acknowledgments
All terms mentioned in this book that are known to be
trademarks or service marks have been appropriately
capitalized Cisco Press or Cisco Systems, Inc cannot attest tothe accuracy of this information Use of a term in this bookshould not be regarded as affecting the validity of any
Trang 8For sales outside the U.S please contact: International Sales
Trang 9Feedback Information
At Cisco Press, our goal is to create in-depth technical books ofthe highest quality and value Each book is crafted with careand precision, undergoing rigorous development that involvesthe unique expertise of members from the professional
technical community
Readers' feedback is a natural continuation of this process Ifyou have any comments regarding how we could improve thequality of this book, or otherwise alter it to better suit yourneeds, you can contact us through email at
feedback@ciscopress.com Please make sure to include thebook title and ISBN in your message
Trang 10Luxembourg • Malaysia • Mexico • The Netherlands • New
Zealand • Norway • Peru • Philippines • Poland • Portugal •Puerto Rico • Romania • Russia • Saudi Arabia • Scotland •
Trang 11Sweden • Switzerland • Taiwan • Thailand • Turkey • Ukraine •United Kingdom • United States • Venezuela • Vietnam •
Study are service marks of Cisco Systems, Inc.; and Aironet,ASIST, BPX, Catalyst, CCDA, CCDP, CCIE, CCNA, CCNP, Cisco,the Cisco Certified Internetwork Expert logo, Cisco IOS, the
Cisco IOS logo, Cisco Press, Cisco Systems, Cisco Systems
Capital, the Cisco Systems logo, Empowering the Internet
Generation, Enterprise/Solver, EtherChannel, EtherSwitch, FastStep, GigaStack, Internet Quotient, IOS, IP/TV, iQ Expertise,the iQ logo, LightStream, MGX, MICA, the Networkers logo,
Network Registrar, Packet, PIX, Post-Routing, Pre-Routing,
RateMUX, Registrar, SlideCast, SMARTnet, Strata View Plus,Stratm, SwitchProbe, TeleRouter; TransPath, and VCO are
registered trademarks of Cisco Systems, Inc and/or its
affiliates in the U.S and certain other countries
All other trademarks mentioned in this document or Web siteare the property of their respective owners The use of the wordpartner does not imply a partnership relationship between Ciscoand any other company (0303R)
Printed in the USA
Dedications
I dedicate this book in memory of Veronika J (Sportack)
Swisher Thank you for being my sister
Trang 12I would also like to dedicate this book to my wife Karen, my sonAdam, and my daughters Jennifer and Jacqueline I don't knowhow I would have made it through the last year without you Ifever there was an ill-timed project, this was it Yet, your love,support, and patience helped me to persevere.
Trang 13Mark A Sportack has worked in the information technologyindustry for more than 20 years Mark's experience includeseverything from computer programming and systems analysis,
to running a national ISP network and hosting centers, to
managing the daily technical operations of small, medium, andlarge enterprises During his career, Mark has had the privilege
to lead large teams of technical personnel, set technical
direction and long-range plans, and manage multimillion-dollarcapital and expense budgets Mark is chief information officerfor Pitney Hardin, LLP
Mark has authored numerous books including IP Addressing Fundamentals and IP Routing Fundamentals for Cisco Press He has also written High Performance Networking Unleashed,
Networking Essentials Unleashed, and Windows NT Clustering Blueprints.
Mark holds an undergraduate degree from Montclair State
University and an M.B.A degree from Lehigh University
Trang 14Dr Ron Kovac is currently employed with the Center for
Information and Communication Sciences at Ball State
University in Muncie, Indiana as a full professor The Center
prepares graduate students in the field of telecommunications.Previous to this, Dr Kovac was the telecommunications
manager for the State of New York and an executive director for
a large computing center located on the east coast Dr Kovac'sprevious studies included electrical engineering and education
Dr Kovac has numerous publications and has consulted in boththe education and telecommunications field, speaks worldwide
on telecommunications issues, holds numerous certificationsincluding the CCNA, CCAI, and almost complete CCNP
David M Kurtiak is a principal engineer and manager of
Network Computing Services for Loral Skynet, where he leads ateam of technical professionals responsible for managing thecompany's IT and data network infrastructure Dave has morethan 17 years of experience in the IT and telecommunicationsindustry Prior to joining Loral Skynet, Dave was a senior datacommunications specialist for AT&T David is experienced in
many telecommunications technologies and is recognized as theresident expert in TCP/IP networking He specializes in end-to-
Trang 15performance tuning David has a and a bachelor's degree ininformation systems from the University of North Carolina atGreensboro
Trang 16typos Special thanks to my long-suffering friend and favoritetechnical editor, David Kurtiak Knob Creek beckons! Thanksalso to Ron Kovac and Henry Benjamin for their contributions astechnical editors
I'd also like to thank John Kane for continuing to watch over myauthoring career with Cisco Press, Christopher Cleveland, GrantMunroe, and everyone else at Cisco Press that helped to makethis book possible
Lastly, I'd like to thank Michael Simmons: my friend, fellow
long-distance commuter, and surrogate for this book's targetaudience
Trang 17TCP/IP is the language of the Internet As such, it has becomethe single-most widely used communications protocol ever Ithas literally revolutionized our world by enabling the Internet tobecome what it is today Yet, for all its success, it remains ashadowy mystery to all but a handful of computer geeks andnetwork nerds
I'll be the first to admit that TCP/IP is as complex and
mysterious a protocol suite as you could hope to find That's ashame because it doesn't need to be TCP/IP has a rich historyand offers many capabilities that the vast majority of today'sInternet users don't know about Although you could live a
lifetime without ever knowing about or using these features,you would also be missing out on quite a bit!
To my twisted way of thinking, the only way to truly understandthe Internet and learn how to use it to maximum advantagerequires that you first understand TCP/IP Armed with the
knowledge you gain from this book, you can take the first stepinto your future and become more than just another point-and-click Internet user
Trang 18My goal in writing this book was to help make TCP/IP as
understandable as possible for all people, not just computerscience majors or network engineers The Internet has becomeeverybody's most powerful tool yet so much of it is hidden
behind a graphical user interface It seemed only fair and fittingthat somebody should write a book for the nontechnical
Internet user community to help them harness more of the
power of the Internet
Trang 19If you use the Internet, or any other network that uses TCP/IP,you should read this book I intentionally stayed away fromtechnical jargon and used everyday analogies to help you
understand otherwise technical material However, TCP/IP issufficiently complex that many a fine IT engineer can benefitfrom the plain English explanations and illustrations in thisbook
Trang 20This book is organized into a logical, step-by-step approach tobuilding a comprehensive understanding of TCP/IP and the
Internet That approach is demonstrated for you in the followingoutline of the chapters:
TCP/IP can support virtually any type of application
anywhere around the world This chapter shows you justhow TCP/IP manages to successfully meet that challenge
Chapter 4 , " TCP/IP: The Networking Protocol That Changed the World" One of the hallmarks of success is
consistency over time TCP/IP achieves consistency by
having a carefully sequenced set of steps that it must
perform time after time This chapter shows you how
Trang 21to those sequenced steps that it needs to perform whensending and receiving your data
Part II ," Protocols: The Building Blocks of TCP/IP"
Chapter 5 , " Peeking Under the Covers" Whenever you
want to see how something was made, or really works, youneed to look beyond what's superficial and obvious In thischapter, you see what's under the hood of TCP/IP so thatyou can see the actual mechanisms that enable it to work
Chapter 6 , " Pushing the Envelope" All data sent across
the Internet or any other TCP/IP network is wrapped up in
an envelope (known more properly as a packet) and pushedthrough the network; however, to get to where it needs to
go, that envelope must have an address This chapter
introduces you to the seemingly arcane mathematics of theInternet's addressing system Don't worry: It's not that
bad!
Chapter 7 , " More Fun with IP Addresses" One
important trick that can be performed with IP addresses istaking a big block of them and breaking them down intomany smaller blocks That lets you take a block of
addresses designed for use on one network and use it toprovide unique addresses for many networks That concept,known as subnetting, is demystified for you in this chapter
Chapter 8 , " Guaranteed Delivery: Your Package Will Get Delivered…Eventually!" The notion of guaranteeing
the delivery of your data to a remote computer is
paramount in a TCP/IP network In this chapter, you learnhow TCP/IP actually does that In the process, you might besurprised to learn of a "gotcha" or two that lies hiding inwait
Trang 22Chapter 9 , " Best-Effort Delivery: It's Now or Never"
This chapter is all about a stripped-down, built-for-speedtransport mechanism built into TCP/IP You learn about thismechanism, UDP, how it is used, why it's important, andwhich of your favorite applications use it without you evenknowing it!
Part III ," Network Services: Making Your Network Easy
to Use"
Chapter 10 , " Special Delivery for Special Messages"
Not all messages sent across a TCP/IP network are sent byusers and their computers Sometimes, machines need tocommunicate and coordinate activities with each other Forsuch instances, there is a special delivery mechanism, ICMP.This chapter introduces you to ICMP and shows you how itworks and the role it plays in a TCP/IP network
Chapter 11 , " How Do I Get There from Here?" Ahh,
the universal question You will be pleased to know that
knowing how to get from Point A to Point B is quite the
mathematical science in a TCP/IP network That science isknown as routing, and in this chapter, you learn more abouthow your data actually finds its way to where you want it togo
Part IV ," User Services: Making the Most Use of Your
Network"
Chapter 12 , " Connecting to TCP/IP Networks" In this
chapter, things become a bit more real; you learn how toconnect to a TCP/IP network
Chapter 13 , " Smiling and Dialing" This chapter builds
upon the previous chapter by showing you that there is still
Trang 23Glossary The glossary is a tool that you can easily
reference as you come across key terms throughout thebook
Trang 24This book includes several features to help you master wirelesstopics Here's a summary of the elements that you'll find:
What You Will Learn Every chapter begins with a list of
objectives that are addressed in the chapter The objectivessummarize what you learn in the chapter
Key terms and glossary Throughout this book, you will
see key terms formatted with bold and italics These termsare particularly significant in wireless and networking So, ifyou find you aren't familiar with the term or at any pointneed a refresher, simply look up the term in the glossarytoward the end of the book to find a full definition
Chapter Summaries Every chapter concludes with a
comprehensive "Chapter Summary" that reviews chapterobjectives, ensuring complete coverage and discussing thechapter's relationship to future content
Chapter Review Questions Every chapter concludes with
"Chapter Review Questions" that test the basic ideas andconcepts covered in each chapter You can find the answersand explanations to the questions in Appendix A
Nontechie headings and explanations The headings and
text used throughout this book avoid the use of technicalterms when possible, focusing instead on words that
connote something about the underlying concepts
The illustrations in this book use the following icons for
networking devices and connections:
Trang 25[View full size image]
Trang 27of the Internet!
What You Will Learn
After reading this chapter, you should be able to answer thefollowing questions:
What is TCP/IP?
How are TCP/IP and the Internet related?
What are five critical communications functions that TCP/IPcan perform?
appreciation for TCP/IP, how it works, and why it's important
TCP/IP isn't just random characters left in the bottom of thebowl when you're finished with your alphabet soup; it just looksthat way! TCP / IP is a mouthful of an acronym that stands for
Transmission Control Protocol/Internet Protocol One look
at the full name and it's immediately obvious why you use theacronym instead Neither its full name nor its acronym do
TCP/IP any justice Both are uninformative and even a bit
Trang 28It's impossible to understate TCP/IP's value and significance.Without it, you literally wouldn't be able to access the Internet
or anything connected to it Think about it: no swapping MP3 orDivX files, no catching the latest news or stock quotes, no e-mail, no instant messages or online chat rooms…okay, so
maybe you could live without chat rooms! The point remains:Everything you do via the Internet would be impossible withoutTCP/IP A bunch of other private networks would be equally
unusable, too!
TCP/IP is a set of data communications mechanisms, embodied
in software, that let you use the Internet and countless otherprivate networks Each mechanismalso known as a protocolisdesigned to perform a specific function These protocols aredivided into two categories based on their function:
Internet Protocol (IP) suite
This extensive set of protocols forms the TCP/IP suite of
protocols TCP/IP enables different types of computers and
other devices to use networks to contact each other and shareinformation in a wide variety of ways including e-mail Networksand networking protocols existed before TCP/IP came along;they just didn't allow a network as powerful and universal asthe Internet to be built! That was the beauty of TCP/IP
Trang 29several gigabytes in size They include thousands of small filesdesigned to do just one specific task Separately, they are
almost worthless Together, they form a powerful and
comprehensive system that enables your computer to support aseemingly infinite variety of applications TCP/IP is just like
that: lots of little functions designed to do one specific task.Together, they enable your computer to support any type ofnetworked communications activity you'd care to do
Virtually every network-capable application in existence todayrelies on TCP/IP to function properly That's no small
accomplishment when you stop to think that today just aboutevery software application is network capable E-mail and webbrowsing are applications that obviously require a network tofunction The World Wide Web has permeated computing socompletely that it is difficult to say where the browser ends andthe operating system begins Consequently, even applicationssuch as word-processing software now have features that
require network connectivityand TCP/IPto work properly Tofurther complicate matters, TCP/IP also contains a number ofuseful applications that enable you to do things like transferfiles or log on to remote computers These are native to TCP/IPand are what's left of the earliest TCP/IP software utilities
Trang 30consists of representatives from various companies that have avested interest in the Internet and its technology base Eachrepresentative participates in developing proposed changes,analyzing the impact of each proposal, and voting on whether
to actually incorporate each change into the TCP/IP suite
Changes to the protocol suite requires consensus among all theparticipants in that forum This consensus-based approach
standards
The combination of TCP/IP's sheer size and the unconventionalway in which it is maintained make for a rather steep learningcurve for anyone trying to figure it out To best understand thisarcane subject, look at where it came from and trace its
evolution
Finding TCP/IP's Roots
Given the enormous success of the Internet and TCP/IP, it isironic that TCP/IP was intended for use in a small environment.Even more irony lies in the fact that TCP/IP wasn't even
designed! It emerged slowly over time, first appearing as
shareware created by computer engineers, scientists, and
researchers at different organizations as a way to communicateand collaborate on defense projects Despite such humble
origins, TCP/IP is now actually used more broadly than the
Internet
Trang 31The roots of TCP/IP are difficult to pin down due to the nature
of its piecemeal development, but one recognized milestone(sometimes called its "birth") occurred on January 1, 1983 Onthis date, approximately 400 computers connected to a networkcalled ARPAnet all started communicating with each other with
a collection of mechanisms known informally as TCP/IP
ARPAnet was a network sponsored by the U.S Department ofDefense (DoD) in support of its Advanced Research Projects Agency (ARPA) to facilitate the research and development ofmilitary and defense technologies This network interconnectedcomputers that were owned and operated by different
companies, government agencies, research bodies, and otherinstitutions, which all contributed to the ARPA's research anddevelopment efforts
These 400 computers also consisted of a wide variety of
different brands and models in a time when each hardware
manufacturer went out of its way to make sure that its productswere incompatible with anybody else's products This approach,
known as closed or proprietary architecture, was based on
the belief that it forced brand loyalty In a closed architecture, ifyou bought Brand X for your mainframe computer (this wasbefore the client/server revolution), you had to also buy BrandX's printers, workstations, disk and tape drives, and even wires!After you purchased those products you had to purchase
ongoing maintenance or product support from that
manufacturer Products made by different vendors quite simplyweren't designed to be interoperable
TCP/IP became a unifying element that enabled collaborationand interoperability across incompatible systems The benefits
of this approach proved so compelling as to literally
revolutionize networked computing and transform the DoD'slittle internetwork into the Internet!
Trang 32ARPAnet existed (in fact, it dated back to the 1960s) prior toJanuary 1, 1983, but lacked a single official mechanism for
communications Thus, the proprietary architectures of thatera's computer systems posed significant barriers to networkedcommunications The result was that some computers couldcommunicate with others, but that ability was far from
ubiquitous Some of the systems administrators who operatedthese disparate computers talked to each other and developedspecial-purpose programs One person might have, for
example, developed a small program that transferred data files.Another might have developed a program that enabled you tolog into a remote computer Somebody else might have
developed a utility that helped track how many machines yourdata was passing through before reaching its destination Thesefiles might have been developed informally, but they were
enormously useful Consequently, the programs were sharedthroughout ARPAnet
This informal and sometimes collaborative process of
developing utility software slowly built up the set of shared
mechanisms that ARPAnet used It actually took a couple ofdecades of piecemeal, consensus-based development for TCP/IP
to reach a critical mass in terms of features and functionality.After ARPAnet declared TCP/IP its official communications
Trang 33Commercialization of the Internet brought forth a frenzy of
activity, both technical and economic The first knee-jerk
reaction was akin to a 20th century gold rush Companies
rushed to establish connectivity and a website presence on theInternet Often, this rush was done with undue haste and
without thought of what said companies would do with that
connectivity or website
When the Internet fever subsided, rational thought once againwas possible Individual people learned how to use the Internet,and commercial enterprises learned what those individual
consumers wanted One stark fact became obvious: TCP/IP hadjust experienced a dramatic increase in its user base Not onlywas it now the de facto standard communications protocol forall connected residential users, but enterprises and
organizations also had to support it That meant many
businesses were using one protocol suite for communicatingacross their internal network and another (TCP/IP) to connect tothe Internet
It didn't take long for businesses to realize that TCP/IP could beused throughout their internal networks and could free themfrom the burden of supporting two different protocols In thismanner, TCP/IP literally became more popular than the
Internet
Trang 34One of TCP/IP's most basic yet critical functions is its preparation of application data for transmission across a network TCP/IP accepts data
of virtually any size from applications (typically in the form of a file) and chops it up into smaller, more manageable chunks These chunks are known as segments and the process of splitting files is known as
Trang 35TCP/IP is a communications protocol that fits in the middle of alarger set of mechanisms TCP/IP provides the linkage betweencommunicating software applications and a physical networkthat carries messages sent by computers to other computers ordevices In this regard, TCP/IP complements and extends thecapability of a physical network, but can't work without thatnetwork Although TCP/IP does blur across some boundaries, itactually fits between the application software, operating
system, and network or communications device such as a cablemodem or local-area network (LAN) To visualize this, see
Figure 1-1
Figure 1-1 TCP/IP Fits Between the Network and
Your Software
Figure 1-1 shows a logical model Logical models can be
Trang 36to think of them as a necessary sequence of events In this
particular model, if you want to communicate across the
Internet, you start with your application Say you are sending afile directly to a friend across the Internet The first thing you
do is pick an application that lets you do that
Fortunately, TCP/IP contains just such an application: It's calledthe File TransferProtocol (FTP) You supply FTP with thenecessary information, which is basically your friend's computeraddress and the file you want to send FTP needs to engage theoperating system to access your computer's physical resourcesincluding memory, CPU, and the peripheral device that connectsyour computer to the physical network
The preceding example shows how TCP/IP can blur the
traditional distinctions between types of software Even thoughTCP/IP is just a communications protocol, it also contains
numerous utilities or applications, such as FTP It's part
communications protocol and part application software
On the receiving end, your friend's computer performs the sameprocess, only in reverse The file comes through the network,where your operating system uses whatever physical resources
it must and ensures that TCP/IP gets the file via its own copy ofFTP Figure 1-2 illustrates this process
Figure 1-2 A Logical Perspective of Using TCP/IP
to Transfer a File to a Friend
Trang 37other
TCP/IP's mechanisms are designed to enable communicationsbetween any two or more machines connected to a networkregardless of the device type, who made them, or their physicalproximity to each other Bridging the gap between dissimilardevices is a phenomenally powerful concept: You have created
communicate!
Even more confusion is added when you remember that TCP/IPcontains quite a few simple applications that enable a user to
Trang 38on to remote computers Part IV, "User ServicesMaking theMost Use of Your Network," looks more closely at those utilities.Users who are familiar with such utilities might think of TCP/IP
as an application They'd have justification for thinking thatway! However, these utilities are just one small piece of thecomprehensive set of protocols that you know and love and callTCP/IP
Economically, too, TCP/IP has been a boon The concept of anopen mechanism that is not owned or controlled by any onecommercial organization has opened doors few people couldhave imagined possible For example, TCP/IP has become
widely accepted around the world simply because it becomesthe means by which different manufacturers' products can
interoperate with each other More importantly, TCP/IP brokenew ground by pioneering a new method for developing newtechnologies that anyone could manufacture Now, entities
trying to develop a new communications-based product or
technology can simply start with TCP/IP's openly published
specifications and focus on adding value based on that
preexisting set of capabilities More importantly, developingproducts around TCP/IP brings a tremendous base of users whocould easily integrate any new products based on that protocolsuite
TCP/IP's Top Five Critical Functions
By now you're probably anxious to get into what TCP/IP can dofor you Some of the applications that rely on TCP/IP (such asweb surfing and e-mail) have been discussed, but you haveseen how one set of mechanisms can so successfully support arich and diverse array of applications
The answer lies in determining the basic underlying capabilitiesany application requires to communicate At the risk of
Trang 392 Packet Merely having an address for a networked machine
isn't enough to permit communication You also need a
mechanism that allows you to send data to, and receivedata from, the machine with that address That mechanism
is called a packet Packets contain all the address
information that a TCP/IP network needs to enable two ormore devices to talk across a network
3 Segmentation and Reassembly The ability to chop up
application data into manageable pieces called segments is
crucial to communicating across a network These segmentsare then placed inside a packet for transmission across anetwork The machine receiving this stream of packets canextract the segments of data and restore the data to itsoriginal form
4 Resequencing TCP/IP also enables computers that receive
a series of related packets to put them back into the correctorder This ability is important because you can't guaranteethat packets will be received in the order they were sent.Networks are made of intelligent and autonomous devicesknown as routers, which decide where to send each
packet Their decisions can vary based on congestion andfailures discovered within the network The result is thatpackets are commonly received out of sequence!
5 Data Integrity Lastly, you can't always assume that what
you put on a network will get to its destination intact Forthat matter, you can't assume that it will get there at all!Lots of things can go wrong when data is traveling through
Trang 40TCP/IP can, of course, do many other things Thus, this list isnot comprehensive Instead, these five things form the basis forcommunicating Other features, including those that are part ofTCP/IP and those commercially developed around TCP/IP, buildupon this foundation
What It Can't Do
TCP/IP is not a proverbial silver bullet It offers tremendouscapabilities, but it does have its limitations Those limitationshave more to do with the intended scope of the protocol suitethan weaknesses Please consider all the "can't dos" in this
section as being by design rather than indicative of a flawedimplementation
First of all, TCP/IP is not an operating system (OS) An OS is
the software that runs on a computer and creates the
environment in which other applications can run The variousWindows platforms are examples of operating systems Wheninstalled, TCP/IP becomes an important extension of your
computer's operating system, but it does not replace it