Wednesday, September 4, 2013

OSI Model VS TCP/IP Model

 The Open Systems Interconnection reference model is a layered, abstract representation created as a guideline for network protocol design. The OSI model divides the networking process into seven logical layers, each of which has unique functionality and to which are assigned specific services and protocols.

In this model, information is passed from one layer to the next, starting at the Application layer on the transmitting host, proceeding down the hierarchy to the Physical layer, then passing over the communications channel to the destination host, where the information proceeds back up the hierarchy, ending at the Application layer

A reference model is a conceptual blueprint of how communications should take place. It addresses all the processes required for effective communication and divides these processes into logical groupings called layers.The OSI model is the primary architectural model for networks. It describes howdata and network information are communicated from an application on one computer through the network media to an application on another computer. The OSI reference model breaks this approach into layers.


 Advantages of Reference Models

The OSI model is hierarchical, and the same benefits and advantages can apply to any layered model. The primary purpose of all such models, especially the OSI model, is to allow different vendors’ networks to interoperate.

Advantages of using the OSI layered model include, but are not limited to, the following:
  1. It divides the network communication process into smaller and simpler components, thus aiding component development, design, and troubleshooting.
  2. It allows multiple-vendor development through standardization of network components.
  3. It encourages industry standardization by defining what functions occur at each layer of the model.
  4. It allows various types of network hardware and software to communicate.
  5. It prevents changes in one layer from affecting other layers, so it does not hamper development
The OSI has seven different layers, divided into two groups. The top three layers define how the applications within the end stations will communicate with each other and with users. The bottom four layers define how data is transmitted end to end.

The OSI reference model has seven layers:
  • Application layer (layer 7)
  • Presentation layer (layer 6)
  • Session layer (layer 5)
  • Transport layer (layer 4)
  • Network layer (layer 3)
  • Data Link layer (layer 2)
  • Physical layer (layer 1)

The Application Layer

The Application layer, Layer seven, is the top layer of both the OSI and TCP/IP models. It is the layer that provides the interface between the applications we use to communicate and the underlying network over which our messages are transmitted. Application layer protocols are used to exchange data between programs running on the source and destination hosts. There are many Application layer protocols and new protocols are always being developed.

The Application layer of the OSI model marks the spot where users actually communicate to the computer. This layer only comes into play when it’s apparent that access to the network is going to be needed soon.
The Application layer is also responsible for identifying and establishing the availability of the intended communication partner and determining whether sufficient resources for the
intended communication exist.

These tasks are important because computer applications sometimes require more than only desktop resources. Often, they’ll unite communicating components from more than one network application. Prime examples are file transfers and email, as well as enabling remote access, network management activities, client/server processes, and information location. Many network applications provide services for communication over enterprise networks, but for present and future internetworking, the need is fast developing to reach beyond the limits of current physical networking.

The Presentation Layer

The Presentation layer gets its name from its purpose: It presents data to the Application layer and is responsible for data translation and code formatting.
The OSI has protocol standards that define how standard data should be formatted. Tasks
like data compression, decompression, encryption, and decryption are associated with this
layer. Some Presentation layer standards are involved in multimedia operations too.

The Presentation layer has three primary functions:
  1. Coding and conversion of Application layer data to ensure that data from the source device can be interpreted by the appropriate application on the destination device.
  2. Compression of the data in a manner that can be decompressed by the destination device.
  3. Encryption of the data for transmission and the decryption of data upon receipt by the destination.

The Session Layer

As the name of the Session layer implies, functions at this layer create and maintain dialogs between source and destination applications. The Session layer handles the exchange of information to initiate dialogs, keep them active, and to restart sessions that are disrupted or idle for a long period of time. 
It coordinates communication between systems and serves to organize their communication by offering three different modes: simplex, half duplex, and full duplex. To sum up, the Session layer basically keeps different applications’ data separate from other applications’ data.

The Transport Layer

The Transport layer segments and reassembles data into a data stream. Services located in the
Transport layer segment and reassemble data from upper-layer applications and unite it into
the same data stream. They provide end-to-end data transport services and can establish a
logical connection between the sending host and destination host on an internetwork.

The Transport layer is responsible for providing mechanisms for multiplexing upper-layer
applications, establishing sessions, and tearing down virtual circuits. It also hides details of any
network-dependent information from the higher layers by providing transparent data transfer.

  1. The Transport layer also encompasses these functions:
  2. Enables multiple applications to communicate over the network at the same time on a single device
  3. Ensures that, if required, all the data is received reliably and in order by the correct application
  4. Employs error handling mechanisms
The Transport layer provides for the segmentation of data and the control necessary to reassemble these pieces into the various communication streams. Its primary responsibilities to accomplish this are:
  1. Tracking the individual communication between applications on the source and destination hosts
  2. Segmenting data and managing each piece
  3. Reassembling the segments into streams of application data
  4. Identifying the different applications

The Network Layer

The Network layer (also called layer 3) manages device addressing, tracks the location of devices
on the network, and determines the best way to move data, which means that the Network layer
must transport traffic between devices that aren’t locally attached. Routers (layer 3 devices) are
specified at the Network layer and provide the routing services within an internetwork.

Two types of packets are used at the Network layer: data and route updates.
  1. Data packets Used to transport user data through the internetwork. Protocols used to support data traffic are called routed protocols; examples of routed protocols are IP and IPv6.
  2. Route update packets Used to update neighboring routers about the networks connected to
    all routers within the internetwork. Protocols that send route update packets are called routing
    protocols; examples of some common ones are RIP, RIPv2, EIGRP, and OSPF. Route update
    packets are used to help build and maintain routing tables on each router.

The Network layer, or OSI Layer 3, provides services to exchange the individual pieces of data over the network between identified end devices. To accomplish this end-to-end transport, Layer 3 uses four basic processes:
  • Addressing
  • Encapsulation
  • Routing
  • Decapsulation


Addressing

First, the Network layer must provide a mechanism for addressing these end devices. If individual pieces of data are to be directed to an end device, that device must have a unique address. In an IPv4 network, when this address is added to a device, the device is then referred to as a host.

Encapsulation

Second, the Network layer must provide encapsulation. Not only must the devices be identified with an address, the individual pieces - the Network layer PDUs - must also contain these addresses. During the encapsulation process, Layer 3 receives the Layer 4 PDU and adds a Layer 3 header, or label, to create the Layer 3 PDU. When referring to the Network layer, we call this PDU a packet. When a packet is created, the header must contain, among other information, the address of the host to which it is being sent.

Routing

Next, the Network layer must provide services to direct these packets to their destination host. The source and destination hosts are not always connected to the same network. In fact, the packet might have to travel through many different networks. Along the way, each packet must be guided through the network to reach its final destination. Intermediary devices that connect the networks are called routers. The role of the router is to select paths for and direct packets toward their destination. This process is known as routing.

The Data Link Layer

The Data Link layer provides the physical transmission of the data and handles error notification, network topology, and flow control. This means that the Data Link layer will ensure that messages are delivered to the proper device on a LAN using hardware addresses and will translate messages from the Network layer into bits for the Physical layer to transmit.
The Data Link layer formats the message into pieces, each called a data frame, and adds a customized
header containing the hardware destination and source address

The IEEE Ethernet Data Link layer has two sublayers:
  1. Media Access Control (MAC) 802.3 Defines how packets are placed on the media. Contention media access is “first come/first served” access where everyone shares the same bandwidth hence the name.
  2. Logical Link Control (LLC) 802.2 Responsible for identifying Network layer protocols and
    then encapsulating them. An LLC header tells the Data Link layer what to do with a packet
    once a frame is received.

The Physical Layer

Finally arriving at the bottom, we find that the Physical layer does two things: It sends bits and receives bits. Bits come only in values of 1 or 0—a Morse code with numerical values. The Physical layer communicates directly with the various types of actual communication media.

Different kinds of media represent these bit values in different ways. Some use audio tones, while others employ state transitions—changes in voltage from high to low and low to high.
Specific protocols are needed for each type of media to describe the proper bit patterns to be
used, how data is encoded into media signals, and the various qualities of the physical media’s
attachment interface.

TCP/IP and the DoD Model

 The Transmission Control Protocol/Internet Protocol (TCP/IP) suite was created by the Department of Defense (DoD) to ensure and preserve data integrity, as well as maintain communications in the event of catastrophic war. So it follows that if designed and implemented correctly, a TCP/IP network can be a truly dependable and resilient one.
The DoD model is basically a condensed version of the OSI model—it’s composed of four,
instead of seven, layers:
  1. Process/Application layer
  2. Host-to-Host layer
  3. Internet layer
  4. Network Access layer