Data Communications and Networks Second Edition ACHYUT S GODBOLE Managing Director SoftExcel Services Limited, Mumbai ATUL KAHATE Senior Consultant Oracle Financial Services Software Limited, Pune Tata McGraw Hill Education Private Limited NEW DELHI McGraw-Hill Offices New Delhi New York St Louis San Francisco Auckland Bogota Caracas Kuala Lumpur Lisbon London Madrid Mexico City Milan Montreal San Juan Santiago Singapore Sydney Tokyo Toronto
Contents Preface 1. Introduction to Data Communications and Networking 1.0 Introduction 1 1.1 Fundamental Concepts 1 1.2 Data Communications 3 1.3 Protocols 4 1.4 Standards 4 1.5 Standards Organizations 5 1.6 Signal Propagation 6 1.7 Analog and Digital Signals 8 1.8 Bandwidth of a Signal and a Medium 9 1.9 Fourier Analysis and the Concept of Bandwidth of a Signal 13 1.10 Data Transmission Rate and Bandwidth 18 Summary 20 Key Terms and Concepts 21 Questions 21 2. Analog and Digital Transmission Methods 2.0 Introduction 24 2.1 Analog Signal, Analog Transmission 24 2.2 Digital Signal, Digital Transmission 24 2.3 Digital Signal, Analog Transmission 26 2.4 Baud Rate and Bits Per Second 30 2.5 Analog Signal, Digital (Storage and) Transmission 32 2.6 Nyquist Summary 36 Theorem 34 Key Terms and Concepts 37 Questions 3 7 3. Modes of Data Transmission and Multiplexing 3.0 Introduction 40
viii Contents 3.1 Parallel and Serial Communication 40 3.2 Asynchronous, Synchronous and Isochronous Communication 42 3.3 Simplex, Half-duplex and Full-duplex 3.4 Multiplexing and Demultiplexing 50 3.5 Types of Multiplexing 50 3.6 FDM versus TDM 57 Summary 57 Key Terms and Concepts 59 Questions 59 Communication 46 4. Transmission Errors: Detection and Correction 4.0 Introduction 62 4.1 Error Classification 62 4.2 Types of Errors 63 4.3 Error Detection 63 Summary 75 Key Terms and Concepts 76 Questions 76 5. Data Compression and Encryption 5.0 Introduction 78 5.1 Simple Coding Scheme 78 5.2 Based on the Context of Symbols 79 5.3 Based on the Relative Frequencies of Symbols 80 5.4 Information Security 85 5.5 Cryptography 87 5.6 Symmetric and Asymmetric Key Encryption 89 5.7 Digital Certificates 93 5.8 Digital Signatures 94 5.9 Secure Socket Layer (SSL)/Transport Layer Security (TLS) 95 5.10 Firewalls 97 5.11 Email Security 99 Summary 102 Key Terms and Concepts 103 Questions 103 6. Transmission Media 6.0 Introduction 106 6.1 Guided Media 106 6.2 Unguided Media 111 6.3 Shannon Capacity 120 Summary 121 Key Terms and Concepts 121 Questions 122
7. Network Topologies, Switching and Routing Algorithms 7.0 Introduction 124 7.1 Mesh Topology 124 7.2 Star Topology 125 7.3 Tree Topology 125 7.4 Ring Topology 127 7.5 Bus Topology 128 7.6 Hybrid Topology 128 7.7 Basics of Switching 130 7.8 Router and Routing 136 7.9 Routing Algorithms 139 Summary 121 Key Terms and Concepts 149 Questions 122 8. Networking Protocols and OSI Model 8.0 Introduction 153 8.1 Protocols in Computer Communications 155 8.2 The OSI Model 159 8.3 OSI Layer Functions 163 8.4 Queuing Theory and M/M/l Queues 172 Summary 172 Key Terms and Concepts 173 Questions 174 9. Local Area Networks (LAN), Metropolitan Area Networks (MAN) and Wide Area Networks (WAN) 9.0 Introduction 176 9.1 Local Area Networks (LAN) 177 9.2 Ethernet 177 9.3 Virtual LAN (VLAN) 184 9.4 Fast and Gigabit Ethernet 186 9.5 Token Ring 188 9.6 Fiber Distributed Data Interface (FDD1) 192 9.7 Comparison of Ethernet, Token Ring and FDDI 195 9.8 Metropolitan Area Network (MAN) 195 9.9 Distributed Queue Dual Bus (DQDB) 195 9.10 Switched Multimegabit Data Services (SMDS) 198 9.11 Wide Area Network (WAN) 199 9.12 WAN Architecture 200 9.13 WAN Transmission Mechanism 201 9.14 WAN Addressing 202 9.15 Packet Forwarding 203 9.16 Next-hop Tables and Routing 205 9.17 Pure and Slotted ALOHA 206
X Contents Summary 207 Key Terms and Concepts 208 Questions 209 10. Medium Access Sublayer and ISDN 10.0 Introduction 212 10.1 Static and Dynamic Channel Allocation 212 10.2 Medium Access Control (MAC) Sublayer 214 10.3 MAC in LAN and WAN 215 10.4 Classification and Study of MAC Sublayer Protocols/Collisions 10.5 ISDN and Its Background 217 10.6 ISDN Architecture 219 10.7 ISDN Interfaces 221 10.8 Functional Grouping 223 10.9 Reference Points 225 10.10 ISDN Protocol Architecture 225 10.11 Narrowband-ISDN (N-ISDN) and Broadband ISDN (B-ISDN) Summary 23 J Key Terms and Concepts 232 Questions 232 11. X.25 Protocol 11.0 Introduction 235 11.1 Understanding How X.25 Works 235 11.2 Characteristics of X.25 238 11.3 Packet Format 240 11.4 X.25 Operation 243 11.5 CCITTX.21 245 Summary 246 Key Terms and Concepts 246 Questions 246 12. Frame Relay and Congestion Control 12.0 Introduction 248 12.1 The Need for Frame Relay 248 12.2 How Frame Relay Works 253 12.3 Frame Relay Frame Format 256 12.4 Congestion Control 257 12.5 Congestion Control Algorithms 258 12.6 Traffic Control 260 12.7 Frame Relay Assembler/Disassembler (FRAD) 261 12.8 Other Features 261 Summary 261 Key Terms and Concepts 262 Questions 262
Contents xi 13. Asynchronous Transfer Mode (ATM) 265 13.0 Introduction 265 13.1 Overview of ATM 266 13.2 Packet Size 268 13.3 Virtual Circuits in ATM 270 13.4 ATM Cells 272 13.5 Switching 273 13.6 ATM Layers 276 13.7 Miscellaneous Topics 281 Summary 283 Key Terms and Concepts 284 Questions 284 14. Wireless Communication 287 14.0 Overview of Wireless Networks 287 14.1 IEEE Standards for LAN. MAN, and WAN - 802.1, 802.2, 802.3, 802.4, 802.5, 802.11 288 14.2 Infrared Communication 290 14.3 Bluetooth 291 14.4 802.11 Wireless LAN 298 Summary 305 Key Terms and Conc epts 305 Questions 306 15. Internetworking Concepts, Devices, Internet Basics, History 15.0 Introduction 308 15.1 Why Internetworking? 309 15.2 Problems in Internetworking 309 15.3 Dealing with Incompatibility 15.4 A Virtual Network 313 15.5 Internetworking Devices 314 15.6 Repeaters 315 15.7 Bridges 316 15.8 Routers 321 15.9 Gateways 324 Issues 310 and Architecture 308 15.10 A Brief History of the Internet 325 15.11 Growth of the Internet 327 15.12 Internet Topology 329 15.13 Internal Architecture of an ISP 331 Summaiy 335 Key Terms and Concepts 336 Questions 33 7 16. Ways ofaccessing the Internet 340 16.0 Introduction 340
Passive Synchronous xii Contents 16.1 Dial-up Access for an Individual User 340 16.2 Leased Lines 343 16.3 Digital Subscriber Line (DSL) 343 16.4 Cable Modems 348 16.5 DTE-DCE Interface 350 16.6 EIA RS-232 and EIA RS-449 Interface 351 16.7 SONET/SDH - Transport Signals 352 16.8 SONET Layers Applications 353 Summary 354 Key Terms and Concepts 355 Questions 355 17. TCP/IP Part 1: Introduction to TCP/IP, IP, ARP, RARP and ICMP 17.0 Introduction 357 17.1 TCP/IP Basics 358 17.2 Why IP Addresses? 360 17.3 Logical Addresses 363 17.4 TCP/IP-An Example 364 17.5 The Concept of IP Address and IP Datagram/Packet 3 71 17.6 Address Resolution Protocol (ARP) 380 17.7 Reverse Address Resolution Protocol (RARP) 383 17.8 Internet Control Message Protocol (ICMP) 384 17.9 Datagram Fragmentation and Reassembly 388 17.10 Comparison ofosi and TCP/IP Protocol Suites 393 Summary 393 Key Terms and Concepts 394 Questions 395 18. TCP/IP Part 2: TCP and UDP 18.0 Introduction 399 18.1 TCP Basics 399 18.2 Features of TCP 400 18.3 Relationship between TCP and IP 403 18.4 Ports and Sockets 404 18.5 Connections - Open and Active Open 408 18.6 TCP Connections 409 18.7 What makes TCP reliable? 410 18.8 TCP Packet Format 411 18.9 Persistent TCP Connections 412 18.10 User Datagram Protocol (UDP) 414 18.11 UDP Packet 414 18.12 Differences between UDP and TCP 415 \ Summary 417 Key Terms and Concepts 418 Questions 418
Contents xiii 19. TCP/IP Part 3: DNS, Email, FTP and TFTP 421 19.0 Introduction 421 19.1 Domain Name System (DNS) 421 19.2 Electronic Mail (Email) 429 19.3 File Transfer Protocol (FTP) 445 19.4 Trivial File Transfer Protocol (TFTP) 452 Summary 453 Key Terms and Concepts 454 Questions 454 20. TCP/IP Part 4: WWW, HTTP and TELNET 457 20.0 Introduction 457 20.1 The Basics ofwww and Browsing 458 20.2 Locating Information on the Internet 464 20.3 Hyper Text Markup Language (HTML) 465 20.4 Web Browser Architecture 470 20.5 Web Pages and Multimedia 472 20.6 Remote Login (TELNET) 474 20.7 Static, Dynamic, and Active Web Pages 477 Summary 480 Key Terms and Concepts 482 Questions 482 21. Multimedia Communications 485 21.0 Introduction 485 21.1 Basics of Multimedia 485 21.2 Multimedia Applications 486 21.3 Multimedia Protocols 492 21.4 Session Initiation Protocol (SIP) 496 Summary 497 Key Terms and Concepts 497 Questions 497 Appendix A: Internet Protocol Version 6 (IPv6) 499 Appendix B: Hardware for Error Detection 504 Appendix C: Network Management and Monitoring 507 Appendix D: Answers to True or False 513 Appendix E: Answers to Multiple-Choice Questions 517 Glossary 521 References 535 Index 536