0% found this document useful (0 votes)
31 views184 pages

IMP - 9 Computers - Network

The document is a course material for 'Computer Networks and Network Security' at the Tamil Nadu Dr. Ambedkar Law University, covering fundamental concepts of computer networks, their applications, and security practices. It outlines various network types, configurations, and protocols, along with the importance of data communication and security measures. The material serves as a supportive resource for undergraduate students, providing intuitive descriptions and examples to facilitate understanding of complex topics.

Uploaded by

Om Tapdiya
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)
31 views184 pages

IMP - 9 Computers - Network

The document is a course material for 'Computer Networks and Network Security' at the Tamil Nadu Dr. Ambedkar Law University, covering fundamental concepts of computer networks, their applications, and security practices. It outlines various network types, configurations, and protocols, along with the importance of data communication and security measures. The material serves as a supportive resource for undergraduate students, providing intuitive descriptions and examples to facilitate understanding of complex topics.

Uploaded by

Om Tapdiya
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/ 184
E> THE TAMIL NADU : Dr. AMBEDKAR LAW UNIVERSITY (State University Established by Act No. 43 of 1997) SCHOOL OF EXCELLENCE IN LAW ‘Perungudi Campus’, M.G.R. Salai, Perungudi, Chennai - 600 113. COMPUTER NETWORKS AND NETWORK SECURITY COURSE MATERIAL FOR BCA.LL.B (For the candidates admitted from academic year 2015 - 2016 onwards) By K. SHANTHI Guest Faculty, Department of Inter-Disciplinary School of Excellence in Law The Tamil Nadu Dr. Ambedkar Law University, Chennai PREFACE The merging of computers and communications has had a profound influence on the ‘way computer systems are organized. The old model of a single computer serving all of the organization’s computational needs has been replaced by one in which a large number of separate but interconnected computers do the job. These systems are called computer networks. Throughout the book we will use the term “computer network” to mean a collection of autonomous computers interconnected by a single technology. Two computers are said to be interconnected if they are able to exchange information. The connection need not be via a copper wire; fiber optics, microwaves, infrared, and communication satellites can also be used. Networks come in many sizes, shapes and forms, as we will see later. They are usually connected together to make larger networks, with the Internet being the most well-known example of a network of networks. The course material for the subject “Computer Networks and Network Security” isa simple version of the various topics contained in the syllabus. It deals with the fundamental concepts of computer network. This text is intended for a first course in databases at the undergraduate level. This material describes the concepts as intuitive descriptions, many of which are based on our running example of a university. Important theoretical results are covered, but formal proofs are omitted. In place of proofs, figures and examples are used to suggest why a result is true. This material is an extract of sufficient information’s collected from various texts on computer networks. This material will be a supportive one along with textbooks and other references. K.SHANTHI Guest Faculty, Department of Inter-Disciplinary School of Excellence in Law The Tamil Nadu Dr. Ambedkar Law University, Chennai COMPUTER NETWORKS AND NETWORK SECURITY SUBJECT CODE: HDSB/CHD5B CONTENTS S.No. Contents UNIT-I INTRODUCTION Overview of Computer Networks —Applications—Line Configuration ~Topology — Transmission Modes ~ Categories of Network: LAN,MAN, WAN —Reference Models — OSI and TCP/IP Models ~Physical Layer ~ Theoretical Basis for Data Communication —Guided Transmission Media. 2 UNIT-II DATALINK LAYER Data Link Layer: Error Detection Error Correction ~Elementary Data Link Protocols —Sliding Window Protocols ~Data Link Layer in the Intemet Medium Access Layer Channel Allocation Problem, Multiple Access Protocols. ‘Network Layer — Design Issues —Routing Algorithms Congestion Control Algorithms, UNIT- III NETWORK LAYER Network Layer: IP Protocol —IPAddress = Internet Control Protocol. ‘Transport Layer — Design Issues —Connection Management —Addressing —Establishing and releasing Connection —Simple Transport Protocol — Internet Transport Protocol (TCP). 88 - 108 UNIT—IV NETWORK SECURITY — Network Security Overview ‘Symmetric Ciphers: Classical Eneryption Techniques, Symmetric Ciphers: Block and the Data Eneryption Standards, —Public key Encryption and Hash Functions: —Public Key Cryptography and RSA. 109 - 138 UNIT—V SECURITY PRACTICES — Network Security Practices : — Authentication Applications ~ Electronic Mail Security : IP Security —Web Security — Firewall. 139-174 MODEL QUESTION PAPER and ANSWER HINTS 175 UNIT-I INTRODUCTION 1.1 Overview of Computer Networks 1.1.1 Introduction of Computer Networks Today the world scenario is changing. Data Communication and network have changed the way business and other daily affair works. Now, they rely on computer networks and internetwork. A set of devices often mentioned as nodes connected by media link is called a Network. A node can be a device which is capable of sending or receiving data generated by other nodes on the network like a computer, printer etc. These links connecting the devices are called Communication channels. Computer network is a telecommunication channel through which we can share our data. It is also called data network. The best example of computer network is Internet. Computer network does not mean a system with control unit and other systems as its slave. It is called a distributed system A network must be able to meet certain criteria, these are mentioned below: 1. Performance 2. Reliability 3. Scalability Performance It can be measured in following ways : + Transit time : It is the time taken to travel a message from one device to another. + Response time : It is defined as the time elapsed between enquiry.and response. Other ways to measure performance are : 1, Efficiency of software 2, Number of users 3. Capability of connected hardware Reliability It decides the frequency at which network failure take place. More the failures are, less is the network's reliability. Security It refers to the protection of data from the unauthorised user or access. While travelling through network, data passes many layers of network, and data can be traced if attempted. Hence security is also a very important characteristic for Networks. 1.1.2 Properties of Good Network 1. Interpersonal Communication : We can communicate with each other efficiently and easily example emails, chat rooms, video conferencing etc. 2. Resources can be shared : We can use the resources provided by network such as printers etc. 3. Sharing files, data : Authorised users are allowed to share the files on the network. 1.1.3 Basic Communication Model Communication model is used to exchange data between two parties. For example communication between a computer, server and telephone (through modem). (source }=<{eanswirren” }-(Fnanswission system }—{ nECevER DESTINATION} Source Data to be transmitted is generated by this device, example: telephones, personal computers etc. Transmitter The data generated by the source system are not directly transmitted in the form they are generated. The transmitter transforms and encodes the information in such a form to produce electromagnetic waves or signals. Transmission System A transmission system can be a single transmission line or a complex network connecting source and destination. Receiver Receiver accepts the signal from the transmission system and converts it to a form which is easily managed by the destination device. Destination Destination receives the incoming data from the receiver. 2 1.1.4 Data Communication The exchange of data between two devices through a transmission medium is Data Communication. The data is exchanged in the form of 0’s and 1’s. The transmission medium used is wire cable. For data communication to occur, the communication device must be part of a communication system. Data Communication has two types Local and Remote which are discussed below : 1141 Local : Local communication takes place when the communicating devices are in the same geographical area, same building, face-to-face between individuals ete. 1.1.4.2 Remote: Remote communication takes place over a distance ie. the devices are farther. Effectiveness of a Data Communication can be measured through the following features: 1. Delivery : Delivery should be done to the correct destination. 2. Timeliness : Delivery should be on time. 3. Accuracy : Data delivered should be accurate. 1.1.5 Components of Data Communication . Message : It is the information to be delivered. . Sender : Sender is the person who is sending the message. . Receiver : Receiver is the person to him the message is to be delivered. . Medium : It is the medium through which message is to be sent for example modem. . Protocol : These are some set of rules which govern data communication, Upwune 1.2 Applications The computer networks are playing an important role in providing services to large organizations as well as to the individual common man. 1.2.1 Service Provided by the Network for Compani St © Many organizations have a large number of computers in operation. These computers may be within the same building, campus, city or different cities. ¢ Even though the computers are located in different locations, the organizations want to keep track of inventories, monitor productivity, do the ordering and billing etc. ‘The computer networks are useful to the organizations in the following ways: 1. Resource sharing. 2. For providing high reliability. 3. To save money. 4, It can provide a powerful communication medium. 1. Resource sharing © Itallows all programs, equipments and data available to anyone on the network irrespective of the physical location of the resource and the user. Show in Fig (a) and (b) which shows a printer being shared and different information being shared. 2. High reliability due to alternative sources of data: © It provides high reliability by having alternative sources of data. For e.g. all files could be replicated on more than one machines, so if one of them is unavailable due to hardware failure or any other reason, the other copies can be used. © The aspect of high reliability is very important for military, banking, air traffic control, nuclear reactor safety and many other applications where continuous operations is a must even if there are hardware or software failures. 3. Money savin; © Computer networking is an important financial aspect for organizations because it saves money. © Organizations can use separate personal computer one per user instead of using mainframe computer which are expensive. © The organizations can use the workgroup model (peer to peer) in which all the PCs are networked together and each one can have the access to the other for communicating or sharing purpose. © The organization, if it wants security for its operation it can go in for the domain model in which there is a server and clients. All the clients can communicate and access data through the server. © The whole arrangement is called as client -server model. Chet Maine Serve Maine Request cet Proce fs bad “NetworkCient- Server- = Mode Client Server Model Sere Moda Client: The individual workstations in the network are called as clients. Server: The central computer which is more powerful than the clients and which allows the clients to access its software and database is called as the server. Server computers typically are more powerful than client computers or are optimized to function as servers. Communication in client-server configuratio Response _Server Request Client/server communication ¢ The client places a request on the server machine when he wants an access to the centralized resources. © The server responds to this request and sends the signal accordingly to the client. © The software run at the client computer is called as client program. This software configures the computer to act as a client. © Similarly the software run on the server computer IS called as server program. It configures a computer to act as a server. 4. Communication medium: * A computer network provides a powerful communication medium among widely separated employees. * Using network it is easy for two or more employees, who are separated by geographical loc ie. on-line, ions to work on a report, document or R and D simultaneously Networks for People: Starting in 1990s, the computer networks began to start delivering services to the private individuals at home. The computer networks offer the following services to an individual person: 1. Access to remote information 2. Person to person communication 3. Interactive entertainment. 1, Access to remote information: Access to remote information involves interaction: between a person and a remote database. Access to remote information comes in many forms like: (i) Home shopping, paying telephone, electricity bills, e-banking, on line share market etc. (ii) Newspaper is. On-line and is personalized, digital library consisting of books, magazines, scientific journals etc. (iii) World wide web which contains information. about the arts, business, cooking, government, health, history, hobbies, recreation, science, sports etc. 2. Person to person communication: Person to person communication includes: (i) Electronic-mail (e-mail) (ii) Real time e-mail i.e. video conferencing allows remote users to communicate with no delay by seeing and hearing each other. Video-conferencing is being used for remote school, getting medical opinion from distant specialists-ete. (iii) Worldwide newsgroups in which one person posts a message and all other subscribers to the newsgroup can read it or give their feedbacks. 3. Interactive entertainment: Interactive entertainment includes: (i) Multiperson real-time simulation games. (ii) Video on demand. (iii) Participation in live TV programmes likes quiz, contest, discussions etc. In short, the ability to merge information, communication and entertainment will surely give rise to a massive new industry based on computer networking. 1.3 Line Configuration Network is a connection made through connection links between two or more devices. Devices can be a computer, printer or any other device that is capable to send and receive data. There are two ways to connect the devices : 1, Point-to-Point connection 2. Multipoint connection 1.3.1 Point-To-Point Connection It is a protocol which is used as a communication link between two devices. It is simple to establish. The most common example for Point-to-Point connection (PPP) is a computer connected by telephone line. We can connect the two devices by means of a pair of wires or using a microwave or satellite link. Example: Point-to-Point connection between remote control and Televisioh for changing Link the channels. 1.3.2. Mul It is also called Multidrop configuration. In this connection two or more devices share a single link. There are two kinds of Multipoint Connections : + If the links are used simultaneously between many devices, then it is spatially shared line configuration. + If user takes turns while using the link, then it is time shared (temporal) line configuration. 1.4 Topology Network Topology is the schematic description of a network arrangement, connecting various nodes(sender and receiver) through lines of connection 1.4.1 Types of Network Topology * BUS Topology © RING Topology © STAR Topology * MESH Topology * TREE Topology * HYBRID Topology 1.4.2. BUS Topology Bus topology is a network type in which every computer and network device is connected to single cable. When it has exactly two endpoints, then it is called Linear Bus topology. Cable End, Cable End ¥ DropLine Drop Line DropLine 1.4.2.1 Features of Bus Topology 1. It transmits data only in one direction. 2. Every device is connected to a single cable 1.4.2.2 Advantages of Bus Topology . Itis cost effective. . Cable required is least compared to other network topology. . Used in small networks. }. It is easy to understand. |. Easy to expand joining two cables together. wRYNE 14.2.3 Disadvantages of Bus Topology 1. Cables fails then whole network fails. 2. If network traffic is heavy or nodes are more the performance of the network decreases. 3. Cable has a limited length. 4. Itis slower than the ring topology. 1.4.3 RING Topology Itis called ring topology because it forms a ring as each computer is connected to another computer, with the last one connected to the first. Exactly two neighbours for each device. = |_| —— 143.1 Features of Ring Topology 1. A number of repeaters are used for Ring topology with large number of nodes, because if someone wants to send some data to the last node in the ring topology with 100 nodes, then the data will have to pass through 99 nodes to reach the 100th node. Hence to prevent data loss repeaters are used in the network. 2. The transmission is unidirectional, but it can be made bidirectional by having 2 connections between each Network Node, it is called Dual Ring Topology. 3. In Dual Ring Topology, two ring networks are formed, and data flow is in opposite direction in them. Also, if one ring fails, the second ring can act as a backup, to keep the network up. 4. Data is transferred in a sequential manner that is bit by bit. Data transmitted, has to pass through each node of the network, till the destination node. 10 1.4.3.2 Advantages of Ring Topology 1. Transmitting network is not affected by high traffic or by adding more nodes, as only the nodes having tokens can transmit data. 2. Cheap to install and expand 1.4.3.3 Disadvantages of Ring Topology 1. Troubleshooting is difficult in ring topology. 2. Adding or deleting the computers disturbs the network activity. 3. Failure of one computer disturbs the whole network. 1.4.4 STAR Topology In this type of topology all the computers are connected to a single hub through a cable. This hub is the central node and all others nodes are connected to the central node. 1.4.4.1 Features of Star Topology 1. Every node has its own dedicated connection to the hub. 2. Hub acts as a repeater for data flow. 3. Can be used with twisted pair, Optical Fibre or coaxial cable. 1.4.4.2 Advantages of Star Topology 1, Fast performance with few nodes and low network traffic. 2. Hub can be upgraded easily. cr 3. Easy to troubleshoot. 4, Easy to setup and modify. 5. Only that node is affected which has failed, rest of the nodes can work smoothly. 1.4.4.3 Disadvantages of Star Topology igh. . Cost of installation is 2. Expensive to use. 3. If the hub fails then the whole network is stopped because all the nodes depend on the hub. 4. Performance is based on the hub that is it depends on its capacity 1.4.5 MESH Topology It is a point-to-point connection to other nodes or devices. All the network nodes are connected to each other. Mesh has n(n-1)/2 physical channels to link n devices. There are two techniques to transmit data over the Mesh topology, they are : 1. Routing 2. Flooding 145.1 Routing In routing, the nodes have a routing logic, as per the network requirements. Like routing logic to direct the data to reach the destination using the shortest distance. Or, routing logic which has information about the broken links, and it avoids those node etc. We can even have routing logic, to re-configure the failed nodes. 1.4.5.2 Flooding In flooding, the same data is transmitted to all the network nodes, hence no routing logic is required. The network is robust, and the its very unlikely to lose the data. But it leads to unwanted load over the network. 1.4.5.3 Types of Mesh Topology 1, Partial Mesh Topology : In this topology some of the systems are connected in the same fashion as mesh topology but some devices are only connected to two or three devices. 2. Full Mesh Topology : Each and every nodes or devices are connected to each other. 1.4.5.4 Features of Mesh Topology 1. Fully connected. 2. Robust. 3. Not flexible. 14.5.5 Advantages of Mesh Topology . Each connection can carry its own data load. . It is robust. . Fault is diagnosed easily. .. Provides security and privacy. Rene 1.4.5.6 Disadvantages of Mesh Topology 1. Installation and configuration is difficult. 2. Cabling cost is more. 3. Bulk wiring is required. 1.4.6 TREE Topology It has a root node and all other nodes are connected to it forming a hierarchy. It is also called hierarchical topology. It should at least have three levels to the hierarchy. 1.4.6.1 Features of Tree Topology 1, Ideal if workstations are located in groups. 2. Used in Wide Area Network. 1.4.6.2 Advantages of Tree Topology 1. Extension of bus and star topologies. 2. Expansion of nodes is possible and easy. 3. Easily managed and maintained. 4, Error detection is easily done. 14.63 Disadvantages of Tree Topology 1. Heavily cabled. 2. Costly. 3. If more nodes are added maintenance is difficult. 4, Central hub fails, network fails. 1.4.7 HYBRID Topology It is two different types of topologies which is a mixture of two or more topologies. For example if in an office in one department ring topology is used and in another star topology is used, connecting these topologies will result in Hybrid Topology (ring topology and star topology). 14 1.4.7.1 Features of Hybrid Topology 1. It is a combination of two or topologies 2, Inherits the advantages and disadvantages of the topologies included 1.4.7.2. Advantages of Hybrid Topology 1. Reliable as Error detecting and trouble shooting is easy. 2. Effective. 3. Scalable as size can be increased easily. 4. Flexible. 1.4.7.3 Disadvantages of Hybrid Topology 1. Complex in design. 2. Costly. 1.5 Transmission Modes Transmission mode means transferring of data between two devices. It is also called communication mode. These modes direct the direction of flow of information. There are three types of transmission mode. They are : + Simplex Mode + Half duplex Mode + Full duplex Mode ‘Transmission Mode Ce) Gee) Coe 1.5.1 SIMPLEX Mode In this type of transmission mode data can be sent only through one direction i.e. communication is unidirectional. We cannot send a message back to the sender. Unidirectional communication is done in Simplex Systems. Examples of simplex Mode is loudspeaker, television broadcasting, television and remote, keyboard and monitor etc. Direction of Data —> cPU eee 1.5.2 HALF DUPLEX Mode In half duplex system we can send data in both directions but it is done one at a time that is when the sender is sending the data then at that time we can’t send the sender our message. The data is sent in one direction. Example of half duplex is a walkie- talkie in which message is sent one at a time and messages are sent in both the directions 16 Direction of data 1 —> +— Direction of data 2 1.5.3 FULL DUPLEX Mode In full duplex system we can send data in both directions as it is bidirectional. Data can be sent in both directions simultaneously. We can send as well as we receive the data. Example of Full Duplex is a Telephone Network in which there is communication between two persons by a telephone line, through which both can talk and listen at the same time. Direction of Data +> In full duplex system there can be two lines one for sending the data and the other for receiving data, Direction of Data ¢— Direction of Data. —> 1.6 Categories of Network: LAN, MAN, WAN 7 1.6.1 Local Area Network (LAN) It is also called LAN and designed for small physical areas such as an office, group of buildings or a factory. LANs are used widely as it is easy to design and to troubleshoot. Personal computers and workstations are connected to each other through LANs. We can use different types of topologies through LAN, these are Star, Ring, Bus, Tree etc. LAN can be a simple network like connecting two computers, to share files and network among each other while it can also be as complex as interconnecting an entire building. LAN networks are also widely used to share resources like printers, shared hard-drive ete. LC) Bus Network ( Ditteret Topoigies interconnected ina Local Area Network) 1.6.1.1 Applications of LAN + One of the computer in a network can become a server serving all the remaining computers called clients. Software can be stored on the server and it can be used by the remaining clients. + Connecting Locally all the workstations in a building to let them communicate with each other locally without any internet access. + Sharing common resources like printers etc are some common applications of LAN. 1.6.2 Metropolitan Area Network (MAN It is basically a bigger version of LAN. It is also called MAN and uses the similar technology as LAN. It is designed to extend over the entire city. It can be means to connecting a number of LANs into a larger network or it can be a single cable. It is mainly hold and operated by single private company or a public company. Ring Network Bus Network 1.6.3 Wide Area Network (WAN It is also called WAN. WAN can be private or it can be public leased network. It is used for the network that covers large distance such as cover states of a country. It is not easy to design and maintain. Communication medium used by WAN are PSTN or Satellite links. WAN operates on low data rates. 1.6.4 ‘eless Network It is the fastest growing segment of computer. They are becoming very important in our daily life because wind connections are not possible in cars or aeroplane. We can access Internet at any place avoiding wire related troubles.. These can be used also when the telephone systems gets destroyed due to some calamity/disaster. WANs are really important now-a-days. Iof iy ‘Transmiting Connection Signals 1.6.5 Inter Network When we connect two or more networks then they are called internetwork or internet. We can join two or more individual networks to form an internetwork through devices like routers gateways or bridges. “Fa Ca neRNeTWoRK. 1.7 Reference Models — OSI and TCP/IP Models The most important reference models are : 1. OSI reference model 2. TCPAP reference model. 1.7.1 ISO-OSI Model: There are numbers of users who use computer network and are located over the world, So to ensure, national and worldwide data communication, systems must be developed which are compatible to communicate with each other. ISO has developed this, ISO stands for International organization of Standardization. This is called a model for Open System Interconnection (OSI) and is commonly known as OSI model. The ISO-OSI model is a seven layer architecture. It defines seven layers or levels in a complete communication system. 17 Feature of OSI Model : 1. Big picture of communication over network is understandable through this OSI model. . We see how hardware and software work together. . We can understand new technologies as they are developed. |. Troubleshooting is easier by separate networks. . Can be used to compare basic functional relationships on different networks. won 2 1.7.2 Functions of Different Layers : L721 Layer 1: The Physical Layer : 1. It is the lowest layer of the OSI Model. 2. It activates, maintains and deactivates the physical connection. 3. It is responsible for transmission and reception of the unstructured raw data over network. 4. Voltages and data rates needed for transmission is defined in the physical layer. . It converts the digital/analog bits into electrical signal or optical signals. 6. Data encoding is also done in this layer. w 1.7.2.2 Layer 2: Data Link Layer : . Data link layer synchronizes the information which is to be transmitted over the physical layer. 2. The main function of this layer is to make sure data transfer is ervor free from one node to another, over the physical layer. 3. Transmitting and receiving data frames sequentially is managed by this layer. 4. This layer sends and expects acknowledgements for frames received and sent respectively. Resending of non-acknowledgement received frames is also handled by this layer. 5. This layer establishes a logical layer between two nodes and also manages the Frame traffic control over the network. It signals the transmitting node to stop, when the frame buffers are full. 1.7.2.3 Layer 3: The Network Layer : 1, It routes the signal through different channels from one node to other. 2. Tt acts as a network controller. It manages the Subnet traffic. 3. It decides by which route data should take. 4. It divides the outgoing messages into packets and assembles the incoming packets into messages for higher levels. 1.7.2.4 Layer 4: Transport Layer : 1. It decides if data transmission should be on parallel path or single path, 2. Functions such as Multiplexing, Segmenting or Splitting on the data are done by this layer 22 3. It receives messages from the Session layer above it, convert the message into smaller units and passes it on to the Network layer. 4, Transport layer can be very complex, depending upon the network requirements. Transport layer breaks the message (data) into small units so that they are handled more efficiently by the network layer. 17.25 Layer 5: The Session Layer : . Session layer manages and synchronize the conversation between two different applications. 2. Transfer of data from source to destination session layer streams of data are marked and are resynchronized properly, so that the ends of the messages are not cut prematurely and data loss is avoided. 1.7.2.6 Layer 6: The Presentation Layer : 1. Presentation layer takes care that the data is sent in such a way that the receiver will understand the information (data) and will be able to use the data. 2. While receiving the data, presentation layer transforms the data to be ready for the application layer. 3. Languages(syntax) can be different of the two communicating systems. Under this condition presentation layer plays a role of translator. 4. It performs Data compression, Data encryption, Data conversion etc. 1.7.2.7 Layer 7: Application Layer : 1. It is the topmost layer. 2. Transferring of files disturbing the results to the user is also done in this layer. Mail services, directory services, network resource ete are services provided by application layer. 3. This layer mainly holds application programs to act upon the received and to be sent data. 1.7.2.8 Merits of OSI reference model: 1. OSI model distinguishes well between the services, interfaces and protocols. 2. Protocols of OSI model are very well hidden 3. Protocols can be replaced by new protocols as technology changes. 4, Supports connection oriented services as well as connectionless service. 23 1.7.2.9 Demerits of OSI reference model: 1. Model was devised before the invention of protocols. 2. Fitting of protocols is tedious task. 3. It is just used as a reference model. 1.7.3 TCP/IP REFERENCE Model TCP/IP means Transmission Control Protocol and Internet Protocol. It is the network model used in the current Internet architecture as well. Protocols are set of rules which govern every possible communication over a network. These protocols describe the movement of data between the source and destination or the internet. These protocols offer simple naming and addressing schemes. TCP/IP that is Transmission Control Protocol and Internet Protocol was developed by Department of Defence's Project Research Agency (ARPA, later DARPA) as a part of a research project of network interconnection to connect remote machines. The features that stood out during the research, which led to making the TCP/IP reference model were: + Support for a flexible architecture. Adding more machines to a network was easy. + The network was robust, and connections remained intact untill the source and destination machines were functioning. The overall idea was to allow one application on one computer to talk to(send data packets) another application running on different computer. RRICATON NER = Ton TONETWORE werworn access ven) 24 Description of different TCP/IP protocols 1.7.3.1 Layer 1: Host-to-network Layer 1. Lowest layer of the all. 2. Protocol is used to connect to the host, so that the packets can be sent over it. 3. Varies from host to host and network to network. 1.7.3.2 Layer 2: Internet layer 1, Selection of a packet switching network which is’ based on a connectionless internetwork layer is called a internet layer. . It is the layer which holds the whole architecture together. . It helps the packet to travel independently to the destination. |. Order in which packets are received is different from the way they are sent. . IP (Internet Protocol) is used in this layer. waRwWN 1.7.3.3 Layer 3: Transport Layer . It decides if data transmission should be on parallel path or single path. 2. Functions such as multiplexing, segmenting or splitting on the data is done by transport layer. . The applications can read and write to the transport layer. 4, Transport layer adds header information to the data. 5, Transport layer breaks the message (data) into small units so that they are handled more efficiently by the network layer. 6. Transport layer also arrange the packets to be sent, in sequence. wo 1.73.4 Layer 4: Application Layer The TCP/IP specifications described a lot of applications that were at the top of the protocol stack. Some of them were TELNET, FTP, SMTP, DNS etc. 1. TELNET is a two-way communication protocol which allows connecting to a remote machine and run applications on it. 2. FTP(File Transfer Protocol) is a protocol, that allows File transfer amongst computer users connected over a network. It is reliable, simple and efficient. 3. SMTP(Simple Mail Transport Protocol) is a protocol, which is used to transport electronic mail between a source and destination, directed via a route. 25 4, DNS(Domain Name Server) resolves an IP address into a textual address for Hosts connected over a network. 1.7.3.5 Merits of TCP/IP model . It operated independently. . It is scalable. . Client/server architecture. . Supports a number of routing protocols. . Can be used to establish a connection between two computers. wWRYNS 1.7.3.6 | Demerits of TCP/IP 1. In this, the transport layer does not guarantee delivery of packets. 2. The model cannot be used in any other application. 3. Replacing protocol is not easy. 4. It has not clearly separated its services, interfaces and protocols. Comparison of OSI Reference Model and TC! Reference Model Following are some major differences between OSI Reference Model and TCP/IP Reference Model OSI(Open System Interconnection) |] TCP/IP(Transmission Control Protocol / Internet Protocol) 1. OSI is a generic, protocol 1. TCP/IP model is based on standard protocols independent standard, acting as a around which the Internet has developed. It is a communication gateway between the |] communication protocol, which allows network and end user. connection of hosts over a network. 2. In OSI model the transport layer |} 2. In TCP/IP model the transport layer does not guarantees the delivery of packets. _ |} guarantees delivery of packets. Still the TCP/IP 26 model is more reliable. 3. Follows vertical approach. 3. Follows horizontal approach. 4, OSI model has a separate Presentation layer and Session layer. 4. TCP/IP does not have a separate Presentation layer or Session layer. 5. OSI is a reference model around which the networks are built. Generally it is used as a guidance tool. 5. TCP/IP model is, in a way implementation of the OSI model. 6. Network layer of OSI model provides both connection oriented and connectionless service. 6. The Network layer in TCP/IP model provides connectionless service. 7. OSI model has a problem of fitting the protocols into the model. 7. TCP/IP model does not fit any protocol 8, Protocols are hidden in OSI model and are easily replaced as the technology changes. 8, In TCP/IP replacing protocol is not easy. 9. OSI model defines services, interfaces and protocols very clearly and makes clear distinction between them. It is protocol independent. 9. In TCP/IP, services, interfaces and protocols are not clearly separated. It is also protocol dependent. 10. It has 7 layers 10. Ithas 4 layers ra 7 1.8 Physical Layer Physical layer in the OSI model plays the role of interacting with actual hardware and signaling mechanism. Physical layer is the only layer of OSI network model which actually deals with the physical connectivity of two different stations. This layer defines the hardware equipment, cabling, wiring, frequencies, pulses used to represent binary signals etc. Physical layer provides its services to Data-link layer. Data-link layer hands over frames to physical layer. Physical layer converts them to electrical pulses, which represent binary data. The binary data is then sent over the wired or wireless media. 1.8.1 Functions of Physical Layer 1, Representation of Bits: Data in this layer consists of stream of bits. The bits must be encoded into signals for transmission. It defines the type of encoding i.e. how 0’s and 1's are changed to signal. 2. Data Rate: This layer defines the rate of transmission which is the number of bits per second. 3. Synchronization: It deals with the synchronization of the transmitter and receiver. The sender and receiver are synchronized at bit level. 4. Interface: The physical layer defines the transmission interface between devices and transmission medium. 5, Line Configuration: This layer connects devices with the medium: Point to Point configuration and Multipoint configuration. 6. Topologies: Devices must be connected using the following topologies: Mesh, Star, Ring and Bus. 7. Transmission Modes: Physical Layer defines the direction of transmission between two devices: Simplex, Half Duplex, Full Duplex. 8. Deals with baseband and broadband transmission. 28 signals When data is sent over physical medium, it needs to be first converted into electromagnetic signals. Data itself can be analog such as human voice, or digital such as file on the disk. Both analog and digital data can be represented in digital or analog signals. Digital Signals Digital signals are discrete in nature and represent sequence of voltage pulses. Digital signals are used within the circuitry of a computer system. Analog Signals Analog signals are in continuous wave form in nature and represented by continuous electromagnetic waves. 1.8.3 Transmission Impairment When signals travel through the medium, they tend to deteriorate. This may have many reasons as given: Attenuation For the receiver to interpret the data accurately, the signal must be sufficiently strong. When the signal passes through the medium, it tends to get weaker. As it covers distance, it loses strength. 29 Dispersion As signal travels through the media, it tends to spread and overlaps, The amount of dispersion depends upon the frequency used. Delay distortion Signals are sent over media with pre-defined speed and frequency. If the signal speed and frequency do not match, there are possibilities that signal reaches destination inarbitrary fashion. In digital media, this is very critical that some bits reach earlier than the previously sent ones. Noise Random disturbance or fluctuation in analog or digital signal is said to be Noise in signal, which may distort the actual information being carried. Noise can be characterized in one of the following class: Thermal Noise Heat agitates the electronic conductors of a medium which may introduce noise in the media. Up to a certain level, thermal noise is unavoidable. Intermodulation When multiple frequencies share a medium, their interference can cause noise in the medium. Intermodulation noise occurs if two different frequencies are sharing a medium and one of them has excessive strength or the component itself is not functioning properly, then the resultant frequency may not be delivered as expected. Crosstalk This sort of noise happens when a foreign signal enters into the media. This is because signal in one medium affects the signal of second medium. Impulse This noise is introduced because of irregular disturbances such as lightening, electricity, short-circuit, or faulty components. Digital data is mostly affected by this sort of noise. 1.8.4 Channel Capacity The speed of transmission of information is said to be the channel capacity. We count it as data rate in digital world, It depends on numerous factors such as: 30 * Bandwidth: The physical limitation of underlying media. © Error-rate: Incorrect reception of information because of noise. « Encoding: The number of levels used for signaling. Multiplexing Multiplexing is a technique to mix and send multiple data streams over a single medium. This technique requires system hardware called multiplexer (MUX) for multiplexing the streams and sending them on a medium, and de-multiplexer (DMUX) which takes information from the medium and distributes to different destinations. 1.8.6 Switching Switching is a mechanism by which data/information sent from source towards destination which are not directly connected. Networks have interconnecting devices, which receives data from directly connected sources, stores data, analyze it and then forwards to the next interconnecting device closest to the destination. Switching can be categorized as: 1.9 Theoretical Basis for Data Communication 1 Fourier Analysis Fourier showed that a periodic function g(t) can be represented mathematically as an in nite series of sines and cosines: 1 1 I c g(t)=2+ “ay sin(2 nf t)+ *b,cos(2 nft) n=1 nl a1 1. fis the function's fundamental frequency 2. T= is the function's period 3. ay and by are the amplitudes of the nth harmonics The series representation of g(t) is called its Fourier series expansion. In communications, we can always represent a data signal using a Fourier series by imagining that the signal repeats the same pattern forever. Moreover, we can compute the coefficients a, and Dy : 22 7 o()sin(2 nf a, = t)dt To 27 7 g(t)cos(2_ nf b, = thdt TO 2 c= 77 gitydt TO For instance, suppose we use voltages (on/o ) to represent \1"s and \0"s, and we transmit the bit string \011000010'. The signal would look as follows: Recall (from calculus): 1. the derivative of sin(x) = cos(x)dx 2, the derivative of cos(x) = -sin(x)dx 2 a, = ” * g(t)sin(2 nf t)dt To 32 z 2\ sin(2 nf at +” = 3.4 sin(2 nf t)dt] T1 6 21 = cos(2 nf tis" T2 of 1 [eos(2 nf3) cos(2 nf) +cos(2 nf7) cos(2 nf = 6)] nfT f=158 = *JTeos( n=4)) cos(3 n=4)+cos(6 n=4) cos(7 n=4)] Similarly, by =n [sin(3 n=4)) sin( n=4) + sin(7 n=4) sin(6 n=4)] And Points to note about the Fourier expansion 1. The more terms in the expansion, the more exact our representation becomes. ora 2. The expression a’, + b?, represents the amplitude or energy of the signal (e.g., the harmonics contribution to the wave). In our example, the amplitude consists of a, and continually gets smaller. (The b, term is always zero.) Here, as in most cases, the rst harmonics are the most important ones. 33 The following facts are important: 1. Signals attenuate (strength of signal falls 0 with distance) during transmission. How much attenuation occurs? The exact amount is dependent on physical properties of the medium. N . Distortion results because attenuation is non-uniform across the frequency spectrum; some frequencies distort more than others. That is, the signal doesn't distort uniformly. If every component decreased by the same amount, the signal would be weaker, but not distorted, and amplifying the signal would restore it. Because the received signal is distorted, however, ampli cation simply magni es the distortion and probably won't help. ba A transmission medium carries signals lying within in a spectrum or range of frequencies; the absolute width of the spectrum is called the bandwidth of the channel. In other words, most channels completely attenuate (e.g. chop o ) frequencies beyond some threshold value. 1.9.2 Factors deter ig the rate of data transmission 1. The baud rate (also known as the modulation rate) refers to the maximum rate at which the signal changes value (e.g., switches voltages). For example, if \0"s and \1"s were represented as +5V, -5V, respectively, the baud rate would refer to the number of times per second the signal switches as its transmitting a string of alternating 0's and I's. Note that we can potentially achieve a higher data rate by switching the voltage faster. R . The encoding method determines the amount of information carried in one baud. In our example we encoded only one bit of information (0 or 1). How can we encode 2 bits worth of information in one baud? Use 4 di erent voltage levels. For example, 0, 1, 2, 3 could be represented as -10, -5, +5 and +10 volts respectively. Note: baud rate is not the same thing as the data rate, For a given baud rate, we can increase the data rate by changing the encoding method (subject to Nyquist and Shannon limits, of course.) 1.9.3 Voice Grade Lines What kind of data rate can we achieve using voice-grade phone lines? 34 The phone system is designed to carry human voices (not data!), and its bandwidth line is limited to about 3 kHz. Suppose that we have a bit rate of b bits/sec (assume only encode one bit of data per baud). 1. For 8 bits of data, the fundamental frequency F would be b=8 Hz. 2. Because the phone line attenuates frequencies above 3 kHz, the number of the highest harmonic passed through is 3000=F = 3000=(b=8) = 24000=b. 3. At 1200 baud, the fundamental frequency is 1200=8 = 150Hz, and the highest numbered harmonic passed is 24000=1200 = 20. That is, only the rst 20 terms of the Fourier series are relevant; the phone line will chop o all higher numbered terms. The following table gives more values Baud Fundamental _ [Number of Rate [Harmonic (Hz) |Harmonics sent 1200 | __150 20 2400 300 10 4800 600. = 9600 1200 [| 2.5 19200 [2400 1.25 38400 | 4800 025 Will we be able to send data at 38,400 baud? No! It should be clear that sending data at 38400 baud over a voice grade line simply won't work, Even at 9600 baud only the rst and second harmonic are transmitted, and the signal will be severely distorted. It is unlikely that the receiver will be able to recognize the signal as intended. Must use better encoding schemes for higher data rates. Maximum Data Rate of a Channel Nyquist (1924) studied the problem of data transmission for a ne bandwidth noiseless channel. Nyquist states: 1. If a signal has been run through a low-pass Iter of bandwidth H, the Itered signal 35 can be completely reconstructed by making 2H samples. The important corollary to Nyquist's rule is that sampling more often is pointless because the higher frequencies have been Itered out. 2. If the encoding signal method consists of V states: maximum data rate = 2H log V bps What's the maximum data rate over phone lines? Going back to our telephone example, Nyquist's theorem tells us that a one-bit signal encoding can produce no better than: 2° 3000 log: 2 = 6000bps. But there is a catch. In practice, we don't come close to approaching this limit, because Nyquist's rule applies only to noiseless channels. Noise on a Channel In practice, every channel has background noise. Specifically: 1. Thermal noise results from thermal agitation of electrons in a conductor. It cannot be eliminated, and depends on the temperature, bandwidth, and Boltzman's constant K. Is uniformly distributed across the frequency spectrum and thus called white noise. N Inter modulation noise results when di erent frequencies share the same transmission medium; unwanted signals often appear at frequencies that are the sum or differences of the two frequencies. wo Crosstalk noise results from unwanted coupling between signal paths. Hearing another conversation (faintly) on a telephone connection is an example of crosstalk. S Impulse noise consists of sharp, short-lived disturbances, from such sources such as lightning. How do we measure (or quantify the amount of) background noise? The signal-to-noise ratio is a measure of the unwanted noise present on a line. It is expressed in decibels (db) and given by: signal power $-Neqpy “101 (db) ~'°!°10 noise power 36 1.9.4 Shannon's Theorem Shannon's theorem gives the maximum data rate for channels having noise (e.g., all real channels). Shannon's theorem states that the maximum data rate of a noisy channel of bandwidth H , signal-to-noise ratio of S=N is given by: max data rate = H log, (1 + S=N ) Note: the signal to noise ratio S=N used in Shannon's theorem refers to the ratio of signal power to noise power, not the ratio expressed in dbs (decibels). Unlike Nyquist's limit, Shannon's limit is valid regardless of the encoding method. Let's consider a phone line again. A typical value for the S=N ratio for phone lines is 30db. db) = 10 = S=N = 10** 1000. Thus, the maximum data rate = 3000 log,(1 + 1000) 30; 000 bps. But wait | don't modems deliver data at 38.4 and 56 kbps? Many modem companies advertise that their modem deliver higher data rates, are they lying? Not necessarily. Read the ne print. Most likely, the modem uses data compression, and the high data rate is achieved only with text data Let's summarize what Nyquist and Shannon say: © Nyquist: sampling a received signal more frequently than 2H (where H is the bandwidth of the channel) is pointless. © Nyquist: maximum data rate = 2Hlog:V bps, where H is the bandwidth of the channel, and V is the number of distinct encodings for each baud. This result is a theoretical upper bound on the data rate in the absence of noise. Shannon: maximum data rate = Hlog,(1 + S=N ), where S/N is the ratio of signal power to noise power. Note that Shannon's result is independent of the number of distinct signal encodings. Nyquist’s theorem implies that we can alway increase the data rate by increasing the number of distinct encodings; Shannon's limit says that is not so for a channel with noise 1.10 Guided Trans ion Media It is the transmission media in which signals are confined to a specific path using wire or cable, The types of Bounded/ Guided are discussed below. 37 1.10.1 Twisted Pair Cable This cable is the most commonly used and is cheaper than others. It is lightweight, cheap, can be installed easily, and they support many different types of network. Some important points : + Its frequency range is 0 to 3.5 kHz. + Typical attenuation is 0.2 dB/Km @ 1kHz. + Typical delay is 50 ps/km. + Repeater spacing is 2km. Twisted Pair is of two types : + Unshielded Twisted Pair (UTP) + Shielded Twisted Pair (STP) 1.10.2 Unshielded Twisted Pair Cable It is the most common type of telecommunication when compared with Shielded Twisted Pair Cable which consists of two conductors usually copper, each with its own colour plastic insulator. Identification is the reason behind coloured plastic insulation. UTP cables consist of 2 or 4 pairs of twisted cable. Cable with 2 pair use RJ- 11 connector and 4 pair cable use RJ-45 connector. Unsheded Twisted Pa Cable 1.10.21 Advantages : + Installation is easy + Flexible + Cheap 38 + Ithas high speed capacity, + 100 meter limit + Higher grades of UTP are used in LAN technologies like Ethernet. It consists of two insulating copper wires (1mm thick). The wires are twisted together in a helical form to reduce electrical interference from similar pair. 1.10.2.2 Disadvantages : + Bandwidth is low when compared with Coaxial Cable + Provides less protection from interference. 1,10.3Shielded Twisted Pair Cable This cable has a metal foil or braided-mesh covering which encases each pair of insulated conductors. Electromagnetic noise penetration is prevented by metal casing. Shielding also eliminates crosstalk (explained in KEY TERMS Chapter). It has same attenuation as unshielded twisted pair. It is faster the unshielded and coaxial cable. It is more expensive than coaxial and unshielded twisted pair. —_ 1.10.31 Advantages : + Easy to install + Performance is adequate + Can be used for Analog or Digital transmission + Increases the signalling rate + Higher capacity than unshielded twisted pair + Eliminates crosstalk 1.10.3.2 Disadvantages : + Difficult to manufacture + Heavy 39 1.10.4Coaxial Cable Coaxial is called by this name because it contains two conductors that are parallel to each other. Copper is used in this as centre conductor which can be a solid wire or a standard one. It is surrounded by PVC installation, a sheath which is encased in an outer conductor of metal foil, barid or both. Outer metallic wrapping is used as a-shield against noise and as the second conductor which completes the circuit. The outer conductor is also encased in an insulating sheath. The outermost part is the plastic cover which protects the whole cable. Here the most common coaxial standards. + 50-Ohm RG-7 or RG-11 : used with thick Ethernet. + 50-Ohm RG-58 : used with thin‘Ethernet + 75-Ohm RG-59 : used with cable television + 93-Ohm RG-62 : used with ARCNET. | a E Jacket Outer Insulator Inner Plastic Conductor Conductor Cover (shield) There are two types of Coaxial cables : 1.10.4.1 BaseBand This is a 50 ohm (Q) coaxial cable which is used for digital transmission. It is mostly used for LAN’s. Baseband transmits a single signal at a time with very high speed. The major drawback is that it needs amplification after every 1000 feet. 1.10.4.2 BroadBand This uses analog transmission on standard cable television cabling. It transmits several simultaneous signal using different frequencies. It covers large area when compared with Baseband Coaxial Cable. 40 1.10.43 Advantages : + Bandwidth is high + Used in long distance telephone lines. + Transmits digital signals at a very high rate of 10Mbps. + Much higher noise immunity + Data transmission without distortion. + The can span to longer distance at higher speeds as they have better shielding when compared to twisted pair cable 1.10.4.4 Disadvantages : * Single cable failure can fail the entire network. + Difficult to install and expensive when compared with twisted pair. + Ifthe shield is imperfect, it can lead to grounded loop. 1.10.5Fiber Optic Cable These are’similar to coaxial cable. It uses electric signals to transmit data. At the centre is the glass core through which light propagates. In multimode fibres, the core is SOmicrons, and In single mode fibres, the thickness is 8 to 10 microns. The core in fiber optic cable is surrounded by glass cladding with lower index of refraction as compared to core to keep all the light in core. This is covered with a thin plastic jacket to protect the cladding. The fibers are grouped together in bundles protected by an outer shield. Fiber optic cable has bandwidth more than 2 gbps (Gigabytes per Second) at Glass cladding Glass Core Jacket 1,10.5.1 Advantages : + Provides high quality transmission of signals at very high speed. + These are not affected by electromagnetic interference, so noise and distortion is very less. + Used for both analog and digital signals. 1.10.5.2 Disadvantages : + It is expensive + Difficult to install. + Maintenance is expensive and difficult. + Do not allow complete routing of light signals. Revi juestions 1, Draw the ISO-OSI reference model and explain the functionalities of each layer in detail. 2. Compare the OSI reference model with TCP reference model. Explain how the layers can be grouped. 3. What is the difference between half-duplex and full-duplex transmission modes? 4. Name the four basic network topologies, and cite an advantage of each type. 5. For n devices in a network, what is the number of cable links required for a mesh, ring, bus, and star topology? 6. What are some of the factors that determine whether a communication system is a LAN or WAN? . Discuss the various transmission media in detail. . Explain the application areas of computer networks . Examine Shannon’s Theorem 0. Describe the functions of the physical layer in detail. span 42 UNIT -IT DATA LINK LAYER 2.1 Data Link Layer Data Link Layer is second layer of OSI Layered Model. This layer is one of the most complicated layers and has complex functionalities and liabilities. Data link layer hides the details of underlying hardware and represents itself to upper layer as the medium to communicate. Data link layer works between two hosts which are directly connected in some sense. This direct connection could be point to point or broadcast, Systems on broadcast network are said to be on same link. The work of data link layer tends to get more complex when it is dealing with multiple hosts on single collision domain. Data link layer is responsible for converting data stream to signals bit by bit and to send that over the underlying hardware. At the receiving end, Data link layer picks up data from hardware which are in the form of electrical signals, assembles them in a recognizable frame format, and hands over to upper layer. Data link layer has two sub-layers: = Logical Link Control: It deals with protocols, flow-control, and error control. = Media Access Control: It deals with actual control of media. 2.1.1 Functionality of Data-link Layer Data link layer does many tasks on behalf of upper layer. These are: = Framing - Data-link layer takes packets from Network Layer and encapsulates them into Frames. Then, it sends each frame bit-by-bit on the hardware. At receiver end, data link layer picks up signals from hardware and assembles them into frames. = Addressing - Data-link layer provides layer-2 hardware addressing mechanism. Hardware address is assumed to be unique on the link. It is encoded into hardware at the time of manufacturing. = Synchronization - When data frames are sent on the link, both machines must be synchronized in order to transfer to take place. 43 2.2 Error Control - Sometimes signals may have encountered problem in transition and the bits are flipped. These errors are detected and attempted to recover actual data bits, It also provides error reporting mechanism to the sender. Flow Control - Stations on same link may have different speed or capacity. Data-link layer ensures flow control that enables both machine to exchange data on same speed. Multi-Access - When host on the shared link tries to transfer the data, it has a high probability of collision. Data-link layer provides mechanism such as CSMA/CD to equip capability of accessing a shared media among multiple Systems. Error Detection and Error Correction There are many reasons such as noise, cross-talk etc., which may help data to get corrupted during transmission. The upper layers work on some generalized view of network architecture and are not aware of actual hardware data processing. Hence, the upper layers expect error-free transmission between the systems. Most of the applications would not function expectedly if they receive erroneous data. Applications such as voice and video may not be that affected and with some errors they may still function well. Data-link layer uses some error control mechanism to ensure that frames (data bit streams) are transmitted with certain level of accuracy. But to understand how errors is controlled, it is essential to know what types of errors may occur. Types of Errors There may be three types of errors: Single bit error Sent => Received BOBBOORE 1[o[1]2 [0 BH 22) Ina frame, there is only one bit, anywhere though, which is corrupt. Multiple bits error Sent > Received BOBBOOERE 101 Ryo BR 2[2) Frame is received with more than one bits in corrupted state. Burst error Sent = Received 1Jo[2[2[ofo]3] 1 [o[2[1]2] Frame contains more than consecutive bits corrupted. Error control mechanism may involve two possible ways: o Error detection o Error correction 2.2.1 Error Detection Errors in the received frames are detected by means of Parity Check and Cyclic Redundancy Check (CRC). In both cases, few extra bits are sent along with actual data to confirm that bits received at other end are same as they were sent. If the counter- check at receiver end fails, the bits are considered corrupted. Parity Check One extra bit is sent along with the original bits to make number of Is either even in case of even parity, or odd in case of odd parity. The sender while creating a frame counts the number of Is in it. For example, if even parity is used and number of Is is even then one bit with value 0 is added. This way number of Is remains even. If the number of 1s is odd, to make it even a bit with value | is added. Data Bits = Even Pari [ofoj1]ofoj1] FICOFIOIIEN The receiver simply counts the number of Is in a frame. If the count of 1s is even and even parity is used, the frame is considered to be not-corrupted and is accepted. If the count of Is is odd and odd parity is used, the frame is still not corrupted. Ifa single bit flips in transit, the receiver can detect it by counting the number of Is. But when more than one bits are erroneous, then it is very hard for the receiver to detect the error. Cyclic Redundancy Check (CRC) CRC is a different approach to detect if the received frame contains valid data. This technique involves binary division of the data bits being sent. The divisor is generated using polynomials. The sender performs a division operation on the bits being sent and calculates the remainder. Before 45 sending the actual bits, the sender adds the remainder at the end of the actual bits. Actual data bits plus the remainder is called a codeword. The sender transmits data bits as codewords. Sender Receiver a [ows - ii S ill 101} 11002. 101] 1100110_ 20a} tL ae Data Bits 110) 101 111 At the other end, the receiver performs division operation on codewords using the same CRC divisor. If the remainder contains all zeros the data bits are accepted, otherwise it is considered as there is some data corruption occurred in transit. 2.2.2 Error Correction In the digital world, error correction can be done in two ways: Backward Error Correction When the receiver detects an error in the data received, it requests back the sender to retransmit the data unit. Forward Error Correction When the receiver detects some error in the data received, it executes error- correcting code, which helps it to auto-recover and to correct some kinds of errors. The first one, Backward Error Correction, is simple and can only be efficiently used where retransmitting is not expensive. For example, fiber optics. But in case of 46

You might also like