Computer Networks PDF
Document Details
Uploaded by InspirationalNirvana8346
SRM University
Dr Karthikeyan
Tags
Summary
This document provides an introduction to computer networks, including topics like network architecture, data communication, protocols, and different network topologies. The document also covers data representation and the OSI model.
Full Transcript
Computer Networks Dr Karthikeyan Assistant Professor Dept. of ECE SRM University AP. Introduction Introduction Data communication - Exchange of data between two devices through some transmission medium. For eg. Cables Data communications syst...
Computer Networks Dr Karthikeyan Assistant Professor Dept. of ECE SRM University AP. Introduction Introduction Data communication - Exchange of data between two devices through some transmission medium. For eg. Cables Data communications system depends on four fundamental characteristics: delivery, accuracy, timeliness, and jitter. Delivery:- The system must deliver data to the correct destination. Data must be received by the intended device or user. Accuracy:- The system must deliver the data accurately. Timeliness:- The system must deliver data in a timely manner. Data delivered late are useless. Jitter:- Jitter refers to the variation in the packet arrival time. It is the uneven delay in the delivery of audio or video packets. Intro cont.. Five components of data communication:- Rule 1: Rule 1: Rule 2: Rule 2: Protocol Protocol Rule n: Rule n: Message Medium 1.Message 4. Transmission Medium 2. Sender 5. Protocol 3. Receiver Message:- The message is the information (data) to be communicated. Popular forms of information include text, numbers, pictures, audio, and video. Sender:- The sender is the device that sends the data message. It can be a computer, workstation, telephone handset, video camera, and so on. Receiver:- The receiver is the device that receives the message. It can be a computer, workstation, telephone handset, television, and so on. Transmission medium:- The transmission medium is the physical path by which a message travels from sender to receiver. Some examples of transmission media include twisted-pair wire, coaxial cable, fiber-optic cable, and radio waves. Protocol:- A protocol is a set of rules that govern data communications. It represents an agreement between the communicating devices. Without a protocol, two devices may be connected but not communicating. Data Representation:- Information comes in different forms such as text, numbers, images, audio, and video. Text:- Text is represented as a bit pattern (Os or Is) Different sets of bit patterns have been designed to represent text symbols - called Code The process of representing symbols is called coding. The American Standard Code for Information Interchange (ASCII). Numbers:- Numbers are also represented by bit patterns. The number is directly converted to a binary number to simplify mathematical operations. Images:- Images are also represented by bit patterns. An image is composed of a matrix of pixels each pixel is a small dot. Audio:- Audio refers to the recording or broadcasting of sound or music. Audio is by nature different from text, numbers, or images. It is continuous, not discrete. Video:- Video refers to the recording or broadcasting of a picture or movie. Video can either be produced as a continuous entity (e.g., by a TV camera), or it can be a combination of images, each a discrete entity, arranged to convey the idea of motion Data Flow on Network Simplex Half-duplex Full-duplex Simplex Direction of data Mainframe Monito r The communication is unidirectional. Only one of the two devices on a link can transmit; the other can only receive. Eg: Keyboards. Half-Duplex Direction of data at time I Direction of data at time 2 Each station can both transmit and receive, but not at the same time. When one device is sending, the other can only receive, and vice versa. Eg: Walkie-talkies. The half-duplex mode is used in cases where there is no need for communication in both directions at the same time; the entire capacity of the channel can be utilized for each direction. Full-Duplex Direction of data all the time Both stations can transmit and receive simultaneously. Eg: telephone network. The full-duplex mode is used when communication in both directions is required all the time. The capacity of the channel, however, must be divided between the two directions. NETWORK HARDWARE 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 and/or receiving data generated by other nodes on the network. Network Criteria:- Performance Reliability Security Performance:- Performance can be measured in many ways, including transit time and response time. Transit time is the amount of time required for a message to travel from one device to another. Response time is the time between an inquiry and a response. The performance of a network depends on a number of factors, including the number of users, the type of transmission medium, the capabilities of the connected hardware, and the efficiency of the software. Reliability:- Network reliability is measured by the frequency of failure. The time it takes a link to recover from a failure, and the network's robustness in a catastrophe. Security:- Network security issues include protecting data from unauthorized access, protecting data from damage and development, and implementing policies and procedures for recovery from breaches and data losses. Type of network Connection Point-to-point Multipoint Point-to-point network:- Link A point-to-point connection provides a dedicated link between two devices. The entire capacity of the link is reserved for transmission between those two devices only. It use an actual length of wire or cable to connect the two ends. Multipoint network :- Link Mainframe A multipoint connection is one in which more than two specific devices share a single link. In a multipoint environment, the capacity of the channel is shared, either spatially or temporally. If several devices can use the link simultaneously, it is a spatially shared connection. If users must take turns, it is a timeshared connection. Categories of Networks:- Local Area Network (LAN) Wide Area Network (WAN) Metropolitan Area Networks (MAN) Local Area Network (LAN):- A local area network (LAN) is usually privately owned and links the devices in a single office, building, or campus Wide Area Network (WAN):- A wide area network (WAN) provides long-distance transmission of data, image, audio, and video information over large geographic areas that may comprise a country, a continent, or even the whole world. A WAN can be as complex as the backbones that connect the Internet refered to as switched WAN. And as simple as a dial-up line that connects a home computer to the Internet refer to as point-to-point WAN. Switched WAN:- The switched WAN connects the end systems, which usually comprise a router that connects to another LAN or WAN. Point-to-point WAN:- Point-to-point :_: WAN "", j - Computer Modem ISP The point-to-point WAN is normally a line leased from a telephone or cable TV provider that connects a home computer or a small LAN to an Internet service provider (lSP). Metropolitan Area Networks:- A metropolitan area network (MAN) is a network with a size between a LAN and a WAN. It provides high speed connectivity A good example of a MAN is the part of the telephone company network that can provide a high-speed DSL line to the customer. Network Topologies: Mesh Topology:- Every device has a dedicated point-to-point link to every other device. Star Topology:- Each device has a dedicated point-to-point link only to a central controller, usually called a hub. Bus Topology:- One long cable acts as a backbone to link all the devices in a network Ring topology:- Each device has a dedicated point-to-point connection with only the two devices on either side of it. Repeater Repeater Repeater Repeater Repeater Repeater Internet service providers(ISP):- Internet service provider is an organisation that provides services for accessing, using or participating in the Internet. Internet service providers may be organised in various forms succh as commercial, community-owned, non-profit or otherwise privately owned. OSI MODEL - Open Systems Interconnection History:- International standard organization (ISO) established a committee in 1977 to develop an architecture for computer communication. Open Systems Interconnection (OSI) reference model is the result of this effort. In 1984, the Open Systems Interconnection (OSI) reference model was approved as an international standard for communications architecture. Term “open” denotes the ability to connect any two systems which conform to the reference model and associated standards. The OSI model is now considered the primary Architectural model for inter-computer communications. It is a set of protocols that allows any two different systems to communicate regardless of their underlying architecture. Purpose - to show how to facilitate communication between different systems without requiring changes to the logic of the underlying hardware and software. It is a model for understanding and designing a network architecture that is flexible, robust, and interoperable. The OSI model is a layered framework for the design of network systems that allows communication between all types of computer systems. It consists of seven separate but related layers, each of which defines a part of the process of moving information across a network. Layers of OSI model:- Session Layer: The session layer provides the mechanism for opening, closing and managing a session between end-user application processes OSI MODEL cont... The process of breaking up the functions or tasks of networking into layers to reduce the complexity. Each layer provides a service to the layer above it in the protocol specification. Each layer communicates with the same layer’s software or hardware on other computers. The lower 4 layers (transport, network, data link and physical Layers 4, 3, 2, and 1) are concerned with the flow of data from end to end through the network. The upper four layers of the OSI model (application, presentation and session—Layers 7, 6 and 5) are orientated more toward services to the applications. Data is Encapsulated with the necessary protocol information as it moves down the layers before network transit. Physical Layer Provides physical interface for transmission of information. Defines rules by which bits are passed from one system to another on a physical communication medium. Covers all - mechanical, electrical, functional and procedural - aspects for physical communication. Such characteristics as voltage levels, timing of voltage changes, physical data rates, maximum transmission distances, physical connectors, and other similar attributes are defined by physical layer specifications. Physical layer is also concerned with the following:- Physical characteristics of interfaces and medium The physical layer defines the characteristics of the interface between the devices and the transmission medium. It also defines the type of transmission medium. Representation of bits The physical layer data consists of a stream of bits(sequence of Os or 1s) with no interpretation. To be transmitted, bits must be encoded into signals--electrical or optical. The physical layer defines the type of encoding (how Os and Is are changed to signals). Data rate:- The transmission rate-the number of bits sent each second-is also defined by the physical layer. The physical layer defines the duration of a bit, which is how long it lasts. Synchronization of bits:- The sender and receiver not only must use the same bit rate but also must be synchronized at the bit level. In other words, the sender and the receiver clocks must be synchronized. Line configuration:- The physical layer is concerned with the connection of devices to the media. In a point-to-point configuration, two devices are connected through a dedicated link. In a multipoint configuration, a link is shared among several devices. Transmission mode:- The physical layer also defines the direction of transmission between two devices: simplex, half-duplex, or full-duplex. In simplex mode, only one device can send; the other can only receive. The simplex mode is a one-way communication. In the half- duplex two devices can send and receive, but not at the same time. In a full-duplex (or simply duplex) mode, two devices can send and receive at the same time. Data Link Layer Data link layer attempts to provide reliable communication over the physical layer interface. Breaks the outgoing data into frames and reassemble the received frames. Create and detect frame boundaries. Handle errors by implementing an acknowledgement and retransmission scheme. Implement flow control. Supports points-to-point as well as broadcast communication. Supports simplex, half-duplex or full-duplex communication. Data link layer:- Other responsibilities of the data link layer :- Framing - The data link layer divides the stream of bits received from the network layer into manageable data units called frames. Physical addressing - If frames are to be distributed to different systems on the network, the data link layer adds a header to the frame to define the sender and/or receiver of the frame. If the frame is intended for a system outside the sender's network, the receiver address is the address of the device that connects the network to the next one. Flow control - If the rate at which the data are absorbed by the receiver is less than the rate at which data are produced in the sender, the data link layer imposes a flow control mechanism to avoid overwhelming the receiver. Error control - The data link layer adds reliability to the physical layer by adding mechanisms to detect and retransmit damaged or lost frames. It also uses a mechanism to recognize duplicate frames. Error control is normally achieved through a trailer added to the end of the frame. Access control- When two or more devices are connected to the same link, data link layer protocols are necessary to determine which device has control over the link at any given time. Network Layer Implements routing of frames (packets) through the network. The network layer is responsible for the source-to-destination delivery of a packet, possibly across multiple networks (links). Defines the most optimum path the packet should take from the source to the destination Defines logical addressing so that any endpoint can be identified. Handles congestion in the network. Facilitates interconnection between heterogeneous networks (Internetworking). The network layer also defines how to fragment a packet into smaller packets to accommodate different media. Network layer Other responsibilities of the network layer:- Logical addressing - The physical addressing implemented by the data link layer handles the addressing problem locally. If a packet passes the network boundary, we need another addressing system to help distinguish the source and destination systems. The network layer adds a header to the packet coming from the upper layer that, among other things, includes the logical addresses of the sender and receiver. Routing - When independent networks or links are connected to create intemetworks (network of networks) or a large network, the connecting devices (called routers or switches) route or switch the packets to their final destination. Transport Layer Purpose of this layer is to provide a reliable mechanism for the exchange of data between two processes in different computers. Ensures that the data units are delivered error free. Ensures that data units are delivered in sequence. Ensures that there is no loss or duplication of data units. Provides connectionless or connection oriented service. Provides for the connection management. Multiplex multiple connection over a single channel. Transport Layer:- Other responsibilities of the transport layer:- Service-point addressing - Computers often run several programs at the same time. The transport layer header must therefore include a type of address called a service-point address (or port address). The network layer gets each packet to the correct computer; the transport layer gets the entire message to the correct process on that computer. Segmentation and reassembly - A message is divided into transmittable segments, with each segment containing a sequence number. These numbers enable the transport layer to reassemble the message correctly upon arriving at the destination and to identify and replace packets that were lost in transmission. Connection control - The transport layer can be either connectionless or connection oriented. A connectionless transport layer treats each segment as an independent packet and delivers it to the transport layer at the destination machine. A connection oriented transport layer makes a connection with the transport layer at the destination machine first before delivering the packets. After all the data are transferred, the connection is terminated. Flow control - Like the data link layer, the transport layer is responsible for flow control. Error control - Like the data link layer, the transport layer is responsible for error control. The sending transport layer makes sure that the entire message arrives at the receiving transport layer without error (damage, loss, or duplication). Error correction is usually achieved through retransmission. Session Layer Session layer provides mechanism for controlling the dialogue between the two end systems. It defines how to start, control and end conversations (called sessions) between applications. This layer requests for a logical connection to be established on an end-user’s request. Any necessary log-on or password validation is also handled by this layer. Session layer is also responsible for terminating the connection. This layer provides services like dialogue discipline which can be full duplex or half duplex. Session layer can also provide check-pointing mechanism such that if a failure of some sort occurs between checkpoints, all data can be retransmitted from the last checkpoint. Responsibilities of the session layer Dialog control - The session layer allows two systems to enter into a dialog. It allows the communication between two processes to take place in either half duplex or full-duplex mode. Synchronization - The session layer allows a process to add checkpoints, or synchronization points, to a stream of data. For example, if a system is sending a file of 2000 pages, it is advisable to insert checkpoints after every 100 pages to ensure that each 100-page unit is received and acknowledged independently. In this case, if a crash happens during the transmission of page 523, the only pages that need to be resent after system recovery are pages 501 to 523. Pages previous to 501 need not be resent. Presentation Layer Presentation layer defines the format in which the data is to be exchanged between the two communicating entities. Also handles data compression and data encryption (cryptography). The presentation layer is concerned with the syntax and semantics of the information exchanged between two systems. Presentation Layer:- Responsibilities of the presentation layer:- Translation - The processes (running programs) in two systems are usually exchanging information in the form of character strings, numbers, and so on. The information must be changed to bit streams before being transmitted. The presentation layer at the sender changes the information from its sender-dependent format into a common format. The presentation layer at the receiving machine changes the common format into its receiver-dependent format. Encryption - To carry sensitive information, a system must be able to ensure privacy. Encryption means that the sender transforms the original information to another form and sends the resulting message out over the network. Decryption reverses the original process to transform the message back to its original form. Compression - Data compression reduces the number of bits contained in the information. Data compression becomes particularly important in the transmission of multimedia such as text, audio, and video. Application layer Application layer interacts with application programs and is the highest level of OSI model. The application layer enables the user, whether human or software, to access the network. Application layer contains management functions to support distributed applications. Examples of application layer are applications such as file transfer, electronic mail, remote login etc. File transfer, access, and managemen - This application allows a user to access files in a remote host, to retrieve files from a remote computer for use in the local computer, and to manage or control files in a remote computer locally. Mail services - This application provides the basis for e-mail forwarding and storage. Directory services - This application provides distributed database sources and access for global information about various objects and services. Summary of layers TCP/IP PROTOCOL - Transmission Control Protocol and Internet Protocol. Overview:- 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 overall idea was to allow one application on one computer to talk to(send data packets) another application running on different computer. Protocols are set of rules which govern every possible communication over a network. Protocols describe the movement of data between the source and destination or the internet. Layer 1:Network Layer Lowest layer of the all. Protocol is used to connect to the host, so that the packets can be sent over it. Varies from host to host and network to network. Layer 2: Internet layer 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. The various functions performed by the Internet Layer are: Delivering IP packets Performing routing Avoiding congestion Layer 3: Transport Layer It decides if data transmission should be on parallel path or single path. 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. Transport layer adds header information to the data. Transport layer breaks the message (data) into small units so that they are handled more efficiently by the network layer. Transport layer also arrange the packets to be sent, in sequence. 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. TELNET is a two-way communication protocol which allows connecting to a remote machine and run applications on it. FTP(File Transfer Protocol) is a protocol, that allows File transfer amongst computer users connected over a network. It is reliable, simple and efficient. SMTP(Simple Mail Transport Protocol) is a protocol, which is used to transport electronic mail between a source and destination, directed via a route. DNS(Domain Name Server) resolves an IP address into a textual address for Hosts connected over a network. It allows peer entities to carry conversation. It defines two end-to-end protocols: TCP and UDP TCP(Transmission Control Protocol): It is a reliable connection- oriented protocol which handles byte-stream from source to destination without error and flow control. UDP(User-Datagram Protocol): It is an unreliable connection- less protocol that do not want TCPs, sequencing and flow control. Eg: One-shot request-reply kind of service. 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. Comparison of OSI and TCP/IP Diagrammatic Comparison between OSI Reference Model and TCP/IP Reference Model Design Issues A number of design issues exist for the layer to layer approach of computer networks are as follows: Reliability - Network channels and components may be unreliable, resulting in loss of bits while data transfer. So, an important design issue is to make sure that the information transferred is not distorted. Scalability - Networks are continuously evolving. The sizes are continually increasing leading to congestion. When new technologies are applied to the added components, it may lead to incompatibility issues. Hence, the design should be done so that the networks are scalable and can accommodate such additions and alterations. Addressing - At a particular time, innumerable messages are being transferred between large numbers of computers. So, a naming or addressing system should exist so that each layer can identify the sender and receivers of each message. Error Control - Unreliable channels introduce a number of errors in the data streams that are communicated. So, the layers need to agree upon common error detection and error correction methods so as to protect data packets while they are transferred. Flow Control - If the rate at which data is produced by the sender is higher than the rate at which data is received by the receiver, there are chances of overflowing the receiver. So, a proper flow control mechanism needs to be implemented. Resource Allocation - Computer networks provide services in the form of network resources to the end users. The main design issue is to allocate and deallocate resources to processes. The allocation/deallocation should occur so that minimal interference among the hosts occurs and there is optimal usage of the resources. Statistical Multiplexing - It is not feasible to allocate a dedicated path for each message while it is being transferred from the source to the destination. So, the data channel needs to be multiplexed, so as to allocate a fraction of the bandwidth or time to each host. Routing - There may be multiple paths from the source to the destination. Routing involves choosing an optimal path among all possible paths, in terms of cost and time. Security - A major factor of data communication is to defend it against threats like eavesdropping and surreptitious alteration of messages. So, there should be adequate mechanisms to prevent unauthorized access to data through authentication and cryptography. Application of Computer Network Information and Resource Sharing: Computer networks allow organizations having units which are placed apart from each other, to share information in a very effective manner. Programs and software in any computer can be accessed by other computers linked to the network. It also allows sharing of hardware equipment, like printers and scanners among varied users. Retrieving Remote Information - Through computer networks, users can retrieve remote information on a variety of topics. The information is stored in remote databases to which the user gains access through information systems like the World Wide Web. Speedy Interpersonal Communication: Computer networks have increased the speed and volume of communication like never before. Electronic Mail (email) is extensively used for sending texts, documents, images, and videos across the globe. Online communications have increased by manifold times through social networking services. E-Commerce - Computer networks have paved way for a variety of business and commercial transactions online, popularly called e-commerce. Users and organizations can pool funds, buy or sell items, pay bills, manage bank accounts, pay taxes, transfer funds and handle investments electronically. Highly Reliable Systems: Computer networks allow systems to be distributed in nature, by the virtue of which data is stored in multiple sources. This makes the system highly reliable. If a failure occurs in one source, then the system will still continue to function and data will still be available from the other sources. Cost–Effective System - Computer networks have reduced the cost of establishment of computer systems in organizations. Previously, it was imperative for organizations to set up expensive mainframes for computation and storage. With the advent of networks, it is sufficient to set up interconnected personal computers (PCs) for the same purpose. Shared Internet access: If you have several computers but just one phone line, a network makes using the Internet much easier. VoIP - VoIP or Voice over Internet protocol has revolutionized telecommunication systems. Through this, telephone calls are made digitally using Internet Protocols instead of the regular analog phone lines.