When the first edition of this book was published in 1996, it was a novelty to be able to order merchandise on'the Internet, and a company that advertised its domain name was considered cutting edge. Today, Internet commerce is a fact of life, and ".com" stocks have gone through an entire boom and bust cycle. A host of new technologies ranging from optical switches to wireless networks are now becoming mainstream. It seems theonly predictable thing about the Internet is constant change.
Despite these changes the question we asked in the first edition is just as valid today: What are the underlying concepts and technologies that make the Internet work? The answer is that much of the TCP/IP architecture continues to function iust as was envisioned by its creators nearly 30 years ago. This isn't to say that the Internet architecture is uninteresting, quite the contrary. Understanding the design principles that underlie an architecture that has not only survived but fostered the kind of growth and change that the Internet has seen over the past three decades is precisely the right place to start. Like the previous editions, the third edition makes the "why" of the Internet architecture its cornerstone.
Audience
Our intent is that the book should serve as the text for a comprehensive networking class, at either the graduate or upper-division undergraduate level. We also believe that the book's focus on core concepts should be appealing to industry professionals who are retraining for network-related assignments, as well as current network practitioners who want to understand the "whys" behind the protocols they work with every day and to see the big picture of networking.
It is our experience that both students and professionals learning about networks for the first time often have the impression that network protocols are some sort of edict handed down from on high, and that their job is to learn as many TLAs (three-letter acronyms) as possible. In fact, protocols are the building blocks of a complex system developed through the application of engineering design principles. Moreover, they are constantly being refined, extended, and replaced based on real-world experience. With this in mind, our goal with this book is to do more than survey the protocols in use today. Instead, we explain the underlying principles of sound network design. We feel that this grasp of underlying principles is the best tool for handling the rate of change in the networking field.
Changes in the Third Edition
Even though our focus is on the underlying principles of networking, we illustrate these principles using examples from today's working Internet. Therefore, we added a significant amount of new material to track many of the important recent advances in networking. We also deleted, reorganized, and changed the focus of existing material to reflect changes that have taken place over the past seven years.
Perhaps the most significant change we have noticed since writing the first edition is that almost every reader now has some familiarity with networked applications such as the World Wide Web and email. For this reason, we have increased the focus on applications, starting in the first chapter. We use applications as the motivation for the study of networking, and to derive a set of requirements that a useful network must meet if it is to support both current and future applications on a global scale. However, we retain the problem-solving approach of previous editions that starts with the problem of interconnecting hosts and works its way up the layers to conclude with a detailed examination of application-layer issues. We believe it is important to make the topics Covered in the book relevant by starting with applications and their needs. At the same time, we feel that higher-layer issues, such as application-layer and transportlayer protocols, are best understood after the basic problems of connecting hosts and switching packets have been explained.
Another important change in this edition is in the exercises. We have increased the number and quality of exercises; we have attempted to identify those that are especially difficult or that require above-average levels of mathematical knowledge (these are marked with an icon ★); and in each chapter we have added a number of exercises with worked solutions that are included in the book. As before, the complete set of exercise solutions is available only to instructors.
As we did in the second edition, we have added or increased coverage of important new topics and brought other topics up-to-date. Major new or substantially updated topics in this edition are
~ a new section on Multiprotocol Label Switching (MPLS), including coverage of traffic engineering and virtual private networks
~ a new section on overlay networks, including "peer-to-peer" networking and"content distribution networks"
~ greatly expanded coverage on protocols for multimedia applications, such as Session Initiation Protocol (SIP) and Session Description Protocol (SDP)
~ updated coverage of congestion-control mechanisms, including selective ac-knowledgments for TCP, equation-based congestion control, and explicit con-gestion notification
~ updated security coverage, including distributed denial of service (DDoS) at-tacks
~ updated material on wireless technology, including spread spectrum tech-niques and the emerging 802.11 standards
Finally, the book is now supplemented by a comprehensive set of laboratory exercises designed to illustrate the key concepts through simulation experiments. Sections that discuss material covered by the laboratory exercises are marked with the icon shown in the margin. Details on this new feature of the book appear below.
Approach
For an area that's as dynamic and changing as computer networks, the most important thing a textbook can offer is perspective--to distinguish between what's important and what's not, and between what's lasting and what's superficial. Based on our experience over the past 20 years doing research that has led to new networking technology, teaching undergraduate and graduate students about the latest trends in networking, and delivering advanced networking products to market, we have developed a perspective--which we call the systems approach--that forms the soul of this book. The systems approach has several implications:
~ Rather than accept existing artifacts as gospel, we start with first principles and walk you through the thought process that led to today's networks. This allows us to explain why networks look like they do. It is our experience that once you understand the underlying concepts, any new protocol that you are confronted with will be relatively easy to digest.
. ~ Although the material is loosely organized around the traditional network layers, starting at the bottom and moving up the protocol stack, we do not adopt a rigid layered approach. Many topics--congestion control and security are good examples--have implications up and down the hierarchy, and so we discuss them outside the traditional layered model. In short, we believe layering makes a good servant but a poor master; it's more often useful to take an end-to-end perspective.
~ Rather than explain how protocols work in the abstract, we use the most important protocols in use today--many of them from the TCP/IP Internet-to illustrate how networks work in practice. This allows us to include realworld experiences in the discussion.
~ Although at the lowest levels networks are constructed from commodity hardware that can be bought from computer vendors and communication services that can tSe leased from the phone company, it is the software that allows networks to provide new services and adapt quickly to changing circumstances. It is for this reason that we emphasize how network software is implemented, rather than stopping with a description of the abstract algorithms involved. We also include code segments taken from a working protocol stack to illustrate how you might implement certain protocols and algorithms.
~ Networks are constructed from many building-block pieces, and while it is necessary to be able to abstract away uninteresting elements when solving a particular problem, it is essential to understand how all the pieces fit together to form a functioning network. We therefore spend considerable time explaining the overall end-to-end behavior of networks, not just the individual components, so that it is possible to understand how a complete network operates, all the way from the application to the hardware.
~ The systems approach implies doing experimental performance studies, and then using the data you gather both to quantitatively analyze various design options and to guide you in optimizing the implementation. This emphasis on empirical analysis pervades the book.
~ Networks are like other computer systems--for example, operating systems, processor architectures, distributed and parallel systems, and so on. They are all large and complex. To help manage this complexity, system builders often draw on a collection of design principles. We highlight these design principles as they are introduced throughout the book, illustrated, of course, with examples from computer networks.
Pedagogy and Features
The third edition retains several features that we encourage you to take advantage of:
~ Problem statements. At the start of each chapter, we describe a problem that identifies the next set of issues that must be addressed in the design of a network. This statement introduces and motivates the issues to be explored in the chapter.
~ Shaded sidebars. Throughout the text, shaded sidebars elaborate on the topic being discussed or introduce a related advanced topic. In many cases, these sidebars relate real-world anecdotes about networking.
~Highligbted paragraphs. These paragraphs summarize an important nugget of information that we want you to take away from the discussion, such as a widely applicable system design principle.
~ Real protocols. Even though the book's focus is on core concepts rather than existing protocol specifications, real protocols are used to illustrate most of the important ideas. As a result, the book can be used as a source of reference for many protocols. To help you find the descriptions of the protocols, each applicable section heading parenthetically identifies the protocols described in that section. For example, Section 5.2, which describes the principles of reliable end-to-end protocols, provides a detailed description of TCP, the canonical example of such a protocol.
~ Open issues. We conclude the main body of each chapter with an important issue that is currently being debated in the research community, the commercial world, or society as a whole. We have found that discussing these issues helps to make the subject of networking more relevant and exciting.
~Furtber reading. These highly selective lists appear at the end of each chapter. Each list generally contains the seminal papers on the topics just discussed. We strongly recommend that advanced readers (e.g., graduate students) study the papers in this reading list to supplement the material covered in the chapter.
Road Map and Course Use
The book is organized as follows:
~ Chapter 1 introduces the set of core ideas that are used throughout the rest of the text. Motivated by widespread applications, it discusses what goes into network architecture, and it defines the quantitative performance metrics that often drive network design.
~ Chapter 2 surveys a wide range of low-level network technologies, ranging from Ethernet to token ring to wireless. It also describes many of the issues that all data link protocols must address, including encoding, framing, and error detection.
~ Chapter 3 introduces the basic models of switched networks (datagrams versus virtual circuits) and describes one prevalent switching technology (ATM) in some detail. It also discusses the design of hardware-based switches.
~ Chapter 4 introduces internetworking and describes the key elements of the Internet Protocol (IP). A central question addressed in this chapter is how networks that scale to the size of the Internet are able to route packets.
~ Chapter 5 moves up to the transport level, describing both the Internet's Transmission Control Protocol (TCP) and Remote Procedure Call (RPC) used to build client/server applications in detail.
~ Chapter 6 discusses congestion control and resource allocation. The issues in this chapter cut across both the network level (Chapters 3 and 4) and the transport level (Chapter 5). Of particular note, this chapter describes how congestion control works in TCP, and it introduces the mechanisms used by both the Internet and ATM to provide quality of service.
~ Chapter 7 considers the data sent through a network. This includes the problems of both presentation formatting and data compression. The discussion of compression includes explanations of how MPEG video compression and MP3 audio compression work.
~ Chapter 8 discusses network security, ranging from an overview of cryptography protocols (DES, RSA, MD5), to protocols for security services (authentication, digital signature, message integrity), to complete security systems (privacy enhanced email, IPSEC). The chapter also discusses pragmatic issues like firewalls.
~ Chapter 9 describes a representative sample of network applications and the protocols they use, including traditional applications like email and the Web, multimedia applications such as IP telephony and video streaming, and overlay networks like peer-to-peer file sharing and content distribution networks.
For an undergraduate course, extra class time will most likely be needed to help students digest the introductory material in the first chapter, probably at the expense of the more advanced topics covered in Chapters 6 through 8. Chapter 9 then returns to the popular topic of network applications. In contrast, the instructor for a graduate course should be able to cover the first chapter in only a lecture or two--with students studying the material more carefully on their own-thereby freeing up additional class time to cover the last four chapters in depth. Both graduate and undergraduate classes will want to cover the core material contained in the middle four chapters (Chapters 2-5), although an undergraduate class might choose to skim the more advanced sections (e.g., Sections 2.2, 2.9, 3.4, and 4.4).
For those of you using the book in self-study, we believe that the topics we have selected cover the core of computer networking, and 'so we recommend that the book be read sequentially, from front to back. In addition, we have included a liberal supply of references to help you locate supplementary material that is relevant to your specific areas of interest, and we have included solutions to selected exercises.
The book takes a unique approach to the topic of congestion control by pulling all topics related to congestion control and resource allocation together in a single place--Chapter 6. We do this because the problem of congestion control cannot be solved at any one level, and we want you to consider the various design options at the same time. (This is consistent with our view that strict layering often obscures important design trade-offs.) A more traditional treatment of congestion control is possible, however, by studying Section 6.2 in the context of Chapter 3 and Section 6.3 in the context of Chapter 5.
Exercises Significant effort has gone into improving the exercises in both the second and third editions. In the second edition we greatly increased the number of problems and, based on class testing, dramatically improved their quality. In this edition, we added a few more exercises, but made two other important changes:
~ For those exercises that we feel are particularly challenging or require special knowledge not provided in the book (e.g., probability expertise), we have added an icon ★ to indicate the extra level of difficulty.
~ In each chapter we added some extra representative exercises for which worked solutions are provided in the back of the book. These exercises, marked √, are intended to provide some help in tackling the other exercises in the book.
The current sets of exercises are of several different styles:
~ Analytical exercises that ask the student to do simple algebraic calculations that demonstrate their understanding of fundamental relationships
~ Design questions that ask the student to propose and evaluate protocols for various circumstances
~ Hands-on questions that ask the student to write a few lines of code to test an idea or to experiment with an existing network utility
~ Library research questions that ask the student to learn more about a partic-ular topic
Also, as described in more detail below, socket-based programming assignments, as well as simulation labs, are available online. Supplemental Materials and Online Resources To assist instructors, we have prepared an instructor's manual that contains solutions to selected exercises. The manual is available from the publisher.
Additional support materials, including lecture slides, figures from the text, socket-based programming assignments, and sample exams and programming assignments are available through the Morgan Kaufmann Web site at http://www, mkp.oom (search for Computer Networks). We suggest that you visit the page for this book every few weeks, as we will be adding support materials and establishing links to networking-related sites on a regular basis.
And finally, new with the third edition, a set of laboratory experiments supple-ments the book. These labs, developed by Professor Emad Aboelela from the University of Massachusetts Dartmouth, use simulation to explore the behavior, scalability, and performance of protocols covered in the book. The simulations use the OPNET simu-lation tooiset, which is available for free to anyone using Computer Networks in their course. Call outs in the form of a test beaker icon (shown on this page) appear in the mar-gins throughout the text to draw attention to experiments found in the online lab manual. Acknowledgments This book would not have been possible without the help of many people. We would like to thank them for their efforts in improving the end result. Before we do so, however, we should mention that we have done our best to correct the mistakes that the reviewers have pointed out and to accurately describe the protocols and mechanisms that our colleagues have explained to us. We alone are responsible for any remaining errors. If you should find any of these, please send email to our publisher, Morgan Kaufmann, at netbugs@mkp.com, and we will endeavor to correct them in future printings of this book.
First, we would like to thank the many people who reviewed drafts of all or parts of the manuscript. In addition to those who reviewed prior editions, we wish to thank Carl Emberger, Isaac Ghansah, and Bobby Bhattacharjee for their thorough reviews. Thanks also to Peter Druschel, Limin Wang, Aki Nakao, Dave Oran, George Swallow, Peter Lei, and Michael Ramalho for their reviews of various sections. We also wish to thank all those who provided feedback and input to help us decide what to do in this edition: Chedley Aouriri, Peter Steenkiste, Esther A. Hughes, Ping-Tsai Chung, Doug Szajda, Mark Andersland, Leo Tam, C. P. Watkins, Brian L. Mark, Miguel A. Labrador, Gene Chase, Harry W. Tyrer, Robert Siegfried, Harlan B. Russell, John R. Black, Robert Y. Ling, Julia Johnson, Karen Collins, Clark Verbrugge, Monjy Rabemanantsoa, Kerry D. LaViolette, William Honig, Kevin Mills, Murat Demirer, J Rufinus, Manton Matthews, Errin W. Fulp, Wayne Daniel, Luiz DaSilva, Don Yates, Raouf Boules, Nick McKeown, Neil T. Spring, Kris Verma, Szuecs Laszlo, Ted Herman, Mark Sternhagen, Zongming Fei, Dulal C. Kar, Mingyan Liu, Ken Surendran, Rakesh Arya, Marlo J. Gonzalez, Annie Stanton, Tim Batten, and Paul Francis. Second, several members of the Network Systems Group at Princeton contributed ideas, examples, corrections, data, and code to this book. In particular, we would like to thank Andy Bavier, Tammo Spalink, Mike Wawrzoniak, Zuki Gottlieb, George Tzanetakis, and Chad Mynhier. As before, we want to thank the Defense Advanced Research Projects Agency, the National Science Foundation, Intel Corporation, and Cisco Systems, Inc. for supporting our networking research over the past several years.
Third, we would like to thank our series editor, David Clark, as well as all the people at Morgan Kaufmann who helped shepherd us through the book-writing process. A special thanks is due to our original sponsoring editor, Jennifer Mann; our editor for the third edition, Rick Adams; our developmental editor, Karyn Johnson; and our production manager, Simon Crump. The whole crew at MKP has been a delight to work with.