OSI and TCP/IP Model

OSI MODEL

 Table of Contents:-

1.    Introduction.

2.    Need of OSI MODEL.

3.    Definition of OSI MODEL.

4.    The 7 Layers and Their Explaination.

5.    TCP/IP MODEL.

6.    Difference between Segmentation and Fragmentation.

7.    Difference between MSS and MTU.

8.    Example for a better understanding of L2,L3,L4.

9.    Questions asked from OSI MODEL in the L1 Interview.



l INTRODUCTION:-


It is not an actual thing. It's just a conceptual Framework model that we have created for our reference to understand the complexity of the technology or network Infra, to ease troubleshooting and many more ways.


After the completion of the Topic I’ll be providing you with the INTERVIEW QUESTIONS FOR NETWORK ENGINEER L1 ASKED FROM OSI MODEL and an Example for the better understanding of L2, L3, L4, where most of the people are confused at Level 1.

 

l Why did we need OSI model ?

 

In understanding the complex setup of Technology and devices we were experiencing a lot of challenges. So, to make things simple and well arranged be created this hypothetical model to get a better idea for how our protocol works or how the traffic flow works.

 

l What is OSI MODEL ?

 

It is a 7-layered architecture that explains how the traffic flow works and how the packet is been encapsulated and Decapsulated.

IT explains how the details are added to a certain data or packet or payload. Where the protocols comes into play and at what instance what header or detail is being added to the data.

 

l Below are the OSI LAYERS stated from TOP to  

    BOTTOM:-





 

 


* The Layers Moving from down to top:-

 

1. Physical layer-

 This layer is responsible for physical connectivity. All the physical setup of a Infra comes under this layer.

This layer converts bits into signals and transmits it through the links and vice-Versa when receives any signal.

 

2. Data Link-

 Data link is responsible for breaking the packet or datagram into frames and then frames into bits. It takes care for the Hop-to-Hop delivery of the packet. It achieves this with the help of physical address that is Mac-address. The source and destination Mac is being added here which is responsible for the delivery of the packet to the next device. 

ARP is the protocol that works on this layer. Also the Layer 2 switches works on this layer.

 

3. Network Layer-

 Network layer is responsible for delivery for packet from source to destination as it deals with the IP header in which the source IP and destination IP address is contained which is the logical address. 

Apart from this routing and fragmentation is the part of this layer. If you don't know what routing is, its just simply showing the path to the traffic that which path it has to take and which particular devices it has to pass through to reach the destination.. Although there is more to it but for understanding perspective you can take it this way, 

Talking about the fragmentation and segmentation, these are important parts from the interview perspective. So, I'll be differentiating among these later. 

The ping protocol that is ICMP works on this layer and also the L3 switches and routers works on this layer. 

4. Transport Layer-

This layer is responsible for the Process-to-Process delivery and does that with the help of port address which is contained in the TCP or UDP Header. Its also responsible for segmentation which is a logical feature. Hence, the packet here is called segment. 

Apart from the segmentation this layer is also responsible for the flow control, sequencing, windowing, etc. 

TCP and UDP are the protocols working on this layer. 

5. Session Layer-

 This layer is responsible for the creation , modification and deletion of sessions. It also works with authentication and ensures security as well. 

It also allows systems to communicate in half-duplex or full-duplex mode.

6. Presentation Layer-

 The encryption, decryption and translation are the part of this layer. Hence, also called translation layer. 

The data you send over the internet is not being transmitted as same or in the same format you are sending it. It could be encrypted or translated into other formats then broken into smaller parts then into bits and then its being transmitted to the receiver where its being gathered and decrypted and then read. 

Some protocols used on this layer- JPEG, GIF, etc.

7. Application Layer-

This layer provides the graphic user interface that is this layer makes the application and network appliances accessible. Hence, called desktop layer. 

This data send is being generated on this layer. Mail services, directory services are the examples of functions of application layer. 

l NOW LETS DISCUSS ABOUT THE TCP/IP MODEL:-

 

There is not much to discuss in this just that for the top 3 layers of OSI ( Application, Presentation, Session ) there is a single layer that is Application Layer whereas for the first 2 layers ( Physical, Data Link ) there is Physical Layer or Network Access Layer. 

So, overall the TCP/IP consists of 4 layers:-


                         

 


 

 

 

 

 

 

 

 

 

 

 

 

 

 






## Now comes the most important part from the interview perspective- Difference between Segmentation and Fragmentation ?

 

Segmentation

Fragmentation

 

 

1. Works on Layer 4.

1. Works on Layer 3.

2. Software based.

2. Hardware based.

3. Occurs on MSS.

3. Occurs on MTU.

 

 

 

 

## Second most important part is Difference between MSS and MTU ?

 

MSS ( Maximum Segment Size )

MTU ( Maximum Transmission Unit )

 

 

It’s the part of TCP Header. It determines the Maximum size of the single Segment/ Packet on the Layer 4. It is a logical or software based feature.

It’s the Maximum size of a particular packet that can be transmitted through a link. It’s a physical feature and varies with the type of links. Like for Ethernet by default its 1500 bytes. Also it works on Layer 3.

 

 

 

** Now lets discuss an example to give you a better understanding or a better difference between L2, L3, L4. 

 

Example- Lets say you are sending a text message to a friend on instagram and also a email to him on the gmail. So how things work now-

 

Various headers would be encapsulating your data at different layers. Its not like that your traffic would reach to the receiver directly. The traffic needs to travel through different devices before it reaches the receiver but the question here is- which device it should go first because there would be path involving multiple devices that would take the data to the receiver but how would the source know where to send the data first so that it reaches the destination.

1.    So here your L2 comes into play which is responsible for next hop delivery of data or next device delivery which is done with the help of Mac-address ( source Mac and destination Mac ) which keeps on changing as the packet moves further.

2.     Now that the next hop is set but it must be known that what is the final destination for the packet- So, for the source to destination delivery of the packet the L3 is responsible which is done with the help of IP Header or IP Address in which the source IP and destination IP is present.

3.    Now the question arises that both- the text and the mail has been sent to the same device or the same IP address, so how would the device know that this is an instagram text it needs to be displayed on instagram and the other one is the email sent on gmail, so it must be displayed on the gmail ?

This is where the port address comes into play contained in the L4 Header and this is called Process-to-Process delivery or P-to-P delivery that is if a text is sent on instagram, it should be displayed on instagram and if the mail is sent on gmail so it should be displayed on gmail.

 

** Now just a reminder that this process is being carried out in reverse order at the source side and in the same order at the destination side.

## Although, I can give you an idea of packet flow as well but that would make this article a bit lengthy which it had already become. So, check the ARP article for the packet flow idea. Meanwhile as discussed, I will provide you with the L1 interview question asked by interviewers from OSI MODEL.

 

 

 

l INTERIVEW QUESTIONS ASKED FROM OSI MODEL:-

 

1.    Differentiate between MSS and MTU ?

2.    Differentiate between Segmentation and Fragmentation ?

3.    State and explain OSI Layers from top to bottom or down to top ?

4.    Differentiate between L3 and L4 ?

5.    Define the functions of L4 ?

 

THAT’S IT FOR THIS ONE WAIT FOR OTHER TOPICS TO BE PUBLISHED.

THANK YOU.

 

 

Comments

Popular posts from this blog

DNS (DOMAIN NAME SYSTEM)

ARP (Address Resolution Protocol)