computer networking

Download Computer Networking

Post on 14-Nov-2014




0 download

Embed Size (px)




  • 1. 02-068 FM pp4 6/14/02 5:13 PM Page i S E C O N D E D I T I O NComputer Networking A Top-Down Approach Featuring the Internet James F. KuroseUniversity of Massachusetts, Amherst Keith W. Ross Eurcom Institute

2. 02-068 FM pp4 6/14/02 5:13 PM Page ii Executive Editor Susan Hartman Sullivan Assistant Editor Galia Shokry Executive Marketing ManagerMichael Hirsch Production SupervisorKim Ellwood Production ServicesPre-Press Company, Inc. CompositionPre-Press Company, Inc. ArtPat Rossi Calkin and Pre-Press Company, Inc. Art DevelopmentJanet Theurer Text and Cover DesignJoyce Cosentino Wells Prepress and Manufacturing Caroline Fell Media Producer Jennifer Pelland Access the latest information about Addison-Wesley Computing titles from our World Wide Web site: programs and applications presented in this book have been included for their instructional value. They have been tested with care, but are not guaranteed for any particular purpose. The publisher does not offer any warranties or representations, nor does it accept any liabilities with respect to the programs or applications.Library of Congress Cataloging-in-Publication Data Kurose, James F Computer networking: a top-down approach featuring the Internet / James F. Kurose,Keith W. Ross.2nd ed.p. cm. Rosss name appears first on the earlier edition. Includes bibliographical references and index. ISBN 0-201-97699-4 1. Internet. 2. Computer networks I. Ross, Keith W., 1956- II. Title.TK5105.875.I57 K88 2002 004.67'8dc212002071100Copyright 2003 by Pearson Education, Inc.All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photo- copying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America.ISBN 0-201-97699-412345678910-CRW-04030201 3. 02-068 FM pp4 6/14/02 5:13 PM Page iii About the Authors Jim Kurose Jim Kurose is a professor of Computer Science at the University of Massachusetts, Amherst. He is the eight-time recipient of the Outstanding Teacher Award from the National Technological University, the recipient of the Outstanding Teacher Award from the College of Natural Science and Mathematics at the University of Massachusetts, and the recipient of the 1996 Outstanding Teaching Award of the Northeast Association of Graduate Schools. He has been the recipient of a GE Fellowship, an IBM Faculty Development Award, and a Lilly Teaching Fellowship. Dr. Kurose is a former Editor-In-Chief of the IEEE Transactions on Communications and of the IEEE/ACM Transactions on Networking. He is active in the program committees for IEEE Infocom, ACM SIGCOMM, and ACM SIGMETRICS. He holds a Ph.D. in Com- puter Science from Columbia University. Keith Ross Keith Ross is a professor in the Multimedia Communications Department at Eurcom Insti- tute. From 1985 through 1997 he was a Professor at the University of Pennsylvania where he held appointments in both the Department of Systems Engineering and the Wharton School of Business. In 1999, he co-founded the Internet startup Dr. Ross has published over 50 papers and written two books. He has served on editorial boards of five major journals, and has served on the program committees of major net- working conferences., including IEEE Infocom and ACM SIGCOMM. He has supervised more than ten Ph.D. theses. His research and teaching interests included multimedia networking, asynchronous learning, Web caching, streaming audio and video, and traffic modeling. He received his Ph.D. from the University of Michigan. iii 4. 02-068 FM pp4 6/14/02 5:13 PM Page iv 5. 02-068 FM pp4 6/14/02 5:13 PM Page v To Julie and our three precious onesChris, Charlie, and NinaJFKTo my wife, Vronique, and our trois petits pois, Ccile, Claire, and Katie KWR 6. 02-068 FM pp4 6/14/02 5:13 PM Page vi 7. 02-068 FM pp4 6/14/02 5:13 PM Page viiIn memory of Sajani and Subin Shrestha 8. 02-068 FM pp4 6/14/02 5:13 PM Page viii 9. 02-068 FM pp4 6/14/02 5:13 PM Page ix Preface Welcome to the second edition of Computer Networking: A Top-Down Approach Featuring the Internet. Since the publication of the first edition two years ago, our book has been adopted for use at hundreds of colleges and universities and used by tens of thousands of students and practitioners worldwide. Weve heard from many of these readers and have been overwhelmed by the positive response.We think one important reason for this success is that the book offers a fresh approach to computer networking instruction. Why is a fresh approach needed? In recent years we have witnessed two revolutionary changes in the field of network- ingchanges that are not reflected in the networking texts published in the 1980s and 1990s. First, the Internet has taken over computer networking. Any serious dis- cussion about computer networking today has to be done with the Internet in mind. Second, over the past ten years the biggest growth area has been in networking serv- ices and applications, which can be seen with the emergence of the Web, ubiquitous use of e-mail, audio and video streaming, Internet phone, instant messaging, peer- to-peer applications, and online commerce.Whats new in the second edition? Weve made changes in this second edition, but weve also kept unchanged what we believe (and the instructors and students who have used our book have confirmed) to be the most important aspects of this book: its top-down approach, its focus on the Internet, its attention to both principles and practice, and its accessible style and ap- proach toward learning about computer networking. This second edition has been updated to reflect the rapid changes in the field of networking over the last few years. It includes new and expanded material on peer-to-peer networking, content distribu- tion networks, mobility and mobile IP, wireless networks, BGP, multimedia network- ing, network security, and much more. The entire text and references have been updated based on changes in the field and feedback from readers of the first edition. Additional homework problems have also been added. This edition also features new lab exercises (including one exciting lab on video streaming using RTP and RTSP). Audience This textbook is for a first course on computer networking. It can be used in both com- puter science and electrical engineering departments. In terms of programming lan- guages, the book assumes only that the student has experience with C, C++, or Java. A student who has programmed only in C or C++ and not Java should not have any diffi- culty following the application programming material, even though this material is 10. 02-068 FM pp4 6/14/02 5:13 PM Page x x Preface presented in a Java context. Although this book is more precise and analytical than many other introductory computer networking texts, it rarely uses any mathematical concepts that are not taught in high school. We have made a deliberate effort to avoid using any advanced calculus, probability, or stochastic process concepts. The book is therefore appropriate for undergraduate courses and for first-year graduate courses. It should also be useful to practitioners in the telecommunications industry.What Is Unique about This Textbook? The subject of computer networking is enormously complex, involving many con- cepts, protocols, and technologies that are woven together in an intricate manner. To cope with this scope and complexity, many computer networking texts are often or- ganized around the layers of a network architecture. With a layered organization, students can see through the complexity of computer networkingthey learn about the distinct concepts and protocols in one part of the architecture while seeing the big picture of how all parts fit together. For example, many texts are organized around the seven-layer OSI architecture. From a pedagogical perspective our per- sonal experience has been that such a layered approach to teaching is indeed highly desirable. Nevertheless, we have found the traditional approach of teaching bottom- upthat is, from the physical layer towards the application layeris not the best approach for a modern course on computer networking.A Top-Down Approach Unlike the other computer networking texts, this text is organized in a top-down man- nerthat is, it begins at the application layer and works its way down toward the physical layer. The top-down approach has several important benefits. First, it places emphasis on the application layer, which has been the high growth area of com- puter networking. Indeed, many of the recent revolutions in computer networking including the Web, audio and video streaming, and content distributionhave taken place at the application layer. In preparing the first edition of this book, we believed that the application layer would remain the highest growth area in the field, both in terms of research and actual deployment. The intervening years have unquestionably shown this to be true! An early emphasis on application-layer issues differs from the approaches taken in most other texts, which have only a small (or nonexistent) amount of material on network applications, their requirements, application-layer paradigms (e.g., client/server), and the application programming interfaces.Second, our experience as instructors has been that teaching networking applica- tions near the beginning of the course is a powerful motivational tool. Students are thrilled to learn about how networking applications workapplications such as e- mail and the Web, which most students use on a daily basis. Once a student under- stands the applications, the student can then understand the network services needed 11. 02-068 FM pp4 6/14/02 5:13 PM Page xi Preface xi to support these applications. The student can then, in turn, examine the various ways in which such services