`
`running a successful network
`
`Kevin Washbum and Jim Evans
`
`A DDISON-WESLEY
`
`BLACKBERRY 1017
`
`,A._";*<1'I
`-wm&m;
`,a'.
`.
`u H.
`_
`,
`" '."
`T. H fikfld a: #-.‘f k
`'7" 25-5,.
`"3' 43-";
`
`SECOND EDITION
`
`TCP/IP
`
`
`
`1
`
`BLACKBERRY 1017
`
`
`
`SF:COND EDIT1ON
`
`TCP/TP
`running a successful network
`
`Kevin Washburn
`Integralis Ltd, Reading
`Jim Evans
`Eclectic Systems, Ch elford
`
`Addison-\Wesley
`
`An imprint or Pearson Education
`England . London New York Reading, N4assachusetts , San Franclsco
`' Don Mills, Ontario Sydney . Tokyo . Slngapore Hong Kong Seoul
`LaPe Town Madrid Mexico City , Amsterdam Munich . Parls . Milan
`
`2
`
`
`
`PEARSON EDUCATION LIMITED
`London Office:
`128 Long Acre
`London WC2E 9AN
`"fel: +44 n2O7 447 2O0O
`Fax: +44 (0)207 240 5771
`
`Head Offrce:
`Edinburgh Gate
`Harlow CM20 2JE
`Tel: +44 (O)L279 623623
`Fax: +44 (0)1279 431059
`
`Website: uww.atul.com f cseng
`
`First published in Great Britain 1996
`
`@ Pearson Education 1996
`
`The rights ofKevin Washburn and Jim Evans to be identilied
`as autlors ofthis work have been asserted by them in accordance
`with the Copyright, Designs and Patents Act 1988'
`
`ISBN 0-201-87711-2
`
`British Library Cataloguing in Publication Data
`A catalogue record for this book is available from the British Library'
`
`Library of Congress Cataloging in Publication Data
`Applied for.
`
`A11 rights reserved.; no part of this publication may be reproduced' stored
`in a retrieval system, or transmitted in any form or by any means' electronic'
`mechanical, photocopying, recording, or otherwise without either the prior
`written permissiott oi th" Publishers or a licence permitting restricted
`.opyi"g i" the United Kingdom issued by the Copyright Licensing Agency Ltd'
`90 Tottenham Court Road, London W1P 0LP'
`
`Theprogramsinthisbookhavebeenincludedfortheirinstructionalvalue.
`fn" p.Uii"tlu" does not offer any warranties or representations in respect of
`their fitness for a particular purpose' nor does the publisher accept any
`liability for any loss or damage arising from their use'
`Many bf the desigrrations used by manufacturers and-sellers to distinguish
`tieir proilucts ar-e claimed as trademarks Pearson Education has made
`every attempt to suppiy trademark information about manufacturers and
`their protlucis mentioned in this book' A list of the trademark designations
`and their owners appears on p. xviii'
`
`109
`
`Tlpeset by Meridian Colour Repro, Pangbourne'
`Printed and bound in the United States ofAmerica'
`Cover designed and illustrated by Arthur Op den Brouw, Reading'
`
`The publishers' policy is to use peper manufactured from sustainable forests'
`
`3
`
`
`
`vll
`
`I 3 4 8
`
`10
`
`13
`
`T4
`
`15
`
`77
`
`19
`
`2l
`22
`
`25
`
`30
`
`31
`
`32
`
`34
`
`36
`
`38
`
`4l
`42
`
`43
`
`45
`
`xt
`
`Contents
`
`Preface
`
`PART I The key implementation decisions
`1
`
`Introducing TCPAP
`The need for internetworking
`OSI and TCPAP initiatives
`TCP/IP as a communications architecture
`Management issues and responsibilities
`Flexibility and control
`Separating the management functions
`Technical decisions
`Summary
`2 Establishing the network foundation
`Planning the supporting network
`Network decisions
`Splitting the network
`Using bridges
`Bridging different technologies
`;
`'Routing'in bridges
`The limits of bridging
`Summary
`
`3
`
`Planning and managing IP addresses
`Identifying a network connection
`Planning the IP address space
`Characteristics ofthe IP address
`
`4
`
`
`
`xii Contents
`Network numbers and host numbers
`The IAB and network number registration
`Autonomous sYstems
`Private network addresses
`Configuring the IP address
`Reserved IP addresses
`Common mistakes in choosing IP addresses
`The organizational structure and the IP address
`SummarY
`
`4
`
`D
`
`Subnetworks and suPernetworks
`Subnetworking and the subnetwork mask
`The subnetwork mask
`Configuring subnet masks
`Difficulties with a single mask
`A class B hierarchical network
`Using different subnet masks
`Supernetworks, bridging and switching
`Summary
`
`Routing
`The need for routers and their management
`What is routing?
`Routers and IP
`Routing advantages
`Routers and the IP address
`Routing tables
`Classless inter-domain routing (CIDR)
`Choosing a routing Protocol
`Configuring routers
`Summary
`
`47
`
`50
`
`53
`
`54
`
`55
`
`55
`
`56
`
`57
`
`60
`
`63
`
`64
`
`65
`
`69
`
`70
`
`rd)
`n.)t()
`
`75
`
`77
`
`79
`
`80
`
`80
`
`80
`
`82
`
`83
`
`85
`
`86
`
`87
`
`89
`
`89
`
`5
`
`
`
`':,"r.1
`
`rn
`
`SSCS
`
`'address
`
`lsk
`
`rg
`
`gement
`
`)R)
`
`47
`
`50
`
`53
`
`54
`
`55
`
`55
`
`bb
`
`57
`60 ./'
`
`63
`
`64
`
`65
`
`69
`
`?0
`dolo
`
`73
`
`75
`
`77
`
`79
`
`80
`
`80
`
`80
`
`82
`
`83
`
`85
`
`86
`
`87
`
`89
`
`89
`
`Contents xiii
`
`6
`
`7
`
`8
`
`The TCPAP upper layers, transport and
`application services
`The transport layers
`WINSOCK
`Open network computing or the network fiIe system
`The X Window System
`
`Teinet
`File transfer protocol
`Trivial file transfer protocol
`Simple mail transfer protocol
`Internet applications - World Wide Web and News
`Summary
`
`System configuration and optimizing perforrnance
`What is performance?
`Performance tuning and optimization
`Planning shared systems
`The effects of tuning
`Determining the changes required
`The effect of network buffers
`NFS and the retransmission timer on wide area links
`Bridging Token Ring and Ethernet - the MTU
`How applications load a network
`Summary
`
`Request for comments
`Current RFCs
`RFC content
`The IAB standards track
`Conformance to RFCs
`Obtaining RFCs
`; Summary
`
`91
`
`92
`
`94
`
`94
`
`96
`
`99
`
`103
`
`105
`
`106
`
`L07
`
`110
`
`111
`
`TLz
`tt2
`113
`
`115
`
`115
`
`116
`tL7
`
`118
`
`119
`
`L27
`
`t29
`130
`
`L32
`
`133
`
`135
`
`135
`
`136
`
`6
`
`
`
`139
`
`L4L
`
`143
`
`L45
`t46
`
`r47
`
`r49
`
`151
`t52
`t52
`
`156
`
`170
`
`,172
`t74
`
`177
`
`L77
`
`L82
`
`183
`
`193
`
`t97
`
`198
`
`199
`
`200
`
`204
`
`208
`
`214
`
`2L6
`
`224
`
`224
`
`Ix
`
`iv Contents
`PART II TechnologY and standards
`
`Introduction
`Protocol layering
`Achieving comPatibilitY
`'Packet' formation
`TCP and OSI
`Summary
`
`10 The physical and datalink layers
`The TCPAP model
`Ethernet
`IEEE and ISO sYstems
`Serial line Internet Protocol
`Point-to-Point Protocol
`PPP authentication protocols - PAP and CHAP
`PPP multilink Protocol
`x.25
`Integrated services digitat network
`Fast Packet sYstems
`Asynchronous transfer mode or cell relay
`Relevant RFCs
`
`'
`
`'
`
`SummarY
`
`11 Internet protocol (IPv4 and IPv6)
`The facilities of IP
`The IPv4 datagram
`Fragmentation and reassemblY
`IP multicasting and IGMP
`Address resolution Protocol
`Reverse address resolution protocol
`ARP and bridging
`
`7
`
`
`
`Proxy ARP
`Internet control message protocol
`Trailer encapsulation
`IPng (IPv6)
`ICMPv6
`
`Relevant RFCs
`
`Summary
`
`12 Transport laYer Protocols
`Ports
`
`1"3
`
`Sockets
`User datagram Protocol
`Transmission control Protocol
`TCP in action
`Relevant RFCs
`
`SummarY
`
`Application layer services
`ClienVserver
`Telnet
`File transfer protocol
`Simple mail transfer protocol
`
`R commands
`Trivial file transfer protocol
`Boot protocol
`Line printer services
`NetBIOS
`Sockets library
`WINSOCK
`
`j
`
`X protocol
`Implications of IPv6 for applications
`Miscellaneous services
`
`Contents xv
`
`227
`
`230
`
`242
`
`243
`
`254
`
`261
`
`263
`
`265
`
`266
`
`267
`
`268
`
`269
`
`274
`
`292
`
`292
`
`295
`
`296
`
`296
`
`304
`
`31r"
`
`316
`
`318
`32r
`
`327
`
`329
`
`oo,
`
`338
`
`338
`
`340
`
`341
`
`8
`
`
`
`xvi Contents
`
`Relevant RFCs
`
`Summary
`
`L4 Working with names
`The hosts file
`
`The domain name system
`
`Domain name servers
`
`Domain name protocol
`
`Using domain name services
`
`Relevant RFCs
`
`Summary
`
`15 The network file system
`NFS architecture
`Remote procedure calls
`External data representation \
`Portmapper
`
`,r
`
`mountd
`
`PC-NFS
`NFS in operation
`NFS testing
`Configuring NFS security
`
`C__onfiguration issues
`
`Relevant RFCs
`
`Summary
`
`1,6 Routing IP
`Principles of routing
`Routing at the end node
`Routing with more than one router
`Routing architectures
`Routing information protocol
`
`344
`
`347
`
`349
`
`350
`
`351
`
`356
`
`357
`
`362
`
`370
`
`371
`
`373
`
`374
`
`375
`
`381
`
`382
`
`384
`
`385
`
`388
`
`392
`
`394
`
`396
`
`398
`
`398
`
`401
`
`402
`
`404
`
`407
`
`409
`
`4L3
`
`9
`
`
`
`. Hello
`Exterior gateway protocol
`Gated
`Open shortest path first
`Type of service routing (TOS)
`Otherrouting protocols
`Relevant RFCs
`Summary
`17 Simple network management protocol
`The need for management systems
`SNMP architecture
`Management information base
`The protocol
`
`Relevant RFCs
`Summary
`18 Configuration and testing
`Configuration
`Debugging and measurement tools
`Finding faults
`Summary
`19 The Internet
`Using the Internet commercially
`Internet applications and their protocols
`Security
`
`Summary
`
`Epilogue
`
`PART III Appendices
`A Contacting the Network Information Centres
`B Obhining RFCs
`
`Contents xvii
`
`422
`
`422
`. 425
`427
`
`436
`/ 6d4Dt
`
`442
`
`443
`
`445
`
`446
`
`448
`
`450
`
`456
`
`462
`
`463
`
`465
`
`466
`
`477
`
`477
`
`487
`
`489
`
`497
`
`494
`
`506
`
`511
`
`513
`
`515
`
`5L7
`
`519
`
`10
`
`
`
`xviii Contents
`C The Internet STD protocols and their RFCs
`D Subnetting a class B address
`E Subnetting a class C address
`F Protocol traces
`G Well-known ports
`H Telnet protocol traces
`I
`FTP traces
`J ASN.I and BER tag types
`
`Index
`
`521
`
`525
`
`529
`
`531
`
`533
`
`54L
`
`553
`
`565
`
`569
`
`Trodemork notice
`MS-DOSR is a registered trademark and WindowsrM is a trademark of Microsoft Corporation
`Sun MicrosystemsR is a registered trademark and NIS'", NFSTM, SunrM and SunNet
`ManagerrM are trademarks of Sun Microsystems Inc.
`UNDCM and Open LookrM are trademarks ofAT&T
`PostScriptR is a registered trademark of Adobe Systems Inc.
`X Window Systemrn is a trademark of the Massachusetts Institute of Technology
`OSF/lVIotiflM, OSFrM and Open Software FoundationrM are trademarks of the Open Software
`Foundation Inc.
`AppleTalkR is a registered trademark and MacintoshrM and TrueTyperM are trademarks of
`Apple Computer Inc.
`XNSrM is a trademark of Xerox Corporation
`Novellt*, NetWarerM and Internet Packet Exchange'M (IPXTM) are trademarks of NoveII Inc.
`ThinWirerM, DECTM, nppt", VAXI", VT100rM, VMSrM and DECr{etrM are trademarks of
`Digital Equipment Corporation
`IBMTM, IBM PC'M, IBM SNATM, IBM NetView 6000rM, PC NetworkrM, NeIBIOSTM, Token
`. RingrM, Presentation ManagerrM and OS/2rM are trademarks of International Business
`Machines Corporation
`Motorola 68000rM is a trademark of Motorola Inc.
`ARCNETTM is a trademark of Datapoint Corporation
`VINESR is a registered trademark of Banyan Systems Inc.
`CompuServerM is a trademark of CompuServe Information Services
`Compulinkt" is a trademark of Compulink Information eXchange Ltd
`ChameleonrM is a trademark of NetManage Inc.
`IntelrM is a trademark of Intel Corporation
`HP OpenViewrM is a trademark of Hewlett-Packard Company
`
`11
`
`
`
`_.t1.
`
`456 Simple neh^/ork monogement protocol
`
`the IP group
`ipForwarding OBJECT-TYPE
`SYNTAX INTEGtrR {
`gaLeway(1), - - entity forwards dataqrams
`host(2) -- entity does NOT forward datagrams
`ACCESS read-only
`STATUS mandatory
`::= { ip 1 }
`ipDefaultTTL OBJECT-TYPE
`SYNTAX ]NTEGER
`ACCESS read-write
`STATUS mandatory
`::= { ip 2 }
`
`iplnReceives OBJECT-TYPE
`SYNTAX Counter
`ACCESS read-on1y
`STATUS mandatory
`;3= { ip 3 }
`iplnHdrErrors OBJECT-TYPE
`SYNTAX CounTer
`ACCESS read-on1y
`STATUS mandatory
`::={ip4}
`
`tigvre 17.7 Port of the lP group from MIB ll.
`
`Figure 17.7 shows the beginning of the IP group from the Internet
`MIB II. The first field is the ipForwardins field which identifies whether
`this host acts as an IP router or just as a host. Notice the field ipDe f aul t -
`TTL. This field is read-wriLe, so a management system (withpuitable
`access rights) can modify the TTL for the IP stack in this host. This there-
`fore allows configuration changes to be performed remotely.
`
`The protocol
`The simple network management protocol provides a mechanism to
`access MIB objects so that they can be read and changed. It also allows a
`device to send unsolicited messages to an SNMP management station to
`indicate that some predefined condition has been met. The message types
`used to perform these functions are:
`get-request
`get-next -request
`
`12
`
`
`
`! I
`
`The protocol 457
`
`(v2 )
`
`get.-bu1k-request
`response
`set-request:
`(v2 )
`inform-request
`(v1)
`trap
`(v2 )
`snmpV2 -trap
`(v2 )
`report
`Vl or V2 indicates message types available only in Vl or V-2- protocol'
`'^ -^
`to as protocol Data units (PDUs),
`trr" *"".uge tvp".'ur" ""f"r"ud
`asinoslstandards.Theget_requesLPDUisusedbyanSNMPnet-
`work management .tatiot'io obtain the value of a specific MIB variable
`from the SNMP management agent in a remote node' The geL-nexL-
`request is similar tolhe get-requesL' except it allows MIB values
`without defining them specifically. get-next-request
`io l"
`"u.uived
`isusedwhereatableofvariables,suchasaroutingtable,exists.
`Theclientwouldnotknowthenumberofvaluesinthetable.Theqet_
`bulk-request is i,ttena"a to reduce network traffic' It is used
`forrequestinglargea-o""t.ofdatafromaclient,especiallyforthe
`retrievll of large tables. It saves sending multiple get-r€quests or
`get-next-."orr."a" to retrieve multiple MIB values' Using get-
`bulk-request they will all be returned in a small number of large
`response PDUs.
`The response PDU is the answer from the management agent to
`g6t * reques t' geL -next - reque st' get -bu 1k- reques L' set - request
`and inform-request. The set-request is used by the management
`stationtochangeMlBvariablesthatcanbealteredinthemanagement
`;;:";j.'ilp"r"riUrfrtv irlo sut u ir1p.fot a defined event or condition
`detected by the -u;;g;;;"i agent. wtr"tt that condition occurs on the
`PDU to the management station'
`node, the agent ,"tJ' ?" ""mpv2"-trap
`at anylime' s9 a management station has
`This message can il;;;;"i;d
`to be listening for tit"lt" to"tl"uously' The inf orm-request is used with
`the manage"-to-*u,,Jg"" iWB, snmpMZM' to allow Tu-11g:T""t stations
`to notify each other of"events and alarms. (The usual SNMP exchange is
`between u -urrug"In""1 station and a management agent') This provides
`for distribut"a munul"ment with multiple management stations cooper-
`ating to manage a large network'
`The snmpv2-trap messages use UDP well-known port number
`162; other PDUs use port number 161' This allows snmpV2-trap mes-
`."g". t" be handled indepen'lently of qet and set'
`The basic format oi SNnAp messages is shown i"-Iig'"lu 17'8' They
`all start with a u"rriorr, which is 0 for version 1, followed by a com-
`munity string. fit" torn-onity string defines a level of authentication
`whichpertainstotf,i,*"ttageandhencedetermineswhetheritwillhave
`sufficient rights ""';1;.t to"make changes or even read the information
`
`in the MIB.
`
`13
`
`