Internetworking Basics

  •  

     Chapter 2: Networking Fundamentals


    The OSI and TCP/IP Models

    These notes guide you through understanding the OSI and TCP/IP models..

    Introduction
    The OSI Model
    The Seven OSI Layers
    The TCP/IP Model
    Data Flow and Encapsulation
    Summary

     
     

    Introduction

    When one networking device attempts to communicate with another device, information needs to be transferred between the devices. However, information cannot just be thrown straight out onto the wire, the information must be carefully packaged so that...

    • it arrives at the correct destination
    • its content can be validated in some way as correct and uncorrupted by the transfer process
    • the information can be reassembled into the correct sequence
    • the information can be understood by the receiving device.

    So how can all this be accomplished and who decides how communication between devices should be done? To answer this is to look at some of the history of networking.

    Before the 1980's, networking was completely vendor-developed and proprietary and so different networking standards were being set-up all over the world. In other words, different networks did thing in different ways.

    However, in the 1980's, the ISO (International Standards Organization) began to develop its OSI (Open Systems Interconnection) networking suite. The aim was to get the everyone to agree on a common framework for developing networking technologies. The OSI standard was eventually published in 1984, a combined effort of the ISO and another organization called the ITU (International Telecommunication Union)

    Although the intention of the ISO was to establish a widely-adopted suite of protocols that would be used by internationally, another model, the TCP/IP suite of protocols become the de-facto standard for communication over the Internet.

    OSI did not go away though, while a minority of the OSI protocols became used, the OSI framework itself (the seven layer model) became widely used in two areas, as an educational tool to demonstrate network protocols and communications and as a reference model for those who develop software and hardware networking products.

    This tutorial covers both the seven layer OSI model and the more widely used TCP/IP model.

     

    The OSI Model

    The OSI (Open Systems Interconnection) model defines a framework for network communication in which information travels through seven layers. How the data is transferred from one layer to the next is dictated by a set of protocols (rules). You can imagine data being handed from one layer to the next, like the pass the parcel game, but the form in which it is passed along depends on the layer.

    Each OSI layer handles the data in accordance with the protocol of that layer. For example, suppose I wish to transfer a bitmap picture from one computer to another, then one layer packages that data into bitmap format, so the computer at the other end can interpret it as a bitmap picture file, another layer will add a header, into which it inserts addressing information. Each layer manipulates the data as it travels down through the seven OSI layers and out onto the wire.

    To understand how communication proceeds between devices you need to understand the seven layers of the OSI model.

     

    The Seven OSI Layers

    The OSI model has seven layers, each one required for carrying out a specific function.

    • Layer 7 - Application layer
        
    • Layer 6 - Presentation layer
        
    • Layer 5 - Session layer
        
    • Layer 4 - Transport layer
        
    • Layer 3 - Network Layer
        
    • Layer 2 - Data link layer
        
    • Layer 1 - Physical layer

    Let's look at each layer in more detail, starting the uppermost layer.

    Layer 7: Application Layer

    This layer is application specific. It is the closest layer to the user. It provides services to user applications. Services include checking that a communication exists, establishing and synchronizing the communication and user authentication. In effect, the application layer prepares the data to be transferred on down through the layers and over to the receiving device.

    Examples of services and protocols that operate at layer 7 are..

      HTTP -    Hypertext Transfer Protocol
     SMTP -    An Email Protocol
      POP -    An Email Protocol
     FTP -    File Transfer Protocol
     Telnet -    A Terminal Connection Protocol

    Layer 6: Presentation Layer

    This layer presents the data in a form such that the data is exchangeable between network devices. .Both ends of the connection agree on points like the format of the data, compression, and encoding /decoding methods to use.

    As an example, the network file system, (NFS) operates at layer 6 (and layer 7). Imagine you can access files on a remote server, such that the files appear as if they are on your own local drive and you can perform normal operations such as cut, copy paste etc. Suppose the NFS file server is a Linux machine that uses forward-slashes in folder names but you are on a Windows machine that uses back-slashes. When you access the remote NFS server's directory then the data must be presented differently to you on your client machine, - folders must be displayed to you with back-slashes instead. This is the type of task the presentation layer has to perform.

    Examples of layer 6 protocols are..

      NFS -     Network File System

    Layer 5: Session Layer

    This layer provides services to the presentation layer by opening up, managing and terminating sessions between the communicating devices.

    Examples of layer 5 protocols are..

      RPC -     Remote Procedure Call
     NetBIOS -     A Windows Protocol

    Layer 4: Transport Layer

    The transport layer is responsible for managing the flow of data between the two communicating devices. It is also responsible for, error detection and recovery, requesting re-transmission of data if an error in the data is detected.

    Importantly, at this layer, data is segmented at the sending end and reassembled at the receiving end. As an analogy, think of a train with different compartments. This is the first layer where transport of data becomes an issue. The upper layer are concerned with application issues, whereas the lower layers, including this layer are concerned with transport issues.

    Examples of layer 4 protocols are..

      TCP -     Transport Control Protocol
     UDP -     User Datagram Protocol
      SPX -     Sequenced Packet Exchange
     NetBEUI -     A Windows Protocol

    Layer 3: Network Layer

    The network layer is concerned with the path data has to take to reach the receiving device. It includes logical addressing so packets can be routed to the correct destination. One example of a logical address is an IP address. Whereas at the layer above, the transport layer, divided the data into segments, at this layer, the data is placed into units called packets.

    Examples of layer 3 protocols are..

      IPX -     Internetwork Packet Exchange
     IP -     Internet Protocol
      ICMP -     Internet Control Messaging Protocol
     ARP -     Address Resolution Protocol
     RIP -     Routing Information Protocol

    Layer 2: Data Link Layer

    The data link layer deals with reliable delivery at the lowest physical level. It is concerned with network topology, controlling the flow of frames and error notification. It is also concerned with addressing - not with logical addressing like the upper network layer but with with physical addressing. An example of a physical address is a MAC address. This layer is actually divided into two sublayers, the Logical Link Control (LLC) sublayer and the Media Access Control)( MAC) sublayer.

    Whereas the network layer above puts data into packets, and the transport layer above that sections the data into segments, at this layer the data is placed into units called frames.

    Layer 1: Physical Layer

    The physical layer deals with the data in the form of electrical pulses, light or radio signal, depending on the media over which the data must be transmitted. The data is converted into a bit-stream and transmitted over the media. This layer deals with timing issues, voltage levels, and physical distances. It also defines cables, cards, connectors and other physical aspects.

    ~~ Activity~~

     Activity A
    1. To familiarize yourself with the function of each OSI layer, why not draw up a table,and list the different functions of each layer.
          
    2. Are you familiar with all the protocls, such as HTTP, FTP etc. Look through the protocols used at within various OSI layers and research any you are not familiar with. I would recommend becoming familiar with HTTP, FTP, IP, TCP, UDP, ARP and RIP
           
    3. Try the flash card memory aid activity on OSI Layers
     

    The TCP/IP Model

    Although the OSI model is widely acknowledged, the TCP/IP model is more commonly used. TCP/IP makes data communication possible between hosts anywhere in the world and is the standard used for data exchange on the Internet.

    The TCP/IP model was developed by the US DoD. They wanted a network that could survive any war condition, particularly nuclear attack. Such a network would have to be able to route network data through alternative routes, should any particular route be destroyed. The TCP/IP model was developed to allow routing of packets across different sorts of cables, links, backbones etc. across the world and allow alternative routes to be found if necessary.

    This method of data exchange and redundancy provided the foundation on which the Internet developed into what it is today.

    The diagram below shows how the TCP/IP model maps to the OSI model. Be aware that although some of the layer names match, the TCP/IP layers do not function in exactly the same way as the OSI layers.

    ~~ Activity~~

     Activity B
    1. Try the flash card memory aid activity on OSI and TCP/IP
     

    Data Flow and Encapsulation

    When data is sent from one device to another, the data must travel down through each layer on the sending device and then up through the layers on the receiving end. The diagram illustrates this.

    Starting at the beginning of the process, the data is handed to the application layer, this layer carries out whatever function it needs to on the data, then it hands the data to the presentation layer, which passes it onto the next layer and so on down to the physical layer. On reaching the physical layer, the data is transmitted on the medium to the receiving device.

    At the receiving end, the data is picked up from the medium by the physical layer, which then hands it over to the layer above. The data travels up through all the layers until it reaches the application layer. The application layer then hands the data over to the appropriate application.

    Now, as the data is passes from layer to layer, the data is manipulated in different ways. For example, the transport layer segments the data and adds a header to the front of each segment. The transport layer always does this to any data it receives from the upper layers; in effect, it is applying a set of rules to the data - a set of rules that belong to the layer. The term protocol means 'a set of rules' and so we will use that word from now on.

    Each layer has its own protocol - set of rules for how it must handle the data.

    The three lower layers of the OSI model, transport, network and data link all group the data in some way and add headers and sometimes trailers to the data. A header contains information which is attached to the front of data, while a trailer is information attached to the tail end.

    The transport layer groups the data into segments. So we say that the PDU (primary data unit) of the transport layer is the segment. It adds a header to each segment and hands each segment to the network layer.

    The network layer converts each segment into a packet by attaching another header. So we say that the PDU (primary data unit) of the network layer is the packet. It then hands each packet to the data link layer.

    The data link layer converts each packet into a frame by attaching yet another header and also a trailer. So we say that the PDU (primary data unit) of the data link layer is the frame. It then hands each frame to the physical layer.

    The physical layer translates the frame into a series of bits, 1's and 0's, and transmits the data onto the medium. So we say that the PDU (primary data unit) of the physical layer is the bit.

    This wrapping of data in headers and trailers by various layers is referred to as encapsulation. The whole frame, including the encapsulated packet and encapsulated segment is shown below.

    At the receiving end, the data has to be unwrapped. The data-link layer removes the first header and trailer from the frame and passes the enclosed packet up to the network layer. This layer strips off the header from the packet and passes the enclosed segment up to the transport layer. The transport layer waits for enough segments to arrive and then assembles the segments together to make the original data stream and passes this up to the higher levels.

    The unwrapping of data by various layers is referred to as de-encapsulation.

    Now you are familiar with OSI layers, how data flows through the layers, the encapsulation and de-encapsulation process, try the following short activity.

    ~~ Activity~~

     Activity C
    1. Try the flash card memory aid activity on OSI in General
     

    Summary

    On completing these notes you should:-

    • be familiar with each of the seven OSI layers
    • be familiar the four TCP/IP layers
    • understand how data flows from layers to layer
    • understand the encapsulation and de-encapsulation process
     
     

    Site Home

    Top

    Unit Home


       


      

     

     

       
    This Unit 

    Unit Information

    Assessment

    Syllabus

    Scheme of Work

    Learning Resources

    Notes & Lessons

    Assignments

    Quizzes

    Activities

    Resources

    Books & Things

    Links