Data Communication & Network Security PDF
Document Details
Uploaded by TrendyExpressionism
Tags
Summary
This document provides a foundational overview of data communication and computer networks. It explores various aspects of networks, including communication processes, network characteristics, and different network types.
Full Transcript
21AD1502 DATA COMMUNICATION AND NETWORK SECURITY UNIT -I FUNDAMENTALS OF COMPUTER NETWORKS AND COMMUNICATION 9 Process of Data communication and its components - Protocols and Standards - Bandwidth, Data Transmission rate, Baud rate,...
21AD1502 DATA COMMUNICATION AND NETWORK SECURITY UNIT -I FUNDAMENTALS OF COMPUTER NETWORKS AND COMMUNICATION 9 Process of Data communication and its components - Protocols and Standards - Bandwidth, Data Transmission rate, Baud rate, Bits per second Modes of Communications Networks — Network Types — Protocol Layering — TCP/IP Protocol suite — OSI Model — Physical Layer: Performance — Transmission media — Switching — Circuit-switched Networks — Packet Switching. INTRODUCTION TO NETWORKS A network is a set of devices (often referred to as nodes) connected by communication links. A node can be a computer, printer, or any other device capable of sending or receiving data generated by other nodes on the network. When we communicate, we are sharing information. This sharing can be local or remote. CHARACTERISTICS OF A NETWORK The effectiveness of a network depends on three characteristics. 1. Delivery: The system must deliver data to the correct destination. 2. Accuracy: The system must deliver data accurately. 3. Timeliness: The system must deliver data in a timely manner. CRITERIA NECESSARY FOR AN EFFECTIVE AND EFFICIENT NETWORK A network must be able to meet a certain number of criteria. The most important of these are performance, reliability, and security. Factors that affect the Factors that affect the Factors that affect the Performance of a network: Reliability of a network: Security of a network: 1. Number of users 1. Efficiency of software. 1. Protecting data from 2. Type of transmission 2. Frequency of failure unauthorized access and medium 3. Recovery time of a viruses. 3. Capabilities of the network after a failure connected hardware COMPONENTS INVOLVED IN A NETWORK PROCESS The five components are: 1. Message - It is the information to be communicated. Popular forms of information include text, pictures, audio, video etc. 2. Sender - It is the device which sends the data messages. It can be a computer, workstation, telephone handset etc. 3. Receiver - It is the device which receives the data messages. It can be a computer, workstation, telephone handset etc. 4. Transmission Medium - It is the physical path by which a message travels from sender to receiver. Some examples include twisted-pair wire, coaxial cable, radio waves etc. 5. Protocol - It is a set of rules that governs the data communications. It represents an agreement between the communicating devices. Without a protocol, two devices may be connected but not communicating. KEY ELEMENTS OF PROTOCOL Syntax: Refers to the structure or format of the data, meaning the order in which they are presented. Semantics: Refers to the meaning of each section of bits. Timing: Refers to two characteristics. (1). When data should be sent and (2). How fast they can be sent. TRANSMISSION MODES o The way in which data is transmitted from one device to another device is known as transmission mode. o The transmission mode is also known as the communication mode. o Each communication channel has a direction associated with it, and transmission media provide the direction. Therefore, the transmission mode is also known as a directional mode. o The transmission mode is defined in the physical layer. Types of Transmission mode The Transmission mode is divided into three categories: o Simplex Mode o Half-duplex Mode o Full-duplex mode (Duplex Mode) SIMPLEX MODE o In Simplex mode, the communication is unidirectional, i.e., the data flow in one direction. o A device can only send the data but cannot receive it or it can receive the data but cannot send the data. o This transmission mode is not very popular as mainly communications require the two-way exchange of data. The simplex mode is used in the business field as in sales that do not require any corresponding reply. o The radio station is a simplex channel as it transmits the signal to the listeners but never allows them to transmit back. o Keyboard and Monitor are the examples of the simplex mode as a keyboard can only accept the data from the user and monitor can only be used to display the data on the screen. o The main advantage of the simplex mode is that the full capacity of the communication channel can be utilized during transmission. Advantage of Simplex mode: o In simplex mode, the station can utilize the entire bandwidth of the communication channel, so that more data can be transmitted at a time. Disadvantage of Simplex mode: o Communication is unidirectional, so it has no inter-communication between devices. HALF-DUPLEX MODE o In a Half-duplex channel, direction can be reversed, i.e., the station can transmit and receive the data as well. o Messages flow in both the directions, but not at the same time. o The entire bandwidth of the communication channel is utilized in one direction at a time. o In half-duplex mode, it is possible to perform the error detection, and if any error occurs, then the receiver requests the sender to retransmit the data. o A Walkie-talkie is an example of the Half-duplex mode. o In Walkie-talkie, one party speaks, and another party listens. After a pause, the other speaks and first party listens. Speaking simultaneously will create the distorted sound which cannot be understood. Advantage of Half-duplex mode: o In half-duplex mode, both the devices can send and receive the data and also can utilize the entire bandwidth of the communication channel during the transmission of data. Disadvantage of Half-Duplex mode: o In half-duplex mode, when one device is sending the data, then another has to wait, this causes the delay in sending the data at the right time. FULL-DUPLEX MODE o In Full duplex mode, the communication is bi-directional, i.e., the data flow in both the directions. o Both the stations can send and receive the message simultaneously. o Full-duplex mode has two simplex channels. One channel has traffic moving in one direction, and another channel has traffic flowing in the opposite direction. o The Full-duplex mode is the fastest mode of communication between devices. o The most common example of the full-duplex mode is a Telephone network. When two people are communicating with each other by a telephone line, both can talk and listen at the same time. Advantage of Full-duplex mode: o Both the stations can send and receive the data at the same time. Disadvantage of Full-duplex mode: o If there is no dedicated path exists between the devices, then the capacity of the communication channel is divided into two parts. COMPARISON - SIMPLEX, HALF-DUPLEX AND FULL-DUPLEX MODE BASIS FOR SIMPLEX HALF-DUPLEX FULL-DUPLEX COMPARISON MODE MODE MODE Direction of Communication is Communication is Communication communication unidirectional. bidirectional, but is bidirectional. one at a time. Send/Receive A device can only Both the devices Both the devices send the data but can send and can send and cannot receive it or receive the data, receive the data it can only receive but one at a time. simultaneously. the data but cannot send it. Example Radio, Keyboard, Walkie-Talkie Telephone and monitor. network. LINE CONFIGURATION / LINE CONNECTIVITY Line configuration refers to the way two or more communication devices attach to a link. A link is a communications pathway that transfers data from one device to another. There are two possible line configurations: i. Point to Point (PPP): Provides a dedicated Communication link between two devices. It is simple to establish. The most common example for Point-to-Point connection 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. ii. MultiPoint : It is also called Multidrop configuration. In this connection two or more devices share a single link. There are two kinds of Multipoint Connections. Spatial Sharing: If several devices can share the link simultaneously, it is called Spatially shared line configuration Temporal (Time) Sharing: If users must take turns using the link , then its called Temporally shared or Time Shared Line Configuration. NETWORK TOPOLOGY Two or more devices connect to a link. Two or more links form a topology. Topology is defined as (1) The way in which a network is laid out physically. (2) The geometric representation of the relationship of all the links and nodes to one-another. The various types of topologies are : Bus, Ring, Tree, Star, Mesh and Hybrid. BUS TOPOLOGY Bus topology is a network type in which every computer and network device is connected to single cable. The long single cable acts as a backbone to link all the devices in a network. When it has exactly two endpoints, then it is called Linear Bus topology. It transmits data only in one direction. Advantages of Bus Topology Disadvantages of Bus Topology 1. It is cost effective. 1. Cables fails then whole network fails. 2. Cable required is least compared 2. If network traffic is heavy or nodes are to other network topology. more, the performance of the 3. Used in small networks. network decreases. 4. It is easy to understand. 3. Cable has a limited length. 5. Easy to expand joining two cables 4. It is slower than the ring topology. together RING TOPOLOGY In a ring topology, each device has a dedicated point-to-point connection with only the two devices on either side of it. A signal is passed along the ring in one direction, from device to device, until it reaches its destination. Each device in the ring incorporates a repeater. When a device receives a signal intended for another device, its repeater regenerates the bits and passes them along. Advantages of Ring Topology Disadvantages of Ring Topology 1. Transmitting network is not affected 1. Troubleshooting is difficult in ring by high traffic or by adding more topology. nodes, as only the nodes having 2. Adding or deleting the tokens can transmit data. computers disturbs the network 2. Cheap to install and expand activity. 3. Failure of one computer disturbs 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. Tree topology is ideal if workstations are located in groups. They are used in Wide Area Network. Advantages of Tree Topology Disadvantages of Tree Topology 1. Extension of bus and star topologies. 1. Heavily cabled. 2. Expansion of nodes is possible and easy. 2. Costly. 3. Easily managed and maintained. 3. If more nodes are added maintenance 4. Error detection is easily done. is difficult. 4. Central hub fails, network fails. STAR TOPOLOGY In a star topology, each device has a dedicated point-to-point link only to a central controller, usually called a hub. The devices are not directly linked to one another. The controller acts as an exchange. If one device wants to send data to another, it sends the data to the controller, which then relays the data to the other connected device. Advantages of Star Topology Disadvantages of Star Topology 1. Fast performance with few nodes 1. Cost of installation is high. and low network traffic. 2. Expensive to use. 2. Hub can be upgraded easily. 3. If the hub fails, then the 3. Easy to troubleshoot. whole network is stopped. 4. Easy to setup and modify. 4. Performance is based on the hub 5. Only that node is affected which that is it depends on its capacity has failed, rest of the nodes can work smoothly MESH TOPOLOGY In a mesh topology, every device has a dedicated point-to-point link to every other device. The term dedicated means that the link carries traffic only between the two devices it connects. The number of physical links in a fully connected mesh network with n nodes is given by n (n – 1) / 2. Advantages of Mesh Topology Disadvantages of Mesh Topology 1. Each connection can carry its own data 1. Installation and configuration is load. difficult. 2. It is robust. 2. Cabling cost is more. 3. Fault is diagnosed easily. 3. Bulk wiring is required. 4. Provides security and privacy. HYBRID TOPOLOGY Hybrid Topology is a combination of one or more basic topologies. For example if one department in an office uses ring topology, the other departments uses star and bus topology, then connecting these topologies will result in Hybrid Topology. Hybrid Topology inherits the advantages and disadvantages of the topologies included. Advantages of Hybrid Topology Disadvantages of Hybrid Topology 1. Reliable as Error detecting and 1. Complex in design. trouble shooting is easy. 2. Costly 2. Effective. 3. Scalable as size can be increased easily. 4. Flexible. NETWORK TYPES A computer network is a group of computers linked to each other that enables the computer to communicate with another computer and share their resources, data, and applications. A computer network can be categorized by their size. A computer network is mainly of three types: 1. Local Area Network (LAN) 2. Wide Area Network (WAN) 3. Metropolitan Area Network (MAN) LOCAL AREA NETWORK (LAN) o Local Area Network is a group of computers connected to each other in a small area such as building, office. o LAN is used for connecting two or more personal computers through a communication medium such as twisted pair, coaxial cable, etc. o It is less costly as it is built with inexpensive hardware such as hubs, network adapters, and ethernet cables. o The data is transferred at an extremely faster rate in Local Area Network. o LAN can be connected using a common cable or a Switch. Advantages of LAN Disadvantages of LAN Resource Sharing High Setup Cost Software Applications Sharing. Privacy Violations Easy and Cheap Communication Data Security Threat Centralized Data. LAN Maintenance Job Data Security Covers Limited Area Internet Sharing WIDE AREA NETWORK (WAN) o A Wide Area Network is a network that extends over a large geographical area such as states or countries. o A Wide Area Network is quite bigger network than the LAN. o A Wide Area Network is not limited to a single location, but it spans over a large geographical area through a telephone line, fibre optic cable or satellite links. o The internet is one of the biggest WAN in the world. o A Wide Area Network is widely used in the field of Business, government, and education. o WAN can be either a point-to-point WAN or Switched WAN. Point-to-point WAN Switched WAN Advantages of Wide Area Network: Disadvantages of Wide Area Network: o Large Geographical area o Security issue o Centralized data o Needs Firewall & antivirus software o Exchange messages o High Setup cost o Sharing of software and resources o Troubleshooting problems o High bandwidth METROPOLITAN AREA NETWORK (MAN) o A metropolitan area network is a network that covers a larger geographic area by interconnecting a different LAN to form a larger network. o It generally covers towns and cities (50 km) o In MAN, various LANs are connected to each other through a telephone exchange line. o Communication medium used for MAN are optical fibers, cables etc. o It has a higher range than Local Area Network(LAN).It is adequate for distributed computing applications. INTERNETWORK o An internetwork is defined as two or more computer network LANs or WAN. o An Internetwork can be formed by joining two or more individual networks by means of various devices such as routers, gateways and bridges. o An interconnection between public, private, commercial, industrial, or government computer networks can also be defined as internetworking. Types of Internetwork Extranet Intranet An extranet is used for information sharing. An intranet belongs to an organization The access to the extranet is restricted to which is only accessible by only those users who have login credentials. the organization's employee or members. An extranet is the lowest level of The main aim of the intranet is to share the internetworking. It can be categorized as information and resources among the MAN, WAN or other computer networks. organization employees. An intranet An extranet cannot have a single LAN, provides the facility to work in groups and atleast it must have one connection to the for teleconferences. external network. TRANSMISSION MEDIA o Transmission media is a communication channel that carries the information from the sender to the receiver. o Data is transmitted through the electromagnetic signals. o The main functionality of the transmission media is to carry the information in the form of bits (Either as Electrical signals or Light pulses). o It is a physical path between transmitter and receiver in data communication. o The characteristics and quality of data transmission are determined by the characteristics of medium and signal. o Transmission media is of two types : Guided Media (Wired) and UnGuided Media (wireless). o In guided (wired) media, medium characteristics are more important whereas, in unguided (wireless) media, signal characteristics are more important. o Different transmission media have different properties such as bandwidth, delay, cost and ease of installation and maintenance. o The transmission media is available in the lowest layer of the OSI reference model, i.e., Physical layer. FACTORS FOR DESIGNING THE TRANSMISSION MEDIA o Bandwidth: All the factors are remaining constant, the greater the bandwidth of a medium, the higher the data transmission rate of a signal. o Transmission impairment: When the received signal is not identical to the transmitted one due to the transmission impairment. The quality of the signals will get destroyed due to transmission impairment. o Interference: An interference is defined as the process of disrupting a signal when it travels over a communication medium on the addition of some unwanted signal. CAUSES OF TRANSMISSION IMPAIRMENT o Attenuation: Attenuation means the loss of energy, i.e., the strength of the signal decreases with increasing the distance which causes the loss of energy. o Distortion: Distortion occurs when there is a change in the shape of the signal. This type of distortion is examined from different signals having different frequencies. Each frequency component has its own propagation speed, so they reach at a different time which leads to the delay distortion. o Noise: When data is travelled over a transmission medium, some unwanted signal is added to it which creates the noise. TYPES / CLASSES OF TRANSMISSION MEDIA GUIDED MEDIA It is defined as the physical medium through which the signals are transmitted. It is also known as Bounded media. Types of Guided media: Twisted Pair Cable, Coaxial Cable , Fibre Optic Cable TWISTED PAIR CABLE Twisted pair is a physical media made up of a pair of cables twisted with each other. A twisted pair cable is cheap as compared to other transmission media. Installation of the twisted pair cable is easy, and it is a lightweight cable. The frequency range for twisted pair cable is from 0 to 3.5KHz. A twisted pair consists of two insulated copper wires arranged in a regular spiral pattern. Unshielded Twisted Pair An unshielded twisted pair is widely used in telecommunication. Following are the categories of the unshielded twisted pair cable: o Category 1: Suports low-speed data. o Category 2: It can support upto 4Mbps. o Category 3: It can support upto 16Mbps. o Category 4: It can support upto 20Mbps. o Category 5: It can support upto 200Mbps. Advantages : o It is cheap. o Installation of the unshielded twisted pair is easy. o It can be used for high-speed LAN. Disadvantage: o This cable can only be used for shorter distances because of attenuation. Shielded Twisted Pair A shielded twisted pair is a cable that contains the mesh surrounding the wire that allows the higher transmission rate. Advantages : o The cost of the shielded twisted pair cable is not very high and not very low. o Installation of STP is easy. o It has higher capacity as compared to unshielded twisted pair cable. o It has a higher attenuation. o It is shielded that provides the higher data transmission rate. Disadvantages: o It is more expensive as compared to UTP and coaxial cable. o It has a higher attenuation rate. COAXIAL CABLE o Coaxial cable(Coax) is a very commonly used transmission media, for example, TV wire is usually a coaxial cable. o The name of the cable is coaxial as it contains two conductors parallel to each other. o It has a higher frequency as compared to Twisted pair cable. o The inner conductor of the coaxial cable is made up of copper, and the outer conductor is made up of copper mesh. o The middle core is made up of non-conductive cover that separates the inner conductor from the outer conductor. o The middle core is responsible for the data transferring whereas the copper mesh prevents from the EMI(Electromagnetic interference). o Common applications of coaxial cable are Cable TV networks and traditional Ethernet LANs. Coaxial Cable Standards Coaxial cables are categorized by their Radio Government (RG) ratings. Each RG number denotes a unique set of physical specifications, including the wire gauge of the inner conductor, the thickness and type of the inner insulator, the construction of the shield, and the size and type of the outer casing. Each cable defined by an RG rating is adapted for a specialized function. Types of Coaxial cable : 1. Baseband transmission: It is defined as the process of transmitting a single signal at high speed. 2. Broadband transmission: It is defined as the process of transmitting multiple signals simultaneously. Advantages : o The data can be transmitted at high speed. o It has better shielding as compared to twisted pair cable. o It provides higher bandwidth. Disadvantages : o It is more expensive as compared to twisted pair cable. o If any fault occurs in the cable causes the failure in the entire network. FIBRE OPTIC CABLE o Fibre optic cable is a cable that uses electrical signals for communication. o Fibre optic is a cable that holds the optical fibres coated in plastic that are used to send the data by pulses of light. o The plastic coating protects the optical fibres from heat, cold, electromagnetic interference from other types of wiring. o Fibre optics provide faster data transmission than copper wires. Basic elements of Fibre optic cable: o Core: The optical fibre consists of a narrow strand of glass or plastic known as a core. A core is a light transmission area of the fibre. The more the area of the core, the more light will be transmitted into the fibre. o Cladding: The concentric layer of glass is known as cladding. The main functionality of the cladding is to provide the lower refractive index at the core interface as to cause the reflection within the core so that the light waves are transmitted through the fibre. o Jacket: The protective coating consisting of plastic is known as a jacket. The main purpose of a jacket is to preserve the fibre strength, absorb shock and extra fibre protection. Advantages: o Greater Bandwidth o Less signal attenuation o Immunity to electromagnetic interference o Resistance to corrosive materials o Light weight o Greater immunity to tapping Disadvantages : o Requires Expertise for Installation and maintenance o Unidirectional light propagation. o Higher Cost. Propagation Modes of Fibre Optics Current technology supports two modes (multimode and single mode) for propagating light along optical channels, each requiring fiber with different physical characteristics. Multimode can be implemented in two forms: step-index or graded-index. Multimode Propagation Multimode is so named because multiple beams from a light source move through the core in different paths. How these beams move within the cable depends on the structure of the core. Multimode Step-index fiber Multimode Graded-index fiber In multimode step-index fiber, the The multimode graded-index fiber, density of the core remains constant decreases this distortion of the from the center to the edges. signal through the cable. A beam of light moves through this The word index here refers to the constant density in a straight line until index of refraction. it reaches the interface of the core and The index of refraction is related the cladding. to density. At the interface, there is an abrupt A graded index fiber, therefore, is change due to a lower density; this alters one with varying densities. the angle of the beam’s motion. Density is highest at the center of The term step-index refers to the the core and decreases gradually to suddenness of this change, which its lowest at the edge. contributes to the distortion of the signal as it passes through the fiber. Single-Mode Propagation Single-mode uses step-index fiber and a highly focused source of light that limits beams to a small range of angles, all close to the horizontal. The single-mode fiber itself is manufactured with a much smaller diameter than that of multimode fiber, and with substantially lower density (index of refraction). The decrease in density results in a critical angle that is close enough to 90° to make the propagation of beams almost horizontal. In this case, propagation of different beams is almost identical, and delays are negligible. All the beams arrive at the destination “together” and can be recombined with little distortion to the signal. UNGUIDED MEDIA o An unguided transmission transmits the electromagnetic waves without using any physical medium. Therefore it is also known as wireless transmission. o In unguided media, air is the media through which the electromagnetic energy can flow easily. o Unguided transmission is broadly classified into three categories : Radio Waves, Microwaves , Infrared RADIO WAVES o Radio waves are the electromagnetic waves that are transmitted in all the directions of free space. o Radio waves are omnidirectional, i.e., the signals are propagated in all the directions. o The range in frequencies of radio waves is from 3Khz to 1Khz. o In the case of radio waves, the sending and receiving antenna are not aligned, i.e., the wave sent by the sending antenna can be received by any receiving antenna. o An example of the radio wave is FM radio. Applications of Radio waves: o A Radio wave is useful for multicasting when there is one sender and many receivers. o An FM radio, television, cordless phones are examples of a radio wave. Advantages of Radio waves: o Radio transmission is mainly used for wide area networks and mobile cellular phones. o Radio waves cover a large area, and they can penetrate the walls. o Radio transmission provides a higher transmission rate. MICROWAVES Microwaves are of two types - Terrestrial microwave & Satellite microwave Terrestrial Microwave o Terrestrial Microwave transmission is a technology that transmits the focused beam of a radio signal from one ground-based microwave transmission antenna to another. o Microwaves are the electromagnetic waves having the frequency in the range from 1GHz to 1000 GHz. o Microwaves are unidirectional as the sending and receiving antenna is to be aligned, i.e., the waves sent by the sending antenna are narrowly focused. o In this case, antennas are mounted on the towers to send a beam to another antenna which is km away. o It works on the line of sight transmission, i.e., the antennas mounted on the towers are at the direct sight of each other. Characteristics of Terrestrial Microwave: o Frequency range: The frequency range of terrestrial microwave is from 4-6 GHz to 21-23 GHz. o Bandwidth: It supports the bandwidth from 1 to 10 Mbps. o Short distance: It is inexpensive for short distance. o Long distance: It is expensive as it requires a higher tower for a longer distance. o Attenuation: Attenuation means loss of signal. It is affected by environmental conditions and antenna size. Advantages of Terrestrial Microwave: o Microwave transmission is cheaper than using cables. o It is free from land acquisition as it does not require any land for the installation of cables. o Microwave transmission provides an easy communication in terrains as the installation of cable in terrain is quite a difficult task. o Communication over oceans can be achieved by using microwave transmission. Disadvantages of Terrestrial Microwave: o Eavesdropping. o Out of phase signal o Susceptible to weather condition o Bandwidth limited Satellite Microwave o A satellite is a physical object that revolves around the earth at a known height. o Satellite communication is more reliable nowadays as it offers more flexibility than cable and fibre optic systems. o We can communicate with any point on the globe by using satellite communication. o The satellite accepts the signal that is transmitted from the earth station, and it amplifies the signal. The amplified signal is retransmitted to another earth station. Advantages of Satellite Microwave: o The coverage area of a satellite microwave is more than the terrestrial microwave. o The transmission cost of the satellite is independent of the distance from the centre of the coverage area. o Satellite communication is used in mobile and wireless communication applications. o It is easy to install. o It is used in a wide variety of applications such as weather forecasting, radio/TV signal broadcasting, mobile communication, etc. Disadvantages of Satellite Microwave: o Satellite designing and development requires more time and higher cost. o The Satellite needs to be monitored and controlled on regular periods so that it remains in orbit. o The life of the satellite is about 12-15 years. Due to this reason, another launch of the satellite has to be planned before it becomes non-functional. INFRARED WAVES o An infrared transmission is a wireless technology used for communication over short ranges. o The frequency of the infrared in the range from 300 GHz to 400 THz. o It is used for short-range communication such as data transfer between two cell phones, TV remote operation, data transfer between a computer and cell phone and devices that resides in the same closed area. Characteristics of Infrared: o It supports high bandwidth, and hence the data rate will be very high. o Infrared waves cannot penetrate the walls. Therefore, the infrared communication in one room cannot be interrupted by the nearby rooms. o An infrared communication provides better security with minimum interference. o Infrared communication is unreliable outside the building because the sun rays will interfere with the infrared waves. SWITCHING o The technique of transferring the information from one computer network to another network is known as switching. o Switching in a computer network is achieved by using switches. o A switch is a small hardware device which is used to join multiple computers together with one local area network (LAN). o Switches are devices capable of creating temporary connections between two or more devices linked to the switch. o Switches are used to forward the packets based on MAC addresses. o A Switch is used to transfer the data only to the device that has been addressed. It verifies the destination address to route the packet appropriately. o It is operated in full duplex mode. o It does not broadcast the message as it works with limited bandwidth. Advantages of Switching: o Switch increases the bandwidth of the network. o It reduces the workload on individual PCs as it sends the information to only that device which has been addressed. o It increases the overall performance of the network by reducing the traffic on the network. o There will be less frame collision as switch creates the collision domain for each connection. Disadvantages of Switching: o A Switch is more expensive than network bridges. o A Switch cannot determine the network connectivity issues easily. o Proper designing and configuration of the switch are required to handle multicast packets. Types of Switching Techniques CIRCUIT SWITCHING o Circuit switching is a switching technique that establishes a dedicated path between sender and receiver. o In the Circuit Switching Technique, once the connection is established then the dedicated path will remain to exist until the connection is terminated. o Circuit switching in a network operates in a similar way as the telephone works. o A complete end-to-end path must exist before the communication takes place. o In case of circuit switching technique, when any user wants to send the data, voice, video, a request signal is sent to the receiver then the receiver sends back the acknowledgment to ensure the availability of the dedicated path. After receiving the acknowledgment, dedicated path transfers the data. o Circuit switching is used in public telephone network. It is used for voice transmission. o Fixed data can be transferred at a time in circuit switching technology. Phases in Circuit Switching Communication through circuit switching has 3 phases: 1. Connection Setup / Establishment - In this phase, a dedicated circuit is established from the source to the destination through a number of intermediate switching centres. The sender and receiver transmits communication signals to request and acknowledge establishment of circuits. 2. Data transfer - Once the circuit has been established, data and voice are transferred from the source to the destination. The dedicated connection remains as long as the end parties communicate. 3. Connection teardown / Termination - When data transfer is complete, the connection is relinquished. The disconnection is initiated by any one of the user. Disconnection involves removal of all intermediate links from the sender to the receiver. Advantages It is suitable for long continuous transmission, since a continuous transmission route is established, that remains throughout the conversation. The dedicated path ensures a steady data rate of communication. No intermediate delays are found once the circuit is established. So, they are suitable for real time communication of both voice and data transmission. Disadvantages Circuit switching establishes a dedicated connection between the end parties. This dedicated connection cannot be used for transmitting any other data, even if the data load is very low. Bandwidth requirement is high even in cases of low data volume. There is underutilization of system resources. Once resources are allocated to a particular connection, they cannot be used for other connections. Time required to establish connection may be high. It is more expensive than other switching techniques as a dedicated path is required for each connection. PACKET SWITCHING o The packet switching is a switching technique in which the message is sent in one go, but it is divided into smaller pieces, and they are sent individually. o The message splits into smaller pieces known as packets and packets are given a unique number to identify their order at the receiving end. o Every packet contains some information in its headers such as source address, destination address and sequence number. o Packets will travel across the network, taking the shortest path as possible. o All the packets are reassembled at the receiving end in correct order. o If any packet is missing or corrupted, then the message will be sent to resend the message. o If the correct order of the packets is reached, then the acknowledgment message will be sent. Advantages of Packet Switching: o Cost-effective: In packet switching technique, switching devices do not require massive secondary storage to store the packets, so cost is minimized to some extent. Therefore, we can say that the packet switching technique is a cost- effective technique. o Reliable: If any node is busy, then the packets can be rerouted. This ensures that the Packet Switching technique provides reliable communication. o Efficient: Packet Switching is an efficient technique. It does not require any established path prior to the transmission, and many users can use the same communication channel simultaneously, hence makes use of available bandwidth very efficiently. Disadvantages of Packet Switching: o Packet Switching technique cannot be implemented in those applications that require low delay and high-quality services. o The protocols used in a packet switching technique are very complex and requires high implementation cost. o If the network is overloaded or corrupted, then it requires retransmission of lost packets. It can also lead to the loss of critical information if errors are nor recovered. APPROACHES OF PACKET SWITCHING There are two approaches to Packet Switching: o Datagram Packet switching o Virtual Circuit Switching Datagram Packet switching o It is a packet switching technology in which packet is known as a datagram, is considered as an independent entity. o Each packet contains the information about the destination and switch uses this information to forward the packet to the correct destination. o The packets are reassembled at the receiving end in correct order. o In Datagram Packet Switching technique, the path is not fixed. o Intermediate nodes take the routing decisions to forward the packets. o Datagram Packet Switching is also known as connectionless switching. o There are no setup or teardown phases. o Each packet is treated the same by a switch regardless of its source or destination. In this example, all four packets (or datagrams) belong to the same message, but may travel different paths to reach their destination. Routing Table In this type of network, each switch (or packet switch) has a routing table which is based on the destination address. The routing tables are dynamic and are updated periodically. The destination addresses and the corresponding forwarding output ports are recorded in the tables. Delay in a datagram network The packet travels through two switches. There are three transmission times (3T),three propagation delays (slopes 3t of the lines), and two waiting times (w1 + w2). We ignore the processing time in each switch. Total delay = 3T + 3t + w1 + w2 Virtual Circuit Switching o Virtual Circuit Switching is also known as connection-oriented switching. o In the case of Virtual circuit switching, a virtual connection is established before the messages are sent. o Call request and call accept packets are used to establish the connection between sender and receiver. o In this case, the path is fixed for the duration of a logical connection. Virtual Circuit Identifier (VCI) A virtual circuit identifier (VCI) that uniquely identifies the connection at this switch. A VCI, unlike a global address, is a small number that has only switch scope; it is used by a frame between two switches. When a frame arrives at a switch, it has a VCI; when it leaves, it has a different VCI. Virtual Circuit Table Every Virtual Circuit (VC) maintains a table called Virtual Circuit table. One entry in the VC table on a single switch contains the following : An incoming interface on which packets for this VC arrive at the switch An outgoing interface in which packets for this VC leave the switch A outgoing VCI that will be used for outgoing packets Example : Source A sends a frame to Source B through Switch 1, Switch 2 and Switch 3. Types of Virtual Circuits There are two broad classes of Virtual Circuits. They are 1. PVC – Permanent Virtual Circuit Network Administrator will configure the state The virtual circuit is permanent (PVC) 2. SVC – Switched Virtual Circuit A host can send messages into the network to cause the state to be established. This is referred as signaling. A host may set up and delete such a VC dynamically without the involvement of a network administrator Delay in Virtual-Circuit Networks The packet is traveling through two switches (routers). There are three transmission times (3T ), three propagation times (3t), data transfer depicted by the sloping lines, a setup delay (which includes transmission and propagation in two directions), and a teardown delay (which includes transmission and propagation in one direction). Total delay = 3T + 3t + Setup delay + Teardown delay COMPARISON – CIRCUIT SWITCHING AND PACKET SWITCHING PACKET SWITCHING CIRCUIT SWITCHING Virtual Circuit Switching Datagram Switching Connection oriented Connection oriented Connection less Packets may be delivered out Ensures in order delivery Ensures in order delivery of order No reordering is required No reordering is required Reordering is required A dedicated path exists A dedicated path exists for No dedicated path exists for for data transfer data transfer data transfer All the packets take the All the packets take the All the packets may not take same path same path the same path Resources are allocated Resources are allocated on No resources are allocated before data transfer demand using 1st packet Stream oriented Packet oriented Packet oriented Fixed bandwidth Dynamic Bandwidth Dynamic bandwidth Reliable Reliable Unreliable No overheads Less overheads Higher overheads Implemented at physical Implemented at data link Implemented at network layer layer layer Inefficient in terms of Provides better efficiency Provides better efficiency resource utilization than circuit switched than message switched systems systems Example- Telephone Examples- X.25, Frame Example- Internet systems relay MESSAGE SWITCHING o Message Switching is a switching technique in which a message is transferred as a complete unit and routed through intermediate nodes at which it is stored and forwarded. o In Message Switching technique, there is no establishment of a dedicated path between the sender and receiver. o The destination address is appended to the message. Message Switching provides a dynamic routing as the message is routed through the intermediate nodes based on the information available in the message. o Message switches are programmed in such a way so that they can provide the most efficient routes. o Each and every node stores the entire message and then forward it to the next node. This type of network is known as store and forward network. o Message switching treats each message as an independent entity. PROTOCOL LAYERING In networking, a protocol defines the rules that both the sender and receiver and all intermediate devices need to follow to be able to communicate effectively. A protocol provides a communication service that the process use to exchange messages. When communication is simple, we may need only one simple protocol. When the communication is complex, we may need to divide the task between different layers, in which case we need a protocol at each layer, or protocol layering. Protocol layering is that it allows us to separate the services from the implementation. A layer needs to be able to receive a set of services from the lower layer and to give the services to the upper layer. Any modification in one layer will not affect the other layers. Basic Elements of Layered Architecture Service: It is a set of actions that a layer provides to the higher layer. Protocol: It defines a set of rules that a layer uses to exchange the information with peer entity. These rules mainly concern about both the contents and order of the messages used. Interface: It is a way through which the message is transferred from one layer to another layer. Features of Protocol Layering 1. It decomposes the problem of building a network into more manageable components. 2. It provides a more modular design. Principles of Protocol Layering 1. The first principle dictates that if we want bidirectional communication, we need to make each layer so that it is able to perform two opposite tasks, one in each direction. 2. The second principle that we need to follow in protocol layering is that the two objects under each layer at both sites should be identical. Protocol Graph The set of protocols that make up a network system is called a protocol graph. The nodes of the graph correspond to protocols, and the edges represent a dependence relation. For example, the Figure below illustrates a protocol graph consists of protocols RRP (Request/Reply Protocol) and MSP (Message Stream Protocol) implement two different types of process-to-process channels, and both depend on the HHP (Host-to- Host Protocol) which provides a host-to-host connectivity service OSI MODEL o OSI stands for Open System Interconnection. o It is a reference model that describes how information from a software application in one computer moves through a physical medium to the software application in another computer. o OSI consists of seven layers, and each layer performs a particular network function. o OSI model was developed by the International Organization for Standardization (ISO) in 1984, and it is now considered as an architectural model for the inter- computer communications. o OSI model divides the whole task into seven smaller and manageable tasks. Each layer is assigned a particular task. o Each layer is self-contained, so that task assigned to each layer can be performed independently. ORGANIZATION OF THE OSI LAYERS FUNCTIONS OF THE OSI LAYERS 1. PHYSICAL LAYER The physical layer coordinates the functions required to transmit a bit stream over a physical medium. The physical layer is concerned with the following functions: Physical characteristics of interfaces and media - The physical layer defines the characteristics of the interface between the devices and the transmission medium. Representation of bits - To transmit the stream of bits, it must be encoded to signals. The physical layer defines the type of encoding. Signals: It determines the type of the signal used for transmitting the information. Data Rate or Transmission rate - The number of bits sent each second –is also defined by the physical layer. Synchronization of bits - The sender and receiver must be synchronized at the bit level. Their clocks must be synchronized. Line Configuration - In a point-to-point configuration, two devices are connected together through a dedicated link. In a multipoint configuration, a link is shared between several devices. Physical Topology - The physical topology defines how devices are connected to make a network. Devices can be connected using a mesh, bus, star or ring topology. Transmission Mode - The physical layer also defines the direction of transmission between two devices: simplex, half-duplex or full-duplex. 2. DATA LINK LAYER It is responsible for transmitting frames from one node to the next node. The other responsibilities of this layer are Framing - Divides the stream of bits received into data units called frames. Physical addressing – If frames are to be distributed to different systems on the network , data link layer adds a header to the frame to define the sender and receiver. Flow control- If the rate at which the data are absorbed by the receiver is less than the rate produced in the sender ,the Data link layer imposes a flow ctrl mechanism. Error control- Used for detecting and retransmitting damaged or lost frames and to prevent duplication of frames. This is achieved through a trailer added at the end of the frame. Medium Access control -Used to determine which device has control over the link at any given time. 3. NETWORK LAYER This layer is responsible for the delivery of packets from source to destination. It determines the best path to move data from source to the destination based on the network conditions, the priority of service, and other factors. The other responsibilities of this layer are Logical addressing - If a packet passes the network boundary, we need another addressing system for source and destination called logical address. This addressing is used to identify the device on the internet. Routing – Routing is the major component of the network layer, and it determines the best optimal path out of the multiple paths from source to the destination. 4. TRANSPORT LAYER It is responsible for Process to Process delivery. That is responsible for source-to- destination (end-to-end) delivery of the entire message, It also ensures whether the message arrives in order or not. The other responsibilities of this layer are Port addressing / Service Point addressing - The header includes an address called port address / service point address. This layer gets the entire message to the correct process on that computer. Segmentation and reassembly - The message is divided into segments and each segment is assigned a sequence number. These numbers are arranged correctly on the arrival side by this layer. Connection control - This can either be connectionless or connection oriented. The connectionless treats each segment as an individual packet and delivers to the destination. The connection-oriented makes connection on the destination side before the delivery. After the delivery the termination will be terminated. Flow control - The transport layer also responsible for flow control but it is performed end-to-end rather than across a single link. Error Control - Error control is performed end-to-end rather than across the single link.. 5. SESSION LAYER This layer establishes, manages and terminates connections between applications. The other responsibilities of this layer are Dialog control - Session layer acts as a dialog controller that creates a dialog between two processes or we can say that it allows the communication between two processes which can be either half-duplex or full-duplex. Synchronization- Session layer adds some checkpoints when transmitting the data in a sequence. If some error occurs in the middle of the transmission of data, then the transmission will take place again from the checkpoint. This process is known as Synchronization and recovery. 6. PRESENTATION LAYER It is concerned with the syntax and semantics of information exchanged between two systems. The other responsibilities of this layer are Translation – Different computers use different encoding system, this layer is responsible for interoperability between these different encoding methods. It will change the message into some common format. Encryption and decryption-It means that sender transforms the original information to another form and sends the resulting message over the n/w. and vice versa. Compression and expansion-Compression reduces the number of bits contained in the information particularly in text, audio and video. 7. APPLICATION LAYER This layer enables the user to access the network. It handles issues such as network transparency, resource allocation, etc. This allows the user to log on to remote user. The other responsibilities of this layer are FTAM (File Transfer, Access, Management) - Allows user to access files in a remote host. Mail services - Provides email forwarding and storage. Directory services - Provides database sources to access information about TCP / IP PROTOCOL SUITE The TCP/IP architecture is also called as Internet architecture. It is developed by the US Defense Advanced Research Project Agency (DARPA) for its packet switched network (ARPANET). TCP/IP is a protocol suite used in the Internet today. It is a 4-layer model. The layers of TCP/IP are 1. Application layer 2. Transport Layer (TCP/UDP) 3. Internet Layer 4. Network Interface Layer APPLICATION LAYER An application layer incorporates the function of top three OSI layers. An application layer is the topmost layer in the TCP/IP model. It is responsible for handling high-level protocols, issues of representation. This layer allows the user to interact with the application. When one application layer protocol wants to communicate with another application layer, it forwards its data to the transport layer. Protocols such as FTP, HTTP, SMTP, POP3, etc running in the application layer provides service to other program running on top of application layer TRANSPORT LAYER The transport layer is responsible for the reliability, flow control, and correction of data which is being sent over the network. The two protocols used in the transport layer are User Datagram protocol and Transmission control protocol. o UDP – UDP provides connectionless service and end-to-end delivery of transmission. It is an unreliable protocol as it discovers the errors but not specify the error. o TCP – TCP provides a full transport layer services to applications. TCP is a reliable protocol as it detects the error and retransmits the damaged frames. INTERNET LAYER The internet layer is the second layer of the TCP/IP model. An internet layer is also known as the network layer. The main responsibility of the internet layer is to send the packets from any network, and they arrive at the destination irrespective of the route they take. Internet layer handle the transfer of information across multiple networks through router and gateway. IP protocol is used in this layer, and it is the most significant part of the entire TCP/IP suite. NETWORK INTERFACE LAYER The network interface layer is the lowest layer of the TCP/IP model. This layer is the combination of the Physical layer and Data Link layer defined in the OSI reference model. It defines how the data should be sent physically through the network. This layer is mainly responsible for the transmission of the data between two devices on the same network. The functions carried out by this layer are encapsulating the IP datagram into frames transmitted by the network and mapping of IP addresses into physical addresses. The protocols used by this layer are Ethernet, token ring, FDDI, X.25, frame relay. COMPARISON - OSI MODEL AND TCP/IP MODEL S.No OSI MODEL TCP/IP MODEL 1 Defined before advent of internet Defined after the advent of Internet. 2 Service interface and protocols Service interface and protocols were not are clearly distinguished before clearly distinguished before 3 Internetworking not supported TCP/IP supports Internet working 4 Strict layering Loosely layered 5 Protocol independent standard Protocol Dependant standard 6 Less Credible More Credible 7 All packets are reliably delivered TCP reliably delivers packets, IP does not reliably deliver packets