The Illustrated Network The Morgan Kaufmann Series in Networking Series Editor, David Clark, M.I.T. The Illustrated Network Computer Networks: A Systems Approach, Walter Goralski Fourth Edition Larry L. Peterson and Bruce S. Davie P2P Networking and Applications John Buford, Heather Yu, and Eng Lua Network Routing: Algorithms, Protocols, and Architectures Broadband Cable Access Networks: The HFC Deepankar Medhi and Karthikeyan Ramaswami Plant David Large and James Farmer Deploying IP and MPLS QoS for Multiservice Networks: Theory and Practice Technical, Commercial, and Regulatory John Evans and Clarence Filsfi ls Challenges of QoS: An Internet Service Model Perspective Traffi c Engineering and QoS Optimization of XiPeng Xiao Integrated Voice & Data Networks Gerald R. Ash MPLS: Next Steps Bruce S. Davie and Adrian Farrel IPv6 Core Protocols Implementation Qing Li, Tatuya Jinmei, and Keiichi Shima Wireless Networking Anurag Kumar, D. Manjunath, and Joy Kuri Smart Phone and Next-Generation Mobile Computing Bluetooth Application Programming with the Pei Zheng and Lionel Ni Java APIs, Essentials Edition Timothy J. Thompson, Paul J. Kline, and C Bala GMPLS: Architecture and Applications Kumar Adrian Farrel and Igor Bryskin Internet Multimedia Communications Using Network Security: A Practical Approach SIP Jan L. Harrington Rogelio Martinez Perea Content Networking: Architecture, Protocols, Information Assurance: Dependability and and Practice Security in Networked Systems Markus Hofmann and Leland R. Beaumont Yi Qian, James Joshi, David Tipper, and Prashant Network Algorithmics: An Interdisciplinary Krishnamurthy Approach to Designing Fast Networked Devices Network Simulation Experiments Manual, George Varghese Second Edition Network Recovery: Protection and Restoration Emad Aboelela of Optical, SONET-SDH, IP, and MPLS Network Analysis, Architecture, and Design, Jean Philippe Vasseur, Mario Pickavet, and Piet Third Edition Demeester James D. McCabe Routing, Flow, and Capacity Design in Wireless Communications & Networking: An Communication and Computer Networks Introduction Michał Pióro and Deepankar Medhi Vijay K. Garg Wireless Sensor Networks: An Information Ethernet Networking for the Small Offi ce and Processing Approach Professional Home Offi ce Feng Zhao and Leonidas Guibas Jan L. Harrington Communication Networking: An Analytical IPv6 Advanced Protocols Implementation Approach Qing Li, Tatuya Jinmei, and Keiichi Shima Anurag Kumar, D. Manjunath, and Joy Kuri The Internet and Its Protocols: A Comparative Multicast Communication: Protocols, Approach Programming, and Applications Adrian Farrel Ralph Wittmann and Martina Zitterbart Modern Cable Television Technology: Video, MPLS: Technology and Applications Voice, and Data Communications, 2e Bruce Davie and Yakov Rekhter Walter Ciciora, James Farmer, David Large, and High-Performance Communication Networks, Michael Adams Second Edition Bluetooth Application Programming with the Jean Walrand and Pravin Varaiya Java APIs Internetworking Multimedia C Bala Kumar, Paul J. Kline, and Timothy Jon Crowcroft, Mark Handley, and Ian Wakeman J. Thompson Understanding Networked Applications: A First Policy-Based Network Management: Solutions Course for the Next Generation David G. Messerschmitt John Strassner Integrated Management of Networked Systems: MPLS Network Management: MIBs, Tools, and Concepts, Architectures, and Their Operational Techniques Application Thomas D. Nadeau Heinz-Gerd Hegering, Sebastian Abeck, and Developing IP-Based Services: Solutions for Bernhard Neumair Service Providers and Vendors Virtual Private Networks: Making the Right Monique Morrow and Kateel Vijayananda Connection Telecommunications Law in the Internet Age Dennis Fowler Sharon K. Black Networked Applications: A Guide to the New Optical Networks: A Practical Perspective, Computing Infrastructure Second Edition David G. Messerschmitt Rajiv Ramaswami and Kumar N. Sivarajan Wide Area Network Design: Concepts and Tools Internet QoS: Architectures and Mechanisms for Optimization Zheng Wang Robert S. Cahn TCP/IP Sockets in Java: Practical Guide for Programmers For further information on these books and for a Michael J. Donahoo and Kenneth L. Calvert list of forthcoming titles, please visit our Web site TCP/IP Sockets in C: Practical Guide for at http://www.mkp.com. Programmers Kenneth L. Calvert and Michael J. Donahoo Thispageintentionallyleftblank The Illustrated Network How TCP/IP Works in a Modern Network Walter Goralski AMSTERDAM • BOSTON • HEIDELBERG • LONDON NEW YORK • OXFORD • PARIS • SAN DIEGO SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO Morgan Kaufmann is an imprint of Elsevier Morgan Kaufmann Publishers is an imprint of Elsevier. 30 Corporate Drive, Suite 400 Burlington, MA 01803 This book is printed on acid-free paper. ` Copyright © 2009 by Elsevier Inc. All rights reserved. Designations used by companies to distinguish their products are often claimed as trademarks or registered trademarks. In all instances in which Morgan Kaufmann Publishers is aware of a claim, the product names appear in initial capital or all capital letters. Readers, however, should contact the appropriate companies for more complete information regarding trademarks and registration. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, scanning, or otherwise, without prior written permission of the publisher. Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone: (+44) 1865 843830, fax: (+44) 1865 853333, e-mail: [email protected]. You may also complete your request on-line via the Elsevier homepage (http://elsevier.com), by selecting “Support & Contact” then “Copyright and Permission” and then “Obtaining Permissions.” Library of Congress Cataloging-in-Publication Data Goralski, Walter. The illustrated network: how TCP/IP works in a modern network/Walter Goralski. p. cm.—(The Morgan Kaufmann series in networking) Includes bibliographical references and index. ISBN 978-0-12-374541-5 (alk. paper) 1. TCP/IP (Computer network protocol) 2. Computer networks. I. Title. TK5105.585.G664 2008 004.6’2--dc22 2008046728 For information on all Morgan Kaufmann publications, visit our Website at www.mkp.com or www.books.elsevier.com Printed in the United States 08 09 10 11 12 10 9 8 7 6 5 4 3 2 1 Working together to grow libraries in developing countries www.elsevier.com | www.bookaid.org | www.sabre.org Contents Foreword ........................................................................................ xxi Preface ............................................................................................ xxiii About the Author ............................................................................ xxx PART I Networking Basics CHAPTER 1 Protocols and Layers ...................................................... 3 The Illustrated Network ....................................................... 7 Remote Access to Network Devices ................................ 8 File Transfer to a Router ................................................... 10 CLI and GUI ...................................................................... 11 Ethereal and Packet Capture ............................................ 12 First Explorations in Networking ..................................... 14 Protocols .............................................................................. 14 Standards and Organizations ............................................ 16 Request for Comment and the Internet Engineering Task Force ...................................................................... 18 Internet Administration ....................................................... 21 Layers ................................................................................... 22 Simple Networking .......................................................... 23 Protocol Layers ................................................................. 24 The TCP/IP Protocol Suite ................................................... 25 The TCP/IP Layers ............................................................. 26 Protocols and Interfaces ................................................... 27 Encapsulation ................................................................... 28 The Layers of TCP/IP ............................................................ 30 The Physical Layer ............................................................ 30 The Data Link Layer .......................................................... 32 The Network Layer ........................................................... 35 The Transport Layer .......................................................... 38 The Application Layer ....................................................... 41 Session Support ................................................................ 41 Internal Representation Conversion ................................ 41 Applications in TCP/IP ...................................................... 42 The TCP/IP Protocol Suite ................................................... 43 Questions for Readers ......................................................... 45 viii Contents CHAPTER 2 TCP/IP Protocols and Devices ...................................... 47 Protocol Stacks on the Illustrated Network ......................... 50 Layers, Protocols, Ports, and Sockets .................................... 51 The TCP/IP Protocol Stack ................................................... 54 The Client–Server Model ..................................................... 55 TCP/IP Layers and Client–Server ......................................... 55 The IP Layer ......................................................................... 57 The Transport Layer ............................................................. 58 Transmission Control Protocol ......................................... 58 User Datagram Protocol ................................................... 59 The Application Layer .......................................................... 59 Bridges, Routers, and Switches ............................................. 60 Segmenting LANs ............................................................. 61 Bridges ............................................................................. 63 Routers ............................................................................. 63 LAN Switches ................................................................... 64 Virtual LANs ...................................................................... 65 VLAN Frame Tagging ......................................................... 66 Questions for Readers .......................................................... 69 CHAPTER 3 Network Link Technologies ........................................... 71 Illustrated Network Connections ......................................... 74 Displaying Ethernet Traffi c ............................................... 74 Displaying SONET Links ................................................... 76 Displaying DSL Links ........................................................ 78 Displaying Wireless Links ................................................. 81 Frames and the Link Layer................................................ 83 The Data Link Layer ............................................................. 84 The Evolution of Ethernet .................................................... 86 Ethernet II and IEEE 802.3 Frames ................................... 88 MAC Addresses ................................................................. 89 The Evolution of DSL ........................................................... 90 PPP and DSL ..................................................................... 91 PPP Framing for Packets ................................................... 92 DSL Encapsulation ............................................................ 93 Forms of DSL .................................................................... 94 The Evolution of SONET ...................................................... 96 A Note about Network Errors .......................................... 96 Packet over SONET/SDH .................................................. 97 Wireless LANS and IEEE 802.11............................................ 98 Wi-Fi .................................................................................. 98 Contents ix IEEE 802.11 MAC Layer Protocol ..................................... 100 The IEEE 802.11 Frame ..................................................... 102 Questions for Readers .......................................................... 105 Part II Core Protocols CHAPTER 4 IPv4 and IPv6 Addressing .............................................. 109 IP Addressing ........................................................................ 112 The Network/Host Boundary .............................................. 117 The IPV4 Address .................................................................. 118 Private IPv4 Addresses ...................................................... 122 Understanding IPv4 Addresses ......................................... 122 The IPv6 Address .................................................................. 123 Features of IPv6 Addressing ............................................. 124 IPv6 Address Types and Notation ..................................... 125 IPv6 Address Prefi xes ....................................................... 126 Subnetting and Supernetting ............................................... 127 Subnetting in IPv4 ............................................................ 127 Subnetting Basics ............................................................. 128 CIDR and VLSM ................................................................ 131 IPV6 Addressing Details ........................................................ 135 IP Address Assignment ...................................................... 138 Questions for Readers .......................................................... 141 CHAPTER 5 Address Resolution Protocol......................................... 143 ARP and LANs ...................................................................... 146 ARP Packets ......................................................................... 153 Example ARP Operation ....................................................... 155 ARP Variations ...................................................................... 157 Proxy ARP ......................................................................... 157 Reverse ARP ..................................................................... 158 ARPs on WANs .................................................................. 158 ARP and IPv6 ....................................................................... 159 Neighbor Discovery Protocol .......................................... 160 ND Address Resolution ..................................................... 161 Questions for Readers .......................................................... 163 CHAPTER 6 IPv4 and IPv6 Headers .................................................... 165 Packet Headers and Addresses ............................................. 168 The IPv4 Packet Header ....................................................... 170 Fragmentation and IPv4 ....................................................... 172 Fragmentation and MTU .................................................. 175
Description: