Data-Communications- - xviii C ONTENTS 17.3 SONET FRAMES 496 Frame Byte and Bit Transmission STS-I Frame Format 497 Overhead Summary 501

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: xviii C ONTENTS 17.3 SONET FRAMES 496 Frame, Byte, and Bit Transmission STS-I Frame Format 497 Overhead Summary 501 Encapsulation 501 17.4 STS MULTIPLEXING 496 503 Byte Interleaving 504 Concatenated Signal 505 AddlDrop Multiplexer 506 17.5 SONETNETWORKS 507 Linear Networks 507 Ring Networks 509 Mesh Networks 510 17.6 VIRTUAL TRIBUTARIES Types o fVTs 17.7 512 512 RECOMMENDED READING Books 513 513 17.8 KEY 1ERMS 513 17.9 SUMMARY 514 17.10 PRACTICE SET 514 Review Questions Exercises 515 Chapter 18 18.1 514 Virtual-Circuit Networks: Frame Relay and A TM FRAME RELAY 517 Architecture 518 Frame Relay Layers 519 Extended Address 521 FRADs 522 VOFR 522 LMI 522 Congestion Control and Quality o f Service 18.2 ATM 523 Design Goals 523 Problems 523 Architecture 526 Switching 529 ATM Layers 529 Congestion Control and Quality o f Service 18.3 ATM LANs 536 ATM LAN Architecture 536 LAN Emulation (LANE) 538 Client/Server Model 539 Mixed Architecture with Client/Server 18.4 RECOMMENDED READING Books 18.5 18.6 18.7 522 541 KEY 1ERMS 541 SUMMARY 541 PRACTICE SET 543 Review Questions Exercises 543 543 540 540 535 5 17 C ONTENTS PART 4 Network Layer Chapter 19 19.1 Netvvork Layer: Logical Addressing IPv4ADDRESSES IPv6 ADDRESSES 5 49 549 Address Space 550 Notations 550 Classful Addressing 552 Classless Addressing 555 Network Address Translation (NAT) 19.2 547 563 566 Structure 567 Address Space 568 19.3 RECOMMENDED READING 572 Books 572 Sites 572 RFCs 572 19.4 19.5 19.6 KEY 1ERMS 572 SUMMARY 573 PRACTICE SET 574 Review Questions 574 Exercises 574 Research Activities 577 ~h~ntor -r 20.1 ?n l \Tctwnr-b- T r n'or- Tntor-not P " . ~ INTERNETWORKING 579 Need for Network Layer 579 Internet as a Datagram Network 581 Internet as a Connectionless Network 582 ' )0 ' ) T P"Ll <;S<,) Datagram 583 Fragmentation 589 Checksum 594 Options 594 20.3 IPv6 596 Advantages 597 Packet Format 597 Extension Headers 602 20.4 TRANSITION FROM IPv4 TO IPv6 Dual Stack 604 Tunneling 604 n H. 20.5 V VJ RECOMMENDED READING Books 606 Sites 606 RFCs 606 20.6 KEY 1ERMS L U./ ; ::'IIIVIIVIAK)' 20.8 606 b Ut PRACTICE SET 607 Review Questions 607 Exercises 608 Research Activities 609 605 603 ,7 ' \70 xix xx CONTENTS Chapter 21 21.1 Network Layer: Address Mapping, Error Reporting, and Multicasting 611 ADDRESS MAPPING 611 Mapping Logical to Physical Address: ARP 612 Mapping Physical to Logical Address: RARp, BOOTP, and DHCP 2 l.2 ICMP 621 types or Messages o n Message Format 621 Error Reporting 622 Query 625 Debugging Tools 627 21.3 IGMP 630 Group Management 630 IGMP Messages 631 Message Format 631 IGMP Operation 632 Encapsulation 635 Netstat Utility 637 21.4 ICMPv6 638 Error Reporting Query 639 21.5 RECOMMENDED READING Books " ;tp 640 641 h Lll RFCs 21.6 21.7 21.8 638 641 KEY 1ERMS 641 SUMMARY 642 PRACTICE SET 643 Review Questions 643 Exercises 644 Research Activities 645 Chapter 22 22.1 DELIVERY Network Layer: Delivery, Forwarding, and Routing 647 647 Direct Versus Indirect Delivery 22.2 FORWARDING 647 648 Forwarding Techniques 648 Forwarding Process 650 I hmt;n<T 22.3 T~hlp h<;<; UNICAST ROUTING PROTOCOLS Optimization 658 Intra- and Interdomain Routing Distance Vector Routing 660 Link State Routing 666 Path Vector Routing 674 22.4 658 659 MULTICAST ROUTING PROTOCOLS Unicast, Multicast, and Broadcast Applications 681 Multicast Routing 682 Routing Protocols 684 678 678 618 C ONTENTS 22.5 RECOMMENDED READING 694 Books 694 Sites 694 RFCs 694 22.6 22.7 22.8 KEY 1ERMS 694 SUMMARY 695 PRACTICE SET 697 Review Questions 697 Exercises 697 Research Activities 699 PART 5 Transport Layer Chapter 23 23.1 701 Process-ta-Process Delivery: UDp, TCp, a nd S CTP 703 PROCESS-TO-PROCESS DELIVERY 703 Client/Server Paradigm 704 Multiplexing and Demultiplexing 707 Connectionless Versus Connection-Oriented Service Reliable Versus Unreliable 708 Three Protocols 708 23.2 USER DATAGRAM PROTOCOL (UDP) Well-Known Ports for UDP User Datagram 710 Checksum 711 U DP Operation 713 Use o fUDP 715 23.3 TCP 709 715 T CP Services 715 T CP Features 719 Segment 721 A T CP Connection 723 Flow Control 728 Error Control 731 Congestion Control 735 23.4 SCTP 736 S CTP Services 736 S CTP Features 738 Packet Format 742 An SCTP Association 743 Flow Control 748 Error Control 751 Congestion Control 753 23.5 RECOMMENDED READING Books 753 Sites 753 RFCs 753 23.6 23.7 23.8 KEY1ERMS 754 SUMMARY 754 PRACTICE SET 756 Review Questions 756 Exercises 757 Research Activities 759 753 709 707 xxi xxii CONTENTS Chapter 24 24.1 24.2 Congestion Control a nd Quality of'Service DATA 1RAFFIC 761 Traffic Descriptor 761 Traffic Profiles 762 CONGESTION 763 N etwork Performance 24.3 24.4 764 CONGESTION CONTROL 765 Open-Loop Congestion Control 766 Closed-Loop Congestion Control 767 l WO EXAMPLES 768 Congestion Control i n T CP 769 C ongestion Control i n Frame Relay 24.5 QUALITY OF SERVICE F low Characteristics Flow Classes 776 24.6 773 775 775 1ECHNIQUES TO IMPROVE QoS 776 Scheduling 776 Traffic Shaping 777 Resource Reservation 780 Admission Control 780 24.7 INTEGRATED SERVICES 780 Signaling 781 Flow Specification 781 Admission 781 Service Classes 781 R SVP 782 Problems with Integrated Services 24.8 784 DIFFERENTIATED SERVICES 785 DS Field 24.9 24.10 24.11 24.12 24.13 785 QoS IN SWITCHED NETWORKS 786 QoS in Frame Relay 787 QoS i nATM 789 RECOMMENDED READING 790 B ooks 791 KEY 1ERMS 791 SUMMARY 791 PRACTICE SET 792 Review Questions Exercises 793 PART 6 Application Layer Chapter 25 25.1 792 NAME SPACE Domain Name Svstem 798 F lat Name Space 798 Hierarchical Name Space 25.2 795 798 DOMAIN NAME SPACE 799 L abel 799 D omain N arne 799 D omain 801 7 97 767 C ONTENTS 25.3 DISTRIBUTION OF NAME SPACE xxiii 801 Hierarchy o f Name Servers 802 Zone 802 Root Server 803 Primary and Secondary Servers 803 25.4 DNS IN THE INTERNET 803 Generic Domains 804 Country Domains 805 Inverse Domain 805 25.5 RESOLUTION 806 Resolver 806 Mapping Names to Addresses 807 Mapping Address to Names 807 Recursive Resolution 808 Iterative Resolution 808 Caching 808 25.6 DNS MESSAGES Header 25.7 809 809 TYPES OF RECORDS 811 Question Record 811 Resource Record 811 25.8 25.9 25.10 25.11 REGISTRARS 811 DYNAMIC DOMAIN NAME SYSTEM (DDNS) ENCAPSULATION 812 RECOMMENDED READING 812 812 Books 813 Sites 813 RFCs 813 25.12 KEY TERMS 813 25.13 SUMMARY 813 25.14 PRACTICE SET 814 Review Questions Exercises 815 Chapter 26 26.1 Remote Logging, Electronic Mail, and File Transfer REMOTE LOGGING TELNET 26.2 814 817 817 ELECTRONIC MAIL 824 Architecture 824 User Agent 828 Message Transfer Agent: SMTP 834 Message Access Agent: POP and IMAP Web-Based Mail 839 26.3 FILE TRANSFER 840 File Transfer Protocol (FTP) Anonymous FTP 844 26.4 RECOMMENDED READING Books 845 Sites 845 RFCs 845 26.5 26.6 840 KEY TERMS 845 SUMMARY 846 845 837 817 xxiv C ONTENTS 2 6.7 PRACTICE SET 8 47 Review Questions 847 Exercises 848 Research Activities 848 Chapter 27 W WW a nd HTTP 7 '71 dR 27.2 851 Client (Browser) 852 Server 852 Uniform Resource Locator 853 Cookies 853 WEB DOCUMENTS 8 54 ... Hall., L 'V.,Ulll<OllLO 2 7.3 2 7.4 27.5 27.6 2 7.7 Chapter 28 28.1 O JJ Dynamic Documents 857 Active Documents 860 HTTP 861 HTTPTransaction 861 Persistent Versus Nonpersistent Connection Proxy Server 868 RECOMMENDED READING 8 69 Books 869 Sites 869 RFCs 869 KEY l ERMS 8 69 SUMMARY 8 70 PRACTICE SET 871 Review Questions 871 Exercises 871 868 Network Management: S NMP NETWORK MANAGEMENT SYSTEM 873 8 73 Configuration Management 874 Fault Management 875 Performance Management 876 .. Accountmg Management . R 7h 1\ -~ 28.2 877 SIMPLE NETWORK MANAGEMENT PROTOCOL (SNMP) Concept 877 Management Components 878 Structure of Management Information ' ''''' . T•• ". • Lexicographic Ordering SNMP 891 Messages 893 UDP Ports 895 Security 897 28.3 28.5 ,~. {~KTD\ \""" , I K EYlERMS 8 97 SUMMARY 898 881 0 0':; ~~ 889 RECOMMENDED READING Books 897 Sites 897 RFCs 897 2 8.4 D. 8 97 877 C ONTENTS 28.6 PRACTICE SET Review Questions Exercises 899 Chapter 29 29.1 899 899 M ultimedia 901 DIGITIZING AUDIO AND VIDEO 902 Digitizing Audio 902 Digitizing Video 902 29.2 AUDIO AND VIDEO COMPRESSION 903 Audio Compression 903 Video Compression 904 29.3 STREAMING STORED AUDIO/VIDEO 908 First Approach: Using a Web Server 909 Second Approach: Using a Web Server with Metafile 909 Third Approach: Using a Media Server 910 Fourth Approach: Using a Media Server and RTSP 911 29.4 29.5 STREAMING LIVE AUDIOIVIDEO 912 REAL-TIMEINTERACTIVEAUDIOIVIDEO Characteristics 29.6 RTP 912 916 RTP Packet Format U DPPort 919 29.7 RTCP 917 919 Sender Report 919 Receiver Report 920 Source Description Message 920 Bye Message 920 Application-Specific Message 920 UDP Port 920 29.8 VOICE OVER IP 920 SIP 920 H.323 923 29.9 RECOMMENDED READING 925 Books 925 Sites 925 29.lO KEY 1ERMS 925 29.11 SUMMARY 926 29.12 PRACTICE SET 927 Review Questions 927 Exercises 927 Research Activities 928 PART 7 Security Chapter 30 30.1 929 C ryptography INTRODUCTION 931 931 Definitions 931 Two Categories 932 30.2 SYMMETRIC-KEY CRYPTOGRAPHY Traditional Ciphers 935 Simple Modem Ciphers 938 935 912 x xv xxvi CONTENTS Modem Round Ciphers ~ ,r 0 . oL "~ 30.3 . "' ~ ~ • 940 " "'-"- "~ /,~ ASYMMETRIC-KEY CRYPTOGRAPHY RSA 949 Diffie-Hellman 949 952 30.4 RECOMMENDED READING . JU.::l Books 956 ~r I t<oK IVI:"I 30.6 30.7 956 SUMMARY 957 PRACTICE SET 958 ~::l() Review Questions 958 Exercises 959 Research Activities 960 Chapter 31 31.1 Network Security SECURITY SERVICES 961 961 Message Confidentiality 962 Message Integrity 962 Message Authentication 962 Message Nonrepudiation 962 Entity Authentication 962 31.2 MESSAGE CONFIDENTIALITY 962 Confidentiality with Symmetric-Key Cryptography 963 Confidentiality with A~mmetric- K~ CIY]2tQgnmlrr 963 31.3 MESSAGE INTEGRITY 964 Document and Fingerprint 965 Message and Message Digest 965 Difference 965 Creating and Checking the Digest 966 Hash Function Criteria 966 Hash Algorithms: SHA-l 967 31.4 MESSAGE AUTHENTICATION MAC 31.5 DIGITAL SIGNATURE Comparison < -""7" ,,~ Process 973 Services 974 Signature Schemes 976 ENTITY AUTHENTICATION Passwords - 31.7 971 971 1I.T " " c " . TT " ,vvU ~v~ H .v)J 31.6 969 969 976 976 ';110 KEY MANAGEMENT 981 Symmetric-Key Distribution 981 Public-Key Distribution 986 31.8 RECOMMENDED READING Books 990 31.9 KEY TERMS 990 31.10 SUMMARY 991 31.11 PRACTICE SET 992 Review Questions 992 Exercises 993 Research Activities 994 990 X XVII Chapter 32 32.1 Security in the Internet: IPSec, SSUTLS, PGP, VPN, a nd Firewalls 995 IPSecurity (IPSec) 996 Two Modes 996 Two Security Protocols 998 Security Association 1002 Internet Key Exchange (IKE) 1004 Virtual Private Network 1004 32.2 S SUfLS 1008 SSL Services 1008 Security Parameters 1009 Sessions and Connections 1011 Four Protocols 1012 Transnort Laver C'. 1 0n 32.3 PGP 1014 Security Parameters 10 15 Services 10 15 A Scenario 1016 PGP Algorithms 1017 Key Rings 1018 PGP Certificates 1019 32.4 FIREWALLS 1021 Packet-Filter Firewall 1022 Proxy Firewall 1023 32.5 RECOMMENDED READING J:lOOKS 32.6 32.7 32.8 KEY 1ERMS 1024 SUMMARY 1025 PRACTICE SET 1026 Review Questions Exercises 1026 1026 Appendix A A .l 1024 l UL4 Unicode UNICODE Planes . 1.)"'1" 1029 1029 1030 .. " l r 1<111e; ~.1.)lV1r ) 1 VJV Supplementary Multilingual Plane (SMP) 1032 Supplementary Ideographic Plane (SIP) 1032 Supplementary Special Plane (SSP) 1032 Private Use Planes (PUPs) 1032 A.2 ASCII 1032 ::.ome t'ropertles or A ::'LU Appendix B Numbering Systems B .l BASE 10: DECIMAL B.2 BASE 2: BINARY Weights l UjO 1037 1038 Weights 1038 Conversion 1038 1038 1 037 xxviii CONTENTS B.3 BASE 16: HEXADECIMAL 1039 Weights 1039 Conversion 1039 A Comparison 1040 BA BASE 256: IP ADDRESSES 1040 Weights 1040 Conversion 1040 B.5 OTHER CONVERSIONS 1041 Binary and Hexadecimal 1041 Base 256 and Binary 1042 Appendix C C.I M athematical Review TRIGONOMETRIC FUNCTIONS 1043 1043 Sine Wave 1043 Cosine Wave 1045 Other Trigonometric Functions 1046 Trigonometric Identities 1046 C.2 FOURIER ANALYSIS 1046 Fourier Series 1046 Fourier Transform 1048 C.3 EXPONENT AND LOGARITHM 1050 Exponential Function 1050 Logarithmic Function 1051 Appendix 0 8 BI6T Code Appendix E Telephone History Before 1984 1059 Between 1984 and 1996 After 1996 1059 JOSS 1059 Appendix F Contact Addresses Appendix G R FCs Appendix H UDP a nd TCP Ports A cronyms G lossary 1067 1071 References I ndex 1111 1107 1059 1061 0 63 1065 culture today. One o f the ramifications o f that growth is a dramatic increase in the number o f professions where an understanding o f these technologies is essential for s uccessand a proportionate increase in the number and types o f students taking courses to learn about them. Features o f the Book Several features o f this text are designed to make it particularly easy for students to understand data communications and networking. Structure We have used the five-layer Internet model as the framework for the text not only because a thorough understanding o f the model is essential to understanding most current networking theory but also because it is based o n a structure o f interdependencies: Each layer cept introduced in our text builds upon the concepts examined in the previous sections. The Internet model was chosen because it is a protocol that is fully implemented. This text is designed for students with little or no background in telecommunications o r data communications. For this reason, we use a bottom-up approach. With this approach, students learn first about data communications (lower layers) before learning about networking (upper layers). Visual A pproach The book presents highly technical subject matter without complex formulas by using a visual and intuitive opportunity for understanding the material. Figures are particularly important in explaining networking concepts, which are based on connections and transmission. Both o f these ideas are easy to grasp visually. H ighlighted Points We emphasize important concepts in highlighted boxes for quick reference and immediate attention. xxix x xx P REFACE Examples a nd Applications When appropriate, we have selected examples to reflect true-to-life situations. For example, in Chapter 6 we have shown several cases o f telecommunications in current telephone networks. R ecommended Reading Key Terms Each chapter includes a list o f key terms for the student. Each chapter ends with a summary o f the material covered in that chapter. The summary provides a brief overview o f all the important points in the chapter. Practice Set Each chapter includes a practice set designed to reinforce and apply salient concepts. I t consists o f three parts: review questions, exercises, and research activities (only for appropriate chapters). Review questions are intended to test the student's first-level understanding o f the material presented in the chapter. Exercises require deeper understanding o f the material. Research activities are desi ned to create motivation for further stud . A ppendixes The appendixes are intended to provide quick reference material or a review o f materials needed to understand the concepts discussed in the book. Glossary a nd A cronyms The book contains an extensive glossary and a list o f acronyms. Changes in the Fourth Edition and in the contents. Organization The following lists the changes in the organization o f the book: 1. Chapter 6 now contains multiplexing as well as spreading. 2. Chapter 8 is now totally devoted to switching. 3. The contents o f Chapter 12 are moved to Chapter 11. 4. Chapter 17 covers SONET technology. 5. Chapter 19 discusses IP addressing. 6. Chapter 20 is devoted to the Internet Protocol. 7. Chapter 21 discusses three protocols: ARP, ICMP, and IGMP. 8. Chapter 28 is new and devoted to network management in the Internet. PREFACE xxxi Contents We have revised the contents o f many chapters including the following: 1. T he contents o f C hapters 1 to 5 are revised and augmented. Examples are added to clarify the contents. 2. The contents o f C hapter 10 are revised and augmented to include methods o f e rror detection and correction. 3. Chapter 11 is revised to include a full discussion o f several control link protocols. 4. Delivery, forwarding, and routing o f datagrams are added to Chapter 22. 5. The new transport protocol, SCTP, is added to Chapter 23. 6. T he contents o f C hapters 30, 31, and 32 are revised and augmented to include additional discussion about securit issues and the Internet. 7. New examples are added to clarify the understanding o f concepts. E nd Materials 1. A section is added to the end o f e ach chapter listing additional sources for study. r v' w q e i n up a e . 3. The multiple-choice questions are moved to the book site to allow students to self-test their knowledge about the contents o f the chapter and receive immediate feedback. 4. Exercises are revised and new ones are added to the appropriate chapters. 5. Some chapters contain research activities. I nstructional Materials Instructional materials for both the student and the teacher are revised and augmented. The solutions to exercises contain both the explanation and answer including full colhensive and include text and figures. Contents T he book is divided into seven parts. The first part is an overview; the last part concerns network security. The middle five parts are designed to represent the five layers o f the Internet model. The following summarizes the contents o f each part. Part One: Overview t er 1 covers introductory concepts needed for the rest o f the book. Chapter 2 introduces the Internet model. Part Two: Physical Layer xxxii PREFACE Part Three: Data L ink L ayer I he thIrd part IS devoted to the dlscusslOn of the data lmk layer o f the Internet model. Chapter 10 covers error detection and correction. Chapters 11, 12 discuss issues related to data link control. Chapters 13 through 16 deal with LAN s. Chapters 17 and 18 are about WANs. LANs and WANs are examples o f networks operating in the first two layers o f the Internet model. Part Four: Network Layer The fourth part is devoted to the discussion o f the network layer o f the Internet model. Chapter 19 covers IP addresses. Chapters 20 and 21 are devoted to the network layer protocols sllch as IP, ARP, ICMP, and IGMP. Chapter 22 discusses delivery. forwarding, and routing of packets in the Internet. Part Five: Transport Layer The fifth part is devoted to the discussion of the transport layer o f the Internet model. Chapter 23 gives an overview o f the transpOIt layer and discusses the services and duties o f this layer. I t also introduces three transport-layer protocols: UDP, TCP, and SCTP. C hapter 24 discusses congestion control and quality o f service, two issues related to the transport layer and the previous two layers. Part Six: Application Layer The sixth part is devoted to the discussion o f the application layer o f the Internet model. Chapter 25 is about DNS, the application program that is used by other application prQgrams to map application layer addresses to network layer addresses. Chapter 26 to 29 discuss some common applications protocols in the Internet. Part Seven: Security The seventh part is a discussion o f security. I t serves as a prelude to further study in this subject. Chapter 3 0 briefly discusses cryptography. Chapter 31 introduces security aspects. Chapter 32 shows how different security aspects can be applied to three layers o f the Internet model. Online Learning Center The McGraw-Hill Online Learning Center contains much additional material Ava ilable at As students read through Data Communications and Networking, they can go online to take self-grading quizzes. They can also access lecture materials such as PowerPoint slides, and get additional review from animated figures from the book. Selected solutions are also available over the Web. T he solutions to odd-numbered problems are provided to students, and instmctors can use a password to access the complete set o f solutions. Additionally, McGraw-Hill makes it easy to create a website for your networking course with an exclusive McGraw-Hill product called PageOut. I t requires no prior knowledge o f HTML, no long hours, and no design skills on your part. Instead, Page7 O ut offers a series o f templates. Simply fill them with your course information and I I PREFACE xxxiii click on one o f 16 designs. The process takes under an hour and leaves you with a professionally designed website. Although PageOut offers "instant" development, the finished website provides powerful features. An interactive course syllabus allows you to post content to coincide with your lectures, so when students visit your PageOut website, your syllabus will direct them to components o f Forouzan's Online Learning Center, or specific material o f your own. How to Use the Hook This book is written for both an academic and a professional audience. The book can be used as a self-study guide for interested professionals. As a textbook, it can be used for a one-semester o r one-quarter course. The following are some guidelines. U o o Parts one to three are strongly recommended. Parts four to six can be covered i f there is no following course in TCP/IP protocol. Part seven is recommended i f there is no following course in network security. Acknowledgments I t is obvious that the development o f a book o f this scope needs the support o f many people. Peer Review T ho m A d ' r l, , nt n t";h , to m t. , t v I' ~ j . t ho c laval ' 1' , A1- ,j. t1- . -1', - ,- peer reviews. We cannot express our gratitude in words to the many reviewers who spent numerous hours reading the manuscript and providing us with helpful comments and ideas. We would especially like to acknowledge the contributions o f the following reviewers for the third and fourth editions o f this book. Farid Ahmed, Catholic University Kaveh Ashenayi, University o f Tulsa Yoris Au, University o f Texas, San A ntonio Essie Bakhtiar, Clayton College & State University . .. 1 "1.1111IVlly ~ " . r J J l U, U 'HV"'.JHY U J ~ • J , VIU"'''I5''UI'' A.T. Burrell, Oklahoma State University Scott Campbell, Miami University Teresa Carrigan, Blackburn College Hwa Chang, Tufts University • •. • r D UWdlU Lll1eUU~, IU!ftUt~ l ftstltutt: U J 1 , -~ ~ ,JI5Y Peter Cooper, Sam Houston State University Richard Coppins, Virginia Commonwealth University Harpal Dhillon, Southwestern Oklahoma State University Hans-Peter Dommel, Santa Clara University M. Barry Dumas, Baruch College, C UNY William Figg, Dakota State University Dale Fox, Quinnipiac University Terrence Fries, Coastal Carolina University Errin Fulp, Wake Forest University xxxiv PREFACE Sandeep Gupta, A rizona State University Geor~e Hamel, Sottth Dakota State Univelsity James Henson, California State University, Fresno Tom Hilton, Utah State University Allen Holliday, California State University, F ullerton Seyed Hossein Hosseini, University o f Wisconsin, Milwaukee Gerald Isaacs, Carroll College, Waukesha Hrishikesh Joshi, D eVry University E.S. Khosravi, S outhern University B ob Kinicki, Worcester Polytechnic University Kevin Kwiat, H amilton College Ten-Hwang Lai, Ohio State University Chung-Wei Lee, A uburn University Ka-Cheong Leung, Texas Tech University Gertrude Levine, Fairleigh Dickinson University Alvin Sek See Lim, A uburn University Charles Lm, Californta State UntVersity, L os A ngeles Wenhang Liu, California State University, L os A ngeles M ark Llewellyn, University o f Central Florida Sanchita Mal-Sarkar, C leveland State University Louis Marseille, H arford Community College Kevin McNeill, University o f A rizona Arnold C. Meltzer, George Washington University R ayman Meservy, B righam Young University Prasant Mohapatra, University o f California, Davis H ung Z Ngo, SUNY, B uffalo Larry Owens, California State University, Fresno Arnold Patton, B radley University Dolly Samson, H awaii Pacific University Joseph Sherif, California State University, F ullerton Robert Simon, G eorge Mason University Ronald 1. Srodawa, O akland University Daniel Tian, California State University, Monterey B ay Richard Tibbs, R adford University Christophe Veltsos, Minnesota State University, M ankato Yang Wang, University o f Maryland, College Park Sherali Zeadally, Wayne State University M cGraw-Hill S taff Special thanks go to the staff o f McGraw-Hill. Alan Apt, our publisher, proved how a proficient publisher can make the impossible possible. Rebecca Olson, the developmen tal editor, gave us help whenever we needed it. Sheila Frank, o ur p roject manager, guided us through the production process with enormous enthusiasm. We a lso thank David Hash in design, Kara Kudronowicz in production, and Patti Scott, the copy editor. O verview Objectives Part 1 provides a general idea o f what we will see in the rest o f the book. Four major concepts are discussed: data communications, networking, protocols and standards, Networks exist so that data may be sent from one place to a nother-the basic concept o f data communications. To fully grasp this subject, we must understand the data communication components, how different types o f data can be represented, and how to create a data flow. c alled networking, i nvolving the connection o f c omputers, media, and networking devices. Networks are divided into two main categories: local area networks (LANs) and wide area networks (WANs). These two types o f networks have different characteristics and different functionalities. The Internet, the main focus o f the book, is a Protocols and standards are vital to the implementation o f data communications and networking. Protocols refer to the rules; a standard is a protocol that has been adopted by vendors and manufacturers. Network models serve to organize, unify, and control the hardware and software components o f data communications and networking. Although the term "network model" suggests a relationship to networking, the model also encompasses data communications. Chapters This part consists o f two chapters: Chapter 1 and Chapter 2. Chapter 1 In Chapter l , we introduce the concepts o f data communications and networking. We discuss data communications components, data representation, and data flow. We then move to the structure o f networks that carry data. We discuss network topologies, categories ~"',UU'll o n standards gives a quick overview o f the organizations that set standards in data communications and networking. Chapter 2 The two dominant networking models are the Open Systems Interconnection (OS!) and the Internet model (TCP/IP).The first is a theoretical framework; the second is the actual model used in today's data communications. In Chapter 2, we first discuss the OSI model to give a general background. We then concentrate on the Internet model, which is the foundation for the rest o f the book. , , C HAPTERl Introduction Data communications and networking are changing the way we do business and the way we live. Business decisions have to be made ever more quickly, and the decision makers require immediate access to accurate information. Why wait a week for that report from Germany to arrive by mail when it could appear almost instantaneously through computer networks? Businesses today rely on computer networks and internetworks. But before we ask how quickly we can get hooked up, we need to know how networks operate, what types o f technologies are available, and which design best fills which set o f needs. The development o f the personal computer brought about tremendous changes for business, industry, science, and education. A similar revolution is occurring in data communications and networking. Technological advances are making it possible for communications links to carry more and faster signals. As a result, services are evolving to allow use o f this expanded capacity. For example, established telephone services such as conference calling, call waiting, voice mail, and caller ID have been extended. Research in data communications and networking has resulted in new technologies. One goal is to be able to exchange data such as text, audio, and video from all points in the world. We want to access the Internet to download and upload information quickly and accurately and at any time. This chapter addresses four issues: data communications, networks, the Internet, and protocols and standards. First we give a broad definition o f data communications. Then we define networks as a highway on which data can travel. The Internet is discussed as a good example o f an internetwork (i.e., a network o f networks). Finally, we discuss different types o f protocols, the difference between protocols and standards, and the organizations that set those standards. 1.1 DATA COMMUNICATIONS W hen we communicate, we are sharing information. This sharing can be local o r remote. Between individuals, local communication usually occurs face to face, while remote communication takes place over distance. The term telecommunication, which 3 I I 4 CHAPTER i iNTRODUCTION includes telephony, telegraphy, and television, means communication at a distance (tele is Greek for "far"). The word data refers to information presented in whatever form is agreed upon by the parties creating and using the data. D ata communications are the exchange o f data between two devices via some form o f transmission medium such as a wire cable. For data communications to occur, the communicating devices must be part o f a communication system made up o f a combination o f hardware (physical equipment) and software (programs). The effectiveness o f a data communications system depends on four fundamental characteristics: delivery, accuracy, timeliness, and jitter. I . Delivery. T he system must deliver data to the correct destination. Data must be received by the intended device o r u ser and only by that device or user. J Accuracy. T he system must deliver the data accurately. Data that have been altered in transmission and left uncorrected are unusable. 3. Timeliness. The system must deliver data in a timely manner. Data delivered late are useless. In the case o f video and audio, timely delivery means delivering data as they are produced, in the same order that they are produced, and without significant delay. This kind o f delivery is called real-time transmission. -\.. Jitter. Jitter refers to the variation in the packet arrival time. I t is the uneven delay in the delivery o f audio or video packets. For example, let us assume that video packets are sent every 30 ms. I f some o f the packets arrive with 30-ms delay and others with 40-ms delay, an uneven quality in the video is the result. C omponents A data communications system has five components (see Figure 1.1). F igure 1.1 Five components o f data communication Rule I: Rule 2: ... Rule n: ISender; Protocol -1 Message Medium r Protocol Rule 1: Rule 2: ". R ulen: IR eceiverl I . M essage. The message is the information (data) to be communicated. P opular forms o f information include text, numbers, pictures, audio, and video . . ., Sender. T he sender is the device that sends the data message. I t can b e a computer, workstation, telephone handset, video camera, and so on. 3. Receiver. The receiver is the device that receives the message. I t can be a computer, workstation, telephone handset, television, and so on. -I-. Transmission medium. The transmission medium is the physical path by which a message travels from sender to receiver. Some examples o f transmission media include twisted-pair wire, coaxial cable, fiber-optic cable, and radio waves. S ECTION 1.1 DATA C OMMUNICATIONS 5 5. P rotocol. A protocol is a set o f rules that govern data communications. I t represents an agreement between the communicating devices. Without a protocol, two devices may be connected but not communicating, just as a person speaking French cannot be understood by a person who speaks only Japanese. D ata R epresentation Information today comes in different forms such as text, numbers, images, audio, and video. Text In data communications, text is represented as a bit pattern, a sequence o f bits (Os o r Is). Different sets o f bit patterns have been designed to represent text symbols. Each set is called a code, and the process of representing symbols is called coding. Today, the prevalent coding system is called Unicode, which uses 32 bits to represent a symbol or character used in any language in the world. The A merican S tandard C ode for Information I nterchange (ASCII), developed some decades ago in the United States, now constitutes the first 127 characters in Unicode and is also referred to as Basic L atin. Appendix A includes part o f the Unicode. Numbers Numbers are also represented by bit patterns. However, a code such as ASCII is not used to represent numbers; the number is directly converted to a binary number to simplify mathematical operations. Appendix B discusses several different numbering systems. Images I mages are also represented by bit patterns. In its simplest form, an image is composed o f a matrix of pixels (picture elements), where each pixel is a small dot. The size o f the pixel depends on the resolution. For example, an image can be divided into 1000 pixels or 10,000 pixels. In the second case, there is a better representation o f the image (better resolution), but more memory is needed to store the image. After an image is divided into pixels, each pixel is assigned a bit pattern. The size and the value o f the pattern depend on the image. For an image made o f only blackand-white dots (e.g., a chessboard), a I-bit pattern is enough to represent a pixel. I f an image is not made o f pure white and pure black pixels, you can increase the size o f the bit pattern to include gray scale. For example, to show four levels o f gray scale, you can use 2-bit patterns. A black pixel can be represented by 00, a dark gray pixel by 01, a light gray pixel by 10, and a white pixel by 11. There are several methods to represent color images. One method is called RGB, so called because each color is made o f a combination o f three primary colors: red, green, and blue. The intensity o f each color is measured, and a bit pattern is assigned to it. Another method is called Y CM, in which a color is made of a combination of three other primary colors: yellow, cyan, and magenta. A udio Audio refers to the recording or broadcasting of sound or music. Audio is by nature different from text, numbers, or images. It is continuous, not discrete. Even when we 6 CHAPTER i iNTRODUCTION use a microphone to change voice or music to an electric signal, we create a continuous analog signal. Video Video refers to the recording or broadcasting of a picture or movie. Video can either be produced as a continuous entity (e.g., by a TV camera), or it can be a combination o f images, each a discrete entity, arranged to convey the idea o f motion. Again we can change video to a digital or an analog signal, as we will see in Chapters 4 and 5. Data Flow Communication between two devices can be simplex, half-duplex, or full-duplex as shown in Figure 1.2. Direction o f data Monitor Mainframe a .Simplex Direction o f data at time I • • Direction o f data at time 2 b. Half-duplex Direction o f data all the time =-------11 IStation I;-----.:~.=========~. Station J c. Full-duplex Simplex In simplex mode, the communication is unidirectional, as on a one-way street. Only one of the two devices on a link can transmit; the other can only receive (see Figure 1.2a). Keyboards and traditional monitors are examples o f simplex devices. The keycan use the entire capacity o f the channel to send data in one direction. Half-Duplex In half-duplex mode, each station can both transmit and receive, but not at the same time. : When one device is sending, the other can only receive, and vice versa (see Figure 1.2b). S ECTION 1.2 N ETWORKS 7 The half-duplex mode is like a one-lane road with traffic allowed in both directions. When cars are traveling in one direction, cars going the other way must wait. In a half-duplex transmission, the entire capacity o f a channel is taken over by whichever o f the two devices is transmitting at the time. Walkie-talkies and CB (citizens band) radios are both half-duplex systems. The half-duplex mode is used in cases where there is no need for communication in both directions at the same time; the entire capacity o f the channel can be utilized for each direction. Full-Duplex In full-duplex m.,lle (als@ called duplex), both stations can transmit and receive simultaneously (see Figure 1.2c). The full-duplex mode is like a tW(i)-way street with traffic flowing in both directions at the same time. In full-duplex mode, si~nals going in one direction share the capacity o f the link with signals going in the other din~c~on. This sharing can occur in two ways: Either the link must contain two physically separate1:[email protected] paths, one for sending and the other for receiving; or the capacity o f the chatJilJiJ.el is divided between signals traveling in both directions. One c ommon example o f full-duplex communication is the telephone network. When two people are communicating by a telephone line, both can talk and listen at the same time. The full-duplex mode is used when communication in both directions is required all the time. The capacity o f the channel, however, must be divided between the two directions. 1.2 NETWORKS A network is a set o f devices (often referred to as nodes) connected by communication links. A node can be a computer, printer, or any other device capable o f sending and/or receiving data generated by other nodes on the network. Distributed Processing Most networks use distributed processing, in which a task is divided among multiple computers. Instead of one single large machine being responsible for all aspects o f a process, separate computers (usually a personal computer or workstation) handle a subset. Network Criteria A network must be able to meet a certain number o f criteria. The most important o f these are performance, reliability, and security. Performance Performance can be measured in many ways, including transit time and response time. Transit time is the amount o f time required for a message to travel from one device to 8 CHAPTER 1 INTRODUCTiON another. Response time is the elapsed time between an inquiry and a response. The performance o f a network depends on a number o f factors, including the number o f users, the type o f transmission medium, the capabilities o f the connected hardware, and the efficiency o f the software. Performance is often evaluated by two networking metrics: throughput and delay. We often need more throughput and less delay. However, these two criteria are often contradictory. I f we try to send more data to the network, we may increase throughput but we increase the delay because o f traffic congestion in the network. Reliability In addition to accuracy o f delivery, network reliability is measured by the frequency o f failure, the time it takes a link to recover from a failure, and the network's robustness in a catastrophe. Security Network security issues include protecting data from unauthorized access, protecting data from damage and development, and implementing policies and procedures for recovery from breaches and data losses. Physical Structures Before discussing networks, we need to define some network attributes. Type o f C onnection A network is two or more devices connected through links. A link is a communications pathway that transfers data from one device to another. For visualization purposes, it is simplest to imagine any link as a line drawn between two points. For communication to occur, two devices must be connected in some way to the same link at the same time. There are two possible types o f connections: point-to-point and multipoint. Point-to-Point A point-to-point connection provides a dedicated link between two devices. The entire capacity o f the link is reserved for transmission between those two devices. Most point-to-point connections use an actual length o f wire or cable to connect the two ends, but other options, such as microwave or satellite links, are also possible (see Figure 1.3a). When you change television channels by infrared remote control, you are establishing a point-to-point connection between the remote control and the television's control system. Multipoint A multipoint (also called multidrop) connection is one in which more than two specific devices share a single link (see Figure 1.3b). In a multipoint environment, the capacity o f the channel is shared, either spatially or temporally. I f several devices can use the link simultaneously, it is a spatially shared connection. If users must take turns, it is a timeshared connection. P hysical Topology T he term p hysical topology refers to the way in which a network is laid out physically.: 1\\10 or more devices connect to a link; two or more links form a topology. The topology S ECTION 1.2 N ETWORKS 9 F igure 1.3 Types o f connections: point-to-point a nd m ultipoint Link I S tation ; 11-----------------11Station I a. Point-to-point Link Mainframe b. Mnltipoint o f a network is the geometric representation o f the relationship o f all the links and linking devices (usually called nodes) to one another. There are four basic topologies possible: mesh, star, bus, and ring (see Figure 1.4). Figure 1.4 Categories o f topology M esh In a mesh topology, every device has a dedicated point-to-point link to every other device. The term dedicated means that the link carries traffic only between the two devices it connects. To find the number o f physical links in a fully connected mesh network with n nodes, we first consider that each node must be connected to every other node. Node 1 must be connected to n - I nodes, node 2 must b e connected to n - 1 nodes, and finally node n must be connected to n - 1 nodes. We need n (n - 1) physical links. However, i f each physical link allows communication in both directions (duplex mode), we can divide the number o f links by 2. In other words, we can say that in a mesh topology, we need n (n - 1) 12 duplex-mode links. To accommodate that many links, every device on the network must have n - 1 input/output (110) ports (see Figure 1.5) to be connected to the other n - 1 stations. 10 C HAPTER 1 I NTRODUCTION F igure 1.5 A fully connected mesh topology (five devices) A mesh offers several advantages over other network topologies. First, the use o f dedicated links guarantees that each connection can carry its own data load, thus eliminatmg the traffic problems that can occur when links must be shared by multiple devices. Second, a mesh topology is robust. I f one link becomes unusable, it does not incapacitate the entire system. Third, there is the advantage o f privacy o r security. When every message travels along a dedicated line, only t he i ntended recipient sees it. Physical boundaries prevent other users from gaining access to messages. Finally, point-to-point links make fault identification a nd fault isolation easy. Traffic can be routed to avoid links with suspected problems. This facility enables the network manager to discover the precise location o f the fault and aids in finding its cause and solution. T he m ain disadvantages o f a m esh are related to the amount o f c abling and the number o f 110 ports required. First, because every device must be connected to every other device, installation and reconnection are difficult. Second, the sheer bulk o f the wiring can be greater than the available space (in walls, ceilings, o r floors) can accommodate. Finally, the hardware required to connect each link (I/O ports and cable) can be prohibitively expensive. For these reasons a mesh topology is usually implemented in a limited fashion, for example, as a backbone connecting the main computers o f a hybrid network that can include several other topologies. O ne practical example o f a m esh topology is the connection o f telephone regional offices in which each regional office needs to b e connected to every other regional office. S tar T opology In a s tar t opology, each device has a dedicated point-to-point link only t o a central controller, usually Called a h uh. The devices are not directly linked to o ne a nother. U nlike a m esh t opology, a s tar t opology does not allow d irect traffic between devices. T he controller acts as an exchange: I f one device wants to send data to another, it sends the data to the controller, which then relays the data to the other connected device (see Figure 1.6) . A star topology is less expensive than a mesh topology. In a star, each device needs only one link and one 110 port to connect it to any number o f others. This factor also makes it easy to install and reconfigure. Far less cabling needs to be housed, and additions, moves, and deletions involve only one connection: between that device and the hub. Other advantages include robustness. I f o ne link fails, only that link is affected. All other links remain active. This factor also lends itself to easy fault identification and S ECTION 1.2 N ETWORKS 11 Figure 1.6 A star topology connecting four stations H ub fault isolation. As long as the hub is working, it can be used to monitor link problems and bypass defective links. One big disadvantage o f a star topology is the dependency o f the whole topology on one single point, the hub. I f the hub goes down, the whole system is dead. Although a star requires far less cable than a mesh, each node must be linked to a central hub. For this reason, often more cablIng IS reqll1red I II a star than I II some other topologies (such as ring or bus). The star topology is used in local-area networks (LANs), as we will see i n Chapter 13. High-speed LANs often use a star topology with a central hub. B us Topology The preceding examples all describe point-to-point connections A bus topology, on the other hand, is multipoint. One long cable acts as a backbone to link all the devices in a network (see Figure 1.7). Figure 1.7 A bus topology connecting three stations D rop line C able e nd Drop line Drop line 1 11----------.......- ---.......- --... Tap Tap Cable end Tap Nodes are connected to the bus cable by drop lines and taps. A drop line is a connection 1 aIming between the device and the main cable. A tap is a COIlnector that either splices into the main cable o r punctures the sheathing o f a cable to create a contact with the metallic core. As a signal travels along the backbone, some o f its energy is transformed into heat. Therefore, it becomes weaker and weaker as it travels farther and farther. For this reason there is a limit on the number o f taps a bus can support and on the distance b etween those taps. Advantages o f a bus topology include ease o f installation. Backbone cable can be laid along the most efficient path, then connected to the nodes by drop lines o f various lengths. In this way, a bus uses less cabling than mesh or star topologies. In a star, for example, four network devices in the same room require four lengths o f cable reaching 12 CHAPTER 1 I NTRODUCTION all the way to the hub. In a bus, this redundancy is eliminated. Only the backbone cable est point on the backbone. Disadvantages include difficult reconnection and fault isolation. A bus is usually designed to be optimally efficient at installation. I t can therefore b e difficult to add new devices. Signal reflection at the taps can cause degradation in quality. This degradation can be controlled by limiting the number and spacing o f devices connected to a given length o f cable. Adding new devices may therefore require modification o r replacement o f the backbone. In addition, a fault or break in the bus cable stops all transmission, even between devices on the same side o f the problem. The damaged area reflects signals back in the nOIse m s. ongm, Bus topology was the one o f the first topologies used in the design o f early localarea networks. Ethernet LANs can use a bus topology, but they are less popular now for reasons we will discuss in Chapter 13. nection with only the two devices on either side o f it. A signal is passed along the ring in one direction, from device to device, until it reaches its destination. Each device in the ring incorporates a repeater. When a device receives a signal intended for another device, its repeater regenerates the bits and passes them along (see Figure 1.8). F igure 1.8 A ring topology connecting six stations Repeater Repeater Repeater Repeater Repeater Repeater A ring is relatively easy to install and reconfigure. Each device is linked to only its immediate neighbors (either physically or logically). To add o r delete a device requires changing only two connections. The only constraints are media and traffic considerations (maximum ring length and number o f devices). In addition, fault isolation is simreceive a signal within a specified period, it can issue an alarm. The alarm alerts the network operator to the problem and its location. However, unidirectional traffic can be a disadvantage. In a simple ring, a break in the ring (such as a disabled station) can disable the entire network. This weakness can be solved by using a dual ring or a switch capable o f closing off the break. S ECTION 1.2 N ETWORKS 13 Ring topology was prevalent when IBM introduced its local-area network Token Ring. Today, the need for higher-speed LANs has made this topology less popular. H ybrid Topology A network can be hybrid. For example, we can have a main star topology with each branch connecting several stations in a bus topology as shown in Figure 1.9. F igure 1.9 A h ybrid topology: a star backbone with three bus networks Hub N etwork Models Computer networks are created by different entities. Standards are needed so that these heterogeneous networks can communicate with one another. The two best-known standards are the O SI model and the Internet model. In Chapter 2 we discuss these two models. The O SI (Open Systems Interconnection) model defines a seven-layer network; the Internet model defines a five-layer network. This book is based on the Internet model with occasional references to the OSI model. C ategories o f N etworks Today when we speak o f networks, we are generally referring to two primary categories: local-area networks and wide-area networks. The category into which a network falls is determined by its size. A LAN normally covers an area less than 2 mi; a WAN can be worldwide. Networks o f a size in between are normally referred to as metropolitanarea networks and span tens o f miles. L ocal Area Network A local a rea n etwork (LAN) is usually privately owned and links the devices in a single office, building, or campus (see Figure 1.10). Depending on the needs o f an organization and the type of technology used, a LAN can be as simple as two PCs and a printer in someone's home office; or it can extend throughout a company and include audio and video peripherals. Currently, LAN size is limited to a few kilometers. 14 C HAPTER I I NTRODUCTION Figure 1.10 A n isolated L AN connecting 12 computers to a hub in a closet H ub s are to resources to computers or workstations. The resources to be shared can include hardware (e.g., a printer), software (e.g., an application program), or data. A common example o f a LAN, found in many business environments, links a workgroup o f task-related computers, for example, engineering workstations or accounting PCs. One o f the computers may be given a largecapacity disk drive and may become a server to clients. Software can be stored on this central server and used as needed by the whole group. In this example, the size o f the LAN may be determined by licensing restrictions on the number o f users per copy o f software, o r by restrictions on the number o f users licensed to access the operating system. In addition to size, LANs are from other o f networks their transmission media and topology. In general, a given LAN will use only one type o f transmission medium. The most common LAN topologies are bus, ring, and star. Early LAN s had data rates in the 4 to 16 megabits per second (Mbps) range. Today, however, speeds are normally 100 o r 1000 Mbps. LANs are discussed at length in Chapters 13, 14, and 15. Wireless LANs are the newest evolution in LAN technology. We discuss wireless LANs in detail in Chapter 14. Wide Area Network A wide area network (WAN) provides long-distance transmission o f data, image, audio, and video information over large geographic areas that may comprise a country, a continent, o r even the whole world. In Chapters 17 and 18 we discuss wide-area networks in greater detail. A WAN can be as complex as the backbones that connect the Internet or as simple as a dial-up line that connects a home computer to the Internet. We normally refer The switched WAN connects the end systems, which usually comprise a router (internetworking connecting device) that connects to another LAN or WAN. The point-to-point WAN is normally a line leased from a telephone o r cable TV provider that connects a home computer or a small LAN to an Internet service provider (ISP). This type o f WAN is often used to provide Internet access. S ECTION 1.2 N ETWORKS 15 F igure 1.11 WANs: a switched WAN a nd a p oint-to-point W AN I Ii 3. Switched WAN ~i .: Point-to-point 1~:~::--{~~~ ......... ~~~.......... ,.c ~'II.' 1 ...... :2:.... Computer Modem Modem cu::i:W E :J ISP b. Point-to-point WAN An early example o f a switched WAN is X.25, a network designed to provide connectivity between end users. As we will see in Chapter 18, X.25 is being gradually replaced by a high-speed, more efficient network called Frame Relay. A good example o f a switched WAN is the asynchronous transfer mode (ATM) network, which is a network with fixed-size data unit packets called cells. We will discuss ATM in Chapter 18. Another example ofWANs is the wireless WAN that is becoming more and more popular. We discuss wireless WANs and their evolution in Chapter 16. Metropolitan Area Networks A m etropolitan a rea n etwork (MAN) is a network with a size between a LAN and a WAN. It normally covers the area inside a town or a city. It is designed for customers who need a high-speed connectivity, normally to the Internet, and have endpoints is e p o e e ep one sprea over a C l y or p 0 ci y. goo examp e 0 a company network that can provide a high-speed DSL line to the customer. Another example is the cable TV network that originally was designed for cable TV, but today can also be used for high-speed data connection to the Internet. We discuss DSL lines and cable TV networks in Chapter 9. I nterconnection of Networks: Internetwork Today, it is very rare to see a LAN, a MAN, or a LAN in isolation; they are connected to one another. When two or more networks are connected, they become an i nternetwork o r i nternet. As an example, assume that an organization has two offices, one on the east coast and the other on the west coast. The established office on the west coast has a bus topology LAN; the newly opened office on the east coast has a star topology LAN. The president o f the company lives somewhere in the middle and needs to have control over the company 16 CHAPTER I INTRODUCTION from her home. To create a backbone WAN for connecting these three entities (two LANs and the president's computer), a switched WAN (operated by a service provider such as a telecom company) has been leased. To connect the LANs to this switched WAN, however, three point-to-point WANs are required. These point-to-point WANs can be a high-speed DSL line offered by a telephone company or a cable modem line offered by a cable TV provider as shown in Figure 1.12. Figure 1.12 A heterogeneous network made o ffour WANs and two LANs President -- 1 ~. ~. Modem • • Point-to-point: WAN : • MOdem~~~ • ~ Point-ta-point ~ WAN • Point-ta-point ~ ! WAN LAN LAN 1.3 THE INTERNET The Internet has revolutionized many aspects o f our daily lives. It has affected the way we do business as well as the way we spend our leisure time. Count the ways you've used the Internet recently. Perhaps y ou've sent electronic mail (e-mail) to a business associate, paid a utility bill, read a newspaper from a distant city, or looked up a local movie s chedule-all by using the Internet. Or maybe you researched a medical topic, booked a hotel reservation, chatted with a fellow Trekkie, or comparison-shopped for a car. The Internet is a communication system that has brought a wealth o f information to our fingertips and organized it for our use. The Internet is a structured, organized system. We begin with a brief history o f the Internet. We follow with a description o f the Internet today. S ECTION 1.3 T HE INTERNET 17 A B rief History A network is a group o f connected communicating devices such as computers and printers. An internet (note the lowercase letter i) is two or more networks that can communicate with each other. The most notable internet is called the I nternet (uppercase letter I ), a collaboration of more than hundreds of thousands o f interconnected networks. Private individuals as well as various organizations such as government agencies, schools, research facilities, corporations, and libraries in more than 100 countries use the Internet. Millions of people are users. Yet this extraordinary communication system only came into being in 1969. In the mid-1960s, mainframe computers in research organizations were standalone devices. Computers from different manufacturers were unable to communicate with one another. The Advanced Research P rojects Agency (ARPA) in the Department of Defense (DoD) was interested in finding a way to connect computers so that the researchers they funded could share their findings, thereby reducing costs and eliminating duplication of effort. In 1967, at an Association for Computing Machinery (ACM) meeting, ARPA presented its ideas for ARPANET, a small network of connected computers. The idea was that each host computer (not necessarily from the same manufacturer) would be attached to a specialized computer, called an interface message processor (IMP). The IMPs, in turn, would be connected to one another. Each IMP had to be able to communicate with other IMPs as well as with its own attached host. By 1969, ARPANET was a reality. Four nodes, at the University o f California at Los Angeles (UCLA), the University o f California at Santa Barbara (UCSB), Stanford Research Institute (SRI), and the University of Utah, were connected via the IMPs to form a network. Software called the Network Control Protocol (NCP) provided communication between the hosts. In 1972, Vint Cerf and Bob Kahn, both of whom were part of the core ARPANET group, collaborated on what they called the Internetting Project. C erf and Kahn's landmark 1973 paper outlined the protocols to achieve end-to-end delivery of packets. This paper on Transmission Control Protocol (TCP) included concepts such as encapsulation, the datagram, and the functions of a gateway. Shortly thereafter, authorities made a decision to split TCP into two protocols: Transmission Control Protocol (TCP) and I nternetworking Protocol (IP). IP would handle datagram routing while TCP would be responsible for higher-level functions such as segmentation, reassembly, and error detection. The internetworking protocol became known as TCPIIP. T he I nternet Today The Internet has come a long way since the 1960s. The Internet today is not a simple hierarchical structure. I t is made up of many wide- and local-area networks joined by connecting devices and switching stations. I t is difficult to give an accurate representation o f the Internet because it is continually c hanging-new networks are being added, existing networks are adding addresses, and networks of defunct companies are being removed. Today most end users who want Internet connection use the services o f I nternet service providers (ISPs). There are international service providers, national 18 CHAPTER 1 INTRODUCTiON service providers, regional service providers, and local service providers. The Internet today is run by private companies, not the government. Figure 1.l3 shows a conceptual (not geographic) view o f the Internet. Figure 1.13 Hierarchical organization o f the Internet a. Structure o f a national I SP National ISP National ISP h. Interconnection of national ISPs I nternational Internet Service Providers At the top o f the hierarchy are the international service providers that connect nations together. National Internet Service Providers The n ational I nternet s ervice p roviders are backbone networks created and maintained by specialized companies. There are many national ISPs operating in North America; some o f the most well known are SprintLink, PSINet, UUNet Technology, AGIS, and internet M el. To provide connectivity between the end users, these backbone networks are connected by complex switching stations (normally run by a third party) called n etwork access points (NAPs). Some national ISP networks are also connected to one another by private switching stations called p eering points. These S ECTION 1.4 PROTOCOLS A ND STANDARDS 19 Regional Internet Service Providers • ~ • l lllCUlCl ~CIVll.:t: • j JIVVIUCI:S V I 1 _". • .. T~~ .~r:s i llC T~~.. 1 0r:s l llal i llC • ; lCU to one or more national ISPs. They are at the third level o f the hierarchy with a smaller data rate. L ocal Internet Service Providers L ocal I nternet s ervice p roviders provide direct service to the end users. The local ISPs can be connected to regional ISPs or directly to national ISPs. Most end users are connected to the local ISPs. Note that in this sense, a local ISP can be a company that j ust provides Internet services, a corporation with a network that supplies services to its own employees, or a nonprofit organization, such as a college or a university, that runs its own network. Each o f these local ISPs can be connected to a regional or national service provider. 1.4 PROTOCOLS AND STANDARDS In this section, we define two widely used terms: protocols and standards. First, we define protocol, which is synonymous with rule. Then w e discuss standards, which are agreed-upon rules. . .... ... . 1. In computer networks, communication occurs between entities in different systems. An entity is anything capable of sending or receiving information. However, two entities cannot simply send bit streams to each other and expect to be understood. For communication to occur, the entities must agree on a protocol. A protocol is a set of rules that govern data communications. A protocol deimes what IS commumcated, how It IS commumcated, and when it is communicated. The key elements of a protocol are syntax, semantics, and timing. o Syntax. The term syntax refers to the structure or format o f the data, meaning the order in which they are presented. For example, a simple protocol might expect the first 8 bits o f data to be the address o f the sender, the second 8 bits to be the address o f the receiver, and the rest o f the stream to be the message itself. o S emantics. The word semantzcs refers to the meamng o f each sectlOn o f bItS. How is a particular pattern to be interpreted, and what action is to be taken based on that interpretation? For example, does an address identify the route to be taken or the final destination o f the message? T iming. The term t iming refers to two characteristics: when data should be sent and how fast they can be sent. For example, i f a sender produces data at 100 Mbps but the receiver can process data at only 1 Mbps, the transmission will overload the receiver and some data will be lost. o S tandards Standards are essential in creating and maintaining an open and competitive market for equipment manufacturers and in guaranteeing national and international interoperability o f data and telecommunications technology and processes. Standards provide guidelines I 20 CHAPTER 1 I NTRODUCTION to manufacturers, vendors, government agencies, and other service providers to ensure the kind o f interconnectivity necessary in today's marketplace and in international communications. Data communication standards fall into two categories: de Jacto (meaning "by fact" or "by convention") and de jure (meaning "by law" or "by regulation"). o De facto. Standards that have not been approved by an organized body but have been adopted as standards through widespread use are de facto s tandards. De facto s an ar s are 0 en es a is origin y y m functionality of a new product or technology. De j ure. Those standards that have been legislated by an officially recognized body are de j ure s tandards. o S tandards Organizations Standards are developed through the cooperation o f standards creation committees, forums, and government regulatory agencies. Standards Creation Committees While many organizations are dedicated to the establishment of standards, data telecommunications in North America rely primarily on those published by the following: I nternational Organization for Standardization (ISO). The ISO is a multinational o o o o o o f various governments throughout the world. The ISO is active in developing cooperation in the realms of scientific, technological, and economic activity. I nternational T elecommunication U nion-Telecommunication S tandards S ector (ITU-T). By the early 1970s, a number o f countries were defining national standards for telecommunications, but there was still little international compatibility. The United Nations responded by forming, as part o f its International Telecommunication Union (ITU), a committee, the C onsultative C ommittee f or I nternational T elegraphy a nd T elephony ( CCITT). This committee was devoted to the research and establishment of standards for telecommunications in genera an or p one an data systems I n partIcu ar. n arc , t e name of this committee was changed to the International Telecommunication U nionTelecommunication Standards Sector (ITU-T). A merican N ational S tandards I nstitute (ANSI). Despite its name, the American National Standards Institute is a com letel rivate, nonprofit co oration not affiliated with the U.S. federal government. However, all ANSI activities are undertaken with the welfare of the United States and its citizens occupying primary importance. I nstitute o f E lectrical a nd Electronics Engineers (IEEE). The Institute of Electrical and Electronics Engineers is the largest professional engineering society in the world. International in scope, it aims to advance theory, creativity, and product quality in the fields of electrical engineering, electronics, and radio as well as in all related branches o f engineering. As one of its goals, the IEEE oversees the development and adoption of international standards for computing and communications. E lectronic I ndustries Association (EIA). Aligned with ANSI, the Electronic S ECTION 1.5 R ECOMMENDED READlNG 21 electronics manufacturing concerns. Its activities include public awareness education and lob in efforts in addition to standards develo ment. In the field o f information technology, the EIA has made significant contributions by defining physical connection interfaces and electronic signaling specifications for data communication. Forums Telecommunications technology development is moving faster than the ability o f standards committees to ratify standards. Standards committees are procedural bodies and b y nature slow-moving. To accommodate the need for working models and agreements and to facilitate the standardization process, many special-interest groups have developed f orums made up o f r epresentatives from interested corporations. The forums work with universities and users to test, evaluate, and standardize new technologies. By concentrating their efforts on a particular technology, the forums are able to speed acceptance and use o f those technologies in the telecommunications community. The forums present their conclusions to the standards bodies. Regulatory Agencies All communications technology is subject to regulation by government agencies such as the F ederal Communications Commission (FCC) in the United States. The purpose o f these agencies is to protect the public interest by regulating radio, television, and wire/cable communications. The FCC has authority over interstate and internatIOnal commerce as It relates to commUlllcatlOns. I nternet S tandards An I nternet s tandard is a thoroughly tested specification that is useful to and adhered to by those who work with the Internet. I t is a fonnalized regulation that must be fol lowed. There is a strict procedure by which a specification attains Internet standard status. A specification begins as an Internet draft. An I nternet d raft is a working document (a work in progress) with no official status and a 6-month lifetime. Upon recommendation from the Internet authorities, a draft may be published as a R equest for Comment (RFC). Each RFC is edited, assigned a number, and made available to all interested parties. RFCs go through maturity levels and are categorized according to their requirement level. 1.5 R ECOMMENDED R EADING F or more details about subjects discussed in this chapter, we recommend the following books and sites. The items enclosed in brackets [. .. J refer to the reference list at the end o f the book. Books The introductory materials covered in this chapter can be found in [Sta04J and [PD03]. [Tan03J discusses standardization in Section 1.6. 22 CHAPTER I INTRODUCTION Sites The following sites are related to topics discussed in this chapter. o This site gives the status o f vari<ilus networking standards. w The Internet Engineering Task Force (IETF) home page. o RFCs The following site lists all RFCs, including those related to I P and TCP. In future chapters we cite the RFCs pertinent to the chapter material. o www.ietf.orglrfc.html 1.6 KEY TERMS Advanced Research Projects Agency (ARPA) American National Standards Institute (ANSI) American Standard Code for Information Interchange (ASCII) ARPANET audio backbone Basic Latin bus topology r I. forum full-duplex mode, or duplex h:11f-nnnlf>x m nnf> hub image Institute o f Electrical and Electronics Engineers (IEEE) International Organization for Standardization (ISO) International Telecommunication Union-Telecommunication S tandards c. ,> (TTTJ- T) vv~v Consultative Committee for International Telegraphy and Telephony (CCITT) data data communications de facto standards de jure standards delay distributed processing Electronic Industries Association (EIA) entity Federal Communications Commission (FCC) Internet Internet draft Internet service provider (ISP) Internet standard internetwork o r internet local area network (LAN) local Internet service providers mesh topology message metropolitan area network (MAN) multipoint or multidrop connection national Internet service provider network S ECTION 1.7 network access points (NAPs) node performance physical topology point-to-point connection protocol receiver regional ISP reliability Request for Comment (RFC) ROB ring topology security semantics 1.7 o o o o o o o o o o o o o o o S UMMARY 23 sender simplex mode star topology syntax telecommunication throughput timing Transmission Control Protocol! Internetworking Protocol (TCPIIP) transmission medium Unicode video wide area network (WAN) YCM SUMMARY Data communications are the transfer o f data from one device to another via some form o f transmission medium. A data communications system must transmit data to the correct destination in an accurate and timely manner. The five components that make up a data communications system are the message, sender, receiver, medium, and protocol. Text, numbers, images, audio, and video are different forms o f information. Data flow between two devices can occur in one o f three ways: simplex, half-duplex, or full-duplex. A network is a set o f communication devices connected by media links. I n a point-to-point connection, two and only two devices are connected by a dedicated link. In a multipoint connection, three or more devices share a link. Topology refers to the physical or logical arrangement o f a network. Devices may be arranged in a mesh, star, bus, or ring topology. A network can be categorized as a local area network or a wide area network. A L AN is a data communication system within a building, plant, or campus, or between nearby buildings. A WAN is a data communication system spanning states, countries, or the whole world. An internet is a network o f networks. The Internet is a collection o f many separate networks. There are local, regional, national, and international Internet service providers. A protocol is a set o f rules that govern data communication; the key elements of a protocol are syntax, semantics, and timing. 24 CHAPTER 1 INTRODUCTiON o o o o Standards are necessary to ensure that products from different manufacturers can work together as expected. The ISO, ITU-T, ANSI, IEEE, and EIA are some o f the organizations involved in standards creation. Forums are special-interest groups that quickly evaluate and standardize new technologies. A R equest for Comment is an idea o r c oncept that is a precursor to an Internet standard. 1.8 PRACTICE SET Review Questions 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 1 1. 12. 13. Identify the five components o f a data communications system. W hat are the advantages o f distributed processing? W hat are the three criteria necessary for an effective and efficient network? W hat are the advantages o f a multipoint connection over a point-to-point connection? What are the two types o f line configuration? Categorize the four basic topologies in terms o f line configuration. W hat is the difference between half-duplex and full-duplex transmission modes? Name the four basic network topologies, and cite an advantage o f each type. F or n devices in a network, what is the number o f cable links required for a mesh, ring, bus, and star topology? W hat are some o f the factors that determine whether a communication system is a LAN or WAN? W hat is an internet? What is the Internet? Why are protocols needed? Why are standards needed? Exercises 14. What is the maximum number o f characters or symbols that can be represented by Unicode? 15. A color image uses 16 bits to represent a pixel. What is the maximum number o f different colors that can be represented? 16. Assume six devices are arranged in a mesh topology. How many cables are needed? How many ports are needed for each device? 17. For each of the following four networks, discuss the consequences i f a connection fails. a. Five devices arranged in a mesh topology b. Five devices arranged in a star topology (not counting the hub) c. Five devices arranged in a bus topology d. Five devices arranged in a ring topology S ECTION 1.8 PRACTICE SET 25 18. You have two computers connected by an Ethernet hub at home. Is this a LAN, a 1 \/f A 1\.T U TA 1\.T') D , ~ ,1 < . J 19. 20. 21. 22. 23. In the ring topology in Figure 1.8, what happens i f one o fthe stations is unplugged? In the bus topology in Figure 1.7, what happens i f o ne o fthe stations is unplugged? Draw a hybrid topology with a star backbone and three ring networks. Draw a hybrid topology with a ring backbone and two bus networks. Performance is inversely related to delay. When you use the Internet, which o f the following applications are more sensitive to delay? a. Sending an e-mail b. Copying a file c. Surfing the Internet 24. When a party makes a local telephone call to another party, is this a point-to-point o r multipoint connection? Explain your answer. 25. Compare the telephone network and the Internet. What are the similarities? What are the differences? Research Activities 26. 27. 28. 29. Using the site, discuss the OSI model. Using the site, discuss ANSI's activities. Using the site, discuss IEEE's activities. Using the site w, discuss the different types o f RFCs. C HAPTER 2 N etwork Models A network is a combination o f hardware and software that sends data from one location to another. The hardware consists o f the physical equipment that carries signals from one point o f the network to another. The software consists o f instruction sets that make possible the services that we expect from a network. We can compare the task o f networking to the task o f solving a mathematics problem with a computer. The fundamental job o f solving the problem with a computer is done by computer hardware. However, this is a very tedious task i f only hardware is involved. We would need switches for every memory location to store and manipulate data. The task is much easier i f software is available. At the highest level, a program can direct the problem-solving process; the details o f how this is done by the actual hardware can be left to the layers o f software that are called by the higher levels. Compare this to a service provided by a computer network. For example, the task o f sending an e-mail from one point in the world to another can be broken into several tasks, each performed by a separate software package. Each software package uses the services o f another software package. At the lowest layer, a signal, or a set o f signals, is sent from the source computer to the destination computer. In this chapter, we give a general idea o f the layers o f a network and discuss the functions o f each. Detailed descriptions o f these layers follow in later chapters. 2.1 LAYERED TASKS We use the concept o f layers in our daily life. As an example, let us consider two friends who communicate through postal mail. The process o f sending a letter to a friend would be complex i f there were no services available from the post office. Figure 2.1 shows the steps in this task. 27 28 C HAPTER 2 N ETWORK M ODELS F igure 2.1 Tasks involved in sending a letter Sender Receiver I t t The letter is written, put in an envelope, and dropped in a mailbox. Higher layers I The letter is picked up, removed from the envelope, and read. I Middle layers T he letter is carried from the post office to the mailbox. I I T he letter is delivered to a carrier by the post office. Lower layers T he letter is deli vered from the carrier to the post office. The letter is carried from the mailbox to a post office. II II The parcells carned from the source to the destination. Sender, Receiver, a nd C arrier In Figure 2.1 we have a sender, a receiver, and a carrier that transports the letter. There is a hierarchy oftasks. A t the Sender Site L et us first describe, in order, the activities that take place at the sender site. D H igher layer. The sender writes the letter, inserts the letter in an envelope, writes the sender and receiver addresses, and drops the letter in a mailbox. D M iddle layer. The letter is picked up by a letter carrier and delivered to the post office. D L ower layer. The letter is sorted at the post office; a carrier transports the letter. Oil the Way The letter is then on its way to the recipient. On the way to the recipient's local post office, the letter may actually go through a central office. In addition, it may be transported by truck, train, airplane, boat, or a combination o f these. A t the Receiver Site D L ower layer. The carrier transports the letter to the post office. D M iddle layer. The letter is sorted and delivered to the recipient's mailbox. D H igher layer. The receiver picks up the letter, opens the envelope, and reads it. S ECTION 2.2 T HE O Sl M ODEL 29 H ierarchy A ccording to o ur a nalysis, there are three different activities at the sender site and another three activities a t t he receiver site. T he t ask o f t ransporting the letter b etween t he s ender a nd t he r eceiver i s d one b y t he c arrier. S omething t hat is n ot o bvious i mmediately is that the tasks must be done in the o rder g iven in the hierarchy. A t t he sender site, the letter m ust b e w ritten a nd d ropped in the mailbox before being p icked u p by the letter carrier a nd d elivered to the post office. A t t he receiver site, t he l etter m ust b e d ropped i n t he r ecipient m ailbox b efore b eing p icked u p a nd r ead b y t he recipient. Services Each layer at the sending site uses the services o f the layer immediately below it. The sender at the higher layer uses the services o f t he middle layer. T he middle layer uses the services o f t he lower layer. The lower layer uses the services o f t he carrier. The layered model that dominated data communications and networking literature before 1990 was the O pen S ystems I nterconnection ( OSI) m odel. E veryone believed that the O SI m odel would become the ultimate standard for data communications, but this did not happen. The TCP/IP protocol suite became the dominant commercial architecture because i t was used and tested extensively in the Internet; the O SI m odel was never fully Implemented. I n this chapter, first we briefly discuss the O SI model, and then w e c oncentrate on TCP/IP as a protocol suite. 2.2 T HE O SI M ODEL E stablished in 1947, the International Standards Organization (ISO) is a multinational body dedicated to worldwide agreement o n i nternational standards. An I SO s tandard that covers all aspects o f netv/ork communications is the O pen S ystems Interconnection model. I t was first introduced in the late 1970s. A n o pen s ystem is a set o f protocols that allows any two different systems to communicate regardless o f t heir underlying architecture. T he p urpose o f t he O SI m odel is to show how to facilitate c ommunication between different systems without requiring changes to the logic o f t he underlying hardware and software The O S! model is not a protocol; it is a model for understanding and designing a network architecture that is flexible, robust, and interoperable. I SO is the organization. O SI is the model. T he O SI m odel is a layered f ramework f or t he d esign o f n etwork s ystems t hat allows communication between all types o f c omputer systems. I t consists o f seven separate but related layers, each o f which defines a part o f the process o f moving information across a network (see Figure 2.2). A n u nderstanding o f the fundamentals o f t he O SI model provides a solid b asis for exploring data commlJnications 30 CHAPTER 2 N ETWORK M ODELS F igure 2.2 Seven layers o f the O S! model 7 A pplication 6 P resentation 5 Session 4 T ransport 3 N etwork 2 D ata l ink 1 I Physical L ayered Architecture T he O SI model is composed o f seven ordered layers: physical (layer 1), data link (layer 2), n etwork ( layer 3), transport (layer 4), session (layer 5), presentation (layer 6), a nd application (layer 7). Figure 2.3 shows the layers involved when a message is sent from device A to device B. As the message travels from A to B, it may pass through many intermediate nodes. These intermediate nodes usually involve only the first three layers o f the OS1 model. In developing the model, the designers distilled the process o f transmitting data to its most fundamental elements. They identified which networking functions had related uses and collected those functions into discrete groups that became the layers. Each layer defines a family o f functions distinct from those o f t he other layers. B y defining and localizing functionality in this fashion, the designers created an architecture that is both comprehensive and flexible. M ost i mportantly, the O SI m odel allows complete interoperability between otherwise incompatible systems. Within a single machine, each layer calls upon the services o f t he layer j ust below it. Layer 3, for example, uses the services provided by layer 2 and provides services for l ayer 4. B etween m achines, l ayer x o n o ne m achine c ommunicates with layer x o n a nother machine. This communication is governed by an agreed-upon series o f rules and conventions called protocols. The processes on each machine that communicate at a given layer are called p eer-to-peer processes. C ommunication between machines is therefore a peer-to-peer process using the protocols appropriate to a given layer. P eer-to-Peer Processes A t the physical layer, communication is direct: In Figure 2.3, device A sends a stream o f bits to device B (through intermediate nodes). A t t he higher layers, however, communication must move down through the layers on device A, over to device B, and then S ECTION 2.2 F igure 2.3 THE O S! MODEL 31 The interaction between layers in the OS! model D evice B Device A Intennediate n ode Intermediate node Peer-to-peer protocol (7th layer) 7 Application - ----------------------- 7 -6 interface 6 Presentation Peer-to-peer proiocol (6th layer) - ----------------------- 6-5 interface 5 Session Peer-to-peer protocol (5th layer) - ----------------------- 5-4 interface Peer-to-peer protocol (4th layer) Application Presentation Session 5 5-4 interface 4 3 3 3-2 interface 3"2 interface Data link Data link 2-1 interface 2-1 interface Physical 2 6 6-5 interface - ----------------------- 4 7 7-6 interface Physical 2 Physical communication b ack up through the layers. Each layer in the sending device adds its own information to the message it receives from the layer just above it and passes the whole package to the layer j ust below it. At layer I the entire package is converted to a form that can be transmitted to the receiving device. At the receiving machine, the message is unwrapped layer by layer, with each process receiving and removing the data meant for it. For example, layer 2 removes the data meant for it, then passes the rest to layer 3. Layer 3 then removes the data meant for it and passes the rest to layer 4, and so on. Interfaces Between Layers The passing o f the data and network information down through the layers o f the sending device and back up through the layers o f the receiving device is made possible by an i nterface between each pair o f adjacent layers. Each interface defines the information and services a layer must provide for the layer above it. Well-defined interfaces and layer functions provide modularity to a network. As long as a layer provides the expected services to the layer above it, the specific implementation o f its functions can be modified or replaced without requiring changes to the surrounding layers. Organization o f t he Layers The seven layers can be thought o f as belonging to three subgroups. Layers 1, 2, and 3 -physical, data link, and n etwork-are the network support layers; they deal with 32 CHAPTER 2 N ETWORK M ODELS the physical aspects o f moving data from one device to another (such as electrical specifications, physical connections, physical addressing, and transport timing and reliability). L ayers 5, 6, and 7 s ession, p resentation, a nd a pplication c an b e thought o f as the user support layers; they allow interoperability among unrelated software systems. Layer 4, the transport layer, links the two subgroups and ensures that what the lower layers have transmitted is in a form that the upper layers can use. The upper OSI layers are almost always implemented in software; lower layers are a combination o f hardware and software, except for the physical layer, which is mostly hardware. I n Figure 2.4, which gives an overall view o f the OSI layers, D7 means the data unit at layer 7, D6 means the data unit at layer 6, and so on. The process starts at layer 7 (the application layer), then moves from layer to layer i n descending, sequential order. A t e ach layer, a header, o r p ossibly a trailer, can b e added to the data unit. Commonly, the trailer is added only at layer 2. When the formatted data unit passes through the physical layer (layer 1), it is changed into an electromagnetic signal and transported along a physical link. Figure 2.4 A n exchange using the O S! model i-!I§l :rHS-j --:H41 1- - - D6 D5 D4 - ----''--'------1 L. :-H31 D3 1- - - - - - ' - - - - - - - - 1 ~,-.m~" , H2 _ D2 I€~jl ----I i- - 1 0101010101010101101010000010000 I I 1..... ~.--" :_~i§j 0 101010101011 0 1010000010000 I t U pon reaching its destination, the signal passes into layer 1 and is transformed back into digital form. The data units then move back up through the OSI layers. As each block o f data reaches the next higher layer, the headers and trailers attached to it at the corresponding sending layer are removed, and actions appropriate to that layer are taken. By the time it reaches layer 7, the message is again in a form appropriate to the application and is made available to the recipient. S ECTION 2.3 LAYERS I N T HE O SI M ODEL 33 E ncapsulation F igure 2.3 reveals another aspect o f d ata communications in the O SI model: encapsulation. A packet (header and data) at level 7 is encapsulated in a packet at level 6. T he w hole p acket at level 6 is encapsulated in a packet at l evelS, a nd so on. I n o ther words, t he d ata portion o f a p acket at level N - I carries the whole packet (data a nd h eader and m aybe trailer) from level N. T he c oncept is called encapsulation; level N - 1 is not aware o f w hich part o f t he encapsulated packet is data a nd w hich part is the h eader o r trailer. F or level N - 1, t he whole packet coming from level N i s t reated as one integral unit. 2.3 LAYERS I N T HE O SI M ODEL I n this section w e briefly describe t he f unctions o f e ach layer in the O SI m odel. Physical Layer T he physical layer coordinates the functions required to carry a b it stream over a physical medium. I t deals with the mechanical and electrical specifications o f the interface and transmission medium. I t also defines the procedures and functions that physical devices and interfaces have to perform for transmission to Occur. Figure 2.5 shows the position o f the physical layer with respect to the transmission medium and the data link layer. Figure 2.5 Physical layer To data link layer From data link layer Physical layer Physical layer Transmission medium T he physical layer is responsible for movements of individual bits from one hop (node) to the next. T he p hysical l ayer is also c oncerned with the following' o Physical characteristics o f interfaces a nd medium. T he p hysical layer defines t he c haracteristics o f t he i nterface b etween t he d evices a nd t he t ransmission m edium. I t a lso defines the type o f t ransmission medium. o Representation of bits. T he p hysical l ayer d ata consists o f a s tream o f bits ( sequence o f Os o r I s) w ith n o i nterpretation. To b e t ransmitted, b its m ust b e 34 CHAPTER 2 N ETWORK MODELS o o o o o encoded into signals--electrical or optical. The physical layer defines the type o f e ncoding (how Os and Is are changed to signals). D ata r ate. The t ransmission r ate-the number o f bits sent each s econd-is also defined by the physical layer. In other words, the physical layer defines the duration o f a bit, which is how long it lasts. S ynchronization o f bits. The sender and receiver not only must use the same bit rate but also must be synchronized at the bit level. In other words, the sender and the receiver clocks must be synchronized. L ine configuration. The physical layer is concerned with the connection o f devices to the media. In a point-to-point configuration, two devices are connected through a dedicated link. In a multipoint configuration, a link is shared among several devices. P hysical topology. The physical topology defines how devices are connected to make a network. Devices can be connected by using a mesh topology (every device is connected to every other device), a star topology (devices are connected through a central device), a ring topology (each device is connected to the next, forming a ring), a bus topology (every device is on a common link), or a hybrid topology (this is a combination o f two or more topologies). T ransmission m ode. The physical layer also defines the direction o f transmission between two devices: simplex, half-duplex, or full-duplex. In simplex mode, only one device can send; the other can only receive. The simplex mode is a one-way communication. In the half-duplex mode, two devices can send and receive, but not at the same time. In a full-duplex (or simply duplex) mode, two devices can send and receive at the same time. D ata L ink L ayer The d ata l ink l ayer transforms the physical layer, a raw transmission facility, to a reliable link. I t makes the physical layer appear error-free to the upper layer (network layer). Figure 2.6 shows the relationship o f the data link layer to the network and physicallayers. F igure 2.6 Data link layer From network layer To network layer ...... I Data link layer Data link layer To physical layer From physical layer ...
View Full Document

This note was uploaded on 10/05/2010 for the course CNT CNT 3004 taught by Professor K during the Spring '10 term at University of Central Florida.

Ask a homework question - tutors are online