OSI & TCP-IP, Part-2

The OSI &  the TCPIP
    First of all we must understand that internet works with packet switching technology, where the information is broken down into packets. Each packet will then trace any path to the destination. Along the path from the source to the destination, it will come across many nodes. The nodes may be any network device but it must understand the language of the layered structured model (TCPIP in the case of internet).
    At every node, each layer of the protocol suite will do some exercise on the packet, as per the requirement. I mean to say that, the layers will impose some rules on the packet, to make it actually deliverable over the network.
  As OSI is the most logical standard, it will be discussed first and then it will be seen how 4 layers TCP-IP fits into this 7 layers OSI model. OSI or TCPIP is not a single protocol but a collection of many protocols at different layers. They have been developed over years and still improving as per the need of the modern networking community.
We should be kept informed that all the developments in internet have been contributed by users only and the good thing is that anybody can do that!  ( thanks to IETF )
The OSI model has got 7-layers as depicted below. The counting is from the lowest layer. So Physical layer is 1st layer, Data-link is 2nd, Network is the 3rd and so-on. We shall try to understand one by one.


The Application(7th) Layer :-  Whenever we want to communicate over internet, we first open web-browser, instant messenger etc. All the softwares that help to build these come under Application layer. So we can say that this layer provides human interface to the network. As an analogy with the postal network, we can say that the plain paper over which we write, falls under the Application layer.
             The popular protocols in this layer are 1) Hypertext transfer protocol or HTTP, due to which we are able to view webpage. 2) Domain Name Service or DNS is the way by which Internet domain names are located and translated into Internet Protocol addresses.
The Presentation (6th) layer: - This layer ensures readability of the data at both ends.
    The main functions are: -
a) Data/File formatting (ASCII, EBCDIC)
b) Translation of data into formats understood by the local machine to maintain cross platform compatibility.
c) Encryption, to keep sensitive data (like password) secure or scramble data into a format that can be understood by receiving machine only. There is usage of certain algorithm for this.
d) Compression of data like audio, video and picture into their respective formats like .mpeg, .avi, .jpeg etc.
    As an analogy, the language that you write on the letter comes under this layer. You have to write the language that the receiver understands, so the language ensures readability at both ends.
The Session Layer (5th) Layer: - This layer maintains session/communication links between end machines. It establishes, manages & terminates the connections between the local & remote applications. As an analogy whenever you lift telephone to talk to somebody, you first of all say “Hello”, this indicates the beginning of a session and when you say “Ok Bye”, which indicates the end of the conversation session. This session layer does similar type of job. As you know more about the working of Internet, you shall understand that the actual session aspects of these protocols are not used. Actually session layer protocols are rarely used and their duties now fall on the application layer. With that being said, there are other services of session layer which are of much use. These services are: -
1)      Authentication 2) Permissions 3) Organization of Data flow
To be very true, with the advent of multimedia services in Internet like Video, Live Tv, Web-conferencing, online video game, the protocols in this layer are very important now a days.  Certain protocols in this layer are RTCP (Real-time transport control protocol), SQL, RADIUS, KERBEROS etc.
The Transport (4th ) Layer: - This layer guarantees end to end data transfer between the correct processes in the two communicating devices. It takes care of reliability through acknowledgement mechanism and flow control through Sliding window mechanism. This layer defines one of the most important address of the network, the 16 bits “Port address”. The port address represents the address of the process in a computer. For example your computer may be running different applications (or different webpages, instant messenger etc are open), then those will have different port addresses. Important two protocols in this layer are TCP or Transmission Control Protocol & UDP or User Datagram Protocol. TCP has got acknowledgement mechanism in-built, and therefore the connection oriented whereas in UDP, there is no acknowledgement mechanism and therefore connectionless. I will describe the details in my other blogs.
Network (3rd ) Layer: - This layer is responsible for routing the packet systematically from source to the destination, along the correct path. Here another important address of the network is defined, the IP address ( 32 bits in IPv4 and 128 bits  in IPv6).  IP address is the identity of the computer or the device in the internet ( port address is the process. One important network device called “Router” exists here. The main protocol here is the IP(Internet Protocol) and there are certain auxiliary protocols having specific functions like ICMP, IGMP,ARP,RARP.....
 The post offices correspond to routers and the postal address with PIN code to the IP address, in our analogy for postal network.
Data Link (2nd) Layer : - The job of this layer to make the packet actually deliverable over the network. It is just like the postal stamp in our postal network, without which, the letter will not move. We must understand that the packet may go through different types of media (may be Cu wire, OFC, microwave, satellite, radio waves etc) along the path to the destination and hence the requirements or the protocols are also different. Data link layer protocols govern how to format the packet into frame for different media. This layer tries to ensure reliable transfer of frames over point to point link through flow control and error control. This layer acts as a connecting layer between the software processes of the layers above it and the physical layer below it. It releases the upper layers from the responsibility of putting data into the network & recovering data from the network.  The important protocol in this layer is the Ethernet. This layer again defines hardware address or 48 bits MAC address (if it is Ethernet), which identify the machine over point to point link.
Physical (1st) Layer: -This layer is responsible for transmitting raw bit stream over physical medium. So when you say physical medium, it can be a copper wire, where bits are sent as voltages, it can be wireless link through which bits are sent using some kind of frequency modulation and so on. It can also be some kind of encoding like differential Manchester for example in Ethernet protocol, before actually sending data over physical link.           


Comparison of TCP/IP and OSI :- TCP/IP does not conflict  much with the OSI standards because the two protocol stacks were developed concurrently. In some ways, TCP/IP contributed to OSI, and vice-versa.
The main differences between the OSI architecture and that of TCP/IP relate to the layers above the transport layer (layer 4).OSI has both, the session layer and the presentation layer, whereas TCP/IP combines both into an application layer. The other things remain same.
Remember TCP/IP is not a single protocol, but a collection of many protocols at every layer, and therefore its is called TCP/IP protocol suite. The name TCP/IP was coined after the most important protocols in this suite the “Transmission Control Protocol” and the “Internet Protocol”.

A point to note: - The upper layers from Application, Presentation, Session and the Transport are host to host layers. The information in these layers is meant for the end processes only and the intermediate nodes have nothing to do with them. The lower layers Network, Data-Link and physical are point to point layers. The information in these layers are for actual point to point delivery and finally to the destination. As an analogy with our postal network, the actual letter-pad, the content are meant for the final receiver only and the post-offices, stamp, the post-man are for point to point delivery. This whole matter can be understood by understanding the actual routing of packet through internet. For this my blog on Routing may be referred. Till then, have a visual understanding of the layers through the animation below.  For any query, you may always drop in a comment. That’s it !
    

No comments:

Post a Comment