internetworking with tcp-ip volume 1 (6th edition)

733

Upload: rohitjain482

Post on 25-Nov-2015

6.024 views

Category:

Documents


1.436 download

DESCRIPTION

Internetworking With TCP-IP Volume 1 (6th Edition)Principles, protocol and architecture

TRANSCRIPT

  • Internetworking With TCP/IPVol I:

    Principles, Protocols, and ArchitectureSixth Edition

  • This page intentionally left blank

  • Internetworking With TCP/IPVol I:

    Principles, Protocols, and Architecture

    Sixth Edition

    DOUGLAS E. COMERDepartment of Computer Sciences

    Purdue University

    Boston Columbus Indianapolis New York San Francisco Upper Saddle RiverAmsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto

    Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo

  • Editorial Director, Engineering and Computer Science: Marcia J. HortonAcquisitions Editor: Matt GoldsteinEditorial Assistant: Jenah Blitz-StoehrMarketing Manager: Yez AlayanMarketing Assistant: Jon BryantSenior Managing Editor: Scott DisannoOperations Specialist: Linda SagerArt Director: Anthony GemmellaroMedia Editor: Renata ButeraPrinter/Binder: Edwards Brothers Cover Printer: Lehigh-Phoenix

    Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on the appropriate page within the text. Cisco is a registered trademark of Cisco Systems, Inc. EUI-64 is a trademark of the Institute for Electrical and Electronic Engineers (IEEE). IEEE is a registered trademark of the Institute of Electrical and Electronics Engineers, Inc. Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of The Open Group in the US and other countries. ZigBee is a registered trademark of the ZigBee Alliance. OpenFlow is a trademark of Stanford University. Windows, Windows NT, Windows CE, and/or other Microsoft products referenced herein are either trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Skype is a registered trademark of Skype, Incorporated in the US and other countries.

    Additional company and product names used in this text may be trademarks or registered trademarks of the individual companies, and are respectfully acknowledged.

    Copyright 2014, 2006, 2000 Pearson Education, Inc., One Lake Street, Upper Saddle River, New Jersey 07458. All rights reserved. Manufactured in the United States of America. This publication is protected by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. To obtain permission(s) to use material from this work, please submit a written request to Pearson Education, Inc., Permissions Department, One Lake Street, Upper Saddle River, New Jersey 07458.

    Many of the designations by manufacturers and seller to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed in initial caps or all caps.

    Library of Congress Cataloging-in-Publication Data on File

    10 9 8 7 6 5 4 3 2 1

    www.pearsonhighered.com

    ISBN 10: 0-13-608530-XISBN 13: 978-0-13-608530-0

  • To Chris

  • This page intentionally left blank

  • Contents

    xxiiiForeword

    xxvPreface

    1Chapter 1 Introduction And Overview

    1.1 The Motivation For Internetworking 11.2 The TCP/IP Internet 21.3 Internet Services 21.4 History And Scope Of The Internet 61.5 The Internet Architecture Board 71.6 The IAB Reorganization 81.7 Internet Request For Comments (RFCs) 81.8 Internet Growth 91.9 Transition To IPv6 121.10 Committee Design And The New Version of IP 121.11 Relationship Between IPv4 And IPv6 131.12 IPv6 Migration 141.13 Dual Stack Systems 151.14 Organization Of The Text 151.15 Summary 16

    19Chapter 2 Overview Of Underlying Network Technologies

    2.1 Introduction 192.2 Two Approaches To Network Communication 202.3 WAN And LAN 212.4 Hardware Addressing Schemes 212.5 Ethernet (IEEE 802.3) 222.6 Wi-Fi (IEEE 802.11) 262.7 ZigBee (IEEE 802.15.4) 262.8 Optical Carrier And Packet Over SONET (OC, POS) 272.9 Point-To-Point Networks 282.10 VLAN Technology And Broadcast Domains 28

  • viii Contents

    2.11 Bridging 292.12 Congestion And Packet Loss 302.13 Summary 31

    35Chapter 3 Internetworking Concept And Architectural Model

    3.1 Introduction 353.2 Application-Level Interconnection 353.3 Network-Level Interconnection 373.4 Properties Of The Internet 383.5 Internet Architecture 393.6 Interconnection Of Multiple Networks With IP Routers 393.7 The Users View 413.8 All Networks Are Equal 423.9 The Unanswered Questions 433.10 Summary 43

    47Chapter 4 Protocol Layering

    4.1 Introduction 474.2 The Need For Multiple Protocols 474.3 The Conceptual Layers Of Protocol Software 494.4 Functionality Of The Layers 494.5 ISO 7-Layer Reference Model 504.6 X.25 And Its Relation To The ISO Model 514.7 The TCP/IP 5-Layer Reference Model 524.8 Locus Of Intelligence 564.9 The Protocol Layering Principle 574.10 The Layering Principle Applied To A Network 584.11 Layering In Mesh Networks 604.12 Two Important Boundaries In The TCP/IP Model 624.13 Cross-Layer Optimizations 634.14 The Basic Idea Behind Multiplexing And Demultiplexing 644.15 Summary 66

    69Chapter 5 Internet Addressing

    5.1 Introduction 695.2 Universal Host Identifiers 695.3 The Original IPv4 Classful Addressing Scheme 715.4 Dotted Decimal Notation Used With IPv4 725.5 IPv4 Subnet Addressing 72

  • Contents ix

    5.6 Fixed Length IPv4 Subnets 755.7 Variable-Length IPv4 Subnets 775.8 Implementation Of IPv4 Subnets With Masks 775.9 IPv4 Subnet Mask Representation And Slash Notation 785.10 The Current Classless IPv4 Addressing Scheme 795.11 IPv4 Address Blocks And CIDR Slash Notation 825.12 A Classless IPv4 Addressing Example 825.13 IPv4 CIDR Blocks Reserved For Private Networks 835.14 The IPv6 Addressing Scheme 845.15 IPv6 Colon Hexadecimal Notation 845.16 IPv6 Address Space Assignment 855.17 Embedding IPv4 Addresses In IPv6 For Transition 865.18 IPv6 Unicast Addresses And /64 875.19 IPv6 Interface Identifiers And MAC Addresses 885.20 IP Addresses, Hosts, And Network Connections 895.21 Special Addresses 905.22 Weaknesses In Internet Addressing 945.23 Internet Address Assignment And Delegation Of Authority 965.24 An Example IPv4 Address Assignment 965.25 Summary 98

    101Chapter 6 Mapping Internet Addresses To Physical Addresses (ARP)

    6.1 Introduction 1016.2 The Address Resolution Problem 1016.3 Two Types Of Hardware Addresses 1026.4 Resolution Through Direct Mapping 1026.5 Resolution In A Direct-Mapped Network 1036.6 IPv4 Address Resolution Through Dynamic Binding 1046.7 The ARP Cache 1056.8 ARP Cache Timeout 1066.9 ARP Refinements 1066.10 Relationship Of ARP To Other Protocols 1086.11 ARP Implementation 1086.12 ARP Encapsulation And Identification 1106.13 ARP Message Format 1106.14 Automatic ARP Cache Revalidation 1126.15 Reverse Address Resolution (RARP) 1126.16 ARP Caches In Layer 3 Switches 1136.17 Proxy ARP 1146.18 IPv6 Neighbor Discovery 1156.19 Summary 116

  • x Contents

    119Chapter 7 Internet Protocol: Connectionless Datagram Delivery (IPv4,IPv6)

    7.1 Introduction 1197.2 A Virtual Network 1197.3 Internet Architecture And Philosophy 1207.4 Principles Behind The Structure 1207.5 Connectionless Delivery System Characteristics 1217.6 Purpose And Importance Of The Internet Protocol 1227.7 The IP Datagram 1227.8 Datagram Type Of Service And Differentiated Services 1277.9 Datagram Encapsulation 1297.10 Datagram Size, Network MTU, and Fragmentation 1307.11 Datagram Reassembly 1347.12 Header Fields Used For Datagram Reassembly 1357.13 Time To Live (IPv4) And Hop Limit (IPv6) 1367.14 Optional IP Items 1377.15 Options Processing During Fragmentation 1417.16 Network Byte Order 1437.17 Summary 144

    147Chapter 8 Internet Protocol: Forwarding IP Datagrams

    8.1 Introduction 1478.2 Forwarding In An Internet 1478.3 Direct And Indirect Delivery 1498.4 Transmission Across A Single Network 1508.5 Indirect Delivery 1518.6 Table-Driven IP Forwarding 1528.7 Next-Hop Forwarding 1538.8 Default Routes And A Host Example 1558.9 Host-Specific Routes 1568.10 The IP Forwarding Algorithm 1578.11 Longest-Prefix Match Paradigm 1588.12 Forwarding Tables And IP Addresses 1608.13 Handling Incoming Datagrams 1618.14 Forwarding In The Presence Of Broadcast And Multicast 1628.15 Software Routers And Sequential Lookup 1638.16 Establishing Forwarding Tables 1638.17 Summary 163

  • Contents xi

    167Chapter 9 Internet Protocol: Error And Control Messages (ICMP)

    9.1 Introduction 1679.2 The Internet Control Message Protocol 1679.3 Error Reporting Vs. Error Correction 1699.4 ICMP Message Delivery 1709.5 Conceptual Layering 1719.6 ICMP Message Format 1719.7 Example ICMP Message Types Used With IPv4 And IPv6 1729.8 Testing Destination Reachability And Status (Ping) 1739.9 Echo Request And Reply Message Format 1749.10 Checksum Computation And The IPv6 Pseudo-Header 1759.11 Reports Of Unreachable Destinations 1769.12 ICMP Error Reports Regarding Fragmentation 1789.13 Route Change Requests From Routers 1789.14 Detecting Circular Or Excessively Long Routes 1809.15 Reporting Other Problems 1819.16 Older ICMP Messages Used At Startup 1829.17 Summary 182

    185Chapter 10 User Datagram Protocol (UDP)

    10.1 Introduction 18510.2 Using A Protocol Port As An Ultimate Destination 18510.3 The User Datagram Protocol 18610.4 UDP Message Format 18710.5 Interpretation Of the UDP Checksum 18810.6 UDP Checksum Computation And The Pseudo-Header 18910.7 IPv4 UDP Pseudo-Header Format 18910.8 IPv6 UDP Pseudo-Header Format 19010.9 UDP Encapsulation And Protocol Layering 19010.10 Layering And The UDP Checksum Computation 19210.11 UDP Multiplexing, Demultiplexing, And Protocol Ports 19310.12 Reserved And Available UDP Port Numbers 19410.13 Summary 196

    199Chapter 11 Reliable Stream Transport Service (TCP)

    11.1 Introduction 19911.2 The Need For Reliable Service 19911.3 Properties Of The Reliable Delivery Service 20011.4 Reliability: Acknowledgements And Retransmission 20111.5 The Sliding Window Paradigm 203

  • xii Contents

    11.6 The Transmission Control Protocol 20511.7 Layering, Ports, Connections, And Endpoints 20611.8 Passive And Active Opens 20811.9 Segments, Streams, And Sequence Numbers 20811.10 Variable Window Size And Flow Control 20911.11 TCP Segment Format 21011.12 Out Of Band Data 21211.13 TCP Options 21211.14 TCP Checksum Computation 21411.15 Acknowledgements, Retransmission, And Timeouts 21611.16 Accurate Measurement Of Round Trip Samples 21811.17 Karns Algorithm And Timer Backoff 21911.18 Responding To High Variance In Delay 22011.19 Response To Congestion 22311.20 Fast Recovery And Other Response Modifications 22511.21 Explicit Feedback Mechanisms (SACK and ECN) 22711.22 Congestion, Tail Drop, And TCP 22811.23 Random Early Detection (RED) 22911.24 Establishing A TCP Connection 23111.25 Initial Sequence Numbers 23211.26 Closing a TCP Connection 23311.27 TCP Connection Reset 23411.28 TCP State Machine 23511.29 Forcing Data Delivery 23611.30 Reserved TCP Port Numbers 23711.31 Silly Window Syndrome And Small Packets 23811.32 Avoiding Silly Window Syndrome 23911.33 Buffer Bloat And Its Effect On Latency 24211.34 Summary 243

    247Chapter 12 Routing Architecture: Cores, Peers, And Algorithms

    12.1 Introduction 24712.2 The Origin Of Forwarding Tables 24812.3 Forwarding With Partial Information 24912.4 Original Internet Architecture And Cores 25112.5 Beyond The Core Architecture To Peer Backbones 25312.6 Automatic Route Propagation And A FIB 25412.7 Distance-Vector (Bellman-Ford) Routing 25512.8 Reliability And Routing Protocols 25712.9 Link-State (SPF) Routing 25812.10 Summary 259

  • Contents xiii

    263Chapter 13 Routing Among Autonomous Systems (BGP)

    13.1 Introduction 26313.2 The Scope Of A Routing Update Protocol 26313.3 Determining A Practical Limit On Group Size 26413.4 A Fundamental Idea: Extra Hops 26613.5 Autonomous System Concept 26713.6 Exterior Gateway Protocols And Reachability 26813.7 BGP Characteristics 26913.8 BGP Functionality And Message Types 27013.9 BGP Message Header 27113.10 BGP OPEN Message 27213.11 BGP UPDATE Message 27313.12 Compressed IPv4 Mask-Address Pairs 27413.13 BGP Path Attributes 27413.14 BGP KEEPALIVE Message 27613.15 Information From The Receivers Perspective 27713.16 The Key Restriction Of Exterior Gateway Protocols 27813.17 The Internet Routing Architecture And Registries 28013.18 BGP NOTIFICATION Message 28013.19 BGP Multiprotocol Extensions For IPv6 28113.20 Multiprotocol Reachable NLRI Attribute 28313.21 Internet Routing And Economics 28413.22 Summary 285

    289Chapter 14 Routing Within An Autonomous System (RIP, RIPng,OSPF, IS-IS)

    14.1 Introduction 28914.2 Static Vs. Dynamic Interior Routes 28914.3 Routing Information Protocol (RIP) 29314.4 Slow Convergence Problem 29414.5 Solving The Slow Convergence Problem 29614.6 RIP Message Format (IPv4) 29714.7 Fields In A RIP Message 29914.8 RIP For IPv6 (RIPng) 29914.9 The Disadvantage Of Using Hop Counts 30114.10 Delay Metric (HELLO) 30114.11 Delay Metrics, Oscillation, And Route Flapping 30214.12 The Open SPF Protocol (OSPF) 30314.13 OSPFv2 Message Formats (IPv4) 30514.14 Changes In OSPFv3 To Support IPv6 31014.15 IS-IS Route Propagation Protocol 31214.16 Trust And Route Hijacking 313

  • xiv Contents

    14.17 Gated: A Routing Gateway Daemon 31314.18 Artificial Metrics And Metric Transformation 31414.19 Routing With Partial Information 31514.20 Summary 315

    319Chapter 15 Internet Multicasting

    15.1 Introduction 31915.2 Hardware Broadcast 31915.3 Hardware Multicast 32015.4 Ethernet Multicast 32115.5 The Conceptual Building Blocks Of Internet Multicast 32115.6 The IP Multicast Scheme 32215.7 IPv4 And IPv6 Multicast Addresses 32315.8 Multicast Address Semantics 32615.9 Mapping IP Multicast To Ethernet Multicast 32715.10 Hosts And Multicast Delivery 32815.11 Multicast Scope 32815.12 Host Participation In IP Multicasting 32915.13 IPv4 Internet Group Management Protocol (IGMP) 33015.14 IGMP Details 33115.15 IGMP Group Membership State Transitions 33215.16 IGMP Membership Query Message Format 33315.17 IGMP Membership Report Message Format 33415.18 IPv6 Multicast Group Membership With MLDv2 33515.19 Multicast Forwarding And Routing Information 33715.20 Basic Multicast Forwarding Paradigms 33915.21 Consequences Of TRPF 34115.22 Multicast Trees 34215.23 The Essence Of Multicast Route Propagation 34315.24 Reverse Path Multicasting 34415.25 Example Multicast Routing Protocols 34515.26 Reliable Multicast And ACK Implosions 34715.27 Summary 349

    353Chapter 16 Label Switching, Flows, And MPLS

    16.1 Introduction 35316.2 Switching Technology 35316.3 Flows And Flow Setup 35516.4 Large Networks, Label Swapping, And Paths 35516.5 Using Switching With IP 35716.6 IP Switching Technologies And MPLS 357

  • Contents xv

    16.7 Labels And Label Assignment 35916.8 Hierarchical Use Of MPLS And A Label Stack 35916.9 MPLS Encapsulation 36016.10 Label Semantics 36116.11 Label Switching Router 36216.12 Control Processing And Label Distribution 36316.13 MPLS And Fragmentation 36416.14 Mesh Topology And Traffic Engineering 36416.15 Summary 365

    369Chapter 17 Packet Classification

    17.1 Introduction 36917.2 Motivation For Classification 37017.3 Classification Instead Of Demultiplexing 37117.4 Layering When Classification Is Used 37217.5 Classification Hardware And Network Switches 37217.6 Switching Decisions And VLAN Tags 37417.7 Classification Hardware 37517.8 High-Speed Classification And TCAM 37517.9 The Size Of A TCAM 37717.10 Classification-Enabled Generalized Forwarding 37817.11 Summary 379

    381Chapter 18 Mobility And Mobile IP

    18.1 Introduction 38118.2 Mobility, Addressing, And Routing 38118.3 Mobility Via Host Address Change 38218.4 Mobility Via Changes In Datagram Forwarding 38318.5 The Mobile IP Technology 38318.6 Overview Of Mobile IP Operation 38418.7 Overhead And Frequency Of Change 38418.8 Mobile IPv4 Addressing 38518.9 IPv4 Foreign Agent Discovery 38618.10 IPv4 Registration 38718.11 IPv4 Registration Message Format 38818.12 Communication With An IPv4 Foreign Agent 38818.13 IPv6 Mobility Support 38918.14 Datagram Transmission, Reception, And Tunneling 39018.15 Assessment Of IP Mobility And Unsolved Problems 39118.16 Alternative Identifier-Locator Separation Technologies 39518.17 Summary 396

  • xvi Contents

    399Chapter 19 Network Virtualization: VPNs, NATs, And Overlays

    19.1 Introduction 39919.2 Virtualization 39919.3 Virtual Private Networks (VPNs) 40019.4 VPN Tunneling And IP-in-IP Encapsulation 40119.5 VPN Addressing And Forwarding 40219.6 Extending VPN Technology To Individual Hosts 40419.7 Using A VPN With Private IP Addresses 40419.8 Network Address Translation (NAT) 40519.9 NAT Translation Table Creation 40719.10 Variant Of NAT 40919.11 An Example Of NAT Translation 40919.12 Interaction Between NAT And ICMP 41119.13 Interaction Between NAT And Applications 41119.14 NAT In The Presence Of Fragmentation 41219.15 Conceptual Address Domains 41319.16 Linux, Windows, And Mac Versions Of NAT 41319.17 Overlay Networks 41319.18 Multiple Simultaneous Overlays 41519.19 Summary 415

    419Chapter 20 Client-Server Model Of Interaction

    20.1 Introduction 41920.2 The Client-Server Model 42020.3 A Trivial Example: UDP Echo Server 42020.4 Time And Date Service 42220.5 Sequential And Concurrent Servers 42320.6 Server Complexity 42520.7 Broadcasting Requests 42620.8 Client-Server Alternatives And Extensions 42620.9 Summary 428

    431Chapter 21 The Socket API

    21.1 Introduction 43121.2 Versions Of The Socket API 43221.3 The UNIX I/O Paradigm And Network I/O 43221.4 Adding Network I/O to UNIX 43221.5 The Socket Abstraction And Socket Operations 43321.6 Obtaining And Setting Socket Options 43821.7 How A Server Accepts TCP Connections 439

  • Contents xvii

    21.8 Servers That Handle Multiple Services 44021.9 Obtaining And Setting The Host Name 44121.10 Library Functions Related To Sockets 44221.11 Network Byte Order And Conversion Routines 44321.12 IP Address Manipulation Routines 44421.13 Accessing The Domain Name System 44421.14 Obtaining Information About Hosts 44621.15 Obtaining Information About Networks 44721.16 Obtaining Information About Protocols 44721.17 Obtaining Information About Network Services 44721.18 An Example Client 44821.19 An Example Server 45321.20 Summary 460

    463Chapter 22 Bootstrap And Autoconfiguration (DHCP, NDP, IPv6-ND)

    22.1 Introduction 46322.2 History Of IPv4 Bootstrapping 46422.3 Using IP To Determine An IP Address 46422.4 DHCP Retransmission And Randomization 46522.5 DHCP Message Format 46522.6 The Need For Dynamic Configuration 46822.7 DHCP Leases And Dynamic Address Assignment 46922.8 Multiple Addresses And Relays 46922.9 DHCP Address Acquisition States 47022.10 Early Lease Termination 47122.11 Lease Renewal States 47222.12 DHCP Options And Message Type 47322.13 DHCP Option Overload 47422.14 DHCP And Domain Names 47422.15 Managed And Unmanaged Configuration 47422.16 Managed And Unmanaged Configuration For IPv6 47522.17 IPv6 Configuration Options And Potential Conflicts 47622.18 IPv6 Neighbor Discovery Protocol (NDP) 47722.19 ICMPv6 Router Solicitation Message 47822.20 ICMPv6 Router Advertisement Message 47822.21 ICMPv6 Neighbor Solicitation Message 47922.22 ICMPv6 Neighbor Advertisement Message 48022.23 ICMPv6 Redirect Message 48022.24 Summary 481

  • xviii Contents

    485Chapter 23 The Domain Name System (DNS)

    23.1 Introduction 48523.2 Names For Computers 48623.3 Flat Namespace 48623.4 Hierarchical Names 48723.5 Delegation Of Authority For Names 48823.6 Subset Authority 48823.7 Internet Domain Names 48923.8 Top-Level Domains 49023.9 Name Syntax And Type 49223.10 Mapping Domain Names To Addresses 49323.11 Domain Name Resolution 49523.12 Efficient Translation 49623.13 Caching: The Key To Efficiency 49723.14 Domain Name System Message Format 49823.15 Compressed Name Format 50123.16 Abbreviation Of Domain Names 50123.17 Inverse Mappings 50223.18 Pointer Queries 50323.19 Object Types And Resource Record Contents 50423.20 Obtaining Authority For A Subdomain 50523.21 Server Operation And Replication 50523.22 Dynamic DNS Update And Notification 50623.23 DNS Security Extensions (DNSSEC) 50623.24 Multicast DNS And Service Discovery 50723.25 Summary 508

    511Chapter 24 Electronic Mail (SMTP, POP, IMAP, MIME)

    24.1 Introduction 51124.2 Electronic Mail 51124.3 Mailbox Names And Aliases 51224.4 Alias Expansion And Mail Forwarding 51324.5 TCP/IP Standards For Electronic Mail Service 51424.6 Simple Mail Transfer Protocol (SMTP) 51524.7 Mail Retrieval And Mailbox Manipulation Protocols 51724.8 The MIME Extensions For Non-ASCII Data 51924.9 MIME Multipart Messages 52124.10 Summary 522

  • Contents xix

    525Chapter 25 World Wide Web (HTTP)

    25.1 Introduction 52525.2 Importance Of The Web 52525.3 Architectural Components 52625.4 Uniform Resource Locators 52625.5 An Example HTML Document 52725.6 Hypertext Transfer Protocol 52825.7 HTTP GET Request 52825.8 Error Messages 52925.9 Persistent Connections 53025.10 Data Length And Program Output 53025.11 Length Encoding And Headers 53125.12 Negotiation 53225.13 Conditional Requests 53325.14 Proxy Servers And Caching 53325.15 Caching 53425.16 Other HTTP Functionality 53525.17 HTTP, Security, And E-Commerce 53525.18 Summary 536

    539Chapter 26 Voice And Video Over IP (RTP, RSVP, QoS)

    26.1 Introduction 53926.2 Digitizing And Encoding 53926.3 Audio And Video Transmission And Reproduction 54026.4 Jitter And Playback Delay 54126.5 Real-time Transport Protocol (RTP) 54226.6 Streams, Mixing, And Multicasting 54426.7 RTP Encapsulation 54426.8 RTP Control Protocol (RTCP) 54526.9 RTCP Operation 54526.10 IP Telephony And Signaling 54626.11 Quality Of Service Controversy 54926.12 QoS, Utilization, And Capacity 55026.13 Emergency Services And Preemption 55126.14 IntServ And Resource Reservation 55126.15 DiffServ And Per-Hop Behavior 55326.16 Traffic Scheduling 55326.17 Traffic Policing And Shaping 55526.18 Summary 556

  • xx Contents

    559Chapter 27 Network Management (SNMP)

    27.1 Introduction 55927.2 The Level Of Management Protocols 55927.3 Architectural Model 56127.4 Protocol Framework 56227.5 Examples of MIB Variables 56427.6 The Structure Of Management Information 56427.7 Formal Definitions Using ASN.1 56527.8 Structure And Representation Of MIB Object Names 56627.9 MIB Changes And Additions For IPv6 57127.10 Simple Network Management Protocol 57127.11 SNMP Message Format 57427.12 An Example Encoded SNMP Message 57727.13 Security In SNMPv3 57927.14 Summary 580

    583Chapter 28 Software Defined Networking (SDN, OpenFlow)

    28.1 Introduction 58328.2 Routes, Paths, And Connections 58328.3 Traffic Engineering And Control Of Path Selection 58428.4 Connection-Oriented Networks And Routing Overlays 58428.5 SDN: A New Hybrid Approach 58628.6 Separation Of Data And Control 58628.7 The SDN Architecture And External Controllers 58828.8 SDN Across Multiple Devices 58928.9 Implementing SDN With Conventional Switches 59028.10 OpenFlow Technology 59228.11 OpenFlow Basics 59228.12 Specific Fields In An OpenFlow Pattern 59328.13 Actions That OpenFlow Can Take 59428.14 OpenFlow Extensions And Additions 59528.15 OpenFlow Messages 59828.16 Uses Of OpenFlow 59928.17 OpenFlow: Excitement, Hype, And Limitations 59928.18 Software Defined Radio (SDR) 60028.19 Summary 601

    605Chapter 29 Internet Security And Firewall Design (IPsec, SSL)

    29.1 Introduction 60529.2 Protecting Resources 606

  • Contents xxi

    29.3 Information Policy 60729.4 Internet Security 60729.5 IP Security (IPsec) 60829.6 IPsec Authentication Header 60829.7 Security Association 61029.8 IPsec Encapsulating Security Payload 61129.9 Authentication And Mutable Header Fields 61229.10 IPsec Tunneling 61329.11 Required Security Algorithms 61329.12 Secure Socket Layer (SSL and TLS) 61429.13 Firewalls And Internet Access 61429.14 Multiple Connections And Weakest Links 61429.15 Firewall Implementation And Packet Filters 61529.16 Firewall Rules And The 5-Tuple 61529.17 Security And Packet Filter Specification 61729.18 The Consequence Of Restricted Access For Clients 61829.19 Stateful Firewalls 61829.20 Content Protection And Proxies 61929.21 Monitoring And Logging 62029.22 Summary 620

    623Chapter 30 Connected Embedded Systems (The Internet of Things)

    30.1 Introduction 62330.2 Sensing, Monitoring, And Control 62430.3 Power Conservation And Energy Harvesting 62430.4 A World Of Intelligent Embedded Devices 62530.5 The Importance of Communication 62530.6 Example: Electronic Ads In Shopping Malls 62630.7 Collecting Data From Embedded Systems 62730.8 Wireless Networking And IEEE 802.15.4 62730.9 A Mesh Network For Smart Grid Sensors 62830.10 A Forwarding Tree For a Sensor Mesh 62930.11 Using Layer 2 And Layer 3 Protocols In A Mesh 63030.12 The ZigBee IPv6 Protocol Stack 63130.13 Forwarding In A ZigBee Route-Over Mesh 63330.14 Assessment Of Using IPv6 Route-Over For A Mesh 63530.15 Summary 637

    Appendix 1 Glossary Of Internetworking Terms And Abbreviations 639

    681Index

  • This page intentionally left blank

  • Foreword

    It is a rare treat to be asked to write a foreword to the sixth edition of DougComers now classic book on TCP/IP and the Internet. In 2012, there are nearly 3 bil-lion people on line. Something like 6.5 billion mobile phones are in use and many ofthese are smart phones that have access to the Internet via the wireless telephone net-work and through Wi-Fi. In fact, the wireless systems are diverting traffic to Wi-Fiwhen this is possible in order to shed load. The most recent data from Telegeography isthat 77 Tbps (terabits per second) flow across the Internet. A substantial component ofthe traffic is video, but increasingly, large data files are transferred that contain geneticsequence information, data from telescopes, sensor systems, the Large Hadron Collider,and other scientific instruments.

    We have learned a lot about TCP/IP in many contexts, and this text collects muchof the wisdom. We have learned that buffer memory may not be our friend if largeamounts of it are located in a network device where there is a major drop in capacity.This is the so-called buffer bloat problem described in Chapter 11. Where a high-speed link meets a low-speed link, large buffers take a long time to empty going in thelow-speed direction, which has the effect of increasing delay and affecting TCP flowcontrol, generating serious congestion with all its negative side effects. We have alsolearned that there are conditions under which TCP/IP works poorly. Here I am thinkingabout highly disrupted and variably delayed environments. Examples include inter-planetary communication and tactical communication (including mobile as well as mili-tary). For these conditions, new kinds of protocols called delay and disruption tolerantnetworking (DTN) are needed to supplement things like TCP. In fact, DTN can runover TCP or UDP or virtually any other transmission subsystem. The protocols that im-plement this type of networking are already in use on the International Space Stationand on the rovers now on Mars!

    New ideas such as Software Defined Networking and the OpenFlow protocol fromStanford University, described in Chapter 28, are also coloring the future of the Internet.While these systems can operate to support conventional Internet architectures, they arealso able to go beyond the conventional notions of addressing to support content-basedrouting, among other things. Management of end-to-end flows works well with suchsystems. In addition to that, it seems timely to revisit wireless communication and toask how broadcast modes could influence further evolution of the Internet. One imag-ines satellites raining IP or UDP packets down on hundreds of millions of receivers.In terrestrial contexts, the ability to radiate 360 degrees allows multiple receivers to re-ceive one transmission. Advances in sharing of spectrum and in the use of beam-forming antennas make this an even more rich and intriguing area to explore.

  • xxiv Foreword

    The Internet continues to expand and change in unexpected ways. In addition todevices that humans use, a new wave of sensors, cameras, and actuators are being con-nected that will give us remote access and control of everything from scientific data tothe lights in a building and manufacturing processes. We refer to the new devices as anInternet of Things; they are described in Chapter 30.

    As I think this book amply demonstrates, the Internet is still exciting. There is stillmuch research to be carried out in support of new and challenging applications. Oppor-tunities for collaboration grow by the day.

    Welcome to the 21st Century Internet where innovation is still the order of the day.This book provides the background you need to understand and participate.

    Vint CerfInternet Evangelist, GooglePresident, ACM

    March, 2013

  • Preface

    Internetworking and TCP/IP now dominate all of networking even telephonecompanies that were once the exclusive bastions of circuit switched networks haveadopted IP technology. Two more revolutionary changes are occurring that rely on in-ternetworking: the cloud computing paradigm and the Internet of Things. In the cloudmodel, computation and storage are performed in cloud data centers. Users rely on theInternet to upload, download, and access their information and to share data with others.The phrase Internet of Things is used to characterize an Internet of intelligent, embed-ded devices that act autonomously rather than devices, such as smart phones and lap-tops, that a human operates. Using Internet technology allows embedded devices tocommunicate with remote servers as well as with one another; the resulting cyber in-frastructure already includes devices in homes, offices, and stores, as well as sensorsthat measure the environment and civil structures such as bridges and dams.

    Many readers have requested that the text be updated to reflect recent changes;many have suggested specific topics and emphasis. Twenty years after its invention,IPv6 is finally gaining acceptance. Voice and video have replaced file transfer as majoruses of the Internet. The sixth edition responds to readers suggestions by reorganizingand updating existing chapters and introducing new material. In particular, chapters onthe early applications of Telnet and FTP have been eliminated to make space for newermaterial. A new chapter on the Internet of Things considers the use of TCP/IP in awireless sensor network. A new chapter on Software Defined Networking examines theuse of OpenFlow which, although is it not an IETF standard, has become an importantpart of network and Internet management.

    To satisfy an oft-repeated request, the chapter on protocol layering has been movedearlier in the text. Instructors are warned, however, that layering is not a rigid architec-ture that explains all protocols. Students should see it as a basic but somewhat simplis-tic guideline that helps us understand protocols. In Chapter 30, for example, we learnthat the protocols for a route-over mesh blur the boundaries between layers by addingshims and blending IP forwarding with Layer 2 reachability.

    Each chapter has been updated to focus on ideas and technologies that are now be-ing used in the Internet. The most significant change consists of integrating the IPv6discussion with that of IPv4. Each chapter describes a principle, explains the generaldesign, and then proceeds to explain how the principle applies to IPv4 and IPv6.Readers will see that the two versions of IP are closely interrelated and that it is impos-sible to understand the changes introduced by IPv6 without understanding IPv4.

  • xxvi Preface

    Like earlier editions, which have been extremely popular, the entire text focuses onconcepts and principles. Early chapters describe the motivation for internetworking andgive the fundamentals of the TCP/IP internet technology. We will see that internet-working is a powerful abstraction that allows us to deal with the complexity of multipleunderlying communication technologies by hiding the details of network hardware. Wewill understand the network level services that an internet provides and see how appli-cations use the services. Later chapters fill in details. The text reviews both the archi-tecture of network interconnections and the principles underlying protocols that makesuch interconnected networks function as a single, unified communication system.

    After reading the book, you will understand how it is possible to interconnect mul-tiple physical networks into a coordinated system, how internet protocols operate in thatenvironment, and how application programs use the resulting system. As a specific ex-ample, you will learn the details of the global TCP/IP Internet, including the architec-ture of its router system and the application protocols it supports. In addition, you willunderstand some of the limitations of the internet approach and the TCP/IP protocols.

    Designed as both a college text and as a professional reference, the book is writtenat an advanced undergraduate or graduate level. For professionals, the book provides acomprehensive introduction to the TCP/IP technology and the architecture of the Inter-net. Although it is not intended to replace protocol standards documents, the book is anexcellent starting point for learning about internetworking because it provides a uniformoverview that emphasizes principles. Moreover, it gives the reader perspective that canbe extremely difficult to obtain from individual protocol documents.

    When used in the classroom, the text provides more than sufficient material for asingle semester network course at either the undergraduate or graduate level. In a gra-duate course, I urge professors to include significant design and implementation projectsas well as readings from the literature that provide a basis for further exploration.Many of the exercises suggest such subtleties; solving them often requires students toread protocol standards and apply creative energy to comprehend consequences. Forundergraduate courses, many of the details are unnecessary. Students should be expect-ed to grasp the basic concepts described in the text, and they should be able to describeand use the fundamental protocols.

    At all levels, hands-on experience sharpens the concepts and helps students gainintuition. Thus, I encourage instructors to invent projects that give students opportuni-ties to use Internet services and protocols. In an undergraduate course, most of the pro-jects will consist of writing applications that use the network. In my undergraduatecourse, I have students write a simplified network analyzer (i.e., given a packet inbinary, print the value of each field). The semester project in my graduate Internet-working course at Purdue requires students to build significant IP protocol software; thetraditional project involves implementing an IP router. We supply hardware and thesource code for an operating system, including device drivers for network interfaces;students build a working router that interconnects three networks with different MTUs.The course is extremely rigorous, students work in teams, and the results have been im-pressive (many industries recruit graduates from the course). Although such experimen-tation is safest when the instructional laboratory network is isolated from production

  • Preface xxvii

    computing facilities, we have found that students exhibit the most enthusiasm, andbenefit the most, when they have access to the global Internet and can test that theirprotocols interoperate with commercial versions.

    The book is organized into five main parts. Chapters 1 and 2 form an introductionthat provides an overview and discusses existing network technologies. In particular,Chapter 2 reviews physical network hardware. The intention is to provide basic intui-tion about the functionality the hardware supplies and what is possible, not to spendinordinate time on hardware details. Chapters 311 describe the TCP/IP Internet fromthe viewpoint of a single host, showing the protocols a host contains and how theyoperate. They cover the internet abstraction, the notion of protocol layering, the basicsof Internet addressing and forwarding, and transport protocols. Chapters 1214 consid-er the architecture of an internet when viewed globally. They explore routing architec-ture and the protocols routers use to exchange routing information. Chapters 1519consider variations and extensions of the basic technology, including multicasting, pack-et classification, network virtualization, and mobility. In particular, the chapter on mo-bility explains why mobility is difficult in an IP network. Finally, Chapters 2030 dis-cuss application level services available in the Internet (including network manage-ment), network security, and the Internet of Things. The chapters present the client-server model of interaction, give several examples of applications that use the client-server model, and show how client-server interaction applies to computer bootstrap andnetwork management. Chapter 28 explains a new approach to network managementknown as Software Defined Networking (SDN) and the chief protocol, OpenFlow.Although not an official part of the TCP/IP standards, SDN technology has been includ-ed because it has generated considerable excitement.

    The chapters have been organized bottom up. Instead of starting by viewing theInternet as a black box and learning how to use it, the text begins with an overview ofhardware and continues to add the concepts and protocols needed to create the Internet.The bottom-up view will appeal to anyone who is interested in engineering because itfollows the pattern one uses when building a system. In some classes, professors preferto begin with Chapters 20 and 21 on client-server programming, which permits theirstudents to start writing network applications early. Although writing applications thatuse the Internet is important, I urge professors to also include assignments that help stu-dents understand the underlying technology (i.e., protocols and packets). In one lab as-signment, for example, I have students devise a very basic protocol to contact anotherendpoint and transfer two packets: one contains a file name and the other contains datafor the file. Between the sender and receiver, an application randomly drops, dupli-cates, delays, and changes the contents of the packets. The experiment is carried outwith UDP, making the implementation trivial. However, the students become keenlyaware of how difficult it is to design protocols.

    A modest background is required to understand the material. Readers do not needsophisticated mathematics, nor do they need to know information theory or theoremsfrom data communications; the book describes the physical network as a black boxaround which an internetwork can be built. Readers are expected to have a basic under-standing of computer systems and to be familiar with data structures like stacks, queues,and trees. In addition, a reader should have basic intuition about the services an operat-

  • xxviii Preface

    ing system supplies and the notion that processes can execute concurrently. Priorunderstanding of Internet technology is not assumed: the text states all design principlesclearly, and discusses motivations and consequences.

    Many people deserve credit for contributing suggestions and ideas to various edi-tions of the text over the years. For this edition, a set of reviewers commented on theorganization, items that needed to be updated, and helped check technical details. Ithank Anthony Barnard, Tom Calabrese, Ralph Droms, Tom Edmunds, Raymond Kelso,Lee Kirk, John Lin, Dave Roberts, Gustavo Rodriguez-Rivera, and Bhaskar Sharmawho all reviewed a draft of the manuscript. John and Ralph were especially helpful.Barry Shein contributed the example client-server code in Chapter 21.

    As always, my wife Christine provided the most help. She spent hours with themanuscript, identifying ambiguities, finding inconsistencies, and smoothing wording.

    Douglas E. Comer

    March, 2013

  • What Others Have Said About The SixthEdition Of Internetworking With TCP/IP

    This is the book I go to for clear explanations of the basic principles and latestdevelopments in TCP/IP technologies. Its a must have reference for net-working professionals.

    Dr. Ralph DromsCisco SystemsChair of the DHCP working group

    Excellent book! Thank you!Henrik SundinNTI GymnasietStockholm, Sweden

    The 6th Edition of Comers classic Internetworking documents the ongoingand accelerating evolution of the Internet, while predicting the future with un-matched understanding and clarity.

    Dr. Paul V. MockapetrisInventor of the Domain Name System

    . . . a true masterpiece.Mr. Javier SandinoSystems Engineer

    The best-written TCP/IP book I have ever read. Dr. Comer explains complexideas clearly, with excellent diagrams and explanations. With this edition, Dr.Comer makes this classic textbook contemporary.

    Dr. John LinBell Laboratories

  • This update to the definitive reference for the Internets key technologies con-firms Doug Comers reputation for clear and accurate presentation of essentialinformation; it should be the cornerstone of any Internet professionals li-brary.

    Dr. Lyman ChapinInterisle Consulting GroupFormer IAB Chair

    One of the greatest books I have read. True genius is when you are not onlyfluent in your field, but can get your point across simply. Thank you Dr.Comer for writing a great book!

    Marvin E. MillerCIO, The ACS Corporation

    In a world of complexity, the ability to convey knowledge as opposed to in-formation from a search engine is quite hard. Few make it seem as easy asDoug Comer, whose book Internetworking Volume 1 continues to play a keyrole in teaching us about the role of protocols in the ever-changing Internet.

    Dr. Balachander KrishnamurthyAT&T Labs

    Rapid evolution of the Internet is happening as the entire world uses the Inter-net on a daily, hourly, or even continuous basis (as is the case with mygrandchildren). Comer accurately tracks the relevant technological underpin-nings for those building the Internet today.

    Dan LynchFounder, INTEROP

  • About The Author

    Dr. Douglas Comer, Distinguished Professor of Computer Science at Pur-due University and former VP of Research at Cisco, is an internationally recog-nized expert on computer networking, the TCP/IP protocols, and the Internet.The author of numerous refereed articles and technical books, he is a pioneer inthe development of curriculum and laboratories for research and education.

    A prolific author, Comers popular books have been translated into over 15languages, and are used in industry as well as computer science, engineering,and business departments around the world. His landmark three-volume seriesInternetworking With TCP/IP revolutionized networking and network education.His textbooks and innovative laboratory manuals have and continue to shapegraduate and undergraduate curricula.

    The accuracy and insight of Dr. Comers books reflect his extensive back-ground in computer systems. His research spans both hardware and software.He has created a complete operating system, written device drivers, and imple-mented network protocol software for conventional computers as well as net-work processors. The resulting software has been used by industry in a varietyof products.

    Comer has created and teaches courses on network protocols and computertechnologies for a variety of audiences, including courses for engineers as wellas academic audiences. His innovative educational laboratories allow him andhis students to design and implement working prototypes of large, complex sys-tems, and measure the performance of the resulting prototypes. He continues toteach at industries, universities, and conferences around the world. In addition,Comer consults for industry on the design of computer networks and systems.

    For over eighteen years, Professor Comer served as editor-in-chief of theresearch journal Software Practice and Experience. He is a Fellow of theACM, a Fellow of the Purdue Teaching Academy, and a recipient of numerousawards, including a Usenix Lifetime Achievement award.

    Additional information can be found at:

    www.cs.purdue.edu/people/comer

    and information about Comers books can be found at:

    www.comerbooks.com

  • This page intentionally left blank

  • Other Books In the Internetworking Seriesfrom Douglas Comer and Prentice Hall

    Internetworking With TCP/IP Volume II: Design, Implementation, andInternals (with David Stevens), 3rd edition: 1999, ISBN 0-13-973843-6

    Volume II continues the discussion of Volume I by using code from a running im-plementation of TCP/IP to illustrate all the details.

    Internetworking With TCP/IP Volume III: Client-Server Programmingand Applications (with David Stevens)

    LINUX/POSIX Version: 2000, ISBN 0-13-032071-4AT&T TLI Version: 1994, ISBN 0-13-474230-3Windows Sockets Version: 1997, ISBN 0-13-848714-6

    Volume III describes the fundamental concept of client-server computing used inall network applications. Three versions of Volume III are available for the socket API(Unix), the TLI API (AT&T System V), and the Windows Sockets API (Microsoft).

    Computer Networks And Internets, 5th edition: 2009, ISBN 0-13-606698-9A broad introduction to data communication, networking, internetworking, and

    client-server applications, the text examines the hardware and software components usedin networks, including wired and wireless data transmission, LANs, access technologies,WANs, protocols (including TCP/IP), and network applications.

    The Internet Book: Everything you need to know about computer network-ing and how the Internet works, 4th edition: 2006, ISBN 0-13-233553-0, paperback

    A gentle introduction that explains networking and the Internet, The Internet Bookdoes not assume the reader has a technical background. The book is ideal for someonewho wants to become Internet and computer networking literate; an extensive glossaryof terms and abbreviations is included.

    Network Systems Design Using Network Processors, Intel 2xxx Version,2006, ISBN 0-13-187286-9

    A comprehensive overview of the design and engineering of packet processing sys-tems with network processor technology. The text explains network processor architec-tures, presents designs, and gives example code for a network processor.

    For a complete list of Comers textbooks, see:

    www.comerbooks.com

  • Chapter Contents1.1 The Motivation For Internetworking, 11.2 The TCP/IP Internet, 21.3 Internet Services, 21.4 History And Scope Of The Internet, 61.5 The Internet Architecture Board, 71.6 The IAB Reorganization, 81.7 Internet Request For Comments (RFCs), 81.8 Internet Growth, 91.9 Transition To IPv6, 121.10 Committee Design And The New Version of IP, 121.11 Relationship Between IPv4 And IPv6, 131.12 IPv6 Migration, 141.13 Dual Stack Systems, 151.14 Organization Of The Text, 151.15 Summary, 16

  • 1Introduction And Overview

    1.1 The Motivation For Internetworking

    Internet communication has become a fundamental part of life. Social networks,such as Facebook, provide connections among a group of friends and allow them toshare interests. The World Wide Web contains information about such diverse subjectsas politics, atmospheric conditions, stock prices, crop production, and airline fares.Family and friends use the Internet to share photos and keep in touch with VoIP tele-phone calls and live video chats. Consumers use the Internet to purchase goods andservices and for personal banking. Companies take orders and make payments electron-ically. The move to cloud computing will put more information and services online.

    Although it appears to operate as a unified network, the Internet is not engineeredfrom a single networking technology because no technology suffices for all uses. In-stead, networking hardware is designed for specific situations and budgets. Somegroups need high-speed wired networks to connect computers in a single building. Oth-ers need a low-cost wireless network for a private home. Because low-cost hardwarethat works well inside a building cannot span large geographic distances, an alternativemust be used to connect sites that are thousands of miles apart.

    In the 1970s, a technology was created that makes it possible to interconnect manydisparate individual networks and operate them as a coordinated unit. Known as inter-networking, the technology forms the basis for the Internet by accommodating multiple,diverse underlying hardware technologies, providing a way to interconnect the net-works, and defining a set of communication conventions that the networks use to inter-operate. The internet technology hides the details of network hardware, and permitscomputers to communicate independent of their physical network connections.

    1

  • 2 Introduction And Overview Chap. 1

    Internet technology is an example of open system interconnection. It is called openbecause, unlike proprietary communication systems available from one specific vendor,the specifications are publicly available. Thus, any individual or company can build thehardware and software needed to communicate across the Internet. More important, theentire technology has been designed to foster communication among machines withdiverse hardware architectures, to use almost any packet switched network hardware, toaccommodate a wide variety of applications, and to accommodate arbitrary computeroperating systems.

    1.2 The TCP/IP Internet

    In the 1970s and 1980s, U.S. government agencies realized the importance and po-tential of internet technology, and funded research that made possible a global Internet.This book discusses principles and ideas that resulted from research funded by the De-fense Advanced Research Projects Agency (DARPA). The DARPA technology in-cludes a set of network standards that specify the details of how computers communi-cate, as well as a set of conventions for interconnecting networks and forwarding traffic.Officially named the TCP/IP Internet Protocol Suite and commonly referred to asTCP/IP (after the names of its two main standards), it can be used to communicateacross any set of interconnected networks. For example, TCP/IP can be used to inter-connect a set of networks within a single building, within a physical campus, or amonga set of campuses.

    Although the TCP/IP technology is noteworthy by itself, it is especially interestingbecause its viability has been demonstrated on a large scale. It forms the base technolo-gy for the global Internet that connects approximately two billion individuals in homes,schools, corporations, and governments in virtually all populated areas of the planet.An outstanding success, the Internet demonstrates the viability of the TCP/IP technolo-gy and shows how it can accommodate a wide variety of underlying hardware technol-ogies.

    1.3 Internet Services

    One cannot appreciate the technical details underlying TCP/IP without understand-ing the services it provides. This section reviews internet services briefly, highlightingthe services most users access, and leaves to later chapters the discussion of how com-puters connect to a TCP/IP internet and how the functionality is implemented.

    Much of our discussion of services will focus on standards called protocols. Proto-col specifications, such as those for TCP and IP, define the syntactic and semantic rulesfor communication. They give the details of message formats, describe how a computerresponds when a message arrives, and specify how a computer handles errors or otherabnormal conditions. Most important, protocols allow us to discuss computer commun-ication independent of any particular vendors network hardware. In a sense, protocols

    We will follow the usual convention of capitalizing Internet when referring specifically to the globalInternet, and use lower case to refer to private internets that use TCP/IP technology.

    At various times, DARPA has been called the Advanced Research Projects Agency (ARPA).

  • Sec. 1.3 Internet Services 3

    are to communication what algorithms are to computation. An algorithm allows one tospecify or understand a computation without knowing the details of a particular pro-gramming language or CPU instruction set. Similarly, a communication protocol al-lows one to specify or understand data communication without depending on detailedknowledge of a particular vendors network hardware.

    Hiding the low-level details of communication helps improve productivity inseveral ways. First, because they can use higher-level protocol abstractions, program-mers do not need to learn or remember as many details about a given hardware configu-ration. Thus, they can create new network applications quickly. Second, becausesoftware built using higher-level abstractions are not restricted to a particular computerarchitecture or a particular network hardware, the applications do not need to bechanged when computers or networks are replaced or reconfigured. Third, because ap-plications built using higher-level protocols are independent of the underlying hardware,they can be ported to arbitrary computers. That is, a programmer does not need to builda special version of an application for each type of computer or each type of network.Instead, applications that use high-level abstractions are more general-purpose thesame code can be compiled and run on an arbitrary computer.

    We will see that the details of each service available on the Internet are given by aseparate protocol. The next sections refer to protocols that specify some of theapplication-level services as well as those used to define network-level services. Laterchapters explain each of the protocols in detail.

    1.3.1 Application Level Internet Services

    From a users point of view, the Internet appears to consist of a set of applicationprograms that use the underlying network to carry out useful tasks. We use the term in-teroperability to refer to the ability of diverse computing systems to cooperate in solv-ing computational problems. Because the Internet was designed to accommodateheterogeneous networks and computers, interoperability was a key requirement. Conse-quently, Internet application programs usually exhibit a high degree of interoperability.In fact, most users access applications without understanding the types of computers ornetworks being used, the communication protocols, or even the path data travels fromits source to its destination. Thus, a user might access a web page from a desktop sys-tem connected to a cable modem or from an iPad connected to a 4G wireless network.

    The most popular and widespread Internet application services include:

    World Wide Web. The Web became the largest source of traffic on the global In-ternet between 1994 and 1995, and remains so. Many popular services, includingInternet search (e.g., Google) and social networking (e.g., Facebook), use webtechnology. One estimate attributes approximately one quarter of all Internet traf-fic to Facebook. Although users distinguish among various web-based services,we will see that they all use the same application-level protocol.

    Sudha Madhuri Kanupuru

  • 4 Introduction And Overview Chap. 1

    Cloud Access And Remote Desktop. Cloud computing places computation andstorage facilities in cloud data centers, and arranges for users to access the ser-vices over the Internet. One access technology, known as a remote desktop ser-vice, allows a user to access a computer in a remote data center as if the computeris local. The user only needs an interface device with a screen, keyboard, mouseor touchpad, and a network connection. When the data center computer updatesthe video display, the remote desktop service captures the information, sends itacross the Internet, and displays it on the users screen. When the user moves themouse or presses a key, the remote desktop service sends the information to thedata center. Thus, the user has full access to a powerful PC, but only needs tocarry a basic interface device such as a tablet.

    File Transfer. The file transfer protocol allows users to send or receive a copy ofa data file. Many file downloads, including movie downloads, invoke a filetransfer mechanism. Because they often invoke file transfer from a web page,users may not be aware that a file transfer application has run.

    Electronic Mail (email). Electronic mail, which once accounted for large amountsof Internet traffic, has largely been replaced by web applications. Many usersnow access email through a web application that allows a user to read messages intheir mailbox, select a message for processing, and forward the message or send areply. Once a user specifies sending a message, the underlying system uses anemail transfer protocol to send the message to the recipients mailbox.

    Voice And Video Services. Both streaming video and audio already account for anontrivial fraction of bits transported across the global Internet, and the trend willcontinue. More important, a significant change is occurring; video upload is in-creasing, especially because users are using mobile devices to send video of liveevents.

    We will return to a discussion of applications in later chapters and examine them inmore detail. We will see exactly how applications use the underlying TCP/IP protocols,and why having standards for application protocols has helped ensure that they arewidespread.

    1.3.2 Network-Level Internet Services

    A programmer who creates network applications has an entirely different view ofthe Internet than a user who merely runs applications such as web browsers. At the net-work level, the Internet provides two broad services that all application programs use.While it is unimportant at this time to understand the details of the services, they arefundamental to an overview of TCP/IP:

    Connectionless Packet Delivery Service. Packet delivery, explained in detailthroughout the text, forms the basis for all internet services. Connectionlessdelivery is an abstraction of the service that most packet-switching networks offer.It means simply that a TCP/IP internet forwards small messages from one com-puter to another based on address information carried in the message. Because it

  • Sec. 1.3 Internet Services 5

    forwards each packet independently, an internet does not guarantee reliable, in-order delivery. However, because it maps directly onto most of the underlyinghardware technologies, a connectionless delivery service is extremely efficient.More important, because the design makes connectionless packet delivery thebasis for all internet services, the TCP/IP protocols can accommodate a widerange of network hardware.

    Reliable Stream Transport Service. Most applications require the communicationsoftware to recover automatically from transmission errors, lost packets, orfailures of intermediate switches along the path between sender and receiver.Consequently, most applications need a reliable transport service to handle prob-lems. The Internets reliable stream service allows an application on one comput-er to establish a connection to an application on another computer, and allowsthe applications to transfer arbitrarily large amounts of data across the connectionas if it were a permanent, direct hardware link. Underneath, the communicationprotocols divide the stream of data into small packets and send them one at atime, waiting for the receiver to acknowledge reception.

    Many networks provide basic services similar to those outlined above, so onemight wonder what distinguishes TCP/IP services from others. The primary distin-guishing features are:

    Network Technology Independence. Although it is based on conventional packetswitching technology, TCP/IP is independent of any particular brand or type ofhardware; the global Internet includes a variety of network technologies. TCP/IPprotocols define the unit of data transmission, called a datagram, and specify howto transmit datagrams on a particular network, but nothing in a datagram is tied tospecific hardware.

    Universal Interconnection. The Internet allows any arbitrary pair of computers tocommunicate. Each computer is assigned an address that is universally recog-nized throughout the Internet. Every datagram carries the addresses of its sourceand destination. Intermediate devices use the destination address to make for-warding decisions; a sender only needs to know the address of a recipient and theInternet takes care of forwarding datagrams.

    End-to-End Acknowledgements. The TCP/IP Internet protocols provide acknowl-edgements between the original source and ultimate destination instead ofbetween successive machines along the path, even if the source and destination donot connect to a common physical network.

    Application Protocol Standards. In addition to the basic transport-level services(like reliable stream connections), the TCP/IP protocols include standards formany common applications, including protocols that specify how to access a webpage, transfer a file, and send email. Thus, when designing applications that useTCP/IP, programmers often find that existing application protocols provide thecommunication services they need.

    Later chapters discuss the details of the services provided to the programmer as well asexamples of application protocol standards.

  • 6 Introduction And Overview Chap. 1

    1.4 History And Scope Of The Internet

    Part of what makes the TCP/IP technology so exciting is its universal adoption, aswell as the size and growth rate of the global Internet. DARPA began working towardan internet technology in the mid 1970s, with the architecture and protocols taking theircurrent form around 197779. At that time, DARPA was known as the primary fundingagency for packet-switched network research, and pioneered many ideas in packet-switching with its well-known ARPANET. The ARPANET used conventional point-to-point leased line interconnections, but DARPA also funded exploration of packet-switching over radio networks and satellite communication channels. Indeed, the grow-ing diversity of network hardware technologies helped force DARPA to study networkinterconnection, and pushed internetworking forward.

    The availability of research funding from DARPA caught the attention and imagi-nation of several research groups, especially those researchers who had previous experi-ence using packet switching on the ARPANET. DARPA scheduled informal meetingsof researchers to share ideas and discuss results of experiments. Informally, the groupwas known as the Internet Research Group. By 1979, so many researchers were in-volved in the TCP/IP effort that DARPA created an informal committee to coordinateand guide the design of the protocols and architecture of the emerging Internet. Calledthe Internet Control and Configuration Board (ICCB), the group met regularly until1983, when it was reorganized.

    The global Internet began around 1980 when DARPA started converting computersattached to its research networks to the new TCP/IP protocols. The ARPANET, alreadyin place, quickly became the backbone of the new Internet and was used for many ofthe early experiments with TCP/IP. The transition to Internet technology became com-plete in January 1983 when the Office of the Secretary of Defense mandated that allcomputers connected to long-haul networks use TCP/IP. At the same time, the DefenseCommunication Agency (DCA) split the ARPANET into two separate networks, one forfurther research and one for military communication. The research part retained thename ARPANET; the military part, which was somewhat larger, became known as themilitary network (MILNET).

    To encourage university researchers to adopt and use the new protocols, DARPAmade an implementation available at low cost. At that time, most university computerscience departments were running a version of the UNIX operating system available inthe University of Californias Berkeley Software Distribution, commonly called BSDUNIX. By funding Bolt Beranek and Newman, Incorporated (BBN) to implement itsTCP/IP protocols for use with UNIX and funding Berkeley to integrate the protocolswith its software distribution, DARPA was able to reach over 90% of university com-puter science departments. The new protocol software came at a particularly significanttime because many departments were just acquiring second or third computers and con-necting them together with local area networks. The departments needed communica-tion protocols that provided application services such as file transfer.

    Besides a set of utility programs, Berkeley UNIX created a new operating systemabstraction known as a socket to allow applications to access the Internet protocols. A

  • Sec. 1.4 History And Scope Of The Internet 7

    generalization of the UNIX mechanism for I/O, the socket interface has options for oth-er network protocols besides TCP/IP. The introduction of the socket abstraction wasimportant because it allowed programmers to use TCP/IP protocols with little effort.The socket interface has become a de facto standard, and is now used in most operatingsystems.

    Realizing that network communication would soon be a crucial part of scientificresearch, the National Science Foundation (NSF) took an active role in expanding theTCP/IP Internet to reach as many scientists as possible. In the late 1970s, NSF fundeda project known as the Computer Science NETwork (CSNET), which had as its goalconnecting all computer scientists. Starting in 1985, NSF began a program to establishaccess networks centered around its six supercomputer centers, and in 1986 expandednetworking efforts by funding a new wide area backbone network, known as theNSFNET backbone. NSF also provided seed money for regional networks, each ofwhich connected major scientific research institutions in a given area.

    By 1984, the Internet reached over 1,000 computers. In 1987, the size grew toover 10,000. By 1990, the size topped 100,000, and by 1993, exceeded 1,000,000. In1997, more than 10,000,000 computers were permanently attached to the Internet, andin 2001, the size exceeded 100,000,000. In 2011, the Internet reached over 800,000,000permanently-attached computers.

    The early growth of the Internet did not occur merely because universities andgovernment-funded groups adopted the protocols. Major computer corporations con-nected to the Internet, as did many other large corporations including oil companies, theauto industry, electronics firms, pharmaceutical companies, and telecommunications car-riers. Medium and small companies began connecting in the 1990s. In addition, manycompanies experimented by using TCP/IP protocols on their internal corporate intranetsbefore they chose to be part of the global Internet.

    1.5 The Internet Architecture Board

    Because the TCP/IP Internet protocol suite did not arise from a specific vendor orfrom a recognized professional society, it is natural to ask, who set the technical direc-tion and decided when protocols became standard? The answer is a group known asthe Internet Architecture Board (IAB) that was formed in 1983 when DARPA reorgan-ized the Internet Control and Configuration Board. The IAB provided the focus andcoordination for much of the research and development underlying the TCP/IP proto-cols, and guided the evolution of the Internet. The IAB decided which protocols were arequired part of the TCP/IP suite and set official policies.

    IAB originally stood for Internet Activities Board.

  • 8 Introduction And Overview Chap. 1

    1.6 The IAB Reorganization

    By the summer of 1989, both the TCP/IP technology and the Internet had grownbeyond the initial research project into production facilities upon which thousands ofpeople depended for daily business. It was no longer possible to introduce new ideasby changing a few installations overnight. To a large extent, the hundreds of commer-cial companies that offered TCP/IP products determined whether their products wouldinteroperate by deciding when to incorporate protocol changes in their software.Researchers who drafted specifications and tested new ideas in laboratories could nolonger expect instant acceptance and use of the ideas. It was ironic that the researcherswho designed and watched TCP/IP develop found themselves overcome by the com-mercial success of their brainchild. In short, the TCP/IP protocols and the Internet be-came a successful production technology, and the marketplace began to dominate itsevolution.

    To reflect the political and commercial realities of both TCP/IP and the Internet,the IAB was reorganized in the summer of 1989. Researchers were moved from theIAB itself to a subsidiary group known as the Internet Research Task Force (IRTF), anda new IAB board was constituted to include representatives from the wider community.Responsibility for protocol standards and other technical aspects passed to a groupknown as the Internet Engineering Task Force (IETF).

    The IETF existed in the original IAB structure, and its success provided part of themotivation for reorganization. Unlike most IAB task forces, which were limited to afew individuals who focused on one specific issue, the IETF was large before thereorganization, it had grown to include dozens of active members who worked on manyproblems concurrently. Following the reorganization, the IETF was divided into over20 working groups, each of which focused on a specific problem.

    Because the IETF was too large for a single chairperson to manage, it has been di-vided into a set of approximately one dozen areas, each with its own manager. TheIETF chairperson and the area managers constitute the Internet Engineering SteeringGroup (IESG), the individuals responsible for coordinating the efforts of IETF workinggroups. The name IETF now refers to the entire body, including the chairperson, areamanagers, and all members of working groups.

    1.7 Internet Request For Comments (RFCs)We have said that no vendor owns the TCP/IP technology, nor does any profes-

    sional society or standards body. Thus, the documentation of protocols, standards, andpolicies cannot be obtained from a vendor. Instead, the IETF manages the standardiza-tion process. The resulting protocol documents are kept in an on-line repository andmade available at no charge.

    Documentation of work on the Internet, proposals for new or revised protocols, andTCP/IP protocol standards all appear in a series of technical reports called Internet Re-quests For Comments, or RFCs. RFCs can be short or long, can cover broad concepts

  • Sec. 1.7 Internet Request For Comments (RFCs) 9

    or details, and can be standards or merely proposals for new protocols. There are refer-ences to RFCs throughout the text. While RFCs are not refereed in the same way asacademic research papers, they are reviewed and edited. For many years, a single indi-vidual, the late Jon Postel, served as the RFC editor. The task of editing RFCs nowfalls to area managers of the IETF; the IESG as a whole approves new RFCs.

    The RFC series is numbered sequentially in the chronological order RFCs are writ-ten. Each new or revised RFC is assigned a new number, so readers must be careful toobtain the highest numbered version of a document; an RFC index is available to helpidentify the correct version. In addition, preliminary versions of RFC documents, whichare known as Internet drafts, are available.

    RFCs and Internet Drafts can be obtained from:

    www.ietf.org

    1.8 Internet Growth

    The Internet has grown rapidly and continues to evolve. New protocols are beingproposed; old ones are being revised. The most significant demand on the underlyingtechnology does not arise from added network connections, but from additional traffic.As new users connect to the Internet and new applications appear, traffic patternschange. For example, when the World Wide Web was introduced, it became incrediblypopular, and Internet traffic increased dramatically. Later, when music sharing becamepopular, traffic patterns changed again. More changes are occurring as the Internet isused for telephone, video, and social networking.

    Figure 1.1 summarizes expansion of the Internet, and illustrates an important com-ponent of growth: much of the change in complexity has arisen because multiple groupsnow manage various parts of the whole.

    Number ofnetworks

    Number ofcomputers

    Number ofusers

    Number ofmanagers

    1980 10 102 102 100

    1990 103 105 106 101

    2000 105 107 108 102

    2010 106 108 109 103

    Figure 1.1 Growth of the Internet. In addition to increases in traffic, com-plexity has resulted from decentralized management.

  • 10 Introduction And Overview Chap. 1

    The number of computers attached to the Internet helps illustrate the growth. Figure 1.2contains a plot.

    1981 1985 1990 1995 2000 2005 20100M

    100M

    200M

    300M

    400M

    500M

    600M

    700M

    800M

    900M

    . . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . ... . ..

    . ...

    ..

    ...

    ...

    .

    .

    ..

    .

    .

    ..

    .

    .

    .

    ..

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    ..

    .

    .

    .

    ..

    .

    .

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    .

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    .

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    Figure 1.2 Computers on the Internet as a function of the year (linear scale).

    The plot makes it appear that the Internet did not start to grow until the late 1990s.However, the linear scale hides an important point: even in the early Internet, thegrowth rate was high. Figure 1.3 shows the same data plotted on a log scale. The fig-ure reveals that although the count of computers was much smaller, some of the most

  • Sec. 1.8 Internet Growth 11

    rapid growth occurred in the late 1980s when the Internet grew from 1,000 computers toover 10,000 computers.

    1981 1985 1990 1995 2000 2005 2010

    102

    103

    104

    105

    106

    107

    108

    109

    ..

    ...

    .

    .

    .

    .

    .

    ..

    .

    .

    .

    ..

    .

    .

    .

    .

    ...

    ...

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    .

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    .

    .

    .

    ..

    .

    .

    .

    ..

    .

    .

    .

    ..

    .

    .

    .

    ..

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    ..

    .

    .

    .

    .

    ..

    .

    .

    .

    ..

    .

    .

    .

    .

    ..

    .

    .

    .

    ..

    .

    .

    .

    ..

    .

    .

    .

    ..

    .

    .

    ...

    ...

    .

    .

    ..

    .

    .

    ..

    .

    .

    ...

    ...

    .

    .

    ...

    ...

    ..

    ...

    ..

    Figure 1.3 Computers on the Internet as a function of the year (log scale).

    The count of computers is not the only significant change. Because the technologywas developed when a single person at DARPA had control of all aspects of the Inter-net, the designs of many subsystems depended on centralized management and control.

  • 12 Introduction And Overview Chap. 1

    As the Internet grew, responsibility and control were divided among multiple organiza-tions. In particular, as the Internet became global, the operation and management need-ed to span multiple countries. Much of the effort since the early 1990s has been direct-ed toward finding ways to extend the design to accommodate decentralized manage-ment.

    1.9 Transition To IPv6

    Evolution of TCP/IP technology has always been intertwined with evolution of theglobal Internet. With billions of users at sites around the world depending on the globalInternet as part of their daily routine, it might appear that we have passed the earlystages of development and now have reached a stable production facility. Despite ap-pearances, however, neither the Internet nor the TCP/IP protocol suite is static. Innova-tion continues as new applications are developed and new technologies are used to im-prove underlying mechanisms.

    One of the most significant efforts involves a revision of the Internet Protocol, thefoundation of all Internet communication. The change may seem surprising, given thesuccess of the existing version of IP.

    Why change? The current version of the Internet Protocol, IPv4, has been remark-able. It was the first working version, and has remained almost unchanged since its in-ception in the late 1970s. Its longevity shows that IPv4 is flexible and powerful. Sincethe time IPv4 was designed, processor performance has increased over four orders ofmagnitude, typical memory sizes have increased by a factor of 2000, bandwidth of thehighest-speed links in the Internet has risen by a factor of 1,000,000. Wireless technol-ogies have emerged, and the number of hosts on the Internet has risen from a handful tohundreds of millions.

    Despite the success of IPv4, critics started arguing in the early 1990s that IPv4 wasinsufficient for new applications, such as voice and video, and that growth of the Inter-net would quickly exhaust the set of available addresses. Since then, two things havebecome apparent: applications such as digital telephony do work well over IPv4, and re-visions to the Internet addressing mechanism produce sufficient addresses to last anoth-er decade. However, if we assign an IP address to each device (e.g., each smart appli-ance, each car, each mobile phone), the address space will indeed run out.

    1.10 Committee Design And The New Version of IP

    It took several years for the IETF to formulate a new version of IP. Because theIETF produces open standards, representatives from the many communities were invitedto participate in the process. Computer manufacturers, hardware and software vendors,users, managers, programmers, telephone companies, and the cable television industryall specified their requirements for the next version of IP, and all commented on specif-ic proposals.

  • Sec. 1.10 Committee Design And The New Version of IP 13

    Many designs were proposed to serve a particular purpose or a particular commu-nity. In the end, the group produced an extended design that included ideas fromseveral earlier proposals. The IETF assigned the revision of IP version number 6, andnamed it IPv6.

    1.11 Relationship Between IPv4 And IPv6

    Although proponents wanted to create a complete new Internet, IPv6 inheritedmany of the design principles and features of IPv4. Consequently, IPv6 cannot be un-derstood in isolation we need to review general principles, understand how they areimplemented in IPv4, and then see how they are modified or extended in IPv6. For ex-ample, IPv6 uses a hierarchical design for addresses that is inherited directly from IPv4classless addressing; the use of address masks and even some of the terminology hasbeen derived from IPv4. In fact, IPv6 includes all the existing IPv4 addresses as onesubset of the new set of addresses. Therefore, throughout the text, we will discuss prin-ciples and concepts, study their implementation in IPv4, and then look at IPv6 exten-sions and modifications.

    How does IPv6 differ? The standards state that IPv6 retains many features thatcontributed to the success of IPv4. In fact, the designers characterize IPv6 as being ba-sically the same as IPv4 with only minor modifications. For example, both IPv4 andIPv6 use a connectionless delivery paradigm, allow the sender to choose the size of databeing sent, and require the sender to specify the maximum number of hops a datagramcan make before being terminated. IPv6 retains many of the other IPv4 facilities, suchas fragmentation. The important point is:

    Because IPv6 inherits many of the concepts, principles, and mecha-nisms found in IPv4, we cannot understand IPv6 without understand-ing IPv4; both are presented throughout the text.

    Despite conceptual similarities, IPv6 changes most of the protocol details. IPv6uses larger addresses and completely revises the format of packets. The changes intro-duced by IPv6 can be grouped into seven categories:

    Larger Addresses. The new address size is the most noticeable change.IPv6 quadruples the size of an IPv4 address from 32 bits to 128 bits.

    Extended Address Hierarchy. IPv6 uses the larger address space to createadditional levels of addressing hierarchy (e.g., to allow an ISP to allocateblocks of addresses to each customer).New Header Format. IPv6 uses an entirely new and incompatible packetformat that includes a set of optional headers.

    To avoid confusion and ambiguity, version number 5 was skipped; problems had arisen from a series ofmistakes and misunderstandings.

  • 14 Introduction And Overview Chap. 1

    Improved Options. IPv6 allows a packet to include optional control infor-mation not available in IPv4.

    Provision For Protocol Extension. Instead of specifying all details, theIPv6 extension capability allows the IETF to adapt the protocol to new net-work hardware and new applications.

    Support For Autoconfiguration And Renumbering. IPv6 allows a site tochange from one ISP to another by automating the requisite addresschanges.

    Support For Resource Allocation. IPv6 includes a flow abstraction and al-lows differentiated services

    1.12 IPv6 Migration

    How can the Internet change from IPv4 to IPv6? The designers considered thequestion carefully. By the 1990s, the Internet had already grown too large to simplytake it offline, change every host and router, and then reboot. So, the designers plannedto phase in the change gradually over time. We use the term IPv6 migration to capturethe concept.

    Many groups have proposed plans for IPv6 migration. The plans can be groupedinto three major approaches as follows:

    A separate IPv6 Internet running in parallelIPv6 islands connected by IPv4 until ISPs install IPv6Gateways that translate between IPv4 and IPv6

    Parallel Internets. Conceptually, the plan calls for ISPs to create a parallel Inter-net running IPv6. In practice, IPv6 and IPv4 can share many of the underlying wiresand network devices (provided the devices are upgraded to handle IPv6). However, ad-dressing and routing used by the two protocol versions will be completely independent.Proponents argue that because IPv6 offers so many advantages, everyone will switch toIPv6, meaning the IPv4 Internet will be decommissioned quickly.

    IPv6 Islands. The plan allows individual organizations to start using IPv6 beforeall ISPs run IPv6. Each organization is an IPv6 island in the midst of an IPv4 ocean.To send a datagram between islands, the IPv6 datagram is wrapped inside an IPv4 da-tagram, sent across the Internet, and then unwrapped when it reaches the destination is-land. As ISPs adopt IPv6, sites can start sending IPv6 to more and more destinationsuntil the entire Internet is using IPv6. Some IPv6 enthusiasts do not like the approachbecause it does not provide enough economic incentive for ISPs to adopt IPv6.

    Gateways And Translation. The third approach uses network devices that translatebetween IPv4 and IPv6. For example, if a site chooses to use IPv6 but their ISP stilluses IPv4, a gateway device can be placed between the site and the ISP to perform

  • Sec. 1.12 IPv6 Migration 15

    translation. The gateway will accept outgoing IPv6 packets, create equivalent IPv4packets, and send the IPv4 packets to the ISP for delivery. Similarly, when an IPv4packet arrives from the ISP, the gateway will create an equivalent IPv6 packet and sendthe IPv6 packet into the organization. Thus, computers in the organization can run IPv6even if the ISP still uses IPv4. Alternatively, a site can use IPv4 even if the rest of theInternet has adopted IPv6.

    Each strategy for migration has advantages and disadvantages. In the end, a cen-tral question arises: what economic incentive does a consumer, enterprise, or an ISPhave to change? Surprisingly, there is little evidence that IPv6 offers much to the aver-age consumer, organization, or provider. Of course there are exceptions. For example,a company whose business model involves the sale of information to advertisers willbenefit greatly if each individual uses a separate IP address, because the company willbe able to track individual habits much more accurately than when a family shares onecomputer or one address. In the end, each of the migration strategies has been used insome places, but none has emerged as a widely accepted consensus.

    1.13 Dual Stack Systems

    Many chapters in this text discuss protocol software, commonly known as a proto-col stack. The impending change to IPv6 has affected the way protocol software isdesigned, especially for individual computers. Most operating systems (e.g., Linux,Windows, and OS-X) are already classified as dual stack. That is, in addition to all thesoftware needed for IPv4, the system contains all the software needed for IPv6. In mostsystems, the two versions do not interact. That is, each side has an IP address and eachside can send and receive packets. However, the addresses differ and neither side usesthe other (or is even aware that the other side exists). The dual-stack idea is closely re-lated to the parallel Internet approach discussed above.

    Dual-stack systems allow applications to choose whether they will use IPv4, IPv6,or both. Older applications continue to use IPv4. However, a dual-stack mechanism al-lows an application to choose dynamically, making migration automatic. For example,consider a browser. If a given URL maps to both an IPv4 address and an IPv6 address,the browser might try to communicate using IPv6 first. If the attempt fails, the browsercan try IPv4. If the computer is connected to an IPv6 network that reaches the destina-tion, IPv6 com