0   Preface

“No man but a blockhead ever wrote, except for money.” - Samuel Johnson

The textbook world is changing. On the one hand, open source software and creative-commons licensing have been great successes; on the other hand, unauthorized PDFs of popular textbooks are widely available, and it is time to consider flowing with rather than fighting the tide. Hence this open-access textbook, released for free under the Creative Commons license described below. Mene, mene, tekel pharsin.

Perhaps the last straw, for me, was patent 8195571 for a roundabout method to force students to purchase textbooks. (A simpler strategy might be to include the price of the book in the course.) At some point, faculty have to be advocates for their students rather than, well, Hirudinea.

This is not to say that I have anything against for-profit publishing. It is just that this particular book does not – and will not – belong to that category; the online edition will always be free. In this it is in good company: there is Wikipedia, there is an increasing number of other open online textbooks out there, and there is the entire open-source world. Although the open-source-software and open-textbook models are not completely parallel, they are quite similar.

The market inefficiencies of traditional publishing are sobering: the return to authors of advanced textbooks is usually modest. Costs to users are also quite high: both the direct cost of purchasing a book, and the lost-opportunity cost of not having access to a book. (None of this is meant to imply there will never be a print edition; when I started this project it seemed inconceivable that a print publisher would ever agree to having the online edition remain free, but times are changing.)

The book is updated multiple times per year (0.7   Recent Changes). This is another feature that paper publishing can’t touch.

The official book website is intronetworks.cs.luc.edu. The book is available there as online html, as a zipped archive of html files, in .pdf format, and in other formats as may prove useful.

Note that there are three html variants: the original, a version using a more universally available set of unicode characters, and a version better suited to smaller screens; see 0.5   Technical considerations below for more information.

0.1   Licensing

This text is released under the Creative Commons license Attribution-NonCommercial-NoDerivs. This text is like a conventional book, in other words, except that it is free. You may copy the work and distribute it to others for any noncommercial use, but all reuse requires attribution.

The Creative Commons license does not precisely spell out what constitutes “noncommercial” use. The author considers any sale of printed copies of this book, even by a non-profit organization and even if the price just covers expenses, to be commercial use. Personal printing, and free distribution of printed selections, do qualify as noncommercial.

Starting with Edition 1.9.16, commercial use is also explicitly allowed, provided that printed copies are not distributed. In other words, the text is also released under the terms of the Creative Commons license Attribution-NoDerivs, amended to include a prohibition on the distribution of printed copies. The Creative Commons license summary linked to here states that “you are free to share – copy and redistribute the material in any medium or format for any purpose, even commercially”; this license is amended by this paragraph to limit “any medium” to non-printed media. Permissible commercial uses may include, but are not limited to, use in internal training programs, use in for-profit training and educational programs, sale of the work in the electronic formats available here, and installation throughout the Amazon EC2.

The Attribution clause of the Creative Commons licenses [Section 4, (b) for by-nd or (c) for by-nc-nd] requires that redistributors of the work provide “… (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work”. That URI is intronetworks.cs.luc.edu.

Under the Creative Commons licenses, creation of derivative works requires permission. It is not entirely clear, however, what would be considered a derivative work, beyond the traditional examples of abridgment and translation. Any supplemental materials like exams, labs, slides or coverage of additional topics would be new, independent works, and would require no permission. Even the inclusion in such supplements of modest amounts of material from this book would have a strong claim to Fair Use. In the open-source software world, the right to make derivative works is exercised whenever the software is modified, but it is hard to see how this applies to textbook supplements. The bottom line is that if you have a situation you’re concerned about in this regard, let me know and I’ll probably be happy to grant permission.

Some of the chapters contain source code; this is licensed under the Apache 2.0 license. Some code files (those which are derivative works) contain an official Apache license statement; others do not.

0.2   Classroom Use

This book is meant as a serious and more-or-less thorough text for an introductory college or graduate course in computer networks, carefully researched, with consistent notation and style, and complete with diagrams and exercises. I have also tried to rethink the explanations of many protocols and algorithms, with the goal of making them easier to understand. My intent is to create a text that covers to a reasonable extent why the Internet is the way it is, to avoid the endless dreary focus on TLA’s (Three-Letter Acronyms), and to remain not too mathematical. For the last, I have avoided calculus, linear algebra, and, for that matter, quadratic terms (though some inequalities do sneak in at times). That said, the book includes a large number of back-of-the-envelope calculations – in settings as concrete as I could make them – illustrating various networking concepts.

Overall, I tried to find a happy medium between practical matters and underlying principles. My goal has been to create a book that is useful to a broad audience, including those interested in network management, in high-performance networking, in software development, or just in how the Internet is put together.

One of the best ways to gain insight into why a certain design choice was made is to look at a few alternative implementations. To that end, this book includes coverage of some topics one may never encounter in practice, but which may be useful as points of comparison. These topics arguably include ATM (3.5   Asynchronous Transfer Mode: ATM), SCTP (12.22.2   SCTP) and even 10 Mbps Ethernet (2.1   10-Mbps Classic Ethernet).

The book can also be used as a networks supplement or companion to other resources for a variety of other courses that overlap to some greater or lesser degree with networking. At Loyola, this book has been used – sometimes coupled with a second textbook – in courses in computer security, network management, telecommunications, and even introduction-to-computing courses for non-majors. Another possibility is an alternative or nontraditional presentation of networking itself. It is when used in concert with other works, in particular, that this book’s being free is of marked advantage.

Finally, I hope the book may also be useful as a reference work. To this end, I have attempted to ensure that the indexing and cross-referencing is sufficient to support the drop-in reader. Similarly, obscure or specialized notation is kept to a minimum.

Much is sometimes made, in the world of networking textbooks, about top-down versus bottom-up sequencing. This book is not really either, although the chapters are mostly numbered in bottom-up fashion. Instead, the first chapter provides a relatively complete overview of the LAN, IP and transport network layers (along with a few other things), allowing subsequent chapters to refer to all network layers without forward reference, and, more importantly, allowing the chapters to be covered in a variety of different orders. As a practical matter, when I use this text to teach Loyola’s Introduction to Computer Networks course, I cover the IP/routing and TCP material more or less in parallel.

A distinctive feature of the book is the extensive coverage of TCP: TCP dynamics, newer versions of TCP such as TCP Cubic and BBR TCP, and chapters on using the ns-2 simulator and the Mininet emulator. This has its roots in a longstanding goal to find better ways to present competition and congestion in the classroom. Another feature is the detailed chapter on queuing disciplines.

One thing this book makes little attempt to cover in detail is the application layer; the token example included is SNMP. While SNMP actually makes a pretty good example of a self-contained application, my recommendation to instructors who wish to cover more familiar examples is to combine this text with the appropriate application documentation.

Although the book is continuously updated, I try very hard to ensure that all editions are classroom-compatible. To this end, section renumbering is avoided to the extent practical, and existing exercises are never renumbered. This is an essential feature for a textbook that is often updated mid-semester, and a useful feature for any textbook that is updated at all. New exercises are regularly inserted, but with fractional (floating point) numbers. Existing integral exercise numbers have been given a trailing .0, to reduce confusion between exercise 12.0, say, and 12.5.

For those interested in using the book for a “traditional” networks course, I with some trepidation offer the following set of core material. In solidarity with those who prefer alternatives to a bottom-up ordering, I emphasize that this represents a set and not a sequence.

With some care in the topic-selection details, the above can be covered in one semester along with a survey of selected important network applications, or the basics of network programming, or the introductory configuration of switches and routers, or coverage of additional material from this book, or some other set of additional topics. Of course, non-traditional networks courses may focus on a quite different sets of topics.

Instructors who adopt this book in a course, as either a primary or a secondary text, are strongly encouraged to let me know, as this helps support continued work on the book. Below is a list of the institutions I’m aware of so far where the book has been adopted. Commercial publishers get this information from sales records, but that won’t work here; if you want to see your institution listed, contact me!

Eastern Washington University
Loyola University Maryland
Murray State University
Ohio University
SUNY Delhi
University of Arkansas Community College at Batesville
University of California, Santa Cruz
University of Maryland, University College
University of Texas at El Paso
University of the People
Wellington Institute of Technology

0.3   Acknowledgments

I would like to thank the many Loyola students who have provided invaluable feedback on the text and the exercises. The result, I hope, is greater clarity for both. I would also like to thank the following people from outside Loyola who have contributed technical or editorial comments. I’ve included institutional affiliation if I could figure it out. If I’ve missed anyone, or their institution, please let me know.

   
Anonymous  
Jose Alvarado University of the People
Eric Freudenthal University of Texas at El Paso
David Garfield  
Jeff Harrang  
Emmanuel Lochin Institut supérieur de l’aéronautique et de l’espace
Robert Michael  
Natale Patriciello Centre Tecnològic Telecomunicacions Catalunya
Herman Torjussen  
Alexander Wijesinha Towson University
Justin Yang  

Comments – from anyone – on clarity, completeness, consistency and correctness are much appreciated. Even single comments or corrections are very welcome, though I continue to seek reviewers willing to review an entire section or chapter. I can be contacted at pld AT cs.luc.edu, or via the book comment form.

Peter Dordal
Shabbona, Illinois


0.4   Progress Notes

This work was started in the summer of 2012. Edition 1.0 was declared complete as of March 2014; the current edition is 1.9.16.

The intronetworks.cs.luc.edu website carries both edition 1.0 and also the current 1.9.16 edition.

I expect to release Edition 2.0 in summer 2019. This will mostly involve breaking some of the longer chapters into two.

0.5   Technical considerations

The book was prepared in reStructuredText using the Linux Sphinx package, which can produce multiple formats from the same source. That said, the primary format is html. The table-of-contents sidebar and the text sidebars work best there. Most of the diagrams were drawn using LibreOffice Draw.

The book uses a modest set of unicode special characters. Unfortunately, some of these characters are not universally available in all browsers. The comma-separated characters in the first line, below, appear to have the most limited support.

⟨,⟩,≃,𝛼,𝛽,𝛾,𝜆,𝜙,𝜏,𝜌,𝚫,⏜,⟶,⟵,⟷
(,),≈,α,β,γ,λ,φ,τ,ρ,Δ,^,─→,←─,←→
µ,√,∞,≤,≥,×,÷,±,−,≠,→,←,─,│,┌,┐,└,┘,┬,┴,├,┤,┼

The characters above should look roughly as they do in the following image (the first line is the one most likely to fail):

_images/specialchars2.png

If they do not, there are two options for browser-based viewing. If the second and third rows above display successfully, there is a unicode-safer version of the book (both online and zipped) available at intronetworks.cs.luc.edu that has the characters in the first row above replaced by those in the second row.

The other alternative is to add an appropriate font. Generally Firefox and Internet Explorer display the necessary characters out of the box, but Chrome does not. The Chrome situation can usually be fixed, at least on “real” computers, by adding a font and then tweaking the Chrome font settings. I have had good luck with Symbola (at shapecatcher.com/unicodefonts.html and other places). To install the font, extract the .ttf file and double-click on it. Then to adjust Chrome, go to Settings → Show advanced settings → Customize fonts (button), and change at a minimum the default Sans-serif font to Symbola. Then restart Chrome.

Unfortunately, adding fonts to (non-rooted) Android devices continues to be very difficult. Worse, Android often fails to display even a box symbol “⎕” in the place of missing characters.

If no available browser properly displays the symbols above, I recommend the pdf format. The unicode-safer version, however, should work on most systems.

At some point I hope to figure out how to handle this font situation a little better using Javascript. This turns out, however, not to be straightforward, and progress has been slow.

The diagrams in the body of the text have now all been migrated to the vector-graphics .svg format, although a few diagrams rendered with line-drawing characters appear in the exercises. Most browsers now (2018) appear to support zooming in on .svg images, which is a significant step forward.

0.6   A Note On the Cover

_images/prefacecover.png

The photo is of mahogany leaves, presumably Swietenia mahagoni. The original image was taken by Homer Edward Price and placed at https://commons.wikimedia.org/wiki/File:Mahogany-leaves_(5606894105).gif under a Creative Commons license; the image as used here has been cropped.

I began with the idea that the cover should depict some networking reference from the natural world. The connection between mahogany and networking comes from Bertolt Brecht’s work The City of Mahagonny, “the city of nets”. Ok, “nets” in the sense of traps rather than communication, but close enough.

Alas, this turned out to be based on a misapprehension. As musicologist John Simon puts it [JS05],

Where did Brecht get the name for that lawless city that was his symbol for a capitalist society in distress? In coining the name Mahagonny, the opera’s Leokadja Begbick explains it as “the City of Nets”, i.e. traps. But the word “mahogany”, from which the name must stem, has nothing to do with nets.

It remains unclear just what “Mahagonny” did mean to Brecht.

After learning this, a picture of mahogany seemed to be out. But, as the book progressed, with more and more reading of papers and RFCs, I began to see the non-connection here as a symbol of diligent fact-checking. So there it is.

And besides, it’s green.


0.7   Recent Changes

August 28, 2018 (ver 1.9.13): fixed example in 5.4.1   Cyclical Redundancy Check: CRC.
August 16, 2018 (ver 1.9.12): technical changes.
August 15, 2018 (ver 1.9.11): Domain fronting (22.10.2.4.1   Domain Fronting), multiple other updates.
February 19, 2018 (ver 1.9.10): Expanded content on QUIC (12.22.4   QUIC Revisited).
January 5, 2018 (ver 1.9.9): Corrections to 15.5   Highspeed TCP, added 15.10   Compound TCP, 8.14   IPv6-to-IPv4 Connectivity and NAT64, updates to 20.6.1   A CDN Alternative to IntServ and 3.7   Wi-Fi, miscellaneous other updates.
October 27, 2017 (ver 1.9.8): multiple corrections to 15.16   TCP BBR; some updated exercises.
October 3, 2017 (ver 1.9.7): Added tbf and htb examples (18.8   Linux Traffic Control (tc)) to 18   Mininet; miscellaneous exercise updates, and more on CDNs (20.6.1   A CDN Alternative to IntServ).
September 4, 2017 (ver 1.9.6): Added a webserver example (18.3.1   Running a webserver) to 18   Mininet; updates to 7.8   DNS.
August 27, 2017 (ver 1.9.5): Expanded examples in the chapter on Mininet (18   Mininet)
July 27, 2017 (ver 1.9.4): Clarified the role of priority in 2.8.1   OpenFlow Switches.
July 22, 2017 (ver 1.9.3): Significant revisions to 2.8.2   Learning Switches in OpenFlow; other minor changes.
July 11, 2017 (ver 1.9.2): A section in the Mininet chapter on the Pox controller (18.9   OpenFlow and the POX Controller).
July 7, 2017 (ver 1.9.1): A new (partially completed) chapter on Mininet (18   Mininet).
Jan 27, 2017 (ver 1.9.0): New sections on SEND (8.6.4   Security and Neighbor Discovery), DCCP (11.1.2   DCCP), TLS programming (22.10.3   A TLS Programming Example), bufferbloat (14.8.1   Bufferbloat), CoDel (14.8.6   CoDel) and BBR TCP (15.16   TCP BBR). There is also added content in 3.7.5   Wi-Fi Security.
Oct 31, 2016 (ver 1.8.27): Introduction to TFTP (11.2   Trivial File Transport Protocol, TFTP) moved before 11.3   Fundamental Transport Issues; a minor adjustment to the TCP state diagram (12.7   TCP state diagram) for transitions out of FIN_WAIT_1.
Oct 3, 2016 (ver 1.8.26): minor changes to the text, but a significant and hopefully useful change to the way the table-of-contents sidebar works: expanding the sidebar puts the table of contents in the current viewport, and clicking on a contents link then collapses the sidebar.
Sept 27, 2016 (ver 1.8.25): several new exercises and other updates
Sept 16, 2016 (ver 1.8.24): Improved integration between the exercise sections and 24   Selected Solutions; additional corrections and clarifications to 3.7.1   Wi-Fi and Collisions, 2.4.1   Ethernet Learning Algorithm, and other places.
Aug 9, 2016 (ver 1.8.23): More corrections and clarifications to SNMP (21   Network Management and SNMP); more on IPv6 extension headers (8.5   IPv6 Extension Headers) and OpenFlow (2.8.1   OpenFlow Switches).
Jul 21, 2016 (ver 1.8.22): Corrections and clarifications to SNMP (21   Network Management and SNMP)
Jun 14, 2016 (ver 1.8.21): Added material on 2.8   Software-Defined Networking and 1.5.1   Traffic Engineering (also scattered about in other sections), and updates to 22   Security.
Apr 4, 2016 (ver 1.8.20): clarifications and new diagrams in 9   Routing-Update Algorithms.
Mar 30, 2016 (ver 1.8.19): miscellaneous updates, including to TCP RST processing in 12.3   TCP Connection Establishment.
Feb 29, 2016 (ver 1.8.18): Revisions to 8   IP version 6, including updates related to 8.2.1   Interface identifiers. All line drawings are now in .svg format.
Jan 20, 2016 (ver 1.8.17): New section on IPsec (22.11   IPsec), and other updates. Some diagrams are now in .svg format (eg in chapters 13   TCP Reno and Congestion Management and 22   Security). The .pdf version also takes advantage of the .svg format.
Dec 31, 2015 (ver 1.8.16): Updates to 10.6.8   BGP Relationships, 3.7.5   Wi-Fi Security, 6.2   Sliding Windows, and other miscellaneous changes.
Dec 3, 2015 (ver 1.8.15): Technical corrections to some exercises.
Nov 24, 2015 (ver 1.8.14): Multiple small updates and clarifications, including to several exercises.
Oct 18, 2015 (ver 1.8.13): Extensive revisions to 8   IP version 6.
Oct 14, 2015 (ver 1.8.12): Minor fixes and clarifications of some exercises.
Oct 11, 2015 (ver 1.8.11): Solutions to a few of the exercises (those marked with ♢) are now provided, in 24   Selected Solutions. Hopefully this section will continue to expand. There is a correction to 10.6.8.1   BGP No-Valley Theorem and a reorganization of the exposition; there are also several minor changes to 8   IP version 6.
Sep 9, 2015 (ver 1.8.10): Miscellaneous clarifications; a paragraph on classless routing in 1.10   IP - Internet Protocol.
Aug 16, 2015 (ver 1.8.09): Sections on 4.2.3   Optical Transport Network and 11.1.4   netcat; miscellaneous updates.
Jul 23, 2015 (ver 1.8.08): Multiple changes to 2   Ethernet and 3.7   Wi-Fi; other changes as well.
May 29, 2015 (ver 1.8.06): Section on RSA factoring (22.9.1.2   Factoring RSA Keys), fixed typos in 1.6   Routing Loops and 11.3   Fundamental Transport Issues.
May 24, 2015 (ver 1.8.05): Added discussion of the Logjam attack (22.8   Diffie-Hellman-Merkle Exchange).
May 22, 2015 (ver 1.8.04): Several additions to the wireless sections, including MIMO antennas (3.7.3   Multiple Spatial Streams) and LTE (3.8   WiMAX and LTE). Wireless LANs are now moved to the end of the chapter 3   Other LANs.
May 1, 2015 (ver 1.8.03): This book is now available via IPv6! See 8.11   Using IPv6 and IPv4 Together. Also, corrections to exactly-once semantics in 11.5   Remote Procedure Call (RPC).
Apr 26, 2015 (ver 1.8.02): Numerous corrections and clarifications, and new sections on 12.22.1   MPTCP and 12.22.2   SCTP.
Mar 19, 2015: Added unicode-safer version (above), to support reading on most Android devices.
Mar 14, 2015: Expanded and revised chapter 8   IP version 6, now including tunnel-broker IPv6 connections.
Mar 3, 2015: New section on 7.8   DNS.
Feb 23, 2015: certificate pinning, sidebar on Superfish in 22.10.2.1   Certificate Authorities.
Feb 15, 2015: New material on IPv6, in particular 8.11   Using IPv6 and IPv4 Together.
Jan, 2015: The chapter 22   Security is largely finished.