Network Models Network Models Objectives: Introduction to Network Models Type of Network Models OSI Model TCP\IP Model Difference between OSI and TCP/IP Reference Model Advantages and Disadvantages of Network Models Page 1 of 10 Network Models Introduction to Network Model When dealing with networking, you may hear the terms "network model" and "network layer" used often. Network models define a set of network layers and how they interact. There are several different network models depending on what organization or company started them. The Open Systems Interconnection model (OSI) is a conceptual model that characterizes and standardizes the internal functions of a communication system by partitioning it into abstraction layers. The model is a product of the Open Systems Interconnection project at the International Organization for Standardization (ISO), maintained by the identification ISO/IEC 7498-1. The model groups communication functions into seven logical layers. A layer serves the layer above it and is served by the layer below it. For example, a layer that provides error-free communications across a network provides the path needed by applications above it, while it calls the next lower layer to send and receive packets that make up the contents of that path. Two instances at one layer are connected by a horizontal connection on that layer. Page 2 of 10 Network Models OSI Reference Model is a standard approach to network design. It is developed by the International Standards Organization (ISO). The word “Open” signifies that the model deals with connecting open systems – that is, systems that are open for communication with other systems. The OSI model has 7 layers. The following principles were applied to arrive at the seven layers: 1. The complex task of network architecture is divided into a set of functions. 2. A layer should be created where a different level of abstraction is needed. 3. Each layer should perform a well defined function. 4. The layer boundaries should be chosen to minimize the information flow across the interfaces. 5. The number of layers should be large enough that distinct functions need not be thrown together in the same layer out of necessity, and small enough that the architecture does not become unwieldy. Functions which are similar are grouped together within layers. 6. The internal design of a layer is independent of the function it provides. 7. Each layer knows only about its immediately adjacent layers. A layer utilizes the services of the layer below and provides services to the layer above. 8. Each layer can be regarded as a black box Network Model: What is a model? – A model is a hypothetical description of a complex entity or process. The process of data communication along a network is very complex involving hardware and software. Network model - A method of describing and analyzing data communications networks by breaking the entire set of communications process into a number of layers. Network Architecture: A set of layers and protocols is called a network architecture It refers to the physical and logical design of a network Protocol: It is a formal description of message formats and the rules that two computers must follow in order to exchange messages. This set of rules describes how data is transmitted over a network. OSI is not a protocol. Protocols are needed for the following reasons: In what format will the messages be transmitted? At what speed should messages be transmitted? What to do if errors take place? What to do if parts of a message are lost? Layered Approach To Networking: Divide the complex task into a number of simpler sub-tasks. A layer performs that simple sub-task. Each layer builds upon the layer below it, adding new functionality. The entities comprising the corresponding layers on different machines are called peers. It is the peers that communicate by using the protocols. Actually, data is not transferred from layer n on one machine to layer n on another machine. Page 3 of 10 Network Models Each layer passes data and control information to the layer immediately below it, until the lowest layer is reached. Actual data communication takes place through the lowest layer – the physical layer. Design Issues for Layers: Addressing - some mechanism is needed for specifying the source and destination systems. Error control – error detection and correction Order of messages must be preserved. Flow control – fast sender and slow receiver – prevent the receiver from being flooded with data Disassembling, transmitting, and reassembling large messages – individual parts of messages must be numbered serially so that reassembly is possible, and lost / damaged messages can be retransmitted. Multiplexing / de-multiplexing – Multiplexing is a technique that allows several signals to be transmitted over a single communications channel. Multiplexing permits efficient utilization of channel resources. De-multiplexing is carried out at the receiving end to separate the signals. Routing - it is the act of moving information across an internetwork from a source to a destination Concept of Services and Protocols: A service is a set of operations that a layer provides to the layer above it. Service defines what operations the layer is prepared to perform. A service relates to the interface between two layers – the lower layer is service provider and the upper layer is service user. A protocol is a set of rules governing the format and meaning of the packets. Protocols relate to packets sent between peer entities on different machines. Entities use protocols. Protocols can be changed provided the services visible to the user do not change. Thus services and protocols are completely decoupled. Analogy with programming languages: A service is like an object in an object-oriented language What operations can be performed on this object is defined How these operations are to be performed is not defined Protocol relates to the implementation of the service – how it is done Layers of the OSI Model: Application Presentation Session Transport Network Data Link Physical Useful mnemonics to remember the order of these layers: All People Seem To Need Data Processing Please Do Not Tell Secret Passwords Anytime Page 4 of 10 Network Models Application Layer: This is the top layer of the reference model. Examples: email client, Internet browser, file transfer How can two applications communicate in a meaningful way? - The particular needs of an application specify the communication characteristics at the application layer. Contains protocols that allow the users to access the network (FTP, HTTP, SMTP, etc Does not include application programs such as email, browsers, word processing applications, etc Protocols contain utilities and network-based services that support email via SMTP, Internet access via HTTP, file transfer via FTP, etc Presentation Layer: Examples: compression, encryption What does the data look like? - The Presentation layer provides services that affect how data passed between applications will look, such as character set conversion, or encryption/decryption. Translation o Different computers use different encoding systems (bit order translation) o Convert data into a common format before transmitting. o Syntax represents info such as character codes, data types, and file formats (how many bits to represent data – 8 or 7 bits Compression – reduce number of bits to be transmitted Encryption – transform data into an unintelligible format at the sending end for data security Decryption – at the receiving end. Session Layer Main functions of this layer are: o Dialog control – allows two systems to enter into a dialog, keep a track of whose turn it is to transmit o Synchronization – adds check points (synchronization points) into stream of data. How can more than one resource talk to only one of me? – The session layer answers the need for individual hosts to support more than one active connection at a time. Transport Layer Main functions of this layer are: o Responsible for source-to-destination delivery of the entire message o Segmentation and reassembly – divide message into smaller segments, number them and transmit. Reassemble these messages at the receiving end. o Error control – make sure that the entire message arrives without errors – else retransmit. What if data arrives garbled or out of order or too fast? – The Transport Layer provides end-to-end communication integrity. If a packet is missing or garbled, or arrives out-oforder, or too soon, the protocol at this layer will attempt to correct. Network Layer Main functions of this layer are: o Responsible for delivery of packets across multiple networks o Routing – Provide mechanisms to transmit data over independent networks that are linked together. o Network layer is responsible only for delivery of individual packets and it does not recognize any relationship between those packets Page 5 of 10 Network Models Data Link Layer Responsible for delivery of data between two systems on the same network Main functions of this layer are: o Framing – divides the stream of bits received into manageable data units called frames. o Physical Addressing – Add a header to the frame to define the physical address of the source and the destination machines. o Flow control – Impose a flow control – control rate at which data is transmitted so as not to flood the receiver o Error Control – Adds mechanisms to detect and retransmit damaged or lost frames; also prevents duplication of frames. This is achieved by adding a trailer to the end of a frame. Physical layer Functions of Physical Layer: o Bit representation – encode bits into electrical or optical signals o Transmission rate – The number of bits sent each second o Physical characteristics of transmission media o Synchronizing the sender and receiver clocks o Transmission mode – simplex, half-duplex, full duplex o Physical Topology – how devices are connected – ring, star, mesh, bus topology Transmit raw bit-stream over physical cable. Define physical aspects of media, network cards, etc. Connection-oriented and Connectionless Services: Layers can offer two types of services t5o the layers above them: connection-oriented and connectionless. Connection-oriented service is modelled after the telephone system. To talk to someone, pick up a phone, dial the number, talk and disconnect. Similarly, in a network, the service user will 1. Establish a connection 2. Use the connection 3. Release the connection 4. The sender, receiver and the network may conduct a negotiation about data transfer speed, maximum message size, etc. When a connection is established, the sender and receiver may conduct a negotiation about parameters to be used such as maximum message size, data transfer speed, etc. Connection-oriented service is used when reliability is important. Only a single path is established for the call, and all the data follows that path. Connectionless service is modelled after the post office system. Each message (letter) carries the full address of the destination system. Each message is routed through the network system independent of the other messages. If two messages are sent to the same destination, normally the first one to be sent should arrive first. But it is possible that the second message arrives first. Since each message (packet) is routed independently, the network cannot guarantee that all the messages will arrive at the destination in the transmitting order. Different parts of a message may travel along different routes. Page 6 of 10 Network Models TCP / IP Protocol What is TCP / IP? TCP – Transmission Control Protocol IP – Internetwork Protocol TCP/IP refers to a collection of protocols The name TCP/IP is misleading because TCP and IP are only two of the many protocols in this collection of protocols. TCP is a reliable connection-oriented protocol with the following features: 1. Allows error-free transmission. 2. Incoming byte stream is fragmented into a number of shorter messages and these are passed on to the next layer. 3. At the receiving end the TCP reassembles the messages into an output stream 4. TCP also handles flow control – to control data transfer rate so that a slow receiver is not flooded with data from a fast sender. 5. A connection must be established between the sender and the receiver before transmission begins. 6. TCP creates a virtual circuit between sender and receiver for the duration of the transmission. 7. TCP begins each transmission by alerting the receiver that segments are on their way (connection establishment). 8. Each transmission is ended with connection termination. Layers of TCP/IP Model: Application Transport Internet Data Link Physical The TCP / IP suite does not define any specific protocols at the data link and physical layers. The Application layer: This is equivalent to the combined OSI Session, Presentation, and Application layers. All the functions handled by these 3 layers in the OSI model is handled by the Application layer. This layer contains the higher level protocols: a. FTP – File Transfer Protocol – basic file transfer between hosts (computers) b. SMTP – Simple Mail Transfer Protocol (for email) c. HTTP – Hyper Text Transfer Protocol (for web browsing) A data unit created at the application layer is called a message. Encapsulation of Data: TCP/IP protocol suite encapsulates data units at various layers of the model a. At the Application layer, the data unit created is called a message. b. The Transport layer adds a header to form either a segment with TCP or a user datagram with UDP. Page 7 of 10 Network Models c. Each segment created by TCP includes: i. A sequencing number for re-ordering after receipt. ii. An acknowledgement ID number iii. Source address and destination address iv. Checksum – for error detection v. Data vi. And other fields d. The Network (or Internet) layer adds another header to form a datagram. A datagram is a self-contained message unit which contains sufficient information to allow it to be routed from the source to the destination. The protocol used at the data link layer encapsulates the datagram into a frame and this is transmitted across the transmission medium. Transport Layer: This layer is represented by two protocols – TCP (Transmission Control Protocol) and UDP (User Datagram Protocol). UDP is simpler but is used when reliability and security are less important than size and speed – such as speech and video where a loss of few data is not significant, but speed is important. Network Layer or Internetwork Layer Internetwork Protocol (IP) is an unreliable and connectionless datagram protocol. It offers a best–effort delivery service. There is no error checking. IP does its best to get a transmission through to its destination but with no guarantees. Noise can cause bit errors during transmission, and datagrams maybe discarded due to timeout errors. IP transports data in packets called datagrams: Each datagram is transported separately. Datagrams can be of variable lengths (upto 64 KB). Datagrams may travel along different routes and may arrive out of sequence. IP does not keep track of the routes. IP does not have the facility to reorder datagrams once they arrive. A datagram contains a header and data. The header contains a number of fields including source and destination address. Comparison of OSI and TCP/IP Models: o o o o o o o o The OSI model makes a clear distinction between services, interfaces and protocols Each layer performs some service for the layer above it A layer’s interface tells the processes above it how to access it. It specifies what the parameters are and what results to expect (somewhat like a function declaration) The protocols used in a layer are used to get the job done. The OSI model has 7 layers while the TCP/ IP model has 5 layers Both have network, transport, and application layers, but the other layers are different OSI model supports both connectionless and connection-oriented communication TCP/IP supports only connectionless communication How TCP/IP works? User application programs communicate with the top layer in the protocol stack. This layer passes information to the next subsequent lower layer of the stack, and so on till the information is passed to the lowest layer, the physical layer, which transfers the information to the destination network. At the destination, the lower layer passes the received information to its higher levels, which in turn passes the data to the destination application. Each protocol layer performs various Page 8 of 10 Network Models functions which are independent of the other layers. Each layer communicates with equivalent layers on another computer; this is called peer interaction File Transfer using TCP / IP: An application program, transferring files using TCP/IP, performs the following: At the sending end: the application layer passes the data to the transport layer of the source computer the transport layer - divides the data into TCP segments - adds a header with a sequence number to each TCP segment - passes the TCP segments to the IP layer the IP layer - creates a packet with a data portion containing the TCP segment - adds a packet header containing the source and destination IP addresses - determines the physical address of the destination computer - passes the packet and destination physical address to the datalink layer the datalink layer transmits the IP packet in the data portion of a frame At the receiving end: the destination computers datalink layer - discards the datalink header and passes the IP packet to the IP layer the destination’s IP layer - checks the IP packet header and checksum - if okay, discards IP header & passes the TCP segment to the TCP layer the destination’s TCP layer OSI(Open System Interconnection) 1. OSI is a generic, protocol independent standard, acting as a communication gateway between the network and end user. 2. In OSI model the transport layer guarantees the delivery of packets. TCP/IP(Transmission Control Protocol / Internet Protocol) 1. TCP/IP model is based on standard protocols around which the Internet has developed. It is a communication protocol, which allows connection of hosts over a network. 2. In TCP/IP model the transport layer does not guarantees delivery of packets. Still the TCP/IP model is more reliable. 3. Follows vertical approach. 3. Follows horizontal approach. 4. OSI model has a separate Presentation layer and Session layer. 5. Transport Layer is Connection Oriented. 6. Network Layer is both Connection Oriented and Connection less. 7. OSI is a reference model around which the networks are built. Generally it is used as a guidance tool. 4. TCP/IP does not have a separate Presentation layer or Session layer. 5. Transport Layer is both Connection Oriented and Connection less. 6. Network Layer is Connection less. 7. TCP/IP model is, in a way implementation of the OSI model. Page 9 of 10 Network Models 8. Network layer of OSI model provides both connection oriented and connectionless service. 9. OSI model has a problem of fitting the protocols into the model. 10. Protocols are hidden in OSI model and are easily replaced as the technology changes. 11. OSI model defines services, interfaces and protocols very clearly and makes clear distinction between them. It is protocol independent. 12. It has 7 layers 8. The Network layer in TCP/IP model provides connectionless service. 9. TCP/IP model does not fit any protocol 10. In TCP/IP replacing protocol is not easy. 11. In TCP/IP, services, interfaces and protocols are not clearly separated. It is also protocol dependent. 12. It has 4 layers ADVANTAGES OF NETWORK MODEL: 1.) Conceptual simplicity-Just like the hierarchical model,the network model is also conceptually simple and easy to design. 2.) Capability to handle more relationship types-The network model can handle the one to many and many to many relationships which is real help in modeling the real life situations. 3.) Ease of data access-The data access is easier and flexible than the hierarchical model. 4.) Data integrity- The network model does not allow a member to exist without an owner. 5.) Data independence- The network model is better than the hierarchical model in isolating the programs from the complex physical storage details. 6.) Database standards DIS-ADVANTAGE OF NETWORK MODEL: 1.) System complexity- All the records are maintained using pointers and hence the whole database structure becomes very complex. 2.) Operational Anomalies- The insertion, deletion and updating operations of any record require large number of pointers adjustments. 3.) Absence of structural independence-structural changes to the database is very difficult. Page 10 of 10