Sams Teach Yourself TCP/IP 24 Hours - Pdf 12

ptg7068940
www.it-ebooks.info
ptg7068940
800 East 96th Street, Indianapolis, Indiana, 46240 USA
Joe Casad
Sams Teach Yourself
24
in
Hours
TCP/IP
www.it-ebooks.info
ptg7068940
Sams Teach Yourself TCP/IP in 24 Hours
Copyright © 2012 by Pearson Education, Inc.
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or
transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without
written permission from the publisher. No patent liability is assumed with respect to the use of
the information contained herein. Although every precaution has been taken in the preparation of
this book, the publisher and author assume no responsibility for errors or omissions. Nor is any
liability assumed for damages resulting from the use of the information contained herein.
ISBN-13: 978-0-672-33571-6
ISBN-10: 0-672-33571-9
Library of Congress Cataloging-in-Publication Data
Casad, Joe, 1958-
Sams teach yourself TCP/IP in 24 hours / Joe Casad. — 5th ed.
p. cm.
ISBN 978-0-672-33571-6 (pbk. : alk. paper)
1. TCP/IP (Computer network protocol) I. Title. II. Title: Teach yourself TCP/IP in 24 hours.
TK5105.585.C37 2012
005.7’1376—dc23
2011032322

Project Editor
Andy Beaster
Copy Editor
Keith Cline
Indexer
Lisa Stumpf
Proofreader
Debbie Williams
Technical Editor
Jon Snader
Publishing
Coordinator
Olivia Basegio
Book Designer
Gary Adair
Compositor
Gloria Schurick
www.it-ebooks.info
ptg7068940
Contents at a Glance
Introduction 1
Part I: TCP/IP Basics
HOUR 1 What Is TCP/IP? 7
2 How TCP/IP Works 23
Part II: The TCP/IP Protocol System
HOUR 3 The Network Access Layer 37
4 The Internet Layer 51
5 Subnetting and CIDR 73
6 The Transport Layer 89
7 The Application Layer 113

Table of Contents
Introduction 1
Part I: TCP/IP Basics
HOUR 1: What Is TCP/IP? 7
Networks and Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
The Development of TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
TCP/IP Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Standards Organizations and RFCs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
HOUR 2: How TCP/IP Works
23
The TCP/IP Protocol System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
TCP/IP and the OSI Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Data Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
A Quick Look at TCP/IP Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Part II: The TCP/IP Protocol System
HOUR 3: The Network Access Layer 37
Protocols and Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
The Network Access Layer and the OSI Model . . . . . . . . . . . . . . . . . . . . . . . . . 39
Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Physical Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Anatomy of an Ethernet Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
HOUR 4: The Internet Layer
51
Addressing and Delivering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Internet Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Address Resolution Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Reverse ARP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Internet Control Message Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Other Internet Layer Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

149
Dial-Up Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Cable Broadband . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Digital Subscriber Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Wide Area Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Wireless Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Connectivity Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
vi
Teach Yourself TCP/IP in 24 Hours
www.it-ebooks.info
ptg7068940
HOUR 10: Name Resolution 177
What Is Name Resolution? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Name Resolution Using Hosts Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
DNS Name Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Registering a Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Name Server Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Dynamic DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
NetBIOS Name Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
HOUR 11:
TCP/IP Security 211
What Is a Firewall? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Attack Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
What Do Intruders Want? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Encryption and Secrecy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
HOUR 12: Configuration
255
Getting on the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
The Case for Server-Supplied IP Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
What Is DHCP? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

323
Telnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Berkeley Remote Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Secure Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Remote Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Network Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Simple Network Management Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Remote Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
HOUR 16: Classic Services
345
HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
Trivial File Transfer Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
File and Print Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Lightweight Directory Access Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
Part V: The Internet
HOUR 17: The Internet: A Closer Look 365
How the Internet Looks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
What Happens on the Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
URIs and URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
HOUR 18: HTTP, HTML, and the World Wide Web
375
What Is the World Wide Web? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Understanding HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Understanding HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Web Browsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
viii
Teach Yourself TCP/IP in 24 Hours

The Streaming Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
Multimedia Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Real-time Transport Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Transport Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Multimedia Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Podcasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
Voice over IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
Contents
ix
www.it-ebooks.info
ptg7068940
HOUR 23: Living in the Cloud 471
What Is the Cloud? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
The User’s Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
The IT Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
Future of Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
HOUR 24: Implementing a TCP/IP Network: 7 Days in the Life of a
Sys Admin 487
A Brief History of Hypothetical, Inc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
7 Days in the Life of Maurice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
APPENDIX A: Answers to Quizzes and Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 501
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515
x
Teach Yourself TCP/IP in 24 Hours
www.it-ebooks.info
ptg7068940
About the Author
Joe Casad is an engineer, author, and editor who has written widely on computer network-
ing and system administration. He has written or cowritten 12 books on computers and net-
working. He currently serves as editor in chief of Linux Pro Magazine and ADMIN Online. In a

author and editors who worked on the book.
E-mail:
Mail: Mark Taub
Editor-in-Chief
Sams Publishing
1330 Avenue of the Americas
New York, NY 10019 USA
Reader Services
Visit our website and register this book at informit.com/register for convenient access to any
updates, downloads, or errata that might be available for this book.
xiii
www.it-ebooks.info
ptg7068940
This page intentionally left blank
www.it-ebooks.info
ptg7068940
Introduction
Welcome to Sams Teach Yourself TCP/IP in 24 Hours, Fifth Edition. This book provides a clear
and concise introduction to TCP/IP for newcomers, and also for users who have worked with
TCP/IP but would like a little more of the inside story. Unlike other networking primers that
point and click around the hard topics, Sams Teach Yourself TCP/IP in 24 Hours takes you
down deep into the technology. You’ll learn about all the important protocols of the TCP/IP
suite, and you’ll get a close look at how the protocols of TCP/IP build the foundation for the
rich ecosystem of tools and services we know as the Internet. The fifth edition includes new
material on recent developments in TCP/IP and offers a closer look at topics such as DNS
security, IPv6, and cloud computing. You’ll find new information about configuration, REST
web services, and HTML5, as well as several new sections throughout the book on recent
developments in TCP/IP.
Does Each Chapter Take an Hour?
Each chapter is organized so that you can learn the concepts within 1 hour. The chapters are

.
Part V, “The Internet,” describes the world’s largest TCP/IP network. You learn about
the structure of the Internet. You also learn about HTTP, HTML, XML, email, and Inter-
net streaming, and you get a look at how web technologies are evolving to provide a
new generation of services.
.
Part VI, “TCP/IP at Work,” provides a memorable case study showing how the compo-
nents of TCP/IP interact in a real working environment.
The concepts in this book, like TCP/IP itself, are independent of any operating system and
descend from the standards defined in Internet Requests for Comment (RFCs).
How This Book Is Organized
Each hour in Sams Teach Yourself TCP/IP in 24 Hours, Fifth Edition, begins with a quick intro-
duction and a list of goals for the hour. You can also find the following elements.
Main Section
Each hour contains a main section that provides a clear and accessible discussion of the
hour’s topic. You’ll find figures and tables helping to explain the concepts described in the
text. Interspersed with the text are special notes labeled By the Way. These notes come with
definitions, descriptions, or warnings that help you build a better understanding of the
material.
By the Way
These boxes clarify a concept that is discussed in the text. A By the Way might
add some additional information or provide an example, but they typically aren’t
essential for a basic understanding of the subject. If you’re in a hurry, or if you
want to know only the bare essentials, you can bypass these sidebars.
www.it-ebooks.info
ptg7068940
Introduction
3
Q&A
Each hour ends with some questions designed to help you explore and test your understand-

.
Networks and network protocols
.
History of TCP/IP
.
Important features of TCP/IP
Transport Control Protocol/Internet Protocol (TCP/IP) is a protocol system—a
collection of protocols that supports network communications. The answer to the
question What is a protocol? must begin with the question What is a network?
This hour describes what a network is and shows why networks need protocols. You
also learn what TCP/IP is, what it does, and where it began.
At the completion of this hour, you’ll be able to
.
Define the term network
.
Explain what a network protocol suite is
.
Explain what TCP/IP is
.
Discuss the of TCP/IP
.
List some important features of TCP/IP
.
Identify the organizations that oversee TCP/IP and the Internet
.
Explain what RFCs are and where to find them
www.it-ebooks.info
ptg7068940
8
HOUR 1: What Is TCIP/IP?

through the destination computer’s network hardware and operating system to a
receiving application (see Figure 1.2).
www.it-ebooks.info
ptg7068940
Networks and Protocols
9
Application
Application
Layer
Transport Layer
Internet Layer
Network
Access Layer
Network
Protocol
Suite
Network
Hardware
Application
Application
Layer
Transport Layer
Internet Layer
Network
Access Layer
FIGURE 1.2
The role of a
network proto-
col suite.
The protocols of TCP/IP define the network communication process and, more

be provided. The vendor software implementations of TCP/IP actually provide
these services.
The Development of TCP/IP
TCP/IP’s design is a result of its historical role as the protocol system for what was to
become the Internet. The Internet, like so many other high-tech developments, grew
from research originally performed by the United States Department of Defense. In
the late 1960s, Defense Department officials began to notice that the military was
accumulating a large and diverse collection of computers. Some of those computers
weren’t networked, and others were grouped in small, closed networks with incom-
patible proprietary protocols.
Proprietary, in this case, means that the technology is controlled by a private entity
(such as a corporation). That entity might not have any interest in divulging enough
information about the protocol so that users can use it to connect to other (rival)
network protocols.
Defense officials began to wonder whether it would be possible for these disparate
computers to share information. These visionary soldiers created a network that
became known as ARPAnet, named for the Defense Department’s Advanced
Research Projects Agency (ARPA).
As this network began to take shape, a group of computer scientists, led by Robert E.
Kahn and Vinton Cerf, started to work on a versatile protocol system that would sup-
port a wide range of hardware and provide a resilient, redundant, and decentralized
system for delivering data on a massive, global scale. The result of this research was
the beginning of the TCP/IP protocol suite. When the National Science Foundation
wanted to build a network to connect research institutions, it adopted ARPAnet’s pro-
tocol system and began to build what we know as the Internet. University College of
London and other European research institutes contributed to the early development
of TCP/IP, and the first trans-Atlantic communications tests began around 1975. As
more and more universities and research institutions became gradually connected,
the Internet phenomenon began to spread around the world.
www.it-ebooks.info


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status