0% found this document useful (0 votes)
47 views214 pages

Computer Networks - R 2021 (9.8.23)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
47 views214 pages

Computer Networks - R 2021 (9.8.23)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 214
COMPUTER NETWORKS Dr.J. SATHYA PRIYA Associate Professor Department of information Technology VELAMMAL ENGINEERING COLLEGE ‘Chennai - 600 066, S.P. REVATHY Assistant Professor Department of Information Technology VELAMMAL ENGINEERING COLLEGE Chennai - 600 088, Macnus PusiicatTions UNITI UNIT I UNIT OT UNITIV UNIT V SYLLABUS INTRODUCTION AND APPLICATION LAYER Data Communication - Networks ~ Network Types ~ Protocol Layering - TCP/P Protocol suite — OSI Model — Introduction to Sockets - Application Layer protocols: HTTP — FTP — Email protocols (SMTP - POP3 - IMAP - MIME) ~ DNS - SNMP TRANSPORT LAYER Introduction - Transport-Layer Protocols: UDP — TCP: Connection Management — Flow control - Congestion Control - Congestion avoidance (DECbit, RED) ~ SCTP ~ Quality of Service NETWORK LAYER Switching : Packet Switching - Internet protocol - IPV4 — IP Addressing — Subnetting - IPV6, ARP, RARP, ICMP, DHCP ROUTING Routing and protocols: Unicast routing - Distance Vector Routing - RIP - Link State Routing - OSPF ~ Path-vector routing - BGP - ‘Multicast Routing: DVMRP — PIM DATA LINK AND PHYSICAL LAYERS Data Link Layer ~ Framing ~ Flow control - Error control ~ Data- Link Layer Protocols - HDLC ~ PPP - Media Access Control — Ethernet Basics - CSMA/CD ~ Virtual LAN ~ Wireless LAN (802.11) - Physical Layer: Data and Signals - Performance — ‘Transmission media- Switching - Circuit Switching, CONTENTS UNIT _ INTRODUCTION AND PHYSICAL LAYER 11 Introduction 1.2 Common Network Topologies 1.3. Categories of Networks / Network types 1,4 Protocol and its layers, 1.4.1 Principles of Protocol layering 1.5 TCP/IP protocol suite 1.5.1 Layers in TCP/IP protocol 15.2 Encapsulation and Decapsulation 153 Addressing 1.5.4 Multiplexing and Demultiplexing ‘OSI Model World Wide Web and HTTP 1.7.1 Architecture of www 1.7.2. Hyper Text Transfer Protocol (HTTP) File Transfer Protocol (FTP) Electronic Mail 1.9.1 Architecture 1.9.2. MIME — Multipurpose Internet Mail Extensions 1.9.3. Web based M 110 Telnet 1.11 Secure Shell (SSH) 1.12 Domain Name System (DNS) 1.12.1 Name Space 1.12.2 DNS in the internet 1.13 Simple Network Management Protocol (snmp) 1.13.1. Components of Network Management ‘Two Marks Question and Answers UNITII TRANSPORT LAYER 2.1 Introduction 2.2 Transport Layer Protocols Mi 12 19 116 117 118 19 122 123 123 1.24 1.33 133 135 1.40 1.43 1.43 148 1.50 Ll 1.53 155 156 159 1.64 167 Ln 24 26 ‘Two Marks Questi 2.2.1 User Datagram Protocol (UDP) 2.2.2 Transmission Control Protocol (TCP) 2.2.3 Transmission Control Protocol Connection (TCP Connection) 2.2.4 State Transition Diagram (STD) 2.2.5 Windows in TCP 2.2.6 Flow control ScTP Congestion 2.4.1 Congestion Control 24.2 Congestion Prevention Policies 24.3 Congestion Avoidance Quality of Service and Answers UNIT-IT NETWORK LAYER Network Layer Services Packet Switching Network layer performance IPV4 Addresses 3.4.1 Clasoful Addressing 3.4.2 Classless Addressing 3.4.3, Dynamic host configuration protocol (DHCP) 3.44 Network Address Translation (NAT) Forwarding of IP packets ‘Network Layer Protocols 3.6.1 Internet Protocol (IP) 3.6.2. ICMPV4 IPV6 Addressing Subnet ‘Address Resolution Protocol Reverse Address Resolution Protocol (RARP) Two Marks Question and Answers UNITIV ROUTING Unicast Routing 27 241 2.14 219 2.22 223 2.26 2.36 236 2.38 2.40 243 247 3 33 38 3.12 34 3.16 3.21 3.25 3.29 3.35 3.35 3.40 3.44 347 3.47 3.49 3.51 44 43 44 UNIV DATALINK AND PHYSICAL LAYERS 5.1 Introduction - Data Link Layer 5.2 _ Link Layer Addressing (Link Address) $3 Data Link Layer Service 54 Data Link Control (DLC) and its service 5.5 Data Link Layer Protocol 5.6 hdlc (High level Data Link Control) 5.6.1 Transfer modes 5.62 Frames 5.7 Point-to-Point Protocol (PPP) 5.8 MEDIA ACCESS CONTROL, 5.8.1 Random Access Protocol 5.8.2 Controlled Access 58.3 Channelisation 5.9 Ethernet Basics 5.10 Wireless Lan (Local Area Network) 5.10.1 Standard Ethernet 5.10.2 Different Standards / Types of Ethernet 5.11 _ Fast Ethernet (IEEE 802.3U) 5.12 Gigabit Ethernet 5.13 Wireless Local Area Network (W-LAN) ‘Two marks question and Answer Routing Algorithms Unicast Routing Protocols Multicast Routing 4.4.1 Multicast Distance Vector - DVMRP 44.2 PIM 5.13.1 Introduction, 5.13.2. IEBE 802.11 5.13.3 System Architecture 5.134 Protocol Architecture 5.13.5 TEBE 802.11 Services 5.13.6 IBEE 802.11 Standards 5.13.7 Blue Tooth 42 443, 429 430 432 436 5. 53 35 56 5.15 5.19 sg. 5.20 523 5.30 331 339 5.44 531 5.3 5.88 5.58 5.62 5.64 5.66 5.66 5.69 5.70 572 5.87 5.89 5.90 5.13.8 Connecting Devices 5.14 Physical Layer 5.14.1 Physical layer — Performance 5.142 Transmission media 5.14.2.1 Guided media (wired) 5.14.22 Unguided Media (Wireless) 5.18 Switching 5.15.1 Circuit switched networks 5.15.2 Packet switching 5.15.3 Structure of a switch Two marks question and Answer Solved University Question Papers Model Question Papers 5.96 5.100 5.101 5.104 5.105 Sa 5.115 5.116 5.118 5.124 5.126 ar INTRODUCTION AND APPLICATION LAYER Data Communication - Networks ~ Network Types — Protocol Layering - TCP/IP Protocol suite ~ OSI Model ~ Introduction to Sockets - Application Layer protocols HTTP — FTP ~ Email protocols (SMTP - POP3 - IMAP - MIME) ~ DNS ~ SNMP 1.1 INTRODUCTION ‘A computer network is a collection of computers connected to share resources. It includes a printer, file server ete. A computer also called computer system participating in network can both send and receive data to and from the system. Example: Internet. A ‘computer network must possess basic features such as + Performance + Reliability + Security ‘A computer network is capable of sharing servers, functions and devices such as printers, hardware, software, operating system, transmission media, routers and interface card. ‘Computer Network-Physical Structure: ‘A network is formed by inter connecting different computer systems. The interconnections among system are achieved by maintaining links between the computer devices. In general, there are the possibilities of two types of communication links! line of configuration Point to Point Connection: Itis achieved by having a direct link between the participating nodes: Example: Telephone Call, Change of TV channel using remote control. Here exists a direct link (Point to point link) between TV and remote control. It provides advantages such as easy installation, low cost and reliability. system Networks: syster| S Mui Point et Sener System] Multi-Point Connection: In multi point connection, more than two devices share @ common link. The link can exist between a single sender and multiple receivers. Example: Satellite communication, Normally the communicating interface is called links and the devices are called as nodes. Based upon the placement of nodes, the network can be classified under different topologies, such as star, mesh, ring, bus, hybrid, client-server, peer to peer and so on, 1.2 COMMON NETWORK TOPOLOGIES To form a network, computers must be connected in some logical manner. The structure of nodes connected in some logical manner to form a network is called Network topology. Three basic network topologies are Star, Bus and Ring. Star topology is used mostly in business. In this nodes are connected to a central switch called, hub, Topology @® Mesh topology: |In Mesh topology, every device has a dedicated communication link between the other nodes. Example: Telephone regional office. Dedicated link between the two nodes provides the following advantages: ‘+ Each node can carry load ofits own, ¢ Resolves trafic problem, ‘Ensures security and privacy over data sharing. ‘© Point to point link allows easy isolation of defect in the path. Introduction and Application Layer 13 ‘© Fault identifi jon and fault isolation is easy. Due to the dedicated link among each and every node, it posses the following disadvantages: + Cost of implementation is dificult ‘© Needs more cables for installation. + VO ports and cables required to link each node is expensive Important feature of Mesh Topology: A broken link of a node does not disturb the transmission of data. One link failure can be taken care by another link of that corresponding node. It is capable of handling Targe amount of data to traverse through the network. —a7 Node Node Node 1 Mesh Node | Node In this, each node must be connected to n-1 nodes. Therefore, it has n(a-1) links, If cach physical link is duplex, then there exists n(n-1)/2 links. To accomodate all links, each device must have (n-1) input/output ports “The chance of redundant connection is high in mesh topology but itis the high fault tolerant topology. Star topology : Each device have a dedicated link to a central connection point calté@ hub. Each node take eable/interface to connect with the hub. Failure ofa node results in disconnection ‘of that particular node to the network. It is the common and most widely used topology. Computer Networks | syster| Systor| Figure 1.1. Star topology ‘© Star topology allows each node to have direct link (point to point) to the central hub (Ex.) Local Area Network. ‘2 Aub sends data to each node of a network in star topology. ‘Star topology is more reliable than the other topology. Failure of anode does not affect other nodes in star topology. Advantages : (Jess expensive than mesh topology. ii) Bach node needs only one link to connect to a hub. (iii) Easy installation and troubleshooting. (Gv) Requires less cable than mesh topology. (9) High performance and no data collision (vi) Centralization vdvantages : (Failure of hub results in collapse of entire topology: (i) Network may be stow for the large number of nodes cable sed may be long) Gi) Additional security must be ensured to protect the hub, (G) Depends on hub capability “The protocols for star network are usually Ethernet Introduction and Application Layer 15 + Itis better than bus topology, and can be installed for LAN. In star topology, we can perform backup, thus saves data in case of network failure © It commonly make use of twisted pair cable for installation ‘¢ In this promoting security to hub is most common considerable factor. (il) Bus topology = Bus topology is a multipoint communication link, where all nodes in a network gets connected to a long cable. Each node connects to the cable by means of drop lines. Drop lines is a connecting cable between the node and main cable. A tap is a connector, used to connect drop lines to the main cable. If more nodes are connected to long cable, there is more chance of heat generation which reduces the performance of network. System System] Long Cable CBnnector System] Figure 1.2 Bus topology Bus topology is early used to design local area network (LAN) It was originally developed from Ethernet network. “The network which uses bus topology is referred as “bus network”. Ethernet !Base2 is used for bus topology. A terminator is configured at the each end of the network. Lack of terminator or problem in interface makes the connectivity failure. se Computer Networks ‘Terminator is important in bus topology. With the terminator, electrical signals travels free in the entre length of cable. Without terminator signals bounces back and forth and results in conduction called ringing. Terminator has the capability to absorb electrical signals and stops reflections. Advantages + Easy installation + Ituses less cabling than the mesh or star topology. Suitable for small network. ‘+ Basy to connect devices ina linear fashion Disadvantages + Difficult to add new nodes. + Degradation of performance during heat generation in network + Signal reflection at tap degrades the network quality. # Connection failure or break in long cable disturbs all transmission ‘© Hard to troubleshoot specifi node. + Not suitable for large networks. ‘© Failure in main cable spits the network (Gv) Ring topology : Each device / node has a dedicated point to point link between the other two nodes ateither end. It is similar to token ring, defined by IEEE8025 where token is sent from one to another node until it reaches the destination. Im ring topology, data is transmitted only in one direction. Ring topology forms circle like logical connections to transfer data, ‘Itusually runs in eampus or collection of buildings to perform high speed network. Star topology can be imitated with @ wheel, where centre hub coordinates all the other nodes, Introduction and Application Layer W ee System System| Repeatsr Syster| ‘Whenever a node receives data, to be sent to other node, then the repeater generates the bits and send to the next node. Several switches and hubs ean also be connected together to create star topology. Advantages : ‘+ Easy installation and reconfiguration. ‘+ Fault isolation, where end node raises alarm to notify the problem occured. ‘Inexpensive compared to other topologies. + One computer eannot monopolize. (.¢.) does not posses all control '* Ethernet is shared access medium, means each node/station has guaranted access vantages : + Constraints on load. ‘+ Connection failure of one device affects the other. It ean be resolved by use of dual rings or auto switch to seal off the break in connection. Computer Networks ‘© Difficult to troubleshoot. ‘+ Adding or removing computers disrupts the network. (v) Hybrid topology Hybrid topology is a combination of different topology. It make use of more than cone type of topology or connective network. Example : Make use of either Wifi or Ethernet cables to connect computers. Hybrid topology also referred as tree structured topology Syn = [seer sys [sy] = (syn ssn (sym igure 1.4, Star background with bus networks, Introduction and Application Layer 19 ‘Advantages : + Signal strength + Increased flexibility + Manageable troubleshooting. Disadvantages : «Expensive, need of quality equipment. + Expensive network management. + Lots of cabling, 1.3 CATEGORIES OF NETWORKS / NETWORK TYPES Network categories are made based upon its coverage area, ‘The different categories of networks are ())_LAN (Local Area Network) (ex) College campus (ii) WAN (Wide Area Network) (ex) Internet. (iii) MAN (Metropolitan Area Network) (ex) Company (iv) PAN (Personal Area Network) (ex) Office (¥) Wireless Local Area Network (WLAN) (ex) Wifi (vi) Storage Area Network (SAN) (ex) Shared storage @ Local Area Network Local Area Network (LAN) is a computer network that can connects computer in the coverage area of 1 km to form a network. (ex) College, University campus. It is usually owned by a organisation. [EEE802.11 isthe standard for LAN. Applications of LAN are : ‘© Sharing of files. © Sharing of resources like printers. LAN can be implemented on any of the topology Computer Networks ‘© There are four main characteristics of LAN - Transmission medium, transport technique, (broadband or baseband), topology and access method, ‘© Ethernet cable is used to connect devices to LAN, ‘+ LAN’s can also be classified based on transmission medium, such as twisted pair, Coaxial cable or fibreoptic cable and topology. Wireless LAN 802.1 1a is the IEEE standard to promote wireless communication on LAN. To configure a LAN we need components such as number of workstations, network operating system, shared hardware resource, server machine, interface _medium and network interfaces. + LAN comprises of switch, routers, eables and hub to connect withthe network. Advantages of LAN : (Share both hardware and software resources among the connected devices in a LAN network. (il) Any system can transmit data at any time. Introduction and Application Layer ua Disadvantages : (Restricted to coverage atea (i) Failure of dedicated file server, disrupts the continuity of work. (ii) Emil within campus results in wast of time (i) Wide Area Networ! Wide Area Network (WAN) is a computer network that conneet devices across the geographical area and shares files, audio, video and so on. WANS are packet switched. Since internets the backbone of WAN, its installation and configuration are complex compared with LAN. It shares resources across the world, It shares both software and hardware (cloud computing) resources throughout the county. AWAN can be classified as © Switched WAN © point to point WAN Switched WAN connects different LANs through a internetworking connecting device Point to point WAN is leased line from a telephone or cable tv that connects our home computer to internet service’ provide (ISP). This type of WAN helps to provide access to the internet. ‘Switched WAN End Systern 12 ‘Computer Networks Point to point WAN feo) — Modem Meciem I Home ‘Computer SP WAN can also be built using circuit switching and packet switching which is less ‘costly than the leased line, Advantages: (High speed (i) High bandwidth (Gi) Wide coverage area (») Ubiquitousness (W). Network performance consistency Disadvantages : (i) Need to ensure security * Gi) High cost setup Gi) Maintenance is cost. Internet is a communication protocol for WAN whereas Ethernet is a communication protocol for LAN. A WAN connects several LANs. (iii) Metropolitan Area Network Metropolitan Area Network (MAN) is a computer network larger than LAN and smaller than WAN. It covers geographical area of city to provide network. TAN — Campus wide MAN - City wide WAN ~ Country wide Itprovides high speed data access through the fibre optic cables. Important purpose of MAN is to connect LAN. In earlier days, MAN is used in cural area of installing antenna at specific point to provide TV and radio signals to that specific city. These were first locally Introduction and Application Layer 133 designed to promote communication in city. This has been standardized in IEEE a @ oe Connector Signals faa] Modem) ner fa 4 lax} =| Innemet Service Provider Figure metrop MAN is made with several LAN through point to point connections. 3m Area Network MAN uses following technologies to connect with the network. (Fibre Distribution Data Interface (FDI) ‘This technology enables transfer of deta in LAN. FDDI can handle thousands of users, 10 make it possible to grow as MAN. il) Asynchronous Transfer Mode (ATM) It enables fast transfer of digital data. ATM is best suitable for online audio and video conference. It makes use of both packet and cireuit switching to transfer real-time packets. (ii) Switched Multi-Megabit Data Service (SMDS) In this data is transferred as packets to a large geographical area. It is a connectionless service, which holds data information in its header. Adv tages + ‘¢ Less expensive to connect MAN with WAN, ‘© Sending local emails free of cost 134 Computer Networks + High speed than WAN. + Improved security Disadvantages : + Difficult to manage large metropolitan area network # Additional cables Examples of MAN include cable broadband, digital cable television, A network of fire stations and so on, (iv) Personal Area Network (PAN) Personal Area Network is a computer network that covers atea of @ small school, office, building ete, Itis a type of network that interconnects individual person workspace. Examples + Connecting of devices through Wifi, Zigbee, USB, Bluetooth etc PAN provides communication among the devices like smartphones, computers, PDA’s and so on, © PAN isthe interconnection of devices within the range of individual person. It ‘ean be achieved by hath wired and wireless means. ‘© PAN also promotes wearable technology. Figure Personal Area Network Introduction and Application Layer nas ‘Advantages : ‘© Instant network formation © Data sharing © Emergency applications © Portable Disadvantages ‘* Not authorised node entry into the network, © Security issues ‘* Dynamic topology in case of adhoc and wireless networks Less coverage area © Storage é& memory may be low. Interconnection of Networks (InterNetworking) Interconnection is the process of connecting different networks using gateways. (routers) Internetworking works only on the networks which run on same protocol stack. ‘Network isa collection of computers whereas interconnection of network is the collection of networks. Connection that exists between different networks may be LAN with WAN, LAN, MAN, WAN and different LANs are known as internetwork or internet Consider a situation of connecting bus topology of LAN at one region and ring topology of LAN at other region to CEO office at some other region. So it needs to create point to point WAN using high speed DSL. Sap Hosen ing Topstogy Figure Internetwork 16 Computer Networks 1.4 PROTOCOL AND ITS LAYERS Protocol is a set of rules that gavern data communication. The key elements of a protocol are : © Syntax © Semantics © Timing Protocols are needed to perform communication in network by following set of rules. Consider a person wishes to send a letter to his friend. In order to reach the letter to friend, certain procedures must be followed from client side, receiver side and intermediate post office processing side. This set of procedure is termed as Protocol. So in network data communication follows set of rules called protocol. The different levels of hierarchy or procedures is referred as layers of protocols. “Most common layered protocol approach on network are : (Open systems Interconnection (OSI) model i) TCP MP (which makes use of internet) Two scenarios helps to understand protocal layering First scenario ‘Two friends meeting each other and communication takes place by seeing face to face is first scenario. This type of communication is simple Here the protocol (rules) they have to follow is greeting each other, sharing of vviews and so on, Second scenario Consider now these two friends A & B are at different region, A wish to send some information to B. But both expects information sent should be secure. They agree to follow security service like encryption and decryption. Encryption : itis the process of converting normal text to cipher text. i text is one which is not understable by humans. Decryption : itis the process of converting cipher text to human readable plain text. So this type of communication comes in three-layer protocol (two way communication) Introduction and Application Layer Node A Node 6 Tatens to & Tistens oA and talks and talks Plain text Cipher text “Tanamission medium Figure Thee lye protacal Advantages of Protocol layering : Ie divides complex tasks into several smaller tasks, ‘+ Provides modularity. That is each layer performs its role independent of other layers. © Ienables easy working on intermediate systems. Disadvantages : ‘To work on different layers to do even a simple task. 1.4.1 Principles of Protocol layering ‘There are two principles in protocol layering. First principle : It focus on first two layers of three layered protocol. Listening ‘opponent and performing encryption / decryption on the data to be send / receive. Second principle : It describes the third layer of three layered pratocol. It focus on send/ receive data, Logical connections Logical connections must be established among the two communication parties in ‘order to share data in networks. [tis also known as logical connection between the peers. 18 ‘Computer Networks 1.5 TCP/IP PROTOCOL SUITE ‘TCP/IP (Transmission Control Protocol / Internet Protocol) isa protocol suite used for internet communication. Earlier TCP / IP protocol suite is described as four layers [Now itis deseribed in five layer protocol model. [Roplcatons Applications j Presertaton) | smvp || Ftp || HTTP || ons || sNMP|| TELNET ‘Session ‘Transport ‘SCIP TCP [ UOP Temp ][16MP_ Network i (interes) RARP ][_ARP [pei Protocols defined by the underying networks 1 Physical host-to-network) H Fig TCP AP and O81 modet ‘Application Transport Internet ‘Network Interface Datalink layer 1 | PhysicalHardware devices Figure Five layers of TCP/IP protocol su ‘When data is sent from Node A to Node B. The sending of data starts at application layer of node A and receiving of data starts at physical layer of node B. On sending data, AA, sends itto link 1, where it chooses proper router to route the data. Node B receives the data sent by node A through link 2 at receiver end, Introduction and Application Layer Node Fa cst = tink TD ety Node ink + Router link 2 (Host) (Switch) (Swit) ‘Node (Host B) Figdre Communication between Host A and Host B Following detailed protocol diagram illustrates the data communication in internet. epieton rarepo Prysea Heat eich Pow ‘er ress ‘The above figure depicts host A and B involved in all five layers of communication. Switch involved in? layers (Data link and physical). Router involved in3 layers (Network, data link and physical) 1.5.1 Layers in TCP/1 protocol Logical connections between the host makes it easier to understand the working of ‘TCPAP protocol suite. Upper layers application, transport and network works on end to end connection ‘whereas lower level layers works on hop fo hop communication, ‘Switches transmit the data as it is. But router is capable of both analyzing and forwarding packet. Thus it can fragment the data to be send, 120 Computer Networks on eatin be Identical objects (messages) Pepe Transpo Transport 2 Identical objects (Segments or use datagram) Network Network erica ect saya) >I ata tk ] Data ine oe cbc Fans) ‘ere oes Fane] | Physical Physical gems oye cal objets (ots) — Figure: Identical objects at each ayer of protocol stack [dentical objects means the forms of data at each particular layer of any host machine. (@ Physical layer Itis the lowest level layer in TCP/IP. Physi individual bits of data, I layer is responsible for transmitting ‘+ Connection of physical layer is only the logical connection establishes which hides the external transmission medium. ‘+ Format of data at physical layer is inthe form of bts. These bits transmitted in transmission medium in form of electrical or optical signals. (i) Data link layer is the second lowest layer of the TCP/IP protocol suite. In Data link layer, bits of data is transformed into frames. ‘+ Data link layer takes datagrams and encapsulates in a packet called a frame. © Ttperforms error correct ‘© It supports standard protocols ‘There is no specific protocol to be used in physical and data link layer. It supports all proprietary protocols. Introduction and Application Layer (ii) Network layer ‘+ Its responsible for creating end to end connection between source and the Source to destination delivery ‘Transport layer -> Process to process (End to End) delivery. At receiver side, performs desegmentation and forwards the data to proper port Figure Host to host delivery (Process to process/ End to end delivery) Introduction and Application Layer 131 ‘The Function / responsibilities of transport layer: + Source point addressing Inheader, it includes service point address, which isthe port number. Unlike network layer which gets segment of data to the correct process on computer it gets entire ‘message to the correct process on computer. © Segmentation and reassembly Message is divided into segments. Segment numbers were added in packet during transmission. Upon arrival of message, needs to reassemble packets according to sequence number. Connection controt Its of two types ~ connectionless and connection oriented. In connectionless, each packet is considered independent and transmitted to ‘destination. In connection oriented, connection is first established between source and destination and then packet is transmitted, ‘+ Flow control Mechanisms is followed to consider flow control. + Brror control Ietakes care of missing packets and enables retransmission of lost packets Design issues in transport layer ‘© Toaccept data from session layer it needs to split packets and send to network layer. ‘* Isolation of upper layers from technological changes, (¥) Session layer ‘The session layer allows users on different machines to have active communication session among them. Its aim is to synchronise interaction among communicating systems, Functions / Responsibilities of session layer ‘© Dialog control Enables two system to start communication either in half duplex or full duplex. ‘Computer Networks © Token managements Tokens enables collision avoidance among the participating parties, Synehronis It enables check points to provide synchronisation of streams of data. Check point helps to verify successful delivery of data at regular time intervals. Check points also called as synchronisation points, For example, during transmission ‘f 100 pages, synchronisation point at every 20 pages, helps to identify successful delivery of data, (vi) Presentation layer ‘The main aim of this layer is to maintain syntax (language) and semantics of information exchanged between two system. Receiver must understand the sender data. This layer manages abstract data structures to be defined and exchanged. Functions of presentation layer ‘+ Translation takes care of interoperability between encoding methods of ‘computer system, It translates data to the format expected by network. ¢_Eneryption : It performs encryption at sender side and decryption at receiver side, + Compression : It compress the data to reduce bandwidth of data being transmitted. Data expression is essential for fair communication when sending large amount of data )) Application layer : ‘This layer enables tsers or software system to access the resource. It provides user interface and supports services like email, remote file access and so on, Functions of application layer : Mail service ‘+ Network virtual terminal (to access remate host) * Directory service (provides global information about available service) ‘* File transfer, access and management. (FTAM) Introduction and Application Layer 133 1.7 WORLD WIDE WEB AND HTTP World Wide Web can be defined in two terms as distributed and linked, Web is the repository of documents called web pages. Distributes refers to the extension of the web whereas linking refers to retrieving of ‘one web page from other. Linking of web page is achieved by a concept called hypertext. Hypertext — linked text documents 1.7.1 Architecture of www www is a distributed client server service. Client access server through browser. Service provided over different web pages called sites. ‘© Web pages can be simple or composite, ‘© Composite web page have links to other web pages. But simple web page have no link to other webpages. Giient ‘Stet Site 2 Request Response «1 Request -2 Response -2 Figure Composite Link ‘Web Client (Browser) Web client access resources through web browser. Web browser consists of 3 parts + Controller + Client protocol + Interpreters ‘Contraler HTTP) Cre | [SSH] [Sur] Figure Web browser Controller receives input from input device. Using interpreter, browser displays the document on to the screen. Based upon application, it uses the appropriate protocol. Web server : Collection of web pages stored ina server called web server. Based upon user request, corresponding web page document is sent to the client, Server ean improves its efficiency in terms of multiprocessing or storage of files in eache rather than main memory o improve the speed. Uniform Resource Locator (URL) + ‘Aoweb page needs a unique identifier called Uniform Resource Locator (URL). Identifiers includes three parts. © host © port © path ‘To define the web page, need to specify above three parts along with the protocol (Example) Protocol :/Mhost / path (Normal) Protocol :/! host: port / path (for specific application) ‘www :// wan mhh . com /compsei jon of client server program that need to access Example : HTTP It's the IP address of the server or don Its a 16-bit integer predefined. It identifies location and name of the file in the underlying operating system, Introduction and Application Layer ‘Web documents : ‘wow documents are classified into three categories = Static Dynamic © Active Static documents : ‘+ Fixed size documents created and stored in server. ‘Client can access only copy of the documents. ‘+ User has no right to change content over the document. ‘+ Itcan be modified by the previledged users. ‘© Example : Document viewed through browser. ‘© Static documents use HTML, XML, XSL and XHTML for its creation. Dynamic documents : © Created by the web server on behalf of the request from user. «Web server runs on application program and creates the document. Example : Date and time retrieval from server (Date and time are dynamic formation) + Dynamic documents use JSP, ASP, Cold fusion with SQL. ‘Active documents + Programs that run on client site are called active documents Example : run a program that interacts with the user (Graphics) + Active documents use Java Applets, 1.7.2 Hyper Text Transfer Protocol (HTTP) 'tis the protocol used to retrieve specific web page from the web, HTTP client sends request, HTTP server returns a response Well-known port number of HTTP at server side is 80. Since HTTP use TCP, itis connection oriented and reliable protocol ‘The requested web pages can be located at different server, So different methods ‘must be employed to retrieve each object using TCP connection, ‘There are two types of connections involved in this operation. 136 Computer Networks Introduction and Application Layer 137 “Method field defines the type of request. ‘© GET method is used to send request. ‘* HEAD method is used when client needs only some information about web © Non persistent connection * Persistent connection ‘Non persistent connection : In a non persistent connection strategy, one TCP connection is needed for each Page. request and response, It works as follows + PUT method is reverse of GET(), some information are sent o be added to the ‘+ Client opens TCP connection, sends request. ‘+ Server response and close connection. + TRACE() is used for debugging, © Client reads until eof and close connection, ‘+ DELETE( is used to delete some webpage on server with prior permission, Ifthere is need to access n locations in same server then the connection must be * CONNECTO ; It isa reserve method used by proxy server. 1+ times need to be open and close and results in high overhead. N+ buffers are needed during each connection open. + OPTIONS( - Allows client to access properties ofa web page © URL field defines the address of the corresponding web page. Persistent connections : a connections ‘© Version field specifies the version of HTTP. ‘© It isthe defautt connection by HTTP. is F 2 Asian! ‘After request line, zero or more request header exist. It provides additional ‘+ Server response and leaves connection open for more request information from client to server. It works on PUT() or POST() ‘Server close by response fiom client or iPtime out has been reached Header and its purpose : + Only single set of buffer is needed tobe set fr the connection at each side eee ~ Hdentifes client, ‘+ Documents are created dynamically (actively in case of persistent connections. ‘Accept Media format client can accept Message Formats : Acceptchar set — Character client handles. Each request and response message are made up of four sections ‘Accept encoding — Encoding scheme client handles First message in request message is called request line. Accept language _~ language the client accept First message in response message is calle status line. Authorisation ~ client permission Request Messag. Host ~ Host and Port number of eent Date ~ Current Date Request iine { Method [seJunu] sP] version ] or] 7] sP-Space Uperade ~ Preferred communication protocol Headerline [Headername | SP] version | Gr| if] Cr-Caniage Return Cookie ~ Return cookie to server ra [9 vento} gy chabae If modified since’ — File modified, since date ave ort ye Response Message Weonsists of Body Variable number of Lines Age 138 Computer Networks © Header line © Blank lines © Body Sas Code. Headername SP Heaserame sP status ine [ Verson [5 sP| Phrase | cr | if Header ine vaue | cr] if vaiue | cr | if Bianktine | or if Variable numberof Lines Body ‘+ First line ina response message is called status line 4+ Status code defines status of code. It is of three types. Range of 100- informational Range of 200 - suecessful request Range of 300 - redirect to another URL Range of 400 - Error at client site Range of 500 - Ertor at server site + After status line, exists zero or more response header lines. Header and its purpose : Date — Current date Upgrade ~ Preferred communication protocol Server ~ Information about server Location _— Client to send request to another site Accept range — Server accept requested byte range All the other fields are similar to request message, Conditional request : Inclusion of condition in the existing request by client is called conditional request. Introduction and Application Layer 138 Example : Client request server to display webpage from since date and time, Cookies : Web needs to store some information about the user choice or activity plays the purpose of cookies. Cookies are used inthe following applications ‘+ Add to cart option on electronic stores + Access to registered clients + Websites used as portals, where users selects the webpages he wants to see + Websites only as advertising agencies Cookies Creation ‘+ Whenever server receives request from client, server retrieves client information such as ID, Name, Visited page and so on, ‘© Server adds these information along with the response sent to client. © When client receives response, browser stores cookie in the cookie directory, ‘which is stored by the server domain name, ‘+ When client sends request to the same server, using cookie information, scrver identifies the client as a existing client and not the new one ‘© Cookie never disclose the information to the user nor read by the browser. Web caching ~ Proxy servers ‘© A proxy server is a computer that maintains the copies of responses to recent request. ‘+ IF HTTP client sends request to proxy server, it checks for the requested information in cache. If needed response is not in eache, proxy server sends request to the corresponding server. ‘+ Alll incoming responses are stored in proxy server for future requests from nt. Proxy Server : ‘© Reduces work load of original server. © Decreases traffic, © Improves latency. Computer Networks Proxy server can act as both server and client. (On receipt of request from client on which it has no response, it acts as client and sends request to target server. ‘On receipt of response from target server, it acts as server and responds to the client. Proxy server ~ location ‘+ A-client computer can acts as proxy server, that holds response to request invoked by client. ‘¢ Aproxy server can be installed on LAN to reduce traffic. + An ISP with many customers can add proxy server to reduce traffic. Cache upda It maintains for some period of time and includes last modification time of the information (example) Daily newspaper. HTTP security : It returns over SSL and provides confidentiality, client/server authentication and data integrity 1.8 FILE TRANSFER PROTOCOL (FTP) It is a standard TCP/IP protocol to transfer file from one host to another. Eventhough files can be transferred using HTTP, FTP can supports sending large files of different formats, ‘lent User Sener Invorface Control (Conirol process riaaiew Baa Data Trenetor Transfer Proves Process. Figure ‘The client has three components. © User interface Introduction and Application Layer 141 Control process + Data Transfer process ‘The server has two components, ‘© Control process ©) Data Transfer process ‘There are two types of connection exists @ Control connection i) Data connection (Control connection ‘© Ttexists during entire interactive FTP session. ‘* If control connection is opened for one time, data connection can be opened and closed for multiple times to transfer multiple files. ‘* Uses port 21 for control connection, ‘© FTP uses same approach as TELNET. ‘* Communication is done through commands and response. ‘© Commands are in the form of ASCII upper case. © Each FTP command has atleast one response. © Response has 2 parts 3 digit followed by text. ‘+ First digit — defines status of command, '* Second digit ~ defines the area, the status applies ‘© Third digit ~ provides additional information, FTP commands : DELE (file name) + Delete a file RMD (directory name) RNTO (file name) + Delete a directory > Rename the file. LIST (directory name) > List subdirectories or files. 1a Computer Networks Response in FTP 150 ~ File status OK. 125 ~ Data connection open 220 Service ready 530 — User not logged in i) Data Connection ¢ Itis opened and closed foreach file transmission. ‘© Ieopens for transferring file and closes when file is transferred ‘+ {ruses port 20 for data connection. Data connection achieved by the following steps ‘+ Client issues passive open connection ‘¢Using PORT command, client sends port number to server. ‘+ Server issues active open with well known port 20 on receiving ephemeral port number from client. + Totransfer ies, client must define the + filetype ¢ data structure + transmission mode ‘These three attributes resolve the heterogenity problem during file transfer. + Filetype Itcan support ASCH, EBCDIC or image type to transfer file across data connection. + Data structure File can be organised in the following structure to enable file transfer across data connection. ‘Supported data structures are = file structure ~ record strueture = page structure Introduction and Application Layer 143 File structure Record structure Page structure 4 + + - continuous stream of Files divided into Files divided into pages data (bytes) records. ‘with page number and = It is default. No - Applicable for text Eee predefined structure files. = Pages ean be accessed randomly or sequentially, + Transmission mode It supports three types of téansmission modes = Stream mode = Block mode = Compressed mode In stream mode, data are delivered as continuous stream of bytes. In block mode, data are delivered interms of blocks. First byte is named as block escriptor. In compressed mode, data are compressed to form data units of smaller © File transfer in FTP is defined in three ways = retrieving a file (server to client) = storing a file (client to server) + directory listing (server to client) ‘To ensure security in FTP, it can work on SSL and hence called SSL-FTP. 1.9 ELECTRONIC MAIL Electronic mail (e-mail) allows users to exchange messages. It is of one way ‘communication. E-mail isa service allows to send message in electronic mode over the internet. 1.9.1 Architecture Normally the sender and receiver of the email connected via internet with the mail ic Cormpter Neto ‘A mail box is a server hard drive stores the messages of specific users Esmail process can be done in nine steps withthe three different agents ') User Agent (UA) ii) Message Transfer Agent (MTA) iil) Message Access Agent (MAA) @ Figure E-mail stop process Mail erver queue (ooo to store Sl) to soe messages set. The wer lvays acess hough themenge nsf age I eres access MTA seer ety tens eas Identifies itself MAIL FROM (sender ofthe message)-> Identifies sender of the message quir DATA (body of the mail) + Terminates the message > Sends the actual message Responses are sent from server to client, It is of 3 digit code format. 211 -help reply 220 - service ready 250 - request command completed 421 ~ servicen not a ble 500 - syntax error 554 - transaction fated Mall transfer phases ‘There are three phases in mail transfer. # Connection establishment © Mail transfer Connection termination Connection establishment Client establish TCP connection through well known port 25, then SMTP server starts connection phase as follows : ‘+ Server sends 220, when service ready and sends 421 when service not available. * Server response 250 - request command completed, Message transfer ‘This phase has eight steps where sender can message to single or more than one reciepient, 4) Client sends message using TO address including FROM address. b) Server responds with 250. Computer Networks, Introduction and Application Layer ©) Client sends REPT_T0 (recipient) message. 4 Server responds with 250, 2 Client sends DATA message to initialise message transfer. 1) Server responds with 354 (start mail input) 2) Client sends content of message by terminating with carriage return and line feed, h) Server responds 250 (OK). Connection Termination ‘When message is transferred successfully, client terminates the connection. Client sends QUIT ‘+ Server responds with 221 (service closing transmission channel) (il) Message Access Agent (MAA) First two stages of mail delivery use SMTP, But SMTP is not use in third stage. SMTP is push protocol, which pushes message from client to server. stage needs Pull Protocol, where client pulls message from the server. le message access (pull) protocols are : ‘© Post office protocol, version 3 (POP 3) Internet mail access protocol, version 4 (IMAP4) Itis a standard protocol used to retrieve e-mail from a mail server. * Client POP3 need to be installed on recipient computer and server POP3 installed on mail server ‘+ Mail access starts with client, when he tries to access the e-mail, ‘© Client access mail inbox through the username and password. ‘+ POP3 has 2 modes - delete and keep = POP3 does not partially check the contents of mail before downloading. Computer Networks Messages are pulsed POPsener (email server) Username ok Password OK. list POPciient ‘email numbers and sizes retviove 1 emall1 retrieve N irae Sie Her eva Taal In delete mode, mail gets deleted after retrieval In keep mode, mail remains in mailbox after retrieval IMAP4 IMAP4 allows to access e-mail from multiple devices such as smartphone, laptop, tablet and so on. IMAP saves all e-mail on the server. IMADS4 has the following features : ‘© User can search contents of e-mail before downloading. ‘© User can partially download e-ms © User can create, delete or rename mailbox. ‘© User can ereate hierarchy of mailbox. 1.9.2 MIME - Multipurpose Internet Mail Extensions ‘Multipurpose Internet Mail Extension, as the name implies that itis the extension of internet e-mail Its a supplementary protocol allows non-ASCII data to be sent through e-mail Introduction and Application Layer MIME Features «Enables to send multiple attachments in a single message. ‘© Unlimited message length. ‘+ Supports binary attachments (images, audio and video) ‘© Supports varying content types. MIME transforms Non-ASCH data at sender side to NVT 7-bit data. 1 eee tociaersitreedidns cr euteeeatiniaetignaanl ty CUROw. Og When user tries to sends non-ASCII format, then it use MIME protocol which ‘converts to 7-bit NVT-ASCI format. Data is delivered to client MTA to be sent through the internet ‘MIME header is included withthe original header to provide additional information. It defines 5 headers. © MIME version © Content type © Content type encoding © Cotent 1D © Content deseription li ‘MIME current version Content-type defines type of data used in message body. It has 2 parts, type and subtype. Tent plain > Unformatted Multipart / mixed ~ Body contains ordered pert. Message / RFC822 > Body isan encapsulated message Image /1PEG > message isin JPEG format. Application / PostScript > Adobe PostScript, Content type encoding defines the method used to encode the message. 5 methods of content transfer encoding are : ‘© Tbit - NVT ASCII char with each line less than 1000 char. Computer Networks 8 bit Non ASCII char with each line less than 1000 char. ‘* Binary —Non ASCII char with unlimited length lines, + Base64 6 bit block encoded into & bit ASCII char. * Quoted printable ~Non ASCH char encoded as equal sign plus an ASCII code. Content ID : Header uniquely defines entire message. Content description : Header defines whether body is an image, audio or video. 1.9.3 Web based Mail Some of the web based mail service providers are © Hotmail = Yahoo © Gmail Case 1 : Only receiver uses HTTP. Mail transfer from x to mail is done through SMTP. Message transfer from sending ‘mail server to receiver mal server also done through SMTP. Message from receiving server to y browser is done through HTTP. oar = Ir ea oa =| Sure lent Case 2 : Both sender and receiver uses HTTP. Mail transfer from X to web server takes place through HTTP, y receives message through HTTP. SMTP client & SMTP server exists between x and y, ne hone pee Introduction and Application Layer E-mail security Pretty Good Privacy (PGP) and secure/multipurpase internet mail extensions (S/MIME) protocol provides security to the e-mail, 1.10TELNET TELNET is a remote logging protocol, called TErminal NETWork Itprovides bidirectional interactive text communication using terminal network. Itis used to manage account on remote device Ithelps to connect with the remote system, Since it transmits all data as plaintext, it greatly suffers from security issue ‘SSH (secure shell) uses encryption over data being transmitted and ensures security compared with telnet. Telnet needs to have SSH client installed Telnet establish TCP connection with port umber 23, ‘Administrator us telnet for diagnostic and debugging process. Local versus Remote logging User logging into local system is called as local logging. Terminal ‘Application program Figure Local log User tries to logon into the application program of remote machine, then i is referred as remote logging. 152 Computer Networks Introduction and Application Layer TEINET TELNET Gient Sever To? [to ° e Temiral of wax) || Pe Diver | [Be Daal) Ly tinal Biysia Bhysial ‘ver os oF Figure Remote too Characters typed through keyboard to remote login are sent to Telnet client and gets transformed to universal character set called Network Virtual Terminal (NVT), ‘These NVT form text arrive atthe TCP/IP stack at remote machine and delivered to the OS of TELNET server. ‘The pseudoterminal driver helps to understand the universal character set to TELNET. server ina readable form, ‘Then the OS takes the appropriate action on the application program. ‘Network Virtual Terminal (NVT) During remote login, it is necessary to understand the characteristics or special terminal emulator of that particular machine. ‘TELNET solves this issue by defining universal interface called Network Virtual ‘Terminal (NVT) character set. VT uses two sets of characters it bytes) ‘© One for control (8-bit bytes) NVT also termed as NVT ASCH. © One for data (8. Data Character Control Character ‘Tocal Computer Character Set (NV character set Figure wT Data character set has highest order bit set to ‘0° Control character set has highest order bit set to ‘I” ‘© Operating System defines interface with user friendly commands. Some ofthe ‘commands are: Open = Connect to'a remote computer Close - Close connect. Quit - EXIT TELNET 1.11 SECURE SHELL (SSH) ‘SSH is a secure application program enables remote logging and file transfer. “There are two versions of SSH © Sst © ssH2 Components of SSH SSH consists of three components (i) SSH- TRANS (@) SsH-auTH SSH- CONN Transport layer Figure Components of SSH sa @ Computer Networks SSH Transport layer protocol (SSH - TRANS) SSH is implemented on top of transport layer to provide security Client and server use TCP protocol and establish conne nt which is insecure Then they implement secure parameters to provide security on top of TCP. SSH - TRANS provides the following services * Confidentiality of message exchanged + Data integrity + Authentication ‘+ Compression of messages to improve efficiency and security. (i) SSH Authentication protocol (SSH - AUTH) authenticates client forthe server and server for the cient * Authentication starts at client and sends request message to server. + The request includes user name, server name, method of authentication and required data * Server responds and confirms client is authenticated, ‘+ Server sends failed message to seek for a new request message. + Thus both server and client authentication is achieved Gil) SSH connection protocol (SSH -CONN) After client and server gets authenticated, SSH implements SSH-CONN. Itprovides multiplexing service and creates multiple logical channels over it. Each channel performs remote logging and file transfer. SSH - Applications SSH is a general purpose protocol provides secure connection between client and It provides services such as, S © Remote logging © File Transfer © Port Forwarding, Introduction and Application Layer Remote Logging SSH is used to provide security over the remote logging. File Transfer It is achieved by Secure File Transfer Program (SFTP) and Secure Copy (SCP). ‘These application programs use secure channel to transfer files. Port Forwarding ‘Applications like TELNET and SMTP use the services of SSH port forwarding ‘mechanism. It provides secure tunnel between the client and the server, Any services can be earried through this tunnel to ensure security. SSH packet Abytes 110 8 bytes Variable numberof bytes bytes: Length [ Padding | Type | Data (CRC [= Enea io aciovecontdentaity. ———| Length defines length of packet Padding - Ensure security ‘Type Defines the type of packet used in SSH protocol Data Actual payload CRC Used for the purpose of error detection and correction 1.12 DOMAIN NAME SYSTEM (DNS) ‘The Domain Name System (DNS) isthe way the internet domain names are mapped to internet protocol (IP) address. Temaps domain names known to the user to the IP address used to locate a website. ‘DNS isa host name to IP address translation service, vwvaanna.edu in Sener 7346590120 Figure Mapping Domain name to IP address Computer Networks ‘SSH Transport layer protocol (SSH - TRANS) ‘SSH is implemented on top of transport layer to provide security Client and server use TCP protocol and establish connection which is insecure. Then they implement secure parameters to provide security on top of TCP. SSH - TRANS provides the following services : «Confidentiality of message exchanged + Data integrity ‘Authentication ‘+ Compression of messages to improve efficiency and security SSH Authentication protocol (SSH - AUTH) authenticates client forthe server and server for the client. + Authentication starts at client and sends request message to server. The request includes user name, server name, method of authentication and required data, ‘+ Server responds and confirms client is authenticated + Server sends failed message to seek fora new request message. ‘+ Thus both server and client authentication is achieved il) SSH connection protocol (SSH -CONN) fier client and server gets authenticated, SSH implements SSH-CONN. It provides ‘multiplexing service and creates multiple logical channels over it. Each channel performs remote logging and file transfer. SSH.- Applications ‘SSH is a general purpose protocol provides secure connection between client and server. It provides services such as: a © Remote logging © File Transfer © Port Forwarding Introduction and Application Layer Remote Logging SSH is used to provide security over the emote logging. File Transfer Its achieved by Secure Pile Transfer Program (SFTP) and Secure Copy (SCP). ‘These application programs use secure channel to transfer files. Port Forwarding Applications like TELNET and SMTP use the services of SSH port forwarding mechanism. It provides secure tunnel between the client and the server. Any services ean be carried through this tunnel to ensure security SSH packet Abies, 1108 be, ftaram | Peng | vee [oa cre [| Enerpied naive conceraly Variable numberof bytes _ 4 bytes Length — ~ defines length of packet Padding - Ensure security ‘Type _- Defines the type of packet used in SSH protocol Data - Actual payload CRC = Used for the purpose of error detection and correction. 1.12 DOMAIN NAME SYSTEM (DNS) ‘The Domain Name System (DNS) is the way the internet domain names are mapped {o internet protocol (IP) address. Ttmaps domain names known to the user to the IP address used to locate a website, ‘DNS isa host name to IP address translation service, wwywanna.eduin 784.65,50.120 Figure Mapping Domain name to IP address Computer Networks ‘To map the host name to IP address, need to follow six steps ‘+ User use the host name to file transfer client. ‘+ File transfer client passes host name to DNS client. ‘+ _Afler computer gets booted, knows the address of one DNS server. The DNS Client sends a message to a DNS server with @ query that gives the file transfer server name using the known IP address of the DNS server. ‘+ DNS server responds with IP address of the desired file transfer server. © DNS server passes the IP address to the file transfer client. + File transfer client uses the received IP address to access file transfer server. 1.12.1 Name Space ‘Avname space maps each address to a unique name. It is organised into two ways ° Plat © Hicrarchial In Flat name space, a name (sequence of characters) is assigned to an address. It cannot be used in large system like internet, because it needs to be centrally controlled Wo avoid ambiguity and application. In Bierarehial name space, each name consists of several parts. It defines nature of organisation, name of organisation, department of organisation and so on, ‘+ Authority to assign and name the hierarchy name space is decentralised. ‘+ Authority for names in each partition is passed to each designated agent. Foot + Domain name space was designed to have hicrarchial name space, Introduction and Application Layer Label Bach node in the tree has a string with maximum of 63 characters. Label have uniqueness in their domain names. Domain name Each node will have domain name. A domain name isa sequence of labels separated by dots. Last character in domain name is dot. Itis termed as null label, ‘* Label terminated with dot (null string) is called fully qualified domain name FQDN. Label not terminated by null string is called Partially Qualified Domain Name (QDN) Domain ‘A domain is a subtree of the domain name space. A domain itself can be divided into number of domains. Domain Domain name => univedu Label => univ Hierarchy of Name Servers Hierarchy of Name Servers means to pave way for the DNS server. Since it is not possible to hold all information about the organisation in single ‘computer, the information can be distributed among many computers called DNS server. ‘Use of such domains allows to manage the information effectively. This is otherwise referred as hierarchy of name servers. Computer Networks Introduction and Application Layer 159 Primary and secondary server : DNS defines two types of servers © Primary server fo Ne + Secondary server Biseyaa lei aba Sar sedi ip ck © Primary Server is a server that stores a file about the zone for which itis an authority See rey wane es ‘© Primary server performs the functions of creation, maintenance and updation Zone of zone file ‘Complete domain name hierarchy cannot be managed by a single server. Its divided + Primary server stores zone file on local disk. among many server. The server responsible for specific information is called as Zone. a Pe specific information is called as Ze © Secondary server is server that transfers the complete information about a ‘The server maintains a zone file that contains information about that particular zone from another server (primary or secondary) and stores the file on its local domain or zone. disk. ‘© The secondary server does not ereate or update any of the zone files. ‘© It performs updation with the help of primary server. ‘+ Primary server only sends the updated file to the secondary server ‘+ Incase of both primary and secondary zone being authority, then itis considered as redundancy servers used at the time of one server fails, © Both server being authority, then they are not placed at higher and lower level Both are considered same as redundancy server. ‘* Secondary server holds all information from primary server. + Sometimes server being primary at one specific zone and secondary at some other zone. 1.12.2 DNS in the interns if domain is not subdivided into smaller zone, then domain and zone refers to the Tieton, Sin nates we vie ee thre eet 8. © Generic domains Root Server ‘© Country domains ‘A root server is a root node in a tree where zone consist of entre tree rvere ens Root server normally stores no information but delegates its authority to other servers Generic domains ‘These are the registered hosts with generic behaviour 160 Computer Networks IRS et gov org com het mil Each node in tree defines a domain, which is an index to the domain name space database. equ Index tothe address annaedi du - educational institutions ov - government institutions ‘org ~ Non profit organisations com- Commereial organisations net - network support centers Fy groups Country domains ‘Ituses two character for the country abbreviations. Example: US - United States, ‘ci.ca.us - University of California, irvine inthe state of California of US. Q indexto address @—{reteass Resolution The process of mapping name to an address is defined as name-address resolution, Introduction and Application Layer 161 ‘A host which tries to map address to a name or a name to an address calls a DNS client called resolver. Resolver does it job in either recursive or iterative. Recursive resolution When application program running on aaa.com needs to find IP address of another host name bbb.com. Then source host is connected to aaa ISP and destination host to bbb network, |— Figure Recursive resolution Iterative rosolution IKerative resolution takes place between two local server. Resolver gets the final ‘output from the local server. S) Inox} 2 een Caching ‘Storing of mapped server information in Cache for fast retrevel is termed as caching, ‘A caching is a temporary storage area Cache uses to ‘+ Speed up subsequent retrieval 168 Computer Networks DNS security (DNSSEC) provides message authentication and integrity using service called digital signature. DNSSEC does not provide confidentiality and provision for DOS. 13 SIMPLE NETWORK MANAGEMENT PROTOCOL (SNMP) SNMP is a application layer protocol. It monitors the devices installed on different physical networks. SNMP is used by Internet. ltprovides operations for monitoring and maintaining internet. SNMP includes © Manager © Agent ‘Manager is normally a host, controls and monitors agents, Agents are normally a set of routers or servers a Router Agent) i (Manages SNMP seperates physical characteristics of managed devices and networking technology. Managers and Agents : © Manager also called management station is a host that runs SNMP client rogram, ‘Agent also called managed station (router) runs SNMP server pgoram, Agent tracks the performance of information and maintains in database Manager ‘access the values in the database, Introduction and Application Layer Database includes information like number of packets sent and received. Manager use database information to find the congestion level ‘Agents also contribute to the management process Server program running on agent identifies the unusual environment and sends ‘Trap (warning message) to manager. SNMP carries management operation by: + Manager checks the behavior of agent + Manager gives tasks for agent to perform, + Agent inturn considers management process by sending trap manage. Management components : ‘To perform management task, SNMP use 2 protocols, such as ‘+ Structure of Management Information (SMI) ‘+ Management Information Base (MIB) ‘Together SNMP, SMI and MIB performs management tasks SNMP: It defines format of packet to be sent among manager and agent. Each packet includes object name and thei status. SMI: It defines general rules for naming objects, defining object types include range, Jength and so on. SMI define only the rules. Its the collection of general rules to name objects and to list their types. MIB: This protocol defines number of objects, name the object according to rule and associate type to each named abject. It defines the relationship between the entities to be managed, aa -[Lanauage ox ee Cecaaton are a [sor }+| ress soorn Mia Network Computer programming management Fig. Management versus computer programming Overview Working of SNMP can be explained by the below scenario: |. SNMP elient (Manager), wants to send message to agent station (SNMP server) 2. Messages, sends request to find the number of UDP user datagrams received by the agent MIB is responsible for finding object that holds the number of UDP user datagrams received. SMI is responsible for encoding name of the object. SNMP creates GetfequestMessage and encapsulates the encoded message. =He)- ‘What is the number of UDP datagrams received Question SMI - Int values are defined by 3 attributes. MIB - Obj has int value and is called udpInDatagram SNMP - Encapsulate request in Get Request Message Introduction and Application Layer 1.13.1 Components of Network Management ‘Three components of Network Management are: @ smi Gi) MiB iii) SNMP @ SMI: ©The structure of Management Information is a component of Network ‘Management. Iedefines three atibutes, ~ Object name — Type of data stored in objected = Encoding method for data transmission over the network Name: ‘To manage objects globally, SMI uses an object identifier. Each object is defined asa sequence of integers seperated by dots. erate User use the above SNMP naming notations as io.org.dod. internet mgmt mib-2. 168 Computer Networks Objects ientiied as HHH Type: Tedefines the type of data being stored by Abstract syntax Notation one (ASN.1) SMI defines 2 categeries of datatypes © Simple © Structured ple These are atmoic taken directly from ANS.1 Integer = 4 bytes range -2 and 2-1 pAddress = 4 bytes Counter 64 = 8 bytes, 64 bit counters + Structured It is of two types sequence and sequence of Sequence i or record ‘combination of simple data types. An alogous to struct Sequence of is combination of all simple or sequence data types. Analogous to array. Introduction and Application Layer 169 Encoding Method It uses Basic Encoding Rules (BER) to encode the data to be transmitted over the network. BER defines each port in triplet format, + tag (I byte) ‘¢ length (1 or more byte) = value Datatype Tag Interger 02 IPAddress — — 40 Null 05 Gauge -42 Counter “41 qi) MIB ‘Management Information Base is the second component of network management. Each agent has seperate MIB 2. MIB2 holds the collection of objects that the manager can manage, ‘Objects in mib-2 has several groups like: — $8 (General info about node) tep (Into related to TCP) (defines all interface) ~ udp (Info related to UDP at (Defines ARP table) — egp (operations of EGP) ~ ip (Defines into related to IP) ~ trans (defines specific method of transmission) jemp (Defines info related to SNMP)— Snmp (General info about SNMP) VP KHSODeameT™ ea Computer Networks |} Introduction and Application Layer ww Gi) SNMP SNMP message ~ It does not send only PDU, it embeds PDU in message. It makes use of both SMI and MIB for network management Message Request id is an application programs that performs the following tasks leader It is an application programs that performs the following tasks Header reas Manager retrieves value of object defined by agent. ace i PU — Manager stores value of object defined by agent. = = Agent sends alarm to indicate abnormal situation, Value PDU: Message SNMP uses & types of protocol data units GetRequest GetNextRequest : GetBulkRequest SetRequest Response ‘Trap InformRequest Report PDU format : Sent from manager to clinet to retrieve value of a variable ‘Sent from manager to agent to retrieve value of a variable ‘Sent from amanagerto agent to retrieve large amount of data. Sent from manager to agent to store value in a variable. Response PDU sent from agent to manager in response to GetRequest or GetNextRequest PDU sent from agent to manager to report an event. Sent from one manager to another remote manager to get value of some variables from agents under control of remote manager. Designed to report some type of errors between managers POU header Variable bindings [ee ee POU ‘ype Request| nor | Enor | Setotvanabie 1D | status | index | value pairs UDP ports: SNMP uses two well known ports 161 and 162. Port 161 used by server (agent) and 162 by client (manager) 'SNMPV3 has added features like security and remote administration when compared vith previous version. Computer Networks TWO MARKS QUESTION AND ANSWER 6 Define Computer Network. ‘A computer network is a collection of computers connected to share resources. It includes a printer, file server etc. A computer also called computer system Participating in network can both send and receive data to and from the system, Example : Internet. ; List the five components necessary to achieve data communication. Sender, Receiver, Medium, Data and Protocol. Compare point to point connection with the multipoint connection (Line Configurations). Point to point connection provides advantages such as easy installation, low cost and reliability. Example : Mesh and Star topology. Whereas multipoint connection provides common link to share resources among lf the computers. It enables adding more users in a multi point connection. Example: bus and ring topology State the advantage of any four basic network topology. © Bus topology Easier implementation Cost effective Less cabling © Ring topology Easy to install Fault identi jeation and isolation © Star Topology Robustness Less expensive * Mesh Topology Robustness Improved security Privacy Reduced Traffie How will you calculate the cable links required for different topology? Ring and Star: on Bus ‘n-+1 (n for cables, 1 for backbone) Mesh nt (nay? Introduction and Application Layer 13 List the necessary factors! crit for an efficient network. ‘The important factors that play a major role in determining efficient networks are © Performance © Reliability © Security ‘A mesh topology composed of 6 nodes. Find the number of ports and cables needed for each node? Mesh sn *(n-1)/2 n=6 Number of cables = 6 * (6-1) /2 = 15 cables. [Number of ports per node = n-I = 5-1 =5 ports per node. What happend if any of the nodes fails in the following topology? Ring: Failure of one node disturbs the entire network. Star: Disconnection happens to the failed node only. Bus: If backbone fails, all connections get disconnected, Mesh: fone node fails, other node continues to work. Draw hybrid topology of star backbone. 174 Computer Networks 10, Draw hybrid topology of ring backbone with two bus topology. Introduction end Application ayer 13. What is distributed processing? List its advantages. In distributed processing, ask is divided among multiple computers, Separate system handle subset of operation in a network Us advantages are © Reliability © Security ‘© Information sharing © Faster Processing 14, What is Network Topology? ‘A network topology is a physical structure of nodes and other connected devices in ‘a network, Some of the main topologies are star, mesh, bus and ring 15, State application area of star, mesh, bus and ring topology. Star topology is widely used in business. ‘® Bus topology connects different work station to a single cable. ‘¢ Mesh topology connects all workstations to one another. ‘¢ Ring topology connects all computers in a loop and transfer data from one ‘workstation to another. What are the three different roles of computers in a network? ‘Computer plays three roles in a network. They are client, server and peer. 17. What are the different types of networks? © Peer to peer networks. © Client’ server.networks. @ LAN, MAN and WAN networks. 18, What are the services provided by networks? 11, What are the types of communication / Data flow takes place in network? The three types of communication among nodes are (@ Simplex (One way communication) Gil) Duplex (Two way communication) rash eh TEL Half duplex : Two way communication at different time, Mail services Fall duplex : Two way communication at all time. ae eee Internet services 12, What are the four fundamental characteristics of data communication? erence © Delivery ie 19, List the advantages of a multipoint connection over a point to point connection? © Accuracy ‘© Ease of installation © Low cost © Reliability © Timeliness © Sitter 176 Computer Networks |] tntroducton and Application Layer iw 20. Compare telephone network and the internet 25, Write the type of addresses (identifiers) used in different layers. “Telephone network Internet Application layer : Layetnced to define destination name and file name to acces. + Connection oriented, circuit |® Connectionless packet switched Ex: univ@universtyedu switched networ network, ee eae Network layer : Use logical address to address both source and the destination. =. Dedicated connection betwen tv | *. No dedicated connection, bit all Peseite ceiboriatlleces settee Datalink ayer : Use link layer address to define source and destination . connections tothe link, fs Only one to one connection in'|® One. to many connections are ou ene oe ei ‘Transport layer multiplexes and demultiplexes application layer message. Is it = so transport layer protocol combines several messages from application layer J Billing is based on duration ofime. | # Billing is based on data used in one packet? Comment on the statement. © Connection established through dal- | ® Connection established through ‘No. Multiplexing and demultiplexing at the transport layer does not mean combining up modem broadband modem. several upper layer packets into one transport layer packet. 21, List some ofthe factors that determine the communication network LAN, MAN Each transport layer protocol can carry packets from any application layer protocol aan that needs its service ‘The categorisation of network is mainly based on coverage area, scope, structure ‘A transport layer can carry only one packet from application layer. eae Ex : UDP carry message from FTP in one user datagram and a message from HTTP. LAN — = Connects office or building in another user datagram. MAN —— Collection of LAN. Theresa single path between source and destination, whether there i need of WAN = Internet, REuatae deere 22. Write the difference between full duplex and half duplex transmission. Rost ia coved ouly whos sped ase fat oe tea tts he In half duplex transmission, only one entity can send at atime, whereas in full duplex transmission, both entities can send at atime A 8 23. Performance is inversely proportional to delay. Diseuss which application is Layer rere Layer eae Listen / Talk Listen / Talk 8) Sending e-mail : Ics not an interactive application. If delivered fast or slow, itmay stayin mail box fora while, So sending e-mail isnot sensitive to delay. ©) Copying ae: Sine we dnt expec eto be oie ined s nt ayers Cir tet ayer’ Enoryat/ Dont Enewpt/ Decne | ©) Surfing the internet : It is sensitive to delay. We expect to get access to the ee searching ste immediately. 24._ If port number is of 16-bis size 2 bytes). Then what will be the minimain header size in TCP/IP protocol suite? (sei ea are Generally transport layer needs 2 port numbers. One is for destination and othe is Eaeibeaere ia ohn for source. Header size needs to be atleast 32-bits (4 bytes). 2 ee, een eee ws SERGE dct pasmesieaeaciar Tn anes rea tan ee ieee + Name the service provided by layer 2 to layer 3 at A? ww 2 Prien iaia ores eteTe acces eae ef td gelato easel nea ont oka ney Rat an! asislar teen aes Be aac pao eee eee bepelibir ron peru eed piel STE eat etc alee an eveaa Sth aca a ages aa els Pein eeameica mine aacteumeaee ausiets eter ae ersameos oa ea eeea epi. aa Ga Ee cts iue rls taaenifee sania eee ' pare onal ; Be Beeae ists etait aero ad ait Therysom uml 150 bc for 10 bye megs, Boose cch ye 10 ye Secnetfp lly Satie aeemA Moa Tee ae totally 5 layer, so 10 x 5 = 50 bytes. ‘may have some process to arrive to the resort airport. You can choose layers as dsaalenmine Batau pesca Sanaa Original data 100 bytes, Header = 50 bytes baggage = - id . eaeeee rie ea nearerea ail 100 is Source/destination Source/des riny = a6. it ae 150 See Airport \rpor 30. Awumesendg of tare packet TCP AP proacel ute, Ste he savetage aes, eee ae Re eee eia ane ee Shen pckt ortega oats lb ew So gdtaly wd ae ee aa eee aac, Ee rane Disadvantage is difficulty in retransmission of large los or large eorupted packet s T 31. State the layer responsible to the followis | po mentau clan Seer eatin Mccoeea eee eas E (iii) Providing services for end user, ai} Gr culmea spr ie: haviekoel ela TCS ‘TCPAP protocol suite with presentation layer? (Network layer Gi) Physical lnyer

You might also like