An Introduction To Computer Networks

Transcription

An Introduction to Computer NetworksRelease 2.0.4Peter L DordalJan 03, 2021

CONTENTS0 Preface0.1 Second Edition . . . . .0.2 Licensing . . . . . . . .0.3 Classroom Use . . . . .0.4 Acknowledgments . . .0.5 Progress Notes . . . . .0.6 Technical considerations0.7 A Note On the Cover .0.8 Recent Changes . . . .334578810111 An Overview of Networks1.1 Layers . . . . . . . . . . . . . . . . .1.2 Data Rate, Throughput and Bandwidth1.3 Packets . . . . . . . . . . . . . . . . .1.4 Datagram Forwarding . . . . . . . . .1.5 Topology . . . . . . . . . . . . . . . .1.6 Routing Loops . . . . . . . . . . . . .1.7 Congestion . . . . . . . . . . . . . . .1.8 Packets Again . . . . . . . . . . . . .1.9 LANs and Ethernet . . . . . . . . . .1.10 IP - Internet Protocol . . . . . . . . .1.11 DNS . . . . . . . . . . . . . . . . .1.12 Transport . . . . . . . . . . . . . . .1.13 Firewalls . . . . . . . . . . . . . . .1.14 Some Useful Utilities . . . . . . . . .1.15 IETF and OSI . . . . . . . . . . . . .1.16 Berkeley Unix . . . . . . . . . . . .1.17 Epilog . . . . . . . . . . . . . . . . .1.18 Exercises . . . . . . . . . . . . . . .131314141518192021222430303435374040402 Ethernet Basics2.1 10-Mbps Classic Ethernet2.2 100 Mbps (Fast) Ethernet2.3 Gigabit Ethernet . . . . .2.4 Ethernet Switches . . . .4546575859.i

2.5 Epilog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623 Advanced Ethernet3.1 Spanning Tree Algorithm and Redundancy3.2 Virtual LAN (VLAN) . . . . . . . . . . .3.3 TRILL and SPB . . . . . . . . . . . . . .3.4 Software-Defined Networking . . . . . . .3.5 Epilog . . . . . . . . . . . . . . . . . . .3.6 Exercises . . . . . . . . . . . . . . . . . .4 Wireless LANs4.1 Adventures in Radioland .4.2 Wi-Fi . . . . . . . . . . .4.3 WiMAX and LTE . . . .4.4 Fixed Wireless . . . . . .4.5 Epilog . . . . . . . . . .4.6 Exercises . . . . . . . . .67677276788484.8989931201231261265 Other LANs5.1 Virtual Private Networks . . . . . . .5.2 Carrier Ethernet . . . . . . . . . . .5.3 Token Ring . . . . . . . . . . . . . .5.4 Virtual Circuits . . . . . . . . . . . .5.5 Asynchronous Transfer Mode: ATM5.6 Epilog . . . . . . . . . . . . . . . .5.7 Exercises . . . . . . . . . . . . . . .129129130131132136138138.6 Links6.1 Encoding and Framing . . .6.2 Time-Division Multiplexing6.3 Epilog . . . . . . . . . . .6.4 Exercises . . . . . . . . . .1431431481531537 Packets7.1 Packet Delay . . . . . .7.2 Packet Delay Variability7.3 Packet Size . . . . . . .7.4 Error Detection . . . . .7.5 Epilog . . . . . . . . .7.6 Exercises . . . . . . . .1551551581591611661678 Abstract Sliding Windows8.1 Building Reliable Transport: Stop-and-Wait8.2 Sliding Windows . . . . . . . . . . . . . . .8.3 Linear Bottlenecks . . . . . . . . . . . . . .8.4 Epilog . . . . . . . . . . . . . . . . . . . .8.5 Exercises . . . . . . . . . . . . . . . . . . .171171176179187187ii.

9 IP version 49.1 The IPv4 Header . . . . . . . . . . .9.2 Interfaces . . . . . . . . . . . . . . .9.3 Special Addresses . . . . . . . . . .9.4 Fragmentation . . . . . . . . . . . .9.5 The Classless IP Delivery Algorithm9.6 IPv4 Subnets . . . . . . . . . . . . .9.7 Network Address Translation . . . .9.8 Unnumbered Interfaces . . . . . . .9.9 Mobile IP . . . . . . . . . . . . . .9.10 Epilog . . . . . . . . . . . . . . . .9.11 Exercises . . . . . . . . . . . . . .19319419619819920120521021521621821810 IPv4 Companion Protocols10.1 DNS . . . . . . . . . . . . . . . . . . . . . .10.2 Address Resolution Protocol: ARP . . . . . .10.3 Dynamic Host Configuration Protocol (DHCP)10.4 Internet Control Message Protocol . . . . . . .10.5 Epilog . . . . . . . . . . . . . . . . . . . . . .10.6 Exercises . . . . . . . . . . . . . . . . . . . .22122123323723824224211 IPv611.1 The IPv6 Header . . . . . . . .11.2 IPv6 Addresses . . . . . . . . .11.3 Network Prefixes . . . . . . . .11.4 IPv6 Multicast . . . . . . . . .11.5 IPv6 Extension Headers . . . .11.6 Neighbor Discovery . . . . . .11.7 IPv6 Host Address Assignment11.8 Epilog . . . . . . . . . . . . . .11.9 Exercises . . . . . . . . . . . .24524624724925125125425826326312 IPv6 Additional Features12.1 Globally Exposed Addresses . . .12.2 ICMPv6 . . . . . . . . . . . . . .12.3 IPv6 Subnets . . . . . . . . . . .12.4 Using IPv6 and IPv4 Together . .12.5 IPv6 Examples Without a Router .12.6 IPv6 Connectivity via Tunneling .12.7 IPv6-to-IPv4 Connectivity . . . .12.8 Epilog . . . . . . . . . . . . . . .12.9 Exercises . . . . . . . . . . . . .265265265267268272275278280280.28128228628829013 Routing-Update Algorithms13.1 Distance-Vector Routing-Update Algorithm .13.2 Distance-Vector Slow-Convergence Problem13.3 Observations on Minimizing Route Cost . . .13.4 Loop-Free Distance Vector Algorithms . . .iii

13.513.613.713.813.9Link-State Routing-Update AlgorithmRouting on Other Attributes . . . . .ECMP . . . . . . . . . . . . . . . . .Epilog . . . . . . . . . . . . . . . . .Exercises . . . . . . . . . . . . . . .29630030130230214 Large-Scale IP Routing14.1 Classless Internet Domain Routing: CIDR14.2 Hierarchical Routing . . . . . . . . . . .14.3 Legacy Routing . . . . . . . . . . . . . .14.4 Provider-Based Routing . . . . . . . . .14.5 Geographical Routing . . . . . . . . . .14.6 Epilog . . . . . . . . . . . . . . . . . . .14.7 Exercises . . . . . . . . . . . . . . . . .30930931131231331831931915 Border Gateway Protocol (BGP)15.1 AS-paths . . . . . . . . . . . . . .15.2 AS-Paths and Route Aggregation .15.3 Transit Traffic . . . . . . . . . . . .15.4 BGP Filtering and Routing Policies15.5 BGP Table Size . . . . . . . . . . .15.6 BGP Path attributes . . . . . . . . .15.7 BGP and Traffic Engineering . . . .15.8 BGP and Anycast . . . . . . . . . .15.9 BGP Relationships . . . . . . . . .15.10 Examples of BGP Instability . . .15.11 BGP Security and Route Registries15.12 Epilog . . . . . . . . . . . . . . .15.13 Exercises . . . . . . . . . . . . .32332432632732732933033433733734134334634716 UDP Transport16.1 User Datagram Protocol – UDP . . .16.2 Trivial File Transport Protocol, TFTP16.3 Fundamental Transport Issues . . . .16.4 Other TFTP notes . . . . . . . . . . .16.5 Remote Procedure Call (RPC) . . . .16.6 Epilog . . . . . . . . . . . . . . . . .16.7 Exercises . . . . . . . . . . . . . . .34934936136336837137437517 TCP Transport Basics17.1 The End-to-End Principle . . .17.2 TCP Header . . . . . . . . . . .17.3 TCP Connection Establishment17.4 TCP and WireShark . . . . . .17.5 TCP Offloading . . . . . . . . .17.6 TCP simplex-talk . . . . . . . .17.7 TCP state diagram . . . . . . .17.8 Epilog . . . . . . . . . . . . . .379380380382386388388393398iv.

17.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39818 TCP Issues and Alternatives18.1 TCP Old Duplicates . . . . . . . . .18.2 TIMEWAIT . . . . . . . . . . . . . .18.3 The Three-Way Handshake Revisited18.4 Anomalous TCP scenarios . . . . . .18.5 TCP Faster Opening . . . . . . . . .18.6 Path MTU Discovery . . . . . . . . .18.7 TCP Sliding Windows . . . . . . . .18.8 TCP Delayed ACKs . . . . . . . . .18.9 Nagle Algorithm . . . . . . . . . . .18.10 TCP Flow Control . . . . . . . . . .18.11 Silly Window Syndrome . . . . . .18.12 TCP Timeout and Retransmission .18.13 KeepAlive . . . . . . . . . . . . . .18.14 TCP timers . . . . . . . . . . . . .18.15 Variants and Alternatives . . . . . .18.16 Epilog . . . . . . . . . . . . . . . .18.17 Exercises . . . . . . . . . . . . . 2442419 TCP Reno and Congestion Management19.1 Basics of TCP Congestion Management19.2 Slow Start . . . . . . . . . . . . . . . .19.3 TCP Tahoe and Fast Retransmit . . . .19.4 TCP Reno and Fast Recovery . . . . .19.5 TCP NewReno . . . . . . . . . . . . .19.6 Selective Acknowledgments (SACK) .19.7 TCP and Bottleneck Link Utilization .19.8 Single Packet Losses . . . . . . . . . .19.9 TCP Assumptions and Scalability . . .19.10 TCP Parameters . . . . . . . . . . . .19.11 Epilog . . . . . . . . . . . . . . . . .19.12 Exercises . . . . . . . . . . . . . . .42742843243743844144344444744844944945020 Dynamics of TCP20.1 A First Look At Queuing . . . . . . . . . . . .20.2 Bottleneck Links with Competition . . . . . .20.3 TCP Reno Fairness with Synchronized Losses20.4 Epilog . . . . . . . . . . . . . . . . . . . . . .20.5 Exercises . . . . . . . . . . . . . . . . . . . .45545545646447147121 Further Dynamics of TCP21.1 Notions of Fairness . . . . . . .21.2 TCP Reno loss rate versus cwnd21.3 TCP Friendliness . . . . . . . .21.4 AIMD Revisited . .

9 IP version 4 193 9.1 The IPv4 Header. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194 9.2 Interfaces .