1. Trang chủ
  2. » Công Nghệ Thông Tin

tcp-ip foundations (2004)

300 401 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 300
Dung lượng 6,81 MB

Nội dung

Foundations TCP/IP 4370.book Page i Friday, July 23, 2004 1:02 PM 4370.book Page ii Friday, July 23, 2004 1:02 PM San Francisco ◆ London Foundations TCP/IP Andrew G. Blank 4370.book Page iii Friday, July 23, 2004 1:02 PM Associate Publisher: Neil Edde Acquisitions Editor: Heather O’Connor Developmental Editor: Heather O’Connor Production Editor: Rachel Gunn Copyeditor: Anamary Ehlen Compositor: Craig Woods, Happenstance Type-O-Rama Graphic Illustrator: Tony Jonick, Rappid Rabbit Proofreaders: Laurie O'Connell, Nancy Riddiough Indexer: Lynnzee Elze Book Designer: Judy Fung Cover Design: Ingalls + Associates Cover Photo: Jerry Driendl, Taxi Copyright © 2004 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved. No part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to photo- copy, photograph, magnetic, or other record, without the prior agreement and written permission of the publisher. An earlier version of this book was published under the title TCP/IP JumpStart © 2002 SYBEX Inc. Library of Congress Card Number: 2004109311 ISBN: 0-7821-4370-9 SYBEX and the SYBEX logo are either registered trademarks or trademarks of SYBEX Inc. in the United States and/or other countries. Screen reproductions produced with Collage Complete and FullShot 99. FullShot 99 © 1991–1999 Inbit Incorporated. All rights reserved. FullShot is a trademark of Inbit Incorporated. Collage Complete is a trademark of Inner Media Inc. TRADEMARKS: SYBEX has attempted throughout this book to distinguish proprietary trademarks from descriptive terms by fol- lowing the capitalization style used by the manufacturer. The author and publisher have made their best efforts to prepare this book, and the content is based upon final release software whenever possible. Portions of the manuscript may be based upon pre-release versions supplied by software manufacturer(s). The author and the publisher make no representation or warranties of any kind with regard to the completeness or accuracy of the con- tents herein and accept no liability of any kind including but not limited to performance, merchantability, fitness for any particular purpose, or any losses or damages of any kind caused or alleged to be caused directly or indirectly from this book. Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 4370.book Page iv Friday, July 23, 2004 1:02 PM To my inspiration, my encourager, my perfect match, my best friend, and the love of my life, my wife, Suzie, you have had a profound and awesome impact on my life. I love you very much. To my son, A.J. and my daughter, Amber, I treasure your love and have tremendous pride in both of you; Daddy loves you so much. 4370.book Page v Friday, July 23, 2004 1:02 PM Acknowledgments Several people have assisted me in many ways while writing this book. I’d like to acknowledge their contribu- tions and offer my sincere appreciation. I appreciate several devoted people at Sybex. I have had the privilege of working closely with some very talented people, especially Rachel Gunn and Heather O’Connor. Anamary Ehlen did an exceptional job of editing my garbled-up thoughts into complete sentences. Many thanks to Sybex production department, including proof- readers Laurie O'Connell and Nancy Riddiough, indexer Lynnzee Elze, and compositor Craig Woods at Hap- penstance Type-O-Rama, who diligently turned text into print. I applaud the imagination and creativity of Tony Jonick in turning my sketches into illustrations. What an awesome honor to work with all of you! I’d like to acknowledge the encouragement and prayers of my family and friends. All things are possible! 4370.book Page vi Friday, July 23, 2004 1:02 PM Contents Introduction xiii Chapter 1 The Origin of TCP/IP and the Internet 1 What Is TCP/IP? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Features of TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 The Origins of the Internet: ARPAnet . . . . . . . . . . . . . . . . 3 ARPAnet’s Requirements . . . . . . . . . . . . . . . . . . . . . . . 4 Requests For Comments . . . . . . . . . . . . . . . . . . . . . . . . . . 5 The Birth of TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Design Goals of TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Moving Data across the Network . . . . . . . . . . . . . . . . . . . 7 Moving Data on a Circuit-Switched Network . . . . . . . . 8 Moving Data on a Packet-Switched Network . . . . . . . . 8 Why Use TCP/IP? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Chapter 2 Protocols 13 What Are Protocols? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Protocols Move Packets of Data . . . . . . . . . . . . . . . . . 15 Why We Need Protocols and Standards . . . . . . . . . . . . . . 17 The OSI Reference Model . . . . . . . . . . . . . . . . . . . . . . . . 18 The Seven Layers of the OSI Model . . . . . . . . . . . . . . . 19 Responsibilities of Each Layer . . . . . . . . . . . . . . . . . . . 19 How the OSI Model Is Used . . . . . . . . . . . . . . . . . . . . 23 TCP/IP and the DoD Model . . . . . . . . . . . . . . . . . . . . . . . 24 Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Chapter 3 The Network Interface and Internet Layers 27 The Network Interface Layer . . . . . . . . . . . . . . . . . . . . . . 28 Hardware Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 The Internet Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Internet Protocol (IP) . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Address Resolution Protocol (ARP) . . . . . . . . . . . . . . . 35 Internet Control Message Protocol (ICMP) . . . . . . . . . 38 Internet Group Management Protocol (IGMP) . . . . . . 40 Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4370.book Page vii Friday, July 23, 2004 1:02 PM viii Contents Chapter 4 The Transport Layer 45 Understanding the Transport Layer . . . . . . . . . . . . . . . . . 46 Understanding Transmission Control Protocol . . . . . . . . . 47 Using a Three-Way Handshake . . . . . . . . . . . . . . . . . . 48 Organizing Data and Guaranteeing Delivery . . . . . . . . 49 Understanding User Datagram Protocol . . . . . . . . . . . . . . 49 UDP Communication . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Chapter 5 The Application Layer 55 Understanding the Application Layer . . . . . . . . . . . . . . . . 56 Understanding Ports and Sockets . . . . . . . . . . . . . . . . . . . 56 Well-Known Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 File Transfer Protocol (FTP) . . . . . . . . . . . . . . . . . . . . . . . 58 How FTP Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Hypertext Transfer Protocol (HTTP) . . . . . . . . . . . . . . . . 60 Ports and Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Requesting a Service in the TCP/IP Stack . . . . . . . . . . . 62 The Firewall is Protecting the LAN . . . . . . . . . . . . . . . 63 Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Chapter 6 IP Addressing 67 What Is IP Addressing? . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Numbering Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Reviewing Binary and Decimal Numbering Systems . . 69 Converting Binary Numbers to Decimal . . . . . . . . . . . 70 Converting Decimal Numbers to Binary . . . . . . . . . . . 71 IP Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 IP Address Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Class A Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Class B Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Class C Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Class D Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Class E Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 IP Address Class Summary . . . . . . . . . . . . . . . . . . . . . . . . 82 Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Chapter 7 Addressing IP Hosts 85 Installing and Assigning IP Addresses . . . . . . . . . . . . . . . . 86 Manual IP Address Configuration . . . . . . . . . . . . . . . . 86 4370.book Page viii Friday, July 23, 2004 1:02 PM Contents ix Installing TCP/IP on Windows XP and 2003 . . . . . . . . 86 Installing TCP/IP on Windows 2000 . . . . . . . . . . . . . . 90 Installing TCP/IP on Windows NT . . . . . . . . . . . . . . . 93 Installing TCP/IP on Windows 95/98 . . . . . . . . . . . . . 96 Dynamic Host Configuration Protocol (DHCP) . . . . . 99 Obtaining an IP Address from a DHCP Server . . . . . . . . 100 DHCP Discover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 DHCP Offer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 DHCP Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 DHCP Acknowledgment . . . . . . . . . . . . . . . . . . . . . . 105 DHCP Leases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 DHCP IP Address Renewal . . . . . . . . . . . . . . . . . . . . 109 Reserving DHCP IP Addresses . . . . . . . . . . . . . . . . . . . . 110 Setting the Lease Duration . . . . . . . . . . . . . . . . . . . . . . . 110 Setting DHCP Scopes and Options . . . . . . . . . . . . . . . . . 111 Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Chapter 8 Introduction to Subnet Masks 115 What Is a Subnet Mask? . . . . . . . . . . . . . . . . . . . . . . . . 116 Network and Host . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Identifying a Local or Remote Network . . . . . . . . . . 119 Standard Subnet Masks . . . . . . . . . . . . . . . . . . . . . . . . . 122 Class A Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Class B Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Class C Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Chapter 9 Using Custom Subnet Masks 127 Custom Subnet Masks . . . . . . . . . . . . . . . . . . . . . . . . . . 128 Creating Additional Networks . . . . . . . . . . . . . . . . . 130 Subnetting Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Creating a Custom Subnet Mask . . . . . . . . . . . . . . . . 131 Class A Subnet Masks . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Class B Subnet Masks . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Class C Subnet Masks . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Chapter 10 Supernetting and CIDR 155 IP Address Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Limitations of the Classful System . . . . . . . . . . . . . . . 156 The Trouble with Class B . . . . . . . . . . . . . . . . . . . . . 156 4370.book Page ix Friday, July 23, 2004 1:02 PM x Contents Supernetting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Classless Inter-Domain Routing (CIDR) . . . . . . . . . . . . . 161 Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Chapter 11 Name Resolution 165 Understanding Name Resolution . . . . . . . . . . . . . . . . . . 166 What Is Host Name Resolution? . . . . . . . . . . . . . . . . 167 What Is NetBIOS Name Resolution? . . . . . . . . . . . . . 167 NetBIOS Name Resolution vs. Host Name Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Understanding Host Name Resolution . . . . . . . . . . . . . . 169 Local Host (HOSTNAME) . . . . . . . . . . . . . . . . . . . . 170 The HOSTS file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Domain Name System (DNS) . . . . . . . . . . . . . . . . . . 174 NetBIOS Name Cache . . . . . . . . . . . . . . . . . . . . . . . . 174 Windows Internet Naming Service (WINS) . . . . . . . . 177 Broadcast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 The LMHOSTS file . . . . . . . . . . . . . . . . . . . . . . . . . . 179 The Host Name Resolution Cycle . . . . . . . . . . . . . . . 182 Understanding NetBIOS Name Resolution . . . . . . . . . . . 183 The NetBIOS Name Resolution Cycle . . . . . . . . . . . . 184 Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Chapter 12 Domain Name System (DNS) 189 What Is DNS? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 DNS on the Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Name Resolution Using DNS . . . . . . . . . . . . . . . . . . . . . 191 Querying a DNS Server . . . . . . . . . . . . . . . . . . . . . . . 192 Querying Name Servers . . . . . . . . . . . . . . . . . . . . . . . 193 Completing Resolution . . . . . . . . . . . . . . . . . . . . . . . 194 Understanding Recursive and Iterative Queries . . . . . 195 Maintaining a Database . . . . . . . . . . . . . . . . . . . . . . . 197 Maintaining a DNS Server . . . . . . . . . . . . . . . . . . . . . . . 197 Primary Name Server . . . . . . . . . . . . . . . . . . . . . . . . . 198 Secondary Name Server . . . . . . . . . . . . . . . . . . . . . . . 198 DNS Zone Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Caching-Only Server . . . . . . . . . . . . . . . . . . . . . . . . . 199 Record Types in DNS . . . . . . . . . . . . . . . . . . . . . . . . 200 Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 4370.book Page x Friday, July 23, 2004 1:02 PM [...]... continuing need for IT professionals to have a thorough understanding of this protocol suite TCP/IP Foundations assumes no prior knowledge of TCP/IP and provides a solid introduction to this core networking topic, explaining the fundamentals of TCP/IP in simple terms with tangible examples My goal with TCP/IP Foundations is to introduce you to TCP/IP concepts so that you’ll come away with an intermediate... Acronym Expansion Guide 257 258 259 259 260 263 Glossary 267 Index 275 Introduction When you’re learning any new topic or technology, it’s important to have all of the basics at your disposal The Sybex Foundations series provides the building blocks of specific technologies that help you establish yourself in IT TCP/IP is the de facto protocol of the Internet, and this protocol is supported by every... operating system–specific nor software-specific Concepts are presented so that you can gain an understanding of the topic without being tied to a particular platform Who Should Read This Book? TCP/IP Foundations is designed to teach the fundamentals of the TCP/IP protocol stack to people who are fairly new to the topic This book will be useful for: ◆ People interested in learning more about TCP/IP... you’re employed in (or even if you’re not employed in IT yet), TCP/IP is an important foundational topic that you must understand; TCP/IP is the current and future standard protocol for networking TCP/IP Foundations contains many drawings and charts that help create a comfortable learning environment It provides many real-world analogies that you will be able to relate to and through which the TCP/IP protocol... This Book custom subnet mask A nonstandard subnet mask used by a network administrator to make more efficient use of a network address by creating more subnets At the beginning of each chapter of TCP/IP Foundations, you’ll find a list of the topics I’ll cover within the chapter To help you soak up new material easily, I’ve highlighted new terms, such as custom subnet mask, in italics and defined them... continued to grow exponentially In 1990, the ARPAnet ceased to exist The Internet has since grown from ARPAnet’s roots, and TCP/IP has evolved to meet the changing requirements of the Internet TCP/IP Foundations Language Course NCP The Origin of TCP/IP and the Internet Design Goals of TCP/IP TCP/IP has evolved to its current state The protocols within the TCP/IP suite have been tested, modified, and . Foundations TCP/IP 4370.book Page i Friday, July 23, 2004 1:02 PM 4370.book Page ii Friday, July 23, 2004 1:02 PM San Francisco ◆ London Foundations TCP/IP . new topic or technology, it’s important to have all of the basics at your disposal. The Sybex Foundations series provides the building blocks of specific technologies that help you establish. continuing need for IT professionals to have a thorough understanding of this protocol suite. TCP/IP Foundations assumes no prior knowledge of TCP/IP and provides a solid introduction to this core

Ngày đăng: 26/10/2014, 21:28

TỪ KHÓA LIÊN QUAN