You are previewing Computer Networks, Fourth Edition .
O'Reilly logo
Computer Networks, Fourth Edition

Book Description

The world's leading introduction to networking—fully updated for tomorrow's key technologies.

Computer Networks, Fourth Edition is the ideal introduction to today's networks—and tomorrow's. This classic best seller has been thoroughly updated to reflect the newest and most important networking technologies with a special emphasis on wireless networking, including 802.11, Bluetooth, broadband wireless, ad hoc networks, i-mode, and WAP. But fixed networks have not been ignored either with coverage of ADSL, gigabit Ethernet, peer-to-peer networks, NAT, and MPLS. And there is lots of new material on applications, including over 60 pages on the Web, plus Internet radio, voice over IP, and video on demand.Finally, the coverage of network security has been revised and expanded to fill an entire chapter.

Author, educator, and researcher Andrew S. Tanenbaum, winner of the ACM Karl V. Karlstrom Outstanding Educator Award, carefully explains how networks work on the inside, from underlying hardware at the physical layer up through the top-level application layer. Tanenbaum covers all this and more:

  • Physical layer (e.g., copper, fiber, wireless, satellites, and Internet over cable)

  • Data link layer (e.g., protocol principles, protocol verification, HDLC, and PPP)

  • MAC Sublayer (e.g., gigabit Ethernet, 802.11, broadband wireless, and switching)

  • Network layer (e.g., routing algorithms, congestion control, QoS, IPv4, and IPv6)

  • Transport layer (e.g., socket programming, UDP, TCP, RTP, and network performance)

  • Application layer (e.g., e-mail, the Web, PHP, wireless Web, MP3, and streaming audio)

  • Network security (e.g., AES, RSA, quantum cryptography, IPsec, and Web security)

The book gives detailed descriptions of the principles associated with each layer and presents many examples drawn from the Internet and wireless networks.

Table of Contents

  1. Copyright
    1. Dedication
  2. Other bestselling titles by Andrew S. Tanenbaum
  3. Preface
  4. About the Author
  5. 1. Introduction
    1. 1.1. Uses of Computer Networks
      1. 1.1.1. Business Applications
      2. 1.1.2. Home Applications
      3. 1.1.3. Mobile Users
      4. 1.1.4. Social Issues
    2. 1.2. Network Hardware
      1. 1.2.1. Local Area Networks
      2. 1.2.2. Metropolitan Area Networks
      3. 1.2.3. Wide Area Networks
      4. 1.2.4. Wireless Networks
      5. 1.2.5. Home Networks
      6. 1.2.6. Internetworks
    3. 1.3. Network Software
      1. 1.3.1. Protocol Hierarchies
      2. 1.3.2. Design Issues for the Layers
      3. 1.3.3. Connection-Oriented and Connectionless Services
      4. 1.3.4. Service Primitives
      5. 1.3.5. The Relationship of Services to Protocols
    4. 1.4. Reference Models
      1. 1.4.1. The OSI Reference Model
        1. The Physical Layer
        2. The Data Link Layer
        3. The Network Layer
        4. The Transport Layer
        5. The Session Layer
        6. The Presentation Layer
        7. The Application Layer
      2. 1.4.2. The TCP/IP Reference Model
        1. The Internet Layer
        2. The Transport Layer
        3. The Application Layer
        4. The Host-to-Network Layer
      3. 1.4.3. A Comparison of the OSI and TCP/IP Reference Models
      4. 1.4.4. A Critique of the OSI Model and Protocols
        1. Bad Timing
        2. Bad Technology
        3. Bad Implementations
        4. Bad Politics
      5. 1.4.5. A Critique of the TCP/IP Reference Model
    5. 1.5. Example Networks
      1. 1.5.1. The Internet
        1. The ARPANET
        2. NSFNET
        3. Internet Usage
        4. Architecture of the Internet
      2. 1.5.2. Connection-Oriented Networks: X.25, Frame Relay, and ATM
        1. X.25 and Frame Relay
        2. Asynchronous Transfer Mode
        3. ATM Virtual Circuits
        4. The ATM Reference Model
      3. 1.5.3. Ethernet
      4. 1.5.4. Wireless LANs: 802.11
    6. 1.6. Network Standardization
      1. 1.6.1. Who’s Who in the Telecommunications World
      2. 1.6.2. Who’s Who in the International Standards World
      3. 1.6.3. Who’s Who in the Internet Standards World
    7. 1.7. Metric Units
    8. 1.8. Outline of the Rest of the Book
    9. 1.9. Summary
      1. Problems
  6. 2. The Physical Layer
    1. 2.1. The Theoretical Basis for Data Communication
      1. 2.1.1. Fourier Analysis
      2. 2.1.2. Bandwidth-Limited Signals
      3. 2.1.3. The Maximum Data Rate of a Channel
    2. 2.2. Guided Transmission Media
      1. 2.2.1. Magnetic Media
      2. 2.2.2. Twisted Pair
      3. 2.2.3. Coaxial Cable
      4. 2.2.4. Fiber Optics
        1. Transmission of Light through Fiber
        2. Fiber Cables
        3. Fiber Optic Networks
        4. Comparison of Fiber Optics and Copper Wire
    3. 2.3. Wireless Transmission
      1. 2.3.1. The Electromagnetic Spectrum
      2. 2.3.2. Radio Transmission
      3. 2.3.3. Microwave Transmission
        1. The Politics of the Electromagnetic Spectrum
      4. 2.3.4. Infrared and Millimeter Waves
      5. 2.3.5. Lightwave Transmission
    4. 2.4. Communication Satellites
      1. 2.4.1. Geostationary Satellites
      2. 2.4.2. Medium-Earth Orbit Satellites
      3. 2.4.3. Low-Earth Orbit Satellites
        1. Iridium
        2. Globalstar
        3. Teledesic
      4. 2.4.4. Satellites versus Fiber
    5. 2.5. The Public Switched Telephone Network
      1. 2.5.1. Structure of the Telephone System
      2. 2.5.2. The Politics of Telephones
      3. 2.5.3. The Local Loop: Modems, ADSL, and Wireless
        1. Modems
        2. Digital Subscriber Lines
        3. Wireless Local Loops
      4. 2.5.4. Trunks and Multiplexing
        1. Frequency Division Multiplexing
        2. Wavelength Division Multiplexing
        3. Time Division Multiplexing
        4. SONET/SDH
      5. 2.5.5. Switching
        1. Circuit Switching
        2. Message Switching
        3. Packet Switching
    6. 2.6. The Mobile Telephone System
      1. 2.6.1. First-Generation Mobile Phones: Analog Voice
        1. Advanced Mobile Phone System
        2. Channels
        3. Call Management
      2. 2.6.2. Second-Generation Mobile Phones: Digital Voice
        1. D-AMPS—The Digital Advanced Mobile Phone System
        2. GSM—The Global System for Mobile Communications
        3. CDMA—Code Division Multiple Access
      3. 2.6.3. Third-Generation Mobile Phones: Digital Voice and Data
    7. 2.7. Cable Television
      1. 2.7.1. Community Antenna Television
      2. 2.7.2. Internet over Cable
      3. 2.7.3. Spectrum Allocation
      4. 2.7.4. Cable Modems
      5. 2.7.5. ADSL versus Cable
    8. 2.8. Summary
      1. Problems
  7. 3. The Data Link Layer
    1. 3.1. Data Link Layer Design Issues
      1. 3.1.1. Services Provided to the Network Layer
      2. 3.1.2. Framing
      3. 3.1.3. Error Control
      4. 3.1.4. Flow Control
    2. 3.2. Error Detection and Correction
      1. 3.2.1. Error-Correcting Codes
      2. 3.2.2. Error-Detecting Codes
    3. 3.3. Elementary Data Link Protocols
      1. 3.3.1. An Unrestricted Simplex Protocol
      2. 3.3.2. A Simplex Stop-and-Wait Protocol
      3. 3.3.3. A Simplex Protocol for a Noisy Channel
    4. 3.4. Sliding Window Protocols
      1. 3.4.1. A One-Bit Sliding Window Protocol
      2. 3.4.2. A Protocol Using Go Back N
      3. 3.4.3. A Protocol Using Selective Repeat
    5. 3.5. Protocol Verification
      1. 3.5.1. Finite State Machine Models
      2. 3.5.2. Petri Net Models
    6. 3.6. Example Data Link Protocols
      1. 3.6.1. HDLC—High-Level Data Link Control
      2. 3.6.2. The Data Link Layer in the Internet
        1. PPP—The Point-to-Point Protocol
    7. 3.7. Summary
      1. Problems
  8. 4. The Medium Access Control Sublayer
    1. 4.1. The Channel Allocation Problem
      1. 4.1.1. Static Channel Allocation in LANs and MANs
      2. 4.1.2. Dynamic Channel Allocation in LANs and MANs
    2. 4.2. Multiple Access Protocols
      1. 4.2.1. ALOHA
        1. Pure ALOHA
        2. Slotted ALOHA
      2. 4.2.2. Carrier Sense Multiple Access Protocols
        1. Persistent and Nonpersistent CSMA
        2. CSMA with Collision Detection
      3. 4.2.3. Collision-Free Protocols
        1. A Bit-Map Protocol
        2. Binary Countdown
      4. 4.2.4. Limited-Contention Protocols
        1. The Adaptive Tree Walk Protocol
      5. 4.2.5. Wavelength Division Multiple Access Protocols
      6. 4.2.6. Wireless LAN Protocols
        1. MACA and MACAW
    3. 4.3. Ethernet
      1. 4.3.1. Ethernet Cabling
      2. 4.3.2. Manchester Encoding
      3. 4.3.3. The Ethernet MAC Sublayer Protocol
      4. 4.3.4. The Binary Exponential Backoff Algorithm
      5. 4.3.5. Ethernet Performance
      6. 4.3.6. Switched Ethernet
      7. 4.3.7. Fast Ethernet
      8. 4.3.8. Gigabit Ethernet
      9. 4.3.9. IEEE 802.2: Logical Link Control
      10. 4.3.10. Retrospective on Ethernet
    4. 4.4. Wireless LANs
      1. 4.4.1. The 802.11 Protocol Stack
      2. 4.4.2. The 802.11 Physical Layer
      3. 4.4.3. The 802.11 MAC Sublayer Protocol
      4. 4.4.4. The 802.11 Frame Structure
      5. 4.4.5. Services
    5. 4.5. Broadband Wireless
      1. 4.5.1. Comparison of 802.11 with 802.16
      2. 4.5.2. The 802.16 Protocol Stack
      3. 4.5.3. The 802.16 Physical Layer
      4. 4.5.4. The 802.16 MAC Sublayer Protocol
      5. 4.5.5. The 802.16 Frame Structure
    6. 4.6. Bluetooth
      1. 4.6.1. Bluetooth Architecture
      2. 4.6.2. Bluetooth Applications
      3. 4.6.3. The Bluetooth Protocol Stack
      4. 4.6.4. The Bluetooth Radio Layer
      5. 4.6.5. The Bluetooth Baseband Layer
      6. 4.6.6. The Bluetooth L2CAP Layer
      7. 4.6.7. The Bluetooth Frame Structure
    7. 4.7. Data Link Layer Switching
      1. 4.7.1. Bridges from 802.x to 802.y
      2. 4.7.2. Local Internetworking
      3. 4.7.3. Spanning Tree Bridges
      4. 4.7.4. Remote Bridges
      5. 4.7.5. Repeaters, Hubs, Bridges, Switches, Routers, and Gateways
      6. 4.7.6. Virtual LANs
        1. The IEEE 802.1Q Standard
    8. 4.8. Summary
      1. Problems
  9. 5. The Network Layer
    1. 5.1. Network Layer Design Issues
      1. 5.1.1. Store-and-Forward Packet Switching
      2. 5.1.2. Services Provided to the Transport Layer
      3. 5.1.3. Implementation of Connectionless Service
      4. 5.1.4. Implementation of Connection-Oriented Service
      5. 5.1.5. Comparison of Virtual-Circuit and Datagram Subnets
    2. 5.2. Routing Algorithms
      1. 5.2.1. The Optimality Principle
      2. 5.2.2. Shortest Path Routing
      3. 5.2.3. Flooding
      4. 5.2.4. Distance Vector Routing
        1. The Count-to-Infinity Problem
      5. 5.2.5. Link State Routing
        1. Learning about the Neighbors
        2. Measuring Line Cost
        3. Building Link State Packets
        4. Distributing the Link State Packets
        5. Computing the New Routes
      6. 5.2.6. Hierarchical Routing
      7. 5.2.7. Broadcast Routing
      8. 5.2.8. Multicast Routing
      9. 5.2.9. Routing for Mobile Hosts
      10. 5.2.10. Routing in Ad Hoc Networks
        1. Route Discovery
        2. Route Maintenance
      11. 5.2.11. Node Lookup in Peer-to-Peer Networks
    3. 5.3. Congestion Control Algorithms
      1. 5.3.1. General Principles of Congestion Control
      2. 5.3.2. Congestion Prevention Policies
      3. 5.3.3. Congestion Control in Virtual-Circuit Subnets
      4. 5.3.4. Congestion Control in Datagram Subnets
        1. The Warning Bit
        2. Choke Packets
        3. Hop-by-Hop Choke Packets
      5. 5.3.5. Load Shedding
        1. Random Early Detection
      6. 5.3.6. Jitter Control
    4. 5.4. Quality of Service
      1. 5.4.1. Requirements
      2. 5.4.2. Techniques for Achieving Good Quality of Service
        1. Overprovisioning
        2. Buffering
        3. Traffic Shaping
        4. The Leaky Bucket Algorithm
        5. The Token Bucket Algorithm
        6. Resource Reservation
        7. Admission Control
        8. Proportional Routing
        9. Packet Scheduling
      3. 5.4.3. Integrated Services
        1. RSVP—The Resource reSerVation Protocol
      4. 5.4.4. Differentiated Services
        1. Expedited Forwarding
        2. Assured Forwarding
      5. 5.4.5. Label Switching and MPLS
    5. 5.5. Internetworking
      1. 5.5.1. How Networks Differ
      2. 5.5.2. How Networks Can Be Connected
      3. 5.5.3. Concatenated Virtual Circuits
      4. 5.5.4. Connectionless Internetworking
      5. 5.5.5. Tunneling
      6. 5.5.6. Internetwork Routing
      7. 5.5.7. Fragmentation
    6. 5.6. The Network Layer in the Internet
      1. 5.6.1. The IP Protocol
      2. 5.6.2. IP Addresses
        1. Subnets
        2. CIDR—Classless InterDomain Routing
        3. NAT—Network Address Translation
      3. 5.6.3. Internet Control Protocols
        1. The Internet Control Message Protocol
        2. ARP—The Address Resolution Protocol
        3. RARP, BOOTP, and DHCP
      4. 5.6.4. OSPF—The Interior Gateway Routing Protocol
      5. 5.6.5. BGP—The Exterior Gateway Routing Protocol
      6. 5.6.6. Internet Multicasting
      7. 5.6.7. Mobile IP
      8. 5.6.8. IPv6
        1. The Main IPv6 Header
        2. Extension Headers
        3. Controversies
    7. 5.7. Summary
      1. Problems
  10. 6. The Transport Layer
    1. 6.1. The Transport Service
      1. 6.1.1. Services Provided to the Upper Layers
      2. 6.1.2. Transport Service Primitives
      3. 6.1.3. Berkeley Sockets
      4. 6.1.4. An Example of Socket Programming: An Internet File Server
    2. 6.2. Elements of Transport Protocols
      1. 6.2.1. Addressing
      2. 6.2.2. Connection Establishment
      3. 6.2.3. Connection Release
      4. 6.2.4. Flow Control and Buffering
      5. 6.2.5. Multiplexing
      6. 6.2.6. Crash Recovery
    3. 6.3. A Simple Transport Protocol
      1. 6.3.1. The Example Service Primitives
      2. 6.3.2. The Example Transport Entity
      3. 6.3.3. The Example as a Finite State Machine
    4. 6.4. The Internet Transport Protocols: UDP
      1. 6.4.1. Introduction to UDP
      2. 6.4.2. Remote Procedure Call
      3. 6.4.3. The Real-Time Transport Protocol
    5. 6.5. The Internet Transport Protocols: TCP
      1. 6.5.1. Introduction to TCP
      2. 6.5.2. The TCP Service Model
      3. 6.5.3. The TCP Protocol
      4. 6.5.4. The TCP Segment Header
      5. 6.5.5. TCP Connection Establishment
      6. 6.5.6. TCP Connection Release
      7. 6.5.7. TCP Connection Management Modeling
      8. 6.5.8. TCP Transmission Policy
      9. 6.5.9. TCP Congestion Control
      10. 6.5.10. TCP Timer Management
      11. 6.5.11. Wireless TCP and UDP
      12. 6.5.12. Transactional TCP
    6. 6.6. Performance Issues
      1. 6.6.1. Performance Problems in Computer Networks
      2. 6.6.2. Network Performance Measurement
        1. Make Sure That the Sample Size Is Large Enough
        2. Make Sure That the Samples Are Representative
        3. Be Careful When Using a Coarse-Grained Clock
        4. Be Sure That Nothing Unexpected Is Going On during Your Tests
        5. Caching Can Wreak Havoc with Measurements
        6. Understand What You Are Measuring
        7. Be Careful about Extrapolating the Results
      3. 6.6.3. System Design for Better Performance
        1. Rule #1: CPU Speed Is More Important Than Network Speed
        2. Rule #2: Reduce Packet Count to Reduce Software Overhead
        3. Rule #3: Minimize Context Switches
        4. Rule #4: Minimize Copying
        5. Rule #5: You Can Buy More Bandwidth but Not Lower Delay
        6. Rule #6: Avoiding Congestion Is Better Than Recovering from It
        7. Rule #7: Avoid Timeouts
      4. 6.6.4. Fast TPDU Processing
      5. 6.6.5. Protocols for Gigabit Networks
    7. 6.7. Summary
      1. Problems
  11. 7. The Application Layer
    1. 7.1. DNS—The Domain Name System
      1. 7.1.1. The DNS Name Space
      2. 7.1.2. Resource Records
      3. 7.1.3. Name Servers
    2. 7.2. Electronic Mail
      1. 7.2.1. Architecture and Services
      2. 7.2.2. The User Agent
        1. Sending E-mail
        2. Reading E-mail
      3. 7.2.3. Message Formats
        1. RFC 822
        2. MIME—The Multipurpose Internet Mail Extensions
      4. 7.2.4. Message Transfer
        1. SMTP—The Simple Mail Transfer Protocol
      5. 7.2.5. Final Delivery
        1. POP3
        2. IMAP
        3. Delivery Features
        4. Webmail
    3. 7.3. The World Wide Web
      1. 7.3.1. Architectural Overview
        1. The Client Side
        2. The Server Side
        3. URLs—Uniform Resource Locators
        4. Statelessness and Cookies
      2. 7.3.2. Static Web Documents
        1. HTML—The HyperText Markup Language
        2. Forms
        3. XML and XSL
        4. XHTML—The eXtended HyperText Markup Language
      3. 7.3.3. Dynamic Web Documents
        1. Server-Side Dynamic Web Page Generation
        2. Client-Side Dynamic Web Page Generation
      4. 7.3.4. HTTP—The HyperText Transfer Protocol
        1. Connections
        2. Methods
        3. Message Headers
        4. Example HTTP Usage
      5. 7.3.5. Performance Enhancements
        1. Caching
        2. Server Replication
        3. Content Delivery Networks
      6. 7.3.6. The Wireless Web
        1. WAP—The Wireless Application Protocol
        2. I-Mode
        3. Second-Generation Wireless Web
    4. 7.4. Multimedia
      1. 7.4.1. Introduction to Digital Audio
      2. 7.4.2. Audio Compression
      3. 7.4.3. Streaming Audio
      4. 7.4.4. Internet Radio
      5. 7.4.5. Voice over IP
        1. H.323
        2. SIP—The Session Initiation Protocol
        3. Comparison of H.323 and SIP
      6. 7.4.6. Introduction to Video
        1. Analog Systems
        2. Digital Systems
      7. 7.4.7. Video Compression
        1. The JPEG Standard
        2. The MPEG Standard
      8. 7.4.8. Video on Demand
        1. Video Servers
        2. The Distribution Network
      9. 7.4.9. The MBone—The Multicast Backbone
    5. 7.5. Summary
      1. Problems
  12. 8. Network Security
    1. 8.1. Cryptography
      1. 8.1.1. Introduction to Cryptography
      2. 8.1.2. Substitution Ciphers
      3. 8.1.3. Transposition Ciphers
      4. 8.1.4. One-Time Pads
        1. Quantum Cryptography
      5. 8.1.5. Two Fundamental Cryptographic Principles
        1. Redundancy
        2. Freshness
    2. 8.2. Symmetric-Key Algorithms
      1. 8.2.1. DES—The Data Encryption Standard
        1. Triple DES
      2. 8.2.2. AES—The Advanced Encryption Standard
        1. Rijndael
      3. 8.2.3. Cipher Modes
        1. Electronic Code Book Mode
        2. Cipher Block Chaining Mode
        3. Cipher Feedback Mode
        4. Stream Cipher Mode
        5. Counter Mode
      4. 8.2.4. Other Ciphers
      5. 8.2.5. Cryptanalysis
    3. 8.3. Public-Key Algorithms
      1. 8.3.1. RSA
      2. 8.3.2. Other Public-Key Algorithms
    4. 8.4. Digital Signatures
      1. 8.4.1. Symmetric-Key Signatures
      2. 8.4.2. Public-Key Signatures
      3. 8.4.3. Message Digests
        1. MD5
        2. SHA-1
      4. 8.4.4. The Birthday Attack
    5. 8.5. Management of Public Keys
      1. 8.5.1. Certificates
      2. 8.5.2. X.509
      3. 8.5.3. Public Key Infrastructures
        1. Directories
        2. Revocation
    6. 8.6. Communication Security
      1. 8.6.1. IPsec
      2. 8.6.2. Firewalls
      3. 8.6.3. Virtual Private Networks
      4. 8.6.4. Wireless Security
        1. 802.11 Security
        2. Bluetooth Security
        3. WAP 2.0 Security
    7. 8.7. Authentication Protocols
      1. 8.7.1. Authentication Based on a Shared Secret Key
      2. 8.7.2. Establishing a Shared Key: The Diffie-Hellman Key Exchange
      3. 8.7.3. Authentication Using a Key Distribution Center
      4. 8.7.4. Authentication Using Kerberos
      5. 8.7.5. Authentication Using Public-Key Cryptography
    8. 8.8. E-Mail Security
      1. 8.8.1. PGP—Pretty Good Privacy
      2. 8.8.2. PEM—Privacy Enhanced Mail
      3. 8.8.3. S/MIME
    9. 8.9. Web Security
      1. 8.9.1. Threats
      2. 8.9.2. Secure Naming
        1. DNS Spoofing
        2. Secure DNS
        3. Self-Certifying Names
      3. 8.9.3. SSL—The Secure Sockets Layer
      4. 8.9.4. Mobile Code Security
        1. Java Applet Security
        2. ActiveX
        3. JavaScript
        4. Viruses
    10. 8.10. Social Issues
      1. 8.10.1. Privacy
        1. Anonymous Remailers
      2. 8.10.2. Freedom of Speech
        1. Steganography
      3. 8.10.3. Copyright
    11. 8.11. Summary
      1. Problems
  13. 9. Reading List and Bibliography
    1. 9.1. Suggestions for Further Reading
    2. 9.1.1. Introduction and General Works
      1. 9.1.2. The Physical Layer
      2. 9.1.3. The Data Link Layer
      3. 9.1.4. The Medium Access Control Sublayer
      4. 9.1.5. The Network Layer
      5. 9.1.6. The Transport Layer
      6. 9.1.7. The Application Layer
      7. 9.1.8. Network Security
    3. 9.2. Alphabetical Bibliography
      1. Bibliography