An Introduction to Computer Networks Release 1.0
Total Page:16
File Type:pdf, Size:1020Kb
An Introduction to Computer Networks Release 1.0 Peter L Dordal March 16, 2014 CONTENTS 0 Preface 3 0.1 Classroom Use..........................................3 0.2 Progress Notes..........................................5 0.3 Technical considerations.....................................5 1 An Overview of Networks7 1.1 Layers..............................................7 1.2 Bandwidth and Throughput...................................7 1.3 Packets..............................................8 1.4 Datagram Forwarding......................................9 1.5 Topology............................................. 11 1.6 Routing Loops.......................................... 12 1.7 Congestion............................................ 12 1.8 Packets Again.......................................... 13 1.9 LANs and Ethernet....................................... 14 1.10 IP - Internet Protocol...................................... 16 1.11 DNS.............................................. 21 1.12 Transport............................................ 21 1.13 Firewalls............................................ 24 1.14 Network Address Translation................................. 24 1.15 IETF and OSI.......................................... 26 1.16 Berkeley Unix......................................... 28 1.17 Epilog.............................................. 28 1.18 Exercises............................................ 28 2 Ethernet 31 2.1 10-Mbps classic Ethernet.................................... 31 2.2 100 Mbps (Fast) Ethernet.................................... 40 2.3 Gigabit Ethernet......................................... 41 2.4 Ethernet Switches........................................ 42 2.5 Spanning Tree Algorithm.................................... 44 2.6 Virtual LAN (VLAN)...................................... 48 2.7 Epilog.............................................. 49 2.8 Exercises............................................. 49 i 3 Other LANs 53 3.1 Virtual Private Network..................................... 53 3.2 Carrier Ethernet......................................... 54 3.3 Wi-Fi............................................... 55 3.4 WiMAX............................................. 65 3.5 Fixed Wireless.......................................... 67 3.6 Token Ring............................................ 68 3.7 Virtual Circuits.......................................... 69 3.8 Asynchronous Transfer Mode: ATM.............................. 72 3.9 Epilog.............................................. 74 3.10 Exercises............................................ 75 4 Links 79 4.1 Encoding and Framing...................................... 79 4.2 Time-Division Multiplexing................................... 83 4.3 Epilog.............................................. 87 4.4 Exercises............................................. 87 5 Packets 89 5.1 Packet Delay........................................... 89 5.2 Packet Delay Variability..................................... 92 5.3 Packet Size............................................ 93 5.4 Error Detection.......................................... 95 5.5 Epilog.............................................. 99 5.6 Exercises............................................. 100 6 Abstract Sliding Windows 103 6.1 Building Reliable Transport: Stop-and-Wait.......................... 103 6.2 Sliding Windows......................................... 107 6.3 Linear Bottlenecks........................................ 110 6.4 Epilog.............................................. 117 6.5 Exercises............................................. 117 7 IP version 4 121 7.1 The IPv4 Header......................................... 121 7.2 Interfaces............................................. 123 7.3 Special Addresses........................................ 124 7.4 Fragmentation.......................................... 125 7.5 The Classless IP Delivery Algorithm.............................. 127 7.6 IP Subnets............................................ 128 7.7 Address Resolution Protocol: ARP............................... 134 7.8 Dynamic Host Configuration Protocol (DHCP)......................... 137 7.9 Internet Control Message Protocol............................... 139 7.10 Unnumbered Interfaces..................................... 141 7.11 Mobile IP............................................ 142 7.12 Epilog.............................................. 144 7.13 Exercises............................................ 144 ii 8 IP version 6 147 8.1 The IPv6 Header......................................... 147 8.2 Host identifier.......................................... 149 8.3 Link-local addresses....................................... 149 8.4 Anycast addresses........................................ 149 8.5 Hop-by-Hop Options Header.................................. 151 8.6 Destination Options Header................................... 151 8.7 Routing Header......................................... 151 8.8 Fragment Header......................................... 151 8.9 Router Advertisement...................................... 153 8.10 Prefix Discovery........................................ 154 8.11 Neighbor Solicitation...................................... 154 8.12 Duplicate Address Detection.................................. 155 8.13 Stateless Autoconfiguration (SLAAC)............................. 156 8.14 DHCPv6............................................ 157 8.15 Manual Configuration..................................... 158 8.16 ping6.............................................. 159 8.17 TCP connections with link-local addresses.......................... 160 8.18 Manual address configuration................................. 160 8.19 Node Information Messages.................................. 161 9 Routing-Update Algorithms 163 9.1 Distance-Vector Routing-Update Algorithm.......................... 163 9.2 Distance-Vector Slow-Convergence Problem.......................... 168 9.3 Observations on Minimizing Route Cost............................ 170 9.4 Loop-Free Distance Vector Algorithms............................. 172 9.5 Link-State Routing-Update Algorithm............................. 174 9.6 Routing on Other Attributes................................... 177 9.7 Epilog.............................................. 178 9.8 Exercises............................................. 178 10 Large-Scale IP Routing 183 10.1 Classless Internet Domain Routing: CIDR........................... 183 10.2 Hierarchical Routing...................................... 185 10.3 Legacy Routing......................................... 186 10.4 Provider-Based Routing.................................... 186 10.5 Geographical Routing..................................... 190 10.6 Border Gateway Protocol, BGP................................ 191 10.7 Epilog.............................................. 203 10.8 Exercises............................................ 204 11 UDP Transport 209 11.1 User Datagram Protocol – UDP................................ 209 11.2 Fundamental Transport Issues................................. 216 11.3 Trivial File Transport Protocol, TFTP............................. 217 11.4 TFTP Stop-and-Wait...................................... 218 11.5 TFTP scenarios......................................... 221 11.6 TFTP Throughput....................................... 222 iii 11.7 Remote Procedure Call (RPC)................................. 222 11.8 Epilog.............................................. 225 11.9 Exercises............................................ 226 12 TCP Transport 227 12.1 The End-to-End Principle................................... 228 12.2 TCP Header........................................... 228 12.3 TCP Connection Establishment................................ 229 12.4 TCP and WireShark...................................... 233 12.5 TCP simplex-talk........................................ 234 12.6 TCP state diagram....................................... 238 12.7 TCP Old Duplicates...................................... 240 12.8 TIMEWAIT........................................... 241 12.9 The Three-Way Handshake Revisited............................. 242 12.10 Anomalous TCP scenarios.................................. 244 12.11 TCP Faster Opening...................................... 244 12.12 Path MTU Discovery..................................... 245 12.13 TCP Sliding Windows..................................... 245 12.14 TCP Delayed ACKs...................................... 246 12.15 Nagle Algorithm....................................... 246 12.16 TCP Flow Control....................................... 247 12.17 TCP Timeout and Retransmission.............................. 247 12.18 KeepAlive........................................... 248 12.19 TCP timers.......................................... 249 12.20 Epilog............................................. 249 12.21 Exercises........................................... 249 13 TCP Reno and Congestion Management 253 13.1 Basics of TCP Congestion Management............................ 254 13.2 Slow Start............................................ 258 13.3 TCP Tahoe and Fast Retransmit................................ 262 13.4 TCP Reno and Fast Recovery................................. 264 13.5 TCP NewReno......................................... 266 13.6 SACK TCP........................................... 268 13.7 TCP and Bottleneck Link Utilization............................. 269 13.8 Single Packet Losses.....................................