C C O M P U T E R N E T W O R K S O Er. Vikrant Vij M P ABOUT THE BOOK U In this fast pace of computer world where almost everyday something new is introduced in this faculty of studies, learning computer and obtaining further knowledge in this subject has become T an essential need for everyone. Considering this crucial aspect in view, an endeavor has been E made to bring out such an ideal book on computer science that can benefit the students and teachers alike. And thus, the book titled, Computer Networks has been brought out to meet their R requirements. Examining a wide range of techniques, technologies and systems utilized in data communications N and computer networks, Computer Networks has been prepared to address various data E transmission methods used in conveying data between physically distant locations. Several types T of network are brought into consideration that may interconnect thousands of users on both permanent as well as temporary, switched basis. To execute successful communication, a set of W CCCOOOMMMPPPUUUTTTEEERRR rules and procedures has been developed, many of which are embodied in internationally accepted standards. O The organized material i.e. the outcome of this book is an effort to provide a reasonable R magnitude of balance between rigor, clarity of presentation while keeping the length of the book K NETWORKS at manageable level. Consisting of eight chapters, its prime objective is to provide an introduction to different computer network fundamentals and to develop a foundation that can be utilized as S the basis for research and further studies in this sphere. ABOUT THE AUTHOR Er. Vikrant Vij is an academician to the core. He did his B.Tech. (with distinction) in ECE from PTU, Jalandhar and M.E. in ECE from NITTTR, Chandigarh. He has contributed and presented several research and review papers in various conferences across the country. He has published a number of textbooks in communication engineering. His areas of interest include Mobile and optical E communications, VLSI design and embedded applications. He is Editor-in-Chief of International r . Journal of VLSI and Signal Processing Applications. He is currently working as Faculty at JPTC, V i k Samipur, Himachal Pradesh. He is Member of IAENG, ISTE, AIRCC and lACS IT. He is a dedicated r a social worker and Traditional Reiki master and used to conduct counseling sessions for budding n t engineers. V i j ISBN 978-93-5274-080-2 EEErrr... VVViiikkkrrraaannnttt VVViiijjj 9789352740802-0395 M.R.P. ` 395.00 (An Imprint of Laxmi Publications Pvt. Ltd.) An ISO 9001:2015 Company UCN-9804-395-COMPUTER NETWORK-VIJ COMPUTER NETWORKS COMPUTER NETWORKS For B.E./B.Tech/AMIE/AMIETE examinations in Computer Science and Electronics discipline By Er. Vikrant Vij B.tech (Hons.), M.E (ECE) Ex-Faculty in Electronics and Communication Engineering Jaypee University of Information Technology, Himachal Pradesh UNIVERSITY SCIENCE PRESS (An Imprint of Laxmi Publications Pvt. Ltd.) An ISO 9001:2008 Company BENGALURU • CHENNAI • GUWAHATI • HYDERABAD • JALANDHAR KOCHI • KOLKATA • LUCKNOW • MUMBAI • RANCHI • NEW DELHI BOSTON (USA) • NAIROBI (KENYA) COMPUTER NETWORKS © by Laxmi Publications (P) Ltd. All rights reserved including those of translation into other languages. In accordance with the Copyright (Amendment) Act, 2012, no part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise. Any such act or scanning, uploading, and or electronic sharing of any part of this book without the permission of the publisher constitutes unlawful piracy and theft of the copyright holder’s intellectual property. If you would like to use material from the book (other than for review purposes), prior written permission must be obtained from the publishers. Printed and bound in India Typeset at ABRO Enterprises, Delhi First Edition : 2018 ISBN 978-93-5274-080-2 Limits of Liability/Disclaimer of Warranty: The publisher and the author make no representation or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties. The advice, strategies, and activities contained herein may not be suitable for every situation. In performing activities adult supervision must be sought. Likewise, common sense and care are essential to the conduct of any and all activities, whether described in this book or otherwise. Neither the publisher nor the author shall be liable or assumes any responsibility for any injuries or damages arising here from. The fact that an organization or Website if referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Website may provide or recommendations it may make. Further, readers must be aware that the Internet Websites listed in this work may have changed or disappeared between when this work was written and when it is read. All trademarks, logos or any other mark such as Vibgyor, USP, Amanda, Golden Bells, Firewall Media, Mercury, Trinity, Laxmi appearing in this work are trademarks and intellectual property owned by or licensed to Laxmi Publications, its subsidiaries or affiliates. Notwithstanding this disclaimer, all other names and marks mentioned in this work are the trade names, trademarks or service marks of their respective owners. & Bengaluru 080-26 75 69 30 & Chennai 044-24 34 47 26, 24 35 95 07 & Guwahati 0361-254 36 69, 251 38 81 & Hyderabad 040-27 55 53 83, 27 55 53 93 s e & Jalandhar 0181-222 12 72 h c an & Kochi 0484-237 70 04, 405 13 03 r B & Kolkata 033-22 27 43 84 & Lucknow 0522-220 99 16 Published in india by & Mumbai 022-24 93 12 61 & Ranchi 0651-220 44 64 UNIVERSITY SCIENCE PRESS (An Imprint of Laxmi Publications Pvt. Ltd.) An ISO 9001:2008 Company 113, GOLDEN HOUSE, DARYAGANJ, NEW DELHI - 110002, INDIA Telephone : 91-11-4353 2500, 4353 2501 Fax : 91-11-2325 2572, 4353 2528 C— www.laxmipublications.com [email protected] Printed at: Dedicated to ... My Loving Parents, My Living Angels, My Guides Mrs. Muktesh Vij & Mr. Harsh Vij For showing me light on this earth... C ONTENTS Preface (xi) Acknowledgements (xiii) CHAPTER 1: COMPUTER NETWORK FUNDAMENTALS 1–35 1.1 Introduction 1 1.2 Computer Network Types 3 1.3 Network Topology 5 1.4 Network Connectivity and Protocols 9 1.5 Network Models 12 1.6 Network Services 29 1.7 Examples of Network Architectures 32 Review Questions 35 CHAPTER 2: THE PHYSICAL LAYER 36–63 2.1 Introduction 36 2.2 The Theoretical Basis for Data Communication 36 2.3 Data Communication Transmission Technology 41 2.4 Data Communication Media Technology 43 2.5 Mobile and Cellular Networks and Communication 49 2.6 Optical Switching Networks 59 Review Questions 63 CHAPTER 3: DATA LINK LAYER 64–99 3.1 Introduction 64 3.2 Framing 66 3.3 Error Detection and Correction 68 3.4 Feedback Error Control 82 3.5 Flow Control 84 (vii) (viii) 3.6 Introduction of Link Management 88 3.7 High Level Data Link Control 89 3.8 Link Management 93 3.9 Point to Point Protocol 97 Review Questions 99 CHAPTER 4: THE MEDIUM ACCESS CONTROL SUBLAYER 100–162 4.1 Introduction 100 4.2 Multiple Access Protocols 102 4.3 ETHERNET 111 4.4 Token-Ring 127 4.5 Token Bus 140 4.6 Wireless LAN (IEEE 802.11) 141 4.7 IEEE 802.16 BROADBAND WIRELESS 150 4.8 Bluetooth 153 4.9 Connecting Devices 158 Review Questions 160 CHAPTER 5: THE NETWORK LAYER 163–194 5.1 Introduction 163 5.2 Services Provided to Transport Layer 163 5.3 Network Layer Issues: Delivery and Forwarding 164 5.4 The Network Layer in Internet 166 5.5 Network Address Translation (NAT) 174 5.6 IP Version 6 176 5.7 Address Translation (ARP) 178 5.8 Host Configuration (DHCP) 180 5.9 The Internet Control Message Protocol (ICMP) 182 5.10 Routing Protocols 186 5.11 Internet Protocol Security (IPSec) 189 5.12 Virtual Private Networks (VPN) 192 Review Questions 193 CHAPTER 6: THE TRANSPORT LAYER 195–224 6.1 Introduction 195 6.2 Transport Services 196