Final-Computer Networks (Theory & Practicals).pdf
Document Details
Uploaded by Deleted User
2023
Tags
Full Transcript
(i) Computer Networks: Theory & Practicals Authors Dr. Brijendra Pratap Singh Dr. Manoj Madhava Gore Assistant Professor, Professor, Department of School of Computer Science...
(i) Computer Networks: Theory & Practicals Authors Dr. Brijendra Pratap Singh Dr. Manoj Madhava Gore Assistant Professor, Professor, Department of School of Computer Science Computer Science and Engineering Technology, Bennett Engineering, Motilal Nehru University, Greater Noida, India National Institute of Technology Allahabad, Prayagraj, India Reviewer Dr. Sandeep Kumar Associate Professor, Computer Science and Engineering, IIT Roorkee, Roorkee-247667, Uttarakhand, India All India Council for Technical Education Nelson Mandela Marg, Vasant Kunj, New Delhi, 110070 (ii) BOOK AUTHOR DETAILS Dr. Brijendra Pratap Singh, Assistant Professor, School of Computer Science Engineering Technology, Bennett University, Greater Noida, India. Email ID: [email protected] Dr. Manoj Madhava Gore, Professor, Department of Computer Science and Engineering, Motilal Nehru National Institute of Technology Allahabad, Prayagraj, India. Email ID: [email protected] BOOK REVIEWER DETAILS Dr. Sandeep Kumar, Associate Professor, Computer Science and Engineering, IIT Roorkee, Roorkee-247667, Uttarakhand, India. Email ID: [email protected] BOOK COORDINATOR (S) – English Version 1. Dr. Ramesh Unnikrishnan, Advisor-II, Training and Learning Bureau, All India Council for Technical Education (AICTE), New Delhi, India Email ID: [email protected] Phone Number: 011-29581215 2. Dr. Sunil Luthra, Director, Training and Learning Bureau, All India Council for Technical Education (AICTE), New Delhi, India Email ID: [email protected] Phone Number: 011-29581210 3. Mr. Sanjoy Das, Assistant Director, Training and Learning Bureau, All India Council for Technical Education (AICTE), New Delhi, India Email ID: [email protected] Phone Number: 011-29581339 April, 2023 © All India Council for Technical Education (AICTE) ISBN : 978-81-961834-5-5 All rights reserved. No part of this work may be reproduced in any form, by mimeograph or any other means, without permission in writing from the All India Council for Technical Education (AICTE). Further information about All India Council for Technical Education (AICTE) courses may be obtained from the Council Office at Nelson Mandela Marg, Vasant Kunj, New Delhi-110070. Printed and published by All India Council for Technical Education (AICTE), New Delhi. Attribution-Non Commercial-Share Alike 4.0 International (CC BY-NC-SA 4.0) Disclaimer: The website links provided by the author in this book are placed for informational, educational & reference purpose only. The Publisher do not endorse these website links or the views of the speaker / content of the said weblinks. In case of any dispute, all legal matters to be settled under Delhi Jurisdiction, only. (iii) (iv) ACKNOWLEDGEMENT The authors are grateful to the authorities of AICTE, particularly Prof. T G Sitharam, Chairman; Dr. Abhay Jere, Vice-Chairman; Prof. Rajive Kumar, Member-Secretary, Dr. Ramesh Unnikrishnan, Advisor-II and Dr. Sunil Luthra, Director, Training and Learning Bureau for their planning to publish the books on Computer Networks: Theory & Practicals. We sincerely acknowledge the valuable contributions of the reviewer of the book Dr. Sandeep Kumar, Associate Professor, IIT Roorkee. We would like to thank Dr. Abhinav Kumar, Assistant Professor, IIIT Surat, for his valuable suggestions. We are thankful to Prof. Debahuti Mishra (Head, CSED) and Dr. Shashank Chaudhary, Dr. Dibya Rajan, Mr. Rashmi Ranjan Mohakud, and Prof. (Dr.) Manojranjan Nayak (Founder and President) Siksha ‘O’ Anusandhan Deemed to be University, Bhubaneswar, Odisha. We owe a lot to our discussions on the broad area of Computer Networks with Prof. Rajeev Tripathi, Prof. Neeraj Tyagi, Dr. Mayank Pandey and Dr. Shashank Shrivatav of MNNIT Allahabad, Prayagraj, India. This book is an outcome of various suggestions of AICTE members, experts and authors who shared their opinion and thought to further develop the engineering education in our country. Acknowledgements are due to the contributors and different workers in this field whose published books, review articles, papers, photographs, footnotes, references and other valuable information enriched us at the time of writing the book. Dr. Brijendra Pratap Singh Dr. Manoj Madhava Gore (v) PREFACE This book on “Computer Networks: Theory & Practicals” is written as a textbook for the diploma course. However, this book can be used by any interested beginner. The use of network applications and the Internet is increasing every day. It is desirable that each user should have elementary knowledge about the working of network applications and the Internet. Moreover, the professionals are supposed to know a very brief understanding of network application development, network architecture, network protocols, and network management. This book is written in such a way that a student can understand the basic concepts of networking and gets a glimpse of advanced developments related to the Internet. This book is divided into five units. Each unit is enriched with a “know more” section and laboratory task. Each unit is interrelated to the other. This book covers computer networks, standards and administration of the Internet, network architecture and protocols, along with practicals. Reading of Unit 1 is essential to understand the rest of the contents of this book. Unit 1 contains the computer network's historical development, standards, administration, network architecture, and communication perspective. Unit 2 explains the transmission media (wired and wireless), network topologies, data link layer, Ethernet, wireless LAN, and Bluetooth. Unit 3 discusses the functioning of the network layer. This unit explains how a datagram from one host to another host is transmitted through the routers. The routing algorithm and routing protocols are discussed. This discussion helps students to understand the formation of a forwarding table at a router and the transmission of a datagram from one router to another router. This unit also discusses the addressing scheme (specifically Internet Protocol version 4) for end systems and routers. Unit 4 explains the transport layer and application layer protocols and services. The transport layer provides process-to-process communication, reliable delivery, congestion control, and error control. The transmission control protocol (TCP) segment format is discussed. A network application program executes at the application layer. The application layer facilitates protocols, such as SMTP, DNS, HTTP, and FTP, for network application development. Unit 5 discusses the network devices, such as a hub, switch, router, network interface card, and Wi-Fi devices. The network management and simple network management protocol are discussed. This book contains the practicals (laboratory task), such as network cable connection (making patch card), cable testing, the configuration of desktop & laptop (i.e., IP address, subnet mask, default gateway), working with the network interface card, hub, switch, router, and wireless access point, network simulation tool (i.e., Cisco packet tracer), simulation of a wired and wireless local area network. The book aims to make a student understand the basic concepts and make the student curious about the subject for further study. Dr. Brijendra Pratap Singh Dr. Manoj Madhava Gore (vi) OUTCOME BASED EDUCATION For the implementation of an outcome based education the first requirement is to develop an outcome based curriculum and incorporate an outcome based assessment in the education system. By going through outcome based assessments, evaluators will be able to evaluate whether the students have achieved the outlined standard, specific and measurable outcomes. With the proper incorporation of outcome based education there will be a definite commitment to achieve a minimum standard for all learners without giving up at any level. At the end of the programme running with the aid of outcome based education, a student will be able to arrive at the following outcomes: Programme Outcomes (POs) are statements that describe what students are expected to know and be able to do upon graduating from the program. These relate to the skills, knowledge, analytical ability attitude and behaviour that students acquire through the program. The POs essentially indicate what the students can do from subject-wise knowledge acquired by them during the program. As such, POs define the professional profile of an engineering diploma graduate. National Board of Accreditation (NBA) has defined the following seven POs for an Engineering diploma graduate: PO1. Basic and Discipline specific knowledge: Apply knowledge of basic mathematics, science and engineering fundamentals and engineering specialization to solve the engineering problems. PO2. Problem analysis: Identify and analyses well-defined engineering problems using codified standard methods. PO3. Design/ development of solutions: Design solutions for well-defined technical problems and assist with the design of systems components or processes to meet specified needs. PO4. Engineering Tools, Experimentation and Testing: Apply modern engineering tools and appropriate technique to conduct standard tests and measurements. PO5. Engineering practices for society, sustainability and environment: Apply appropriate technology in context of society, sustainability, environment and ethical practices. PO6. Project Management: Use engineering management principles individually, as a team member or a leader to manage projects and effectively communicate about well-defined engineering activities. PO7. Life-long learning: Ability to analyse individual needs and engage in updating in the context of technological changes. (vii) COURSE OUTCOMES By the end of the course the students are expected to learn: CO-1: Understanding of computer networks, issues, limitations, options available. CO-2: Understanding of the care that needs to be taken while developing applications designed to work over computer networks. CO-3: Able to configure basic LAN and connect computers to it. CO-4: Understanding of the working of Data Link Layer, Network Layer, and Transport Layer. CO-5: Understanding of the working of Application Layer Protocols, Domain Name System, and Network Management System. Mapping of Course Outcomes with Programme Outcomes to be done according to the matrix given below: Expected Mapping with Programme Outcomes Course Outcomes (1- Weak Correlation; 2- Medium correlation; 3- Strong Correlation) PO-1 PO-2 PO-3 PO-4 PO-5 PO-6 PO-7 CO-1 3 3 3 3 1 1 3 CO-2 3 2 2 2 1 1 3 CO-3 3 2 2 2 1 1 3 CO-4 3 2 2 3 1 1 3 CO-5 3 3 3 3 1 1 3 (viii) GUIDELINES FOR TEACHERS To implement Outcome Based Education (OBE) knowledge level and skill set of the students should be enhanced. Teachers should take a major responsibility for the proper implementation of OBE. Some of the responsibilities (not limited to) for the teachers in OBE system may be as follows: Within reasonable constraint, they should manoeuvre time to the best advantage of all students. They should assess the students only upon certain defined criterion without considering any other potential ineligibility to discriminate them. They should try to grow the learning abilities of the students to a certain level before they leave the institute. They should try to ensure that all the students are equipped with the quality knowledge as well as competence after they finish their education. They should always encourage the students to develop their ultimate performance capabilities. They should facilitate and encourage group work and team work to consolidate newer approach. They should follow Blooms taxonomy in every part of the assessment. Bloom’s Taxonomy Teacher should Student should be Possible Mode of Level Check able to Assessment Students ability to Create Design or Create Mini project create Students ability to Evaluate Argue or Defend Assignment justify Students ability to Differentiate or Project/Lab Analyse distinguish Distinguish Methodology Students ability to Operate or Technical Presentation/ Apply use information Demonstrate Demonstration Students ability to Understand Explain or Classify Presentation/Seminar explain the ideas Students ability to Remember Define or Recall Quiz recall (or remember) (ix) GUIDELINES FOR STUDENTS Students should take equal responsibility for implementing the OBE. Some of the responsibilities (not limited to) for the students in OBE system are as follows: Students should be well aware of each UO before the start of a unit in each and every course. Students should be well aware of each CO before the start of the course. Students should be well aware of each PO before the start of the programme. Students should think critically and reasonably with proper reflection and action. Learning of the students should be connected and integrated with practical and real life consequences. Students should be well aware of their competency at every level of OBE. (x) ABBREVIATIONS List of Abbreviations General Terms Abbreviations Full form Abbreviations Full form ARP Address Resolution Protocol ARPANET Advanced Research Project Agency Network AS Autonomous System BGP Border Gateway Protocol BIS Bureau of Indian Standards CIDR Classless Inter-Domain Routing DHCP Dynamic Host Configuration DNS Domain Name System Protocol FTP File Transfer Protocol HTTP HyperText Transfer Protocol IANA Internet Assigned Numbers IAB Internet Architecture Board Authority IEC International Electrotechnical IEEE Institute of Electrical and Commission Electronics Engineers IRTF Internet Research Task Force IP Internet Protocol IETF Internet Engineering Task Force ISO International Organization for Standardization ISP Internet Service Provider ITU International Telecommunication Union LAN Local Area Network MSS Maximum Segment Size MTU Maximum Transfer Unit OSI Open System Interconnection OSPF Open Shortest Path First PDU Protocol Data Unit RFC Request For Comments RIP Routing Information Protocol SMTP Simple Mail Transfer Protocol SNMP Simple Network Management Protocol SQL Structured Query Language SSID Service Set Identifier STP Shielded Twisted Pair TCP Transmission Control Protocol UDP User Datagram Protocol UTP Unshielded Twisted Pair WWW World Wide Web W3C World Wide Web Consortium (xi) LIST OF FIGURES AND TABLES Unit 1 Principles of Computer Networks Fig. 1.1: A network of end systems using connecting devices 5 Fig. 1.2: Comparative analysis of OSI and TCP/IP model 10 Unit 2 Transmission Media, Data Link Layer, and Local Area Networks Fig. 2.1: Wired media 18 Fig. 2.2: Bus topology 21 Fig. 2.3: Tree topology 21 Fig. 2.4: Ring Topology 22 Fig. 2.5: Star topology 22 Fig. 2.6: A computer network scenario 23 Fig. 2.7: Explanation of working of ARP 25 Fig. 2.8: Ethernet frame 26 Fig 2.9: A wireless network – infrastructure mode 29 Fig 2.10: A wireless network – Ad Hoc mode 29 Fig 2.11: Hotspot setting in a smartphone 30 Fig 2.12: Available AP’s SSID for a Wi-Fi 30 Fig 2.13: R-45 connector, twisted pair cable, and tools 34 Table 2.1: Electromagnetic wave spectrum for the telecommunication 17 Table 2.2: Different versions of 802.11 wireless LAN 28 Unit 3 Network Layer, Routing Algorithms, and Protocols Fig. 3.1: An abstract view of a router 39 Fig. 3.2: A network scenario 1 39 Fig. 3.3: A network scenario 2 40 Fig. 3.4: Internet Protocol version 4 datagram format 41 Fig 3.5: Internet structure 48 Fig 3.6: A graph with five nodes representing a network 50 Fig 3.7: Least cost trees at each node 51 Fig 3.8: Least cost calculation 51 Fig 3.9: Distance-vector at node P and Q 52 Fig 3.10: Initial distance-vector at each node 53 Fig 3.11: Distance-vector update 53 Fig 3.12: A scenario for global network information 54 Fig 3.13: Least cost tree at node P using Dijkstra’s algorithm 56 Table 3.1: First address calculation 45 Table 3.2: Last address calculation 45 (xii) Table 3.3: Address block division into sub-block 46 Table 3.4: Special purpose addresses 46 Table 3.5: A forwarding table 47 Table 3.6: Path from each node 50 Table 3.7: Least cost tree calculation using Dijkstra’s algorithm 55 Unit 4 Transport and Application Layer Fig. 4.1: Process-to-process communication and host-to-host communication 64 Fig. 4.2: TCP header structure and data 67 Fig. 4.3: Buffer, window, segment, datagram, frame 69 Fig. 4.4: Abstract view of full-duplex connection 69 Fig. 4.5: Connection establishment and data transmission 71 Fig. 4.6: Three-way handshake connection termination 72 Fig. 4.7: Connection termination, half closed, four-way handshaking 73 Fig 4.8: Congestion control states 77 Fig 4.9: Client server architecture 78 Fig 4.10: Process-to-process communication 79 Fig 4.11: Mail transmission 80 Fig 4.12: Domain name system 82 Fig 4.13: DNS example 83 Table 4.1: Calculation of congestion window size in slow start state 75 Table 4.2: Calculation of congestion window size in congestion avoidance state 76 Table 4.3: Mail transmission between mail servers using SMTP 81 Unit 5 Networking Devices and Network Management System Fig. 5.1: A hub connected with five computers 89 Fig. 5.2: A switch working scenario 90 Fig. 5.3: An abstract view of a router 91 Fig. 5.4: A network manager and agents 93 Fig. 5.5: Format of SNMP PDU 94 Fig. 5.6: IP address and subnet mask setting 98 Fig. 5.7: Two LAN interconnection through a router 99 Fig. 5.8: Snapshot for setting router interface and PC default gateway 100 Fig. 5.9: Snapshot for setting router second interface and running ping and ipconfig command on 101 command prompt Fig. 5.10: Wireless LAN with three wireless devices 102 Fig. 5.11: Setting window of an access point 103 Fig. 5.12: Setting window of a smartphone 103 Fig. 5.13: Wireless port addition at the laptop 104 Fig. 5.14: Setting SSID, WPA2-PSK, IP address, and subnet mask in laptop 105 Fig. 5.15: Setting SSID, WPA2-PSK, IP address, and subnet mask in the second laptop 105 Fig. 5.16: A snapshot of sending simple PDU from smartphone and laptop to PC 106 (xiii) CONTENTS Foreword iv Acknowledgement v Preface vi Outcome Based Education vii Course Outcomes viii Guidelines for Teachers ix Guidelines for Students x Abbreviations and Symbols xi List of Figures xii Unit 1: Principles of Computer Networks 1-14 Unit Specifics 1 Rationale 1 Pre-requisites 1 Unit Outcomes 2 1.1 History of Computer Networks Development 2 1.2 Standards and Administration 4 1.3 Computer Networks and Internet 5 1.3.1 Hardware and Software Perspective 6 1.3.2 Internet as a Communication Infrastructure 6 1.4 Network Protocol Architecture 7 1.4.1 Open System Interconnection (OSI) Reference Model 7 1.4.2 TCP/IP Model 9 1.5 A comparative Observation of OSI and TCP/IP Model 10 Unit summary 11 Exercises 11 Practical 13 Know more 13 References and suggested readings 14 Unit 2: Transmission Media, Data Link Layer, and Local Area Networks 15-35 Unit Specifics 15 Rationale 16 Pre-requisites 16 Unit Outcomes 16 (xiv) 2.1 Transmission Media 17 2.1.1 Wired Transmission Medium 17 2.1.2 Wireless (Unguided) Transmission Media 19 2.2 Network Topologies 20 2.3 Data Link Layer 22 2.3.1 Data Link Layer Implementation 24 2.3.2 Link Layer Addressing 24 2.4 Local Area Network 25 2.4.1 Ethernet 26 2.4.2 IEEE 802.11 Wireless LAN 27 2.4.3 Bluetooth 31 2.5 Switching Technique 31 2.5.1 Circuit Switching 31 2.5.2 Packet Switching 31 Unit summary 32 Exercises 32 Practicals 33 Know more 35 References and suggested readings 35 Unit 3: Network Layer, Routing Algorithms, and Protocols 36-61 Unit Specifics 36 Rationale 36 Pre-requisites 36 Unit Outcomes 37 3.1 Network Layer 37 3.1.1 Network Performance 39 3.2 Internet Protocol 41 3.3 IPv4 Addressing 42 3.3.1 Classful Addressing 43 3.3.2 Classless Addressing 44 3.4 Routing 47 3.4.1 Distance-Vector Routing Algorithm 50 3.4.2 Link-State Routing Algorithm 54 3.4.3 Routing Information Protocol (RIP) Protocol 57 3.4.4 Open Shortest Path First (OSPF) Protocol 57 Unit summary 58 Exercises 58 Practicals 60 Know more 61 References and suggested readings 61 (xv) Unit 4: Transport and Application Layer 62-86 Unit Specifics 62 Rationale 62 Pre-requisites 62 Unit Outcomes 63 4.1 Transport Layer 63 4.1.1 Transport Layer Services 64 4.2. Transmission Control Protocol 66 4.2.1 TCP Connection, Data Transmission, and Termination 68 4.2.2 Flow Control 72 4.2.3 Error Control 73 4.2.4 Congestion Control 74 4.3 Application Layer 77 4.4 Simple Mail Transfer Protocol 80 4.4.1 Internet Mail Access Protocol 81 4.5 Domain Name System 81 Unit summary 83 Exercises 84 Practicals 85 Know more 86 References and suggested readings 86 Unit 5: Networking Devices and Network Management System 87-107 87 Unit Specifics 87 Rationale 87 Pre-requisites 88 Unit Outcomes 88 5.1 Networking Devices 5.2 Network Interface Card 88 5.3 Hub (Repeater) 89 5.4 Switch 90 5.5 Router 91 5.6 Wi-Fi Device 92 5.7 Network Management System 92 5.7.1 Simple Network Management Protocol 93 Unit summary 95 Exercises 96 Practicals 97 Know more 107 References and suggested readings 107 (xvi) References for Further Learning 108 CO and PO Attainment Table 109 Index 110 (xvii) Computer Networks: Theory & Practicals | 1 1 d Principles of Computer Networks UNIT SPECIFICS Through this unit we discuss the following aspects: History of Computer Networks Development; Standards and Administration for Internet; Computer Networks and Internet; Hardware and Software Perspective of Internet; Communication Infrastructure Perspective of Internet; Network Protocol Architecture; ISO Reference Model and TCP/IP Model. The historical development of computer networks, standardization and administration, protocols, and network architecture are discussed for understanding, curiosity, and creativity. Multiple- choice, short, and long answer types of questions are provided for practice. References are given, which will help the learner for further readings. A learner can study them for adequate practice of the concepts. An introductory lab assignment is provided to make the student of the subject familiar with the devices. Based on the chapter context, there is a “Know More” section. The supplementary information provided in “Know More” is carefully designed so that it is beneficial for the users of the book. RATIONALE Student will get introductory idea of computer networks: about the development, standards, administration, protocol, and network architecture. It explains standardization organizations such as ISO, ITU, IETF, IANA, etc. The network architectures, specifically, TCP/IP Model and OSI Reference Model are discussed and compared to get a clear understanding. All these basic aspects are relevant to start learning about computer networks and the Internet properly. PRE-REQUISITES This unit requires no pre-requisite. 2 | Principles of Computer Networks UNIT OUTCOMES The five outcomes of this unit are given below: U1-O1: Review of the Development of Computer Networks U1-O2: Describe the Standards and Administration of the Internet U1-O3: Explain Computer Network and Internet U1-O4: Understand the Network Protocol Architecture U1-O5: Describe OSI Reference Model and TCP/IP Model EXPECTED MAPPING WITH COURSE OUTCOMES Unit-1 (1- Weak Correlation; 2- Medium correlation; 3- Strong Correlation) Outcomes CO-1 CO-2 CO-3 CO-4 CO-5 U1‐O1 3 2 1 1 1 U1‐O2 3 3 2 2 2 U1‐O3 3 3 3 3 3 U1‐O4 3 3 3 3 3 U1‐O5 3 3 2 2 2 1.1 History of Computer Networks Development Telecommunication history begins with the use of drums and smoke signals in human society. In the late 18th century, that is, the 1790s, semaphore systems emerged. It requires skilled operators and expensive towers, often at the interval of 10 to 30 km; therefore, it is very costly. A line of stations that is Towers to convey textual information by means of visual signals. Claude Chappe invented a semaphore system in 1792 in France, which was the first semaphore system of the industrial age. The invention of an Electric Telegraph replaced the semaphore system. The development of communication devices with electricity started in about 1726. A successful electric telegraph was built by Francis Ronalds (English scientist and inventor) in 1816. Telegraph lines spanned over 32000 km in the United States by 1851. Most important contributions at that time were highly efficient Morse code, which was co-developed with the Vail. Samuel Morse invented a method for encoding text characters as a sequence of two different signal duration, which is used in telecommunication. In 1851, a submarine cable was installed across the English Channel. In 1857, a transatlantic cable was installed. The invention of an electric telephone happened in the 1870s. Alexander Graham Bell was an innovator. In 1886 wireless telephone call was conducted. Radio wave-based communication was established in 1901. Guglielmo Marconi and Karl Braun received a noble prize in physics for their contribution to wireless communication in 1909. Jagdish Chandra Bose (1894 -1896) investigated millimeter wave communication. He introduced the semiconductor to detect radio waves. In the 1930s, research for electronic television was started. Cathode Ray tube television is developed in the 1930s. From 1950 onwards wide use of semiconductor devices led to modern telecommunication. The concept of videotelephony was dreamed in the 1870s. Intensive research & Computer Networks: Theory & Practicals | 3 experiments have been done in the field of electric telegraphy, telephony, radio, and television. Satellite for telecommunication was introduced in the 1960s. Advancement in the submarine cable reduces the use of satellite communication but still provides service to remote places and islands where no submarine cable. In the 1950s, the dominant player in the communication area was telephone network. The development of today's internet technologies was started by the project ARPANET. This project was carried out by the Advanced Research Project Agency. Packet switching technology is invented in this period. In the 1960s, computers were very costly. Large companies, universities, and the government only have computers because of the high cost. A time-sharing system project had the goal of allowing people to harness the power of a computer. The project chooses to implement the idea of packet switching. In 1969 initially, two nodes (University of California Los Angeles (UCLA) and Stanford Research Institute (SRI)) were connected, and then two other Nodes (School of computing of the University of Utah and University of California Santa Barbara). ARPANET was an overlay built on the top of a telephone network. Other members, such as universities and government participated in ARPANET to promote research in packet switching technology, which made a large network. After ARPANET, many packet switch networks came into existence. In 1972, CYCLADES Network in France. The idea of sliding window protocol came into existence from here. In 1973, Ethernet was invented at XeroxPARC. Different kinds of packet switched networks came into existence, for example, Aloha network, Ethernet, and token ring. The problem was how to connect different kinds of networks together. TCP/IP was invented to enable communication among different networks. Gateways connect the networks and translate between different network protocols. There is no global control management. All these gateways will agree on one protocol and be standardized. This protocol is Internet Protocol (IP). In 1978, IP split into two, namely (i) IP and (ii) TCP. IP in the network and TCP at the end- point. Addresses of nodes are organized hierarchically. Class addresses in 80's class A, B, and C (not used anymore). In 1982, TCP/IP was standardized. Berkeley's Computer system research group developed a socket layer. In 1983, the Athena project at MIT built a campus area network. A lot of work was done here on file systems, distributed file systems, Kerberos authentication schemes, and ran TCP/IP stack. In 1984, Domain Name System was introduced. Originally, it was maintained in a file called host.txt. In the 1980s, to standardize protocol, the Internet Engineering Task Force (IETF) came into existence. In the late 1980s, Jacobson designed a congestion control algorithm. In 1991, another breakthrough came into existence, that is World Wide Web. It is developed by Tim Berners Lee. In the mid-1990s, commercial Internet Service Providers (ISPs) emerged into the system. For scaling, classless addressing is adopted (longest prefix match). The introduction of network address translation came into existence. Border Gateway Protocol (BGP) was introduced among the competing internet service providers. In 1993, search engine development started. In 1998, content distribution network development started. After this, peer-to-peer network on Internet development (Gnutella, Freenet, distributed hash table Chord, BitTorrent) is started. After 2000, security threats arise. A Denial-of-Service attack happened. SQL worm attack happened. Phishing and route hijacking started. 4 | Principles of Computer Networks 1.2 Standards and Administration Standard is required to establish coordination among multiple ideas (that is, how things should be done), device manufacturers, and service providers to avoid chaos. Standards deals with the requirements of interoperability. Internet standards are thoroughly tested specifications. A specification gets a standard status after passing through a strict procedure. A specification starts as a draft. Its lifetime is six months, and it has no official status. Upon the recommendation of the committee, a draft is published as a Request For Comments (RFC). An RFC document can be in one of the 6 maturity levels, namely (i) proposed standards, (ii) draft standards, (iii) internet standards, (iv) experimental, (v) informational, and (vi) historic. An RFC is classified into 5 requirement levels, namely, (i) not recommended, (ii) recommended, (iii) limited use, (iv) elective, and (v) required. International standardization authorities are established by either treaty among governments or by a voluntary organization. In the world of communication networks, the notable organizations are (i) International Telecommunication Union (ITU), (ii) International Organization for Standardization (ISO), (iii) Internet Engineering Task Force (IETF), (iv) Institute of Electrical and Electronics Engineers (IEEE), (v) Internet Society, (vi) Internet Architecture Board (IAB), and (vii) Internet Assigned Numbers Authority (IANA). International Telecommunication Union (ITU): ITU was founded in 1865. Its objective is to promote and facilitate international connectivity. The United Nations does the tasks related to the Information and Communication Technology through the ITU. ITU takes care of the allocation of satellite orbits and the global radio spectrum. It develops the standards for seamless interconnectivity worldwide in communication networks. Each time you access the Internet or make a phone call via mobile, you are benefiting from the work of ITU. It has mainly three sectors, namely (i) ITU-T (for standardization of the Telecommunication sector), (ii) ITU-R (for the Radio Communication sector), and (iii) ITU-D (for the development sector). International Organisation for Standardization (ISO): This came into existence officially in 1947 with 67 technical committees (a technical committee is a group of experts). ISO is an independent non-governmental international organisation. It has 167 national standards bodies as its member. Members are standards organisations in their countries. There is only one member per country in ISO. Bureau of Indian Standards (BIS) [National Standards Body of India]: BIS is a member of ISO. ISO brings experts on one platform through its member from all over the world to develop International Standards. ISO and ITU-T are often corporate in the case of Telecommunication standards. OSI (Open System Interconnection) network model is developed by the ISO. It has many technical committees; each committee deals a particular a specific domain. ISO/IEC JTC1 works in the domain of information technology. It is created jointly with one technical committee of ISO and with one committee of IEC (International Electrotechnical Commission). IEC is also a standardization body. Each technical committee has subcommittees. A subcommittee has working groups. The work is largely done at the working group. Institute of Electrical and Electronics Engineers (IEEE): IEEE is a technical organization. IEEE publishes journals and organizes conferences on technical domain, namely electrical, electronics, and computer science. IEEE also has standardization committees. These committees develop standards in the field of Electrical and Computer Engineering. For example, the IEEE 802 LAN/MAN standards committee develops networking standards. Ethernet, wireless LAN, wireless PAN, and wireless MAN standards are the most widely used. Computer Networks: Theory & Practicals | 5 Internet Society: The Internet Society was created in 1992 as an international non-profit organization. It provides support for the process of Internet Standardization. Internet Society accomplishes this by cooperating among the internet administrative agencies. These agencies are Internet Architecture Board, Internet Engineering Task Force, and Internet Research Task Force (IRTF). The internet architecture board evolved from an informal committee to oversee ARPANET development. IAB's primary purpose is to provide long-term technical direction for Internet development. The IAB is chartered as an advisory body of the internet society and a committee of the Internet Engineering Task Force (IETF). Internet Engineering Task Force (IETF): IETF is a standards development organization for the Internet, founded in 1986. The IETF publishes its technical documentation as RFCs (Request For Comments). The work of IETF is supported by Internet Engineering Steering Group (IESG), IAB, and IRTF. IRTF addresses research issues in the domain of Internet, which are considered as long-term issues. Internet Assigned Numbers Authority (IANA): IANA is an organisation that takes care of allocating unique codes which are used in the technical standards. IANA also manages the IP addresses allocation. IANA activities are related to domain name services, number resources (i.e., internet protocol (IP) addressing system and autonomous system numbers (used for routing internet traffic)), and protocols numbering system in cooperation with standards bodies. In the world, there are five Regional Internet Registries (RIRs). IP addresses and autonomous system numbers are managed, distributed, and registered by them. World Wide Web Consortium (W3C): W3C is the international organization for the standardization of the web. It was founded in 1994 by Tim Berners Lee. W3C develops web standards. 1.3 Computer Networks and Internet A computer network is an interconnection of computers for communication. Internet is a network of computer networks that interconnects billions of devices. A network is shown in Figure 1.1 in which end-systems (e.g., desktop, laptop, server), connection medium (e.g., wired, wireless), and connecting devices (e.g., switch, router) are used. To understand the Internet, there are two perspectives: (i) the components used in it, i.e., hardware and software, which constitute the Internet (ii) networking infrastructure, i.e., communication infrastructure that provides services to applications that are distributed over multiple machines. Figure 1.1: A network of end systems using connecting devices 6 | Principles of Computer Networks 1.3.1 Hardware and Software Perspective The Internet is a computer network. Billions of computing devices are interconnected in the Internet. A few decades ago, the computing machines in the network were desktop machines, Linux workstations, and server machines used for the services, such as web pages and email. However, nowadays, new devices include mobile smartphones, tablets, smart television, thermostat, security appliances, smart watches, eyeglasses, cars, traffic control systems, smart home devices, etc. In the terminology of the Internet, these computing devices are referred to as hosts or end systems. To make a connection among these end systems, we require the transmission medium and connecting device. The transmission medium may be wired (i.e., guided) or wireless (i.e., unguided). The wired transmission medium may be built using copper or optical fiber. The Wireless medium is the atmosphere and space in which electromagnetic waves can be transmitted. The data transmission rate depends on the medium type. An end system is connected to a connecting network device (e.g., packet switch, that is, network layer switch known as router and data link layer switch) with a transmission link. We can see in Figure 1.1, many end systems are interconnected with wired and wireless links through different kinds of connecting devices. The most prominent task of a packet switch is to forward a data packet from its incoming link interface to the outgoing link interface based on some criteria which lead the data packet to its destination end system. The end system is connected to the Internet through the Internet Services Provider (ISP). The ISP which is connected to the end system is Residential Internet Service Provider, for example, telephone companies, university ISP, and Internet Service Providers that provide a connection at airports, bus stations, railway stations, hotels, shopping malls, and so on through the Wi-Fi points. ISP itself is a network of high-speed transmission links, switch, and router devices. The end system connects to an ISP with a variety of network access, namely, broadband access (for example, cable modem or Digital subscriber line), LAN access, and wireless access. The lower-tier ISP are inter-connected to the national level and international level ISP. The upper-tier ISPs are interconnected directly through high-speed fiber optic links and high-speed routers. ISP runs Internet Protocol (IP) and implements the address and naming conventions. End systems and packet switches run the protocols for the transmission of messages. TCP/IP model is known for basically for its two primary protocols (i) TCP, and (ii) IP. For interoperability, it is necessary that everyone agrees on what the protocol does. This is the point where the standards come into the scene. Organisations such as ITU, ISO, IETF, and IEEE develop the standards. 1.3.2 Internet as a Communication Infrastructure The other perspective is that the Internet is a communication infrastructure. The task of this infrastructure is to provide transmission services to the network application programs. The end system executes network application program. The applications such as email, web surfing, messaging, real- time mapping of road traffic information, streaming videos, music, social media (e.g., Facebook, Twitter, Instagram), video conferencing, games, recommendation systems are running on multiple end systems and using network infrastructure for exchanging data. The network application program executes on the host only. A packet switch does not run the application. Operating system of the host provides a socket interface through the network application program is connected to the Internet. Through this socket interface, the network application program sends and receives the data to/from the other network application program. For the communication among the network application program, the rules defined by the socket interface are followed. Here, the perspective is that the Internet is a communication infrastructure that provides the service of Computer Networks: Theory & Practicals | 7 transmitting data from a network application program (executing on a source end system) to the network application program (executing on the destination end system). These hosts are connected through the socket interface. 1.4 Network Protocol Architecture A fundamental question is what stands by a protocol. In the context of a computer network, a protocol defines rules related to the structure or format of a message, specifies in which order a message can be transmitted, and specifies what actions should be taken after receiving a message. In other words, a protocol is a set of rules defining how communication is to proceed between the parties. What is the need for protocol architecture? When devices communicate and exchange data or control among them, this task is very complex. Communication requires a very great extent of cooperation between the communicating devices. The logic for communication is not implemented as a single module. Logics are divided into subtasks and implemented into multiple small modules. These modules are arranged in a fashion called layers. Each layer performs some specific tasks which are required for the communication between the devices. As we see the need for protocol architecture, the question arises of how looks a protocol architecture. Protocol architecture is designed as layers (a stack) of hardware and software for communication. One or more protocols are implemented at each layer of the protocol architecture. TCP/IP protocol model is one which is implemented almost everywhere in the network. Another essential protocol architecture is Open System Interconnection (OSI) model. 1.4.1 Open System Interconnection (OSI) Reference Model The development of the OSI model protocol architecture is done by the International Organisation of Standardization (ISO). OSI reference model divides network architecture into seven layers. The criteria for making a distinct layer are based on the following: (i) a new layer is introduced when different abstraction is required (ii) a layer should be introduced in such a way that information exchange across the layer is minimised (iii) the number of layers is decided in such a way that the layer does not contain many distinct functionalities (which makes the number of layers small) and also does not contain very fewer functionalities (which makes the number of layers large) (iv) each layer performs well-defined functionalities. 1. Physical Layer Physical layer concerns to the communication channels (physical medium) to send/receive raw bits. The physical layer is concerned with the questions such as how to represent 1 and 0 using an electrical signal, how long nanoseconds a bit lasts, how to establish the initial connection, how to close the connection, what should be the number of pins in the connector, what each pin is used for, and whether the transmission is simultaneously in both directions or not. 2. Data Link Layer Data link layer concerns with the taking data from upper layer and adding header information to the packet and transmit to the physical layer at the sender host. Data link layer receives the packet from the physical layer at the receiver host. The task of the data link layer is to fragment and assemble (i.e., break and combine) the packet to meet the transmission capacity of the hardware. The receiver sends acknowledgment to the sender on the receipt of each data frame. The data link layer deals with the 8 | Principles of Computer Networks issue of the coordination between fast and slow sender and receiver. To deal with this, a traffic regulation mechanism is required. In the shared channel networks (e.g., broadcast networks), issues of control of the shared channel are also taken care of by this layer. A special sublayer in the data link layer is developed to deal with this, called the medium access control sublayer. 3. Network Layer A packet is forwarded from a source end system to the destination end system. A network path is required, which is followed by the packet for the transmission. The network layer task is to determine a path in a network. Handling congestion in the network with the help of a higher layer is also the task of the network layer. The network layer also takes care of the quality-of-service of the network, such as delay, transmit time, and jitter. It also deals with the interconnection of the heterogeneous network. If you are configuring a broadcast network, finding a route is irrelevant or even non-existent. 4. Transport Layer The transport layer receives packet from the network layer and sends to the session layer. It also takes packet from session layer and transmit it to the network layer. It breaks up the data into smaller units if required. It ensures the correct order of the packets at the receiving end. Moreover, its task is to do these in such a manner that it separates the upper and lower layers, which may be changed due to hardware advancement over time. The type of service is also managed by the transport layer. First type of service provided by the transport layer is errorless connection between the network application program and guarantees ordered delivery i.e., the data packets are delivered to the receiver network application program in same order as it transmitted by the sender network application program. The second transport service sends isolated messages or data without a guarantee about the delivery order. Third is broadcasting messages to multiple destination hosts. It is an end-to-end layer protocol that is the source end system’s network application program to the destination end system’s network application program. 5. Session Layer A session is established between the communicating entities by the session layer. The session layer is responsible for controlling dialogue (that is maintaining records and managing the turn of sender and receiver for data transmission), preventing the simultaneous critical operations by two or more users using token, and synchronisation (checkpointing the long transmission helps fast recovery in case of failure). 6. Presentation Layer The data, which is going to be transmitted, has some structure, commonly known as the syntax of the data. The data also have some meaning, known as semantics. The presentation layer takes care of the structure and meaning of the data which is being communicated on a network. Computers or devices may have a different structure (representation) of data internally, but they communicate on the network with the help of the presentation layer. The data representation structure is an exchange in an abstract way. It uses encoding. 7. Application Layer The task of the application layer is to provide or define protocols that the users need to make a network application. The protocol at the application layer basically defines how an application program on the network will request and respond to data communication and define the message structure and its meaning. Application layer protocol plays a vital role in network application developments. Computer Networks: Theory & Practicals | 9 1.4.2 TCP/IP Model The TCP/IP has roots in the project ARPANET. ARPANET project was a research project which was working on packet switching technology. ARPANET has grown and connected to many Universities and government systems. It used telephone lines for connection. A problem occurred after adding satellites and radio networks to it. The existing protocol was not working. Therefore, a new architecture was needed to connect different kinds of networks. The new protocols were developed, namely, TCP and IP. This new architecture is known as TCP/IP reference model. The one goal was that the connections between sender and receiver remain intact even though some of the devices or transmission links failed. 1. Link Layer In the TCP/IP protocol architecture, link layer lies at the bottom of the stack. It is a connectionless layer. The link layer describes what must be supported by your physical link to meet the requirement of a connectionless internet layer. In other words, it is an interface between a host and a transmission link. An example of link layer protocol is Ethernet. 2. Internet Layer The internet layer injects packets from the upper layer into the network and lets them travel to their destination host. Data packets traverse through multiple switches and routers; therefore, it is possible that some packets may reach later than the other which were sent after those data packets at source. By this, out of order delivery phenomena happens. The transport layer rearranges those packets if required. The internet layer describes the packet format and protocol. This is Internet Protocol (IP). Internet layer describes protocols for routing of data packets, which are maintained in routers. The objective of the internet layer is to transmit the packets to whatever destination it supposed to go. 3. Transport Layer For a conversation between two software entities (i.e., application programs) over a network, the transport layer defines and implements protocols. The transport layer defines two protocols for end-to- end connection (here, end-to-end meaning is that application programs which are running on the end system; the network layer also provides end-to-end delivery of packets but not to the application programs; many application programs run on a host). These two protocols are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). TCP is a protocol that implements reliable packet transmission that delivers a byte stream from the source machine to the destination machine anywhere on the Internet without an error. A Byte stream is segmented by the TCP, and a TCP header is added, then the segment is sent to the lower layer, i.e., the internet layer. TCP at the destination end system reassembles these segments in the correct order and sends them to the application layer as an output stream. Flow control is implemented in TCP so that it protects a slow receiver from being swamped by a fast sender. The transport layer also defines and implements a connectionless and unreliable protocol, named user datagram protocol. Applications where prompt delivery is important, like speed for video transmission, use UDP. 4. Application Layer Session layer and presentation layer are not in the TCP/IP protocol stack. The application program itself includes a session and presentation layer if required. Many of the applications have very little use for these functionalities. Protocols, which are required for network application development, for 10 | Principles of Computer Networks example, applications such as file transfer, domain name system, electronic mail, and world wide web use the FTP, DNS, SMTP, and HTTP protocols, respectively, are part of the application layer. 1.5 A Comparative Observation of OSI and TCP/IP Model The first observation is that the OSI reference model and the TCP/IP model consist of seven layers and four layers, respectively, as depicted in Figure 1.2. The second observation is that the OSI reference model advocates for (i) connection-oriented packet transmission, as well as (ii) connectionless packet transmission in the network layer. In comparison, the network layer in the TCP/IP reference model implements only the connectionless transmission of a packet. The third observation is that the transport layer of the OSI model advocates for only connection-oriented communication; however, the transport layer of the TCP/IP model implements both connection- oriented and connectionless communication. The fourth observation is that TCP/IP protocol stack does not separate physical and data link layers. The physical layer is concerned with the transmission characteristics of the physical link, for example, copper wire, fiber optic medium, and wireless medium. The task implemented in the link layer is to control frames to send them from one device to another. The link layer also takes care of the desired degree of reliability of the frame transmission. Figure 1.2: Comparative analysis of OSI and TCP/IP model Computer Networks: Theory & Practicals | 11 UNIT SUMMARY This unit describes a brief history of the development of computer networks and the Internet. The most important development was the development of Internet Protocol and Transmission Control Protocol which paved the way to connect multiple networks which are using different technologies. The idea of packet switching was introduced to share the computing power of machines among multiple users who are geographically distant. ARPANET was an overlay network created on the top of a telephone network that makes use of the packet switching concept. In the 1980s, the idea of the sliding window protocol came into existence. In the 1980s, Ethernet was invented. Different kinds of packet switch networks came into existence, for example, Aloha network, Ethernet, and token ring. These different networks are connected together with the help of Internet Protocol (IP), which was invented to enable communication among different networks. In the late 1980s, Van Jacobson designed a congestion control algorithm. In 1991, World Wide Web was developed by Tim Berners Lee. After this, many applications like web, e-commerce, and peer-to-peer communication came into existence. After 2000, security threats also arise, like denial-of-service attacks, SQL warm attacks. The standardization and administration organizations for telecommunication and the Internet are ITU, ISO, IETF, IRTF, IEEE, IEC, Internet Society, IAB, IANA, and W3C. The elements of the computer networks are hardware and software such as desktop machines, laptops, Linux workstations, server machines for web pages and email service, mobile smartphones, tablets, thermostats, security appliances, smart home appliances, etc. These machines are referred to as a host or an end system in the Internet. These end systems are connected through transmission links and packet switches. These transmission links are of many types, such as coaxial cable, copper wire, optical fiber, and radio spectrum. End systems are connected to the Internet by having a connection to an ISP. An application program running on the end system is connected to the Internet through a socket interface. Through this socket interface, the end system program sends/receives the data to/from the Internet infrastructure for the application program executing on an end system. The two most important network architectures are OSI and TCP/IP Models. The model discusses the work and tasks performed by each layer. EXERCISES Multiple Choice Questions (MCQ) 1.1 Which of the following is not an organization for Standards and Administration? (a) ISO (b) TCP (c) IETF (d) IAB 1.2 Who invented the congestion control algorithm? (a) Van Jacobson (b) Tim Berners Lee (c) Alan Turing (d) Barbara Liskov 1.3 Which of the following is not an end system? (a) Router (b) Laptop (c) Mobile smartphone (d) Web Server 12 | Principles of Computer Networks 1.4 From the given options find out which is not a protocol? (a) HTTP (b) FTP (c) TCP (d) IAB 1.5 Who invented the World Wide Wab? (a) Leslie Lamport (b) Tim Berners Lee (c) Abhay Bhushan Pandey (d) Linus Torvalds 1.6 OSI model consists of layers ? (a) 9 (b) 6 (c) 7 (d) 3 1.7 TCP/IP reference model consists of layers? (a) 4 (b) 3 (c) 5 (d) 6 1.8 What is the full form of ISO? (a) International Standards Office (b) International Organization for Standardization (c) Organization for International Standards (d) International Standards Organization 1.9 Which one of the following is not an application layer protocol? (a) DNS (b) SMTP (c) HTTP (d) TCP 1.10 What is the full form of IEEE? (a) Institute of Electrical and Electronics Engineers (b) Institution for Electrical and Electronics Engg. (c) Information of Electrical and Ethernet Engineering (d) Information of Email, Ethernet, Energy Answers of MCQ 1.1 (b), 1.2 (a), 1.3 (a), 1.4 (d), 1.5 (b), 1.6 (c), 1.7 (a), 1.8 (b), 1.9 (d), 1.10 (a) Questions (Short Answer) 1.1 Differentiate and describe host and end system? 1.2 Is there any central authority that controls the Internet? 1.3 What is the role of IANA? 1.4 What is the purpose of Internet standardization? 1.5 What is the purpose of protocol architecture? 1.6 What is a protocol? 1.7 Describe the working of the transport layer of the OSI model. 1.8 Write names of five application layer protocols. 1.9 What is the difference between the transport layer tasks of the OSI and TCP/IP models? 1.10 In the TCP/IP model, where is the tasks of the session layer and presentation layer implemented? Computer Networks: Theory & Practicals | 13 Questions (Long Answer) 1.11 Describe the computer networks and Internet development history in detail. 1.12 Describe the following: ITU, ISO, IETF, IANA, and IEEE. 1.13 Write a brief note on computer networks and the Internet. 1.14 Compare the ISO reference model and TCP/IP model. PRACTICAL Aim Showing various types of networking cables and connectors, identifying them in the Lab Cables: 1. Ethernet Cable 2. Coaxial Cable 3. Fiber Optic Cable Connectors: 1. Ethernet Cable Connector 2. Coaxial Cable Connector 3. USB Connector 4. Fiber Optic Cable Connector KNOW MORE Data Center and Cloud A data center is a cluster of computing machines for storage and processing. Big Internet companies, such as Google, Microsoft, Amazon, and Alibaba have established data centers. A data center may consist of 10 to 100 thousand hosts. Hosts in a data center are connected through a complex computer network. The data centers are the backbone for many of the Internet applications we use frequently. For example, Amazon's e-commerce web pages are hosted at data centers. A data center provides a massively parallel computing infrastructure. A data center also provides a platform for cloud computing. Many Internet-based companies do not establish their own data center. They run their services on the cloud. 14 | Principles of Computer Networks REFERENCES AND SUGGESTED READINGS 1. Andrew S. Tanenbaum, Computer Networks, 5th Edition, PHI 2. W. Richard Stevens, TCP/IP Illustrated, Volume-1, Addision Wesley, Second Edition 3. James F. Kurose and Keith W. Ross, Computer Networking: A Top–Down Approach, Pearson, Eight Edition 4. Behrouz A. Forouzan and Firouz Mosharraf, Computer Networks: A Top-Down Approach, Mc Graw Hill Education, Special Indian Edition 2012 5. William Stalling, Computer Networking with Internet Protocols and Technology, Pearson Education, First Edition Dynamic QR Code for Further Reading Computer Networks: Theory & Practicals | 15 2 d Transmission Media, Data Link Layer, and Local Area Networks UNIT SPECIFICS Through this unit we discuss the following aspects: Transmission Medium; Wired Medium; Wireless Medium; Network topologies; Data Link Layer; Ethernet; Wireless LAN; Bluetooth; Switching Techniques. In this unit medium for transmitted data from one device to another device is discussed. The transmission medium is wired and wireless. The wired medium varies from copper cable to optical fiber cable. In the wireless medium, the electromagnetic spectrum is divided into many frequencies band. Different frequency bands are discussed in this unit. End system (host) and network connecting devices are connected in some fashion physically to make a network, referred as topology. This unit discusses the important topologies which are used in today’s network construction. After the physical connection through the medium and connecting devices, the software that handle the communication comes into the scene. This unit discusses the data link layer which performs communication between two adjacent devices. This unit discusses the local area network technologies, namely Ethernet, Wireless LAN, and Bluetooth. This unit contains questions for practice. This also provides references for further reading. There is a “Know More” section carefully designed that gives supplementary information based on the context of this unit. A laboratory task is included to get acquainted with the wires and connecting devices to make a local area network. 16 | Transmission Media, Data Link Layer, and Local Area Networks RATIONALE This unit on transmission media, topology, and local area network helps students to get a primary idea about the connections of the computers and connecting devices. The student will know how a message from the upper layer is converted to a frame, how physical addresses are used to transmit a frame by learning the data link layer. Specific local area network technologies, such as Ethernet, Wi-Fi, and Bluetooth are discussed, so that students will be able to configure and create a LAN. PRE-REQUISITES This unit requires the knowledge of Unit 1 of this book. UNIT OUTCOMES The outcomes of this unit are given below: U2-O1: Description of Transmission Medium U2-O2: Explanation of Wired Medium U2-O3: Explanation of Wireless Medium U2-O4: Description of Network Topologies U2-O5: Description of Data Link Layer U2-O6: Explanation of Ethernet U2-O7: Explanation of Wireless LAN U2-O8: Explanation of Bluetooth U2-O9: Description of Switching Techniques EXPECTED MAPPING WITH COURSE OUTCOMES Unit-2 (1- Weak Correlation; 2- Medium correlation; 3- Strong Correlation) Outcomes CO-1 CO-2 CO-3 CO-4 CO-5 U2‐O1 2 2 3 3 3 U2‐O2 2 2 2 2 2 U2‐O3 2 2 3 3 3 U2‐O4 2 2 3 3 3 U2‐O5 2 2 2 2 2 U2‐06 2 3 3 3 3 U2‐07 2 3 3 3 3 U2‐08 2 2 3 2 2 U2‐09 1 2 2 1 1 Computer Networks: Theory & Practicals | 17 2.1 Transmission Media A physical path is referred to a transmission medium through which the electromagnetic wave travels. The communication is done by transmitting the electromagnetic wave from sender to receiver. Transmission media are classified into two categories (i) guided media and (ii) unguided media. The characteristics of the guided media is that the waves are going along a solid medium, i.e., guided with the solid medium; These solid media are twisted pair cable, coaxial cable, and fiber optic cable. Medium such as the atmosphere and outer space, which provides the means to transmit electromagnetic wave but not guide them is referred to as unguided medium. The rate of the data transmission is decided by both the characteristics of medium as well as of the signal. The key concern related to a data transmission system is distance and data rate. The design factors of a transmission medium and signal are (i) bandwidth, (ii) transmission impairment, (iii) interference, and (iv) number of nodes (i.e., sender and receiver). Bandwidth: The more bandwidth gives a high data rate (if all the other factors remain constant, i.e., keeping the other factor the same). Transmission impairments: Two devices are connected with some transmission mediums. The maximum distance between the devices depends on the transmission medium. A transmission distance of a medium is highly dependent on impairments, such as attenuation. Impairments in twisted pair cables are more than coaxial cables. Impairments in coaxial cables are more than fiber optic cable. Interference: It is a problem, mainly in unguided transmission media. However, in guided media also, interference occurs due to nearby cables. For example, twisted pair cables are often bundled together, due to which interference occurs. Shielding of a guided medium reduces the interference. Signals get distorted or wiped out if signals transmitted in the medium interfere with them. Interference is a phenomenon in which two or more waves are superimposed. The superimposed waves (the resulting wave) may have more, lower, or the same amplitude. Number of nodes (i.e., the sender and receivers): A point-to-point connection can be made using a guided medium. A shared link can also be made using a guided medium by adding multiple senders and receivers. In the shared link, attenuation and distortion are observed, which reduces the distance and/or data rate. Table 2.1 presents some of the commonly used frequency ranges of electromagnetic waves. Table 2.1 Electromagnetic wave spectrum for the telecommunication Medium Frequency Range Wavelength (Meters) Wave Name Optical fiber cable 1014 - 1015 (Hz) 10-5 – 10-6 near infrared and visible Coaxial cable 103 – 109 105 - 1 radio Twisted pair cable 102 - 108 106 - 10 radio Terrestrial and satellite 109 - 1011 10-1 – 10-2 microwave transmission FM radio and TV 108 - 109 10 - 1 radio AM radio 106 - 107 103 - 102 radio Laser guided missiles 1012 - 1014 10-3 – 10-5 infrared 2.1.1 Wired Transmission Medium: It is also referred as guided medium. The transmission capacity of medium is observed as data rate or bandwidth. The capacity depends on the factors that the medium 18 | Transmission Media, Data Link Layer, and Local Area Networks is connected one to one or shared into multiple systems and the distance. Twisted pair, coaxial, and fiber optic cable are widely used wired media. Twisted pair copper cable is least expensive. Figure 2.1 shows that a twisted pair cable. A pair is used to create one link. Generally, a cable is made consisting of a number of wire pairs, wrapped by plastic cover. Hundreds of wire pair may be grouped into one cable. Each wire is twisted. Twist length of wire pairs are different. Crosstalk interferences is reduced by twisting wires. Figure 2.1: Wired media Twisted pair cables may be used for transmitting both digital and analog signals. It requires amplifiers and repeaters every 2 to 3 kilometers and 5 to 6 kilometers for digital and analog signal transmission, respectively. Twisted pair cable has limited bandwidth, data rate, and distance. Attenuation increases when the frequency of the wave increases very high. Twisted pair cable is susceptible to electromagnetic field, noise, and interference. Shielding the twisted pair of wires with metallic braid or sheathing reduces interference. The low-frequency interference is reduced by twisting the wire pair, and crosstalk is reduced by making twist lengths of the wire pairs different. Unshielded Twisted Pair (UTP) Cable: It is two insulated copper wires twisted without any insulation or shielding, called a twisted pair, as shown in Figure 2.1. UTP cables are widely used for local area networks within a college, university, etc. Data rates in local area network using twisted wire ranges from 10 Mbps to 10 Gbps. The data rate of 10Gbps can be achieved using Category 6a cable for 100 metres. Four twisted wire pairs present in category 5 cable. 100 Mbps Ethernet local area network uses 2 out of 4 pairs, 1 Gbps Ethernet uses all 4 pairs. Computer Networks: Theory & Practicals | 19 Shielded Twisted Pair (STP) Cable: Twisted pair wire has extra insulation of metal foil (or it can be braided mesh). This extra insulation covers each pair of wires, as shown in the Figure 2.1. Shielding improves the transmission rate and prevents noise and crosstalk, but it is very expensive. Coaxial cable: Coaxial cable is operated to transmit signals which takes a wide range of electromagnetic wave frequencies. It has two conductors. The inner core is insulated by a dielectric material and on that insulated core cylindrical conductor surrounds it, as shown in the Figure 2.1. An insulator covers the outer conductor. Coaxial cable is less susceptible to interference and crosstalk due to its concentric construction. Coaxial cable is used to transmit analog as well as digital signals. Coaxial cable is used widely in television signal transmission, long distances telephone signal transmission. Coaxial cable is also used for a high-speed I/O channel for computers. Using frequency division multiplexing a coaxial cable can support more than 10,000 channels. Optical Fiber: An optical fiber is made using various glasses, ultrapure silica, and plastic. It is a medium that conducts an optical ray. Ultrapure silica fiber is difficult to manufacture. A fiber optical cable is very thin, about 2 to 125 micrometers. Higher loss multi-component glass fiber is economical. A fiber optic cable has a core, cladding, and jacket, as shown in Figure 2.1. A cladding surrounds each fiber. In a long-distance telecommunication, fiber optic cable is widely used. The data reach of 1600 Gbps by fiber optical cable (using wavelength division multiplexing) is achieved. 2.1.2 Wireless (Unguided) Transmission Media: An antenna is a means to transmit and receive electromagnetic waves. The air or space acts as a medium and is unguided. Wireless transmission is of two types; the first is omnidirectional, second is directional. In omnidirectional transmission, the electromagnetic wave signal goes in all directions. Therefore, multiple antennas receive the signal. In directional transmission, a focused electromagnetic beam is put out by an antenna and the receiving antenna should be aligned carefully. Generally, a high-frequency signal is used for a directional beam. Electromagnetic waves of frequencies from 2 gigahertz (GHz) to 40 gigahertz (GHz) are referred to as microwaves. The high frequencies of electromagnetic waves are appropriate for transmission in point- to-point connection. For satellite communications, microwave is appropriate. For the omnidirectional, 30 megahertz (MHz) to one gigahertz (GHz) frequency electromagnetic waves (referred to as radio waves) are suitable. Microwave covers some ultra high frequencies and all the super high frequencies bands. Radio wave covers the Very High Frequencies (VHF) and is part of the Ultra High Frequencies (UHF) band. Infrared wave is also used in local point-to-point and multipoint communication. Medium Frequency (MF) Band: Electromagnetic waves of frequency range band 300 kilohertz (kHz) to 3000 kilohertz (kHz) are referred to as medium frequency bands. The transmission capacity of a medium is measured in terms of bandwidth and data rate. The transmission capacity of this band is 4 kilohertz (kHz) (bandwidth) and 10 bps (bits per second) to 1000 bps (data rate). MF band is mainly used in commercial AM (amplitude modulation) radio. High Frequency (HF) Band: The electromagnetic wave of frequency band 3 megahertz (MHz) to 30 megahertz (MHz) is referred to as a high-frequency band. It is mainly used in short-wave radio and citizen band (CB) radio. It supports a bandwidth and data rate of 4 kilohertz (KHz) and 10 bps to 3000 bps, respectively. 20 | Transmission Media, Data Link Layer, and Local Area Networks Very High Frequency (VHF) Band: The electromagnetic wave of the frequency band 30 megahertz (30MHz) to 300 megahertz (300MHz) is referred to as a very high-frequency band. It is mainly used in VHF television and FM (frequency modulation) radio. It supports a bandwidth of 5 megahertz (5MHz) and a data rate of up to 100 kbps. Ultra High Frequency (UHF) Band: The electromagnetic wave of the frequency band 300 megahertz (300 MHz) to 3000 megahertz (3000 MHz) is referred to as ultra-high frequency band. It is used in UHF television and terrestrial microwave communication. It supports a bandwidth of 20 megahertz (20 MHz) and 10 Mbps data rate. Super High Frequency (SHF) Band: The electromagnetic wave of frequency band 3 gigahertz (3 GHz) to 30 gigahertz (30 GHz) is referred to as super high frequency band. It is primarily used in satellite telecommunication. It supports a bandwidth of 500 megahertz (500 MHz) and 100 Mbps data rate. Extremely High Frequency (EHF) Band: The electromagnetic wave of frequency band 30 gigahertz (30 GHz) to 300 gigahertz (300 GHz) is referred to as extremely high frequency band. It is used for short point-to-point communication. It supports a bandwidth of one gigahertz (1 GHz) and 750 Mbps data rate. KU Band: The electromagnetic wave of frequency band 12 gigahertz (12 GHz) to 18 gigahertz (18 GHz) is referred to as KU band. It is fully contained in the SHF band. It is primarily used in satellite communications. Radio Wave: In informal terms, the electromagnetic wave of frequency band 3 kilohertz (3 kHz) to one gigahertz (1 GHz) is referred to as a radio wave. In general terms, it encompasses electromagnetic waves ranging from 3 kilohertz (3kHz) to 300 gigahertz (300 GHz). It contains the MF band, HF band, VHF band, and part of the UHF band. Microwave: It is the electromagnetic wave of frequency band One gigahertz (1 GHz) to 300 gigahertz (300 GHz). It contains part of the UHF band, SHF band, and EHF band. Infrared Wave: The electromagnetic wave of the frequency band 300 gigahertz (300 GHz) to 4 x 1014 Hertz (i.e., 400000 GHz; 1 GHz = 109 Hertz). These waves cannot penetrate walls. It is used in television (TV) remote control. 2.2 Network Topologies The transmission media is used to connect the devices for telecommunication. The connection architectures are known as network topology. These network topologies are bus, tree, ring, and star, which are used mainly in a local area network. Bus Topology: A bus is a multipoint medium to which multiple computer systems/hosts/endpoints are connected through a hardware interfacing tap. A bus topology is shown in Figure 2.2. A host sends data to the bus through the connected interfacing tap. The data transmitted by a host propagates in the bus in both directions, and all the connected hosts receive the data. A terminator is attached where bus terminates i.e., at end. The purpose of the terminator is to absorb signals and removes them from the bus. Computer Networks: Theory & Practicals | 21 Figure 2.2: Bus topology Tree Topology: Tree topology contains many bus topologies. It is a generalization of bus. A tree topology is shown in Figure 2.3. Tree topology begins at a point called a headend. At a headend, multiple branches of cable start. A branch cable may have another branch and so on. In a tree topology also, data sent by any host propagates in the whole tree and is received by all the hosts. Figure 2.3: Tree topology Due to the shared medium in a bus and tree topology, all the hosts in the topology received each transmission data from every host. A mechanism is required to indicate for which host the data is intended. A regulation mechanism is required to manage the transmission among all hosts to avoid the collision of signals in the bus or tree (the mechanism is referred to as medium access control). Ring Topology: A ring is formed using repeaters by connecting them point-to-point in closed form. A host or end system is connected to the repeater. The task of a repeater is to receive data from one link and transmit it to the other link bit by bit. In a ring topology, shown in Figure 2.4, the link is unidirectional. When a host transmits a frame (data) to another host in a ring topology, the frame moves through the repeater and link. The destination host copies frames at the repeater to which it is connected. Every repeater simply forwards the frame from its link. A frame stops moving when it comes again at the sender host’s repeater. A link in the ring is shared among multiple hosts; therefore, a medium access control is required. 22 | Transmission Media, Data Link Layer, and Local Area Networks Figure 2.4: Ring topology Star Topology: A star topology is formed by connecting hosts to a central device (typically a switch or hub), as shown in Figure 2.5. There are two ways for the central device to behave; the first way is that it may simply receive a frame from a host and transmit it to all the other hosts; here, the topology logically acts as a bus even though it is physically arranged as a star. The second way is that the central device transmits a frame to the intended destination host only. In the second way, it is acting as a star topology logically too. There is a topology in which all hosts have direct connections to all other hosts, termed mesh topology. If you create your network having multiple topologies, it is termed hybrid topology. Figure 2.5: Star topology 2.3 Data Link Layer To understand concepts here, we refer to any device as a node if it runs a data link layer protocol. Therefore, a node can be a host, switch, router, or WiFi access point. We refer to the transmission medium as a link that connects the adjacent node. Let us take an example as shown in Figure 2.6, laptop A transmits a message to server B. This message (datagram) will pass through the six links: (i) link 1 - WiFi link (wireless transmission medium which is shared among multiple nodes), (ii) link - 2 (Ethernet link connects the WiFi access point to the switch), (iii) link - 3 (a link between switch and router), (iv) link – 4 (a link between router and router), (v) link - 5 (Ethernet link connecting router and switch), and (vi) link - 6 (Ethernet link connecting switch and server). Here, we can observe that segment 1 as shown in the Figure 2.6 is a wireless link managed with a different data link layer protocol than segment 2, which is managed by Ethernet protocol. It simply Computer Networks: Theory & Practicals | 23 means that the communication from a sender host to destination host may pass through different data link layer protocols. Figure 2.6: A computer network scenario Data link layer performs the task of transporting a network datagram (i.e., IP datagram packet) to the adjacent node, i.e., node to adjacent node transmission. The data link layer protocol provides services such as (i) framing, (ii) link access, (iii) reliable delivery, and (iv) error detection & correction. Framing: Link layer protocol takes packets from network layer and encapsulates it into a frame. A frame is a control bit of information used by the link layer protocol along with the datagram. Different link layer protocols may have different frame formats. For example, Ethernet and 802.11 wireless LAN have different frame formats. Link Access: At physical layer, a link to the adjacent nodes might be shared by multiple nodes. A set of rules is specified to regulate the link for transmission among the nodes, known as Medium Access Protocol (MAC Protocol). If a link is connecting only one sender node and one receiver node, i.e., point-to-point connection; in this case, the MAC protocol is very simple, i.e., a frame can be transmitted when the link is idle. Reliable Delivery: A link layer protocol may provide reliable delivery of network datagram by using the acknowledgment and retransmission mechanism. For low-bit error links, for example, fiber optic, coaxial, and twisted pair cables, the implementation of reliable delivery at data link layer is a burden because reliable transport service is also provided at the transport layer. However, if a link has a high error rate, such as a wireless link, then reliable delivery at data link layer is required. Detection and Correction of Error: When a frame is transmitted at the sender node into the physical link, it might be possible that frame bits may be changed in the link due to signal attenuation and electromagnetic noise. Therefore, at the receiver node, there is a possibility that it receives incorrect data. Therefore, a mechanism is also implemented at the link layer for the detection & correction of bit 24 | Transmission Media, Data Link Layer, and Local Area Networks errors in the frame. Usually, hardware implementation is preferred for error detection at the data link layer. 2.3.1 Data Link Layer Implementation Most parts of the data link layer services are implemented in hardware. These services are mainly, accessing link or detecting bits error. This hardware is called a network adapter or network interface card (NIC). For example, Intel's 700 Series adapter implements Ethernet protocol. The IEEE 802.11 WiFi protocol is implemented on Atheros AR5006 controller. Some parts of (such as inserting link- layer address information into the frame and activating network adapter controller hardware) the link layer protocol is implemented as program (i.e., software). This executes on the CPU of the system which implements it. The data link layer protocol (software implemented portion), at the sender node, takes network datagram from upper (network) layer, which is stored in the memory and creates a frame by inserting the address information and control information. After creating a frame, it activates the network adapter controller, which takes the frame and transmits it to the physical link. On the receiver’s node, the network adapter controller receives the frame. After getting the entire frame, it extracts network datagram from it. Network adapter controller raises interrupts to CPU when it receives a frame. Software implemented portion of the link layer protocol responds to this interrupt and sends the network datagram to the network layer for further processing. The data link layer is a place in the protocol stack where software and hardware meet. 2.3.2 Link Layer Addressing A network interface adapter has an address called the link-layer address, commonly known as a physical address, LAN address, or MAC address. A host/end system or router may have multiple network interface adapters. Each network adapter of the device has a link-layer address. The physical address size is 6 bytes for LAN technology, such as Ethernet and IEEE 802.11 wireless LAN. No network adapter can have the same physical address as others. Physical address space is managed by IEEE. Address Resolution Protocol (ARP): The address resolution protocol maps the IP address to the MAC address. To understand how the ARP works, consider an example in which 6 nodes are connected, as shown in Figure 2.7. Suppose that host A wishes to transmit a network packet to host C, then host A creates a frame by the network packet, including the destination MAC address of host C. In the network packet, the destination IP addresses are already there. But how the network adapter finds the MAC address of host C. So here, address resolution protocol comes into the scene. An ARP table is maintained by each host/router. The question is how this ARP table is built from empty. Suppose the MAC address of host C is not in the ARP table of host A. Host A will create an ARP request packet that contains A’s IP address, A’s MAC address, and C’s IP address and MAC broadcast address (FF:FF:FF:FF:FF:FF). Host A sends this ARP request packet in the subnet P. ARP request packet is received by all the hosts in the subnet P. All the host check if the destination IP address is equal to its own IP address, then it creates an ARP response packet and puts its MAC address and sends it directly to the sender host A. Host A updates its ARP table. After getting the host C MAC address, it creates a frame and sends it to host C. An ARP table entry has a time to live field, i.e., a MAC address entry is deleted after some time (usually, it is 20 minutes). Computer Networks: Theory & Practicals | 25 Figure 2.7: Explanation of working of ARP Suppose host A wishes to transmit a packet to host E, which is in a different subnet. The sending host A passes the network packet, i.e., IP datagram, to its network adapter. To send a network packet from subnet P to a host in subnet Q, the network packet must be transmitted to the router interface. Thus, here the destination MAC address for the frame would be the MAC address of the router interface, namely 46:46:23:81:82:A3. (The sender host A cannot directly use the MAC address of host E in the frame as a destination MAC address. If it uses, then all the frames from host A are sent in subnet P, but there is no network adapter of that address, and the frame will be discarded by everyone.) The network adapter at the router receives the frame and sees that if it is addressed for it, then it passes to the network layer of the router. Now router finds the appropriate interface by its forwarding table and passes it to the network interface adapter. Now, here a frame is created with the MAC address of host E (obtained using ARP). 2.4 Local Area Network When you want to make a computer network for a building, school campus, university campus, or small industry, we connect the end system with network connecting devices with the help of transmission links. A network which i