Unit 1 Introduction Syllabus of unit 1: Introduction: Importance of Computer Networks, Classifications & Types. Layered Architecture: Protocol hierarchy, Interfaces and Services, Connection Oriented &Connection less Services, ISO- OSI Reference Model, TCP/IP model overview, comparison of TCP/IP and ISO-OSI reference model.
Network Topologies : How the computers are connected to each other is known as topology. There are five types of topology – Mesh, Star, Bus, Ring and Hybrid .
M esh topology: In mesh topology each device is connected to every other device on the network through a dedicated point-to-point link .
Star Topology: In star topology each device in the network is connected to a central device called hub. Unlike Mesh topology, star topology doesn’t allow direct communication between devices, a device must have to communicate through hub .
Bus Topology: In bus topology there is a main cable and all the devices are connected to this main cable through drop lines. There is a device called tap that connects the drop line to the main cable. Since all the data is transmitted over the main cable, there is a limit of drop lines and the distance a main cable can have.
Ring Topology: In ring topology each device is connected with the two devices on either side of it. There are two dedicated point to point links a device has with the devices on the either side of it. This structure forms a ring thus it is knowns ring topology .
Hybrid topology: A combination of two or more topology is known as hybrid topology. For example a combination of star and mesh topology is known as hybrid topology.
Computer Network: A computer network is a group of computers connected with each other through a transmission medium such as cable, wire etc. Types of Computer Network
Local Area Network (LAN ): Local area network is a group of computers connected with each other in a small places such as school, hospital, apartment etc.
2. Metropolitan Area Network (MAN ): MAN network covers larger area by connections LANs to a larger network of computers. In Metropolitan area network various Local area networks are connected with each other through telephone lines.
3 . Wide area network (WAN ): Wide area network provides long distance transmission of data. The size of the WAN is larger than LAN and MAN. A WAN can cover country, continent or even a whole world. Internet connection is an example of WAN. Other examples of WAN are mobile broadband connections such as 3G, 4G etc.
Network Devices : The devices which are used for communication between different hardware’s used in the computer network are known as network devices. Types of Network Devices Network Hub Network Switch Modem Network Router Bridge Repeater
Network Hub: The network hub is one kind of networking device in a computer network, used to communicate with various network hosts and also for data transferring. The transferring of data in a computer network can be done in the form of packets. Whenever the data processing can be done from a host to a network hub, then the data can transmit to all the connected ports.
Network Switch: Similar to a hub, this is also working at the layer in the LAN and a switch is more clever compare with a hub. As the hub is used for data transferring, whereas a switch is used for filtering & forwarding the data. So this is the more clever technique to deal with the data packets.
Modem: Modem is a hardware device that connects a computer or router to a broadband network. when it receives a analog signal it changes into a digital signal . it stands modulator and demodulator .it enables a computer to transfer the data.
Network Router: A network router is one kind of network device in a computer network and it is used for routing traffic from one network to another. These two networks could be private to a public company network. For example, here a router is considered as traffic police at the junction, he directs dissimilar traffic networks to dissimilar directions.
Bridge Bridge stores MAC address of pc in a network. Bridge is used to reduce the network traffic. It is basically used in bus topology, in this topology if pc 1 wants to send data to pc 8 ,bus topology broadcast the data to all the pc available in the network so that it simply create the lots of traffic.so for overcoming this problem we are using a networking device called bridge. Bridge divide a LAN into two segemnet and it stores all the pc MAC address. If pc 1 want to send dta to pc 8 it first reach to bridge and read MAC address and decide where to send data so it reduce the network traffic.
Repeater The operating of a repeater can be done at the physical layer. The main function of this device is to reproduce the signal on a similar network before the signal gets weak otherwise damaged. The significant point to be noted regarding these devices is that they do not strengthen the signal. Whenever the signal gets weak, then they reproduce it at the actual strength. A repeater is a two-port device.
Gateway Generally, a gateway performs at the session & transport layers in the OSI model. Gateways offer conversion between networking technologies like OSI (Open System Interconnection) & TCP/IP . Because of this, these are connected to two or many autonomous networks, where each network has its own domain name service, routing algorithm, topology, protocols, and procedures of network administration & policies. gateway-device Gateways execute all the functions of routers. Actually, a router with additional conversion functionality is a gateway, so the conversion between various network technologies is known as a protocol converter.
To understand how the data is actually transferred and received at a computer level, we use computer network model. A simple transmission of data consists several steps at various layers of computer network. Computer Network Models
Layers of a Computer Network Models 1. The main purpose of having several layers in a computer network model is to divide a process of sending and receiving data into small-small tasks. 2. These layers are connected with each other, each layer provide certain data to its immediate higher and immediate lower layer and receives certain data from the same. 3. Dividing a model in layers makes the structure quite simple that makes it easy to identify the issue if it occurs. There are three main components of a computer network model. Sender, receiver and carrier.
The most important computer network models are: 1. OSI Model 2. TCP/IP Model
OSI Model in Computer Network: OSI Model stands for Open System interconnection model. It was first introduced in the late 1970s Given by International Standards Organization (ISO). ISO is the organization
In Figure which gives an overall view of the OSI layers. D7 means the data unit at layer 7, D6 means the data unit at layer 6, and so on. The process starts at layer 7 (the application layer), then moves from layer to layer in descending, sequential order. At each layer, a header, or possibly a trailer, can be added to the data unit. Commonly, the trailer is added only at layer 2. When the formatted data unit passes through the physical layer (layer 1), it is changed into an electromagnetic signal and transported along a physical link.
Note: Transport layer converts the data into segments. Network layer converts the segments into packets and Data link layer converts the packets into frames. A frame is nothing but a sequence of bits such as 1001011. Physical layer converts these binary sequences into signals and transfer it through a transmission media such as cables etc.
Physical Layer: The physical layer coordinates the functions required to carry a bit stream over a physical medium.
Main functions of Physical Layer: 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). To be transmitted, bits must be encoded into signals, electrical or optical. The physical layer defines the type of encoding (how Os and 1s are changed to signals). Data Rate: (The transmission rate)-the number of bits sent each second . Data rate unit is bps(bits/second)
Main functions of Physical Layer: 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. Physical Topology: The physical topology defines how devices are connected to make a network. Devices can be connected by using a mesh topology, a star topology, a ring topology, a bus topology, or a hybrid topology. Transmission mode: The physical layer also defines the direction of transmission between two devices: simplex, half-duplex, or full-duplex.
Data Link Layer: The data link layer transforms the physical layer, a raw transmission facility, to a reliable link. It makes the physical layer appear error-free to the upper layer (network layer). Figure shows the relationship of the data link layer to the network and physical layers.
Data Link Layer: Other responsibilities of the data link layer include: 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.
Data Link Layer: 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: The network layer is responsible for the source-to-destination delivery of a packet, possibly across multiple networks (links). Figure shows the relationship of the network layer to the data link and transport layers.
The main functions of Network Layer: Logical addressing: 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 internetworks (network of networks) or a large network, the connecting devices (called routers or switches) route or switch the packets to their final destination. One of the functions of the network layer is to provide this mechanism.
Transport layer: The transport layer is responsible for process-to-process delivery of the entire message. A process is an application program running on a host. The transport layer, on the other hand, ensures that the whole message arrives intact and in order, overseeing both error control and flow control at the source-to-destination level.
The main functions of transport layer are: Service-point addressing: Computers often run several programs at the same time. For this reason, source-to-destination delivery means delivery not only from one computer to the next but also from a specific process (running program) on one computer to a specific process (running program) on the other. The transport layer header must therefore include a type of address called a service-point address (or port address). Flow control: It controls the flow of data. It checks the capability of the receiver device receiving capability before transmitting data. For example a sender server can send the data at a rate of 200Mbps but a receiving data can only receive data at a rate of 10 Mbps then it controls the flow of data to 10Mbps so that the data doesn’t get lost during transmission.
The main functions of transport layer are: Error control: Transport layer also performs error control using Automatic Repeat Request, if a data is lost during transmission, it is send again using automatic repeat request. Transport layer also adds a group of bits called checksum with each segment to check whether the data received at receiver side is not corrupt. Segmentation and reassembly: A message is divided into transmittable segments, with each segment containing a sequence number. 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.
Session Layer: The session layer is responsible for dialog control and synchronization. Dialog control: ( identification of mode of communication) 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 (one way at a time) or full-duplex (two ways at a time) 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.
Main functions of session layer: Authentication: Before a computer can be connected to a server, the computer has to provide user name and password for the authentication. The function of authentication and setting up a connection after authentication is performed by session layer. Authorization: Once a connection is established, session layer checks whether the connected computer is authorized to access the data, this function of authorization checking is also performed by session layer. Session management: Session layer also checks that the data which is received from the server in form of data packets belongs to which application. for example, when you access Facebook profile through your browser, the data transferred from the Facebook server is transferred to your web browser application, thus the session layer helps in session management.
Presentation Layer: The presentation layer is responsible for translation, compression, and encryption. Presentation layer receives the data from top most layer which is application layer.
Functions of Presentation layer: Translation: The data received from application layer is in form of characters and numbers such as 1234, ERFF etc. The presentation layer converts these characters and numbers into machine understandable format which is known as binary format for example 100111101. Because different computers use different encoding systems, the presentation layer is responsible for interoperability between these different encoding methods. 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 protect the sensitivity of data, presentation layer encrypts the data at the sender side before the transmission and the receiver side this data is decrypted by the presentation layer at the receiver side. Secure sockets layer protocol (SSL) is used by the presentation layer for encryption and decryption. 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. Compress the data to small size so that it can be transferred faster over a network. This compression can be lossy or lossless compression.
The application layer enables the user, whether human or software, to access the network. It provides user interfaces and support for services such as electronic mail, remote file access and transfer, shared database management, and other types of distributed information services Application Layer
Network virtual terminal . A network virtual terminal is a software version of a physical terminal, and it allows a user to log on to a remote host. The remote host believes it is communicating with one of its own terminals and allows the user to log on. File transfer, access, and management . This application allows a user to access files in a remote host (to make changes or read data), to retrieve files from a remote computer for use in the local computer. 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. Application layer defines the protocols that are used by computer applications. For example: HTTP and HTTPS protocols are used by web browsers , SMTP protocol is used for emails, Telnet is used for virtual terminals etc Functions of application layer:
The TCP/IP protocol suite was developed prior to the OSI model. Therefore, the layers in the TCP/IP protocol suite do not exactly match those in the OSI model. TCP/IP protocol suite, was designed in 1970s by 2 DARPA scientists— Vint Cerf and Bob Kahn The original TCP/IP protocol suite was defined as having four layers: Host-to-network layer Internet layer Transport layer and Application layer. TCP/IP Model
TCP/IP Vs OSI: However, when TCP/IP is compared to OSI, we can say that: The host-to-network layer is equivalent to the combination of the physical and data link layers. The internet layer is equivalent to the network layer. The transport layer in TCP/IP taking care of part of the duties of the transport layer. and The application layer is roughly doing the job of the session, presentation, and application layers. The first three layers provide physical standards, network interfaces, internetworking, and transport functions that correspond to the first four layers of the OSI model. The three topmost layers in the OSI model, are represented in TCP/IP by a single layer called the application layer.
TCP/IP Model:
Internetworking protocol(IP) : In the network layer, the TCP/IP model supports internetworking protocol (IP) for data transmission. IP protocol transmits the data in form of small packets known as datagram's. Each of these datagram's are transmitted separately, thus they can take different routes and sometime duplicate datagram's can be reached to destination, also they are reached in no particular order at the destination.
Internetworking protocol(IP) : The IP uses four protocols internally: ARP, RARP, ICMP & IGMP. Address Resolution Protocol (ARP) In a network, each device is known as physical address usually imprinted on Network interface card (NIC). ARP protocol is used to find the physical address of a device whose internet address (IP address) is known. Reverse Address Resolution Protocol (RARP) RARP protocol helps to find the internet address of a device whose physical address is known.
Internet Control Message Protocol (ICMP) IP in network layer sends data in form of small packets known as datagram's. ICMP protocol sends the datagram's problems back to sender. It is used for query and error reporting messages. Internet Group Message Protocol (IGMP) This protocol is used for simultaneous transmission of a message to a group of recipients. TELecommunication NETwork (TELNET ) This protocol is used 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) an IP address into a textual address for Hosts connected over a network.
OSI model distinguishes well between the services, interfaces and protocols. Protocols of OSI model are very well hidden. Protocols can be replaced by new protocols as technology changes. Supports connection oriented services as well as connectionless service. Merits of OSI
Connection Oriented Service There is a sequence of operation to be followed by the users of connection oriented service. These are: STEP-1-Connection is established STEP-2-Information is sent STEP-3-Connection is released In connection oriented service we have to establish a connection before starting the communication. When connection is established we send the message or the information and then we release the connection. Connection oriented service is more reliable than connectionless service. We can send the message in connection oriented service if there is an error at the receivers end. Example of connection oriented is TCP (Transmission Control Protocol) protocol. Connection Oriented and Connectionless Services
Connectionless Services It is similar to the postal services, as it carries the full address where the message (letter) is to be carried. Each message is routed independently from source to destination. The order of message sent can be different from the order received. In connectionless the data is transferred in one direction from source to destination without checking that destination is still there or not or if it prepared to accept the message. Authentication is not needed in this. Example of Connectionless service is UDP (User Datagram Protocol) protocol.
Sr no. Connection Oriented Services Connectionless Services 1 It needs authentication. It does not need authentication. 2 It guarantees a delivery It does not guarantee a delivery 3 It is more reliable It not that reliable 4 Connection Oriented is stream based Connectionless is message based. 5 Slow service Fast service 6 In connection-oriented Service, Congestion is not possible. In connection-less Service, Congestion is possible. 7 In connection-oriented Service, Packets follow the same route. In connection-less Service, Packets do not follow the same route. 8 Ex-TCP Ex-UDP Difference between Connection Oriented and Connectionless Services
Sr. OSI TCP/IP 1 OSI model Developed after TCP/IP TCP/IP model Developed before OSI 2 OSI model has 7 layers TCP/IP has 4 layers 3 OSI differentiates services , protocols and interfaces. TCP/IP doesn’t differentiate them. 4 Connection oriented and connectionless in network layer and connection oriented in transport layer in OSI model Connection oriented and connectionless in transport layer and connection oriented in network layer in tcp / ip model 5 OSI represents Open System Interconnection. TCP/IP model represents the Transmission Control Protocol / Internet Protocol. 6 The smallest size of the OSI header is 5 bytes. The smallest size of the TCP/IP header is 20 bytes. 7 Protocols in the OSI model are hidden and can be easily replaced when the technology changes. In this model, the protocol cannot be easily replaced. Comparison of OSI Model and TCP/IP Model