`
`*
`
`,, AIMS
`
` ~
`
`
`AND ARCHITECTURE
`
`VOLUME |
`PRINCIPLES, PROTOCOLS,
`
`DOUGLAS E. COMER
`
`Panasonic-1015
`Page | of 21
`
`Panasonic-1015
`Page 1 of 21
`
`
`
`
`
`Internetworking With TCP/IP
`Vol I:
`Principles, Protocols, and Architecture
`Third Edition
`
`DOUGLASE. COMER
`Department of ComputerSciences
`Purdue University
`West Lafayette, IN 47907
`
`PRENTICE HALL
`EnglewoodCliffs, New Jersey 07632
`
`Page 2 of 21
`
`Panasonic-1015
`
`Panasonic-1015
`Page 2 of 21
`
`
`
`
`
`
`
`
`Includes bibliographical references and index.
`Contents: v. 1. Principles, protocols, and architecture
`ISBN 0-13-216987-8 (v. 1)
`2. Client/server computing,
`1. TCP/IP (Computer network protocol)
`3. Intemetworking (Telecommunication)_I. Title.
`TK5105.585.C66
`1995
`
`fo
`
`“ap
`
`ae
`
`cIP
`
`10987654321
`
`
`Acquisitions editor: ALAN APT
`Production editor:
`IRWIN ZUCKER
`Cover designer: WENDY ALLING JUDY
`Buyer: LORI BULWIN
`
`Editorial assistant: SHIRLEY MCGUIRE
`
`
`WK
`©1995 by Prentice-Hall, Inc
`A Simon & Schuster Company
`EnglewoodCliffs, New Jersey 07632
`
`
`
`All rights reserved. No part of this book may be
`reproduced, in any form or by any means,
`without permission in writing from the publisher.
`
`
`
`The author and publisher of this book have used their best efforts in preparing this book. These efforts include the
`
`development, research, andtesting of the theories and programsto determine their effectiveness. The author and
`publisher make no warranty of any kind, expressed or implied, with regard to these programs or the documentation
`contained in this book. The author and publisher shall not be liable in any event for incidental or consequential damages
`
`in connection with, or arising out of, the furnishing, performance,or use ofthese programs.
`
`
`UNIXis a registered trademark of UNIX System Laboratories, Incorporated
`proNET-10 is a trademark of Proteon Corporation
`LST 11 is a trademark of Digital Equipment Corporation
`Microsoft Windowsis a trademark of Microsoft Corporation
`
`
`Printed in the United States of America
`
`
`
` ISBN O-13-216947-8
`
`
`
`
`
`
`
`
`Prentice-Hall! International (UK) Limited, London
`Prentice-Hall of Australia Pty. Limited, Sydney
`Prentice-Hall Canada Inc., Toronto
`Prentice-Hall Hispanoamericana, S.A., Mexico
`Prentice-Hall of India Private Limited, New Delhi
`Prentice-Hall of Japan, Inc,, Tokyo
`Simon & Schuster Asia Pte. Ltd., Singapore
`Editora Prentice-Hall do Brasil, Ltda., Rio de Janeiro
`
`Panasonic-1015
`Page 3 of 21
`
`
`
`Panasonic-1015
`Page 3 of 21
`
`
`
`Foreword
`
`Preface
`
`Chapter 1
`
`Introduction And Overview
`
`xxi
`
`xxiii
`
`Ll
`1.2
`13
`14
`15
`1.6
`1.7
`IS
`19
`140°
`L141
`112
`
`6
`
`The Motivation For Internetworking
`The TCPIIP Internet
`2
`Internet Services
`3
`History And Scope Of The Internet
`The Internet Architecture Board
`The [AB Reorganization
`9
`The Internet Society
`11
`\1
`Internet Request For Comments
`Internet Protocols And Standardization
`Future Growth And Technology
`12
`Organization Of The Text
`13
`Summary
`14
`
`8
`
`|
`
`12
`
`Chapter 2 Review Of Underlying Network Technologies
`
`tive and easy to
`
`, S
`
`ommunications
`
`1 TCP/IP as the
`the-minute ma-
`of IP, IPng.”
`
`phair
`
`net technology.
`nt crop of ‘au-
`Oise — but no
`Comer shines
`accurateinfor-
`recious few at-
`
`Ig
`
`
`2.1 Introduction=\7
`2.2
`Two Approaches To Network Communication
`18
`forking history.”
`2.3
`Wide Area And Local Area Networks
`19
`24
`Ethernet Technology
`20
`25
`Fiber Distributed Data Interconnect (FDDI)
`2.6
`Asynchronous Transfer Mode
`36
`2.7.
`ARPANET Technology
`37
`2.8
`National Science Foundation Networking
`2.9
`ANSNET
`44
`
`d the latest in-
`the wheat with
`>tworkers grew
`
`32
`
`39
`
`
`
`Panasonic-1015
`Page 4 of 21
`
`Panasonic-1015
`Page 4 of 21
`
`
`
`
`
`
`
`
`2.11 Other Technologies Over Which TCPUP Has Been Used
`2.12
`Summary And Conclusion
`47
`
`44
`
`Chapter 3 Internetworking Concept And Architectural Model
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`— hh
`
`
`59
`Introduction
`4.1
`59
`Universal Identifiers
`4.2
`Three Primary Classes Of IP Addresses
`4.3
`Addresses Specify Network Connections
`4.4
`Network And Broadcast Addresses
`61
`4.5
`Limited Broadcast
`62
`4.6
`Interpreting Zero To Mean “‘This’’
`4.7
`Weaknesses In Internet Addressing
`4.8
`Dotted Decimal Notation
`65
`4.9
`Loopback Address
`65
`4.10
`Summary Of Special Address Conventions
`4/1
`Internet Addressing Authority
`66
`4.12
`67
`An Example
`4.13
`4.14 Network Byte Order
`70
`4.15
`Summary
`
`31
`3.2
`3.3
`34
`3.5
`3.6
`3.7
`3.8
`39
`310
`
`49
`Introduction
`Application-Level Interconnection
`Network-Level Interconnection
`50
`Properties Of The Internet
`51
`Internet Architecture
`52
`Interconnection Through IP Routers
`The User's View
`54
`54
`All Networks Are Equal
`The Unanswered Questions
`Summary
`56
`
`55
`
`49
`
`52
`
`Chapter 4 Internet Addresses
`
`60
`61
`
`66
`
`62
`63
`
`69
`
`Chapter 5 Mapping Internet Addresses To Physical Addresses (ARP)
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`SJ
`5.2
`5.3
`J4
`
`73
`Introduction
`The Address Resolution Problem 73
`Two Types Of Physical Addresses
`74
`Resolution Through Direct Mapping
`
`74
`
`Panasonic-1015
`Page 5 of 21
`
`Panasonic-1015
`Page 5 of 21
`
`
`
`el
`
`49
`
`76
`
`The Address Resolution Cache
`5.6
`ARP Refinements
`77
`5.7.
`Relationship Of ARP To Other Protocols
`58
`ARP Implementation
`77
`59
`5.10 ARP Encapsulation And Identification
`5.11
`ARP Protocol Format
`79
`5.12
`Summary
`81
`
`77
`
`719
`
`Chapter 6 Determining An Internet Address At Startup (RARP)
`
`6.1
`6.2
`6.3
`6.4
`6.5
`
`83
`Introduction
`Reverse Address Resolution Protocol (RARP)
`Timing RARP Transactions
`86
`Primary And Backup RARP Servers
`Summary
`87
`
`86
`
`84
`
`59
`
`Chapter 7 Internet Protocol: Connectionless Datagram Delivery
`
`71
`7.2
`7.3
`7.4
`7.5
`7.6
`7.7
`7.8
`7.9
`
`89
`Introduction
`89
`A Virtual Network
`Internet Architecture And Philosophy
`The Concept Of Unreliable Delivery
`Connectionless Delivery System 91
`Purpose Of The Internet Protocol
`91
`The Internet Datagram 91
`Internet Datagram Options
`Summary
`106
`
`100
`
`90
`90
`
`Chapter 8 Internet Protocol: Routing IP Datagrams
`
`109
`
`Introduction
`109
`5.1
`109
`Routing In An Internet
`8.2
`Direct And Indirect Delivery
`5.3
`Table-Driven IP Routing
`113
`5.4
`ses (ARP)
`73
`
`&.5 Next-Hop Routing=113
`5.6
`Default Routes
`115
`115
`8.7
`Hoast-Specific Routes
`5.8
`The IP Routing Algorithm 116
`5.9
`Routing With IP Addresses
`116
`8.10 Handling Incoming Datagrams
`
`118
`
`111
`
`|recom Oneyral
`
`Panasonic-1015
`
`Panasonic-1015
`Page 6 of 21
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Chapter 10 Subnet And Supernet Address Extensions
`
`
`10.1
`Introduction
`139
`
`10.2
`ReviewOf Relevant Facts
`139
`10.3 Minimizing Network Numbers
`
`10.4
`Transparent Routers
`141
`
`10.5.
`Proxy ARP
`142
`
`143
`10.6
`Subnet Addressing
`
`146
`10.7
`Flexibility In Subnet Address Assignment
`
`10.8—Implementation Of Subnets With Masks—147
`
`10.9
`Subnet Mask Representation
`148
`
`10.10 Routing In The Presence Of Subnets
`
`10.11 The Subnet Routing Algorithm 150
`
`10.12 A Unified Routing Algorithm 151
`
`10.13 Maintenance Of Subnet Masks—152
`
`10.14 Broadcasting To Subnets
`152
`10.15 Supernet Addressing
`153
`1016 The Effect Of Supernetting On Routing
`10.17 Summary
`
`
`|
`
`130
`
`133
`
`140
`
`149
`
`154
`
`
`
`
`
`
`8.12
`
`Summary
`
`119
`
`Chapter 9
`
`Internet Protocol: Error And Control Messages (ICMP)
`
`123
`124
`
`123
`Introduction
`91
`The Internet Control Message Protocol
`9.2
`Error Reporting vs. Error Correction
`9.3
`ICMP Message Delivery
`125
`94
`ICMP Message Format
`126
`95
`Testing Destination Reachability And Status (Ping)
`9.6
`Echo Request And Reply Message Format
`128
`9.7
`Reports Of Unreachable Destinations
`128
`98
`Congestion And Datagram Flow Control
`9.9
`Source Quench Format
`130
`9.10
`131
`Route Change Requests From Routers
`9.31
`9.12 Detecting Circular Or Excessively Long Routes
`913 Reporting Other Problems
`134
`9.14
`Clock Synchronization And Transit Time Estimation
`9.15
`Information Request And Reply Messages
`136
`916 Obtaining A Subnet Mask
`136
`9.17
`Summary
`137
`
`
`
`
`
`155 Panasonic-1015
`
`127
`
`134
`
`Page 7 of 21
`
`Panasonic-1015
`Page 7 of 21
`
`
`
`(ICMP)
`
`123
`
`139
`
`Chapter 11 Protocol Layering
`
`159
`
`160
`
`159
`Introduction
`11d
`159
`The Need For Multiple Protocols
`11.2.
`The Conceptual Layers Of Protocol Software
`11.3.
`Functionality Of The Layers
`163
`11.4
`164
`11.8 X.25 And Its Relation To The [SO Model
`11.6 Differences Between X.25 And Internet Layering
`11.7
`The Protocol Layering Principle
`169
`11.8
`Layering In The Presence Of Network Substructure
`11.9
`Two Important Boundaries In The TCP/IP Model
`11.10 The Disadvantage Of Layering
`174
`11.11 The Basic Idea Behind Multiplexing And Demultiplexing
`11.142 Summary
`176
`
`167
`
`171
`173
`
`174
`
`Chapter 12 User Datagram Protocol (UDP)
`
`179
`
`179
`
`Introduction
`179
`12.1
`Identifying The Ultimate Destination
`12.2
`The User Datagram Protocol
`180
`12.3
`Format Of UDP Messages
`181
`12.4
`UDP Pseudo-Header
`182
`12.5.
`183
`UDP Encapsulation And Protocol Layering
`12.6
`Layering And The UDP Checksum Computation
`12.7.
`12.8 UDP Multiplexing, Demultiplexing, And Ports
`12.9 Reserved And Available UDP Port Numbers
`
`185
`185
`186
`
`12.10 Summary
`
`188
`
`Chapter 13 Reliable Stream Transport Service (TCP)
`
`191
`
`13.)
`
`Introduction
`
`191
`
`191
`The Need For Stream Delivery
`13.2.—
`Properties Of The Reliable Delivery Service
`13.3
`Providing Reliability
`193
`13.4
`195
`The Idea Behind Sliding Windows
`13.5
`198
`The Transmission Control Protocol
`13.6
`199
`Ports, Connections, And Endpoints
`13.7
`
`13.8 Passive And Active Opens—201
`13.9
`Segments, Streams, And Sequence Numbers
`201
`13.10 Variable Window Size And Flow Control
`202
`13.11 TCP Segment Format
`203
`
`192
`
`Page 8 of 21
`
`Panasonic-1015
`
`Panasonic-1015
`Page 8 of 21
`
`
`
`208
`
`211
`
`206
`13.13 Maximum Segment Size Option
`207
`13.14 TCP Checksum Computation
`13.15 Acknowledgements And Retransmission
`13.16 Timeout And Retransmission
`209
`13.17 Accurate Measurement Of Round Trip Samples
`13.18 Karn’s Algorithm And Timer Backoff
`212
`13.19 Responding To High Variance In Delay
`213
`13.20 Response To Congestion
`214
`13.21 Establishing A TCP Connection
`13.22 Initial Sequence Numbers
`217
`13.23 Closing aTCP Connection
`217
`13.24 TCP Connection Reset
`219
`13.25 TCP State Machine
`219
`13.26 Forcing Data Delivery
`221
`13.27 Reserved TCP Port Numbers
`13.28 TCP Performance
`221
`13.29 Silly Window Syndrome And Small Packets
`13.30 Avoiding Silly Window Syndrome
`224
`13.31 Summary
`227
`
`216
`
`221
`
`223
`
`Chapter 14 Routing: Cores, Peers, And Algorithms (GGP)
`
`234
`
`231
`Introduction
`14.1
`232
`The Origin Of Routing Tables
`14.2.—
`14.3. Routing With Partial Information
`233
`14.4 Original Internet Architecture And Cores
`14.5
`Core Routers
`235
`14.6
`Beyond The Core Architecture To Peer Backbones
`14.7 Automatic Route Propagation
`240
`14.8 Vector Distance (Bellman-Ford) Routing
`14.9 Gateway-To-Gateway Protocol (GGP)
`14.10 GGP Message Formats
`243
`14.11 Link-State (SPF) Routing
`245
`14.12 SPF Protocols
`246
`14.13 Summary
`246
`
`240
`242
`
`238
`
`Chapter 15 Routing: Autonomous Systems (EGP)
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`249
`Introduction
`15.1
`
`15.2— Adding Complexity To The Architectural Model
`249
`15.3
`A Fundamental Idea: Extra Hops
`250
`
`
`Panasonic-1015
`Page 9 of 21
`
`Panasonic-1015
`Page 9 of 21
`
`
`
`254
`
`15.5
`Exterior Gateway Protocol (EGP)
`15.6
`EGP Message Header
`255
`256
`EGP Neighbor Acquisition Messages
`15,7
`EGP Neighbor Reachability Messages—257
`15.8
`15.9
`EGP Poll Request Messages
`258
`15.10
`EGP Routing Update Messages
`259
`Measuring From The Receiver’s Perspective
`1511
`15.12
`The Key Restriction Of EGP
`262
`Technical Problems
`264
`15.13
`Decentralization Of Internet Architecture
`15.14
`15.15
`Beyond Autonomous Systems
`264
`15.16
`Summary
`265
`
`261
`
`264
`
`Chapter 16 Routing: In An Autonomous System (RIP, OSPF, HELLO)
`
`267
`
`267
`Introduction
`16.1
`Static Vs. Dynamic Interior Routes
`16.2
`Routing Information Protocol (RIP)
`16.3
`The Hello Protocol
`276
`16.4
`
`16.5 Combining RIP, Hello, And EGP—278
`231
`16.6
`The Open SPF Protocol (OSPF)
`279
`16.7 Routing With Partial Information
`286
`16.8
`Summary
`286
`
`267
`270
`
`Chapter 17 Internet Multicasting (IGMP)
`
`289
`
`289
`290
`
`289
`Introduction
`17.1
`17.2. Hardware Broadcast
`17.3. Hardware Multicast
`174
`IP Multicast
`291
`291
`17.5
`IP Multicast Addresses
`17.6 Mapping IP Multicast To Ethernet Multicast
`17.7
`Extending IP To Handle Multicasting
`293
`17.8
`Internet Group Management Protocol
`294
`17.9
`IGMP Implementation
`294
`17.10 Group Membership State Transitions
`17.11 IGMP Message Format
`296
`297
`17.12 Multicast Address Assignment
`17.13 Propagating Routing Information
`17.14 The Mrouted Program 298
`1715 Summary
`300
`
`295
`
`297
`
`292
`
`249
`
`Page 10 of 21
`
`Panasonic-1015
`
`Panasonic-1015
`Page 10 of 21
`
`
`
`
`
`Chapter 18 TCP/IP Over ATM Networks
`
`303
`
`313
`
`316
`
`311
`
`318
`
`320
`
`
`
`303
`Introduction
`18.1
`
`304
`ATM Hardware
`18.2.
`
`304
`Large ATM Networks
`18.3
`305
`The Logical View Of An ATM Network
`18.4
`
`
`18.5|The Two ATM Connection Paradigms 306
`
`18.6
`Paths, Circuits, And Identifiers
`307
`
`18.7 ATM Cell Transport
`308
`
`308
`18.8 ATM Adaptation Layers
`
`18.9
`AALS Convergence, Segmentation, And Reassembly
`
`18.10 Datagram Encapsulation And IP MTU Size
`311
`
`18.11 Packet Type And Multiplexing
`312
`
`18.12 IP Address Binding In An ATM Network
`
`18.13 Logical IP Subnet Concept
`314
`
`18.14 Connection Management
`315
`
`18.15 Address Binding Within An LIS
`
`18.16 ATMARP Packet Format
`316
`
`
`18.17 Using ATMARP Packets To Determine An Address
`18.18 Obtaining Entries For A Server Database
`320
`
`320
`18.19 Timing Out ATMARPInformation In A Server
`
`18.20 Timing Out ATMARP Information In A Host Or Router
`
`18.21 Summary
`321
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`335
`Introduction
`20.1
`
`The UNIX 1/0 Paradigm And Network HO 336
`20.2
`20.3 Adding Network 1/0 to UNIX 336
`
`20.4
`The Socket Abstraction
`
`
`
`
`337
`
`Chapter 19 Client-Server ModelOf Interaction
`
`325
`
`325
`Introduction
`19.1
`325
`The Client-Server Model
`19.2.)
`A Simple Example: UDP Echo Server
`19.3
`Time And Date Service
`328
`19.4
`The Complexity of Servers
`329
`19.5
`RARP Server
`330
`19.6
`19.7 Alternatives To The Client-Server Model
`19.8
`Summary
`332
`
`326
`
`331
`
`Chapter 20 The SocketInterface
`
`335
`
`Panasonic-1015
`Page 11 of 21
`
`Panasonic-1015
`Page 11 of 21
`
`
`
`303
`
`338
`
`340
`
`344
`
`Socket Inheritance And Termination
`20.6
`Specifying A Local Address
`339
`20.7.
`Connecting Sockets To Destination Addresses
`20.8
`Sending Data Through A Socket
`341
`20.9
`20.10 Receiving Data Through A Socket
`343
`20.11 Obtaining Local And Remote Socket Addresses
`20.12 Obtaining And Setting Socket Options
`345
`20.13 Specifying A Queue Length For A Server
`346
`20.14 How A Server Accepts Connections
`346
`20.15 Servers That Handle Multiple Services
`347
`20.16 Obtaining And Setting Host Names
`348
`20.17 Obtaining And Setting The Internal Host Domain
`2018 BSD UNIX Network Library Calls
`349
`20.19 Network Byte Order Conversion Routines
`20.20 JP Address Manipulation Routines
`351
`20.21 Accessing The Domain Name System—352
`20.22 Obtaining Information About Hosts
`354
`355
`20.23 Obtaining Information About Networks
`355
`20.24 Obtaining Information About Protocols
`20.25 Obtaining Information About Network Services
`20.26 An Example Client
`357
`20.27 An Example Server
`359
`20.28 Summary
`362
`
`349
`
`350
`
`356
`
`320
`
`325
`
`Chapter 21 Bootstrap And Autoconfiguration (BOOTP, DHCP)
`
`365
`
`21.1
`21.2.
`
`365
`Introduction
`The NeedForAnAlternative To RARP
`
`366
`
`
`
`369
`
`370
`
`366
`Using IP To Determine An IP Address
`21.3.
`The BOOTP Retransmission Policy
`367
`21.4
`The BOOTP Message Format
`368
`21.5
`The Two-Step Bootstrap Procedure
`21.6
`21.7 Vendor-Specific Field
`370
`21.8
`The Need For Dynamic Configuration
`21.9 Dynamic Host Configuration
`372
`372
`21.10 Dynamic IP Address Assignment
`335 21.11 Obtaining Multiple Addresses—373
`21.12 Address Acquisition States
`374
`21.13 Early Lease Termination
`374
`21.14 Lease Renewal States
`376
`21.15 DHCP Message Format
`377
`21.16 DHCP Options And Message Type
`
`378
`
`Page 12 of 21
`
`Panasonic-1015
`
`Panasonic-1015
`Page 12 of 21
`
`
`
`22.1
`22.2
`22.3
`224
`22.5
`22.6
`22.7
`22.8
`22.9
`22.10
`22.11
`22.12
`22.13
`22.14
`22.15
`22.16
`22.17
`22.18
`22.19
`22.20
`22.21
`
`384
`
`386
`
`383
`Introduction
`Names For Machines
`Flat Namespace
`384
`385
`Hierarchical Names
`Delegation Of Authority For Names
`Subset Authority
`386
`387
`TCPIP Internet Domain Names
`Official And Unofficial Internet Domain Names
`Items Named And Syntax Of Names
`390
`Mapping Domain Names To Addresses
`391
`Domain Name Resolution
`393
`Efficient Translation
`394
`Caching: The Key To Efficiency
`Domain Server Message Format
`Compressed Name Format
`399
`Abbreviation Of Domain Names
`Inverse Mappings
`400
`Pointer Queries
`401
`Object Types And Resource Record Contents
`Obtaining Authority For A Subdomain
`402
`Summary
`403
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Chapter 23 Applications: Remote Login (TELNET, Rlogin)
`
`
`
`
`407
`Introduction
`23.1
`
`23.2
`Remote Interactive Computing
`407
`23.3
`TELNETProtocol
`408
`
`
`23.4
`410
`Accommodating Heterogeneity
`23.5
`Passing Commands That Control The Remote Side
`
`23.6
`Forcing The Server To Read A Control Function
`
`23.7
`TELNET Options
`414
`
`23.8
`TELNET Option Negotiation
`
`23.9
`Rlogin (BSD UNIX)
`416
`
`23.10
`Summary
`417
`
`
`
`
`
`
`21.19
`
`Summary
`
`380
`
`Chapter 22 The Domain Name System (DNS)
`
`
`
`
`
`388
`
`401
`
`395
`396
`
`399
`
`412
`414
`
`415
`
`Panasonic-1015
`Page 13 of 21
`
`Panasonic-1015
`Page 13 of 21
`
`
`
`383
`
`407
`
`Chapter 24 Applications: File Transfer And Access (FTP, TFTP, NFS)
`
`419
`
`419
`Introduction
`24.1
`419
`File Access And Transfer
`24.2
`420
`243 On-line Shared Access
`421
`24.4
`Sharing By File Transfer
`24.5
`FIP: The Major TCP/IP File Transfer Protocol
`24.6
`FTP Features
`422
`422
`24.7
`FTP Process Model
`248
`TCP Port Number Assignment
`24.9
`The User’s View Of FTP
`424
`24.10 An Example Anonymous FTP Session
`24.11 TFTP
`427
`24.12 NFS
`429
`429
`24.13 NFS Implementation
`24.14 Remote Procedure Call (RPC)
`24.15 Summary
`431
`
`424
`
`430
`
`421
`
`426
`
`Chapter 25 Applications: Electronic Mail (822, SMTP, MIME)
`
`433
`
`433
`Introduction
`25.1
`Electronic Mail
`433
`25.2.
`435
`25.3 Mailbox Names And Aliases
`435
`25.4 Alias Expansion And Mail Forwarding
`25.5
`The Relationship Of Internetworking And Mail
`25.6
`TCPIP Standards For Electronic Mail Service
`25.7.
`Electronic Mail Addresses
`438
`25.8
`Pseudo Domain Addresses
`440
`440
`25.9
`Simple Mail Transfer Protocol (SMTP)
`25.10 The MIME Extension For Non-ASCI Data
`25.11 MIME Multipart Messages
`444
`25.12 Summary
`445
`
`443
`
`436
`438
`
`' Chapter 26 Applications: Internet Management (SNMP, SNMPv2)
`
`447
`
`447
`Introduction
`26.1
`The Level Of Management Protocols
`26.2
`26.3. Architectural Model
`448
`
`20.4—Protocol Architecture 450
`26.5
`Examples of MIB Variables
`451
`26.6
`The Structure Of Management Information
`
`452
`
`447
`
`roOa
`
`Panasonic-1015
`
`Panasonic-1015
`Page 14 of 21
`
`
`
`458
`
`462
`
`Simple Network ManagementProtocol
`26.9
`26.10 SNMP Message Format
`460
`26.11 Example Encoded SNMP Message
`26.12 Summary
`463
`Chapter 27 Summary Of Protocol Dependencies
`27.1
`Introduction
`465
`465
`27.2.
`Protocol Dependencies
`27.3 Application Program Access
`274
`Summary
`468
`
`467
`
`465
`
`471
`
`|
`|
`|
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`r|
`
`
`
`47\
`Introduction
`28.1
`472
`Protecting Resources
`28.2
`472
`The Need For An Information Policy
`28.3
`Communication, Cooperation, And Mutual Mistrust
`28.4.
`28.5 Mechanisms ForInternet Security
`475
`28.6
`Firewalls And Internet Access
`476
`477
`28.7. Multiple Connections And Weakest Links
`28.8.
`Firewall Implementation And High-Speed Hardware
`28.9
` Packet-Level Filters
`479
`480
`28.10 Security And Packet Filter Specification
`28.11 The Consequence Of Restricted Access For Clients
`28.12 Accessing Services Through A Firewall
`481
`28.13 The Details Of Firewall Architecture
`483
`28.14 Stub Network
`484
`28.15 An Alternative Firewall Implementation
`28.16 Monitoring And Logging
`485
`28.17 Summary
`486
`
`Chapter 28 Internet Security And Firewall Design
`
`474
`
`478
`
`481
`
`484
`
`Chapter 29 The Future Of TCP/IP (IPng, IPv6)
`
`489
`
`489
`Introduction
`29.1
`29.2. Why Change TCPIP And The Internet?
`29.3. Motivation For Changing [Pv4
`491
`29.4
`The Road To A NewVersion Of [P_
`29.5
`The Name Of The Next IP
`492
`
`492
`
`490
`
`Panasonic-1015
`Page 15 of 21
`
`Panasonic-1015
`Page 15 of 21
`
`
`
`494
` IPv6 Base Header Format
`29.8
`496
`IPv6 Extension Headers
`29.9
`29.10 Parsing AnIPv6 Datagram 497
`498
`29.1]
`IPv6 Fragmentation And Reassembly
`29.12 The Consequence Of End-To-End Fragmentation
`29.13 IPv6 Source Routing
`500
`29.14 IPv6 Options
`500
`502
`29.15 Size Of The IPv6 Address Space
`502
`29.16 IPv6 Colon Hexadecimal Notation
`503
`29.17. Three Basic IPv6 Address Types
`504
`29.18 The Duality Of Broadcast And Multicast
`29.19 An Engineering Choice And Simulated Broadcast
`29.20 Proposed IPv6 Address Space Assignment
`504
`29.21 [Pyv4 Address Encoding And Transition
`506
`29.22 Providers, Subscribers, And Address Hierarchy
`29.23 Additional Hierarchy
`507
`29.24 Summary
`508
`
`498
`
`504
`
`506
`
`465
`
`471
`
`4
`
`Appendix 1 A Guide To RFCs
`
`511
`
`Appendix 2 Glossary Of Internetworking Terms And Abbreviations
`
`557
`
`Bibliography
`
`Index
`
`591
`
`599
`
`489
`
`Page 16 of 21
`
`Panasonic-1015
`
`Panasonic-1015
`Page 16 of 21
`
`
`
`iF
`
`
`
`.
`
`To handle automated address assignment, the IETF has designed a new protocol.
`Known as the Dynamic Host Configuration Protocol (DHCP), the new protocol extends
`BOOTPin two ways. First, DHCP allows a computer to acquire all the configuration
`information it needs in a single message. For example, in addition to an IP address, a
`DHCP message can contain a subnet mask. Second, DHCP allows a computerto obtain
`an IP address quickly and dynamically. To use DHCP’s dynamic address allocation
`mechanism, a manager must configure a DHCP server by supplying a set of IP ad-
`dresses. Whenever a new computer connects to the network, the new computer contacts
`the server and requests an address. The server chooses one of the addresses the
`managerspecified, and allocates that address to the computer.
`To be completely general, DHCP allows three types of address assignment; a
`manager chooses how DHCPwill respond for each network or for each host. Like
`BOOTP, DHCP allows manual configuration in which a manager can configure a
`specific address for a specific computer. DHCP also permits automatic configuration in
`which a manager allows a DHCPserver to assign a permanent address when a computer
`first attaches to the network. Finally, DHCP permits completely dynamic configuration
`
`in which a server ‘‘loans’’ an address to a computerfor a limited time.
`
`Like BOOTP, DHCP uses the identity of the client to decide how to proceed.
`Whena client contacts a DHCPserver, the client sends an identifier, usually the client’s
`hardware address. The server uses the client’s identifier and the network to which the
`client has connected to determine how to assign the client and IP address. Thus, a
`manager has complete control over how addresses are assigned. A server can be con-
`figured to allocate addresses to specific computers statically (like BOOTP), while allow-
`ing other computers to obtain permanent or temporary addresses dynamically.
`
`21.10 Dynamic IP Address Assignment
`Dynamic address assignment is the most significant and novel aspect of DHCP.
`Unlike the static address assignment used in BOOTP, dynamic address assignmentis
`not a one-to-one mapping, and the server does not need to know the identity of a client
`a priori.
`In particular, a DHCP server can be configured to permit an arbitrary comput-
`er to obtain an IP address and begin communicating. Thus, DHCP makesit possible to
`design systems that autoconfigure. After such a computer has been attached to a net-
`work, the computer uses DHCPto obtain an IP address, and then configures its TCP/IP
`software to use the address. Of course, autoconfiguration is subject to administrative
`restrictions — a manager decides whether each DHCP server allows autoconfiguration.
`To summarize:
`
`Because it allows a host to obtain all the parameters needed for com-
`munication without manual
`intervention, DHCP permits autoconfi-
`guration. Autoconfiguration is, of course, subject to administrative
`constraints.
`
`Page 17 of 21
`
`Panasonic-1015
`
`Panasonic-1015
`Page 17 of 21
`
`
`
`new protocol.
`otocol extends
`configuration
`IP address, a
`puter to obtain
`ress allocation
`set of IP ad-
`
`iputer contacts
`addresses the
`
`assignment; a
`ch host. Like
`n configure a
`mnfiguration in
`en a computer
`configuration
`
`w to proceed.
`lly the client’s
`< to which the
`
`lress. Thus, a
`=r can be con-
`), while allow-
`lly.
`
`ect of DHCP.
`assignmentis
`tity of a client
`trary comput-
`s it possible to
`ched to a net-
`
`res its TCP/IP
`administrative
`configuration.
`
`com-
`confi-
`
`rative
`
`specifies the rules by which the server operates. A DHCP client negotiates use of an
`address by exchanging messages with a server.
`In the exchange, the server provides an
`address for the client, and the client verifies that it accepts the address. Once a client
`has accepted an address, it can begin to use that address for communication.
`Unlike static address assignment, which permanently allocates each IP address to a
`specific host, dynamic address assignment is temporary. We say that a DHCP server
`leases an address to a client for a finite period of time. The server specifies the lease
`period when it allocates the address. During the lease period, the server will not lease
`the same address to another client. At the end of the lease period, however, the client
`must renew the lease or stop using the address.
`Howlong should a DHCPlease last? The optimal time for a lease depends on the
`particular network and the needsof a particular host. For example, to guarantee that ad-
`dresses can be recycled quickly, computers on a network used by students in a universi-
`ty laboratory might have a short lease period (e.g., one hour). By contrast, a corporate
`network might use a lease period of one day or one week. To accommodateall possible
`environments, DHCP does not specify a fixed constant for the lease period.
`Instead, the
`protocol allows a client to request a specific lease period, and allows a server to inform
`the client of the lease period it grants. Thus, a manager can decide how long each
`server should allocate an address to a client.
`In the extreme, DHCPreserves a value for
`infinity to permit a lease to last arbitrarily long like the permanent address assignments
`used in BOOTP.
`
`21.11 Obtaining Multiple Addresses
`
`A multi-homed computer connects to more than one network. When such a com-
`puter boots,
`it may need to obtain configuration information for each ofits interfaces.
`Like a BOOTP message, a DHCP message only provides information about one inter-
`face. A computer with multiple interfaces must handle each interface separately. Thus,
`although we will describe DHCP as if a computer needs only one address, the reader
`must remember that each interface of a multi-homed computer may be at a different
`point in the protocol.
`Both BOOTP and DHCPusethe notion of relay agent to permit a computer to
`contact a server on a nonlocal network. When a relay agent receives a broadcast re-
`. quest from a client, it forwards the request to a server and then returns the reply from
`the server to the host. Relay agents can complicate multi-homed configuration because
`a server may receive multiple requests from the same computer. However, although
`both BOOTP and DHCP usethe term client identifier, we assume that a multihomed
`client sends a value that
`identifies a particular interface (e.g., a unique hardware ad-
`dress). Thus, a server will always be able to distinguish among requests from a mullti-
`homed host, even whenthe server receives such requests via a relay agent.
`
`Panasonic-1015 Page 18 of 21
`
`Panasonic-1015
`Page 18 of 21
`
`
`
`|
`
`|
`
`
`
`|
`
`lJ
`
`When it uses DHCP to obtain an IP address, a client is in one of six states. The
`state transition diagram in Figure 21.4 shows events and messagesthat cause a client to
`changestate.
`Whena clientfirst boots, it enters the JN/TIALIZE state. To start acquiring an IP
`address, the client first contacts all DHCP servers in the local net. To do so, the client
`broadcasts a DHCPDISCOVER message and movestothe state labeled SELECT. Be-
`
`cause the protocol is an extension of BOOTP,the client sends the DHCPDISCOVER
`message in a UDP datagram with the destination port set to the BOOTPport(i.e., port
`67). All DHCPservers on the local net receive the message, and those servers that have
`been programmed to respond to the particular client send a DHCPOFFER message.
`Thus, a client may receive zero or more responses.
`While in state SELECT,
`the client collects DHCPOFFER responses from DHCP
`servers. Each offer contains configuration information for the client along with an IP
`address that the server is offering to lease to the client. The client must choose one of
`the responses(e.g., the first to arrive), and negotiate with the server for a lease. To do
`so, the client sends the server a DHCPREQUEST message, and enters the REQUEST
`state. To acknowledge receipt of the request and start the lease, the server responds by
`sending a DHCPACK. Arrival of the acknowledgement causes the client to move to the
`BOUNDstate, where the client proceeds to use the address. To summarize:
`
`To use DHCP, a host becomes a client by broadcasting a message to
`all servers on the local network. The host then collects offers from
`servers, selects one of the offers, and verifies acceptance with the
`server,
`
`21.13 Early Lease Termination
`
`Wethink of the BOUNDstate as the normal state of operation; a client typically
`remains in the BOUNDstate while it uses the IP address it has acquired.
`If a client has
`secondary storage (e.g., a local disk), the client can store the IP address it was assigned,
`and request the same address whenit restarts again.
`In somecases, however,a client in
`the BOUNDstate may discover it no longer needs an IP address. For example, suppose
`a user attaches a portable computer to a network, uses DHCPto acquire an IP address,
`and then uses TCP/IP to read electronic mail. The user may not know how long read-
`ing mail will require, or the portable computer may allow the server to choose a lease
`period.
`Jn any case, DHCPspecifies a minimum lease period of one hour.
`If after ob-
`taining an IP address, the user discovers that no e-mail messages are waiting to be read,
`the user may choose to shutdownthe portable computer and moveto anotherlocation.
`Whenit no longer needs a lease, DHCPallowsa client to terminate a lease without
`waiting for the lease to expire. Such termination is helpful in cases where neither the
`client nor the server can determine an appropriate lease duration at the time the lease is
`
`Page 19 of 21
`
`Panasonic-1015
`
`Panasonic-1015
`Page 19 of 21
`
`
`
`196, 582
`window size
`Winsock 335, 363, 589
`wireless network 47
`wiring 26
`WON’T (TELNET) 415
`working group 10, 589
`World Wide Web 12, 465, 589
`worm 37, 330
`write 226
`write request 428
`write system call 341
`writev system call 341
`WWw 589
`
`4 X
`
`589
`X-Window System 590
`X.25 39, 45, 589
`X.400 165, 589
`X25NET 44, 589
`XDR_ 430, 467, 590
`XNS_
`107
`
`Z z
`
`ero compression 502
`zone of authority 403, 590
`
`unicast address 290
`universal assignment 186
`universal communication service 59
`universal interconnection 5, 50
`universal time
`105, 328, 588
`unreachable destination 128
`unreliable 91
`unreliable packet delivery 90, 91
`urgent data 205, 414, 418, 588
`URL 588
`user datagram 179, 181, 365
`User Datagram Protocol 180
`user level process
`179
`user process 326
`User to Network Interface 304
`UUCP 440, 588
`
`Vv
`
`VANgateway 45
`vBNS 44, 588
`VCI 307
`vector-distance 240, 588
`very high speed Backbone Network Ser-
`vice 44, 588
`virtual circuit 45, 192, 588
`virtual circuit identifier 307
`virtual path identifier 307
`VPI 307
`
`VPI/VCI 307, 588
`
`Ww
`
`WAN 19, 589
`weak authentication 475
`weakest link axiom 477
`well-known address 291
`well-known port
`186, 221, 589
`whole-file copying 420
`wide area network 19
`wildcard 346
`
`WILL (TELNET) 415
`window 196, 589
`
`91
`
`ol 191, 198
`
`| 427
`
`cast 298
`
`587
`
`Panasonic-1015 Page 20 of 21
`
`Panasonic-1015
`Page 20 of 21
`
`
`
`DOUGLAS E. COMER
`
`Over 200,000 Copies Sold
`“THEclassic text for an introduction to TCP/IP.”
`—Jon Postel, RFC editor and former Deputy Internet Architect
`
`“Although others havetried, there is no better written or organized explanation of the core
`Clee
`—Joel Snyder, Network Computing
`“As an introduction to the TCP/IP protocol suite and its underpinnings,this is an excellent
`book.
`It is also a good reference book to keep around for anyone whois working with
`eee
`—GeorgeV. Neville-Neil, USENIX ;login:
`
`Theall-time best-selling TCP/IP book, Internetworking with TCP/IP,is still THE reference
`for anyone who wantsto learn about or work with the TCP/IP protocol suite. Volume| of
`the series by Douglas Comer provides the most up-to-date conceptualintroduction to
`TCP/IP protocols and the latest developmentsin Internet technology.
`
`Renownedforits clarity and accessibility, this superb text covers wide area (WAN)Internet
`backbonesaswell as local area network (LAN) technologies tike Ethernet and FDDI. The
`text explains address binding (ARP), IP connectionless datagram delivery, error detection,
`multicasting, and routing.
`
`THIS