i SYLLABUS UNIT - 1 CHAPTER - 1 : INTRODUCTION Uses of Computer Networks, Network Hardware, Network Software, Reference Models (ISO-OSI, TCP/IP). CHAPTER - 2 : NETWORK LAYER Network Layer Design Issues, Routing Algorithms, Congestion Control Algorithms, Quality of Service. UNIT - 2 CHAPTER - 3 : INTERNETWORKING Concatenated Virtual Circuits, Connectionless Internetworking, Tunneling, Internetwork Routing, Fragmentation. CHAPTER - 4 : NETWORK LAYER IN THE INTERNET IP Protocol, IP Addresses, Internet Control Protocols, OSPF, BGP, Internet Multicasting, Mobile IP, IPv6. CHAPTER - 5 : TRANSPORT LAYER The Transport Service, Elements of Transport Protocols, The Internet Transport Protocols : UDP, Internet Transport Protocols : TCP. UNIT - 3 CHAPTER - 6 : NETWORK PROGRAMMING Socket Interface : Sockets, Socket Address, Elementary Sockets, Advanced Sockets, Socket Options, IPv4 and IPv6 Interpretability, Out of Band Data, Daemon Process and Internet Super Server. Remote Procedure Calls : Introduction, Transparency Issues and Sun RPC.
UNIT - 4 ii CHAPTER - 7 : APPLICATION LAYER Domain Name System : DNS Name Space, Resource Records, Name Servers. Electronic Mail : Architecture and Services, User Agent, Message Formats, Message Transfer and Final Delivery. World Wide Web : Architectural Overview, Static Web Documents, Dynamic Web Documents, HTTP, Wireless Web. Multimedia : Digital Audio, Streaming Audio, Voice Over IP, Video on Demand. UNIT - 5 CHAPTER - 8 : NETWORK SECURITY Cryptography, Symmetric Key Algorithms, Public Key Algorithms, Digital Signatures, Management of Public Keys, Communication Security, Authentication Protocols, E-mail Security, Web Security.
iii CONTENTS UNIT - 1 [CH. H. - 1] ] [INTRODUCTION]... 1.1-1.38 1.1 INTRODUCTION TO COMPUTER NETWORKS... 1.2 1.2 COMPUTER NETWORKS... 1.2 1.2.1 Goals and Applications of Computer Networks... 1.4 1.2.2 The Difference between Computer Network and Distributed Systems... 1.5 1.3 USES OF COMPUTER NETWORKS... 1.5 1.3.1 Business Applications... 1.5 1.3.2 Home Applications... 1.7 1.3.3 Mobile Users... 1.8 1.3.4 Social Issues... 1.9 1.4 NETWORK HARDWARE... 1.9 1.4.1 Local Area Networks (LAN)... 1.11 1.4.2 Metropolitan Area Network (MAN)... 1.12 1.4.3 Wide Area Networks... 1.13 1.4.3.1 Differences between LAN,, MAN and WAN AN... 1.14 1.4.4 Wireless Networks... 1.15 1.4.5 Home Network... 1.16 1.4.6 Internetworks... 1.16 1.5 NETWORK SOFTWARE... 1.17 1.5.1 Protocol Hierarchies... 1.17 1.5.2 Design Issues for the Layers... 1.20 1.5.3 Connection-oriented and Connection-less Services... 1.20 1.5.3.1 Differences between Connection-oriented and Connection-less Services.. 1.21
iv 1.5.4 Service Primitives... 1.22 1.5.5 The Relationship of Services to Protocol... 1.23 1.5.6 Differences between Service and Protocol... 1.23 1.6 REFERENCE MODELS (ISO-OSI, TCP/IP)... 1.24 1.6.1 The OSI Reference Model... 1.24 1.6.1.1 Functions of Each Layer... 1.26 1.6.1.1.1 Physical Layer... 1.26 1.6.1.1.2 Data Link Layer... 1.26 1.6.1.1.3 Network Layer... 1.28 1.6.1.1.4 Transport Layer ayer... 1.29 1.6.1.1.5 Session Layer... 1.30 1.6.1.1.6 Presentation Layer... 1.31 1.6.1.1.7 Application Layer... 1.31 1.6.1.2 Advantages of the OSI Reference Model... 1.32 1.6.1.3 Critique of the OSI Model and Its Protocol... 1.32 1.6.2 The TCP/IP Reference Model... 1.33 1.6.3 Disadvantages of TCP/IP Model... 1.36 1.6.4 Comparison of the OSI and TCP/IP Reference Model... 1.37 1.6.5 Similarities between OSI and TCP/IP Reference Model... 1.38 UNIT - 1 [CH. - 2] ] [NETWORK LAYER]... 1.39-1.96 2.1 INTRODUCTION TO NETWORK LAYER YER... 1.40 2.1.1 Responsibilities of the Network Layer... 1.40 2.2 NETWORK LAYER DESIGN ISSUES... 1.41 2.2.1 Store and Forward Packet Switching... 1.41 2.2.2 Services Provided to the Transport Layer ayer... 1.42
v 2.2.3 Implementation of Connection-less Service... 1.43 2.2.4 Implementation of Connection-Oriented Service... 1.45 2.2.5 Comparison between Virtual-circuit and Datagram Subnets... 1.46 2.2.6 Features of Virtual-Circuit and Datagram Subnet... 1.47 2.2.6.1 Features of Virtual-Circuit Subnet... 1.47 2.2.6.2 Features of Datagram Subnet... 1.47 2.3 ROUTING ALGORITHMS... 1.47 2.3.1 Optimality Principle... 1.48 2.3.2 Shortest Path Routing... 1.48 2.3.3 Flooding... 1.50 2.3.3.1 Applications of Flooding... 1.51 2.3.3.2 Drawbacks of Flooding... 1.51 2.3.4 Distance Vector Routing... 1.52 2.3.4.1 Features of Distance Vector Processing... 1.54 2.3.4.2 Drawbacks of Distance Vector Routing... 1.54 2.3.4.3 Solution to Distance Vector Routing... 1.56 2.3.5 Link State Routing... 1.56 2.3.5.1 Problem with Link State Algorithm... 1.59 2.3.5.2 Solutions to Link State Routing... 1.59 2.3.6 Hierarchical Routing... 1.59 2.3.6.1 Advantages / Disadvantages of Hierarchical Routing... 1.61 2.3.7 Broadcast Routing... 1.61 2.3.8 Multicast Routing... 1.63 2.3.8.1 Advantages / Disadvantages of Multicast Algorithm... 1.65
vi 2.3.8.2 Applications of Multicasting... 1.65 2.3.8.3 Differences between Multicasting and Broadcasting... 1.66 2.3.9 Routing for Mobile Hosts... 1.66 2.3.10 Routing in Ad Hoc Networks... 1.68 2.3.10.1 Differences between Wired Networks and Ad Hoc Networks... 1.69 2.3.10.2 Route Discovery... 1.70 2.3.10.3 Route Maintenance... 1.73 2.3.11 Node Lookup in Peer eer-to -to-p -Peer eer Networks... 1.75 2.3.11.1 Finding Nodes in Peer eer-to -to-p -Peer eer Networks... 1.76 2.3.11.2 Advantages / Disadvantages of Peer eer-to -to-p -Peer eer Network... 1.79 2.4 CONGESTION CONTROL ALGORITHMS... 1.80 2.4.1 General Principles of Congestion Control... 1.82 2.4.2 Congestion Prevention Policies olicies... 1.83 2.4.3 Congestion Control in Virtual-Circuit Subnets... 1.85 2.4.4 Congestion Control in Datagram Subnets... 1.86 2.4.5 Load Shedding... 1.88 2.4.5.1 Random Early Detection (RED)... 1.89 2.4.6 Jitter Control... 1.89 2.5 QUALITY OF SERVICE (QoS)... 1.90 2.5.1 Techniques for Achieving Good QoS... 1.91 2.5.1.1 Traffic Shaping... 1.91 2.5.1.2 Leaky Bucket Algorithm... 1.91 2.5.1.3 Token Bucket Algorithm... 1.93 2.5.1.3.1 Combination of Token Bucket and Leaky Bucket... 1.95
vii 2.5.1.4 Resource Reservation... 1.95 2.5.1.5 Admission Control... 1.95 2.5.1.6 Over Provisioning... 1.95 2.5.1.7 Proportional Routing... 1.95 2.5.1.8 Packet Scheduling... 1.96 UNIT - 2 [CH. H. - 3] ] [INTERNETWORKING]... 2.1-2.12 3.1 INTRODUCTION TO INTERNETWORKING... 2.2 3.1.1 How Networks Differ... 2.2 3.1.2 How Networks Can be Connected... 2.3 3.1.3 Types of Internetworking... 2.5 3.1.3.1 Concatenated Virtual Circuits... 2.5 3.1.3.2 Connectionless Internetworking... 2.6 3.1.4 Tunneling unneling... 2.7 3.1.5 Internetwork Routing... 2.8 3.1.6 Fragmentation... 2.9 3.1.6.1 Transparent Fragmentation... 2.10 3.1.6.2 Non-transparent Fragmentation... 2.10 UNIT - 2 [CH. - 4] ] [NETWORK LAYER IN THE INTERNET]... 2.13-2.36 4.1 THE NETWORK LAYER IN THE INTERNET... 2.14 4.1.1 The IP Protocol... 2.14 4.1.1.1 Services Provided by IP... 2.16 4.1.2 IP Addresses... 2.17 4.1.2.1 Subnets... 2.18 4.1.2.1.1 Subnet Masking... 2.20 4.1.2.1.2 CIDR (Classless Inter Domain Routing)... 2.21 4.1.2.1.3 NAT (Network Address Translation)... 2.21
viii 4.1.3 Internet Control Protocols... 2.24 4.1.3.1 The Internet Control Message Protocol (ICMP)... 2.24 4.1.3.2 ARP (Address Resolution Protocol)... 2.24 4.1.3.3 RARP,, BOOTP and DHCP... 2.26 4.1.4 OSPF - The Interior Gateway Routing Protocol... 2.26 4.1.5 BGP - The Exterior Gateway Routing Protocol... 2.29 4.1.6 Internet Multicasting... 2.30 4.1.7 Mobile IP... 2.31 4.1.8 IPv6... 2.32 4.1.8.1 Main IPv6 Header... 2.33 4.1.8.2 Extension Headers... 2.34 4.1.8.3 Comparison Between IPv4 and IPv6... 2.36 UNIT - 2 [CH. - 5] ] [TRANSPORT LAYER]... 2.37-2.80 5.1 INTRODUCTION TO O TRANSPORT T LAYER... 2.38 5.2 THE TRANSPORT SERVICE... 2.38 5.2.1 Services Provided to the Upper Layers... 2.38 5.2.2 Transport Service Primitives... 2.39 5.2.3 Berkeley Sockets... 2.42 5.3 ELEMENTS OF TRANSPORT T PROTOCOLS OCOLS... 2.43 5.3.1 Addressing... 2.43 5.3.2 Connection Establishment... 2.45 5.3.3 Connection Release... 2.48 5.3.3.1 Comparison between Asymmetric and Symmetric Release... 2.52
ix 5.3.4 Flow Control and Buffering... 2.52 5.3.4.1 Comparison of Flow Control in Datalink Layer and Transport Layer... 2.54 5.3.5 Multiplexing... 2.54 5.3.6 Crash Recovery... 2.56 5.4 THE INTERNET TRANSPORT T PROTOCOLS OCOLS : UDP... 2.57 5.4.1 Introduction to UDP... 2.58 5.4.2 Remote Procedure Call... 2.59 5.4.3 The Realeal-Time Transport Protocol... 2.61 5.5 THE INTERNET TRANSPORT T PROTOCOLS OCOLS : TCP... 2.63 5.5.1 Introduction to TCP... 2.63 5.5.2 The TCP Service Model... 2.63 5.5.3 The TCP Protocol... 2.65 5.5.4 The TCP Segment Header... 2.65 5.5.5 TCP Connection Establishment... 2.67 5.5.6 TCP Connection Release... 2.68 5.5.7 TCP Connection Management Modeling... 2.68 5.5.8 TCP CP Transmission Policy... 2.70 5.5.9 TCP Congestion Control... 2.73 5.5.10 TCP Timer Management... 2.76 5.5.11 Wireless TCP and UDP... 2.77 5.5.12 Transactional TCP CP... 2.78 UNIT - 3 [CH. - 6] ] [NETWORK PROGRAMMING]... 3.1-3.66 6.1 INTRODUCTION TO SOCKET INTERFACE CE... 3.2 6.2 SOCKETS... 3.3 6.2.1 Socket System Call for Connection-oriented Protocol... 3.4 6.2.2 Socket System Call for Connectionless Protocol... 3.4 6.3 SOCKET ADDRESSES... 3.5
x 6.4 ELEMENTAR ARY SOCKET SYSTEM CALLS... 3.8 6.4.1 socket System Call... 3.8 6.4.2 socketpair System Call... 3.10 6.4.3 bind System Call... 3.10 6.4.4 connect System Call... 3.12 6.4.5 listen System Call... 3.13 6.4.6 accept System Call... 3.13 6.4.7 send, sendto, recv and recvfrom System Calls... 3.14 6.4.8 close System Call... 3.14 6.4.9 Byte Ordering Routines... 3.15 6.4.10 Byte Operations... 3.16 6.4.11 Address Conversion Routines... 3.18 6.4.12 Client-Server Code for Unix Domain Stream Protocol (TCP)... 3.19 6.4.13 Client-Server Code for Unix Domain Datagram Protocol (UDP)... 3.22 6.5 ADVANCED SOCKET SYSTEM CALLS... 3.26 6.5.1 readv and writev System Calls... 3.26 6.5.2 sendmsg and recvmsg System Calls... 3.28 6.5.3 getpeername System Call... 3.29 6.5.4 getsockname System Call... 3.30 6.5.5 getsockopt and setsockopt System Call... 3.31 6.5.6 shutdown System Call... 3.31 6.5.7 select System Call... 3.33 6.6 SOCKET OPTIONS... 3.34 6.6.1 The getsockopt and setsockopt Functions... 3.34 6.6.2 The fcntl System call... 3.46 6.6.3 The ioctl System Call... 3.47
xi 6.7 NON-BLOCKING I/O MODEL... 3.49 6.8 OUT-OF OF-BAND DATA... 3.50 6.8.1 Types of Out-of-band Data... 3.50 6.8.2 SPP Out-of-Band Data... 3.50 6.8.3 TCP Out-of-band Data... 3.51 6.9 DAEMON PROCESS AND INTERNET SUPERSERVER... 3.52 6.9.1 Daemon Process... 3.52 6.9.1.1 Characteristics of a Daemon Process... 3.52 6.9.1.2 Starting a Daemon Process... 3.52 6.9.1.3 Rules for Coding a Daemon... 3.53 6.9.1.4 Kernel Data Structures for Process... 3.55 6.9.1.5 Daemon Termination... 3.56 6.9.1.6 Handle SIGCLD Signals... 3.56 6.9.1.7 Skeleton Daemon... 3.57 6.9.2 Internet Superserver... 3.59 6.10 RPC (REMOTE TE PROCEDURE CALL) TRANSPARENCY ARENCY ISSUES... 3.61 6.10.1 Remote Procedure Call (RPC)... 3.61 6.10.2 Transparency Issues... 3.63 6.10.2.1 Parameter Passing assing... 3.63 6.10.2.2 Binding... 3.64 6.10.2.3 Transport Protocol... 3.64 6.10.2.4 Exception Handling... 3.64 6.10.2.5 Call Semantics... 3.65 6.10.2.6 Data Representation... 3.65 6.10.2.7 Performance... 3.66 6.10.2.8 Security... 3.66
xii UNIT - 4 [CH. H. - 7] ] [APPLICATION LAYER]... 4.1-4.78 7.1 INTRODUCTION TO APPLICATION LAYER YER... 4.2 7.2 DNS (THE DOMAIN NAME SYSTEM)... 4.2 7.2.1 The Domain Name Space... 4.3 7.2.2 Resource Records... 4.5 7.2.3 Name Servers... 4.8 7.3 ELECTRONIC MAIL... 4.9 7.3.1 Architectures and Services... 4.10 7.3.2 The User Agent... 4.11 7.3.3 Message Formats... 4.13 7.3.4 Message Transfer ransfer... 4.19 7.3.4.1 SMTP (The Simple Mail Transfer Protocol) rotocol)... 4.19 7.3.5 Final Delivery... 4.21 7.3.5.1 POP3 (Post ost Office Protocol Version 3)... 4.21 7.3.5.2 IMAP (Internet Mail Access Protocol)... 4.22 7.3.5.3 Comparison of IMAP and POP3... 4.23 7.3.5.4 Delivery Features... 4.23 7.3.5.5 Webmail... 4.24 7.4 THE WORLD WIDE WEB... 4.24 7.4.1 Architectural Overview... 4.24 7.4.1.1 The Client Side... 4.26 7.4.1.2 The Server Side... 4.29 7.4.1.3 URLs (Uniform Resource Locators)... 4.31 7.4.1.4 Statelessness and Cookies... 4.33
xiii 7.4.2 Static Web Documents... 4.35 7.4.2.1 HTML... 4.35 7.4.2.2 XML and XSL... 4.39 7.4.2.3 XHTML... 4.43 7.4.3 Dynamic Web Documents... 4.43 7.4.3.1 Differences between Server-Side and Client-Side Scripting... 4.53 7.4.4 HTTP (The Hyper Text Transport Protocol)... 4.54 7.4.4.1 HTTP Request Methods... 4.55 7.4.4.2 HTTP Message Headers... 4.56 7.4.4.3 Performance Enhancements... 4.57 7.4.5 The Wireless Web eb... 4.60 7.4.5.1 WAP (The Wireless Application Protocol)... 4.60 7.4.5.2 WAP - Protocol Stack... 4.61 7.4.5.3 Information Mode (I-Mode)... 4.63 7.4.5.3.1 Software Structure of I-Mode... 4.65 7.4.5.4 Performance Comparison of WAP AP and I-mode... 4.66 7.4.5.5 Second-Generation of Wireless Web eb... 4.67 7.5 MULTIMEDIA... 4.69 7.5.1 Applications of Multimedia... 4.69 7.5.2 Digital Audio... 4.70 7.5.3 Streaming Audio... 4.70 7.5.4 Voice Over IP... 4.71 7.5.4.1 SIP (The Session Initiation Protocol)... 4.72
xiv 7.5.4.2 H.323... 4.73 7.5.4.3 H.323 Vs SIP... 4.74 7.5.5 Video on Demand... 4.75 7.5.5.1 Video Servers... 4.76 7.5.5.2 The Distribution Network... 4.78 UNIT - 5 [CH. - 8] [NETWORK SECURITY]... 5.1-5.78 8.1 NETWORK SECURITY... 5.2 8.2 CRYPT YPTOGRAPHY... 5.3 8.2.1 Substitution Ciphers... 5.4 8.2.2 Transposition Ciphers... 5.5 8.2.3 One-Time Pads... 5.6 8.2.3.1 Quantum Cryptography... 5.6 8.2.4 Two wo Fundamental Cryptographic Principles rinciples... 5.9 8.3 SYMMETRIC KEY ALGORITHMS... 5.9 8.3.1 DES-The Data Encryption Standard... 5.10 8.3.1.1 Triple DES... 5.11 8.3.2 AES - The Advanced Encryption Standard... 5.12 8.3.3 Cipher Modes... 5.14 8.3.3.1 Electronic Code Book Mode... 5.15 8.3.3.2 Cipher Block Chaining Mode... 5.15 8.3.3.3 Cipher Feedback Mode... 5.16 8.3.3.4 Stream Cipher Mode... 5.17 8.3.3.5 Counter Mode... 5.17 8.3.4 Other Ciphers... 5.18 8.3.5 Cryptanalysis... 5.18
xv 8.4 PUBLIC KEY ALGORITHMS... 5.19 8.4.1 RSA... 5.21 8.5 DIGITAL SIGNATURES... 5.22 8.5.1 Symmetric Key Signatures... 5.22 8.5.2 Public-Key Signatures... 5.24 8.5.3 Message Digests... 5.24 8.5.4 The Birthday Attack... 5.28 8.6 MANAGEMENT OF PUBLIC KEYS... 5.29 8.6.1 Certificates... 5.30 8.6.2 X.509... 5.31 8.6.3 Public Key Infrastructures... 5.32 8.7 COMMUNICATION SECURITY... 5.34 8.7.1 IPSec [IP Security]... 5.35 8.7.2 Firewalls... 5.38 8.7.3 Virtual Private Networks... 5.41 8.7.4 Wireless Security... 5.42 8.8 AUTHENTICATION TION PROTOCOLS OCOLS... 5.46 8.8.1 Authentication Based on a Shared Secret-Key... 5.46 8.8.2 Establishing a Shared Key : The Diffie Hellman Key Exchange... 5.51 8.8.3 Authentication Using a Key Distribution Centre... 5.53 8.8.4 Authentication Using Kerberos... 5.56 8.8.5 Authentication Using Public Key Cryptography... 5.58 8.9 E-MAIL SECURITY... 5.59 8.9.1 PGP-P -Pretty Good Privacy... 5.59 8.9.2 Privacy Enhanced E-Mail (PEM)... 5.63 8.9.3 S/MIME (Secure/MIME)... 5.64
xvi 8.10 WEB SECURITY... 5.64 8.10.1 Threats... 5.64 8.10.2 Secure Naming... 5.65 8.10.3 SSL-The Secure Sockets Layer... 5.72 8.10.4 Mobile Code Security... 5.73 EXPECTED UNIVERSITY QUESTIONS Expected University Questions with Solutions... E.1 - E.12 LATEST UNIVERSITY QUESTION PAPERS WITH SOLUTIONS [December - 2011]... S.13 - S.20