Preface
Previous editions of COmDuter Networks And internets have received incrediblv
puter Networks And internets have received incredibly
...,
positive reviews; I especially thank readers who have taken the time to write to me
personallV' In addition to students who use the text in courses, networking professionals
.
have written to praise its clarity and describe how it helped them pass professional
certification exams. ManV enthusiastic comments have also actived about foreign
transla, enthusiastic comments have also actived about foreign
transla.
nons. rhe success is especially satisfying in a market glutted with networking books.
This book stands out because of its breadth of coverage, logical organization,
explana.
non of concepts, focus on the internet, and appeal to both professors and students.
In response to suggestions from readers and recent changes in networking, the new
edition has been completely reorganized, revised, and updated. Descriptions of older
technologies has been reduced or eliminated. Material on data communications, which
is becoming an essential staple of networking courses, has been expanded and placed in
e an essential staple of networking courses, has been expanded and placed in
Part 11 of the text. The networking chapters build on the data communication basics,
and describe both wired and wireless networking. In addition, to emphasize the new
802.11 wireless standards, the discussion of wireless includes cellular telephone
technologies because cellular systems currently offer data services and will soon be adopting
Internet protocols.
Recent discussions about networking courses have engendered a debate about the
bottom-up or top-down approach. In bottom-up, a student learns the lowest-level
details, and then learns how the next higher levels use the lower-levels to provide
expanded functionalitV' In toD-down, one starts with a high-level aDplication and only learns
y. In top-down, one starts with a high-level application and only learns
enough of the next lower layer to understand how the application can operate. This text
combines the best of each. The text begins with a discussion of network applications
and the communication paradigms that the internet offers. It allows students to
understand the facilities the internet Drovides to applications before studying the underlying
provides to applications before studying the underlying
technologies that implement the facilities. Following the discussion of applications, the
'
text presents networking in a logical manner so a reader understands how each new
technology builds on lower layer technologies.
&y builds on lower layer technologies.
The text is intended for upper-division undergraduates or beginning graduate
students, who have little or no background in networking. It does not use sophisticated
mathematics, nor does it assume a knowledge of operating systems. Instead, the text
defines conceDts clearlV, uses examples and figures to illustrate how the technology
pts clearly, uses examples and figures to illustrate how the technology
operates, and states results of analysis without providing mathematical proofs.
The text answers the basic question "how do computer networks and internets
operate?" in the broadest sense. It provides a comprehensive, self-contained tour
xx Preface
through all of networking that describes low-level details such as data transmission and
.if all of networking that describes low-level details such as data transmission and
..
wirinZ network technologies such as LANs and WANs, intemetworking protocols, and
o, network technologies such as LANs and WANs, intemetworking protocols, and
applications. It shows how protocols use the underlying hardware and how applications
use the protocol stack to provide functionality for users.
.
The text is divided into five parts. The first part focuses on uses of the internet
and network applications. It describes protocol layering, the client-server model of
inI
teraction, the socket API, and gives examples of application-layer protocols used in the
Internet.
The second part (Chapters 5--12) explains data communications and gives
back.
ground on both the underlying hardware and concepts such as modulation, multiplexing,
and channel coding. Chapters discuss transmission modes, and define terms such as
&. piers discuss transmission modes, and define terms such as
bandwidth and band. The final chapter in the second part presents access and
interconnection technologies used in the internet, and explains how each technology implements
&ies used in the internet, and explains how each technology implements
concepts from previous chapters.
'
The third part (Chapters 13--19) focuses on packet switching and packet switching
'
technologies. Chapters give the motivation for using packets, introduce the IEEE model
.ies. Chapters give the motivation for using packets, introduce the IEEE model
for laver 2 Drotocols, and consider wired and wireless networking technologies. The
,or 2 protocols, and consider wired and wireless networking technologies. The
third part also introduces the four basic categoriest LAN, MAN, PAN, and WAN, and
part also introduces the four basic categories f LAN, MAN, PAN, and WAN, and
discusses routing in WANs. The final chapter Dresents examDles of network
technoloe in WANs. The final chapter presents examples of network
technolo..
gies that have been used in the internet.
The fourth part (Chapters 20--27) focuses on the internet protocols. After
discuss.
.
lug the motivation for internetworking, the text describes internet architecture, routers,
Internet addressing, address binding, and the TCP/IP protocol suite. Protocols such as
lP, TCP, UDP, ICMP, and ARP are reviewed in detail, allowing students to understand
how the concepts relate to practice. Chapter 26 on TCP covers the important and deep
.
topic of reliability in transport protocols.
The final part of the text (Chapters 28--32) considers topics that cross multiple
.
layers of a protocol stack, including network performance, network security, network
'
manaZement, bootstrapping, and multimedia supDort. In each case. the chanter draws
o, bootstrapping, and multimedia support. In each case, the chapter draws
on topics from previous parts of the text. The placement of these chapters at the end of
'
the text follows the approach of defining concepts before they are used, and does not
. 1
imply that the topics are less important.
The text is ideally suited for a one-semester introductorV course on networkinZ
J >nited for a one-semester introductory course on networking
taught at the junior or senior level. Designed for a comprehensive course, it covers the
.
entire subject from wiring to applications. I encourage instructors to engage students
J o to applications. I encourage instructors to engage students
with hands-on assiZnments. In the undergraduate course at Purdue, for example,
sin.nments. In the undergraduate course at Purdue, for example,
students are given weekly lab assignments that span a wide range of topics: from network
.
measurement and packet analysis to network programming. By the time they finish our
course, each student is expected to: know how an lP router uses a table to forward lp
poeted to: know how an lP router uses a table to forward lp
datagrams; describe how a datagram crosses the internet; identify and explain fields in
crams; describe how a datagram crosses the internet; identify and explain fields in
an Ethernet frame; know how TCP identifies a connection and whV a concurrent Web
J
server can handle multiple connections to port 80; compute the length of a single bit as
pie connections to port 80; compute the length of a single bit as
Preface xxi
..
it travels across a gigabit Ethernet; explain why TCP is classified as end-to-end; and
&igabit Ethernet; explain why TCP is classified as end-to-end; and
know whV DSL can send data over wires that are also beinZ used for an analoZ
teled DSL can send data over wires that are also being used for an analog
telephone call.
The Zoal of a sinZle course is breadth. not depth -- to cover the subiect, one
cane .ie course is breadth, not depth -- to cover the subject, one
cannot focus on a few technologies or a few concepts. Thus, the key to a successful course
.ies or a few concepts. Thus, the key to a successful course
lies in maintaining a ouick Dace. To cover the most imDortant topics in a semester. the
b a quick pace. To cover the most important topics in a semester, the
lower-laver material in Part 2 can be condensed, and the sections on networks and
interJ
networking can be allocated four weeks each, leaving two weeks for the introductory
&, leaving two weeks for the introductory
material on applications and topics such as network management and security. The
depplications and topics such as network management and security. The
details of socket programming can be covered in programming exercises.
.
Instructors should impress on students the impoftance of concepts and principles:
press on students the importance of concepts and principles:
specific technologies may become obsolete in a few years, but the principles will
. r,'..
remain. In addition, instructors should give students a feeling for the excitement that
pervades networking.
Although no single topic is challenging, students may find the quantity of material
.if no single topic is challenging, students may find the quantity of material
daunting. In pafticular, students are faced with a plethora of new terms. Networking
a. In pafticular, students are faced with a plethora of new terms. Networking
,.
acronyms and iargon can be especially confusing; students spend much of the time
J Jargon can be especially confusing; students spend much of the time
becominZ accustomed to using proper terms. In classes at Purdue, we have found that a
o accustomed to using proper terms. In classes at Purdue, we have found that a
weekly vocabularV quiz helps students to learn terminology as the semester Droceeds.
J J luiz helps students to learn terminology as the semester proceeds.
Because programming and experimentation are crucial to helping students learn
programming and experimentation are crucial to helping students learn
about networks, hands-on experience is an essential part of any networking courset' At
.
Purdue, we begin the semester by having students construct client software to access the
Web and extract data (e.g., write a program to print the current temperature). Appendix
l is extremelV helpful in getting started f the appendix explains a simplified API. The
, nelpful in getting started f the appendix explains a simplified API. The
API, which is available on the web site, allows students to write working code before
5
they learn about Drotocols. addresses, sockets, or the (somewhat tedious) socket API.
J learn about protocols, addresses, sockets, or the (somewhat tedious) socket API.
Later in the semester, of course, students learn socket programming. Eventually, they
are able to write a concurrent web server (support for server-side scripting is optional,
but most students complete it). In addition to application programming, students use
our lab facilities to capture packets from a live network, write programs that decode
'
packet headers (e.g., Ethernet, lP, and TCP), and observe TCP connections. If
advanced lab facilities are not available, students can experiment with free software, such
as Ethereal.
Giving students access to a network builds enthusiasm and encourages
experimen.
tation -- our experience shows that students who have access to a live network
understand and appreciate the subject better. Thus, if a dedicated packet analyzer is not
available, an analyzer can be created by installing appropriate shareware software on a
standard PC.
The web site for the text contains materials that make teaching easier and help
readers understand the material. For students without access to networking facilities,
the web site contains examples of packet traces; students can write programs that read a
trace and process packets as if they have been captured from the network. For
instrucI
tors, the web site contains course materials, figures from the text that can be used in
tA lab manual, Hands-On Networking, is available that describes possible experiments and assignments
that can be performed on a variety of hardware, including a single computer or a set of computers on a local
area network.
.. o, ac
xxii Preface
.,
presentations, and animated figures that help cledfy the concepts. The site also contains
materials not in the text, including photographs of network wiring and equipment as
well as files of data that can be used as input to student Droiects. The web site is:
put to student projects. The web site is:
httO://www. netbook. cs. DUrdue. edu
p://www. netbook. cs. purdue. edu
I thank all the people who have contributed to this edition of the book. Fred Baker
and Dave Oran at Cisco suggested topics of importance. Lami Kaya suggested the
overall reorganization, helped formulate the content of the data communications
chapters, reviewed the text, and made many other valuable suggestions. Lami has
agreed to manage the web site. Special thanks go to my wife and partner, Christine,
whose careful editing and helpful suggestions made many improvements throughout.
e and helpful suggestions made many improvements throughout.
Doualas E. Comer
.las E. Comer
March, 2008
Preface xxiii
About The Author
Dr. Douglas Comer is an internationallV recoZnized exDert on TCP/IP
Dro.ias Comer is an internationally recognized expert on TCP/IP
protocols, computer networking, and the internet. One of the researchers who
contributed to the internet as it was being formed in the late 1970s and 1980s, he
, n' r
was a member of the internet Architecture Board, the group responsible for
guiding the internet's development. He was also chairman of the CSNET
technical committee, a member of the CSNET executive committee, and
chairman of DARPA's Distributed Systems Architecture Board.
J
Comer has consulted for industrV on the design of computer networks. In
J an of computer networks. In
addition to giving talks in US universities, each year Comer lectures to
academ.iving talks in US universities, each year Comer lectures to
academ. 1
ics and networking professionals around the world. Comer's operating system,
b professionals around the world. Comer's operating system,
Xinu, and implementation of TCP/IP protocols (both documented in his
text'
books), have been used in commercial products.
Comer is a Distinguished Professor of Computer Science at Purdue
Univer.uished Professor of Computer Science at Purdue
Univer.,
sity. He is currently on leave from Purdue, serving as VP of Research
Collaboration at Cisco Systems. RecentlV, Comer has taught courses on networking,
J items. Recently, Comer has taught courses on networking,
. I
Internetworking, computer architecture. and operatinZ sVstems. He has
e, puter architecture, and operating systems. He has
developed innovative labs that provide students with the opportunity to gain
t provide students with the opportunity to gain
hands-on experience with operating systems, networks, and protocols. In
addi.
.
non to writing a series of best-selling technical books that have been tfanslated
o a series of best-selling technical books that have been translated
..
into sixteen languages, he served as the North American editor of the journal
o
Software -- Practice and Experience for twenty years. Comer is a Fellow of
the ACM.
Additional information can be found an
,,',,
www.cs.purdue.edu/people/comer
Enthusiastic Comments About
Computer Networks And internets
"The book is one of the best that I have ever read. Thank von."
y on.
Gokhan Mutlu
Ege University, Turkey
"I just could not put it down before I finished it. It was simply superb."
split Y. Rain
wu
Regional Engineering College, India
"An excellent book for beginners and professionals alike -- well written,
comprehensive coverage, and easy to follow."
.
John Lin
Bell Labs
"The breadth is astonishing."
George Varghese
University of California at San Diego
y of California at San Diego
"it's tfulv the best book of its tVPe that I have ever seen. A huge vote of
y the best book of its type that I have ever seen. A huge vote of
thanks !"
Chez Ciechanowicz
Info. Security Group, University Of London
co. recuring GrouP, University Of London
"The miniature webserver in Appendix I is brilliant -- readers will get a big
thrill out Of it."
Dennis Brviow
ylow
Marauette University
4uette University
"Wow, what an excellent text book."
Jaffet A. Cordoba
Ujet A. Cordoba
Technical Writer
(continued on next page)
More Comments About
Computer Networks And internets
"The book's great!"
Peter Parry
J
C A Rirminahrsm
mouth Birmingham COllege, UK
"Wow, when I was studying for the CCNA exam, the clear explanations in this
book solved all the problems I had understanding the OSI model and TCP/IP
I b
data transfer. It opened my mind to the fascinating world of networks and
TCPflP."
c lomon Tan e
oolomon Tang
PCCW, HOng Kong
"An invaluable tool, particularly for programmers and computer scientists
desir. 1', 1,,'. n 1,,
lug a clear, broad-based understanding of computer networks."
Peter Chuks Obiefuna
J una
East Carolina University
"The textbook covers a lot of material, and the author makes the contents very
I
easV to read and understand, which is the biggest reason I like this book. It's
J, agest reason I like this book. It's
.
verV appropriate for a 3-credit class in that a lot of material can be covered.
J appropriate for a 3-credit class in that a lot of material can be covered.
The student's positive feedback shows they too appreciate using this
textbook."
Jie Hu
c.
oalnt Cloud State University
d
"Despite the plethora of acronyms that infest the discipline of networking, this
book is not intimidating. Comer is an excellent writer, who expands and
exs
plains the terminology. The text covers the entire scope of networking from
..
wires to the web. I find it outstanding."
o.
Jennifer SeitZer
her SeitZer
University of Dayton
- 7 Dayton
PART I
Introduction To
Networkina And
u And
Internet Applications
ppIications
An overview of networkina
9
.... - -.
~ ~ -. k
and the interface that
.. -.
application programs use
to communicate across
the Internet
Chapters
1 Introduction And Overview
ac f' a -..
2 Internet Trends
O I I. t N,.
2 Intorrtof Ac
o Internet Applications And Network
Proarammina
.ramming
4 Traditional Internet Applications
Chaptsr ContsntS
l'l Growth Of ComDuter Networking, 1
puter Networking, 1
l.2 WhV Networking Seems Complex, 2
J' e deems Complex, 2
l.3 The Five KeV AsDects Of Networking, 2
y Aspects Of Networking, 2
l.4 Public And Private Parts Of The internet, 6
l.5 Networks, Interoperability, And Standards, 8
1.6 Protocol Suites And LaVering Models, 9
Jenng Models, 9
l.7 How Data Passes Through Layers, 1 1
1.8 Headers And LaVers, 12
yers, 12
l.9 ISO and the OSI Seven LaVer Reference Model, 13
yer Reference Model, 13
l.10 The inside ScooD, 13
P, 13
l.11 Remainder Of The Text, 14
1.12 Summaal, 15
J, 13